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 4775 for branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90 – NEMO

Ignore:
Timestamp:
2014-09-18T19:06:14+02:00 (10 years ago)
Author:
edblockley
Message:

First round of chnages for restart functionality branch (UKMO11).

These changes add namelist variables to allow the user to specify the directory to read input restart files and write output restart files for NEMO & LIM2/3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90

    r4688 r4775  
    5555      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character 
    5656      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     57      CHARACTER(len=150)  ::   clpath   ! full path to ice output restart file  
    5758      !!---------------------------------------------------------------------- 
    5859      ! 
     
    7071         ! create the file 
    7172         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 
     73         clpath = TRIM(cn_icerst_outdir)  
     74         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 
    7275         IF(lwp) THEN 
    7376            WRITE(numout,*) 
    7477            SELECT CASE ( jprstlib ) 
    75             CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname 
    76             CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname 
     78            CASE ( jprstdimg ) 
     79               WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname 
     80            CASE DEFAULT 
     81               WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname 
    7782            END SELECT 
    7883            IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN    
     
    8287         ENDIF 
    8388         ! 
    84          CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) 
     89         CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 
    8590         lrst_ice = .TRUE. 
    8691      ENDIF 
     
    142147         CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    143148      END DO 
    144        
     149 
    145150      DO jl = 1, jpl  
    146151         WRITE(zchar,'(I1)') jl 
     
    329334        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    330335        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 
    331         INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
     336        INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
    332337        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    333338      ENDIF 
    334339 
    335       CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib ) 
     340      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib ) 
    336341 
    337342      CALL iom_get( numrir, 'nn_fsbc', zfice ) 
Note: See TracChangeset for help on using the changeset viewer.