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

center_nf_g.sh 932 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
13
14
15
16
17
  1. #!/usr/bin/env bash
  2. # Shows bug in grdblend when cutting across input grids
  3. # The bottom region should equal the inset box on top.
  4. # This is for the new netCDF format. Gridline-registration.
  5. ps=center_nf_g.ps
  6. gmt grdmath -R-2/0/-2/0 -I1 X Y ADD = LL.nc
  7. gmt grdmath -R0/2/-2/0 -I1 X Y ADD = LR.nc
  8. gmt grdmath -R-2/0/0/2 -I1 X Y ADD = UL.nc
  9. gmt grdmath -R0/2/0/2 -I1 X Y ADD = UR.nc
  10. gmt grdblend -R-1/1/-1/1 -I1 LL.nc LR.nc UL.nc UR.nc -GCM.nc
  11. gmt grdblend -R-2/2/-2/2 -I1 LL.nc LR.nc UL.nc UR.nc -Gall.nc
  12. gmt makecpt -Cjet -T-4/4 > t.cpt
  13. gmt grdimage CM.nc -Ct.cpt -JX4i -P -Bafg2 -K -Xc > $ps
  14. gmt grd2xyz CM.nc | gmt pstext -RCM.nc -JX4i -O -K -F+f16p+jCM+z%g -N -Gwhite >> $ps
  15. gmt grdimage all.nc -Ct.cpt -JX4i -P -Bafg2 -BWsNE+t"Gridline new netCDF nf" -O -K -Y4.5i >> $ps
  16. gmt grdinfo CM.nc -Ib | gmt psxy -Rall.nc -JX4i -W4p -O -K -A >> $ps
  17. gmt grd2xyz all.nc | gmt pstext -Rall.nc -JX4i -O -F+f16p+jCM+z%g -N -Gwhite >> $ps
Tip!

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

Comments

Loading...