Skip to content

Commit

Permalink
started DA for ensemble
Browse files Browse the repository at this point in the history
  • Loading branch information
RolfHut committed Oct 31, 2024
1 parent a8514ea commit 906a36a
Showing 1 changed file with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"# general eWaterCycle\n",
"import ewatercycle\n",
"import ewatercycle.models\n",
"import ewatercycle.forcing"
"import ewatercycle.forcing\n",
"import ewatercycle_da"
]
},
{
Expand Down Expand Up @@ -391,6 +392,30 @@
"The only difference with the previous notebook is that here we pass CMIP instead of ERA5 forcing to the model on creation"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fe6d956d-9bd7-473f-9d55-589c435e9e7d",
"metadata": {},
"outputs": [],
"source": [
"ensemble = ewatercycle_da.DA.Ensemble(N=10)\n",
"\n",
"ensemble.setup()\n",
"ensemble.initialize(model_name=\"HBV\",\n",
" forcing=HBVForcing,\n",
" setup_kwargs={'parameters':'7.6,0.5,460,3.8,0.19,1.3,0.082,0.0061',\n",
" 'initial_storage':'0,100,0,5'}\n",
" )\n",
"\n",
"ref_model = ensemble.ensemble_list[0].model\n",
"\n",
"lst_Q = []\n",
"while ref_model.time < ref_model.end_time:\n",
" ensemble.update(assimilate=False)\n",
" lst_Q.append(ensemble.get_value(\"Q\"))"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 906a36a

Please sign in to comment.