toto.plugins.transformations.wind_profile¶
- class toto.plugins.transformations.wind_profile.DataTransformation(pandas_obj)[source]¶
Bases:
object- Oribital_velocity(dp='dp', tp='tp', hs='hs', args={'z': 0.0})[source]¶
Calculate the orbital velocity
- bed_shear_stress(spd='spd', drr='drr', hs='hs', dpm='dpm', tp='tp', water_depth='depth', args={'include_current': True, 'include_wave': True, 'mode': {'2D': True, '3D': False}, 'rho_water': 1027, 'water_depth': 10, 'wave_friction': {'Soulsby': False, 'Swart': True}, 'z0': 0.001})[source]¶
Computation of bed shear stress due to current and waves current-related stress is computed following a drag-coefficient approach wave-related stress is computed following Van Rijn approach Combined wave-current mean and max stresses are computed following Soulsby(1995) approach https://odnature.naturalsciences.be/coherens/manual#manual https://odnature.naturalsciences.be/downloads/coherens/documentation/chapter7.pdf#nameddest=Bed_shear_stresses
http://www.coastalwiki.org/wiki/Shallow-water_wave_theory# http://www.coastalwiki.org/wiki/Shallow-water_wave_theory#Seabed_Friction General relationships obtained from : https://repository.tudelft.nl/islandora/object/uuid%3Aea12eb20-aee3-4f58-99fb-ebc216e98879 Description of TRANSPOR2004 and Implementation in Delft3D-ONLINE Take from the work of Simon Wepp in Opendrift
Parameters¶
- spdstr
Name of the column from which to get current speed.
- drr: str, optional
Column name representing the current direction.
- hsstr, optional
Column name representing the wave height.
- tpstr, optional
Column name representing the wave period.
- dpm: str, optional
Column name representing the wave direction.
- water_depth: str, optional
Column name representing the water depth.
- args: dict
Dictionnary with the folowing keys: water_depth: float
Total water depth or level from which the current was taken
- mode: str
Use 3D or 2D for 3D current or depth=average current. default 2D
- rho_water float:
Sea water density kg/m3, default 1027
- z0 float:
Roughness height, default 0.001
- inlude_current str:
True or False if calculating the shear stress from current speed
- inlude_wave str:
True or False if calculating the shear stress from wave
- wave_friction str:
Soulsby or Swart formulae, default Swart
Examples:¶
>>> df=tf['test1']['dataframe'].DataTransformation.bed_shear_stress(spd='spd',hs='hs',tp='tp',args={'water_depth':10}) >>>
- dav_to_layers(u='u', dp='dp', args={'z': 0.0, 'z0': 0.001})[source]¶
Change depth-average value to any depth
- layers_to_dav(u='u', dp='dp', args={'z': 0.0, 'z0': 0.001})[source]¶
Change from velocity at a specify l;ayer to depth-average value
- rotation(wd='wd', args={'rotate by': 180})[source]¶
this function will rotate direction usefull for changing wind coming from to going to
- spddir_to_uv(spd='spd', direc='direc', args={'Origin': {'coming from': False, 'going to': True}})[source]¶
Converts (spd, dir) to (u, v). Args:
spd (array): magnitudes to convert direc (array): directions to convert (degree) coming_from (bool): True if directions in coming-from convention, False if in going-to
- Returns:
u (array): eastward wind component v (array): northward wind component
- uv_to_spddir(u='u', v='v', args={'Origin': {'coming from': False, 'going to': True}})[source]¶
Converts (u, v) to (spd, dir). Args:
u (array): eastward wind component v (array): northward wind component coming_from (bool): True for output directions in coming-from convention, False for going-to
- Returns:
mag (array): magnitudes direc (array): directions (degree)
- wind_profile(ws='ws', args={'Averaging period of input wind speed (in minutes)': 10.0, 'Level of input wind speed (in meters)': 10.0, 'Output level (in meters)': 10.0, 'Output time averaging (in minutes)': 10.0})[source]¶
The function computes wind at user-input level and time averaging period based on an input wind field. based on the NPD spectrum