Skip to content

Commit

Permalink
refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiALBASHA committed Jun 15, 2023
1 parent 1cbba99 commit 126b3b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hydroshoot/energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def set_leaf_temperature_to_air_temperature(air_temperature, leaf_ids):
return {vid: air_temperature for vid in leaf_ids}


def set_wind_speed(g, meteo, leaf_lbl_prefix='L'):
def set_local_wind_speed(g, meteo, leaf_lbl_prefix='L') -> dict:
"""Basic model for wind speed at leaf level, considered equal to air wind speed for all leaves
Args:
Expand Down
6 changes: 3 additions & 3 deletions src/hydroshoot/initialisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from hydroshoot import soil
from hydroshoot.architecture import get_mtg_base, add_soil_surface_mesh, get_leaves
from hydroshoot.energy import set_form_factors_simplified, set_wind_speed, set_local_air_temperature
from hydroshoot.energy import set_form_factors_simplified, set_local_wind_speed, set_local_air_temperature
from hydroshoot.exchange import leaf_Na
from hydroshoot.io import HydroShootInputs, HydroShootHourlyInputs
from hydroshoot.irradiance import irradiance_distribution, hsCaribu, set_optical_properties
Expand Down Expand Up @@ -169,8 +169,8 @@ def init_hourly(g: MTG, inputs_hourly: HydroShootHourlyInputs, leaf_ppfd: dict,
# Add a date index to g
g.date = datetime.strftime(inputs_hourly.date, "%Y%m%d%H%M%S")

# initiate wind speed
g.properties()['u'] = set_wind_speed(
# initiate local wind speed
g.properties()['u'] = set_local_wind_speed(
g=g, meteo=inputs_hourly.weather, leaf_lbl_prefix=params.mtg_api.leaf_lbl_prefix)

# initiate local air temperature
Expand Down

0 comments on commit 126b3b8

Please sign in to comment.