import_profile#
- import_profile(path, var, tstart, tend, lat_j, lon_i, ji='False', ignore_missing='False')[source]#
Import a data point from a variable of 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).
lat_j (float or int) – Latitude or j to import
lon_j (float or int) – Longitude or i to import
ji (str, optional) – If ‘False’ (default), the function will find i and j based on lat and lon provided If ‘True’, the function will use i and j directly to import
level (int, optinal) – level that we want to import. Only support for 3D field. Default is surface layer
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