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.
dom_ice_2.F90 in branches/UKMO/dev_r5518_pcbias_ipc/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

source: branches/UKMO/dev_r5518_pcbias_ipc/NEMOGCM/NEMO/LIM_SRC_2/dom_ice_2.F90 @ 7065

Last change on this file since 7065 was 7065, checked in by isabella, 8 years ago

test commit

File size: 4.0 KB
RevLine 
[821]1MODULE dom_ice_2
[7065]2!test
[3]3   !!======================================================================
[12]4   !!                   ***  MODULE  dom_ice  ***
[821]5   !! LIM 2.0 Sea Ice :   Domain  variables
[3]6   !!======================================================================
[508]7   !! History :   2.0  !  03-08  (C. Ethe)  Free form and module
[2528]8   !!             3.3  !  2009-05 (G.Garric, C. Bricaud) addition of lim2_evp case
[12]9   !!----------------------------------------------------------------------
[888]10#if defined key_lim2
[508]11   !!----------------------------------------------------------------------
[2528]12   !!   'key_lim2'                                       LIM2 sea-ice model
13   !!----------------------------------------------------------------------
14   !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
[1156]15   !! $Id$
[2528]16   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[12]17   !!----------------------------------------------------------------------
[2715]18   USE par_ice_2   ! LIM parameters
[3]19
20   IMPLICIT NONE
[77]21   PRIVATE
[3]22
[2715]23   PUBLIC    dom_ice_alloc_2    ! Called from nemogcm.F90
24
[508]25   LOGICAL, PUBLIC ::   l_jeq     = .TRUE.     !: Equator inside the domain flag
[3]26
[508]27   INTEGER, PUBLIC ::   njeq , njeqm1          !: j-index of the equator if it is inside the domain
28      !                                        !  (otherwise = jpj+10 (SH) or -10 (SH) )
[3]29
[2715]30   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   fs2cor , fcor     !: coriolis factor and coeficient
31   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   covrai            !: sine of geographic latitude
32   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   area              !: surface of grid cell
33   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tms    , tmu      !: temperature and velocity points masks
34   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)     ::   wght              !: weight of the 4 neighbours to compute averages
[3764]35   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmv               !: y-velocity mask used for evp rheology
[3]36
[2715]37   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)     ::   akappa , bkappa   !: first and third group of metric coefficients
38   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:,:,:) ::   alambd            !: second group of metric coefficients
[3764]39   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmf               !: F-points masks
[2715]40   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmi               !: ice mask: =1 if ice thick > 0
41   !!----------------------------------------------------------------------
42   CONTAINS
[2528]43
[2715]44   INTEGER FUNCTION dom_ice_alloc_2()
45      !!----------------------------------------------------------------------
46      USE lib_mpp, ONLY:   ctl_warn   ! MPP library
47      INTEGER :: ierr(2)
48      !!----------------------------------------------------------------------
49      ierr(:) = 0
50      !
51      ALLOCATE( fs2cor(jpi,jpj)     , fcor(jpi,jpj) ,                                   &
52         &      covrai(jpi,jpj)     , area(jpi,jpj) , tms(jpi,jpj) , tmu(jpi,jpj) ,     &
53         &      wght  (jpi,jpj,2,2)                                               , STAT=ierr(1) )
54         !
55      ALLOCATE(                                                    &
56#if defined key_lim2_vp 
57         &        akappa(jpi,jpj,2,2)     , bkappa(jpi,jpj,2,2),   &
58         &        alambd(jpi,jpj,2,2,2,2) ,                        &
[2528]59#else
[2715]60         &        tmv(jpi,jpj) , tmf(jpi,jpj) , tmi(jpi,jpj) ,     &
61#endif
62         &        STAT=ierr(2) )
63         !
64      dom_ice_alloc_2 = MAXVAL(ierr)
65      IF( dom_ice_alloc_2 /= 0 )   CALL ctl_warn('dom_ice_alloc_2: failed to allocate arrays')
66      !
67   END FUNCTION dom_ice_alloc_2
68
69#else
[2528]70   !!----------------------------------------------------------------------
71   !!   Default option          Empty module         NO LIM-2 sea-ice model
72   !!----------------------------------------------------------------------
73#endif
[3]74   !!======================================================================
[821]75END MODULE dom_ice_2
Note: See TracBrowser for help on using the repository browser.