-
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
[Bug]: Investigate differences in xESMF and ESMF regridding that lead to "Model - Observation" plot diffs #938
Comments
@tomvothecoder thank you for keeping investigating this issue. Since the comment on the polar image diffs , shows the abnormal values over the boundary, it reminded me that, i had to use the The command line I use is as follows:
I would suggest we can use However, I needed to use the |
@chengzhuzhang Thank you for figuring this out! I will implement the fix, do a full run, then perform a regression test.
Thanks for filing the issue here. I'll try to address before E3SM Unified is released. |
@tomvothecoder in the dataset we saw diffs, I noticed, most of those are using |
Got it. I just pushed changes to #940 to remove "bilinear" for all applicable variables. I am doing another test run to see if that improves the diffs for variables in #931. |
Actually for these variables, I don't know if comparing diffs makes sense. Shouldn't xESMF with Links to the runs: #940 (comment) |
@tomvothecoder could you help me to update e3sm_diags/driver/init.py to use the file e3sm_ne30_ocean_land_mask.nc which you can find in /home/ac.zhang40/test_zppy/. And run the all conservative_normed (no bilinear) test again? Update: Actually, we don't really need this change for now. because, the program in this case just use the land/ocean fraction included in the climatology dataset. I don't know how to explain why |
@tomvothecoder I think the regrid_methods in _apply_land_sea_mask function needs to be updated as well:
Maybe we just should go ahead and use conservative_normed as default, and test? |
I ended up running with the new default land-sea mask and don't see any obvious changes to the plot. This makes sense based on what you're saying about the land/ocean frac from the climatology dataset being used.
The default regridding method is e3sm_diags/e3sm_diags/driver/utils/regrid.py Lines 177 to 233 in ee134b8
|
@tomvothecoder thanks for being thorough, I should look more carefully...I'm trying to come up with other potential explanations. |
The symptom of missing values bleeding into the regridded field is inline with what is described here:https://xesmf.readthedocs.io/en/latest/notebooks/Masking.html I don't remember if |
What happened?
We found various "Model - Observation" plot differences in #931. I contributed it to differences in how xESMF and ESMF are implemented, which we should expect.
A few potential causes:
conservative
instead ofconservative_normed
in_align_grids_to_lower_res()
results in abnormal data at the latitude edge for polar plot.conservative_normed
#940.3. Misaligned bounds dimension names results in slightly different outputs (opened [Bug]: Misaligned bound vlaues can affect regridded variable results slightly with xESMF #945 to address this separately, if desired).This is a non-issue. We should expect different bounds values since grid sizes are different between the datasets.With further debugging with thispolar
plot case, I found the test and reference datasets have differentbounds
dimension name (test hasnbnd
, ref hasbnd
). Sincebounds
dimension names don't align, xESMF seems to produce different results with regridding (maybe different interpretation of grid cells?). This contributes to larger floating point differences compared to the CDAT code.However, if I drop those pre-existing bounds and do the regridding, xESMF is much closer to the CDAT code. I still noticed the abnormal data at the latitude edge of the plot though (due to 2. above).What did you expect to happen? Are there are possible answers you came across?
Minimal Complete Verifiable Example (MVCE)
Relevant log output
Anything else we need to know?
No response
Environment
v3.0.0rc2 and latest
main
The text was updated successfully, but these errors were encountered: