Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Jul 13, 2023
1 parent 7c09438 commit 4396af0
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions notebooks/case_studies/TIFF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@
" identical_dims=[\"X\", \"Y\"],\n",
")\n",
"\n",
"# save translate reference in memory for later visualization\n",
"multi_kerchunk = mzz.translate()\n",
"# # save translate reference in memory for later visualization\n",
"# multi_kerchunk = mzz.translate()\n",
"\n",
"# Write kerchunk .json record\n",
"output_fname = \"RADAR.json\"\n",
"with open(f\"{output_fname}\", \"wb\") as f:\n",
" f.write(ujson.dumps(multi_kerchunk).encode())"
"# # Write kerchunk .json record\n",
"# output_fname = \"RADAR.json\"\n",
"# with open(f\"{output_fname}\", \"wb\") as f:\n",
"# f.write(ujson.dumps(multi_kerchunk).encode())"
]
},
{
Expand All @@ -286,15 +286,15 @@
"metadata": {},
"outputs": [],
"source": [
"fs = fsspec.filesystem(\n",
" \"reference\",\n",
" fo=\"RADAR.json\",\n",
" remote_protocol=\"s3\",\n",
" remote_options={\"anon\": True},\n",
" skip_instance_cache=True,\n",
")\n",
"m = fs.get_mapper(\"\")\n",
"ds = xr.open_dataset(m, engine=\"zarr\")"
"# fs = fsspec.filesystem(\n",
"# \"reference\",\n",
"# fo=\"RADAR.json\",\n",
"# remote_protocol=\"s3\",\n",
"# remote_options={\"anon\": True},\n",
"# skip_instance_cache=True,\n",
"# )\n",
"# m = fs.get_mapper(\"\")\n",
"# ds = xr.open_dataset(m, engine=\"zarr\")"
]
},
{
Expand All @@ -303,7 +303,7 @@
"metadata": {},
"outputs": [],
"source": [
"ds"
"# ds"
]
},
{
Expand All @@ -323,10 +323,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Generate coordinates from reference dataset\n",
"ref_ds = ds.xref.generate_coords(time_dim_name=\"time\", x_dim_name=\"X\", y_dim_name=\"Y\")\n",
"# Rename to rain accumulation in 24 hour period\n",
"ref_ds = ref_ds.rename({\"0\": \"rr24h\"})"
"# # Generate coordinates from reference dataset\n",
"# ref_ds = ds.xref.generate_coords(time_dim_name=\"time\", x_dim_name=\"X\", y_dim_name=\"Y\")\n",
"# # Rename to rain accumulation in 24 hour period\n",
"# ref_ds = ref_ds.rename({\"0\": \"rr24h\"})"
]
},
{
Expand All @@ -345,7 +345,7 @@
"metadata": {},
"outputs": [],
"source": [
"ref_ds[\"rr24h\"].where(ref_ds.rr24h < 60000).isel(time=0).plot(robust=True)"
"# ref_ds[\"rr24h\"].where(ref_ds.rr24h < 60000).isel(time=0).plot(robust=True)"
]
},
{
Expand All @@ -364,7 +364,7 @@
"metadata": {},
"outputs": [],
"source": [
"ref_ds[\"rr24h\"][:, 700, 700].plot()"
"# ref_ds[\"rr24h\"][:, 700, 700].plot()"
]
}
],
Expand Down

0 comments on commit 4396af0

Please sign in to comment.