Skip to content

Commit

Permalink
Merge branch 'master' into psconvert-no-file-dup
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim committed Jan 22, 2025
2 parents ae5b221 + 504e6d2 commit b23a985
Show file tree
Hide file tree
Showing 51 changed files with 232 additions and 199 deletions.
3 changes: 1 addition & 2 deletions ci/install-dependencies-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ sudo apt-get update
sudo apt-get install -y --no-install-recommends --no-install-suggests $packages

# Install packages via conda
conda update -n base -c conda-forge conda --solver libmamba
conda install ${conda_packages} -c conda-forge --solver libmamba
conda install ${conda_packages} -c conda-forge
echo "${CONDA}/bin" >> $GITHUB_PATH

# Remove pcre-config from conda's path so cmake won't find the conda's one
Expand Down
3 changes: 1 addition & 2 deletions ci/install-dependencies-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ fi
brew install ${packages}

# Install packages via conda
conda update -n base -c conda-forge conda --solver libmamba
conda install ${conda_packages} -c conda-forge --solver libmamba
conda install ${conda_packages} -c conda-forge
echo "${CONDA}/bin" >> $GITHUB_PATH

# Remove pcre-config from conda's path so cmake won't find the conda's one
Expand Down
3 changes: 1 addition & 2 deletions ci/install-dependencies-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ if [ "$PACKAGE" = "true" ]; then
fi

# install more packages using conda
$CONDA\\Scripts\\conda.exe update -n base -c conda-forge conda --solver libmamba
$CONDA\\Scripts\\conda.exe install ${conda_packages} -c conda-forge --solver libmamba
$CONDA\\Scripts\\conda.exe install ${conda_packages} -c conda-forge
echo "$CONDA\\Library\\bin" >> $GITHUB_PATH
echo "$CONDA\\Scripts" >> $GITHUB_PATH

Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex03/ex03.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ REM
REM Purpose: Resample track data, do spectral analysis, and plot
REM GMT modules: filter1d, fitcircle, gmtconvert, gmtinfo, project, sample1d
REM spectrum1d, plot, subplot, legend, math
REM DOS calls: echo, set, del
REM DOS calls: set, del
REM
REM This example begins with data files "ship_03.txt" and "sat_03.txt" which
REM are measurements of a quantity "g" (a "gravity anomaly" which is an
Expand Down
1 change: 0 additions & 1 deletion doc/examples/ex04/ex04.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ REM GMT EXAMPLE 04
REM
REM Purpose: 3-D mesh and color plot of Hawaiian topography and geoid
REM GMT modules: grdcontour, grdimage, grdview, basemap, coast, text, makecpt
REM DOS calls: echo
REM
gmt begin
gmt figure ex04
Expand Down
1 change: 0 additions & 1 deletion doc/examples/ex04/ex04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Purpose: 3-D mesh and color plot of Hawaiian topography and geoid
# GMT modules: colorbar, grdcontour, grdimage, grdview, basemap, coast, text, makecpt
# Unix progs: echo, rm
#
gmt begin
gmt figure ex04
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex07/ex07.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 07
REM
REM Purpose: Make a basemap with earthquakes and isochrons, etc.
REM GMT modules: coast, legend, text, plot
REM DOS calls: del
REM
gmt begin ex07
gmt coast -R-50/0/-10/20 -JM24c -Slightblue -GP26+r300+ftan+bdarkbrown -Dl -Wthinnest -B --FORMAT_GEO_MAP=dddF
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex11/ex11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Purpose: Create a 3-D RGB Cube
# GMT modules: set, grdimage, grdmath, text, plot
# Unix progs: rm
# Unix progs: echo, rm
gmt begin ex11
# Use gmt plot to plot "cut-along-the-dotted" lines.
gmt set MAP_TICK_LENGTH_PRIMARY 0
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex18/ex18.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REM Purpose: Illustrates volumes of grids inside contours and spatial
REM selection of data
REM GMT modules: gmtset, gmtselect, gmtspatial, grdclip, grdcontour, grdimage
REM GMT modules: grdmath, grdvolume, makecpt, coast, colorbar, text, plot
REM DOS calls: del
REM DOS calls: del, echo, set
REM
gmt begin ex18
REM Use spherical gmt projection since SS data define on sphere
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex18/ex18.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# selection of data
# GMT modules: gmtset, gmtselect, gmtspatial, grdclip, grdcontour, grdimage
# GMT modules: grdmath, grdvolume, makecpt, coast, colorbar, text, plot
# Unix progs: rm
# Unix progs: echo, rm
#
gmt begin ex18
# Use spherical gmt projection since SS data define on sphere
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex21/ex21.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 21
REM
REM Purpose: Plot a time-series
REM GMT modules: set, convert, info, basemap, plot
REM DOS calls: del, echo, set
REM
gmt begin ex21
REM File has time stored as dd-Mon-yy so set input format to match it
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex22/ex22.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 22
REM
REM Purpose: Automatic map of last month of world-wide seismicity
REM GMT modules: set, coast, plot, legend
REM DOS calls: del, echo, set
REM
gmt begin ex22
gmt set FONT_ANNOT_PRIMARY 10p FONT_TITLE 18p FORMAT_GEO_MAP ddd:mm:ssF
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex22/ex22.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Purpose: Automatic map of last month of world-wide seismicity
# GMT modules: coast, plot, legend
# Unix progs: cat, sed, awk, wget|curl
# Unix progs: cat, wget|curl
#
gmt begin ex22
# Get the data (-s silently) from USGS using the curl
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex26/ex26.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 26
REM
REM Purpose: Demonstrate general vertical perspective projection
REM GMT modules: coast
REM DOS calls: set
REM
gmt begin ex26
REM first do an overhead of the east coast from 160 km altitude point straight down
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex27/ex27.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 27
REM
REM Purpose: Illustrates how to plot Mercator img grids
REM GMT modules: makecpt, grdimage, grdinfo, coast, colorbar
REM DOS calls: set
REM
gmt begin ex27
REM Gravity in tasman_grav.nc is in 0.1 mGal increments and the grid
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex28/ex28.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 28
REM
REM Purpose: Illustrates how to mix UTM data and UTM gmt projection
REM GMT modules: makecpt, grdimage, coast, text, basemap
REM DOS calls: echo
REM
gmt begin ex28
REM Set up a color table
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex28/ex28.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Purpose: Illustrates how to mix UTM data and UTM gmt projection
# GMT modules: makecpt, grdimage, coast, text, basemap
# Unix progs: echo
#
gmt begin ex28
# Set up a color table
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex35/ex35.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Purpose: Illustrate sphtriangulate and sphdistance with GSHHG crude data
# GMT modules: coast, plot, makecpt, grdimage, grdcontour, sphtriangulate, sphdistance
# Unix progs: rm
# Unix progs: awk, rm
#

# set AWK to awk if undefined
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex36/ex36.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 36
REM
REM Purpose: Illustrate sphinterpolate with Mars radii data
REM GMT modules: plot, makecpt, grdimage, sphinterpolate
REM DOS calls: del
REM
gmt begin ex36
REM Interpolate data of Mars radius from Mariner9 and Viking Orbiter spacecrafts
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex36/ex36.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# GMT EXAMPLE 36
#
# Purpose: Illustrate sphinterpolate with Mars radii data
# GMT modules: plot, makecpt, grdimage, sphinterpolate
# GMT modules: plot, makecpt, grdimage, sphinterpolate, subplot
# Unix progs: rm
#
gmt begin ex36
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex38/ex38.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# GMT EXAMPLE 38
#
# Purpose: Illustrate histogram equalization on topography grids
# GMT modules: colorbar, text, makecpt, grdhisteq, grdimage
# GMT modules: colorbar, text, makecpt, grdhisteq, grdimage, subplot
# Unix progs: rm
#
gmt begin ex38
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/ex39/ex39.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ REM GMT EXAMPLE 39
REM
REM Purpose: Illustrate evaluation of spherical harmonic coefficients
REM GMT modules: colorbar, text, makecpt, grdimage, sph2grd
REM DOS calls: del, echo
REM
gmt begin ex39
REM Evaluate the first 180, 90, and 30 order/degrees of Venus spherical
REM harmonics topography model, skipping the L = 0 term (radial mean).
REM File truncated from http://www.ipgp.fr/~wieczor/SH/VenusTopo180.txt.zip
REM Wieczorek, M. A., Gravity and topography of the terrestrial planets,
REM Treatise on Geophysics, 10, 165-205, doi:10.1016/B978-044452748-6/00156-5, 2007
REM Treatise on Geophysics, 10, 165-205, doi:10.1016/B978-044452748-6/00156-5, 2007

gmt sph2grd @VenusTopo180.txt -I1 -Rg -Ng -Gv1.nc -F1/1/25/30
gmt sph2grd @VenusTopo180.txt -I1 -Rg -Ng -Gv2.nc -F1/1/85/90
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/ex39/ex39.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# GMT EXAMPLE 39
#
# Purpose: Illustrate evaluation of spherical harmonic coefficients
# GMT modules: colorbar, text, makecpt, grdimage, sph2grd
# Unix progs: rm
# GMT modules: colorbar, text, makecpt, grd2cpt, grdimage, sph2grd
# Unix progs: echo, rm
#
gmt begin ex39
# Evaluate the first 180, 90, and 30 order/degrees of Venus spherical
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex40/ex40.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 40
REM
REM Purpose: Illustrate line simplification and area calculations
REM GMT modules: basemap, text, plot, gmtsimplify, gmtspatial, subplot
REM DOS calls: del
REM

gmt begin ex40
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex42/ex42.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 42
REM
REM Purpose: Illustrate Antarctica and stereographic projection
REM GMT modules: makecpt, grdimage, coast, legend, colorbar, text, plot
REM DOS calls: del, echo
REM
gmt begin ex42
gmt set FONT_ANNOT_PRIMARY 12p FONT_LABEL 12p PROJ_ELLIPSOID WGS-84 FORMAT_GEO_MAP dddF
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/ex42/ex42.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# GMT EXAMPLE 42
#
# Purpose: Illustrate Antarctica and stereographic projection
# GMT modules: makecpt, grdimage, coast, legend, colorbar, set, text, plot
# Unix progs: [curl grdconvert]
# GMT modules: makecpt, grdimage, coast, legend, colorbar, set, text, plot, [grdconvert]
# Unix progs: [curl, gunzip]
#
gmt begin ex42
gmt set PROJ_ELLIPSOID WGS-84
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/ex43/ex43.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
REM GMT EXAMPLE 43
REM
REM Purpose: Illustrate regression and outlier detection
REM GMT modules: gmtregress, basemap, legend, text, plot
REM DOS calls: grep, awk, sed
REM GMT modules: gmtregress, basemap, legend, text, plot, which
REM DOS calls: grep, awk, sed, echo, del, set
REM

REM Data from Table 7 in Rousseeuw and Leroy, 1987.
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex43/ex43.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Purpose: Illustrate regression and outlier detection
# GMT modules: gmtregress, basemap, legend, text, plot
# Unix progs: grep, awk, sed
# Unix progs: cat, grep, awk, sed, rm
#

# set AWK to awk if undefined
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex45/ex45.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 45
REM
REM Purpose: Illustrate use of trend1d mixed models
REM GMT modules: text, plot, trend1d
REM DOS calls: del
REM

gmt begin ex45
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/ex47/ex47.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Purpose: Illustrate use of gmtregress with different norms and types
# GMT modules: gmtregress, plot, text, subplot
# Unix progs: rm
# Unix progs: grep, sed, rm
#

# Because all panels are almost identical we make a bash function that plots
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex48/ex48.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Purpose: Illustrate use of trimmed lines with vectors, networks, and local spiderwebs
# GMT modules: makecpt, coast, plot, sphtriangulate, grdimate, gmtmath, text
# Unix progs: echo, rm
#

gmt begin ex48
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex49/ex49.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ REM
REM Purpose: Illustrate data analysis using the seafloor depth/age relationship
REM GMT modules: blockmode, gmtmath, grdcontour, grdimage, grdsample, makecpt,
REM subplot, basemap, legend, colorbar, plot, xyz2grd
REM DOS calls: del
REM

gmt begin ex49
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex49/ex49.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Purpose: Illustrate data analysis using the seafloor depth/age relationship
# GMT modules: blockmode, gmtmath, grdcontour, grdimage, grdsample, makecpt,
# subplot, basemap, legend, colorbar, plot, xyz2grd
# Unix progs: rm
#

gmt begin ex49
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex50/ex50.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REM GMT EXAMPLE 50
REM
REM Purpose: Illustrate different statistical distributions in gmtmath
REM GMT modules: math, set, plot, text
REM DOS calls: del, echo
REM

gmt begin ex50
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex50/ex50.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Purpose: Illustrate different statistical distributions in gmtmath
# GMT modules: math, set, plot, text
# Unix progs: rm
#

gmt begin ex50
Expand Down
1 change: 1 addition & 0 deletions doc/examples/ex52/ex52.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Purpose: Mixing images and overlaying them on the Earth
# GMT modules: grdgradient, grdimage, grdmath, grdmix, grdsample, solar
# Unix progs: rm

res=20m # Change to 15m, 10m, 06m, 05m, 04m, 03m, 02m, 01m, 30s for higher resolutions

Expand Down
3 changes: 2 additions & 1 deletion doc/examples/ex53/ex53.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
# Purpose: Illustrate subplot with loops
# GMT modules: makecpt, subplot, set, plot, grdimage, clip, coast
# Unix progs: rm
#

gmt begin ex53
Expand All @@ -22,4 +23,4 @@ gmt begin ex53
done < $data
gmt subplot end
rm -f Top12Cities.txt
gmt end show
gmt end show
36 changes: 13 additions & 23 deletions doc/rst/source/reference/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,48 +519,38 @@ URLs and remote files

Three classes of files are given special treatment in GMT.

#. Some data sets are ubiquitous and used by nearly all GMT users.
At the moment this collection is limited to Earth relief grids. If you specify
a grid input named **@earth_relief_**\ *res* on a command line then
such a grid will automatically be downloaded from the GMT Data Server and placed
in the *server* directory under **$GMT_USERDIR** [~/.gmt]. The resolution *res* allows a choice among
15 common grid spacings: 01d, 30m, 20m, 15m, 10m, 06m, 05m, 04m, 03m, 02m, 01m,
30s, and 15s (with file sizes 111 kb, 376 kb, 782 kb, 1.3 Mb, 2.8 Mb, 7.5 Mb,
11 Mb, 16 Mb, 27 Mb, 58 Mb, 214 Mb, 778 Mb, and 2.6 Gb respectively) as well
as the SRTM tile resolutions 03s and 01s (6.8 Gb and 41 Gb for the whole set, respectively). Once
one of these grids have been downloaded any future reference will simply obtain the
file from **$GMT_USERDIR** (except if explicitly removed by the user).
**Note**: The 15 arc-sec data comes from the original dataset SRTM15+.
Lower resolutions are spherically Gaussian-filtered versions of SRTM15+.
The SRTM (version 3) 1 and 3 arc-sec tiles are only available over land
between 60 degrees south and north latitude and are stored as highly compressed JPEG2000
tiles on the GMT server. These are individually downloaded as requested, converted to netCDF
grids and stored in subdirectories srtm1 and srtm3 under the server directory, and assembled
into a seamless grid using :doc:`/grdblend`. A tile is only downloaded and converted
once (unless the user cleans the data directories).
#. GMT offers several remote global data grids that you can access via our remote file mechanism
(e.g. **@earth_relief**). The first time you access one of these files, GMT will download
the file (or a subset tile) from the selected GMT server and save it to the *server* directory
under your **$GMT_USERDIR** directory [~/.gmt]. Once one of these grids have been downloaded
any future reference will simply obtain the file from **$GMT_USERDIR** (except if explicitly
removed by the user). See the `Remote Datasets <https://docs.generic-mapping-tools.org/dev/datasets/remote-data.html>`_
section for a comprehensive list of available remote datasets and detailed information.


#. If a file is given as a full URL, starting with **http://**, **https://**,
or **ftp://**, then the file will be downloaded to the current directory and subsequently
read from there (until removed by the user). If the URL is actually a CGI Get
read from there (until removed by the user). If the URL is actually a CGI Get
command (i.e., ends in ?par=val1&par2=val2...) then we download the file
each time we encounter the URL.
#. Demonstration files used in online documentation, example scripts, or even the
large test suite may be given in the format @\ *filename*. When such a file is
encountered on the command line it is understood to be a short-hand representation
of the full URL to *filename* on the GMT Cache Data site.
Since this address may change over time we use the leading
@ to simplify access to these files. Such files will also be downloaded
@ to simplify access to these files. Such files will also be downloaded
to :term:`DIR_CACHE` and subsequently read from there (until removed by the user).
#. By default, remote files are downloaded from the SOEST data server. However, you
can override that selection by setting the environmental parameter **$GMT_DATA_SERVER** or
the default setting for :term:`GMT_DATA_SERVER`. Alternatively, configure the CMake
the default setting for :term:`GMT_DATA_SERVER`. Alternatively, configure the CMake
parameter GMT_DATA_SERVER at compile time.
#. If your Internet connection is slow or nonexistent (e.g., on a plane) you can also
limit the size of the largest datafile to download via :term:`GMT_DATA_SERVER_LIMIT` or
you can temporarily turn off such downloads by setting :term:`GMT_DATA_UPDATE_INTERVAL` to "off".

The user cache (:term:`DIR_CACHE`) and all its contents can be cleared any time
via the command **gmt clear cache**, while the server directory with downloaded data
can be cleared via the command **gmt clear data**. Finally, when a remote file is requested
can be cleared via the command **gmt clear data**. Finally, when a remote file is requested
we also check if that file has changed at the server and re-download the updated file;
this check is only performed no more often than once a day.

Expand Down
Loading

0 comments on commit b23a985

Please sign in to comment.