-
Notifications
You must be signed in to change notification settings - Fork 128
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
CMUG Sea Surface Salinity dataset and diagnostic #1832
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.
I tested this new diagnostic. It worked and the output looks OK but I would recommend some more documentation (see comments) and I did not like the absolute path used for the shapefile in the recipe.
|
||
Recipes are stored in recipes/ | ||
|
||
* recipe_sea_surface_salinity |
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.
* recipe_sea_surface_salinity | |
* recipe_sea_surface_salinity.yml |
Variables | ||
--------- | ||
|
||
* sos (ocean, monthly mean, time depth_id) |
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.
* sos (ocean, monthly mean, time depth_id) | |
* sos (ocean, monthly, longitude, latitude, time) |
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.
This should refer to the original data or the dimensions expected by the diagnostic after the preprocessor?
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.
So far, this ususally referred to the dimensions expected by the recipe (recipe as provided in the official release). I guess we should think about how to handle this in the future and make it more clear to what this actually refers. Or maybe simply get rid of this section? What do people think?
@@ -0,0 +1,86 @@ | |||
.. _recipes_sea_surface_salinity: | |||
|
|||
Sea Surface Salinity Evaluation |
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 think it would be good to have a section in the documentation on:
(1) how to obtain the shapefile needed
(2) in which directory to put the shapefile
(3) available regions (or at least examples) for analysis
(4) required / recommended preprocessor settings (extract_shape)
I think I addresed all doc related comments. Anyway, this can not be merged because there is a PR in the core that is still pending |
Both, ESMValGroup/ESMValCore#764 and ESMValGroup/ESMValCore#798 have been merged. Is there anything else missing to move forward with this PR? |
I just tried to test this recipe again with the latest ESMValCore (master) but had no success. The first problem was with the preprocessor area_statistics:
After changing
to
the recipe starts but then crashes again with
@jvegasbsc Could you please take a look? Are there other things that still need to be done / adressed before merging? It would be good to get things moving soon so we can meet our CMUG deliverables. |
The preprocessor defined in recipe_sea_surface_salinity.yml creates time series by extracting some given shapes and calculating area means. Each of these two operations works individually but not when combined. As the diagnostic was working before, the error is probably related to changes in the preprocessor that have been introduced during the last year. I could not figure out what might go wrong. @valeriupredoi could you maybe take a look? We need to get this merged soon to meet our CMUG project deliverables and I would greatly appreciate some help as @jvegasbsc does not seem to be around any more... |
hi @axel-lauer could you please merge the latest |
Thanks @valeriupredoi ! I just merged the latest main into this branch. Here is the log file from running the recipe: main_log_debug.txt |
cheers @axel-lauer - am having a looksee now 👍 |
@axel-lauer here's what I found:
-> the reason why there are 9 is that there are 9 regions to be selected and merged into one big map, but the problem is that they are not time-dependent, and that suggests to me that those are the cell measures cubes rather than the actual data cube masked. Here is the issue ESMValGroup/ESMValCore#1394 |
Big thanks to @sloosvel for opening PR ESMValGroup/ESMValCore#1403 This seems to fix the problem with extract_shape, i.e. the preprocessor finishes now successfully! That's really cool! |
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 script and the cmorizer run fine now and the results look as expected. This is now ready to be merged.
cheers @axel-lauer 🍺 Lemme have a looksee in a very short bit (10min) and will approve and merge 👍 |
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.
Looking good! A few comments from me, to the very least fix the typos please 🍺
reference_dataset = variables.pop(ref_alias)[0] | ||
reference = iris.load_cube(reference_dataset[n.FILENAME]) | ||
reference_ancestor = reference_dataset[n.FILENAME] | ||
logger.debug(reference) |
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.
please add a verbose message to debugger, not just a cube
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.
Added more verbose message...
time_coord.units.name, | ||
calendar='gregorian', | ||
) | ||
unify_time_units((reference, dataset)) |
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.
will this always succeed? Probably best to catch an error with a try/except
statement
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.
Not sure why @jvegasbsc implemented this. I would leave it as is since it seems to be working fine...
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.
sure, not a biggie
calendar='gregorian', | ||
) | ||
unify_time_units((reference, dataset)) | ||
logger.debug(dataset) |
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.
here too please add a user-readable message
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.
Added more verbose message...
'caption': caption, | ||
'domains': ['global', ], | ||
'autors': ['vegas-regidor_javier'], | ||
'references': ['acknow_author'], |
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.
this needs a value
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 believe there is none. @jvegasbsc is that right or would you have a suggestion?
|
||
|
||
if __name__ == "__main__": | ||
main() |
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.
OK - I am bit confused why you've created a couple very hefty objects instead of just using functions - it's not like the diagnostic is a module that gets used many times
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.
Not sure, but I would guess @jvegasbsc had a good reason...
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Replaced ^^^ with ---
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.
cheers @axel-lauer 🍺 It still needs a bit of polishing but I believe you guys need this in asap, so I'm not gonna be the proverbial cork in the bottle especially the bits that are still needed are minor 😁
looks good, merge at will @axel-lauer 👍 |
Big thank you @valeriupredoi for your quick help!! I owe you a 🍺 next time we can meet in person! |
@axel-lauer glad I could help! I won't say no to the 🍺 tho 😁 |
Add ESACCI-SEA-SURFACE-SALINITY dataset (v1 and v2) and a diagnostic showing how to
Requires ESMValGroup/ESMValCore#764 and ESMValGroup/ESMValCore#798
Tasks
yamllint
to check that your YAML files do not contain mistakesNew recipe/diagnostic
doc/sphinx/source/recipes
folder and add a new entry to index.rstNew data reformatting script