ocmw.dataproc.ocmw_extract module¶
Functions to extract timeseries of data at specific locations in the water column from model data location extracts.
Calculate TS of velocity data at depth zhub from OTM extracted data |
|
Extract TS depth averaged velocity from OTM extracted data |
|
Calculate TS of rotor averaged velocity at depth zhub from model extracted data |
|
Extract TS of surface velocity from model extracted data |
|
Reader for loading the OCMW formated extract files |
|
Write data dictionary to OCMW formated output file. |
Functions to extract timeseries of data at specific locations in the water column from model data location extracts.
Chris Old IES, School of Engineering, University of Edinburgh Aug 2022
- ocmw.dataproc.ocmw_extract.extract_ts_at_hub(datapath, filename, dataset, datasrc, zhub, hab=True)[source]¶
Calculate TS of velocity data at depth zhub from OTM extracted data
- Parameters:
datapath (str) – Path to data file to be processed.
filename (str) – Filename of data file to be processed.
dataset (str) – Short description of data set being processed.
datasrc (str) – Short descrition of how the data set was generated.
zhub (float) – Vertical height where time series is to be extracted.
hab (bool, optional) – Toggle to indicate whether zhub is height above bed or depth below surface. The default is True.
- Returns:
t_series (dict) – Dictionary structure containing the time series of velocities at zhub.
- ocmw.dataproc.ocmw_extract.extract_depthavg_ts(datapath, filename, dataset, datasrc)[source]¶
Extract TS depth averaged velocity from OTM extracted data
- Parameters:
- Returns:
t_series (dict) – Dictionary structure containing the time series of depth-averagd velocities.
- ocmw.dataproc.ocmw_extract.extract_rotav_ts_at_hub(datapath, filename, dataset, datasrc, ppdata, rdia, zhub, hab=True, pwra=True, Cp=0.33)[source]¶
Calculate TS of rotor averaged velocity at depth zhub from model extracted data
- Parameters:
datapath (str) – Path to data file to be processed.
filename (str) – Filename of data file to be processed.
dataset (str) – Short description of data set being processed.
datasrc (str) – Short descrition of how the data set was generated.
ppdata (dict) – Pre-processed time series data generated using “flowChar.preprocess_ts”.
rdia (float) – rotor diameter.
zhub (float) – Vertical height where time series is to be extracted.
hab (bool, optional) – Toggle to indicate whether zhub is height above bed or depth below surface. The default is True.
pwra (bool, optional) – Toggle to switch between power weighted rotor average and depth average. The default is True.
Cp (float, optional) – Turbine power coefficient. The default is 0.33.
- Returns:
t_series (TYPE) – Dictionary structure containing the time series of rotor averaged velocities at zhub.
- ocmw.dataproc.ocmw_extract.extract_model_ts_at_surface(datapath, filename, dataset, datasrc)[source]¶
Extract TS of surface velocity from model extracted data
- datapathstr
Path to data file to be processed.
- filenamestr
Filename of data file to be processed.
- datasetstr
Short description of data set being processed.
- datasrcstr
Short descrition of how the data set was generated.
- Returns:
t_series (dict) – Dictionary structure containing the time series of surface velocities.
- ocmw.dataproc.ocmw_extract.load_ocmw_file(dataPath, fileName)[source]¶
Reader for loading the OCMW formated extract files
- ocmw.dataproc.ocmw_extract.save_ocmw_file(dataPath, ocmwFileName, dataDict)[source]¶
Write data dictionary to OCMW formated output file.