-
Notifications
You must be signed in to change notification settings - Fork 79
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 arbitrary restart hour for UFS #522
Open
DeniseWorthen
wants to merge
8
commits into
ESCOMP:main
Choose a base branch
from
DeniseWorthen:feature/ufs_restartfh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f13e16e
CMEPS Sync with Trigrid capability (#122)
DeniseWorthen 663554e
Sync with ESCOMP; fix aux history files for use_float=.true. (#124)
DeniseWorthen dc977bc
add fire behavior tendencies to ufs ccpp (#117)
danrosen25 24e9eed
Enable Data Atmosphere Coupling of GFDL Land Model (#113)
JustinPerket 55576eb
Flexible restart write times (restart_fh) (#125)
NickSzapiro-NOAA b5d1cc1
Sync w/ latest ESCOMP/main (#129)
DeniseWorthen 191214b
Merge remote-tracking branch 'ESCOMP/main' into feature/ufs_restartfh
DeniseWorthen e3a4803
protect write_restartfh w/ CESM ifdef
DeniseWorthen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ module med_phases_restart_mod | |
use med_phases_prep_glc_mod , only : FBocnAccum2glc_o, ocnAccum2glc_cnt | ||
use med_phases_prep_rof_mod , only : FBlndAccum2rof_l, lndAccum2rof_cnt | ||
use pio , only : file_desc_t | ||
#ifndef CESMCOUPLED | ||
use shr_is_restart_fh_mod, only : init_is_restart_fh, is_restart_fh, is_restart_fh_type | ||
#endif | ||
implicit none | ||
private | ||
|
||
|
@@ -23,6 +26,9 @@ module med_phases_restart_mod | |
private :: med_phases_restart_alarm_init | ||
|
||
logical :: write_restart_at_endofrun = .false. | ||
#ifndef CESMCOUPLED | ||
type(is_restart_fh_type) :: restartfh_info ! For flexible restarts in UFS | ||
#endif | ||
logical :: whead(2) = (/.true. , .false./) | ||
logical :: wdata(2) = (/.false., .true. /) | ||
character(*), parameter :: u_FILE_u = & | ||
|
@@ -116,6 +122,10 @@ subroutine med_phases_restart_alarm_init(gcomp, rc) | |
write(logunit,*) | ||
end if | ||
|
||
#ifndef CESMCOUPLED | ||
call init_is_restart_fh(mcurrtime, timestep_length,maintask, restartfh_info) | ||
#endif | ||
|
||
end subroutine med_phases_restart_alarm_init | ||
|
||
!=============================================================================== | ||
|
@@ -179,6 +189,9 @@ subroutine med_phases_restart_write(gcomp, rc) | |
real(R8) :: tbnds(2) ! CF1.0 time bounds | ||
logical :: isPresent | ||
logical :: first_time = .true. | ||
#ifndef CESMCOUPLED | ||
logical :: write_restartfh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need an ifdef here. |
||
#endif | ||
character(len=*), parameter :: subname='(med_phases_restart_write)' | ||
!--------------------------------------- | ||
|
||
|
@@ -237,6 +250,11 @@ subroutine med_phases_restart_write(gcomp, rc) | |
endif | ||
endif | ||
|
||
#ifndef CESMCOUPLED | ||
call is_restart_fh(clock, restartfh_info, write_restartfh) | ||
if (write_restartfh) alarmIsOn = .true. | ||
#endif | ||
|
||
if (alarmIsOn) then | ||
call ESMF_ClockGet(clock, currtime=currtime, starttime=starttime, rc=rc) | ||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This module is missing - did you git add it?
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.
It should be found in our CDEPS share directory (ufs/cdeps_share) which sits at the UFS-WM CDEPS interface level. This are where we have files these files
which are generated via genf90.pl for you (and which we cannot use because of restrictions by CentralOps).
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.
Looking at directory cdeps/share I see files shr_assert_mod.F90.in, shr_frz_mod.F90.in and shr_infnan_mod.F90.in but no shr_is_restart_fh_mod.F90.in
or shr_is_restart_fh_mod.F90 - that file needs to go in that directory if only to enable github testing of the ufs build.
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.
So a
shr_is_restart_fh_mod.F90
inside of cdeps/share will be enough? It doesn't need to be a ".in" file, right?