nansat icon indicating copy to clipboard operation
nansat copied to clipboard

Generic solution to reprojection of grids with currents (winds) components

Open akorosov opened this issue 11 years ago • 3 comments

Problem

Ocean currents or winds are usually presented as two grids with U and V components of the vector. And usually these components are related to the grid system of coordinates. E.g. ROMS model grid has stereographic projection with center at 60N, 70E. V is 'y_sea_water_velocity', U is 'x_sea_water_velocity'. So when we calculate direction of this current (using atan2) we calculate it relative to the direction of the X-axis of the model grid. The problem appears when we try to reproject this data. After changing projection of the grid we keep values of U and V but they are not valid anymore since direction of X/Y-axes of the new grid do not coincide with direction of X/Y-axes of the original grid. Solution is not trivial:

  1. calculate direction (and speed) of ocean current relative to X-axis from U,V
  2. calcluate azimuth of Y-axis direction (azimuth_up)
  3. calculate direction of current relative to North (azimuth of ocean current)
  4. Add bands with speed and ocean current azimuth to Nansat object
  5. Reproject
  6. calcluate azimuth of Y-axis direction (azimuth_up) on the new grid
  7. calculate direction of ocean current relative to X-axis of the new grid
  8. Calcluate U,V from speed and relative direction

Question

How to implement this solution in Nansat and make it generic?

akorosov avatar Jan 22 '14 13:01 akorosov

Following the CF conventions, the parameter names either start with x_/y_ or eastward_/northward_. If these parameters are projected (i.e., x_<param>/y_<param> ), shouldn't it then be enough to simply calculate eastward and northward components before reprojection, then use these new bands for calculation of speed and direction?

mortenwh avatar Jun 26 '17 14:06 mortenwh

This issue can be closed and left to be handled by users. In general, it is important to follow the CF-conventions and focus on eastward/northward vs x/y directed velocities.

mortenwh avatar Jun 29 '17 12:06 mortenwh

@mortenwh and @akorosov I am just wondering if there is any tool could help me to make this correction/transformation? I am not quite sure how it works, so if you could share a link or navigate me a little bit there it would be great.

korvinos avatar Dec 18 '18 09:12 korvinos