Contents
The pdp module¶
The pdp package ties together all of the aspects of the PCIC Data Portal (pdp). The base pdp module configures the application, sets up a URL hierarchy (a DispatcherMiddleware instance), instantiates all of the responder applications and binds them to various DispatcherMiddlewares.
-
class
pdp.error.
ErrorMiddleware
(wrapped_app)¶ This class is a WSGI Middleware that can be used as a top-level exception handler. It catches SQLAlchemyError, EnvironmentError (and subclasses)) and the general `Exception`s on application call. It also catches general `Exception`s during iteration over the response_iter.
-
pdp.minify.
wrap_mini
(paths, basename='pdp', debug=True)¶ Parameters: - paths (list of strings) – list of paths to JavaScript files that are to be minified
- basename (string) – a prefix to prepend to the minified filename. The minified filename will be {basename}-min-{pdp_version}.js
- debug (bool) – If set to True, no minification takes place and the input paths are returned as is.
Returns: list of strings – the strings is a filesystem path to the minified version of the file. If debug is set to True, the return value will be equal to the input paths.
This portal serves an ensemble of several CanESM5 runs downscaled by BCCAQv2 for all Canada. As these are CMIP6 datasets, the presentation is congruent with the rest of the CMIP6 datasets served by bccaq2_cmip6.py, including using the same ensemble lister.
This portal serves the CMIP6 data downscaled by BCCAQv2 for all Canada. The UI is similar to the CMIP5 BCCAQv2 data, and the use the same map component (canada_ex_map.js), but different frontend controllers (cmip6_bccaq2_app.js). It also contains additional headings for the PCIC12 models.
This portal serves the version 2 BCCAQ downscaled (4km) data for all Canada.
The pdp.portals.bc_prism module configures a raster portal to serve the 1970-2000, 1981-2010, and 1991-2020 climatologies and monthly climate data for 800 meter resolution PRISM dataset for BC
The pdp.portals.gridded_observations module configures a raster portal which serves gridded climate data used by the VIC model.
This portal serves routed streamflow data for the Peace, Fraser, and Columbia watersheds. The data is CSV files; users select a station and receives a single CSV file containing all timestamps for all runs (model / scenario) available for that station. It serves every file in a directory specified by the resource yaml.
Metadata about these files, such as station locations and name, is not served by this portal; the front end retrieves it from a separate CSV.
This portal uses the hydro_stn_app frontend.
This portal serves an ensemble of several CanESM5 runs downscaled by MBCn for all Canada. As these are CMIP6 datasets, the presentation is congruent with the rest of the CMIP6 datasets served by mbcn_cmip6.py, including using the same ensemble lister.
This portal serves the CMIP6 data downscaled by MBCn for all Canada. The UI is similar to the CMIP6 BCCAQv2 data, and the use the same map component (canada_ex_map.js), but different frontend controllers (cmip6_mbcn_app.js).
The pdp.portals.pcds module configures the Provincial Climate Data Set portal.
The pdp.portals.vic_gen2 module configures a raster portal which serves output from the VIC Hydrologic Model with CMIP5 input. The spatial domain is specific watersheds within BC and the model was run using CMIP5 forcings tuned with the PNWNAMet forcings.
The dataset is displayed by the portal code, vic_app.js, and map code, vic_map.js.