This functions transforms a set of coordinates in regular lon/lat degrees, grid_in = [lon, lat], to a set of coordinates in rotated lon/lat degrees, grid_out = [lon', lat'], and vice versa:
[grid_out] = rotated_grid_transform(grid_in, option, SP_coor)
where option is the 'direction' of the transform (1: regular -> rotated and 2: rotated -> regular) and SP_coor are the coordinates of the South Pole in the rotated grid [SP_lon, SP_lat]
SP_coor = [18 -39.3];
grid_in = [[12; 12; 12],[55; 54; 53]];
[grid_out] = rotated_grid_transform(grid_in, 1, SP_coor)
grid_in = grid_out;
[grid_out] = rotated_grid_transform(grid_in, 2, SP_coor)
Simon Funder (2021). Rotated grid transform (https://www.mathworks.com/matlabcentral/fileexchange/43435-rotated-grid-transform), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!