-
Notifications
You must be signed in to change notification settings - Fork 23
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
1 deg CICE grid very slightly misaligned with MOM #279
Comments
would be good to have grid sanity checks to catch this sort of thing #129 |
This should be fixed by writing a tool to generate the CICE grid from the MOM-supergrid, which would also give us known provenance of the CICE grid files. (The tool could go in om3-scripts) OM3 has some sanity checks (with tolerance set by eps_imesh) but there could be more. |
@aekiss - I don't have permissions but I think this should go on the CMIP7 project board. |
The CICE grid.nc file needs these variables defined
I think we can derive all these from the mom supergrid. Angle is defined as 'ANGLE = angle between local x direction and true east' which is consistent with MOM definition except in radians from -pi to pi. Its not clear which corner of the grid cell this is measured, although it is presumably at the U points (for consistency, and because CICE calculates an ANGLET quantity). EDIT: More fields are needed than this for OM2, but they can all be derived from the mom supergrid, the right place to look is here in ice_grid |
Similarly, it could have been a degrees to radian conversion using a constant with insufficient precision |
Plots of the grid absolute and relative errors are shown in the first part of https://github.com/aekiss/notebooks-MartinDix/blob/d6d147a/grid025_check.ipynb. The relative error is very nearly constant (7.746366e-9) for all grids, suggesting a differing value of pi in the deg-rad conversion. For that matter, could it just be because our numpy check uses a slightly different deg-rad conversion factor from cice? |
This looks probably ok:
|
So there is a problem, or not? |
We should fix this, but the discrepancy is <5e-6 so at most the differences in the results would be rounding error ( I think) We should definitely fix the 0.25 degree grid. |
I deep dived on tarea too, to see what happens and to try and understand how we should be making the cice c-grid. I calculated it from the mom supergrid like this:
(for sanity, I checked this is the same as I compared the calculated tarea from the cice file, and the differences south of 65N seem as expected (i.e. in the 14th significant figure). However, in the tripole region they do become significant (in m^2): In the cells around the tripole, the difference is >1%. Have I calculated the tarea wrong from the mom grid? Or is the cice file wrong? (The sum of the anomalies is 0) p.s. FYI @ezhilsabareesh8 p.p.s: I guess it could different areas could be correct but calculated in different ways ... different assumptions about how round the earth is etc, but surely having them internally consistent would be good. |
I have mentioned to @MartinDix that we did find issues a 1 deg in strong current in Beaufort Sea was the stongest case, but corner points also were suspect. |
FYI the 1deg grid is briefly documented in Bi and Marsland 2010 and Bi et al 2013 |
This issue was fixed here: With some testing added too. We should be getting accuracy between mom & cice grids of ~1e-13. This was added to the OM2 configs here through many PRs linked here: ACCESS-NRI/access-om2-configs#92 |
I've been looking into inconsistencies between the ESM1.5 and OM2 grids and I think this difference in areas was actually introduced when the ocean grid was updated to the FMS mosaic format - see here for details. |
Is the OM2 ocean supergrid (in the FMS mosaic format?) incorrect then? |
That's what I'm wondering. I need look deeper into how those areas are calculated |
Hi @dougiesquire (@anton-seaice), its possible that the precision was increased with access-om2, from the much old access-esm1.5 (originally access-1-0/3 grid) , as you say, as I said when I checked the other day the grid points were nominally the same but the precision as different so yes I can imagine deriver quantities like area of grid boxes will also be impacted. |
Why only in the tripole? And at the North Pole of a rectilinear grid, so not actually a special location for the tripolar grid? |
Yeah, I don't think this particular issue is a precision thing. The difference is introduced in the conversion from the old FMS grid format to the mosaic format using FRE-NCtools I'll probably just open an issue on FRE-NCtools soon. Hopefully someone there can clarify. |
So that means the old grid has the "more correct" areas? |
They're both incorrect, but by slightly different amounts 🙃. If anything, the mosaic format grid (OM2) has the "more correct" areas. The following figure shows the areas along an arc of cells passing through and near the north pole. The bump at the pole shouldn't be there. There's an option in the FRE-NCtools polygon area algorithm to calculate the area of polygons near the pole using a copy of the polygon that has been rotated away from the pole. Unfortunately this isn't exposed to These figures are taken from this notebook which contains more info. |
HI @dougiesquire @aidanheerdegen, these grid issues at the pole have been really interesting, one wonders what the implications have been for some of the odd issues we saw at the tripole seem in some of our runs which we never really. |
There's this probably-unrelated issue which we've never figured out: #86 |
Hi @aekiss that's was the link I want you to add in, its probably unrelated but its good to line them up at some point. |
The 1deg CICE grid values are very slightly different from MOM in both latitude and longitude for both T and U points - see this notebook.
Perhaps there was loss of precision due to conversion to single precision and back to double?
Possibly related: #271
The text was updated successfully, but these errors were encountered: