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 9490 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA – NEMO

Ignore:
Timestamp:
2018-04-23T10:44:07+02:00 (6 years ago)
Author:
gm
Message:

#2075 - dev_merge_2017: scale-aware setting of lateral viscous and diffusive coefficient

Location:
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90

    r9168 r9490  
    197197      ENDIF 
    198198      ! 
    199       IF( ln_tradmp) THEN 
     199      IF( ln_tradmp ) THEN 
    200200         !                          ! Allocate arrays 
    201201         IF( tra_dmp_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 
     
    212212         !    so can damp to something other than intitial conditions files? 
    213213         !!gm: In principle yes. Nevertheless, we can't anticipate demands that have never been formulated. 
    214          IF( .NOT.ln_tsd_tradmp ) THEN 
     214         IF( .NOT.ln_tsd_dmp ) THEN 
    215215            IF(lwp) WRITE(numout,*) 
    216             IF(lwp) WRITE(numout, *)  '   read T-S data not initialized, we force ln_tsd_tradmp=T' 
     216            IF(lwp) WRITE(numout, *)  '   read T-S data not initialized, we force ln_tsd_dmp=T' 
    217217            CALL dta_tsd_init( ld_tradmp=ln_tradmp )        ! forces the initialisation of T-S data 
    218218         ENDIF 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90

    r9190 r9490  
    3737   PUBLIC   tra_ldf        ! called by step.F90  
    3838   PUBLIC   tra_ldf_init   ! called by nemogcm.F90  
    39    ! 
    40    INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_traldf_... (namlist logicals) 
    4139    
    4240   !! * Substitutions 
    4341#  include "vectopt_loop_substitute.h90" 
    4442   !!---------------------------------------------------------------------- 
    45    !! NEMO/OPA 3.7 , NEMO Consortium (2015) 
     43   !! NEMO/OPA 4.0 , NEMO Consortium (2018) 
    4644   !! $Id$  
    4745   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    6866      ENDIF 
    6967      ! 
    70       SELECT CASE ( nldf )                     !* compute lateral mixing trend and add it to the general trend 
     68      SELECT CASE ( nldf_tra )                 !* compute lateral mixing trend and add it to the general trend 
    7169      CASE ( np_lap   )                                  ! laplacian: iso-level operator 
    7270         CALL tra_ldf_lap  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb,      tsa, jpts,  1   ) 
     
    7674         CALL tra_ldf_triad( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb, tsb, tsa, jpts,  1   ) 
    7775      CASE ( np_blp , np_blp_i , np_blp_it )             ! bilaplacian: iso-level & iso-neutral operators 
    78          CALL tra_ldf_blp  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb      , tsa, jpts, nldf ) 
     76         CALL tra_ldf_blp  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb      , tsa, jpts, nldf_tra ) 
    7977      END SELECT 
    8078      ! 
     
    10199      !! ** Purpose :   Choice of the operator for the lateral tracer diffusion 
    102100      !! 
    103       !! ** Method  :   set nldf from the namtra_ldf logicals 
     101      !! ** Method  :   set nldf_tra from the namtra_ldf logicals 
    104102      !!---------------------------------------------------------------------- 
    105103      INTEGER ::   ioptio, ierr   ! temporary integers  
     
    112110         WRITE(numout,*) '   Namelist namtra_ldf: already read in ldftra module' 
    113111         WRITE(numout,*) '      see ldf_tra_init report for lateral mixing parameters' 
    114       ENDIF 
    115       !                                !==  use of lateral operator or not  ==! 
    116       nldf   = np_ERROR 
    117       ioptio = 0 
    118       IF( ln_traldf_NONE ) THEN   ;   nldf = np_no_ldf   ;   ioptio = ioptio + 1   ;   ENDIF 
    119       IF( ln_traldf_lap  ) THEN   ;                          ioptio = ioptio + 1   ;   ENDIF 
    120       IF( ln_traldf_blp  ) THEN   ;                          ioptio = ioptio + 1   ;   ENDIF 
    121       IF( ioptio /=  1   )   CALL ctl_stop( 'tra_ldf_init: use ONE of the 3 operator options (NONE/lap/blp)' ) 
    122       ! 
    123       IF( .NOT.ln_traldf_NONE ) THEN   !==  direction ==>> type of operator  ==! 
    124          ioptio = 0 
    125          IF( ln_traldf_lev )   ioptio = ioptio + 1 
    126          IF( ln_traldf_hor )   ioptio = ioptio + 1 
    127          IF( ln_traldf_iso )   ioptio = ioptio + 1 
    128          IF( ioptio /=  1  )   CALL ctl_stop( 'tra_ldf_init: use ONE direction (level/hor/iso)' ) 
     112         WRITE(numout,*) 
    129113         ! 
    130          !                                ! defined the type of lateral diffusion from ln_traldf_... logicals 
    131          ierr = 0 
    132          IF( ln_traldf_lap ) THEN         ! laplacian operator 
    133             IF ( ln_zco ) THEN               ! z-coordinate 
    134                IF ( ln_traldf_lev   )   nldf = np_lap     ! iso-level = horizontal (no rotation) 
    135                IF ( ln_traldf_hor   )   nldf = np_lap     ! iso-level = horizontal (no rotation) 
    136                IF ( ln_traldf_iso   )   nldf = np_lap_i   ! iso-neutral: standard  (   rotation) 
    137                IF ( ln_traldf_triad )   nldf = np_lap_it  ! iso-neutral: triad     (   rotation) 
    138             ENDIF 
    139             IF ( ln_zps ) THEN               ! z-coordinate with partial step 
    140                IF ( ln_traldf_lev   )   ierr = 1          ! iso-level not allowed  
    141                IF ( ln_traldf_hor   )   nldf = np_lap     ! horizontal             (no rotation) 
    142                IF ( ln_traldf_iso   )   nldf = np_lap_i   ! iso-neutral: standard     (rotation) 
    143                IF ( ln_traldf_triad )   nldf = np_lap_it  ! iso-neutral: triad        (rotation) 
    144             ENDIF 
    145             IF ( ln_sco ) THEN               ! s-coordinate 
    146                IF ( ln_traldf_lev   )   nldf = np_lap     ! iso-level              (no rotation) 
    147                IF ( ln_traldf_hor   )   nldf = np_lap_i   ! horizontal             (   rotation) 
    148                IF ( ln_traldf_iso   )   nldf = np_lap_i   ! iso-neutral: standard  (   rotation) 
    149                IF ( ln_traldf_triad )   nldf = np_lap_it  ! iso-neutral: triad     (   rotation) 
    150             ENDIF 
    151          ENDIF 
    152          ! 
    153          IF( ln_traldf_blp ) THEN         ! bilaplacian operator 
    154             IF ( ln_zco ) THEN               ! z-coordinate 
    155                IF ( ln_traldf_lev   )   nldf = np_blp     ! iso-level = horizontal (no rotation) 
    156                IF ( ln_traldf_hor   )   nldf = np_blp     ! iso-level = horizontal (no rotation) 
    157                IF ( ln_traldf_iso   )   nldf = np_blp_i   ! iso-neutral: standard  (   rotation) 
    158                IF ( ln_traldf_triad )   nldf = np_blp_it  ! iso-neutral: triad     (   rotation) 
    159             ENDIF 
    160             IF ( ln_zps ) THEN               ! z-coordinate with partial step 
    161                IF ( ln_traldf_lev   )   ierr = 1          ! iso-level not allowed  
    162                IF ( ln_traldf_hor   )   nldf = np_blp     ! horizontal             (no rotation) 
    163                IF ( ln_traldf_iso   )   nldf = np_blp_i   ! iso-neutral: standard  (   rotation) 
    164                IF ( ln_traldf_triad )   nldf = np_blp_it  ! iso-neutral: triad     (   rotation) 
    165             ENDIF 
    166             IF ( ln_sco ) THEN               ! s-coordinate 
    167                IF ( ln_traldf_lev   )   nldf = np_blp     ! iso-level              (no rotation) 
    168                IF ( ln_traldf_hor   )   nldf = np_blp_it  ! horizontal             (   rotation) 
    169                IF ( ln_traldf_iso   )   nldf = np_blp_i   ! iso-neutral: standard  (   rotation) 
    170                IF ( ln_traldf_triad )   nldf = np_blp_it  ! iso-neutral: triad     (   rotation) 
    171             ENDIF 
    172          ENDIF 
    173          IF( ierr == 1 )   CALL ctl_stop( 'iso-level in z-partial step, not allowed' ) 
    174       ENDIF 
    175       ! 
    176       IF( ln_ldfeiv .AND. .NOT.( ln_traldf_iso .OR. ln_traldf_triad ) )                                    & 
    177            &            CALL ctl_stop( 'eddy induced velocity on tracers requires iso-neutral laplacian diffusion' ) 
    178       IF( ln_isfcav .AND. ln_traldf_triad ) & 
    179            &            CALL ctl_stop( ' ice shelf cavity and traldf_triad not tested' ) 
    180            ! 
    181       IF(  nldf == np_lap_i .OR. nldf == np_lap_it .OR. & 
    182          & nldf == np_blp_i .OR. nldf == np_blp_it  )   l_ldfslp = .TRUE.    ! slope of neutral surfaces required  
    183       ! 
    184       IF(lwp) THEN 
    185          WRITE(numout,*) 
    186          SELECT CASE( nldf ) 
     114         SELECT CASE( nldf_tra )             ! print the choice of operator 
    187115         CASE( np_no_ldf )   ;   WRITE(numout,*) '   ==>>>   NO lateral diffusion' 
    188116         CASE( np_lap    )   ;   WRITE(numout,*) '   ==>>>   laplacian iso-level operator' 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap_blp.F90

    r9124 r9490  
    3333   PUBLIC   tra_ldf_blp   ! called by traldf.F90 
    3434 
    35    !                      ! Flag to control the type of lateral diffusive operator 
    36    INTEGER, PARAMETER, PUBLIC ::   np_ERROR  =-10   ! error in specification of lateral diffusion 
    37    INTEGER, PARAMETER, PUBLIC ::   np_no_ldf = 00   ! without operator (i.e. no lateral diffusive trend) 
    38    !                          !!      laplacian     !    bilaplacian    ! 
    39    INTEGER, PARAMETER, PUBLIC ::   np_lap    = 10   ,   np_blp    = 20  ! iso-level operator 
    40    INTEGER, PARAMETER, PUBLIC ::   np_lap_i  = 11   ,   np_blp_i  = 21  ! standard iso-neutral or geopotential operator 
    41    INTEGER, PARAMETER, PUBLIC ::   np_lap_it = 12   ,   np_blp_it = 22  ! triad    iso-neutral or geopotential operator 
    42  
    4335   LOGICAL  ::   l_ptr   ! flag to compute poleward transport 
    4436   LOGICAL  ::   l_hst   ! flag to compute heat transport 
Note: See TracChangeset for help on using the changeset viewer.