[3] | 1 | MODULE oce |
---|
| 2 | !!====================================================================== |
---|
[15] | 3 | !! *** MODULE oce *** |
---|
[3] | 4 | !! Ocean : dynamics and active tracers defined in memory |
---|
| 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : 1.0 ! 2002-11 (G. Madec) F90: Free form and module |
---|
[1438] | 7 | !! 3.1 ! 2009-02 (G. Madec, M. Leclair) pure z* coordinate |
---|
[2528] | 8 | !! 3.3 ! 2010-09 (C. Ethe) TRA-TRC merge: add ts, gtsu, gtsv 4D arrays |
---|
[3] | 9 | !!---------------------------------------------------------------------- |
---|
[2715] | 10 | USE par_oce ! ocean parameters |
---|
| 11 | USE lib_mpp ! MPP library |
---|
[3] | 12 | |
---|
| 13 | IMPLICIT NONE |
---|
[15] | 14 | PRIVATE |
---|
[3] | 15 | |
---|
[2715] | 16 | PUBLIC oce_alloc ! routine called by nemo_init in nemogcm.F90 |
---|
[3] | 17 | |
---|
[2715] | 18 | LOGICAL, PUBLIC :: l_traldf_rot = .FALSE. !: rotated laplacian operator for lateral diffusion |
---|
| 19 | |
---|
| 20 | !! dynamics and tracer fields ! before ! now ! after ! the after trends becomes the fields |
---|
| 21 | !! -------------------------- ! fields ! fields ! trends ! only after tra_zdf and dyn_spg |
---|
| 22 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ub , un , ua !: i-horizontal velocity [m/s] |
---|
| 23 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: vb , vn , va !: j-horizontal velocity [m/s] |
---|
| 24 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wn !: vertical velocity [m/s] |
---|
| 25 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rotb , rotn !: relative vorticity [s-1] |
---|
| 26 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivb, hdivn !: horizontal divergence [s-1] |
---|
[3294] | 27 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsb , tsn !: 4D T-S fields [Celcius,psu] |
---|
[2715] | 28 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rn2b , rn2 !: brunt-vaisala frequency**2 [s-2] |
---|
[1438] | 29 | ! |
---|
[3294] | 30 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsa !: 4D T-S trends fields & work array |
---|
| 31 | ! |
---|
[2715] | 32 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rhd !: in situ density anomalie rhd=(rho-rau0)/rau0 [no units] |
---|
| 33 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rhop !: potential volumic mass [kg/m3] |
---|
[3] | 34 | |
---|
[2715] | 35 | !! free surface ! before ! now ! after ! |
---|
| 36 | !! ------------ ! fields ! fields ! trends ! |
---|
[3294] | 37 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:), TARGET :: sshb , sshn , ssha !: sea surface height at t-point [m] |
---|
| 38 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshu_b , sshu_n , sshu_a !: sea surface height at u-point [m] |
---|
| 39 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshv_b , sshv_n , sshv_a !: sea surface height at u-point [m] |
---|
| 40 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshf_n !: sea surface height at f-point [m] |
---|
[2528] | 41 | ! |
---|
[2715] | 42 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: spgu, spgv !: horizontal surface pressure gradient |
---|
[359] | 43 | |
---|
[2528] | 44 | !! interpolated gradient (only used in zps case) |
---|
| 45 | !! --------------------- |
---|
[2715] | 46 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtsu, gtsv !: horizontal gradient of T, S bottom u-point |
---|
| 47 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: gru , grv !: horizontal gradient of rd at bottom u-point |
---|
[2528] | 48 | |
---|
[3625] | 49 | !! arrays relating to embedding ice in the ocean. These arrays need to be declared |
---|
| 50 | !! even if no ice model is required. In the no ice model or traditional levitating |
---|
| 51 | !! ice cases they contain only zeros |
---|
| 52 | !! --------------------- |
---|
| 53 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass !: mass of snow and ice at current ice time step [Kg/m2] |
---|
| 54 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass_b !: mass of snow and ice at previous ice time step [Kg/m2] |
---|
| 55 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_fmass !: time evolution of mass of snow+ice [Kg/m2/s] |
---|
| 56 | |
---|
[3] | 57 | !!---------------------------------------------------------------------- |
---|
[2715] | 58 | !! NEMO/OPA 4.0 , NEMO Consortium (2011) |
---|
[1438] | 59 | !! $Id$ |
---|
[2715] | 60 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 61 | !!---------------------------------------------------------------------- |
---|
| 62 | CONTAINS |
---|
| 63 | |
---|
| 64 | INTEGER FUNCTION oce_alloc() |
---|
| 65 | !!---------------------------------------------------------------------- |
---|
| 66 | !! *** FUNCTION oce_alloc *** |
---|
| 67 | !!---------------------------------------------------------------------- |
---|
[3625] | 68 | INTEGER :: ierr(3) |
---|
[2715] | 69 | !!---------------------------------------------------------------------- |
---|
| 70 | ! |
---|
| 71 | ALLOCATE( ub (jpi,jpj,jpk) , un (jpi,jpj,jpk) , ua(jpi,jpj,jpk) , & |
---|
| 72 | & vb (jpi,jpj,jpk) , vn (jpi,jpj,jpk) , va(jpi,jpj,jpk) , & |
---|
| 73 | & wn (jpi,jpj,jpk) , & |
---|
| 74 | & rotb (jpi,jpj,jpk) , rotn (jpi,jpj,jpk) , & |
---|
| 75 | & hdivb(jpi,jpj,jpk) , hdivn(jpi,jpj,jpk) , & |
---|
| 76 | & tsb (jpi,jpj,jpk,jpts) , tsn (jpi,jpj,jpk,jpts) , tsa(jpi,jpj,jpk,jpts) , & |
---|
| 77 | & rn2b (jpi,jpj,jpk) , rn2 (jpi,jpj,jpk) , STAT=ierr(1) ) |
---|
| 78 | ! |
---|
[3625] | 79 | ALLOCATE( rhd (jpi,jpj,jpk) , & |
---|
| 80 | & rhop(jpi,jpj,jpk) , & |
---|
| 81 | & sshb (jpi,jpj) , sshn (jpi,jpj) , ssha (jpi,jpj) , & |
---|
| 82 | & sshu_b(jpi,jpj) , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) , & |
---|
| 83 | & sshv_b(jpi,jpj) , sshv_n(jpi,jpj) , sshv_a(jpi,jpj) , & |
---|
| 84 | & sshf_n(jpi,jpj) , & |
---|
| 85 | & spgu (jpi,jpj) , spgv(jpi,jpj) , & |
---|
| 86 | & gtsu(jpi,jpj,jpts), gtsv(jpi,jpj,jpts), & |
---|
| 87 | & gru(jpi,jpj) , grv(jpi,jpj) , STAT=ierr(2) ) |
---|
[2715] | 88 | ! |
---|
[3625] | 89 | ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & |
---|
| 90 | & snwice_fmass(jpi,jpj), STAT= ierr(3) ) |
---|
| 91 | ! |
---|
[2715] | 92 | oce_alloc = MAXVAL( ierr ) |
---|
| 93 | IF( oce_alloc /= 0 ) CALL ctl_warn('oce_alloc: failed to allocate arrays') |
---|
| 94 | ! |
---|
| 95 | END FUNCTION oce_alloc |
---|
| 96 | |
---|
[1438] | 97 | !!====================================================================== |
---|
[3] | 98 | END MODULE oce |
---|