Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SingleMomentSixClassIconGraupelConfig:
#: Whether a fixed latent heat capacities are used for water. Originally defined as ithermo_water in mo_nwp_tuning_config.f90 in ICON (0 means True).
use_constant_latent_heat = True
#: First parameter in RHS of eq. 5.163 in the COSMO microphysics documentation for the sticking efficiency when lstickeff = True (repricated in icon4py because it is always True in ICON). Originally defined as tune_zceff_min in mo_tuning_nwp_config.f90 in ICON.
ice_stickeff_min: ta.wpfloat = 0.075
ice_stickeff_min: ta.wpfloat = 0.01
#: Power law coefficient in v-qi ice terminal velocity-mixing ratio relationship, see eq. 5.169 in the COSMO microphysics documentation. Originally defined as tune_zvz0i in mo_tuning_nwp_config.f90 in ICON.
power_law_coeff_for_ice_mean_fall_speed: ta.wpfloat = 1.25
#: Exponent of the density factor in ice terminal velocity equation to account for density (air thermodynamic state) change. Originally defined as tune_icesedi_exp in mo_tuning_nwp_config.f90 in ICON.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@gtx.field_operator
def compute_cooper_inp_concentration(temperature: ta.wpfloat) -> ta.wpfloat:
cnin = 5.0 * exp(0.304 * (_phy_const.tmelt - temperature))
cnin = wpfloat("5.0") * exp(wpfloat("0.304") * (_phy_const.tmelt - temperature))
cnin = minimum(cnin, _microphy_const.NIMAX_THOM)
return cnin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def test_graupel(
lowest_layer_thickness: ta.wpfloat,
backend: gtx_typing.Backend,
):
pytest.xfail("Tolerances have increased with new ser_data, need to check with @ongchia")
vertical_config = v_grid.VerticalGridConfig(
icon_grid.num_levels,
lowest_layer_thickness=lowest_layer_thickness,
Expand Down Expand Up @@ -105,13 +104,7 @@ def test_graupel(

graupel_config = graupel.SingleMomentSixClassIconGraupelConfig(
liquid_autoconversion_option=mphys_options.LiquidAutoConversionType.SEIFERT_BEHENG,
ice_stickeff_min=0.01,
power_law_coeff_for_ice_mean_fall_speed=1.25,
exponent_for_density_factor_in_ice_sedimentation=0.3,
power_law_coeff_for_snow_fall_speed=20.0,
rain_mu=0.0,
rain_n0=1.0,
snow2graupel_riming_coeff=0.5,
ice_stickeff_min=0.075,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't hardcode values in the middle of the test. Move to definitions.py where all other experiments coefficients are defined. Add a construct_mycrophisics_config method maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know many config is summarized in one place in definitions.py, and I think this microphysics config may be (a big question mark??) used again in the driver test . But it looks like it is still not very nice at all, it seems to me that we hardcode at another place. Similarly for VerticalGridConfig, this is kind of hardcoded everywhere... Possibly have to wait until we serialize namelist parameters and read them and generate config automatically somewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are serialized, I've added all NAMELIST_* files to serialized data, if you want you can start writing a reader for that and take them from there instead of hardcoding new stuff ;-)

)

graupel_microphysics = graupel.SingleMomentSixClassIconGraupel(
Expand Down