Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added plotting script for baroclinic wave and plot it produces #14

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Witt-D
Copy link
Collaborator

@Witt-D Witt-D commented Jul 26, 2024

Add or update a Gusto case study

Here is a checklist of things that must be done before a new case study
will be included:

  • Readme with:
    • Instructions for running the case study.
    • Instructions for reproducing included checkpoint and image.
    • [ ]
  • Case study as a function
  • Test added to the root directory
  • Output checkpoint (or link to GH-LFS of the checkpoint)
  • Image of the case study
  • [ ]

@tommbendall tommbendall added plotting script Pull requests or issues for adding a plotting script figure Pull requests or issues relating to a figure labels Aug 7, 2024
Copy link
Collaborator

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long to review this. I thought it would be helpful to have made some plotting scripts for the simpler tests first so that we could work out what is realistic.

Broadly, could you:

  • add to this script to output some initial conditions? I think it would be good to see a grid of the following four initial fields:
    (a) T in the lon-lat plane @ 850 hPa, (b) T in the lat-z plane @ lon = 0,
    (c) zonal wind in the lon-lat plan @ some appropriate height, (d) zonal wind in the lat-z plane @ lon = 0

@@ -0,0 +1,121 @@
"""
Plot for a 2x1 grpah of surface tempeorature and surface pressure fields.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the typos here? And if you add to this plotting script to include initial fields, you could add a comment about that

ylabelpad = -30 if i > 2 else -10

tomplot_field_title(ax, title, minmax=True, field_data=field_data)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere could you restrict the xticks and yticks on the x and y axes so that they are just the limits of the plotted domain?


remove_contour_vals = [None, None]
domain_limit = {'X' : (0, 180), 'Y' : (0, 90)}
colour_schemes = ['jet', 'jet']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not personally that keen on these colour schemes (although I know they were used in the original paper!)

How would you feel about 'RdPu' for temperature and RdBu_r for pressure?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want a better colour scheme but still want easy comparison to the original paper, you can add contour lines to your plot at the values of the colour increments in the original paper - this way the contour lines should match the colour boundaries from the original paper.

field_labels = [r'$T \ / $K', r'$P \ / $Pa']

remove_contour_vals = [None, None]
domain_limit = {'X' : (0, 180), 'Y' : (0, 90)}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use these domain limits to define the xticks and yticks (see comment below)

contours = ['contour a','contour b','contour c ','contour d']

# Things that are the same for all subplots
time_idxs = [0, 768, -1]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the plot that we're adding here, I think you want -1, and something separate for the initial conditions

# ---------------------------------------------------------------------------- #
# Specify lists for variables that are different between subplots
field_names = ['Temperature', 'Pressure_Vt']
titles = ['Temperature (850 HPa)', 'Surface Pressure']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the temperature field actually at 850hPa? I think I'm missing where the interpolation to get that is! It looks like we are taking the surface values

ylabel = True if i % 3 == 0 else None
ylabelpad = -30 if i > 2 else -10

tomplot_field_title(ax, title, minmax=True, field_data=field_data)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add the data format argument here, as for pressure I don't think we want to label the plot to so many significant figures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
figure Pull requests or issues relating to a figure plotting script Pull requests or issues for adding a plotting script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants