-
Notifications
You must be signed in to change notification settings - Fork 33
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
Standardize regridding to conservative_normed
#940
base: main
Are you sure you want to change the base?
Conversation
# TODO: Remove this conditional once "conservative" references are updated | ||
# to "conservative_normed" throughout the codebase. | ||
# NOTE: this is equivalent to "conservative" in cdms2 ESMF. If | ||
# "conservative" is chosen, it is updated to "conservative_normed". This | ||
# logic can be removed once the CoreParameter.regrid_method default | ||
# value is updated to "conservative_normed" and all sets have been | ||
# refactored to use this function. | ||
if method == "conservative": | ||
method = "conservative_normed" |
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.
Related to #938 (comment)
I think I forgot to add this conditional in _align_grids_to_lower_res()
, which resulted in the abnormal latitude edge in the polar plot here. This fixes that issue and hopefully more diffs between "Model - Observation" plots.
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.
@chengzhuzhang I just did a run with the specific variables from #930/#931 that have differences due to regridding. This change doesn't seem to affect the plot differences for these cases. The regression testing notebooks show the same differences between *_diff.nc
files and the plot diffs look similar.
I think this is the new, expected result as far as I can tell (did not try the bounds dimension name alignment fix from #938).
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 fix does improve the polar
plots though, as you mentioned.
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.
@tomvothecoder see comment here: #938 (comment). It looks like changing to convervative_normed
has little impact, I'm interested to look at the plots and tables. Could you point me to the urls of both runs?
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.
Could you point me to the urls of both runs?
- v2.12.1: https://web.lcrc.anl.gov/public/e3sm/cdat-migration-fy24/25-02-04-main-zppy-diffs/viewer/
- Latest
main
withconservative
: https://web.lcrc.anl.gov/public/e3sm/cdat-migration-fy24/25-02-04-branch-930-zppy-diffs/viewer/index.html - This branch with
conservative_normed
: https://web.lcrc.anl.gov/public/e3sm/cdat-migration-fy24/25-02-18-branch-940-xesmf-diffs/viewer/index.html - This branch with
conservative_normed
for all variables (nobilinear
): https://web.lcrc.anl.gov/public/e3sm/cdat-migration-fy24/25-02-18-branch-940-xesmf-diffs-no-bilinear/viewer/index.html
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.
Thanks for the links! I think we should use conservative_normed
to replace bilinear
. Now there is a caveat: here, look at the diff plot, there is a gap along the coastal line, in conservative_normed. And I realize that, part of the reason is that we are using a very coarse resolution file for land-sea mask. I'm creating a new land-sea mask to see if it helps.
879dc66
to
d5776a4
Compare
- Convert `"conservative"` regridding method to `"conservative_normed"` to align with CDAT codebase
c36e239
to
37c39ef
Compare
@tomvothecoder Following:https://xesmf.readthedocs.io/en/latest/notebooks/Masking.html, I applied the fix (93bf5e3) by adding a |
Maybe it is hopeful to wrap up this PR with some more testing? |
Here is the latest run with the mask fix: https://web.lcrc.anl.gov/public/e3sm/cdat-migration-fy24/25-02-19-branch-940-xesmf-diffs-mask-fix/viewer/index.html |
conservative_normed
@tomvothecoder thank you. I'm putting together all the urls and inspecting the metrics results change: I noticed large difference in RMSE in SST plots to use conservative_normed compare to bilinear. Variables Unit Test_mean Ref._mean Mean_Bias Test_STD Ref._STD RMSE Correlation Variables Unit Test_mean Ref._mean Mean_Bias Test_STD Ref._STD RMSE Correlation I'm going to plot out the regrided maps to examine and compare. |
7aea4ed
to
fe3f2aa
Compare
Description
e3sm_diags_driver/utils/regrid.py
:_align_grid_to_lower_res()
to update"conservative"
regrid method to"conservative_normed"
for proper alignment with CDAT_apply_land_sea_mask()
to add amask
variable to the dataset for regridding, which helps prevent missing values from bleeding into the regridding.e3sm_diags/driver/default_diags/lat_lon_model_vs_model.cfg
and `e3sm_diags/driver/default_diags/lat_lon_model_vs_obs.cfgregrid_method = "bilinear"
to default to"conservative"
(which becomes"conservative_normed"
)Checklist
If applicable: