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 5948 for branches/2014/dev_r4650_UKMO12_CFL_diags_take2/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90 – NEMO

Ignore:
Timestamp:
2015-11-30T11:47:24+01:00 (8 years ago)
Author:
timgraham
Message:

Merged in head of trunk (r5936)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO12_CFL_diags_take2/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90

    r5947 r5948  
    2828   PUBLIC   tra_adv_mle_init   ! routine called in traadv.F90 
    2929 
    30    !                                               !!* namelist namtra_adv_mle * 
     30   !                                       !!* namelist namtra_adv_mle * 
    3131   LOGICAL, PUBLIC ::   ln_mle              ! flag to activate the Mixed Layer Eddy (MLE) parameterisation 
    3232   INTEGER         ::   nn_mle              ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
     
    3434   INTEGER         ::   nn_conv             ! =1 no MLE in case of convection ; =0 always MLE 
    3535   REAL(wp)        ::   rn_ce               ! MLE coefficient 
    36    !                                           ! parameters used in nn_mle = 0 case 
     36   !                                        ! parameters used in nn_mle = 0 case 
    3737   REAL(wp)        ::   rn_lf                  ! typical scale of mixed layer front 
    38    REAL(wp)        ::   rn_time             ! time scale for mixing momentum across the mixed layer 
    39    !                                             ! parameters used in nn_mle = 1 case 
    40    REAL(wp)        ::   rn_lat                   ! reference latitude for a 5 km scale of ML front 
    41    REAL(wp)        ::   rn_rho_c_mle         ! Density criterion for definition of MLD used by FK 
     38   REAL(wp)        ::   rn_time                ! time scale for mixing momentum across the mixed layer 
     39   !                                        ! parameters used in nn_mle = 1 case 
     40   REAL(wp)        ::   rn_lat                 ! reference latitude for a 5 km scale of ML front 
     41   REAL(wp)        ::   rn_rho_c_mle           ! Density criterion for definition of MLD used by FK 
    4242 
    4343   REAL(wp) ::   r5_21 = 5.e0 / 21.e0   ! factor used in mle streamfunction computation 
     
    5252#  include "vectopt_loop_substitute.h90" 
    5353   !!---------------------------------------------------------------------- 
    54    !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     54   !! NEMO/OPA 4.0 , NEMO Consortium (2015) 
    5555   !! $Id$ 
    5656   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     
    8080      !!             Fox-Kemper and Ferrari, JPO, 38, 1166-1179, 2008 
    8181      !!---------------------------------------------------------------------- 
    82       ! 
    8382      INTEGER                         , INTENT(in   ) ::   kt         ! ocean time-step index 
    8483      INTEGER                         , INTENT(in   ) ::   kit000     ! first time step index 
     
    9392      REAL(wp) ::   zcvw, zmvw   !   -      - 
    9493      REAL(wp) ::   zc                                     !   -      - 
    95  
     94      ! 
    9695      INTEGER  ::   ii, ij, ik              ! local integers 
    9796      INTEGER, DIMENSION(3) ::   ilocu      ! 
     
    101100      INTEGER, POINTER, DIMENSION(:,:) :: inml_mle 
    102101      !!---------------------------------------------------------------------- 
    103  
     102      ! 
    104103      IF( nn_timing == 1 )  CALL timing_start('tra_adv_mle') 
    105104      CALL wrk_alloc( jpi, jpj, zpsim_u, zpsim_v, zmld, zbm, zhu, zhv, zn2, zLf_NH, zLf_MH) 
     
    171170         DO jj = 1, jpjm1 
    172171            DO ji = 1, fs_jpim1   ! vector opt. 
    173                zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj)  * e2u(ji,jj)                                            & 
    174                   &           * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp          , e1u(ji,jj)                )   & 
    175                   &           / (         e1u(ji,jj)          * MAX( rn_lf * rfu(ji,jj) , SQRT( rb_c * zhu(ji,jj) ) )   ) 
     172               zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj)  * e2_e1u(ji,jj)                                            & 
     173                  &           * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) )   & 
     174                  &           / (  MAX( rn_lf * rfu(ji,jj) , SQRT( rb_c * zhu(ji,jj) ) )   ) 
    176175                  ! 
    177                zpsim_v(ji,jj) = rn_ce * zhv(ji,jj) * zhv(ji,jj)  * e1v(ji,jj)                                            & 
    178                   &           * ( zbm(ji,jj+1) - zbm(ji,jj) ) * MIN( 111.e3_wp          , e2v(ji,jj)                )   & 
    179                   &           / (         e2v(ji,jj)          * MAX( rn_lf * rfv(ji,jj) , SQRT( rb_c * zhv(ji,jj) ) )   ) 
     176               zpsim_v(ji,jj) = rn_ce * zhv(ji,jj) * zhv(ji,jj)  * e1_e2v(ji,jj)                                            & 
     177                  &           * ( zbm(ji,jj+1) - zbm(ji,jj) ) * MIN( 111.e3_wp , e2v(ji,jj) )   & 
     178                  &           / (  MAX( rn_lf * rfv(ji,jj) , SQRT( rb_c * zhv(ji,jj) ) )   ) 
    180179            END DO 
    181180         END DO 
     
    184183         DO jj = 1, jpjm1 
    185184            DO ji = 1, fs_jpim1   ! vector opt. 
    186                zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2u(ji,jj) / e1u(ji,jj)          & 
     185               zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2_e1u(ji,jj)               & 
    187186                  &                  * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) ) 
    188187                  ! 
    189                zpsim_v(ji,jj) = rc_f *   zhv(ji,jj)   * zhv(ji,jj)   * e1v(ji,jj) / e2v(ji,jj)          & 
     188               zpsim_v(ji,jj) = rc_f *   zhv(ji,jj)   * zhv(ji,jj)   * e1_e2v(ji,jj)               & 
    190189                  &                  * ( zbm(ji,jj+1) - zbm(ji,jj) ) * MIN( 111.e3_wp , e2v(ji,jj) ) 
    191190            END DO 
     
    252251         ! divide by cross distance to give streamfunction with dimensions m^2/s 
    253252         DO jk = 1, ikmax+1 
    254             zpsi_uw(:,:,jk) = zpsi_uw(:,:,jk)/e2u(:,:) 
    255             zpsi_vw(:,:,jk) = zpsi_vw(:,:,jk)/e1v(:,:) 
     253            zpsi_uw(:,:,jk) = zpsi_uw(:,:,jk) * r1_e2u(:,:) 
     254            zpsi_vw(:,:,jk) = zpsi_vw(:,:,jk) * r1_e1v(:,:) 
    256255         END DO 
    257256         CALL iom_put( "psiu_mle", zpsi_uw )    ! i-mle streamfunction 
     
    281280      NAMELIST/namtra_adv_mle/ ln_mle , nn_mle, rn_ce, rn_lf, rn_time, rn_lat, nn_mld_uv, nn_conv, rn_rho_c_mle 
    282281      !!---------------------------------------------------------------------- 
    283  
    284282 
    285283      REWIND( numnam_ref )              ! Namelist namtra_adv_mle in reference namelist : Tracer advection scheme 
Note: See TracChangeset for help on using the changeset viewer.