Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
6 changes: 6 additions & 0 deletions applications/lfric_atm/metadata/field_def_diags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
<field id="cloud__cloud_amount_maxrnd" name="cloud_amount_maxrnd" long_name="combined_cloud_amount_maximum_random_overlap" standard_name="cloud_area_fraction" unit="1" domain_ref="face" />
<field id="cloud__ceilometer_cloud_amount_maxrnd" name="ceilometer_cloud_amount_maxrnd" long_name="ceilometer_filtered_combined_cloud_amount_maximum_random_overlap" standard_name="cloud_area_fraction" unit="1" domain_ref="face" />
<field id="cloud__cloud_base_altitude" name="cloud_base_altitude" long_name="cloud_base_altitude_asl_combined_cloud_amount_greater_than_2p5_okta" standard_name="cloud_base_altitude" unit="kilofeet" domain_ref="face" />
<field id="cloud__cloud_base_4p5_okta" name="cloud_base_4p5_okta" long_name="cloud_base_altitude_asl_combined_cloud_amount_greater_than_4p5_okta" standard_name="cloud_base_altitude" unit="kilofeet" domain_ref="face" />
<field id="cloud__cloud_top_altitude" name="cloud_top_altitude" long_name="cloud_top_altitude_asl_combined_cloud_amount_greater_than_2p5_okta" standard_name="cloud_top_altitude" unit="kilofeet" domain_ref="face" />
<field id="cloud__very_low_type_cloud_amount" name="very_low_type_cloud_amount" long_name="maximum_combined_cloud_amount_below_111m_asl" unit="1" domain_ref="face" />
<field id="cloud__low_type_cloud_amount" name="low_type_cloud_amount" long_name="maximum_combined_cloud_amount_between_111_and_1949m_asl" standard_name="low_type_cloud_area_fraction" unit="1" domain_ref="face" />
Expand Down Expand Up @@ -537,9 +538,11 @@
<field id="surface__t1p5m" name="t1p5m" long_name="temperature_at_screen_level" unit="K" domain_ref="face" />
<field id="surface__t1p5m_ssi" name="t1p5m_ssi" long_name="temperature_at_screen_level_over_sea_and_sea_ice" unit="K" domain_ref="face" />
<field id="surface__t1p5m_land" name="t1p5m_land" long_name="temperature_at_screen_level_over_land" unit="K" domain_ref="face" />
<field id="surface__t10m_ssi" name="t10m_ssi" long_name="temperature_at_10m_over_sea_and_sea_ice" unit="K" domain_ref="face" />
<field id="surface__q1p5m_surft" name="q1p5m_surft" long_name="land_tile_screen_level_specific_humidity" unit="kg/kg" domain_ref="face" axis_ref="surface_tiles" />
<field id="surface__q1p5m" name="q1p5m" long_name="specific_humidity_at_screen_level" unit="kg kg-1" domain_ref="face" />
<field id="surface__q1p5m_ssi" name="q1p5m_ssi" long_name="specific_humidity_at_screen_level_over_sea_and_sea_ice" unit="kg kg-1" domain_ref="face" />
<field id="surface__q10m_ssi" name="q10m_ssi" long_name="specific_humidity_at_10m_over_sea_and_sea_ice" unit="kg kg-1" domain_ref="face" />
<field id="surface__q1p5m_land" name="q1p5m_land" long_name="specific_humidity_at_screen_level_over_land" unit="kg kg-1" domain_ref="face" />
<field id="surface__qcl1p5m" name="qcl1p5m" long_name="specific_cloud_water_at_screen_level" unit="kg kg-1" domain_ref="face" />
<field id="surface__qcl1p5m_ssi" name="qcl1p5m_ssi" long_name="specific_cloud_water_at_screen_level_over_sea_and_sea_ice" unit="kg kg-1" domain_ref="face" />
Expand All @@ -557,6 +560,8 @@
<field id="surface__vis_prob_5km" name="vis_prob_5km" long_name="probability_visibility_below_5km_at_screen_level" unit="1" domain_ref="face" />
<field id="surface__visibility_no_precip" name="visibility_no_precip" long_name="visibility_excluding precipitation_at_screen_level" standard_name="visibility_in_air" unit="m" domain_ref="face" />
<field id="surface__visibility_with_precip" name="visibility_with_precip" long_name="visibility_including_precipitation_at_screen_level" standard_name="visibility_in_air" unit="m" domain_ref="face" />
<field id="surface__visibility_with_precip_ssi" name="visibility_with_precip_ssi" long_name="visibility_including_precipitation_at_screen_level_over_sea_and_sea_ice" standard_name="visibility_in_air" unit="m" domain_ref="face" />
<field id="surface__visibility_with_precip_land" name="visibility_with_precip_land" long_name="visibility_including_precipitation_at_screen_level_over_land" standard_name="visibility_in_air" unit="m" domain_ref="face" />
<field id="surface__tile_heat_flux" name="tile_heat_flux" long_name="surface_sensible_heat_flux" unit="W m-2" domain_ref="face" axis_ref="surface_tiles" />
<field id="surface__tile_moisture_flux" name="tile_moisture_flux" long_name="surface_moisture_flux" unit="kg m-2 s-1" domain_ref="face" axis_ref="surface_tiles" />
<field id="surface__latent_heat" name="latent_heat" long_name="surface_upward_latent_heat_flux" unit="W m-2" domain_ref="face" axis_ref="surface_tiles" />
Expand Down Expand Up @@ -662,6 +667,7 @@
<field id="turbulence__bl_weight_1dbl" name="bl_weight_1dbl" long_name="Blending_weight_in_boundary_layer" unit="1" domain_ref="face" />
<field id="turbulence__tke" name="tke_bl" long_name="turbulent_kinetic_energy" unit="m2 s-2" grid_ref="full_level_face_grid" />
<field id="turbulence__wvar" name="wvar" long_name="vertical_velocity_variance" unit="m2 s-2" grid_ref="full_level_face_grid" />
<field id="turbulence__thermal_speed" name="thermal_speed" long_name="bl_updraft_thermal_speed" unit="m s-1" domain_ref="face" />
<field id="turbulence__dsldzm" name="dsldzm" long_name="liquid_temperature_gradient" unit="kg m-1" grid_ref="full_level_face_grid" />
<field id="turbulence__mix_len_bm" name="mix_len_bm" long_name="Turb length-scale for bimodal" unit="m" grid_ref="full_level_face_grid" />
<field id="turbulence__gradrinr" name="gradrinr" long_name="gradient_richardson_number" unit="1" grid_ref="full_level_face_grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ contains
type( field_collection_type ), intent(in) :: turbulence_fields
type( field_collection_type ), intent(in) :: convection_fields
type( field_collection_type ), intent(in) :: cloud_fields
type( field_collection_type ), intent(in) :: surface_fields
type( field_collection_type ), intent(inout) :: surface_fields
type( field_collection_type ), intent(in) :: soil_fields
type( field_collection_type ), intent(in) :: snow_fields
type( field_collection_type ), intent(in) :: aerosol_fields
Expand Down Expand Up @@ -219,7 +219,7 @@ contains
! local variables
type(mesh_type), pointer :: mesh
type( field_type ) :: gross_prim_prod, &
z0h_eff, soil_respiration
z0h_eff, soil_respiration, chr10m
type( field_type ) :: mr_ice

integer(i_def) :: stencil_depth, ncells, ncells_halo
Expand Down Expand Up @@ -371,7 +371,7 @@ contains
height_w3 => get_height_fv(modeldb%config, mesh, W3)

call initialise_diags_for_jules_exp(z0h_eff, gross_prim_prod, &
soil_respiration)
soil_respiration, chr10m, mesh)

call zh%copy_field_properties(recip_l_mo_sea)
call zh%copy_field_properties(rhostar)
Expand Down Expand Up @@ -447,11 +447,14 @@ contains
urbhwr, urbhgt, urbztm, urbdisp, &
rhostar, recip_l_mo_sea, &
t1_sd_2d, q1_sd_2d, &
gross_prim_prod, z0h_eff, ocn_cpl_point, &
gross_prim_prod, z0h_eff, chr10m, ocn_cpl_point,&
stencil_depth)

! Switch UM back to columns
call um_sizes_init(1_i_def)
! Add to surface fields collection for passing to implicit jules
call surface_fields%add_field(chr10m)


if ( LPROF ) call stop_timing( id, 'jules.explicit' )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ contains
type( field_type ), pointer :: canhc_tile => null()
type( field_type ), pointer :: ustar => null()
type( field_type ), pointer :: tile_water_extract => null()
type( field_type ), pointer :: chr10m
type( integer_field_type ), pointer :: ocn_cpl_point => null()

type( field_type ), pointer :: soil_temperature => null()
Expand All @@ -161,6 +162,7 @@ contains

type( field_type ) :: rh1p5m, rh1p5m_ssi, rh1p5m_land
type( field_type ) :: t1p5m_surft, q1p5m_surft
type( field_type ) :: t10m_ssi, q10m_ssi
type( field_type ) :: snomlt_surf_htf
type( field_type ) :: soil_evap
type( field_type ) :: soil_surf_ht_flux
Expand Down Expand Up @@ -225,6 +227,7 @@ contains
call surface_fields%get_field('canhc_tile', canhc_tile)
call surface_fields%get_field('ustar', ustar)
call surface_fields%get_field('tile_water_extract', tile_water_extract)
call surface_fields%get_field('chr10m', chr10m)
call surface_fields%get_field('ocn_cpl_point', ocn_cpl_point)

! Soil fields
Expand Down Expand Up @@ -258,6 +261,7 @@ contains
t1p5m, q1p5m, qcl1p5m, rh1p5m, &
t1p5m_ssi, q1p5m_ssi, &
qcl1p5m_ssi, rh1p5m_ssi, &
t10m_ssi, q10m_ssi, &
t1p5m_land, q1p5m_land, &
qcl1p5m_land, rh1p5m_land, &
latent_heat, &
Expand Down Expand Up @@ -301,13 +305,19 @@ contains
t1p5m_surft, q1p5m_surft, t1p5m, &
q1p5m, qcl1p5m, rh1p5m, t1p5m_ssi, &
q1p5m_ssi, qcl1p5m_ssi, rh1p5m_ssi, &
chr10m, t10m_ssi, q10m_ssi, &
t1p5m_land, q1p5m_land, qcl1p5m_land, &
rh1p5m_land, latent_heat, &
snomlt_surf_htf, soil_evap, &
soil_surf_ht_flux, surf_sw_net, &
surf_radnet, surf_lw_up, surf_lw_down,&
ocn_cpl_point) )

! Remove from field collection as we're done for this timestep
if (loop == 2 .and. outer == outer_iterations) then
call surface_fields%remove_field('chr10m')
end if

if ( LPROF ) call stop_timing( id, 'jules.implicit' )

! Output the BL diagnostics
Expand All @@ -320,7 +330,8 @@ contains
t1p5m_surft, q1p5m_surft, &
t1p5m, q1p5m, qcl1p5m, rh1p5m, &
t1p5m_ssi, q1p5m_ssi, qcl1p5m_ssi, &
rh1p5m_ssi, t1p5m_land, q1p5m_land, &
rh1p5m_ssi, t10m_ssi, q10m_ssi, &
t1p5m_land, q1p5m_land, &
qcl1p5m_land, rh1p5m_land, latent_heat, &
snomlt_surf_htf, &
soil_evap, &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ module jules_exp_diags_mod
use integer_field_mod, only: integer_field_type
use timing_mod, only: start_timing, stop_timing, &
tik, LPROF
use initialise_diagnostics_mod, only : init_diag => init_diagnostic_field
use initialise_diagnostics_mod, only : init_diag => init_diagnostic_field, &
samp_diag => diagnostic_to_be_sampled
use empty_data_mod, only : empty_real_data
use extrusion_mod, only: TWOD
use mesh_collection_mod, only: mesh_collection
use mesh_mod, only: mesh_type
use function_space_collection_mod, only: function_space_collection
use function_space_mod, only: function_space_type
use fs_continuity_mod, only: W3

implicit none

Expand All @@ -31,21 +39,38 @@ module jules_exp_diags_mod
!> @param[inout] z0h_eff Gridbox mean effective roughness length for scalars
!> @param[inout] gross_prim_prod Gross Primary Productivity
!> @param[inout] soil_respiration Soil heterotrophic respiration
!> @param[inout] chr10m 10m transfer coefficient
subroutine initialise_diags_for_jules_exp(z0h_eff, gross_prim_prod, &
soil_respiration)
soil_respiration, chr10m, mesh)

implicit none

type( field_type ), intent(inout) :: z0h_eff
type( field_type ), intent(inout) :: gross_prim_prod
type( field_type ), intent(inout) :: soil_respiration
type( field_type ), intent(inout) :: chr10m

type( mesh_type ), intent(in), pointer :: mesh
type(mesh_type), pointer :: twod_mesh
type(function_space_type), pointer :: vector_space

integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'diags.jules_exp' )

z0h_eff_flag = init_diag(z0h_eff, 'surface__z0h_eff')
gross_prim_prod_flag = init_diag(gross_prim_prod, 'surface__gross_prim_prod')
soil_respiration_flag = init_diag(soil_respiration, 'surface__soil_respiration')
! chr10m is required if either t10m_ssi or q10m_ssi are requested
! but needed as an empty field otherwise
twod_mesh => mesh_collection%get_mesh(mesh, TWOD)
vector_space => function_space_collection%get_fs(twod_mesh, 0, 0, W3)
if (samp_diag('surface__t10m_ssi') .or. samp_diag('surface__q10m_ssi')) then
call chr10m%initialise(vector_space, name='chr10m')
else
call chr10m%initialise(vector_space, name='chr10m', &
override_data = empty_real_data)
end if

if ( LPROF ) call stop_timing( id, 'diags.jules_exp' )

Expand Down
Loading