Issue with rotated lat-lon coordinates
christopherthomas opened this issue · 0 comments
In geogrid the transformations between geographic and computational coordinates for lat-lon projections appear to apply the rotation by stand_lon twice. This occurs in the subroutines set_cassini
, llij_casini
and ijll_cassini
. When unravelled, the subroutine rotate_coords(ilat,ilon,olat,olon,lat_np,lon_np,lon_0,direction)
, for direction -1 (geographic to computational coordinates), successively applies the following transformations:
- A rotation about the z-axis by lon_np,
- A rotation about the new (rotated) y-axis by 90 - lat_np
- A rotation about the new (rotated) z-axis by lon_0
When direction == 1 the reverse transformation is applied.
When applied in llij_cassini
for example,
call rotate_coords(lat,lon,comp_lat,comp_lon,proj%lat0,proj%lon0,proj%stdlon,-1)
comp_lon = comp_lon + proj%stdlon
the second line of code, after rotate_coords
is called, has the effect of rotating again by stand_lon
. A similar thing occurs in subroutine set_cassini
, and the reverse occurs in ijll_cassini
.
I am not sure that this is a serious issue. When pole_lat
, pole_lon
and stand_lon
are set according to recommendation in Section 3 of the Users Guide, the centre of the computational domain is over the equator, which is important, but is rotated E-W and does not lie over the 180 deg meridian. I think that fixing this issue might break many peoples namelists and post-processing code. I am not sure if this spurious rotation has any other implications, so I am bringing it to your attention.