-
Notifications
You must be signed in to change notification settings - Fork 63
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
FMS2: get_field_sizes with FMS1 emulation #111
FMS2: get_field_sizes with FMS1 emulation #111
Conversation
@jiandewang can you check if this PR will fix the IAU issue? @angus-g could you also confirm that this fixes the OBC issue? (or at least the one in mom-ocean#1531) |
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #111 +/- ##
=========================================
Coverage 28.76% 28.76%
=========================================
Files 248 248
Lines 72967 72967
=========================================
Hits 20990 20990
Misses 51977 51977 Continue to review full report at Codecov.
|
@marshallward this fixed iau issue. I am running full UFS RT now, shall be able to give you greenlight late this afternoon. John is having trouble with hurricane regional setting, he will post related information here shortly. |
@marshallward @jiandewang I had a failed run of our regional, hat10 domain of MOM6 using the field_size_fixes branch and compiling with FMS2. I copied over my run directory along with the err.log to this location on Hera, /scratch1/NCEPDEV/hwrf/noscrub/John.Steffen/share_Marshall/OBC3_HAT10_IC_newHSK |
I saw FATAL from PE 0: NetCDF: Variable not found in the log file. This is OBC setting which will read in a bunch of obc*nc files, this can be a clue. |
update; all UFS RT runs are fine. |
this is one of the obc file header |
@jiandewang @JohnSteffen-NOAA
|
Sorry, disregard the last bit, I was able to locate the file. |
@marshallward @jiandewang Hi Marshall, if you have access to Hera, then the entire run directory and INPUT directory are there. I should note that the tests were run on Orion and I moved the directory over to Hera for accessibility. In ./INPUT, the OBC files are listed, |
This is the output from (Edit: I mixed up some commit, the 2d one ends in
Aside from the first one, the outputs are identical. For the first one, the first two records are correct, and the last two differ although I would not have thought they were relevant here. But we can tweak those values if the code is expecting something different here. Also, I should mention that this current PR has a lot of recent GFDL code changes on top of the PR candidate, but I am hoping they are not related to what you are seeing. |
@marshallward: @JohnSteffen-NOAA confirmed it works fine when using infra/FMS1 code |
There was an error in my table, which I think was using the dev/gfdl version of @JohnSteffen-NOAA Sorry for the extra work, but could I ask that you also test the current |
@marshallward Yes, I can test the dev/gfdl branch as a check. To be clear, this should also use FMS2, correct? |
Thats right, with the FMS2 infra. |
I looked at the backtrace, and the error is actually coming from the vertical regridding,
As far as I can tell, the OBC I/O is working well enough (as long as we don't read those values of I think that I have what I need. Thanks for providing that information, and I will try to come up with a fix. |
The dev/gfdl branch compiled with FMS2 infra passed my MOM6 test. |
This patch modifies the `get_field_sizes` function to emulate the FMS1 behavior when the requested `sizes(:)` is larger than the field's number of dimensions. In FMS1, `field_sizes` would always expect a `sizes` array of at least size 4, and in the format of (nx, ny, nz, nt), and would lean on netCDF attributes like `cartesian_axes` when assigning the values. FMS2 lacks similar functionality, due its more general approach. Previously, this was emulated in a way favorable to certain situations, but raised issues in others. This patch attempts to resolve the issue by using the `categorize_axes()` function's ability to identify axes, either by attributes, presumed names, or the `unlimited` property.
5c5c266
to
f6fc6ce
Compare
Thanks @JohnSteffen-NOAA I've updated the PR to handle the
Values beyond the range of I can still imagine ways to cause havoc with this function, and perhaps we should just phase it out (assuming a viable FMS1 solution can be found), but let's save that for a future discussion. |
@marshallward thanks for this. I use this update to fix an issue with OBC tests with infra/FMS2. They would otherwise crash since field_size gets a wrong value for z-dim for ssh (3 instead of 2) on obc segments. |
@marshallward your new commit # f6fc6ce works fine for UFS and Hurricane regional setting. (I think you did a forced push, right ?) |
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.
These changes make sense to me, and it appears that they address all of our known issues. In addition to the usual pipeline and TC tests, I will be running the ocean-only and ice-ocean cases from the pipeline manually to make sure that the FMS2 interfaces are being properly exercised, but once these are done this PR should be accepted and merged.
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/15274 and my own tests that use the FMS2 interfaces, as well as the TC testing. |
update to MOM6 main 20230206 commit
This patch modifies the
get_field_sizes
function to emulate theFMS1 behavior when the requested
sizes(:)
is larger than the field'snumber of dimensions.
In FMS1,
field_sizes
would always expect asizes
array of at leastsize 4, and in the format of (nx, ny, nz, nt), and would lean on
netCDF attributes like
cartesian_axes
when assigning the values.FMS2 lacks similar functionality, due its more general approach.
Previously, this was emulated in a way favorable to certain situations,
but raised issues in others.
This patch attempts to resolve the issue by using the
categorize_axes()
function's ability to identify axes, either byattributes, presumed names, or the
unlimited
property.