Ouranosinc / PAVICS-landing

The landing page serving as the entrance to PAVICS
1 stars 0 forks source link

homepage nb 3: fix for Jenkins, pint redefinition warning gone in new Jupyter env #68

Closed tlvu closed 2 months ago

tlvu commented 1 year ago

Wait for PR https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/121 merged before merging this one.

  _ PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb::Cell 0 _
  Notebook cell execution failed
  Cell 0: Cell outputs differ

  Input:
  import os

  os.environ["USE_PYGEOS"] = "0"  # force use Shapely with GeoPandas

  import warnings

  import numba

  warnings.simplefilter("ignore", category=numba.core.errors.NumbaDeprecationWarning)

  import geopandas as gpd
  import matplotlib.pyplot as plt
  import xarray as xr
  from clisops.core import subset
  from dask.diagnostics import ProgressBar
  from siphon.catalog import TDSCatalog
  from xclim import atmos

  warnings.simplefilter("ignore")
  # TODO change address
  url = "https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/catalog/datasets/simulations/bias_adjusted/cmip5/ouranos/cb-oura-1.0/catalog.xml"  # TEST_USE_PROD_DATA

  # Create Catalog
  cat = TDSCatalog(url)

  # Subset over the Gasp�� peninsula in eastern Quebec
  gaspe = gpd.GeoDataFrame.from_file(
      "/notebook_dir/pavics-homepage/tutorial_data/gaspesie_mrc.geojson"
  )
  ds = subset.subset_shape(
      xr.open_dataset(cat.datasets[0].access_urls["OPENDAP"], chunks=dict(time=256)),
      shape=gpd.GeoDataFrame(geometry=gaspe.buffer(0.05)),
  )

  # What we see here is only a representation of the full content, the entire data set hasn't been loaded.
  display(ds)

  # plot of single day tasmin
  a = ds.tasmin.isel(time=0).plot(figsize=(10, 4))

  Traceback:
  Missing output fields from running code: {'stderr'}
review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

tlvu commented 2 months ago

Replaces by https://github.com/Ouranosinc/PAVICS-landing/pull/78