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

reformat_bd.sh 552 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
18
19
20
  1. #!/usr/bin/env bash
  2. #
  3. # Convert grids between netcdf and several of the other "native" formats
  4. log=reformat_bd.log
  5. gmt grdmath -R-10/10/-10/10 -I1 X = lixo.nc
  6. # First convert to int
  7. gmt grdconvert lixo.nc lixo.bd=bd
  8. gmt grdmath lixo.nc lixo.bd=bd SUB = lixo_dif.nc
  9. gmt grd2xyz lixo_dif.nc -ZTLa > $log
  10. # Now convert back to .nc
  11. gmt grdconvert lixo.bd=bd lixo.nc
  12. gmt grdmath lixo.nc lixo.bd=bd SUB = lixo_dif.nc
  13. gmt grd2xyz lixo_dif.nc -ZTLa >> $log
  14. res=$(gmt info -C $log)
  15. echo ${res[0]} ${res[1]} | $AWK '{if($1 != 0 || $2 != 0) print 1}' > fail
Tip!

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

Comments

Loading...