Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

nnfill.sh 649 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
  1. #!/usr/bin/env bash
  2. # Testing grdfill with NN infill of NaN areas
  3. ps=nnfill.ps
  4. # Get topo for Hawaiian Islands and set data inside a 200 km radius of 203/20:30 to NaN
  5. gmt grdmath @earth_relief_05m -R199:30/206/18/23 203 20:30 SDIST 200 GT MUL 0 NAN = islands.nc
  6. gmt makecpt -Csealand -T-5000/1000 > t.cpt
  7. # Fill in the NaN hole using nearest neighbor
  8. gmt grdfill islands.nc -An -Gnew.nc
  9. gmt grdimage islands.nc -JQ6i -Ct.cpt -P -Baf -BWSne -Xc -K -Y0.75i > $ps
  10. gmt grdimage new.nc -J -Ct.cpt -O -K -Baf -BWSne -Y5.15i >> $ps
  11. echo 203 20:30 400 | gmt psxy -R -J -O -K -SE- -W0.25p >> $ps
  12. gmt pstext -R -J -O -F+f24p+cTR+t"-An" -Dj0.2i -Gwhite >> $ps
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...