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 811 for branches/dev_001_SBC/NEMO/LIM_SRC/limrst.F90 – NEMO

Ignore:
Timestamp:
2008-02-07T17:00:12+01:00 (16 years ago)
Author:
ctlod
Message:

dev_001_SBC: merge with the trunk last changesets: #780, 782, 783, 784, 785, 788, 789, 793, 794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_001_SBC/NEMO/LIM_SRC/limrst.F90

    r717 r811  
    5454      !!---------------------------------------------------------------------- 
    5555      ! 
    56       IF( kt == nit000 )   lrst_ice = .FALSE. 
    57        
    58       IF( kt == nitrst - 2*nn_fsbc + 1 .OR.  nitend - nit000 + 1 <= nn_fsbc ) THEN 
    59          ! beware if model runs less than nn_fsbc + 1 time step 
    60          ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    61          IF( nitrst > 1.0e9 ) THEN    
    62             WRITE(clkt,*) nitrst 
    63          ELSE 
    64             WRITE(clkt,'(i8.8)') nitrst 
     56      IF( kt == nit000 )   lrst_ice = .FALSE.   ! default definition 
     57       
     58      ! to get better performances with NetCDF format: 
     59      ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 
     60      ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 
     61      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 
     62         ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
     63         IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     64         ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
    6565         ENDIF 
    6666         ! create the file 
    67          IF(lwp) WRITE(numout,*) 
    6867         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_ice" 
    69          IF(lwp) WRITE(numout,*) '             open ice restart.output NetCDF file: '//clname 
     68         IF(lwp) THEN 
     69            WRITE(numout,*) 
     70            SELECT CASE ( jprstlib ) 
     71            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname 
     72            CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname 
     73            END SELECT 
     74            IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN    
     75               WRITE(numout,*)         '             kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 
     76            ELSE   ;   WRITE(numout,*) '             kt = '                         , kt,' date= ', ndastp 
     77            ENDIF 
     78         ENDIF 
     79 
    7080         CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) 
    7181         lrst_ice = .TRUE. 
     
    8696      !!---------------------------------------------------------------------- 
    8797 
    88       iter = kt + nn_fsbc - 1 
     98      iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
    8999 
    90100      IF( iter == nitrst ) THEN 
    91101         IF(lwp) WRITE(numout,*) 
    92          IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart.output NetCDF file  kt =', kt 
     102         IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart file  kt =', kt 
    93103         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~' 
    94104      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.