@@ -202,6 +202,7 @@ subroutine SetServices ( GC, RC )
202202 LONG_NAME = ' surface_temperature' , &
203203 UNITS = ' K' , &
204204 DIMS = MAPL_DimsHorzOnly, &
205+ DEFAULT = - 1000.0 , &
205206 VLOCATION = MAPL_VLocationNone, __RC__)
206207
207208 call MAPL_AddInternalSpec(GC, &
@@ -424,6 +425,7 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
424425 real , dimension (:,:), pointer :: ALW, BLW, SPEED, DISCHARGE, rPCU, rPLS, sSNO
425426 real , dimension (:,:), pointer :: CT, CQ, CM, SH, EVAP, TAUX, TAUY, Tskin, lwdnsrf
426427 real , dimension (:,:), pointer :: DRPARN, DFPARN, DRNIRN, DFNIRN, DRUVRN, DFUVRN
428+ real , dimension (:,:), pointer :: DSH, DEVAP
427429 real , dimension (:,:), pointer :: EMISSRF
428430
429431 real , allocatable , dimension (:,:) :: ZTH
@@ -479,7 +481,7 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
479481! real LATSO, LONSO
480482
481483 real , parameter :: HW_hack = 2 .
482- logical :: firsttime = .true .
484+ logical :: firsttime = .false .
483485
484486 real :: TAU_TS
485487 real :: DT
@@ -614,11 +616,13 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
614616 call SetVarToZero(' DEWL' , __RC__)
615617 call SetVarToZero(' FRSL' , __RC__)
616618
619+ call MAPL_GetPointer(SurfImport, DSH, ' DSH' , __RC__)
620+ call MAPL_GetPointer(SurfImport, DEVAP, ' DEVAP' , __RC__)
617621! these should be set to 0 (for now)
618- call SetVarToZero(' DSH' , __RC__)
622+ ! call SetVarToZero('DSH', __RC__)
619623 call SetVarToZero(' DFU' , __RC__)
620624 call SetVarToZero(' DFV' , __RC__)
621- call SetVarToZero(' DEVAP' , __RC__)
625+ ! call SetVarToZero('DEVAP', __RC__)
622626 call SetVarToZero(' DDEWL' , __RC__)
623627 call SetVarToZero(' DFRSL' , __RC__)
624628
@@ -658,7 +662,10 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
658662!- -----------------------------------------------------
659663
660664 call ESMF_ClockGet(CLOCK, TIMESTEP= DELT, __RC__)
661- DELT = DELT * NINT ((86400 ./ DT)) ! emulate daily Solar
665+ ! the line below only works for daily forcing e..g. CORE I
666+ ! for JRA55-DO or any dataset at higher frequency, this line makes SW much
667+ ! higher than what data prescribed
668+ ! DELT = DELT * NINT((86400./DT)) ! emulate daily Solar
662669
663670 call MAPL_SunGetInsolation(LONS, LATS, &
664671 ORBIT, ZTH, SLR, &
@@ -716,6 +723,10 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
716723 call MAPL_GetPointer(SurfImport, ALW, ' ALW' , __RC__)
717724 call MAPL_GetPointer(SurfImport, BLW, ' BLW' , __RC__)
718725
726+ if (any (Tskin< 0.0 )) then ! only when DATAATM restart is bootstrapped
727+ firsttime = .true.
728+ end if
729+
719730 if (firsttime) then
720731 firsttime = .false.
721732 Tskin = TA
@@ -773,6 +784,10 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
773784 TAUX = CM * (Uskin - Uair)
774785 TAUY = CM * (Vskin - Vair)
775786
787+ ! these derivatives are important for sea ice
788+ DSH = CT ! * MAPL_CP (MAPL_CP got multiplied in Surf)
789+ DEVAP = CQ
790+
776791101 format (A, e20.12 , 3I3 .2 )
777792
778793! !! if (mapl_am_i_root()) PRINT*, __FILE__, __LINE__
0 commit comments