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

Changeset 1655


Ignore:
Timestamp:
2009-10-14T16:26:01+02:00 (15 years ago)
Author:
cetlod
Message:

Call to write restart in TOP not properly done, see ticket:43

File:
1 edited

Legend:

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

    r1473 r1655  
    5757      !!---------------------------------------------------------------------- 
    5858      ! 
     59# if ! defined key_off_tra 
    5960      IF( kt == nit000 ) lrst_trc = .FALSE.  
    60 # if defined key_off_tra 
     61# else 
     62      IF( kt == nit000 ) THEN 
     63        lrst_trc = .FALSE.  
     64        nitrst = nitend   
     65      ENDIF 
     66 
    6167      IF( MOD( kt - 1, nstock ) == 0 ) THEN 
    6268         ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 
     
    6470         IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run 
    6571      ENDIF 
    66 #endif 
    67        
    68       IF( kt == nitrst - ndttrc .OR. nitend - nit000 + 1 < 2 * ndttrc ) THEN 
    69          ! beware if model runs less than 2*ndttrc time step 
     72# endif 
     73     ! to get better performances with NetCDF format: 
     74     ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*ndttrc + 1) 
     75     ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*ndttrc + 1 
     76     IF( kt == nitrst - 2*ndttrc + 1 .OR. nstock == ndttrc .OR. ( kt == nitend - ndttrc + 1 .AND. .NOT. lrst_trc ) ) THEN 
    7077         ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    7178         IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
Note: See TracChangeset for help on using the changeset viewer.