- Timestamp:
- 2011-02-18T13:49:27+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
r2528 r2590 10 10 IMPLICIT NONE 11 11 PRIVATE 12 13 PUBLIC ldftra_oce_alloc ! called by nemo_init->nemo_alloc, nemogcm.F90 12 14 13 15 !!---------------------------------------------------------------------- … … 32 34 33 35 #if defined key_traldf_c3d 34 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: ahtt, ahtu, ahtv, ahtw !: ** 3D coefficients ** at T-, U-, V-, W-points36 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 3D coefficients ** at T-, U-, V-, W-points 35 37 #elif defined key_traldf_c2d 36 REAL(wp), PUBLIC, DIMENSION(jpi,jpj):: ahtt, ahtu, ahtv, ahtw !: ** 2D coefficients ** at T-, U-, V-, W-points38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 2D coefficients ** at T-, U-, V-, W-points 37 39 #elif defined key_traldf_c1d 38 REAL(wp), PUBLIC, DIMENSION(jpk) :: ahtt, ahtu, ahtv, ahtw !: ** 1D coefficients ** at T-, U-, V-, W-points 40 REAL(wp), PUBLIC, DIMENSION(jpk) :: ahtt, ahtu, ahtv, ahtw !: ** 1D coefficients ** at T-, U-, V-, W-points ARPDBGjpk 39 41 #else 40 42 REAL(wp), PUBLIC :: ahtt, ahtu, ahtv, ahtw !: ** 0D coefficients ** at T-, U-, V-, W-points … … 49 51 50 52 # if defined key_traldf_c3d 51 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: aeiu, aeiv, aeiw !: ** 3D coefficients ** at U-, V-, W-points [m2/s]53 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aeiu, aeiv, aeiw !: ** 3D coefficients ** at U-, V-, W-points [m2/s] 52 54 # elif defined key_traldf_c2d 53 REAL(wp), PUBLIC, DIMENSION(jpi,jpj):: aeiu, aeiv, aeiw !: ** 2D coefficients ** at U-, V-, W-points [m2/s]55 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: aeiu, aeiv, aeiw !: ** 2D coefficients ** at U-, V-, W-points [m2/s] 54 56 # elif defined key_traldf_c1d 55 REAL(wp), PUBLIC, DIMENSION(jpk):: aeiu, aeiv, aeiw !: ** 1D coefficients ** at U-, V-, W-points [m2/s]57 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: aeiu, aeiv, aeiw !: ** 1D coefficients ** at U-, V-, W-points [m2/s] 56 58 # else 57 59 REAL(wp), PUBLIC :: aeiu, aeiv, aeiw !: ** 0D coefficients ** at U-, V-, W-points [m2/s] 58 60 # endif 59 61 # if defined key_diaeiv 60 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: u_eiv, v_eiv, w_eiv !: eddy induced velocity [m/s]62 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: u_eiv, v_eiv, w_eiv !: eddy induced velocity [m/s] 61 63 # endif 62 64 … … 74 76 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 75 77 !!===================================================================== 78 CONTAINS 79 80 FUNCTION ldftra_oce_alloc() 81 !!---------------------------------------------------------------------- 82 !!---------------------------------------------------------------------- 83 IMPLICIT None 84 INTEGER :: ldftra_oce_alloc 85 INTEGER, DIMENSION(3) :: ierr 86 !!---------------------------------------------------------------------- 87 ierr(:) = 0 88 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)) 92 #elif defined key_traldf_c2d 93 ALLOCATE(ahtt(jpi,jpj), ahtu(jpi,jpj), ahtv(jpi,jpj), & 94 ahtw(jpi,jpj), Stat=ierr(1)) 95 #elif defined key_traldf_c1d 96 ! No need to allocate arrays where extent only depends on jpk ARPDBGjpk 97 #endif 98 99 #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)) 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 119 END FUNCTION ldftra_oce_alloc 120 121 !!---------------------------------------------------------------------- 122 76 123 END MODULE ldftra_oce
Note: See TracChangeset
for help on using the changeset viewer.