From 744f0cb92b7f902cc2e701756d21a0d301a3d902 Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Fri, 30 Jun 2023 11:09:52 +0200 Subject: [PATCH] move wind speed masking from stemmus_scope to pystemmusscope --- PyStemmusScope/forcing_io.py | 2 +- PyStemmusScope/global_data/global_data_selection.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PyStemmusScope/forcing_io.py b/PyStemmusScope/forcing_io.py index 259c5d19..aa60a482 100644 --- a/PyStemmusScope/forcing_io.py +++ b/PyStemmusScope/forcing_io.py @@ -75,7 +75,7 @@ def read_forcing_data_plumber2(forcing_file: Path, start_time: str, end_time: st data["precip_conv"] = ds_forcing["Precip"] / 10 # conversion from mm/s to cm/s data["lw_down"] = ds_forcing["LWdown"] data["sw_down"] = ds_forcing["SWdown"] - data["wind_speed"] = ds_forcing["Wind"] + data["wind_speed"] = vc.mask_data(ds_forcing["Wind"], min_value=0.05) data["rh"] = ds_forcing["RH"] data["vpd"] = ds_forcing["VPD"] data["lai"] = vc.mask_data(ds_forcing["LAI"], min_value=0.01) diff --git a/PyStemmusScope/global_data/global_data_selection.py b/PyStemmusScope/global_data/global_data_selection.py index 86e69f17..6501c405 100644 --- a/PyStemmusScope/global_data/global_data_selection.py +++ b/PyStemmusScope/global_data/global_data_selection.py @@ -45,6 +45,8 @@ def collect_datasets( data = {**data, **era5_data} + data["wind_speed"] = vc.mask_data(data["wind_speed"], min_value=0.05) + data["co2_conv"] = ( vc.co2_mass_fraction_to_kg_per_m3( gd.cams_co2.retrieve_co2_data(