Command line interface
usage: ocsmesh [-h] [--log-level {info,debug,warning}] [--nprocs NPROCS]
[--geom-nprocs GEOM_NPROCS] [--hfun-nprocs HFUN_NPROCS]
[--chunk-size CHUNK_SIZE] [--overlap OVERLAP]
{geom,hfun,scripts} ...
Positional Arguments
- command
Possible choices: geom, hfun, scripts
Named Arguments
- --log-level
Possible choices: info, debug, warning
- --nprocs
Number of parallel threads to use when computing geom and hfun.
- --geom-nprocs
Number of processors used when computing the geom, overrides –nprocs argument.
- --hfun-nprocs
Number of processors used when computing the hfun, overrides –nprocs argument.
- --chunk-size
Size of square window to be used for processing the raster
- --overlap
Size of overlap to be used for between raster windows
Sub-commands
geom
Perform operations related to domain creation and modification.
ocsmesh geom [-h] [--log-level {info,debug,warning}] [--nprocs NPROCS]
[--geom-nprocs GEOM_NPROCS] [--hfun-nprocs HFUN_NPROCS]
[--chunk-size CHUNK_SIZE] [--overlap OVERLAP]
{build} ...
Positional Arguments
- geom_cmd
Possible choices: build
Named Arguments
- --log-level
Possible choices: info, debug, warning
- --nprocs
Number of parallel threads to use when computing geom and hfun.
- --geom-nprocs
Number of processors used when computing the geom, overrides –nprocs argument.
- --hfun-nprocs
Number of processors used when computing the hfun, overrides –nprocs argument.
- --chunk-size
Size of square window to be used for processing the raster
- --overlap
Size of overlap to be used for between raster windows
Sub-commands
build
Build command for domain definition
ocsmesh geom build [-h] [--log-level {info,debug,warning}] [--nprocs NPROCS]
[--geom-nprocs GEOM_NPROCS] [--hfun-nprocs HFUN_NPROCS]
[--chunk-size CHUNK_SIZE] [--overlap OVERLAP] -o OUTPUT
[-f OUTPUT_FORMAT] [--output-crs OUTPUT_CRS] [--mesh MESH]
[--ignore-mesh-boundary] [--mesh-crs MESH_CRS]
[--zmin ZMIN] [--zmax ZMAX]
dem [dem ...]
Positional Arguments
- dem
Digital elevation model list to be used in geometry creation
Named Arguments
- --log-level
Possible choices: info, debug, warning
- --nprocs
Number of parallel threads to use when computing geom and hfun.
- --geom-nprocs
Number of processors used when computing the geom, overrides –nprocs argument.
- --hfun-nprocs
Number of processors used when computing the hfun, overrides –nprocs argument.
- --chunk-size
Size of square window to be used for processing the raster
- --overlap
Size of overlap to be used for between raster windows
- -o, --output
- -f, --output-format
Default:
'shapefile'
- --output-crs
Default:
'EPSG:4326'
- --mesh
Mesh to extract hull from
- --ignore-mesh-boundary
Flag to ignore mesh boundary for final boundary union
Default:
False
- --mesh-crs
CRS of the input base mesh (overrides)
- --zmin
Maximum elevation to consider
- --zmax
Maximum elevation to consider
hfun
Perform operations related to size function creation and modification.
ocsmesh hfun [-h] [--log-level {info,debug,warning}] [--nprocs NPROCS]
[--geom-nprocs GEOM_NPROCS] [--hfun-nprocs HFUN_NPROCS]
[--chunk-size CHUNK_SIZE] [--overlap OVERLAP]
{build} ...
Positional Arguments
- hfun_cmd
Possible choices: build
Named Arguments
- --log-level
Possible choices: info, debug, warning
- --nprocs
Number of parallel threads to use when computing geom and hfun.
- --geom-nprocs
Number of processors used when computing the geom, overrides –nprocs argument.
- --hfun-nprocs
Number of processors used when computing the hfun, overrides –nprocs argument.
- --chunk-size
Size of square window to be used for processing the raster
- --overlap
Size of overlap to be used for between raster windows
Sub-commands
build
Build command for mesh size definition
ocsmesh hfun build [-h] [--log-level {info,debug,warning}] [--nprocs NPROCS]
[--geom-nprocs GEOM_NPROCS] [--hfun-nprocs HFUN_NPROCS]
[--chunk-size CHUNK_SIZE] [--overlap OVERLAP] -o OUTPUT
[-f OUTPUT_FORMAT] [--mesh MESH] [--hmax HMAX]
[--hmin HMIN] [--contour CONTOUR [CONTOUR ...]]
[--constant CONST_DEFN CONST_DEFN] [--method METHOD]
dem [dem ...]
Positional Arguments
- dem
Digital elevation model list to be used in size function creation
Named Arguments
- --log-level
Possible choices: info, debug, warning
- --nprocs
Number of parallel threads to use when computing geom and hfun.
- --geom-nprocs
Number of processors used when computing the geom, overrides –nprocs argument.
- --hfun-nprocs
Number of processors used when computing the hfun, overrides –nprocs argument.
- --chunk-size
Size of square window to be used for processing the raster
- --overlap
Size of overlap to be used for between raster windows
- -o, --output
- -f, --output-format
Default:
'2dm'
- --mesh
Base mesh size function
- --hmax
Maximum element size
- --hmin
Minimum element size
- --contour
Each contour’s (level, [expansion, target]) to be applied on all size functions in collector
Default:
[]
- --constant
Specify constant mesh size above a given contour level by passing (lower_bound, target_size) for each constant
Default:
[]
- --method
Method used to calculate size function ({exact} |fast)
Default:
'exact'
scripts
Access to experimental OCSMesh scripts.
ocsmesh scripts [-h] [--loglevel LOGLEVEL]
{remesh_by_shape,remesh_by_dem,mesh_upgrader,subset_n_combine}
...
Positional Arguments
- scripts_cmd
Possible choices: remesh_by_shape, remesh_by_dem, mesh_upgrader, subset_n_combine
Named Arguments
- --loglevel
Sub-commands
remesh_by_shape
Locally refine an existing input mesh based on input DEMs within the region specified by input shape and cut-off depth.
ocsmesh scripts remesh_by_shape [-h] [--in-crs IN_CRS] [--shape SHAPE] [-u]
[--cutoff CUTOFF] [--factor FACTOR]
[--contour CONTOUR_DEFN [CONTOUR_DEFN ...]]
[--patch PATCH_DEFN PATCH_DEFN PATCH_DEFN]
[--constant CONST_DEFN CONST_DEFN] [-s SIEVE]
[--interpolate INTERPOLATE [INTERPOLATE ...]]
[-o OUTPUT] [-f OUTPUT_FORMAT]
[--nprocs NPROCS]
mesh
Positional Arguments
- mesh
Named Arguments
- --in-crs
Default:
'EPSG:4326'
- --shape
- -u, --upstream
Default:
False
- --cutoff
Refinement cutoff depth in meters (positive up)
Default:
-250
- --factor
Default:
2
- --contour
Each contour’s (level, [expansion, target]) to be applied on all size functions in collector
Default:
[]
- --patch
Specify patch mesh size above a given contour level by passing (lower_bound, expansion, target_size) for each patch
Default:
[]
- --constant
Specify constant mesh size above a given contour level by passing (lower_bound, target_size) for each constant
Default:
[]
- -s, --sieve
- --interpolate
To interpolate from depth of DEMs not involved in the remeshing process
Default:
[]
- -o, --output
- -f, --output-format
Default:
'2dm'
- --nprocs
Default:
-1
remesh_by_dem
Locally refine an existing input mesh based on input DEMs
ocsmesh scripts remesh_by_dem [-h] --mesh MESH [--mesh-crs MESH_CRS]
[--contour CONTOUR_DEFN [CONTOUR_DEFN ...]]
[--constant CONST_DEFN CONST_DEFN] [--hmin HMIN]
[--zmax ZMAX] [--clip-by-base] [--geom GEOM]
[--hfun HFUN] [--hfun-crs HFUN_CRS] [-s SIEVE]
[--interpolate INTERPOLATE [INTERPOLATE ...]]
[-o OUTPUT] [-f OUTPUT_FORMAT] [-k]
[--nprocs NPROCS]
dem [dem ...]
Positional Arguments
- dem
Named Arguments
- --mesh
- --mesh-crs
Default:
'EPSG:4326'
- --contour
Each contour’s (level, [expansion, target]) to be applied on all size functions in collector
Default:
[]
- --constant
Specify constant mesh size above a given contour level by passing (lower_bound, target_size) for each constant
Default:
[]
- --hmin
Default:
250
- --zmax
Default:
0
- --clip-by-base
Flag to clip input DEMs using base mesh polygon
Default:
False
- --geom
- --hfun
- --hfun-crs
Default:
'EPSG:4326'
- -s, --sieve
- --interpolate
To interpolate from depth of DEMs not involved in the remeshing process
Default:
[]
- -o, --output
- -f, --output-format
Default:
'2dm'
- -k, --keep-intermediate
Default:
False
- --nprocs
Default:
-1
mesh_upgrader
Create a new mesh based on a base-mesh and input DEMs.
ocsmesh scripts mesh_upgrader [-h] --basemesh BASEMESH --demlo [DEMLO ...]
--demhi [DEMHI ...] --out OUT
Named Arguments
- --basemesh
- --demlo
- --demhi
- --out
subset_n_combine
Subset and combine the two input meshes based on the region of interset
ocsmesh scripts subset_n_combine [-h] [--rasters RASTERS [RASTERS ...]]
[-o DIRECTORY] [-a] [-c CRS] [-d CUTOFF]
[-s WIND_SPEED] [-n N_LAYERS]
[--adv-upstream-area-max AREA]
[--adv-rel-island-area-min AREA]
fine_mesh coarse_mesh region_of_interset
Positional Arguments
- fine_mesh
Path to the fine mesh
- coarse_mesh
Path to the coarse mesh
- region_of_interset
Path to the shape file for region of interest or storm track
Named Arguments
- --rasters
List of rasters used for calculating depth cutoff
- -o, --out
Output directory
- -a, --outall
Flag to indicate all intermediate shapes to be written to disk
Default:
False
- -c, --crs
Input mesh CRS and output CRS [experimental]
Default:
'epsg:4326'
- -d, --cutoff
Cut-off depth (positive up) for calculating region subsetted from fine mesh
Default:
-200
- -s, --isotach-speed
Possible choices: 34, 50, 64
Isotach (34, 50 or 64) to use if region of interset is storm track
Default:
34
- -n, --adv-buffer-n-layers
Number of buffer layers to mesh between fine and coarse mesh
Default:
9
- --adv-upstream-area-max
Advanced option: maximum segment area for calculating upstream
Default:
100
- --adv-rel-island-area-min
Advanced option: minimum segment area for dropping islands during shape cleanup
Default:
0.01