Skip to content

Commit

Permalink
Era5 notebook (#200)
Browse files Browse the repository at this point in the history
* Added notebooks showing how to work with ERA5, NRCan and CANOPEX data
* Using NcML links for ERA5 and NRCan
* bumpversion

Co-authored-by: David Huard <[email protected]>
  • Loading branch information
richardarsenault and huard authored Mar 10, 2020
1 parent 782b161 commit 2d83c8f
Show file tree
Hide file tree
Showing 33 changed files with 1,000 additions and 492 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ Changes
=======


0.10.x (2020-03-09) Oxford
--------------------------
* Added support for ERA5 (hourly), NRCan and CANOPEX datasets
* Support linear transforms (unit changes)
* Calibration now uses :SuppressOutput by default
* Added options for rain_snow_fraction, evaporation and ow_evaporation
* Updated Raven version to 295
* Support passing shapes as zip files


0.9.x (2019-11-11)
------------------
* Return configuration files used to run model in a zip archive
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim:set ft=dockerfile:
FROM continuumio/miniconda3
MAINTAINER https://github.com/huard/raven
LABEL Description="Raven WPS" Vendor="Birdhouse" Version="0.9.0"
LABEL Description="Raven WPS" Vendor="Birdhouse" Version="0.10.0-beta"

# Update Debian system
RUN apt-get update && apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
# The short X.Y version.
version = ''
# The full version, including alpha/beta/rc tags.
release = '0.9.0'
release = '0.10.0-beta'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
346 changes: 0 additions & 346 deletions docs/source/notebooks/CompleteChainCANOPEX.ipynb

This file was deleted.

6 changes: 3 additions & 3 deletions docs/source/notebooks/Delineation_workflow.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/source/notebooks/Perform_Regionalization.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/source/notebooks/Raven_run_parallel_basins.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/source/notebooks/Region_selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -48,7 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -74,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -99,13 +99,13 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "924131a218144745b3153d054c14c178",
"model_id": "56b9407a1406435ca4bdb3103e28a373",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -133,7 +133,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand All @@ -142,7 +142,7 @@
"[-74.71, 48.63]"
]
},
"execution_count": 7,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -154,13 +154,13 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bdf29bd851064fa2bebf25fb871d2e94",
"model_id": "c78d6074ba3d4bccaa04a7f905d88177",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -180,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -198,7 +198,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -240,7 +240,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions docs/source/notebooks/Run_Raven_with_Parallel_parameters.ipynb

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions docs/source/notebooks/canopex.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/source/notebooks/computing_objective_functions.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/source/notebooks/getting_variables_other_than_flow.ipynb

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions docs/source/notebooks/gridded_data_subset.ipynb

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/source/notebooks/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ Note that some of these notebooks need the bleeding edge version of OWSLib_ (>=0
running_mohyse
running_hbv_ec
getting_variables_other_than_flow
canopex
watershed_subset
gridded_data_subset
multi_model_simulation
Raven_run_parallel_basins
Run_Raven_with_Parallel_parameters
computing_objective_functions
Delineation_workflow
Time series analysis
time_series_analysis
Perform_Regionalization
running_OSTRICH_hmets
running_OSTRICH_gr4jcn
Expand Down
42 changes: 21 additions & 21 deletions docs/source/notebooks/multi_model_simulation.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/source/notebooks/running_OSTRICH_gr4jcn.ipynb

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/source/notebooks/running_OSTRICH_hbvec.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/source/notebooks/running_OSTRICH_hmets.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/source/notebooks/running_OSTRICH_mohyse.ipynb

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions docs/source/notebooks/running_gr4jcn.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/source/notebooks/running_hbv_ec.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/source/notebooks/running_hmets.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/source/notebooks/running_mohyse.ipynb

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/source/notebooks/time_series_analysis.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion raven/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__author__ = """David Huard"""
__email__ = '[email protected]'
__version__ = '0.9.0'
__version__ = '0.10.0-beta'

if 'DO_NOT_CHECK_EXECUTABLE_EXISTENCE' not in os.environ:
raven_exec = Path(__file__).parent.parent / 'bin' / 'raven'
Expand Down
1 change: 1 addition & 0 deletions raven/processes/wps_hydrobasins_shape_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def _handler(self, request, response):
lakes = True # request.inputs['lakes'][0].data
collect_upstream = request.inputs['aggregate_upstream'][0].data
lon, lat = parse_lonlat(request.inputs['location'][0].data)

bbox = (lon, lat, lon, lat)

shape_url = tempfile.NamedTemporaryFile(prefix='hybas_', suffix='.gml', delete=False,
Expand Down
2 changes: 1 addition & 1 deletion raven/processes/wps_raven_gr4j_cemaneige.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ class RavenGR4JCemaNeigeProcess(RavenProcess):
model_cls = GR4JCN
tuple_inputs = {'params': GR4JCN.params}

inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.duration, wio.run_name,
inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.nc_index, wio.duration, wio.run_name,
wio.name, wio.area, wio.latitude, wio.longitude, wio.elevation, wio.nc_index, wio.evaporation,
wio.rain_snow_fraction]
3 changes: 2 additions & 1 deletion raven/processes/wps_raven_hbv_ec.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class RavenHBVECProcess(RavenProcess):
model_cls = HBVEC
tuple_inputs = {'params': HBVEC.params}

inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.duration, wio.run_name,

inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.nc_index, wio.duration, wio.run_name,
wio.name, wio.area, wio.latitude, wio.longitude, wio.elevation, wio.rain_snow_fraction, wio.evaporation,
wio.ow_evaporation]
5 changes: 2 additions & 3 deletions raven/processes/wps_raven_hmets.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,5 @@ class RavenHMETSProcess(RavenProcess):
model_cls = HMETS
tuple_inputs = {'params': HMETS.params}

inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.duration, wio.run_name,
wio.name, wio.area, wio.latitude, wio.longitude, wio.elevation, wio.rain_snow_fraction, wio.evaporation,
]
inputs = [wio.ts, wio.nc_spec, params, wio.start_date, wio.end_date, wio.nc_index, wio.duration, wio.run_name,
wio.name, wio.area, wio.latitude, wio.longitude, wio.elevation, wio.rain_snow_fraction, wio.evaporation]
2 changes: 1 addition & 1 deletion raven/processes/wps_raven_mohyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ class RavenMOHYSEProcess(RavenProcess):
model_cls = MOHYSE
tuple_inputs = {'params': MOHYSE.params, 'hrus': MOHYSE.hrus}

inputs = [wio.ts, wio.nc_spec, params, hrus, wio.start_date, wio.end_date, wio.duration, wio.run_name,
inputs = [wio.ts, wio.nc_spec, params, hrus, wio.start_date, wio.end_date, wio.nc_index, wio.duration, wio.run_name,
wio.name, wio.area, wio.latitude, wio.longitude, wio.elevation, wio.rain_snow_fraction, wio.evaporation]
2 changes: 1 addition & 1 deletion raven/processes/wpsio.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'observed streamflow (qobs [m3/s]).',
min_occurs=1,
max_occurs=100,
supported_formats=[FORMATS.NETCDF, FORMATS.TEXT, FORMATS.SHP, ])
supported_formats=[FORMATS.NETCDF, FORMATS.DODS, FORMATS.TEXT, FORMATS.SHP])

conf = ComplexInput('conf', 'Raven/Ostrich configuration files',
abstract="Model configuration files, including the primary input file (rvi), the parameter "
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.0
current_version = 0.10.0-beta
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+).(?P<patch>\d+)(\-(?P<release>[a-z]+))?
Expand Down
1 change: 0 additions & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from pathlib import Path

import numpy as np
Expand Down

0 comments on commit 2d83c8f

Please sign in to comment.