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 5513 for trunk – NEMO

Changeset 5513 for trunk


Ignore:
Timestamp:
2015-06-30T11:59:46+02:00 (9 years ago)
Author:
cetlod
Message:

minor correction to be able to initialise passive tracers with climatologie or constant values in offline mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r5504 r5513  
    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)' ) 
     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         ! 
    228230         IF( lk_offline ) THEN     
    229231            !                                          ! set the date in offline mode 
Note: See TracChangeset for help on using the changeset viewer.