Changeset 10810
- Timestamp:
- 2019-03-29T09:43:38+01:00 (6 years ago)
- Location:
- NEMO/branches/UKMO/dev_r10037_vorticity_trends
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/domain_def_nemo.xml
r9930 r10810 168 168 <domain id="EqU" domain_ref="grid_U" > <zoom_domain id="EqU"/> </domain> 169 169 170 171 170 <!-- V grid --> 172 171 <domain id="grid_V" long_name="grid V"/> 173 172 <!-- Eq section : no V point on the Equator... --> 174 173 175 174 <!-- F grid --> 175 <domain id="grid_F" long_name="grid F"/> 176 176 177 <!-- W grid --> 177 178 <domain id="grid_W" long_name="grid W"/> -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/field_def_nemo-oce.xml
r10011 r10810 792 792 <field id="alphaPE" long_name="partial deriv. of PEanom wrt T" unit="degC-1" /> 793 793 <field id="betaPE" long_name="partial deriv. of PEanom wrt S" unit="1e3" /> 794 795 </field_group> 796 797 <field_group id="trdvor" grid_ref="grid_F_2D"> 798 <!-- variables available with ln_dyn_vor --> 799 <field id="vort_prg_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 800 <field id="vort_keg_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 801 <field id="vort_rvo_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 802 <field id="vort_pvo_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 803 <field id="vort_ldf_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 804 <field id="vort_zad_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 805 <field id="vort_zdf_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 806 <field id="vort_spg_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 807 <field id="vort_swf_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 808 <field id="vort_bfr_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 809 <field id="vort_prg_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 810 <field id="vort_keg_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 811 <field id="vort_rvo_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 812 <field id="vort_pvo_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 813 <field id="vort_ldf_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 814 <field id="vort_zad_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 815 <field id="vort_zdf_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 816 <field id="vort_spg_int" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 817 <!-- <field id="vort_swf_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> 818 <field id="vort_bfr_avg" long_name="curl(vertical avg) vort trend: internal pressure gradient" unit="m/s^2" /> --> 794 819 </field_group> 795 820 -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/grid_def_nemo.xml
r9930 r10810 35 35 </grid> 36 36 <!-- --> 37 <grid id="grid_F_2D" > 38 <domain id="grid_F" /> 39 </grid> 40 <!-- --> 37 41 <grid id="grid_W_2D" > 38 42 <domain id="grid_W" /> -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/IOM/iom.F90
r10032 r10810 153 153 CALL set_grid( "U", glamu, gphiu, .FALSE., .FALSE. ) 154 154 CALL set_grid( "V", glamv, gphiv, .FALSE., .FALSE. ) 155 CALL set_grid( "F", glamf, gphif, .FALSE., .FALSE. ) 155 156 CALL set_grid( "W", glamt, gphit, .FALSE., .FALSE. ) 156 157 CALL set_grid_znl( gphit ) … … 160 161 CALL iom_set_domain_attr("grid_U", area = e1e2u(nldi:nlei, nldj:nlej)) 161 162 CALL iom_set_domain_attr("grid_V", area = e1e2v(nldi:nlei, nldj:nlej)) 163 CALL iom_set_domain_attr("grid_F", area = e1e2f(nldi:nlei, nldj:nlej)) 162 164 CALL iom_set_domain_attr("grid_W", area = e1e2t(nldi:nlei, nldj:nlej)) 163 165 CALL set_grid_bounds( "T", glamf, gphif, glamt, gphit ) 164 166 CALL set_grid_bounds( "U", glamv, gphiv, glamu, gphiu ) 165 167 CALL set_grid_bounds( "V", glamu, gphiu, glamv, gphiv ) 168 CALL set_grid_bounds( "F", glamt, gphit, glamf, gphif ) 166 169 CALL set_grid_bounds( "W", glamf, gphif, glamt, gphit ) 167 170 ENDIF … … 174 177 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. ) 175 178 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. ) 179 CALL set_grid( "F", glamf_crs, gphif_crs, .FALSE., .FALSE. ) 176 180 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 177 181 CALL set_grid_znl( gphit_crs ) … … 183 187 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej)) 184 188 CALL iom_set_domain_attr("grid_V", area = e1v_crs(nldi:nlei, nldj:nlej) * e2v_crs(nldi:nlei, nldj:nlej)) 189 CALL iom_set_domain_attr("grid_F", area = e1f_crs(nldi:nlei, nldj:nlej) * e2f_crs(nldi:nlei, nldj:nlej)) 185 190 CALL iom_set_domain_attr("grid_W", area = e1e2t_crs(nldi:nlei, nldj:nlej)) 186 191 CALL set_grid_bounds( "T", glamf_crs, gphif_crs, glamt_crs, gphit_crs ) 187 192 CALL set_grid_bounds( "U", glamv_crs, gphiv_crs, glamu_crs, gphiu_crs ) 188 193 CALL set_grid_bounds( "V", glamu_crs, gphiu_crs, glamv_crs, gphiv_crs ) 194 CALL set_grid_bounds( "F", glamt_crs, gphit_crs, glamf_crs, gphif_crs ) 189 195 CALL set_grid_bounds( "W", glamf_crs, gphif_crs, glamt_crs, gphit_crs ) 190 196 ENDIF -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdini.F90
r9950 r10810 87 87 88 88 !!gm end 89 IF( ln_tra_mxl .OR. ln_vor_trd ) CALL ctl_stop( 'ML tracer and Barotropic vorticity diags are still using old IOIPSL' )89 !!$ IF( ln_tra_mxl .OR. ln_vor_trd ) CALL ctl_stop( 'ML tracer and Barotropic vorticity diags are still using old IOIPSL' ) 90 90 !!gm end 91 91 ! -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor.F90
r9950 r10810 25 25 ! 26 26 USE in_out_manager ! I/O manager 27 USE io ipsl ! NetCDF library27 USE iom ! I/O 28 28 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 29 29 USE lib_mpp ! MPP library … … 51 51 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrtot ! 52 52 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrres ! 53 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,: ) :: vortrd ! curl of trends53 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:) :: vortrd ! curl of trends 54 54 55 55 CHARACTER(len=12) :: cvort … … 70 70 ALLOCATE( vor_avr (jpi,jpj) , vor_avrb(jpi,jpj) , vor_avrbb (jpi,jpj) , & 71 71 & vor_avrbn (jpi,jpj) , rotot (jpi,jpj) , vor_avrtot(jpi,jpj) , & 72 & vor_avrres(jpi,jpj) , vortrd (jpi,jpj,jpltot_vor ) ,&72 & vor_avrres(jpi,jpj) , vortrd (jpi,jpj,jpltot_vor,jpltype_vor) , & 73 73 & ndexvor1 (jpi*jpj) , STAT= trd_vor_alloc ) 74 74 ! … … 193 193 DO ji = 1, jpim1 194 194 DO jj = 1, jpjm1 195 vortrd(ji,jj,ktrd ) = ( zvdpvor(ji+1,jj) - zvdpvor(ji,jj) &196 & - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) )195 vortrd(ji,jj,ktrd,jptype_vor_avg) = ( zvdpvor(ji+1,jj) - zvdpvor(ji,jj) & 196 & - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 197 197 END DO 198 198 END DO 199 vortrd(:,:,ktrd ) = vortrd(:,:,ktrd) * fmask(:,:,1) ! Surface mask199 vortrd(:,:,ktrd,jptype_vor_avg) = vortrd(:,:,ktrd,jptype_vor_avg) * fmask(:,:,1) ! Surface mask 200 200 201 201 IF( ndebug /= 0 ) THEN … … 217 217 !! 218 218 !! ** Action : trends : 219 !! vortrd (,,1) = Pressure Gradient Trend 220 !! vortrd (,,2) = KE Gradient Trend 221 !! vortrd (,,3) = Relative Vorticity Trend 222 !! vortrd (,,4) = Coriolis Term Trend 223 !! vortrd (,,5) = Horizontal Diffusion Trend 224 !! vortrd (,,6) = Vertical Advection Trend 225 !! vortrd (,,7) = Vertical Diffusion Trend 226 !! vortrd (,,8) = Surface Pressure Grad. Trend 227 !! vortrd (,,9) = Beta V 228 !! vortrd (,,10) = forcing term 229 !! vortrd (,,11) = bottom friction term 219 !! vortrd (,,1,) = Pressure Gradient Trend 220 !! vortrd (,,2,) = KE Gradient Trend 221 !! vortrd (,,3,) = Relative Vorticity Trend 222 !! vortrd (,,4,) = Coriolis Term Trend 223 !! vortrd (,,5,) = Horizontal Diffusion Trend 224 !! vortrd (,,6,) = Vertical Advection Trend 225 !! vortrd (,,7,) = Vertical Diffusion Trend 226 !! vortrd (,,8,) = Surface Pressure Grad. Trend 227 !! vortrd (,,9,) = forcing term 228 !! vortrd (,,10,) = bottom friction term 230 229 !! rotot(,) : total cumulative trends over nwrite-1 time steps 231 230 !! vor_avrtot(,) : first membre of vrticity equation … … 240 239 ! 241 240 INTEGER :: ji, jj, jk ! dummy loop indices 242 REAL(wp), DIMENSION(jpi,jpj) :: zubet , zvbet ! Beta.V243 241 REAL(wp), DIMENSION(jpi,jpj) :: zudpvor, zvdpvor ! total cmulative trends 244 242 !!---------------------------------------------------------------------- 245 243 246 244 ! Initialization 247 zubet (:,:) = 0._wp248 zvbet (:,:) = 0._wp249 245 zudpvor(:,:) = 0._wp 250 246 zvdpvor(:,:) = 0._wp … … 261 257 END DO 262 258 263 ! Planetary vorticity: 2nd computation (Beta.V term) store the vertical sum 264 ! as Beta.V term need intergration, not average 265 IF( ktrd == jpvor_pvo ) THEN 266 zubet(:,:) = zudpvor(:,:) 267 zvbet(:,:) = zvdpvor(:,:) 268 DO ji = 1, jpim1 269 DO jj = 1, jpjm1 270 vortrd(ji,jj,jpvor_bev) = ( zvbet(ji+1,jj) - zvbet(ji,jj) & 271 & - ( zubet(ji,jj+1) - zubet(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 272 END DO 259 ! Curl(vertical integral)/H diagnostics: 260 ! Curl: 261 DO ji = 1, jpim1 262 DO jj = 1, jpjm1 263 vortrd(ji,jj,ktrd,jptype_vor_int) = ( zvdpvor(ji+1,jj) - zvdpvor(ji,jj) & 264 & - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 273 265 END DO 274 ! Average of the Curl and Surface mask 275 vortrd(:,:,jpvor_bev) = vortrd(:,:,jpvor_bev) * r1_hu_n(:,:) * fmask(:,:,1) 276 ENDIF 277 ! 278 ! Average 266 END DO 267 ! Average of the Curl and Surface mask: 268 vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hu_n(:,:) * fmask(:,:,1) 269 ! 270 ! Curl(vertical mean) diagnostics: 271 ! Average: 279 272 zudpvor(:,:) = zudpvor(:,:) * r1_hu_n(:,:) 280 273 zvdpvor(:,:) = zvdpvor(:,:) * r1_hv_n(:,:) 281 274 ! 282 ! Curl 275 ! Curl: 283 276 DO ji=1,jpim1 284 277 DO jj=1,jpjm1 285 vortrd(ji,jj,ktrd ) = ( zvdpvor(ji+1,jj) - zvdpvor(ji,jj) &286 & - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) )278 vortrd(ji,jj,ktrd,jptype_vor_avg) = ( zvdpvor(ji+1,jj) - zvdpvor(ji,jj) & 279 & - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 287 280 END DO 288 281 END DO 289 ! Surface mask 290 vortrd(:,:,ktrd ) = vortrd(:,:,ktrd) * fmask(:,:,1)282 ! Surface mask: 283 vortrd(:,:,ktrd,jptype_vor_avg) = vortrd(:,:,ktrd,jptype_vor_avg) * fmask(:,:,1) 291 284 292 285 IF( ndebug /= 0 ) THEN … … 318 311 319 312 320 ! I.1 set before values of vertically average u and v321 ! ---------------------------------------------------322 323 IF( kt > nit000 ) vor_avrb(:,:) = vor_avr(:,:)324 325 ! I.2 vertically integrated vorticity326 ! ----------------------------------327 328 vor_avr (:,:) = 0._wp329 zun (:,:) = 0._wp330 zvn (:,:) = 0._wp331 vor_avrtot(:,:) = 0._wp332 vor_avrres(:,:) = 0._wp333 334 ! Vertically averaged velocity335 DO jk = 1, jpk - 1336 zun(:,:) = zun(:,:) + e1u(:,:) * un(:,:,jk) * e3u_n(:,:,jk)337 zvn(:,:) = zvn(:,:) + e2v(:,:) * vn(:,:,jk) * e3v_n(:,:,jk)338 END DO339 340 zun(:,:) = zun(:,:) * r1_hu_n(:,:)341 zvn(:,:) = zvn(:,:) * r1_hv_n(:,:)342 343 ! Curl344 DO ji = 1, jpim1345 DO jj = 1, jpjm1346 vor_avr(ji,jj) = ( ( zvn(ji+1,jj) - zvn(ji,jj) ) &347 & - ( zun(ji,jj+1) - zun(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) * fmask(ji,jj,1)348 END DO349 END DO350 351 ! =================================352 ! II. Cumulated trends353 ! =================================354 355 ! II.1 set `before' mixed layer values for kt = nit000+1356 ! ------------------------------------------------------357 IF( kt == nit000+1 ) THEN358 vor_avrbb(:,:) = vor_avrb(:,:)359 vor_avrbn(:,:) = vor_avr (:,:)360 ENDIF361 362 ! II.2 cumulated trends over analysis period (kt=2 to nwrite)363 ! ----------------------364 ! trends cumulated over nwrite-2 time steps365 366 IF( kt >= nit000+2 ) THEN367 nmoydpvor = nmoydpvor + 1368 DO jl = 1, jpltot_vor369 IF( jl /= 9 ) THEN370 rotot(:,:) = rotot(:,:) + vortrd(:,:,jl)371 ENDIF372 END DO373 ENDIF374 375 ! =============================================376 ! III. Output in netCDF + residual computation377 ! =============================================378 379 ! define time axis380 it = kt381 itmod = kt - nit000 + 1382 383 IF( MOD( it, nn_trd ) == 0 ) THEN384 385 ! III.1 compute total trend386 ! ------------------------387 zmean = 1._wp / ( REAL( nmoydpvor, wp ) * 2._wp * rdt )388 vor_avrtot(:,:) = ( vor_avr(:,:) - vor_avrbn(:,:) + vor_avrb(:,:) - vor_avrbb(:,:) ) * zmean389 390 391 ! III.2 compute residual392 ! ---------------------393 zmean = 1._wp / REAL( nmoydpvor, wp )394 vor_avrres(:,:) = vor_avrtot(:,:) - rotot(:,:) / zmean395 396 ! Boundary conditions397 CALL lbc_lnk_multi( vor_avrtot, 'F', 1. , vor_avrres, 'F', 1. )398 399 400 ! III.3 time evolution array swap401 ! ------------------------------402 vor_avrbb(:,:) = vor_avrb(:,:)403 vor_avrbn(:,:) = vor_avr (:,:)404 !405 nmoydpvor = 0406 !407 ENDIF313 !!$ ! I.1 set before values of vertically average u and v 314 !!$ ! --------------------------------------------------- 315 !!$ 316 !!$ IF( kt > nit000 ) vor_avrb(:,:) = vor_avr(:,:) 317 !!$ 318 !!$ ! I.2 vertically integrated vorticity 319 !!$ ! ---------------------------------- 320 !!$ 321 !!$ vor_avr (:,:) = 0._wp 322 !!$ zun (:,:) = 0._wp 323 !!$ zvn (:,:) = 0._wp 324 !!$ vor_avrtot(:,:) = 0._wp 325 !!$ vor_avrres(:,:) = 0._wp 326 !!$ 327 !!$ ! Vertically averaged velocity 328 !!$ DO jk = 1, jpk - 1 329 !!$ zun(:,:) = zun(:,:) + e1u(:,:) * un(:,:,jk) * e3u_n(:,:,jk) 330 !!$ zvn(:,:) = zvn(:,:) + e2v(:,:) * vn(:,:,jk) * e3v_n(:,:,jk) 331 !!$ END DO 332 !!$ 333 !!$ zun(:,:) = zun(:,:) * r1_hu_n(:,:) 334 !!$ zvn(:,:) = zvn(:,:) * r1_hv_n(:,:) 335 !!$ 336 !!$ ! Curl 337 !!$ DO ji = 1, jpim1 338 !!$ DO jj = 1, jpjm1 339 !!$ vor_avr(ji,jj) = ( ( zvn(ji+1,jj) - zvn(ji,jj) ) & 340 !!$ & - ( zun(ji,jj+1) - zun(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) * fmask(ji,jj,1) 341 !!$ END DO 342 !!$ END DO 343 !!$ 344 !!$ ! ================================= 345 !!$ ! II. Cumulated trends 346 !!$ ! ================================= 347 !!$ 348 !!$ ! II.1 set `before' mixed layer values for kt = nit000+1 349 !!$ ! ------------------------------------------------------ 350 !!$ IF( kt == nit000+1 ) THEN 351 !!$ vor_avrbb(:,:) = vor_avrb(:,:) 352 !!$ vor_avrbn(:,:) = vor_avr (:,:) 353 !!$ ENDIF 354 !!$ 355 !!$ ! II.2 cumulated trends over analysis period (kt=2 to nwrite) 356 !!$ ! ---------------------- 357 !!$ ! trends cumulated over nwrite-2 time steps 358 !!$ 359 !!$ IF( kt >= nit000+2 ) THEN 360 !!$ nmoydpvor = nmoydpvor + 1 361 !!$ DO jl = 1, jpltot_vor 362 !!$ IF( jl /= 9 ) THEN 363 !!$ rotot(:,:) = rotot(:,:) + vortrd(:,:,jl) 364 !!$ ENDIF 365 !!$ END DO 366 !!$ ENDIF 367 !!$ 368 !!$ ! ============================================= 369 !!$ ! III. Output in netCDF + residual computation 370 !!$ ! ============================================= 371 !!$ 372 !!$ ! define time axis 373 !!$ it = kt 374 !!$ itmod = kt - nit000 + 1 375 !!$ 376 !!$ IF( MOD( it, nn_trd ) == 0 ) THEN 377 !!$ 378 !!$ ! III.1 compute total trend 379 !!$ ! ------------------------ 380 !!$ zmean = 1._wp / ( REAL( nmoydpvor, wp ) * 2._wp * rdt ) 381 !!$ vor_avrtot(:,:) = ( vor_avr(:,:) - vor_avrbn(:,:) + vor_avrb(:,:) - vor_avrbb(:,:) ) * zmean 382 !!$ 383 !!$ 384 !!$ ! III.2 compute residual 385 !!$ ! --------------------- 386 !!$ zmean = 1._wp / REAL( nmoydpvor, wp ) 387 !!$ vor_avrres(:,:) = vor_avrtot(:,:) - rotot(:,:) / zmean 388 !!$ 389 !!$ ! Boundary conditions 390 !!$ CALL lbc_lnk_multi( vor_avrtot, 'F', 1. , vor_avrres, 'F', 1. ) 391 !!$ 392 !!$ 393 !!$ ! III.3 time evolution array swap 394 !!$ ! ------------------------------ 395 !!$ vor_avrbb(:,:) = vor_avrb(:,:) 396 !!$ vor_avrbn(:,:) = vor_avr (:,:) 397 !!$ ! 398 !!$ nmoydpvor = 0 399 !!$ ! 400 !!$ ENDIF 408 401 409 402 ! III.4 write trends to output … … 412 405 IF( kt >= nit000+1 ) THEN 413 406 414 IF( lwp .AND. MOD( itmod, nn_trd ) == 0 ) THEN 415 WRITE(numout,*) '' 416 WRITE(numout,*) 'trd_vor : write trends in the NetCDF file at kt = ', kt 417 WRITE(numout,*) '~~~~~~~ ' 418 ENDIF 419 420 CALL histwrite( nidvor,"sovortPh",it,vortrd(:,:,jpvor_prg),ndimvor1,ndexvor1) ! grad Ph 421 CALL histwrite( nidvor,"sovortEk",it,vortrd(:,:,jpvor_keg),ndimvor1,ndexvor1) ! Energy 422 CALL histwrite( nidvor,"sovozeta",it,vortrd(:,:,jpvor_rvo),ndimvor1,ndexvor1) ! rel vorticity 423 CALL histwrite( nidvor,"sovortif",it,vortrd(:,:,jpvor_pvo),ndimvor1,ndexvor1) ! coriolis 424 CALL histwrite( nidvor,"sovodifl",it,vortrd(:,:,jpvor_ldf),ndimvor1,ndexvor1) ! lat diff 425 CALL histwrite( nidvor,"sovoadvv",it,vortrd(:,:,jpvor_zad),ndimvor1,ndexvor1) ! vert adv 426 CALL histwrite( nidvor,"sovodifv",it,vortrd(:,:,jpvor_zdf),ndimvor1,ndexvor1) ! vert diff 427 CALL histwrite( nidvor,"sovortPs",it,vortrd(:,:,jpvor_spg),ndimvor1,ndexvor1) ! grad Ps 428 CALL histwrite( nidvor,"sovortbv",it,vortrd(:,:,jpvor_bev),ndimvor1,ndexvor1) ! beta.V 429 CALL histwrite( nidvor,"sovowind",it,vortrd(:,:,jpvor_swf),ndimvor1,ndexvor1) ! wind stress 430 CALL histwrite( nidvor,"sovobfri",it,vortrd(:,:,jpvor_bfr),ndimvor1,ndexvor1) ! bottom friction 431 CALL histwrite( nidvor,"1st_mbre",it,vor_avrtot ,ndimvor1,ndexvor1) ! First membre 432 CALL histwrite( nidvor,"sovorgap",it,vor_avrres ,ndimvor1,ndexvor1) ! gap between 1st and 2 nd mbre 433 ! 434 IF( ndebug /= 0 ) THEN 435 WRITE(numout,*) ' debuging trd_vor: III.4 done' 436 CALL FLUSH(numout) 437 ENDIF 407 IF( iom_use("vort_prg_avg") ) CALL iom_put("vort_prg_avg",vortrd(:,:,jpvor_prg,jptype_vor_avg)) 408 IF( iom_use("vort_keg_avg") ) CALL iom_put("vort_keg_avg",vortrd(:,:,jpvor_keg,jptype_vor_avg)) 409 IF( iom_use("vort_rvo_avg") ) CALL iom_put("vort_rvo_avg",vortrd(:,:,jpvor_rvo,jptype_vor_avg)) 410 IF( iom_use("vort_pvo_avg") ) CALL iom_put("vort_pvo_avg",vortrd(:,:,jpvor_pvo,jptype_vor_avg)) 411 IF( iom_use("vort_ldf_avg") ) CALL iom_put("vort_ldf_avg",vortrd(:,:,jpvor_ldf,jptype_vor_avg)) 412 IF( iom_use("vort_zad_avg") ) CALL iom_put("vort_zad_avg",vortrd(:,:,jpvor_zad,jptype_vor_avg)) 413 IF( iom_use("vort_zdf_avg") ) CALL iom_put("vort_zdf_avg",vortrd(:,:,jpvor_zdf,jptype_vor_avg)) 414 IF( iom_use("vort_spg_avg") ) CALL iom_put("vort_spg_avg",vortrd(:,:,jpvor_spg,jptype_vor_avg)) 415 IF( iom_use("vort_swf_avg") ) CALL iom_put("vort_swf_avg",vortrd(:,:,jpvor_swf,jptype_vor_avg)) 416 IF( iom_use("vort_bfr_avg") ) CALL iom_put("vort_bfr_avg",vortrd(:,:,jpvor_bfr,jptype_vor_avg)) 417 418 IF( iom_use("vort_prg_int") ) CALL iom_put("vort_prg_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 419 IF( iom_use("vort_keg_int") ) CALL iom_put("vort_keg_int",vortrd(:,:,jpvor_keg,jptype_vor_int)) 420 IF( iom_use("vort_rvo_int") ) CALL iom_put("vort_rvo_int",vortrd(:,:,jpvor_rvo,jptype_vor_int)) 421 IF( iom_use("vort_pvo_int") ) CALL iom_put("vort_pvo_int",vortrd(:,:,jpvor_pvo,jptype_vor_int)) 422 IF( iom_use("vort_ldf_int") ) CALL iom_put("vort_ldf_int",vortrd(:,:,jpvor_ldf,jptype_vor_int)) 423 IF( iom_use("vort_zad_int") ) CALL iom_put("vort_zad_int",vortrd(:,:,jpvor_zad,jptype_vor_int)) 424 IF( iom_use("vort_zdf_int") ) CALL iom_put("vort_zdf_int",vortrd(:,:,jpvor_zdf,jptype_vor_int)) 425 IF( iom_use("vort_spg_int") ) CALL iom_put("vort_spg_int",vortrd(:,:,jpvor_spg,jptype_vor_int)) 426 !!$ IF( iom_use("vort_swf_int") ) CALL iom_put("vort_swf_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 427 !!$ IF( iom_use("vort_bfr_int") ) CALL iom_put("vort_bfr_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 438 428 ! 439 429 ENDIF 440 430 ! 441 IF( MOD( it, nn_trd ) == 0 ) rotot(:,:)=0 442 ! 443 IF( kt == nitend ) CALL histclo( nidvor ) 431 !!$ IF( MOD( it, nn_trd ) == 0 ) rotot(:,:)=0 444 432 ! 445 433 END SUBROUTINE trd_vor_iom … … 452 440 !! ** Purpose : computation of vertically integrated T and S budgets 453 441 !! from ocean surface down to control surface (NetCDF output) 454 !!----------------------------------------------------------------------455 REAL(wp) :: zjulian, zsto, zout456 CHARACTER (len=40) :: clhstnam457 CHARACTER (len=40) :: clop458 442 !!---------------------------------------------------------------------- 459 443 … … 481 465 IF( trd_vor_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'trd_vor_init : unable to allocate trdvor arrays' ) 482 466 467 vortrd(:,:,:,:) = 0.0 483 468 484 469 ! cumulated trends array init … … 493 478 ENDIF 494 479 495 ! =================================496 ! II. netCDF output initialization497 ! =================================498 499 !-----------------------------------------500 ! II.1 Define frequency of output and means501 ! -----------------------------------------502 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!)503 ELSE ; clop = "x" ! no use of the mask value (require less cpu time)504 ENDIF505 #if defined key_diainstant506 zsto = nwrite*rdt507 clop = "inst("//TRIM(clop)//")"508 #else509 zsto = rdt510 clop = "ave("//TRIM(clop)//")"511 #endif512 zout = nn_trd*rdt513 514 IF(lwp) WRITE(numout,*) ' netCDF initialization'515 516 ! II.2 Compute julian date from starting date of the run517 ! ------------------------518 CALL ymds2ju( nyear, nmonth, nday, rdt, zjulian )519 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment520 IF(lwp) WRITE(numout,*)' '521 IF(lwp) WRITE(numout,*)' Date 0 used :',nit000, &522 & ' YEAR ', nyear,' MONTH ' , nmonth, &523 & ' DAY ' , nday, 'Julian day : ', zjulian524 525 ! II.3 Define the T grid trend file (nidvor)526 ! ---------------------------------527 CALL dia_nam( clhstnam, nn_trd, 'vort' ) ! filename528 IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam529 CALL histbeg( clhstnam, jpi, glamf, jpj, gphif,1, jpi, & ! Horizontal grid : glamt and gphit530 & 1, jpj, nit000-1, zjulian, rdt, nh_t, nidvor, domain_id=nidom, snc4chunks=snc4set )531 CALL wheneq( jpi*jpj, fmask, 1, 1., ndexvor1, ndimvor1 ) ! surface532 533 ! Declare output fields as netCDF variables534 CALL histdef( nidvor, "sovortPh", cvort//"grad Ph" , "s-2", & ! grad Ph535 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)536 CALL histdef( nidvor, "sovortEk", cvort//"Energy", "s-2", & ! Energy537 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)538 CALL histdef( nidvor, "sovozeta", cvort//"rel vorticity", "s-2", & ! rel vorticity539 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)540 CALL histdef( nidvor, "sovortif", cvort//"coriolis", "s-2", & ! coriolis541 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)542 CALL histdef( nidvor, "sovodifl", cvort//"lat diff ", "s-2", & ! lat diff543 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)544 CALL histdef( nidvor, "sovoadvv", cvort//"vert adv", "s-2", & ! vert adv545 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)546 CALL histdef( nidvor, "sovodifv", cvort//"vert diff" , "s-2", & ! vert diff547 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)548 CALL histdef( nidvor, "sovortPs", cvort//"grad Ps", "s-2", & ! grad Ps549 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)550 CALL histdef( nidvor, "sovortbv", cvort//"Beta V", "s-2", & ! beta.V551 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)552 CALL histdef( nidvor, "sovowind", cvort//"wind stress", "s-2", & ! wind stress553 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)554 CALL histdef( nidvor, "sovobfri", cvort//"bottom friction", "s-2", & ! bottom friction555 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)556 CALL histdef( nidvor, "1st_mbre", cvort//"1st mbre", "s-2", & ! First membre557 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)558 CALL histdef( nidvor, "sovorgap", cvort//"gap", "s-2", & ! gap between 1st and 2 nd mbre559 & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)560 CALL histend( nidvor, snc4set )561 562 IF( ndebug /= 0 ) THEN563 WRITE(numout,*) ' debuging trd_vor_init: II. done'564 CALL FLUSH(numout)565 ENDIF566 480 ! 567 481 END SUBROUTINE trd_vor_init -
NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor_oce.F90
r9950 r10810 13 13 14 14 ! !!* vorticity trends index 15 INTEGER, PUBLIC, PARAMETER :: jpltot_vor = 11 !: Number of vorticity trend terms 15 INTEGER, PUBLIC, PARAMETER :: jpltot_vor = 10 !: Number of vorticity trend terms 16 INTEGER, PUBLIC, PARAMETER :: jpltype_vor = 2 !: Number of of types of vorticity trend 17 ! 18 INTEGER, PUBLIC, PARAMETER :: jptype_vor_avg = 1 !: curl(vertical average) 19 INTEGER, PUBLIC, PARAMETER :: jptype_vor_int = 2 !: curl(vertical integral)/H 16 20 ! 17 21 INTEGER, PUBLIC, PARAMETER :: jpvor_prg = 1 !: Pressure Gradient Trend … … 23 27 INTEGER, PUBLIC, PARAMETER :: jpvor_zdf = 7 !: Vertical Diffusion Trend 24 28 INTEGER, PUBLIC, PARAMETER :: jpvor_spg = 8 !: Surface Pressure Grad. Trend 25 INTEGER, PUBLIC, PARAMETER :: jpvor_bev = 9 !: Beta V 26 INTEGER, PUBLIC, PARAMETER :: jpvor_swf = 10 !: wind stress forcing term 27 INTEGER, PUBLIC, PARAMETER :: jpvor_bfr = 11 !: bottom friction term 28 29 INTEGER, PUBLIC, PARAMETER :: jpvor_swf = 9 !: wind stress forcing term 30 INTEGER, PUBLIC, PARAMETER :: jpvor_bfr = 10 !: bottom friction term 31 ! 29 32 !!---------------------------------------------------------------------- 30 33 !! NEMO/OCE 4.0 , NEMO Consortium (2018)
Note: See TracChangeset
for help on using the changeset viewer.