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

source: trunk/NEMO/LIM_SRC_3/iceini.F90 @ 1156

Last change on this file since 1156 was 1156, checked in by rblod, 16 years ago

Update Id and licence information, see ticket #210

  • Property svn:keywords set to Id
File size: 10.5 KB
Line 
1MODULE iceini
2   !!======================================================================
3   !!                       ***  MODULE iceini   ***
4   !!   Sea-ice model : LIM Sea ice model Initialization
5   !!======================================================================
6#if defined key_lim3
7   !!----------------------------------------------------------------------
8   !!   'key_lim3' :                                   LIM sea-ice model
9   !!----------------------------------------------------------------------
10   !!   ice_init       : sea-ice model initialization
11   !!----------------------------------------------------------------------
12   USE dom_oce
13   USE in_out_manager
14   USE ice_oce         ! ice variables
15   USE sbc_oce         ! Surface boundary condition: ocean fields
16   USE sbc_ice         ! Surface boundary condition: ice fields
17   USE phycst          ! Define parameters for the routines
18   USE ice
19   USE limmsh
20   USE limistate
21   USE limrst
22   USE par_ice
23   USE limvar
24   USE lib_mpp
25
26   IMPLICIT NONE
27   PRIVATE
28
29   !! * Routine accessibility
30   PUBLIC ice_init                 ! called by opa.F90
31   PUBLIC lim_itd_ini
32
33   !! * Share Module variables
34   INTEGER , PUBLIC  ::   &  !:
35      nstart ,            &  !: iteration number of the begining of the run
36      nlast  ,            &  !: iteration number of the end of the run
37      nitrun ,            &  !: number of iteration
38      numit                  !: iteration number
39   REAL(wp), PUBLIC  ::   &  !:
40      tpstot                 !: time of the run in seconds
41   !!----------------------------------------------------------------------
42   !!   LIM 3.0,  UCL-ASTR-LOCEAN-IPSL (2008)
43   !! $Id$
44   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
45   !!----------------------------------------------------------------------
46
47CONTAINS
48
49   SUBROUTINE ice_init
50      !!----------------------------------------------------------------------
51      !!                  ***  ROUTINE ice_init  ***
52      !!
53      !! ** purpose :   
54      !!
55      !! History :
56      !!   2.0  !  02-08  (G. Madec)  F90: Free form and modules
57      !!   3.0  !  08-03  (M. Vancop) ITD, salinity, EVP-C
58      !!----------------------------------------------------------------------
59
60      ! Open the namelist file
61      CALL ctlopn(numnam_ice,'namelist_ice','OLD', 'FORMATTED', 'SEQUENTIAL', 1,numout,.FALSE.,1)
62
63      CALL ice_run                    !  read in namelist some run parameters
64
65      ! Louvain la Neuve Ice model
66      IF( nacc == 1 ) THEN
67         dtsd2   = nn_fsbc * rdtmin * 0.5
68         rdt_ice = nn_fsbc * rdtmin
69      ELSE
70         dtsd2   = nn_fsbc * rdt * 0.5
71         rdt_ice = nn_fsbc * rdt
72      ENDIF
73
74      CALL lim_msh                    ! ice mesh initialization
75
76      CALL lim_itd_ini                ! initialize the ice thickness
77      ! distribution
78      ! Initial sea-ice state
79      IF( .NOT.ln_rstart ) THEN
80         numit = 0
81         numit = nit000 - 1
82         CALL lim_istate              ! start from rest: sea-ice deduced from sst
83         CALL lim_var_agg(1)          ! aggregate category variables in
84         ! bulk variables
85         CALL lim_var_glo2eqv         ! convert global variables in equivalent
86         ! variables
87      ELSE
88         CALL lim_rst_read            ! start from a restart file
89
90         numit = nit000 - 1
91         CALL lim_var_agg(1)          ! aggregate ice variables
92         CALL lim_var_glo2eqv         ! convert global var in equivalent variables
93      ENDIF
94
95      fr_i(:,:) = at_i(:,:)           ! initialisation of sea-ice fraction
96# if defined key_coupled
97      Must be adpated to LIM3 
98      alb_ice(:,:,:) = albege(:,:)      ! sea-ice albedo
99# endif
100
101      nstart = numit  + nn_fsbc     
102      nitrun = nitend - nit000 + 1 
103      nlast  = numit  + nitrun 
104
105      IF( nstock == 0  )  nstock = nlast + 1
106
107   END SUBROUTINE ice_init
108
109   SUBROUTINE ice_run
110      !!-------------------------------------------------------------------
111      !!                  ***  ROUTINE ice_run ***
112      !!                 
113      !! ** Purpose :   Definition some run parameter for ice model
114      !!
115      !! ** Method  :   Read the namicerun namelist and check the parameter
116      !!       values called at the first timestep (nit000)
117      !!
118      !! ** input   :   Namelist namicerun
119      !!
120      !! history :
121      !!   2.0  !  03-08 (C. Ethe)  Original code
122      !!   3.0  !  08-03 (M. Vancop) LIM3
123      !!-------------------------------------------------------------------
124      NAMELIST/namicerun/ ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep
125      !!-------------------------------------------------------------------
126
127      !                                           ! Read Namelist namicerun
128      REWIND ( numnam_ice )
129      READ   ( numnam_ice , namicerun )
130
131      IF( lk_mpp .AND. ln_nicep ) THEN
132         ln_nicep = .FALSE.
133         CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' )
134      ENDIF       
135
136      IF(lwp) THEN
137         WRITE(numout,*)
138         WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
139         WRITE(numout,*) ' ~~~~~~'
140         WRITE(numout,*) '   switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn
141         WRITE(numout,*) '   minimum fraction for leads in the NH (SH)  acrit(1/2)   = ', acrit(:)
142         WRITE(numout,*) '   computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif
143         WRITE(numout,*) '   computation of temp. in ice  (=0) or not (=9999) hicdif = ', hicdif
144         WRITE(numout,*) '   atmospheric drag over sea ice                           = ', cai
145         WRITE(numout,*) '   atmospheric drag over ocean                             = ', cao
146         WRITE(numout,*) '   Several ice points in the ice or not in ocean.output = ', ln_nicep
147      ENDIF
148
149   END SUBROUTINE ice_run
150
151   SUBROUTINE lim_itd_ini
152      !!------------------------------------------------------------------
153      !!                ***  ROUTINE lim_itd_ini ***
154      !! ** Purpose :
155      !!            Initializes the ice thickness distribution
156      !! ** Method  :
157      !!            Very simple. Currently there are no ice types in the
158      !!            model...
159      !!
160      !! ** Arguments :
161      !!           kideb , kiut : Starting and ending points on which the
162      !!                         the computation is applied
163      !!
164      !! ** Inputs / Ouputs : (global commons)
165      !!
166      !! ** External :
167      !!
168      !! ** References :
169      !!
170      !! ** History :
171      !!           (12-2005) Martin Vancoppenolle
172      !!
173      !!------------------------------------------------------------------
174      !! * Arguments
175
176      !! * Local variables
177      INTEGER ::   jl,       &   ! ice category dummy loop index
178         jm            ! ice types    dummy loop index
179
180      REAL(wp)  ::           &  ! constant values
181         zeps      =  1.0e-10,   & !
182         zc1                 ,   & !
183         zc2                 ,   & !
184         zc3                 ,   & !
185         zx1
186
187      IF(lwp) WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution '
188      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
189
190      !!-- End of declarations
191      !!------------------------------------------------------------------------------
192
193      !------------------------------------------------------------------------------!
194      ! 1) Ice thickness distribution parameters initialization   
195      !------------------------------------------------------------------------------!
196
197      !- Types boundaries (integer)
198      !----------------------------
199      ice_cat_bounds(1,1) = 1
200      ice_cat_bounds(1,2) = jpl
201
202      !- Number of ice thickness categories in each ice type
203      DO jm = 1, jpm
204         ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 
205      END DO
206
207      !- Make the correspondence between thickness categories and ice types
208      !---------------------------------------------------------------------
209      DO jm = 1, jpm       !over types
210         DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories
211            ice_types(jl) = jm
212         END DO
213      END DO
214
215      IF(lwp) THEN 
216         WRITE(numout,*) ' Number of ice types jpm =      ', jpm
217         WRITE(numout,*) ' Number of ice categories jpl = ', jpl
218         DO jm = 1, jpm
219            WRITE(numout,*) ' Ice type ', jm
220            WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm)
221            WRITE(numout,*) ' Thickness category boundaries  ', ice_cat_bounds(jm,1:2)
222         END DO
223         WRITE(numout,*) 'Ice type vector', ice_types(1:jpl)
224         WRITE(numout,*)
225      ENDIF
226
227      !- Thickness categories boundaries
228      !----------------------------------
229      hi_max(:) = 0.0
230      hi_max_typ(:,:) = 0.0
231
232      !- Type 1 - undeformed ice
233      zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
234      zc2 = 10.0*zc1
235      zc3 = 3.0
236
237      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
238         zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
239         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) )
240      END DO
241
242      !- Fill in the hi_max_typ vector, useful in other circumstances
243      ! Tricky trick
244      ! hi_max_typ is actually not used in the code and will be removed in a
245      ! next flyspray at this time, the tricky trick will also be removed
246      ! Martin, march 08
247      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
248         hi_max_typ(jl,1) = hi_max(jl)
249      END DO
250
251      IF(lwp) WRITE(numout,*) ' Thickness category boundaries independently of ice type '
252      IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl)
253
254      IF(lwp) WRITE(numout,*) ' Thickness category boundaries inside ice types '
255      IF(lwp) THEN
256         DO jm = 1, jpm
257            WRITE(numout,*) ' Type number ', jm
258            WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm)
259         END DO
260      ENDIF
261
262      DO jl = 1, jpl
263         hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0
264      END DO
265
266      tn_ice(:,:,:) = t_su(:,:,:)
267
268   END SUBROUTINE lim_itd_ini
269
270#else
271   !!----------------------------------------------------------------------
272   !!   Default option :        Empty module           NO LIM sea-ice model
273   !!----------------------------------------------------------------------
274CONTAINS
275   SUBROUTINE ice_init        ! Empty routine
276   END SUBROUTINE ice_init
277
278   SUBROUTINE lim_itd_ini
279   END SUBROUTINE lim_itd_ini
280#endif
281
282   !!======================================================================
283END MODULE iceini
Note: See TracBrowser for help on using the repository browser.