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 branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

source: branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90 @ 2804

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

dev_r2802_LOCEAN10_agrif_lim: first implementation see ticket #848

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