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 13258 for NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC – NEMO

Ignore:
Timestamp:
2020-07-07T12:23:18+02:00 (4 years ago)
Author:
rblod
Message:

#2129 : merge branch CMEMS with trunk r13327

Location:
NEMO/branches/2020/dev_r12973_AGRIF_CMEMS
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools_dev_r12970_AGRIF_CMEMS            tools 
         4^/utils/tools/@HEAD           tools 
        55^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/fldread.F90

    r12489 r13258  
    127127   !! * Substitutions 
    128128#  include "do_loop_substitute.h90" 
     129#  include "domzgr_substitute.h90" 
    129130   !!---------------------------------------------------------------------- 
    130131   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    383384               IF( sdjf%ln_tint ) THEN 
    384385                  CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fdta(2,2,1,2), sdjf%nrec_a(1) ) 
    385                   CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,1,2),'Z',1. ) 
     386                  CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,1,2),'Z',1.0_wp ) 
    386387               ELSE 
    387388                  CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fnow(2,2,1  ), sdjf%nrec_a(1) ) 
    388                   CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,1  ),'Z',1. ) 
     389                  CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,1  ),'Z',1.0_wp ) 
    389390               ENDIF 
    390391            ELSE 
     
    397398               IF( sdjf%ln_tint ) THEN 
    398399                  CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) ) 
    399                   CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,:,2),'Z',1. ) 
     400                  CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,:,2),'Z',1.0_wp ) 
    400401               ELSE 
    401402                  CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fnow(2,2,:  ), sdjf%nrec_a(1) ) 
    402                   CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,:  ),'Z',1. ) 
     403                  CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,:  ),'Z',1.0_wp ) 
    403404               ENDIF 
    404405            ELSE 
     
    632633               zdhalf(jk) = zdhalf(jk-1) + e3v(ji,jj,jk-1,Kmm) 
    633634               zdepth(jk) =          zcoef  * ( zdhalf(jk  ) + 0.5_wp * e3vw(ji,jj,jk,Kmm))  & 
    634                   &         + (1._wp-zcoef) * ( zdepth(jk-1) +          e3vw(ji,jj,jk,Kmm)) 
     635                     + (1._wp-zcoef) * ( zdepth(jk-1) +          e3vw(ji,jj,jk,Kmm)) 
    635636            END DO 
    636637         END SELECT 
     
    13261327      !!      D. Delrosso INGV 
    13271328      !!----------------------------------------------------------------------  
    1328       INTEGER                      , INTENT(in   ) :: ileni,ilenj   ! lengths  
    1329       REAL, DIMENSION (ileni,ilenj), INTENT(in   ) :: zfieldn       ! array of forcing field with undeff for land points 
    1330       REAL, DIMENSION (ileni,ilenj), INTENT(  out) :: zfield        ! array of forcing field 
    1331       ! 
    1332       REAL  , DIMENSION (ileni,ilenj)   :: zmat1, zmat2, zmat3, zmat4  ! local arrays  
    1333       REAL  , DIMENSION (ileni,ilenj)   :: zmat5, zmat6, zmat7, zmat8  !   -     -  
    1334       REAL  , DIMENSION (ileni,ilenj)   :: zlsm2d                      !   -     -  
    1335       REAL  , DIMENSION (ileni,ilenj,8) :: zlsm3d                      !   -     - 
    1336       LOGICAL, DIMENSION (ileni,ilenj,8) :: ll_msknan3d                 ! logical mask for undeff detection 
    1337       LOGICAL, DIMENSION (ileni,ilenj)   :: ll_msknan2d                 ! logical mask for undeff detection 
     1329      INTEGER                          , INTENT(in   ) :: ileni,ilenj   ! lengths  
     1330      REAL(wp), DIMENSION (ileni,ilenj), INTENT(in   ) :: zfieldn       ! array of forcing field with undeff for land points 
     1331      REAL(wp), DIMENSION (ileni,ilenj), INTENT(  out) :: zfield        ! array of forcing field 
     1332      ! 
     1333      REAL(wp) , DIMENSION (ileni,ilenj)   :: zmat1, zmat2, zmat3, zmat4  ! local arrays  
     1334      REAL(wp) , DIMENSION (ileni,ilenj)   :: zmat5, zmat6, zmat7, zmat8  !   -     -  
     1335      REAL(wp) , DIMENSION (ileni,ilenj)   :: zlsm2d                      !   -     -  
     1336      REAL(wp) , DIMENSION (ileni,ilenj,8) :: zlsm3d                      !   -     - 
     1337      LOGICAL  , DIMENSION (ileni,ilenj,8) :: ll_msknan3d                 ! logical mask for undeff detection 
     1338      LOGICAL  , DIMENSION (ileni,ilenj)   :: ll_msknan2d                 ! logical mask for undeff detection 
    13381339      !!----------------------------------------------------------------------  
    13391340      zmat8 = eoshift( zfieldn , SHIFT=-1 , BOUNDARY = (/zfieldn(:,1)/)     , DIM=2 ) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/geo2ocean.F90

    r12377 r13258  
    272272      ! =========================== ! 
    273273      !           ! lateral boundary cond.: T-, U-, V-, F-pts, sgn 
    274       CALL lbc_lnk_multi( 'geo2ocean', gcost, 'T', -1., gsint, 'T', -1., gcosu, 'U', -1., gsinu, 'U', -1., &  
    275                       &   gcosv, 'V', -1., gsinv, 'V', -1., gcosf, 'F', -1., gsinf, 'F', -1.  ) 
     274      CALL lbc_lnk_multi( 'geo2ocean', gcost, 'T', -1.0_wp, gsint, 'T', -1.0_wp, gcosu, 'U', -1.0_wp, gsinu, 'U', -1.0_wp, &  
     275                      &   gcosv, 'V', -1.0_wp, gsinv, 'V', -1.0_wp, gcosf, 'F', -1.0_wp, gsinf, 'F', -1.0_wp  ) 
    276276      ! 
    277277   END SUBROUTINE angle 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbc_oce.F90

    r12377 r13258  
    223223         wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) 
    224224      END_2D 
    225       CALL lbc_lnk( 'sbc_oce', wndm(:,:) , 'T', 1. ) 
     225      CALL lbc_lnk( 'sbc_oce', wndm(:,:) , 'T', 1.0_wp ) 
    226226      ! 
    227227   END SUBROUTINE sbc_tau2wnd 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcblk.F90

    r13185 r13258  
    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_hpgi  = 12   ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 
     90   INTEGER , PUBLIC, PARAMETER ::   jp_hpgj  = 13   ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 
     91   INTEGER , PUBLIC, PARAMETER ::   jpfld    = 13   ! maximum number of files to read 
     92 
     93   ! Warning: keep this structure allocatable for Agrif... 
    8994   TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:) ::   sf   ! structure of input atmospheric fields (file informations, fields read) 
    9095 
     
    98103   LOGICAL  ::   ln_Cd_L15      ! ice-atm drag = F( ice concentration, atmospheric stability ) (Lupkes et al. JGR2015) 
    99104   ! 
     105   LOGICAL  ::   ln_crt_fbk     ! Add surface current feedback to the wind stress computation  (Renault et al. 2020) 
     106   REAL(wp) ::   rn_stau_a      ! Alpha and Beta coefficients of Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta 
     107   REAL(wp) ::   rn_stau_b      !  
     108   ! 
    100109   REAL(wp)         ::   rn_pfac   ! multiplication factor for precipitation 
    101110   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 
    103111   REAL(wp)         ::   rn_zqt    ! z(q,t) : height of humidity and temperature measurements 
    104112   REAL(wp)         ::   rn_zu     ! z(u)   : height of wind measurements 
    105113   ! 
    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) 
     114   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) ::   Cdn_oce, Chn_oce, Cen_oce  ! neutral coeffs over ocean (L15 bulk scheme and ABL) 
     115   REAL(wp),         ALLOCATABLE, DIMENSION(:,:) ::   Cd_ice , Ch_ice , Ce_ice   ! transfert coefficients over ice 
     116   REAL(wp),         ALLOCATABLE, DIMENSION(:,:) ::   t_zu, q_zu                 ! air temp. and spec. hum. at wind speed height (L15 bulk scheme) 
    109117 
    110118   LOGICAL  ::   ln_skin_cs     ! use the cool-skin (only available in ECMWF and COARE algorithms) !LB 
     
    113121   LOGICAL  ::   ln_humi_dpt    ! humidity read in files ("sn_humi") is dew-point temperature [K] if .true. !LB 
    114122   LOGICAL  ::   ln_humi_rlh    ! humidity read in files ("sn_humi") is relative humidity     [%] if .true. !LB 
     123   LOGICAL  ::   ln_tpot        !!GS: flag to compute or not potential temperature 
    115124   ! 
    116125   INTEGER  ::   nhumi          ! choice of the bulk algorithm 
     
    162171      !! 
    163172      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               !       "                        " 
     173      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                 ! array of namelist informations on the fields to read 
     174      TYPE(FLD_N) ::   sn_wndi, sn_wndj , sn_humi, sn_qsr      ! informations about the fields to be read 
     175      TYPE(FLD_N) ::   sn_qlw , sn_tair , sn_prec, sn_snow     !       "                        " 
     176      TYPE(FLD_N) ::   sn_slp , sn_uoatm, sn_voatm             !       "                        " 
     177      TYPE(FLD_N) ::   sn_hpgi, sn_hpgj                        !       "                        " 
     178      INTEGER     ::   ipka                                    ! number of levels in the atmospheric variable 
    168179      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,       & 
     180         &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_uoatm, sn_voatm,     & 
     181         &                 sn_hpgi, sn_hpgj,                                          & 
    170182         &                 ln_NCAR, ln_COARE_3p0, ln_COARE_3p6, ln_ECMWF,             &   ! bulk algorithm 
    171183         &                 cn_dir , rn_zqt, rn_zu,                                    & 
    172          &                 rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15,           & 
     184         &                 rn_pfac, rn_efac, ln_Cd_L12, ln_Cd_L15, ln_tpot,           & 
     185         &                 ln_crt_fbk, rn_stau_a, rn_stau_b,                          &   ! current feedback 
    173186         &                 ln_skin_cs, ln_skin_wl, ln_humi_sph, ln_humi_dpt, ln_humi_rlh  ! cool-skin / warm-layer !LB 
    174187      !!--------------------------------------------------------------------- 
     
    242255      !                                   !* set the bulk structure 
    243256      !                                      !- 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 
     257      ! 
     258      slf_i(jp_wndi ) = sn_wndi    ;   slf_i(jp_wndj ) = sn_wndj 
     259      slf_i(jp_qsr  ) = sn_qsr     ;   slf_i(jp_qlw  ) = sn_qlw 
     260      slf_i(jp_tair ) = sn_tair    ;   slf_i(jp_humi ) = sn_humi 
     261      slf_i(jp_prec ) = sn_prec    ;   slf_i(jp_snow ) = sn_snow 
     262      slf_i(jp_slp  ) = sn_slp 
     263      slf_i(jp_uoatm) = sn_uoatm   ;   slf_i(jp_voatm) = sn_voatm 
     264      slf_i(jp_hpgi ) = sn_hpgi    ;   slf_i(jp_hpgj ) = sn_hpgj 
     265      ! 
     266      IF( .NOT. ln_abl ) THEN   ! force to not use jp_hpgi and jp_hpgj, should already be done in namelist_* but we never know... 
     267         slf_i(jp_hpgi)%clname = 'NOT USED' 
     268         slf_i(jp_hpgj)%clname = 'NOT USED' 
     269      ENDIF 
    256270      ! 
    257271      !                                      !- allocate the bulk structure 
     
    264278      DO jfpr= 1, jpfld 
    265279         ! 
    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 
     280         IF(   ln_abl    .AND.                                                      & 
     281            &    ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR.   & 
     282            &      jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair     )  ) THEN 
     283            ipka = jpka   ! ABL: some fields are 3D input 
     284         ELSE 
     285            ipka = 1 
     286         ENDIF 
     287         ! 
     288         ALLOCATE( sf(jfpr)%fnow(jpi,jpj,ipka) ) 
     289         ! 
     290         IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN    !--  not used field  --!   (only now allocated and set to default) 
     291            IF(     jfpr == jp_slp  ) THEN 
     292               sf(jfpr)%fnow(:,:,1:ipka) = 101325._wp   ! use standard pressure in Pa 
     293            ELSEIF( jfpr == jp_prec .OR. jfpr == jp_snow .OR. jfpr == jp_uoatm .OR. jfpr == jp_voatm ) THEN 
     294               sf(jfpr)%fnow(:,:,1:ipka) = 0._wp        ! no precip or no snow or no surface currents 
     295            ELSEIF( ( jfpr == jp_hpgi .OR. jfpr == jp_hpgj ) .AND. .NOT. ln_abl ) THEN 
     296               DEALLOCATE( sf(jfpr)%fnow )              ! deallocate as not used in this case 
     297            ELSE 
     298               WRITE(ctmp1,*) 'sbc_blk_init: no default value defined for field number', jfpr 
     299               CALL ctl_stop( ctmp1 ) 
     300            ENDIF 
    269301         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 
     302            IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,ipka,2) )   ! allocate array for temporal interpolation 
    279303            ! 
    280304            IF( sf(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * sf(jfpr)%freqh), nn_fsbc * NINT(rn_Dt) ) /= 0 )   & 
     
    327351         WRITE(numout,*) '      factor applied on precipitation (total & snow)      rn_pfac      = ', rn_pfac 
    328352         WRITE(numout,*) '      factor applied on evaporation                       rn_efac      = ', rn_efac 
    329          WRITE(numout,*) '      factor applied on ocean/ice velocity                rn_vfac      = ', rn_vfac 
    330353         WRITE(numout,*) '         (form absolute (=0) to relative winds(=1))' 
    331354         WRITE(numout,*) '      use ice-atm drag from Lupkes2012                    ln_Cd_L12    = ', ln_Cd_L12 
    332355         WRITE(numout,*) '      use ice-atm drag from Lupkes2015                    ln_Cd_L15    = ', ln_Cd_L15 
     356         WRITE(numout,*) '      use surface current feedback on wind stress         ln_crt_fbk   = ', ln_crt_fbk 
     357         IF(ln_crt_fbk) THEN 
     358         WRITE(numout,*) '         Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta' 
     359         WRITE(numout,*) '            Alpha                                         rn_stau_a    = ', rn_stau_a 
     360         WRITE(numout,*) '            Beta                                          rn_stau_b    = ', rn_stau_b 
     361         ENDIF 
    333362         ! 
    334363         WRITE(numout,*) 
     
    429458      !                                            ! compute the surface ocean fluxes using bulk formulea 
    430459      IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    431          CALL blk_oce_1( kt, sf(jp_wndi)%fnow(:,:,1), sf(jp_wndj)%fnow(:,:,1),   &   !   <<= in 
    432             &                sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1),   &   !   <<= in 
    433             &                sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m,       &   !   <<= in 
    434             &                sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1),   &   !   <<= in (wl/cs) 
    435             &                tsk_m, zssq, zcd_du, zsen, zevp )                       !   =>> out 
    436  
    437          CALL blk_oce_2(     sf(jp_tair)%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1),   &   !   <<= in 
    438             &                sf(jp_qlw )%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1),   &   !   <<= in 
    439             &                sf(jp_snow)%fnow(:,:,1), tsk_m,                     &   !   <<= in 
    440             &                zsen, zevp )                                            !   <=> in out 
     460         CALL blk_oce_1( kt, sf(jp_wndi )%fnow(:,:,1), sf(jp_wndj )%fnow(:,:,1),   &   !   <<= in 
     461            &                sf(jp_tair )%fnow(:,:,1), sf(jp_humi )%fnow(:,:,1),   &   !   <<= in 
     462            &                sf(jp_slp  )%fnow(:,:,1), sst_m, ssu_m, ssv_m,        &   !   <<= in 
     463            &                sf(jp_uoatm)%fnow(:,:,1), sf(jp_voatm)%fnow(:,:,1),   &   !   <<= in 
     464            &                sf(jp_qsr  )%fnow(:,:,1), sf(jp_qlw  )%fnow(:,:,1),   &   !   <<= in (wl/cs) 
     465            &                tsk_m, zssq, zcd_du, zsen, zevp )                         !   =>> out 
     466 
     467         CALL blk_oce_2(     sf(jp_tair )%fnow(:,:,1), sf(jp_qsr  )%fnow(:,:,1),   &   !   <<= in 
     468            &                sf(jp_qlw  )%fnow(:,:,1), sf(jp_prec )%fnow(:,:,1),   &   !   <<= in 
     469            &                sf(jp_snow )%fnow(:,:,1), tsk_m,                      &   !   <<= in 
     470            &                zsen, zevp )                                              !   <=> in out 
    441471      ENDIF 
    442472      ! 
     
    470500 
    471501 
    472    SUBROUTINE blk_oce_1( kt, pwndi, pwndj , ptair, phumi, &  ! inp 
    473       &                  pslp , pst   , pu   , pv,        &  ! inp 
    474       &                  pqsr , pqlw  ,                   &  ! inp 
    475       &                  ptsk, pssq , pcd_du, psen , pevp   )  ! out 
     502   SUBROUTINE blk_oce_1( kt, pwndi, pwndj, ptair, phumi,        &  ! inp 
     503      &                      pslp , pst  , pu   , pv,            &  ! inp 
     504      &                      puatm, pvatm, pqsr , pqlw ,         &  ! inp 
     505      &                      ptsk , pssq , pcd_du, psen, pevp   )   ! out 
    476506      !!--------------------------------------------------------------------- 
    477507      !!                     ***  ROUTINE blk_oce_1  *** 
     
    498528      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pu     ! surface current at U-point (i-component) [m/s] 
    499529      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pv     ! surface current at V-point (j-component) [m/s] 
     530      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   puatm  ! surface current seen by the atm at T-point (i-component) [m/s] 
     531      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pvatm  ! surface current seen by the atm at T-point (j-component) [m/s] 
    500532      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pqsr   ! 
    501533      REAL(wp), INTENT(in   ), DIMENSION(:,:) ::   pqlw   ! 
     
    508540      INTEGER  ::   ji, jj               ! dummy loop indices 
    509541      REAL(wp) ::   zztmp                ! local variable 
     542      REAL(wp) ::   zstmax, zstau 
     543#if defined key_cyclone 
    510544      REAL(wp), DIMENSION(jpi,jpj) ::   zwnd_i, zwnd_j    ! wind speed components at T-point 
     545#endif 
     546      REAL(wp), DIMENSION(jpi,jpj) ::   ztau_i, ztau_j    ! wind stress components at T-point 
    511547      REAL(wp), DIMENSION(jpi,jpj) ::   zU_zu             ! bulk wind speed at height zu  [m/s] 
    512548      REAL(wp), DIMENSION(jpi,jpj) ::   ztpot             ! potential temperature of air at z=rn_zqt [K] 
     
    532568      zwnd_j(:,:) = 0._wp 
    533569      CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add analytical tropical cyclone (Vincent et al. JGR 2012) 
    534       DO_2D_00_00 
    535          pwndi(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
    536          pwndj(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     570      DO_2D_11_11 
     571         zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
     572         zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     573         ! ... scalar wind at T-point (not masked) 
     574         wndm(ji,jj) = SQRT( zwnd_i(ji,jj) * zwnd_i(ji,jj) + zwnd_j(ji,jj) * zwnd_j(ji,jj) ) 
     575      END_2D 
     576#else 
     577      ! ... scalar wind module at T-point (not masked) 
     578      DO_2D_11_11 
     579         wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  ) 
    537580      END_2D 
    538581#endif 
    539       DO_2D_00_00 
    540          zwnd_i(ji,jj) = (  pwndi(ji,jj) - rn_vfac * 0.5 * ( pu(ji-1,jj  ) + pu(ji,jj) )  ) 
    541          zwnd_j(ji,jj) = (  pwndj(ji,jj) - rn_vfac * 0.5 * ( pv(ji  ,jj-1) + pv(ji,jj) )  ) 
    542       END_2D 
    543       CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. ) 
    544       ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked) 
    545       wndm(:,:) = SQRT(  zwnd_i(:,:) * zwnd_i(:,:)   & 
    546          &             + zwnd_j(:,:) * zwnd_j(:,:)  ) * tmask(:,:,1) 
    547  
    548582      ! ----------------------------------------------------------------------------- ! 
    549583      !      I   Solar FLUX                                                           ! 
     
    593627         !#LB: because AGRIF hates functions that return something else than a scalar, need to 
    594628         !     use scalar version of gamma_moist() ... 
    595          DO_2D_11_11 
    596             ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 
    597          END_2D 
    598       ENDIF 
    599  
    600  
     629         IF( ln_tpot ) THEN 
     630            DO_2D_11_11 
     631               ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 
     632            END_2D 
     633         ELSE 
     634            ztpot = ptair(:,:) 
     635         ENDIF 
     636      ENDIF 
    601637 
    602638      !! Time to call the user-selected bulk parameterization for 
     
    674710         pevp(:,:) = pevp(:,:) * tmask(:,:,1) 
    675711 
    676          ! Tau i and j component on T-grid points, using array "zcd_oce" as a temporary array... 
    677          zcd_oce = 0._wp 
    678          WHERE ( wndm > 0._wp ) zcd_oce = taum / wndm 
    679          zwnd_i = zcd_oce * zwnd_i 
    680          zwnd_j = zcd_oce * zwnd_j 
    681  
    682          CALL iom_put( "taum_oce", taum )   ! output wind stress module 
     712         DO_2D_11_11 
     713            IF( wndm(ji,jj) > 0._wp ) THEN 
     714               zztmp = taum(ji,jj) / wndm(ji,jj) 
     715#if defined key_cyclone 
     716               ztau_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
     717               ztau_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
     718#else 
     719               ztau_i(ji,jj) = zztmp * pwndi(ji,jj) 
     720               ztau_j(ji,jj) = zztmp * pwndj(ji,jj) 
     721#endif 
     722            ELSE 
     723               ztau_i(ji,jj) = 0._wp 
     724               ztau_j(ji,jj) = 0._wp                  
     725            ENDIF 
     726         END_2D 
     727 
     728         IF( ln_crt_fbk ) THEN   ! aply eq. 10 and 11 of Renault et al. 2020 (doi: 10.1029/2019MS001715) 
     729            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) 
     730            DO_2D_01_01   ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop 
     731               zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax )   ! stau (<0) must be smaller than zstmax 
     732               ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj  ) + pu(ji,jj) ) - puatm(ji,jj) ) 
     733               ztau_j(ji,jj) = ztau_j(ji,jj) + zstau * ( 0.5_wp * ( pv(ji  ,jj-1) + pv(ji,jj) ) - pvatm(ji,jj) ) 
     734               taum(ji,jj) = SQRT( ztau_i(ji,jj) * ztau_i(ji,jj) + ztau_j(ji,jj) * ztau_j(ji,jj) ) 
     735            END_2D 
     736         ENDIF 
    683737 
    684738         ! ... utau, vtau at U- and V_points, resp. 
    685739         !     Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 
    686740         !     Note that coastal wind stress is not used in the code... so this extra care has no effect 
    687          DO_2D_00_00 
    688             utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( zwnd_i(ji,jj) + zwnd_i(ji+1,jj  ) ) & 
    689                &          * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
    690             vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( zwnd_j(ji,jj) + zwnd_j(ji  ,jj+1) ) & 
    691                &          * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
     741         DO_2D_00_00              ! start loop at 2, in case ln_crt_fbk = T 
     742            utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj  ) ) & 
     743               &              * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
     744            vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( ztau_j(ji,jj) + ztau_j(ji  ,jj+1) ) & 
     745               &              * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
    692746         END_2D 
    693          CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 
     747 
     748         IF( ln_crt_fbk ) THEN 
     749            CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1., taum, 'T', -1. ) 
     750         ELSE 
     751            CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 
     752         ENDIF 
     753 
     754         CALL iom_put( "taum_oce", taum )   ! output wind stress module 
    694755 
    695756         IF(sn_cfctl%l_prtctl) THEN 
     
    862923      ! 
    863924      INTEGER  ::   ji, jj    ! dummy loop indices 
    864       REAL(wp) ::   zwndi_t , zwndj_t             ! relative wind components at T-point 
    865925      REAL(wp) ::   zootm_su                      ! sea-ice surface mean temperature 
    866926      REAL(wp) ::   zztmp1, zztmp2                ! temporary arrays 
     
    873933      ! ------------------------------------------------------------ ! 
    874934      ! C-grid ice dynamics :   U & V-points (same as ocean) 
    875       DO_2D_00_00 
    876          zwndi_t = (  pwndi(ji,jj) - rn_vfac * 0.5_wp * ( puice(ji-1,jj  ) + puice(ji,jj) )  ) 
    877          zwndj_t = (  pwndj(ji,jj) - rn_vfac * 0.5_wp * ( pvice(ji  ,jj-1) + pvice(ji,jj) )  ) 
    878          wndm_ice(ji,jj) = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1) 
     935      DO_2D_11_11 
     936         wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 
    879937      END_2D 
    880       CALL lbc_lnk( 'sbcblk', wndm_ice, 'T',  1. ) 
    881938      ! 
    882939      ! Make ice-atm. drag dependent on ice concentration 
     
    898955 
    899956      IF( ln_blk ) THEN 
    900          ! ------------------------------------------------------------- ! 
    901          !    Wind stress relative to the moving ice ( U10m - U_ice )    ! 
    902          ! ------------------------------------------------------------- ! 
    903          zztmp1 = rn_vfac * 0.5_wp 
     957         ! ---------------------------------------------------- ! 
     958         !    Wind stress relative to nonmoving ice ( U10m )    ! 
     959         ! ---------------------------------------------------- ! 
     960         ! supress moving ice in wind stress computation as we don't know how to do it properly... 
    904961         DO_2D_01_01    ! at T point  
    905             putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * ( pwndi(ji,jj) - zztmp1 * ( puice(ji-1,jj  ) + puice(ji,jj) ) ) 
    906             pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * ( pwndj(ji,jj) - zztmp1 * ( pvice(ji  ,jj-1) + pvice(ji,jj) ) ) 
     962            putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndi(ji,jj) 
     963            pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndj(ji,jj) 
    907964         END_2D 
    908965         ! 
     
    914971            pvtaui(ji,jj) = zztmp2 * ( pvtaui(ji,jj) + pvtaui(ji  ,jj+1) ) 
    915972         END_2D 
    916          CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1., pvtaui, 'V', -1. ) 
     973         CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1._wp, pvtaui, 'V', -1._wp ) 
    917974         ! 
    918975         IF(sn_cfctl%l_prtctl)  CALL prt_ctl( tab2d_1=putaui  , clinfo1=' blk_ice: putaui : '   & 
    919976            &                               , tab2d_2=pvtaui  , clinfo2='          pvtaui : ' ) 
    920       ELSE 
     977      ELSE ! ln_abl 
    921978         zztmp1 = 11637800.0_wp 
    922979         zztmp2 =    -5897.8_wp 
     
    13821439         ! 
    13831440      END_2D 
    1384       CALL lbc_lnk_multi( 'sbcblk', pcd, 'T',  1., pch, 'T', 1. ) 
     1441      CALL lbc_lnk_multi( 'sbcblk', pcd, 'T',  1.0_wp, pch, 'T', 1.0_wp ) 
    13851442      ! 
    13861443   END SUBROUTINE Cdn10_Lupkes2015 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcblk_phy.F90

    r12895 r13258  
    640640      !!                           ***  FUNCTION alpha_sw_vctr  *** 
    641641      !! 
    642       !! ** Purpose : ROUGH estimate of the thermal expansion coefficient of sea-water at the surface (P =~ 1010 hpa) 
     642      !! ** Purpose : ROUGH estimate of the thermal expansion coefficient of sea-water at the surface (i.e. P =~ 101000 Pa) 
    643643      !! 
    644644      !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 
     
    654654      !!                           ***  FUNCTION alpha_sw_sclr  *** 
    655655      !! 
    656       !! ** Purpose : ROUGH estimate of the thermal expansion coefficient of sea-water at the surface (P =~ 1010 hpa) 
     656      !! ** Purpose : ROUGH estimate of the thermal expansion coefficient of sea-water at the surface (i.e. P =~ 101000 Pa) 
    657657      !! 
    658658      !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbccpl.F90

    r13103 r13258  
    199199   !! Substitution 
    200200#  include "do_loop_substitute.h90" 
     201#  include "domzgr_substitute.h90" 
    201202   !!---------------------------------------------------------------------- 
    202203   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    11731174                  frcv(jpr_oty1)%z3(ji,jj,1) = 0.5 * ( frcv(jpr_oty1)%z3(ji  ,jj+1,1) + frcv(jpr_oty1)%z3(ji,jj,1) ) 
    11741175               END_2D 
    1175                CALL lbc_lnk_multi( 'sbccpl', frcv(jpr_otx1)%z3(:,:,1), 'U',  -1., frcv(jpr_oty1)%z3(:,:,1), 'V',  -1. ) 
     1176               CALL lbc_lnk_multi( 'sbccpl', frcv(jpr_otx1)%z3(:,:,1), 'U',  -1.0_wp, frcv(jpr_oty1)%z3(:,:,1), 'V',  -1.0_wp ) 
    11761177            ENDIF 
    11771178            llnewtx = .TRUE. 
     
    11981199               frcv(jpr_taum)%z3(ji,jj,1) = 0.5 * SQRT( zzx * zzx + zzy * zzy ) 
    11991200            END_2D 
    1200             CALL lbc_lnk( 'sbccpl', frcv(jpr_taum)%z3(:,:,1), 'T', 1. ) 
     1201            CALL lbc_lnk( 'sbccpl', frcv(jpr_taum)%z3(:,:,1), 'T', 1.0_wp ) 
    12011202            llnewtau = .TRUE. 
    12021203         ELSE 
     
    23752376                  zity1(ji,jj) = 0.5 * ( v_ice(ji,jj  )     + v_ice(ji  ,jj-1  )     ) *  fr_i(ji,jj) 
    23762377               END_2D 
    2377                CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1., zity1, 'T', -1. ) 
     2378               CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.0_wp, zity1, 'T', -1.0_wp ) 
    23782379            CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T 
    23792380               DO_2D_00_00 
     
    23842385               END_2D 
    23852386            END SELECT 
    2386             CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocx1)%clgrid, -1.,  zoty1, ssnd(jps_ocy1)%clgrid, -1. ) 
     2387            CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocx1)%clgrid, -1.0_wp,  zoty1, ssnd(jps_ocy1)%clgrid, -1.0_wp ) 
    23872388            ! 
    23882389         ENDIF 
     
    24522453                zity1(ji,jj) = 0.5 * ( v_ice(ji,jj  ) + v_ice(ji  ,jj-1  ) ) *  fr_i(ji,jj)  
    24532454             END_2D 
    2454              CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.,  zity1, 'T', -1. )  
     2455             CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.0_wp,  zity1, 'T', -1.0_wp )  
    24552456          CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T   
    24562457             DO_2D_00_00 
     
    24612462             END_2D 
    24622463          END SELECT 
    2463          CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocxw)%clgrid, -1., zoty1, ssnd(jps_ocyw)%clgrid, -1. )  
     2464         CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocxw)%clgrid, -1.0_wp, zoty1, ssnd(jps_ocyw)%clgrid, -1.0_wp )  
    24642465         !  
    24652466         !  
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcflx.F90

    r12377 r13258  
    151151         END_2D 
    152152         taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1) 
    153          CALL lbc_lnk( 'sbcflx', taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( 'sbcflx', wndm(:,:), 'T', 1. ) 
     153         CALL lbc_lnk( 'sbcflx', taum(:,:), 'T', 1.0_wp )   ;   CALL lbc_lnk( 'sbcflx', wndm(:,:), 'T', 1.0_wp ) 
    154154 
    155155         IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcfwb.F90

    r12489 r13258  
    7171      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      - 
    7272      REAL(wp)   ,DIMENSION(1) ::   z_fwfprv   
    73       COMPLEX(wp),DIMENSION(1) ::   y_fwfnow   
     73      COMPLEX(dp),DIMENSION(1) ::   y_fwfnow   
    7474      !!---------------------------------------------------------------------- 
    7575      ! 
     
    180180            ! 
    181181!!gm   ===>>>>  lbc_lnk should be useless as all the computation is done over the whole domain ! 
    182             CALL lbc_lnk( 'sbcfwb', zerp_cor, 'T', 1. ) 
     182            CALL lbc_lnk( 'sbcfwb', zerp_cor, 'T', 1.0_wp ) 
    183183            ! 
    184184            emp(:,:) = emp(:,:) + zerp_cor(:,:) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcice_cice.F90

    r12489 r13258  
    1212   USE oce             ! ocean dynamics and tracers 
    1313   USE dom_oce         ! ocean space and time domain 
     14# if ! defined key_qco 
    1415   USE domvvl 
     16# else 
     17   USE domqco 
     18# endif 
    1519   USE phycst, only : rcp, rho0, r1_rho0, rhos, rhoi 
    1620   USE in_out_manager  ! I/O manager 
     
    218222      END_2D 
    219223 
    220       CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1.,  fr_iv , 'V', 1. ) 
     224      CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1.0_wp,  fr_iv , 'V', 1.0_wp ) 
    221225 
    222226      ! set the snow+ice mass 
     
    233237!!gm This should be put elsewhere....   (same remark for limsbc) 
    234238!!gm especially here it is assumed zstar coordinate, but it can be ztilde.... 
     239#if defined key_qco 
     240            IF( .NOT.ln_linssh )   CALL dom_qco_zgr( Kbb, Kmm, Kaa )   ! interpolation scale factor, depth and water column 
     241#else 
    235242            IF( .NOT.ln_linssh ) THEN 
    236243               ! 
    237244               DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    238                   e3t(:,:,jk,Kmm) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kmm)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    239                   e3t(:,:,jk,Kbb) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kbb)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     245                  e3t(:,:,jk,Kmm) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kmm)*r1_ht_0(:,:)*tmask(:,:,jk) ) 
     246                  e3t(:,:,jk,Kbb) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kbb)*r1_ht_0(:,:)*tmask(:,:,jk) ) 
    240247               ENDDO 
    241248               e3t(:,:,:,Krhs) = e3t(:,:,:,Kbb) 
     
    267274               END DO 
    268275            ENDIF 
     276#endif 
    269277         ENDIF 
    270278      ENDIF 
     
    498506         ss_iou(ji,jj) = 0.5 * ( ztmp1(ji,jj-1) + ztmp1(ji,jj) ) * umask(ji,jj,1) 
    499507      END_2D 
    500       CALL lbc_lnk( 'sbcice_cice', ss_iou , 'U', -1. ) 
     508      CALL lbc_lnk( 'sbcice_cice', ss_iou , 'U', -1.0_wp ) 
    501509 
    502510! y comp of ocean-ice stress  
     
    508516         ss_iov(ji,jj) = 0.5 * ( ztmp1(ji-1,jj) + ztmp1(ji,jj) ) * vmask(ji,jj,1) 
    509517      END_2D 
    510       CALL lbc_lnk( 'sbcice_cice', ss_iov , 'V', -1. ) 
     518      CALL lbc_lnk( 'sbcice_cice', ss_iov , 'V', -1.0_wp ) 
    511519 
    512520! x and y comps of surface stress 
     
    561569      fmmflx(:,:) = ztmp1(:,:) !!Joakim edit 
    562570       
    563       CALL lbc_lnk_multi( 'sbcice_cice', emp , 'T', 1., sfx , 'T', 1. ) 
     571      CALL lbc_lnk_multi( 'sbcice_cice', emp , 'T', 1.0_wp, sfx , 'T', 1.0_wp ) 
    564572 
    565573! Solar penetrative radiation and non solar surface heat flux 
     
    587595#endif 
    588596      qsr(:,:)=qsr(:,:)+ztmp1(:,:) 
    589       CALL lbc_lnk( 'sbcice_cice', qsr , 'T', 1. ) 
     597      CALL lbc_lnk( 'sbcice_cice', qsr , 'T', 1.0_wp ) 
    590598 
    591599      DO_2D_11_11 
     
    600608      qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 
    601609 
    602       CALL lbc_lnk( 'sbcice_cice', qns , 'T', 1. ) 
     610      CALL lbc_lnk( 'sbcice_cice', qns , 'T', 1.0_wp ) 
    603611 
    604612! Prepare for the following CICE time-step 
     
    618626      END_2D 
    619627 
    620       CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1., fr_iv , 'V', 1. ) 
     628      CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1.0_wp, fr_iv , 'V', 1.0_wp ) 
    621629 
    622630      ! set the snow+ice mass 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcmod.F90

    r13058 r13258  
    461461         ! A lbc_lnk is therefore needed to ensure reproducibility and restartability. 
    462462         ! see ticket #2113 for discussion about this lbc_lnk. 
    463          IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) ! ensure restartability with icebergs 
     463         IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) ! ensure restartability with icebergs 
    464464      ENDIF 
    465465 
     
    476476!!$!RBbug do not understand why see ticket 667 
    477477!!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why. 
    478 !!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) 
     478!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) 
    479479      IF( ll_wd ) THEN     ! If near WAD point limit the flux for now 
    480480         zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999  
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcrnf.F90

    r12489 r13258  
    7272   !! * Substitutions 
    7373#  include "do_loop_substitute.h90" 
     74#  include "domzgr_substitute.h90" 
    7475   !!---------------------------------------------------------------------- 
    7576   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcssm.F90

    r12377 r13258  
    3232   LOGICAL, SAVE ::   l_ssm_mean = .FALSE.   ! keep track of whether means have been read from restart file 
    3333    
     34#  include "domzgr_substitute.h90" 
    3435   !!---------------------------------------------------------------------- 
    3536   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcssr.F90

    r12377 r13258  
    131131                     &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )   & 
    132132                     &        / MAX(  sss_m(ji,jj), 1.e-20   ) * tmask(ji,jj,1) 
    133                   IF( ln_sssr_bnd )   zerp = SIGN( 1., zerp ) * MIN( zerp_bnd, ABS(zerp) ) 
     133                  IF( ln_sssr_bnd )   zerp = SIGN( 1.0_wp, zerp ) * MIN( zerp_bnd, ABS(zerp) ) 
    134134                  emp(ji,jj) = emp (ji,jj) + zerp 
    135135                  qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj) 
  • NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/OCE/SBC/sbcwave.F90

    r12965 r13258  
    7373   !! * Substitutions 
    7474#  include "do_loop_substitute.h90" 
     75#  include "domzgr_substitute.h90" 
    7576   !!---------------------------------------------------------------------- 
    7677   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    198199      ENDIF 
    199200 
    200       CALL lbc_lnk_multi( 'sbcwave', usd, 'U', -1., vsd, 'V', -1. ) 
     201      CALL lbc_lnk_multi( 'sbcwave', usd, 'U', -1.0_wp, vsd, 'V', -1.0_wp ) 
    201202 
    202203      ! 
     
    207208            &                 - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * usd(ji-1,jj,jk)    & 
    208209            &                 + e1v(ji,jj  ) * e3v(ji,jj  ,jk,Kmm) * vsd(ji,jj  ,jk)    & 
    209             &                 - e1v(ji,jj-1) * e3v(ji,jj-1,jk,Kmm) * vsd(ji,jj-1,jk)  ) * r1_e1e2t(ji,jj) 
     210            &                 - e1v(ji,jj-1) * e3v(ji,jj-1,jk,Kmm) * vsd(ji,jj-1,jk)  ) & 
     211            &                * r1_e1e2t(ji,jj) 
    210212      END_3D 
    211213      ! 
    212       CALL lbc_lnk( 'sbcwave', ze3divh, 'T', 1. ) 
     214      CALL lbc_lnk( 'sbcwave', ze3divh, 'T', 1.0_wp ) 
    213215      ! 
    214216      IF( ln_linssh ) THEN   ;   ik = 1   ! none zero velocity through the sea surface 
     
    269271            taum(ji,jj) = SQRT( tauw_x(ji,jj)*tauw_x(ji,jj) + tauw_y(ji,jj)*tauw_y(ji,jj) ) 
    270272         END_2D 
    271          CALL lbc_lnk_multi( 'sbcwave', utau(:,:), 'U', -1. , vtau(:,:), 'V', -1. , taum(:,:) , 'T', -1. ) 
     273         CALL lbc_lnk_multi( 'sbcwave', utau(:,:), 'U', -1.0_wp , vtau(:,:), 'V', -1.0_wp , taum(:,:) , 'T', -1.0_wp ) 
    272274      ENDIF 
    273275      ! 
Note: See TracChangeset for help on using the changeset viewer.