-
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
Add ability to write out one-time grid history file #1005
base: main
Are you sure you want to change the base?
Conversation
…tures - Add grid_outfile logical namelist - Add extra history stream to be used just for grid output file, that stream is designated with the histfreq='g' label. It's turned on with the logical grid_outfile namelist and then automatically turned off after it's written the first time. This happens in ice_history.F90. - Add logic in ice_history_write.F90 to explicitly write the grid fields to the grid history file. - The one time grid filename is iceh_grid.nc - Add grid_outfile=.true. to set_nml.histall Fix bug in PIO where 5d variables had their two "z" axis coordinates reversed when writing the field even though the variable had the correct axes defined in the history file. Detected by comparing netCDF and PIO history files. Set history netcdf attribute Conventions to CF-1.8. Ran history files through a CF checker. This resulted in several warning messages but no errors. Warning could be fixed later if needed. Add axis to the history coord_attributes datatype to provide another attribute on the netcdf file. Set axis to 'X', 'Y', or 'T' to a small subset of history file coordinate variables. Change netcdf "unitless" unit to "1". Update some abort calls in ice_history.F90 Update version_name namelist implementation, was not being broadcast or written to the log file. Affected history file output. Remove hist namelist settings in set_nml.run* files to minimize conflicts with other namelist options groups. Add a test case that allows manual comparison of netCDF and PIO history files. This needs to be done with cprnc. cmp of restart files and diff of log files produce differences even when results are bit-for-bit identical.
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.
Nicely done. My question is whether fixing the PIO axis bug will mess up anyone's post-processing tools. Or have they not been plotting what they thought they were plotting?
It's hard to know how many users are looking at 5d output fields. And this bug was only with PIO output which would probably impact only CESM users and a few other groups. Hard to know how they were interpreting the output, but it was something that had to be fixed. This fix probably has the smallest impact relative to other ways it could have been fixed. We can try to highlight this bug in our Release Notes. |
Does anyone have a comment about the namelist name "grid_outfile". Would "grid_histout" or "hist_gridout" or something else be better? |
Sorry I haven't had a chance to look at this. I will try next week. |
PR checklist
Add ability to write out one-time grid history file
apcraig
Tests pass as expected, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#792aac351375090653303efe6280f8f8fc141db8
Add ability to write one-time grid file in netCDf and PIO history features
- Add grid_outfile logical namelist
- Add extra history stream to be used just for grid output file, that stream is designated with the histfreq='g' label. It's turned on with the logical grid_outfile namelist and then automatically turned off after it's written the first time. This happens in ice_history.F90.
- Add logic in ice_history_write.F90 to explicitly write the grid fields to the grid history file.
- The one time grid filename is iceh_grid.nc
- Add grid_outfile=.true. to set_nml.histall
Fix bug in PIO where 5d variables had their two "z" axis coordinates reversed when writing the field even though the variable had the correct axes defined in the history file. Detected by comparing netCDF and PIO history files.
Set history netcdf attribute Conventions to CF-1.8. Ran history files through a CF checker. This resulted in several warning messages but no errors. Warning could be fixed later if needed.
Add axis to the history coord_attributes datatype to provide another attribute on the netcdf file. Set axis to 'X', 'Y', or 'T' to a small subset of history file coordinate variables.
Change netcdf "unitless" unit to "1".
Update some abort calls in ice_history.F90
Update version_name namelist implementation, was not being broadcast or written to the log file. Affected history file output.
Remove hist namelist settings in set_nml.run* files to minimize conflicts with other namelist options groups.
Add a test case that allows manual comparison of netCDF and PIO history files. This needs to be done with cprnc. cmp of restart files and diff of log files produce differences even when results are bit-for-bit identical.
Update documentation
Closes #613