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

Changeset 2958


Ignore:
Timestamp:
2011-10-19T11:00:38+02:00 (13 years ago)
Author:
agn
Message:

Edited trcadv.F90 to only add the eiv transport if ln_traldf_grif is false
Removed warning from traldf_iso_grif.F90 and prevent duplicate allocation of ah_slp2 etc
Modified trcldf.F90 to use tra_ldf_iso_grif; removed whitespace

Location:
branches/2011/dev_r2782_NOCS_Griffies/NEMOGCM/NEMO
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2782_NOCS_Griffies/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90

    r2840 r2958  
    127127      !zdkt(1:jpi,1:jpj,0:1) => wrk_3d_9(:,:,1:2) 
    128128 
    129       IF( kt == nit000 )  THEN 
     129      IF( kt == nit000.AND..NOT.ALLOCATED(ah_wslp2) )  THEN 
    130130         IF(lwp) WRITE(numout,*) 
    131131         IF(lwp) WRITE(numout,*) 'tra_ldf_iso_grif : rotated laplacian diffusion operator on ', cdtype 
    132          IF(lwp) WRITE(numout,*) '                   WARNING: STILL UNDER TEST, NOT RECOMMENDED. USE AT YOUR OWN PERIL' 
    133132         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    134133         ALLOCATE( ah_wslp2(jpi,jpj,jpk) , zdkt(jpi,jpj,0:1), STAT=ierr ) 
  • branches/2011/dev_r2782_NOCS_Griffies/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r2715 r2958  
    103103 
    104104      !                                                   ! add the eiv transport (if necessary) 
    105       IF( lk_traldf_eiv )   CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRC' ) 
     105      IF( lk_traldf_eiv .AND. .NOT. ln_traldf_grif )   & 
     106         &              CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRC' )          ! add the eiv transport (if necessary) 
    106107      ! 
    107108      SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==! 
  • branches/2011/dev_r2782_NOCS_Griffies/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r2840 r2958  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  trcldf  *** 
    4    !! Ocean Passive tracers : lateral diffusive trends  
     4   !! Ocean Passive tracers : lateral diffusive trends 
    55   !!===================================================================== 
    66   !! History :  9.0  ! 2005-11 (G. Madec)  Original code 
    7    !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA  
     7   !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA 
    88   !!---------------------------------------------------------------------- 
    99#if defined key_top 
     
    2323   USE traldf_bilap    ! lateral mixing            (tra_ldf_bilap routine) 
    2424   USE traldf_iso      ! lateral mixing            (tra_ldf_iso routine) 
     25   USE traldf_iso_grif ! lateral mixing          (tra_ldf_iso_grif routine) 
    2526   USE traldf_lap      ! lateral mixing            (tra_ldf_lap routine) 
    2627   USE trdmod_oce 
     
    3132   PRIVATE 
    3233 
    33    PUBLIC   trc_ldf    ! called by step.F90  
     34   PUBLIC   trc_ldf    ! called by step.F90 
    3435   !                                                 !!: ** lateral mixing namelist (nam_trcldf) ** 
    3536   INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 
     
    3940   !!---------------------------------------------------------------------- 
    4041   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    41    !! $Id$  
     42   !! $Id$ 
    4243   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4344   !!---------------------------------------------------------------------- 
     
    4849      !!---------------------------------------------------------------------- 
    4950      !!                  ***  ROUTINE tra_ldf  *** 
    50       !!  
     51      !! 
    5152      !! ** Purpose :   compute the lateral ocean tracer physics. 
    5253      !! 
     
    6162      IF( kt == nit000 )   CALL ldf_ctl          ! initialisation & control of options 
    6263 
    63       IF( l_trdtrc )  THEN  
     64      IF( l_trdtrc )  THEN 
    6465         ALLOCATE( ztrtrd(jpi,jpj,jpk,jptra) )  ! temporary save of trends 
    6566         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
     
    6869      SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
    6970      CASE ( 0 )   ;   CALL tra_ldf_lap   ( kt, 'TRC', gtru, gtrv, trb, tra, jptra            )  ! iso-level laplacian 
    70       CASE ( 1 )   ;   CALL tra_ldf_iso   ( kt, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 )  ! rotated laplacian  
     71      CASE ( 1 ) 
     72         IF( ln_traldf_grif ) THEN 
     73            CALL tra_ldf_iso_grif( kt, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     74         ELSE 
     75            CALL tra_ldf_iso   ( kt, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     76         ENDIF 
    7177      CASE ( 2 )   ;   CALL tra_ldf_bilap ( kt, 'TRC', gtru, gtrv, trb, tra, jptra            )  ! iso-level bilaplacian 
    7278      CASE ( 3 )   ;   CALL tra_ldf_bilapg( kt, 'TRC',             trb, tra, jptra            )  ! s-coord. horizontal bilaplacian 
     
    96102           CALL trd_tra( kt, 'TRC', jn, jptra_trd_ldf, ztrtrd(:,:,:,jn) ) 
    97103        END DO 
    98         DEALLOCATE( ztrtrd )  
     104        DEALLOCATE( ztrtrd ) 
    99105      ENDIF 
    100106      !                                          ! print mean trends (used for debugging) 
     
    110116      !!---------------------------------------------------------------------- 
    111117      !!                  ***  ROUTINE ldf_ctl  *** 
    112       !!  
     118      !! 
    113119      !! ** Purpose :   Choice of the operator for the lateral tracer diffusion 
    114120      !! 
    115121      !! ** Method  :   set nldf from the namtra_ldf logicals 
    116       !!      nldf == -2   No lateral diffusion   
     122      !!      nldf == -2   No lateral diffusion 
    117123      !!      nldf == -1   ESOPA test: ALL operators are used 
    118124      !!      nldf ==  0   laplacian operator 
     
    121127      !!      nldf ==  3   Rotated bilaplacian 
    122128      !!---------------------------------------------------------------------- 
    123       INTEGER ::   ioptio, ierr         ! temporary integers  
     129      INTEGER ::   ioptio, ierr         ! temporary integers 
    124130      !!---------------------------------------------------------------------- 
    125131 
    126132      !  Define the lateral mixing oparator for tracers 
    127133      ! =============================================== 
    128      
     134 
    129135      !                               ! control the input 
    130136      ioptio = 0 
     
    167173         ENDIF 
    168174         IF ( ln_zps ) THEN             ! z-coordinate 
    169             IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed  
     175            IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed 
    170176            IF ( ln_trcldf_hor   )   nldf = 2      ! horizontal (no rotation) 
    171177            IF ( ln_trcldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
Note: See TracChangeset for help on using the changeset viewer.