Ignore:
Timestamp:
Nov 19, 2021, 4:58:59 PM (3 years ago)
Author:
lguez
Message:

Sync latest trunk changes to Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/inlandsis/sisvat_qsn.F

    r3792 r4013  
    6161      use VARxSV
    6262      use VARySV
     63      use surface_data, only: is_ok_slush,opt_runoff_ac
     64
    6365
    6466      IMPLICIT NONE
     
    235237 
    236238      DO ikl=1,knonv
    237        DO isn=min(nsno,isnoSV(ikl)+1),1,-1
     239
     240      DO isn=min(nsno,isnoSV(ikl)+1),1,-1
    238241! EV          DO isn=nsno,1,-1
    239242C +--Energy, store Previous Content
     
    243246     .                + ro__SV(ikl,isn) * Cn_dSV * dTSnow
    244247     .                                           * dzsnSV(ikl,isn)
    245 
    246           Tsave       = TsisSV(ikl,isn)
    247 
    248248          TsisSV(ikl,isn) =                        TfSnow
    249249 
     
    312312          rdzNEW      = WaFrez + rdzsno
    313313          ro__SV(ikl,isn) =      rdzNEW /max(epsi, dzsnSV(ikl,isn))
    314 
    315 ! EV: condition on Enfrez
    316 !          if (EnFrez .eq. 0.) then
    317          
    318           TsisSV(ikl,isn) = Tsave
    319 !          else
    320314          TsisSV(ikl,isn) =      TfSnow
    321315     .                + EnFrez /(Cn_dSV *max(epsi, rdzNEW)        )
    322 !          end if
    323316          EExcsv(ikl) =          EExcsv(ikl)     - EnFrez
    324317          wer_SV(ikl) = WaFrez
     
    499492          rusnew      = rusnSV(ikl) * SWf_SV(ikl)
    500493 
    501           if(isnoSV(ikl)<=1) rusnew = 0.
     494          if(isnoSV(ikl)<=1 .OR. opt_runoff_ac) rusnew = 0.
    502495          !if(ivgtSV(ikl)>=1) rusnew = 0.
    503496 
    504497c #EU                        rusnew = 0.
    505 c #AC                        rusnew = 0.
     498c #AC               rusnew = 0.
     499
    506500          RnofSV(ikl) = RnofSV(ikl)
    507501     .                +(rusnSV(ikl) - rusnew     ) / dt__SV
     
    545539        ENDDO
    546540 
    547 C +--Slush Formation (CAUTION: ADD RunOff Possibility before Activation)
     541C +--Slush Formation (Activated. CAUTION: ADD RunOff Possibility before Activation)
    548542C +  ---------------  ^^^^^^^  ^^^
    549543 
    550  
    551 c #SU DO  ikl=1,knonv
    552 c #SU  DO isn=1,isnoSV(ikl)
    553 c #SU     kSlush = min(1,max(0,isn+1-ispiSV(ikl)))        ! Slush Switch
     544      IF (is_ok_slush) THEN
     545
     546      DO  ikl=1,knonv
     547       DO isn=1,isnoSV(ikl)
     548          kSlush = min(1,max(0,isn+1-ispiSV(ikl)))        ! Slush Switch
    554549 
    555550C +--Available Additional Pore   Volume [-]
    556551C +  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    557 c #SU     PorVol = 1. - ro__SV(ikl,isn)                    ! [--]
    558 c #SU.           *(1. - eta_SV(ikl,isn))/ ro_Ice           !
    559 c #SU.           -      eta_SV(ikl,isn)                    !
    560 c #SU.                 *ro__SV(ikl,isn) / ro_Wat           !
    561 c #SU     PorVol =  max(PorVol          , zero  )          !
    562 c #SU     zWater =      dzsnSV(ikl,isn) * PorVol * 1000.   ! [mm] OR [kg/m2]
    563 c #SU.           * (1. -SWS_SV(ikl)                        ! 0 <=> freezing
    564 c #SU.                *(1 -min(1,iabs(isn-isnoSV(ikl)))))  ! 1 <=> isn=isnoSV
    565 c #SU     zSlush =  min(rusnSV(ikl)     , zWater)          ! [mm] OR [kg/m2]
    566 c #SU     ro_new      =(dzsnSV(ikl,isn) * ro__SV(ikl,isn)  !
    567 c #SU.                 +zSlush                           ) !
    568 c #SU.            / max(dzsnSV(ikl,isn) , epsi           ) !
    569 c #SU     if(ro_new<ro_Ice+20) then ! MAX 940kg/m3         !
    570 c #SU      rusnSV(ikl)  = rusnSV(ikl)          - zSlush    ! [mm] OR [kg/m2]
    571 c #SU      RuofSV(ikl,4)= max(0.,RuofSV(ikl,4) - zSlush/dt__SV)
    572 c #SU      eta_SV(ikl,isn) =(ro_new - ro__SV(ikl,isn)      !
    573 c #SU.                     *(1.     - eta_SV(ikl,isn)))    !
    574 c #SU.                / max (ro_new , epsi            )    !
    575 c #SU      ro__SV(ikl,isn) =      ro_new                   !
    576 c #SU     endif
    577 c #SU   END DO
    578 c #SU END DO
    579  
     552          PorVol = 1. - ro__SV(ikl,isn)                    ! [--]
     553     .           *(1. - eta_SV(ikl,isn))/ ro_Ice           !
     554     .           -      eta_SV(ikl,isn)                    !
     555     .                 *ro__SV(ikl,isn) / ro_Wat           !
     556          PorVol =  max(PorVol          , zero  )          !
     557          zWater =      dzsnSV(ikl,isn) * PorVol * 1000.   ! [mm] OR [kg/m2]
     558     .           * (1. -SWS_SV(ikl)                        ! 0 <=> freezing
     559     .                *(1 -min(1,iabs(isn-isnoSV(ikl)))))  ! 1 <=> isn=isnoSV
     560          zSlush =  min(rusnSV(ikl)     , zWater)          ! [mm] OR [kg/m2]
     561          ro_new      =(dzsnSV(ikl,isn) * ro__SV(ikl,isn)  !
     562     .                 +zSlush                           ) !
     563     .            / max(dzsnSV(ikl,isn) , epsi           ) !
     564          if(ro_new<ro_Ice+20) then ! MAX 940kg/m3         !
     565           rusnSV(ikl)  = rusnSV(ikl)          - zSlush    ! [mm] OR [kg/m2]
     566           RuofSV(ikl,4)= max(0.,RuofSV(ikl,4) - zSlush/dt__SV)
     567           eta_SV(ikl,isn) =(ro_new - ro__SV(ikl,isn)      !
     568     .                     *(1.     - eta_SV(ikl,isn)))    !
     569     .                / max (ro_new , epsi            )    !
     570           ro__SV(ikl,isn) =      ro_new                   !
     571          endif
     572        END DO
     573      END DO
     574      END IF
    580575 
    581576C +--Impact of the Sublimation/Deposition on the Surface Mass Balance
Note: See TracChangeset for help on using the changeset viewer.