-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CESM share to 1.1.5 and incorporate upstream fix for missing #…
…ifdef timing in CESM_share Co-authored-by: Dougie Squire <42455466+dougiesquire@users.noreply.github.com>
- Loading branch information
1 parent
31eefa9
commit af996ad
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
Submodule CESM_share
updated
74 files
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
diff --git a/src/nuopc_shr_methods.F90 b/src/nuopc_shr_methods.F90 | ||
index 07cf7e5..8bdf11f 100644 | ||
--- a/src/nuopc_shr_methods.F90 | ||
+++ b/src/nuopc_shr_methods.F90 | ||
@@ -820,9 +820,9 @@ contains | ||
|
||
! local vars | ||
integer :: yr, mon, day | ||
- character(len=16) timestr | ||
- logical :: isPresent | ||
- character(len=ESMF_MAXSTR) :: inst_suffix | ||
+ character(len=17) timestr | ||
+ logical :: isPresent , isSet | ||
+ character(len=ESMF_MAXSTR) :: inst_suffix , pointer_date | ||
character(len=*), parameter :: subname='shr_get_rpointer_name' | ||
|
||
rc = ESMF_SUCCESS | ||
@@ -832,19 +832,31 @@ contains | ||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
if(ispresent) call NUOPC_CompAttributeGet(gcomp, name='inst_suffix', value=inst_suffix, rc=rc) | ||
|
||
- yr = ymd/10000 | ||
- mon = (ymd - yr*10000)/100 | ||
- day = (ymd - yr*10000 - mon*100) | ||
- write(timestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',time | ||
- write(rpfile,*) "rpointer."//compname//trim(inst_suffix)//'.'//trim(timestr) | ||
+ ! if restart_pointer_append_date is false then don't append timestamp | ||
+ timestr = "" | ||
+ pointer_date = ".true." | ||
+ call NUOPC_CompAttributeGet(gcomp, name="restart_pointer_append_date", isPresent=isPresent, isSet=isSet, rc=rc) | ||
+ if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
+ if (isPresent .and. isSet) then | ||
+ call NUOPC_CompAttributeGet(gcomp, name='restart_pointer_append_date', value=pointer_date, rc=rc) | ||
+ endif | ||
+ if (trim(pointer_date) .eq. '.true.') then | ||
+ yr = ymd/10000 | ||
+ mon = (ymd - yr*10000)/100 | ||
+ day = (ymd - yr*10000 - mon*100) | ||
+ write(timestr,'(a,i4.4,a,i2.2,a,i2.2,a,i5.5)') '.',yr,'-',mon,'-',day,'-',time | ||
+ endif | ||
+ | ||
+ write(rpfile,*) "rpointer."//compname//trim(inst_suffix)//trim(timestr) | ||
rpfile = adjustl(rpfile) | ||
+ | ||
if (mode.eq.'read') then | ||
inquire(file=trim(rpfile), exist=isPresent) | ||
if(.not. isPresent) then | ||
rpfile = "rpointer."//compname//trim(inst_suffix) | ||
inquire(file=trim(rpfile), exist=isPresent) | ||
if(.not. isPresent) then | ||
- call shr_sys_abort( subname//'ERROR no rpointer file found in '//rpfile//' or in '//rpfile//'.'//timestr ) | ||
+ call shr_sys_abort( subname//'ERROR no rpointer file found in '//rpfile//' or in '//rpfile//trim(inst_suffix)//trim(timestr) ) | ||
endif | ||
endif | ||
endif |