XBeach bulk data forcing¶
Demo notebook with usage examples
Overview¶
XBeach is normally run in the nearshore, over relative small spatial scales. On these scales, forcing input data to the model can often be assumed to be "stationary". For example, in a typical domain of O(1) km, input forcing such as wind, tide elevation and wave boundary could be considered to be relatively constant across the domain.
Rompy-XBeach provides Data objects to support bulk forcing, i.e., forcing data defined for a single point location by tabular data. In contrast to other data objects such as the grid- or station-based ones, point-based objects deal with data sources that do not require spatial coordinates and can be represented for example by a CSV file or a Pandas DataFrame. Source objects are available to represent these data types.
%load_ext autoreload
%autoreload 2
from pathlib import Path
from datetime import datetime, timedelta
import pandas as pd
import xarray as xr
import shutil
import warnings
warnings.filterwarnings("ignore")
def generate_output_directory(path="bulk-forcing-demo"):
"""Generate the output dir for the examples, removing it if it already exists."""
outdir = Path(path)
if outdir.exists():
shutil.rmtree(outdir)
outdir.mkdir()
return outdir
datadir = Path("../../../rompy-xbeach/tests/data")
Let's start by defining common grid and timerange objects to use with the different examples in this Notebook.
from rompy.core.time import TimeRange
from rompy_xbeach.grid import RegularGrid
# Model times
times = TimeRange(start="2023-01-01T00", end="2023-01-01T12", interval="1h")
# Model grid
grid = RegularGrid(
ori=dict(x=115.594239, y=-32.641104, crs="epsg:4326"),
alfa=347.0,
dx=10,
dy=15,
nx=230,
ny=220,
crs="28350",
)
Wind forcing¶
Bulk wind forcing can be prescribed by the WindPoint object which currently supports input timeseries data from CSV file or a Pandas DataFrame object.
from rompy.core.source import SourceTimeseriesCSV
from rompy_xbeach.forcing import WindPoint, WindVector, WindScalar
# Generate the output directory
destdir = generate_output_directory()
# Input data source definition
source = SourceTimeseriesCSV(
filename=datadir / "wind.csv",
tcol="time",
)
# Wind object
wind = WindPoint(
source=source,
wind_vars=WindScalar(spd="wspd", dir="wdir"),
)
# Generating the forcing data
namelist = wind.get(destdir=destdir, grid=grid, time=times)
namelist
{'windfile': 'wind-20230101T000000-20230101T120000.txt'}
# Check the content of the generated wind file
windfile = destdir / namelist["windfile"]
print(windfile.read_text())
0.00 7.24 149.87 3600.00 7.15 150.90 7200.00 7.11 154.32 10800.00 7.27 159.03 14400.00 7.54 163.52 18000.00 7.97 167.57 21600.00 8.36 170.24 25200.00 8.77 172.81 28800.00 9.17 174.48 32400.00 9.54 174.92 36000.00 9.78 177.59 39600.00 10.09 175.46 43200.00 10.19 172.35
Tide forcing¶
Constituents¶
Tide timeseries can be generated with the TideConsPoint object from tabular constituents data such as harmonic constituents for a site. These data can currently be prescribed from CSV files with columns representing tide elevation amplitude and phase for the different constituents. Similar to the TideGrid object, oceantide is used to convert these into elevation timeseries.
from rompy_xbeach.source import SourceTideConsPointCSV
from rompy_xbeach.forcing import TideConsPoint
# Generate the output directory
destdir = generate_output_directory()
# Input data source definition
source = SourceTideConsPointCSV(
filename=datadir / "tide_cons_station.csv",
acol="amplitude",
pcol="phase",
ccol="constituent",
)
# Tide object
tide = TideConsPoint(source=source)
# Generating the forcing data
namelist = tide.get(destdir=destdir, grid=grid, time=times)
print(namelist)
{'zs0file': 'tide-20230101T000000-20230101T120000.txt', 'tideloc': 1, 'tidelen': 13}
# Check the content of the generated tide elevation file
zs0file = destdir / namelist["zs0file"]
print(zs0file.read_text())
0.00 -0.20 3600.00 -0.15 7200.00 -0.09 10800.00 -0.02 14400.00 0.06 18000.00 0.13 21600.00 0.19 25200.00 0.24 28800.00 0.26 32400.00 0.26 36000.00 0.23 39600.00 0.20 43200.00 0.15
Water level¶
Alternatively, tide input (or, more generically, water level boundary) can be prescribed from timeseris type data instead of tide constituents. Three objects are available to support gridded-, station- and point-based water level timeseries data. Here we are going to demonstrate WaterLevelPoint which supports point-based ("bulk") type data.
from rompy_xbeach.forcing import WaterLevelPoint
# Generate the output directory
destdir = generate_output_directory()
# Input data source definition
source = SourceTimeseriesCSV(filename=datadir / "ssh.csv", tcol="time")
# Tide object
tide = WaterLevelPoint(source=source, variables=["ssh"])
# Generating the forcing data
namelist = tide.get(destdir=destdir, grid=grid, time=times)
print(namelist)
{'zs0file': 'tide-20230101T000000-20230101T120000.txt', 'tideloc': 1, 'tidelen': 25}
# Check the content of the generated tide elevation file
zs0file = destdir / namelist["zs0file"]
print(zs0file.read_text())
0.00 -0.61 3600.00 -0.48 7200.00 -0.33 10800.00 -0.16 14400.00 0.03 18000.00 0.25 21600.00 0.47 25200.00 0.68 28800.00 0.87 32400.00 1.01 36000.00 1.08 39600.00 1.06 43200.00 0.95 46800.00 0.75 50400.00 0.47 54000.00 0.14 57600.00 -0.20 61200.00 -0.52 64800.00 -0.79 68400.00 -0.99 72000.00 -1.11 75600.00 -1.14 79200.00 -1.10 82800.00 -1.00 86400.00 -0.85
Wave boundary¶
Wave boundary can be defined from timeseries of wave parameters defined form either CSV or pandas DataFrame input source data. Two types of XBeach boundary are currently supported with timeseries type source:
- JONS: BoundaryPointParamJons
- JONSTABLE: BoundaryPointParamJonstable
JONS¶
from rompy_xbeach.boundary import BoundaryPointParamJons
# Generate the output directory
destdir = generate_output_directory()
# Input data source definition
source = SourceTimeseriesCSV(filename=datadir / "wave-params-20230101.csv")
# Wind object
wb = BoundaryPointParamJons(
source=source,
hm0="phs1",
tp="ptp1",
mainang="pdp1",
gammajsp="ppe1",
dspr="pspr1",
)
# Generating the forcing data
namelist = wb.get(destdir=destdir, grid=grid, time=times)
namelist
{'wbctype': 'jons', 'bcfile': 'jons-filelist.txt'}
# Check the content of the generated boundary file
bcfile = destdir / namelist["bcfile"]
filelist = bcfile.read_text()
print(filelist)
FILELIST 3600 1 jons-20230101T000000.txt 3600 1 jons-20230101T010000.txt 3600 1 jons-20230101T020000.txt 3600 1 jons-20230101T030000.txt 3600 1 jons-20230101T040000.txt 3600 1 jons-20230101T050000.txt 3600 1 jons-20230101T060000.txt 3600 1 jons-20230101T070000.txt 3600 1 jons-20230101T080000.txt 3600 1 jons-20230101T090000.txt 3600 1 jons-20230101T100000.txt 3600 1 jons-20230101T110000.txt
# Check the content of one of the filelist files
jonfile = destdir / filelist.split("\n")[1].split()[-1]
print(jonfile.read_text())
mainang = 244.342 s = 33.9251 gammajsp = 2.52055 Hm0 = 1.01011 Tp = 12.2993
JONSTABLE¶
from rompy_xbeach.boundary import BoundaryPointParamJonstable
# Generate the output directory
destdir = generate_output_directory()
# Input data source definition
source = SourceTimeseriesCSV(filename=datadir / "wave-params-20230101.csv")
# Wind object
wb = BoundaryPointParamJonstable(
source=source,
hm0="phs1",
tp="ptp1",
mainang="pdp1",
gammajsp="ppe1",
dspr="pspr1",
)
# Generating the forcing data
namelist = wb.get(destdir=destdir, grid=grid, time=times)
namelist
{'wbctype': 'jonstable',
'bcfile': 'jonstable-20230101T000000-20230101T120000.txt'}
# Check the content of the generated boundary file
bcfile = destdir / namelist["bcfile"]
print(bcfile.read_text())
1.01011 12.2993 244.342 2.52055 33.9251 3600 1 0.968176 13.7877 247.584 3.02407 41.2201 3600 1 0.994085 14.1542 248.386 3.02558 48.7203 3600 1 1.07939 13.5109 246.407 2.65635 46.7938 3600 1 1.13343 15.3336 250.89 2.79238 54.9961 3600 1 1.36986 15.4369 251.308 2.40611 50.0111 3600 1 1.46595 15.2322 251.179 2.30742 48.5546 3600 1 1.55301 15.0677 251.001 2.18789 47.001 3600 1 1.60305 14.9164 250.805 2.12522 46.4984 3600 1 1.63845 14.77 250.583 2.06828 46.1284 3600 1 1.66568 14.625 250.334 2.00733 45.8816 3600 1 1.68705 14.4773 250.034 1.94841 45.9753 3600 1 1.70383 14.321 249.769 1.89275 45.5342 3600 1
Define a model Config¶
Use the bulk forcing instances created above to define a Rompy XBeach config object
from rompy_xbeach.data import XBeachBathy
from rompy_xbeach.interpolate import RegularGridInterpolator
from rompy_xbeach.data import SeawardExtensionLinear
from rompy_xbeach.source import SourceGeotiff
Define the bathy¶
# Interpolator
interpolator = RegularGridInterpolator(
kwargs=dict(
method="linear",
fill_value=None,
),
)
# Seaward extension
extension = SeawardExtensionLinear(
depth=25,
slope=0.1,
)
# Bathy object
bathy = XBeachBathy(
source=SourceGeotiff(filename=datadir / "bathy.tif"),
posdwn=False,
interpolator=interpolator,
extension=extension,
left=5,
right=5,
)
Instantiate the Config¶
from rompy_xbeach.config import Config
config = Config(
grid=grid,
bathy=bathy,
input=dict(wave=wb, wind=wind, tide=tide),
front="abs_2d",
back="abs_2d",
left="neumann",
right="neumann",
rugdepth=0.011,
scheme="warmbeam",
order=1,
lateralwave="wavecrest",
random=True,
zs0=0.0,
hmin=0.01,
wci=False,
alpha=1,
delta=0.0,
n=10,
rho=1025,
g=9.81,
thetamin=-80,
thetamax=80,
dtheta=10.0,
beta=0.1,
roller=True,
gamma=0.55,
gammax=1.0,
sedtrans=False,
morfac=1.0,
morphology=False,
cf=0.01,
paulrevere="land",
eps=0.01,
epsi=0.001,
cfl=0.8,
umin=0.1,
oldhu=True,
tstart=0,
tintm=3600.0,
outputformat="netcdf",
ncfilename="xboutput_test.nc",
)
Generate the workspace¶
from rompy.model import ModelRun
# Generate the output directory
destdir = generate_output_directory()
modelrun = ModelRun(
run_id="test1",
period=times,
output_dir=destdir,
config=config,
)
rundir = modelrun()
2025-10-02 09:44:54 [INFO] rompy.model : ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2025-10-02 09:44:54 [INFO] rompy.model : ┃ MODEL RUN CONFIGURATION ┃
2025-10-02 09:44:54 [INFO] rompy.model : ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2025-10-02 09:44:54 [INFO] rompy.model : Run ID : test1
2025-10-02 09:44:54 [INFO] rompy.model : Model Type : Config
2025-10-02 09:44:54 [INFO] rompy.model : Start Time : 2023-01-01T00:00:00
2025-10-02 09:44:54 [INFO] rompy.model : End Time : 2023-01-01T12:00:00
2025-10-02 09:44:54 [INFO] rompy.model : Duration : 12 hours
2025-10-02 09:44:54 [INFO] rompy.model : Time Interval : 1:00:00
2025-10-02 09:44:54 [INFO] rompy.model : Output Directory : bulk-forcing-demo
2025-10-02 09:44:54 [INFO] rompy.model : ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2025-10-02 09:44:54 [INFO] rompy.model : ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2025-10-02 09:44:54 [INFO] rompy.model :
2025-10-02 09:44:54 [INFO] root : ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2025-10-02 09:44:54 [INFO] root : ┃ MODEL CONFIGURATION (Config) ┃
2025-10-02 09:44:54 [INFO] root : ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2025-10-02 09:44:54 [INFO] root :
2025-10-02 09:44:54 [INFO] rompy.model : Config:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: xbeach
2025-10-02 09:44:54 [INFO] rompy.model : template: /source/csiro/rompy-xbeach/src/rompy_xbeach/templates/base
2025-10-02 09:44:54 [INFO] rompy.model : checkout: main
2025-10-02 09:44:54 [INFO] rompy.model : grid:
2025-10-02 09:44:54 [INFO] rompy.model : grid_type: base
2025-10-02 09:44:54 [INFO] rompy.model : model_type: regular
2025-10-02 09:44:54 [INFO] rompy.model : ori:
2025-10-02 09:44:54 [INFO] rompy.model : x: 115.594239
2025-10-02 09:44:54 [INFO] rompy.model : y: -32.641104
2025-10-02 09:44:54 [INFO] rompy.model : crs: EPSG:4326
2025-10-02 09:44:54 [INFO] rompy.model : alfa: 347.0
2025-10-02 09:44:54 [INFO] rompy.model : dx: 10.0
2025-10-02 09:44:54 [INFO] rompy.model : dy: 15.0
2025-10-02 09:44:54 [INFO] rompy.model : nx: 230
2025-10-02 09:44:54 [INFO] rompy.model : ny: 220
2025-10-02 09:44:54 [INFO] rompy.model : crs: EPSG:28350
2025-10-02 09:44:54 [INFO] rompy.model : bathy:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: xbeach_bathy
2025-10-02 09:44:54 [INFO] rompy.model : id: data
2025-10-02 09:44:54 [INFO] rompy.model : source:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: geotiff
2025-10-02 09:44:54 [INFO] rompy.model : filename: ../../../rompy-xbeach/tests/data/bathy.tif
2025-10-02 09:44:54 [INFO] rompy.model : band: 1
2025-10-02 09:44:54 [INFO] rompy.model : kwargs: {}
2025-10-02 09:44:54 [INFO] rompy.model : filter:
2025-10-02 09:44:54 [INFO] rompy.model : sort: {}
2025-10-02 09:44:54 [INFO] rompy.model : subset: {}
2025-10-02 09:44:54 [INFO] rompy.model : crop: {}
2025-10-02 09:44:54 [INFO] rompy.model : timenorm: {}
2025-10-02 09:44:54 [INFO] rompy.model : rename: {}
2025-10-02 09:44:54 [INFO] rompy.model : derived: {}
2025-10-02 09:44:54 [INFO] rompy.model : variables:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: data
2025-10-02 09:44:54 [INFO] rompy.model : coords:
2025-10-02 09:44:54 [INFO] rompy.model : t: time
2025-10-02 09:44:54 [INFO] rompy.model : x: longitude
2025-10-02 09:44:54 [INFO] rompy.model : y: latitude
2025-10-02 09:44:54 [INFO] rompy.model : z: None
2025-10-02 09:44:54 [INFO] rompy.model : s: None
2025-10-02 09:44:54 [INFO] rompy.model : crop_data: True
2025-10-02 09:44:54 [INFO] rompy.model : buffer: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : time_buffer:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: 0
2025-10-02 09:44:54 [INFO] rompy.model : [1]: 0
2025-10-02 09:44:54 [INFO] rompy.model : interpolator:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: scipy_regular_grid
2025-10-02 09:44:54 [INFO] rompy.model : kwargs:
2025-10-02 09:44:54 [INFO] rompy.model : method: linear
2025-10-02 09:44:54 [INFO] rompy.model : fill_value: None
2025-10-02 09:44:54 [INFO] rompy.model : posdwn: False
2025-10-02 09:44:54 [INFO] rompy.model : left: 5
2025-10-02 09:44:54 [INFO] rompy.model : right: 5
2025-10-02 09:44:54 [INFO] rompy.model : extension:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: linear
2025-10-02 09:44:54 [INFO] rompy.model : depth: 25.0
2025-10-02 09:44:54 [INFO] rompy.model : slope: 0.1
2025-10-02 09:44:54 [INFO] rompy.model : interpolate_na: True
2025-10-02 09:44:54 [INFO] rompy.model : interpolate_na_kwargs: {}
2025-10-02 09:44:54 [INFO] rompy.model : input:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: data
2025-10-02 09:44:54 [INFO] rompy.model : wave:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: point_param_jonstable
2025-10-02 09:44:54 [INFO] rompy.model : id: jonstable
2025-10-02 09:44:54 [INFO] rompy.model : source:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: csv
2025-10-02 09:44:54 [INFO] rompy.model : filename: ../../../rompy-xbeach/tests/data/wave-params-20230101.csv
2025-10-02 09:44:54 [INFO] rompy.model : tcol: time
2025-10-02 09:44:54 [INFO] rompy.model : read_csv_kwargs:
2025-10-02 09:44:54 [INFO] rompy.model : parse_dates:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: time
2025-10-02 09:44:54 [INFO] rompy.model : index_col: time
2025-10-02 09:44:54 [INFO] rompy.model : filter:
2025-10-02 09:44:54 [INFO] rompy.model : sort: {}
2025-10-02 09:44:54 [INFO] rompy.model : subset: {}
2025-10-02 09:44:54 [INFO] rompy.model : crop:
2025-10-02 09:44:54 [INFO] rompy.model : time:
2025-10-02 09:44:54 [INFO] rompy.model : start: 2022-12-31 23:00:00
2025-10-02 09:44:54 [INFO] rompy.model : stop: 2023-01-01 13:00:00
2025-10-02 09:44:54 [INFO] rompy.model : timenorm: {}
2025-10-02 09:44:54 [INFO] rompy.model : rename: {}
2025-10-02 09:44:54 [INFO] rompy.model : derived: {}
2025-10-02 09:44:54 [INFO] rompy.model : variables: []
2025-10-02 09:44:54 [INFO] rompy.model : coords:
2025-10-02 09:44:54 [INFO] rompy.model : t: time
2025-10-02 09:44:54 [INFO] rompy.model : x: longitude
2025-10-02 09:44:54 [INFO] rompy.model : y: latitude
2025-10-02 09:44:54 [INFO] rompy.model : z: None
2025-10-02 09:44:54 [INFO] rompy.model : s: None
2025-10-02 09:44:54 [INFO] rompy.model : crop_data: True
2025-10-02 09:44:54 [INFO] rompy.model : buffer: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : time_buffer:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: 1
2025-10-02 09:44:54 [INFO] rompy.model : [1]: 1
2025-10-02 09:44:54 [INFO] rompy.model : location: offshore
2025-10-02 09:44:54 [INFO] rompy.model : dbtc: 1.0
2025-10-02 09:44:54 [INFO] rompy.model : hm0: phs1
2025-10-02 09:44:54 [INFO] rompy.model : tp: ptp1
2025-10-02 09:44:54 [INFO] rompy.model : mainang: pdp1
2025-10-02 09:44:54 [INFO] rompy.model : gammajsp: ppe1
2025-10-02 09:44:54 [INFO] rompy.model : dspr: pspr1
2025-10-02 09:44:54 [INFO] rompy.model : wind:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: wind_point
2025-10-02 09:44:54 [INFO] rompy.model : id: wind
2025-10-02 09:44:54 [INFO] rompy.model : source:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: csv
2025-10-02 09:44:54 [INFO] rompy.model : filename: ../../../rompy-xbeach/tests/data/wind.csv
2025-10-02 09:44:54 [INFO] rompy.model : tcol: time
2025-10-02 09:44:54 [INFO] rompy.model : read_csv_kwargs:
2025-10-02 09:44:54 [INFO] rompy.model : parse_dates:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: time
2025-10-02 09:44:54 [INFO] rompy.model : index_col: time
2025-10-02 09:44:54 [INFO] rompy.model : filter:
2025-10-02 09:44:54 [INFO] rompy.model : sort: {}
2025-10-02 09:44:54 [INFO] rompy.model : subset: {}
2025-10-02 09:44:54 [INFO] rompy.model : crop:
2025-10-02 09:44:54 [INFO] rompy.model : time:
2025-10-02 09:44:54 [INFO] rompy.model : start: 2022-12-31 23:00:00
2025-10-02 09:44:54 [INFO] rompy.model : stop: 2023-01-01 13:00:00
2025-10-02 09:44:54 [INFO] rompy.model : timenorm: {}
2025-10-02 09:44:54 [INFO] rompy.model : rename: {}
2025-10-02 09:44:54 [INFO] rompy.model : derived: {}
2025-10-02 09:44:54 [INFO] rompy.model : variables:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: wspd
2025-10-02 09:44:54 [INFO] rompy.model : [1]: wdir
2025-10-02 09:44:54 [INFO] rompy.model : coords:
2025-10-02 09:44:54 [INFO] rompy.model : t: time
2025-10-02 09:44:54 [INFO] rompy.model : x: longitude
2025-10-02 09:44:54 [INFO] rompy.model : y: latitude
2025-10-02 09:44:54 [INFO] rompy.model : z: None
2025-10-02 09:44:54 [INFO] rompy.model : s: None
2025-10-02 09:44:54 [INFO] rompy.model : crop_data: True
2025-10-02 09:44:54 [INFO] rompy.model : buffer: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : time_buffer:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: 1
2025-10-02 09:44:54 [INFO] rompy.model : [1]: 1
2025-10-02 09:44:54 [INFO] rompy.model : location: centre
2025-10-02 09:44:54 [INFO] rompy.model : wind_vars:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: wind_scalar
2025-10-02 09:44:54 [INFO] rompy.model : spd: wspd
2025-10-02 09:44:54 [INFO] rompy.model : dir: wdir
2025-10-02 09:44:54 [INFO] rompy.model : tide:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: water_level_point
2025-10-02 09:44:54 [INFO] rompy.model : id: tide
2025-10-02 09:44:54 [INFO] rompy.model : source:
2025-10-02 09:44:54 [INFO] rompy.model : model_type: csv
2025-10-02 09:44:54 [INFO] rompy.model : filename: ../../../rompy-xbeach/tests/data/ssh.csv
2025-10-02 09:44:54 [INFO] rompy.model : tcol: time
2025-10-02 09:44:54 [INFO] rompy.model : read_csv_kwargs:
2025-10-02 09:44:54 [INFO] rompy.model : parse_dates:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: time
2025-10-02 09:44:54 [INFO] rompy.model : index_col: time
2025-10-02 09:44:54 [INFO] rompy.model : filter:
2025-10-02 09:44:54 [INFO] rompy.model : sort: {}
2025-10-02 09:44:54 [INFO] rompy.model : subset: {}
2025-10-02 09:44:54 [INFO] rompy.model : crop: {}
2025-10-02 09:44:54 [INFO] rompy.model : timenorm: {}
2025-10-02 09:44:54 [INFO] rompy.model : rename: {}
2025-10-02 09:44:54 [INFO] rompy.model : derived: {}
2025-10-02 09:44:54 [INFO] rompy.model : variables:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: ssh
2025-10-02 09:44:54 [INFO] rompy.model : coords:
2025-10-02 09:44:54 [INFO] rompy.model : t: time
2025-10-02 09:44:54 [INFO] rompy.model : x: longitude
2025-10-02 09:44:54 [INFO] rompy.model : y: latitude
2025-10-02 09:44:54 [INFO] rompy.model : z: None
2025-10-02 09:44:54 [INFO] rompy.model : s: None
2025-10-02 09:44:54 [INFO] rompy.model : crop_data: True
2025-10-02 09:44:54 [INFO] rompy.model : buffer: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : time_buffer:
2025-10-02 09:44:54 [INFO] rompy.model : [0]: 1
2025-10-02 09:44:54 [INFO] rompy.model : [1]: 1
2025-10-02 09:44:54 [INFO] rompy.model : location: centre
2025-10-02 09:44:54 [INFO] rompy.model : tideloc: 1
2025-10-02 09:44:54 [INFO] rompy.model : freq: 1h
2025-10-02 09:44:54 [INFO] rompy.model : zs0: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : front: abs_2d
2025-10-02 09:44:54 [INFO] rompy.model : back: abs_2d
2025-10-02 09:44:54 [INFO] rompy.model : left: neumann
2025-10-02 09:44:54 [INFO] rompy.model : right: neumann
2025-10-02 09:44:54 [INFO] rompy.model : lateralwave: wavecrest
2025-10-02 09:44:54 [INFO] rompy.model : rugdepth: 0.011
2025-10-02 09:44:54 [INFO] rompy.model : tunits: None
2025-10-02 09:44:54 [INFO] rompy.model : breaktype: None
2025-10-02 09:44:54 [INFO] rompy.model : scheme: warmbeam
2025-10-02 09:44:54 [INFO] rompy.model : order: 1
2025-10-02 09:44:54 [INFO] rompy.model : random: 1
2025-10-02 09:44:54 [INFO] rompy.model : hmin: 0.01
2025-10-02 09:44:54 [INFO] rompy.model : wci: 0
2025-10-02 09:44:54 [INFO] rompy.model : alpha: 1.0
2025-10-02 09:44:54 [INFO] rompy.model : delta: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : n: 10.0
2025-10-02 09:44:54 [INFO] rompy.model : rho: 1025.0
2025-10-02 09:44:54 [INFO] rompy.model : g: 9.81
2025-10-02 09:44:54 [INFO] rompy.model : thetamin: -80.0
2025-10-02 09:44:54 [INFO] rompy.model : thetamax: 80.0
2025-10-02 09:44:54 [INFO] rompy.model : dtheta: 10.0
2025-10-02 09:44:54 [INFO] rompy.model : beta: 0.1
2025-10-02 09:44:54 [INFO] rompy.model : roller: 1
2025-10-02 09:44:54 [INFO] rompy.model : gamma: 0.55
2025-10-02 09:44:54 [INFO] rompy.model : gammax: 1.0
2025-10-02 09:44:54 [INFO] rompy.model : sedtrans: 0
2025-10-02 09:44:54 [INFO] rompy.model : morfac: 1.0
2025-10-02 09:44:54 [INFO] rompy.model : morphology: 0
2025-10-02 09:44:54 [INFO] rompy.model : cf: 0.01
2025-10-02 09:44:54 [INFO] rompy.model : eps: 0.01
2025-10-02 09:44:54 [INFO] rompy.model : epsi: 0.001
2025-10-02 09:44:54 [INFO] rompy.model : cfl: 0.8
2025-10-02 09:44:54 [INFO] rompy.model : umin: 0.1
2025-10-02 09:44:54 [INFO] rompy.model : oldhu: 1
2025-10-02 09:44:54 [INFO] rompy.model : outputformat: netcdf
2025-10-02 09:44:54 [INFO] rompy.model : ncfilename: xboutput_test.nc
2025-10-02 09:44:54 [INFO] rompy.model : tstart: 0.0
2025-10-02 09:44:54 [INFO] rompy.model : tintc: None
2025-10-02 09:44:54 [INFO] rompy.model : tintg: None
2025-10-02 09:44:54 [INFO] rompy.model : tintm: 3600.0
2025-10-02 09:44:54 [INFO] rompy.model : tintp: None
2025-10-02 09:44:54 [INFO] rompy.model : paulrevere: land
2025-10-02 09:44:54 [INFO] rompy.model :
2025-10-02 09:44:54 [INFO] rompy.model : ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2025-10-02 09:44:54 [INFO] rompy.model : ┃ STARTING MODEL GENERATION ┃
2025-10-02 09:44:54 [INFO] rompy.model : ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2025-10-02 09:44:54 [INFO] rompy.model : Preparing input files in bulk-forcing-demo
2025-10-02 09:44:54 [INFO] rompy.model : Processing model configuration...
2025-10-02 09:44:54 [INFO] rompy.model : Running configuration callable...
2025-10-02 09:44:54 [INFO] rompy_xbeach.config : Generating wave boundary data
2025-10-02 09:44:54 [INFO] rompy_xbeach.config : Generating wind forcing data
2025-10-02 09:44:54 [INFO] rompy_xbeach.config : Generating tide forcing data
2025-10-02 09:44:55 [INFO] rompy.model : Rendering model templates to bulk-forcing-demo/test1...
2025-10-02 09:44:55 [INFO] rompy.core.render : Template source: /source/csiro/rompy-xbeach/src/rompy_xbeach/templates/base
2025-10-02 09:44:55 [INFO] rompy.core.render : Output directory: bulk-forcing-demo
2025-10-02 09:44:55 [INFO] rompy.core.render : Using template version: main
2025-10-02 09:44:55 [INFO] rompy.core.render : • Locating template repository...
2025-10-02 09:44:55 [INFO] rompy.core.render : Template repository located at: /source/csiro/rompy-xbeach/src/rompy_xbeach/templates/base
2025-10-02 09:44:55 [INFO] rompy.core.render : • Generating files from template...
2025-10-02 09:44:55 [INFO] rompy.core.render : • Rendering time: 0.01 seconds
2025-10-02 09:44:55 [INFO] rompy.core.render : • Total process time: 0.01 seconds
2025-10-02 09:44:55 [INFO] rompy.core.render : • Files created: 7
2025-10-02 09:44:55 [INFO] rompy.core.render : • Output location: /source/csiro/rompy-notebooks/notebooks/xbeach/bulk-forcing-demo/test1
2025-10-02 09:44:55 [INFO] rompy.model :
2025-10-02 09:44:55 [INFO] rompy.model : ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2025-10-02 09:44:55 [INFO] rompy.model : ┃ MODEL GENERATION COMPLETE ┃
2025-10-02 09:44:55 [INFO] rompy.model : ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2025-10-02 09:44:55 [INFO] rompy.model : Model files generated at: /source/csiro/rompy-notebooks/notebooks/xbeach/bulk-forcing-demo/test1
Check the workspace files¶
modeldir = Path(modelrun.output_dir) / modelrun.run_id
sorted(modeldir.glob("*"))
[PosixPath('bulk-forcing-demo/test1/bathy.txt'),
PosixPath('bulk-forcing-demo/test1/jonstable-20230101T000000-20230101T120000.txt'),
PosixPath('bulk-forcing-demo/test1/params.txt'),
PosixPath('bulk-forcing-demo/test1/tide-20230101T000000-20230101T120000.txt'),
PosixPath('bulk-forcing-demo/test1/wind-20230101T000000-20230101T120000.txt'),
PosixPath('bulk-forcing-demo/test1/xdata.txt'),
PosixPath('bulk-forcing-demo/test1/ydata.txt')]
Check the params file¶
params = modeldir / "params.txt"
print(params.read_text())
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% XBeach parameter settings input file %%% %%% Date: 2025-10-01 20:44:54.920695+00:00 %%% User: rguedes-XPS-13-9350 %%% Template: /source/csiro/rompy-xbeach/src/rompy_xbeach/templates/base %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% zs0 = 0.0 front = abs_2d back = abs_2d left = neumann right = neumann lateralwave = wavecrest rugdepth = 0.011 scheme = warmbeam order = 1 random = 1 hmin = 0.01 wci = 0 alpha = 1.0 delta = 0.0 n = 10.0 rho = 1025.0 g = 9.81 thetamin = -80.0 thetamax = 80.0 dtheta = 10.0 beta = 0.1 roller = 1 gamma = 0.55 gammax = 1.0 sedtrans = 0 morfac = 1.0 morphology = 0 cf = 0.01 eps = 0.01 epsi = 0.001 cfl = 0.8 umin = 0.1 oldhu = 1 outputformat = netcdf ncfilename = xboutput_test.nc tstart = 0.0 tintm = 3600.0 paulrevere = land tstop = 43200.0 tunits = seconds since 2023-01-01 00:00:00 wbctype = jonstable bcfile = jonstable-20230101T000000-20230101T120000.txt windfile = wind-20230101T000000-20230101T120000.txt zs0file = tide-20230101T000000-20230101T120000.txt tideloc = 1 tidelen = 25 posdwn = -1 nx = 241 ny = 229 dx = 10.0 dy = 15.0 xori = 368011.2066131959 yori = 6387580.505638544 alfa = 347.0 projection = +proj=utm +zone=50 +south +ellps=GRS80 +units=m +no_defs +type=crs depfile = bathy.txt nmeanvar = 14 H thetamean hh u v D R k ue ve urms Qb zb zs