Skip to content

Instantly share code, notes, and snippets.

@Daafip
Created May 23, 2024 12:44
Show Gist options
  • Save Daafip/8fb62aea4abba00c938a0b117a25b9d3 to your computer and use it in GitHub Desktop.
Save Daafip/8fb62aea4abba00c938a0b117a25b9d3 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Step 1a: Generate forcing for any region from CARAVAN and CMIP for HBV model\n",
"\n",
"[TODO: change to CAMELS]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# eWaterCycle dependencies. \n",
"# note that we do not need to import the model when only generating forcing\n",
"import ewatercycle.forcing\n",
"import ewatercycle.observation.grdc\n",
"import ewatercycle.analysis\n",
"\n",
"#required other dependencies, \n",
"\n",
"from pathlib import Path\n",
"from cartopy.io import shapereader\n",
"import pandas as pd\n",
"import numpy as np\n",
"# from rich import print\n",
"import shutil\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"#info on the region and the time periods of interest\n",
"\n",
"# GRDC Station ID for the Rhine at Lobith\n",
"# grdc_station_id = \"6335020\"\n",
"\n",
"# Location of shapefile \n",
"config_path = Path.cwd() / \"configFiles\"\n",
"forcing_path_camels = Path.cwd() / \"Forcing\" / \"Camels\"\n",
"forcing_path_CMIP = Path.cwd() / \"Forcing\" / \"CMIP\"\n",
"(Path.cwd() / \"Forcing\").mkdir()\n",
"forcing_path_camels.mkdir()\n",
"#shapeFileName = \"Rhine.shp\"\n",
"#catchmentShapeFile = path / shapeFileName\n",
"\n",
"HRU_ids = [\"03439000\"]\n",
"#HRU_ids = [\"01031500\"]\n",
"\n",
"# we will be creating forcing for an \"observation\" period where discharge observations\n",
"# are available. This must match the available ERA5 data on your machine and GRDC data\n",
"# the station of choice\n",
"observation_start_time = \"2000-01-01T00:00:00Z\"\n",
"observation_end_time = \"2005-12-31T00:00:00Z\"\n",
"\n",
"experiment_start_date = \"1997-08-01T00:00:00Z\"\n",
"experiment_end_date = \"2005-09-01T00:00:00Z\"\n",
"\n",
"# climate model meta-info to compare to for observational period. See step_0 notebook for explenation\n",
"# on what these terms mean. Here we choose the MPI-ESMI-1-2 climate model\n",
"cmip_dataset_observation = {\n",
" \"dataset\": \"MPI-ESM1-2-LR\",\n",
" \"project\": \"CMIP6\",\n",
" \"grid\": \"gn\",\n",
" \"exp\": \"historical\",\n",
" \"ensemble\": \"r3i1p1f1\",\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Forcing from Camels"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<xarray.Dataset> Size: 1GB\n",
"Dimensions: (time: 14609, basin_id: 482)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 117kB 1981-01-0...\n",
" * basin_id (basin_id) |S64 31kB b'camels_0102250...\n",
"Data variables: (12/55)\n",
" timezone (basin_id) |S64 31kB ...\n",
" name (basin_id) |S64 31kB ...\n",
" country (basin_id) |S64 31kB ...\n",
" lat (basin_id) float64 4kB ...\n",
" lon (basin_id) float64 4kB ...\n",
" area (basin_id) float64 4kB ...\n",
" ... ...\n",
" volumetric_soil_water_layer_2_max (basin_id, time) float32 28MB ...\n",
" volumetric_soil_water_layer_3_max (basin_id, time) float32 28MB ...\n",
" volumetric_soil_water_layer_4_max (basin_id, time) float32 28MB ...\n",
" total_precipitation_sum (basin_id, time) float32 28MB ...\n",
" potential_evaporation_sum (basin_id, time) float32 28MB ...\n",
" streamflow (basin_id, time) float32 28MB ...\n",
"Attributes:\n",
" history: Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(t...\n",
" NCO: netCDF Operators version 5.0.6 (Homepage = http://nco.sf....\n",
" _NCProperties: version=2,netcdf=4.8.1,hdf5=1.10.7\n"
]
}
],
"source": [
"camels_xarray = ewatercycle.forcing.sources.CaravanForcing.get_dataset(\"camels\")\n",
"print(camels_xarray)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"camels_01532000\n"
]
}
],
"source": [
"camels_basin_ids = ewatercycle.forcing.sources.CaravanForcing.get_basin_id(\"camels\")\n",
"print(camels_basin_ids[30])"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"179\n"
]
}
],
"source": [
"print(camels_basin_ids.index('camels_03439000'))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"forcing = ewatercycle.forcing.sources['CaravanForcing'].generate(start_time = experiment_start_date,\n",
" end_time = experiment_end_date,\n",
" directory = forcing_path_camels,\n",
" basin_id = camels_basin_ids[179],\n",
" )\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 95kB\n",
"Dimensions: (time: 2954)\n",
"Coordinates: (12/18)\n",
" * time (time) datetime64[ns] 24kB 1997-08-01 ... 2005-09-01\n",
" basin_id |S64 64B b&#x27;camels_03439000&#x27;\n",
" timezone |S64 64B b&#x27;America/New_York&#x27;\n",
" name |S64 64B b&#x27;FRENCH BROAD RIVER AT ROSMAN, NC&#x27;\n",
" country |S64 64B b&#x27;United States of America&#x27;\n",
" lat float64 8B 35.14\n",
" ... ...\n",
" moisture_index float64 8B -0.6997\n",
" seasonality float64 8B 0.2885\n",
" high_prec_freq float64 8B 0.04833\n",
" high_prec_dur float64 8B 1.155\n",
" low_prec_freq float64 8B 0.5741\n",
" low_prec_dur float64 8B 3.493\n",
"Data variables:\n",
" Q (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;\n",
" evspsblpot (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;\n",
" pr (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;\n",
" tas (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;\n",
" tasmax (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;\n",
" tasmin (time) float32 12kB dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-f0310de3-3f18-46f2-a551-d9c9a5d8a06b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f0310de3-3f18-46f2-a551-d9c9a5d8a06b' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 2954</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-275ff88c-b4b7-4ab8-ad84-89a145b07d19' class='xr-section-summary-in' type='checkbox' checked><label for='section-275ff88c-b4b7-4ab8-ad84-89a145b07d19' class='xr-section-summary' >Coordinates: <span>(18)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>1997-08-01 ... 2005-09-01</div><input id='attrs-dc2332ed-6930-4c72-8751-8864f3acfae6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dc2332ed-6930-4c72-8751-8864f3acfae6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-56d29231-0abb-4e32-98b9-f11722a44f17' class='xr-var-data-in' type='checkbox'><label for='data-56d29231-0abb-4e32-98b9-f11722a44f17' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;1997-08-01T00:00:00.000000000&#x27;, &#x27;1997-08-02T00:00:00.000000000&#x27;,\n",
" &#x27;1997-08-03T00:00:00.000000000&#x27;, ..., &#x27;2005-08-30T00:00:00.000000000&#x27;,\n",
" &#x27;2005-08-31T00:00:00.000000000&#x27;, &#x27;2005-09-01T00:00:00.000000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>basin_id</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S64</div><div class='xr-var-preview xr-preview'>b&#x27;camels_03439000&#x27;</div><input id='attrs-0cc72a31-f42b-414b-9bf0-9ae703fc9324' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cc72a31-f42b-414b-9bf0-9ae703fc9324' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-880fc525-39ad-42d5-a697-9c05f6ed8ac5' class='xr-var-data-in' type='checkbox'><label for='data-880fc525-39ad-42d5-a697-9c05f6ed8ac5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(b&#x27;camels_03439000&#x27;, dtype=&#x27;|S64&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>timezone</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S64</div><div class='xr-var-preview xr-preview'>b&#x27;America/New_York&#x27;</div><input id='attrs-ef84a49e-62de-47d3-9a1b-1c23e8f6c332' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ef84a49e-62de-47d3-9a1b-1c23e8f6c332' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c1798da7-f17b-4b41-928e-c26da4697243' class='xr-var-data-in' type='checkbox'><label for='data-c1798da7-f17b-4b41-928e-c26da4697243' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(b&#x27;America/New_York&#x27;, dtype=&#x27;|S64&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>name</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S64</div><div class='xr-var-preview xr-preview'>b&#x27;FRENCH BROAD RIVER AT ROSMAN, NC&#x27;</div><input id='attrs-dc31ec0c-e615-4477-b79b-cc55187ecf77' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dc31ec0c-e615-4477-b79b-cc55187ecf77' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-14605533-6329-4f03-a6ab-5a449879a90f' class='xr-var-data-in' type='checkbox'><label for='data-14605533-6329-4f03-a6ab-5a449879a90f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(b&#x27;FRENCH BROAD RIVER AT ROSMAN, NC&#x27;, dtype=&#x27;|S64&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>country</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S64</div><div class='xr-var-preview xr-preview'>b&#x27;United States of America&#x27;</div><input id='attrs-e1fed976-6b9a-44e0-b587-c07dd623b65b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e1fed976-6b9a-44e0-b587-c07dd623b65b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8b143468-0629-4000-bb4e-72ea328fa1ad' class='xr-var-data-in' type='checkbox'><label for='data-8b143468-0629-4000-bb4e-72ea328fa1ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(b&#x27;United States of America&#x27;, dtype=&#x27;|S64&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>35.14</div><input id='attrs-21d9e934-5489-4f2f-a633-863d03f45a0b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-21d9e934-5489-4f2f-a633-863d03f45a0b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-07e2c68d-f716-40dd-a550-7e795e66ac33' class='xr-var-data-in' type='checkbox'><label for='data-07e2c68d-f716-40dd-a550-7e795e66ac33' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(35.14333)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-82.82</div><input id='attrs-2d4d8f93-8213-4793-8d18-df13e2863585' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d4d8f93-8213-4793-8d18-df13e2863585' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-de3e8557-a8bd-4c9f-ac26-43d0d7a14307' class='xr-var-data-in' type='checkbox'><label for='data-de3e8557-a8bd-4c9f-ac26-43d0d7a14307' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(-82.82472)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>area</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>178.0</div><input id='attrs-e0a0303c-7fd7-4afe-b10f-a470f9174288' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e0a0303c-7fd7-4afe-b10f-a470f9174288' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-334b8394-40a2-47e0-9456-0acb1e767717' class='xr-var-data-in' type='checkbox'><label for='data-334b8394-40a2-47e0-9456-0acb1e767717' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(177.99471517)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>p_mean</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>4.171</div><input id='attrs-a9523bc1-6d0a-4153-b1d4-ad023e2afb69' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a9523bc1-6d0a-4153-b1d4-ad023e2afb69' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ffea067c-fa9b-4b74-86bc-c11eea12466e' class='xr-var-data-in' type='checkbox'><label for='data-ffea067c-fa9b-4b74-86bc-c11eea12466e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(4.17096995)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pet_mean</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>14.91</div><input id='attrs-57a49944-057d-4a86-a45e-08d7740abdce' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-57a49944-057d-4a86-a45e-08d7740abdce' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ed7d8ee0-7714-44bb-9218-4bcc3678be36' class='xr-var-data-in' type='checkbox'><label for='data-ed7d8ee0-7714-44bb-9218-4bcc3678be36' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(14.90556712)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>aridity</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.574</div><input id='attrs-47859eb1-72ca-4d1d-b412-65300871ad8c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-47859eb1-72ca-4d1d-b412-65300871ad8c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3761c637-13cb-4d84-8d8e-c49327e69597' class='xr-var-data-in' type='checkbox'><label for='data-3761c637-13cb-4d84-8d8e-c49327e69597' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(3.57364529)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>frac_snow</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0</div><input id='attrs-1f3de6ea-c5c3-4ab3-8bf8-0bcc8afb9977' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1f3de6ea-c5c3-4ab3-8bf8-0bcc8afb9977' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f3942c51-38e3-44a2-b74f-57104179b6ee' class='xr-var-data-in' type='checkbox'><label for='data-f3942c51-38e3-44a2-b74f-57104179b6ee' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>moisture_index</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6997</div><input id='attrs-75427d7c-bb1c-4a4c-b0a5-0626d72d38e0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-75427d7c-bb1c-4a4c-b0a5-0626d72d38e0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5cb0f82d-fc2c-4054-a806-d2bfec993916' class='xr-var-data-in' type='checkbox'><label for='data-5cb0f82d-fc2c-4054-a806-d2bfec993916' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(-0.69966536)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>seasonality</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2885</div><input id='attrs-29bf8d0f-9bf8-4c43-aec4-6178ed545acd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-29bf8d0f-9bf8-4c43-aec4-6178ed545acd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d9a3696d-abf8-49f9-8dce-2553e84aa50e' class='xr-var-data-in' type='checkbox'><label for='data-d9a3696d-abf8-49f9-8dce-2553e84aa50e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.28853321)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>high_prec_freq</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.04833</div><input id='attrs-de985872-7684-432a-b79b-bbdff7ff2560' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-de985872-7684-432a-b79b-bbdff7ff2560' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-eebd5a86-36e5-4fc0-bbea-8e2f3d65c8cf' class='xr-var-data-in' type='checkbox'><label for='data-eebd5a86-36e5-4fc0-bbea-8e2f3d65c8cf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.04832637)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>high_prec_dur</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.155</div><input id='attrs-daf3b931-e84a-4634-b511-9a938243465a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-daf3b931-e84a-4634-b511-9a938243465a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e145f382-88ca-4d0f-9101-050e345ea657' class='xr-var-data-in' type='checkbox'><label for='data-e145f382-88ca-4d0f-9101-050e345ea657' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(1.15548282)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>low_prec_freq</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5741</div><input id='attrs-9d0ba571-de7a-4fa7-829e-7835ab38cb8f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d0ba571-de7a-4fa7-829e-7835ab38cb8f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e22053f8-048b-43d8-98c3-8fdef46ddcca' class='xr-var-data-in' type='checkbox'><label for='data-e22053f8-048b-43d8-98c3-8fdef46ddcca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.57409816)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>low_prec_dur</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.493</div><input id='attrs-ef5745bd-583f-4fdf-9905-65a882d17109' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ef5745bd-583f-4fdf-9905-65a882d17109' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c72561e6-7081-45de-a9e2-6fba2ead8005' class='xr-var-data-in' type='checkbox'><label for='data-c72561e6-7081-45de-a9e2-6fba2ead8005' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(3.49312786)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d123dc5c-c672-47f4-a036-1d281c74d322' class='xr-section-summary-in' type='checkbox' checked><label for='section-d123dc5c-c672-47f4-a036-1d281c74d322' class='xr-section-summary' >Data variables: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Q</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-ad41dbc6-e29a-4280-93eb-a8e4d9482dcd' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ad41dbc6-e29a-4280-93eb-a8e4d9482dcd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bf4afc79-e72e-4631-b307-6b49d4839c3d' class='xr-var-data-in' type='checkbox'><label for='data-bf4afc79-e72e-4631-b307-6b49d4839c3d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>unit :</span></dt><dd>mm/d</dd><dt><span>long_name :</span></dt><dd>Observed streamflow</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>evspsblpot</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-dea8ec14-b6f0-4223-a3c9-f76f4f323f6f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-dea8ec14-b6f0-4223-a3c9-f76f4f323f6f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-361cd84f-656f-4f5d-906d-b496b247d6f1' class='xr-var-data-in' type='checkbox'><label for='data-361cd84f-656f-4f5d-906d-b496b247d6f1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>unit :</span></dt><dd>mm</dd><dt><span>long_name :</span></dt><dd>ERA5-Land Potential Evapotranspiration</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pr</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-496da0d7-3378-464e-b031-b5d9cdb803ae' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-496da0d7-3378-464e-b031-b5d9cdb803ae' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5c619ece-50d3-47bd-ad69-624f3a4d96eb' class='xr-var-data-in' type='checkbox'><label for='data-5c619ece-50d3-47bd-ad69-624f3a4d96eb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>unit :</span></dt><dd>mm</dd><dt><span>long_name :</span></dt><dd>Total precipitation</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tas</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-26b6ca2c-9962-4a8f-935e-c8557dad3475' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-26b6ca2c-9962-4a8f-935e-c8557dad3475' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ee792ba9-4820-4f39-adc3-a2a5ad119e4e' class='xr-var-data-in' type='checkbox'><label for='data-ee792ba9-4820-4f39-adc3-a2a5ad119e4e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>2m air temperature</dd><dt><span>unit :</span></dt><dd>°C</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>height :</span></dt><dd>2m</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tasmax</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-1adf7fd1-18fb-409c-9203-ad1210a47c31' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-1adf7fd1-18fb-409c-9203-ad1210a47c31' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8d4875f5-0ca6-4ae2-b3a2-f1bdd56b64b4' class='xr-var-data-in' type='checkbox'><label for='data-8d4875f5-0ca6-4ae2-b3a2-f1bdd56b64b4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>unit :</span></dt><dd>°C</dd><dt><span>long_name :</span></dt><dd>2m air temperature</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>height :</span></dt><dd>2m</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tasmin</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(2954,), meta=np.ndarray&gt;</div><input id='attrs-a7c99f2d-0419-44de-a69f-8b5784e44663' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a7c99f2d-0419-44de-a69f-8b5784e44663' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-070fd252-540b-4e3a-a325-4dc570e3484e' class='xr-var-data-in' type='checkbox'><label for='data-070fd252-540b-4e3a-a325-4dc570e3484e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>unit :</span></dt><dd>°C</dd><dt><span>long_name :</span></dt><dd>2m air temperature</dd><dt><span>_ChunkSizes :</span></dt><dd>[ 241 7305]</dd><dt><span>height :</span></dt><dd>2m</dd><dt><span>history :</span></dt><dd>Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\n",
"Merged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 11.54 kiB </td>\n",
" <td> 11.54 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (2954,) </td>\n",
" <td> (2954,) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2954</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-f6d43ee3-e5e5-4351-85a7-17407aaa91d5' class='xr-section-summary-in' type='checkbox' ><label for='section-f6d43ee3-e5e5-4351-85a7-17407aaa91d5' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-6e05c1e2-fb47-40c4-af50-da0c11d0130f' class='xr-index-data-in' type='checkbox'/><label for='index-6e05c1e2-fb47-40c4-af50-da0c11d0130f' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;1997-08-01&#x27;, &#x27;1997-08-02&#x27;, &#x27;1997-08-03&#x27;, &#x27;1997-08-04&#x27;,\n",
" &#x27;1997-08-05&#x27;, &#x27;1997-08-06&#x27;, &#x27;1997-08-07&#x27;, &#x27;1997-08-08&#x27;,\n",
" &#x27;1997-08-09&#x27;, &#x27;1997-08-10&#x27;,\n",
" ...\n",
" &#x27;2005-08-23&#x27;, &#x27;2005-08-24&#x27;, &#x27;2005-08-25&#x27;, &#x27;2005-08-26&#x27;,\n",
" &#x27;2005-08-27&#x27;, &#x27;2005-08-28&#x27;, &#x27;2005-08-29&#x27;, &#x27;2005-08-30&#x27;,\n",
" &#x27;2005-08-31&#x27;, &#x27;2005-09-01&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;time&#x27;, length=2954, freq=None))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1887bac2-f9d6-4866-b067-074592e02339' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-1887bac2-f9d6-4866-b067-074592e02339' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset> Size: 95kB\n",
"Dimensions: (time: 2954)\n",
"Coordinates: (12/18)\n",
" * time (time) datetime64[ns] 24kB 1997-08-01 ... 2005-09-01\n",
" basin_id |S64 64B b'camels_03439000'\n",
" timezone |S64 64B b'America/New_York'\n",
" name |S64 64B b'FRENCH BROAD RIVER AT ROSMAN, NC'\n",
" country |S64 64B b'United States of America'\n",
" lat float64 8B 35.14\n",
" ... ...\n",
" moisture_index float64 8B -0.6997\n",
" seasonality float64 8B 0.2885\n",
" high_prec_freq float64 8B 0.04833\n",
" high_prec_dur float64 8B 1.155\n",
" low_prec_freq float64 8B 0.5741\n",
" low_prec_dur float64 8B 3.493\n",
"Data variables:\n",
" Q (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>\n",
" evspsblpot (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>\n",
" pr (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>\n",
" tas (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>\n",
" tasmax (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>\n",
" tasmin (time) float32 12kB dask.array<chunksize=(2954,), meta=np.ndarray>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"forcing.to_xarray()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment