-
Notifications
You must be signed in to change notification settings - Fork 69
Add code to plot ocean TF within transect #600
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
Add code to plot ocean TF within transect #600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @cshafer! I have two small changes to request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cshafer, this is great and runs really fast! I have a few minor changes to request. It looks like a lot, but you can just accept all the changes I made to spacing and lump that into one commit.
thickAx.fill_between(distance, upper_surf_nan, lower_surf_nan, color='xkcd:ice blue') | ||
thickAx.fill_between(distance, bed_transect, thickAx.get_ylim()[0], color='xkcd:greyish brown') | ||
thickAx.grid(False) | ||
thickAx.set_ylim([None, 750]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The axis limits should not be hard-coded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1027fad
thickAx.fill_between(distance, upper_surf_nan, lower_surf_nan, color='xkcd:ice blue') | ||
thickAx.fill_between(distance, bed_transect, thickAx.get_ylim()[0], color='xkcd:greyish brown') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be applied generally, not just for the thermal forcing case. However, the ice color will need to be skipped if options.temperature
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1027fad
y = np.array([float(i) for i in options.y_coords.split(',')]) | ||
|
||
# Determine bounding box using max and min of user-provided coordinates | ||
pad = 5000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to make the padding size a function of dcEdge
. @matthewhoffman , what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1027fad
Co-authored-by: Trevor Hillebrand <[email protected]>
* add option to disable fill of glacier and topo, and disable fill for modes where it would obscure information * make padding a function of dcEdge * Use ismip6shelfMelt_3dThermalForcing variable instead of TFocean * if ismip6shelfMelt_zOcean variable is not present, use standard values with a warning * minor cosmetic adjustments to figure and font size * dynamically set y-axis range when plotting TF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved based on inspection and @matthewhoffman's testing.
This pull request updates the existing
plot_transect.py
script to add the option of plotting ocean thermal forcing along an ice-shelf transect.The code plots the extrapolated
TFocean
field for a single time index along a user defined transect. Invalid (1.0e36
) TF values are set tonp.nan
before interpolation happens for each ocean layer. Ice and bedrock are filled in with solid colors if--thermal_forcing
option is set.