Module Overview: Data Discovery with fetchezΒΆ
fetchez is the CUDEM data discovery and access tool. It helps users query, filter, cache, stream, and download source datasets through a standardized command-line interface.
In a coastal DEM workflow, fetchez helps answer questions such as:
What source data are available in this region?
Which datasets overlap the area of interest?
Can the results be filtered by source type, year, provider, or data class?
Can only the required data be downloaded?
How should a source and its processing settings be represented in YAML?
Run the basic help command:
fetchez --helpList available source modules:
fetchez modules listInspect the module commands:
fetchez modules --helpSearch available modules by keyword:
fetchez modules search topography
fetchez modules search bathymetryInspect a specific source module:
fetchez modules info mbdbThe main concept is that data discovery should be simple and programmatically accessible. Instead of manually downloading files from many different websites, fetchez provides a common interface for accessing more than 75 source types as part of a larger workflow or as a standalone data-acquisition tool.
The fetchez exercise also introduces the YAML structure used to represent source modules, module arguments, hooks, weights, and cache settings. These same components later appear inside the workflows coordinated by globato.
fetchez is organized around a few core concepts:
fetchez
fetchez modules
fetchez hooks
fetchez recipes
fetchez streamsThe most useful starting point is the main help command:
fetchez --helpThis shows the main components of the fetchez workflow: modules, hooks, streams, and recipes.
Explore Available Data ModulesΒΆ
fetchez modules define source-data access. Each module represents a dataset, service, or local data type that can be used in a CUDEM workflow.
Search modules by keyword:
fetchez modules search topographyfetchez modules search bathymetryThese searches help identify source modules relevant to a particular data theme or workflow.
Example: Find and Download DataΒΆ
For many users, the most common use of fetchez is straightforward data access: find data for a region and download it into a working directory.
The general command pattern is:
fetchez run -R WEST/EAST/SOUTH/NORTH MODULE_NAMEFor example, to request NOAA multibeam data from the mbdb module for the Fiji test region:
fetchez run -R 178.25/178.65/-18.30/-17.95 mbdbThis command tells fetchez to use the mbdb module and search for matching multibeam data within the specified bounding box.
The region format is:
WEST/EAST/SOUTH/NORTHFor the Fiji example:
178.25/178.65/-18.30/-17.95Inspect a Specific ModuleΒΆ
Use fetchez modules info to inspect a module definition:
fetchez modules info mbdbThe mbdb module accesses NOAA multibeam data through an ArcGIS Feature Server.
The module information includes:
Description
Category
Agency
Resolution
Tags
Links
Available arguments
The figure below shows the command output for:
fetchez modules info mbdbThe output summarizes the module and lists the arguments that can be used to control the request for the selected dataset.
These arguments can be used directly in a command-line pipeline or written into a YAML recipe.
Limit the Request by YearΒΆ
Some modules support arguments that narrow the data request.
For the mbdb module, a request can be limited by year:
fetchez run -R WEST/EAST/SOUTH/NORTH mbdb --min-year YEAR --max-year YEARExample:
fetchez run -R 178.25/178.65/-18.30/-17.95 mbdb --min-year 2010 --max-year 2024This searches the selected region for multibeam data within the specified year range.
Explore Processing HooksΒΆ
Hooks are processing steps that prepare source data before they are used in a workflow.
Common hook operations include:
Setting or identifying the source data type
Assigning the source reference system
Reprojecting source data horizontally
Cropping data to the target region
Filtering elevation or depth values
Comparing data against a reference surface
Adding weights, metadata, or provenance information
Inspect the hooks command:
fetchez hooks --helpList available hooks:
fetchez hooks listGet information about a specific hook:
fetchez hooks info stream_reprojectAnother useful example is:
fetchez hooks info rqThe stream_reproject hook is used to reproject source data into a target horizontal reference frame.
The rq hook supports reference-based filtering, where source values are evaluated against a comparison surface.
Hook arguments can be used directly in a command-line pipeline or written into a YAML recipe.
Hooks in YAMLΒΆ
A source module can include one or more hooks inside a YAML recipe.
Example:
modules:
- module: mbdb
args:
weight: 1
want_inf: true
hooks:
- name: stream_reproject
args:
dst_srs: epsg:4326+3855
- name: spatial_crop
- name: rq
args:
reference: gmrt/gebco
threshold: 10
mode: percent
builder: grid
res: 0.000277777The module defines the source-data access. The hooks define how the source is prepared before it enters the larger workflow.
Explore RecipesΒΆ
Recipes are YAML files that define preassembled workflows.
Inspect the recipes command:
fetchez recipes --helpList available recipes:
fetchez recipes listPrint a recipe directly to the terminal:
fetchez recipes dump RECIPE_NAMEValidate a recipe:
fetchez recipes validate fiji_test_recipe.yamlRecipe commands are useful for understanding how source modules, arguments, hooks, weights, and processing settings are represented in YAML.
Main TakeawayΒΆ
At its simplest, fetchez can be used to find and download source data:
select a module
β define a region
β narrow the request
β download or stream the dataIts more advanced features expose the structure used by the larger CUDEM workflow:
modules
β module arguments
β hooks
β hook arguments
β streams
β YAML recipesThis exercise provides a view of the individual source-data components that globato later synthesizes into a complete, recipe-based DEM workflow.