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

Changeset 4775


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.

Location:
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/1_namelist_ref

    r4698 r4775  
    3636                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    3737   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input) 
     38   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts 
    3839   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output) 
     40   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts 
    3941   nn_istate   =       0   !  output the initial state (1) or not (0) 
    4042   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1) 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref

    r4329 r4775  
    1414!----------------------------------------------------------------------- 
    1515   cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input) 
     16   cn_icerst_indir = "."              !  directory from which to read input ice restarts 
    1617   cn_icerst_out = "restart_ice"      !  suffix of ice restart name (output) 
     18   cn_icerst_outdir = "."             !  directory in which to write output ice restarts 
    1719   ln_limdyn     = .true.             !  ice dynamics (T) or thermodynamics only (F) 
    1820   ln_limdmp     = .false.            !  restoring ice thickness and fraction leads   (T => fill  namice_dmp) 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref

    r4690 r4775  
    1515!----------------------------------------------------------------------- 
    1616   cn_icerst_in  = "restart_ice"   !  suffix of ice restart name (input) 
     17   cn_icerst_indir = "."           !  directory from which to read input ice restarts 
    1718   cn_icerst_out = "restart_ice"   !  suffix of ice restart name (output) 
     19   cn_icerst_outdir = "."          !  directory in which to write output ice restarts 
    1820   ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F) 
    1921   amax          = 0.999           !  maximum ice concentration 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ref

    r4699 r4775  
    3737                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart 
    3838   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input) 
     39   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts 
    3940   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output) 
     41   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts 
    4042   nn_istate   =       0   !  output the initial state (1) or not (0) 
    4143   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1) 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90

    r4306 r4775  
    2424   !                                                   !!* namicerun read in iceini  * 
    2525   CHARACTER(len=32)     , PUBLIC ::   cn_icerst_in     !: suffix of ice restart name (input) 
     26   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_indir  !: ice restart in directory 
    2627   CHARACTER(len=32)     , PUBLIC ::   cn_icerst_out    !: suffix of ice restart name (output) 
     28   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_outdir !: ice restart out directory 
    2729   LOGICAL               , PUBLIC ::   ln_limdyn        !: flag for ice dynamics (T) or not (F) 
    2830   LOGICAL               , PUBLIC ::   ln_limdmp        !: Ice damping 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90

    r4624 r4775  
    123123      !! ** input   :   Namelist namicerun 
    124124      !!------------------------------------------------------------------- 
    125       NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 
     125      NAMELIST/namicerun/ cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & 
     126                          ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 
    126127      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    127128      !!------------------------------------------------------------------- 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90

    r2528 r4775  
    5050      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    5151      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     52      CHARACTER(len=150)  ::   clpath   ! full path to ice output restart file 
    5253      !!---------------------------------------------------------------------- 
    5354      ! 
     
    6465         ! create the file 
    6566         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 
     67         clpath = TRIM(cn_icerst_outdir)  
     68         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/'  
    6669         IF(lwp) THEN 
    6770            WRITE(numout,*) 
    6871            SELECT CASE ( jprstlib ) 
    69             CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname 
    70             CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname 
     72            CASE ( jprstdimg ) 
     73               WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname 
     74            CASE DEFAULT 
     75               WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname 
    7176            END SELECT 
    7277            IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN    
     
    7681         ENDIF 
    7782 
    78          CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) 
     83         CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 
    7984         lrst_ice = .TRUE. 
    8085      ENDIF 
     
    188193        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    189194        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 
    190         INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
     195        INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
    191196        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    192197      ENDIF 
    193198 
    194       CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt ) 
     199      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt ) 
    195200 
    196201      CALL iom_get( numrir, 'kt_ice' , ziter ) 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/ice.F90

    r4688 r4775  
    393393   !                                                  !!: ** Namelist namicerun read in iceini ** 
    394394   CHARACTER(len=32)     , PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input) 
     395   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_indir !: ice restart input directory  
    395396   CHARACTER(len=32)     , PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output) 
     397   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_outdir!: ice restart output directory  
    396398   LOGICAL               , PUBLIC ::   ln_limdyn       !: flag for ice dynamics (T) or not (F) 
    397399   LOGICAL               , PUBLIC ::   ln_nicep        !: flag for sea-ice points output (T) or not (F) 
  • 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 ) 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r4624 r4775  
    135135      !!---------------------------------------------------------------------- 
    136136      USE ioipsl 
    137       NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   & 
     137      NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir,                                          & 
     138         &             nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   & 
    138139         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   & 
    139140         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler 
     
    169170         WRITE(numout,*) '      experiment name for output      cn_exp     = ', cn_exp 
    170171         WRITE(numout,*) '      file prefix restart input       cn_ocerst_in= ', cn_ocerst_in 
     172         WRITE(numout,*) '      restart input directory         cn_ocerst_indir= ', cn_ocerst_indir 
    171173         WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out 
     174         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir 
    172175         WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart 
    173176         WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90

    r4624 r4775  
    2626   CHARACTER(lc) ::   cn_exp           !: experiment name used for output filename 
    2727   CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input) 
     28   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory 
    2829   CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output) 
     30   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory 
    2931   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file 
    3032   INTEGER       ::   nn_no            !: job number 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90

    r4689 r4775  
    6161      INTEGER, DIMENSION(2,5), INTENT(in   ), OPTIONAL ::   kdompar     ! domain parameters:  
    6262 
    63       CHARACTER(LEN=100) ::   clinfo           ! info character 
    64       CHARACTER(LEN=100) ::   cltmp            ! temporary character 
     63      CHARACTER(LEN=256) ::   clinfo           ! info character 
     64      CHARACTER(LEN=256) ::   cltmp            ! temporary character 
    6565      INTEGER            ::   iln              ! lengths of character 
    6666      INTEGER            ::   istop            ! temporary storage of nstop 
     
    393393      INTEGER, DIMENSION(4) :: idimsz               ! dimensions size   
    394394      INTEGER, DIMENSION(4) :: idimid               ! dimensions id 
    395       CHARACTER(LEN=100)    :: clinfo               ! info character 
     395      CHARACTER(LEN=256)    :: clinfo               ! info character 
    396396      CHARACTER(LEN= 12), DIMENSION(4) :: cltmp     ! temporary character 
    397397      INTEGER               :: if90id               ! nf90 file identifier 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r4693 r4775  
    5757      !! 
    5858      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    59       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     59      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
     60      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file 
    6061      !!---------------------------------------------------------------------- 
    6162      ! 
     
    7980         ! create the file 
    8081         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 
     82         clpath = TRIM(cn_ocerst_outdir) 
     83         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
    8184         IF(lwp) THEN 
    8285            WRITE(numout,*) 
    8386            SELECT CASE ( jprstlib ) 
    84             CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: '//clname 
    85             CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: '//clname 
     87            CASE ( jprstdimg )   ;   WRITE(numout,*)                            & 
     88                '             open ocean restart binary file: ',TRIM(clpath)//clname 
     89            CASE DEFAULT         ;   WRITE(numout,*)                            & 
     90                '             open ocean restart NetCDF file: ',TRIM(clpath)//clname 
    8691            END SELECT 
    8792            IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression' 
     
    9196         ENDIF 
    9297         ! 
    93          CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
     98         CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
    9499         lrst_oce = .TRUE. 
    95100      ENDIF 
     
    171176           ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    172177           ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 
    173            INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
     178           INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
    174179           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    175180         ENDIF 
    176          CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 
     181         CALL iom_open( TRIM(cn_ocerst_indir)//'/'//cn_ocerst_in, numror, kiolib = jlibalt ) 
    177182      ENDIF 
    178183   END SUBROUTINE rst_read_open 
Note: See TracChangeset for help on using the changeset viewer.