Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nan was picked up in pslv field on first pass #490

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mediator/med_methods_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,7 @@ subroutine med_methods_FB_check_for_nans(FB, maintask, logunit, rc)
do index=1,fieldCount
call med_methods_FB_getNameN(FB, index, fieldname, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

call ESMF_FieldBundleGet(FB, fieldName=fieldname, field=field, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_FieldGet(field, rank=fieldrank, name=fieldname, rc=rc)
Expand All @@ -2632,9 +2633,8 @@ subroutine med_methods_FB_check_for_nans(FB, maintask, logunit, rc)
if (nanfound) then
call ESMF_LogWrite('ABORTING JOB', ESMF_LOGMSG_ERROR, line=__LINE__, file=u_FILE_u)
rc = ESMF_FAILURE
return
end if

end subroutine med_methods_FB_check_for_nans

!-----------------------------------------------------------------------------
Expand Down
9 changes: 6 additions & 3 deletions mediator/med_phases_prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ subroutine med_phases_prep_ocn_avg(gcomp, rc)
! local variables
type(InternalState) :: is_local
integer :: ncnt
logical, save :: first_call = .true.
character(len=*),parameter :: subname='(med_phases_prep_ocn_avg)'
!---------------------------------------

Expand Down Expand Up @@ -306,9 +307,10 @@ subroutine med_phases_prep_ocn_avg(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! Check for nans in fields export to ocn
call FB_check_for_nans(is_local%wrap%FBExp(compocn), maintask, logunit, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

if(.not. first_call) then
call FB_check_for_nans(is_local%wrap%FBExp(compocn), maintask, logunit, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif
! zero accumulator
is_local%wrap%ExpAccumOcnCnt = 0
call FB_reset(is_local%wrap%FBExpAccumOcn, value=czero, rc=rc)
Expand All @@ -320,6 +322,7 @@ subroutine med_phases_prep_ocn_avg(gcomp, rc)
call ESMF_LogWrite(trim(subname)//": done", ESMF_LOGMSG_INFO)
end if
call t_stopf('MED:'//subname)
first_call = .false.

end subroutine med_phases_prep_ocn_avg

Expand Down
Loading