Skip to content

Commit 1a4c4d5

Browse files
committed
Compute temperature and spechum at output times via diagnostics
1 parent 6fa6540 commit 1a4c4d5

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/core_atmosphere/Registry.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,8 +1767,7 @@
17671767
description="Relative humidity"/>
17681768

17691769
<var name="spechum" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
1770-
description="Specific humidity"
1771-
packages="jedi_da"/>
1770+
description="Specific humidity"/>
17721771

17731772
<var name="v" type="real" dimensions="nVertLevels nEdges Time" units="m s^{-1}"
17741773
description="Horizontal tangential velocity at edges"/>

src/core_atmosphere/diagnostics/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ DIAGNOSTIC_MODULES = \
1010
mpas_convective_diagnostics.o \
1111
mpas_pv_diagnostics.o \
1212
mpas_soundings.o \
13+
mpas_modellevel_diagnostics.o \
1314

1415
mpas_isobaric_diagnostics.o: mpas_atm_diagnostics_utils.o
1516

@@ -21,6 +22,7 @@ mpas_pv_diagnostics.o: mpas_atm_diagnostics_utils.o
2122

2223
mpas_soundings.o:
2324

25+
mpas_modellevel_diagnostics.o: mpas_atm_diagnostics_utils.o
2426

2527
################### Generally no need to modify below here ###################
2628

src/core_atmosphere/diagnostics/Registry_diagnostics.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<!-- soundings -->
2020
#include "Registry_soundings.xml"
2121

22+
<!-- additional model-level diagnostics -->
23+
#include "Registry_modellevel.xml"
24+
2225
<!-- ******************************* -->
2326
<!-- End includes from diagnostics -->
2427
<!-- ******************************* -->

src/core_atmosphere/diagnostics/mpas_atm_diagnostics_manager.F

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ subroutine mpas_atm_diag_setup(stream_mgr, configs, structs, clock, dminfo)
3838
use mpas_convective_diagnostics, only : convective_diagnostics_setup
3939
use mpas_pv_diagnostics, only : pv_diagnostics_setup
4040
use mpas_soundings, only : soundings_setup
41+
use mpas_modellevel_diagnostics, only : modellevel_diagnostics_setup
4142

4243
implicit none
4344

@@ -59,6 +60,7 @@ subroutine mpas_atm_diag_setup(stream_mgr, configs, structs, clock, dminfo)
5960
call convective_diagnostics_setup(structs, clock)
6061
call pv_diagnostics_setup(structs, clock)
6162
call soundings_setup(configs, structs, clock, dminfo)
63+
call modellevel_diagnostics_setup(structs, clock)
6264

6365
end subroutine mpas_atm_diag_setup
6466

@@ -105,6 +107,7 @@ subroutine mpas_atm_diag_compute()
105107
use mpas_convective_diagnostics, only : convective_diagnostics_compute
106108
use mpas_pv_diagnostics, only : pv_diagnostics_compute
107109
use mpas_soundings, only : soundings_compute
110+
use mpas_modellevel_diagnostics, only : modellevel_diagnostics_compute
108111

109112
implicit none
110113

@@ -115,6 +118,7 @@ subroutine mpas_atm_diag_compute()
115118
call convective_diagnostics_compute()
116119
call pv_diagnostics_compute()
117120
call soundings_compute()
121+
call modellevel_diagnostics_compute()
118122

119123
end subroutine mpas_atm_diag_compute
120124

src/core_atmosphere/mpas_atm_core.F

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@ subroutine atm_compute_output_diagnostics(state, time_lev, diag, mesh)
918918
integer, pointer :: nCells, nVertLevels, index_qv
919919
real (kind=RKIND), dimension(:,:), pointer :: theta, rho, theta_m, rho_zz, zz
920920
real (kind=RKIND), dimension(:,:), pointer :: pressure_base, pressure_p, pressure
921-
real (kind=RKIND), dimension(:,:), pointer :: exner, temperature
922921
real (kind=RKIND), dimension(:,:,:), pointer :: scalars
923922

924923
call mpas_pool_get_dimension(mesh, 'nCells', nCells)
@@ -934,8 +933,6 @@ subroutine atm_compute_output_diagnostics(state, time_lev, diag, mesh)
934933
call mpas_pool_get_array(diag, 'pressure_p', pressure_p)
935934
call mpas_pool_get_array(diag, 'pressure_base', pressure_base)
936935
call mpas_pool_get_array(diag, 'pressure', pressure)
937-
call mpas_pool_get_array(diag, 'exner', exner)
938-
call mpas_pool_get_array(diag, 'temperature', temperature)
939936

940937
call mpas_pool_get_array(mesh, 'zz', zz)
941938

@@ -944,7 +941,6 @@ subroutine atm_compute_output_diagnostics(state, time_lev, diag, mesh)
944941
theta(k,iCell) = theta_m(k,iCell) / (1._RKIND + rvord * scalars(index_qv,k,iCell))
945942
rho(k,iCell) = rho_zz(k,iCell) * zz(k,iCell)
946943
pressure(k,iCell) = pressure_base(k,iCell) + pressure_p(k,iCell)
947-
temperature(k,iCell) = theta(k,iCell) * exner(k,iCell)
948944
end do
949945
end do
950946

0 commit comments

Comments
 (0)