Skip to content

Commit

Permalink
Merge pull request #109 from DeniseWorthen/feature/restartfilenames
Browse files Browse the repository at this point in the history
update how UFS names restarts
  • Loading branch information
jiandewang committed Feb 27, 2023
2 parents d0c4550 + 05e1e35 commit 520a4d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
16 changes: 5 additions & 11 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1699,16 +1699,10 @@ subroutine ModelAdvance(gcomp, rc)
close(writeunit)
endif
else ! not cesm_coupled
! write the final restart without a timestamp
if (ESMF_AlarmIsRinging(stop_alarm, rc=rc)) then
write(restartname,'(A)')"MOM.res"
write(stoch_restartname,'(A)')"ocn_stoch.res.nc"
else
write(restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2)') &
"MOM.res.", year, month, day, hour, minute, seconds
write(stoch_restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,A)') &
"ocn_stoch.res.", year, month, day, hour, minute, seconds,".nc"
endif
write(restartname,'(i4.4,2(i2.2),A,3(i2.2),A)') year, month, day,".", hour, minute, seconds, &
".MOM.res"
write(stoch_restartname,'(i4.4,2(i2.2),A,3(i2.2),A)') year, month, day,".", hour, minute, seconds, &
".ocn_stoch.res.nc"
call ESMF_LogWrite("MOM_cap: Writing restart : "//trim(restartname), ESMF_LOGMSG_INFO)

! write restart file(s)
Expand Down Expand Up @@ -1868,7 +1862,7 @@ subroutine ModelSetRunClock(gcomp, rc)
line=__LINE__, file=__FILE__, rcToReturn=rc)
return
endif
! not used in nems
! not used in ufs
call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, &
isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down
2 changes: 1 addition & 1 deletion config_src/drivers/nuopc_cap/mom_cap_methods.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!> Contains import/export methods for both NEMS and CMEPS.
!> Contains import/export methods for CMEPS.
module MOM_cap_methods

use ESMF, only: ESMF_Clock, ESMF_ClockGet, ESMF_time, ESMF_TimeGet
Expand Down
1 change: 0 additions & 1 deletion config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,6 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
endif
forces%accumulate_p_surf = .true. ! Multiple components may contribute to surface pressure.

! TODO: this does not seem correct for NEMS
#ifdef CESMCOUPLED
wind_stagger = AGRID
#else
Expand Down

0 comments on commit 520a4d1

Please sign in to comment.