This guide explains how to run the SCHISM-ESMF executables and set up example cases.
After building, two executables are created in build/src/:
main_esmfesmf.rc for ESMF-specific settingsmain_nuopcBoth executables require a standard SCHISM setup with these files:
param.nml - Main SCHISM configurationvgrid.in - Vertical grid definitionhgrid.gr3 - Horizontal gridbctides.in - Boundary conditions (if applicable)drag.gr3, manning.gr3 - Bottom friction parametersmain_esmf:
esmf.rc - ESMF configuration (optional)schism_component.cfg - SCHISM component settingsmain_nuopc:
field_dictionary.yaml - NUOPC field mappingsschism_component.cfg - Component configurationThe Test_QuarterAnnulus example demonstrates basic SCHISM-ESMF functionality.
cd example/Test_QuarterAnnulus
# Generate grid and setup
make setup
# Run with ESMF driver
../../build/src/main_esmf
# Or run with NUOPC driver
../../build/src/main_nuopc
What it does:
outputs/ directoryExpected output files:
outputs/schout_*.nc - Model output (elevation, velocity, salinity, etc.)outputs/mirror.out - Runtime logoutputs/nonfatal_* - Warning messages (if any)Tests temperature advection and diffusion.
cd example/Test_HeatPool
# Run the example
make
# Check results
ls outputs/
Tests Courant-Friedrichs-Lewy condition handling.
cd example/cfl
# Run the test
make
# Analyze timestep adaptation
grep "dt=" outputs/mirror.out
param.nmlStandard SCHISM namelist. Key parameters for ESMF runs:
&CORE
dt = 100.0 ! Time step (seconds)
rnday = 1.0 ! Run duration (days)
start_year = 2000
start_month = 1
start_day = 1
start_hour = 0
/
&OPT
ipre = 1 ! Pre-processing option
ibc = 1 ! Boundary condition type
ibtp = 1 ! Baroclinic/barotropic option
/
&SCHOUT
nhot_write = 8640 ! Hotstart output frequency
iout_sta = 1 ! Station output
nspool_sta = 10 ! Station output frequency
/
schism_component.cfgESMF/NUOPC component configuration:
component_name: SCHISM
mesh_file: hgrid.gr3
start_time: 2000-01-01T00:00:00
stop_time: 2000-01-02T00:00:00
timestep: 100s
output_interval: 3600s
field_dictionary.yaml (NUOPC only)Defines coupling fields:
sea_surface_height_above_geoid:
standard_name: sea_surface_height_above_geoid
canonical_units: m
description: Sea surface elevation relative to geoid
sea_water_temperature:
standard_name: sea_water_temperature
canonical_units: K
description: Water temperature
sea_water_velocity:
standard_name: sea_water_velocity
canonical_units: m s-1
description: Water velocity components
Both executables support parallel execution:
# Using mpirun
mpirun -np 4 ../../build/src/main_esmf
# Using mpiexec
mpiexec -n 4 ../../build/src/main_nuopc
# SLURM on HPC
srun -n 48 ../../build/src/main_esmf
MPI considerations:
param.nml → nproc_nd and nproc_ev for processor distribution# Create horizontal grid (use SMS, QGIS, or Python tools)
# → hgrid.gr3
# Create vertical grid
# → vgrid.in
# Generate boundary conditions
# → bctides.in
# Copy template
cp example/Test_QuarterAnnulus/param.nml .
# Edit for your domain
vi param.nml
# Copy ESMF config
cp example/Test_QuarterAnnulus/schism_component.cfg .
# For NUOPC coupling
cp example/TripleSchism/field_dictionary.yaml .
# Link executable
ln -s /path/to/build/src/main_esmf .
# Execute
./main_esmf
# View runtime log
tail -f outputs/mirror.out
# Check for fatal errors
grep -i "fatal\|error" outputs/mirror.out
# Check for warnings
ls outputs/nonfatal_*
“Cannot open file”:
param.nml“MPI error”:
“Grid error”:
utility/Grid_Scripts/“Timestep too large”:
dt in param.nmldt < dx/c where c is wave speedSCHISM-ESMF produces CF-compliant NetCDF files:
import xarray as xr
# Load output
ds = xr.open_dataset('outputs/schout_0001.nc')
# View variables
print(ds.data_vars)
# Plot elevation
ds.elevation.isel(time=0).plot()
# Launch VisIT
visit
# Open schout_*.nc files
# Add plots: Pseudocolor, Vector, etc.
cd $SCHISM_DIR/utility/Post-Processing-Fortran/
# Combine outputs
./combine_output11 -i ../../outputs
# Extract time series
./read_output10_allnodes.f90
nspool settings)dt improves performanceiof_* flags in param.nml)For coupling SCHISM with other models (atmosphere, wave, etc.):
main_nuopc - provides NUOPC coupling layerSee example/TripleSchism/ for multi-SCHISM coupling example.
| Issue | Solution |
|---|---|
| Segmentation fault | Check array bounds, increase stack size (ulimit -s unlimited) |
| NaN values | Reduce timestep, check boundary conditions |
| Slow performance | Optimize processor count, reduce output frequency |
| Missing output | Check iof_* flags in param.nml, verify disk space |
| Coupling errors | Validate field dictionary, check unit conversions |
scripts/ directory for setup automationPlot/ directory for visualization scriptsdoc/ for detailed documentationLast updated: November 2025
Tested with: SCHISM 5.10+, ESMF 8.7-8.9