How the SAMIR functions works
- modspa_pixel.code.modspa_samir.run_samir(json_config_file: str, csv_param_file: str, ndvi_cube_path: str, weather_path: str, soil_params_path: str, land_cover_path: str, save_path: str, additional_outputs: dict | None = None, available_ram: int = 8) None [source]
Run the SAMIR model on prepared inputs. Calls the
samir_daily()
function.Arguments
- json_config_file:
str
json config file path
- json_config_file:
- csv_param_file:
str
samir csv parameter file path
- csv_param_file:
- ndvi_cube_path:
str
ndvi cube file path
- ndvi_cube_path:
- weather_path:
str
weather cube file path
- weather_path:
- soil_params_path:
str
soil parameter file path
- soil_params_path:
- land_cover_path:
str
land cover file path
- land_cover_path:
- save_path:
str
output save file path
- save_path:
- additional_outputs:
dict
default = None
dictionnary containing optionnal additional outputs
- additional_outputs:
- available_ram:
int
default = 8
available ram in GiB for calculation
- available_ram:
Returns
None
- modspa_pixel.code.modspa_samir.samir_daily(NDVI: ndarray, ET0: ndarray, Rain: ndarray, Wfc: ndarray, Wwp: ndarray, params: dict, Dr0: ndarray, Dd0: ndarray, Zr0: ndarray, E0: ndarray, Tr0: ndarray, Dei0: ndarray, Dep0: ndarray, iday: int) Tuple[ndarray] [source]
Run the SAMIR model on a single day. Inputs and outputs are numpy.ndarray. Calls functions compiled with numba for intermediary calculations.
Arguments
- NDVI:
`np.ndarray`
input NDVI
- NDVI:
- ET0:
`np.ndarray`
input ET0
- ET0:
- Rain:
np.ndarray
input Rain
- Rain:
- Wfc:
np.ndarray
field capacity
- Wfc:
- Wwp:
np.ndarray
field wilting point
- Wwp:
- params:
dict
dictionnary containing the rasterized samir parameters and their scale factors
- params:
- Dr0:
np.ndarray
previous day root layer depletion
- Dr0:
- Dd0:
np.ndarray
previous day deep layer depletion
- Dd0:
- Zr0:
np.ndarray
previous day root depth
- Zr0:
E0:
np.ndarray
previous day surface evaporationTr0:
np.ndarray
previous day plant transpirationDei0:
np.ndarray
previous day surface layer depletion for irrigation partDep0:
np.ndarray
previous day surface layer depletion for precipitation partiday:
int
current loop counter
Returns
- current_day_outouts: Tuple[np.ndarray]
multiple numpy.ndarray arrays are returned as a tuple for current day