-
Notifications
You must be signed in to change notification settings - Fork 12
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
diagnostic bug in CICE when outputting 4d fields #62
Comments
It would be fantastic if someone familiar with CICE can confirm what I'm seeing! If I'm right, I'm wondering if this is a subscript error? That is, the thickness category and layer indices are misordered somewhere in the code. I suspect this is linked to writing output, so I have started looking in files such as |
Hi @scrallen, sorry I didn't reply earlier. I can confirm that I see the same thing with We have saved |
Hi, no I looked as carefully as I could, but couldn't see where things might be wrong. Someone more skilled than me may spot something. I confess, I've moved on to focusing on configurations with mushy ice and other things for the time begin, so this slipped off my radar. |
Yes, this requires further investigation. |
The time axis is also missing for some (all?)
yields
Not sure how this occurred. There is a time axis in cycles 3 and 4, e.g.
yields
|
The time axis was missing from I have retained the unconcatenated files from 2014-05-01 onward in Apart from the lack of a time axis, the salt profile looks sensible in cycle 2 (at least in some places) It would be worth looking at the CICE versions used for these runs - perhaps there was a commit that fixed the time axis but messed up the index order. |
cycle 2 used The commits between 26e6159 and 9864af2 are:
One big change is switching to parallel IO. These are the changes between those commits: https://github.com/COSIMA/cice5/compare/26e6159..9864af2 There are lots of changes to |
@scrallen what CICE executable did you use for |
My access-om2 git log has the following:
Forgive my limited git skills, but I believe that points to this ACCESS-OM2 commit which includes this commit of CICE, dfb833a. As my commit message suggests, I pulled to fix the chio bug. Does that help? |
I might add, the commit I pulled was made some time after those in the span you listed. |
Thanks - to double-check, what is the full path to the cice exe given in |
|
Oh, that's a local commit, as I was changing to source code. The git log in the cice src directory has:
so I suggest it could be c1c6a47 |
It may become clearer if you inspect the git history with |
The code in |
Well spotted @russfiedler - I guess you mean this 4D bit of |
I'm sure it applies to all the variables. The 2D variable are written the same way. Also, it's still in CICE6. I looked at the API for https://www.unidata.ucar.edu/software/netcdf/docs-fortran/f90-variables.html |
Hmm, interesting - but we haven't seen this issue in anything other than the 4D (not including time) vars.
I also misunderstood the loop limits defined here in my last comment - I now think both sections I referred to are actually for 4D (not including time), so it's OK that they are nearly identical. |
Another correction - we don't set In fact, in cycle 3 we get parallel IO by building with PIO (see #34), which sets |
The lack of a time index in cycle 2 is a separate bug, presumably in |
So we have 2 separate problems:
Issue 1. is unresolved, and affects both salinity and temperature profiles (Sinz and Tinz) in current configurations. See notebook for details: https://nbviewer.org/github/aekiss/notebooks/blob/8ec1ef20eba5b34408f27e6feaf71c8a11e7484c/check-sinz-tinz.ipynb#Check-S-and-T-profiles-in-cycle-4 |
This issue has been mentioned on ACCESS Hive Community Forum. There might be relevant details there: https://forum.access-hive.org.au/t/output-internal-sea-ice-temperatures-from-access-om2/1531/9 |
Background:
For each grid point and ice category, cice computes its thermodynamics over nkice layers (this is 4 in ACCESS-OM2).
Under the BL99 thermodynamics option, the conductive salinity profile (aka 'ice internal salinity') is fixed and prescribed from a function - therefore we know what values to expect. For a given point and thickness category the expected values for these four layers are
[0.64920187, 2.354581 , 3.0310922 , 3.1892977 ]
.The Issue:
However, if
Sinz
is output (f_sinz
is the namelist field flag), the values do not appear as I expect.Here's an example taken from the 1° model, given an Xarray DataArray:
selecting a point for a given time (which has length 1 in this case), lat and lon (that has ice, aka
aice>0
)We do not see the 4 values we expect to see.
Consider the same time,lat,lon for all layers and thickness categories:
The values appear to be ordered along the wrong dimensions. What I think should be the correct answer can be retrieved (for this time,lat,lon) by:
These code snippets have been produced in ipython using pyXarray, but the same answer is obtained using a variety of tools, including inspecting the netCDF file with ncview.
If there is an issue here, this may affect other 4d fields like
Tinz
, but these may be harder to diagnose from their values, as they aren't prescribed and fixed likeSinz
.An example output file with the
Sinz
variable can be found on gadi at:The text was updated successfully, but these errors were encountered: