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

openmp.sh 895 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
21
22
23
  1. #!/usr/bin/env bash
  2. # Testing gmt grdfilter if openmp is used.
  3. ps=openmp.ps
  4. if ! [[ ${HAVE_OPENMP} =~ TRUE|ON ]]; then
  5. # Since a PS-producing test is judge by comparison to original PS
  6. # and since no PS is produced without OpenMP, we simply duplicate
  7. # the original so they both exist and are identical.
  8. echo "OpenMP not available - just duplicating PS to pass test"
  9. cp "${GMT_SRCDIR:-.}"/$ps .
  10. exit 0
  11. fi
  12. FILT=g # Gaussian filter
  13. INC=1 # 1x1 degree output
  14. D=1000 # 1000 km filter width
  15. # Run gmt grdfilter as specified
  16. gmt grdfilter -D4 -F${FILT}$D -I$INC @earth_relief_10m -Gt.nc -fg
  17. gmt makecpt -Cglobe > t.cpt
  18. gmt grdimage t.nc -JQ0/7i -Ba -BWSne+t"$D km Gaussian filter" -Ct.cpt -P -K -Xc -Y1.5i > $ps
  19. gmt psscale -Ct.cpt -D3.5i/-0.5i+w6i/0.1i+h+jTC -O -K -Bxa -By+l"m" >> $ps
  20. gmt grdimage @earth_relief_10m -JQ0/7i -Ba -BWSne+t"Original data" -Ct.cpt -O -Y4.75i >> $ps
Tip!

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

Comments

Loading...