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.
limistate_2.F90 in trunk/NEMO/LIM_SRC_2 – NEMO

source: trunk/NEMO/LIM_SRC_2/limistate_2.F90 @ 1037

Last change on this file since 1037 was 1037, checked in by ctlod, 16 years ago

trunk: replace freeze(:,:) variable with fr_i(:,:), use the tfreez function defined in eosbn2.F90 and remove the useless ocfzpt.F90 module, see ticket: #177

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.7 KB
Line 
1MODULE limistate_2
2   !!======================================================================
3   !!                     ***  MODULE  limistate_2  ***
4   !!              Initialisation of diagnostics ice variables
5   !!======================================================================
6   !! History :   1.0  !  01-04  (C. Ethe, G. Madec)  Original code
7   !!             2.0  !  03-08  (G. Madec)  add lim_istate_init
8   !!                  !  04-04  (S. Theetten) initialization from a file
9   !!                  !  06-07  (S. Masson)  IOM to read the restart
10   !!                  !  07-10  (G. Madec)  surface module
11   !!--------------------------------------------------------------------
12#if defined key_lim2
13   !!----------------------------------------------------------------------
14   !!   'key_lim2' :                                  LIM 2.0 sea-ice model
15   !!----------------------------------------------------------------------
16   !!----------------------------------------------------------------------
17   !!   lim_istate_2      :  Initialisation of diagnostics ice variables
18   !!   lim_istate_init_2 :  initialization of ice state and namelist read
19   !!----------------------------------------------------------------------
20   USE phycst
21   USE par_ice_2       ! ice parameters
22   USE ice_oce         ! ice variables
23   USE dom_ice_2
24   USE eosbn2          ! equation of state
25   USE lbclnk
26   USE oce
27   USE ice_2
28   USE iom
29   USE in_out_manager
30
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC lim_istate_2      ! routine called by lim_init_2.F90
35
36   REAL(wp) ::           &  !!! ** init namelist (namiceini) **
37      ttest  = 2.0  ,    &  ! threshold water temperature for initial sea ice
38      hninn  = 0.5  ,    &  ! initial snow thickness in the north
39      hginn  = 3.0  ,    &  ! initial ice thickness in the north
40      alinn  = 0.05 ,    &  ! initial leads area in the north
41      hnins  = 0.1  ,    &  ! initial snow thickness in the south
42      hgins  = 1.0  ,    &  ! initial ice thickness in the south
43      alins  = 0.1          ! initial leads area in the south
44
45   REAL(wp)  ::          &  ! constant values
46      zzero   = 0.e0  ,  &
47      zone    = 1.e0
48   !!----------------------------------------------------------------------
49   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2006)
50   !! $ Id: $
51   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
52   !!----------------------------------------------------------------------
53
54CONTAINS
55
56   SUBROUTINE lim_istate_2
57      !!-------------------------------------------------------------------
58      !!                    ***  ROUTINE lim_istate_2  ***
59      !!
60      !! ** Purpose :   defined the sea-ice initial state
61      !!
62      !! ** Method  :   restart from a state defined in a binary file
63      !!                or from arbitrary sea-ice conditions
64      !!--------------------------------------------------------------------
65      INTEGER  ::   ji, jj, jk                ! dummy loop indices
66      REAL(wp) ::   zidto, zs0, ztf, zbin     ! temporary scalar
67      REAL(wp), DIMENSION(jpi,jpj) ::   ztn   ! workspace
68      !--------------------------------------------------------------------
69 
70      CALL lim_istate_init_2     !  reading the initials parameters of the ice
71
72      IF( .NOT. ln_limini ) THEN 
73         
74         tfu(:,:) = tfreez( sn(:,:,1) ) * tmask(:,:,1)       ! freezing/melting point of sea water [Celcius]
75
76         DO jj = 1, jpj
77            DO ji = 1, jpi
78               !                     ! ice if sst <= t-freez + ttest
79               IF( tn(ji,jj,1)  - tfu(ji,jj) >= ttest ) THEN   ;   zidto = 0.e0      ! no ice
80               ELSE                                            ;   zidto = 1.e0      !    ice
81               ENDIF
82               !
83               IF( fcor(ji,jj) >= 0.e0 ) THEN     !--  Northern hemisphere.
84                  hicif(ji,jj)   = zidto * hginn
85                  frld(ji,jj)    = zidto * alinn + ( 1.0 - zidto ) * 1.0
86                  hsnif(ji,jj)   = zidto * hninn
87               ELSE                               !---  Southern hemisphere.
88                  hicif(ji,jj)   = zidto * hgins
89                  frld(ji,jj)    = zidto * alins + ( 1.0 - zidto ) * 1.0
90                  hsnif(ji,jj)   = zidto * hnins
91               ENDIF
92            END DO
93         END DO
94
95         tfu(:,:) = tfu(:,:) + rt0       ! ftu converted from Celsius to Kelvin (rt0 over land)
96         
97         sist  (:,:)   = tfu(:,:)
98         tbif  (:,:,1) = tfu(:,:)
99         tbif  (:,:,2) = tfu(:,:)
100         tbif  (:,:,3) = tfu(:,:)
101
102      ENDIF
103     
104      fsbbq (:,:)   = 0.e0
105      qstoif(:,:)   = 0.e0
106      ui_ice(:,:)   = 0.e0
107      vi_ice(:,:)   = 0.e0
108# if defined key_coupled
109      albege(:,:)   = 0.8 * tms(:,:)
110# endif
111
112      !---  Moments for advection.             
113
114      sxice (:,:)  = 0.e0   ;   sxsn (:,:)  = 0.e0   ;   sxa  (:,:)  = 0.e0
115      syice (:,:)  = 0.e0   ;   sysn (:,:)  = 0.e0   ;   sya  (:,:)  = 0.e0
116      sxxice(:,:)  = 0.e0   ;   sxxsn(:,:)  = 0.e0   ;   sxxa (:,:)  = 0.e0
117      syyice(:,:)  = 0.e0   ;   syysn(:,:)  = 0.e0   ;   syya (:,:)  = 0.e0
118      sxyice(:,:)  = 0.e0   ;   sxysn(:,:)  = 0.e0   ;   sxya (:,:)  = 0.e0
119
120      sxc0  (:,:)  = 0.e0   ;   sxc1 (:,:)  = 0.e0   ;   sxc2 (:,:)  = 0.e0
121      syc0  (:,:)  = 0.e0   ;   syc1 (:,:)  = 0.e0   ;   syc2 (:,:)  = 0.e0
122      sxxc0 (:,:)  = 0.e0   ;   sxxc1(:,:)  = 0.e0   ;   sxxc2(:,:)  = 0.e0
123      syyc0 (:,:)  = 0.e0   ;   syyc1(:,:)  = 0.e0   ;   syyc2(:,:)  = 0.e0
124      sxyc0 (:,:)  = 0.e0   ;   sxyc1(:,:)  = 0.e0   ;   sxyc2(:,:)  = 0.e0
125
126      sxst  (:,:)  = 0.e0
127      syst  (:,:)  = 0.e0
128      sxxst (:,:)  = 0.e0
129      syyst (:,:)  = 0.e0
130      sxyst (:,:)  = 0.e0
131
132      !-- lateral boundary conditions
133      CALL lbc_lnk( hicif, 'T', 1. )
134      CALL lbc_lnk( frld , 'T', 1. )
135
136      ! C A U T I O N  frld = 1 over land and lbc_lnk put zero along
137      ! *************  closed boundaries herefore we force to one over land
138      frld(:,:) = tms(:,:) * frld(:,:) + ( 1. - tms(:,:) )   
139
140      CALL lbc_lnk( hsnif, 'T', 1. )
141      CALL lbc_lnk( sist , 'T', 1. , pval = rt0 )      ! set rt0 on closed boundary (required by bulk formulation)
142      DO jk = 1, jplayersp1
143         CALL lbc_lnk(tbif(:,:,jk), 'T', 1. )
144      END DO
145      CALL lbc_lnk( fsbbq  , 'T', 1. )
146      CALL lbc_lnk( qstoif , 'T', 1. )
147
148   END SUBROUTINE lim_istate_2
149
150   
151   SUBROUTINE lim_istate_init_2
152      !!-------------------------------------------------------------------
153      !!                   ***  ROUTINE lim_istate_init_2  ***
154      !!       
155      !! ** Purpose :   Definition of initial state of the ice
156      !!
157      !! ** Method  :   Read the namiceini namelist and check the parameter
158      !!       values called at the first timestep (nit000)
159      !!
160      !! ** input   :   Namelist namiceini
161      !!-------------------------------------------------------------------
162      INTEGER :: inum_ice
163      INTEGER :: ji,jj
164
165      NAMELIST/namiceini/ ln_limini, ttest, hninn, hginn, alinn, &
166         &                hnins, hgins, alins
167      !!-------------------------------------------------------------------
168      !
169      REWIND ( numnam_ice )               ! Read Namelist namiceini
170      READ   ( numnam_ice , namiceini )
171      !
172      IF(lwp) THEN
173         WRITE(numout,*)
174         WRITE(numout,*) 'lim_istate_init_2 : ice parameters inititialisation '
175         WRITE(numout,*) '~~~~~~~~~~~~~~~~~'
176         WRITE(numout,*) '         threshold water temp. for initial sea-ice    ttest      = ', ttest
177         WRITE(numout,*) '         initial snow thickness in the north          hninn      = ', hninn
178         WRITE(numout,*) '         initial ice thickness in the north           hginn      = ', hginn 
179         WRITE(numout,*) '         initial leads area in the north              alinn      = ', alinn           
180         WRITE(numout,*) '         initial snow thickness in the south          hnins      = ', hnins 
181         WRITE(numout,*) '         initial ice thickness in the south           hgins      = ', hgins
182         WRITE(numout,*) '         initial leads area in the south              alins      = ', alins
183         WRITE(numout,*) '         Ice state initialization using input file    ln_limini  = ', ln_limini
184      ENDIF
185
186      IF( ln_limini ) THEN                      ! Ice initialization using input file
187         !
188         CALL iom_open( 'Ice_initialization.nc', inum_ice )
189         !
190         IF( inum_ice > 0 ) THEN
191            IF(lwp) WRITE(numout,*)
192            IF(lwp) WRITE(numout,*) '                  ice state initialization with : Ice_initialization.nc'
193           
194            CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif )     
195            CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif )     
196            CALL iom_get( inum_ice, jpdom_data, 'frld' , frld  )     
197            CALL iom_get( inum_ice, jpdom_data, 'ts'   , sist  )
198            CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:),   &
199                 &        kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) )
200            ! put some values in the extra-halo...
201            DO jj = nlcj+1, jpj   ;   tbif(1:nlci,jj,:) = tbif(1:nlci,nlej,:)   ;   END DO
202            DO ji = nlci+1, jpi   ;   tbif(ji    ,: ,:) = tbif(nlei  ,:   ,:)   ;   END DO
203
204            CALL iom_close( inum_ice)
205            !
206         ENDIF
207      ENDIF
208      !     
209   END SUBROUTINE lim_istate_init_2
210
211#else
212   !!----------------------------------------------------------------------
213   !!   Default option :         Empty module      NO LIM 2.0 sea-ice model
214   !!----------------------------------------------------------------------
215CONTAINS
216   SUBROUTINE lim_istate_2        ! Empty routine
217   END SUBROUTINE lim_istate_2
218#endif
219
220   !!======================================================================
221END MODULE limistate_2
Note: See TracBrowser for help on using the repository browser.