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

units.sh 677 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
  1. #!/usr/bin/env bash
  2. #
  3. # Make a small geographic grid
  4. gmt grdmath -R-70:10:17.05/-70:10:0.10/-42:40:31.10/-42:40:19.95 -I1.31151346331e-05/1.29590887959e-05 X Y MUL = tmp.nc
  5. gmt grdproject -JM-70:10:13.525/-42:40:25.525/8 -R-70:10:17.05/-70:10:0.10/-42:40:31.10/-42:40:19.95 tmp.nc -Gc.nc -nb --PROJ_LENGTH_UNIT=cm
  6. w_cm=$(gmt grdinfo c.nc -C | cut -f3)
  7. gmt grdproject -JM-70:10:13.525/-42:40:25.525/8 -R-70:10:17.05/-70:10:0.10/-42:40:31.10/-42:40:19.95 tmp.nc -Gi.nc -nb --PROJ_LENGTH_UNIT=inch
  8. w_inch=$(gmt grdinfo i.nc -C | cut -f3)
  9. err=$(gmt math -Q $w_inch $w_cm NEQ =)
  10. if [ $err -eq 1 ]; then
  11. echo "cm gave $w_cm cm and inch gave $w_inch inc" > fail
  12. else
  13. touch fail
  14. fi
Tip!

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

Comments

Loading...