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 3890 for branches/2013/dev_r3858_NOC_ZTC – NEMO

Ignore:
Timestamp:
2013-04-23T15:44:05+02:00 (11 years ago)
Author:
acc
Message:

Branch 2013/dev_r3858_NOC_ZTC, #863. Changes to make new vvl code restartable. Vertical scale factors are read in dom_vvl_init which is called from domain before istate. Introduced rst_read_open in restart.F90 so that the restart file can be optionally opened in advance of the call to rst_read

Location:
branches/2013/dev_r3858_NOC_ZTC/NEMOGCM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r3887 r3890  
    306306 
    307307   cn_dir      = './'       !  root directory for the location of the bulk files 
    308    rn_pref     = 101000._wp !  reference atmospheric pressure   [N/m2]/ 
     308   rn_pref     = 101000.e0 !  reference atmospheric pressure   [N/m2]/ 
    309309   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F) 
    310310   ln_apr_obc  = .false.    !  inverse barometer added to OBC ssh data 
     
    646646   ln_vvl_layer  = .false.          !  full layer vertical coordinate 
    647647   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar 
    648    rn_ahe3       = 0.e0             !  thickness diffusion coefficient  
    649    rn_rst_e3t    = 30._wp           ! ztilde to zstar restoration timescale [days] 
    650    rn_lf_cutoff  = 5.0_wp           ! cutoff frequency for low-pass filter  [days] 
    651    rn_zdef_max   = 0.9_wp           ! maximum fractional e3t deformation 
     648   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient  
     649   rn_rst_e3t    = 30.e0            ! ztilde to zstar restoration timescale [days] 
     650   rn_lf_cutoff  = 5.0e0            ! cutoff frequency for low-pass filter  [days] 
     651   rn_zdef_max   = 0.9e0            ! maximum fractional e3t deformation 
    652652   ln_vvl_dbg    = .true.           !  debug prints    (T/F) 
    653653/ 
  • branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r3887 r3890  
    702702         !                                   ! =============== 
    703703         IF( ln_rstart ) THEN                   !* Read the restart file 
     704            CALL rst_read_open                  !  open the restart file if necessary 
    704705            id1 = iom_varid( numror, 'fse3t_b', ldstop = .FALSE. ) 
    705706            id2 = iom_varid( numror, 'fse3t_n', ldstop = .FALSE. ) 
  • branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r3867 r3890  
    2929   PRIVATE 
    3030 
    31    PUBLIC   rst_opn    ! routine called by step module 
    32    PUBLIC   rst_write  ! routine called by step module 
    33    PUBLIC   rst_read   ! routine called by opa  module 
     31   PUBLIC   rst_opn         ! routine called by step module 
     32   PUBLIC   rst_write       ! routine called by step module 
     33   PUBLIC   rst_read        ! routine called by istate module 
     34   PUBLIC   rst_read_open   ! routine called in rst_read and (possibly) in dom_vvl_init 
    3435 
    3536   !! * Substitutions 
     
    138139   END SUBROUTINE rst_write 
    139140 
     141   SUBROUTINE rst_read_open 
     142      !!----------------------------------------------------------------------  
     143      !!                   ***  ROUTINE rst_read_open  *** 
     144      !!  
     145      !! ** Purpose :   Open read files for restart (format fixed by jprstlib ) 
     146      !!  
     147      !! ** Method  :   Use a non-zero, positive value of numror to assess whether or not 
     148      !!                the file has already been opened 
     149      !!---------------------------------------------------------------------- 
     150      INTEGER  ::   jlibalt = jprstlib 
     151      LOGICAL  ::   llok 
     152      !!---------------------------------------------------------------------- 
     153 
     154      IF( numror .LE. 0 ) THEN 
     155         IF(lwp) THEN                                             ! Contol prints 
     156            WRITE(numout,*) 
     157            SELECT CASE ( jprstlib ) 
     158            CASE ( jpnf90    )   ;   WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 
     159            CASE ( jprstdimg )   ;   WRITE(numout,*) 'rst_read : read oce binary restart file' 
     160            END SELECT 
     161            IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support' 
     162            WRITE(numout,*) '~~~~~~~~' 
     163         ENDIF 
     164 
     165         IF ( jprstlib == jprstdimg ) THEN 
     166           ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     167           ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 
     168           INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
     169           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     170         ENDIF 
     171         CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 
     172      ENDIF 
     173   END SUBROUTINE rst_read_open 
    140174 
    141175   SUBROUTINE rst_read 
     
    148182      !!---------------------------------------------------------------------- 
    149183      REAL(wp) ::   zrdt, zrdttra1 
    150       INTEGER  ::   jk, jlibalt = jprstlib 
     184      INTEGER  ::   jk 
    151185      LOGICAL  ::   llok 
    152186      !!---------------------------------------------------------------------- 
    153187 
    154       IF(lwp) THEN                                             ! Contol prints 
    155          WRITE(numout,*) 
    156          SELECT CASE ( jprstlib ) 
    157          CASE ( jpnf90    )   ;   WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 
    158          CASE ( jprstdimg )   ;   WRITE(numout,*) 'rst_read : read oce binary restart file' 
    159          END SELECT 
    160          IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support' 
    161          WRITE(numout,*) '~~~~~~~~' 
    162       ENDIF 
    163  
    164       IF ( jprstlib == jprstdimg ) THEN 
    165         ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    166         ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 
    167         INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
    168         IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    169       ENDIF 
    170       CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 
     188      CALL rst_read_open           ! open restart for reading (if not already opened) 
    171189 
    172190      ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
Note: See TracChangeset for help on using the changeset viewer.