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 5750 for branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2015-09-16T11:40:14+02:00 (9 years ago)
Author:
rfurner
Message:

changes to add restart directory names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5746 r5750  
    5959      !! 
    6060      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    61       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     61      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
     62      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file 
    6263! Included for ln_rstdate 
    6364      INTEGER             ::   iyear, imonth, iday 
     
    9596         ! create the file 
    9697         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 
     98         clpath = TRIM(cn_ocerst_outdir) 
     99         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
     100         ! 
    97101         IF(lwp) THEN 
    98102            WRITE(numout,*) 
     
    107111         ENDIF 
    108112         ! 
    109          CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
     113         CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
    110114         lrst_oce = .TRUE. 
    111115      ENDIF 
     
    170174      INTEGER  ::   jlibalt = jprstlib 
    171175      LOGICAL  ::   llok 
     176      CHARACTER(lc)  ::   clpath   ! full path to ocean output restart file 
    172177      !!---------------------------------------------------------------------- 
    173178 
     
    183188         ENDIF 
    184189 
     190         clpath = TRIM(cn_ocerst_indir) 
     191         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
    185192         IF ( jprstlib == jprstdimg ) THEN 
    186193           ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    187194           ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 
    188            INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
     195           INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
    189196           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    190197         ENDIF 
    191          CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 
     198         CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt ) 
    192199      ENDIF 
    193200   END SUBROUTINE rst_read_open 
Note: See TracChangeset for help on using the changeset viewer.