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

explain_grd_inout.rst_ 2.0 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
  1. .. _grd_inout_full:
  2. Grid File Formats
  3. -----------------
  4. By default GMT writes out grids as single precision floats in a COARDS-complaint netCDF file format.
  5. However, GMT is able to produce and read grid files in many other commonly used grid file formats
  6. and also facilitates so called "packing" of grids, writing out floating point data as 1- or 2-byte
  7. integers. To specify the precision, scale and offset, the user should add the suffix
  8. [**=**\ *id*][**+s**\ *scale*][**+o**\ *offset*][**+n**\ *invalid*], where
  9. *id* is a two-letter identifier of the grid type and precision, and the
  10. *scale*, *offset* and *invalid* are the arguments of optional modifiers to be applied
  11. to all grid values, Here, *invalid* is the value used to indicate missing
  12. data. In case the *id* is not provided, as in **+s**\ *scale*
  13. than a *id*\ **=**\ *nf* is assumed.
  14. When reading grids, the format is generally automatically recognized from almost all of those formats
  15. that GMT and GDAL combined offer. If not, the same suffix can be added to input grid file names.
  16. See :doc:`grdconvert </grdconvert>` and Section :ref:`grid-file-format`
  17. of the GMT Technical Reference and Cookbook for more information.
  18. When reading a netCDF file that contains multiple grids, GMT will
  19. read, by default, the first 2-dimensional grid that it can find in that
  20. file. To coax GMT into reading another multi-dimensional variable in
  21. the grid file, append **?**\ *varname* to the file name, where *varname*
  22. is the name of the variable. Note that you may need to escape the
  23. special meaning of **?** in your shell program by putting a backslash in
  24. front of it, or by placing the filename and suffix between quotes or
  25. double quotes. The **?**\ *varname* suffix can also be used for output
  26. grids to specify a variable name different from the default: "z". See
  27. :doc:`grdconvert </grdconvert>` and Sections :ref:`modifiers-for-CF` and :ref:`grid-file-format`
  28. of the GMT Technical Reference and Cookbook for more information, particularly on
  29. how to read slices of 3-, 4-, or 5-dimensional grids.
Tip!

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

Comments

Loading...