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 1537 for trunk/NEMO/OPA_SRC/TRA/tranpc.F90 – NEMO

Ignore:
Timestamp:
2009-07-24T16:22:23+02:00 (15 years ago)
Author:
ctlod
Message:

ensure the restartability of the 2nd order advection scheme,see ticket: 489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/tranpc.F90

    r1146 r1537  
    44   !! Ocean active tracers:  non penetrative convection scheme 
    55   !!============================================================================== 
    6    !! History :  1.0  !  90-09  (G. Madec)  Original code 
    7    !!                 !  91-11  (G. Madec) 
    8    !!                 !  92-06  (M. Imbard)  periodic conditions on t and s 
    9    !!                 !  93-03  (M. Guyon)  symetrical conditions  
    10    !!                 !  96-01  (G. Madec)  statement function for e3 
    11    !!                                       suppression of common work arrays 
    12    !!            8.5  !  02-06  (G. Madec)  free form F90 
    13    !!            9.0  !  08-06  (G. Madec)  applied on ta, sa and called before tranxt in step.F90 
    14    !!---------------------------------------------------------------------- 
    15  
    16    !!---------------------------------------------------------------------- 
    17    !!   tra_npc      : apply the non penetrative convection scheme 
    18    !!   tra_npc_init : initialization and control of the scheme 
     6   !! History :  1.0  ! 1990-09  (G. Madec)  Original code 
     7   !!                 ! 1996-01  (G. Madec)  statement function for e3 
     8   !!   NEMO     1.0  ! 2002-06  (G. Madec)  free form F90 
     9   !!            3.0  ! 2008-06  (G. Madec)  applied on ta, sa and called before tranxt in step.F90 
     10   !!---------------------------------------------------------------------- 
     11 
     12   !!---------------------------------------------------------------------- 
     13   !!   tra_npc : apply the non penetrative convection scheme 
    1914   !!---------------------------------------------------------------------- 
    2015   USE oce             ! ocean dynamics and active tracers  
    2116   USE dom_oce         ! ocean space and time domain 
     17   USE zdf_oce         ! ocean vertical physics 
    2218   USE trdmod          ! ocean active tracer trends 
    2319   USE trdmod_oce      ! ocean variables trends 
     
    3127   PUBLIC   tra_npc    ! routine called by step.F90 
    3228 
    33    !!* Namelist namnpc: non penetrative convection algorithm 
    34    INTEGER ::   nnpc1 =   1   ! nnpc1   non penetrative convective scheme frequency 
    35    INTEGER ::   nnpc2 =  15   ! nnpc2   non penetrative convective scheme print frequency 
    36  
    3729   !! * Substitutions 
    3830#  include "domzgr_substitute.h90" 
    3931   !!---------------------------------------------------------------------- 
    40    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     32   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    4133   !! $Id$  
    4234   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     
    7870      !!---------------------------------------------------------------------- 
    7971 
    80       IF( kt == nit000  )   CALL tra_npc_init   ! Initialisation 
    81  
    82       IF( MOD( kt, nnpc1 ) == 0 ) THEN 
     72      IF( MOD( kt, nn_npc ) == 0 ) THEN 
    8373 
    8474         inpcc = 0 
     
    214204         !  2. non penetrative convective scheme statistics 
    215205         !  ----------------------------------------------- 
    216          IF( nnpc2 /= 0 .AND. MOD( kt, nnpc2 ) == 0 ) THEN 
     206         IF( nn_npcp /= 0 .AND. MOD( kt, nn_npcp ) == 0 ) THEN 
    217207            IF(lwp) WRITE(numout,*)' kt=',kt, ' number of statically instable',   & 
    218208               &                   ' water column : ',inpcc, ' number of iteration : ',inpci 
     
    223213   END SUBROUTINE tra_npc 
    224214 
    225  
    226    SUBROUTINE tra_npc_init 
    227       !!---------------------------------------------------------------------- 
    228       !!                  ***  ROUTINE tra_npc_init  *** 
    229       !!                    
    230       !! ** Purpose :   initializations of the non-penetrative adjustment scheme 
    231       !!---------------------------------------------------------------------- 
    232       NAMELIST/namnpc/ nnpc1, nnpc2 
    233       ! 
    234       REWIND( numnam )           ! Namelist namzdf : vertical diffusion 
    235       READ  ( numnam, namnpc ) 
    236       ! 
    237       IF(lwp) THEN               ! Namelist print 
    238          WRITE(numout,*) 
    239          WRITE(numout,*) 'tra_npc_init : Non Penetrative Convection (npc) scheme' 
    240          WRITE(numout,*) '~~~~~~~~~~~~' 
    241          WRITE(numout,*) '       Namelist namnpc : set npc scheme parameters' 
    242          WRITE(numout,*) '          npc scheme frequency           nnpc1  = ', nnpc1 
    243          WRITE(numout,*) '          npc scheme print frequency     nnpc2  = ', nnpc2 
    244       ENDIF 
    245       ! 
    246       IF ( nnpc1 == 0 ) THEN      ! Parameter controls 
    247           IF(lwp) WRITE(numout,cform_war) 
    248           IF(lwp) WRITE(numout,*) '             nnpc1 = ', nnpc1, ' is forced to 1' 
    249           nnpc1 = 1 
    250           nwarn = nwarn + 1 
    251       ENDIF 
    252       ! 
    253    END SUBROUTINE tra_npc_init 
    254  
    255215   !!====================================================================== 
    256216END MODULE tranpc 
Note: See TracChangeset for help on using the changeset viewer.