Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions tools/fv_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,8 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref)
'100-m AGL u-wind', 'm/s', missing_value=missing_value )
id_v100m = register_diag_field ( trim(field), 'v100m', axes(1:2), Time, &
'100-m AGL v-wind', 'm/s', missing_value=missing_value )
id_wind100m = register_diag_field ( trim(field), 'wind100m', axes(1:2), Time, &
'100-m AGL windspeed', 'm/s', missing_value=missing_value )
!--------------------------
! relative humidity (physics definition):
!--------------------------
Expand Down Expand Up @@ -3089,7 +3091,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
used=send_data(id_pmaskv2, a2, Time)
endif

if ( id_u100m>0 .or. id_v100m>0 .or. id_w100m>0 .or. id_w5km>0 .or. id_w2500m>0 &
if ( id_u100m>0 .or. id_v100m>0 .or. id_wind100m>0 .or. id_w100m>0 .or. id_w5km>0 .or. id_w2500m>0 &
& .or. id_w1km>0 .or. id_basedbz>0 .or. id_dbz4km>0) then
if (.not.allocated(wz)) allocate ( wz(isc:iec,jsc:jec,npz+1) )
if ( Atm(n)%flagstruct%hydrostatic) then
Expand Down Expand Up @@ -3150,15 +3152,29 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
used=send_data(id_w100m, a2, Time)
if(prt_minmax) call prt_maxmin('w100m', a2, isc, iec, jsc, jec, 0, 1, 1.)
endif
if ( id_u100m>0 ) then
call interpolate_z(isc, iec, jsc, jec, npz, 100., wz, Atm(n)%ua(isc:iec,jsc:jec,:), a2)
used=send_data(id_u100m, a2, Time)
if(prt_minmax) call prt_maxmin('u100m', a2, isc, iec, jsc, jec, 0, 1, 1.)

if ( id_u100m>0 .or. id_wind100m>0 ) then
call interpolate_z(isc, iec, jsc, jec, npz, 100., wz, Atm(n)%ua(isc:iec,jsc:jec,:), u2)
if (id_u100m>0) then
used=send_data(id_u100m, u2, Time)
if(prt_minmax) call prt_mxm('u100m', u2, isc, iec, jsc, jec, 0, 1, 1., Atm(n)%gridstruct%area_64, Atm(n)%domain)
endif
endif
if ( id_v100m>0 ) then
call interpolate_z(isc, iec, jsc, jec, npz, 100., wz, Atm(n)%va(isc:iec,jsc:jec,:), a2)
used=send_data(id_v100m, a2, Time)
if(prt_minmax) call prt_maxmin('v100m', a2, isc, iec, jsc, jec, 0, 1, 1.)
if ( id_v100m>0 .or. id_wind100m>0 ) then
call interpolate_z(isc, iec, jsc, jec, npz, 100., wz, Atm(n)%va(isc:iec,jsc:jec,:), v2)
if (id_v100m > 0) then
used=send_data(id_v100m, v2, Time)
if(prt_minmax) call prt_mxm('v100m', v2, isc, iec, jsc, jec, 0, 1, 1., Atm(n)%gridstruct%area_64, Atm(n)%domain)
endif
endif
if ( id_wind100m > 0) then
do j=jsc,jec
do i=isc,iec
a2(i,j) = sqrt(u2(i,j)**2 + v2(i,j)**2)
enddo
enddo
used=send_data(id_wind100m, a2, Time)
if(prt_minmax) call prt_mxm('wind100m', a2, isc, iec, jsc, jec, 0, 1, 1., Atm(n)%gridstruct%area_64, Atm(n)%domain)
endif

if ( rainwat > 0 .and. (id_dbz>0 .or. id_maxdbz>0 .or. id_basedbz>0 .or. id_dbz4km>0 &
Expand Down
2 changes: 1 addition & 1 deletion tools/fv_diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
id_rh300_cmip, id_rh250_cmip, id_rh100_cmip, id_rh50_cmip, id_rh10_cmip

integer :: id_hght3d, id_any_hght
integer :: id_u100m, id_v100m, id_w100m
integer :: id_u100m, id_v100m, id_w100m, id_wind100m

! For initial conditions:
integer ic_ps, ic_ua, ic_va, ic_ppt
Expand Down