Skip to content

Commit

Permalink
Port delp_dycore diagnostic to public version of SHiELD (#316)
Browse files Browse the repository at this point in the history
* Port delp_dycore diagnostic to public SHiELD

* Guard behind GFS_PHYS; rename to delp_total
  • Loading branch information
spencerkclark authored Jan 25, 2024
1 parent a97d8be commit e3fc72b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/fv_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,10 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref)
! 'Relative Humidity', '%', missing_value=missing_value, range=rhrange )
id_delp = register_diag_field ( trim(field), 'delp', axes(1:3), Time, &
'pressure thickness'//massdef_str, 'pa', missing_value=missing_value )
#ifdef GFS_PHYS
id_delp_total = register_diag_field ( trim(field), 'delp_total', axes(1:3), Time, &
'FV3 pressure thickness (dry air + all water species)', 'pa', missing_value=missing_value )
#endif
if ( .not. Atm(n)%flagstruct%hydrostatic ) &
id_delz = register_diag_field ( trim(field), 'delz', axes(1:3), Time, &
'height thickness', 'm', missing_value=missing_value )
Expand Down Expand Up @@ -3012,7 +3016,6 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
endif
endif


#ifdef GFS_PHYS
if(id_delp > 0 .or. id_cape > 0 .or. id_cin > 0 .or. &
((.not. Atm(n)%flagstruct%hydrostatic) .and. (id_pfnh > 0 .or. id_ppnh > 0)) .or. &
Expand All @@ -3026,6 +3029,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
enddo
if (id_delp > 0) used=send_data(id_delp, wk, Time)
endif
if(id_delp_total > 0) used=send_data(id_delp_total, Atm(n)%delp(isc:iec,jsc:jec,:), Time)
#else
if(id_delp > 0) used=send_data(id_delp, Atm(n)%delp(isc:iec,jsc:jec,:), Time)
#endif
Expand Down
3 changes: 3 additions & 0 deletions tools/fv_diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,7 @@
integer :: id_uw, id_vw
integer :: id_lagrangian_tendency_of_hydrostatic_pressure
integer :: id_t_dt_nudge, id_ps_dt_nudge, id_delp_dt_nudge, id_u_dt_nudge, id_v_dt_nudge
#ifdef GFS_PHYS
integer :: id_delp_total
#endif
#endif _FV_DIAG__

0 comments on commit e3fc72b

Please sign in to comment.