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 15260 for NEMO/branches – NEMO

Changeset 15260 for NEMO/branches


Ignore:
Timestamp:
2021-09-14T18:31:24+02:00 (3 years ago)
Author:
acc
Message:

Untested, initial port of GEOMETRIC changes. Includes a bug fix to eken diagnostic in diawri.F90 which, if confirmed, is also relevant to current 4.0-HEAD. #2722

Location:
NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/cfgs/SHARED/field_def_nemo-oce.xml

    r13648 r15260  
    138138        <field id="cfl_cv"       long_name="v-courant number"   unit="#" /> 
    139139        <field id="cfl_cw"       long_name="w-courant number"   unit="#" /> 
     140 
     141         <!-- GEOMETRIC fields (requires nn_aei_ijk_t = 32)  --> 
     142         <field id="eke"               long_name="total EKE (EKE+EPE)"                             unit="m3/s2" /> 
     143         <field id="trd_eke_adv_ubt"   long_name="ubt advective trend of EKE (LHS)"                unit="m3/s3" /> 
     144         <field id="trd_eke_adv_wav"   long_name="wav advective trend of EKE (LHS)"                unit="m3/s3" /> 
     145         <field id="trd_eke_lap"       long_name="diffusive trend of EKE (RHS)"                    unit="m3/s3" /> 
     146         <field id="trd_eke_peS"       long_name="PE to EKE source trend (RHS)"                    unit="m3/s3" /> 
     147         <field id="trd_eke_keS"       long_name="KE to EKE source trend (RHS)"                    unit="m3/s3" /> 
     148         <field id="trd_eke_dis"       long_name="dissipation trend of EKE (RHS)"                  unit="m3/s3" /> 
     149 
    140150 
    141151      </field_group> <!-- grid_T --> 
     
    545555        <field id="bn2"          long_name="squared Brunt-Vaisala frequency"                unit="s-2" /> 
    546556 
     557         <!-- GEOMETRIC fields (requires nn_aei_ijk_t = 32)  --> 
     558         <field id="aeiv_geom"      long_name="3D w-EIV coefficient from GEOMETRIC param."                       unit="m2/s" /> 
     559         <field id="rossby_rad"     long_name="internal Rossby defromation radius"                               unit="m"    grid_ref="grid_W_2D"/> 
     560         <field id="bn2"            long_name="squared Brunt-Vaisala frequency"                                  unit="s-1"  /> 
     561         <field id="c1_vert"        long_name="1st baroclinic mode phase speed"                                  unit="m/s"  grid_ref="grid_W_2D"/> 
     562         <field id="c_ros"          long_name="long Rossby phase speed"                                          unit="m/s"  grid_ref="grid_W_2D"/> 
     563 
    547564      </field_group> 
    548565       
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/cfgs/SHARED/namelist_ref

    r14372 r15260  
    836836      !                             !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
    837837      !                             !   = 30 F(i,j,k)  =ldf_c2d * ldf_c1d 
     838      !                             !   = 32 F(i,j,t)  = GEOMETRIC parameterization        (=> fill namldf_eke) 
    838839      !                        !  time invariant coefficients:  aei0 = 1/2  Ue*Le  
    839840      rn_Ue        = 0.02           !  lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) 
     
    841842      ! 
    842843      ln_ldfeiv_dia =.false.   ! diagnose eiv stream function and velocities 
     844   ln_eke_equ    =.true.   ! switch on update of GEOMETRIC eddy energy equation            (=> fill namldf_eke) 
     845                           ! forced to be true if nn_aei_ijk_t = 32 
     846/ 
     847!---------------------------------------------------------------------------------- 
     848&namldf_eke !   GEOMETRIC param. (total EKE equation)                           (nn_aei_ijk_t = 32) 
     849!---------------------------------------------------------------------------------- 
     850   rn_ekedis      =  180.      ! dissipation time scale of EKE [days] 
     851      nn_eke_dis  =    0       ! dissipation option 
     852      !                             !   =  0  constant in space 
     853      !                             !   =-20  read in geom_diss_2D.nc file 
     854   rn_geom        =  0.05      ! geometric parameterization master coefficient (>0 & <1) 
     855   rn_eke_init    =  1.e-1     ! initial total EKE value 
     856   rn_eke_min     =  1.e+0     ! background value of total EKE 
     857   rn_ross_min    =  4.e+3     ! tapering of aeiv based on min Rossby radius [m] 
     858   !                           !   set to zero to not taper it 
     859   rn_eke_lap     =   500.     ! Laplacian diffusion coefficient of EKE 
     860   !                           !   this is in all options below, so set it to zero and nothing is done 
     861   rn_aeiv_min    =  1.e+1     ! minimum bound of eiv coefficient 
     862   rn_aeiv_max    =  1.5e+4    ! maximum bound of eiv coefficient 
     863   rn_SFmin       =  1.0       ! minimum bound of Structure Function 
     864   rn_SFmax       =  1.0       ! maximum bound of Structure Function 
     865   nn_eke_opt     =  1         ! options for terms to include in EKE budget 
     866   !                                !   =  0  PE->EKE conversion, dissipation only 
     867   !                                !   =  1  as 0 but with advection 
     868   !                                !   =  2  as 1 but with additional KE->EKE conversion 
     869   !                                !   for testing purposes: 
     870   !                                !   = 88  only advection by depth-averaged flow 
     871   !                                !   = 99  only Laplacian diffusion 
     872   ln_adv_wav     =  .false.  ! include advection at long Rossby speed 
     873   ln_beta_plane  =  .false.  ! beta plane option for computing long Rossby speed (default: sphere option) 
    843874/ 
    844875!----------------------------------------------------------------------- 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/DIA/diawri.F90

    r14580 r15260  
    283283               DO ji = fs_2, fs_jpim1   ! vector opt. 
    284284                  zztmp  = 0.25_wp * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) 
    285                   z3d(ji,jj,jk) = zztmp * (  un(ji-1,jj,jk)**2 * e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)   & 
    286                      &                     + un(ji  ,jj,jk)**2 * e2u(ji  ,jj) * e3u_n(ji  ,jj,jk)   & 
    287                      &                     + vn(ji,jj-1,jk)**2 * e1v(ji,jj-1) * e3v_n(ji,jj-1,jk)   & 
    288                      &                     + vn(ji,jj  ,jk)**2 * e1v(ji,jj  ) * e3v_n(ji,jj  ,jk)   ) 
     285                  z3d(ji,jj,jk) = zztmp * (  un(ji-1,jj,jk)**2 * e1e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)   & 
     286                     &                     + un(ji  ,jj,jk)**2 * e1e2u(ji  ,jj) * e3u_n(ji  ,jj,jk)   & 
     287                     &                     + vn(ji,jj-1,jk)**2 * e1e2v(ji,jj-1) * e3v_n(ji,jj-1,jk)   & 
     288                     &                     + vn(ji,jj  ,jk)**2 * e1e2v(ji,jj  ) * e3v_n(ji,jj  ,jk)   ) 
    289289               END DO 
    290290            END DO 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/DYN/dynldf_lap_blp.F90

    r12791 r15260  
    1414   USE dom_oce        ! ocean space and time domain 
    1515   USE ldfdyn         ! lateral diffusion: eddy viscosity coef. 
     16   USE ldftra  , ONLY : l_ldfeke   ! GEOMETRIC param. activation 
    1617   USE ldfslp         ! iso-neutral slopes  
    1718   USE zdf_oce        ! ocean vertical physics 
     
    2526   PUBLIC dyn_ldf_lap  ! called by dynldf.F90 
    2627   PUBLIC dyn_ldf_blp  ! called by dynldf.F90 
     28    
     29   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   eke_keS   !: Source term of EKE equation used in ldfeke module 
    2730 
    2831   !! * Substitutions 
     
    5558      REAL(wp) ::   zsign        ! local scalars 
    5659      REAL(wp) ::   zua, zva     ! local scalars 
    57       REAL(wp), DIMENSION(jpi,jpj) ::   zcur, zdiv 
     60      REAL(wp), DIMENSION(jpi,jpj) ::  zcur, zah_cur2 
     61      REAL(wp), DIMENSION(jpi,jpj) ::  zdiv, zah_div2 
    5862      !!---------------------------------------------------------------------- 
    5963      ! 
     
    6872      ENDIF 
    6973      ! 
     74      IF( l_ldfeke ) THEN        ! GEOMETRIC source term         
     75         zah_cur2(:,:) = 0._wp 
     76         zah_div2(:,:) = 0._wp 
     77      ENDIF      
     78       
     79       
    7080      !                                                ! =============== 
    7181      DO jk = 1, jpkm1                                 ! Horizontal slab 
     
    95105            END DO 
    96106         END DO 
     107         ! 
     108         IF( l_ldfeke ) THEN        ! GEOMETRIC source term         
     109            DO jj = 2, jpjm1 
     110               DO ji = fs_2, jpim1   ! vector opt. 
     111                  zah_cur2(ji,jj) = zah_cur2(ji,jj) +                   zcur(ji,jj)**2 / MAX( 1._wp , ahmf(ji,jj,jk) ) * fmask(ji,jj,jk) 
     112                  zah_div2(ji,jj) = zah_div2(ji,jj) + e3t_b(ji,jj,jk) * zdiv(ji,jj)**2 / MAX( 1._wp , ahmt(ji,jj,jk) ) * tmask(ji,jj,jk) 
     113               END DO 
     114            END DO 
     115         ENDIF 
    97116         !                                             ! =============== 
    98117      END DO                                           !   End of slab 
    99118      !                                                ! =============== 
     119       
     120      IF( l_ldfeke ) THEN        ! GEOMETRIC source term         
     121         CALL lbc_lnk( 'dynldf_lap_blp', zah_cur2, 'F', 1. ) 
     122         zah_cur2(:,:) = zah_cur2(:,:) * e1e2f(:,:) 
     123         DO jj = 2, jpjm1 
     124            DO ji = fs_2, jpim1   ! vector opt. 
     125               eke_keS(ji,jj) = zah_div2(ji,jj) + (  zah_cur2(ji-1,jj  )   + zah_cur2(ji,jj  )        & 
     126                  &                                + zah_cur2(ji-1,jj-1)   + zah_cur2(ji,jj-1)    )   & 
     127                  &                 / MAX(  1._wp ,  fmask   (ji-1,jj  ,1) + fmask   (ji,jj  ,1)      & 
     128                  &                                + fmask   (ji-1,jj-1,1) + fmask   (ji,jj-1,1)  )   * r1_e1e2t(ji,jj) 
     129            END DO   
     130         END DO   
     131         CALL lbc_lnk( 'dynldf_lap_blp', eke_keS, 'T', 1. ) 
     132      ENDIF 
    100133      ! 
    101134   END SUBROUTINE dyn_ldf_lap 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/LDF/ldftra.F90

    r12296 r15260  
    99   !!            3.7  ! 2013-12  (F. Lemarie, G. Madec)  restructuration/simplification of aht/aeiv specification, 
    1010   !!                 !                                  add velocity dependent coefficient and optional read in file 
     11   !!            4.0  ! 2017-11  (J. Mak, G. Madec) added GEOMETRIC parameterization 
    1112   !!---------------------------------------------------------------------- 
    1213 
     
    8485   LOGICAL , PUBLIC ::   l_ldftra_time = .FALSE.   !: flag for time variation of the lateral eddy diffusivity coef. 
    8586   LOGICAL , PUBLIC ::   l_ldfeiv_time = .FALSE.   !: flag for time variation of the eiv coef. 
     87    
     88   LOGICAL , PUBLIC ::   ln_eke_equ                !: flag for having updates to eddy energy equation 
     89   LOGICAL , PUBLIC ::   l_ldfeke      = .FALSE.   !: GEOMETRIC - total EKE flag 
     90   LOGICAL , PUBLIC ::   l_eke_eiv     = .FALSE.   !: GEOMETRIC - aeiw flag 
    8691 
    8792   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ahtu, ahtv   !: eddy diffusivity coef. at U- and V-points   [m2/s] 
     
    466471      CALL iom_put( "ahtv_3d", ahtv(:,:,:) )   ! 3D      v-eddy diffusivity coeff. 
    467472      ! 
    468       IF( ln_ldfeiv ) THEN 
     473!!jm  : added a .NOT. flag here to avoid duplication of iom_put 
     474      IF( ln_ldfeiv .AND. (.NOT. ln_eke_equ) ) THEN 
    469475        CALL iom_put( "aeiu_2d", aeiu(:,:,1) )   ! surface u-EIV coeff. 
    470476        CALL iom_put( "aeiv_2d", aeiv(:,:,1) )   ! surface v-EIV coeff. 
     
    502508      !! 
    503509      NAMELIST/namtra_eiv/ ln_ldfeiv   , ln_ldfeiv_dia,   &   ! eddy induced velocity (eiv) 
    504          &                 nn_aei_ijk_t, rn_Ue, rn_Le         ! eiv  coefficient 
     510         &                 nn_aei_ijk_t, rn_Ue, rn_Le ,   &   ! eiv  coefficient 
     511         &                 ln_eke_equ                         ! GEOMETRIC eddy energy equation 
    505512      !!---------------------------------------------------------------------- 
    506513      ! 
     
    610617            CALL ldf_c1d( 'TRA', aeiu(:,:,1), aeiv(:,:,1), aeiu, aeiv )    ! reduction with depth 
    611618            ! 
     619         CASE(  32  )       !==  time varying 3D field  ==! 
     620            IF(lwp) WRITE(numout,*) '          eddy induced velocity coef. = F( latitude, longitude, depth, time )' 
     621            IF(lwp) WRITE(numout,*) '                              = F( total EKE )   GEOMETRIC parameterization' 
     622            ! 
     623            ln_eke_equ = .TRUE.       ! force the eddy energy equation to be updated 
     624            l_eke_eiv  = .TRUE. 
     625            ! 
    612626         CASE DEFAULT 
    613627            CALL ctl_stop('ldf_tra_init: wrong choice for nn_aei_ijk_t, the type of space-time variation of aei') 
     
    622636         ! 
    623637      ENDIF 
    624       !                     
     638      ! 
     639      IF( ln_eke_equ ) THEN 
     640         l_ldfeke   = .TRUE.          ! GEOMETRIC param initialization done in nemogcm_init 
     641         IF(lwp) WRITE(numout,*) '   updating GEOMETRIC eddy energy equation    ln_eke_equ    = ', ln_eke_equ 
     642      ENDIF 
    625643   END SUBROUTINE ldf_eiv_init 
    626644 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/nemogcm.F90

    r13013 r15260  
    452452                           CALL ldf_tra_init      ! Lateral ocean tracer physics 
    453453                           CALL ldf_eiv_init      ! eddy induced velocity param. 
     454      IF( l_ldfeke     )   CALL ldf_eke_init      ! GEOMETRIC param. 
    454455                           CALL ldf_dyn_init      ! Lateral ocean momentum physics 
    455456 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/step.F90

    r12859 r15260  
    3131   !!             -   !  2015-11  (J. Chanut) free surface simplification (remove filtered free surface) 
    3232   !!            4.0  !  2017-05  (G. Madec)  introduction of the vertical physics manager (zdfphy) 
     33   !!             -   !  2017-11  (J. Mak, G. Madec) add GEOMETRIC parameterization 
    3334   !!---------------------------------------------------------------------- 
    3435 
     
    196197      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    197198      IF ( ln_diurnal )  CALL stp_diurnal( kstp ) 
     199 
     200      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     201      ! GEOMETRIC 
     202      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     203 
     204      IF ( l_ldfeke   )  CALL ldf_eke( kstp )         ! GEOMETRIC param. (time evolution of eiv coefficient) 
    198205       
    199206      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OCE/step_oce.F90

    r10068 r15260  
    6262   USE ldfdyn          ! lateral eddy viscosity coef.     (ldf_dyn routine) 
    6363   USE ldftra          ! lateral eddy diffusive coef.     (ldf_tra routine) 
     64   USE ldfeke          ! GEOMETRIC parameterization       (ldf_eke routine) 
    6465 
    6566   USE zdfphy          ! vertical physics manager      (zdf_phy_init routine) 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/src/OFF/nemogcm.F90

    r13013 r15260  
    320320                           CALL ldf_tra_init    ! Lateral ocean tracer physics 
    321321                           CALL ldf_eiv_init    ! Eddy induced velocity param 
     322      IF( l_ldfeke     )   CALL ldf_eke_init    ! GEOMETRIC param. 
    322323                           CALL tra_ldf_init    ! lateral mixing 
    323324      IF( l_ldfslp     )   CALL ldf_slp_init    ! slope of lateral mixing 
  • NEMO/branches/NERC/dev_r4.0.6_GEOMETRIC/tests/CANAL/MY_SRC/diawri.F90

    r13284 r15260  
    212212      ENDIF 
    213213 
    214       CALL iom_put( "woce", wn )                   ! vertical velocity 
     214      !                                            ! vertical velocity 
     215      IF( ln_zad_Aimp ) THEN   ;   CALL iom_put( "woce", wn + wi )   ! explicit plus implicit parts 
     216      ELSE                     ;   CALL iom_put( "woce", wn ) 
     217      ENDIF 
     218 
    215219      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
    216          ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
    217          z2d(:,:) = rau0 * e1e2t(:,:) 
     220         !                     ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
    218221         DO jk = 1, jpk 
    219             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
     222            IF( ln_zad_Aimp ) THEN 
     223               z3d(:,:,jk) = rau0 * e1e2t(:,:) * ( wn(:,:,jk) + wi(:,:,jk) ) 
     224            ELSE 
     225               z3d(:,:,jk) = rau0 * e1e2t(:,:) * wn(:,:,jk) 
     226            ENDIF 
    220227         END DO 
    221228         CALL iom_put( "w_masstr" , z3d )   
    222          IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
     229         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d * z3d ) 
    223230      ENDIF 
    224231 
Note: See TracChangeset for help on using the changeset viewer.