Users set solo driver forcing time records per day#793
Merged
Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom Jan 9, 2025
Merged
Users set solo driver forcing time records per day#793Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom
Conversation
Refactored the solo_driver version of MOM_surface_forcing to modify how the time levels to read from forcing files, with a series of 11 new runtime parameters (WIND_FILE_DAYS_PER_RECORD, etc.) giving the user to specify how many days each time record spans (for positive values) or the number of time records in the file per day (for negative values). If these parameters are set to 31, the month returned by the FMS `get_date()` function sets the time level. If they are set to 0 (the default) the previous behavior is obtained, in which the time level is determined from the number of records in the file. To always take the first record in the file, set these parameters to large values (greater than 1000000 will always work, but in practice smaller values do the same thing). By default all answers are bitwise identical, but there are up to 10 new runtime parameters in some MOM_parameter_doc files for cases that have `WIND_CONFIG = "file"` or `BUOY_CONFIG = "file"`. The list of new runtime parameters is `WIND_FILE_DAYS_PER_RECORD`, `LONGWAVE_FILE_DAYS_PER_RECORD`, `SHORTWAVE_FILE_DAYS_PER_RECORD`, `EVAPORATION_FILE_DAYS_PER_RECORD`, `LATENTHEAT_FILE_DAYS_PER_RECORD`, `SENSIBLEHEAT_FILE_DAYS_PER_RECORD`, `RAIN_FILE_DAYS_PER_RECORD`, `SHORTWAVE_FILE_DAYS_PER_RECORD`, `RUNOFF_FILE_DAYS_PER_RECORD`, `SSTRESTORE_FILE_DAYS_PER_RECORD` and `SALINITYRESTORE_FILE_DAYS_PER_RECORD`. The problem identified in github.com/NOAA-GFDL/issues/631 is addressed by this commit, and that issue can be closed once this commit is merged onto the main branch of MOM6.
raphaeldussin
approved these changes
Jan 8, 2025
|
this code improves over the bits it replaces, for more advance file handling one can use |
Member
adcroft
approved these changes
Jan 8, 2025
Member
adcroft
left a comment
There was a problem hiding this comment.
Per @raphaeldussin recommendation
Member
Author
|
This has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25986 with the expected warnings about new runtime parameters. |
This was referenced Apr 23, 2025
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.
Refactored the solo_driver version of
MOM_surface_forcingto modify how the time levels to read from forcing files, with a series of 11 new runtime parameters (WIND_FILE_DAYS_PER_RECORD, etc.) giving the user to specify how many days each time record spans (for positive values) or the number of time records in the file per day (for negative values). If these parameters are set to 31, the month returned by the FMSget_date()function sets the time level. If they are set to 0 (the default) the previous behavior is obtained, in which the time level is determined from the number of records in the file. To always take the first record in the file, set these parameters to large values (greater than 1000000 will always work, but in practice smaller values do the same thing). By default all answers are bitwise identical, but there are up to 10 new runtime parameters in some MOM_parameter_doc files for cases that haveWIND_CONFIG = "file"orBUOY_CONFIG = "file".The list of new runtime parameters is
WIND_FILE_DAYS_PER_RECORD,LONGWAVE_FILE_DAYS_PER_RECORD,SHORTWAVE_FILE_DAYS_PER_RECORD,EVAPORATION_FILE_DAYS_PER_RECORD,LATENTHEAT_FILE_DAYS_PER_RECORD,SENSIBLEHEAT_FILE_DAYS_PER_RECORD,RAIN_FILE_DAYS_PER_RECORD,SHORTWAVE_FILE_DAYS_PER_RECORD,RUNOFF_FILE_DAYS_PER_RECORD,SSTRESTORE_FILE_DAYS_PER_RECORDandSALINITYRESTORE_FILE_DAYS_PER_RECORD.The problem identified in #631 is addressed by this commit, and that issue can be closed once this commit is merged onto the main branch of MOM6. This PR is a more comprehensive and general solution than the one proposed in #648 , and that PR should be closed after this one is merged into dev/gfdl.