Dear sir, Thank you very much for giving the reply.
Mean while, I used Pygmt to solve the problem using grdimage. I converted my lat/lon data to a xarray and the plotted the data. Everything is working perfect, however there are some horizontal lines are coming and making the figure irrelavant. I am attaching an image of the figure below, please see this.
The code I used to produce this is as follows:
data1=xr.DataArray(data=datf[0,:,:],dims=[‘x’,‘y’],coords={‘y’:np.arange(-178,182,2),‘x’:np.arange(-90,90,2)})
fig=pygmt.Figure()
pygmt.makecpt(cmap=“jet”, series=[0, 1, 0.1])
fig.grdimage(grid=data1,projection=“N0/12c”,nan_transparent=True, frame=“f”,shading=True)
fig.coast(shorelines=True,water=“snow2”)
fig.colorbar(position=‘JMR’,
frame=[“af”,“x+l#CDHWe”],
scale=1,)
fig.show()
the image that is produced is below.
The problem I noticed is with the
Shorelines= True command. If I am keeping the
shoreline=False, there are no horizontal lines in the plot. But for my publication-related figure, I need to have the
shorelines=True option for better quality plots.
Can you please share your ideas about this, I will be much obliged.
I believe simple things are made very very complicated in GMT6. because the user should directly input the lat/ lon and z data to get the image from a simple text file.