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, access_mode, device, numFFT, FFTSize, numTrig)¶
- Dataset = ''¶
netcdf Dataset
- azimuth = 0.0¶
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 = 0¶
netcdf variable holding fft size
- filename = ''¶
netcdf filename
- fillAcquisitionInfo(max_distance, samplingRate_hz, targetShots, FFT_Size, wind)¶
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 = 0¶
netcdf variable holding index at which our first record in the file start, this variable is needed for compatibility reason with the Labview version.
- freqeuncy_increment = 0.0¶
netcdf variable holding wind lidar frequency increment
- max_distance = 0.0¶
netcdf variable holding wind lidar maximal distance range
- os_info = ''¶
netcdf variable holding operating system info
- os_user = ''¶
netcdf variable holding which user is logged into the operating system
- printVar(NetCDF_var)¶
helper function to print netcdf variables.
- Parameters:
NetCDF_var (netCDF4.variable) – netcdf variable to be printed to console
- range_resolution = 0.0¶
netcdf variable holding wind lidar range resolution
- saveNetcdf(cycle, powerSpectra: ndarray[uint64], timestamp: ndarray[1, 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 = 0.0¶
netcdf variable holding wind lidar altitude
- station_lat = 0.0¶
netcdf variable holding wind lidar latitude
- station_long = 0.0¶
netcdf variable holding wind lidar longitude
- station_name = ''¶
netcdf variable holding wind lidar station name.
- target_shots = 0¶
netcdf variable holding target shots we want to acquire
- time_resolution = 0.0¶
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
- trigger_names = 0¶
netcdf variable holding trigger names
- waverider_sample_rate = 0.0¶
netcdf variable holding waverider ADC sampling rate
- waverider_version = ''¶
netcdf variable holding waverider Hardware version
- wind_version = ''¶
netcdf variable holding python API version
- writeString(NetCDF_var, Var_string)¶
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 = 0.0¶
netcdf variable holding wind lidar zenith