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

Changeset 5310


Ignore:
Timestamp:
2015-05-29T10:32:35+02:00 (9 years ago)
Author:
timgraham
Message:

Added functionality to TOP restarts

Location:
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/TOP_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r5235 r5310  
    177177        &                  cn_trcrst_in, cn_trcrst_out 
    178178 
     179 
    179180      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    180181 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r5235 r5310  
    5151      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character 
    5252      CHARACTER(LEN=50)   ::   clname   ! trc output restart file name 
     53      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file 
    5354      !!---------------------------------------------------------------------- 
    5455      ! 
     
    5657         IF( kt == nittrc000 ) THEN 
    5758            lrst_trc = .FALSE. 
    58             nitrst = nitend 
    59          ENDIF 
    60  
    61          IF( MOD( kt - 1, nstock ) == 0 ) THEN 
     59            IF( ln_rst_list ) THEN 
     60               nrst_lst = 1 
     61               nitrst = nstocklist( nrst_lst ) 
     62            ELSE 
     63               nitrst = nitend 
     64            ENDIF 
     65         ENDIF 
     66 
     67         IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 
    6268            ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 
    6369            nitrst = kt + nstock - 1                  ! define the next value of nitrst for restart writing 
     
    7985         IF(lwp) WRITE(numout,*) 
    8086         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_trcrst_out) 
    81          IF(lwp) WRITE(numout,*) '             open trc restart.output NetCDF file: '//clname 
    82          CALL iom_open( clname, numrtw, ldwrt = .TRUE., kiolib = jprstlib ) 
     87         clpath = TRIM(cn_ocerst_outdir) 
     88         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
     89         IF(lwp) WRITE(numout,*) & 
     90             '             open trc restart.output NetCDF file: ',TRIM(clpath)//clname 
     91         CALL iom_open( TRIM(clpath)//TRIM(clname), numrtw, ldwrt = .TRUE., kiolib = jprstlib ) 
    8392         lrst_trc = .TRUE. 
    8493      ENDIF 
     
    140149          lrst_trc = .FALSE. 
    141150#endif 
     151          IF( lk_offline .AND. ln_rst_list ) THEN 
     152             nrst_lst = nrst_lst + 1 
     153             nitrst = nstocklist( nrst_lst ) 
     154          ENDIF 
    142155      ENDIF 
    143156      ! 
     
    190203           ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    191204           ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90  
    192            INQUIRE( FILE = TRIM(cn_trcrst_in)//'.nc', EXIST = llok ) 
     205           INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_trcrst_in)//'.nc', EXIST = llok ) 
    193206           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    194207         ENDIF 
    195208 
    196          CALL iom_open( cn_trcrst_in, numrtr, kiolib = jlibalt ) 
     209         CALL iom_open( TRIM(cn_ocerst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt ) 
    197210 
    198211         CALL iom_get ( numrtr, 'kt', zkt )   ! last time-step of previous run 
Note: See TracChangeset for help on using the changeset viewer.