gnome.utilities.transforms
Functions
| 
 | Converts array of current values given with magnitude, direction into | 
| Converts array of current values given with (u,v) current values to | |
| 
 | Converts array of wind values given with magnitude, direction into(u,v) | 
| Converts array of wind values given with (u,v) wind values to magnitude, | 
Module Contents
- gnome.utilities.transforms.r_theta_to_uv_current(r_theta)
- Converts array of current values given with magnitude, direction into (u,v) wind values. Current from 0 deg is (u,v) = (0,1), from 45 deg (u,v) = (1,1) i.e. rotate clockwise from North. In addition, (u,v) represents the direction the current moves towards. - Parameters:
- r_theta – NX2 numpy array containing r = r_theta[:,0], theta = r_theta[:,1]. Theta is in degrees between 0 and 360. 
- Returns:
- NX2 numpy array containing the corresponding uv Cartesian velocity vector 
 
- gnome.utilities.transforms.uv_to_r_theta_current(uv)
- Converts array of current values given with (u,v) current values to magnitude, direction. Current from 0 deg is (u,v) = (0,1), from 45 deg (u,v) = (1,1) i.e. rotate clockwise from North. In addition, (u,v) represents the direction the current blows towards - Parameters:
- uv – NX2 numpy array, where each row corresponds with a velocity vector 
- Returns:
- NX2 numpy array containing polar coordinates r_theta 
 
- gnome.utilities.transforms.r_theta_to_uv_wind(r_theta)
- Converts array of wind values given with magnitude, direction into(u,v) wind values. Wind from 0 deg is (u,v) = (0,-1), from 45 deg (u,v) = (-1,-1) i.e. rotate clockwise from North. In addition, (u,v) represents the direction the wind blows towards - Parameters:
- r_theta – NX2 numpy array containing r = r_theta[:,0], theta = r_theta[:,1]. Theta is in degrees between 0 and 360. 
- Returns:
- NX2 numpy array containing the corresponding uv Cartesian velocity vector 
 
- gnome.utilities.transforms.uv_to_r_theta_wind(uv)
- Converts array of wind values given with (u,v) wind values to magnitude, direction. Wind from 0 deg is (u,v) = (0,-1), from 45 deg (u,v) = (-1,-1) i.e. rotate clockwise from North. In addition, (u,v) represents the direction the wind blows towards - Parameters:
- uv – NX2 numpy array, where each row corresponds with a velocity vector 
- Returns:
- NX2 numpy array containing polar coordinates r_theta