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.
limrst.F90 in trunk/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: trunk/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90 @ 2528

Last change on this file since 2528 was 2528, checked in by rblod, 13 years ago

Update NEMOGCM from branch nemo_v3_3_beta

  • Property svn:keywords set to Id
File size: 24.3 KB
RevLine 
[825]1MODULE limrst
[835]2   !!======================================================================
3   !!                     ***  MODULE  limrst  ***
4   !! Ice restart :  write the ice restart file
5   !!======================================================================
[2528]6   !! History:   -   ! 2005-04 (M. Vancoppenolle) Original code
7   !!           3.0  ! 2008-03 (C. Ethe) restart files in using IOM interface
8   !!----------------------------------------------------------------------
[825]9#if defined key_lim3
[835]10   !!----------------------------------------------------------------------
11   !!   'key_lim3' :                                   LIM sea-ice model
12   !!----------------------------------------------------------------------
13   !!   lim_rst_opn     : open ice restart file
14   !!   lim_rst_write   : write of the restart file
15   !!   lim_rst_read    : read  the restart file
16   !!----------------------------------------------------------------------
[2528]17   USE ice              ! sea-ice variables
18   USE par_ice          ! sea-ice parameters
19   USE dom_oce          ! ocean domain
20   USE sbc_oce          ! Surface boundary condition: ocean fields
21   USE sbc_ice          ! Surface boundary condition: ice fields
22   USE in_out_manager   ! I/O manager
23   USE iom              ! I/O library
[921]24
[835]25   IMPLICIT NONE
26   PRIVATE
[921]27
[2528]28   PUBLIC   lim_rst_opn    ! routine called by icestep.F90
29   PUBLIC   lim_rst_write  ! routine called by icestep.F90
30   PUBLIC   lim_rst_read   ! routine called by iceini.F90
[825]31
[835]32   LOGICAL, PUBLIC ::   lrst_ice         !: logical to control the ice restart write
33   INTEGER, PUBLIC ::   numrir, numriw   !: logical unit for ice restart (read and write)
[825]34
[835]35   !!----------------------------------------------------------------------
[2528]36   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
[1156]37   !! $Id$
[2528]38   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[835]39   !!----------------------------------------------------------------------
40CONTAINS
[825]41
[835]42   SUBROUTINE lim_rst_opn( kt )
43      !!----------------------------------------------------------------------
44      !!                    ***  lim_rst_opn  ***
45      !!
46      !! ** purpose  :   output of sea-ice variable in a netcdf file
47      !!----------------------------------------------------------------------
48      INTEGER, INTENT(in) ::   kt       ! number of iteration
49      !
[2528]50      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character
[835]51      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
52      !!----------------------------------------------------------------------
53      !
54      IF( kt == nit000 )   lrst_ice = .FALSE.   ! default definition
[921]55
[2528]56      ! in order to get better performances with NetCDF format, we open and define the ice restart file
57      ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice
58      ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1
59      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc    &
60         &                             .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN
[835]61         ! beware of the format used to write kt (default is i8.8, that should be large enough...)
62         IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
63         ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst
64         ENDIF
65         ! create the file
[1229]66         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)
[835]67         IF(lwp) THEN
68            WRITE(numout,*)
69            SELECT CASE ( jprstlib )
70            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname
71            CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname
72            END SELECT
[888]73            IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN   
74               WRITE(numout,*)         '             kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp
75            ELSE   ;   WRITE(numout,*) '             kt = '                         , kt,' date= ', ndastp
[835]76            ENDIF
77         ENDIF
[2528]78         !
[835]79         CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )
80         lrst_ice = .TRUE.
81      ENDIF
82      !
83   END SUBROUTINE lim_rst_opn
[825]84
[2528]85
[835]86   SUBROUTINE lim_rst_write( kt )
87      !!----------------------------------------------------------------------
88      !!                    ***  lim_rst_write  ***
89      !!
90      !! ** purpose  :   output of sea-ice variable in a netcdf file
91      !!----------------------------------------------------------------------
92      INTEGER, INTENT(in) ::   kt     ! number of iteration
[2528]93      !!
94      INTEGER ::   ji, jj, jk ,jl   ! dummy loop indices
95      INTEGER ::   iter
96      CHARACTER(len=15) ::   znam
97      CHARACTER(len=1)  ::   zchar, zchar1
[835]98      REAL(wp), DIMENSION(jpi,jpj) :: z2d
99      !!----------------------------------------------------------------------
[921]100
[888]101      iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1
[825]102
[835]103      IF( iter == nitrst ) THEN
104         IF(lwp) WRITE(numout,*)
105         IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart file  kt =', kt
106         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'         
107      ENDIF
[825]108
[835]109      ! Write in numriw (if iter == nitrst)
110      ! ------------------
111      !                                                                        ! calendar control
[2528]112      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) )      ! time-step
113      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter   , wp ) )      ! date
[825]114
[835]115      ! Prognostic variables
116      DO jl = 1, jpl 
117         WRITE(zchar,'(I1)') jl
118         znam = 'v_i'//'_htc'//zchar
119         z2d(:,:) = v_i(:,:,jl)
120         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
121         znam = 'v_s'//'_htc'//zchar
122         z2d(:,:) = v_s(:,:,jl)
123         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
124         znam = 'smv_i'//'_htc'//zchar
125         z2d(:,:) = smv_i(:,:,jl)
126         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
127         znam = 'oa_i'//'_htc'//zchar
128         z2d(:,:) = oa_i(:,:,jl)
129         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
130         znam = 'a_i'//'_htc'//zchar
131         z2d(:,:) = a_i(:,:,jl)
132         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
133         znam = 't_su'//'_htc'//zchar
134         z2d(:,:) = t_su(:,:,jl)
135         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
136      END DO
[1471]137
[835]138      DO jl = 1, jpl 
139         WRITE(zchar,'(I1)') jl
140         znam = 'tempt_sl1'//'_htc'//zchar
141         z2d(:,:) = e_s(:,:,1,jl)
142         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
143      END DO
[825]144
[835]145      DO jl = 1, jpl 
146         WRITE(zchar,'(I1)') jl
147         DO jk = 1, nlay_i 
148            WRITE(zchar1,'(I1)') jk
149            znam = 'tempt'//'_il'//zchar1//'_htc'//zchar
150            z2d(:,:) = e_i(:,:,jk,jl)
151            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
152         END DO
[825]153      END DO
154
[835]155      CALL iom_rstput( iter, nitrst, numriw, 'u_ice'     , u_ice      )
156      CALL iom_rstput( iter, nitrst, numriw, 'v_ice'     , v_ice      )
157      CALL iom_rstput( iter, nitrst, numriw, 'fsbbq'     , fsbbq      )
158      CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i  )
159      CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i  )
160      CALL iom_rstput( iter, nitrst, numriw, 'stress12_i', stress12_i )
[825]161
[835]162      DO jl = 1, jpl 
163         WRITE(zchar,'(I1)') jl
164         znam = 'sxice'//'_htc'//zchar
165         z2d(:,:) = sxice(:,:,jl)
166         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
167         znam = 'syice'//'_htc'//zchar
168         z2d(:,:) = syice(:,:,jl)
169         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
170         znam = 'sxxice'//'_htc'//zchar
171         z2d(:,:) = sxxice(:,:,jl)
172         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
173         znam = 'syyice'//'_htc'//zchar
174         z2d(:,:) = syyice(:,:,jl)
175         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
[838]176         znam = 'sxyice'//'_htc'//zchar
177         z2d(:,:) = sxyice(:,:,jl)
178         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
[835]179         znam = 'sxsn'//'_htc'//zchar
180         z2d(:,:) = sxsn(:,:,jl)
181         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
182         znam = 'sysn'//'_htc'//zchar
183         z2d(:,:) = sysn(:,:,jl)
184         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
185         znam = 'sxxsn'//'_htc'//zchar
186         z2d(:,:) = sxxsn(:,:,jl)
187         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
188         znam = 'syysn'//'_htc'//zchar
189         z2d(:,:) = syysn(:,:,jl)
190         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
191         znam = 'sxysn'//'_htc'//zchar
192         z2d(:,:) = sxysn(:,:,jl)
193         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
194         znam = 'sxa'//'_htc'//zchar
195         z2d(:,:) = sxa(:,:,jl)
196         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
197         znam = 'sya'//'_htc'//zchar
198         z2d(:,:) = sya(:,:,jl)
199         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
200         znam = 'sxxa'//'_htc'//zchar
201         z2d(:,:) = sxxa(:,:,jl)
202         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
203         znam = 'syya'//'_htc'//zchar
204         z2d(:,:) = syya(:,:,jl)
205         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
206         znam = 'sxya'//'_htc'//zchar
207         z2d(:,:) = sxya(:,:,jl)
208         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
209         znam = 'sxc0'//'_htc'//zchar
210         z2d(:,:) = sxc0(:,:,jl)
211         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
212         znam = 'syc0'//'_htc'//zchar
213         z2d(:,:) = syc0(:,:,jl)
214         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
215         znam = 'sxxc0'//'_htc'//zchar
216         z2d(:,:) = sxxc0(:,:,jl)
217         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
218         znam = 'syyc0'//'_htc'//zchar
219         z2d(:,:) = syyc0(:,:,jl)
220         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
221         znam = 'sxyc0'//'_htc'//zchar
222         z2d(:,:) = sxyc0(:,:,jl)
223         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
224         znam = 'sxsal'//'_htc'//zchar
225         z2d(:,:) = sxsal(:,:,jl)
226         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
227         znam = 'sysal'//'_htc'//zchar
228         z2d(:,:) = sysal(:,:,jl)
229         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
230         znam = 'sxxsal'//'_htc'//zchar
231         z2d(:,:) = sxxsal(:,:,jl)
232         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
233         znam = 'syysal'//'_htc'//zchar
234         z2d(:,:) = syysal(:,:,jl)
235         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
236         znam = 'sxysal'//'_htc'//zchar
237         z2d(:,:) = sxysal(:,:,jl)
238         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
239         znam = 'sxage'//'_htc'//zchar
240         z2d(:,:) = sxage(:,:,jl)
241         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
242         znam = 'syage'//'_htc'//zchar
243         z2d(:,:) = syage(:,:,jl)
244         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
245         znam = 'sxxage'//'_htc'//zchar
246         z2d(:,:) = sxxage(:,:,jl)
247         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
248         znam = 'syyage'//'_htc'//zchar
249         z2d(:,:) = syyage(:,:,jl)
250         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
251         znam = 'sxyage'//'_htc'//zchar
252         z2d(:,:) = sxyage(:,:,jl)
253         CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
254      END DO
[825]255
[835]256      CALL iom_rstput( iter, nitrst, numriw, 'sxopw ' ,  sxopw  )
257      CALL iom_rstput( iter, nitrst, numriw, 'syopw ' ,  syopw  )
258      CALL iom_rstput( iter, nitrst, numriw, 'sxxopw' ,  sxxopw )
259      CALL iom_rstput( iter, nitrst, numriw, 'syyopw' ,  syyopw )
260      CALL iom_rstput( iter, nitrst, numriw, 'sxyopw' ,  sxyopw )
[825]261
[835]262      DO jl = 1, jpl 
263         WRITE(zchar,'(I1)') jl
264         DO jk = 1, nlay_i 
265            WRITE(zchar1,'(I1)') jk
266            znam = 'sxe'//'_il'//zchar1//'_htc'//zchar
267            z2d(:,:) = sxe(:,:,jk,jl)
268            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
[838]269            znam = 'sye'//'_il'//zchar1//'_htc'//zchar
270            z2d(:,:) = sye(:,:,jk,jl)
271            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
[835]272            znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar
273            z2d(:,:) = sxxe(:,:,jk,jl)
274            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
275            znam = 'syye'//'_il'//zchar1//'_htc'//zchar
276            z2d(:,:) = syye(:,:,jk,jl)
277            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
278            znam = 'sxye'//'_il'//zchar1//'_htc'//zchar
279            z2d(:,:) = sxye(:,:,jk,jl)
280            CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
281         END DO
282      END DO
[825]283
[835]284      IF( iter == nitrst ) THEN
285         CALL iom_close( numriw )                         ! close the restart file
286         lrst_ice = .FALSE.
287      ENDIF
288      !
[921]289   END SUBROUTINE lim_rst_write
290
[2528]291
[835]292   SUBROUTINE lim_rst_read
293      !!----------------------------------------------------------------------
294      !!                    ***  lim_rst_read  ***
295      !!
296      !! ** purpose  :   read of sea-ice variable restart in a netcdf file
297      !!----------------------------------------------------------------------
[888]298      INTEGER :: ji, jj, jk, jl, indx
[835]299      REAL(wp) ::   zfice, ziter
[2528]300      REAL(wp) ::   zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb   ! local scalars used for the salinity profile
301      REAL(wp), DIMENSION(nlay_i)  ::   zs_zero 
302      REAL(wp), DIMENSION(jpi,jpj) ::   z2d
303      CHARACTER(len=15) ::   znam
304      CHARACTER(len=1)  ::   zchar, zchar1
305      INTEGER           ::   jlibalt = jprstlib
306      LOGICAL           ::   llok
[835]307      !!----------------------------------------------------------------------
[921]308
[825]309      IF(lwp) THEN
310         WRITE(numout,*)
[835]311         WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file'
312         WRITE(numout,*) '~~~~~~~~~~~~~~'
[825]313      ENDIF
314
[1473]315      IF ( jprstlib == jprstdimg ) THEN
316        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
317        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90
318        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok )
319        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
320      ENDIF
321
[1229]322      CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )
[835]323
[888]324      CALL iom_get( numrir, 'nn_fsbc', zfice )
325      CALL iom_get( numrir, 'kt_ice' , ziter )   
[835]326      IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter
327      IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1
328
[825]329      !Control of date
[921]330
[835]331      IF( ( nit000 - INT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 )   &
332         &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nit000 in ice restart',  &
333         &                   '   verify the file or rerun with the value 0 for the',        &
334         &                   '   control of time parameter  nrstdt' )
[888]335      IF( INT(zfice) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   &
336         &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nn_fsbc in ice restart',  &
337         &                   '   verify the file or rerun with the value 0 for the',         &
[835]338         &                   '   control of time parameter  nrstdt' )
[825]339
[835]340      DO jl = 1, jpl 
341         WRITE(zchar,'(I1)') jl
342         znam = 'v_i'//'_htc'//zchar
343         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
344         v_i(:,:,jl) = z2d(:,:)
345         znam = 'v_s'//'_htc'//zchar
346         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
347         v_s(:,:,jl) = z2d(:,:) 
348         znam = 'smv_i'//'_htc'//zchar
349         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
350         smv_i(:,:,jl) = z2d(:,:)
351         znam = 'oa_i'//'_htc'//zchar
352         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
353         oa_i(:,:,jl) = z2d(:,:)
354         znam = 'a_i'//'_htc'//zchar
355         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
356         a_i(:,:,jl) = z2d(:,:)
357         znam = 't_su'//'_htc'//zchar
358         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
359         t_su(:,:,jl) = z2d(:,:)
360      END DO
[825]361
[919]362      DO jl = 1, jpl 
363         CALL lbc_lnk( smv_i(:,:,jl) , 'T' ,  1. )
364         CALL lbc_lnk( v_i  (:,:,jl) , 'T' ,  1. )
365         CALL lbc_lnk( a_i  (:,:,jl) , 'T' ,  1. )
366      END DO
367
[825]368      ! we first with bulk ice salinity
369      DO jl = 1, jpl
370         DO jj = 1, jpj
371            DO ji = 1, jpi
372               zindb          = MAX( 0.0 , SIGN( 1.0 , v_i(ji,jj,jl) - 1.0e-4 ) ) 
373               sm_i(ji,jj,jl) = smv_i(ji,jj,jl) / MAX(v_i(ji,jj,jl),1.0e-6) * zindb
374               ht_i(ji,jj,jl) = v_i(ji,jj,jl)   / MAX(a_i(ji,jj,jl),1.0e-6) * zindb
375            END DO
376         END DO
377      END DO
[921]378
[825]379      DO jk = 1, nlay_i
380         s_i(:,:,jk,:) = sm_i(:,:,:)
381      END DO
[921]382
[2528]383      IF( num_sal == 2 ) THEN      ! Salinity profile
[825]384         DO jl = 1, jpl
[835]385            DO jk = 1, nlay_i
386               DO jj = 1, jpj
387                  DO ji = 1, jpi
388                     zs_inf        = sm_i(ji,jj,jl)
[2528]389                     z_slope_s     = 2._wp * sm_i(ji,jj,jl) / MAX( 0.01_wp , ht_i(ji,jj,jl) )
[921]390                     !- slope of the salinity profile
[2528]391                     zs_zero(jk)   = z_slope_s * ( REAL(jk,wp) - 0.5_wp ) * ht_i(ji,jj,jl) / REAL(nlay_i,wp)
392                     zsmax = 4.5_wp
393                     zsmin = 3.5_wp
[835]394                     IF( sm_i(ji,jj,jl) .LT. zsmin ) THEN
[2528]395                        zalpha = 1._wp
[835]396                     ELSEIF( sm_i(ji,jj,jl) .LT.zsmax ) THEN
[2528]397                        zalpha = sm_i(ji,jj,jl) / ( zsmin - zsmax ) + zsmax / ( zsmax - zsmin )
[835]398                     ELSE
[2528]399                        zalpha = 0._wp
[835]400                     ENDIF
[2528]401                     s_i(ji,jj,jk,jl) = zalpha * zs_zero(jk) + ( 1._wp - zalpha ) * zs_inf
[835]402                  END DO
403               END DO
404            END DO
[825]405         END DO
406      ENDIF
[921]407
[835]408      DO jl = 1, jpl 
409         WRITE(zchar,'(I1)') jl
410         znam = 'tempt_sl1'//'_htc'//zchar
411         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
412         e_s(:,:,1,jl) = z2d(:,:)
[825]413      END DO
[921]414
[835]415      DO jl = 1, jpl 
416         WRITE(zchar,'(I1)') jl
417         DO jk = 1, nlay_i 
418            WRITE(zchar1,'(I1)') jk
419            znam = 'tempt'//'_il'//zchar1//'_htc'//zchar
420            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
421            e_i(:,:,jk,jl) = z2d(:,:)
422         END DO
423      END DO
[825]424
[835]425      CALL iom_get( numrir, jpdom_autoglo, 'u_ice'     , u_ice      )
426      CALL iom_get( numrir, jpdom_autoglo, 'v_ice'     , v_ice      )
427      CALL iom_get( numrir, jpdom_autoglo, 'fsbbq'     , fsbbq      )
428      CALL iom_get( numrir, jpdom_autoglo, 'stress1_i' , stress1_i  )
429      CALL iom_get( numrir, jpdom_autoglo, 'stress2_i' , stress2_i  )
430      CALL iom_get( numrir, jpdom_autoglo, 'stress12_i', stress12_i )
[825]431
[835]432      DO jl = 1, jpl 
433         WRITE(zchar,'(I1)') jl
434         znam = 'sxice'//'_htc'//zchar
435         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
436         sxice(:,:,jl) = z2d(:,:)
437         znam = 'syice'//'_htc'//zchar
438         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
439         syice(:,:,jl) = z2d(:,:)
440         znam = 'sxxice'//'_htc'//zchar
441         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
442         sxxice(:,:,jl) = z2d(:,:)
443         znam = 'syyice'//'_htc'//zchar
444         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
445         syyice(:,:,jl) = z2d(:,:)
[838]446         znam = 'sxyice'//'_htc'//zchar
447         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
448         sxyice(:,:,jl) = z2d(:,:)
[835]449         znam = 'sxsn'//'_htc'//zchar
450         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
451         sxsn(:,:,jl) = z2d(:,:)
452         znam = 'sysn'//'_htc'//zchar
453         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
454         sysn(:,:,jl) = z2d(:,:)
455         znam = 'sxxsn'//'_htc'//zchar
456         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
457         sxxsn(:,:,jl) = z2d(:,:)
458         znam = 'syysn'//'_htc'//zchar
459         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
460         syysn(:,:,jl) = z2d(:,:)
461         znam = 'sxysn'//'_htc'//zchar
462         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
463         sxysn(:,:,jl) = z2d(:,:)
464         znam = 'sxa'//'_htc'//zchar
465         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
466         sxa(:,:,jl) = z2d(:,:)
467         znam = 'sya'//'_htc'//zchar
468         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
469         sya(:,:,jl) = z2d(:,:)
470         znam = 'sxxa'//'_htc'//zchar
471         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
472         sxxa(:,:,jl) = z2d(:,:)
473         znam = 'syya'//'_htc'//zchar
474         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
475         syya(:,:,jl) = z2d(:,:)
476         znam = 'sxya'//'_htc'//zchar
477         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
478         sxya(:,:,jl) = z2d(:,:)
479         znam = 'sxc0'//'_htc'//zchar
480         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
481         sxc0(:,:,jl) = z2d(:,:)
482         znam = 'syc0'//'_htc'//zchar
483         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
484         syc0(:,:,jl) = z2d(:,:)
485         znam = 'sxxc0'//'_htc'//zchar
486         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
487         sxxc0(:,:,jl) = z2d(:,:)
488         znam = 'syyc0'//'_htc'//zchar
489         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
490         syyc0(:,:,jl) = z2d(:,:)
491         znam = 'sxyc0'//'_htc'//zchar
492         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
493         sxyc0(:,:,jl) = z2d(:,:)
494         znam = 'sxsal'//'_htc'//zchar
495         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
496         sxsal(:,:,jl) = z2d(:,:)
497         znam = 'sysal'//'_htc'//zchar
498         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
499         sysal(:,:,jl) = z2d(:,:)
500         znam = 'sxxsal'//'_htc'//zchar
501         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
502         sxxsal(:,:,jl) = z2d(:,:)
503         znam = 'syysal'//'_htc'//zchar
504         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
505         syysal(:,:,jl) = z2d(:,:)
506         znam = 'sxysal'//'_htc'//zchar
507         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
508         sxysal(:,:,jl) = z2d(:,:)
509         znam = 'sxage'//'_htc'//zchar
510         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
511         sxage(:,:,jl) = z2d(:,:)
512         znam = 'syage'//'_htc'//zchar
513         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
514         syage(:,:,jl) = z2d(:,:)
515         znam = 'sxxage'//'_htc'//zchar
516         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
517         sxxage(:,:,jl) = z2d(:,:)
518         znam = 'syyage'//'_htc'//zchar
519         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
520         syyage(:,:,jl) = z2d(:,:)
521         znam = 'sxyage'//'_htc'//zchar
522         CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
523         sxyage(:,:,jl)= z2d(:,:)
524      END DO
[825]525
[835]526      CALL iom_get( numrir, jpdom_autoglo, 'sxopw ' ,  sxopw  )
527      CALL iom_get( numrir, jpdom_autoglo, 'syopw ' ,  syopw  )
528      CALL iom_get( numrir, jpdom_autoglo, 'sxxopw' ,  sxxopw )
529      CALL iom_get( numrir, jpdom_autoglo, 'syyopw' ,  syyopw )
530      CALL iom_get( numrir, jpdom_autoglo, 'sxyopw' ,  sxyopw )
[825]531
[835]532      DO jl = 1, jpl 
533         WRITE(zchar,'(I1)') jl
534         DO jk = 1, nlay_i 
535            WRITE(zchar1,'(I1)') jk
536            znam = 'sxe'//'_il'//zchar1//'_htc'//zchar
537            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
538            sxe(:,:,jk,jl) = z2d(:,:)
[838]539            znam = 'sye'//'_il'//zchar1//'_htc'//zchar
540            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
541            sye(:,:,jk,jl) = z2d(:,:)
[835]542            znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar
543            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
544            sxxe(:,:,jk,jl) = z2d(:,:)
545            znam = 'syye'//'_il'//zchar1//'_htc'//zchar
546            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
547            syye(:,:,jk,jl) = z2d(:,:)
548            znam = 'sxye'//'_il'//zchar1//'_htc'//zchar
549            CALL iom_get( numrir, jpdom_autoglo, znam , z2d )
550            sxye(:,:,jk,jl) = z2d(:,:)
551         END DO
552      END DO
[2528]553      !
[835]554      CALL iom_close( numrir )
[2528]555      !
[921]556   END SUBROUTINE lim_rst_read
557
[825]558#else
559   !!----------------------------------------------------------------------
560   !!   Default option :       Empty module            NO LIM sea-ice model
561   !!----------------------------------------------------------------------
562CONTAINS
563   SUBROUTINE lim_rst_read             ! Empty routine
564   END SUBROUTINE lim_rst_read
565   SUBROUTINE lim_rst_write            ! Empty routine
566   END SUBROUTINE lim_rst_write
567#endif
568
569   !!======================================================================
570END MODULE limrst
Note: See TracBrowser for help on using the repository browser.