Gravity map

I have long lat and data, I want to make gravity anomaly map ?

Hi Shubha!!

I see that you have a some doubts. I think you can find some help in the tutorial section (sections 3 and 4). I copy the links below.

https://docs.generic-mapping-tools.org/latest/tutorial/session-3.html#gridding-of-arbitrarily-spaced-data.

gmt psbasemap -R65/100/5/40 -JM4i -B5/5WSen -K -Y4 >map.ps
gmt xyz2grd gravity.xyz -Ix1/y1 -R65/100/5/40 -Goutput.gravity.nc
grdimage gravity_nn.nc -R -J -O -K -Cfinal.cpt >>map.ps
gmt pscoast -R -J -O -K -Na >>map.ps
psscale -D/-2/12/0.5h -B10::/:mgal: -Cfinal.cpt -O -K >> map.ps
#pscolorbar -Dx1i/7i+w4i/0.5i+h -Cfinal.cpt -Ba -B+tcontinuous -I0.5
This my script but I am not able to proceed further,

If you actually are running -Ix1/y1 then that is wrong syntax. Should not be any x or y at all.
Also looks like you are using GMT 4 syntax. While that is supported it is better if you stick to GMT 6 syntax (see your -B args).
Your psscale seems to have a missing gmt and also a missing arg to -D. Again this is ancient syntax so better if you do this with GMT 6 syntax.

Once you fix this (and if the psscale is the last command then remove the -K for that command) you might be close.

actually, my gravity.xyz file is not responding. And, made the correction which you prescribed.

please help me.

What does

gmt info gravity.xyz

return? Also, please paste in here the first 10 lines of that file as well.

grav.txt (1.9 KB)

I have attached data too.

You are being too sloppy here. It was you who said the file was gravity.xyz but it cannot be found. So your xyz2grd command fails because of that as well as the next steps that depend on that output. You have a call to a nonexistent pscolormap module that messes things up.
From the lines in grav.txt it seems your point spacing is 1 arc minutes, not 5. So pay attention to details.

Thank You, I resolve the problem.