Changeset 5831 for branches/2015
- Timestamp:
- 2015-10-25T11:33:18+01:00 (9 years ago)
- Location:
- branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
r5760 r5831 74 74 !! ** Action : - pta becomes the after tracer 75 75 !!--------------------------------------------------------------------- 76 USE oce , ONLY: zwd => ua , zws => va ! (ua,va) used as 3D workspace77 !78 76 INTEGER , INTENT(in ) :: kt ! ocean time-step index 79 77 INTEGER , INTENT(in ) :: kit000 ! first time step index … … 86 84 INTEGER :: ji, jj, jk, jn ! dummy loop indices 87 85 REAL(wp) :: zrhs, ze3tb, ze3tn, ze3ta ! local scalars 88 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwi, zwt 86 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwi, zwt, zwd, zws 89 87 !!--------------------------------------------------------------------- 90 88 ! 91 89 IF( nn_timing == 1 ) CALL timing_start('tra_zdf_imp') 92 90 ! 93 CALL wrk_alloc( jpi, jpj, jpk, zwi, zwt)91 CALL wrk_alloc( jpi,jpj,jpk, zwi, zwt, zwd, zws ) 94 92 ! 95 93 IF( kt == kit000 ) THEN … … 226 224 ! ! ================= ! 227 225 ! 228 CALL wrk_dealloc( jpi, jpj, jpk, zwi, zwt)226 CALL wrk_dealloc( jpi,jpj,jpk, zwi, zwt, zwd, zws ) 229 227 ! 230 228 IF( nn_timing == 1 ) CALL timing_stop('tra_zdf_imp') -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
r5758 r5831 11 11 12 12 !!---------------------------------------------------------------------- 13 !! zdf_evd : increase the momentum and tracer Kz at the location of14 !! statically unstable portion of the water column (ln_zdfevd=T)13 !! zdf_evd : increase the momentum and tracer Kz at the location of 14 !! statically unstable portion of the water column (ln_zdfevd=T) 15 15 !!---------------------------------------------------------------------- 16 16 USE oce ! ocean dynamics and tracers variables 17 17 USE dom_oce ! ocean space and time domain variables 18 18 USE zdf_oce ! ocean vertical physics variables 19 ! 19 20 USE in_out_manager ! I/O manager 20 21 USE iom ! for iom_put 21 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE wrk_nemo ! work arrays 22 24 USE timing ! Timing 23 25 … … 51 53 !! References : Lazar, A., these de l'universite Paris VI, France, 1997 52 54 !!---------------------------------------------------------------------- 53 USE oce, zavt_evd => ua , zavm_evd => va ! (ua,va) used ua workspace54 !55 55 INTEGER, INTENT( in ) :: kt ! ocean time-step indexocean time step 56 56 ! 57 57 INTEGER :: ji, jj, jk ! dummy loop indices 58 REAL(wp), POINTER, DIMENSION(:,:,:) :: zavt_evd, zavm_evd 58 59 !!---------------------------------------------------------------------- 59 60 ! … … 66 67 IF(lwp) WRITE(numout,*) 67 68 ENDIF 68 69 ! 70 CALL wrk_alloc( jpi,jpj,jpk, zavt_evd, zavm_evd ) 71 ! 69 72 zavt_evd(:,:,:) = avt(:,:,:) ! set avt prior to evd application 70 73 ! 71 74 SELECT CASE ( nn_evdm ) 72 75 ! … … 111 114 CALL iom_put( "avt_evd", zavt_evd ) ! output this change 112 115 ! 116 CALL wrk_dealloc( jpi,jpj,jpk, zavt_evd, zavm_evd ) 117 ! 113 118 IF( nn_timing == 1 ) CALL timing_stop('zdf_evd') 114 119 ! -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r5777 r5831 105 105 !! Koch-Larrouy et al. 2007, GRL. 106 106 !!---------------------------------------------------------------------- 107 USE oce, zav_tide => ua ! use ua as workspace108 !!109 107 INTEGER, INTENT(in) :: kt ! ocean time-step 110 ! !108 ! 111 109 INTEGER :: ji, jj, jk ! dummy loop indices 112 110 REAL(wp) :: ztpc ! scalar workspace 113 REAL(wp), POINTER, DIMENSION(:,:) :: zkz 111 REAL(wp), POINTER, DIMENSION(:,:) :: zkz 112 REAL(wp), POINTER, DIMENSION(:,:,:) :: zav_tide 114 113 !!---------------------------------------------------------------------- 115 114 ! 116 115 IF( nn_timing == 1 ) CALL timing_start('zdf_tmx') 117 116 ! 118 CALL wrk_alloc( jpi,jpj, zkz ) 119 117 CALL wrk_alloc( jpi,jpj, zkz ) 118 CALL wrk_alloc( jpi,jpj,jpk, zav_tide ) 119 ! 120 120 ! ! ----------------------- ! 121 121 ! ! Standard tidal mixing ! (compute zav_tide) … … 180 180 IF(ln_ctl) CALL prt_ctl(tab3d_1=zav_tide , clinfo1=' tmx - av_tide: ', tab3d_2=avt, clinfo2=' avt: ', ovlap=1, kdim=jpk) 181 181 ! 182 CALL wrk_dealloc( jpi,jpj, zkz ) 182 CALL wrk_dealloc( jpi,jpj, zkz ) 183 CALL wrk_dealloc( jpi,jpj,jpk, zav_tide ) 183 184 ! 184 185 IF( nn_timing == 1 ) CALL timing_stop('zdf_tmx') … … 351 352 !! Koch-Larrouy et al. 2007, GRL. 352 353 !!---------------------------------------------------------------------- 353 USE oce , zav_tide => ua ! ua used as workspace354 !!355 354 INTEGER :: ji, jj, jk ! dummy loop indices 356 355 INTEGER :: inum ! local integer 357 356 INTEGER :: ios 358 357 REAL(wp) :: ztpc, ze_z ! local scalars 359 REAL(wp), DIMENSION(:,:) , POINTER :: zem2, zek1 ! read M2 and K1 tidal energy360 REAL(wp), DIMENSION(:,:) , POINTER :: zkz ! total M2, K1 and S2 tidal energy361 REAL(wp), DIMENSION(:,:) , POINTER :: zfact ! used for vertical structure function362 REAL(wp), DIMENSION(:,:) , POINTER :: zhdep ! Ocean depth363 REAL(wp), DIMENSION(:,:,:), POINTER :: zpc 358 REAL(wp), DIMENSION(:,:) , POINTER :: zem2, zek1 ! read M2 and K1 tidal energy 359 REAL(wp), DIMENSION(:,:) , POINTER :: zkz ! total M2, K1 and S2 tidal energy 360 REAL(wp), DIMENSION(:,:) , POINTER :: zfact ! used for vertical structure function 361 REAL(wp), DIMENSION(:,:) , POINTER :: zhdep ! Ocean depth 362 REAL(wp), DIMENSION(:,:,:), POINTER :: zpc, zav_tide ! power consumption 364 363 !! 365 364 NAMELIST/namzdf_tmx/ rn_htmx, rn_n2min, rn_tfe, rn_me, ln_tmx_itf, rn_tfe_itf … … 368 367 IF( nn_timing == 1 ) CALL timing_start('zdf_tmx_init') 369 368 ! 370 CALL wrk_alloc( jpi,jpj, zem2, zek1, zkz, zfact, zhdep )371 CALL wrk_alloc( jpi,jpj,jpk, zpc)372 373 REWIND( numnam_ref ) 369 CALL wrk_alloc( jpi,jpj, zem2, zek1, zkz, zfact, zhdep ) 370 CALL wrk_alloc( jpi,jpj,jpk, zpc, zav_tide ) 371 ! 372 REWIND( numnam_ref ) ! Namelist namzdf_tmx in reference namelist : Tidal Mixing 374 373 READ ( numnam_ref, namzdf_tmx, IOSTAT = ios, ERR = 901) 375 374 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tmx in reference namelist', lwp ) 376 377 REWIND( numnam_cfg ) 375 ! 376 REWIND( numnam_cfg ) ! Namelist namzdf_tmx in configuration namelist : Tidal Mixing 378 377 READ ( numnam_cfg, namzdf_tmx, IOSTAT = ios, ERR = 902 ) 379 378 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tmx in configuration namelist', lwp ) 380 379 IF(lwm) WRITE ( numond, namzdf_tmx ) 381 382 IF(lwp) THEN ! Control print380 ! 381 IF(lwp) THEN ! Control print 383 382 WRITE(numout,*) 384 383 WRITE(numout,*) 'zdf_tmx_init : tidal mixing' … … 392 391 WRITE(numout,*) ' ITF tidal dissipation efficiency = ', rn_tfe_itf 393 392 ENDIF 394 395 ! ! allocate tmx arrays 393 ! ! allocate tmx arrays 396 394 IF( zdf_tmx_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'zdf_tmx_init : unable to allocate tmx arrays' ) 397 395 398 IF( ln_tmx_itf ) THEN ! read the Indonesian Through Flow mask396 IF( ln_tmx_itf ) THEN ! read the Indonesian Through Flow mask 399 397 CALL iom_open('mask_itf',inum) 400 398 CALL iom_get (inum, jpdom_data, 'tmaskitf',mask_itf,1) ! 401 399 CALL iom_close(inum) 402 400 ENDIF 403 404 ! read M2 tidal energy flux : W/m2 ( zem2 < 0 ) 401 ! ! read M2 tidal energy flux : W/m2 ( zem2 < 0 ) 405 402 CALL iom_open('M2rowdrg',inum) 406 403 CALL iom_get (inum, jpdom_data, 'field',zem2,1) ! 407 404 CALL iom_close(inum) 408 409 ! read K1 tidal energy flux : W/m2 ( zek1 < 0 ) 405 ! ! read K1 tidal energy flux : W/m2 ( zek1 < 0 ) 410 406 CALL iom_open('K1rowdrg',inum) 411 407 CALL iom_get (inum, jpdom_data, 'field',zek1,1) ! 412 408 CALL iom_close(inum) 413 414 ! Total tidal energy ( M2, S2 and K1 with S2=(1/2)^2 * M2 ) 415 ! only the energy available for mixing is taken into account, 416 ! (mixing efficiency tidal dissipation efficiency) 409 ! ! Total tidal energy ( M2, S2 and K1 with S2=(1/2)^2 * M2 ) 410 ! ! only the energy available for mixing is taken into account, 411 ! ! (mixing efficiency tidal dissipation efficiency) 417 412 en_tmx(:,:) = - rn_tfe * rn_me * ( zem2(:,:) * 1.25 + zek1(:,:) ) * ssmask(:,:) 418 413 … … 421 416 !!gm : you are right, but tidal mixing acts in deep ocean (H>500m) where e3 is O(100m) 422 417 !! the error is thus ~1% which I feel comfortable with, compared to uncertainties in tidal energy dissipation. 423 ! Vertical structure (az_tmx)424 DO jj = 1, jpj ! part independent of the level418 ! ! Vertical structure (az_tmx) 419 DO jj = 1, jpj ! part independent of the level 425 420 DO ji = 1, jpi 426 421 zhdep(ji,jj) = gdepw_0(ji,jj,mbkt(ji,jj)+1) ! depth of the ocean … … 429 424 END DO 430 425 END DO 431 DO jk= 1, jpk ! complete with the level-dependent part426 DO jk= 1, jpk ! complete with the level-dependent part 432 427 DO jj = 1, jpj 433 428 DO ji = 1, jpi … … 437 432 END DO 438 433 !=========== 439 434 ! 440 435 IF( nprint == 1 .AND. lwp ) THEN 441 436 ! Control print … … 446 441 zav_tide(:,:,jk) = az_tmx(:,:,jk) / MAX( rn_n2min, rn2(:,:,jk) ) 447 442 END DO 448 449 ztpc = 0. e0443 ! 444 ztpc = 0._wp 450 445 zpc(:,:,:) = MAX(rn_n2min,rn2(:,:,:)) * zav_tide(:,:,:) 451 446 DO jk= 2, jpkm1 … … 458 453 IF( lk_mpp ) CALL mpp_sum( ztpc ) 459 454 ztpc= rau0 * 1/(rn_tfe * rn_me) * ztpc 460 455 ! 461 456 WRITE(numout,*) 462 457 WRITE(numout,*) ' Total power consumption of the tidally driven part of Kz : ztpc = ', ztpc * 1.e-12 ,'TW' 463 464 458 ! 465 459 ! control print 2 466 460 zav_tide(:,:,:) = MIN( zav_tide(:,:,:), 60.e-4 ) 467 zkz(:,:) = 0. e0461 zkz(:,:) = 0._wp 468 462 DO jk = 2, jpkm1 469 463 zkz(:,:) = zkz(:,:) + fse3w(:,:,jk) * MAX(0.e0, rn2(:,:,jk)) * rau0 * zav_tide(:,:,jk) * wmask(:,:,jk) … … 486 480 END DO 487 481 WRITE(numout,*) ' Min de zkz ', ztpc, ' Max = ', maxval(zkz(:,:) ) 488 482 ! 489 483 DO jk = 2, jpkm1 490 484 zav_tide(:,:,jk) = zav_tide(:,:,jk) * MIN( zkz(:,:), 30./6. ) * wmask(:,:,jk) !kz max = 300 cm2/s 491 485 END DO 492 ztpc = 0. e0486 ztpc = 0._wp 493 487 zpc(:,:,:) = Max(0.e0,rn2(:,:,:)) * zav_tide(:,:,:) 494 488 DO jk= 1, jpk -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
r5777 r5831 38 38 39 39 !* ocean fields: here now and after fields * 40 USE oce , ONLY : ua => ua !: i-horizontal velocity (m s-1)41 USE oce , ONLY : va => va !: j-horizontal velocity (m s-1)42 40 USE oce , ONLY : un => un !: i-horizontal velocity (m s-1) 43 41 USE oce , ONLY : vn => vn !: j-horizontal velocity (m s-1)
Note: See TracChangeset
for help on using the changeset viewer.