- Timestamp:
- 2021-03-03T17:04:07+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/tramle.F90
r14574 r14576 110 110 SELECT CASE( nn_mld_uv ) ! MLD at u- & v-pts 111 111 CASE ( 0 ) != min of the 2 neighbour MLDs 112 DO_2D( 1, 0, 1, 0 ) 112 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 113 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 113 114 zhu(ji,jj) = MIN( hmle(ji+1,jj), hmle(ji,jj) ) 114 115 zhv(ji,jj) = MIN( hmle(ji,jj+1), hmle(ji,jj) ) 115 116 END_2D 116 117 CASE ( 1 ) != average of the 2 neighbour MLDs 117 DO_2D( 1, 0, 1, 0 ) 118 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 119 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 118 120 zhu(ji,jj) = MAX( hmle(ji+1,jj), hmle(ji,jj) ) 119 121 zhv(ji,jj) = MAX( hmle(ji,jj+1), hmle(ji,jj) ) 120 122 END_2D 121 123 CASE ( 2 ) != max of the 2 neighbour MLDs 122 DO_2D( 1, 0, 1, 0 ) 124 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 125 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 123 126 zhu(ji,jj) = MAX( hmle(ji+1,jj), hmle(ji,jj) ) 124 127 zhv(ji,jj) = MAX( hmle(ji,jj+1), hmle(ji,jj) ) … … 126 129 END SELECT 127 130 IF( nn_mle == 0 ) THEN ! Fox-Kemper et al. 2010 formulation 128 DO_2D( 1, 0, 1, 0 ) 131 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 132 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 129 133 zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj) * e2u(ji,jj) & 130 134 & * dbdx_mle(ji,jj) * MIN( 111.e3_wp , e1u(ji,jj) ) & … … 137 141 ! 138 142 ELSEIF( nn_mle == 1 ) THEN ! New formulation (Lf = 5km fo/ff with fo=Coriolis parameter at latitude rn_lat) 139 DO_2D( 1, 0, 1, 0 ) 143 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 144 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 140 145 zpsim_u(ji,jj) = rc_f * zhu(ji,jj) * zhu(ji,jj) * e2u(ji,jj) & 141 146 & * dbdx_mle(ji,jj) * MIN( 111.e3_wp , e1u(ji,jj) ) … … 149 154 ! !== MLD used for MLE ==! 150 155 ! ! compute from the 10m density to deal with the diurnal cycle 151 DO_2D( 1, 1, 1, 1 ) 156 ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 ) 157 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 152 158 inml_mle(ji,jj) = mbkt(ji,jj) + 1 ! init. to number of ocean w-level (T-level + 1) 153 159 END_2D 154 160 IF ( nla10 > 0 ) THEN ! avoid case where first level is thicker than 10m 155 DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 ) ! from the bottom to nlb10 (10m) 161 ! [comm_cleanup] ! DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 ) ! from the bottom to nlb10 (10m) 162 DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, nlb10, -1 ) ! from the bottom to nlb10 (10m) 156 163 IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rn_rho_c_mle ) inml_mle(ji,jj) = jk ! Mixed layer 157 164 END_3D … … 163 170 zbm (:,:) = 0._wp 164 171 zn2 (:,:) = 0._wp 165 DO_3D( 1, 1, 1, 1, 1, ikmax ) ! MLD and mean buoyancy and N2 over the mixed layer 172 ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, 1, ikmax ) ! MLD and mean buoyancy and N2 over the mixed layer 173 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, ikmax ) ! MLD and mean buoyancy and N2 over the mixed layer 166 174 zc = e3t(ji,jj,jk,Kmm) * REAL( MIN( MAX( 0, inml_mle(ji,jj)-jk ) , 1 ) ) ! zc being 0 outside the ML t-points 167 175 zmld(ji,jj) = zmld(ji,jj) + zc … … 172 180 SELECT CASE( nn_mld_uv ) ! MLD at u- & v-pts 173 181 CASE ( 0 ) != min of the 2 neighbour MLDs 174 DO_2D( 1, 0, 1, 0 ) 182 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 183 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 175 184 zhu(ji,jj) = MIN( zmld(ji+1,jj), zmld(ji,jj) ) 176 185 zhv(ji,jj) = MIN( zmld(ji,jj+1), zmld(ji,jj) ) 177 186 END_2D 178 187 CASE ( 1 ) != average of the 2 neighbour MLDs 179 DO_2D( 1, 0, 1, 0 ) 188 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 189 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 180 190 zhu(ji,jj) = ( zmld(ji+1,jj) + zmld(ji,jj) ) * 0.5_wp 181 191 zhv(ji,jj) = ( zmld(ji,jj+1) + zmld(ji,jj) ) * 0.5_wp 182 192 END_2D 183 193 CASE ( 2 ) != max of the 2 neighbour MLDs 184 DO_2D( 1, 0, 1, 0 ) 194 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 195 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 185 196 zhu(ji,jj) = MAX( zmld(ji+1,jj), zmld(ji,jj) ) 186 197 zhv(ji,jj) = MAX( zmld(ji,jj+1), zmld(ji,jj) ) … … 188 199 END SELECT 189 200 ! ! convert density into buoyancy 190 DO_2D( 1, 1, 1, 1 ) 201 ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 ) 202 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 191 203 zbm(ji,jj) = + grav * zbm(ji,jj) / MAX( e3t(ji,jj,1,Kmm), zmld(ji,jj) ) 192 204 END_2D … … 201 213 ! 202 214 IF( nn_mle == 0 ) THEN ! Fox-Kemper et al. 2010 formulation 203 DO_2D( 1, 0, 1, 0 ) 215 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 216 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 204 217 zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj) * e2_e1u(ji,jj) & 205 218 & * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) ) & … … 212 225 ! 213 226 ELSEIF( nn_mle == 1 ) THEN ! New formulation (Lf = 5km fo/ff with fo=Coriolis parameter at latitude rn_lat) 214 DO_2D( 1, 0, 1, 0 ) 227 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 228 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 215 229 zpsim_u(ji,jj) = rc_f * zhu(ji,jj) * zhu(ji,jj) * e2_e1u(ji,jj) & 216 230 & * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) ) … … 222 236 ! 223 237 IF( nn_conv == 1 ) THEN ! No MLE in case of convection 224 DO_2D( 1, 0, 1, 0 ) 238 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 239 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 225 240 IF( MIN( zn2(ji,jj) , zn2(ji+1,jj) ) < 0._wp ) zpsim_u(ji,jj) = 0._wp 226 241 IF( MIN( zn2(ji,jj) , zn2(ji,jj+1) ) < 0._wp ) zpsim_v(ji,jj) = 0._wp … … 230 245 ENDIF ! end of ln_osm_mle conditional 231 246 ! !== structure function value at uw- and vw-points ==! 232 DO_2D( 1, 0, 1, 0 ) 247 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 248 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 233 249 zhu(ji,jj) = 1._wp / MAX(zhu(ji,jj), rsmall) ! hu --> 1/hu 234 250 zhv(ji,jj) = 1._wp / MAX(zhv(ji,jj), rsmall) … … 238 254 zpsi_vw(:,:,:) = 0._wp 239 255 ! 240 DO_3D( 1, 0, 1, 0, 2, ikmax ) ! start from 2 : surface value = 0 256 ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 2, ikmax ) ! start from 2 : surface value = 0 257 DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 2, ikmax ) ! start from 2 : surface value = 0 258 241 259 zcuw = 1._wp - ( gdepw(ji+1,jj,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhu(ji,jj) 242 260 zcvw = 1._wp - ( gdepw(ji,jj+1,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhv(ji,jj) … … 252 270 ! !== transport increased by the MLE induced transport ==! 253 271 DO jk = 1, ikmax 254 DO_2D( 1, 0, 1, 0 ) ! CAUTION pu,pv must be defined at row/column i=1 / j=1 272 ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) ! CAUTION pu,pv must be defined at row/column i=1 / j=1 273 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 255 274 pu(ji,jj,jk) = pu(ji,jj,jk) + ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji,jj,jk+1) ) 256 275 pv(ji,jj,jk) = pv(ji,jj,jk) + ( zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj,jk+1) ) 257 276 END_2D 258 DO_2D( 0, 0, 0, 0 ) 277 ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 278 DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 259 279 pw(ji,jj,jk) = pw(ji,jj,jk) - ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji-1,jj,jk) & 260 280 & + zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj-1,jk) ) * wmask(ji,jj,1) … … 270 290 ! 271 291 IF (ln_osm_mle.and.ln_zdfosm) THEN 272 DO_2D( 0, 0, 0, 0 ) 292 ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 293 DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 273 294 zLf_NH(ji,jj) = SQRT( rb_c * hmle(ji,jj) ) * r1_ft(ji,jj) ! Lf = N H / f 274 295 END_2D 275 296 ELSE 276 DO_2D( 0, 0, 0, 0 ) 297 ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 298 DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 277 299 zLf_NH(ji,jj) = SQRT( rb_c * zmld(ji,jj) ) * r1_ft(ji,jj) ! Lf = N H / f 278 300 END_2D … … 280 302 ! 281 303 ! divide by cross distance to give streamfunction with dimensions m^2/s 282 DO_3D( 0, 0, 0, 0, 1, ikmax+1 ) 304 ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, ikmax+1 ) 305 DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, ikmax+1 ) 283 306 zpsiu_mle(ji,jj,jk) = zpsi_uw(ji,jj,jk) * r1_e2u(ji,jj) 284 307 zpsiv_mle(ji,jj,jk) = zpsi_vw(ji,jj,jk) * r1_e1v(ji,jj)
Note: See TracChangeset
for help on using the changeset viewer.