Skip to content

BMI_Tutorial

Neptune-Meister edited this page Sep 26, 2024 · 20 revisions

BMI & Coastal Tutorial

Application scope

The tutorial runs on top of the standard Lower Colorado V4 tutorial directory structure, i.e., it runs entirely in t-route's V4 mode, and with HYfeatures data. Due to its simplicity, the Cedar Bayou example is used to demonstrate the capability and reported on here. The following inputs will need to be collected:

  • Cedar Bayou geopackage (of geopackage containing same), e.g., Diff_Texas_CedarBayou_NGENv201.gpkg.
  • Coastal boundary input file (in this example, DFLOW output), e.g., coastal_boundary_input_file = boundary_forcing/FlowFM_0000_his.nc
  • Coastal domain yaml boundary file, e.g., domain/coastal_domain_LC_US_DS.yaml.
  • qlat input forcing files, e.g., qlat_file_pattern_filter = "*.CHRTOUT_DOMAIN1.csv" in a designated qlat_input_folder.
  • usgs timeslices and rfc input folders (other gages are not enabled; e.g., usgs_timeslices and rfc_timeseries)

In the main BMI script, reference is made to a dedicated Standard_Coastal_AnA.yaml script. That script needs to be adapted to the aforementioned inputs.

Description of main script

The main script run_BMI_Coastal.py is available in the standard repository of t-route, in the test/LowerColorado_TX_v4 folder. It relies on the following standard and t-route libraries:

Standard libraries:

import sys
import glob
import os
import numpy as np
import pandas as pd
import geopandas as gpd
import pickle
from datetime import datetime, timedelta
import time
import xarray as xr

T-route repository libraries:

import bmi_troute
import bmi_DAforcing
from troute.HYFeaturesNetwork import HYFeaturesNetwork
from troute.AbstractNetwork import *
import bmi_df2array as df2a