-
Notifications
You must be signed in to change notification settings - Fork 157
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
Diagnostics with extra dimensions #887
Comments
@grantfirl @SamuelTrahanNOAA @climbfuji |
I had the same problem with the CLM Lake model, and you will see my solution in the If you also need separate input files with custom dimensions, look in |
@SamuelTrahanNOAA Thanks! I will go down this route! |
As with you, it was my dream to generalize the history io. That looked like a herculean task, and would affect many users. Such a thing must be planned properly and funded. A special-purpose module is a low-impact approach, and an order of magnitude easier. |
Description
Adding new diagnostics that have the same dimensionality of existing diagnostics is straightforward. For example, adding a new 2D (lon, lat) or 3D (lon, lat, level) is easy.
But how does one add a diagnostic variable that has a new axis in addition to the existing axis? Say a 4D variable with the dimensionality of (lon, lat, 7, 7)?
In order to output the fields created by the physics scheme COSP, ufs-community/ccpp-physics#233, we will need to add all sorts of new axis for the wide variety of diagnostics produced.
Solution
I was able to "squash" this array and make it work, but it's ugly and fragile
This works because 7X7 happens to be less than the number of vertical layers, but this is sloppy and not extendible to the other diagnostics with wonky dimensionality.
When I tried to add new dimensions to io/fv3atm_history_io.F90, I ran into issues and just gave up before wasting anymore time.
It can't be this hard to add new axis for new diagnostic fields, so I assume I am screwing something up?
Any guidance would be much appreciated!!!!
The text was updated successfully, but these errors were encountered: