Add ability to write out one-time grid history file#22
Merged
anton-seaice merged 1 commit intoCICE6.6.0-xfrom May 19, 2025
Merged
Add ability to write out one-time grid history file#22anton-seaice merged 1 commit intoCICE6.6.0-xfrom
anton-seaice merged 1 commit intoCICE6.6.0-xfrom
Conversation
…1005) 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 - Add external_variables global attribute to history files to note grid fields that are expected to be on other files - Add date_created global attribute 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 a couple of warning messages but no errors. If grid variables associated with variable coordinate attributes are removed from the history file, this will result in CF errors even though external_variables are defined. This is sort of a shortcoming in the current CF conventions, but we decided to move ahead anyway. CF compliance will only be broken if grid variables are turned off in history files, and they are defined as part of other variable's coordinate (or similar) attributes. 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
dougiesquire
approved these changes
May 19, 2025
dougiesquire
left a comment
There was a problem hiding this comment.
Haven't looked at content. Approving on the basis that this is a cherry-pick from CICE-Consortium/CICE: CICE-Consortium@3466a02
Collaborator
Author
|
Change is cherry-picked from upstream repo, where it has been tested and reviewed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ability to write one-time grid file in netCDf and PIO history features
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 a couple of warning messages but no errors. If grid variables associated with variable coordinate attributes are removed from the history file, this will result in CF errors even though external_variables are defined. This is sort of a shortcoming in the current CF conventions, but we decided to move ahead anyway. CF compliance will only be broken if grid variables are turned off in history files, and they are defined as part of other variable's coordinate (or similar) attributes.
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
(Contributes to ACCESS-NRI/access-om3-configs#470)