pyglider.ncprocess#

Routines that are used for common processing of netcdf files after they have been converted to standard timeseries.

Functions#

pyglider.ncprocess.extract_timeseries_profiles(inname, outdir, deploymentyaml, force=False)#

Extract and save each profile from a timeseries netCDF.

Parameters:
innamestr or Path

netcdf file to break into profiles

outdirstr or Path

directory to place profiles

deploymentyamlstr or Path

location of deployment yaml file for the netCDF file. This should be the same yaml file that was used to make the timeseries file.

forcebool, default False

Force an overwite even if profile netcdf already exists

pyglider.ncprocess.make_gridfiles(inname, outdir, deploymentyaml, *, fnamesuffix='', depth_bins=None, dz=1, starttime='1970-01-01')#

Turn a timeseries netCDF file into a vertically gridded netCDF.

Parameters:
innamestr or Path

netcdf file to break into profiles

outdirstr or Path

directory to place profiles

deploymentyamlstr or Path

location of deployment yaml file for the netCDF file. This should be the same yaml file that was used to make the timeseries file.

depth_binsarray, default = None

User-defined depth bins, for instance np.arange(0, 1000.1, 1). If not None, these are the depth bins into which the data will be gridded. If None, dz is used to generate bins between 0 and 1100m

dzfloat, default = 1

Vertical grid spacing in meters. Ignored if depth_bins is not None

Returns:
outnamestr

Name of gridded netCDF file. The gridded netCDF file has dimensions of ‘depth’ and ‘profile’, so each variable is gridded in depth bins and by profile number. Each profile has a time, latitude, and longitude. The depth values are the bin centers