Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove outdated information

ll2xy vs latlon2statgrid and xy2ll vs statgrid2latlon

...

Common Properties

  •  Accept 2 (x, y) or 3 (x, y, station) values. The 3rd value is copied to output.
ll2xy and xy2lllatlon2statgrid and statgrid2latlonNotes
can work on standard input or filesmust work on files onlyll2xy more flexible, can use pipes instead of files
xy I/O is in km from centrestatgrid I/O is point position from top left cornercan convert between output styles given:
horizontal spacing and total domain size
given model grid point ll coordinates,
resulting x, y values are equidistant
incremental statgrid points converted to lat lon plotted:
are not equidistant and are systematically shifted
some points are out of place compared with neighbours 
this is why ll2xy and xy2ll has a wrapper function
to make sure converted points are equidistant
given horizontal spacing or grid point increments. 

Conversion between geographic data formats

convert a shapefile from NZGD2000 (found on LINZ) to WGS84 (different source spacial reference system and output srs)

...

Cropping coordinates (station locations) using GMT

Option 1: using gmt select

gmt select -Fpolygon.ll hh400.ll > hh400_land.ll

...

gmt select -F/nesi/projects/nesi00213/PlottingData/Paths/lds-nz-coastlines-and-islands/150k.gmt non-uniform-100m.ll > non-uniform-land.ll

Option 2: using gmt spatial

Convert points to virtual paths by duplicating position and naming segment with 3rd value (station name).

...

awk '{if ($1 == ">") n=$2; if (NR % 3 == 2) print $1, $2, n}' hh400_cropped.ll > hh400_land.ll

...