Skip to content

Commit

Permalink
Merge pull request #190 from NCAR/fix_cfc_import
Browse files Browse the repository at this point in the history
Fix NUOPC import of fields required for the new CFC module
  • Loading branch information
gustavo-marques authored Jul 8, 2021
2 parents b7e0fda + b767a13 commit 230a8b8
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ module MOM_surface_forcing_nuopc
real, pointer, dimension(:,:) :: frunoff_hflx =>NULL() !< heat content of frozen runoff [W/m2]
real, pointer, dimension(:,:) :: p =>NULL() !< pressure of overlying ice and atmosphere
!< on ocean surface [Pa]
real, pointer, dimension(:,:) :: ice_fraction =>NULL() !< mass of ice [nondim]
real, pointer, dimension(:,:) :: ice_fraction =>NULL() !< fractional ice area [nondim]
real, pointer, dimension(:,:) :: u10_sqr =>NULL() !< wind speed squared at 10m [m2/s2]
real, pointer, dimension(:,:) :: mi =>NULL() !< mass of ice [kg/m2]
real, pointer, dimension(:,:) :: ice_rigidity =>NULL() !< rigidity of the sea ice, sea-ice and
Expand Down Expand Up @@ -508,14 +508,6 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
if (associated(IOB%seaice_melt)) &
fluxes%seaice_melt(i,j) = kg_m2_s_conversion * G%mask2dT(i,j) * IOB%seaice_melt(i-i0,j-j0)

! sea ice fraction [nondim]
if (associated(IOB%ice_fraction)) &
fluxes%ice_fraction(i,j) = G%mask2dT(i,j) * IOB%ice_fraction(i-i0,j-j0)

! 10-m wind speed squared [m2/s2]
if (associated(IOB%u10_sqr)) &
fluxes%u10_sqr(i,j) = US%m_to_L**2 * US%T_to_s**2 * G%mask2dT(i,j) * IOB%u10_sqr(i-i0,j-j0)

fluxes%latent(i,j) = 0.0
! notice minus sign since fprec is positive into the ocean
if (associated(IOB%fprec)) then
Expand Down Expand Up @@ -554,6 +546,17 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,

enddo ; enddo

if (CS%use_CFC) then
do j=js,je ; do i=is,ie
! sea ice fraction [nondim]
if (associated(IOB%ice_fraction)) &
fluxes%ice_fraction(i,j) = G%mask2dT(i,j) * IOB%ice_fraction(i-i0,j-j0)
! 10-m wind speed squared [m2/s2]
if (associated(IOB%u10_sqr)) &
fluxes%u10_sqr(i,j) = US%m_to_L**2 * US%T_to_s**2 * G%mask2dT(i,j) * IOB%u10_sqr(i-i0,j-j0)
enddo ; enddo
endif

! applied surface pressure from atmosphere and cryosphere
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
Expand Down Expand Up @@ -1474,8 +1477,10 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
write(outunit,100) 'iobt%lrunoff ' , mpp_chksum( iobt%lrunoff )
write(outunit,100) 'iobt%frunoff ' , mpp_chksum( iobt%frunoff )
write(outunit,100) 'iobt%p ' , mpp_chksum( iobt%p )
write(outunit,100) 'iobt%ice_fraction ' , mpp_chksum( iobt%ice_fraction )
write(outunit,100) 'iobt%u10_sqr ' , mpp_chksum( iobt%u10_sqr )
if (associated(iobt%ice_fraction)) &
write(outunit,100) 'iobt%ice_fraction ' , mpp_chksum( iobt%ice_fraction )
if (associated(iobt%u10_sqr)) &
write(outunit,100) 'iobt%u10_sqr ' , mpp_chksum( iobt%u10_sqr )
if (associated(iobt%ustar_berg)) &
write(outunit,100) 'iobt%ustar_berg ' , mpp_chksum( iobt%ustar_berg )
if (associated(iobt%area_berg)) &
Expand Down

0 comments on commit 230a8b8

Please sign in to comment.