Prepare Ocean Boundary (elev2D.th.nc)
The ocean boundary relies on elev2D.th.nc for both barotropic and baroclinic runs for historical cases. In the baroclinic case we also specify the u- and v-velocity boundary condition in the uv3D.th.nc file which is generated from the barotropic run (See Generate uv3D.th.nc for more info on the uv3D.th.nc file generation).
Note
For future scenarios, you could use tidal components to set the ocean boundary. This case is demonstrated in the bctides.in.3d.tide.yaml example.
The elev2D.th.nc file is a 2D time-varying netCDF file that provides the ocean boundary condition for the model. It contains the elevation (sea surface height) at the ocean boundary over time for each element along the ocean boundary.
Fig. 4 Ocean boundary elements shown in blue. The line is specified in open_boundary.yaml which gets preprocessed into the hgrid.gr3 file and is used to interpolate the tide gauge data to the boundary. The resulting elev2D.th.nc file has elevation values for each of these boundary elements over time.
The timeseries is interpolated from NOAA’s Monterey and Point Reyes tide gauge stations (Fig. Fig. 4) using the bdschism utility gen_elev2d. You can use this in the command line with bds gen_elev2d:
bds gen_elev2d
Script to create elev2D.th.nc boundary condition from Point Reyes and Monterey NOAA file
Example Usage:
> gen_elev2D.py –outfile elev2D.th.nc –stime=2009-03-12 –etime=2010-01-01 9415020_gageheight.csv 9413450_gageheight.csv
> bds gen_elev2d –outfile elev2D.th.nc –hgrid=hgrid.gr3 –stime=2025-8-27 –etime=2026-01-04 –slr 0.0 “/path/to/noaa_pryc1_9415020_elev_*.csv” “path/to/noaa_mtyc1_9413450_elev_*.csv”
Usage
bds gen_elev2d [OPTIONS] [FILES]...
Options
- --stime <stime>
Start time in ISO-like format 2009-03-12T00:00:00. Time part and ‘T’ are optional.
- --etime <etime>
End time.
- --hgrid <hgrid>
Name of hgrid file if not hgrid.gr3
- --outfile <outfile>
Name of output file: either elev2D.th or elev2D.th.nc
- --slr <slr>
Scalar sea level rise increment
Arguments
- FILES
Optional argument(s)