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 @ 2730

Last change on this file since 2730 was 2730, checked in by rblod, 13 years ago

Add missing logical lwp

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