mgr-editing v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
mgr-editing is a converter for sea-level time series data. It allows you to transform data between different formats, such as SONEL_HR, RMN, PAB, and PROFILERS.
Note: The input file must be in ASCII format and can be one of the supported types (see File Formats).
Usage¶
mgr-editing FILE [OPTIONS --header="lon=lon lat=lat code=code name=name depth=depth"]
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
|
Specify the end date for processing. If not provided, the entire file is read. |
|
Specify the start date for processing. If not provided, the entire file is read. |
|
Specify the output filename (without extension). |
|
Include metadata about the |
|
Specify the input format (e.g., |
|
Specify the output format. If not provided, the output is written in a list format with no header. |
|
Path to the bathymetry file. |
|
Path to the polygons file (used for excluding points). |
|
Path to the mesh file (used for filtering points inside/outside the mesh). |
|
Specify the tidal wave for processing (e.g., |
|
Specify a depth range for filtering (e.g., |
|
Apply a delta correction to the data. Use the format: |
|
Filter points based on their distance from the shore (in meters or degrees). |
|
Exclude points outside the mesh or polygon. |
|
Display a list of stations with their coordinates and exit. |
File Formats¶
The following input formats are supported:
Format |
Description |
Example |
|---|---|---|
SONEL_HR |
Format: |
|
YMD |
Format: |
|
LIST |
Format: |
|
RMN |
Format: To be described. |
- |
PAB |
Format: To be described. |
- |
PROFILERS |
Binary format: |
- |
Examples¶
Convert a SONEL_HR File to ASCII¶
Convert a SONEL_HR file to a list format (default output):
mgr-editing input.slv -oF ASCII -o output.mgr
Convert a YMD File to NetCDF¶
Convert a YMD file to NetCDF format:
mgr-editing input.yml -iF YMD -oF NETCDF -o output.nc
Process a Subset of Data¶
Process data between two dates:
mgr-editing input.slv -s 2000-01-01 -f 2000-12-31 -o output.mgr
Apply a Delta Correction¶
Apply a delta correction to the data:
mgr-editing input.slv --delta "dataFile=/path/to/delta.nc amplitude=UP_diff_a phaselag=UP_diff_G discretisation=LGP1" -o output.mgr
Filter Points Inside a Mesh¶
Filter points to include only those inside a mesh:
mgr-editing input.slv -m mesh.nc -o output.mgr
Exclude Points Outside a Polygon¶
Exclude points outside a polygon:
mgr-editing input.slv -p polygon.txt --interior -o output.mgr
Filter by Depth Range¶
Filter points within a specific depth range:
mgr-editing input.slv --range 0:1000 -o output.mgr
List All Stations¶
Display a list of all stations with their coordinates:
mgr-editing input.slv --list
Add Metadata to Output¶
Include station metadata in the output file:
mgr-editing input.slv --header="lon=2.3522 lat=48.8566 code=PARIS name=Paris depth=0" -o output.mgr
Environment Variables¶
mgr-editing does not rely on specific environment variables. However, ensure your system has the necessary permissions to read input files and write to the output directory.
Notes¶
Input File Requirements:
Must be in ASCII format (except for
PROFILERS, which is binary).Supported formats:
SONEL_HR,YMD,LIST,RMN,PAB,PROFILERS.
Output File:
If no output format (
-oF) is specified, the default is a list format with no header.If no output filename (
-o) is provided, the output filename is derived from the input filename with an appropriate extension (e.g.,.mgr,.nc,.obs).
Date Handling:
If no start (
-s) or end (-f) date is specified, the entire file is processed.
Delta Correction:
The
--deltaoption requires a string with the following format:
dataFile=<path_to_file> amplitude=<amplitude_var> phaselag=<phase_var> discretisation=<discretisation_method>
```
5. Mesh and Polygon Filtering:
Use
-mto filter points inside a mesh.Use
-pwith--interiorto exclude points outside a polygon.
Depth Range:
The
--rangeoption accepts a string in the formatmin:max(e.g.,0:1000).
Rejected Points:
Points that do not meet the filtering criteria (e.g., outside the mesh or depth range) are saved in a file named
rejected.mgr.
See Also¶
SONEL Data (for SONEL_HR format)
CF Conventions (for time and coordinate standards)