Changeset 7606
- Timestamp:
- 2017-01-25T13:01:38+01:00 (8 years ago)
- Location:
- branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r7600 r7606 472 472 ENDIF 473 473 ! 474 !475 IF( ln_sdw ) THEN ! Stokes drift divergence added if necessary476 zssh_frc(:,:) = zssh_frc(:,:) + div_sd(:,:)477 ENDIF478 !479 474 #if defined key_asminc 480 475 ! ! Include the IAU weighted SSH increment -
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
r7600 r7606 16 16 !! 3.3 ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase 17 17 !! 3.7 ! 2014-04 (G. Madec) trend simplification: suppress jpdyn_trd_dat vorticity 18 !! - ! 2016-12 (G. Madec, E. Clementi) add Stokes-Coriolis trends (ln_stcor=T) 18 !! - ! 2016-12 (G. Madec, E. Clementi) add Stokes-Coriolis trends (ln_stcor=T) 19 19 !!---------------------------------------------------------------------- 20 20 … … 33 33 USE trd_oce ! trends: ocean variables 34 34 USE trddyn ! trend manager: dynamics 35 USE sbcwave ! Surface Waves (add Stokes-Coriolis force) 36 USE sbc_oce , ONLY : ln_stcor ! use Stoke-Coriolis force 37 ! 35 USE sbcwave ! Surface Waves (add Stokes-Coriolis force) 36 USE sbc_oce , ONLY : ln_stcor ! use Stoke-Coriolis force 37 ! 38 38 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 39 39 USE prtctl ! Print control … … 150 150 ztrdu(:,:,:) = ua(:,:,:) 151 151 ztrdv(:,:,:) = va(:,:,:) 152 CALL vor_ens( kt, nrvm, un, vn, ua, va ) 152 CALL vor_ens( kt, nrvm, un, vn, ua, va ) ! relative vorticity or metric trend (ens) 153 153 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 154 154 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) … … 156 156 ztrdu(:,:,:) = ua(:,:,:) 157 157 ztrdv(:,:,:) = va(:,:,:) 158 CALL vor_ene( kt, ncor, un, vn, ua, va ) 158 CALL vor_ene( kt, ncor, un, vn, ua, va ) ! planetary vorticity trend (ene) 159 159 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 160 160 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 161 161 CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt ) 162 162 ELSE 163 CALL vor_ens( kt, nrvm, un , vn , ua, va ) ! relative vorticity or metric trend (ens) 164 CALL vor_ene( kt, ncor, un , vn , ua, va ) ! planetary vorticity trend (ene) 163 CALL vor_ens( kt, nrvm, un , vn , ua, va ) ! relative vorticity or metric trend (ens) 164 CALL vor_ene( kt, ncor, un , vn , ua, va ) ! planetary vorticity trend (ene) 165 165 IF( ln_stcor ) CALL vor_ene( kt, ncor, usd, vsd, ua, va ) ! add the Stokes-Coriolis trend 166 166 ENDIF … … 228 228 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pua ! total u-trend 229 229 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pva ! total v-trend 230 REAL(wp), INTENT(in out), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities230 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities 231 231 ! 232 232 INTEGER :: ji, jj, jk ! dummy loop indices … … 256 256 SELECT CASE( kvor ) ! vorticity considered 257 257 CASE ( 1 ) ; zwz(:,:) = ff(:,:) ! planetary vorticity (Coriolis) 258 CASE ( 2 ) ! relative vorticity 259 DO jj = 1, jpjm1 260 DO ji = 1, fs_jpim1 ! vector opt. 261 zwz(ji,jj) = ( e2v(ji+1,jj ) * pvn(ji+1,jj,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 262 & - e1u(ji ,jj+1) * pun(ji,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 263 END DO 264 END DO 258 CASE ( 2 ) ; zwz(:,:) = rotn(:,:,jk) ! relative vorticity 265 259 CASE ( 3 ) ! metric term 266 260 DO jj = 1, jpjm1 267 261 DO ji = 1, fs_jpim1 ! vector opt. 268 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) &269 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) &262 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 263 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 270 264 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) 271 265 END DO 272 266 END DO 273 CASE ( 4 ) ! total (relative + planetary vorticity) 274 DO jj = 1, jpjm1 275 DO ji = 1, fs_jpim1 ! vector opt. 276 zwz(ji,jj) = ff(ji,jj) + ( e2v(ji+1,jj ) * pvn(ji+1,jj ,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 277 & - e1u(ji ,jj+1) * pun(ji ,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) & 278 & / ( e1f(ji,jj) * e2f(ji,jj) ) 279 END DO 280 END DO 267 CASE ( 4 ) ; zwz(:,:) = ( rotn(:,:,jk) + ff(:,:) ) ! total (relative + planetary vorticity) 281 268 CASE ( 5 ) ! total (coriolis + metric) 282 DO jj = 1, jpjm1 283 DO ji = 1, fs_jpim1 ! vector opt. 284 zwz(ji,jj) = ff(ji,jj) & 285 & + ( ( pvn(ji+1,jj ,jk) + pvn(ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 286 & - ( pun(ji ,jj+1,jk) + pun(ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 287 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) 288 END DO 269 DO jj = 1, jpjm1 270 DO ji = 1, fs_jpim1 ! vector opt. 271 zwz(ji,jj) = ( ff (ji,jj) & 272 & + ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 273 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 274 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) & 275 & ) 276 END DO 289 277 END DO 290 278 END SELECT … … 470 458 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pua ! total u-trend 471 459 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pva ! total v-trend 472 REAL(wp), INTENT(in out), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities460 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities 473 461 ! 474 462 INTEGER :: ji, jj, jk ! dummy loop indices … … 498 486 SELECT CASE( kvor ) ! vorticity considered 499 487 CASE ( 1 ) ; zwz(:,:) = ff(:,:) ! planetary vorticity (Coriolis) 500 CASE ( 2 ) ! relative vorticity 501 DO jj = 1, jpjm1 502 DO ji = 1, fs_jpim1 ! vector opt. 503 zwz(ji,jj) = ( e2v(ji+1,jj ) * pvn(ji+1,jj,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 504 & - e1u(ji ,jj+1) * pun(ji,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 505 END DO 506 END DO 488 CASE ( 2 ) ; zwz(:,:) = rotn(:,:,jk) ! relative vorticity 507 489 CASE ( 3 ) ! metric term 508 DO jj = 1, jpjm1 509 DO ji = 1, fs_jpim1 ! vector opt. 510 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) &511 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) &490 DO jj = 1, jpjm1 491 DO ji = 1, fs_jpim1 ! vector opt. 492 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 493 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 512 494 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) 513 END DO 514 END DO 515 CASE ( 4 ) ! total (relative + planetary vorticity) 516 DO jj = 1, jpjm1 517 DO ji = 1, fs_jpim1 ! vector opt. 518 zwz(ji,jj) = ff(ji,jj) + ( e2v(ji+1,jj ) * pvn(ji+1,jj ,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 519 & - e1u(ji ,jj+1) * pun(ji ,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) & 520 & / ( e1f(ji,jj) * e2f(ji,jj) ) 521 END DO 522 END DO 495 END DO 496 END DO 497 CASE ( 4 ) ; zwz(:,:) = ( rotn(:,:,jk) + ff(:,:) ) ! total (relative + planetary vorticity) 523 498 CASE ( 5 ) ! total (coriolis + metric) 524 DO jj = 1, jpjm1 525 DO ji = 1, fs_jpim1 ! vector opt. 526 zwz(ji,jj) = ff(ji,jj) & 527 & + ( ( pvn(ji+1,jj ,jk) + pvn(ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 528 & - ( pun(ji ,jj+1,jk) + pun(ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 529 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) 530 END DO 499 DO jj = 1, jpjm1 500 DO ji = 1, fs_jpim1 ! vector opt. 501 zwz(ji,jj) = ( ff (ji,jj) & 502 & + ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 503 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 504 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) & 505 & ) 506 END DO 531 507 END DO 532 508 END SELECT … … 548 524 END DO 549 525 ENDIF 550 551 ! 526 ! 552 527 ! Compute and add the vorticity term trend 553 528 ! ---------------------------------------- … … 595 570 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pua ! total u-trend 596 571 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) :: pva ! total v-trend 597 REAL(wp), INTENT(in out), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities572 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,jpk) :: pun, pvn ! now velocities 598 573 !! 599 574 INTEGER :: ji, jj, jk ! dummy loop indices … … 642 617 & + fse3t(ji,jj ,jk)*tmask(ji,jj ,jk) + fse3t(ji+1,jj ,jk)*tmask(ji+1,jj ,jk) ) 643 618 IF( ze3 /= 0._wp ) THEN ; ze3f(ji,jj,jk) = 4.0_wp / ze3 644 ELSE ; ze3f(ji,jj ) = 0._wp619 ELSE ; ze3f(ji,jj,jk) = 0._wp 645 620 ENDIF 646 621 END DO … … 656 631 & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) 657 632 IF( ze3 /= 0._wp ) THEN ; ze3f(ji,jj,jk) = zmsk / ze3 658 ELSE ; ze3f(ji,jj ) = 0._wp633 ELSE ; ze3f(ji,jj,jk) = 0._wp 659 634 ENDIF 660 635 END DO … … 680 655 zwz(:,:) = ff(:,:) * ze3f(:,:,jk) 681 656 CASE ( 2 ) ! relative vorticity 682 DO jj = 1, jpjm1 683 DO ji = 1, fs_jpim1 ! vector opt. 684 zwz(ji,jj) = ( e2v(ji+1,jj ) * pvn(ji+1,jj,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 685 & - e1u(ji ,jj+1) * pun(ji,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) & 686 & / ( e1f(ji,jj) * e2f(ji,jj) ) * ze3f(ji,jj) 687 END DO 688 END DO 657 zwz(:,:) = rotn(:,:,jk) * ze3f(:,:,jk) 689 658 CASE ( 3 ) ! metric term 690 DO jj = 1, jpjm1 691 DO ji = 1, fs_jpim1 ! vector opt. 692 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn(ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 693 & - ( pun(ji ,jj+1,jk) + pun(ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 694 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) * ze3f(ji,jj) 695 END DO 696 END DO 697 CASE ( 4 ) ! total (relative + planetary vorticity) 698 DO jj = 1, jpjm1 699 DO ji = 1, fs_jpim1 ! vector opt. 700 zwz(ji,jj) = ( ff(ji,jj) + ( e2v(ji+1,jj ) * pvn(ji+1,jj ,jk) - e2v(ji,jj) * pvn(ji,jj,jk) & 701 & - e1u(ji ,jj+1) * pun(ji ,jj+1,jk) + e1u(ji,jj) * pun(ji,jj,jk) ) & 702 & / ( e1f(ji,jj) * e2f(ji,jj) ) ) * ze3f(ji,jj) 703 END DO 704 END DO 659 DO jj = 1, jpjm1 660 DO ji = 1, fs_jpim1 ! vector opt. 661 zwz(ji,jj) = ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 662 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 663 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) * ze3f(ji,jj,jk) 664 END DO 665 END DO 666 CALL lbc_lnk( zwz, 'F', 1. ) 667 CASE ( 4 ) ! total (relative + planetary vorticity) 668 zwz(:,:) = ( rotn(:,:,jk) + ff(:,:) ) * ze3f(:,:,jk) 705 669 CASE ( 5 ) ! total (coriolis + metric) 706 DO jj = 1, jpjm1 707 DO ji = 1, fs_jpim1 ! vector opt. 708 zwz(ji,jj) = ( ff(ji,jj) & 709 & + ( ( pvn(ji+1,jj ,jk) + pvn(ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 710 & - ( pun(ji ,jj+1,jk) + pun(ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 711 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) ) * ze3f(ji,jj) 712 END DO 713 END DO 670 DO jj = 1, jpjm1 671 DO ji = 1, fs_jpim1 ! vector opt. 672 zwz(ji,jj) = ( ff (ji,jj) & 673 & + ( ( pvn(ji+1,jj ,jk) + pvn (ji,jj,jk) ) * ( e2v(ji+1,jj ) - e2v(ji,jj) ) & 674 & - ( pun(ji ,jj+1,jk) + pun (ji,jj,jk) ) * ( e1u(ji ,jj+1) - e1u(ji,jj) ) ) & 675 & * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) & 676 & ) * ze3f(ji,jj,jk) 677 END DO 678 END DO 679 CALL lbc_lnk( zwz, 'F', 1. ) 714 680 END SELECT 715 ! 716 CALL lbc_lnk( zwz, 'F', 1. ) 717 ! 718 ! !== horizontal fluxes ==! 681 719 682 zwx(:,:) = e2u(:,:) * fse3u(:,:,jk) * pun(:,:,jk) 720 683 zwy(:,:) = e1v(:,:) * fse3v(:,:,jk) * pvn(:,:,jk) -
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r7600 r7606 347 347 wsd(:,:,:) = 0._wp 348 348 ! Wave number needed only if ln_zdfqiao=T 349 IF( .NOT.cpl_wnum ) THEN349 IF( ln_zdfqiao .AND. .NOT.cpl_wnum ) THEN 350 350 ALLOCATE( sf_wn(1), STAT=ierror ) !* allocate and fill sf_wave with sn_wnum 351 351 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable toallocate sf_wave structure' )
Note: See TracChangeset
for help on using the changeset viewer.