You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The hydrology model currently initialized microclimatic variables for the first update. This is not needed as the variables will be initialized by the abiotic model and this should come first. The only variable that needs initializing is the wind_speed if the abiotic_simple model is used.
Describe the solution you'd like
Replace this:
# Create subcanopy microclimate from reference height
# TODO this needs to be removed when variable system is up and running; only
# wind speed needs to be initialised when abiotic simple is used, see below
# TODO currently surface layer, needs to be replaced with 2m above ground
for var in [
"air_temperature",
"relative_humidity",
"wind_speed",
"atmospheric_pressure",
]:
self.data[var] = (
DataArray(self.data[var + "_ref"].isel(time_index=0))
.expand_dims("layers")
.rename(var)
.assign_coords(
coords={
"layers": np.array([self.surface_layer_index]),
"layer_roles": ("layers", ["surface"]),
"cell_id": self.grid.cell_id,
},
)
)
with this:
# THIS IS THE ALTERNATIVE:
# If wind speed is not in data, which is the case if the abiotic_simple model is
# used, create subcanopy microclimate from reference height
# TODO currently surface layer, needs to be replaced with 2m above ground
# if "wind_speed" not in self.data:
# self.data["wind_speed"] = self.layer_structure.from_template()
# self.data["wind_speed"][self.surface_layer_index] = self.data[
# "wind_speed_ref"
# ].isel(time_index=0)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The
hydrology
model currently initialized microclimatic variables for the first update. This is not needed as the variables will be initialized by the abiotic model and this should come first. The only variable that needs initializing is thewind_speed
if theabiotic_simple
model is used.Describe the solution you'd like
Replace this:
with this:
The text was updated successfully, but these errors were encountered: