Skip to content

Commit

Permalink
Test restart_fh in cpld_control_p8 RT
Browse files Browse the repository at this point in the history
Still need to add additional restarts to baseline...checking ok first
  • Loading branch information
NickSzapiro-NOAA committed Nov 15, 2024
1 parent e909d8e commit 9a8710e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
branch = develop
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
branch = dev/ufs-weather-model
url = https://github.com/NickSzapiro-NOAA/WW3
branch = restart_fh
[submodule "stochastic_physics"]
path = stochastic_physics
url = https://github.com/NOAA-PSL/stochastic_physics
Expand Down
6 changes: 0 additions & 6 deletions CDEPS-interface/ufs/cdeps_share/shr_is_restart_fh_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ subroutine init_is_restart_fh(currentTime, dtime, lLog)
if (isPresent) then !model_configure exists. this is ufs run
CF_mc = ESMF_ConfigCreate(rc=rc)
call ESMF_ConfigLoadFile(config=CF_mc,filename='model_configure' ,rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

nfh = ESMF_ConfigGetLen(config=CF_mc, label ='restart_fh:',rc=rc)
Expand All @@ -60,18 +59,15 @@ subroutine init_is_restart_fh(currentTime, dtime, lLog)
allocate(restartFhTimes(1:nfh)) !not deallocated here

call ESMF_ConfigGetAttribute(CF_mc,valueList=restart_fh,label='restart_fh:', rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
! create a list of times at each restart_fh
do n = 1,nfh
fh_s = NINT(3600*restart_fh(n))
call ESMF_TimeIntervalSet(fhInterval, s=fh_s, rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
restartFhTimes(n) = currentTime + fhInterval
call ESMF_TimePrint(restartFhTimes(n), options="string", &
preString="restart_fh at ", unit=timestr, rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (lLog) then
if (mod(fh_s,dtime) /= 0) then
Expand All @@ -84,7 +80,6 @@ subroutine init_is_restart_fh(currentTime, dtime, lLog)
deallocate(restart_fh)
end if !nfh>0
call ESMF_ConfigDestroy(CF_mc, rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
end if !model_configure

Expand Down Expand Up @@ -115,7 +110,6 @@ function is_restart_fh(clock) result(lWrite)
! check if next time is == to any restartfhtime
do nfh = 1,size(restartFhTimes)
call ESMF_ClockGetNextTime(clock, nextTime=nexttime, rc=rc)
!if (ChkErr(rc,__LINE__,__FILE__)) return
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (nextTime == restartFhTimes(nfh)) write_restartfh = .true.
end do
Expand Down
2 changes: 1 addition & 1 deletion WW3
1 change: 1 addition & 0 deletions tests/parm/model_configure.IN
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fhrot: @[FHROT]

dt_atmos: @[DT_ATMOS]
restart_interval: @[RESTART_INTERVAL]
restart_fh: @[RESTART_FH]

quilting: @[QUILTING]
quilting_restart: @[QUILTING_RESTART]
Expand Down
1 change: 1 addition & 0 deletions tests/tests/cpld_control_p8
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export CCPP_SUITE=FV3_GFS_v17_coupled_p8_ugwpv1
export RESTART_N=12
export RESTART_INTERVAL="${RESTART_N} -1"
export OUTPUT_FH='0 21 24'
export RESTART_FH="0.5 3"

export MOM6_TOPOEDITS=ufs.topo_edits_011818.nc
export MOM6_ALLOW_LANDMASK_CHANGES=True
Expand Down
6 changes: 1 addition & 5 deletions tests/tests/datm_cdeps_gfs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ export TEST_DESCR="DATM_CDEPS-MOM6-CICE-CMEPS_GFS - control "

export CNTL_DIR=datm_cdeps_gfs

export LIST_FILES="RESTART/iced.2021-03-22-23400.nc \
RESTART/DATM_GFS.cpl.r.2021-03-22-64800.nc \
RESTART/20210322.090000.MOM.res.nc \
RESTART/20210323.060000.MOM.res.nc \
export LIST_FILES="RESTART/20210323.060000.MOM.res.nc \
RESTART/iced.2021-03-23-21600.nc \
RESTART/DATM_GFS.cpl.r.2021-03-23-21600.nc"

Expand All @@ -31,7 +28,6 @@ export atm_datamode=GEFS
export CICE_KTHERM=2
export CICE_TFREEZE_OPTION=mushy
export RESTART_N=12
export RESTART_FH="0.5 3"
export stream_files="INPUT/gfs.202103.nc"
export eps_imesh=2.5e-1
export MOM6_TOPOEDITS=ufs.topo_edits_011818.nc
Expand Down

0 comments on commit 9a8710e

Please sign in to comment.