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

earth-masks.rst_ 3.5 KB

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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  1. Global Earth Mask Grids
  2. -----------------------
  3. .. figure:: /_images/GMT_earthmask.*
  4. :height: 888 px
  5. :width: 1774 px
  6. :align: center
  7. :scale: 40 %
  8. Many users need ocean/land mask grids to isolate features that should only be
  9. set over the ocean or on land. While you can prevent such areas from being plotted
  10. via the clipping in :doc:`/coast`, you may still want to perform calculations on
  11. gridded data and apply masks via :doc:`/grdmath`. Such mask grids can be computed
  12. via :doc:`/grdlandmask` but they can take a long time to compute for large regions,
  13. the full GSHHG resolution, and small grid spacings. For these reasons we offer
  14. precalculated mask grids via the remote server mechanism.
  15. Usage
  16. ~~~~~
  17. You access a global mask grid by specifying the special name
  18. @earth_mask_\ *rr*\ *u*\ [_\ *reg*\ ]
  19. The following codes for *rr*\ *u* and the optional *reg* are supported (dimensions are listed
  20. for pixel-registered grids; gridline-registered grids increment dimensions by one):
  21. .. _tbl-earth_masks:
  22. ==== ================= === ======= =====================================================
  23. Code Dimensions Reg Size Description
  24. ==== ================= === ======= =====================================================
  25. 01d 360 x 180 g,p 20 KB 1 arc degree global mask (skip features < 12364 km^2)
  26. 30m 720 x 360 g,p 24 KB 30 arc minute global mask (skip features < 3091 km^2)
  27. 20m 1080 x 540 g,p 30 KB 20 arc minute global mask (skip features < 1374 km^2)
  28. 15m 1440 x 720 g,p 35 KB 15 arc minute global mask (skip features < 773 km^2)
  29. 10m 2160 x 1080 g,p 57 KB 10 arc minute global mask (skip features < 343 km^2)
  30. 06m 3600 x 1800 g,p 106 KB 6 arc minute global mask (skip features < 124 km^2)
  31. 05m 4320 x 2160 g,p 117 KB 5 arc minute global mask (skip features < 86 km^2)
  32. 04m 5400 x 2700 g,p 149 KB 4 arc minute global mask (skip features < 55 km^2)
  33. 03m 7200 x 3600 g,p 209 KB 3 arc minute global mask (skip features < 31 km^2)
  34. 02m 10800 x 5400 g,p 393 KB 2 arc minute global mask (skip features < 14 km^2)
  35. 01m 21600 x 10800 g,p 998 KB 1 arc minute global mask (skip features < 3 km^2)
  36. 30s 43200 x 21600 g,p 2.6 MB 30 arc second global mask (skip features < 1 km^2)
  37. 15s 86400 x 43200 g,p 7.5 MB 15 arc second global (all features)
  38. ==== ================= === ======= =====================================================
  39. All of these data will, when downloaded, be placed in your ~/.gmt/server directory, with
  40. the Earth mask files being placed in an ``earth/earth_mask`` sub-directory.
  41. Technical Information
  42. ~~~~~~~~~~~~~~~~~~~~~
  43. Given that GSHHG contains 5 levels (ocean, land, lake, island-in-lake, pond-in-island-in-lake)
  44. corresponding to levels 0-4, the mask grids were computed to reflect those 5 levels. This
  45. means that if you only want a mask for the ocean or one for wet versus dry, you will need to
  46. run a simple :doc:`/grdmath` command to adjust the mask for your use. We give some common
  47. examples here. To create a gridline-registered mask that is 0 in the ocean and 1 everywhere
  48. else (even in lakes, etc.), try::
  49. gmt grdmath @earth_mask_01m_g 0 GT = ocean_land.grd
  50. To make a pixel-registered mask that has NaNs on land and 1 in the oceans, use::
  51. gmt grdmath @earth_mask_01m_p 0 LE 0 NAN = land_NaN.grd
  52. Finally, to make a pixel-registered mask that is 1 for lakes and NaN elsewhere, try::
  53. gmt grdmath @earth_mask_01m 2 EQ 0 NAN = lakes_and_NaN.grd
Tip!

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

Comments

Loading...