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 2038 for branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcrst.F90 – NEMO

Ignore:
Timestamp:
2010-08-02T12:57:40+02:00 (14 years ago)
Author:
cetlod
Message:

Apply the merge to passive tracers, see ticket:693

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcrst.F90

    r1970 r2038  
    2525   USE oce_trc 
    2626   USE trc 
    27    USE trctrp_lec 
     27   USE trcnam_trp 
    2828   USE lib_mpp 
    2929   USE iom 
     
    3333   USE trcrst_c14b     ! C14 bomb restart 
    3434   USE trcrst_my_trc   ! MY_TRC   restart 
    35 #if defined key_off_tra 
     35#if defined key_offline 
    3636    USE daymod 
    3737#endif 
     
    6767      !!---------------------------------------------------------------------- 
    6868      ! 
    69 # if ! defined key_off_tra 
     69# if ! defined key_offline 
    7070      IF( kt == nit000 ) lrst_trc = .FALSE.  
    7171# else 
     
    8282# endif 
    8383     ! to get better performances with NetCDF format: 
    84      ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*ndttrc + 1) 
    85      ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*ndttrc + 1 
    86      IF( kt == nitrst - 2*ndttrc + 1 .OR. nstock == ndttrc .OR. ( kt == nitend - ndttrc + 1 .AND. .NOT. lrst_trc ) ) THEN 
     84     ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 
     85     ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 
     86     IF( kt == nitrst - 2*nn_dttrc + 1 .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc + 1 .AND. .NOT. lrst_trc ) ) THEN 
    8787         ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    8888         IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
     
    222222      !! 
    223223      !!   According to namelist parameter nrstdt, 
    224       !!       nrsttr = 0  no control on the date (nittrc000 is  arbitrary). 
    225       !!       nrsttr = 1  we verify that nit000 is equal to the last 
     224      !!       nn_rsttr = 0  no control on the date (nittrc000 is  arbitrary). 
     225      !!       nn_rsttr = 1  we verify that nit000 is equal to the last 
    226226      !!                   time step of previous run + 1. 
    227227      !!       In both those options, the  exact duration of the experiment 
     
    230230      !!       This is valid is the time step has remained constant. 
    231231      !! 
    232       !!       nrsttr = 2  the duration of the experiment in days (adatrj) 
     232      !!       nn_rsttr = 2  the duration of the experiment in days (adatrj) 
    233233      !!                    has been stored in the restart file. 
    234234      !!---------------------------------------------------------------------- 
     
    237237      ! 
    238238      REAL(wp) ::  zkt 
    239 #if defined key_off_tra 
     239#if defined key_offline 
    240240      REAL(wp) ::  zndastp 
    241241#endif 
     
    250250            WRITE(numout,*) '   previous time-step                               : ', NINT( zkt ) 
    251251            WRITE(numout,*) ' *** restart option' 
    252             SELECT CASE ( nrsttr ) 
    253             CASE ( 0 )   ;   WRITE(numout,*) ' nrsttr = 0 : no control of nittrc000' 
    254             CASE ( 1 )   ;   WRITE(numout,*) ' nrsttr = 1 : no control the date at nit000 (use ndate0 read in the namelist)' 
    255             CASE ( 2 )   ;   WRITE(numout,*) ' nrsttr = 2 : calendar parameters read in restart' 
     252            SELECT CASE ( nn_rsttr ) 
     253            CASE ( 0 )   ;   WRITE(numout,*) ' nn_rsttr = 0 : no control of nittrc000' 
     254            CASE ( 1 )   ;   WRITE(numout,*) ' nn_rsttr = 1 : no control the date at nit000 (use ndate0 read in the namelist)' 
     255            CASE ( 2 )   ;   WRITE(numout,*) ' nn_rsttr = 2 : calendar parameters read in restart' 
    256256            END SELECT 
    257257            WRITE(numout,*) 
    258258         ENDIF 
    259259         ! Control of date  
    260          IF( nittrc000  - NINT( zkt ) /= 1 .AND.  nrsttr /= 0 )                                  & 
     260         IF( nittrc000  - NINT( zkt ) /= 1 .AND.  nn_rsttr /= 0 )                                  & 
    261261            &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 & 
    262             &                  ' verify the restart file or rerun with nrsttr = 0 (namelist)' ) 
    263 #if defined key_off_tra 
     262            &                  ' verify the restart file or rerun with nn_rsttr = 0 (namelist)' ) 
     263#if defined key_offline 
    264264         ! define ndastp and adatrj 
    265          IF ( nrsttr == 2 ) THEN 
     265         IF ( nn_rsttr == 2 ) THEN 
    266266            CALL iom_get( numrtr, 'ndastp', zndastp )  
    267267            ndastp = NINT( zndastp ) 
     
    329329               DO ji = 1, jpi 
    330330                  zvol = cvol(ji,jj,jk) 
    331 #  if defined key_off_degrad 
     331#  if defined key_degrad 
    332332                  zvol = zvol * facvol(ji,jj,jk) 
    333333#  endif 
Note: See TracChangeset for help on using the changeset viewer.