View source: R/Run_GR2MSemiDistr.R
Run_GR2MSemiDistr | R Documentation |
Run the GR2M model for 'n' subbasins.
Run_GR2MSemiDistr(
Data,
Subbasins,
RunIni,
RunEnd,
WarmUp = NULL,
Parameters,
IniState = NULL,
Save = FALSE,
Update = FALSE
)
Data |
Dataframe with model input's data in airGR format from |
Subbasins |
Subbasins' shapefile. Must contain the following attributes: 'Area' (in km2), 'Region' (in letters), and 'COMID' (identifier number). |
RunIni |
Initial date of the model simulation in 'mm/yyyy' format. |
RunEnd |
Ending date of the model simulation in 'mm/yyyy' format. |
WarmUp |
Number of months for warm-up. NULL as default. |
Parameters |
Vector of model parameters (X1 and X2) and correction factors of P (fp) and E (fpe) in the following order: c(X1, X2, fp, fpe). In the case of existing more than one 'Region' (e.g. regions A and B) please provide model parameters in the following order: c(X1_A, X1_B, X2_A, X2_B, Fp_a, Fp_B, Fpe_A, Fpe_B). |
IniState |
Initial states variables. NULL as default. |
Save |
Boolean to save results as a text file in the 'Outputs' location. FALSE as default. |
Update |
Boolean for the updating mode where only the last month's values will be returned. FALSE as default. |
List of GR2M model outputs.
PR: Precipitation timeseries for all subbasins in [mm/month].
AE: Actual evapotranspiration timeseries for all subbasins in [mm/month].
SM: Soil Moisture timeseries for all subbasins in [mm/month].
RU: Runoff timeseries for all subbasins in [mm/month].
QS: Discharge timeseries for all subbasins in [m3/s] (not routed).
Dates: Vector of dates of the simulation period.
COMID: Vector of identifier numbers for each subbasin.
EndState: List of end model states of each subbasin.
SINK: Basin outlet which contains qsim and qobs data time series in [m3/s].
Llauca H, Lavado-Casimiro W, Montesinos C, Santini W, Rau P. PISCO_HyM_GR2M: A Model of Monthly Water Balance in Peru (1981–2020). Water. 2021; 13(8):1048. https://doi.org/10.3390/w13081048
# Run the GR2M model for each subbasin
model <- Run_GR2MSemiDistr(Data=data,
Subbasins=roi,
RunIni='01/1981',
RunEnd='12/2016',
Parameters=c(10.976, 0.665, 1.186, 1.169))
# Extract model results
View(model$PR) # precipitation [mm/month]
View(model$AE) # actual evapotranspiration [mm/month]
View(model$SM) # soil moisture [mm/month]
View(model$RU) # runoff in [mm/month]
print(model$SINK$obs) # observed discharge in [m3/s] at basin outlet
print(model$SINK$sim) # simulated discharge in [m3/s] at basin outlet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.