-
Notifications
You must be signed in to change notification settings - Fork 70
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
Intake conversion Fig4-DrakePassageTransport #345
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…e intake catalogue
I've had to completely renovate this notebook, partly to update it to use experiments that are accessible from the intake catalog - but also I've been able to simplify it a fair bit. Review needed! |
@@ -1,80 +1,506 @@ | |||
{ |
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.
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.
I'd suggest the following...
Instead of
if this:
darray = cat_subset[name].search(variable='tx_trans_int_z').to_dask()
transport = darray
transport = transport / 1e6 / 1025
else:
darray_else = cat_subset[name].search(variable='tx_trans_int_z').to_dask()
transport = darray_else
transport = transport / 1e6 / 1025
something along the lines of:
ρ0 = 1025 # m / s^3 mean seawater density
if this:
mass_transport = cat_subset[name].search(variable='tx_trans_int_z').to_dask()
else:
mass_transport = something_else_cat_subset[name].search(variable='tx_trans_int_z').to_dask()
volume_transport = mass_transport / ρ0 / 1e6 # convert to m/s^3 -> Sv
You can even use No need to do that though.. |
Probably best to use the same reference density as the default in MOM5 / MOM6, rho0 = 1035. |
@navidcy - I don't really understand where that code you quoted came from, as it's quite different from the code in my notebook ... Apart from the 1036 vs 1025 thing, I have to offset times and then concatenate within my else statement, so your suggested code doesn't really work. |
OK, I think that after some thought I get it, and the above commit should address your concerns. I didn't use |
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.
lgtm! I pushed some minor tweaks, mostly beautifications
Thanks @AndyHoggANU! I'm merging! |
Following the discussion in issue #313, we propose converting the recipes to use Intake, given that the Cookbook is no longer supported and the ACCESS-NRI Intake catalog is now available.
A few months ago, @max-anu began working on this transition. This pull request contains the changes @max-anu made to the notebook specified in the title.