Skip to content

NextGen Lumped Forcings Driver

Jason Ducker edited this page May 17, 2024 · 4 revisions

NextGen Lumped Forcings Driver Demo

Overview of NextGen Lumped Forcings Driver Repo The NextGen Lumped Forcings Driver is a Python module that consists of preprocessing tools to calculate lumped meteorological forcings over NextGen catchments within a specified hydrofabric geopackage file. The finalized output of the NextGen lumped forcings driver directly provides the user with either NextGen configured catchment csv files or a single netcdf file that can be processed by the NextGen model engine forcings provider. This tool calculates lumped forcings using a Python wrapper rasterization tool called ExactExtract. All together, the NextGen lumped forcings engine driver has Python modules that can currently process AORC reanalysis data, Global Forecast System (GFS) data, Climate Forecast System (CFS) data, and High-Resolution Rapid Refresh (HRRR) data. The user can include a variety of optional arguments to the lumped forcings driver function, including NCAR bias calibration methods for forecast data, output file types, start/end times, and many more options that will be further described below.

Creating Python environment to execute scripts using Anaconda

  • Inside the NextGen Lumped Forcings Driver repo, you should find a environment.yml file that lists out the Python dependencies to execute the Python scripts
  • conda env create --name ngen_lumped_forcings_driver --file=environment.yml ; conda activate ngen_lumped_forcings_driver
  • Go to the ExtactExtract GitHub repo (ExactExtract Python Bindings and follow instructions within the "Python" directory there to manually install the ExactExtract bindings to your Python environment.

ExactExtract (Lumped) Regridding Method

image

  • ExactExtract is a C++ module that provides a fast and accurate algorithm for summarizing values in the portion of a raster dataset that is covered by a polygon (e.g. zonal statistics).
  • ExactExtract calculates weighted averages based on the percent coverage each raster (i.e. AORC grid cell) intersects the catchment polygon. The module can also accept external weights as part of the calculations.
  • We can now directly generate NextGen csv and netcdf formatted files for lumped sum forcings across a standard set of operational configurations.

NextGen Lumped Forcings Driver Python Driver Arguments image

Example Script Execution and Output

image

General Script Runtime Estimates for Forcing File Production image