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 5532 for branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/TOP_SRC/trcrst.F90 – NEMO

Ignore:
Timestamp:
2015-07-02T15:49:24+02:00 (9 years ago)
Author:
davestorkey
Message:

Update UKMO/dev_r5021_nn_etau_revision branch to rev 5518 of trunk
(=branching point for NEMO 3.6_stable).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r5446 r5532  
    207207         ENDIF 
    208208 
    209          CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt ) 
    210  
    211          CALL iom_get ( numrtr, 'kt', zkt )   ! last time-step of previous run 
    212  
    213          IF(lwp) THEN 
    214             WRITE(numout,*) ' *** Info read in restart : ' 
    215             WRITE(numout,*) '   previous time-step                               : ', NINT( zkt ) 
    216             WRITE(numout,*) ' *** restart option' 
    217             SELECT CASE ( nn_rsttr ) 
    218             CASE ( 0 )   ;   WRITE(numout,*) ' nn_rsttr = 0 : no control of nittrc000' 
    219             CASE ( 1 )   ;   WRITE(numout,*) ' nn_rsttr = 1 : no control the date at nittrc000 (use ndate0 read in the namelist)' 
    220             CASE ( 2 )   ;   WRITE(numout,*) ' nn_rsttr = 2 : calendar parameters read in restart' 
    221             END SELECT 
    222             WRITE(numout,*) 
    223          ENDIF 
    224          ! Control of date  
    225          IF( nittrc000  - NINT( zkt ) /= nn_dttrc .AND.  nn_rsttr /= 0 )                                  & 
    226             &   CALL ctl_stop( ' ===>>>> : problem with nittrc000 for the restart',                 & 
    227             &                  ' verify the restart file or rerun with nn_rsttr = 0 (namelist)' ) 
    228          IF( lk_offline ) THEN      ! set the date in offline mode 
    229             ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
    230             IF( iom_varid( numrtr, 'rdttrc1', ldstop = .FALSE. ) > 0 )   THEN 
    231                CALL iom_get( numrtr, 'rdttrc1', zrdttrc1 ) 
    232                IF( zrdttrc1 /= rdt * nn_dttrc )   neuler = 0 
    233             ENDIF 
    234             !                          ! define ndastp and adatrj 
    235             IF( nn_rsttr == 2 ) THEN 
     209         IF( ln_rsttr ) THEN 
     210            CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt ) 
     211            CALL iom_get ( numrtr, 'kt', zkt )   ! last time-step of previous run 
     212 
     213            IF(lwp) THEN 
     214               WRITE(numout,*) ' *** Info read in restart : ' 
     215               WRITE(numout,*) '   previous time-step                               : ', NINT( zkt ) 
     216               WRITE(numout,*) ' *** restart option' 
     217               SELECT CASE ( nn_rsttr ) 
     218               CASE ( 0 )   ;   WRITE(numout,*) ' nn_rsttr = 0 : no control of nittrc000' 
     219               CASE ( 1 )   ;   WRITE(numout,*) ' nn_rsttr = 1 : no control the date at nittrc000 (use ndate0 read in the namelist)' 
     220               CASE ( 2 )   ;   WRITE(numout,*) ' nn_rsttr = 2 : calendar parameters read in restart' 
     221               END SELECT 
     222               WRITE(numout,*) 
     223            ENDIF 
     224            ! Control of date  
     225            IF( nittrc000  - NINT( zkt ) /= nn_dttrc .AND.  nn_rsttr /= 0 )                                  & 
     226               &   CALL ctl_stop( ' ===>>>> : problem with nittrc000 for the restart',                 & 
     227               &                  ' verify the restart file or rerun with nn_rsttr = 0 (namelist)' ) 
     228         ENDIF 
     229         ! 
     230         IF( lk_offline ) THEN     
     231            !                                          ! set the date in offline mode 
     232            IF( ln_rsttr .AND. nn_rsttr == 2 ) THEN 
    236233               CALL iom_get( numrtr, 'ndastp', zndastp )  
    237234               ndastp = NINT( zndastp ) 
    238235               CALL iom_get( numrtr, 'adatrj', adatrj  ) 
    239             ELSE 
     236             ELSE 
    240237               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam 
    241238               adatrj = ( REAL( nittrc000-1, wp ) * rdttra(1) ) / rday 
     
    248245              WRITE(numout,*) '   number of elapsed days since the begining of run : ', adatrj 
    249246              WRITE(numout,*) 
     247            ENDIF 
     248            ! 
     249            IF( ln_rsttr )  THEN   ;    neuler = 1 
     250            ELSE                   ;    neuler = 0 
    250251            ENDIF 
    251252            ! 
Note: See TracChangeset for help on using the changeset viewer.