Skip to content

Add ability to write out one-time grid history file#22

Merged
anton-seaice merged 1 commit intoCICE6.6.0-xfrom
470-grid_output
May 19, 2025
Merged

Add ability to write out one-time grid history file#22
anton-seaice merged 1 commit intoCICE6.6.0-xfrom
470-grid_output

Conversation

@anton-seaice
Copy link
Copy Markdown
Collaborator

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

(Contributes to ACCESS-NRI/access-om3-configs#470)

…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
@anton-seaice anton-seaice self-assigned this May 19, 2025
@anton-seaice anton-seaice requested a review from dougiesquire May 19, 2025 04:00
Copy link
Copy Markdown

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked at content. Approving on the basis that this is a cherry-pick from CICE-Consortium/CICE: CICE-Consortium@3466a02

@anton-seaice
Copy link
Copy Markdown
Collaborator Author

Change is cherry-picked from upstream repo, where it has been tested and reviewed.

@anton-seaice anton-seaice merged commit df6f0ac into CICE6.6.0-x May 19, 2025
1 check passed
@anton-seaice anton-seaice deleted the 470-grid_output branch May 19, 2025 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants