- Timestamp:
- 2017-12-13T15:58:53+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
r7646 r9019 13 13 USE oce ! ocean dynamics and tracers variables 14 14 USE dom_oce ! ocean space and time domain variables 15 USE phycst ! physical constants 15 16 USE sbc_oce ! surface boundary condition: ocean 16 17 USE zdf_oce ! ocean vertical physics variables 18 USE zdfdrg ! ocean vertical physics: bottom friction 19 USE ldftra ! ocean active tracers lateral physics 17 20 USE trd_oce ! trends: ocean variables 18 !!gm USE dynhpg ! hydrostatic pressure gradient19 USE zdfbfr ! bottom friction20 USE ldftra ! ocean active tracers lateral physics21 USE phycst ! physical constants22 21 USE trdvor ! ocean vorticity trends 23 22 USE trdglo ! trends:global domain averaged … … 27 26 USE iom ! I/O manager library 28 27 USE lib_mpp ! MPP library 29 USE wrk_nemo ! Memory allocation30 28 USE ldfslp ! Isopycnal slopes 31 29 … … 74 72 !! diagnose separately the KE trend associated with wind stress 75 73 !! - bottom friction case (jpdyn_bfr): 76 !! explicit case (ln_ bfrimp=F): bottom trend put in the 1st level74 !! explicit case (ln_drgimp=F): bottom trend put in the 1st level 77 75 !! of putrd, pvtrd 78 76 ! … … 86 84 INTEGER :: ikbu , ikbv ! local integers 87 85 INTEGER :: ikbum1, ikbvm1 ! - - 88 REAL(wp), POINTER, DIMENSION(:,:) :: z2dx, z2dy, zke2d ! 2D workspace 89 REAL(wp), POINTER, DIMENSION(:,:,:) :: zke ! 3D workspace 90 !!---------------------------------------------------------------------- 91 ! 92 CALL wrk_alloc( jpi, jpj, jpk, zke ) 86 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: z2dx, z2dy, zke2d ! 2D workspace 87 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zke ! 3D workspace 88 !!---------------------------------------------------------------------- 93 89 ! 94 90 CALL lbc_lnk( putrd, 'U', -1. ) ; CALL lbc_lnk( pvtrd, 'V', -1. ) ! lateral boundary conditions … … 125 121 CASE( jpdyn_zdf ) ; CALL iom_put( "ketrd_zdf" , zke ) ! vertical diffusion 126 122 ! ! ! wind stress trends 127 CALL wrk_alloc( jpi, jpj, z2dx, z2dy, zke2d)123 ALLOCATE( z2dx(jpi,jpj) , z2dy(jpi,jpj) , zke2d(jpi,jpj) ) 128 124 z2dx(:,:) = un(:,:,1) * ( utau_b(:,:) + utau(:,:) ) * e1e2u(:,:) * umask(:,:,1) 129 125 z2dy(:,:) = vn(:,:,1) * ( vtau_b(:,:) + vtau(:,:) ) * e1e2v(:,:) * vmask(:,:,1) … … 136 132 END DO 137 133 CALL iom_put( "ketrd_tau" , zke2d ) ! 138 CALL wrk_dealloc( jpi, jpj , z2dx, z2dy, zke2d )134 DEALLOCATE( z2dx , z2dy , zke2d ) 139 135 CASE( jpdyn_bfr ) ; CALL iom_put( "ketrd_bfr" , zke ) ! bottom friction (explicit case) 140 136 !!gm TO BE DONE properly 141 !!gm only valid if ln_ bfrimp=F otherwise the bottom stress as to be recomputed at the end of the computation....142 ! IF(.NOT. ln_ bfrimp) THEN137 !!gm only valid if ln_drgimp=F otherwise the bottom stress as to be recomputed at the end of the computation.... 138 ! IF(.NOT. ln_drgimp) THEN 143 139 ! DO jj = 1, jpj ! 144 140 ! DO ji = 1, jpi … … 163 159 !! reflechir a une possible sauvegarde du "vrai" un,vn pour le calcul de atf.... 164 160 ! 165 ! IF( ln_ bfrimp ) THEN ! bottom friction (implicit case)161 ! IF( ln_drgimp ) THEN ! bottom friction (implicit case) 166 162 ! DO jj = 1, jpj ! after velocity known (now filed at this stage) 167 163 ! DO ji = 1, jpi … … 192 188 END SELECT 193 189 ! 194 CALL wrk_dealloc( jpi, jpj, jpk, zke )195 !196 190 END SUBROUTINE trd_ken 197 191 … … 207 201 !! ** Work only for full steps and partial steps (ln_hpg_zco or ln_hpg_zps) 208 202 !!---------------------------------------------------------------------- 209 INTEGER, INTENT(in) :: kt ! ocean time-step index 210 !! 211 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT( out) :: pconv 212 ! 213 INTEGER :: ji, jj, jk ! dummy loop indices 214 INTEGER :: iku, ikv ! temporary integers 215 REAL(wp) :: zcoef ! temporary scalars 216 REAL(wp), POINTER, DIMENSION(:,:,:) :: zconv ! temporary conv on W-grid 217 !!---------------------------------------------------------------------- 218 ! 219 CALL wrk_alloc( jpi,jpj,jpk, zconv ) 203 INTEGER , INTENT(in ) :: kt ! ocean time-step index 204 REAL(wp), DIMENSION(:,:,:), INTENT( out) :: pconv ! 205 ! 206 INTEGER :: ji, jj, jk ! dummy loop indices 207 INTEGER :: iku, ikv ! local integers 208 REAL(wp) :: zcoef ! local scalars 209 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zconv ! 3D workspace 210 !!---------------------------------------------------------------------- 220 211 ! 221 212 ! Local constant initialization … … 240 231 END DO 241 232 ! 242 CALL wrk_dealloc( jpi,jpj,jpk, zconv )243 !244 233 END SUBROUTINE ken_p2k 245 234
Note: See TracChangeset
for help on using the changeset viewer.