New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13710 for NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcblk.F90 – NEMO

Ignore:
Timestamp:
2020-11-02T10:56:42+01:00 (3 years ago)
Author:
emanuelaclementi
Message:

branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves: merge with trunk@13708, see #2155 and #2339

Location:
NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcblk.F90

    r12991 r13710  
    4444   USE lib_fortran    ! to use key_nosignedzero 
    4545#if defined key_si3 
    46    USE ice     , ONLY :   jpl, a_i_b, at_i_b, rn_cnd_s, hfx_err_dif 
    47    USE icethd_dh      ! for CALL ice_thd_snwblow 
     46   USE ice     , ONLY :   u_ice, v_ice, jpl, a_i_b, at_i_b, t_su, rn_cnd_s, hfx_err_dif, nn_qtrice 
     47   USE icevar         ! for CALL ice_var_snwblow 
    4848#endif 
    4949   USE sbcblk_algo_ncar     ! => turb_ncar     : NCAR - CORE (Large & Yeager, 2009) 
     
    7474#endif 
    7575 
    76    INTEGER , PUBLIC            ::   jpfld         ! maximum number of files to read 
    77    INTEGER , PUBLIC, PARAMETER ::   jp_wndi = 1   ! index of 10m wind velocity (i-component) (m/s)    at T-point 
    78    INTEGER , PUBLIC, PARAMETER ::   jp_wndj = 2   ! index of 10m wind velocity (j-component) (m/s)    at T-point 
    79    INTEGER , PUBLIC, PARAMETER ::   jp_tair = 3   ! index of 10m air temperature             (Kelvin) 
    80    INTEGER , PUBLIC, PARAMETER ::   jp_humi = 4   ! index of specific humidity               ( % ) 
    81    INTEGER , PUBLIC, PARAMETER ::   jp_qsr  = 5   ! index of solar heat                      (W/m2) 
    82    INTEGER , PUBLIC, PARAMETER ::   jp_qlw  = 6   ! index of Long wave                       (W/m2) 
    83    INTEGER , PUBLIC, PARAMETER ::   jp_prec = 7   ! index of total precipitation (rain+snow) (Kg/m2/s) 
    84    INTEGER , PUBLIC, PARAMETER ::   jp_snow = 8   ! index of snow (solid prcipitation)       (kg/m2/s) 
    85    INTEGER , PUBLIC, PARAMETER ::   jp_slp  = 9   ! index of sea level pressure              (Pa) 
    86    INTEGER , PUBLIC, PARAMETER ::   jp_hpgi =10   ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 
    87    INTEGER , PUBLIC, PARAMETER ::   jp_hpgj =11   ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 
    88  
     76   INTEGER , PUBLIC, PARAMETER ::   jp_wndi  =  1   ! index of 10m wind velocity (i-component) (m/s)    at T-point 
     77   INTEGER , PUBLIC, PARAMETER ::   jp_wndj  =  2   ! index of 10m wind velocity (j-component) (m/s)    at T-point 
     78   INTEGER , PUBLIC, PARAMETER ::   jp_tair  =  3   ! index of 10m air temperature             (Kelvin) 
     79   INTEGER , PUBLIC, PARAMETER ::   jp_humi  =  4   ! index of specific humidity               ( % ) 
     80   INTEGER , PUBLIC, PARAMETER ::   jp_qsr   =  5   ! index of solar heat                      (W/m2) 
     81   INTEGER , PUBLIC, PARAMETER ::   jp_qlw   =  6   ! index of Long wave                       (W/m2) 
     82   INTEGER , PUBLIC, PARAMETER ::   jp_prec  =  7   ! index of total precipitation (rain+snow) (Kg/m2/s) 
     83   INTEGER , PUBLIC, PARAMETER ::   jp_snow  =  8   ! index of snow (solid prcipitation)       (kg/m2/s) 
     84   INTEGER , PUBLIC, PARAMETER ::   jp_slp   =  9   ! index of sea level pressure              (Pa) 
     85   INTEGER , PUBLIC, PARAMETER ::   jp_uoatm = 10   ! index of surface current (i-component) 
     86   !                                                !          seen by the atmospheric forcing (m/s) at T-point 
     87   INTEGER , PUBLIC, PARAMETER ::   jp_voatm = 11   ! index of surface current (j-component) 
     88   !                                                !          seen by the atmospheric forcing (m/s) at T-point 
     89   INTEGER , PUBLIC, PARAMETER ::   jp_cc    = 12   ! index of cloud cover                     (-)      range:0-1 
     90   INTEGER , PUBLIC, PARAMETER ::   jp_hpgi  = 13   ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 
     91   INTEGER , PUBLIC, PARAMETER ::   jp_hpgj  = 14   ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 
     92   INTEGER , PUBLIC, PARAMETER ::   jpfld    = 14   ! maximum number of files to read 
     93 
     94   ! Warning: keep this structure allocatable for Agrif... 
    8995   TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:) ::   sf   ! structure of input atmospheric fields (file informations, fields read) 
    9096 
     
    98104   LOGICAL  ::   ln_Cd_L15      ! ice-atm drag = F( ice concentration, atmospheric stability ) (Lupkes et al. JGR2015) 
    99105   ! 
     106   LOGICAL  ::   ln_crt_fbk     ! Add surface current feedback to the wind stress computation  (Renault et al. 2020) 
     107   REAL(wp) ::   rn_stau_a      ! Alpha and Beta coefficients of Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta 
     108   REAL(wp) ::   rn_stau_b      !  
     109   ! 
    100110   REAL(wp)         ::   rn_pfac   ! multiplication factor for precipitation 
    101111   REAL(wp), PUBLIC ::   rn_efac   ! multiplication factor for evaporation 
    102    REAL(wp), PUBLIC ::   rn_vfac   ! multiplication factor for ice/ocean velocity in the calculation of wind stress 
    103112   REAL(wp)         ::   rn_zqt    ! z(q,t) : height of humidity and temperature measurements 
    104113   REAL(wp)         ::   rn_zu     ! z(u)   : height of wind measurements 
    105114   ! 
    106    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   Cd_ice , Ch_ice , Ce_ice   ! transfert coefficients over ice 
    107    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   Cdn_oce, Chn_oce, Cen_oce  ! neutral coeffs over ocean (L15 bulk scheme) 
    108    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   t_zu, q_zu                 ! air temp. and spec. hum. at wind speed height (L15 bulk scheme) 
     115   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) ::   Cdn_oce, Chn_oce, Cen_oce  ! neutral coeffs over ocean (L15 bulk scheme and ABL) 
     116   REAL(wp),         ALLOCATABLE, DIMENSION(:,:) ::   Cd_ice , Ch_ice , Ce_ice   ! transfert coefficients over ice 
     117   REAL(wp),         ALLOCATABLE, DIMENSION(:,:) ::   t_zu, q_zu                 ! air temp. and spec. hum. at wind speed height (L15 bulk scheme) 
    109118 
    110119   LOGICAL  ::   ln_skin_cs     ! use the cool-skin (only available in ECMWF and COARE algorithms) !LB 
     
    113122   LOGICAL  ::   ln_humi_dpt    ! humidity read in files ("sn_humi") is dew-point temperature [K] if .true. !LB 
    114123   LOGICAL  ::   ln_humi_rlh    ! humidity read in files ("sn_humi") is relative humidity     [%] if .true. !LB 
     124   LOGICAL  ::   ln_tpot        !!GS: flag to compute or not potential temperature 
    115125   ! 
    116126   INTEGER  ::   nhumi          ! choice of the bulk algorithm 
     
    162172      !! 
    163173      CHARACTER(len=100)            ::   cn_dir                ! Root directory for location of atmospheric forcing files 
    164       TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) ::   slf_i        ! array of namelist informations on the fields to read 
    165       TYPE(FLD_N) ::   sn_wndi, sn_wndj, sn_humi, sn_qsr       ! informations about the fields to be read 
    166       TYPE(FLD_N) ::   sn_qlw , sn_tair, sn_prec, sn_snow      !       "                        " 
    167       TYPE(FLD_N) ::   sn_slp , sn_hpgi, sn_hpgj               !       "                        " 
     174      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                 ! array of namelist informations on the fields to read 
     175      TYPE(FLD_N) ::   sn_wndi, sn_wndj , sn_humi, sn_qsr      ! informations about the fields to be read 
     176      TYPE(FLD_N) ::   sn_qlw , sn_tair , sn_prec, sn_snow     !       "                        " 
     177      TYPE(FLD_N) ::   sn_slp , sn_uoatm, sn_voatm             !       "                        " 
     178      TYPE(FLD_N) ::   sn_cc, sn_hpgi, sn_hpgj                 !       "                        " 
     179      INTEGER     ::   ipka                                    ! number of levels in the atmospheric variable 
    168180      NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw ,                &   ! input fields 
    169          &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_hpgi, sn_hpgj,       & 
     181         &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_uoatm, sn_voatm,     & 
     182         &                 sn_cc, sn_hpgi, sn_hpgj,                                   & 
    170183         &                 ln_NCAR, ln_COARE_3p0, ln_COARE_3p6, ln_ECMWF,             &   ! bulk algorithm 
    171184         &                 cn_dir , rn_zqt, rn_zu,                                    & 
    172          &                 rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15,           & 
     185         &                 rn_pfac, rn_efac, ln_Cd_L12, ln_Cd_L15, ln_tpot,           & 
     186         &                 ln_crt_fbk, rn_stau_a, rn_stau_b,                          &   ! current feedback 
    173187         &                 ln_skin_cs, ln_skin_wl, ln_humi_sph, ln_humi_dpt, ln_humi_rlh  ! cool-skin / warm-layer !LB 
    174188      !!--------------------------------------------------------------------- 
     
    242256      !                                   !* set the bulk structure 
    243257      !                                      !- store namelist information in an array 
    244       IF( ln_blk ) jpfld = 9 
    245       IF( ln_abl ) jpfld = 11 
    246       ALLOCATE( slf_i(jpfld) ) 
    247       ! 
    248       slf_i(jp_wndi) = sn_wndi   ;   slf_i(jp_wndj) = sn_wndj 
    249       slf_i(jp_qsr ) = sn_qsr    ;   slf_i(jp_qlw ) = sn_qlw 
    250       slf_i(jp_tair) = sn_tair   ;   slf_i(jp_humi) = sn_humi 
    251       slf_i(jp_prec) = sn_prec   ;   slf_i(jp_snow) = sn_snow 
    252       slf_i(jp_slp ) = sn_slp 
    253       IF( ln_abl ) THEN 
    254          slf_i(jp_hpgi) = sn_hpgi   ;   slf_i(jp_hpgj) = sn_hpgj 
    255       END IF 
     258      ! 
     259      slf_i(jp_wndi ) = sn_wndi    ;   slf_i(jp_wndj ) = sn_wndj 
     260      slf_i(jp_qsr  ) = sn_qsr     ;   slf_i(jp_qlw  ) = sn_qlw 
     261      slf_i(jp_tair ) = sn_tair    ;   slf_i(jp_humi ) = sn_humi 
     262      slf_i(jp_prec ) = sn_prec    ;   slf_i(jp_snow ) = sn_snow 
     263      slf_i(jp_slp  ) = sn_slp     ;   slf_i(jp_cc   ) = sn_cc 
     264      slf_i(jp_uoatm) = sn_uoatm   ;   slf_i(jp_voatm) = sn_voatm 
     265      slf_i(jp_hpgi ) = sn_hpgi    ;   slf_i(jp_hpgj ) = sn_hpgj 
     266      ! 
     267      IF( .NOT. ln_abl ) THEN   ! force to not use jp_hpgi and jp_hpgj, should already be done in namelist_* but we never know... 
     268         slf_i(jp_hpgi)%clname = 'NOT USED' 
     269         slf_i(jp_hpgj)%clname = 'NOT USED' 
     270      ENDIF 
    256271      ! 
    257272      !                                      !- allocate the bulk structure 
     
    264279      DO jfpr= 1, jpfld 
    265280         ! 
    266          IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN    !--  not used field  --!   (only now allocated and set to zero) 
    267             ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 
    268             sf(jfpr)%fnow(:,:,1) = 0._wp 
     281         IF(   ln_abl    .AND.                                                      & 
     282            &    ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR.   & 
     283            &      jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair     )  ) THEN 
     284            ipka = jpka   ! ABL: some fields are 3D input 
     285         ELSE 
     286            ipka = 1 
     287         ENDIF 
     288         ! 
     289         ALLOCATE( sf(jfpr)%fnow(jpi,jpj,ipka) ) 
     290         ! 
     291         IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN    !--  not used field  --!   (only now allocated and set to default) 
     292            IF(     jfpr == jp_slp ) THEN 
     293               sf(jfpr)%fnow(:,:,1:ipka) = 101325._wp   ! use standard pressure in Pa 
     294            ELSEIF( jfpr == jp_prec .OR. jfpr == jp_snow .OR. jfpr == jp_uoatm .OR. jfpr == jp_voatm ) THEN 
     295               sf(jfpr)%fnow(:,:,1:ipka) = 0._wp        ! no precip or no snow or no surface currents 
     296            ELSEIF( jfpr == jp_hpgi .OR. jfpr == jp_hpgj ) THEN 
     297               IF( .NOT. ln_abl ) THEN 
     298                  DEALLOCATE( sf(jfpr)%fnow )   ! deallocate as not used in this case 
     299               ELSE 
     300                  sf(jfpr)%fnow(:,:,1:ipka) = 0._wp 
     301               ENDIF 
     302            ELSEIF( jfpr == jp_cc  ) THEN 
     303               sf(jp_cc)%fnow(:,:,1:ipka) = pp_cldf 
     304            ELSE 
     305               WRITE(ctmp1,*) 'sbc_blk_init: no default value defined for field number', jfpr 
     306               CALL ctl_stop( ctmp1 ) 
     307            ENDIF 
    269308         ELSE                                                  !-- used field  --! 
    270             IF(   ln_abl    .AND.                                                      & 
    271                &    ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR.   & 
    272                &      jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair     )  ) THEN   ! ABL: some fields are 3D input 
    273                ALLOCATE( sf(jfpr)%fnow(jpi,jpj,jpka) ) 
    274                IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,jpka,2) ) 
    275             ELSE                                                                                ! others or Bulk fields are 2D fiels 
    276                ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 
    277                IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 
    278             ENDIF 
     309            IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,ipka,2) )   ! allocate array for temporal interpolation 
    279310            ! 
    280311            IF( sf(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * sf(jfpr)%freqh), nn_fsbc * NINT(rn_Dt) ) /= 0 )   & 
    281                &  CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rn_Dt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.',   & 
    282                &                 '               This is not ideal. You should consider changing either rn_Dt or nn_fsbc value...' ) 
     312         &  CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rn_Dt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.',   & 
     313         &                 '               This is not ideal. You should consider changing either rn_Dt or nn_fsbc value...' ) 
    283314         ENDIF 
    284315      END DO 
     
    308339         WRITE(numout,*) '      factor applied on precipitation (total & snow)      rn_pfac      = ', rn_pfac 
    309340         WRITE(numout,*) '      factor applied on evaporation                       rn_efac      = ', rn_efac 
    310          WRITE(numout,*) '      factor applied on ocean/ice velocity                rn_vfac      = ', rn_vfac 
    311341         WRITE(numout,*) '         (form absolute (=0) to relative winds(=1))' 
    312342         WRITE(numout,*) '      use ice-atm drag from Lupkes2012                    ln_Cd_L12    = ', ln_Cd_L12 
    313343         WRITE(numout,*) '      use ice-atm drag from Lupkes2015                    ln_Cd_L15    = ', ln_Cd_L15 
     344         WRITE(numout,*) '      use surface current feedback on wind stress         ln_crt_fbk   = ', ln_crt_fbk 
     345         IF(ln_crt_fbk) THEN 
     346         WRITE(numout,*) '         Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta' 
     347         WRITE(numout,*) '            Alpha                                         rn_stau_a    = ', rn_stau_a 
     348         WRITE(numout,*) '            Beta                                          rn_stau_b    = ', rn_stau_b 
     349         ENDIF 
    314350         ! 
    315351         WRITE(numout,*) 
     
    410446      !                                            ! compute the surface ocean fluxes using bulk formulea 
    411447      IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    412          CALL blk_oce_1( kt, sf(jp_wndi)%fnow(:,:,1), sf(jp_wndj)%fnow(:,:,1),   &   !   <<= in 
    413             &                sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1),   &   !   <<= in 
    414             &                sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m,       &   !   <<= in 
    415             &                sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1),   &   !   <<= in (wl/cs) 
    416             &                tsk_m, zssq, zcd_du, zsen, zevp )                       !   =>> out 
    417  
    418          CALL blk_oce_2(     sf(jp_tair)%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1),   &   !   <<= in 
    419             &                sf(jp_qlw )%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1),   &   !   <<= in 
    420             &                sf(jp_snow)%fnow(:,:,1), tsk_m,                     &   !   <<= in 
    421             &                zsen, zevp )                                            !   <=> in out 
     448         CALL blk_oce_1( kt, sf(jp_wndi )%fnow(:,:,1), sf(jp_wndj )%fnow(:,:,1),   &   !   <<= in 
     449            &                sf(jp_tair )%fnow(:,:,1), sf(jp_humi )%fnow(:,:,1),   &   !   <<= in 
     450            &                sf(jp_slp  )%fnow(:,:,1), sst_m, ssu_m, ssv_m,        &   !   <<= in 
     451            &                sf(jp_uoatm)%fnow(:,:,1), sf(jp_voatm)%fnow(:,:,1),   &   !   <<= in 
     452            &                sf(jp_qsr  )%fnow(:,:,1), sf(jp_qlw  )%fnow(:,:,1),   &   !   <<= in (wl/cs) 
     453            &                tsk_m, zssq, zcd_du, zsen, zevp )                         !   =>> out 
     454 
     455         CALL blk_oce_2(     sf(jp_tair )%fnow(:,:,1), sf(jp_qsr  )%fnow(:,:,1),   &   !   <<= in 
     456            &                sf(jp_qlw  )%fnow(:,:,1), sf(jp_prec )%fnow(:,:,1),   &   !   <<= in 
     457            &                sf(jp_snow )%fnow(:,:,1), tsk_m,                      &   !   <<= in 
     458            &                zsen, zevp )                                              !   <=> in out 
    422459      ENDIF 
    423460      ! 
     
    451488 
    452489 
    453    SUBROUTINE blk_oce_1( kt, pwndi, pwndj , ptair, phumi, &  ! inp 
    454       &                  pslp , pst   , pu   , pv,        &  ! inp 
    455       &                  pqsr , pqlw  ,                   &  ! inp 
    456       &                  ptsk, pssq , pcd_du, psen , pevp   )  ! out 
     490   SUBROUTINE blk_oce_1( kt, pwndi, pwndj, ptair, phumi,        &  ! inp 
     491      &                      pslp , pst  , pu   , pv,            &  ! inp 
     492      &                      puatm, pvatm, pqsr , pqlw ,         &  ! inp 
     493      &                      ptsk , pssq , pcd_du, psen, pevp   )   ! out 
    457494      !!--------------------------------------------------------------------- 
    458495      !!                     ***  ROUTINE blk_oce_1  *** 
     
    479516      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pu     ! surface current at U-point (i-component) [m/s] 
    480517      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pv     ! surface current at V-point (j-component) [m/s] 
     518      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   puatm  ! surface current seen by the atm at T-point (i-component) [m/s] 
     519      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pvatm  ! surface current seen by the atm at T-point (j-component) [m/s] 
    481520      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pqsr   ! 
    482521      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pqlw   ! 
     
    489528      INTEGER  ::   ji, jj               ! dummy loop indices 
    490529      REAL(wp) ::   zztmp                ! local variable 
     530      REAL(wp) ::   zstmax, zstau 
     531#if defined key_cyclone 
    491532      REAL(wp), DIMENSION(jpi,jpj) ::   zwnd_i, zwnd_j    ! wind speed components at T-point 
     533#endif 
     534      REAL(wp), DIMENSION(jpi,jpj) ::   ztau_i, ztau_j    ! wind stress components at T-point 
    492535      REAL(wp), DIMENSION(jpi,jpj) ::   zU_zu             ! bulk wind speed at height zu  [m/s] 
    493536      REAL(wp), DIMENSION(jpi,jpj) ::   ztpot             ! potential temperature of air at z=rn_zqt [K] 
     
    504547      ptsk(:,:) = pst(:,:) + rt0  ! by default: skin temperature = "bulk SST" (will remain this way if NCAR algorithm used!) 
    505548 
     549      ! --- cloud cover --- ! 
     550      cloud_fra(:,:) = sf(jp_cc)%fnow(:,:,1) 
     551 
    506552      ! ----------------------------------------------------------------------------- ! 
    507553      !      0   Wind components and module at T-point relative to the moving ocean   ! 
     
    513559      zwnd_j(:,:) = 0._wp 
    514560      CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add analytical tropical cyclone (Vincent et al. JGR 2012) 
    515       DO_2D_00_00 
    516          pwndi(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
    517          pwndj(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     561      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     562         zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
     563         zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     564         ! ... scalar wind at T-point (not masked) 
     565         wndm(ji,jj) = SQRT( zwnd_i(ji,jj) * zwnd_i(ji,jj) + zwnd_j(ji,jj) * zwnd_j(ji,jj) ) 
     566      END_2D 
     567#else 
     568      ! ... scalar wind module at T-point (not masked) 
     569      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     570         wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  ) 
    518571      END_2D 
    519572#endif 
    520       DO_2D_00_00 
    521          zwnd_i(ji,jj) = (  pwndi(ji,jj) - rn_vfac * 0.5 * ( pu(ji-1,jj  ) + pu(ji,jj) )  ) 
    522          zwnd_j(ji,jj) = (  pwndj(ji,jj) - rn_vfac * 0.5 * ( pv(ji  ,jj-1) + pv(ji,jj) )  ) 
    523       END_2D 
    524       CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. ) 
    525       ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked) 
    526       wndm(:,:) = SQRT(  zwnd_i(:,:) * zwnd_i(:,:)   & 
    527          &             + zwnd_j(:,:) * zwnd_j(:,:)  ) * tmask(:,:,1) 
    528  
    529573      ! ----------------------------------------------------------------------------- ! 
    530574      !      I   Solar FLUX                                                           ! 
     
    574618         !#LB: because AGRIF hates functions that return something else than a scalar, need to 
    575619         !     use scalar version of gamma_moist() ... 
    576          DO_2D_11_11 
    577             ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 
    578          END_2D 
    579       ENDIF 
    580  
    581  
     620         IF( ln_tpot ) THEN 
     621            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     622               ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 
     623            END_2D 
     624         ELSE 
     625            ztpot = ptair(:,:) 
     626         ENDIF 
     627      ENDIF 
    582628 
    583629      !! Time to call the user-selected bulk parameterization for 
     
    608654 
    609655      END SELECT 
    610  
     656       
     657      IF( iom_use('Cd_oce') )   CALL iom_put("Cd_oce",   zcd_oce * tmask(:,:,1)) 
     658      IF( iom_use('Ce_oce') )   CALL iom_put("Ce_oce",   zce_oce * tmask(:,:,1)) 
     659      IF( iom_use('Ch_oce') )   CALL iom_put("Ch_oce",   zch_oce * tmask(:,:,1)) 
     660      !! LB: mainly here for debugging purpose: 
     661      IF( iom_use('theta_zt') ) CALL iom_put("theta_zt", (ztpot-rt0) * tmask(:,:,1)) ! potential temperature at z=zt 
     662      IF( iom_use('q_zt') )     CALL iom_put("q_zt",     zqair       * tmask(:,:,1)) ! specific humidity       " 
     663      IF( iom_use('theta_zu') ) CALL iom_put("theta_zu", (t_zu -rt0) * tmask(:,:,1)) ! potential temperature at z=zu 
     664      IF( iom_use('q_zu') )     CALL iom_put("q_zu",     q_zu        * tmask(:,:,1)) ! specific humidity       " 
     665      IF( iom_use('ssq') )      CALL iom_put("ssq",      pssq        * tmask(:,:,1)) ! saturation specific humidity at z=0 
     666      IF( iom_use('wspd_blk') ) CALL iom_put("wspd_blk", zU_zu       * tmask(:,:,1)) ! bulk wind speed at z=zu 
     667       
    611668      IF( ln_skin_cs .OR. ln_skin_wl ) THEN 
    612669         !! ptsk and pssq have been updated!!! 
     
    624681 
    625682      IF( ln_abl ) THEN         !==  ABL formulation  ==!   multiplication by rho_air and turbulent fluxes computation done in ablstp 
    626          !! FL do we need this multiplication by tmask ... ??? 
    627          DO_2D_11_11 
    628             zztmp = zU_zu(ji,jj) !* tmask(ji,jj,1) 
     683         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     684            zztmp = zU_zu(ji,jj) 
    629685            wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod 
    630686            pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 
    631687            psen(ji,jj)   = zztmp * zch_oce(ji,jj) 
    632688            pevp(ji,jj)   = zztmp * zce_oce(ji,jj) 
     689            rhoa(ji,jj)   = rho_air( ptair(ji,jj), phumi(ji,jj), pslp(ji,jj) ) 
    633690         END_2D 
    634691      ELSE                      !==  BLK formulation  ==!   turbulent fluxes computation 
     
    644701         pevp(:,:) = pevp(:,:) * tmask(:,:,1) 
    645702 
    646          ! Tau i and j component on T-grid points, using array "zcd_oce" as a temporary array... 
    647          zcd_oce = 0._wp 
    648          WHERE ( wndm > 0._wp ) zcd_oce = taum / wndm 
    649          zwnd_i = zcd_oce * zwnd_i 
    650          zwnd_j = zcd_oce * zwnd_j 
    651  
    652          CALL iom_put( "taum_oce", taum )   ! output wind stress module 
     703         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     704            IF( wndm(ji,jj) > 0._wp ) THEN 
     705               zztmp = taum(ji,jj) / wndm(ji,jj) 
     706#if defined key_cyclone 
     707               ztau_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
     708               ztau_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
     709#else 
     710               ztau_i(ji,jj) = zztmp * pwndi(ji,jj) 
     711               ztau_j(ji,jj) = zztmp * pwndj(ji,jj) 
     712#endif 
     713            ELSE 
     714               ztau_i(ji,jj) = 0._wp 
     715               ztau_j(ji,jj) = 0._wp                  
     716            ENDIF 
     717         END_2D 
     718 
     719         IF( ln_crt_fbk ) THEN   ! aply eq. 10 and 11 of Renault et al. 2020 (doi: 10.1029/2019MS001715) 
     720            zstmax = MIN( rn_stau_a * 3._wp + rn_stau_b, 0._wp )   ! set the max value of Stau corresponding to a wind of 3 m/s (<0) 
     721            DO_2D( 0, 1, 0, 1 )   ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop 
     722               zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax )   ! stau (<0) must be smaller than zstmax 
     723               ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj  ) + pu(ji,jj) ) - puatm(ji,jj) ) 
     724               ztau_j(ji,jj) = ztau_j(ji,jj) + zstau * ( 0.5_wp * ( pv(ji  ,jj-1) + pv(ji,jj) ) - pvatm(ji,jj) ) 
     725               taum(ji,jj) = SQRT( ztau_i(ji,jj) * ztau_i(ji,jj) + ztau_j(ji,jj) * ztau_j(ji,jj) ) 
     726            END_2D 
     727         ENDIF 
    653728 
    654729         ! ... utau, vtau at U- and V_points, resp. 
    655730         !     Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 
    656          !     Note the use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves 
    657          DO_2D_10_10 
    658             utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( zwnd_i(ji,jj) + zwnd_i(ji+1,jj  ) ) & 
    659                &          * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
    660             vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( zwnd_j(ji,jj) + zwnd_j(ji  ,jj+1) ) & 
    661                &          * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
     731         !     Note that coastal wind stress is not used in the code... so this extra care has no effect 
     732         DO_2D( 0, 0, 0, 0 )              ! start loop at 2, in case ln_crt_fbk = T 
     733            utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj  ) ) & 
     734               &              * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
     735            vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( ztau_j(ji,jj) + ztau_j(ji  ,jj+1) ) & 
     736               &              * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
    662737         END_2D 
    663          CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 
     738 
     739         IF( ln_crt_fbk ) THEN 
     740            CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1., taum, 'T', -1. ) 
     741         ELSE 
     742            CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 
     743         ENDIF 
     744 
     745         CALL iom_put( "taum_oce", taum )   ! output wind stress module 
    664746 
    665747         IF(sn_cfctl%l_prtctl) THEN 
     
    737819 
    738820      ! use scalar version of L_vap() for AGRIF compatibility 
    739       DO_2D_11_11 
     821      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    740822         zqla(ji,jj) = - L_vap( ztskk(ji,jj) ) * pevp(ji,jj)    ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update 
    741823      END_2D 
     
    832914      ! 
    833915      INTEGER  ::   ji, jj    ! dummy loop indices 
    834       REAL(wp) ::   zwndi_t , zwndj_t             ! relative wind components at T-point 
    835916      REAL(wp) ::   zootm_su                      ! sea-ice surface mean temperature 
    836917      REAL(wp) ::   zztmp1, zztmp2                ! temporary arrays 
     
    843924      ! ------------------------------------------------------------ ! 
    844925      ! C-grid ice dynamics :   U & V-points (same as ocean) 
    845       DO_2D_00_00 
    846          zwndi_t = (  pwndi(ji,jj) - rn_vfac * 0.5_wp * ( puice(ji-1,jj  ) + puice(ji,jj) )  ) 
    847          zwndj_t = (  pwndj(ji,jj) - rn_vfac * 0.5_wp * ( pvice(ji  ,jj-1) + pvice(ji,jj) )  ) 
    848          wndm_ice(ji,jj) = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1) 
     926      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     927         wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 
    849928      END_2D 
    850       CALL lbc_lnk( 'sbcblk', wndm_ice, 'T',  1. ) 
    851929      ! 
    852930      ! Make ice-atm. drag dependent on ice concentration 
     
    859937         Ce_ice(:,:) = Ch_ice(:,:)       ! sensible and latent heat transfer coef. are considered identical 
    860938      ENDIF 
    861  
    862       !! IF ( iom_use("Cd_ice") ) CALL iom_put("Cd_ice", Cd_ice)   ! output value of pure ice-atm. transfer coef. 
    863       !! IF ( iom_use("Ch_ice") ) CALL iom_put("Ch_ice", Ch_ice)   ! output value of pure ice-atm. transfer coef. 
    864  
     939       
     940      IF( iom_use('Cd_ice') ) CALL iom_put("Cd_ice", Cd_ice) 
     941      IF( iom_use('Ce_ice') ) CALL iom_put("Ce_ice", Ce_ice) 
     942      IF( iom_use('Ch_ice') ) CALL iom_put("Ch_ice", Ch_ice) 
     943       
    865944      ! local scalars ( place there for vector optimisation purposes) 
    866       !IF (ln_abl) rhoa  (:,:)  = rho_air( ptair(:,:), phumi(:,:), pslp(:,:) ) !!GS: rhoa must be (re)computed here with ABL to avoid division by zero after (TBI) 
    867945      zcd_dui(:,:) = wndm_ice(:,:) * Cd_ice(:,:) 
    868946 
    869947      IF( ln_blk ) THEN 
    870          ! ------------------------------------------------------------ ! 
    871          !    Wind stress relative to the moving ice ( U10m - U_ice )   ! 
    872          ! ------------------------------------------------------------ ! 
    873          ! C-grid ice dynamics :   U & V-points (same as ocean) 
    874          DO_2D_00_00 
    875             putaui(ji,jj) = 0.5_wp * (  rhoa(ji+1,jj) * zcd_dui(ji+1,jj)             & 
    876                &                      + rhoa(ji  ,jj) * zcd_dui(ji  ,jj)  )          & 
    877                &         * ( 0.5_wp * ( pwndi(ji+1,jj) + pwndi(ji,jj) ) - rn_vfac * puice(ji,jj) ) 
    878             pvtaui(ji,jj) = 0.5_wp * (  rhoa(ji,jj+1) * zcd_dui(ji,jj+1)             & 
    879                &                      + rhoa(ji,jj  ) * zcd_dui(ji,jj  )  )          & 
    880                &         * ( 0.5_wp * ( pwndj(ji,jj+1) + pwndj(ji,jj) ) - rn_vfac * pvice(ji,jj) ) 
     948         ! ---------------------------------------------------- ! 
     949         !    Wind stress relative to nonmoving ice ( U10m )    ! 
     950         ! ---------------------------------------------------- ! 
     951         ! supress moving ice in wind stress computation as we don't know how to do it properly... 
     952         DO_2D( 0, 1, 0, 1 )    ! at T point  
     953            putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndi(ji,jj) 
     954            pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndj(ji,jj) 
    881955         END_2D 
    882          CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1., pvtaui, 'V', -1. ) 
     956         ! 
     957         DO_2D( 0, 0, 0, 0 )    ! U & V-points (same as ocean). 
     958            ! take care of the land-sea mask to avoid "pollution" of coastal stress. p[uv]taui used in frazil and  rheology  
     959            zztmp1 = 0.5_wp * ( 2. - umask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji+1,jj  ,1) ) 
     960            zztmp2 = 0.5_wp * ( 2. - vmask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji  ,jj+1,1) ) 
     961            putaui(ji,jj) = zztmp1 * ( putaui(ji,jj) + putaui(ji+1,jj  ) ) 
     962            pvtaui(ji,jj) = zztmp2 * ( pvtaui(ji,jj) + pvtaui(ji  ,jj+1) ) 
     963         END_2D 
     964         CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1._wp, pvtaui, 'V', -1._wp ) 
    883965         ! 
    884966         IF(sn_cfctl%l_prtctl)  CALL prt_ctl( tab2d_1=putaui  , clinfo1=' blk_ice: putaui : '   & 
    885967            &                               , tab2d_2=pvtaui  , clinfo2='          pvtaui : ' ) 
    886       ELSE 
     968      ELSE ! ln_abl 
    887969         zztmp1 = 11637800.0_wp 
    888970         zztmp2 =    -5897.8_wp 
    889          DO_2D_11_11 
     971         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    890972            pcd_dui(ji,jj) = zcd_dui (ji,jj) 
    891973            pseni  (ji,jj) = wndm_ice(ji,jj) * Ch_ice(ji,jj) 
     
    9281010      REAL(wp) ::   zcoef_dqlw, zcoef_dqla   !   -      - 
    9291011      REAL(wp) ::   zztmp, zztmp2, z1_rLsub  !   -      - 
    930       REAL(wp) ::   zfr1, zfr2               ! local variables 
    9311012      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z1_st         ! inverse of surface temperature 
    9321013      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_qlw         ! long wave heat flux over ice 
     
    9371018      REAL(wp), DIMENSION(jpi,jpj)     ::   zqair         ! specific humidity of air at z=rn_zqt [kg/kg] !LB 
    9381019      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
     1020      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri 
    9391021      !!--------------------------------------------------------------------- 
    9401022      ! 
     
    10211103      ! --- evaporation minus precipitation --- ! 
    10221104      zsnw(:,:) = 0._wp 
    1023       CALL ice_thd_snwblow( (1.-at_i_b(:,:)), zsnw )  ! snow distribution over ice after wind blowing 
     1105      CALL ice_var_snwblow( (1.-at_i_b(:,:)), zsnw )  ! snow distribution over ice after wind blowing 
    10241106      emp_oce(:,:) = ( 1._wp - at_i_b(:,:) ) * zevap(:,:) - ( tprecip(:,:) - sprecip(:,:) ) - sprecip(:,:) * (1._wp - zsnw ) 
    10251107      emp_ice(:,:) = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw 
     
    10481130      END DO 
    10491131 
    1050       ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    1051       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    1052       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
    1053       ! 
    1054       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm 
    1055          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    1056       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    1057          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    1058       ELSEWHERE                                                         ! zero when hs>0 
    1059          qtr_ice_top(:,:,:) = 0._wp 
    1060       END WHERE 
    1061       ! 
    1062  
     1132      ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- ! 
     1133      IF( nn_qtrice == 0 ) THEN 
     1134         ! formulation derived from Grenfell and Maykut (1977), where transmission rate 
     1135         !    1) depends on cloudiness 
     1136         !    2) is 0 when there is any snow 
     1137         !    3) tends to 1 for thin ice 
     1138         ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:)  ! surface transmission when hi>10cm 
     1139         DO jl = 1, jpl 
     1140            WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     1141               qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     1142            ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     1143               qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     1144            ELSEWHERE                                                         ! zero when hs>0 
     1145               qtr_ice_top(:,:,jl) = 0._wp  
     1146            END WHERE 
     1147         ENDDO 
     1148      ELSEIF( nn_qtrice == 1 ) THEN 
     1149         ! formulation is derived from the thesis of M. Lebrun (2019). 
     1150         !    It represents the best fit using several sets of observations 
     1151         !    It comes with snow conductivities adapted to freezing/melting conditions (see icethd_zdf_bl99.F90) 
     1152         qtr_ice_top(:,:,:) = 0.3_wp * qsr_ice(:,:,:) 
     1153      ENDIF 
     1154      ! 
    10631155      IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 
    10641156         ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) ) 
     
    11421234         ! 
    11431235         DO jl = 1, jpl 
    1144             DO_2D_11_11 
     1236            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    11451237               zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac                            ! Effective thickness 
    11461238               IF( zhe >=  zfac2 )   zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor 
     
    11571249      ! 
    11581250      DO jl = 1, jpl 
    1159          DO_2D_11_11 
     1251         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    11601252            ! 
    11611253            zkeff_h = zfac * zgfac(ji,jj,jl) / &                                    ! Effective conductivity of the snow-ice system divided by thickness 
     
    13051397      zqi_sat(:,:) =                  q_sat( ptm_su(:,:), pslp(:,:) )   ! saturation humidity over ice   [kg/kg] 
    13061398      ! 
    1307       DO_2D_00_00 
     1399      DO_2D( 0, 0, 0, 0 ) 
    13081400         ! Virtual potential temperature [K] 
    13091401         zthetav_os = zst(ji,jj)    * ( 1._wp + rctv0 * zqo_sat(ji,jj) )   ! over ocean 
     
    13481440         ! 
    13491441      END_2D 
    1350       CALL lbc_lnk_multi( 'sbcblk', pcd, 'T',  1., pch, 'T', 1. ) 
     1442      CALL lbc_lnk_multi( 'sbcblk', pcd, 'T',  1.0_wp, pch, 'T', 1.0_wp ) 
    13511443      ! 
    13521444   END SUBROUTINE Cdn10_Lupkes2015 
Note: See TracChangeset for help on using the changeset viewer.