EGM96_to_360.txt

The EGM96_to_360.txt is unavailable for me to check the sph2grd feature

gmt sph2grd EGM96_to_360.txt -GEGM96_to_360.nc -Rg -I1 -V

Might be a typo, try @EGM96_to_36.txt? I see it’s available at https://github.com/GenericMappingTools/gmtserver-admin/blob/master/cache/EGM96_to_36.txt. The full 360deg ascii file seems to be available at ftp://cddis.gsfc.nasa.gov/pub/egm96/general_info/egm96_to360.ascii if you need it.

Hi Weiji14,

Yes, Indeed. Thank you for so much.
/yacob

Sorry to resurrect this thread. The cddis FTP website now seems to be down, does anyone know of another copy of this complete file of coefficients for EGM96 to 360? All references on the web point back to that broken FTP link…

Bet David has a copy but on his annual hike I think…

Thanks! I’ll check with him, there’s no rush - I was just thinking that now that GMT includes SRTM GL1 as a remote dataset, we could use these coefficients to make WGS84-relative DEMs on the fly for InSAR processing with a few lines of code. That would save a lot of time for us GMTSAR users.

I agree, which is why we proposed that improvement to NASA and of course they turned us down.

So did you get the egm96_to360.ascii file in the end
?If so ,could you send me a copy of it?
Thanks lot!

I didn’t, and then I forgot about it. GMTSAR evidently just uses a .grd file, produced from the coefficients at 1 degree resolution. This should be accurate enough for most purposes, but I’m still wondering where that coefficients file is… let me know if you find one!

There are contact emails at the bottom of the webpage https://cddis.nasa.gov/926/egm96/ - they would be the ones to reach out to if there are problems with the data links. Unfortunately as Paul said we didn’t get funding to add more support through GMT.

Try to look at GeographicLib. They can compute the geoid from a coefficients file and I seem to remember they have egm96

yes, I have the file egm96_to360.ascii

For the record, I think that EGM96_to_360.ascii is available at:

How can this be done? Something like this ?

gmt sph2grd egm96_to360.ascii -GEGM96_to_360.nc -R$REGION -I1s -Vi
gmt grdcut @srtm_relief_01s -Gearth_01s -R$REGION 
gmt math earth_01s EGM96_to_360.nc ADD = DEM.grd

Is it necessary to calculate the geoid with all the 360 coefficients? And with the 1s resolution?

We had proposed to do this built-in for a NASA proposal but NASA turned us down as we had not done a good enough job tabulating man-hours for every task and thus could not be trusted to get the job done.

Ok, I see. Too bad.
Let me go back to my question. Is my code correct?

It might be. However, given it is a smoothly varying field I think the faster/simpler approach is to get a coarse grid with the geoid and use grdtrack to sample it as needed at those fine resolutions.

AFAIK sph2grd is badly broken. I recall my alternative Geographiclib

Ok. Thanks.

I will ping @ericlindsey to see if the can tell us how https://topex.ucsd.edu/gmtsar/demgen/ works.

Thanks. I try it and I didn’t get any problem. But I will considered Geographiclib.