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 12377 for NEMO/trunk/src/OCE/SBC/sbc_oce.F90 – NEMO

Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (4 years ago)
Author:
acc
Message:

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • 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_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/src/OCE/SBC/sbc_oce.F90

    r12132 r12377  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  sbc_oce  *** 
    4    !! Surface module :   variables defined in core memory  
     4   !! Surface module :   variables defined in core memory 
    55   !!====================================================================== 
    66   !! History :  3.0  ! 2006-06  (G. Madec)  Original code 
     
    99   !!             -   ! 2010-11  (G. Madec) ice-ocean stress always computed at each ocean time-step 
    1010   !!            3.3  ! 2010-10  (J. Chanut, C. Bricaud)  add the surface pressure forcing 
    11    !!            4.0  ! 2012-05  (C. Rousset) add attenuation coef for use in ice model  
     11   !!            4.0  ! 2012-05  (C. Rousset) add attenuation coef for use in ice model 
    1212   !!            4.0  ! 2016-06  (L. Brodeau) new unified bulk routine (based on AeroBulk) 
     13   !!            4.0  ! 2019-03  (F. Lemarié, G. Samson) add compatibility with ABL mode 
    1314   !!---------------------------------------------------------------------- 
    1415 
     
    2627   PUBLIC   sbc_oce_alloc   ! routine called in sbcmod.F90 
    2728   PUBLIC   sbc_tau2wnd     ! routine called in several sbc modules 
    28     
     29 
    2930   !!---------------------------------------------------------------------- 
    3031   !!           Namelist for the Ocean Surface Boundary Condition 
     
    3435   LOGICAL , PUBLIC ::   ln_flx         !: flux      formulation 
    3536   LOGICAL , PUBLIC ::   ln_blk         !: bulk formulation 
     37   LOGICAL , PUBLIC ::   ln_abl         !: Atmospheric boundary layer model 
    3638#if defined key_oasis3 
    3739   LOGICAL , PUBLIC ::   lk_oasis = .TRUE.  !: OASIS used 
     
    4345   LOGICAL , PUBLIC ::   ln_dm2dc       !: Daily mean to Diurnal Cycle short wave (qsr) 
    4446   LOGICAL , PUBLIC ::   ln_rnf         !: runoffs / runoff mouths 
    45    LOGICAL , PUBLIC ::   ln_isf         !: ice shelf melting 
    46    LOGICAL , PUBLIC ::   ln_ssr         !: Sea Surface restoring on SST and/or SSS       
     47   LOGICAL , PUBLIC ::   ln_ssr         !: Sea Surface restoring on SST and/or SSS 
    4748   LOGICAL , PUBLIC ::   ln_apr_dyn     !: Atmospheric pressure forcing used on dynamics (ocean & ice) 
    4849   INTEGER , PUBLIC ::   nn_ice         !: flag for ice in the surface boundary condition (=0/1/2/3) 
     
    5051   !                                             !: =F levitating ice (no presure effect) with mass and salt exchanges 
    5152   !                                             !: =T embedded sea-ice (pressure effect + mass and salt exchanges) 
    52    INTEGER , PUBLIC ::   nn_components  !: flag for sbc module (including sea-ice) coupling mode (see component definition below)  
    53    INTEGER , PUBLIC ::   nn_fwb         !: FreshWater Budget:  
    54    !                                             !:  = 0 unchecked  
     53   INTEGER , PUBLIC ::   nn_components  !: flag for sbc module (including sea-ice) coupling mode (see component definition below) 
     54   INTEGER , PUBLIC ::   nn_fwb         !: FreshWater Budget: 
     55   !                                             !:  = 0 unchecked 
    5556   !                                             !:  = 1 global mean of e-p-r set to zero at each nn_fsbc time step 
    5657   !                                             !:  = 2 annual global mean of e-p-r set to zero 
     
    7778   INTEGER , PUBLIC, PARAMETER ::   jp_flx     = 2        !: flux                          formulation 
    7879   INTEGER , PUBLIC, PARAMETER ::   jp_blk     = 3        !: bulk                          formulation 
    79    INTEGER , PUBLIC, PARAMETER ::   jp_purecpl = 4        !: Pure ocean-atmosphere Coupled formulation 
    80    INTEGER , PUBLIC, PARAMETER ::   jp_none    = 5        !: for OPA when doing coupling via SAS module 
    81     
    82    !!---------------------------------------------------------------------- 
    83    !!           Stokes drift parametrization definition  
     80   INTEGER , PUBLIC, PARAMETER ::   jp_abl     = 4        !: Atmospheric boundary layer    formulation 
     81   INTEGER , PUBLIC, PARAMETER ::   jp_purecpl = 5        !: Pure ocean-atmosphere Coupled formulation 
     82   INTEGER , PUBLIC, PARAMETER ::   jp_none    = 6        !: for OPA when doing coupling via SAS module 
     83 
     84   !!---------------------------------------------------------------------- 
     85   !!           Stokes drift parametrization definition 
    8486   !!---------------------------------------------------------------------- 
    8587   INTEGER , PUBLIC, PARAMETER ::   jp_breivik_2014 = 0     !: Breivik  2014: v_z=v_0*[exp(2*k*z)/(1-8*k*z)] 
    86    INTEGER , PUBLIC, PARAMETER ::   jp_li_2017      = 1     !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016)  
    87                                                             !  with depth averaged profile 
    88    INTEGER , PUBLIC, PARAMETER ::   jp_peakfr       = 2     !: Li et al 2017: using the peak wave number read from wave model instead  
    89                                                             !  of the inverse depth scale 
     88   INTEGER , PUBLIC, PARAMETER ::   jp_li_2017      = 1     !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016) 
     89   !  with depth averaged profile 
     90   INTEGER , PUBLIC, PARAMETER ::   jp_peakfr       = 2     !: Li et al 2017: using the peak wave number read from wave model instead 
     91   !  of the inverse depth scale 
    9092   LOGICAL , PUBLIC            ::   ll_st_bv2014  = .FALSE. !  logical indicator, .true. if Breivik 2014 parameterisation is active. 
    9193   LOGICAL , PUBLIC            ::   ll_st_li2017  = .FALSE. !  logical indicator, .true. if Li 2017 parameterisation is active. 
     
    9698   !!           component definition 
    9799   !!---------------------------------------------------------------------- 
    98    INTEGER , PUBLIC, PARAMETER ::   jp_iam_nemo = 0      !: Initial single executable configuration  
    99                                                          !  (no internal OASIS coupling) 
     100   INTEGER , PUBLIC, PARAMETER ::   jp_iam_nemo = 0      !: Initial single executable configuration 
     101   !  (no internal OASIS coupling) 
    100102   INTEGER , PUBLIC, PARAMETER ::   jp_iam_opa  = 1      !: Multi executable configuration - OPA component 
    101                                                          !  (internal OASIS coupling) 
     103   !  (internal OASIS coupling) 
    102104   INTEGER , PUBLIC, PARAMETER ::   jp_iam_sas  = 2      !: Multi executable configuration - SAS component 
    103                                                          !  (internal OASIS coupling) 
     105   !  (internal OASIS coupling) 
    104106   !!---------------------------------------------------------------------- 
    105107   !!              Ocean Surface Boundary Condition fields 
     
    107109   INTEGER , PUBLIC ::  ncpl_qsr_freq = 0        !: qsr coupling frequency per days from atmosphere (used by top) 
    108110   ! 
    109    LOGICAL , PUBLIC ::   lhftau = .FALSE.        !: HF tau used in TKE: mean(stress module) - module(mean stress) 
    110111   !!                                   !!   now    ! before   !! 
    111112   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau   , utau_b   !: sea surface i-stress (ocean referential)     [N/m2] 
    112113   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vtau   , vtau_b   !: sea surface j-stress (ocean referential)     [N/m2] 
    113    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   taum              !: module of sea surface stress (at T-point)    [N/m2]  
    114    !! wndm is used onmpute surface gases exchanges in ice-free ocean or leads 
     114   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   taum              !: module of sea surface stress (at T-point)    [N/m2] 
     115   !! wndm is used compute surface gases exchanges in ice-free ocean or leads 
    115116   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wndm              !: wind speed module at T-point (=|U10m-Uoce|)  [m/s] 
     117   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rhoa              !: air density at "rn_zu" m above the sea       [kg/m3] 
    116118   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr               !: sea heat flux:     solar                     [W/m2] 
    117119   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qns    , qns_b    !: sea heat flux: non solar                     [W/m2] 
     
    122124   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp_tot           !: total E-P over ocean and ice                 [Kg/m2/s] 
    123125   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fmmflx            !: freshwater budget: freezing/melting          [Kg/m2/s] 
    124    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff        [Kg/m2/s]   
    125    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwfisf , fwfisf_b !: ice shelf melting   [Kg/m2/s]   
    126    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwficb , fwficb_b !: iceberg melting [Kg/m2/s]   
    127  
     126   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff                                 [Kg/m2/s] 
     127   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwficb , fwficb_b !: iceberg melting                              [Kg/m2/s] 
    128128   !! 
    129129   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  sbc_tsc, sbc_tsc_b  !: sbc content trend                      [K.m/s] jpi,jpj,jpts 
     
    137137   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xcplmask          !: coupling mask for ln_mixcpl (warning: allocated in sbccpl) 
    138138 
     139   !!--------------------------------------------------------------------- 
     140   !! ABL Vertical Domain size 
     141   !!--------------------------------------------------------------------- 
     142   INTEGER , PUBLIC            ::   jpka   = 2     !: ABL number of vertical levels (default definition) 
     143   INTEGER , PUBLIC            ::   jpkam1 = 1     !: jpka-1 
     144   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   ght_abl, ghw_abl          !: ABL geopotential height (needed for iom) 
     145   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   e3t_abl, e3w_abl          !: ABL vertical scale factors (needed for iom) 
     146 
    139147   !!---------------------------------------------------------------------- 
    140148   !!                     Sea Surface Mean fields 
     
    146154   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sss_m     !: mean (nn_fsbc time-step) surface sea salinity            [psu] 
    147155   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssh_m     !: mean (nn_fsbc time-step) sea surface height                [m] 
     156   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tsk_m     !: mean (nn_fsbc time-step) SKIN surface sea temp.      [Celsius] 
    148157   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e3t_m     !: mean (nn_fsbc time-step) sea surface layer thickness       [m] 
    149158   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   frq_m     !: mean (nn_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level [-] 
    150159 
    151160   !! * Substitutions 
    152 #  include "vectopt_loop_substitute.h90" 
     161#  include "do_loop_substitute.h90" 
    153162   !!---------------------------------------------------------------------- 
    154163   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    167176      ! 
    168177      ALLOCATE( utau(jpi,jpj) , utau_b(jpi,jpj) , taum(jpi,jpj) ,     & 
    169          &      vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , STAT=ierr(1) )  
    170          ! 
     178         &      vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , rhoa(jpi,jpj) , STAT=ierr(1) ) 
     179      ! 
    171180      ALLOCATE( qns_tot(jpi,jpj) , qns  (jpi,jpj) , qns_b(jpi,jpj),        & 
    172181         &      qsr_tot(jpi,jpj) , qsr  (jpi,jpj) ,                        & 
    173182         &      emp    (jpi,jpj) , emp_b(jpi,jpj) ,                        & 
    174183         &      sfx    (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 
    175          ! 
    176       ALLOCATE( fwfisf  (jpi,jpj), rnf  (jpi,jpj) , sbc_tsc  (jpi,jpj,jpts) , qsr_hc  (jpi,jpj,jpk) ,  & 
    177          &      fwfisf_b(jpi,jpj), rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) ,  & 
     184      ! 
     185      ALLOCATE( rnf  (jpi,jpj) , sbc_tsc  (jpi,jpj,jpts) , qsr_hc  (jpi,jpj,jpk) ,  & 
     186         &      rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) ,  & 
    178187         &      fwficb  (jpi,jpj), fwficb_b(jpi,jpj), STAT=ierr(3) ) 
    179          ! 
     188      ! 
    180189      ALLOCATE( tprecip(jpi,jpj) , sprecip(jpi,jpj) , fr_i(jpi,jpj) ,     & 
    181          &      atm_co2(jpi,jpj) ,                                        & 
     190         &      atm_co2(jpi,jpj) , tsk_m(jpi,jpj) ,                       & 
    182191         &      ssu_m  (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) ,      & 
    183192         &      ssv_m  (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) ) 
    184          ! 
     193      ! 
    185194      ALLOCATE( e3t_m(jpi,jpj) , STAT=ierr(5) ) 
    186          ! 
     195      ! 
    187196      sbc_oce_alloc = MAXVAL( ierr ) 
    188197      CALL mpp_sum ( 'sbc_oce', sbc_oce_alloc ) 
     
    195204      !!--------------------------------------------------------------------- 
    196205      !!                    ***  ROUTINE sbc_tau2wnd  *** 
    197       !!                    
    198       !! ** Purpose : Estimation of wind speed as a function of wind stress    
     206      !! 
     207      !! ** Purpose : Estimation of wind speed as a function of wind stress 
    199208      !! 
    200209      !! ** Method  : |tau|=rhoa*Cd*|U|^2 
     
    207216      INTEGER  ::   ji, jj                ! dummy indices 
    208217      !!--------------------------------------------------------------------- 
    209       zcoef = 0.5 / ( zrhoa * zcdrag )  
    210       DO jj = 2, jpjm1 
    211          DO ji = fs_2, fs_jpim1   ! vect. opt. 
    212             ztx = utau(ji-1,jj  ) + utau(ji,jj)  
    213             zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
    214             ztau = SQRT( ztx * ztx + zty * zty ) 
    215             wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) 
    216          END DO 
    217       END DO 
     218      zcoef = 0.5 / ( zrhoa * zcdrag ) 
     219      DO_2D_00_00 
     220         ztx = utau(ji-1,jj  ) + utau(ji,jj) 
     221         zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
     222         ztau = SQRT( ztx * ztx + zty * zty ) 
     223         wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) 
     224      END_2D 
    218225      CALL lbc_lnk( 'sbc_oce', wndm(:,:) , 'T', 1. ) 
    219226      ! 
Note: See TracChangeset for help on using the changeset viewer.