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