Logo
  • Bay-Delta SCHISM Project
  • Installation And Getting Started
    • Overview
    • SCHISM Software Code/Binaries
      • Downloading
      • Compile Settings
    • Bay-Delta SCHISM Python Package
      • Downloading
      • Contents
      • Bathymetry
      • Complete Sample Inputs
      • Other Required Python Packages
    • Configuration System
      • Overview
      • Configuration File Locations and Priorities
      • Usage
      • Example Configuration File
    • VisIt SCHISM Plug-in
    • Links to tools
  • Bay-Delta SCHISM User Guide
    • Essentials for Running the Model
      • Running a Preprepared Setup
      • Overview of a Bay-Delta SCHISM Run
        • Grid and Spatial Data
          • Templates
          • Preprocessor
        • Time-dependent data
        • Files that Change with Both Mesh and Dates
        • Driver Files (param.tropic.nml, param.clinic.nml)
        • Other Nomenclature and Concepts
        • Organizing the Launch Directory
      • Required Files, Directory Structure and Recommended Study Practices
        • Required files and structure
          • SCHISM launch directory structure
          • Launch directory
          • Output directory
          • Atmospheric (sflux) directory
          • Study layout
        • Input/Output Units
          • File Units
          • Coordinate System
      • Vignette: Hindcast Bay Delta SCHISM at Delta Modeling Section with Preprocessor
        • Windows
        • Linux
        • Barotropic Simulation
        • Baroclinic
    • Model Inputs & Generation
      • Overview of Model Inputs
      • Spatial Inputs and the Preprocessor
        • Mesh Input File
          • 2dms
          • hgrid.gr3
        • Preprocesing Spatial Data
          • When to use the preprocessor
          • Running the preprocessor
            • Applying the template
            • Partial preprocessing for modification
            • Configuring the input (yaml)
          • Where to? Required files and directory structure
          • Volumetric Refinement and Smoothing, Depth Enforcement
            • Overview
            • Mathematical Formulation
            • Depth Enforcement
            • Shoreline Discovery Seeds
            • Preprocessor Integration
            • Inline Parameters (Annotated)
            • Examples
        • Hydraulic Structures
          • Where is the documentation?
          • Setting up the mesh to make structures easy
          • Preventing dry boundary messages
          • Important Bay-Delta examples
        • Vegetation
          • Aquatic Vegetation in SCHISM
          • Approximations and preprocessor
          • Effective Stem Density
          • Height
      • Boundaries and Sources: Time-Varying Inputs
        • Bay Delta Boundaries
        • Prepare Ocean Boundary (elev2D.th.nc)
        • Ocean Boundary Stabilization: Barotropic Warmup (uv3D.th.nc)
          • Introduction
          • Workflow
            • bctides.in
            • param.nml
            • vgrid.in
        • Inflow/Outflow Boundaries (flux.th)
          • Where are the data?
          • Clipping to run dates and conversion to elapsed time
          • What if I have to add or move a boundary?
          • Porting Boundaries from Other Sources
            • File Descriptions
            • Configuring the port_boundary yaml file
            • Use
            • Configuring the mapping file
          • Parsing Consumptive Use
            • Configuring the parse_cu yaml file
          • Plotting Input Boundaries
            • Use
        • Atmospheric setup (sflux_*.nc)
          • Basic introduction and requirements
          • Where are the data?
          • Pointing to the data with make_links_full.py
        • Key Run Parameters and Gotchas
          • Runtime settings
          • Hotstart settings
          • Nudging settings
          • Output requests
          • Settings that have historically gone awry
          • What happens when SCHISM versions get advanced?
      • Run Initialization and Nudging: Spatio-Temporal Inputs
        • Nudging Files
          • Introduction: What is nudging?
          • Do I need nudging?
          • Generating nudging files
          • Preparing for nudging with observed data
          • Nudging Example
          • Nudging Suffix Standards and Procedure
            • SCHISM Conventions
            • BayDeltaSCHISM Conventions
            • Using the set_nudge Utility
          • Sequencing your run
          • References
        • Run Initialization and Restart (Hotstart)
          • When do you need an initial condition or hotstart?
          • What is the difference between a cold and hot start?
          • Choosing a good start time
          • Creating a Hotstart for Hydro/Salt/Temp with schism_hotstart
            • Acquiring the data
          • Combining Hotstarts and Managing Restart Files
          • Hotstart Inventory Utility (schimpy.hotstart_inventory)
          • Automated Hotstart Combining (bdschism.combine_hotstart)
          • Why This Matters
    • Inspection of Model Setup
      • Test Suite for Prechecking Runs
        • Using the Tests
        • Writing Run Tests
          • Basics of testing
          • Test Fixtures
          • Markers
          • What to test
      • Checklists
        • Running a Processed Setup
        • Simple Hindcast Runs
          • ☐ Choose run dates
          • ☐ Apply template to existing mesh
          • ☐ Collect time series inputs
          • ☐ Hotstart (can be concurrent with barotropic)
          • ☐ Nudging (can be concurrent with barotropic)
          • ☐ Barotropic warmup
          • ☐ Baroclinic simulation
        • Sea level rise (SLR) runs
          • SLR-specific items
          • Workflow for setting up a SLR run where bathymetry and hydrology come from two separate, existing runs
    • Output
      • Flavors of output
      • What you should plan in advance
        • Request station output
          • station.in
          • flow_station_xsects.yaml and fluxflag.prop
        • Request dense output (netCDF/*.nc files)
      • Working with output files
        • staout_ files
        • flux.out files
        • Visualizing dense (.nc) output in VisIt
          • SCHISM VisIT Plug-in Manual
      • SCHISM’s extraction utilities
      • Quick validation plots
      • Where do we keep specialized postprocessing materials?
    • Computing Resources
      • Intro to Clusters and High Performance Computing
        • Anatomy of a Cluster
        • Figure: Cluster Components
        • Compilation
        • Job Submission
        • Compute Nodes and Message Passing
        • Input/Output and Scribes
        • Example Slurm Launch File
        • Example Shell Script to Run SCHISM
        • Intro to Batch Cloud Cluster
        • Figure: Azure Batch Cluster Components
      • Running on Azure Batch
        • Setup Azure
          • Download Azure Utilities
          • Login
          • Register with Azure
            • Set Console Variables
            • Create Azure Accounts
            • Removing a Resource Group
          • Download azure_dms_batch
        • Upload Applications
          • SCHISM
          • Python Packages
        • File Transfer Commands
          • azcopy commands
            • Generating SAS Links
          • azcopy options
        • Ensure Batch Quota
        • References
      • Step-by-step: HelloSCHISM on Azure
        • Initial Setup
        • Uploading Model Input Files
        • Set up Model Run Config
          • Spot Pricing Config
        • Run Simulation!
      • Step-by-step: Bay-Delta SCHISM on Azure
        • Initial Setup
        • Uploading Model Input Files
        • Running Model Simulation
          • Simple Run Config
          • Spot Pricing Config
    • Advanced Tasks and Concepts
      • Common Problems and Diagnosis
        • Where does SCHISM write error messages?
        • Common Problems
          • SIGSEGV or segmentation fault
          • The runs seems very slow compared to normal
          • Dry boundary
        • SCHISM Errors & Solutions
        • SCHISM Utility Errors & Solutions
      • Simulating water age
        • Compile with age
        • Parameters in param.nml
        • Additional *.ic files
        • Hotstart considerations
        • Typical output processing
      • Sea Level Rise
      • Sources, Sinks, Delta Channel Depletions
        • Identifying source locations and names in preprocessor
        • Delta and Suisun channel depletions
        • Making sure you includ the th files for sources/sinks
        • Tracer concentrations
      • Gridding the Horizontal Mesh
        • Meshing
          • Meshing considerations for SCHISM
            • Video (Joseph Zhang, SCHISM summit)
            • Recap/checklist
          • Getting to know SMS
            • Sample Data
            • Recap checklist
            • Presentation: clip_dems and efficient use of DEMS
          • Building the Bay-Delta mesh the standard way
          • Presentation: Meshing consideration for marshes and restoration
          • Merging/Stitching SMS mesh/maps (new work, flooded islands, etc)
            • Video
            • Recap/checklist
        • Vertical mesh setup
        • Checklist for after you change the mesh
        • Performance Tuning
          • The analyze_dt Utility
      • Utilities and Scripts
        • GIS Conversion
          • Mesh to shapefile
          • Polygons to/from shapefile
          • Polylines to/from shapefile
        • Hotstart Inventory: Convert iteration numbers to dates
        • model_time and multi_clip
  • Learning Resources for Bay-Delta SCHISM
    • General Resources and Tools
      • Bay-Delta SCHSIM Tutorials
      • Linux Hints for SCHISM
        • Using Linux from Windows
          • Basic connection
          • Copying files
          • XWindow Emulation
          • All-in-one: MobaXTerm
        • Copying a Run Safely
          • Special Case: Remote Computer Using RSA Keys
        • Symbolic links
        • Archives and Tarballs
        • Essential commands in a SCHISM context
    • Manuals
    • Getting Help
    • VIMS and Other External Resources
  • Calibration Report and References
    • Calibration
  • Contributing to the Documentation
    • Introduction
    • Getting Started
      • Windows
      • Linux
    • How it works
      • Local html pages
      • GitHub Pages
    • Examples and Concepts
      • Sphinx Documentation Principles
        • Code Auto-Documentation
        • Headings order
        • BayDeltaSCHISM Specifics
      • Sphinx examples
        • Math
        • Figures
        • Diagrams
          • Sphinx Mermaid Directive
          • Embedding Charts with SVG
        • Embedding Videos
      • Mermaid Chart Principles
        • BayDeltaSCHISM Standards
          • Symbols
          • Style
        • VS Code plugin
        • Cool stuff
          • Clickables
          • Icons in an Element
      • Click Documentation Principles
  • Training
  • Support
  • References
  • bdschism python package
    • Subpackages
      • bdschism.config package
        • Module contents
    • Submodules
    • bdschism.analyze_dt module
      • load_data()
      • plot_summarized_bad_actors()
      • summarize_elements()
      • write_bad_csv()
      • write_bad_shp()
    • bdschism.barrier_status module
    • bdschism.calc_ndoi module
    • bdschism.ccf_gate_height module
    • bdschism.combine_hotstart module
    • bdschism.combine_nc module
      • combine_nc()
      • combine_uv3d()
      • compare_dataarray_all_axes()
      • get_selected_files()
      • validate_time_step_consistency()
    • bdschism.config_cli module
    • bdschism.create_sflux_links module
    • bdschism.diff_gr3 module
      • diff_congruent_gr3()
    • bdschism.gen_elev2d module
    • bdschism.generate_realtime_elev2d module
    • bdschism.generate_visit_filelist module
      • visit_list()
    • bdschism.hotstart_date module
    • bdschism.hotstart_from_hotstart module
    • bdschism.hotstart_nudging_data module
    • bdschism.nc_metadata module
      • nc_metadata()
    • bdschism.parse_cu module
    • bdschism.plot_input_boundaries module
    • bdschism.port_boundary module
    • bdschism.profile_plot module
      • get_index_bounds()
      • nearest_neighbor_fill()
      • profile_plot()
      • set_index_bounds()
      • vertical_fill()
    • bdschism.read_dss module
    • bdschism.run_sequence module
    • bdschism.runtime_hotstart module
    • bdschism.set_mode module
    • bdschism.set_nudging module
    • bdschism.settings module
      • create_link()
      • get_output_from_interpolate_variables()
      • get_settings()
      • interpolate_variables()
    • bdschism.smscg_log_2_schism_th module
    • bdschism.synthetic_copy module
    • bdschism.synthetic_sflux module
    • bdschism.three_point_linear_norm module
      • ThreePointLinearNorm
        • ThreePointLinearNorm.autoscale()
        • ThreePointLinearNorm.autoscale_None()
        • ThreePointLinearNorm.inverse()
        • ThreePointLinearNorm.scaled()
    • bdschism.tide module
      • Node
        • Node.add_child()
        • Node.add_parent()
        • Node.get_ancestors()
        • Node.get_descendants()
        • Node.num_ancestors()
        • Node.num_descendants()
      • gen_constituents_tree()
      • get_astro_constituent_names()
      • get_constituents()
    • bdschism.uv3d module
    • bdschism.x2_buildpoints module
    • bdschism.x2_time_series module
    • bdschism.zone_utils module
      • face_aver()
      • face_aver_inst()
      • fill_ele_area()
      • fill_ele_area510()
      • gen_node_neibor_ele()
      • gen_node_wet_dry()
      • quad_area()
      • triangle_area()
    • Module contents
Bay-Delta SCHISM

Required Files, Directory Structure and Recommended Study Practices

New users often want to simply know an inventory of what files are required to get one basic model run going. This section provides that list. The section also describes practices for organizing a study that is reproducible, and spans several hypothetical alternatives.

You will need to move data around. Users who are new to Linux or who are preprocessing on Windows and copying to Linux should check out the Linux Hints for SCHISM, which covers several types of transfer as well as the indispensible topic of symbolic links for organinzing files.

Required files and structure

SCHISM launch directory structure

A basic SCHISM launch directory has a top level directory, an outputs directory and a sflux directory:

studyname    # See inventory below
├── outputs  # Empty, but required
└── sflux    # Mostly generated links, see below

Launch directory

The table is an inventory of files needed for a typical Bay-Delta SCHISM run. All the spatial inputs and driver files are copied over by the preprocessor. This inventory will inevitably occur if we change, say, the number or names of hydraulic structures. It will also be expanded when you use new modules, as indicated elsewhere in the user guide. The items in bold are symbolic links. These links follow the required SCHISM name but point to more the similar but more detailed or version controlled names in brackets, the specific names of which evolve over time or are modified in accordance with the rest of the user gude. Some files (param.nml,`bctides.in`,`vgrid.in`,nudging) are almost always links and are described in the section on the barotropic warmup run. The links are currently created manually, although we are contemplating ways to make it more automatic.

Some of the most important files like the horizontal grid (hgrid.gr3) are covered extensively in this user guide. Others files are on more subjects like albedo, populated in very simple ways and seldom changed. For documentation, the interested user can consult the optional input page of the SCHISM Manual at VIMS.

Table 1 Files for a SCHISM Run

*.gr3/ic/ll

*.in

*.nc

*.prop

*.th

*.nml

albedo.gr3

bctides.in

elev2D.th.nc

fluxflag.prop

ccfb_gate.th

param.nml

diffmax.gr3

[bctides.in.2d]

[hotstart.20160427.0.nc]

tvd.prop

delta_cross_channel.th

[param.nml.clinic]

diffmin.gr3

[bctides.in.3d]

hotstart.nc

[flux_base.th]

[param.nml.tropic]

estuary.gr3

hydraulics.in

SAL_nu.nc

flux.th

hgrid.gr3

source_sink.in

[SAL_nu_obsroms.nc]

grantline_barrier.th

krvel.gr3

station.in

[SAL_nu_roms.nc]

grantline_culvert.th

manning.gr3

vgrid.in

TEM_nu.nc

grantline_weir.th

rough.gr3

[vgrid.in.2d]

[TEM_nu_obsroms.nc]

midr_culvert_l.th

[salinity_nudge_obsroms.gr3]

[vgrid.in.3d]

[TEM_nu_roms.nc]

midr_culvert_r.th

[salinity_nudge_roms.gr3]

uv3D.th.nc

midr_weir.th

SAL_nudge.gr3

montezuma_boat_lock.th

sav_cd.gr3

montezuma_flash.th

sav_D.gr3

montezuma_radial.th

sav_h.gr3

msource.th

sav_N.gr3

[msource_v20230206.th]

TEM_nudge.gr3

oldr_head_barrier.th

[temperature_nudge_obsroms.gr3]

oldr_tracy_culvert.th

[temperature_nudge_roms.gr3]

oldr_tracy_weir.th

watertype.gr3

SAL_1.th

windfactor.gr3

TEM_1.th

windrot_geo2proj.gr3

tom_paine_sl_culvert.th

xlsc.gr3

[vsink_20230206.th]

vsink.th

[vsource_20230206.th]

vsource.th

[west_false_river_barrier_leakage.th]

Output directory

SCHISM requires a directory called outputs. It will be empty at the beginning of the launch.

Atmospheric (sflux) directory

The atmostpheric input directory is called sflux. It is a bit distinctive:

  • It is the only place we put symbolic links to resources outside the immediate study directory

  • We share a common database across simulations from a similar era. These are on all our cluster file systems and we distribute on CNRA open data portal. Note that these often point to the original source as in the example below.

  • During the copying-over phase this directory initially only has two files:

    • sflux_inputs.txt which is boilerplate that never changes and

  • make_links_full.py which contains links that are adjusted to populate all the symbolic links.

So in the preprocessor you would have this:

copy_resources:
...
sflux/sflux_inputs.txt   # the boilerplate file
sflux/make_links_full.py # adjusted to point to the atmospheric files

Once you go to the study and run make_links_ful.py, the contents should look like this:

/sflux
├── make_links_full.py
├── sflux_air_1.0001.nc -> ../../../data/atmos/baydelta_sflux_v20220916/baydelta_schism_air_20160427.nc
├── sflux_air_1.0002.nc -> ../../../data/atmos/baydelta_sflux_v20220916/baydelta_schism_air_20160428.nc
├── sflux_air_1.0003.nc -> ../../../data/atmos/baydelta_sflux_v20220916/baydelta_schism_air_20160429.nc
├── ...
├── sflux_inputs.txt
├── sflux_rad_1.0001.nc -> ../../../data/atmos/NARR/2016_04/narr_prc.2016_04_27.nc
├── sflux_rad_1.0002.nc -> ../../../data/atmos/NARR/2016_04/narr_prc.2016_04_28.nc
├── sflux_rad_1.0003.nc -> ../../../data/atmos/NARR/2016_04/narr_prc.2016_04_29.nc
...
├── sflux_rad_1.0001.nc -> ../../../data/atmos/NARR/2016_04/narr_rad.2016_04_27.nc
├── sflux_rad_1.0002.nc -> ../../../data/atmos/NARR/2016_04/narr_rad.2016_04_28.nc
├── sflux_rad_1.0003.nc -> ../../../data/atmos/NARR/2016_04/narr_rad.2016_04_29.nc
├── ...

Study layout

The overall structure of a study is discretionary. There are workflows that make transfer, sharing and reuse easier. The examples here are starting points – ultimately what you change depends on whether you have physical changes (e.g. restoration) or forcing changes (years, operations). Your choices also may depend on whether you are prepping on Windows and moving to Linux (see example below) or doing everything on Linux.

It is recommended, and a standard in the Delta Modeling Section, that you isolate isolate the preprocessing template input (e.g. yaml) from the SCHISM native input (e.g. gr3).

Here a possible study layout, commonly used in our group, for a simple study with one mesh, two sets of inputs time series run for each of two widely separated years, so a total of four simulations (base_2010, base_2020, alt_2010, alt_2020):

/study_dir.
├───preprocessing           # bay_delta template, modified for study
│   ├───geometry_name       # stage your spatial inputs generated by `prepare_schism` here
├───hotstart_nudge          # stage hotstart and nudging yaml files, csv, and hotstart/nudging inputs here
│   │───20100312            # example of different specific start dates for hotstart and nudging files
│   └───20200120            # example of different specific start dates for hotstart and nudging files
└───th_files
|   │───repo                # Copy repository timeseries data here
│   │───elapsed             # Could collect and stage your elapsed time series here and move them (e.g. Windows) or do it in simulation directory
│   │   ├───with_alt            # Alternative scenario time series converted to elapsed time and staged here
│   │   └───without_action      # Baseline scenario time series converted to elapsed time and staged here
│   └───project             # Preprocessed, datetime stamped files go here
│       ├───with_alt            # Alternative scenario time series with datetime stamps
│       └───without_action      # Baseline scenario time series with datetime stamps
├───simulations             # schism launch directories for each simulation go here
│   ├───base_2010           # schism launch directory for one alternative
│   │   │───sflux
│   │   │───outputs
│   │   └───outputs.tropic  # Generated during the barotropic warmup run and moved
│   ├───base_2020           # schism launch dir for second alternative
...
│   └───alt_2020            # schism launch dir for nth alternative
└───postprocessing          # postprocessing scripts
    ├───base_2010           # postprocessing outputs for one alternative
    ├───base_2020           # postprocessing outputs for second alternative
...
    └───alt_2020            # postprocessing outputs for nth alternative

Note

The preprocessor prepare_schism has a key word prepro_output_dir which is set to “../prepro_out” in the main_bay_delta.yaml template. You might consider changing this to the run directory but please don’t use “.”.

For a run that has two different physical domains (e.g. with and without restoration) studied over one period you might do something like this:

study_dir
├───preprocessing
│   ├───base
│   └───restoration
├───hotstart_nudging
│   ├───base
│   │   ├───20100312
│   │   └───20200120
│   └───restoration
│       ├───20100312
│       └───20200120
├───simulations
│   ├───base
│   │   ├───outputs
│   │   ├───outputs.tropic
│   │   └───sflux
│   └───restoration
│       ├───outputs
│       ├───outputs.tropic
│       └───sflux
├───th_files
│   ├───elapsed
│   └───project
└───postprocessing
  ├───base
  └───restoration

Input/Output Units

File Units

SCHISM input and output files are described in the SCHISM manual, however the input file units and output file units are not always clear. The following table summarizes the units for the most commonly used input and output files.

Table 2 Common SCHISM Input/Output Units

Variable

Unit

Relevant Inputs

Relevant Outputs

Water Surface Elevation

m (positive up)

elev2D.th, elev.ic, uv3D.th.nc

staout_1 (water surface elevation), out2d_*.nc

Bathymetry

m (positive down)

hgrid.gr3

out2d_*.nc

Velocity (u, v)

m/s

sflux_air_1.*.nc (wind speed), uv3D.th.nc (water velocity)

horizontalVelX_*.nc, horizontalVelY_*.nc, staout_3 (wind u), staout_4 (wind v), staout_7 (hydro u), staout_8 (hydro v), staout_9 (hydro w)

Salinity

PSU

SAL_*.th, SAL_nu.nc

salinity_*.nc, staout_6 (salinity)

Water Temperature

°C

TEM_*.th, TEM_nu.nc

temperature_*.nc, staout_5 (water temperature)

Generic Tracer

1 (unitless. volumetric fraction)

gen_*.th

Air Temperature

K (2m AGL)

sflux_air_1.*.nc

N/A

Specific Humidity

1 (2m AGL)

sflux_air_1.*.nc

N/A

Atmospheric pressure

Pa (reduced to MSL)

sflux_air_1.*.nc

staout_2 (air pressure)

Precipitation

kg/m²/s (flux)

sflux_prc_1.*.nc

N/A

Shortwave radiation

W/m² (long- and short-wave)

sflux_rad_1.*.nc

N/A

Evaporation

kg/m²/s (flux)

N/A

out2d_*.nc

Suspended Sediment Concentration (ssc)

kg/m³

SED_hvar_[class].ic (initial condition for ssc for each size class, in kg/m³), bed_frac_[class].ic (initial bed composition fraction for each size class, unitless), bedthick.ic (initial bed thickness, in m), imorphogrid.gr3 (scale applied to depth change at each node, unitless, used only when imorpho==1).

sedConcentration_[class]_*.nc

Coordinate System

The geospatial projection for BayDeltaSCHISM uses NAD83 UTM Zone 10N with horizontal coordinates in meters. Vertical coordinates are against NAVD88. Time is in seconds since whichever start date specified in the param.nml.

Previous Next

© Copyright 2014,2020 California Department of Water Resources.

Built with Sphinx using a theme provided by Read the Docs.