Hi,
I just updated to 6.5 from 6.3, and i find that my grdimage can no longer use the -Q option to plot NAN values as completely transparent if i also have intensity set by -I+d.
example:
gmt grdimage $filename1 -R$region -I+d -C$CPT_FILE -J$Jparam -Q,
which returns the error:
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
This is relevant because i am trying to plot two grids (.grd format) on top of each other, but now the one plotted second plots all the NAN vaules in white, instead of transparent. Is there a way around this?
I know that i can add -T+s to grdimage, but it makes it quite slow and makes the file size 10x larger. I can also use grdblend to combine the 2 grids, which is also very slow.
gmt grdblend $filename1 $filename2 -Gblended.grd -I25e -R$region -Vq
-Atransparency[+a]
Sets a constant level of transparency (0-100) for all color slices. Append +a to also affect the fore-, back-, and nan-colors [Default is no transparency, i.e., 0 (opaque)].
This is from memory only, thus low trusting, but NaN transparency was a grdview only feature up to recent extension of of it to grdimage. So, I’m having difficulties seeing the backward compat breaking side of this.
As far as I can tell, this will affect the entire cpt, whereas I only want to affect the NaN values. And I am not even using makecpt, I manually make the cpt (taken from MB-System/haxby). In that sense, I do not specify foreground/background/NaN colors, so perhaps there is a way to set COLOR_NAN to transparent?
which plotted the $filename1 on top of $filename2 (both .grd files). $filename2 is larger and covers more area, but $filename1 is at a higher resolution, so I dont want the background of $filename1 (just NaN values from mbgrid in mb-system) covering the bathymetry of $filename2.
Now, when I updated to GMT 6.5, that was giving an error, so I had to switch to
which skips plotting nodes with z = NaN, but doesnt really seem to be for plotting bathymetry data. This method increased the file size about 4 times as well, making it much slower to open, going from ~20mb to 80mb.
A third method is possible, but produces a filesize of ~280mb, although the significant increase is likely due to resampling (-I25e) at a 25m resolution, which $filename1 can handle, but $filename2 is really a 100m grid: