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

source: trunk/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90 @ 3319

Last change on this file since 3319 was 3294, checked in by rblod, 12 years ago

Merge of 3.4beta into the trunk

  • Property svn:keywords set to Id
File size: 6.6 KB
Line 
1MODULE iceini_2
2   !!======================================================================
3   !!                       ***  MODULE iceini   ***
4   !!   Sea-ice model : LIM 2.0 Sea ice model Initialization
5   !!======================================================================
6   !! History :  1.0  ! 2002-08  (G. Madec)  F90: Free form and modules
7   !!            2.0  ! 2003-08  (C. Ethe)  add ice_run
8   !!            3.3  ! 2009-05  (G. Garric, C. Bricaud) addition of the lim2_evp case
9   !!            4.0  ! 2011-02  (G. Madec) dynamical allocation
10   !!----------------------------------------------------------------------
11#if defined key_lim2
12   !!----------------------------------------------------------------------
13   !!   'key_lim2' :                                  LIM 2.0 sea-ice model
14   !!----------------------------------------------------------------------
15   !!   ice_init_2       : sea-ice model initialization
16   !!   ice_run_2        : Definition some run parameter for ice model
17   !!----------------------------------------------------------------------
18   USE phycst           ! physical constants
19   USE dom_oce          ! ocean domain
20   USE sbc_oce          ! surface boundary condition: ocean
21   USE sbc_ice          ! LIM2 surface boundary condition
22   USE dom_ice_2        ! LIM2 ice domain
23   USE par_ice_2        ! LIM2 parameters
24   USE thd_ice_2        ! LIM2 thermodynamical variables
25   USE ice_2            ! LIM2 ice variable
26   USE limmsh_2         ! LIM2 mesh
27   USE limistate_2      ! LIM2 initial state
28   USE limrst_2         ! LIM2 restart
29   USE limsbc_2         ! LIM2 surface boundary condition
30   USE in_out_manager   ! I/O manager
31   USE lib_mpp          ! MPP library
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC   ice_init_2               ! called by sbcice_lim_2.F90
37
38   !!----------------------------------------------------------------------
39   !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011)
40   !! $Id$
41   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
42   !!----------------------------------------------------------------------
43CONTAINS
44
45   SUBROUTINE ice_init_2
46      !!----------------------------------------------------------------------
47      !!                  ***  ROUTINE ice_init_2  ***
48      !!
49      !! ** purpose :   initialisation of LIM-2 domain and variables 
50      !!----------------------------------------------------------------------
51      INTEGER :: ierr
52      !!----------------------------------------------------------------------
53      !
54      IF(lwp) THEN
55         WRITE(numout,*)
56         WRITE(numout,*) 'ice_init_2 : LIM-2 sea-ice - initialization'
57         WRITE(numout,*) '~~~~~~~~~~~   '
58      ENDIF
59      !                                ! Allocate the ice arrays
60      ierr =        ice_alloc_2    ()       ! ice variables
61      ierr = ierr + dom_ice_alloc_2()       ! domain
62      ierr = ierr + sbc_ice_alloc  ()       ! surface forcing
63      ierr = ierr + thd_ice_alloc_2()       ! thermodynamics
64
65      IF( lk_mpp    )   CALL mpp_sum( ierr )
66      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'ice_init_2 : unable to allocate ice arrays' )
67
68      !                                ! adequation jpk versus ice/snow layers
69      IF( jpl > jpk  .OR.  jplayersp1 > jpk  )   CALL ctl_stop( 'STOP',           &
70         &     'ice_init: the 3rd dimension of workspace arrays is too small.',   &
71         &     'use more ocean levels or less ice layers/categories.' )
72
73      !                                ! Open the namelist file
74      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
75      !   
76      CALL ice_run_2                   ! read in namelist some run parameters
77      !         
78      rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice time step
79      numit   = nit000 - 1
80      !
81      CALL lim_msh_2                   ! ice mesh initialization
82      !
83      !                                ! Initial sea-ice state
84      IF( .NOT.ln_rstart ) THEN   ;   CALL lim_istate_2     ! start from rest: sea-ice deduced from sst
85      ELSE                        ;   CALL lim_rst_read_2   ! start from a restart file
86      ENDIF
87      !
88      tn_ice(:,:,1) = sist(:,:)        ! ice temperature  known by the ocean
89      fr_i  (:,:)   = 1.0 - frld(:,:)  ! sea-ice fraction known by the ocean
90      !
91      CALL lim_sbc_init_2              ! ice surface boundary condition   
92      !
93      IF( lk_lim2_vp )   THEN   ;   IF(lwp) WRITE(numout,*) '                VP  rheology - B-grid case'
94      ELSE                      ;   IF(lwp) WRITE(numout,*) '                EVP rheology - C-grid case'
95      ENDIF
96      !
97   END SUBROUTINE ice_init_2
98
99
100   SUBROUTINE ice_run_2
101      !!-------------------------------------------------------------------
102      !!                  ***  ROUTINE ice_run_2 ***
103      !!                 
104      !! ** Purpose :   Definition some run parameter for ice model
105      !!
106      !! ** Method  :   Read the namicerun namelist and check the parameter
107      !!       values called at the first timestep (nit000)
108      !!
109      !! ** input   :   Namelist namicerun
110      !!-------------------------------------------------------------------
111      NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, ln_limdmp, acrit, hsndif, hicdif
112      !!-------------------------------------------------------------------
113      !                   
114      REWIND( numnam_ice )                      ! Read Namelist namicerun
115      READ  ( numnam_ice , namicerun )
116      !
117      IF(lwp) THEN                              ! control print
118         WRITE(numout,*)
119         WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
120         WRITE(numout,*) ' ~~~~~~'
121         WRITE(numout,*) '   switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn
122         WRITE(numout,*) '   Ice damping                                 ln_limdmp   = ', ln_limdmp
123         WRITE(numout,*) '   minimum fraction for leads in the NH (SH)  acrit(1/2)   = ', acrit(:)
124         WRITE(numout,*) '   computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif
125         WRITE(numout,*) '   computation of temp. in ice  (=0) or not (=9999) hicdif = ', hicdif
126      ENDIF
127      !
128   END SUBROUTINE ice_run_2
129
130#else
131   !!----------------------------------------------------------------------
132   !!   Default option :        Empty module       NO LIM 2.0 sea-ice model
133   !!----------------------------------------------------------------------
134CONTAINS
135   SUBROUTINE ice_init_2      ! Empty routine
136   END SUBROUTINE ice_init_2
137#endif
138
139   !!======================================================================
140END MODULE iceini_2
Note: See TracBrowser for help on using the repository browser.