licel_netCDF

Class Holding methods to save data into a netCDF file. Currently only the waverider is supported.

class Licel.licel_netCDF.Licel_Netcdf_Wrapper(filename: str, acessmode: Literal['r', 'w', 'r+', 'a', 'x', 'rs', 'ws', 'r+s', 'as'], device: str, numFFT: int, FFTSize: int, numTrig: int)
Dataset: netCDF4.Dataset

netcdf Dataset

azimuth: netCDF4.Variable[float]

netcdf variable holding wind lidar azimuth

createNetCDF_Wind_Structure() Dataset

populate the Netcdf File structure. Here we will define the skeleton of the Netcdf file without giving any variable value we also add descriptions for each variable.

Returns:

structure holding the netcdf data set.

Return type:

netCDF4.Dataset

createVarDescription()

helper function to create and write variable description in netcdf file. this information could be dumped using ncdump.exe

fft_size: netCDF4.Variable[int]

netcdf variable holding fft size

filename = ''

filename

fillAcquisitionInfo(max_distance: int, samplingRate_hz: int, targetShots: int, FFT_Size: int, wind: licel_wind.Waverider)

fill information related to the Acquisition.

Parameters:
  • max_distance (int) – maximum distance range to be acquired in meters.

  • samplingRate_hz (int) – the waverider ADC sampling rate in hertz.

  • targetShots (int) – the target shots to be acquired in a single acquisition.

  • FFT_Size (int) – number of ADC sample that goes into a single FFT.

  • wind (licel_wind.Waverider) – the waverider python object.

fillGeoPositionInfo(stationName: str, latitude: float, longitude: float, altitude: float, azimuth: float, zenith: float)

write the geographical position information to the netcdf file.

Parameters:
  • stationName (str) – the location name where the acquisition is taking place.

  • latitude (float) – Geographical latitude of the wind lidar (degrees_north)

  • longitude (float) – Geographical latitude of the wind lidar (degrees_east)

  • altitude (float) – Altitude above sea level of the wind lidar (kilometers)

  • azimuth (float) – Azimuth angle of the wind lidar in degrees

  • zenith (float) – Zenith angle of the wind lidar in degrees

first_record: netCDF4.Variable[int]

netcdf variable holding index at which our first record in the file start, this variable is needed for compatibility reason with the Labview version.

frequncy_increment: netCDF4.Variable[float]

netcdf variable holding wind lidar frequency increment

max_distance: netCDF4.Variable[int]

netcdf variable holding wind lidar maximal distance range

netcdf_file_name: netCDF4.Variable[str]

netcdf filename

os_info: netCDF4.Variable[str]

netcdf variable holding operating system info

os_user: netCDF4.Variable[str]

netcdf variable holding which user is logged into the operating system

printVar(NetCDF_var: netCDF4.Variable[str])

helper function to print netcdf variables.

Parameters:

NetCDF_var (netCDF4.variable) – netcdf variable to be printed to console

range_resolution: netCDF4.Variable[float]

netcdf variable holding wind lidar range resolution

saveNetcdf(CYCLE: int, powerSpectra: ndarray[Any, dtype[uint64]], timestamp: ndarray[Any, dtype[uint64]], currentShots: int)

Save powerspectra data acquired from the waverider to the netcdf file.

Parameters:
  • powerSpectra (np.ndarray[np.uint64]) – powerspectra data to be saved

  • timestamp – Waverider timestamp to be saved, in milliseconds.

  • timestamp – np.ndarray[‘1’,np.uint64]

  • currentShots (int) – acquired shots from the waverider.

station_alt: netCDF4.Variable[float]

netcdf variable holding wind lidar altitude

station_lat: netCDF4.Variable[float]

netcdf variable holding wind lidar latitude

station_long: netCDF4.Variable[float]

netcdf variable holding wind lidar longitude

station_name: netCDF4.Variable[str]

netcdf variable holding wind lidar station name.

target_shots: netCDF4.Variable[int]

netcdf variable holding target shots we want to acquire

time_resolution: netCDF4.Variable[float]

netcdf variable holding wind lidar timing resolution

time_unix_to_epoch_1904()

python time return the number of seconds since January 1, 1970, 00:00:00 (UTC) on all platforms. the netcdf epoch starts since 12:00 a.m. 1904-01-01 UTC in in seconds.

Returns:

time since the start of the epoch 1904 in seconds.

Return type:

float

timestamp_start: netCDF4.Variable[int]

netcdf variable holding the waverider timestamp at which the acquisition started

trigger_names: netCDF4.Variable[str]

netcdf variable holding trigger names

waverider_sample_rate: netCDF4.Variable[float]

netcdf variable holding waverider ADC sampling rate

waverider_version: netCDF4.Variable[str]

netcdf variable holding waverider Hardware version

wind_version: netCDF4.Variable[str]

netcdf variable holding python API version

writeString(NetCDF_var: netCDF4.Variable[str], Var_string: str)

helper function to write strings to netcdf file.

Parameters:
  • NetCDF_var (netCDF4.variable(str)) – netCDF variable to be written to.

  • Var_string (str) – string to be written to netcdf variable. maxlength is 200 char.

zenith: netCDF4.Variable[float]

netcdf variable holding wind lidar zenith