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/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

source: branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/dom_ice_2.F90 @ 2590

Last change on this file since 2590 was 2590, checked in by trackstand2, 13 years ago

Merge branch 'dynamic_memory' into master-svn-dyn

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1MODULE dom_ice_2
2   !!======================================================================
3   !!                   ***  MODULE  dom_ice  ***
4   !! LIM 2.0 Sea Ice :   Domain  variables
5   !!======================================================================
6   !! History :   2.0  !  03-08  (C. Ethe)  Free form and module
7   !!             3.3  !  2009-05 (G.Garric, C. Bricaud) addition of lim2_evp case
8   !!----------------------------------------------------------------------
9#if defined key_lim2
10   !!----------------------------------------------------------------------
11   !!   'key_lim2'                                       LIM2 sea-ice model
12   !!----------------------------------------------------------------------
13   !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
14   !! $Id$
15   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
16   !!----------------------------------------------------------------------
17   USE par_ice_2
18
19   IMPLICIT NONE
20   PRIVATE
21
22   ! Routine accessibility
23   PUBLIC    dom_ice_alloc_2    ! Called from nemogcm.F90
24
25   LOGICAL, PUBLIC ::   l_jeq     = .TRUE.     !: Equator inside the domain flag
26
27   INTEGER, PUBLIC ::   njeq , njeqm1          !: j-index of the equator if it is inside the domain
28      !                                        !  (otherwise = jpj+10 (SH) or -10 (SH) )
29
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
35
36
37# if defined key_lim2_vp
38   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)     ::   akappa , bkappa   !: first and third group of metric coefficients
39   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:,:,:) ::   alambd            !: second group of metric coefficients
40# else
41   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmv    , tmf      !: y-velocity and F-points masks
42   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmi               !: ice mask: =1 if ice thick > 0
43# endif
44
45#else
46   !!----------------------------------------------------------------------
47   !!   Default option          Empty module         NO LIM-2 sea-ice model
48   !!----------------------------------------------------------------------
49#endif
50   !!======================================================================
51#if defined key_lim2
52   CONTAINS
53
54     FUNCTION dom_ice_alloc_2()
55        USE in_out_manager, ONLY: ctl_warn
56        IMPLICIT none
57        INTEGER :: dom_ice_alloc_2
58        INTEGER :: ierr(2)
59
60        ierr(:) = 0
61
62        ALLOCATE(fs2cor(jpi,jpj),  fcor(jpi,jpj),                             &
63                 covrai(jpi,jpj),  area(jpi,jpj), tms(jpi,jpj), tmu(jpi,jpj), &
64                 wght(jpi,jpj,2,2),  Stat=ierr(1) )
65
66        ALLOCATE(                                                             &
67#if defined key_lim2_vp 
68                 akappa(jpi,jpj,2,2), bkappa(jpi,jpj,2,2),                    &
69                 alambd(jpi,jpj,2,2,2,2),                                     &
70#else
71                 tmv(jpi,jpj), tmf(jpi,jpj), tmi(jpi,jpj),                    &
72#endif
73                 Stat=ierr(2))
74
75        dom_ice_alloc_2 = MAXVAL(ierr)
76
77        IF(dom_ice_alloc_2 /= 0)THEN
78           CALL ctl_warn('dom_ice_alloc_2: failed to allocate arrays.')
79        END IF
80
81     END FUNCTION dom_ice_alloc_2
82#endif
83
84END MODULE dom_ice_2
Note: See TracBrowser for help on using the repository browser.