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.
restart.F90 in NEMO/trunk/src/OCE/IOM – NEMO

source: NEMO/trunk/src/OCE/IOM/restart.F90

Last change on this file was 15141, checked in by smasson, 3 years ago

trunk: avoid implicit loops in diawri

  • Property svn:keywords set to Id
File size: 20.3 KB
RevLine 
[3]1MODULE restart
2   !!======================================================================
3   !!                     ***  MODULE  restart  ***
4   !! Ocean restart :  write the ocean restart file
[508]5   !!======================================================================
[2528]6   !! History :  OPA  !  1999-11  (M. Imbard)  Original code
7   !!   NEMO     1.0  !  2002-08  (G. Madec)  F90: Free form
8   !!            2.0  !  2006-07  (S. Masson)  use IOM for restart
9   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  modified LF-RA
10   !!            - -  !  2010-10  (C. Ethe, G. Madec) TRC-TRA merge (T-S in 4D)
[5836]11   !!            3.7  !  2014-01  (G. Madec) suppression of curl and hdiv from the restart
12   !!             -   !  2014-12  (G. Madec) remove KPP scheme
[14139]13   !!            4.1  !  2020-11  (S. Techene, G. Madec)  move ssh initiatlisation in rst_read_ssh
14   !!             -   !                                   add restart in Shallow Water Eq. case
[508]15   !!----------------------------------------------------------------------
[3]16
17   !!----------------------------------------------------------------------
[14139]18   !!   rst_opn       : open the ocean restart file for writting
19   !!   rst_write     : write the ocean restart file
20   !!   rst_read_open : open the restart file for reading
21   !!   rst_read      : read the ocean restart file
22   !!   rst_read_ssh  : ssh set from restart or domcfg.nc file or usr_def_istat_ssh
[3]23   !!----------------------------------------------------------------------
[14139]24   USE oce            ! ocean dynamics and tracers
25   USE dom_oce        ! ocean space and time domain
26   USE sbc_ice        ! only lk_si3
27   USE phycst         ! physical constants
28   USE eosbn2         ! equation of state
29   USE wet_dry        ! Wetting/Drying flux limiting
30   USE usrdef_istate, ONLY : usr_def_istate_ssh   ! user defined ssh initial state
31   USE trdmxl_oce     ! ocean active mixed layer tracers trends variables
32   USE diu_bulk       ! ???
[5836]33   !
[14139]34   USE in_out_manager ! I/O manager
35   USE iom            ! I/O module
36   USE lib_mpp        ! distribued memory computing library
[9367]37
[3]38   IMPLICIT NONE
39   PRIVATE
40
[14139]41   PUBLIC   rst_opn         ! called by step.F90
42   PUBLIC   rst_write       ! called by step.F90
43   PUBLIC   rst_read_open   ! called in rst_read_ssh
44   PUBLIC   rst_read        ! called by istate.F90
45   PUBLIC   rst_read_ssh    ! called by domain.F90
46   
47   !! * Substitutions
48#  include "do_loop_substitute.h90"
[14179]49#  include "domzgr_substitute.h90"
[3]50   !!----------------------------------------------------------------------
[9598]51   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
[888]52   !! $Id$
[10068]53   !! Software governed by the CeCILL license (see ./LICENSE)
[359]54   !!----------------------------------------------------------------------
[3]55CONTAINS
56
[508]57   SUBROUTINE rst_opn( kt )
58      !!---------------------------------------------------------------------
59      !!                   ***  ROUTINE rst_opn  ***
[14072]60      !!
61      !! ** Purpose : + initialization (should be read in the namelist) of nitrst
[508]62      !!              + open the restart when we are one time step before nitrst
63      !!                   - restart header is defined when kt = nitrst-1
64      !!                   - restart data  are written when kt = nitrst
65      !!              + define lrst_oce to .TRUE. when we need to define or write the restart
66      !!----------------------------------------------------------------------
67      INTEGER, INTENT(in) ::   kt     ! ocean time-step
68      !!
69      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
[5341]70      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name
71      CHARACTER(lc)       ::   clpath   ! full path to ocean output restart file
[9367]72      CHARACTER(LEN=52)   ::   clpname   ! ocean output restart file name including prefix for AGRIF
[9535]73      CHARACTER(LEN=256)  ::   clinfo    ! info character
[508]74      !!----------------------------------------------------------------------
75      !
[783]76      IF( kt == nit000 ) THEN   ! default definitions
[14072]77         lrst_oce = .FALSE.
[5341]78         IF( ln_rst_list ) THEN
79            nrst_lst = 1
[11536]80            nitrst = nn_stocklist( nrst_lst )
[5341]81         ELSE
82            nitrst = nitend
83         ENDIF
[508]84      ENDIF
[14072]85
[11536]86      IF( .NOT. ln_rst_list .AND. nn_stock == -1 )   RETURN   ! we will never do any restart
[5341]87
88      ! frequency-based restart dumping (nn_stock)
[14072]89      IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN
[783]90         ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment
[11536]91         nitrst = kt + nn_stock - 1                  ! define the next value of nitrst for restart writing
[783]92         IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run
93      ENDIF
94      ! to get better performances with NetCDF format:
95      ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1)
96      ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1
[11536]97      IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN
[14072]98         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN
[5341]99            ! beware of the format used to write kt (default is i8.8, that should be large enough...)
100            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
101            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
[611]102            ENDIF
[5341]103            ! create the file
104            clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out)
105            clpath = TRIM(cn_ocerst_outdir)
106            IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
107            IF(lwp) THEN
108               WRITE(numout,*)
[9367]109               IF(.NOT.lwxios) THEN
[10425]110                  WRITE(numout,*) '             open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname)
[9367]111                  IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression'
112                  IF( kt == nitrst - 1 ) THEN   ;   WRITE(numout,*) '             kt = nitrst - 1 = ', kt
113                  ELSE                          ;   WRITE(numout,*) '             kt = '             , kt
114                  ENDIF
[5341]115               ENDIF
116            ENDIF
117            !
[9367]118            IF(.NOT.lwxios) THEN
[10425]119               CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE. )
[9367]120            ELSE
[14239]121#if defined key_xios
[13970]122               cw_ocerst_cxt = "rstw_"//TRIM(ADJUSTL(clkt))
[9367]123               IF( TRIM(Agrif_CFixed()) == '0' ) THEN
124                  clpname = clname
125               ELSE
[14072]126                  clpname = TRIM(Agrif_CFixed())//"_"//clname
[9367]127               ENDIF
[13970]128               numrow = iom_xios_setid(TRIM(clpath)//TRIM(clpname))
129               CALL iom_init( cw_ocerst_cxt, kdid = numrow, ld_closedef = .false. )
[9367]130               CALL iom_swap(      cxios_context          )
[9535]131#else
132               clinfo = 'Can not use XIOS in rst_opn'
133               CALL ctl_stop(TRIM(clinfo))
134#endif
[9367]135            ENDIF
[5341]136            lrst_oce = .TRUE.
[611]137         ENDIF
[508]138      ENDIF
139      !
140   END SUBROUTINE rst_opn
141
142
[12377]143   SUBROUTINE rst_write( kt, Kbb, Kmm )
[3]144      !!---------------------------------------------------------------------
145      !!                   ***  ROUTINE rstwrite  ***
[14072]146      !!
[10425]147      !! ** Purpose :   Write restart fields in NetCDF format
[3]148      !!
[508]149      !! ** Method  :   Write in numrow when kt == nitrst in NetCDF
[2528]150      !!              file, save fields which are necessary for restart
[14053]151      !!
152      !!                NB: ssh is written here (rst_write)
[14139]153      !!                    but is read or set in rst_read_ssh
[3]154      !!----------------------------------------------------------------------
[12377]155      INTEGER, INTENT(in) ::   kt         ! ocean time-step
156      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices
[3]157      !!----------------------------------------------------------------------
[14139]158      !
159         CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rn_Dt       )   ! dynamics time step
160      !
161      IF( .NOT.lwxios )   CALL iom_delay_rst( 'WRITE', 'OCE', numrow )   ! save only ocean delayed global communication variables
162      !
163      IF( .NOT.ln_diurnal_only ) THEN
[15141]164         CALL iom_rstput( kt, nitrst, numrow, 'sshb', ssh(:,:        ,Kbb) )     ! before fields
165         CALL iom_rstput( kt, nitrst, numrow, 'ub'  , uu(:,:,:       ,Kbb) )
166         CALL iom_rstput( kt, nitrst, numrow, 'vb'  , vv(:,:,:       ,Kbb) )
[15136]167         CALL iom_rstput( kt, nitrst, numrow, 'tb'  , ts(:,:,:,jp_tem,Kbb) )
168         CALL iom_rstput( kt, nitrst, numrow, 'sb'  , ts(:,:,:,jp_sal,Kbb) )
[14139]169         !
[14179]170#if ! defined key_RK3
[15141]171         CALL iom_rstput( kt, nitrst, numrow, 'sshn', ssh(:,:        ,Kmm) )     ! now fields
172         CALL iom_rstput( kt, nitrst, numrow, 'un'  , uu(:,:,:       ,Kmm) )
173         CALL iom_rstput( kt, nitrst, numrow, 'vn'  , vv(:,:,:       ,Kmm) )
[15136]174         CALL iom_rstput( kt, nitrst, numrow, 'tn'  , ts(:,:,:,jp_tem,Kmm) )
175         CALL iom_rstput( kt, nitrst, numrow, 'sn'  , ts(:,:,:,jp_sal,Kmm) )
176         IF( .NOT.lk_SWE )   CALL iom_rstput( kt, nitrst, numrow, 'rhop', rhop )
[14179]177#endif
[6140]178      ENDIF
[14072]179
[14139]180      IF( ln_diurnal )   CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst )
[508]181      IF( kt == nitrst ) THEN
[14139]182         IF( .NOT.lwxios ) THEN
[9367]183            CALL iom_close( numrow )     ! close the restart file (only at last time step)
184         ELSE
[13970]185            CALL iom_context_finalize(      cw_ocerst_cxt          )
186            iom_file(numrow)%nfid       = 0
187            numrow = 0
[9367]188         ENDIF
[4990]189!!gm         IF( .NOT. lk_trdmld )   lrst_oce = .FALSE.
190!!gm  not sure what to do here   ===>>>  ask to Sebastian
191         lrst_oce = .FALSE.
[14139]192         IF( ln_rst_list ) THEN
193            nrst_lst = MIN(nrst_lst + 1, SIZE(nn_stocklist,1))
194            nitrst   = nn_stocklist( nrst_lst )
195         ENDIF
[3]196      ENDIF
[508]197      !
[3]198   END SUBROUTINE rst_write
199
[4990]200
[4292]201   SUBROUTINE rst_read_open
[14072]202      !!----------------------------------------------------------------------
[4292]203      !!                   ***  ROUTINE rst_read_open  ***
[14072]204      !!
[10425]205      !! ** Purpose :   Open read files for NetCDF restart
[14072]206      !!
[4292]207      !! ** Method  :   Use a non-zero, positive value of numror to assess whether or not
208      !!                the file has already been opened
209      !!----------------------------------------------------------------------
[13970]210      LOGICAL             ::   llok
211      CHARACTER(len=lc)   ::   clpath   ! full path to ocean output restart file
212      CHARACTER(len=lc+2) ::   clpname  ! file name including agrif prefix
[4292]213      !!----------------------------------------------------------------------
[4990]214      !
215      IF( numror <= 0 ) THEN
[4292]216         IF(lwp) THEN                                             ! Contol prints
217            WRITE(numout,*)
[10425]218            WRITE(numout,*) 'rst_read : read oce NetCDF restart file'
[4292]219            IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support'
220            WRITE(numout,*) '~~~~~~~~'
221         ENDIF
[9367]222         lxios_sini = .FALSE.
[5341]223         clpath = TRIM(cn_ocerst_indir)
224         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
[10425]225         CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror )
[9367]226! are we using XIOS to read the data? Part above will have to modified once XIOS
227! can handle checking if variable is in the restart file (there will be no need to open
228! restart)
[13970]229         lrxios = lrxios.AND.lxios_sini
230
[9367]231         IF( lrxios) THEN
[13970]232             cr_ocerst_cxt = 'oce_rst'
233             IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS'
234!            IF( TRIM(Agrif_CFixed()) == '0' ) THEN
235!               clpname = cn_ocerst_in
236!            ELSE
[14072]237!               clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in
[13970]238!            ENDIF
239             CALL iom_init( cr_ocerst_cxt, kdid = numror, ld_closedef = .TRUE. )
240             CALL iom_swap(      cxios_context          )
[9367]241         ENDIF
[13970]242
[4292]243      ENDIF
[9367]244
[4292]245   END SUBROUTINE rst_read_open
246
[5836]247
[12377]248   SUBROUTINE rst_read( Kbb, Kmm )
[14072]249      !!----------------------------------------------------------------------
[3]250      !!                   ***  ROUTINE rst_read  ***
[14072]251      !!
[14053]252      !! ** Purpose :   Read velocity and T-S fields in the restart file
[14072]253      !!
[14053]254      !! ** Method  :   Read in restart.nc fields which are necessary for restart
255      !!
256      !!                NB: restart file openned           in DOM/domain.F90:dom_init
257      !!                    before field in restart tested in DOM/domain.F90:dom_init
258      !!                    (sshb)
259      !!
[14139]260      !!                NB: ssh is read or set in rst_read_ssh
[3]261      !!----------------------------------------------------------------------
[14139]262      INTEGER          , INTENT(in) ::   Kbb, Kmm   ! ocean time level indices
[4292]263      INTEGER  ::   jk
[9367]264      REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d
[14179]265      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   :: zgdept       ! 3D workspace for QCO
[3]266      !!----------------------------------------------------------------------
[14053]267      !
[14139]268      IF(.NOT.lrxios )   CALL iom_delay_rst( 'READ', 'OCE', numror )   ! read only ocean delayed global communication variables
[14053]269      !
[14072]270      !                             !*  Diurnal DSST
271      IF( ln_diurnal )   CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst )
[14139]272      IF( ln_diurnal_only ) THEN
[6140]273         IF(lwp) WRITE( numout, * ) &
[14072]274         &   "rst_read:- ln_diurnal_only set, setting rhop=rho0"
[12489]275         rhop = rho0
[14072]276         CALL iom_get( numror, jpdom_auto, 'tn'     , w3d )
[12377]277         ts(:,:,1,jp_tem,Kmm) = w3d(:,:,1)
[14072]278         RETURN
279      ENDIF
[14053]280      !
[14179]281#if defined key_RK3
282      !                             !*  Read Kbb fields   (NB: in RK3 Kmm = Kbb = Nbb)
283      IF(lwp) WRITE(numout,*) '           Kbb u, v and T-S fields read in the restart file'
[15141]284      CALL iom_get( numror, jpdom_auto, 'ub', uu(:,:,:       ,Kbb), cd_type = 'U', psgn = -1._wp )
285      CALL iom_get( numror, jpdom_auto, 'vb', vv(:,:,:       ,Kbb), cd_type = 'V', psgn = -1._wp )
[15136]286      CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
287      CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
[14179]288#else
289      !                             !*  Read Kmm fields   (MLF only)
[14053]290      IF(lwp) WRITE(numout,*)    '           Kmm u, v and T-S fields read in the restart file'
[15141]291      CALL iom_get( numror, jpdom_auto, 'un', uu(:,:,:       ,Kmm), cd_type = 'U', psgn = -1._wp )
292      CALL iom_get( numror, jpdom_auto, 'vn', vv(:,:,:       ,Kmm), cd_type = 'V', psgn = -1._wp )
[15136]293      CALL iom_get( numror, jpdom_auto, 'tn', ts(:,:,:,jp_tem,Kmm) )
294      CALL iom_get( numror, jpdom_auto, 'sn', ts(:,:,:,jp_sal,Kmm) )
[14053]295      !
[14179]296      IF( l_1st_euler ) THEN        !*  Euler restart   (MLF only)
[14053]297         IF(lwp) WRITE(numout,*) '           Kbb u, v and T-S fields set to Kmm values'
[14139]298         uu(:,:,:  ,Kbb) = uu(:,:,:  ,Kmm)         ! all before fields set to now values
[14053]299         vv(:,:,:  ,Kbb) = vv(:,:,:  ,Kmm)
[15136]300         ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm)
[14139]301         !
[14179]302      ELSE                          !* Leap frog restart   (MLF only)
[14053]303         IF(lwp) WRITE(numout,*) '           Kbb u, v and T-S fields read in the restart file'
[15141]304         CALL iom_get( numror, jpdom_auto, 'ub', uu(:,:,:       ,Kbb), cd_type = 'U', psgn = -1._wp )
305         CALL iom_get( numror, jpdom_auto, 'vb', vv(:,:,:       ,Kbb), cd_type = 'V', psgn = -1._wp )
[15136]306         CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
307         CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
[3680]308      ENDIF
[14179]309#endif
[3680]310      !
[14139]311      IF( .NOT.lk_SWE ) THEN
312         IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN
313            CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop )   ! now    potential density
314         ELSE
[14179]315#if defined key_qco
316            ALLOCATE( zgdept(jpi,jpj,jpk) )
317            DO jk = 1, jpk
318               zgdept(:,:,jk) = gdept(:,:,jk,Kmm)
319            END DO
320            CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, zgdept )
321            DEALLOCATE( zgdept )
322#else
[14139]323            CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) )
[14179]324#endif
[14139]325         ENDIF
[3680]326      ENDIF
[2528]327      !
[508]328   END SUBROUTINE rst_read
[473]329
[14139]330
331   SUBROUTINE rst_read_ssh( Kbb, Kmm, Kaa )
332      !!---------------------------------------------------------------------
333      !!                   ***  ROUTINE rst_read_ssh  ***
334      !!
335      !! ** Purpose :   ssh initialization of the sea surface height (ssh)
336      !!
337      !! ** Method  :   set ssh from restart or read configuration, or user_def
338      !!              * ln_rstart = T
339      !!                   USE of IOM library to read ssh in the restart file
340      !!                   Leap-Frog: Kbb and Kmm are read except for l_1st_euler=T
341      !!
342      !!              * otherwise
343      !!                   call user defined ssh or
344      !!                   set to -ssh_ref in wet and drying case with domcfg.nc
345      !!
346      !!              NB: ssh_b/n are written by restart.F90
347      !!----------------------------------------------------------------------
348      INTEGER, INTENT(in) ::   Kbb, Kmm, Kaa   ! ocean time level indices
349      !
350      INTEGER ::   ji, jj, jk
351      !!----------------------------------------------------------------------
352      !
353      IF(lwp) THEN
354         WRITE(numout,*)
355         WRITE(numout,*) 'rst_read_ssh : ssh initialization'
356         WRITE(numout,*) '~~~~~~~~~~~~ '
357      ENDIF
358      !
359      !                            !=============================!
360      IF( ln_rstart ) THEN         !==  Read the restart file  ==!
361         !                         !=============================!
362         !
[14179]363#if defined key_RK3
364         !                                     !*  RK3: Read ssh at Kbb
[14139]365         IF(lwp) WRITE(numout,*)
[14179]366         IF(lwp) WRITE(numout,*)    '      Kbb sea surface height read in the restart file'
367         CALL iom_get( numror, jpdom_auto, 'sshb'   , ssh(:,:,Kbb) )
368         !
369         !                                     !*  RK3: Set ssh at Kmm for AGRIF
370         ssh(:,:,Kmm) = 0._wp
371#else
372         !                                     !*  MLF: Read ssh at Kmm
373         IF(lwp) WRITE(numout,*)
[14139]374         IF(lwp) WRITE(numout,*)    '      Kmm sea surface height read in the restart file'
375         CALL iom_get( numror, jpdom_auto, 'sshn'   , ssh(:,:,Kmm) )
376         !
[14179]377         IF( l_1st_euler ) THEN                !*  MLF: Euler at first time-step
[14139]378            IF(lwp) WRITE(numout,*)
379            IF(lwp) WRITE(numout,*) '      Euler first time step : ssh(Kbb) = ssh(Kmm)'
380            ssh(:,:,Kbb) = ssh(:,:,Kmm)
381            !
[14179]382         ELSE                                  !*  MLF: read ssh at Kbb
[14139]383            IF(lwp) WRITE(numout,*)
384            IF(lwp) WRITE(numout,*) '      Kbb sea surface height read in the restart file'
385            CALL iom_get( numror, jpdom_auto, 'sshb', ssh(:,:,Kbb) )
386         ENDIF
[14179]387#endif
[14139]388         !                         !============================!
389      ELSE                         !==  Initialize at "rest"  ==!
390         !                         !============================!
391         !
392         IF(lwp) WRITE(numout,*)
393         IF(lwp) WRITE(numout,*)    '      initialization at rest'
394         !
395         IF( ll_wd ) THEN                      !* wet and dry
396            !
397            IF( ln_read_cfg  ) THEN                 ! read configuration : ssh_ref is read in domain_cfg file
398!!st  why ssh is not masked : i.e. ssh(:,:,Kmm) = -ssh_ref*ssmask(:,:),
399!!st  since at the 1st time step lbclnk will be applied on ssh at Kaa but not initially at Kbb and Kmm
400               ssh(:,:,Kbb) = -ssh_ref
401               !
[14834]402               DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
[14139]403                  IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN   ! if total depth is less than min depth
404                     ssh(ji,jj,Kbb) = rn_wdmin1 - ht_0(ji,jj)
405                  ENDIF
406               END_2D
407            ELSE                                    ! user define configuration case 
408               CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) )
409            ENDIF
410            !
411         ELSE                                  !* user defined configuration
412            CALL usr_def_istate_ssh( tmask, ssh(:,:,Kbb) )
413            !
414         ENDIF
415         !
[14179]416#if defined key_RK3
417         ssh(:,:,Kmm) = 0._wp                  !* RK3: set Kmm to 0 for AGRIF
418#else
419         ssh(:,:,Kmm) = ssh(:,:,Kbb)           !* MLF: set now values from to before ones
420#endif
[14139]421      ENDIF
422      !
[14145]423      !                            !==========================!
[14179]424      ssh(:,:,Kaa) = 0._wp         !==  Set to 0 for AGRIF  ==!
[14145]425      !                            !==========================!
426      !
[14139]427   END SUBROUTINE rst_read_ssh
428
[3]429   !!=====================================================================
430END MODULE restart
Note: See TracBrowser for help on using the repository browser.