extract Sub-command
Contents
extract Process Configuration File
Example:
# Example configuration file for `reshapr extract` sub-command
dataset:
model profile: SalishSeaCast-201812.yaml
time base: hour
variables group: biology
dask cluster: salish_cluster.yaml
start date: 2015-01-01
end date: 2015-01-10
extract variables:
- diatoms
- nitrate
# Optional section to specify temporal and spatial selection of a subset of the
# entire variable field
selection:
# Time interval defaults to 1
time interval: 3 # multiple of dataset: time base
depth:
# depth index min defaults to 0
depth min: 0
# depth index max defaults to end of the depth grid
depth max: 25
# depth index interval defaults to 1
depth interval: 1
grid y:
# y min defaults to 0
y min: 600
# y max defaults to end of the y grid
y max: 700
# y interval defaults to 1
y interval: 10 # multiple of grid y index; e.g. 10 means every 10th grid point
grid x:
# x min defaults to 0
x min: 100
# x max defaults to the end of the x grid
x max: 300
# x interval defaults to 1
x interval: 5 # multiple of grid x index; e.g. 5 means every 5th grid point
include lons lats: True
extracted dataset:
name: SalishSeaCast_hour_avg_biology_3h
description: Hour-averaged diatoms biomass and nitrate every 3rd hour extracted from SalishSeaCast v201812 hindcast
deflate: True
format: NETCDF4
dest dir: /ocean/dlatorne/hour-avg-biology/
Details: Coming soon…
extract Process Configuration File for Resampling
Example:
# Example configuration file for `reshapr extract` sub-command
# to resample day-averaged fields to month-averaged
dataset:
model profile: SalishSeaCast-201905.yaml
time base: day
variables group: biology
dask cluster: salish_cluster.yaml
start date: 2009-02-01
end date: 2009-02-28
extract variables:
- diatoms
- nitrate
resample:
# A pandas time series frequency offset alias with an optional multiplier digit prefix
# For monthly resampling use MS so that time values are mid-month.
time interval: 1MS
# A xarray dataset reduction method to use for aggregation.
# See the "resampling and grouped operations" subsection in the Time Series Data
# section of the xarray User Guide.
# default: mean
aggregation: mean
extracted dataset:
name: SalishSeaCast_1m_ptrc_T
description: Month-averaged diatoms biomass and nitrate extracted from SalishSeaCast v201905 hindcast
deflate: True
format: NETCDF4
dest dir: /ocean/dlatorne/
Details: Coming soon…
Dask Cluster Configuration File
Example:
# Configuration for a dask cluster on salish
name: salish dask cluster
processes: True
number of workers: 4
threads per worker: 4
memory limit: auto
Details: Coming soon…