Changeset 8197
- Timestamp:
- 2017-06-21T11:39:54+02:00 (7 years ago)
- Location:
- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/CONFIG/SHARED/field_def.xml
r8168 r8197 500 500 <field id="tke_niw" long_name="Turbulent Kinetic Energy due to near-inertial wave breaking" unit="m2/s2" /> 501 501 <!-- variables available with dyn_vrt_dia - available with TODO FLAGS and TODO FLAGS --> 502 <field id="dia_vor_int- 11" long_name="vertical integral vorticity tendencies for hpg" standard_name="vertically_integrated_vorticity_tendencies_hpg" unit="s-2" grid_ref="grid_W_2D" />503 <field id="dia_vor_mean- 12" long_name="vertical mean vorticity tendencies for hpg" standard_name="vertical_mean_vorticity_tendencies_hpg" unit="s-2" grid_ref="grid_W_2D" />504 <field id="dia_vor_int- 21" long_name="vertical integral vorticity tendencies for keg" standard_name="vertically_integrated_vorticity_tendencies_keg" unit="s-2" grid_ref="grid_W_2D" />505 <field id="dia_vor_mean- 22" long_name="vertical mean vorticity tendencies for keg" standard_name="vertical_mean_vorticity_tendencies_keg" unit="s-2" grid_ref="grid_W_2D" />506 <field id="dia_vor_int- 31" long_name="vertical integral vorticity tendencies for ldf" standard_name="vertically_integrated_vorticity_tendencies_ldf" unit="s-2" grid_ref="grid_W_2D" />507 <field id="dia_vor_mean- 32" long_name="vertical mean vorticity tendencies for ldf" standard_name="vertical_mean_vorticity_tendencies_ldf" unit="s-2" grid_ref="grid_W_2D" />508 <field id="dia_vor_int- 41" long_name="vertical integral vorticity tendencies for spg" standard_name="vertically_integrated_vorticity_tendencies_spg" unit="s-2" grid_ref="grid_W_2D" />509 <field id="dia_vor_mean- 42" long_name="vertical mean vorticity tendencies for spg" standard_name="vertical_mean_vorticity_tendencies_spg" unit="s-2" grid_ref="grid_W_2D" />510 <field id="dia_vor_int- 51" long_name="vertical integral vorticity tendencies for vor" standard_name="vertically_integrated_vorticity_tendencies_vor" unit="s-2" grid_ref="grid_W_2D" />511 <field id="dia_vor_mean- 52" long_name="vertical mean vorticity tendencies for vor" standard_name="vertical_mean_vorticity_tendencies_vor" unit="s-2" grid_ref="grid_W_2D" />512 <field id="dia_vor_int- 61" long_name="vertical integral vorticity tendencies for zad" standard_name="vertically_integrated_vorticity_tendencies_zad" unit="s-2" grid_ref="grid_W_2D" />513 <field id="dia_vor_mean- 62" long_name="vertical mean vorticity tendencies for zad" standard_name="vertical_mean_vorticity_tendencies_zad" unit="s-2" grid_ref="grid_W_2D" />514 <field id="dia_vor_int- 71" long_name="vertical integral vorticity tendencies for zdf" standard_name="vertically_integrated_vorticity_tendencies_zdf" unit="s-2" grid_ref="grid_W_2D" />515 <field id="dia_vor_mean- 72" long_name="vertical mean vorticity tendencies for zdf" standard_name="vertical_mean_vorticity_tendencies_zdf" unit="s-2" grid_ref="grid_W_2D" />502 <field id="dia_vor_int-hpg" long_name="vertical integral vorticity tendencies for hpg" standard_name="vertically_integrated_vorticity_tendencies_hpg" unit="s-2" grid_ref="grid_W_2D" /> 503 <field id="dia_vor_mean-hpg" long_name="vertical mean vorticity tendencies for hpg" standard_name="vertical_mean_vorticity_tendencies_hpg" unit="s-2" grid_ref="grid_W_2D" /> 504 <field id="dia_vor_int-keg" long_name="vertical integral vorticity tendencies for keg" standard_name="vertically_integrated_vorticity_tendencies_keg" unit="s-2" grid_ref="grid_W_2D" /> 505 <field id="dia_vor_mean-keg" long_name="vertical mean vorticity tendencies for keg" standard_name="vertical_mean_vorticity_tendencies_keg" unit="s-2" grid_ref="grid_W_2D" /> 506 <field id="dia_vor_int-ldf" long_name="vertical integral vorticity tendencies for ldf" standard_name="vertically_integrated_vorticity_tendencies_ldf" unit="s-2" grid_ref="grid_W_2D" /> 507 <field id="dia_vor_mean-ldf" long_name="vertical mean vorticity tendencies for ldf" standard_name="vertical_mean_vorticity_tendencies_ldf" unit="s-2" grid_ref="grid_W_2D" /> 508 <field id="dia_vor_int-spg" long_name="vertical integral vorticity tendencies for spg" standard_name="vertically_integrated_vorticity_tendencies_spg" unit="s-2" grid_ref="grid_W_2D" /> 509 <field id="dia_vor_mean-spg" long_name="vertical mean vorticity tendencies for spg" standard_name="vertical_mean_vorticity_tendencies_spg" unit="s-2" grid_ref="grid_W_2D" /> 510 <field id="dia_vor_int-vor" long_name="vertical integral vorticity tendencies for vor" standard_name="vertically_integrated_vorticity_tendencies_vor" unit="s-2" grid_ref="grid_W_2D" /> 511 <field id="dia_vor_mean-vor" long_name="vertical mean vorticity tendencies for vor" standard_name="vertical_mean_vorticity_tendencies_vor" unit="s-2" grid_ref="grid_W_2D" /> 512 <field id="dia_vor_int-zad" long_name="vertical integral vorticity tendencies for zad" standard_name="vertically_integrated_vorticity_tendencies_zad" unit="s-2" grid_ref="grid_W_2D" /> 513 <field id="dia_vor_mean-zad" long_name="vertical mean vorticity tendencies for zad" standard_name="vertical_mean_vorticity_tendencies_zad" unit="s-2" grid_ref="grid_W_2D" /> 514 <field id="dia_vor_int-zdf" long_name="vertical integral vorticity tendencies for zdf" standard_name="vertically_integrated_vorticity_tendencies_zdf" unit="s-2" grid_ref="grid_W_2D" /> 515 <field id="dia_vor_mean-zdf" long_name="vertical mean vorticity tendencies for zdf" standard_name="vertical_mean_vorticity_tendencies_zdf" unit="s-2" grid_ref="grid_W_2D" /> 516 516 </field_group> 517 517 -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90
r8168 r8197 344 344 345 345 ! TODO - remove kt only used for validation 346 SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor _int, id_dia_vor_mn, kt)346 SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor, kt) 347 347 348 348 !!---------------------------------------------------------------------- … … 357 357 !! 358 358 !!---------------------------------------------------------------------- 359 REAL, INTENT(in) :: utend(jpi,jpj,jpk) ! contribution to du/dt 360 REAL, INTENT(in) :: vtend(jpi,jpj,jpk) ! contribution to dv/dt 361 INTEGER, INTENT(in) :: id_dia_vor_int ! identifier for the vertical integral vorticity diagnostic 362 INTEGER, INTENT(in) :: id_dia_vor_mn ! identifier for the vertical mean vorticity diagnostic 363 INTEGER :: kt ! ocean time-step index 359 REAL :: utend(jpi,jpj,jpk) ! contribution to du/dt 360 REAL :: vtend(jpi,jpj,jpk) ! contribution to dv/dt 361 CHARACTER(len=3) :: id_dia_vor ! identifier for the diagnostic 362 INTEGER :: kt ! ocean time-step index TODO remove after validation 364 363 ! 365 364 !!---------------------------------------------------------------------- 366 365 ! 367 366 INTEGER :: ji, jj, jk ! dummy loop indices 368 INTEGER :: ji_min, ji_max ! dummy loop indices for dynspg_flt369 367 ! 370 368 REAL(wp), POINTER, DIMENSION(:,:) :: u_int ! u vertical integral … … 374 372 CALL wrk_alloc(jpi, jpj, v_int) 375 373 376 ji_min = 1377 ji_max = jpi378 379 IF ( id_dia_vor_int == 71 .OR. id_dia_vor_mn == 72 ) THEN380 ji_min = fs_2381 ji_max = fs_jpim1382 END IF383 384 374 u_int(:,:) = 0.0_wp 385 375 v_int(:,:) = 0.0_wp … … 388 378 ! Calculate the vertical integrals of utend & of vtend 389 379 ! 380 ! TODO remove - for validation only 381 IF ( kt == 1 ) THEN 382 WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor, & 383 & ':bathy:', bathy(17,12), & 384 & ':mbathy:', mbathy(17,12) 385 END IF 390 386 391 DO jk = 1,jpk 392 DO jj = 1,jpj 393 DO ji = ji_min,ji_max 394 u_int(ji,jj) = u_int(ji,jj) + utend(ji,jj,jk)*fse3u(ji,jj,jk) 395 v_int(ji,jj) = v_int(ji,jj) + vtend(ji,jj,jk)*fse3v(ji,jj,jk) 387 DO jk = 1, jpkm1 388 DO jj = 2, jpjm1 389 DO ji = fs_2, fs_jpim1 390 u_int(ji,jj) = u_int(ji,jj) + ( utend(ji,jj,jk) * fse3u(ji,jj,jk) & 391 & * e1u(ji,jj) * umask(ji,jj,jk) ) 392 v_int(ji,jj) = v_int(ji,jj) + ( vtend(ji,jj,jk) * fse3v(ji,jj,jk) & 393 & * e2v(ji,jj) * vmask(ji,jj,jk) ) 396 394 397 395 ! TODO remove - for validation only 398 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11 ) THEN 399 WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor_int, & 400 & ':ji:', ji, & 401 & ':jj:', jj, & 402 & ':jk:', jk, & 403 & ':u_int:', u_int(ji,jj), & 404 & ':u_tend:', utend(ji,jj,jk), & 405 & ':fse3u:', fse3u(ji,jj,jk) 406 WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor_int, & 407 & ':ji:', ji, & 408 & ':jj:', jj, & 409 & ':jk:', jk, & 410 & ':v_int:', v_int(ji,jj), & 411 & ':v_tend:', vtend(ji,jj,jk), & 412 & ':fse3v:', fse3v(ji,jj,jk) 396 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN 397 WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor, & 398 & ' :ji: ', ji, & 399 & ' :jj: ', jj, & 400 & ' :jk: ', jk, & 401 & ' :u_int:', u_int(ji,jj), & 402 & ' :u_tend: ', utend(ji,jj,jk), & 403 & ' :e1u: ', e1u(ji,jj), & 404 & ' :umask: ', umask(ji,jj,jk), & 405 & ' :fse3u: ', fse3u(ji,jj,jk) 406 WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor, & 407 & ' :ji: ', ji, & 408 & ' :jj: ', jj, & 409 & ' :jk: ', jk, & 410 & ' :v_int:', v_int(ji,jj), & 411 & ' :v_tend: ', vtend(ji,jj,jk), & 412 & ' :e2v: ', e2v(ji,jj), & 413 & ' :vmask: ', vmask(ji,jj,jk), & 414 & ' :fse3v: ', fse3v(ji,jj,jk) 413 415 END IF 414 416 END DO … … 416 418 END DO 417 419 418 CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor _int, id_dia_vor_mn, kt)420 CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor, kt) 419 421 420 422 CALL wrk_dealloc(jpi, jpj, u_int) … … 425 427 426 428 ! TODO - remove kt only used for validation 427 SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor _int, id_dia_vor_mn, kt)429 SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor, kt) 428 430 429 431 !!---------------------------------------------------------------------- … … 438 440 !! means 439 441 !! d) Call iom_put for the vertical integral vorticity 440 !! tendencies (using id_dia_vor_int)442 !! tendencies (using cid_dia_vor_int) 441 443 !! e) Call iom_put for the vertical mean vorticity 442 !! tendencies (using id_dia_vor_mn) 443 !! 444 !!---------------------------------------------------------------------- 445 REAL :: u_int(jpi,jpj) ! u vertical integral 446 REAL :: v_int(jpi,jpj) ! v vertical integral 447 INTEGER :: id_dia_vor_int ! identifier for the vertical integral vorticity diagnostic 448 INTEGER :: id_dia_vor_mn ! identifier for the vertical mean vorticity diagnostic 449 INTEGER :: kt ! ocean time-step index 444 !! tendencies (using cid_dia_vor_mn) 445 !! 446 !!---------------------------------------------------------------------- 447 REAL :: u_int(jpi,jpj) ! u vertical integral 448 REAL :: v_int(jpi,jpj) ! v vertical integral 449 CHARACTER(len=3) :: id_dia_vor ! identifier for the vorticity diagnostic 450 INTEGER :: kt ! ocean time-step index TODO remove after validation 450 451 ! 451 452 !!---------------------------------------------------------------------- … … 469 470 CALL lbc_lnk( v_int, 'V', 1. ) 470 471 471 WRITE ( cid_dia_vor_int, "(A16, I2)" ) "dia_vor_int-", id_dia_vor_int472 WRITE ( cid_dia_vor_mn, "(A17, I2)" ) "dia_vor_mean-", id_dia_vor_mn472 WRITE ( cid_dia_vor_int, "(A16,A3)" ) "dia_vor_int-", id_dia_vor 473 WRITE ( cid_dia_vor_mn, "(A17,A3)" ) "dia_vor_mean-", id_dia_vor 473 474 474 475 ! 475 476 ! Calculate the vorticity tendencies for the vertical integrals. 476 ! 1/e1e2 * ((e2*d(vtend)/dx) - (e1*d(utend)/dy)) 477 ! 478 479 DO jj = 1,jpjm1 480 DO ji = 1,jpim1 481 vor_int(ji,jj) = ( v_int(ji+1,jj) * e2v(ji+1,jj) & 482 & - v_int(ji,jj) * e2v(ji,jj) & 483 & + u_int(ji,jj) * e1u(ji,jj) & 484 & - u_int(ji,jj+1) * e1u(ji,jj+1) ) & 485 & / ( e1f(ji,jj) * e2f(ji,jj) ) 477 ! 1/e1e2 * ((d(vtend)/dx) - (d(utend)/dy)) 478 ! 479 480 DO jj = 2, jpjm1 481 DO ji = fs_2, fs_jpim1 482 vor_int(ji,jj) = ( ( v_int(ji+1,jj) - v_int(ji,jj) ) & 483 & - ( u_int(ji,jj+1) - u_int(ji,jj) ) ) & 484 & / ( e1f(ji,jj) * e2f(ji,jj) ) 486 485 487 486 ! TODO remove - for validation only 488 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11) THEN489 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor _int,&487 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN 488 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor, & 490 489 & ':ji:', ji, & 491 490 & ':jj:', jj, & 492 491 & ':vor_int:', vor_int(ji,jj), & 493 492 & ':v_int(i+1):', v_int(ji+1,jj), & 494 & ':e2v(j+1):', e2v(ji+1,jj), &495 493 & ':v_int:', v_int(ji,jj), & 496 & ':e2v:', e2v(ji,jj), &497 494 & ':u_int:', u_int(ji,jj), & 498 & ':e1u:', e1u(ji,jj), &499 495 & ':u_int(j+1):', u_int(ji,jj+1), & 500 & ':e1u(j+1):', e1u(ji,jj+1), &501 496 & ':e1f:', e1f(ji,jj), & 502 497 & ':e2f:', e2f(ji,jj) … … 505 500 END DO 506 501 502 ! Multiply by the surface mask 503 vor_int(:,:) = vor_int(:,:) * fmask(:,:,1) 507 504 508 505 ! … … 512 509 ! 513 510 514 DO jj = 1, jpj515 DO ji = 1, jpi511 DO jj = 2, jpjm1 512 DO ji = fs_2, fs_jpim1 516 513 ikbu = mbku(ji,jj) 517 514 ikbv = mbkv(ji,jj) 518 515 519 516 IF (ikbu .ne. 0.0_wp) THEN ! Don't divide by 0! 520 u_mn(ji,jj) = u_int(ji,jj) / ikbu517 u_mn(ji,jj) = u_int(ji,jj) / gdepw_n(ji,jj,ikbu+1) 521 518 ELSE 522 519 u_mn(ji,jj) = 0.0_wp … … 524 521 525 522 IF (ikbv .ne. 0.0_wp) THEN ! Don't divide by 0! 526 v_mn(ji,jj) = v_int(ji,jj) / ikbv523 v_mn(ji,jj) = v_int(ji,jj) / gdepw_n(ji,jj,ikbv+1) 527 524 ELSE 528 525 v_mn(ji,jj) = 0.0_wp … … 530 527 531 528 ! TODO remove - for validation only 532 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11) THEN533 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor _int,&534 & ': ikbu:', ikbu,&535 & ':u_int:', u_int(ji,jj), &536 & ':u_mn:', u_mn(ji,jj), &537 & ': ikbv:', ikbv,&538 & ':v_int:', v_int(ji,jj), &529 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN 530 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor, & 531 & ':gdepw_n(ikbu):', gdepw_n(ji,jj,ikbu+1), & 532 & ':u_int:', u_int(ji,jj), & 533 & ':u_mn:', u_mn(ji,jj), & 534 & ':gdepw_n(ikbv):', gdepw_n(ji,jj,ikbv+1), & 535 & ':v_int:', v_int(ji,jj), & 539 536 & ':v_mn:', v_mn(ji,jj) 540 537 END IF … … 544 541 ! 545 542 ! Calculate the vorticity tendencies for the vertical means 546 ! 1/e1e2 * ((e2*d(v_mn)/dx) - (e1*d(u_mn)/dy)) 547 ! 548 549 DO jj = 1,jpjm1 550 DO ji = 1,jpim1 551 vor_mn(ji,jj) = ( v_mn(ji+1,jj) * e2v(ji+1,jj) & 552 & - v_mn(ji,jj) * e2v(ji,jj) & 553 & + u_mn(ji,jj) * e1u(ji,jj) & 554 & - u_mn(ji,jj+1) * e1u(ji,jj+1) ) & 543 ! 1/e1e2 * ((d(v_mn)/dx) - (d(u_mn)/dy)) 544 ! 545 546 DO jj = 2, jpjm1 547 DO ji = fs_2, fs_jpim1 548 vor_mn(ji,jj) = ( ( v_mn(ji+1,jj) - v_mn(ji,jj) ) & 549 & - ( u_mn(ji,jj+1) - u_mn(ji,jj) ) ) & 555 550 & / ( e1f(ji,jj) * e2f(ji,jj) ) 556 551 557 552 ! TODO remove - for validation only 558 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11) THEN559 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor _int,&553 IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN 554 WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor, & 560 555 & ':ji:', ji, & 561 556 & ':jj:', jj, & 562 557 & ':vor_mn:', vor_mn(ji,jj), & 563 558 & ':v_mn(i+1):', v_mn(ji+1,jj), & 564 & ':e2v(j+1):', e2v(ji+1,jj), &565 559 & ':v_mn:', v_mn(ji,jj), & 566 & ':e2v:', e2v(ji,jj), &567 560 & ':u_mn:', u_mn(ji,jj), & 568 & ':e1u:', e1u(ji,jj), &569 561 & ':u_mn(j+1):', u_mn(ji,jj+1), & 570 & ':e1u(j+1):', e1u(ji,jj+1), &571 562 & ':e1f:', e1f(ji,jj), & 572 563 & ':e2f:', e2f(ji,jj) … … 575 566 END DO 576 567 568 ! Multiply by the surface mask 569 vor_mn(:,:) = vor_mn(:,:) * fmask(:,:,1) 570 577 571 578 572 ! Call iom_put for the vertical integral vorticity tendencies -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
r8168 r8197 379 379 INTEGER, INTENT(in) :: kt ! ocean time-step index 380 380 !! 381 INTEGER :: id_dia_vrt_hpg_int = 11 ! TODO remove once flags set properly 382 INTEGER :: id_dia_vrt_hpg_mean = 12 ! TODO remove once flags set properly 381 CHARACTER(len=3) :: id_vrt_dia_hpg = "hpg" ! TODO remove once flags set properly 383 382 INTEGER :: ji, jj, jk ! dummy loop indices 384 383 REAL(wp) :: zcoef0, zuap, zvap, znad ! temporary scalars … … 416 415 zvap = -zcoef0 * ( rhd (ji,jj+1,1) + rhd (ji,jj,1) + 2._wp * znad ) & 417 416 & * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) / e2v(ji,jj) 418 ! combine gradient and cor erction417 ! combine gradient and correction 419 418 zuhpg(ji,jj,1) = zhpi(ji,jj,1) + zuap 420 419 zvhpg(ji,jj,1) = zhpj(ji,jj,1) + zvap … … 441 440 zvap = -zcoef0 * ( rhd (ji ,jj+1,jk) + rhd (ji,jj,jk) + 2._wp * znad ) & 442 441 & * ( fsde3w(ji ,jj+1,jk) - fsde3w(ji,jj,jk) ) / e2v(ji,jj) 443 ! combine gradient and cor erction442 ! combine gradient and correction 444 443 zuhpg(ji,jj,jk) = zhpi(ji,jj,jk) + zuap 445 444 zvhpg(ji,jj,jk) = zhpj(ji,jj,jk) + zvap … … 452 451 ! 453 452 ! calculate dia_vor_int & dia_vor_mn if required 454 IF ( ( id_dia_vrt_hpg_int == 11 ) .or. ( id_dia_vrt_hpg_mean == 12 )) THEN453 IF ( id_vrt_dia_hpg == "hpg" ) THEN 455 454 ! TODO - remove kt only used for validation 456 CALL dyn_vrt_dia_3d(zuhpg, zvhpg, id_ dia_vrt_hpg_int, id_dia_vrt_hpg_mean, kt)455 CALL dyn_vrt_dia_3d(zuhpg, zvhpg, id_vrt_dia_hpg, kt) 457 456 END IF 458 457 ! -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
r8168 r8197 75 75 INTEGER, INTENT( in ) :: kscheme ! =0/1 type of KEG scheme 76 76 ! 77 INTEGER :: id_dia_vrt_keg_int = 21 ! TODO remove once flags set properly 78 INTEGER :: id_dia_vrt_keg_mean = 22 ! TODO remove once flags set properly 77 CHARACTER(len=3) :: id_vrt_dia_keg = "keg" ! TODO remove once flags set properly 79 78 INTEGER :: ji, jj, jk ! dummy loop indices 80 79 REAL(wp) :: zu, zv ! temporary scalars … … 148 147 END DO 149 148 ! 150 IF ( ( id_dia_vrt_keg_int == 21 ) .or. ( id_dia_vrt_keg_mean == 22 )) THEN149 IF ( id_vrt_dia_keg == "keg" ) THEN 151 150 ! TODO - remove kt only used for validation 152 CALL dyn_vrt_dia_3d(zhkei, zhkej, id_ dia_vrt_keg_int, id_dia_vrt_keg_mean, kt)151 CALL dyn_vrt_dia_3d(zhkei, zhkej, id_vrt_dia_keg, kt) 153 152 END IF 154 153 ! -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
r8168 r8197 76 76 INTEGER, INTENT(in) :: kt ! ocean time-step index 77 77 ! 78 INTEGER :: id_dia_vrt_ldf_int = 31 ! TODO remove once flags set properly 79 INTEGER :: id_dia_vrt_ldf_mean = 32 ! TODO remove once flags set properly 78 CHARACTER(len=3) :: id_vrt_dia_ldf = "ldf" ! TODO remove once flags set properly 80 79 INTEGER :: ji, jj, jk ! dummy loop indices 81 80 REAL(wp) :: zbt, ze2u, ze2v ! temporary scalar … … 193 192 ze2u = e2u(ji,jj) * fse3u(ji,jj,jk) 194 193 ze2v = e1v(ji,jj) * fse3v(ji,jj,jk) 195 ! horizontal biharmonic diffusive trends 194 ! horizontal biharmonic diffusive trends multiplied by the 195 ! eddy viscosity coef. (at u- and v-points) 196 196 zua(ji,jj,jk) = ( - ( zuf(ji ,jj,jk) - zuf(ji,jj-1,jk) ) / ze2u & 197 197 & + ( zut(ji+1,jj,jk) - zut(ji,jj ,jk) ) / e1u(ji,jj) ) & … … 209 209 END DO ! End of slab 210 210 ! ! =============== 211 IF ( ( id_dia_vrt_ldf_int == 31 ) .or. ( id_dia_vrt_ldf_mean == 32 )) THEN211 IF ( id_vrt_dia_ldf == "ldf" ) THEN 212 212 ! TODO - remove kt only used for validation 213 CALL dyn_vrt_dia_3d(zua, zva, id_ dia_vrt_ldf_int, id_dia_vrt_ldf_mean, kt)213 CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_ldf, kt) 214 214 END IF 215 215 ! -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r6486 r8197 48 48 USE lib_fortran 49 49 USE timing ! Timing 50 USE divcur ! for dyn_vrt_dia_3d 50 51 #if defined key_agrif 51 52 USE agrif_opa_interp … … 108 109 INTEGER, INTENT( out) :: kindic ! solver convergence flag (<0 if not converge) 109 110 ! 111 CHARACTER(len=3) :: id_vrt_dia_spg = "spg" ! TODO remove once flags set properly 110 112 INTEGER :: ji, jj, jk ! dummy loop indices 111 113 REAL(wp) :: z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv ! local scalars … … 130 132 ! ! gcx, gcxb 131 133 ENDIF 134 135 IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) ) THEN 136 CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv ) 137 END IF 132 138 133 139 ! Local constant initialization … … 184 190 END DO 185 191 ! 186 IF( l_trddyn ) THEN! temporary save of spg trends187 CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )192 ! temporary save of spg trends 193 IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) ) THEN 188 194 DO jk = 1, jpkm1 ! unweighted time stepping 189 195 DO jj = 2, jpjm1 … … 328 334 #endif 329 335 330 IF ( l_trddyn) THEN336 IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) ) THEN 331 337 ztrdu(:,:,:) = ua(:,:,:) ! save the after velocity before the filtered SPG 332 338 ztrdv(:,:,:) = va(:,:,:) 333 339 ! 334 CALL wrk_alloc( jpi, jpj, zpw ) 335 ! 336 zpw(:,:) = - z2dt * gcx(:,:) 337 CALL iom_put( "ssh_flt" , zpw ) ! output equivalent ssh modification due to implicit filter 338 ! 339 ! ! save surface pressure flux: -pw at z=0 340 zpw(:,:) = - rau0 * grav * sshn(:,:) * wn(:,:,1) * tmask(:,:,1) 341 CALL iom_put( "pw0_exp" , zpw ) 342 zpw(:,:) = wn(:,:,1) 343 CALL iom_put( "w0" , zpw ) 344 zpw(:,:) = rau0 * z2dtg * gcx(:,:) * wn(:,:,1) * tmask(:,:,1) 345 CALL iom_put( "pw0_flt" , zpw ) 346 ! 347 CALL wrk_dealloc( jpi, jpj, zpw ) 348 ! 340 IF ( l_trddyn ) THEN 341 CALL wrk_alloc( jpi, jpj, zpw ) 342 ! 343 zpw(:,:) = - z2dt * gcx(:,:) 344 CALL iom_put( "ssh_flt" , zpw ) ! output equivalent ssh modification due to implicit filter 345 ! 346 ! ! save surface pressure flux: -pw at z=0 347 zpw(:,:) = - rau0 * grav * sshn(:,:) * wn(:,:,1) * tmask(:,:,1) 348 CALL iom_put( "pw0_exp" , zpw ) 349 zpw(:,:) = wn(:,:,1) 350 CALL iom_put( "w0" , zpw ) 351 zpw(:,:) = rau0 * z2dtg * gcx(:,:) * wn(:,:,1) * tmask(:,:,1) 352 CALL iom_put( "pw0_flt" , zpw ) 353 ! 354 CALL wrk_dealloc( jpi, jpj, zpw ) 355 ! 356 ENDIF 349 357 ENDIF 350 358 … … 363 371 END DO 364 372 365 IF ( l_trddyn) THEN ! save the explicit SPG trends for further diagnostics373 IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) ) THEN ! save the explicit SPG trends for further diagnostics 366 374 ztrdu(:,:,:) = ( ua(:,:,:) - ztrdu(:,:,:) ) / z2dt 367 375 ztrdv(:,:,:) = ( va(:,:,:) - ztrdv(:,:,:) ) / z2dt 368 CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgflt, kt ) 376 ! 377 IF ( l_trddyn ) THEN 378 CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgflt, kt ) 379 END IF 380 ! 381 IF ( id_vrt_dia_spg == "spg" ) THEN 382 ! TODO remove kt after validation 383 CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_spg, kt ) 384 END IF 369 385 ! 370 386 CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
r8168 r8197 561 561 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pva ! total v-trend 562 562 !! 563 INTEGER :: id_dia_vrt_vor_int = 51 ! TODO remove once flags set properly 564 INTEGER :: id_dia_vrt_vor_mn = 52 ! TODO remove once flags set properly 563 CHARACTER(len=3) :: id_vrt_dia_vor = "vor" ! TODO remove once flags set properly 565 564 INTEGER :: ji, jj, jk ! dummy loop indices 566 565 INTEGER :: ierr ! local integer … … 707 706 END DO ! End of slab 708 707 ! ! =============== 709 IF ( ( id_dia_vrt_vor_int == 51 ) .or. ( id_dia_vrt_vor_mn == 52 )) THEN708 IF ( id_vrt_dia_vor == "vor" ) THEN 710 709 ! TODO - remove kt only used for validation 711 CALL dyn_vrt_dia_3d(zua, zva, id_ dia_vrt_vor_int, id_dia_vrt_vor_mn, kt)710 CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_vor, kt) 712 711 END IF 713 712 ! -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
r8168 r8197 60 60 INTEGER, INTENT(in) :: kt ! ocean time-step inedx 61 61 ! 62 INTEGER :: id_dia_vrt_zad_int = 61 ! TODO remove once flags set properly 63 INTEGER :: id_dia_vrt_zad_mean = 62 ! TODO remove once flags set properly 62 CHARACTER(len=3) :: id_vrt_dia_zad = "zad" ! TODO remove once flags set properly 64 63 INTEGER :: ji, jj, jk ! dummy loop indices 65 64 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwuw , zwvw … … 145 144 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 146 145 ! 147 IF ( ( id_dia_vrt_zad_int == 61 ) .or. ( id_dia_vrt_zad_mean == 62 )) THEN146 IF ( id_vrt_dia_zad == "zad" ) THEN 148 147 ! TODO - remove kt only used for validation 149 CALL dyn_vrt_dia_3d(zua, zva, id_ dia_vrt_zad_int, id_dia_vrt_zad_mean, kt)148 CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_zad, kt) 150 149 END IF 151 150 ! -
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
r8168 r8197 67 67 REAL(wp), INTENT(in) :: p2dt ! vertical profile of tracer time-step 68 68 !! 69 CHARACTER(len=3) :: id_vrt_dia_zdf = "zdf" ! TODO remove once flags set properly 69 70 INTEGER :: ji, jj, jk ! dummy loop indices 70 71 INTEGER :: ikbu, ikbv ! local integers 71 INTEGER :: id_dia_vrt_zdf_int = 71 ! TODO remove once flags set properly72 INTEGER :: id_dia_vrt_zdf_mn = 72 ! TODO remove once flags set properly73 72 REAL(wp) :: z1_p2dt, zcoef, zzwi, zzws, zrhs ! local scalars 74 73 REAL(wp) :: ze3ua, ze3va … … 262 261 END DO 263 262 264 IF ( ( .NOT. lk_dynspg_ts ) .OR. & 265 & ( ( id_dia_vrt_zdf_int == 71 ) .OR. ( id_dia_vrt_zdf_mn == 72 ) ) ) THEN 263 IF ( ( .NOT. lk_dynspg_ts ) .OR. ( id_vrt_dia_zdf == "zdf" ) ) THEN 266 264 ! Normalization to obtain the general momentum trend ua 267 265 DO jk = 1, jpkm1 … … 367 365 END DO 368 366 369 IF ( ( .NOT. lk_dynspg_ts ) .OR. & 370 & ( ( id_dia_vrt_zdf_int == 71 ) .OR. ( id_dia_vrt_zdf_mn == 72 ) ) ) THEN 367 IF ( ( .NOT. lk_dynspg_ts ) .OR. ( id_vrt_dia_zdf == "zdf" ) ) THEN 371 368 ! Normalization to obtain the general momentum trend va 372 369 DO jk = 1, jpkm1 … … 377 374 END DO 378 375 END DO 379 IF ( ( id_dia_vrt_zdf_int == 71 ) .OR. (id_dia_vrt_zdf_mn == 72)) THEN376 IF ( id_vrt_dia_zdf == "zdf" ) THEN 380 377 ! TODO - remove kt only used for validation 381 CALL dyn_vrt_dia_3d(zua, zva, id_ dia_vrt_zdf_int, id_dia_vrt_zdf_mn, kt)378 CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_zdf, kt) 382 379 END IF 383 380 IF ( .NOT. lk_dynspg_ts ) THEN
Note: See TracChangeset
for help on using the changeset viewer.