Bug #596

grdpaste doesn't work on global grids.

Added by Joseph over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:2014-08-06
Priority:HighDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.1.1 Platform:Mac OS X

Description

Pasting a -180 to +165 longitude tile together with a +165 to +180 tile yields a -195 to 165 range. Both grids are node registered.

This is what is really broken with grdpaste, the spurious empty grid warnings, while agro, are harmless.

Compression is not a factor.

After we get this resolved, it seems that pasting the (e.g.) n00, n15 and n30 strips together causes each successive paste to shift the added band right by 15 degrees. While -195 to +165 is a strange longitude range, pasting the 3 strips with the same longitude range should NOT cause them to offset. Perhaps that is also related to this 15 degree bug.

-jj

gmtset IO_NC4_DEFLATION_LEVEL = 0

grdpaste -Gn30.grd tmp_30.grd unmaskedGrd/e165n30.grd -fg
<no warnings emitted>

gmt grdinfo tmp_30.grd unmaskedGrd/e165n30.grd n30.grd

tmp_30.grd: Title: /Volumes/RAID/doNotBackup/srtm15//unmaskedGrd/w180n30.grd
tmp_30.grd: Command: grdpaste -Gfoo_30.grd tmp_30.grd unmaskedGrd/e150n30.grd -fg
tmp_30.grd: Remark:
tmp_30.grd: Gridline node registration used [Geographic grid]
tmp_30.grd: Grid file format: nf = GMT netCDF format (32-bit float), COARDS, CF-1.5
tmp_30.grd: x_min: -180 x_max: 165 x_inc: 0.00416666666667 name: longitude [degrees_east] nx: 82801
tmp_30.grd: y_min: 15 y_max: 30 y_inc: 0.00416666666667 name: latitude [degrees_north] ny: 3601
tmp_30.grd: z_min: -136.5 z_max: 8669.25 name: z
tmp_30.grd: scale_factor: 1 add_offset: 0
tmp_30.grd: format: netCDF-4 chunk_size: 129,129 shuffle: off deflation_level: 0

unmaskedGrd/e165n30.grd: Title: /Volumes/RAID/doNotBackup/srtm15//unmaskedGrd/e165n30.grd
unmaskedGrd/e165n30.grd: Command: xyz2grd -bi3 -R/165/180/15/30 -I15c -G/Volumes/RAID/doNotBackup/srtm15//unmaskedGrd/e165n30.grd
unmaskedGrd/e165n30.grd: Remark:
unmaskedGrd/e165n30.grd: Gridline node registration used [Geographic grid]
unmaskedGrd/e165n30.grd: Grid file format: nf = GMT netCDF format (32-bit float), COARDS, CF-1.5
unmaskedGrd/e165n30.grd: x_min: 165 x_max: 180 x_inc: 0.00416666666667 name: x nx: 3601
unmaskedGrd/e165n30.grd: y_min: 15 y_max: 30 y_inc: 0.00416666666667 name: y ny: 3601
unmaskedGrd/e165n30.grd: z_min: 0 z_max: 11 name: z
unmaskedGrd/e165n30.grd: scale_factor: 1 add_offset: 0
unmaskedGrd/e165n30.grd: format: netCDF-4 chunk_size: 129,129 shuffle: on deflation_level: 3

n30.grd: Title: /Volumes/RAID/doNotBackup/srtm15//unmaskedGrd/w180n30.grd
n30.grd: Command: grdpaste -Gn30.grd tmp_30.grd unmaskedGrd/e165n30.grd -fg
n30.grd: Remark:
n30.grd: Gridline node registration used [Geographic grid]
n30.grd: Grid file format: nf = GMT netCDF format (32-bit float), COARDS, CF-1.5
n30.grd: x_min: -195 x_max: 165 x_inc: 0.00416666666667 name: longitude [degrees_east] nx: 86401
n30.grd: y_min: 15 y_max: 30 y_inc: 0.00416666666667 name: latitude [degrees_north] ny: 3601
n30.grd: z_min: -136.5 z_max: 8669.25 name: z
n30.grd: scale_factor: 1 add_offset: 0
n30.grd: format: netCDF-4 chunk_size: 129,129 shuffle: off deflation_level: 0

History

#1 Updated by Paul over 2 years ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Thanks, should be fixed in r13420. Give it a try.

#2 Updated by Joseph over 2 years ago

fixed

#3 Updated by Paul over 2 years ago

  • Status changed from Resolved to Closed

Great, closing this issue as fixed.

Also available in: Atom PDF