This tutorial builds a small, complete configuration from nothing: a single
gauge whose observed discharge is imported from a CSV file, made browsable in the
FEWS Explorer, and run from a workflow. It’s the FEWS equivalent of
“hello, world” — deliberately tiny, but every piece is real and each one maps to
a hop in the data-flow model.
Make the folders. You don’t need every folder FEWS supports — only the ones
this tutorial writes into.
Terminal window
mkdir-pMyRegion/Config/RegionConfigFiles
mkdir-pMyRegion/Config/IdMapFiles
mkdir-pMyRegion/Config/ModuleConfigFiles
mkdir-pMyRegion/Config/WorkflowFiles
mkdir-pMyRegion/Import
This is the configuration directory in
miniature: the RegionConfigFiles “what exists” layer, the
ModuleConfigFiles + WorkflowFiles “what to do” layer, and an Import
folder for incoming data.
Q.obs is the internal parameter id. instantaneous means each value is a
snapshot in time (not a total over the interval — that would be
accumulative). Full element list: parameters.xsd.
The import module ties it together: read files from ../Import, apply the
ID map, and write the result as an internal time series. The
timeSeriesSet describes the internal series to create — so it uses the
internal ids (Q.obs, RiverGauge_01).
idMapId points at the map from the previous step (base name, no version).
external historical is the time series
type for observed data
that arrived from outside.
Data is now in the store, but nobody can see it yet. A filter adds an
entry to the browsable tree in the FEWS Explorer; clicking it shows the series
on the default chart. The timeSeriesSet here is a query — it must match the
header the import wrote, especially moduleInstanceId.
runIndependenttrue means the workflow keeps going even if this activity
fails — useful once there are several activities. To add a second step, you’d
just add another <activity> with its own moduleInstanceId, in order.
Almost every first-config problem is one of these:
Data imports but doesn’t display. The filter’s timeSeriesSet doesn’t
match the import’s header — usually a different moduleInstanceId or
timeStep. Line the two up field by field.
Nothing imports at all. An idMap mismatch — an external name in the CSV
doesn’t exactly match a map entry (case and punctuation count).
A change has no effect. A higher-versioned copy of the file is winning.
Check for a sibling like Locations 1.01 default.xml. See how FEWS finds a
file.
An id can’t be resolved. You referenced a locationId or parameterId
that isn’t declared in RegionConfigFiles. Declare the noun first.
Add a transformation that derives a new series from
Q.obs, then add it as a second activity in the workflow. Or wire up a real
model with the General Adapter. Each new capability is
just another module + another activity — the shape you already know.
The task guides go deep on each file type you touched here,
and every reference page links back to the underlying
schema.