Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update nbs, tutorial data and html versions #78

Merged
merged 8 commits into from
May 9, 2024
Merged

Commits on Mar 8, 2024

  1. Configuration menu
    Copy the full SHA
    e42fe39 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. homepage nb 2: refresh output for Jenkins

    ```
      _ PAVICS-landing-fix_nbs_jupyter_alpha_refresh_output/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb::Cell 0 _
      Notebook cell execution failed
      Cell 0: Cell outputs differ
    
      Input:
      import warnings
    
      import xarray as xr
      from IPython.display import display  # Fancy representation of xarray objects
      from siphon.catalog import TDSCatalog
    
      warnings.simplefilter("ignore")
      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)
    
      # DAP link for this demo
      ds_url = cat.datasets[0].access_urls["OPENDAP"]
    
      # xarray.Dataset
      ds = xr.open_dataset(ds_url, chunks=dict(time=256 * 2, lon=32, lat=32))
      display(ds)
      a = ds.tasmin.isel(time=0).plot(figsize=(10, 4))
    
      Traceback:
       mismatch 'text/plain'
    
       assert reference_output == test_output failed:
    
        '<xarray.Data...id:       NCC' == '<xarray.Data...id:       NCC'
    
        Skipping 957 identical leading characters in diff, use -v to show
        -   driving_experiment:         historical,rcp85
        +   driving_model:              NorESM1-M
              ...                         ...
              frequency:                  day
              modeling_realm:             atmos
              target_dataset:             CANADA : ANUSPLIN interpolated Canada daily 3...
              target_dataset_references:  CANADA : https://doi.org/10.1175/2011BAMS3132...
              driving_institution:        Norwegian Climate Centre
              driving_institute_id:       NCC
    
      _ PAVICS-landing-fix_nbs_jupyter_alpha_refresh_output/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb::Cell 1 _
      Notebook cell execution failed
      Cell 1: Cell outputs differ
    
      Input:
      from clisops.core import subset
    
      lon = [-75.4, -85, -65.5]  # Longitude
      lat = [46.67, 41, 55.3]  # Latitude
    
      ds_gridpoint = subset.subset_gridpoint(ds, lon=lon, lat=lat)
      display(ds_gridpoint)
    
      # Plot first year of tasmax data
      a = ds_gridpoint.tasmax.isel(time=slice(0, 365)).plot.line(x="time", figsize=(10, 4))
    
      Traceback:
       mismatch 'text/plain'
    
       assert reference_output == test_output failed:
    
        '<xarray.Data...id:       NCC' == '<xarray.Data...id:       NCC'
    
        Skipping 892 identical leading characters in diff, use -v to show
        -   driving_experiment:         historical,rcp85
        +   driving_model:              NorESM1-M
              ...                         ...
              frequency:                  day
              modeling_realm:             atmos
              target_dataset:             CANADA : ANUSPLIN interpolated Canada daily 3...
              target_dataset_references:  CANADA : https://doi.org/10.1175/2011BAMS3132...
              driving_institution:        Norwegian Climate Centre
              driving_institute_id:       NCC
    
      _ PAVICS-landing-fix_nbs_jupyter_alpha_refresh_output/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb::Cell 3 _
      Notebook cell execution failed
      Cell 3: Cell outputs differ
    
      Input:
      # Specify the longitude and latitude boundaries
      lon_bnds = [-80.5, -60.2]
      lat_bnds = [44, 55]
    
      ds1 = subset.subset_bbox(ds, lon_bnds=lon_bnds, lat_bnds=lat_bnds)
      display(ds1)
    
      # Plot a map of first timestep
      a = ds1.tasmax.isel(time=0).plot()
    
      Traceback:
       mismatch 'text/plain'
    
       assert reference_output == test_output failed:
    
        '<xarray.Data...id:       NCC' == '<xarray.Data...id:       NCC'
    
        Skipping 955 identical leading characters in diff, use -v to show
        -   driving_experiment:         historical,rcp85
        +   driving_model:              NorESM1-M
              ...                         ...
              frequency:                  day
              modeling_realm:             atmos
              target_dataset:             CANADA : ANUSPLIN interpolated Canada daily 3...
              target_dataset_references:  CANADA : https://doi.org/10.1175/2011BAMS3132...
              driving_institution:        Norwegian Climate Centre
              driving_institute_id:       NCC
    ```
    tlvu committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    97d2b8c View commit details
    Browse the repository at this point in the history
  2. homepage nb3: refresh output for Jenkins

    ```
      _ PAVICS-landing-fix_nbs_jupyter_alpha_refresh_output/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb::Cell 2 _
      Notebook cell execution failed
      Cell 2: Cell outputs differ
    
      Input:
      import xclim
    
      # Access some station data
      url = "https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/dodsC/datasets/station_obs/ECCC_AHCCD_gen3_temperature.ncml"
      ds_stat = xr.open_dataset(url, chunks=dict(station=1))
      istat = 115
      # Compare use of differernt percent tolerance levels  (tolerance == 0.1)
      plt.figure(figsize=(15, 10))
      color = ["blue", "green", "orange"]
    
      for i, tol in enumerate([0.25, 0.1, 0.05]):
          plt.subplot(3, 1, i + 1)
          with xclim.set_options(
              check_missing="pct", missing_options={"pct": {"tolerance": tol}}
          ):
              # compute yearly max tasmax
              tx_mean = xclim.atmos.tx_mean(
                  tasmax=ds_stat.isel(station=istat).tasmax, freq="YS"
              )
    
              tx_mean.plot(
                  marker="o",
                  color=color[i],
                  label=f"{len(tx_mean.dropna('time').values)} \
                           valid years w/ <={tol*100}% missing data",
              )
              plt.title("")
              plt.xlabel("")
              if i == 0:
                  name = str(ds_stat.isel(station=istat).station_name.values)
                  plt.title(f"{name.capitalize().replace('_',' ')} Station")
    
              elif i == 2:
                  plt.xlabel("time")
    
              plt.legend(loc="lower right")
    
      Traceback:
      Unexpected output fields from running code: {'stderr'}
    ```
    tlvu committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    fac36ff View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. homepage nb3: update output for Jenkins

    Attempt to fix the following error:
    ```
      _ PAVICS-landing-fix_nbs_jupyter_alpha_refresh_output/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb::Cell 2 _
      Notebook cell execution failed
      Cell 2: Cell outputs differ
    
      Input:
      import xclim
    
      # Access some station data
      url = "https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/dodsC/datasets/station_obs/ECCC_AHCCD_gen3_temperature.ncml"
      ds_stat = xr.open_dataset(url, chunks=dict(station=1))
      istat = 115
      # Compare use of differernt percent tolerance levels  (tolerance == 0.1)
      plt.figure(figsize=(15, 10))
      color = ["blue", "green", "orange"]
    
      for i, tol in enumerate([0.25, 0.1, 0.05]):
          plt.subplot(3, 1, i + 1)
          with xclim.set_options(
              check_missing="pct", missing_options={"pct": {"tolerance": tol}}
          ):
              # compute yearly max tasmax
              tx_mean = xclim.atmos.tx_mean(
                  tasmax=ds_stat.isel(station=istat).tasmax, freq="YS"
              )
    
              tx_mean.plot(
                  marker="o",
                  color=color[i],
                  label=f"{len(tx_mean.dropna('time').values)} \
                           valid years w/ <={tol*100}% missing data",
              )
              plt.title("")
              plt.xlabel("")
              if i == 0:
                  name = str(ds_stat.isel(station=istat).station_name.values)
                  plt.title(f"{name.capitalize().replace('_',' ')} Station")
    
              elif i == 2:
                  plt.xlabel("time")
    
              plt.legend(loc="lower right")
    
      Traceback:
      Missing output fields from running code: {'stderr'}
    ```
    tlvu committed May 1, 2024
    Configuration menu
    Copy the full SHA
    9c5720e View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    b557090 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/fix_nbs_jupyter_alpha' into fix_…

    …nbs_jupyter_alpha_refresh_output
    tlvu committed May 3, 2024
    Configuration menu
    Copy the full SHA
    4e55eee View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Merge branch 'master' of https://github.com/Ouranosinc/PAVICS-landing

    …into fix_nbs_jupyter_alpha
    
    � Conflicts:
    �	content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb
    �	content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb
    �	content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.html
    �	content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb
    �	content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb
    �	content/notebooks/climate_indicators/output.zip
    �	src/assets/notebooks/PAVICStutorial_ClimateDataAnalysis-4Ensembles.html
    tlogan2000 committed May 8, 2024
    Configuration menu
    Copy the full SHA
    6c95a38 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    becdb28 View commit details
    Browse the repository at this point in the history