1 | MODULE 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 ! LIM parameters |
---|
18 | |
---|
19 | IMPLICIT NONE |
---|
20 | PRIVATE |
---|
21 | |
---|
22 | PUBLIC dom_ice_alloc_2 ! Called from nemogcm.F90 |
---|
23 | |
---|
24 | LOGICAL, PUBLIC :: l_jeq = .TRUE. !: Equator inside the domain flag |
---|
25 | |
---|
26 | INTEGER, PUBLIC :: njeq , njeqm1 !: j-index of the equator if it is inside the domain |
---|
27 | ! ! (otherwise = jpj+10 (SH) or -10 (SH) ) |
---|
28 | |
---|
29 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fs2cor , fcor !: coriolis factor and coeficient |
---|
30 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: covrai !: sine of geographic latitude |
---|
31 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: area !: surface of grid cell |
---|
32 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tms , tmu !: temperature and velocity points masks |
---|
33 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: wght !: weight of the 4 neighbours to compute averages |
---|
34 | |
---|
35 | |
---|
36 | # if defined key_lim2_vp |
---|
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 |
---|
39 | # else |
---|
40 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmv , tmf !: y-velocity and F-points masks |
---|
41 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmi !: ice mask: =1 if ice thick > 0 |
---|
42 | # endif |
---|
43 | !!---------------------------------------------------------------------- |
---|
44 | CONTAINS |
---|
45 | |
---|
46 | INTEGER FUNCTION dom_ice_alloc_2() |
---|
47 | !!---------------------------------------------------------------------- |
---|
48 | USE lib_mpp, ONLY: ctl_warn ! MPP library |
---|
49 | INTEGER :: ierr(2) |
---|
50 | !!---------------------------------------------------------------------- |
---|
51 | ierr(:) = 0 |
---|
52 | ! |
---|
53 | ALLOCATE( fs2cor(jpi,jpj) , fcor(jpi,jpj) , & |
---|
54 | & covrai(jpi,jpj) , area(jpi,jpj) , tms(jpi,jpj) , tmu(jpi,jpj) , & |
---|
55 | & wght (jpi,jpj,2,2) , STAT=ierr(1) ) |
---|
56 | ! |
---|
57 | ALLOCATE( & |
---|
58 | #if defined key_lim2_vp |
---|
59 | & akappa(jpi,jpj,2,2) , bkappa(jpi,jpj,2,2), & |
---|
60 | & alambd(jpi,jpj,2,2,2,2) , & |
---|
61 | #else |
---|
62 | & tmv(jpi,jpj) , tmf(jpi,jpj) , tmi(jpi,jpj) , & |
---|
63 | #endif |
---|
64 | & STAT=ierr(2) ) |
---|
65 | ! |
---|
66 | dom_ice_alloc_2 = MAXVAL(ierr) |
---|
67 | IF( dom_ice_alloc_2 /= 0 ) CALL ctl_warn('dom_ice_alloc_2: failed to allocate arrays') |
---|
68 | ! |
---|
69 | END FUNCTION dom_ice_alloc_2 |
---|
70 | |
---|
71 | #else |
---|
72 | !!---------------------------------------------------------------------- |
---|
73 | !! Default option Empty module NO LIM-2 sea-ice model |
---|
74 | !!---------------------------------------------------------------------- |
---|
75 | #endif |
---|
76 | !!====================================================================== |
---|
77 | END MODULE dom_ice_2 |
---|