Skip to content
Snippets Groups Projects
Commit c435123d authored by Jeremy Auclair's avatar Jeremy Auclair
Browse files

Small comment and value changes.

parent 37a67d0e
No related branches found
No related tags found
No related merge requests found
......@@ -8,20 +8,20 @@ Koffset,-1,1
Kcmax,1,1.3
NDVIsol,0,0.5
NDVImax,0.3,1
Zsoil,1,5000
Zsoil,1,6000
Ze,1,500
Init_RU,0,1
DiffE,0,30
DiffR,0,30
REW,0,1000
minZr,0,2000
maxZr,0,2000
maxZr,0,4000
p,0,1
FW,0,1
Irrig_auto,0,1
Irrig_man,0,1
Lame_max,0,200
Lame_min,0,50,
Lame_min,0,50
Kcb_min_start_irrig,0,2
frac_Kcb_stop_irrig,0,1
frac_TAW,0,1
\ No newline at end of file
......@@ -474,6 +474,7 @@ def combine_weather2netcdf(rain_file: str, ET0_tile: str, ndvi_path: str, save_p
encod = {}
encod['dtype'] = 'u2'
encod['_FillValue'] = 0
# TODO: figure out optimal file chunk size
file_chunksize = (1, dimensions['y'], dimensions['x'])
encod['chunksizes'] = file_chunksize
# TODO: check if compression affects reading speed
......
......@@ -76,7 +76,7 @@ def test_samir_parameter(table: pd.DataFrame, min_max_param_file: str) -> pd.Dat
for class_name in table.columns[1:]:
# Test if parameter is out of range
if table.at[parameter, class_name] >= min_max_table.at[parameter, 'max_value'] or table.at[parameter, class_name] <= min_max_table.at[parameter, 'min_value']:
if table.at[parameter, class_name] > min_max_table.at[parameter, 'max_value'] or table.at[parameter, class_name] < min_max_table.at[parameter, 'min_value']:
# If parameter is out of range, print which parameter and for which class
print(f'\nParameter {parameter} is out of range for class {class_name}')
......@@ -1447,6 +1447,7 @@ def run_samir(csv_param_file: str, ndvi_cube_path: str, weather_path: str, soil_
encod['dtype'] = 'i2'
else:
encod['dtype'] = 'u2'
# TODO: figure out optimal file chunk size
encod['chunksizes'] = (1, y_size, x_size)
encoding_dict[variable] = encod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment