- Timestamp:
- 2011-02-26T13:31:38+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_oce.F90
r2590 r2618 4 4 !! Ocean physics : lateral tracer mixing coefficient defined in memory 5 5 !!===================================================================== 6 !! History : 9.0 ! 02-11 (G. Madec) Original code6 !! History : 9.0 ! 2002-11 (G. Madec) Original code 7 7 !!---------------------------------------------------------------------- 8 USE par_oce ! ocean parameters 8 USE par_oce ! ocean parameters 9 USE in_out_manager ! I/O manager 9 10 10 11 IMPLICIT NONE … … 34 35 35 36 #if defined key_traldf_c3d 36 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 3D coefficients ** at T-, U-, V-,W-points37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 3D coefficients ** at T-,U-,V-,W-points 37 38 #elif defined key_traldf_c2d 38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 2D coefficients ** at T-, U-, V-,W-points39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 2D coefficients ** at T-,U-,V-,W-points 39 40 #elif defined key_traldf_c1d 40 REAL(wp), PUBLIC, DIMENSION(jpk) :: ahtt, ahtu, ahtv, ahtw !: ** 1D coefficients ** at T-, U-, V-, W-points ARPDBGjpk41 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ahtt, ahtu, ahtv, ahtw !: ** 1D coefficients ** at T-,U-,V-,W-points 41 42 #else 42 REAL(wp), PUBLIC :: ahtt, ahtu, ahtv, ahtw !: ** 0D coefficients ** at T-, U-, V-,W-points43 REAL(wp), PUBLIC :: ahtt, ahtu, ahtv, ahtw !: ** 0D coefficients ** at T-,U-,V-,W-points 43 44 #endif 44 45 45 46 46 #if defined key_traldf_eiv … … 49 49 !!---------------------------------------------------------------------- 50 50 LOGICAL, PUBLIC, PARAMETER :: lk_traldf_eiv = .TRUE. !: eddy induced velocity flag 51 51 52 ! !!! eddy coefficients at U-, V-, W-points [m2/s] 52 53 # if defined key_traldf_c3d 53 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aeiu , aeiv, aeiw !: ** 3D coefficients ** at U-, V-, W-points [m2/s]54 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aeiu , aeiv , aeiw !: ** 3D coefficients ** 54 55 # elif defined key_traldf_c2d 55 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: aeiu, aeiv, aeiw !: ** 2D coefficients ** at U-, V-, W-points [m2/s]56 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: aeiu , aeiv , aeiw !: ** 2D coefficients ** 56 57 # elif defined key_traldf_c1d 57 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: aeiu, aeiv, aeiw !: ** 1D coefficients ** at U-, V-, W-points [m2/s]58 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: aeiu , aeiv , aeiw !: ** 1D coefficients ** 58 59 # else 59 REAL(wp), PUBLIC :: aeiu, aeiv, aeiw !: ** 0D coefficients ** at U-, V-, W-points [m2/s]60 REAL(wp), PUBLIC :: aeiu , aeiv , aeiw !: ** 0D coefficients ** 60 61 # endif 61 62 # if defined key_diaeiv … … 75 76 !! $Id$ 76 77 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 77 !! =====================================================================78 !!---------------------------------------------------------------------- 78 79 CONTAINS 79 80 80 FUNCTION ldftra_oce_alloc()81 INTEGER FUNCTION ldftra_oce_alloc() 81 82 !!---------------------------------------------------------------------- 83 !! *** FUNCTION ldftra_oce_alloc *** 82 84 !!---------------------------------------------------------------------- 83 IMPLICIT None84 INTEGER :: ldftra_oce_alloc85 85 INTEGER, DIMENSION(3) :: ierr 86 86 !!---------------------------------------------------------------------- … … 88 88 89 89 #if defined key_traldf_c3d 90 ALLOCATE(ahtt(jpi,jpj,jpk), ahtu(jpi,jpj,jpk), ahtv(jpi,jpj,jpk), & 91 ahtw(jpi,jpj,jpk), Stat=ierr(1)) 90 ALLOCATE( ahtt(jpi,jpj,jpk) , ahtu(jpi,jpj,jpk) , ahtv(jpi,jpj,jpk) , ahtw(jpi,jpj,jpk) , STAT=ierr(1) ) 92 91 #elif defined key_traldf_c2d 93 ALLOCATE(ahtt(jpi,jpj), ahtu(jpi,jpj), ahtv(jpi,jpj), & 94 ahtw(jpi,jpj), Stat=ierr(1)) 92 ALLOCATE( ahtt(jpi,jpj ), ahtu(jpi,jpj) , ahtv(jpi,jpj ) , ahtw(jpi,jpj ) , STAT=ierr(1) ) 95 93 #elif defined key_traldf_c1d 96 ! No need to allocate arrays where extent only depends on jpk ARPDBGjpk94 ALLOCATE( ahtt( jpk) , ahtu( jpk) , ahtv( jpk) , ahtw( jpk) , STAT=ierr(1) ) 97 95 #endif 98 96 ! 99 97 #if defined key_traldf_eiv 100 101 #if defined key_traldf_c3d 102 ALLOCATE(aeiu(jpi,jpj,jpk), aeiv(jpi,jpj,jpk), aeiw(jpi,jpj,jpk), & 103 Stat=ierr(2)) 104 #elif defined key_traldf_c2d 105 ALLOCATE(aeiu(jpi,jpj), aeiv(jpi,jpj), aeiw(jpi,jpj), Stat=ierr(2)) 106 #elif defined key_traldf_c1d 107 ALLOCATE(aeiu(jpk), aeiv(jpk), aeiw(jpk), Stat=ierr(2)) 98 # if defined key_traldf_c3d 99 ALLOCATE( aeiu(jpi,jpj,jpk) , aeiv(jpi,jpj,jpk) , aeiw(jpi,jpj,jpk) , STAT=ierr(2) ) 100 # elif defined key_traldf_c2d 101 ALLOCATE( aeiu(jpi,jpj ) , aeiv(jpi,jpj ) , aeiw(jpi,jpj ) , STAT=ierr(2) ) 102 # elif defined key_traldf_c1d 103 ALLOCATE( aeiu( jpk) , aeiv( jpk) , aeiw( jpk) , STAT=ierr(2) ) 104 # endif 105 # if defined key_diaeiv 106 ALLOCATE( u_eiv(jpi,jpj,jpk), v_eiv(jpi,jpj,jpk), w_eiv(jpi,jpj,jpk), STAT=ierr(3)) 107 # endif 108 108 #endif 109 110 # if defined key_diaeiv 111 ALLOCATE(u_eiv(jpi,jpj,jpk), v_eiv(jpi,jpj,jpk), w_eiv(jpi,jpj,jpk), & 112 Stat=ierr(3)) 113 # endif 114 115 #endif 116 117 ldftra_oce_alloc = MAXVAL(ierr) 118 109 ldftra_oce_alloc = MAXVAL( ierr ) 110 IF( ldftra_oce_alloc /= 0 ) CALL ctl_warn('ldftra_oce_alloc: failed to allocate arrays') 111 ! 119 112 END FUNCTION ldftra_oce_alloc 120 113 121 !!---------------------------------------------------------------------- 122 114 !!===================================================================== 123 115 END MODULE ldftra_oce
Note: See TracChangeset
for help on using the changeset viewer.