import_depth#
- import_depth(path, var, tstart, tend, depth, ignore_missing='False')[source]#
Import a variable in specified depth from daily NetCDF files.
- Parameters:
path (str) – Directory containing the NetCDF files.
var (str) – Variable name to read from each file (e.g., ‘veloc_u_t’).
tstart (datetime) – Start date (inclusive).
tend (datetime) – End date (inclusive).
depth (float) – The depth to import
ignore_missing (str, optional) – If ‘False’ (default), the function exits when a file is missing. If ‘True’, missing days are allowed and filled with NaN.
- Returns:
A 3D array with shape (ntime, ny, nx), dtype float64. Missing files are represented with NaN values.
- Return type:
numpy.ndarray