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 8930 – NEMO

Changeset 8930


Ignore:
Timestamp:
2017-12-06T18:17:10+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_CNRS_2017. Merge in NOC-originated OSMOSIS additions from dev_r7881_ENHANCE09_RK3. SETTE tested successfully apart from WISOMIP_ST (expected) and WORCA2AGR_ST (which differs only after 115 timesteps and seems to be a local issue)

Location:
branches/2017/dev_CNRS_2017
Files:
2 added
25 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_CNRS_2017/DOC/Namelists/namzdf

    r8882 r8930  
    77   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    88   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     9   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    910   ! 
    1011   !                       ! convection 
  • branches/2017/dev_CNRS_2017/DOC/TexFiles/Chapters/Chap_ZDF.tex

    r6997 r8930  
    612612Examples of performance of the 4 turbulent closure scheme can be found in \citet{Warner_al_OM05}. 
    613613 
     614% ------------------------------------------------------------------------------------------------------------- 
     615%        OSM OSMOSIS BL Scheme  
     616% ------------------------------------------------------------------------------------------------------------- 
     617\subsection{OSM OSMOSIS Boundary Layer scheme (\key{zdfosm})} 
     618\label{ZDF_osm} 
     619 
     620%--------------------------------------------namzdf_osm--------------------------------------------------------- 
     621\namdisplay{namzdf_osm} 
     622%-------------------------------------------------------------------------------------------------------------- 
     623 
     624The OSMOSIS turbulent closure scheme is based on......   TBC 
    614625 
    615626% ================================================================ 
     
    734745%       Turbulent Closure Scheme  
    735746% ------------------------------------------------------------------------------------------------------------- 
    736 \subsection{Turbulent Closure Scheme (\key{zdftke} or \key{zdfgls})} 
     747\subsection{Turbulent Closure Scheme (\key{zdftke}, \key{zdfgls} or \key{zdfosm})} 
    737748\label{ZDF_tcs} 
    738749 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg

    r8882 r8930  
    324324   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    325325   ln_zdfgls   = .true.       !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     326   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    326327   ! 
    327328   !                       ! convection 
     
    362363/ 
    363364!----------------------------------------------------------------------- 
     365&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T) 
     366!----------------------------------------------------------------------- 
     367/ 
     368!----------------------------------------------------------------------- 
    364369&namzdf_iwm    !   internal wave-driven mixing parameterization         (ln_zdfiwm =T) 
    365370!----------------------------------------------------------------------- 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg

    r8882 r8930  
    214214   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    215215   ln_zdfgls   = .true.       !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     216   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    216217   ! 
    217218   !                       ! convection 
     
    250251/ 
    251252!----------------------------------------------------------------------- 
     253&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T) 
     254!----------------------------------------------------------------------- 
     255/ 
     256!----------------------------------------------------------------------- 
    252257&namzdf_iwm    !    internal wave-driven mixing parameterization        (ln_zdfiwm =T) 
    253258!----------------------------------------------------------------------- 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg

    r8882 r8930  
    249249   ln_zdftke   = .true.       !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    250250   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     251   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    251252   ! 
    252253   !                       ! convection 
     
    286287/ 
    287288!----------------------------------------------------------------------- 
     289&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T) 
     290!----------------------------------------------------------------------- 
     291/ 
     292!----------------------------------------------------------------------- 
    288293&namzdf_iwm    !    internal wave-driven mixing parameterization        (ln_zdfiwm =T) 
    289294!----------------------------------------------------------------------- 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg

    r8882 r8930  
    206206   ln_zdftke   = .true.       !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    207207   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     208   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    208209   ! 
    209210   !                       ! convection 
     
    241242/ 
    242243!----------------------------------------------------------------------- 
     244&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T) 
     245!----------------------------------------------------------------------- 
     246/ 
     247!----------------------------------------------------------------------- 
    243248&namzdf_ddm    !   double diffusive mixing parameterization             (ln_zdfddm=T) 
    244249!----------------------------------------------------------------------- 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg

    r8882 r8930  
    255255   ln_zdftke   = .true.       !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    256256   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     257   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    257258   ! 
    258259   !                       ! convection 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml

    r8884 r8930  
    182182      </field_group> 
    183183 
     184      <!-- OSMOSIS variables (available with ln_zdfosm=.true.) --> 
     185 
     186      <field_group id="OSMOSIS_T" grid_ref="grid_T_2D"> 
     187         <field id="zwth0"               long_name="surface non-local temperature flux"       unit="deg m/s" /> 
     188         <field id="zws0"                long_name="surface non-local salinity flux"          unit="psu m/s" /> 
     189         <field id="hbl"                 long_name="boundary layer depth"                     unit="m"       /> 
     190         <field id="hbli"                long_name="initial boundary layer depth"             unit="m"       /> 
     191         <field id="dstokes"             long_name="stokes drift  depth scale"                unit="m"       /> 
     192         <field id="zustke"              long_name="magnitude of stokes drift  at T-points"   unit="m/s"     /> 
     193         <field id="zwstrc"              long_name="convective velocity scale"                unit="m/s"     /> 
     194         <field id="zwstrl"              long_name="langmuir velocity scale"                  unit="m/s"     /> 
     195         <field id="zustar"              long_name="friction velocity"                        unit="m/s"     /> 
     196         <field id="zhbl"                long_name="boundary layer depth"                     unit="m"       /> 
     197         <field id="zhml"                long_name="mixed layer depth"                        unit="m"       /> 
     198         <field id="wind_wave_abs_power" long_name="\rho |U_s| x u*^2"                        unit="mW"      /> 
     199         <field id="wind_wave_power"     long_name="U_s \dot  tau"                            unit="mW"      /> 
     200         <field id="wind_power"          long_name="\rho  u*^3"                               unit="mW"      /> 
     201 
     202         <!-- extra OSMOSIS diagnostics --> 
     203         <field id="zwthav"              long_name="av turb flux of T in ml"                  unit="deg m/s" /> 
     204         <field id="zt_ml"               long_name="av T in ml"                               unit="deg"     /> 
     205         <field id="zwth_ent"            long_name="entrainment turb flux of T"               unit="deg m/s" /> 
     206         <field id="zhol"                long_name="Hoenekker number"                         unit="#"       /> 
     207         <field id="zdh"                 long_name="Pycnocline  depth - grid"                 unit=" m"      /> 
     208      </field_group> 
     209 
     210      <field_group id="OSMOSIS_W" grid_ref="grid_W_3D" operation="instant" > 
     211         <field id="ghamt"       long_name="non-local temperature flux"                       unit="deg m/s" /> 
     212         <field id="ghams"       long_name="non-local salinity flux"                          unit="psu m/s" /> 
     213         <field id="zdtdz_pyc"   long_name="Pycnocline temperature gradient"                  unit=" deg/m"  /> 
     214      </field_group> 
     215 
     216      <field_group id="OSMOSIS_U" grid_ref="grid_U_2D" > 
     217         <field id="ghamu"       long_name="non-local u-momentum flux"   grid_ref="grid_U_3D" unit="m^2/s^2" /> 
     218         <field id="us_x"        long_name="i component of Stokes drift"                      unit="m/s"     /> 
     219      </field_group> 
     220 
     221      <field_group id="OSMOSIS_V" grid_ref="grid_V_2D" > 
     222         <field id="ghamv"       long_name="non-local v-momentum flux"   grid_ref="grid_V_3D" unit="m^2/s^2" /> 
     223         <field id="us_y"        long_name="j component of Stokes drift"                      unit="m/s"     /> 
     224      </field_group> 
     225       
    184226      <!-- SBC --> 
    185        
     227 
    186228      <field_group id="SBC" grid_ref="grid_T_2D" > <!-- time step automaticaly defined based on nn_fsbc --> 
    187229         <field id="empmr"        long_name="Net Upward Water Flux"                standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   /> 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/SHARED/namelist_ref

    r8881 r8930  
    875875   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    876876   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     877   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    877878   ! 
    878879   !                       ! convection 
     
    957958   nn_stab_func  =     2   !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB) 
    958959   nn_clos       =     1   !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen) 
     960/ 
     961!----------------------------------------------------------------------- 
     962&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T) 
     963!----------------------------------------------------------------------- 
     964   ln_use_osm_la = .false.      !  Use namelist  rn_osm_la 
     965   rn_osm_la     = 0.3         !  Turbulent Langmuir number 
     966   rn_osm_dstokes     = 5.     !  Depth scale of Stokes drift (m) 
     967   nn_ave = 0                  ! choice of horizontal averaging on avt, avmu, avmv 
     968   ln_dia_osm = .true.         ! output OSMOSIS-OBL variables 
     969   rn_osm_hbl0 = 10.           ! initial hbl value 
     970   ln_kpprimix = .true.        ! Use KPP-style Ri# mixing below BL 
     971   rn_riinfty  = 0.7           ! Highest local Ri_g permitting shear instability 
     972   rn_difri  =  0.005          ! max Ri# diffusivity at Ri_g = 0 (m^2/s) 
     973   ln_convmix  = .true.        ! Use convective instability mixing below BL 
     974   rn_difconv = 1.             ! diffusivity when unstable below BL  (m2/s) 
     975   nn_osm_wave = 0             ! Method used to calculate Stokes drift 
     976                               !  = 2: Use ECMWF wave fields 
     977                               !  = 1: Pierson Moskowitz wave spectrum 
     978                               !  = 0: Constant La# = 0.3 
    959979/ 
    960980!----------------------------------------------------------------------- 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/EXP00/namelist_cfg

    r8882 r8930  
    338338   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    339339   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     340   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    340341   ! 
    341342   !                       ! convection 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT2_flux_ubs_cfg

    r8882 r8930  
    212212   ln_zdftke   = .false.      !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    213213   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     214   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    214215   !    
    215216   !                       ! convection 
  • branches/2017/dev_CNRS_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/EXP00/namelist_cfg

    r8882 r8930  
    347347   ln_zdftke   = .true.       !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke) 
    348348   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls) 
     349   ln_zdfosm   = .false.      !  OSMOSIS BL closure                     (T =>   fill namzdf_osm) 
    349350   ! 
    350351   !                       ! convection 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/ice.F90

    r8889 r8930  
    162162   REAL(wp)          , PUBLIC ::   rn_amax_n       !: maximum ice concentration Northern hemisphere 
    163163   REAL(wp)          , PUBLIC ::   rn_amax_s       !: maximum ice concentration Southern hemisphere 
    164    CHARACTER(len=32) , PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input) 
    165    CHARACTER(len=32) , PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output) 
     164   CHARACTER(len=256), PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input) 
     165   CHARACTER(len=256), PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output) 
    166166   CHARACTER(len=256), PUBLIC ::   cn_icerst_indir !: ice restart input directory 
    167167   CHARACTER(len=256), PUBLIC ::   cn_icerst_outdir!: ice restart output directory 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dyncor_c1d.F90

    r7646 r8930  
    2121   USE prtctl         ! Print control 
    2222 
     23   USE sbcwave        ! Surface Waves (add Stokes-Coriolis force) 
     24   USE sbc_oce , ONLY : ln_stcor    ! use Stoke-Coriolis force 
     25    
    2326   IMPLICIT NONE 
    2427   PRIVATE 
     
    7174      ENDIF 
    7275      ! 
    73       DO jk = 1, jpkm1 
    74          DO jj = 2, jpjm1 
    75             DO ji = fs_2, fs_jpim1   ! vector opt. 
    76                ua(ji,jj,jk) = ua(ji,jj,jk) + ff_t(ji,jj) * vn(ji,jj,jk) 
    77                va(ji,jj,jk) = va(ji,jj,jk) - ff_t(ji,jj) * un(ji,jj,jk) 
     76      IF( ln_stcor ) THEN 
     77         DO jk = 1, jpkm1 
     78            DO jj = 2, jpjm1 
     79               DO ji = fs_2, fs_jpim1   ! vector opt. 
     80                  ua(ji,jj,jk) = ua(ji,jj,jk) + ff_t(ji,jj) * (vn(ji,jj,jk) + vsd(ji,jj,jk)) 
     81                  va(ji,jj,jk) = va(ji,jj,jk) - ff_t(ji,jj) * (un(ji,jj,jk) + usd(ji,jj,jk)) 
     82               END DO 
    7883            END DO 
    7984         END DO 
    80       END DO    
     85      ELSE 
     86         DO jk = 1, jpkm1 
     87            DO jj = 2, jpjm1 
     88               DO ji = fs_2, fs_jpim1   ! vector opt. 
     89                  ua(ji,jj,jk) = ua(ji,jj,jk) + ff_t(ji,jj) * vn(ji,jj,jk) 
     90                  va(ji,jj,jk) = va(ji,jj,jk) - ff_t(ji,jj) * un(ji,jj,jk) 
     91               END DO 
     92            END DO 
     93         END DO 
     94      END IF 
     95       
    8196      ! 
    8297      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' cor  - Ua: ', mask1=umask,  & 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90

    r8882 r8930  
    7878                         CALL zdf_phy( kstp )         ! vertical physics update (bfr, avt, avs, avm + MLD) 
    7979 
     80      IF(.NOT.ln_linssh )   CALL ssh_nxt       ( kstp )  ! after ssh (includes call to div_hor) 
     81      IF(.NOT.ln_linssh )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors  
     82 
     83      IF(.NOT.ln_linssh )   CALL wzv           ( kstp )  ! now cross-level velocity  
    8084      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    8185      ! diagnostics and outputs             (ua, va, ta, sa used as workspace) 
     
    100104      IF( ln_traqsr )   CALL tra_qsr( kstp )       ! penetrative solar radiation qsr 
    101105      IF( ln_tradmp )   CALL tra_dmp( kstp )       ! internal damping trends- tracers 
     106      IF(.NOT.ln_linssh)CALL tra_adv( kstp )       ! horizontal & vertical advection 
     107      IF( lk_zdfosm  )  CALL tra_osm( kstp )       ! OSMOSIS non-local tracer fluxes 
    102108                        CALL tra_zdf( kstp )       ! vertical mixing 
    103109                        CALL eos( tsn, rhd, rhop, gdept_0(:,:,:) )   ! now potential density for zdfmxl 
     
    115121      IF( ln_dyndmp )   CALL dyn_dmp    ( kstp )   ! internal damping trends- momentum 
    116122                        CALL dyn_cor_c1d( kstp )   ! vorticity term including Coriolis 
     123      IF( lk_zdfosm  )  CALL dyn_osm    ( kstp )   ! OSMOSIS non-local velocity fluxes 
    117124                        CALL dyn_zdf    ( kstp )   ! vertical diffusion 
    118125                        CALL dyn_nxt    ( kstp )   ! lateral velocity at next time step 
     126      IF(.NOT.ln_linssh)CALL ssh_swp    ( kstp )   ! swap of sea surface height 
     127 
     128      IF(.NOT.ln_linssh)CALL dom_vvl_sf_swp( kstp )! swap of vertical scale factors 
    119129 
    120130      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90

    r8882 r8930  
    105105      !                    ! write out to file 
    106106      IF( lwp ) THEN 
    107          WRITE(numcfl,FMT='(2x,i4,5x,a6,5x,f6.4,1x,i4,1x,i4,1x,i4)') kt, 'Max Cu', zCu_max, iloc_u(1), iloc_u(2), iloc_u(3) 
    108          WRITE(numcfl,FMT='(11x,     a6,5x,f6.4,1x,i4,1x,i4,1x,i4)')     'Max Cv', zCv_max, iloc_v(1), iloc_v(2), iloc_v(3) 
    109          WRITE(numcfl,FMT='(11x,     a6,5x,f6.4,1x,i4,1x,i4,1x,i4)')     'Max Cw', zCw_max, iloc_w(1), iloc_w(2), iloc_w(3) 
     107         WRITE(numcfl,FMT='(2x,i4,5x,a6,4x,f7.4,1x,i4,1x,i4,1x,i4)') kt, 'Max Cu', zCu_max, iloc_u(1), iloc_u(2), iloc_u(3) 
     108         WRITE(numcfl,FMT='(11x,     a6,4x,f7.4,1x,i4,1x,i4,1x,i4)')     'Max Cv', zCv_max, iloc_v(1), iloc_v(2), iloc_v(3) 
     109         WRITE(numcfl,FMT='(11x,     a6,4x,f7.4,1x,i4,1x,i4,1x,i4)')     'Max Cw', zCw_max, iloc_w(1), iloc_w(2), iloc_w(3) 
    110110      ENDIF 
    111111      ! 
     
    119119         ! to ascii file 
    120120         WRITE(numcfl,*) '******************************************' 
    121          WRITE(numcfl,FMT='(3x,a12,7x,f6.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cu', rCu_max, nCu_loc(1), nCu_loc(2), nCu_loc(3) 
     121         WRITE(numcfl,FMT='(3x,a12,6x,f7.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cu', rCu_max, nCu_loc(1), nCu_loc(2), nCu_loc(3) 
    122122         WRITE(numcfl,FMT='(3x,a8,11x,f15.1)') ' => dt/C', z2dt/rCu_max 
    123123         WRITE(numcfl,*) '******************************************' 
    124          WRITE(numcfl,FMT='(3x,a12,7x,f6.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cv', rCv_max, nCv_loc(1), nCv_loc(2), nCv_loc(3) 
     124         WRITE(numcfl,FMT='(3x,a12,6x,f7.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cv', rCv_max, nCv_loc(1), nCv_loc(2), nCv_loc(3) 
    125125         WRITE(numcfl,FMT='(3x,a8,11x,f15.1)') ' => dt/C', z2dt/rCv_max 
    126126         WRITE(numcfl,*) '******************************************' 
    127          WRITE(numcfl,FMT='(3x,a12,7x,f6.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cw', rCw_max, nCw_loc(1), nCw_loc(2), nCw_loc(3) 
     127         WRITE(numcfl,FMT='(3x,a12,6x,f7.4,1x,i4,1x,i4,1x,i4)') 'Run Max Cw', rCw_max, nCw_loc(1), nCw_loc(2), nCw_loc(3) 
    128128         WRITE(numcfl,FMT='(3x,a8,11x,f15.1)') ' => dt/C', z2dt/rCw_max 
    129129         CLOSE( numcfl )  
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90

    r6140 r8930  
    139139      DO jj = 1, jpj 
    140140         DO ji = 1, jpi 
    141             zztmp = bathy(ji,jj) 
     141            zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
    142142            hth     (ji,jj) = zztmp 
    143143            zabs2   (ji,jj) = zztmp 
     
    150150         DO jj = 1, jpj 
    151151            DO ji = 1, jpi 
    152                zztmp = bathy(ji,jj) 
     152               zztmp = gdepw_n(ji,jj,mbkt(ji,jj)+1)  
    153153               zrho0_3(ji,jj) = zztmp 
    154154               zrho0_1(ji,jj) = zztmp 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r8882 r8930  
    3737   USE domvvl         ! variable volume 
    3838   USE c1d            ! 1D configuration 
    39    USE domc1d         ! 1D configuration: column location 
    4039   USE dyncor_c1d     ! 1D configuration: Coriolis term    (cor_c1d routine) 
    4140   USE wet_dry        ! wetting and drying 
     
    117116         WRITE(numout,*)     '              nn_cfg = ', nn_cfg 
    118117      ENDIF 
    119       ! 
    120       !       
    121 !!gm  This should be removed with the new configuration interface 
    122       IF( lk_c1d .AND. ln_c1d_locpt )  CALL dom_c1d( rn_lat1d, rn_lon1d ) 
    123 !!gm end 
    124118      ! 
    125119      !           !==  Reference coordinate system  ==! 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90

    r8882 r8930  
    8787      INTEGER  ::   jj, ji, jk   ! dummy loop argument 
    8888      INTEGER  ::   ik           ! local integer  
    89       REAL(wp) ::  ztransp, zfac, ztemp, zsp0 
    90       REAL(wp) ::  zdep_u, zdep_v, zkh_u, zkh_v, zda_u, zda_v 
     89      REAL(wp) ::  ztransp, zfac, zsp0 
     90      REAL(wp) ::  zdepth, zsqrt_depth,  zexp_depth, z_two_thirds, zsqrtpi !sqrt of pi 
     91      REAL(wp) ::  zbot_u, zbot_v, zkb_u, zkb_v, zke3_u, zke3_v, zda_u, zda_v 
     92      REAL(wp) ::  zstokes_psi_u_bot, zstokes_psi_v_bot 
    9193      REAL(wp), DIMENSION(:,:)  , POINTER ::   zk_t, zk_u, zk_v, zu0_sd, zv0_sd   ! 2D workspace 
     94      REAL(wp), DIMENSION(:,:)  , POINTER ::   zstokes_psi_u_top, zstokes_psi_v_top   ! 2D workspace 
    9295      REAL(wp), DIMENSION(:,:,:), POINTER ::   ze3divh                            ! 3D workspace 
    9396      !!--------------------------------------------------------------------- 
     
    9598      CALL wrk_alloc( jpi,jpj,jpk,   ze3divh ) 
    9699      CALL wrk_alloc( jpi,jpj,       zk_t, zk_u, zk_v, zu0_sd, zv0_sd ) 
    97       ! 
    98       ! 
     100      CALL wrk_alloc( jpi,jpj,       zstokes_psi_u_top, zstokes_psi_v_top) 
     101      ! 
     102      ! 
     103      zsqrtpi = SQRT(rpi) 
     104      z_two_thirds = 2.0_wp / 3.0_wp 
    99105      zfac =  2.0_wp * rpi / 16.0_wp 
    100106      DO jj = 1, jpj                ! exp. wave number at t-point    (Eq. (19) in Breivick et al. (2014) ) 
     
    106112               tsd2d(ji,jj) = zsp0 
    107113               ! Wavenumber scale 
    108                zk_t(ji,jj) = ABS( zsp0 ) / MAX( ABS( 5.97_wp*ztransp ) , 0.0000001_wp ) 
    109          END DO 
    110       END DO       
     114               zk_t(ji,jj) =  (1.0_wp-2.0_wp/3.0_wp)*zsp0/MAX(2.0_wp*ztransp,0.0000001_wp) 
     115         END DO 
     116      END DO 
     117      ! 
    111118      DO jj = 1, jpjm1              ! exp. wave number & Stokes drift velocity at u- & v-points 
    112119         DO ji = 1, jpim1 
     
    120127      ! 
    121128      !                       !==  horizontal Stokes Drift 3D velocity  ==! 
     129      DO jj = 1, jpjm1              ! exp. wave number & Stokes drift velocity at u- & v-points 
     130         DO ji = 1, jpim1 
     131            zstokes_psi_u_top(ji,jj) = 0._wp 
     132            zstokes_psi_v_top(ji,jj) = 0._wp 
     133         END DO 
     134      END DO 
     135 
    122136      DO jk = 1, jpkm1 
    123137         DO jj = 2, jpjm1 
    124138            DO ji = 2, jpim1 
    125                zdep_u = 0.5_wp * ( gdept_n(ji,jj,jk) + gdept_n(ji+1,jj,jk) ) 
    126                zdep_v = 0.5_wp * ( gdept_n(ji,jj,jk) + gdept_n(ji,jj+1,jk) ) 
    127                !                           
    128                zkh_u = zk_u(ji,jj) * zdep_u     ! k * depth 
    129                zkh_v = zk_v(ji,jj) * zdep_v 
    130                !                                ! Depth attenuation 
    131                zda_u = EXP( -2.0_wp*zkh_u ) / ( 1.0_wp + 8.0_wp*zkh_u ) 
    132                zda_v = EXP( -2.0_wp*zkh_v ) / ( 1.0_wp + 8.0_wp*zkh_v ) 
     139               zbot_u = 0.5_wp * ( gdepw_n(ji,jj,jk+1) + gdepw_n(ji+1,jj,jk+1) ) 
     140               zbot_v = 0.5_wp * ( gdepw_n(ji,jj,jk+1) + gdepw_n(ji,jj+1,jk+1) ) 
     141               zkb_u = 2.0_wp * zk_u(ji,jj) * zbot_u     ! 2k * bottom depth 
     142               zkb_v = 2.0_wp * zk_v(ji,jj) * zbot_v     ! 2k * bottom depth 
    133143               ! 
     144               zke3_u = MAX(1.e-8_wp, 2.0_wp * zk_u(ji,jj) * e3u_n(ji,jj,jk))     ! 2k * thickness 
     145               zke3_v = MAX(1.e-8_wp, 2.0_wp * zk_v(ji,jj) * e3v_n(ji,jj,jk))     ! 2k * thickness 
     146 
     147               ! Depth attenuation .... do u component first.. 
     148               zdepth=zkb_u 
     149               zsqrt_depth = SQRT(zdepth) 
     150               zexp_depth = EXP(-zdepth) 
     151               zstokes_psi_u_bot = 1.0_wp - zexp_depth  & 
     152                    & - z_two_thirds*(zsqrtpi*zsqrt_depth*zdepth*ERFC(zsqrt_depth) & 
     153                    &                  + 1.0_wp - (1.0_wp + zdepth)*zexp_depth) 
     154               zda_u = (zstokes_psi_u_bot - zstokes_psi_u_top(ji,jj))/zke3_u 
     155               zstokes_psi_u_top(ji,jj) = zstokes_psi_u_bot 
     156 
     157               !         ... and then v component 
     158               zdepth=zkb_v 
     159               zsqrt_depth = SQRT(zdepth) 
     160               zexp_depth = EXP(-zdepth) 
     161               zstokes_psi_v_bot = 1.0_wp - zexp_depth  & 
     162                    & - z_two_thirds*(zsqrtpi*zsqrt_depth*zdepth*ERFC(zsqrt_depth) & 
     163                    &                  + 1.0_wp - (1.0_wp + zdepth)*zexp_depth) 
     164               zda_v = (zstokes_psi_v_bot - zstokes_psi_v_top(ji,jj))/zke3_v 
     165               zstokes_psi_v_top(ji,jj) = zstokes_psi_v_bot 
     166              ! 
    134167               usd(ji,jj,jk) = zda_u * zu0_sd(ji,jj) * umask(ji,jj,jk) 
    135168               vsd(ji,jj,jk) = zda_v * zv0_sd(ji,jj) * vmask(ji,jj,jk) 
     
    190223      CALL wrk_dealloc( jpi,jpj,jpk,   ze3divh ) 
    191224      CALL wrk_dealloc( jpi,jpj,       zk_t, zk_u, zk_v, zu0_sd, zv0_sd ) 
     225      CALL wrk_dealloc( jpi,jpj,       zstokes_psi_u_top, zstokes_psi_v_top) 
    192226      ! 
    193227   END SUBROUTINE sbc_stokes 
     
    347381         ALLOCATE( div_sd(jpi,jpj) ) 
    348382         ALLOCATE( tsd2d (jpi,jpj) ) 
     383 
     384         ut0sd(:,:) = 0._wp 
     385         vt0sd(:,:) = 0._wp 
     386         hsw(:,:) = 0._wp 
     387         wmp(:,:) = 0._wp 
     388 
    349389         usd(:,:,:) = 0._wp 
    350390         vsd(:,:,:) = 0._wp 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdf_oce.F90

    r8882 r8930  
    2222   LOGICAL , PUBLIC ::   ln_zdfric   !: Richardson depend coefficients 
    2323   LOGICAL , PUBLIC ::   ln_zdftke   !: Turbulent Kinetic Energy closure 
    24    LOGICAL , PUBLIC ::   ln_zdfgls   !: Generic Length Sclare closure 
     24   LOGICAL , PUBLIC ::   ln_zdfgls   !: Generic Length Scale closure 
     25   LOGICAL , PUBLIC ::   ln_zdfosm   !: OSMOSIS BL closure 
    2526   !                             ! convection 
    2627   LOGICAL , PUBLIC ::   ln_zdfevd   !: convection: enhanced vertical diffusion flag 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90

    r8882 r8930  
    1818   USE zdftke         ! vertical physics: TKE vertical mixing 
    1919   USE zdfgls         ! vertical physics: GLS vertical mixing 
     20   USE zdfosm         ! vertical physics: OSMOSIS vertical mixing 
    2021   USE zdfddm         ! vertical physics: double diffusion mixing       
    2122   USE zdfevd         ! vertical physics: convection via enhanced vertical diffusion   
     
    4950   INTEGER, PARAMETER ::   np_TKE = 3   ! Turbulente Kinetic Eenergy closure scheme for Kz 
    5051   INTEGER, PARAMETER ::   np_GLS = 4   ! Generic Length Scale closure scheme for Kz 
     52   INTEGER, PARAMETER ::   np_OSM = 5   ! OSMOSIS-OBL closure scheme for Kz 
    5153 
    5254   LOGICAL ::   l_zdfsh2   ! shear production term flag (=F for CST, =T otherwise (i.e. TKE, GLS, RIC)) 
     
    7274      !! 
    7375      NAMELIST/namzdf/ ln_zdfcst, ln_zdfric, ln_zdftke, ln_zdfgls,   &     ! type of closure scheme 
     76         &             ln_zdfosm,                                    &     ! type of closure scheme 
    7477         &             ln_zdfevd, nn_evdm, rn_evd ,                  &     ! convection : evd 
    7578         &             ln_zdfnpc, nn_npc , nn_npcp,                  &     ! convection : npc 
     
    102105         WRITE(numout,*) '         Turbulent Kinetic Energy closure (TKE)  ln_zdftke = ', ln_zdftke 
    103106         WRITE(numout,*) '         Generic Length Scale closure (GLS)      ln_zdfgls = ', ln_zdfgls 
     107         WRITE(numout,*) '         OSMOSIS-OBL closure (OSM)               ln_zdfosm = ', ln_zdfosm 
    104108         WRITE(numout,*) '      convection: ' 
    105109         WRITE(numout,*) '         enhanced vertical diffusion             ln_zdfevd = ', ln_zdfevd 
     
    156160      ! 
    157161      IF( ln_zdfnpc .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfnpc and ln_zdfevd' ) 
     162      IF( ln_zdfosm .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfosm and ln_zdfevd' ) 
    158163      IF( lk_top    .AND. ln_zdfnpc )   CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 
     164      IF( lk_top    .AND. ln_zdfosm )   CALL ctl_stop( 'zdf_phy_init: osmosis scheme is not working with key_top' ) 
    159165      IF(lwp) THEN 
    160166         WRITE(numout,*) 
     
    178184      IF( ln_zdftke ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_TKE   ;   CALL zdf_tke_init   ;   ENDIF 
    179185      IF( ln_zdfgls ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_GLS   ;   CALL zdf_gls_init   ;   ENDIF 
     186      IF( ln_zdfosm ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_OSM   ;   CALL zdf_osm_init   ;   ENDIF 
    180187      ! 
    181188      IF( ioptio /= 1 )    CALL ctl_stop( 'zdf_phy_init: one and only one vertical diffusion option has to be defined ' ) 
     
    247254      CASE( np_TKE )   ;   CALL zdf_tke( kt         , zsh2, avm_k, avt_k )    ! TKE closure scheme for Kz 
    248255      CASE( np_GLS )   ;   CALL zdf_gls( kt         , zsh2, avm_k, avt_k )    ! GLS closure scheme for Kz 
     256      CASE( np_OSM )   ;   CALL zdf_osm( kt               , avm_k, avt_k )    ! OSMOSIS closure scheme for Kz 
    249257!     CASE( np_CST )                                  ! Constant Kz (reset avt, avm to the background value) 
    250258!         ! avt_k and avm_k set one for all at initialisation phase 
     
    290298      CALL lbc_lnk( avm  , 'W', 1. )                  ! needed to compute avm at u- and v-points 
    291299      CALL lbc_lnk( avt  , 'W', 1. )                  !!gm  a priori only avm_k and avm are required 
    292       CALL lbc_lnk( avs  , 'W', 1. )                  !!gm  for calculation, keeped here for output only 
     300      CALL lbc_lnk( avs  , 'W', 1. )                  !!gm  for calculation, kept here for output only 
    293301      ! 
    294302      IF( l_zdfdrg ) THEN     ! drag  have been updated (non-linear cases) 
     
    303311         IF( ln_zdfgls )   CALL gls_rst( kt, 'WRITE' ) 
    304312         IF( ln_zdfric )   CALL ric_rst( kt, 'WRITE' )  
     313         ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after wn has been updated 
    305314      ENDIF 
    306315      ! 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/step.F90

    r8882 r8930  
    186186                         CALL dyn_vor       ( kstp )  ! vorticity term including Coriolis 
    187187                         CALL dyn_ldf       ( kstp )  ! lateral mixing 
     188      IF( ln_zdfosm  )   CALL dyn_osm       ( kstp )  ! OSMOSIS non-local velocity fluxes 
    188189                         CALL dyn_hpg       ( kstp )  ! horizontal gradient of Hydrostatic pressure 
    189190                         CALL dyn_spg       ( kstp )  ! surface pressure gradient 
     
    243244#endif 
    244245                         CALL tra_adv       ( kstp )  ! horizontal & vertical advection 
     246      IF( ln_zdfosm  )   CALL tra_osm       ( kstp )  ! OSMOSIS non-local tracer fluxes 
     247      IF( lrst_oce .AND. ln_zdfosm ) & 
     248           &             CALL osm_rst( kstp, 'WRITE' )! write OSMOSIS outputs + wn (so must do here) to restarts 
    245249                         CALL tra_ldf       ( kstp )  ! lateral mixing 
    246250 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/step_oce.F90

    r8882 r8930  
    6565 
    6666   USE zdfphy          ! vertical physics manager      (zdf_phy_init routine) 
     67   USE zdfosm  , ONLY : osm_rst, dyn_osm, tra_osm      ! OSMOSIS routines used in step.F90 
    6768 
    6869   USE step_diu        ! Time stepping for diurnal sst 
  • branches/2017/dev_CNRS_2017/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS

    r8468 r8930  
    88module load intel/compiler/64/14.0/2013_sp1.2.144 
    99module load openmpi/intel/64/1.6.5 
    10 module load slurm/2.5.7 
     10module load slurm/16.05.8 
    1111 
    1212# 
  • branches/2017/dev_CNRS_2017/NEMOGCM/TOOLS/DOMAINcfg/field_def.xml

    r6951 r8930  
    9898         <field id="tpt_dep"      long_name="T-point depth"                  standard_name="depth_below_geoid"   unit="m"   grid_ref="grid_T_3D" /> 
    9999         <field id="e3tdef"       long_name="T-cell thickness deformation"                                       unit="%"   grid_ref="grid_T_3D" /> 
    100       </field_group> 
     100       </field_group> 
     101 
     102       <!-- OSMOSIS diagnostics --> 
     103       <field_group id="OSMOSIS_T" grid_ref="grid_T_2D" operation="instant" > 
     104         <field id="ghamt"          long_name="non-local temperature flux"    grid_ref="grid_T_3D"  unit="deg m/s"        /> 
     105         <field id="ghams"          long_name="non-local salinity flux"        grid_ref="grid_T_3D"   unit="psu m/s"        /> 
     106         <field id="zwth0"          long_name="surface non-local temperature flux"                             unit="deg m/s"        /> 
     107         <field id="zws0"          long_name="surface non-local salinity flux"                                     unit="psu m/s"        /> 
     108         <field id="hbl"          long_name="boundary layer depth"                                                unit="m"        /> 
     109         <field id="hbli"          long_name="initial boundary layer depth"                                     unit="m"        /> 
     110         <field id="dstokes"          long_name="stokes drift  depth scale"                                     unit="m"        /> 
     111         <field id="zustke"          long_name="magnitude of stokes drift  at T-points"                     unit="m/s"        /> 
     112         <field id="zwstrc"          long_name="convective velocity scale"                                  unit="m/s"        /> 
     113         <field id="zwstrl"          long_name="langmuir velocity scale"                                   unit="m/s"        /> 
     114         <field id="zustar"          long_name="friction velocity"                                           unit="m/s"        /> 
     115         <field id="zhbl"          long_name="boundary layer depth"                                           unit="m"        /> 
     116         <field id="zhml"          long_name="mixed layer depth"                                           unit="m"        /> 
     117       </field_group> 
     118     
     119       <field_group id="OSMOSIS_U" grid_ref="grid_U_2D" > 
     120         <field id="ghamu"          long_name="non-local u-momentum flux"        grid_ref="grid_U_3D"   unit="m^2/s^2"        /> 
     121         <field id="us_x"          long_name="i component of Stokes drift"                             unit="m/s"        /> 
     122       </field_group> 
     123    
     124       <field_group id="OSMOSIS_V" grid_ref="grid_V_2D" > 
     125         <field id="ghamv"          long_name="non-local v-momentum flux"        grid_ref="grid_V_3D"   unit="m^2/s^2"        /> 
     126         <field id="us_y"          long_name="j component of Stokes drift"                             unit="m/s"        /> 
     127       </field_group> 
     128 
    101129 
    102130      <!-- Tides --> 
Note: See TracChangeset for help on using the changeset viewer.