-
Notifications
You must be signed in to change notification settings - Fork 134
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
Netcdf History Capability #368
Conversation
- Add history_cdf namelist. This turns on netcdf history files. Netcdf history files are written for each column at each timestep for a hardcoded set of fields. There is no control of fields, frequency, or averaging. History filenames are also hardwired in the code. - History netcdf files require the USE_NETCDF C Preprocessor flag. This is turned on by setting ICE_IOTYPE to netcdf in icepack.settings. In addition, the env and Macros files for the machine have to support builds with netcdf. - Add icedrv_history.F90. Implements history capability. - Add set_env.ionetcdf, set_nml.ionetcdf - Add io_suite.ts
The output fields are hardwired into the implementation. As a starting point, I included several fields from "state" and "flux". But I'm happy to remove/add any others that seem reasonable. The history file also includes trcr and trcrn in their raw multi-dimensional form. Maybe those should be split apart into subgroups of related tracers. But that would require dealing with the tracer indices. This implementation does not provide any features like controlling fields, frequencies, columns, or time averaging. Users turn the file on or off, and the history file does NOT meet the CF conventions. I think that's a completely reasonable starting point. I see no reason to put a huge effort into this feature at this point. The netcdf output should be very useful in the proposed form for users that want it. Again, happy to make some changes now, and we can allow it to evolve as needed. The netcdf header currently has
|
@CICE-Consortium/devteam Would any of you be able to clone this branch and try running with the new netcdf output? You may need to update a machine file. Thx, e |
I'll give this a whirl. |
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.
This compiles and runs fine for me on cheyenne. The netcdf data looks funny in ncview, but I'm not sure how to get around that. It looks like the history is written at every timestep? Should it follow diagfreq? It would also be nice to allow for netCDF restarts as well ... a separate issue.
@dabail10, thanks for testing. The output is written at every timestep for now. I think that's fine. The files are small, so I think we can accept it for now. The initial goal is to provide something basic to the community. Lets see whether folks use it and then what features they request. Nobody has asked for restarts in netcdf format yet. Again, I think what we provide should be driven by community requests. |
netcdf restarts are something we've talked about for the UFS. We haven't
made a serious request, but it's been mentioned in a 'would be nice' sense.
…On Thu, Aug 26, 2021 at 11:58 AM Tony Craig ***@***.***> wrote:
@dabail10 <https://github.com/dabail10>, thanks for testing. The output
is written at every timestep for now. I think that's fine. The files are
small, so I think we can accept it for now. The initial goal is to provide
something basic to the community. Lets see whether folks use it and then
what features they request. Nobody has asked for restarts in netcdf format
yet. Again, I think what we provide should be driven by community requests.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#368 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQ65HMIBYWKHDQZX6MMZQ3T6ZQB3ANCNFSM5AYZITAA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
Tel: 301-683-3747
Coupling and Dynamics Group
(he/him/his)
|
@rgrumbine, this discussion is about Icepack standalone. The CICE model has netcdf restart capability already as well as much more control of history files. If you want to use netcdf restarts in CICE, you just need to turn it on. I don't know whether you can read in a binary restart file and write out a netcdf file. Hopefully so, but I'd need to test that to confirm. If not, that's a feature we could try to add if needed. |
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.
After fixing the machine files, this worked for me on badger. However it does not compile in my laptop conda environment. Not sure if that's a problem with my laptop or conda. @phil-blain @apcraig did one of you try it there?
icedrv_history.F90:54:10:
54 | use netcdf
| 1
Fatal Error: Cannot open module file 'netcdf.mod' for reading at (1): No such file or directory
I have not tried conda, but I'll give it a try. We probably just have to add netcdf to the packages. Let me see what I can do. |
I just updated the conda_macos and it works for me. Hopefully, it'll work for others. You'll have to do
to add the netcdf packages to the icepack environment. This is also updated in the documentation. |
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.
conda now works for me too.
@apcraig feel free to merge this when you're ready |
@apcraig are you finished updating this PR? |
Thanks @apcraig. I was on vacation last week so I missed this, but it might have been a good idea to also update the conda_linux port ? |
The Makefile macro file for conda on Linux was not updated when Icepack learned to do NetCDF output in e1f3574 (Netcdf History Capability (CICE-Consortium#368), 2021-08-30), on the macOS one was updated. Tweak the Linux build similarly.
PR checklist
Add netcdf history capability
apcraig
All tests pass bit-for-bit, https://github.com/CICE-Consortium/Test-Results/wiki/icepack_by_hash_forks#64afb11673798c9c1235e86403b2bcecb79a7abd
Add primitive netcdf history capability