# Grid Interpolation of Data from Polar-Orbiting Satellites

**URL:** <https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080>\
**Category:** New to Julia\
**Tags:** interpolations, geo, gmt\
**Created:** [March 30, 2018, 11:42pm UTC](https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080 "2018-03-30T23:42:02Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [May 9, 2018, 1:32am UTC](https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080/19 "2018-05-09T01:32:39Z")

</div>

```julia
using GMT

# Assume that the Matthew_test.nc is at current dir

# Load the x,y, z arrays from file
x = gmt("read -Tg Matthew_test.nc?x");
y = gmt("read -Tg Matthew_test.nc?y");
z = gmt("read -Tg Matthew_test.nc?sfc_precip");

# Check the range of the coordinates. Need to know x_min, x_max, y_min, y_max
# Those values are the 5th and 6th of
x.range
y.range

# Compute a grid. Don't know original point separation so from dimensions and x values
# esrtimated that they are about 4 km.
G = gmt("nearneighbor -R-1428/1215/-2729/2326 -I4 -S20", [x.z[:] y.z[:] z.z[:]]);

# Quick image
grdimage(G, shade="+ne0.8+a100", proj="X10c/0", frame="a", fmt="jpg", show=true)

```

 ![GMTjl_tmp](https://global.discourse-cdn.com/julialang/original/3X/b/3/b3e04589a31f3081195bc22ba3fb43487e63db94.jpeg)

---

_[View the full topic](https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080)._
