-
Notifications
You must be signed in to change notification settings - Fork 38
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
Area statistics won't work on data with lambert Conformal projection #1156
Comments
@thomascrocker, I am afraid the issue is more subtle. The names |
Ah yes, I see that the |
Moving this to v2.6 since there is not open PR yet. |
a summary of where I think we are with this issue
So either:
Is that a good summary? |
@nhsavage, if we can get the preprocessors:
my_preprocessor:
area_statistics:
operator: mean
fx_variables:
areacella: |
we can give that a go, but in general that approach is sub optimal until #1082 is merged |
also - the areacella files do not appear to be uploaded for the RegCM4 family of models. This is one of the CORDEX core models and as such is a key target here (we can ask for this to be uploaded of course) |
Hmm. I have been drilling down into the source code where this fails. It seems that #999 actually added the support for using cell area files already. That suggests strongly that using the fx files is a good way forward. We should try this for the original file with a more recent release of ESMValCore. That does add extra importance to #1082 though. For the models which are misisng areacella files, we can use a twin track approach, asking the modellers to upload these files to ESGF and in the short term making our own files |
I've had a chat with @nhsavage, I believe that import esmf_regrid
field = esmf_regrid.schemes._cube_to_GridInfo(cube).make_esmf_field()
field.get_area()
area_weights = field.data Note: that this is probably going to be an approximation since ESMF assumes all straight lines are great circle arcs. If this turns out to be a workable solution, I could look into making this a pubic utility function in iris-esmf-regrid. Also, this seems to involve iris guessing the bounds since they were not present on the file I was experimenting with. |
For RCM data on a Lambert Conformal projection (see for example http://esg1.umr-cnrm.fr/thredds/fileServer/CORDEX_CNRM/output/EUR-11/CNRM/CNRM-CERFACS-CNRM-CM5/rcp85/r1i1p1/CNRM-ALADIN63/v2/3hr/tas/v20190419/tas_EUR-11_CNRM-CERFACS-CNRM-CM5_rcp85_r1i1p1_CNRM-ALADIN63_v2_3hr_200601010300-200701010000.nc ) the names of the x and y dim coordinates are
projection_x_coordinate
andprojection_y_coordinate
. I think this is a standard naming.However, when dealing with irregular grids the code to calculate area statistics assumes that the names of these coordinates are
grid_latitude
andgrid_longitude
.ESMValCore/esmvalcore/preprocessor/_area.py
Line 242 in 3078908
So the calculation of area weights fails.
This can probably be fairly easily fixed by modifying the logic on that line slightly. Creating this issue so it's on my TODO list of things to sort out re CORDEX. If I get around to creating a branch that fixes this I'll update this issue.
The text was updated successfully, but these errors were encountered: