From 687cbac75c7a5e0e9eb1da32e47cda2e7529f60c Mon Sep 17 00:00:00 2001 From: Phobos Date: Mon, 22 Mar 2021 12:08:58 -0400 Subject: [PATCH 1/5] Add CFcompliance and data_validation to the process options --- finch/processes/utils.py | 2 +- finch/processes/wps_bccaqv2_heatwave.py | 8 +++++++- finch/processes/wps_xclim_indices.py | 2 +- finch/processes/wpsio.py | 22 +++++++++++++++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/finch/processes/utils.py b/finch/processes/utils.py index 6ab82f08..a6b15030 100644 --- a/finch/processes/utils.py +++ b/finch/processes/utils.py @@ -45,7 +45,7 @@ RequestInputs = Dict[str, Deque[PywpsInput]] # These are parameters that set options. They are not `compute` arguments. -INDICATOR_OPTIONS = ['check_missing', 'missing_options'] +INDICATOR_OPTIONS = ['check_missing', 'missing_options', "cf_compliance", "data_validation"] def log_file_path(process: Process) -> Path: diff --git a/finch/processes/wps_bccaqv2_heatwave.py b/finch/processes/wps_bccaqv2_heatwave.py index b38a52e8..e10dd2a4 100644 --- a/finch/processes/wps_bccaqv2_heatwave.py +++ b/finch/processes/wps_bccaqv2_heatwave.py @@ -44,8 +44,13 @@ def __init__(self): inputs = [ i for i in self.indices_process.inputs - if i.identifier not in ["tasmin", "tasmax"] + if i.identifier not in ["tasmin", "tasmax", "data_validation"] ] + + # For BCCAQv2, relaxe data validation strictness. + data_valid = wpsio.data_validation.clone() + data_valid.data = 'warn' + inputs += [ wpsio.lon, wpsio.lat, @@ -63,6 +68,7 @@ def __init__(self): data_type="integer", min_occurs=0, ), + data_valid, wpsio.output_format_netcdf_csv, ] diff --git a/finch/processes/wps_xclim_indices.py b/finch/processes/wps_xclim_indices.py index 0c0bfef6..2434cd2f 100644 --- a/finch/processes/wps_xclim_indices.py +++ b/finch/processes/wps_xclim_indices.py @@ -56,7 +56,7 @@ def __init__(self): wpsio.output_metalink, ] - common = [wpsio.check_missing, wpsio.missing_options, wpsio.variable_any] + common = [wpsio.check_missing, wpsio.missing_options, wpsio.cf_compliance, wpsio.data_validation, wpsio.variable_any] super().__init__( self._handler, diff --git a/finch/processes/wpsio.py b/finch/processes/wpsio.py index 020fca29..5d71e286 100644 --- a/finch/processes/wpsio.py +++ b/finch/processes/wpsio.py @@ -6,7 +6,7 @@ from pywps import FORMATS, ComplexInput, ComplexOutput, LiteralInput from pywps.inout.literaltypes import AnyValue -from xclim.core.options import CHECK_MISSING, MISSING_METHODS, MISSING_OPTIONS, OPTIONS +from xclim.core.options import CHECK_MISSING, CF_COMPLIANCE, DATA_VALIDATION, _LOUDNESS_OPTIONS, MISSING_METHODS, MISSING_OPTIONS, OPTIONS from .constants import ALL_24_MODELS, ALLOWED_MODEL_NAMES from .utils import PywpsInput, PywpsOutput @@ -189,6 +189,26 @@ def copy_io( ) +cf_compliance = LiteralInput( + "cf_compliance", + "Strictness level for CF-compliance input checks.", + abstract="Whether to log, warn or raise when inputs have non-CF-compliant attributes.", + data_type="string", + default=OPTIONS[CF_COMPLIANCE], + allowed_values=list(_LOUDNESS_OPTIONS), +) + + +data_validation = LiteralInput( + "data_validation", + "Strictness level for data validation input checks.", + abstract="Whether to log, warn or raise when inputs fail data validation checks.", + data_type="string", + default=OPTIONS[DATA_VALIDATION], + allowed_values=list(_LOUDNESS_OPTIONS), +) + + output_format_netcdf_csv = LiteralInput( "output_format", "Output format choice", From 129f45618b1fe09e355f8d30385783d979ad866b Mon Sep 17 00:00:00 2001 From: Phobos Date: Mon, 22 Mar 2021 12:34:08 -0400 Subject: [PATCH 2/5] fix tests and update notebook --- docs/source/notebooks/dap_subset.ipynb | 134 ++++++++---------------- docs/source/notebooks/finch-usage.ipynb | 56 ++++------ finch/processes/wps_xclim_indices.py | 8 +- finch/processes/wpsio.py | 10 +- tests/test_wps_xclim_indices.py | 2 + 5 files changed, 80 insertions(+), 130 deletions(-) diff --git a/docs/source/notebooks/dap_subset.ipynb b/docs/source/notebooks/dap_subset.ipynb index 9688e1ec..1eb43174 100644 --- a/docs/source/notebooks/dap_subset.ipynb +++ b/docs/source/notebooks/dap_subset.ipynb @@ -416,40 +416,36 @@ " lon_bnds (lon, bnds) float64 279.4 283.1 283.1 286.9 ... 301.9 301.9 305.6\n", " time_bnds (time, bnds) object 2046-01-01 00:00:00 ... 2066-01-01 00:00:00\n", " pr (time, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -477,18 +473,14 @@ " lon_bnds (lon, bnds) float64 ...\n", " time_bnds (time, bnds) object ...\n", " pr (time, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", @@ -931,24 +923,20 @@ "Dimensions without coordinates: lat, lon, time\n", "Data variables:\n", " pr (time, lat, lon) float32 3.415e-05 2.171e-05 ... 1.21e-05 1.022e-05\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -968,18 +956,14 @@ "Dimensions without coordinates: lat, lon, time\n", "Data variables:\n", " pr (time, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", @@ -1379,24 +1363,20 @@ " * time (time) object 2046-01-01 12:00:00\n", "Data variables:\n", " pr (time, lat, lon) float32 3.415e-05 2.171e-05 ... 1.21e-05 1.022e-05\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1419,18 +1399,14 @@ " * time (time) object 2046-01-01 12:00:00\n", "Data variables:\n", " pr (time, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", @@ -1831,29 +1807,25 @@ "Dimensions without coordinates: time_1\n", "Data variables:\n", " pr (time_1, lat, lon) float32 1.182e-05 1.207e-06 ... 5.592e-05\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1874,18 +1846,14 @@ "Dimensions without coordinates: time_1\n", "Data variables:\n", " pr (time_1, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", @@ -2350,29 +2318,25 @@ " * time (time) object 2060-01-01 12:00:00 ... 2064-12-30 12:00:00\n", "Data variables:\n", " pr (time, lat, lon) float32 1.182e-05 1.207e-06 ... 5.484e-06\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -2392,18 +2356,14 @@ " * time (time) object 2060-01-01 12:00:00 ... 2064-12-30 12:00:00\n", "Data variables:\n", " pr (time, lat, lon) float32 ...\n", - "Attributes:\n", + "Attributes: (12/17)\n", " comment: Spinup: restart files from end of experiment 20C3M (corre...\n", " title: MIUB model output prepared for IPCC Fourth Assessment SR...\n", " cmor_version: 0.96\n", " institution: MIUB (University of Bonn, Bonn, Germany)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with partial se...\n", " contact: Stephanie Legutke (legutke@dkrz.de), Seung-Ki Min(skmin@u...\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospheric general...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", + " ... ...\n", " calendar: 360_day\n", " project_id: IPCC Fourth Assessment\n", " Conventions: CF-1.0\n", @@ -2443,14 +2403,6 @@ } }, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Metalink content-type detected.\n", - "Downloading to /tmp/tmpt9hqb5ou/sdii_SRES-A2-experiment_20600101-20640101.nc.\n" - ] - }, { "data": { "text/html": [ @@ -2822,10 +2774,10 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-15 11:46:07] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:23:22] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", - " description: Annual simple daily intensity index (sdii) : annual avera...
  • units :
    mm/day
    cell_methods :
    time: mean (interval: 30 minutes)
    xclim_history :
    pr=max(0,pr) applied to raw data;\n", + "[2021-03-22 12:23:22] sdii: sdii(pr=<array>, thresh='1 mm/day', freq='YS') - xclim version: 0.24.0.
    standard_name :
    lwe_thickness_of_precipitation_amount
    long_name :
    Average precipitation during wet days (sdii)
    description :
    Annual simple daily intensity index (sdii) : annual average precipitation for days with daily precipitation over 1 mm/day. this indicator is also known as the 'simple daily intensity index' (sdii).
  • " ], "text/plain": [ "\n", @@ -2858,7 +2810,7 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-15 11:46:07] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:23:22] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", " description: Annual simple daily intensity index (sdii) : annual avera..." @@ -2893,9 +2845,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.2" + "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/docs/source/notebooks/finch-usage.ipynb b/docs/source/notebooks/finch-usage.ipynb index 4e945953..5f0260b9 100644 --- a/docs/source/notebooks/finch-usage.ipynb +++ b/docs/source/notebooks/finch-usage.ipynb @@ -58,7 +58,7 @@ "text": [ "Help on method frost_days in module birdy.client.base:\n", "\n", - "frost_days(tasmin=None, missing_options=None, check_missing='any', thresh='0 degC', freq='YS', variable=None, output_formats=None) method of birdy.client.base.WPSClient instance\n", + "frost_days(tasmin=None, missing_options=None, check_missing='any', cf_compliance='warn', data_validation='raise', thresh='0 degC', freq='YS', variable=None, output_formats=None) method of birdy.client.base.WPSClient instance\n", " Number of days where daily minimum temperatures are below 0.\n", " \n", " Parameters\n", @@ -73,6 +73,10 @@ " Method used to determine which aggregations should be considered missing.\n", " missing_options : ComplexData:mimetype:`application/json`\n", " JSON representation of dictionary of missing method parameters.\n", + " cf_compliance : {'log', 'warn', 'raise'}string\n", + " Whether to log, warn or raise when inputs have non-CF-compliant attributes.\n", + " data_validation : {'log', 'warn', 'raise'}string\n", + " Whether to log, warn or raise when inputs fail data validation checks.\n", " variable : string\n", " Name of the variable in the NetCDF file.\n", " \n", @@ -137,7 +141,7 @@ "output_type": "stream", "text": [ "Process status: ProcessSucceeded\n", - "Link to process output: https://pavics.ouranos.ca/wpsoutputs/9128be38-85a5-11eb-9f1a-a44cc85b43bf/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" + "Link to process output: https://pavics.ouranos.ca/wpsoutputs/ef8cf054-8b2a-11eb-bf6e-9c305b4af68f/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" ] } ], @@ -550,7 +554,7 @@ " xclim_history: tas=max(195,tas) applied to raw data; min of 194.73 detec...\n", " standard_name: days_with_air_temperature_below_threshold\n", " long_name: Number of frost days (tmin < 0c)\n", - " description: Annual number of days with minimum daily temperature belo...
  • units :
    days
    cell_methods :
    time: minimum (interval: 30 minutes) time: minimum within days time: sum over days
    xclim_history :
    tas=max(195,tas) applied to raw data; min of 194.73 detected;\n", + "[2021-03-22 12:23:31] frost_days: frost_days(tasmin=<array>, thresh='0 degC', freq='YS') - xclim version: 0.24.0.
    standard_name :
    days_with_air_temperature_below_threshold
    long_name :
    Number of frost days (tmin < 0c)
    description :
    Annual number of days with minimum daily temperature below 0℃.
  • " ], "text/plain": [ "\n", @@ -670,14 +674,6 @@ } }, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Metalink content-type detected.\n", - "Downloading to /tmp/tmp3uybmxkv/frost-days_SRES-A2-experiment_20460101-20650101.nc.\n" - ] - }, { "data": { "text/html": [ @@ -1041,27 +1037,20 @@ " * lon (lon) float64 281.2 285.0 288.8 292.5 296.2 300.0 303.8\n", "Data variables:\n", " frost_days (time, lat, lon) timedelta64[ns] 122 days 121 days ... 103 days\n", - "Attributes:\n", + "Attributes: (12/20)\n", " comment: Spinup: restart files from end of experiment 20...\n", " title: MIUB model output prepared for IPCC Fourth Ass...\n", " cmor_version: 0.96\n", " institution: Canadian Centre for Climate Services (CCCS)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with ...\n", " contact: Canadian Centre for Climate Services\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospher...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", - " calendar: 360_day\n", - " project_id: IPCC Fourth Assessment\n", - " Conventions: CF-1.0\n", + " ... ...\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:43:58 2011: ncks -4 -L 7 -d lat,4...\n", " NCO: 4.0.9\n", " climateindex_package_id: https://github.com/Ouranosinc/xclim\n", " product: derived climate index\n", - " institute_id: CCCS" ], "text/plain": [ @@ -1134,21 +1123,14 @@ " * lon (lon) float64 281.2 285.0 288.8 292.5 296.2 300.0 303.8\n", "Data variables:\n", " frost_days (time, lat, lon) timedelta64[ns] ...\n", - "Attributes:\n", + "Attributes: (12/20)\n", " comment: Spinup: restart files from end of experiment 20...\n", " title: MIUB model output prepared for IPCC Fourth Ass...\n", " cmor_version: 0.96\n", " institution: Canadian Centre for Climate Services (CCCS)\n", " source: ECHO-G(1999): atmosphere: ECHAM4 (T30L19) with ...\n", " contact: Canadian Centre for Climate Services\n", - " references: ECHAM4: E. Roeckner et al., 1996, The atmospher...\n", - " experiment_id: SRES A2 experiment\n", - " realization: 1\n", - " directory: /ipcc/sresa2/atm/da/\n", - " table_id: Table A2 (17 November 2004)\n", - " calendar: 360_day\n", - " project_id: IPCC Fourth Assessment\n", - " Conventions: CF-1.0\n", + " ... ...\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:43:58 2011: ncks -4 -L 7 -d lat,4...\n", " NCO: 4.0.9\n", @@ -1185,7 +1167,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.2" + "version": "3.8.8" } }, "nbformat": 4, diff --git a/finch/processes/wps_xclim_indices.py b/finch/processes/wps_xclim_indices.py index 2434cd2f..983f5513 100644 --- a/finch/processes/wps_xclim_indices.py +++ b/finch/processes/wps_xclim_indices.py @@ -56,7 +56,13 @@ def __init__(self): wpsio.output_metalink, ] - common = [wpsio.check_missing, wpsio.missing_options, wpsio.cf_compliance, wpsio.data_validation, wpsio.variable_any] + common = [ + wpsio.check_missing, + wpsio.missing_options, + wpsio.cf_compliance, + wpsio.data_validation, + wpsio.variable_any + ] super().__init__( self._handler, diff --git a/finch/processes/wpsio.py b/finch/processes/wpsio.py index 5d71e286..3f751ff9 100644 --- a/finch/processes/wpsio.py +++ b/finch/processes/wpsio.py @@ -6,7 +6,15 @@ from pywps import FORMATS, ComplexInput, ComplexOutput, LiteralInput from pywps.inout.literaltypes import AnyValue -from xclim.core.options import CHECK_MISSING, CF_COMPLIANCE, DATA_VALIDATION, _LOUDNESS_OPTIONS, MISSING_METHODS, MISSING_OPTIONS, OPTIONS +from xclim.core.options import ( + CHECK_MISSING, + CF_COMPLIANCE, + DATA_VALIDATION, + _LOUDNESS_OPTIONS, + MISSING_METHODS, + MISSING_OPTIONS, + OPTIONS +) from .constants import ALL_24_MODELS, ALLOWED_MODEL_NAMES from .utils import PywpsInput, PywpsOutput diff --git a/tests/test_wps_xclim_indices.py b/tests/test_wps_xclim_indices.py index 1696c53c..bfdc6b5c 100644 --- a/tests/test_wps_xclim_indices.py +++ b/tests/test_wps_xclim_indices.py @@ -36,6 +36,8 @@ def test_indicators_processes_discovery(indicator): parameters = set([k for k in sig.parameters.keys() if k != "phase"]) parameters.add("check_missing") parameters.add("missing_options") + parameters.add("cf_compliance") + parameters.add("data_validation") parameters.add("variable") if "indexer" in parameters: parameters.remove("indexer") From 3079cd3f4369d48d73186f588c932aae0fa4c96b Mon Sep 17 00:00:00 2001 From: Phobos Date: Mon, 22 Mar 2021 12:58:13 -0400 Subject: [PATCH 3/5] Hardcode options so we dont rely on random set order --- docs/source/notebooks/dap_subset.ipynb | 42 ++++++++++++------------- docs/source/notebooks/finch-usage.ipynb | 18 +++++------ finch/processes/wpsio.py | 4 +-- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/source/notebooks/dap_subset.ipynb b/docs/source/notebooks/dap_subset.ipynb index 1eb43174..d1a602fe 100644 --- a/docs/source/notebooks/dap_subset.ipynb +++ b/docs/source/notebooks/dap_subset.ipynb @@ -429,23 +429,23 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -936,7 +936,7 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1376,7 +1376,7 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1820,12 +1820,12 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -2331,12 +2331,12 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -2774,10 +2774,10 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:23:22] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:57:37] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", - " description: Annual simple daily intensity index (sdii) : annual avera...
  • units :
    mm/day
    cell_methods :
    time: mean (interval: 30 minutes)
    xclim_history :
    pr=max(0,pr) applied to raw data;\n", + "[2021-03-22 12:57:37] sdii: sdii(pr=<array>, thresh='1 mm/day', freq='YS') - xclim version: 0.24.0.
    standard_name :
    lwe_thickness_of_precipitation_amount
    long_name :
    Average precipitation during wet days (sdii)
    description :
    Annual simple daily intensity index (sdii) : annual average precipitation for days with daily precipitation over 1 mm/day. this indicator is also known as the 'simple daily intensity index' (sdii).
  • " ], "text/plain": [ "\n", @@ -2810,7 +2810,7 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:23:22] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:57:37] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", " description: Annual simple daily intensity index (sdii) : annual avera..." diff --git a/docs/source/notebooks/finch-usage.ipynb b/docs/source/notebooks/finch-usage.ipynb index 5f0260b9..fa8cb33e 100644 --- a/docs/source/notebooks/finch-usage.ipynb +++ b/docs/source/notebooks/finch-usage.ipynb @@ -141,7 +141,7 @@ "output_type": "stream", "text": [ "Process status: ProcessSucceeded\n", - "Link to process output: https://pavics.ouranos.ca/wpsoutputs/ef8cf054-8b2a-11eb-bf6e-9c305b4af68f/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" + "Link to process output: https://pavics.ouranos.ca/wpsoutputs/ba328478-8b2f-11eb-ad89-9c305b4af68f/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" ] } ], @@ -554,7 +554,7 @@ " xclim_history: tas=max(195,tas) applied to raw data; min of 194.73 detec...\n", " standard_name: days_with_air_temperature_below_threshold\n", " long_name: Number of frost days (tmin < 0c)\n", - " description: Annual number of days with minimum daily temperature belo...
  • units :
    days
    cell_methods :
    time: minimum (interval: 30 minutes) time: minimum within days time: sum over days
    xclim_history :
    tas=max(195,tas) applied to raw data; min of 194.73 detected;\n", + "[2021-03-22 12:57:49] frost_days: frost_days(tasmin=<array>, thresh='0 degC', freq='YS') - xclim version: 0.24.0.
    standard_name :
    days_with_air_temperature_below_threshold
    long_name :
    Number of frost days (tmin < 0c)
    description :
    Annual number of days with minimum daily temperature below 0℃.
  • " ], "text/plain": [ "\n", @@ -1050,7 +1050,7 @@ " NCO: 4.0.9\n", " climateindex_package_id: https://github.com/Ouranosinc/xclim\n", " product: derived climate index\n", - " institute_id: CCCS" ], "text/plain": [ diff --git a/finch/processes/wpsio.py b/finch/processes/wpsio.py index 3f751ff9..deb72f76 100644 --- a/finch/processes/wpsio.py +++ b/finch/processes/wpsio.py @@ -203,7 +203,7 @@ def copy_io( abstract="Whether to log, warn or raise when inputs have non-CF-compliant attributes.", data_type="string", default=OPTIONS[CF_COMPLIANCE], - allowed_values=list(_LOUDNESS_OPTIONS), + allowed_values=['log', 'warn', 'raise'], ) @@ -213,7 +213,7 @@ def copy_io( abstract="Whether to log, warn or raise when inputs fail data validation checks.", data_type="string", default=OPTIONS[DATA_VALIDATION], - allowed_values=list(_LOUDNESS_OPTIONS), + allowed_values=['log', 'warn', 'raise'], ) From 2d371ee9217a64ceafd21c94dc62d8507e7f9d2f Mon Sep 17 00:00:00 2001 From: Phobos Date: Mon, 22 Mar 2021 14:45:41 -0400 Subject: [PATCH 4/5] Allow 0 occurs of missing options --- finch/processes/wpsio.py | 1 + 1 file changed, 1 insertion(+) diff --git a/finch/processes/wpsio.py b/finch/processes/wpsio.py index deb72f76..ad87f245 100644 --- a/finch/processes/wpsio.py +++ b/finch/processes/wpsio.py @@ -194,6 +194,7 @@ def copy_io( abstract="JSON representation of dictionary of missing method parameters.", default=json.dumps(OPTIONS[MISSING_OPTIONS][OPTIONS[CHECK_MISSING]]), supported_formats=[FORMATS.JSON], + min_occurs=0, ) From 7a2e4402a381c4cb3a22d6fc2a2f21ae198a6405 Mon Sep 17 00:00:00 2001 From: Phobos Date: Mon, 22 Mar 2021 17:08:12 -0400 Subject: [PATCH 5/5] Refresh notebook --- docs/source/notebooks/dap_subset.ipynb | 138 ++++++++++++------------ docs/source/notebooks/finch-usage.ipynb | 73 +++++++------ 2 files changed, 109 insertions(+), 102 deletions(-) diff --git a/docs/source/notebooks/dap_subset.ipynb b/docs/source/notebooks/dap_subset.ipynb index d1a602fe..9fdd1c6e 100644 --- a/docs/source/notebooks/dap_subset.ipynb +++ b/docs/source/notebooks/dap_subset.ipynb @@ -17,10 +17,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:08.261868Z", - "iopub.status.busy": "2021-02-26T21:50:08.259937Z", - "iopub.status.idle": "2021-02-26T21:50:22.289803Z", - "shell.execute_reply": "2021-02-26T21:50:22.289282Z" + "iopub.execute_input": "2021-03-22T21:04:25.475031Z", + "iopub.status.busy": "2021-03-22T21:04:25.474378Z", + "iopub.status.idle": "2021-03-22T21:04:34.931203Z", + "shell.execute_reply": "2021-03-22T21:04:34.931545Z" } }, "outputs": [], @@ -43,10 +43,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:23.587700Z", - "iopub.status.busy": "2021-02-26T21:50:22.307632Z", - "iopub.status.idle": "2021-02-26T21:50:24.751005Z", - "shell.execute_reply": "2021-02-26T21:50:24.751412Z" + "iopub.execute_input": "2021-03-22T21:04:35.456432Z", + "iopub.status.busy": "2021-03-22T21:04:35.454639Z", + "iopub.status.idle": "2021-03-22T21:04:36.683550Z", + "shell.execute_reply": "2021-03-22T21:04:36.685441Z" } }, "outputs": [ @@ -429,23 +429,23 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -489,7 +489,7 @@ " NCO: 4.0.9" ] }, - "execution_count": 2, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -506,10 +506,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:24.892124Z", - "iopub.status.busy": "2021-02-26T21:50:24.800801Z", - "iopub.status.idle": "2021-02-26T21:50:24.991399Z", - "shell.execute_reply": "2021-02-26T21:50:24.990904Z" + "iopub.execute_input": "2021-03-22T21:04:36.798418Z", + "iopub.status.busy": "2021-03-22T21:04:36.797407Z", + "iopub.status.idle": "2021-03-22T21:04:36.802666Z", + "shell.execute_reply": "2021-03-22T21:04:36.802115Z" } }, "outputs": [ @@ -519,7 +519,7 @@ "{'lat': 1, 'lon': 2, 'time': slice(5040, 6840, None)}" ] }, - "execution_count": 3, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -557,10 +557,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:25.573180Z", - "iopub.status.busy": "2021-02-26T21:50:25.571441Z", - "iopub.status.idle": "2021-02-26T21:50:25.595170Z", - "shell.execute_reply": "2021-02-26T21:50:25.592717Z" + "iopub.execute_input": "2021-03-22T21:04:37.321476Z", + "iopub.status.busy": "2021-03-22T21:04:37.319669Z", + "iopub.status.idle": "2021-03-22T21:04:37.484273Z", + "shell.execute_reply": "2021-03-22T21:04:37.482583Z" } }, "outputs": [ @@ -936,7 +936,7 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -972,7 +972,7 @@ " NCO: 4.0.9" ] }, - "execution_count": 4, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -994,10 +994,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:26.188241Z", - "iopub.status.busy": "2021-02-26T21:50:26.185189Z", - "iopub.status.idle": "2021-02-26T21:50:26.643284Z", - "shell.execute_reply": "2021-02-26T21:50:26.645635Z" + "iopub.execute_input": "2021-03-22T21:04:37.833645Z", + "iopub.status.busy": "2021-03-22T21:04:37.831554Z", + "iopub.status.idle": "2021-03-22T21:04:38.312871Z", + "shell.execute_reply": "2021-03-22T21:04:38.313531Z" } }, "outputs": [ @@ -1376,7 +1376,7 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1415,7 +1415,7 @@ " NCO: 4.0.9" ] }, - "execution_count": 5, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -1437,10 +1437,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:27.028456Z", - "iopub.status.busy": "2021-02-26T21:50:27.026228Z", - "iopub.status.idle": "2021-02-26T21:50:27.576365Z", - "shell.execute_reply": "2021-02-26T21:50:27.576861Z" + "iopub.execute_input": "2021-03-22T21:04:38.635882Z", + "iopub.status.busy": "2021-03-22T21:04:38.635334Z", + "iopub.status.idle": "2021-03-22T21:04:39.423337Z", + "shell.execute_reply": "2021-03-22T21:04:39.423857Z" } }, "outputs": [ @@ -1820,12 +1820,12 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -1862,7 +1862,7 @@ " NCO: 4.0.9" ] }, - "execution_count": 6, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -1877,10 +1877,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:27.581333Z", - "iopub.status.busy": "2021-02-26T21:50:27.580907Z", - "iopub.status.idle": "2021-02-26T21:50:27.583237Z", - "shell.execute_reply": "2021-02-26T21:50:27.583650Z" + "iopub.execute_input": "2021-03-22T21:04:39.430055Z", + "iopub.status.busy": "2021-03-22T21:04:39.428225Z", + "iopub.status.idle": "2021-03-22T21:04:39.432991Z", + "shell.execute_reply": "2021-03-22T21:04:39.433768Z" } }, "outputs": [ @@ -1890,7 +1890,7 @@ "{'lat': 1, 'lon': 2, 'time': slice(5040, 6840, None)}" ] }, - "execution_count": 7, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -1904,10 +1904,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:27.589528Z", - "iopub.status.busy": "2021-02-26T21:50:27.589094Z", - "iopub.status.idle": "2021-02-26T21:50:27.591447Z", - "shell.execute_reply": "2021-02-26T21:50:27.591018Z" + "iopub.execute_input": "2021-03-22T21:04:39.442600Z", + "iopub.status.busy": "2021-03-22T21:04:39.442068Z", + "iopub.status.idle": "2021-03-22T21:04:39.445256Z", + "shell.execute_reply": "2021-03-22T21:04:39.444418Z" } }, "outputs": [ @@ -1949,10 +1949,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:27.929272Z", - "iopub.status.busy": "2021-02-26T21:50:27.928894Z", - "iopub.status.idle": "2021-02-26T21:50:28.657296Z", - "shell.execute_reply": "2021-02-26T21:50:28.656813Z" + "iopub.execute_input": "2021-03-22T21:04:39.763962Z", + "iopub.status.busy": "2021-03-22T21:04:39.762175Z", + "iopub.status.idle": "2021-03-22T21:04:40.490055Z", + "shell.execute_reply": "2021-03-22T21:04:40.490950Z" } }, "outputs": [ @@ -2331,12 +2331,12 @@ " Conventions: CF-1.0\n", " id: pcmdi.ipcc4.miub_echo_g.sresa2.run1.atm.da\n", " history: Mon Aug 1 11:42:37 2011: ncks -4 -L 7 -d lat,42.0,64.0 -...\n", - " NCO: 4.0.9" ], "text/plain": [ @@ -2372,7 +2372,7 @@ " NCO: 4.0.9" ] }, - "execution_count": 9, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -2396,10 +2396,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:28.660933Z", - "iopub.status.busy": "2021-02-26T21:50:28.660508Z", - "iopub.status.idle": "2021-02-26T21:50:34.312787Z", - "shell.execute_reply": "2021-02-26T21:50:34.311856Z" + "iopub.execute_input": "2021-03-22T21:04:40.496970Z", + "iopub.status.busy": "2021-03-22T21:04:40.496129Z", + "iopub.status.idle": "2021-03-22T21:04:44.934077Z", + "shell.execute_reply": "2021-03-22T21:04:44.935048Z" } }, "outputs": [ @@ -2774,10 +2774,10 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:57:37] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 17:04:42] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", - " description: Annual simple daily intensity index (sdii) : annual avera...
  • units :
    mm/day
    cell_methods :
    time: mean (interval: 30 minutes)
    xclim_history :
    pr=max(0,pr) applied to raw data;\n", + "[2021-03-22 17:04:42] sdii: sdii(pr=<array>, thresh='1 mm/day', freq='YS') - xclim version: 0.24.0.
    standard_name :
    lwe_thickness_of_precipitation_amount
    long_name :
    Average precipitation during wet days (sdii)
    description :
    Annual simple daily intensity index (sdii) : annual average precipitation for days with daily precipitation over 1 mm/day. this indicator is also known as the 'simple daily intensity index' (sdii).
  • " ], "text/plain": [ "\n", @@ -2810,13 +2810,13 @@ "Attributes:\n", " units: mm/day\n", " cell_methods: time: mean (interval: 30 minutes)\n", - " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 12:57:37] ...\n", + " xclim_history: pr=max(0,pr) applied to raw data;\\n[2021-03-22 17:04:42] ...\n", " standard_name: lwe_thickness_of_precipitation_amount\n", " long_name: Average precipitation during wet days (sdii)\n", " description: Annual simple daily intensity index (sdii) : annual avera..." ] }, - "execution_count": 10, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } diff --git a/docs/source/notebooks/finch-usage.ipynb b/docs/source/notebooks/finch-usage.ipynb index fa8cb33e..1736b975 100644 --- a/docs/source/notebooks/finch-usage.ipynb +++ b/docs/source/notebooks/finch-usage.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:36.795764Z", - "iopub.status.busy": "2021-02-26T21:50:36.793713Z", - "iopub.status.idle": "2021-02-26T21:50:38.796811Z", - "shell.execute_reply": "2021-02-26T21:50:38.797121Z" + "iopub.execute_input": "2021-03-22T21:04:50.369355Z", + "iopub.status.busy": "2021-03-22T21:04:50.362266Z", + "iopub.status.idle": "2021-03-22T21:04:52.884784Z", + "shell.execute_reply": "2021-03-22T21:04:52.884234Z" } }, "outputs": [], @@ -45,10 +45,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:38.800468Z", - "iopub.status.busy": "2021-02-26T21:50:38.800057Z", - "iopub.status.idle": "2021-02-26T21:50:38.802194Z", - "shell.execute_reply": "2021-02-26T21:50:38.802565Z" + "iopub.execute_input": "2021-03-22T21:04:52.888326Z", + "iopub.status.busy": "2021-03-22T21:04:52.887893Z", + "iopub.status.idle": "2021-03-22T21:04:52.890160Z", + "shell.execute_reply": "2021-03-22T21:04:52.890695Z" } }, "outputs": [ @@ -58,7 +58,7 @@ "text": [ "Help on method frost_days in module birdy.client.base:\n", "\n", - "frost_days(tasmin=None, missing_options=None, check_missing='any', cf_compliance='warn', data_validation='raise', thresh='0 degC', freq='YS', variable=None, output_formats=None) method of birdy.client.base.WPSClient instance\n", + "frost_days(tasmin=None, check_missing='any', cf_compliance='warn', data_validation='raise', thresh='0 degC', freq='YS', missing_options=None, variable=None, output_formats=None) method of birdy.client.base.WPSClient instance\n", " Number of days where daily minimum temperatures are below 0.\n", " \n", " Parameters\n", @@ -112,10 +112,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:38.811290Z", - "iopub.status.busy": "2021-02-26T21:50:38.810863Z", - "iopub.status.idle": "2021-02-26T21:50:42.656454Z", - "shell.execute_reply": "2021-02-26T21:50:42.655925Z" + "iopub.execute_input": "2021-03-22T21:04:52.896869Z", + "iopub.status.busy": "2021-03-22T21:04:52.893835Z", + "iopub.status.idle": "2021-03-22T21:04:56.967154Z", + "shell.execute_reply": "2021-03-22T21:04:56.965490Z" } }, "outputs": [], @@ -129,10 +129,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:42.660363Z", - "iopub.status.busy": "2021-02-26T21:50:42.659898Z", - "iopub.status.idle": "2021-02-26T21:50:42.662611Z", - "shell.execute_reply": "2021-02-26T21:50:42.662181Z" + "iopub.execute_input": "2021-03-22T21:04:56.977194Z", + "iopub.status.busy": "2021-03-22T21:04:56.975415Z", + "iopub.status.idle": "2021-03-22T21:04:56.979583Z", + "shell.execute_reply": "2021-03-22T21:04:56.980162Z" } }, "outputs": [ @@ -141,7 +141,7 @@ "output_type": "stream", "text": [ "Process status: ProcessSucceeded\n", - "Link to process output: https://pavics.ouranos.ca/wpsoutputs/ba328478-8b2f-11eb-ad89-9c305b4af68f/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" + "Link to process output: https://pavics.ouranos.ca/wpsoutputs/3f3621e4-8b52-11eb-825b-9c305b4af68f/frost-days_SRES-A2-experiment_20460101-20650101.nc\n" ] } ], @@ -161,7 +161,14 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2021-03-22T21:04:56.987650Z", + "iopub.status.busy": "2021-03-22T21:04:56.987036Z", + "iopub.status.idle": "2021-03-22T21:04:57.023799Z", + "shell.execute_reply": "2021-03-22T21:04:57.024345Z" + } + }, "outputs": [ { "data": { @@ -554,7 +561,7 @@ " xclim_history: tas=max(195,tas) applied to raw data; min of 194.73 detec...\n", " standard_name: days_with_air_temperature_below_threshold\n", " long_name: Number of frost days (tmin < 0c)\n", - " description: Annual number of days with minimum daily temperature belo...
  • units :
    days
    cell_methods :
    time: minimum (interval: 30 minutes) time: minimum within days time: sum over days
    xclim_history :
    tas=max(195,tas) applied to raw data; min of 194.73 detected;\n", + "[2021-03-22 17:04:54] frost_days: frost_days(tasmin=<array>, thresh='0 degC', freq='YS') - xclim version: 0.24.0.
    standard_name :
    days_with_air_temperature_below_threshold
    long_name :
    Number of frost days (tmin < 0c)
    description :
    Annual number of days with minimum daily temperature below 0℃.
  • " ], "text/plain": [ "\n", @@ -641,7 +648,7 @@ " description: Annual number of days with minimum daily temperature belo..." ] }, - "execution_count": 5, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -667,10 +674,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2021-02-26T21:50:42.670087Z", - "iopub.status.busy": "2021-02-26T21:50:42.669654Z", - "iopub.status.idle": "2021-02-26T21:50:42.690853Z", - "shell.execute_reply": "2021-02-26T21:50:42.690392Z" + "iopub.execute_input": "2021-03-22T21:04:57.032870Z", + "iopub.status.busy": "2021-03-22T21:04:57.032262Z", + "iopub.status.idle": "2021-03-22T21:04:57.122368Z", + "shell.execute_reply": "2021-03-22T21:04:57.121568Z" } }, "outputs": [ @@ -1050,7 +1057,7 @@ " NCO: 4.0.9\n", " climateindex_package_id: https://github.com/Ouranosinc/xclim\n", " product: derived climate index\n", - " institute_id: CCCS" ], "text/plain": [ @@ -1139,7 +1146,7 @@ " institute_id: CCCS" ] }, - "execution_count": 6, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" }