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 783 for trunk/NEMO/OPA_SRC/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2008-01-07T15:29:41+01:00 (16 years ago)
Author:
smasson
Message:

write multiple restarts, see ticket:44

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DOM/domain.F90

    r719 r783  
    181181      ndastp = ndate0                ! Assign initial date to current date 
    182182 
    183 ! ... Control of output frequency 
    184       IF ( nstock == 0 ) THEN 
    185           IF(lwp)WRITE(numout,cform_war) 
    186           IF(lwp)WRITE(numout,*) '           nstock = ', nstock, ' it is forced to ', nitend 
    187           nstock = nitend 
    188           nwarn = nwarn + 1 
     183      ! ... Control of output frequency 
     184      IF ( nstock == 0 .OR. nstock > nitend - nit000 + 1 ) THEN 
     185         WRITE(ctmp1,*) '           nstock = ', nstock, ' it is forced to ', nitend - nit000 + 1 
     186         CALL ctl_warn( ctmp1 ) 
     187         nstock = nitend - nit000 + 1 
    189188      ENDIF 
    190189      IF ( nwrite == 0 ) THEN 
    191           IF(lwp)WRITE(numout,cform_war) 
    192           IF(lwp)WRITE(numout,*) '           nwrite = ', nwrite, ' it is forced to ', nitend 
    193           nwrite = nitend 
    194           nwarn = nwarn + 1 
     190         WRITE(ctmp1,*) '           nwrite = ', nwrite, ' it is forced to ', nitend 
     191         CALL ctl_warn( ctmp1 ) 
     192         nwrite = nitend 
    195193      ENDIF 
    196194 
     
    261259      IF( lk_ice_lim ) THEN 
    262260         IF(lwp) WRITE(numout,*) '           ice model coupling frequency      nfice  = ', nfice 
     261         IF( MOD( nitend - nit000 + 1, nfice) /= 0 ) THEN  
     262            WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') is NOT a multiple of nfice (', nfice, ')' 
     263            CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' ) 
     264         ENDIF 
     265         IF( MOD( nstock             , nfice) /= 0 ) THEN  
     266            WRITE(ctmp1,*) 'nstock ('           , nstock             , ') is NOT a multiple of nfice (', nfice, ')' 
     267            CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' ) 
     268         ENDIF 
    263269         nfbulk = nfice 
    264          IF( MOD( rday, nfice*rdt ) /= 0 ) THEN  
    265             IF(lwp) WRITE(numout,*) ' ' 
    266             IF(lwp) WRITE(numout,*) 'W A R N I N G :  nfice is NOT a multiple of the number of time steps in a day' 
    267             IF(lwp) WRITE(numout,*) ' ' 
    268          ENDIF 
     270         IF( MOD( rday, nfice*rdt ) /= 0 )   CALL ctl_warn( 'nfice is NOT a multiple of the number of time steps in a day' ) 
    269271         IF(lwp) WRITE(numout,*) '           bulk computation frequency       nfbulk  = ', nfbulk, ' = nfice if ice model used' 
    270272         IF(lwp) WRITE(numout,*) '           flag closed sea or not           nclosea = ', nclosea 
Note: See TracChangeset for help on using the changeset viewer.