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

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

changes to add restart directory names

Location:
branches/UKMO/2014_Surge_Modelling/NEMOGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/AMM7_SURGE/EXP00/namelist_ref

    r5746 r5750  
    3838                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    3939   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input) 
     40   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts 
    4041   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output) 
     42   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts 
    4143   nn_istate   =       0   !  output the initial state (1) or not (0) 
    4244   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1) 
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5746 r5750  
    3838                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    3939   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input) 
     40   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts 
    4041   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output) 
     42   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts 
    4143   nn_istate   =       0   !  output the initial state (1) or not (0) 
    4244   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1) 
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r5747 r5750  
    136136      !!---------------------------------------------------------------------- 
    137137      USE ioipsl 
    138 ! Added ln_rstdate, eventually should include separate branch for this 
    139       NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl,   & 
     138! Added ln_rstdate and rstdir, eventually should include separate branch for this 
     139      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   & 
     140         &             ln_rstdate, cn_ocerst_indir, cn_ocerst_outdir,                              & 
    140141         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   & 
    141142         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler 
     
    174175         WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart 
    175176         WRITE(numout,*) '      datestamping of restarts        ln_rstdate = ', ln_rstdate 
     177         WRITE(numout,*) '      restart input directory         cn_ocerst_indir= ', cn_ocerst_indir 
     178         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir 
    176179         WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler 
    177180         WRITE(numout,*) '      control of time step            nn_rstctl  = ', nn_rstctl 
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90

    r5746 r5750  
    4343   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file 
    4444   INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 
    45 ! included for rstdate, should be moved to seperate branch! 
     45! included for rstdate and rstdir, should be moved to seperate branch! 
    4646   LOGICAL       ::   ln_rstdate       !: datestamping of restarts 
     47   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory 
     48   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory 
    4749#if defined key_netcdf4 
    4850   !!---------------------------------------------------------------------- 
  • 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.