Add option to write restart logs to restart directory - #174
Conversation
|
I'm not sure this is the correct fix. What exactly is "the restart log" in this case? |
|
I didn't know what the correct naming is, but it's the |
|
It seems like this is getting changed in all the components, so I'll keep the conversation here rather than scattered. Was the request to put only logs in a special named directory, or that the logs would be the same place that the output was going? |
| isPresent=isPresent, isSet=isSet, rc=rc) | ||
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
| if(isPresent .and. isSet) log_to_restart=(trim(value)=="true") | ||
|
|
There was a problem hiding this comment.
CMEPS provides an optional output dir
if (maintask) then
call NUOPC_CompAttributeGet(gcomp, name="diro", value=diro, isPresent=isPresent, isSet=isSet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (.not. isPresent .and. .not. isSet) then
diro = './'
end if
I think this makes more sense than grabbing a logical and then if true you do one thing, otherwise something else. Set a config variable like "logdir"; CESM will never have that config variable present, and we (optionally) might not; if it is present, then it uses it, otherwise it will be output to cwd.
Yes, the components are set up in a similar way so we can just chat in here. The request was for the log.component.fHHHH to go into their respective directories: I do like your idea of bypassing the logical and just setting the Setting the |
|
CMEPS already reads a "diro" configuration variable. I think you should be able to use that combined w/ the optional arugment to the restart_fh file. This will also write the main mediator.log file into that directory though. Hopefully that isn't a problem. |
|
For MOM6, I'm about to start creating a PR for the first part of the refactor. I'm moving configuration of the MOM6 outputlog feature from ufs.configure to input.nml. The new feature will obtain the directory specified for MOM6-output and restarts directly from MOM6, and use that for the output log logging, so we should not need to specify it. |
|
Ok, the CMEPS change shouldn't be a problem. I can also wait for the MOM6 refactor since this change isn't urgent. Thanks for the input! |
Description of changes
There was a feature request made by NCO for GFSv17 production to have the logs moved to the restart folder for each component. This change was made for production (#169), however the production changes had no way to allow the user to turn the feature on or off. This PR will add a new option to ufs.configure that will allow the user to specify whether or not they want the logs to be written to the CMEPS restart directory or the run directory. The default (if the option is not declared) will be to have the logs in the run directory.
Specific notes
Contributors other than yourself, if any:
CMEPS Issues Fixed (include github issue #):
Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)
No changes expected
Any User Interface Changes (namelist or namelist defaults changes)?
Yes, a new option will be added to ufs.configure
Testing performed
Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing
A full RT run will be performed and the option will be turned on for a select set of tests.