Skip to content

Commit 33b10f0

Browse files
authored
Merge pull request #172 from ESCOMP/mvertens/cesm_bugfix
update for getting the glc present flag set correctly with nag compiler ### Description of changes update for getting the glc present flag set correctly with nag compiler ### Specific notes The following ctsm test - SMS_D_Ld5_Vnuopc.f10_f10_mg37.I2000Clm50BgcCrop.izumi_nag.clm-irrig_alternate passed on cheyenne with intel but failed on izumi with nag. This bugfix corrects the if-present logic for GLC and permits the test to successfully pass now on izumi. Contributors other than yourself, if any: CMEPS Issues Fixed: None Are changes expected to change answers? - [x] bit for bit - [ ] different at roundoff level - [ ] more substantial Any User Interface Changes (namelist or namelist defaults changes)? - [ ] Yes - [x] No Testing performed if application target is CESM:(either UFS-S2S or CESM testing is required): ran SMS_D_Ld5_Vnuopc.f10_f10_mg37.I2000Clm50BgcCrop.izumi_nag.clm-irrig_alternate successfully on izumi.
2 parents dd1af1f + b437148 commit 33b10f0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mediator/med.F90

+7-7
Original file line numberDiff line numberDiff line change
@@ -842,9 +842,9 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
842842
if (ChkErr(rc,__LINE__,u_FILE_u)) return
843843
call NUOPC_CompAttributeSet(gcomp, name="rof_present", value=rof_present, rc=rc)
844844
if (ChkErr(rc,__LINE__,u_FILE_u)) return
845-
call NUOPC_CompAttributeSet(gcomp, name="wav_present", value=wav_present, rc=rc)
845+
call NUOPC_CompAttributeSet(gcomp, name="wav_present", value=trim(wav_present), rc=rc)
846846
if (ChkErr(rc,__LINE__,u_FILE_u)) return
847-
call NUOPC_CompAttributeSet(gcomp, name="glc_present", value=glc_present, rc=rc)
847+
call NUOPC_CompAttributeSet(gcomp, name="glc_present", value=trim(glc_present), rc=rc)
848848
if (ChkErr(rc,__LINE__,u_FILE_u)) return
849849
call NUOPC_CompAttributeSet(gcomp, name="med_present", value=med_present, rc=rc)
850850
if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -1790,15 +1790,15 @@ subroutine DataInitialize(gcomp, rc)
17901790
call ESMF_AttributeGet(gcomp, name="glc_present", value=cvalue, &
17911791
convention="NUOPC", purpose="Instance", rc=rc)
17921792
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1793-
if (trim(cvalue) == 'true') then
1794-
do ns = 1,max_icesheets
1795-
if (ns <= num_icesheets) then
1793+
do ns = 1,max_icesheets
1794+
if (ns <= num_icesheets) then
1795+
if (trim(cvalue) == 'true') then
17961796
is_local%wrap%comp_present(compglc(ns)) = .true.
17971797
else
17981798
is_local%wrap%comp_present(compglc(ns)) = .false.
17991799
end if
1800-
end do
1801-
end if
1800+
end if
1801+
end do
18021802
else
18031803
call ESMF_AttributeGet(gcomp, name=trim(compname(n1))//"_present", value=cvalue, &
18041804
convention="NUOPC", purpose="Instance", rc=rc)

0 commit comments

Comments
 (0)