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

remote-data.rst 7.4 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
  1. Remote Data Sets
  2. ================
  3. A *remote data set* is a data set that is stored on one or more remote servers. It may
  4. be a single grid file or a collection of subset tiles making up a larger grid. They
  5. are not distributed with GMT or installed during the installation procedures.
  6. GMT offers several remote global data grids that you can access via our *remote file* mechanism.
  7. The first time you access one of these files, GMT will download the file (or a subset tile) from
  8. the selected GMT server and save it to the *server* directory under your GMT user directory [~/.gmt].
  9. From then on we read the local file from there.
  10. By using the remote file mechanism you should know that these files, on the server, will change
  11. from time to time (i.e., new versions are released, a problem in one file is fixed, or a dataset
  12. becomes obsolete), and GMT will take actions accordingly. It is our policy to only supply the *latest*
  13. version of any dataset that undergoes revisions. If you require previous versions for your work you
  14. will need to get those data from the data provider separately. Unless you deactivate the remote data service,
  15. GMT will do the following when you request a remote file in a GMT command:
  16. #. We check if the locally cached catalog with information about the data available from the server
  17. is up-to-date or if it needs to be refreshed. If the file is older that the :term:`GMT_DATA_UPDATE_INTERVAL`
  18. limit then we refresh the catalog.
  19. #. When the catalog is refreshed, we determine the publication date for each dataset on the server,
  20. and if any local copies you may have are now obsolete we will remove them to force a re-download from the server.
  21. Usage
  22. -----
  23. We have processed and reformatted publicly available global data sets (grids and images)
  24. and standardized their file names. In GMT, you may access such data
  25. (or a subset only by using the **-R** option) by specifying the special name
  26. @remote_name_\ *rr*\ *u*\ [_\ *reg*\ ]
  27. where the leading @ symbol identifies the file as a remote data set, the *remote_name_* is specific
  28. to the dataset and the *rr* code is a 2-digit integer specifying the grid/image
  29. resolution in the unit *u*, where *u* is either **d**, **m** or **s** for arc degree, arc minute or
  30. arc second, respectively. Optionally, you can append _\ **g** or _\ **p** to specifically get the
  31. gridline-registered or pixel-registered version (if they both exist). If *reg* is not specified we
  32. will return the pixel-registered version unless only the gridline-registered file is available. If you
  33. do specify a specific registration and that version is not available you will get an error message.
  34. The codes for *rr*\ *u* and the optional *reg* that are supported will be listed in the sections
  35. below describing each of the available data sets.
  36. Currently, GMT provides the following datasets (with their special names in parentheses)
  37. - `Global Earth Relief Grids`_ (``earth_relief``)
  38. - `Global Earth Seafloor Crustal Age Grids`_ (``earth_age``)
  39. - `Global Earth Day/Night Images`_ (``earth_day`` and ``earth_night``)
  40. - `Global Earth Mask Grids`_ (``earth_mask``)
  41. Many of the remote datasets have a preferred, default color table that will be used unless you
  42. override that default by giving your desired CPT information.
  43. Controlling the Process
  44. -----------------------
  45. There are several ways you can control the remote data process and the amount of space taken up by your
  46. own server directory:
  47. #. You can select the GMT data server closest to you to minimize download time [:term:`GMT_DATA_SERVER`].
  48. #. You can set an upper limit on the file sizes that may be downloaded [:term:`GMT_DATA_SERVER_LIMIT`].
  49. #. You can turn of the automatic download temporarily [:term:`GMT_AUTO_DOWNLOAD`].
  50. #. You can control how often GMT will refresh the catalog of information on your computer
  51. [:term:`GMT_DATA_UPDATE_INTERVAL`]
  52. #. You can clear the *server* directory, or perhaps just some subsets, any time via gmt :doc:`/clear`.
  53. Offline Usage
  54. -------------
  55. If you anticipate to be without an Internet connection (or have a very slow one), you can download
  56. all (or some) of the remote files prior to losing connection with the module :doc:`/gmtget`. You
  57. can choose which data to download and limit it to node spacings larger or equal to a limit, and you
  58. can minimize space on your computer by requesting that any JPEG2000 tiles *not* be converted until GMT
  59. is accessing them. Here are some examples of usage. Download the entire cache directory used
  60. in examples and tests::
  61. gmt get -Dcache
  62. Get all the data for Earth but only for 1 arc minute and coarser, and leave tiles in JPEG2000 format::
  63. gmt get -Ddata=earth -I1m -N
  64. As shown in the tables below, the largest datasets may take some time to download the data from GMT
  65. server, so be patient!
  66. File Compression
  67. ----------------
  68. Typically, a dataset is released by the data provider in a single, high-resolution format.
  69. To optimize use of these data in GMT and to prevent download bottlenecks we have downsampled
  70. them via Cartesian Gaussian filtering to prevent aliasing while preserving the latitude-dependent
  71. resolution in the original grid or image. To improve responsiveness, the larger files (i.e., currently
  72. for node spacings 05m and smaller) have been split into smaller tiles. When the 06m or lower resolution
  73. files are accessed the first time we download the entire file, regardless of your selected region (**-R**).
  74. However, for the tiled data sets we only download the tiles that intersect your selected region
  75. the first time they are referenced.
  76. Single grids are provided as netCDF-4 maximum-lossless compressed short int grids, making the files
  77. much smaller than their original source files without any loss of precision. To minimize download
  78. speed, the dataset tiles are all stored as JPEG2000 images on the GMT server due to superior compression,
  79. but once downloaded to your server directory they are converted to the same short int compressed netCDF4
  80. format for easier access. This step uses our GDAL bridge and thus requires that you have built GMT with
  81. GDAL support *and* that your GDAL distribution was built with *openjpeg* support.
  82. .. _jp2_compression:
  83. .. figure:: /_images/srtm1.*
  84. :width: 500 px
  85. :align: center
  86. Histogram of compression rates for the SRTM 1x1 arc second tiles. 100% reflects the full short integer
  87. size of an uncompressed tile (~25 Mb). As can be seen, on average a JPEG2000 tile is only half the
  88. size of the corresponding fully compressed (level 9) netCDF short int grid. This is why we
  89. have chosen the JP2 format for tiles on the server.
  90. Cache File Updates
  91. ------------------
  92. Remote cache files are our collection of miscellaneous files that are used throughout the GMT examples,
  93. man pages, and test suite. There is no system nor catalog and files come and go as we need them. The cache
  94. files are subject to similar rules as the remote data set when it comes to refreshing or deleting them.
  95. If any of these files is precious to you we suggest you make a copy somewhere.
  96. Getting a single grid
  97. ---------------------
  98. Should you need a single grid from any of our tiled dataset, e.g., to feed into other programs that do
  99. not depend on GMT, you can create that via :doc:`/grdcut`. For instance, to make a global grid from the
  100. eight tiles that make up the 2m x 2m gridline-registered data, try::
  101. gmt grdcut @earth_relief_02m_g -Gearth_at_2m.grd
  102. ----
  103. .. include:: earth-relief.rst_
  104. ----
  105. .. include:: earth-age.rst_
  106. ----
  107. .. include:: earth-daynight.rst_
  108. ----
  109. .. include:: earth-masks.rst_
Tip!

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

Comments

Loading...