In ROMS (mod_scalars.F)
Code: Select all
! Eradius Earth equatorial radius (m).
real(r8) :: Eradius = 6371315.0_r8 ! m
Code: Select all
% earthdist(alon, aloat, blon, blat, radius) returns the
% distance in maters between locations (alon, alat)
% and (blon, blat). The default earth radius is
% assumed to be 6371*1000 meters, the radius for
% a sphere of equal-volume.
if nargin < 5, radius = 6371*1000; end % meters.
In seagrid2roms (seagrid's conversion from seagrid.mat to a roms grid.nc)
Code: Select all
EARTH_RADIUS_METERS = 6378*1000; % Equatorial radius.
The WGS ellipsoid is defined as:
Equatorial radius: a = 6378137.0
Flattening: f = 1/298.257
(this is also what Rich Pawlowicz uses in m_map routines)
Using polar radius b = (1-f)*a
and volume of an ellipsoid V = 4*pi*a*a*b,
you get a radius of
Code: Select all
(a.^2*b).^(1/3) = 6.371000784654107e+006
What to do? The ROMS number seems reasonable...but I am not sure where it came from. In general, 6371000 seems better justified and easier to remember. I plan to change all my seagrid values to this, and if I can remember, I'll also change Eradius in mod_scalars.F to this, but if I don't remember, the resulting errors will probably be the least of my problems.
-Chris