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 branches/dev_003_CPL/NEMO/LIM_SRC_3 – NEMO

source: branches/dev_003_CPL/NEMO/LIM_SRC_3/iceini.F90 @ 990

Last change on this file since 990 was 990, checked in by smasson, 16 years ago

dev_003_CPL: to the trunk , see ticket #155

File size: 10.2 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 ocfzpt
19   USE ice
20   USE limmsh
21   USE limistate
22   USE limrst
23   USE par_ice
24   USE limvar
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      freeze(:,:) = at_i(:,:)   ! initialisation of sea/ice cover   
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      ln_nicep = ln_nicep .AND. lwp
131      IF(lwp) THEN
132         WRITE(numout,*)
133         WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
134         WRITE(numout,*) ' ~~~~~~'
135         WRITE(numout,*) '   switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn
136         WRITE(numout,*) '   minimum fraction for leads in the NH (SH)  acrit(1/2)   = ', acrit(:)
137         WRITE(numout,*) '   computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif
138         WRITE(numout,*) '   computation of temp. in ice  (=0) or not (=9999) hicdif = ', hicdif
139         WRITE(numout,*) '   atmospheric drag over sea ice                           = ', cai
140         WRITE(numout,*) '   atmospheric drag over ocean                             = ', cao
141         WRITE(numout,*) '   Several ice points in the ice or not in ocean.output = ', ln_nicep
142      ENDIF
143
144   END SUBROUTINE ice_run
145
146   SUBROUTINE lim_itd_ini
147      !!------------------------------------------------------------------
148      !!                ***  ROUTINE lim_itd_ini ***
149      !! ** Purpose :
150      !!            Initializes the ice thickness distribution
151      !! ** Method  :
152      !!            Very simple. Currently there are no ice types in the
153      !!            model...
154      !!
155      !! ** Arguments :
156      !!           kideb , kiut : Starting and ending points on which the
157      !!                         the computation is applied
158      !!
159      !! ** Inputs / Ouputs : (global commons)
160      !!
161      !! ** External :
162      !!
163      !! ** References :
164      !!
165      !! ** History :
166      !!           (12-2005) Martin Vancoppenolle
167      !!
168      !!------------------------------------------------------------------
169      !! * Arguments
170
171      !! * Local variables
172      INTEGER ::   jl,       &   ! ice category dummy loop index
173         jm            ! ice types    dummy loop index
174
175      REAL(wp)  ::           &  ! constant values
176         zeps      =  1.0e-10,   & !
177         zc1                 ,   & !
178         zc2                 ,   & !
179         zc3                 ,   & !
180         zx1
181
182      WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution '
183      WRITE(numout,*) '~~~~~~~~~~~~'
184
185      !!-- End of declarations
186      !!------------------------------------------------------------------------------
187
188      !------------------------------------------------------------------------------!
189      ! 1) Ice thickness distribution parameters initialization   
190      !------------------------------------------------------------------------------!
191
192      !- Types boundaries (integer)
193      !----------------------------
194      ice_cat_bounds(1,1) = 1
195      ice_cat_bounds(1,2) = jpl
196
197      !- Number of ice thickness categories in each ice type
198      DO jm = 1, jpm
199         ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 
200      END DO
201
202      !- Make the correspondence between thickness categories and ice types
203      !---------------------------------------------------------------------
204      DO jm = 1, jpm       !over types
205         DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories
206            ice_types(jl) = jm
207         END DO
208      END DO
209
210      WRITE(numout,*) ' Number of ice types jpm =      ', jpm
211      WRITE(numout,*) ' Number of ice categories jpl = ', jpl
212      DO jm = 1, jpm
213         WRITE(numout,*) ' Ice type ', jm
214         WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm)
215         WRITE(numout,*) ' Thickness category boundaries  ', ice_cat_bounds(jm,1:2)
216      END DO
217      WRITE(numout,*) 'Ice type vector', ice_types(1:jpl)
218      WRITE(numout,*)
219
220      !- Thickness categories boundaries
221      !----------------------------------
222      hi_max(:) = 0.0
223      hi_max_typ(:,:) = 0.0
224
225      !- Type 1 - undeformed ice
226      zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
227      zc2 = 10.0*zc1
228      zc3 = 3.0
229
230      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
231         zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
232         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) )
233      END DO
234
235      !- Fill in the hi_max_typ vector, useful in other circumstances
236      ! Tricky trick
237      ! hi_max_typ is actually not used in the code and will be removed in a
238      ! next flyspray at this time, the tricky trick will also be removed
239      ! Martin, march 08
240      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
241         hi_max_typ(jl,1) = hi_max(jl)
242      END DO
243
244      WRITE(numout,*) ' Thickness category boundaries independently of ice type '
245      WRITE(numout,*) ' hi_max ', hi_max(0:jpl)
246
247      WRITE(numout,*) ' Thickness category boundaries inside ice types '
248      DO jm = 1, jpm
249         WRITE(numout,*) ' Type number ', jm
250         WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm)
251      END DO
252
253      DO jl = 1, jpl
254         hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0
255      END DO
256
257      tn_ice(:,:,:) = t_su(:,:,:)
258
259   END SUBROUTINE lim_itd_ini
260
261#else
262   !!----------------------------------------------------------------------
263   !!   Default option :        Empty module           NO LIM sea-ice model
264   !!----------------------------------------------------------------------
265CONTAINS
266   SUBROUTINE ice_init        ! Empty routine
267   END SUBROUTINE ice_init
268
269   SUBROUTINE lim_itd_ini
270   END SUBROUTINE lim_itd_ini
271#endif
272
273   !!======================================================================
274END MODULE iceini
Note: See TracBrowser for help on using the repository browser.