grdimage problem

Added by Gonzalo Antonio 19 days ago

Dear all,
Thank you for the time reading it.
I am working on Ubuntu 16.04 with GMT 5.4.1, it worked fine until the Ubuntu update, now I have the problem related on grdimage.
I did a script to plot the seismic events on my region, so these are the lines of the simple code.

#! /bin/bash
region="-R-69.8/-57/-23.0/-8.0" #lonIZ/lonDer/LatDown/LatUp # Bolivia
flags="-Xc -Yc -B5 -K -P -V"
pts="-Wthinnest -V"
inte='/home/tonino/Documents/mapas_gmt/lloja_mpas/' # I have created it with #grdgradient $grdfile -A0 -Nt

#the data
awk '/ILOC/ {nr[NR]}; NR in nr' 11_12_v2.out > iloc.inp
awk '/OSC_NDC/ {nr[NR]}; NR in nr' 11_12_v2.out > oscme.inp

psbasemap $region $proy $flags > $archi

#grid for map
grdimage $grdfile $region -I$inte $proy $flags -C$color -n+c>> $archi
pscoast $region $proy -B5 -B+t"2011-2012 Seismic location" -N1 -Di -W2/0 -O -V -K >> $archi
psxy -R -J /dev/null -O >> $archi
evince $archi

On Ubuntu 14.04 worked fine this code, but now on Ubuntu 16.06 I have this warning:

grdimage: gmt_grd_project: Output grid extrema [-1.37795/1.78899] exceed extrema of input grid [-0.95984/0.95721] due to resampling

and the output is too small, attached the file (2b_locations).
I am suing by default the GMTtopo.cpt color palette and the ETOPO1_Bed_g_gmt4.grd grid file

I tried to create again the intensity file but it is the same, the figure keeps small.
Can you give a hand on it.
Thank you a lot.
Best regards
Tonino - output file (1.84 MB)

Replies (4)

RE: grdimage problem - Added by Paul 19 days ago

  1. That warning is pretty harmless but -n+c clips the output to the input limits.
  2. It is not clear to anyone what you mean by "the figure keeps small." so I cannot help yet. What is smaller than you expected?

RE: grdimage problem - Added by Gonzalo Antonio 18 days ago

Dear Paul,

Thank you for your time, sorry for my bad explanation.

I'd like to have a map that covers the region="-R-69.8/-57/-23.0/-8.0" with a projection of 5i size proy="-JM5i" (attached the map size, the size is about a legal sheet, until here it works good.

but when I use the command:

grdimage $grdfile $region -I$inte $proy $flags -C$color -n+c>> $archi

under the map which covers the region="-R-69.8/-57/-23.0/-8.0" the drawing goes to the left bottom corner and it is not covering the whole region ( will show that on the map boundaries a small (sorry for the word) is created.

But when I convert from PS to JPG (attach the file called MAP) I have the map under the region and with 5i size.

Do you think it is a problem on my Post Script library?

Thank you for your time

regards (31.1 KB) (1.84 MB)

MAP.jpeg (729 KB)

RE: grdimage problem - Added by Paul 18 days ago

The files looks fine here. Sounds like your PostScript previewer is no good.

RE: grdimage problem - Added by Gonzalo Antonio 18 days ago

Dear Paul,
Thank you a lot for your time, it seems my PS previewer is not working well,
have a good day.
Best regards