cli.NetcdfPreprocessConfig

cli.NetcdfPreprocessConfig(
    script,
    simulation,
    data_file,
    variable,
    units,
    output,
    x_coord='lon',
    y_coord='lat',
    time_coord='time',
    timestep=None,
    amend=False,
    crs=None,
    parallel=False,
    time_type=None,
    time_start=None,
    time_unit=None,
    time_count=None,
    time_increment=None,
    time_interval=None,
    time_instant=None,
)

Preprocess NetCDF files into Josh’s .jshd format.

For files with time dimensions. Use x_coord, y_coord, and time_coord to specify dimension names if they differ from defaults. For a flat, timeless NetCDF (e.g. a 2D raster), set time_coord=None to emit --no-time-dim instead of looking for a time dimension.

Attributes

Name Type Description
script Path Path to Josh simulation file (.josh).
simulation str Name of simulation for grid extraction.
data_file Path Path to NetCDF file (.nc, .nc4, .netcdf).
variable str NetCDF variable name to extract (e.g., “tas”, “pr”).
units str Units of the data for simulation use.
output Path Path for output .jshd file.
x_coord str Name of X/longitude dimension (default: “lon”).
y_coord str Name of Y/latitude dimension (default: “lat”).
time_coord str | None Name of time dimension (default: “time”). Set to None for a source with no time dimension at all.
timestep int | None Extract specific time slice (optional).
time_type str | None Temporal axis type: "count" or "ISO".
time_start str | int | float | None First count coordinate or ISO date.
time_unit str | None Unit for a count axis.
time_count int | None Number of declared temporal coordinates.
time_increment int | float | None Increment between count coordinates.
time_interval str | None ISO-8601 period between ISO dates (e.g., "P1M").
time_instant str | int | float | None Single count coordinate or ISO date for one output slice.
amend bool Append to existing JSHD file.
crs str | None Coordinate Reference System if not embedded.
parallel bool Enable parallel processing (~Nx speedup on N cores).