Skip to content

Commit

Permalink
Merge branch 'master' into shr_pio_update
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Apr 14, 2022
2 parents 240a7b5 + a10a768 commit 842cb3d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docn/ocn_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module cdeps_docn_comp
use ESMF , only : ESMF_StateGet, operator(+), ESMF_AlarmRingerOff, ESMF_LogWrite
use ESMF , only : ESMF_Field, ESMF_FieldGet, ESMF_VmLogMemInfo
use NUOPC , only : NUOPC_CompDerive, NUOPC_CompSetEntryPoint, NUOPC_CompSpecialize
use NUOPC , only : NUOPC_Advertise, NUOPC_CompAttributeGet
use NUOPC , only : NUOPC_Advertise, NUOPC_CompAttributeGet, NUOPC_CompAttributeSet
use NUOPC_Model , only : model_routine_SS => SetServices
use NUOPC_Model , only : model_label_Advance => label_Advance
use NUOPC_Model , only : model_label_SetRunClock => label_SetRunClock
Expand Down Expand Up @@ -302,13 +302,29 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
integer :: fieldcount
real(r8), pointer :: fldptr(:)
integer :: n
integer :: imask
real(r8) :: rmask
character(CL) :: cvalue
character(len=*), parameter :: subname=trim(module_name)//':(InitializeRealize) '
!-------------------------------------------------------------------------------

rc = ESMF_SUCCESS
call ESMF_VMLogMemInfo("Entering "//trim(subname))
! Initialize model mesh, restart flag, logunit, model_mask and model_frac
call ESMF_TraceRegionEnter('docn_strdata_init')

! If aquaplanet overwrite model mask and model frac to 1
if (aquaplanet) then
imask = 1
write(cvalue,*) imask
call NUOPC_CompAttributeSet(gcomp, name='scol_ocnmask', value=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
rmask = 1._r8
write(cvalue,*) rmask
call NUOPC_CompAttributeSet(gcomp, name='scol_ocnfrac', value=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if

call dshr_mesh_init(gcomp, sdat, nullstr, logunit, 'OCN', nx_global, ny_global, &
model_meshfile, model_maskfile, model_mesh, model_mask, model_frac, restart_read, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down

0 comments on commit 842cb3d

Please sign in to comment.