Skip to content

Commit

Permalink
add missing return error check for FldsExchange
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Jul 29, 2023
1 parent 9bcf425 commit 427ebeb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mediator/med.F90
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ subroutine AdvertiseFields(gcomp, importState, exportState, clock, rc)
use NUOPC , only : NUOPC_CompAttributeGet, NUOPC_CompAttributeSet, NUOPC_CompAttributeAdd
use esmFlds, only : med_fldlist_init1, med_fld_GetFldInfo, med_fldList_entry_type
use med_phases_history_mod, only : med_phases_history_init
use med_methods_mod , only : mediator_checkfornans
use med_methods_mod , only : mediator_checkfornans

! input/output variables
type(ESMF_GridComp) :: gcomp
Expand Down Expand Up @@ -921,7 +921,7 @@ subroutine AdvertiseFields(gcomp, importState, exportState, clock, rc)
call NUOPC_CompAttributeGet(gcomp, name="check_for_nans", value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if(isPresent .and. isSet) then
read(cvalue, *) mediator_checkfornans
read(cvalue, *) mediator_checkfornans
else
mediator_checkfornans = .false.
endif
Expand Down Expand Up @@ -1804,7 +1804,8 @@ subroutine DataInitialize(gcomp, rc)
call esmFldsExchange_cesm(gcomp, phase='initialize', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
else if (trim(coupling_mode(1:4)) == 'nems') then
call esmFldsExchange_nems(gcomp, phase='initialize', rc=rc)
call esmFldsExchange_nems(gcomp, phase='initialize', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
else if (trim(coupling_mode) == 'hafs') then
call esmFldsExchange_hafs(gcomp, phase='initialize', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down

0 comments on commit 427ebeb

Please sign in to comment.