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 tags/nemo_v1/NEMO/LIM_SRC – NEMO

source: tags/nemo_v1/NEMO/LIM_SRC/iceini.F90 @ 9295

Last change on this file since 9295 was 247, checked in by opalod, 19 years ago

CL : Add CVS Header and CeCILL licence information

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1MODULE iceini
2   !!======================================================================
3   !!                       ***  MODULE iceini   ***
4   !!   Sea-ice model : LIM Sea ice model Initialization
5   !!======================================================================
6#if defined key_ice_lim
7   !!----------------------------------------------------------------------
8   !!   'key_ice_lim' :                                   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 flx_oce
16   USE phycst          ! Define parameters for the routines
17   USE ocfzpt
18   USE ice
19   USE limmsh
20   USE limistate
21   USE limrst
22
23   IMPLICIT NONE
24   PRIVATE
25
26   !! * Routine accessibility
27   PUBLIC ice_init                 ! called by opa.F90
28
29   !! * Share Module variables
30   LOGICAL , PUBLIC  ::   & !!! ** init namelist (namicerun) **
31      ln_limdyn   = .TRUE.   !: flag for ice dynamics (T) or not (F)
32   INTEGER , PUBLIC  ::   &  !:
33      nstart ,            &  !: iteration number of the begining of the run
34      nlast  ,            &  !: iteration number of the end of the run
35      nitrun ,            &  !: number of iteration
36      numit                  !: iteration number
37   REAL(wp), PUBLIC  ::   &  !:
38      hsndif = 0.e0 ,     &  !: computation of temp. in snow (0) or not (9999)
39      hicdif = 0.e0 ,     &  !: computation of temp. in ice (0) or not (9999)
40      tpstot                 !: time of the run in seconds
41   REAL(wp), PUBLIC, DIMENSION(2)  ::  &  !:
42      acrit  = (/ 1.e-06 , 1.e-06 /)    !: minimum fraction for leads in
43      !                                   !  north and south hemisphere
44   !!----------------------------------------------------------------------
45   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005)
46   !! $Header$
47   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
48   !!----------------------------------------------------------------------
49
50CONTAINS
51
52   SUBROUTINE ice_init
53      !!----------------------------------------------------------------------
54      !!                  ***  ROUTINE ice_init  ***
55      !!
56      !! ** purpose :   
57      !!
58      !! History :
59      !!   8.5  !  02-08  (G. Madec)  F90: Free form and modules
60      !!----------------------------------------------------------------------
61
62      ! Open the namelist file
63      OPEN( numnam_ice, FILE= 'namelist_ice', FORM='formatted', STATUS = 'old') 
64
65      CALL ice_run                    !  read in namelist some run parameters
66                 
67      ! Louvain la Neuve Ice model
68      IF( nacc == 1 ) THEN
69          dtsd2   = nfice * rdtmin * 0.5
70          rdt_ice = nfice * rdtmin
71      ELSE
72          dtsd2   = nfice * rdt * 0.5
73          rdt_ice = nfice * rdt
74      ENDIF
75
76      CALL lim_msh                    ! ice mesh initialization
77     
78      ! Initial sea-ice state
79      IF( .NOT.ln_rstart ) THEN
80         numit = 0
81         CALL lim_istate              ! start from rest: sea-ice deduced from sst
82      ELSE
83         CALL lim_rst_read( numit )   ! start from a restart file
84      ENDIF
85     
86      tn_ice(:,:) = sist(:,:)         ! initialisation of ice temperature   
87      freeze(:,:) = 1.0 - frld(:,:)   ! initialisation of sea/ice cover   
88# if defined key_coupled
89      alb_ice(:,:) = albege(:,:)      ! sea-ice albedo
90# endif
91     
92      nstart = numit  + nfice     
93      nitrun = nitend - nit000 + 1 
94      nlast  = numit  + nitrun 
95
96      IF( nstock == 0  )  nstock = nlast + 1
97
98   END SUBROUTINE ice_init
99
100
101   SUBROUTINE ice_run
102      !!-------------------------------------------------------------------
103      !!                  ***  ROUTINE ice_run ***
104      !!                 
105      !! ** Purpose :   Definition some run parameter for ice model
106      !!
107      !! ** Method  :   Read the namicerun namelist and check the parameter
108      !!       values called at the first timestep (nit000)
109      !!
110      !! ** input   :   Namelist namicerun
111      !!
112      !! history :
113      !!   2.0  !  03-08 (C. Ethe)  Original code
114      !!-------------------------------------------------------------------
115      NAMELIST/namicerun/ ln_limdyn, acrit, hsndif, hicdif
116      !!-------------------------------------------------------------------
117
118      !                                           ! Read Namelist namicerun
119      REWIND ( numnam_ice )
120      READ   ( numnam_ice , namicerun )
121      IF(lwp) THEN
122         WRITE(numout,*)
123         WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
124         WRITE(numout,*) ' ~~~~~~'
125         WRITE(numout,*) '   switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn
126         WRITE(numout,*) '   minimum fraction for leads in the NH (SH)  acrit(1/2)   = ', acrit(:)
127         WRITE(numout,*) '   computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif
128         WRITE(numout,*) '   computation of temp. in ice  (=0) or not (=9999) hicdif = ', hicdif
129      ENDIF
130     
131   END SUBROUTINE ice_run
132
133#else
134   !!----------------------------------------------------------------------
135   !!   Default option :        Empty module           NO LIM sea-ice model
136   !!----------------------------------------------------------------------
137CONTAINS
138   SUBROUTINE ice_init        ! Empty routine
139   END SUBROUTINE ice_init
140#endif
141
142   !!======================================================================
143END MODULE iceini
Note: See TracBrowser for help on using the repository browser.