Skip to content

Commit

Permalink
Update the fill value in mom_cap_methods.F90.
Browse files Browse the repository at this point in the history
  • Loading branch information
binli2337 committed Jan 17, 2025
1 parent 8cc8b70 commit 513c323
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config_src/drivers/nuopc_cap/mom_cap_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary,
real(ESMF_KIND_R8), allocatable :: stkx(:,:,:)
real(ESMF_KIND_R8), allocatable :: stky(:,:,:)
character(len=*) , parameter :: subname = '(mom_import)'
real(ESMF_KIND_R8), parameter :: fillValue = 9.99e20_ESMF_KIND_R8

rc = ESMF_SUCCESS

Expand Down Expand Up @@ -351,10 +352,15 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary,
ig = i + ocean_grid%isc - isc
!rotate
do ib = 1, nsc
ice_ocean_boundary%ustkb(i,j,ib) = ocean_grid%cos_rot(ig,jg)*stkx(i,j,ib) &
if(abs(stkx(i,j,ib)-fillValue).lt.0.01) then
ice_ocean_boundary%ustkb(i,j,ib) = 0.0
ice_ocean_boundary%vstkb(i,j,ib) = 0.0
else
ice_ocean_boundary%ustkb(i,j,ib) = ocean_grid%cos_rot(ig,jg)*stkx(i,j,ib) &
- ocean_grid%sin_rot(ig,jg)*stky(i,j,ib)
ice_ocean_boundary%vstkb(i,j,ib) = ocean_grid%cos_rot(ig,jg)*stky(i,j,ib) &
ice_ocean_boundary%vstkb(i,j,ib) = ocean_grid%cos_rot(ig,jg)*stky(i,j,ib) &
+ ocean_grid%sin_rot(ig,jg)*stkx(i,j,ib)
endif
enddo
! apply masks
ice_ocean_boundary%ustkb(i,j,:) = ice_ocean_boundary%ustkb(i,j,:) * ocean_grid%mask2dT(ig,jg)
Expand Down

0 comments on commit 513c323

Please sign in to comment.