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 Nov 4, 2024
2 parents b680e9c + 715d18b commit 724b01a
Show file tree
Hide file tree
Showing 64 changed files with 2,967 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Setup vcpkg (Windows)
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.10.0
uses: lycheeverse/lychee-action@v2.0.2
with:
# 429: Too many requests
args: >
Expand All @@ -48,6 +48,7 @@ jobs:
--exclude ^http://nsis.sourceforge.io
--exclude ^https://www.ethnologue.com
--exclude ^https://linux.die.net/man/3/printf
--exclude ^https://www.softpedia.com/get/Tweak/Registry-Tweak/EditPath.shtml
--verbose
**/*.rst
**/*.rst_
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Download GSHHG and DCW datasets
run: bash ci/download-coastlines.sh
Expand All @@ -135,7 +135,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Install vcpkg libraries
run: bash ci/install-dependencies-windows.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Check PSL_strings.h
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
fi
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

# Fix the git error:
# "failed to run git: fatal: detected dubious ownership in repository at '/__w/gmt/gmt'"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Setup vcpkg (Windows)
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
echo "${INSTALLDIR}/bin" >> $GITHUB_PATH
- name: Checkout the gh-pages branch in a separate folder
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0
with:
ref: gh-pages
# Checkout to this folder instead of the current one
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dvc-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Setup data version control (DVC)
uses: iterative/setup-dvc@v1.1.2
uses: iterative/setup-dvc@v2

- name: Setup continuous machine learning (CML)
uses: iterative/setup-cml@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Install cppcheck
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-baseline-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Setup data version control (DVC)
uses: iterative/setup-dvc@v1.1.2
uses: iterative/setup-dvc@v2

- name: Pull baseline image data from dvc remote
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Find and report known failures
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
uses: actions/checkout@v4.2.0

- name: Setup vcpkg (Windows)
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ GMT uses (or can access) raster data derived from these sources:

GMT provides several color maps from these sources:

- [SCM (Scientific Color Maps)](http://www.fabiocrameri.ch/visualisation.php)
- [SCM (Scientific Color Maps)](https://www.fabiocrameri.ch/visualisation.php)
- [cmocean](https://github.com/kthyng/cmocean-gmt)
- [cpt-city](http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/totp-cpt.html)
- [cpt-city](http://www.seaviewsensing.com/pub/cpt-city/)
- [google](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)
- [matlab](https://www.mathworks.com/help/matlab/colors-1.html)
- [matplotlib](https://matplotlib.org/stable/tutorials/colors/colormaps.html)
Expand Down
7 changes: 6 additions & 1 deletion ci/config-gmt-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set (CMAKE_INSTALL_PREFIX "$ENV{INSTALLDIR}")
set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg")
set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw")
set (GMT_USE_THREADS TRUE)
set (GMT_ENABLE_OPENMP TRUE)
# Always use the 'static' data server in CI.
Expand All @@ -21,6 +20,12 @@ set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
EOF

if [ "$EXCLUDE_OPTIONAL" = "true" ]; then
echo 'set (GMT_USE_THREADS TRUE)' >> cmake/ConfigUser.cmake
else
echo 'set (GMT_USE_THREADS FALSE)' >> cmake/ConfigUser.cmake
fi

# Set OpenMP_ROOT so that CMake can find the libomp header and library on macOS
if [[ "$RUNNER_OS" == "macOS" ]]; then
echo "set (OpenMP_ROOT $(brew --prefix)/opt/libomp/)" >> cmake/ConfigUser.cmake
Expand Down
4 changes: 2 additions & 2 deletions ci/install-dependencies-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ if [ "$PACKAGE" = "true" ]; then
fi

# install more packages using conda
$CONDA\\condabin\\conda.bat update -n base -c conda-forge conda --solver libmamba
$CONDA\\condabin\\conda.bat install ${conda_packages} -c conda-forge --solver libmamba
$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
echo "$CONDA\\Library\\bin" >> $GITHUB_PATH
echo "$CONDA\\Scripts" >> $GITHUB_PATH

Expand Down
12 changes: 4 additions & 8 deletions doc/examples/anim06/anim06.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ gmt end
# Build chirp data sets for 1 minute (60 secs); one every 1 ms and one every 0.5 sec as samples
gmt math -T0/60/0.001 T 2 POW 2 DIV 60 DIV $f MUL 2 MUL PI MUL COS = chirp.txt
gmt math -T0/60/0.5 -Ca T -C1 2 POW 2 DIV 60 DIV $f MUL 2 MUL PI MUL COS = chirp_samples.txt
# Build timefile
gmt math -T0/$frames/1 T $rate DIV = frame_times.txt
gmt math frame_times.txt -i0,1,1 -C2 2 MUL 60 DIV = frame_times_Hz.txt
EOF
# 3. Set up the main frame script
cat << 'EOF' > main.sh
Expand All @@ -83,15 +85,9 @@ gmt begin
y=$(gmt math -Q ${MOVIE_COL1} 2 POW 2 DIV 60 DIV $f MUL 2 MUL PI MUL COS =)
echo 0 $y | gmt plot -Sc0.5c -Gred
fi
# Add time counter in upper left corner
printf "t = %6.3f s\n" ${MOVIE_COL1} | gmt text -F+f18p,Helvetica-Bold+jTL+cTL -Dj0.3c
# Add cycles counter in upper right corner
fnow=$(gmt math -Q ${MOVIE_COL1} 60 DIV $f MUL =)
printf "f = %6.4f Hz\n" $fnow | gmt text -F+f16p,Helvetica-Bold+jTR+cTR -Dj0.3c
# Add frame counter in lower right corner
printf "%04d\n" ${MOVIE_FRAME} | gmt text -F+f14p,Helvetica-Bold+jBR+cBR -Dj0.3c
gmt end
EOF
# 4. Run the movie
source inc.sh
gmt movie main.sh -Sbpre.sh -CHD -Iinc.sh -Tframe_times.txt -D$rate -Etitle.sh+d6s+fo1s+gwhite -Nanim06 -H8 -Zs -Fmp4 -W -V
gmt movie main.sh -Sbpre.sh -CHD -Iinc.sh -Tframe_times_Hz.txt -D$rate -Etitle.sh+d6s+fo1s+gwhite -Nanim06 -H8 -Zs -Fmp4 -W -V \
-Lf+jBR+f14p,Helvetica-Bold+jBR+o1.3c -Lc1+t"t = %6.3f s"+f18p,Helvetica-Bold+o1.3c -Lc2+t"f = %6.4f Hz"+f16p,Helvetica-Bold+jTR+o1.3c
2 changes: 1 addition & 1 deletion doc/examples/anim07/anim07.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gmt begin
# Extract a topography CPT
gmt makecpt -Cdem2 -T0/6000 -H > z.cpt
# Get gradients of the relief from N45E
gmt grdgradient @earth_relief_06m -Nt1.2 -A45 -Gintens.grd
gmt grdgradient @earth_relief_06m_p -Nt1.2 -A45 -Gintens.grd
gmt end
EOF
# 2. Set up main script
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/anim08/anim08.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gmt begin
2018-12-31T 240
EOF
# Get gradients of the relief from N45E
gmt grdgradient @earth_relief_02m -Nt1.2 -A45 -Gintens.nc
gmt grdgradient @earth_relief_02m_p -Nt1.2 -A45 -Gintens.nc
gmt makecpt -Cterra -T-10000/8000 -H > t.cpt
gmt end
EOF
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/anim11/anim11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gmt begin
# Make global grid with a smooth 2-degree day/night transition for the 2020 solstice.
gmt grdmath -Rd -I2m -rp $(gmt solar -C -o0:1 -I+d2020-06-20+z-10) 2 DAYNIGHT = daynight.grd
# We will create an intensity grid based on a DEM so that we can see structures in the oceans
gmt grdgradient @earth_relief_02m -Nt0.75 -A45 -Gintens.grd
gmt grdgradient @earth_relief_02m_p -Nt0.75 -A45 -Gintens.grd
# Make sure our remote files have been downloaded
gmt which -Ga @earth_day_02m @earth_night_02m
gmt end
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
sphinx_rtd_theme==2.0.0
sphinx-copybutton==0.5.2
sphinx-design==0.6.0
sphinx-design==0.6.1
sphinx-jinja==2.0.2
sphinx-togglebutton==0.3.2
sphinxcontrib-youtube==1.4.1
2 changes: 1 addition & 1 deletion doc/rst/source/batch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Shell Limitations
-----------------

As we cannot control how a shell (e.g., bash or csh) implements piping between two processes (it often
involves a sub-shell), we advice against using commands in your main script that involve piping the result
involves a sub-shell), we advise against using commands in your main script that involve piping the result
from one GMT module into another (e.g., gmt blockmean ..... | gmt surface ...). Because **batch** is running
many instances of your main script simultaneously, odd things can happen when sub-shells are involved.
In our experience, piping in the context of batch script may corrupt the GMT history files, resulting in
Expand Down
3 changes: 2 additions & 1 deletion doc/rst/source/explain_-n_full.rst_
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ The following modifiers are supported:
- **+a** - Switch off antialiasing (where supported) [default uses antialiasing].
- **+b** - Override boundary conditions used, by appending *g* for geographic, *p* for periodic, or *n* for
natural boundary conditions. For the latter two you may append **x** or **y** to specify just one direction, otherwise
both are assumed.
both are assumed. For more information see :ref:`grid-boundary-conditions`.

- **+c** - Clip the interpolated grid to input z-min/z-max [default may exceed limits].
- **+t** - Control how close to nodes with NaNs the interpolation will go based on *threshold*. A *threshold* of 1.0
requires all (4 or 16) nodes involved in interpolation to be non-NaN. For example, 0.5 will interpolate about half
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/gallery/ex32.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
In some cases, it is nice to "drape" an arbitrary image over a
topographic map. We have already seen how to use
:doc:`image </image>` to plot an image anywhere in
out plot. But here are aim is different, we want to manipulate an image
our plot. But here our aim is different, we want to manipulate an image
to shade it and plot it in 3-D over topography. This example was
originally created by Stephan Eickschen for a flyer emphasizing the
historical economical and cultural bond between Brussels, Maastricht and
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/grd2cpt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ z-values. These are the background color (B) assigned to values lower
than the lowest *z*-value, the foreground color (F) assigned to values
higher than the highest *z*-value, and the NaN color (N) painted
wherever values are undefined. For color tables beyond the
current GMT offerings, visit `cpt-city <http://soliton.vm.bytemark.co.uk/pub/cpt-city/>`_.
current GMT offerings, visit `cpt-city <http://www.seaviewsensing.com/pub/cpt-city/>`_.

If the master CPT includes B, F, and N entries, these will be
copied into the new master file. If not, the parameters
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/grdgradient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ References

Horn, B.K.P., Hill-Shading and the Reflectance Map, Proceedings of the
IEEE, Vol. 69, No. 1, January 1981, pp. 14-47.
(http://people.csail.mit.edu/bkph/papers/Hill-Shading.pdf)
(https://www.researchgate.net/publication/2996084_Hill_shading_and_the_reflectance_map)

See Also
--------
Expand Down
6 changes: 3 additions & 3 deletions doc/rst/source/grdmask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ Optional Arguments

**-S**\ *radius*\|\ *xlim*\ /*ylim*
Set nodes to inside, on edge, or outside depending on their distance
to the nearest data point. Nodes within the searsch *radius* [0] from the
to the nearest data point. Nodes within the search *radius* [0] from the
nearest data point are considered inside; append a distance unit
(see `Units`_). If *radius* is given as **z** then we instead read
individual radii from the 3rd input column. Unless Cartesian data,
individual radii from the 3rd input column. Unless Cartesian data,
specify the unit of these radii by appending it after **-Sz**.
If |-S| is not set then we consider the input data to define
one or more closed polygon(s) instead. For Cartesian data with
one or more closed polygon(s) instead. For Cartesian data with
different units you can instead append *xlim*\ /*ylim* which will
perform a rectangular search where all nodes within ±\ *xlim* and
±\ *ylim* of a data point will be considered inside.
Expand Down
22 changes: 12 additions & 10 deletions doc/rst/source/grdmath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Optional Arguments

.. _-A:

.. |Add_-A| replace:: (|-A| is only relevant to the **LDISTG** operator)
.. |Add_-A| replace:: (|-A| is only relevant to the **LDISTG** operator).
.. include:: explain_-A.rst_

.. _-C:
Expand Down Expand Up @@ -416,7 +416,7 @@ The following symbols have special meaning:
+-------------+-------------------------------------------------+
| **PHI** | 1.6180339... (golden ratio) |
+-------------+-------------------------------------------------+
| **EPS_F** | 1.192092896e-07 (single precision epsilon |
| **EPS_F** | 1.192092896e-07 (single precision epsilon) |
+-------------+-------------------------------------------------+
| **XMIN** | Minimum *x* value |
+-------------+-------------------------------------------------+
Expand Down Expand Up @@ -518,14 +518,16 @@ Notes On Operators
#. The stack depth limit is hard-wired to 100.

#. All functions expecting a positive radius (e.g., **LOG**, **KEI**,
etc.) are passed the absolute value of their argument. (9) The bitwise
operators (**BITAND**, **BITLEFT**, **BITNOT**, **BITOR**, **BITRIGHT**,
**BITTEST**, and **BITXOR**) convert a grid's single precision values to
unsigned 32-bit ints to perform the bitwise operations. Consequently,
the largest whole integer value that can be stored in a float grid is
2^24 or 16,777,216. Any higher result will be masked to fit in the lower
24 bits. Thus, bit operations are effectively limited to 24 bit. All
bitwise operators return NaN if given NaN arguments or bit-settings <= 0.
etc.) are passed the absolute value of their argument.

#. The bitwise operators (**BITAND**, **BITLEFT**, **BITNOT**, **BITOR**,
**BITRIGHT**, **BITTEST**, and **BITXOR**) convert a grid's single
precision values to unsigned 32-bit ints to perform the bitwise
operations. Consequently, the largest whole integer value that can be
stored in a float grid is 2^24 or 16,777,216. Any higher result will be
masked to fit in the lower 24 bits. Thus, bit operations are effectively
limited to 24 bit. All bitwise operators return NaN if given NaN
arguments or bit-settings <= 0.

#. When OpenMP support is compiled in, a few operators will take advantage
of the ability to spread the load onto several cores. At present, the
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/makecpt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You define an equidistant set of contour intervals or pass
your own z-table or list, and create a new CPT based on an existing master (dynamic)
CPT. The resulting CPT can be reversed relative to the master
cpt, and can be made continuous or discrete. For color tables beyond the
current GMT offerings, visit `cpt-city <http://soliton.vm.bytemark.co.uk/pub/cpt-city/>`_.
current GMT offerings, visit `cpt-city <http://www.seaviewsensing.com/pub/cpt-city/>`_.

The CPT includes three additional colors beyond the range of
z-values. These are the background color (B) assigned to values lower
Expand Down
4 changes: 4 additions & 0 deletions doc/rst/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ All modules are requested via a call to the :doc:`gmt` program.
supplements/seis/meca
supplements/seis/polar
supplements/seis/sac
supplements/seis/gmtisf
supplements/seis/grdshake
supplements/seis/grdvs30
supplements/spotter/backtracker
Expand Down Expand Up @@ -337,6 +338,7 @@ Supplemental Modules
- :doc:`/supplements/segy/segyz`
- :doc:`/supplements/seis/coupe`
- :doc:`/supplements/seis/meca`
- :doc:`/supplements/seis/gmtisf`
- :doc:`/supplements/seis/polar`
- :doc:`/supplements/seis/sac`
- :doc:`/supplements/spotter/backtracker`
Expand Down Expand Up @@ -749,6 +751,8 @@ seis
+-----------------------------------+--------------------+
| :doc:`/supplements/seis/sac` | |sac_purpose| |
+-----------------------------------+--------------------+
| :doc:`/supplements/seis/gmtisf` | |gmtisf_purpose| |
+-----------------------------------+--------------------+
| :doc:`/supplements/seis/grdshake` | |grdshake_purpose| |
+-----------------------------------+--------------------+
| :doc:`/supplements/seis/grdvs30` | |grdvs30_purpose| |
Expand Down
Loading

0 comments on commit 724b01a

Please sign in to comment.