Skip to content

Commit

Permalink
Merge pull request mom-ocean#1639 from jiandewang/dev-emc-20240909-cp…
Browse files Browse the repository at this point in the history
…l-scalar

initialize cpl_scalar field in nuopc cap
  • Loading branch information
jiandewang authored Sep 14, 2024
2 parents ce58a32 + 5e0c21f commit 05d8cc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,11 @@ subroutine SetScalarField(field, rc)
ungriddedLBound=(/1/), ungriddedUBound=(/scalar_field_count/), gridToFieldMap=(/2/), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! initialize fldptr to zero
call ESMF_FieldGet(field, farrayPtr=fldptr2d, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
fldptr2d(:,:) = 0.0

end subroutine SetScalarField

end subroutine MOM_RealizeFields
Expand Down

0 comments on commit 05d8cc3

Please sign in to comment.