Changeset 11613
- Timestamp:
- 2019-09-30T11:07:57+02:00 (5 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0_momentum_trends
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/cfgs/SHARED/field_def_nemo-oce.xml
r10823 r11613 353 353 <field_group id="grid_U" grid_ref="grid_U_2D"> 354 354 <field id="e3u" long_name="U-cell thickness" standard_name="cell_thickness" unit="m" grid_ref="grid_U_3D" /> 355 <field id="e3u_surf" long_name="U-cell thickness" field_ref="e3u" standard_name="cell_thickness" unit="m" grid_ref="grid_U_surface_extract"/> 355 356 <field id="e3u_0" long_name="Initial U-cell thickness" standard_name="ref_cell_thickness" unit="m" grid_ref="grid_U_3D"/> 356 357 <field id="utau" long_name="Wind Stress along i-axis" standard_name="surface_downward_x_stress" unit="N/m2" /> … … 407 408 <field_group id="grid_V" grid_ref="grid_V_2D"> 408 409 <field id="e3v" long_name="V-cell thickness" standard_name="cell_thickness" unit="m" grid_ref="grid_V_3D" /> 410 <field id="e3v_surf" long_name="V-cell thickness" field_ref="e3v" standard_name="cell_thickness" unit="m" grid_ref="grid_V_surface_extract"/> 409 411 <field id="e3v_0" long_name="Initial V-cell thickness" standard_name="ref_cell_thickness" unit="m" grid_ref="grid_V_3D" /> 410 412 <field id="vtau" long_name="Wind Stress along j-axis" standard_name="surface_downward_y_stress" unit="N/m2" /> … … 809 811 <!-- variables available with ln_dyn_trd --> 810 812 <field id="utrd_hpg" long_name="i-trend: hydrostatic pressure gradient" unit="m/s^2" /> 811 <field id="utrd_spg" long_name="i-trend: surface pressure gradient" unit="m/s^2" /> 813 <field id="utrd_hpg_corr" long_name="i-trend: HPG: correction" unit="m/s^2" grid_ref="grid_U_2D" /> 814 <field id="utrd_spg2d" long_name="i-trend: surface pressure gradient: true trend" unit="m/s^2" grid_ref="grid_U_2D" /> 812 815 <field id="utrd_spgexp" long_name="i-trend: surface pressure gradient (explicit)" unit="m/s^2" /> 813 <field id="utrd_spgflt" long_name="i-trend: surface pressure gradient (filtered)" unit="m/s^2" />814 816 <field id="utrd_keg" long_name="i-trend: KE gradient or hor. adv." unit="m/s^2" /> 815 817 <field id="utrd_rvo" long_name="i-trend: relative vorticity or metric term" unit="m/s^2" /> 816 <field id="utrd_pvo" long_name="i-trend: planetary vorticity" unit="m/s^2" /> 818 <field id="utrd_pvo" long_name="i-trend: planetary vorticity: 3D component" unit="m/s^2" /> 819 <field id="utrd_pvo2d" long_name="i-trend: planetary vorticity: 2D component" unit="m/s^2" grid_ref="grid_U_2D" /> 820 <field id="utrd_pvo_corr" long_name="i-trend: planetary vorticity: correction" unit="m/s^2" grid_ref="grid_U_2D" /> 817 821 <field id="utrd_zad" long_name="i-trend: vertical advection" unit="m/s^2" /> 818 822 <field id="utrd_udx" long_name="i-trend: U.dx[U]" unit="m/s^2" /> … … 822 826 <field id="utrd_bfr" long_name="i-trend: bottom friction (explicit)" unit="m/s^2" /> 823 827 <field id="utrd_bfri" long_name="i-trend: bottom friction (implicit)" unit="m/s^2" /> 828 <field id="utrd_bfr2d" long_name="i-trend: bottom friction: 2D component" unit="m/s^2" grid_ref="grid_U_2D" /> 824 829 <field id="utrd_tot" long_name="i-trend: total momentum trend before atf" unit="m/s^2" /> 825 830 <field id="utrd_atf" long_name="i-trend: asselin time filter trend" unit="m/s^2" /> 831 <!-- thickness weighted versions --> 832 <field id="utrd_hpg_e3u" unit="m2/s^2" > utrd_hpg * e3u </field> 833 <field id="utrd_spg_e3u" unit="m2/s^2" > utrd_spg * e3u </field> 834 <field id="utrd_spgexp_e3u" unit="m2/s^2" > utrd_spgexp * e3u </field> 835 <field id="utrd_keg_e3u" unit="m2/s^2" > utrd_keg * e3u </field> 836 <field id="utrd_rvo_e3u" unit="m2/s^2" > utrd_rvo * e3u </field> 837 <field id="utrd_pvo_e3u" unit="m2/s^2" > utrd_pvo * e3u </field> 838 <field id="utrd_zad_e3u" unit="m2/s^2" > utrd_zad * e3u </field> 839 <field id="utrd_ldf_e3u" unit="m2/s^2" > utrd_ldf * e3u </field> 840 <field id="utrd_zdf_e3u" unit="m2/s^2" > utrd_zdf * e3u </field> 841 <field id="utrd_tot_e3u" unit="m2/s^2" > utrd_tot * e3u </field> 842 <field id="utrd_atf_e3u" unit="m2/s^2" > utrd_atf * e3u </field> 843 <field id="utrd_bta_e3u" unit="m2/s^2" > utrd_bta * e3u </field> 844 <field id="utrd_bfr_e3u" unit="m2/s^2" > utrd_bfr * e3u </field> 845 <field id="utrd_bfri_e3u" unit="m2/s^2" > utrd_bfri * e3u </field> 846 <field id="utrd_tau_e3u" unit="m2/s^2" > utrd_tau * e3u_surf </field> 826 847 </field_group> 827 848 … … 829 850 <!-- variables available with ln_dyn_trd --> 830 851 <field id="vtrd_hpg" long_name="j-trend: hydrostatic pressure gradient" unit="m/s^2" /> 852 <field id="vtrd_hpg_corr" long_name="j-trend: HPG: correction" unit="m/s^2" grid_ref="grid_V_2D" /> 831 853 <field id="vtrd_spg" long_name="j-trend: surface pressure gradient" unit="m/s^2" /> 854 <field id="vtrd_spgbt" long_name="j-trend: surface pressure gradient: barotropic part" unit="m/s^2" grid_ref="grid_V_2D" /> 855 <field id="vtrd_spg2d" long_name="j-trend: surface pressure gradient: true trend" unit="m/s^2" grid_ref="grid_V_2D" /> 832 856 <field id="vtrd_spgexp" long_name="j-trend: surface pressure gradient (explicit)" unit="m/s^2" /> 833 <field id="vtrd_spgflt" long_name="j-trend: surface pressure gradient (filtered)" unit="m/s^2" />834 857 <field id="vtrd_keg" long_name="j-trend: KE gradient or hor. adv." unit="m/s^2" /> 835 858 <field id="vtrd_rvo" long_name="j-trend: relative vorticity or metric term" unit="m/s^2" /> 836 <field id="vtrd_pvo" long_name="j-trend: planetary vorticity" unit="m/s^2" /> 859 <field id="vtrd_pvo" long_name="j-trend: planetary vorticity: 3D component" unit="m/s^2" /> 860 <field id="vtrd_pvo2d" long_name="j-trend: planetary vorticity: 2D component" unit="m/s^2" grid_ref="grid_V_2D" /> 861 <field id="vtrd_pvo_corr" long_name="j-trend: planetary vorticity: correction" unit="m/s^2" grid_ref="grid_V_2D" /> 837 862 <field id="vtrd_zad" long_name="j-trend: vertical advection" unit="m/s^2" /> 838 <field id="vtrd_vdy" long_name=" i-trend: V.dx[V]" unit="m/s^2" />863 <field id="vtrd_vdy" long_name="j-trend: V.dx[V]" unit="m/s^2" /> 839 864 <field id="vtrd_ldf" long_name="j-trend: lateral diffusion" unit="m/s^2" /> 840 865 <field id="vtrd_zdf" long_name="j-trend: vertical diffusion" unit="m/s^2" /> … … 842 867 <field id="vtrd_bfr" long_name="j-trend: bottom friction (explicit)" unit="m/s^2" /> 843 868 <field id="vtrd_bfri" long_name="j-trend: bottom friction (implicit)" unit="m/s^2" /> 869 <field id="vtrd_bfr2d" long_name="j-trend: bottom friction: 2D component" unit="m/s^2" grid_ref="grid_V_2D" /> 844 870 <field id="vtrd_tot" long_name="j-trend: total momentum trend before atf" unit="m/s^2" /> 845 871 <field id="vtrd_atf" long_name="j-trend: asselin time filter trend" unit="m/s^2" /> 872 <!-- thickness weighted versions --> 873 <field id="vtrd_hpg_e3v" unit="m2/s^2" > vtrd_hpg * e3v </field> 874 <field id="vtrd_spg_e3v" unit="m2/s^2" > vtrd_spg * e3v </field> 875 <field id="vtrd_spgexp_e3v" unit="m2/s^2" > vtrd_spgexp * e3v </field> 876 <field id="vtrd_keg_e3v" unit="m2/s^2" > vtrd_keg * e3v </field> 877 <field id="vtrd_rvo_e3v" unit="m2/s^2" > vtrd_rvo * e3v </field> 878 <field id="vtrd_pvo_e3v" unit="m2/s^2" > vtrd_pvo * e3v </field> 879 <field id="vtrd_zad_e3v" unit="m2/s^2" > vtrd_zad * e3v </field> 880 <field id="vtrd_ldf_e3v" unit="m2/s^2" > vtrd_ldf * e3v </field> 881 <field id="vtrd_zdf_e3v" unit="m2/s^2" > vtrd_zdf * e3v </field> 882 <field id="vtrd_tot_e3v" unit="m2/s^2" > vtrd_tot * e3v </field> 883 <field id="vtrd_atf_e3v" unit="m2/s^2" > vtrd_atf * e3v </field> 884 <field id="vtrd_bta_e3v" unit="m2/s^2" > vtrd_bta * e3v </field> 885 <field id="vtrd_bfr_e3v" unit="m2/s^2" > vtrd_bfr * e3v </field> 886 <field id="vtrd_bfri_e3v" unit="m2/s^2" > vtrd_bfri * e3v </field> 887 <field id="vtrd_tau_e3v" unit="m2/s^2" > vtrd_tau * e3v_surf </field> 846 888 </field_group> 847 889 -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/DYN/dynhpg.F90
r10888 r11613 115 115 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 116 116 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 117 CALL trd_dyn( ztrdu, ztrdv, jpdyn_hpg , kt )117 CALL trd_dyn( ztrdu, ztrdv, jpdyn_hpg_save, kt ) 118 118 DEALLOCATE( ztrdu , ztrdv ) 119 119 ENDIF -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/DYN/dynspg.F90
r10888 r11613 81 81 IF( ln_timing ) CALL timing_start('dyn_spg') 82 82 ! 83 IF( l_trddyn ) THEN ! temporary save of ta and sa trends83 IF( l_trddyn .AND. nspg == np_EXP ) THEN ! temporary save of ta and sa trends 84 84 ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 85 85 ztrdu(:,:,:) = ua(:,:,:) … … 165 165 END SELECT 166 166 ! 167 IF( l_trddyn ) THEN! save the surface pressure gradient trends for further diagnostics167 IF( l_trddyn .AND. nspg == np_EXP ) THEN ! save the surface pressure gradient trends for further diagnostics 168 168 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 169 169 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 170 170 CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt ) 171 ! In this case we also need to finalise the write-out of the PVO 3D diagnostic with zero correction 172 ztrdu(:,:,1) = 0._wp 173 ztrdv(:,:,1) = 0._wp 174 CALL trd_dyn( ztrdu(:,:,1), ztrdv(:,:,1), jpdyn_pvo, kt ) 171 175 DEALLOCATE( ztrdu , ztrdv ) 172 176 ENDIF -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/DYN/dynspg_ts.F90
r10888 r11613 63 63 USE restart ! only for lrst_oce 64 64 USE diatmb ! Top,middle,bottom output 65 USE trd_oce ! trends: ocean variables 66 USE trddyn ! trend manager: dynamics 65 67 66 68 IMPLICIT NONE … … 172 174 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ztwdmask, zuwdmask, zvwdmask ! ROMS wetting and drying masks at t,u,v points 173 175 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zuwdav2, zvwdav2 ! averages over the sub-steps of zuwdmask and zvwdmask 176 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zspgtrdu, zspgtrdv, zpvotrdu, zpvotrdv ! SPG and PVO trends (if l_trddyn) 177 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zbfrtrdu, zbfrtrdv ! BFR trends (if l_trddyn) 174 178 !!---------------------------------------------------------------------- 175 179 ! … … 177 181 ! !* Allocate temporary arrays 178 182 IF( ln_wd_dl ) ALLOCATE( ztwdmask(jpi,jpj), zuwdmask(jpi,jpj), zvwdmask(jpi,jpj), zuwdav2(jpi,jpj), zvwdav2(jpi,jpj)) 183 ! 184 IF( l_trddyn ) THEN 185 ALLOCATE( zspgtrdu(jpi,jpj), zspgtrdv(jpi,jpj), zpvotrdu(jpi,jpj), zpvotrdv(jpi,jpj), zbfrtrdu(jpi,jpj), zbfrtrdv(jpi,jpj) ) 186 zspgtrdu(:,:) = 0._wp 187 zspgtrdv(:,:) = 0._wp 188 zpvotrdu(:,:) = 0._wp 189 zpvotrdv(:,:) = 0._wp 190 zbfrtrdu(:,:) = 0._wp 191 zbfrtrdv(:,:) = 0._wp 192 ENDIF 179 193 ! 180 194 zmdi=1.e+20 ! missing data indicator for masking … … 381 395 !!gm Is it correct to do so ? I think so... 382 396 383 397 384 398 ! !* barotropic Coriolis trends (vorticity scheme dependent) 385 399 ! ! -------------------------------------------------------- … … 387 401 zwx(:,:) = un_b(:,:) * hu_n(:,:) * e2u(:,:) ! now fluxes 388 402 zwy(:,:) = vn_b(:,:) * hv_n(:,:) * e1v(:,:) 403 ! 404 zu_trd(:,:) = 0._wp 405 zv_trd(:,:) = 0._wp 389 406 ! 390 407 SELECT CASE( nvor_scheme ) … … 393 410 DO ji = 2, jpim1 ! vector opt. 394 411 zu_trd(ji,jj) = + r1_4 * r1_e1e2u(ji,jj) * r1_hu_n(ji,jj) & 395 & * ( e1e2t(ji+1,jj)*ht_n(ji+1,jj)*ff_t(ji+1,jj) * ( vn_b(ji+1,jj) + vn_b(ji+1,jj-1) ) &396 & + e1e2t(ji ,jj)*ht_n(ji ,jj)*ff_t(ji ,jj) * ( vn_b(ji ,jj) + vn_b(ji ,jj-1) ) )397 412 & * ( e1e2t(ji+1,jj)*ht_n(ji+1,jj)*ff_t(ji+1,jj) * ( vn_b(ji+1,jj) + vn_b(ji+1,jj-1) ) & 413 & + e1e2t(ji ,jj)*ht_n(ji ,jj)*ff_t(ji ,jj) * ( vn_b(ji ,jj) + vn_b(ji ,jj-1) ) ) 414 ! 398 415 zv_trd(ji,jj) = - r1_4 * r1_e1e2v(ji,jj) * r1_hv_n(ji,jj) & 399 & * ( e1e2t(ji,jj+1)*ht_n(ji,jj+1)*ff_t(ji,jj+1) * ( un_b(ji,jj+1) + un_b(ji-1,jj+1) ) &400 & + e1e2t(ji,jj )*ht_n(ji,jj )*ff_t(ji,jj ) * ( un_b(ji,jj ) + un_b(ji-1,jj ) ) )401 END DO 402 END DO 416 & * ( e1e2t(ji,jj+1)*ht_n(ji,jj+1)*ff_t(ji,jj+1) * ( un_b(ji,jj+1) + un_b(ji-1,jj+1) ) & 417 & + e1e2t(ji,jj )*ht_n(ji,jj )*ff_t(ji,jj ) * ( un_b(ji,jj ) + un_b(ji-1,jj ) ) ) 418 END DO 419 END DO 403 420 ! 404 421 CASE( np_ENE , np_MIX ) ! energy conserving scheme (t-point) ENE or MIX … … 443 460 END SELECT 444 461 ! 462 IF( l_trddyn ) THEN 463 ! send correction to baroclinic planetary vorticity trend to trd_dyn 464 CALL trd_dyn( zu_trd, zv_trd, jpdyn_pvo_corr, kt ) 465 ENDIF 445 466 ! !* Right-Hand-Side of the barotropic momentum equation 446 467 ! ! ---------------------------------------------------- 447 468 IF( .NOT.ln_linssh ) THEN ! Variable volume : remove surface pressure gradient 469 IF( l_trddyn ) THEN 470 zspgtrdu(:,:) = zu_trd(:,:) 471 zspgtrdv(:,:) = zv_trd(:,:) 472 ENDIF 448 473 IF( ln_wd_il ) THEN ! Calculating and applying W/D gravity filters 449 474 DO jj = 2, jpjm1 … … 505 530 END DO 506 531 END DO 532 ENDIF 533 ! 534 IF( l_trddyn ) THEN 535 zspgtrdu(:,:) = zu_trd(:,:) - zspgtrdu(:,:) 536 zspgtrdv(:,:) = zv_trd(:,:) - zspgtrdv(:,:) 537 ! send correction to HPG trend to trd_dyn 538 CALL trd_dyn( zspgtrdu, zspgtrdv, jpdyn_hpg_corr, kt ) 539 ! reset temporary arrays for use later 540 zspgtrdu(:,:) = 0._wp 541 zspgtrdv(:,:) = 0._wp 507 542 ENDIF 508 543 ! … … 1056 1091 END SELECT 1057 1092 ! 1093 IF( l_trddyn ) THEN 1094 za2 = wgtbtp2(jn) 1095 zpvotrdu(:,:) = zpvotrdu(:,:) + za2 * zu_trd(:,:) * ssumask(:,:) 1096 zpvotrdv(:,:) = zpvotrdv(:,:) + za2 * zv_trd(:,:) * ssvmask(:,:) 1097 ENDIF 1098 ! 1058 1099 ! Add tidal astronomical forcing if defined 1059 1100 IF ( ln_tide .AND. ln_tide_pot ) THEN … … 1077 1118 END DO 1078 1119 END DO 1120 ! 1121 IF( l_trddyn ) THEN 1122 za2 = wgtbtp2(jn) 1123 zbfrtrdu(:,:) = zbfrtrdu(:,:) + za2 * zCdU_u(:,:) * un_e(:,:) * hur_e(:,:) 1124 zbfrtrdv(:,:) = zbfrtrdv(:,:) + za2 * zCdU_v(:,:) * vn_e(:,:) * hvr_e(:,:) 1125 ENDIF 1079 1126 ENDIF 1080 1127 ! … … 1101 1148 END DO 1102 1149 END IF 1103 1150 ! 1151 IF( l_trddyn ) THEN 1152 za2 = wgtbtp2(jn) 1153 zspgtrdu(:,:) = zspgtrdu(:,:) + za2 * zwx(:,:) * ssumask(:,:) 1154 zspgtrdv(:,:) = zspgtrdv(:,:) + za2 * zwy(:,:) * ssvmask(:,:) 1155 ENDIF 1104 1156 ! 1105 1157 ! Set next velocities: … … 1302 1354 IF( ln_wd_il ) DEALLOCATE( zcpx, zcpy ) 1303 1355 IF( ln_wd_dl ) DEALLOCATE( ztwdmask, zuwdmask, zvwdmask, zuwdav2, zvwdav2 ) 1356 IF( l_trddyn ) THEN 1357 CALL trd_dyn( zspgtrdu, zspgtrdv, jpdyn_spg, kt ) 1358 CALL trd_dyn( zpvotrdu, zpvotrdv, jpdyn_pvo, kt ) 1359 CALL trd_dyn( zbfrtrdu, zbfrtrdv, jpdyn_bfr, kt ) 1360 DEALLOCATE( zspgtrdu, zspgtrdv, zpvotrdu, zpvotrdv, zbfrtrdu, zbfrtrdv ) 1361 ENDIF 1304 1362 ! 1305 1363 IF( ln_diatmb ) THEN -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/DYN/dynvor.F90
r10888 r11613 133 133 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 134 134 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 135 CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo , kt )135 CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo_save, kt ) 136 136 ! 137 137 IF( n_dynadv /= np_LIN_dyn ) THEN !* relative vorticity or metric trend (only in non-linear case) -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/DYN/dynzdf.F90
r10888 r11613 25 25 ! 26 26 USE in_out_manager ! I/O manager 27 USE iom ! IOM library 27 28 USE lib_mpp ! MPP library 28 29 USE prtctl ! Print control … … 69 70 INTEGER :: ji, jj, jk ! dummy loop indices 70 71 INTEGER :: iku, ikv ! local integers 72 INTEGER :: ikbu, ikbv ! local integers 71 73 REAL(wp) :: zzwi, ze3ua, zdt ! local scalars 72 74 REAL(wp) :: zzws, ze3va ! - - … … 99 101 ! 100 102 ! 101 IF( l_trddyn ) THEN !* temporary save of ta and sa trends102 ALLOCATE( ztrdu(jpi,jpj,jpk), ztrdv(jpi,jpj,jpk) )103 ztrdu(:,:,:) = ua(:,:,:)104 ztrdv(:,:,:) = va(:,:,:)105 ENDIF106 !107 103 ! !== RHS: Leap-Frog time stepping on all trends but the vertical mixing ==! (put in ua,va) 108 104 ! … … 131 127 va(:,:,jk) = ( va(:,:,jk) - va_b(:,:) ) * vmask(:,:,jk) 132 128 END DO 129 IF( l_trddyn ) THEN !* temporary save of ta and sa trends 130 ALLOCATE( ztrdu(jpi,jpj,jpk), ztrdv(jpi,jpj,jpk) ) 131 ztrdu(:,:,:) = ua(:,:,:) 132 ztrdv(:,:,:) = va(:,:,:) 133 ENDIF 133 134 DO jj = 2, jpjm1 ! Add bottom/top stress due to barotropic component only 134 135 DO ji = fs_2, fs_jpim1 ! vector opt. … … 141 142 END DO 142 143 END DO 144 IF( l_trddyn ) THEN ! save explicit part of bottom friction trends 145 ztrdu(:,:,:) = ( ua(:,:,:) - ztrdu(:,:,:) ) / r2dt 146 ztrdv(:,:,:) = ( va(:,:,:) - ztrdv(:,:,:) ) / r2dt 147 CALL trd_dyn( ztrdu, ztrdv, jpdyn_bfr, kt ) 148 ENDIF 143 149 IF( ln_isfcav ) THEN ! Ocean cavities (ISF) 144 150 DO jj = 2, jpjm1 … … 153 159 END DO 154 160 END IF 161 ENDIF 162 ! 163 IF( l_trddyn ) THEN !* temporary save of ta and sa trends 164 IF( .NOT. ALLOCATED(ztrdu) ) ALLOCATE( ztrdu(jpi,jpj,jpk), ztrdv(jpi,jpj,jpk) ) 165 ztrdu(:,:,:) = ua(:,:,:) 166 ztrdv(:,:,:) = va(:,:,:) 155 167 ENDIF 156 168 ! … … 486 498 ! 487 499 IF( l_trddyn ) THEN ! save the vertical diffusive trends for further diagnostics 488 ztrdu(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) / r2dt - ztrdu(:,:,:) 489 ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / r2dt - ztrdv(:,:,:) 500 501 ztrdu(:,:,:) = ( ua(:,:,:) - ztrdu(:,:,:) ) / r2dt 502 ztrdv(:,:,:) = ( va(:,:,:) - ztrdv(:,:,:) ) / r2dt 490 503 CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt ) 504 ! 505 IF( ln_drgimp ) THEN 506 ztrdu(:,:,:) = 0._wp ; ztrdv(:,:,:) = 0._wp 507 DO jk = 1, jpkm1 508 DO jj = 2, jpjm1 509 DO ji = 2, jpim1 510 ikbu = mbku(ji,jj) ! deepest ocean u- & v-levels 511 ikbv = mbkv(ji,jj) 512 ztrdu(ji,jj,jk) = 0.5 * ( rCdU_bot(ji+1,jj) + rCdU_bot(ji,jj) ) & 513 & * un(ji,jj,ikbu) / e3u_n(ji,jj,ikbu) 514 ztrdv(ji,jj,jk) = 0.5 * ( rCdU_bot(ji,jj+1) + rCdU_bot(ji,jj) ) & 515 & * vn(ji,jj,ikbv) / e3v_n(ji,jj,ikbv) 516 END DO 517 END DO 518 END DO 519 CALL trd_dyn( ztrdu, ztrdv, jpdyn_bfri, kt ) 520 ENDIF 521 ! 491 522 DEALLOCATE( ztrdu, ztrdv ) 492 523 ENDIF -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/TRD/trd_oce.F90
r10888 r11613 59 59 ! 60 60 ! !!!* Momentum trends indices 61 INTEGER, PUBLIC, PARAMETER :: jptot_dyn = 1 3!: Total trend nb: change it when adding/removing one indice below61 INTEGER, PUBLIC, PARAMETER :: jptot_dyn = 17 !: Total trend nb: change it when adding/removing one indice below 62 62 ! =============== ! 63 INTEGER, PUBLIC, PARAMETER :: jpdyn_hpg = 1 !: hydrostatic pressure gradient 64 INTEGER, PUBLIC, PARAMETER :: jpdyn_spg = 2 !: surface pressure gradient 65 INTEGER, PUBLIC, PARAMETER :: jpdyn_keg = 3 !: kinetic energy gradient or horizontal advection 66 INTEGER, PUBLIC, PARAMETER :: jpdyn_rvo = 4 !: relative vorticity or metric term 67 INTEGER, PUBLIC, PARAMETER :: jpdyn_pvo = 5 !: planetary vorticity 68 INTEGER, PUBLIC, PARAMETER :: jpdyn_zad = 6 !: vertical advection 69 INTEGER, PUBLIC, PARAMETER :: jpdyn_ldf = 7 !: horizontal diffusion 70 INTEGER, PUBLIC, PARAMETER :: jpdyn_zdf = 8 !: vertical diffusion 71 INTEGER, PUBLIC, PARAMETER :: jpdyn_bfr = 9 !: bottom stress 72 INTEGER, PUBLIC, PARAMETER :: jpdyn_atf = 10 !: Asselin time filter 73 INTEGER, PUBLIC, PARAMETER :: jpdyn_tau = 11 !: surface stress 74 INTEGER, PUBLIC, PARAMETER :: jpdyn_bfri = 12 !: implicit bottom friction (ln_drgimp=.TRUE.) 75 INTEGER, PUBLIC, PARAMETER :: jpdyn_ken = 13 !: use for calculation of KE 63 INTEGER, PUBLIC, PARAMETER :: jpdyn_hpg = 1 !: hydrostatic pressure gradient 64 INTEGER, PUBLIC, PARAMETER :: jpdyn_hpg_save = 2 !: hydrostatic pressure gradient (saved value) 65 INTEGER, PUBLIC, PARAMETER :: jpdyn_hpg_corr = 3 !: hydrostatic pressure gradient (initial correction) 66 INTEGER, PUBLIC, PARAMETER :: jpdyn_spg = 4 !: surface pressure gradient 67 INTEGER, PUBLIC, PARAMETER :: jpdyn_keg = 5 !: kinetic energy gradient or horizontal advection 68 INTEGER, PUBLIC, PARAMETER :: jpdyn_rvo = 6 !: relative vorticity or metric term 69 INTEGER, PUBLIC, PARAMETER :: jpdyn_pvo = 7 !: planetary vorticity 70 INTEGER, PUBLIC, PARAMETER :: jpdyn_pvo_save = 8 !: planetary vorticity (saved value) 71 INTEGER, PUBLIC, PARAMETER :: jpdyn_pvo_corr = 9 !: planetary vorticity (initial correction) 72 INTEGER, PUBLIC, PARAMETER :: jpdyn_zad = 10 !: vertical advection 73 INTEGER, PUBLIC, PARAMETER :: jpdyn_ldf = 11 !: horizontal diffusion 74 INTEGER, PUBLIC, PARAMETER :: jpdyn_zdf = 12 !: vertical diffusion 75 INTEGER, PUBLIC, PARAMETER :: jpdyn_bfr = 13 !: bottom stress 76 INTEGER, PUBLIC, PARAMETER :: jpdyn_atf = 14 !: Asselin time filter 77 INTEGER, PUBLIC, PARAMETER :: jpdyn_tau = 15 !: surface stress 78 INTEGER, PUBLIC, PARAMETER :: jpdyn_bfri = 16 !: implicit bottom friction (ln_drgimp=.TRUE.) 79 INTEGER, PUBLIC, PARAMETER :: jpdyn_ken = 17 !: use for calculation of KE 76 80 ! 77 81 !!---------------------------------------------------------------------- -
NEMO/branches/UKMO/NEMO_4.0_momentum_trends/src/OCE/TRD/trddyn.F90
r10888 r11613 18 18 USE sbc_oce ! surface boundary condition: ocean 19 19 USE zdf_oce ! ocean vertical physics: variables 20 !!gm USE zdfdrg ! ocean vertical physics: bottom friction21 20 USE trd_oce ! trends: ocean variables 22 21 USE trdken ! trends: Kinetic ENergy … … 35 34 PUBLIC trd_dyn ! called by all dynXXX modules 36 35 36 INTERFACE trd_dyn 37 module procedure trd_dyn_3d, trd_dyn_2d 38 END INTERFACE 39 40 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), SAVE :: zutrd_hpg, zvtrd_hpg 41 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), SAVE :: zutrd_pvo, zvtrd_pvo 42 37 43 !! * Substitutions 38 44 # include "vectopt_loop_substitute.h90" … … 44 50 CONTAINS 45 51 46 SUBROUTINE trd_dyn ( putrd, pvtrd, ktrd, kt )52 SUBROUTINE trd_dyn_3d( putrd, pvtrd, ktrd, kt ) 47 53 !!--------------------------------------------------------------------- 48 !! *** ROUTINE trd_ mod ***54 !! *** ROUTINE trd_dyn_3d *** 49 55 !! 50 56 !! ** Purpose : Dispatch momentum trend computation, e.g. 3D output, … … 63 69 !!gm NB : here a lbc_lnk should probably be added 64 70 65 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 66 ! 3D output of momentum and/or tracers trends using IOM interface 67 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 68 IF( ln_dyn_trd ) CALL trd_dyn_iom( putrd, pvtrd, ktrd, kt ) 71 SELECT CASE( ktrd ) 72 CASE( jpdyn_hpg_save ) 73 ! 74 ! save 3D HPG trends to possibly have barotropic part corrected later before writing out 75 ALLOCATE( zutrd_hpg(jpi,jpj,jpk), zvtrd_hpg(jpi,jpj,jpk) ) 76 zutrd_hpg(:,:,:) = putrd(:,:,:) 77 zvtrd_hpg(:,:,:) = pvtrd(:,:,:) 78 79 CASE( jpdyn_pvo_save ) 80 ! 81 ! save 3D coriolis trends to possibly have barotropic part corrected later before writing out 82 ALLOCATE( zutrd_pvo(jpi,jpj,jpk), zvtrd_pvo(jpi,jpj,jpk) ) 83 zutrd_pvo(:,:,:) = putrd(:,:,:) 84 zvtrd_pvo(:,:,:) = pvtrd(:,:,:) 85 86 CASE DEFAULT 87 88 IF( ktrd == jpdyn_spg ) THEN 89 ! For explicit scheme SPG trends come here as 3D fields 90 ! Add SPG trend to 3D HPG trend and also output as 2D diagnostic in own right. 91 CALL trd_dyn_iom_2d( putrd(:,:,1), pvtrd(:,:,1), jpdyn_spg, kt ) 92 putrd(:,:,:) = putrd(:,:,:) + zutrd_hpg(:,:,:) 93 pvtrd(:,:,:) = pvtrd(:,:,:) + zvtrd_hpg(:,:,:) 94 DEALLOCATE( zutrd_hpg, zvtrd_hpg ) 95 ENDIF 96 97 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 98 ! 3D output of momentum and/or tracers trends using IOM interface 99 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 100 IF( ln_dyn_trd ) CALL trd_dyn_iom_3d( putrd, pvtrd, ktrd, kt ) 101 102 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 103 ! Integral Constraints Properties for momentum and/or tracers trends 104 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 105 IF( ln_glo_trd ) CALL trd_glo( putrd, pvtrd, ktrd, 'DYN', kt ) 106 107 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 108 ! Kinetic Energy trends 109 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 110 IF( ln_KE_trd ) CALL trd_ken( putrd, pvtrd, ktrd, kt ) 111 112 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 113 ! Vorticity trends 114 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 115 IF( ln_vor_trd ) CALL trd_vor( putrd, pvtrd, ktrd, kt ) 116 117 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 118 ! Mixed layer trends for active tracers 119 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 120 !!gm IF( ln_dyn_mxl ) CALL trd_mxl_dyn 121 ! 122 END SELECT 123 ! 124 END SUBROUTINE trd_dyn_3d 125 126 127 SUBROUTINE trd_dyn_2d( putrd, pvtrd, ktrd, kt ) 128 !!--------------------------------------------------------------------- 129 !! *** ROUTINE trd_mod *** 130 !! 131 !! ** Purpose : Dispatch momentum trend computation, e.g. 2D output, 132 !! integral constraints, barotropic vorticity, kinetic enrgy, 133 !! and/or mixed layer budget. 134 !!---------------------------------------------------------------------- 135 REAL(wp), DIMENSION(:,:), INTENT(inout) :: putrd, pvtrd ! U and V trends 136 INTEGER , INTENT(in ) :: ktrd ! trend index 137 INTEGER , INTENT(in ) :: kt ! time step 138 INTEGER :: jk 139 !!---------------------------------------------------------------------- 140 ! 141 putrd(:,:) = putrd(:,:) * umask(:,:,1) ! mask the trends 142 pvtrd(:,:) = pvtrd(:,:) * vmask(:,:,1) 143 ! 144 145 !!gm NB : here a lbc_lnk should probably be added 146 147 SELECT CASE(ktrd) 148 149 CASE ( jpdyn_hpg_corr ) 150 ! 151 ! Remove "first-guess" SPG trend from 3D HPG trend. 152 DO jk = 1, jpkm1 153 zutrd_hpg(:,:,jk) = zutrd_hpg(:,:,jk) - putrd(:,:) 154 zvtrd_hpg(:,:,jk) = zvtrd_hpg(:,:,jk) - pvtrd(:,:) 155 ENDDO 156 CALL trd_dyn_iom_2d( putrd, pvtrd, jpdyn_hpg_corr, kt ) 157 158 CASE( jpdyn_pvo_corr ) 159 ! 160 ! Remove "first-guess" barotropic coriolis trend from 3D PVO trend. 161 DO jk = 1, jpkm1 162 zutrd_pvo(:,:,jk) = zutrd_pvo(:,:,jk) - putrd(:,:) 163 zvtrd_pvo(:,:,jk) = zvtrd_pvo(:,:,jk) - pvtrd(:,:) 164 ENDDO 165 CALL trd_dyn_iom_2d( putrd, pvtrd, jpdyn_pvo_corr, kt ) 166 167 CASE( jpdyn_spg ) 168 ! 169 ! For split-explicit scheme SPG trends come here as 2D fields 170 ! Add SPG trend to 3D HPG trend and also output as 2D diagnostic in own right. 171 DO jk = 1, jpkm1 172 zutrd_hpg(:,:,jk) = zutrd_hpg(:,:,jk) + putrd(:,:) 173 zvtrd_hpg(:,:,jk) = zvtrd_hpg(:,:,jk) + pvtrd(:,:) 174 ENDDO 175 CALL trd_dyn_iom_2d( putrd(:,:), pvtrd(:,:), jpdyn_spg, kt ) 176 CALL trd_dyn_3d( zutrd_hpg, zvtrd_hpg, jpdyn_hpg, kt ) 177 DEALLOCATE( zutrd_hpg, zvtrd_hpg ) 178 179 CASE( jpdyn_pvo ) 180 ! 181 ! Add 2D PVO trend to 3D PVO trend and also output as diagnostic in own right. 182 DO jk = 1, jpkm1 183 zutrd_pvo(:,:,jk) = zutrd_pvo(:,:,jk) + putrd(:,:) 184 zvtrd_pvo(:,:,jk) = zvtrd_pvo(:,:,jk) + pvtrd(:,:) 185 ENDDO 186 CALL trd_dyn_iom_2d( putrd, pvtrd, jpdyn_pvo, kt ) 187 CALL trd_dyn_3d( zutrd_pvo, zvtrd_pvo, jpdyn_pvo, kt ) 188 DEALLOCATE( zutrd_pvo, zvtrd_pvo ) 189 190 CASE DEFAULT 191 192 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 193 ! 2D output of momentum and/or tracers trends using IOM interface 194 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 195 IF( ln_dyn_trd ) CALL trd_dyn_iom_2d( putrd, pvtrd, ktrd, kt ) 69 196 70 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 71 ! Integral Constraints Properties for momentum and/or tracers trends 72 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 73 IF( ln_glo_trd ) CALL trd_glo( putrd, pvtrd, ktrd, 'DYN', kt ) 74 75 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 76 ! Kinetic Energy trends 77 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 78 IF( ln_KE_trd ) CALL trd_ken( putrd, pvtrd, ktrd, kt ) 79 80 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 81 ! Vorticity trends 82 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 83 IF( ln_vor_trd ) CALL trd_vor( putrd, pvtrd, ktrd, kt ) 197 END SELECT 198 199 !!$ CALLS TO THESE ROUTINES FOR 2D DIAGOSTICS NOT CODED YET 200 !!$ !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 201 !!$ ! Integral Constraints Properties for momentum and/or tracers trends 202 !!$ !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 203 !!$ IF( ln_glo_trd ) CALL trd_glo( putrd, pvtrd, ktrd, 'DYN', kt ) 204 !!$ 205 !!$ !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 206 !!$ ! Kinetic Energy trends 207 !!$ !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 208 !!$ IF( ln_KE_trd ) CALL trd_ken( putrd, pvtrd, ktrd, kt ) 209 !!$ 210 !!$ !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 211 !!$ ! Vorticity trends 212 !!$ !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 213 !!$ IF( ln_vor_trd ) CALL trd_vor( putrd, pvtrd, ktrd, kt ) 84 214 85 215 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 88 218 !!gm IF( ln_dyn_mxl ) CALL trd_mxl_dyn 89 219 ! 90 END SUBROUTINE trd_dyn 91 92 93 SUBROUTINE trd_dyn_iom ( putrd, pvtrd, ktrd, kt )220 END SUBROUTINE trd_dyn_2d 221 222 223 SUBROUTINE trd_dyn_iom_3d( putrd, pvtrd, ktrd, kt ) 94 224 !!--------------------------------------------------------------------- 95 225 !! *** ROUTINE trd_dyn_iom *** … … 110 240 CASE( jpdyn_hpg ) ; CALL iom_put( "utrd_hpg", putrd ) ! hydrostatic pressure gradient 111 241 CALL iom_put( "vtrd_hpg", pvtrd ) 112 CASE( jpdyn_spg ) ; CALL iom_put( "utrd_spg", putrd ) ! surface pressure gradient113 CALL iom_put( "vtrd_spg", pvtrd )114 242 CASE( jpdyn_pvo ) ; CALL iom_put( "utrd_pvo", putrd ) ! planetary vorticity 115 243 CALL iom_put( "vtrd_pvo", pvtrd ) … … 147 275 CALL iom_put( "vtrd_tau", z2dy ) 148 276 DEALLOCATE( z2dx , z2dy ) 149 !!gm to be changed : computation should be done in dynzdf.F90 150 !!gm + missing the top friction 151 ! ! ! bottom stress tends (implicit case) 152 ! IF( ln_drgimp ) THEN 153 ! ALLOCATE( z3dx(jpi,jpj,jpk) , z3dy(jpi,jpj,jpk) ) 154 ! z3dx(:,:,:) = 0._wp ; z3dy(:,:,:) = 0._wp ! after velocity known (now filed at this stage) 155 ! DO jk = 1, jpkm1 156 ! DO jj = 2, jpjm1 157 ! DO ji = 2, jpim1 158 ! ikbu = mbku(ji,jj) ! deepest ocean u- & v-levels 159 ! ikbv = mbkv(ji,jj) 160 ! z3dx(ji,jj,jk) = 0.5 * ( rCdU_bot(ji+1,jj) + rCdU_bot(ji,jj) ) & 161 ! & * un(ji,jj,ikbu) / e3u_n(ji,jj,ikbu) 162 ! z3dy(ji,jj,jk) = 0.5 * ( rCdU_bot(ji,jj+1) + rCdU_bot(ji,jj) ) & 163 ! & * vn(ji,jj,ikbv) / e3v_n(ji,jj,ikbv) 164 ! END DO 165 ! END DO 166 ! END DO 167 ! CALL lbc_lnk_multi( 'trddyn', z3dx, 'U', -1., z3dy, 'V', -1. ) 168 ! CALL iom_put( "utrd_bfr", z3dx ) 169 ! CALL iom_put( "vtrd_bfr", z3dy ) 170 ! DEALLOCATE( z3dx , z3dy ) 171 ! ENDIF 172 !!gm end 173 CASE( jpdyn_bfr ) ! called if ln_drgimp=F 174 CALL iom_put( "utrd_bfr", putrd ) ! bottom friction (explicit case) 277 CASE( jpdyn_bfr ) ; CALL iom_put( "utrd_bfr", putrd ) ! bottom friction (explicit case) 175 278 CALL iom_put( "vtrd_bfr", pvtrd ) 279 CASE( jpdyn_bfri) ; CALL iom_put( "utrd_bfri", putrd ) ! bottom friction (implicit case) 280 CALL iom_put( "vtrd_bfri", pvtrd ) 176 281 CASE( jpdyn_atf ) ; CALL iom_put( "utrd_atf", putrd ) ! asselin filter trends 177 282 CALL iom_put( "vtrd_atf", pvtrd ) 178 283 END SELECT 179 284 ! 180 END SUBROUTINE trd_dyn_iom 285 END SUBROUTINE trd_dyn_iom_3d 286 287 288 SUBROUTINE trd_dyn_iom_2d( putrd, pvtrd, ktrd, kt ) 289 !!--------------------------------------------------------------------- 290 !! *** ROUTINE trd_dyn_iom *** 291 !! 292 !! ** Purpose : output 2D trends using IOM 293 !!---------------------------------------------------------------------- 294 REAL(wp), DIMENSION(:,:), INTENT(inout) :: putrd, pvtrd ! U and V trends 295 INTEGER , INTENT(in ) :: ktrd ! trend index 296 INTEGER , INTENT(in ) :: kt ! time step 297 ! 298 INTEGER :: ji, jj, jk ! dummy loop indices 299 INTEGER :: ikbu, ikbv ! local integers 300 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z2dx, z2dy ! 2D workspace 301 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z3dx, z3dy ! 3D workspace 302 !!---------------------------------------------------------------------- 303 ! 304 SELECT CASE( ktrd ) 305 CASE( jpdyn_spg ) ; CALL iom_put( "utrd_spg2d", putrd ) ! surface pressure gradient 306 CALL iom_put( "vtrd_spg2d", pvtrd ) 307 CASE( jpdyn_pvo ) ; CALL iom_put( "utrd_pvo2d", putrd ) ! planetary vorticity (barotropic part) 308 CALL iom_put( "vtrd_pvo2d", pvtrd ) 309 CASE( jpdyn_hpg_corr ) ; CALL iom_put( "utrd_hpg_corr", putrd ) ! horizontal pressure gradient correction 310 CALL iom_put( "vtrd_hpg_corr", pvtrd ) 311 CASE( jpdyn_pvo_corr ) ; CALL iom_put( "utrd_pvo_corr", putrd ) ! planetary vorticity correction 312 CALL iom_put( "vtrd_pvo_corr", pvtrd ) 313 CASE( jpdyn_bfr ) ; CALL iom_put( "utrd_bfr2d", putrd ) ! bottom friction due to barotropic currents 314 CALL iom_put( "vtrd_bfr2d", pvtrd ) 315 END SELECT 316 ! 317 END SUBROUTINE trd_dyn_iom_2d 181 318 182 319 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.