From 9b93e07982233a31e97b3f8a4ed8df3a3dfa56f9 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Thu, 28 Mar 2024 15:04:05 +0000 Subject: [PATCH 001/105] Explain why the FONT settings for colorbars is apparently not working. (#8419) --- doc/rst/source/colorbar.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/rst/source/colorbar.rst b/doc/rst/source/colorbar.rst index a8fa1760409..4ce285a4a8a 100644 --- a/doc/rst/source/colorbar.rst +++ b/doc/rst/source/colorbar.rst @@ -51,9 +51,12 @@ setting the option |-I|. Colors may be spaced according to a linear scale, all be equal size, or by providing a file with individual tile widths. The font used for the annotations along the scale is specified by :term:`FONT_ANNOT_PRIMARY` while any unit placed at the side of the -bar is controlled by :term:`FONT_ANNOT_SECONDARY`. If a label along the bar -is requested, it is plotted with :term:`FONT_LABEL`. For a full overview of CPTs, -see the Technical Reference section on :ref:`Color palette tables `. +bar is controlled by :term:`FONT_ANNOT_SECONDARY`. If a label along the bar is requested, it is plotted with +:term:`FONT_LABEL`. But mind you that the modern mode theme scales down the size of annotations and labels +based on the colorbar length for improved legibility. So, in modern mode scripts it might look that these +parameter settings are not working correctly. If you may want to increase font sizes to compensate the +scaling effect the solution is to use the online ``--FONT_ANNOT_PRIMARY=...`` construct. +For a full overview of CPTs, see the Technical Reference section on :ref:`Color palette tables `. .. figure:: /_images/GMT_colorbar.* :width: 500 px From fcb795ef196714fe51f7e5e68d30a18e981294d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 2 Apr 2024 04:36:11 +0200 Subject: [PATCH 002/105] Exclude printf url from checks (#8421) --- .github/workflows/check-links.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 8afe98f6ef5..ad2ded7b291 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -38,6 +38,7 @@ jobs: --exclude ^http://www.eumetsat.int --exclude ^http://nsis.sourceforge.io --exclude ^https://www.ethnologue.com + --exclude ^https://linux.die.net/man/3/printf --verbose **/*.rst **/*.rst_ From d818c2eb86270e351cf43cb1a3ed82b899f5a736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 5 Apr 2024 11:45:06 +0200 Subject: [PATCH 003/105] Fix typos (#8423) --- doc/rst/source/devdocs/contributing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rst/source/devdocs/contributing.rst b/doc/rst/source/devdocs/contributing.rst index 4ac1bf59976..c6e85e6f69c 100644 --- a/doc/rst/source/devdocs/contributing.rst +++ b/doc/rst/source/devdocs/contributing.rst @@ -39,7 +39,7 @@ Ways to Contribute to Community Building - Participate in discussions at the monthly GMT Community Meetings, which are announced on the `forum governance page `_. - Cite GMT when using the project. -- Spread the word about GMT or start the project! +- Spread the word about GMT or star the project! Providing Feedback ------------------ @@ -474,7 +474,7 @@ To add a PostScript based test (e.g., `box.sh ``, ``doc/scripts/images/``, or ``doc/examples/images/`` respectively. - Run the tests to ensure that the new test passes. - Run ``dvc diff`` to check that the new file is in the correct directory. -- For teh first test of a module, you add the directory via ``dvc add test/baseline/``, ``dvc add doc/scripts/images``, +- For the first test of a module, you add the directory via ``dvc add test/baseline/``, ``dvc add doc/scripts/images``, or ``dvc add doc/scripts/examples``. For later addition you do so per file, e.g. ``dvc add test/baseline//``, ``dvc add doc/scripts/images/``, or ``dvc add doc/scripts/examples/`` depending on the type of test modified. From f1efaeac2e485977b207556e2e152db5615913b6 Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:56:18 +0200 Subject: [PATCH 004/105] contributing.rst: fix link (#8424) --- doc/rst/source/devdocs/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/devdocs/contributing.rst b/doc/rst/source/devdocs/contributing.rst index c6e85e6f69c..2cedd3708ec 100644 --- a/doc/rst/source/devdocs/contributing.rst +++ b/doc/rst/source/devdocs/contributing.rst @@ -85,7 +85,7 @@ Please take a look at these resources to learn about Git and pull requests (don' hesitate to :ref:`ask for help `): - `How to Contribute to Open Source `_. -- `Git Workflow Tutorial `_. +- `Git Workflow Tutorial `_ by Aaron Meurer. - `How to Contribute to an Open Source Project on GitHub `_. Getting Help From 27fb1e7c6bfd67c2529ed0e3ebb3067121733021 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:50:37 +0800 Subject: [PATCH 005/105] Bump codecov/codecov-action from 4.1.0 to 4.1.1 (#8422) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e26aa3342b0..60a69a0ab2b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -184,7 +184,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.1.0 + uses: codecov/codecov-action@v4.1.1 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 22515049bcff9f5cc47d58e842eabb397b4d0ee2 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Sat, 6 Apr 2024 15:38:22 +0100 Subject: [PATCH 006/105] Fixes in the algorithm that detects what type of transparency an image has. (#8425) --- src/grdimage.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/grdimage.c b/src/grdimage.c index ca10019c02f..0d531779e8f 100644 --- a/src/grdimage.c +++ b/src/grdimage.c @@ -983,10 +983,10 @@ GMT_LOCAL void grdimage_img_set_transparency (struct GMT_CTRL *GMT, struct GRDIM */ double o, t; /* o - opacity, t = transparency */ gmt_M_unused (GMT); - o = pix4 / 255.0; t = 1 - o; if (Conf->Transp->n_transp == 2) gmt_M_rgb_only_copy (rgb, Conf->tr_rgb); else { /* Blend */ + o = pix4 / 255.0; t = 1 - o; if (Conf->invert) t = o, o = 1 - t; rgb[0] = o * rgb[0] + t * Conf->tr_rgb[0]; rgb[1] = o * rgb[1] + t * Conf->tr_rgb[1]; @@ -1095,26 +1095,46 @@ GMT_LOCAL bool grdimage_transparencies (struct GMT_CTRL *GMT, struct GMT_IMAGE * struct GMT_GRID_HEADER *H = I->header; /* Pointer to the active image header */ unsigned char *transparency; /* Pointer to memory where transparency resides */ int64_t row, col, node; - unsigned int k, tr, tr_max = 0, tr_min = 255, tr_band; /* tr_band is 0 if image has alpha channel, else 1 for gray and 3 for color */ + unsigned int k, tr, tr_max = 0; /* tr_band is 0 if image has alpha channel, else 1 for gray and 3 for color */ unsigned int n_bands = H->n_bands; gmt_M_unused (GMT); if (n_bands%2 == 1 && I->alpha == NULL) return false; /* No transparencies either in band 1 or 4 nor in alpha */ - tr_band = (I->alpha) ? 0 : n_bands - 1; - transparency = (tr_band) ? I->data : I->alpha; /* Points to the data array with A */ - for (row = 0; row < H->n_rows; row++) { /* March along scanlines in the output bitimage */ - node = gmt_M_ijp (H, row, 0) + tr_band; /* Start pixel with 4 bytes of this image row */ - for (col = 0; col < H->n_columns; col++, node += n_bands) { /* March along this scanline in steps of 2 (gA) or 4 (RGBA) */ - tr = (unsigned int)transparency[node]; /* Get transparency values */ + if (I->alpha) { + for (node = 0; node < H->nm; node++) { /* March along scanlines in the output bitimage */ + tr = (unsigned int)I->alpha[node]; /* Get transparency values */ if (opacity) tr = 255 - tr; /* Must flip from opacity to transparency */ T->alpha_count[tr]++; /* Count frequency of transparency values */ } } + else { + if (n_bands == 4 && H->mem_layout[2] == 'P') { /* RGBA Pixel interleaved */ + for (row = 0; row < H->n_rows; row++) { + for (col = 0; col < H->n_columns; col++) { + node = gmt_M_ijp (H, row, col) * 4 + 3; + tr = (unsigned int)I->data[node]; + if (opacity) tr = 255 - tr; + T->alpha_count[tr]++; + } + } + } + else { /* Band interleaved. Tansparency is in 4th band*/ + node = H->size * (n_bands - 1); /* Either gray or color */ + for (row = 0; row < H->n_rows; row++) { + for (col = 0; col < H->n_columns; col++) { + node += gmt_M_ijp (H, row, col); + tr = (unsigned int)I->data[node]; + if (opacity) tr = 255 - tr; + T->alpha_count[tr]++; + } + } + } + } + for (k = 0; k < GMT_LEN256; k++) { /* Determine how many different transparencies */ if (T->alpha_count[k]) { /* Used at least once */ T->n_transp++; - if (T->alpha_count[k] < tr_min) tr_min = k; /* Keep track of smallest value */ if (T->alpha_count[k] > tr_max) tr_max = k; /* Keep track of largest value */ } } @@ -1132,13 +1152,11 @@ GMT_LOCAL bool grdimage_transparencies (struct GMT_CTRL *GMT, struct GMT_IMAGE * T->value = 0; T->mode = 3; T->n_dominant = T->alpha_count[0]; - //fprintf (stderr, "Min A = %d [x %d] Max A = %d [x %d]\n", tr_min, T->alpha_count[tr_min], tr_max, T->alpha_count[tr_max]); } else { T->value = 255; /* Case 4: Like 3 but 255 most used of two transparency values */ T->n_dominant = T->alpha_count[255]; T->mode = 4; - //fprintf (stderr, "Min A = %d [x %d] Max A = %d [x %d]\n", tr_min, T->alpha_count[tr_min], tr_max, T->alpha_count[tr_max]); } return (true); } @@ -1213,7 +1231,7 @@ GMT_LOCAL void grdimage_img_c2s_no_intensity (struct GMT_CTRL *GMT, struct GRDIM GMT_LOCAL void grdimage_img_color_no_intensity (struct GMT_CTRL *GMT, struct GRDIMAGE_CTRL *Ctrl, struct GRDIMAGE_CONF *Conf, unsigned char *image) { /* Function that fills out the image in the special case of 1) image, 2) color, 3) with intensity */ struct GMT_GRID_HEADER *H_s = Conf->Image->header; /* Pointer to the active data header */ - bool transparency = (H_s->n_bands == 4); + bool transparency = (H_s->n_bands == 4 || (Conf->Transp != NULL && Conf->Transp->n_transp == 2)); unsigned int k; /* Due to OPENMP on Windows requiring signed int loop variables */ int64_t srow, scol; /* Due to OPENMP on Windows requiring signed int loop variables */ uint64_t n_bands = H_s->n_bands; From 08cde743bd9853a63a4545b8df7e30d8207c3aa8 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 7 Apr 2024 18:21:35 +0800 Subject: [PATCH 007/105] CI: Fix the docker workflow (#8427) --- .github/workflows/docker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 863a2fd23d6..68f19afbc52 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,6 +12,7 @@ on: - 'src/**' - 'cmake/**' - '**/CMakeLists.txt' + - '.github/workflows/docker.yml' pull_request: paths: - '.github/workflows/docker.yml' @@ -73,11 +74,14 @@ jobs: apt-get install -y --no-install-recommends --no-install-suggests \ build-essential cmake ninja-build libcurl4-gnutls-dev libnetcdf-dev \ ghostscript curl git \ - libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libglib2.0-dev + libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libglib2.0-dev + apt reinstall -y ca-certificates + update-ca-certificates elif [[ "$os" = "fedora" ]]; then dnf install -y cmake libcurl-devel netcdf-devel gdal-devel \ ninja-build gdal pcre-devel fftw3-devel lapack-devel \ - openblas-devel glib2-devel ghostscript + openblas-devel glib2-devel ghostscript \ + openssl fi - name: Cache GSHHG and DCW data From 1363b9d37b31fc5ce9ed5d6578b33560e2c674c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Apr 2024 10:39:48 +0000 Subject: [PATCH 008/105] Bump actions/checkout from 3.6.0 to 4.1.1 (#7834) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dongdong Tian --- .github/workflows/build.yml | 2 +- .github/workflows/check-links.yml | 2 +- .github/workflows/ci-caches.yml | 2 +- .github/workflows/code-validator.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 4 ++-- .github/workflows/dvc-diff.yml | 2 +- .github/workflows/lint-checker.yml | 2 +- .github/workflows/release-baseline-images.yml | 2 +- .github/workflows/remind.yml | 2 +- .github/workflows/tests.yml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d76744d4a29..92ee6f8f6f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index ad2ded7b291..89aadb9c5e2 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout the repository - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Link Checker uses: lycheeverse/lychee-action@v1.9.3 diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index edccb1b706e..9ac9381492c 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -97,7 +97,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Install vcpkg libraries run: bash ci/install-dependencies-windows.sh diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index eacf1673672..0193890dbd8 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Check PSL_strings.h run: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 68f19afbc52..bd4cdf2b762 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -63,7 +63,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Install GMT dependencies run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4f06f4ea291..334d588f5d2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,7 +56,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 @@ -152,7 +152,7 @@ jobs: echo "${INSTALLDIR}/bin" >> $GITHUB_PATH - name: Checkout the gh-pages branch in a separate folder - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 with: ref: gh-pages # Checkout to this folder instead of the current one diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index e48378ae17f..47fcc17a7d1 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.1.1 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml index 1e2d0879f8e..a3ac4e6f219 100644 --- a/.github/workflows/lint-checker.yml +++ b/.github/workflows/lint-checker.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Install cppcheck run: | diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index 3f498515397..862abd699e7 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index fe242c973f8..edcd3d11fd3 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.1 - name: Find and report known failures run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 60a69a0ab2b..e11fc498719 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,7 +56,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.1.1 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 From 4cb3ca7fd58646a77e2c19124377c762dfe4db37 Mon Sep 17 00:00:00 2001 From: wuruilong01 <144340420+wuruilong01@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:33:20 +0800 Subject: [PATCH 009/105] Add support for loongarch (#8429) --- src/gmt_common_sighandler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gmt_common_sighandler.c b/src/gmt_common_sighandler.c index a4cad4aac13..b6eaf7c9524 100644 --- a/src/gmt_common_sighandler.c +++ b/src/gmt_common_sighandler.c @@ -111,6 +111,8 @@ GMT_LOCAL void backtrace_symbols_fd(void *const *buffer, int size, int fd) { # define UC_IP(uc) ((void *) (uc)->uc_mcontext.arm_pc) # elif defined( __hppa__) # define UC_IP(uc) ((void *) (uc)->uc_mcontext.sc_iaoq[0]) +# elif defined( __loongarch__) +# define UC_IP(uc) ((void *) (uc)->uc_mcontext.__pc) # elif defined(__m68k__) # define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[R_PC]) # elif defined(__riscv) From 9a6c726bc22c3ad16844da97657622e19d0dbfa4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 8 Apr 2024 21:09:05 +0800 Subject: [PATCH 010/105] Fix test/gmtest.in so that subplot-l2s.sh and inset-l2s.sh pass (#8430) --- .github/workflows/tests.yml | 2 +- test/gmtest.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e11fc498719..5409808c974 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ name: Tests on: - # pull_request: + pull_request: push: branches: - master diff --git a/test/gmtest.in b/test/gmtest.in index 12fc0b592d6..c1644e2142d 100755 --- a/test/gmtest.in +++ b/test/gmtest.in @@ -32,8 +32,8 @@ if [ $skip_this_test -gt 0 ]; then # Do not run this script, probably PS is too exit 0 fi -# Is it a modern mode or one-liner script -modern=$(grep "gmt begin\| -ps " "$script" -c) +# Is it a modern mode ('gmt begin figname') or one-liner script ('-ps'). +modern=$(grep "gmt begin .*\| -ps " "$script" -c) # Is it a script that is known to fail? if [ "@GMT_ENABLE_KNOWN2FAIL@" = "ON" ]; then From 0a10c48eb02a282854859b9822a8370be853bf9c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 8 Apr 2024 21:25:45 +0800 Subject: [PATCH 011/105] Mark test/grdimage/transp_mix.sh as known failure --- test/grdimage/transp_mix.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/grdimage/transp_mix.sh b/test/grdimage/transp_mix.sh index 971b0aa07e0..c9ea44f4aba 100755 --- a/test/grdimage/transp_mix.sh +++ b/test/grdimage/transp_mix.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # # Testing gmt grdmix on adding A to RGB image and plot via grdimage +# +# GMT_KNOWN_FAILURE gmt begin transp_mix ps gmt set MAP_GRID_PEN 2p FONT_TAG 9p PS_MEDIA letter PS_PAGE_ORIENTATION portrait From 4a8e051a634561da188d9996207b101849e69ae9 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Apr 2024 08:01:23 +0800 Subject: [PATCH 012/105] Fix the test/psevents/event_lines.sh test on Windows (#8432) --- test/psevents/event_lines.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/psevents/event_lines.sh b/test/psevents/event_lines.sh index 54c30a4f9f6..02c54c89023 100755 --- a/test/psevents/event_lines.sh +++ b/test/psevents/event_lines.sh @@ -7,14 +7,14 @@ gmt psevents -/qq mv -f psevents_function.txt psevents_function_q.txt gmt psevents -/cc mv -f psevents_function.txt psevents_function_c.txt -cat << EOF > /tmp/labels +cat << EOF > labels.txt -0.5 2.4 RISE 0.5 2.4 PLATEAU 1.5 2.4 DECAY 2.5 2.4 NORMAL 3.5 2.4 FADE EOF -cat << EOF > /tmp/def +cat << EOF > def.txt -2 0 0 0 0 1 @@ -29,21 +29,23 @@ gmt begin event_lines ps gmt plot psevents_function_l.txt -W2p,green -i0,2 -lintens gmt plot psevents_function_l.txt -W1p,blue -i0,3+d100 -ltransp gmt plot psevents_function_l.txt -W0.25p,orange -i0,4 -ldz - gmt text /tmp/labels -F+f9p+jTC - gmt plot /tmp/def -W1p,3_2:0 -ldefault + gmt text labels.txt -F+f9p+jTC + gmt plot def.txt -W1p,3_2:0 -ldefault gmt subplot set 1 -AQuadratic gmt plot psevents_function_q.txt -W3p,red -i0,1 -lsize gmt plot psevents_function_q.txt -W2p,green -i0,2 -lintens gmt plot psevents_function_q.txt -W1p,blue -i0,3+d100 -ltransp gmt plot psevents_function_q.txt -W0.25p,orange -i0,4 -ldz - gmt text /tmp/labels -F+f9p+jTC - gmt plot /tmp/def -W1p,3_2:0 -ldefault + gmt text labels.txt -F+f9p+jTC + gmt plot def.txt -W1p,3_2:0 -ldefault gmt subplot set 2 -ACosine gmt plot psevents_function_c.txt -W3p,red -i0,1 -lsize gmt plot psevents_function_c.txt -W2p,green -i0,2 -lintens gmt plot psevents_function_c.txt -W1p,blue -i0,3+d100 -ltransp gmt plot psevents_function_c.txt -W0.25p,orange -i0,4 -ldz - gmt text /tmp/labels -F+f9p+jTC - gmt plot /tmp/def -W1p,3_2:0 -ldefault + gmt text labels.txt -F+f9p+jTC + gmt plot def.txt -W1p,3_2:0 -ldefault gmt subplot end gmt end show + +rm -f labels.txt def.txt From 472d45582e10d4e610851845c9b91f480a699d3d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Apr 2024 14:39:43 +0800 Subject: [PATCH 013/105] Disable codecov comments in PRs --- .github/codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 00000000000..38fc31ff8bc --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,5 @@ +# Codecov configuration file +# +# Reference: https://docs.codecov.com/docs/codecovyml-reference +# +comment: false From ed760ea1c87499309300d88e8182aeabdd83ce28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:21:03 +0800 Subject: [PATCH 014/105] Bump codecov/codecov-action from 4.1.1 to 4.2.0 (#8434) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.1.1...v4.2.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5409808c974..7af63af11a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -184,7 +184,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.1.1 + uses: codecov/codecov-action@v4.2.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 6d36f9876c33b9b60efa74fdb48148a6609ddefc Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Apr 2024 18:52:15 +0800 Subject: [PATCH 015/105] Set slightly higher RMS values for tests grdvector/bothg.sh and pscontour/thickness.sh (#8433) --- test/grdvector/bothg.sh | 2 ++ test/pscontour/thickness.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/grdvector/bothg.sh b/test/grdvector/bothg.sh index 04275549f69..28020467037 100755 --- a/test/grdvector/bothg.sh +++ b/test/grdvector/bothg.sh @@ -4,6 +4,8 @@ # Due to hairline differences due to arcm64 macOS and Intel we need a # higher rms threshold for this test to pass # +# GRAPHICSMAGICK_RMS = 0.005 +# ps=bothg.ps gmt pscoast -R-180/180/-70/70 -JM18c -Dc -Sblue -Glightgray -W0.01p,black -Baf -P --FONT_ANNOT_PRIMARY=9p,Helvetica,black -K -Xc > $ps gmt grdvector -O -K wx_grd000.nc wy_grd000.nc -R-180/180/-70/70 -J -Q4p+e+jc+gwhite -Si50k -W0.75p,white -I10 >> $ps diff --git a/test/pscontour/thickness.sh b/test/pscontour/thickness.sh index c843837f44c..2aa0f158d63 100755 --- a/test/pscontour/thickness.sh +++ b/test/pscontour/thickness.sh @@ -3,7 +3,7 @@ # Comes from forum message http://gmt.soest.hawaii.edu/boards/1/topics/5532?r=5548 # Due to hairline differences in many gridlines between Linux and macOS we need a # higher rms threshold for this test to pass -# GRAPHICSMAGICK_RMS = 0.02 +# GRAPHICSMAGICK_RMS = 0.021 ps=thickness.ps cat << EOF > t.cpt 0 255 247 236 500 255 247 236 From 8fd89860b0b9a13b0eb1bb13fa241319e3ff414e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 11 Apr 2024 06:41:24 +0800 Subject: [PATCH 016/105] CI: Fix the ci-caches workflow and always use the "static" data server in CI (#8426) --- .github/workflows/build.yml | 8 +++---- .github/workflows/ci-caches.yml | 37 ++++++++++++++++++++++++--------- .github/workflows/docker.yml | 8 +++---- .github/workflows/docs.yml | 8 +++---- .github/workflows/tests.yml | 16 +++++++------- ci/config-gmt-unix.sh | 4 +++- ci/config-gmt-windows.sh | 4 +++- 7 files changed, 53 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92ee6f8f6f6..cbd39ac8e73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,14 +118,14 @@ jobs: with: workflow: ci-caches.yml name: gmt-cache - path: .gmt + path: gmt-cache # Move downloaded files to ~/.gmt directory and list them - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt - mv .gmt/* ~/.gmt - ls -lRh ~/.gmt + mkdir -p ~/.gmt/static/ + mv gmt-cache/* ~/.gmt/static/ + ls -lRh ~/.gmt/static/ - name: Install GMT run: | diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index 9ac9381492c..b0965d61468 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -7,10 +7,11 @@ name: GMT CI Caches on: - # Uncomment the "push:" line to manually re-cache data artifacts in pushes - #push: - # Uncomment the 'pull_request:' line to manually re-cache data artifacts in PRs - # pull_request: + pull_request: + # Make any changes to the following files to refresh the cache in PRs + paths: + - '.github/workflows/ci-caches.yml' + workflow_dispatch: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' @@ -22,12 +23,22 @@ concurrency: jobs: data_cache: name: Cache GMT data - # We have to use macOS, because Linux/Windows agents may fail to download - runs-on: macOS-latest + runs-on: macos-latest + defaults: + run: + shell: bash -l {0} steps: - name: Install GMT - run: brew install gmt + uses: mamba-org/setup-micromamba@v1.8.1 + with: + environment-name: gmt + condarc: | + channels: + - conda-forge + - nodefaults + create-args: >- + gmt=6.5.0 - name: Download remote data run: | @@ -76,11 +87,18 @@ jobs: gmt which -Ga $data gmt which -Ga $data # Download cache files multiple times to make sure all are downloaded + # Workaroud for https://github.com/GenericMappingTools/gmt/issues/8437. + mv ~/.gmt/gmt_data_server.txt ~/.gmt/server/ + mv ~/.gmt/gmt_hash_server.txt ~/.gmt/server/ gmt get -Dcache gmt get -Dcache gmt get -Dcache + # Workaroud for https://github.com/GenericMappingTools/gmt/issues/8437. + mkdir ~/.gmt/static/ + mv ~/.gmt/server ~/.gmt/static/ + mv ~/.gmt/cache ~/.gmt/static/ # check files - ls -R ~/.gmt + ls -lR ~/.gmt # Upload the downloaded files as artifacts to GitHub - name: Upload artifacts to GitHub @@ -88,8 +106,7 @@ jobs: with: name: gmt-cache path: | - ~/.gmt/cache - ~/.gmt/server + ~/.gmt/static vcpkg_cache: name: Cache vcpkg libraries diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bd4cdf2b762..59e23976a96 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -113,14 +113,14 @@ jobs: with: workflow: ci-caches.yml name: gmt-cache - path: .gmt + path: gmt-cache # Move downloaded files to ~/.gmt directory and list them - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt - mv .gmt/* ~/.gmt - ls -lRh ~/.gmt + mkdir -p ~/.gmt/static/ + mv gmt-cache/* ~/.gmt/static/ + ls -lRh ~/.gmt/static/ - name: Check a few simple commands run: bash ci/simple-gmt-tests.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 334d588f5d2..afc526a51c4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -119,14 +119,14 @@ jobs: with: workflow: ci-caches.yml name: gmt-cache - path: .gmt + path: gmt-cache # Move downloaded files to ~/.gmt directory and list them - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt - mv .gmt/* ~/.gmt - ls -lRh ~/.gmt + mkdir -p ~/.gmt/static/ + mv gmt-cache/* ~/.gmt/static/ + ls -lRh ~/.gmt/static/ - name: Build documentation run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7af63af11a3..de251c3fe40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -126,18 +126,18 @@ jobs: with: workflow: ci-caches.yml name: gmt-cache - path: .gmt - - # Pull baseline image data from dvc remote (DAGsHub) - - name: Pull baseline image data from dvc remote - run: dvc pull + path: gmt-cache # Move downloaded files to ~/.gmt directory and list them - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt - mv .gmt/* ~/.gmt - ls -lRh ~/.gmt + mkdir -p ~/.gmt/static/ + mv gmt-cache/* ~/.gmt/static/ + ls -lRh ~/.gmt/static/ + + # Pull baseline image data from dvc remote (DAGsHub) + - name: Pull baseline image data from dvc remote + run: dvc pull - name: Install GMT run: | diff --git a/ci/config-gmt-unix.sh b/ci/config-gmt-unix.sh index b36dc21385a..54976effea4 100755 --- a/ci/config-gmt-unix.sh +++ b/ci/config-gmt-unix.sh @@ -12,6 +12,9 @@ set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw") set (GMT_USE_THREADS TRUE) set (GMT_ENABLE_OPENMP TRUE) +# Always use the 'static' data server in CI. +set (GMT_DATA_SERVER static) + # recommended even for release build set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}") # extra warnings @@ -23,7 +26,6 @@ if [[ "$RUN_TESTS" == "true" ]]; then set (CMAKE_BUILD_TYPE Debug) enable_testing() -set (GMT_DATA_SERVER static) set (DO_EXAMPLES TRUE) set (DO_TESTS TRUE) set (DO_API_TESTS ON) diff --git a/ci/config-gmt-windows.sh b/ci/config-gmt-windows.sh index 10b4e10f9c0..3c1381d3545 100755 --- a/ci/config-gmt-windows.sh +++ b/ci/config-gmt-windows.sh @@ -10,12 +10,14 @@ set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg") set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw") set (GMT_ENABLE_OPENMP TRUE) + +# Always use the 'static' data server in CI. +set (GMT_DATA_SERVER static) EOF if [[ "$RUN_TESTS" == "true" ]]; then cat >> cmake/ConfigUser.cmake << 'EOF' enable_testing() -set (GMT_DATA_SERVER static) set (DO_EXAMPLES TRUE) set (DO_TESTS TRUE) set (DO_API_TESTS ON) From 57d1c869a3f4307fa75c370de478d98b9559f1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:26:30 +0200 Subject: [PATCH 017/105] Fix typo in mapproject (#8439) --- doc/rst/source/mapproject.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/mapproject.rst b/doc/rst/source/mapproject.rst index c2fb3a89410..ca6d958b26e 100644 --- a/doc/rst/source/mapproject.rst +++ b/doc/rst/source/mapproject.rst @@ -250,7 +250,7 @@ Optional Arguments **-W**\ [**b**\|\ **B**\|\ **e**\|\ **E**\|\ **g**\|\ **h**\|\ **j**\|\ **m**\|\ **M**\|\ **n**\|\ **o**\|\ **O**\|\ **r**\|\ **R**\|\ **w**\|\ **x**][**+n**\ [*nx*\ [/*ny*]]] Report a variety of plot dimensions or map regions in projected or geographic units. - No input files are read. With no argument we report the map width and hight. + No input files are read. With no argument we report the map width and height. The chosen unit of reported plot dimensions may be changed via |-D|. For other results, select from these directives: From 586f4e0b18143c07f67698872beedb79887b8d0d Mon Sep 17 00:00:00 2001 From: Joaquim Date: Sat, 13 Apr 2024 19:31:10 +0100 Subject: [PATCH 018/105] Free the longoptions from the #ifdefs jail (#8441) * Free the longotions from the #ifdefs jail * Remove all traces of the USE_COMMON_LONG_OPTIONS --------- Co-authored-by: Federico Esteban --- ci/config-gmt-unix.sh | 5 ---- ci/config-gmt-windows.sh | 5 ---- cmake/ConfigUserAdvancedTemplate.cmake | 2 -- doc/rst/source/devdocs/long_options.rst | 3 --- src/gmt_init.c | 33 ++++++------------------- 5 files changed, 8 insertions(+), 40 deletions(-) diff --git a/ci/config-gmt-unix.sh b/ci/config-gmt-unix.sh index 54976effea4..bd928692ac2 100755 --- a/ci/config-gmt-unix.sh +++ b/ci/config-gmt-unix.sh @@ -34,11 +34,6 @@ set (SUPPORT_EXEC_IN_BINARY_DIR TRUE) # For code coverage set (CMAKE_C_FLAGS "--coverage -O0 ${CMAKE_C_FLAGS}") - -# Turn on testing of upcoming long-option syntax for common GMT options -add_definitions(-DUSE_COMMON_LONG_OPTIONS) -# Turn on testing of upcoming long-option syntax for module options -add_definitions(-DUSE_MODULE_LONG_OPTIONS) EOF fi diff --git a/ci/config-gmt-windows.sh b/ci/config-gmt-windows.sh index 3c1381d3545..a93e5bd6360 100755 --- a/ci/config-gmt-windows.sh +++ b/ci/config-gmt-windows.sh @@ -23,11 +23,6 @@ set (DO_TESTS TRUE) set (DO_API_TESTS ON) set (DO_SUPPLEMENT_TESTS ON) set (SUPPORT_EXEC_IN_BINARY_DIR TRUE) - -# Turn on testing of upcoming long-option syntax for common GMT options -add_definitions(-DUSE_COMMON_LONG_OPTIONS) -# Turn on testing of upcoming long-option syntax for module options -add_definitions(-DUSE_MODULE_LONG_OPTIONS) EOF fi diff --git a/cmake/ConfigUserAdvancedTemplate.cmake b/cmake/ConfigUserAdvancedTemplate.cmake index aec7e9e6398..2ab0458dcfd 100644 --- a/cmake/ConfigUserAdvancedTemplate.cmake +++ b/cmake/ConfigUserAdvancedTemplate.cmake @@ -244,8 +244,6 @@ set (GMT_ENABLE_OPENMP TRUE) # Uncomment these two statements if you are a developer debugging GMT: #add_definitions(-DDEBUG) #add_definitions(-DMEMDEBUG) # Turn on memory tracking; see gmt_memory .c on MEMDEBUG for information -#add_definitions(-DUSE_COMMON_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for common GMT options -#add_definitions(-DUSE_MODULE_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for module options #add_definitions(-DEXPORT_GMTLIB) # Turn on to access normally un-exported or static gmtlib functions from external tools #add_definitions(-DNO_THEMES) # Turn off implementation of GMT_THEME for debugging # Uncomment this statement if you are a developer debugging PSL and want exact line coordinates: diff --git a/doc/rst/source/devdocs/long_options.rst b/doc/rst/source/devdocs/long_options.rst index 62c844911f0..daabe1eabbb 100644 --- a/doc/rst/source/devdocs/long_options.rst +++ b/doc/rst/source/devdocs/long_options.rst @@ -100,9 +100,6 @@ argument to the equivalent short-option argument. That way, we only need to cal function at the start of a module and do the replacement. Then, the specific parsers we already have for common and module options will work as is. This design simplifies the coding tremendously and only requires us to create the translation tables. -The approach has already been implemented and tested for the ~30 GMT Common Options and -developers can play with this by adding the compiler flag **-DUSE_COMMON_LONG_OPTIONS** -when building GMT. The translations for the GMT common options are encapsulated in a single include file (gmt_common_longoptions.h) that populates a *gmt_common_kw* structure and looks like this: diff --git a/src/gmt_init.c b/src/gmt_init.c index 2fc3e1b1ad8..1895dffc57c 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -463,16 +463,10 @@ static char *map_annot_oblique_item[N_MAP_ANNOT_OBLIQUE_ITEMS] = { "lat_parallel" }; -#if defined(USE_COMMON_LONG_OPTIONS) /* List of GMT common keyword/options pairs. This list is used in gmtinit_translate_to_short_options to convert * the new long-format GMT options (e.g., --timestamp="My plot"+offset=5c/6c) to regular GMT short format * options (e.g., -U"My plot"+o5c/6c) that the common and module parsers expect. * - * For testing this there are two define statements that need to be set in ConfigUserAdvanced.cmake: - * - * -DUSE_COMMON_LONG_OPTIONS will allow us to test the gmt_common_kw array below. - * -DUSE_MODULE_LONG_OPTIONS will allow us to test any module_kw settings in the modules - * * Without these we are blind to the keyword arrays. Note that while you can test the * common options without the module options, you cannot do the reverse. * @@ -483,7 +477,6 @@ static char *map_annot_oblique_item[N_MAP_ANNOT_OBLIQUE_ITEMS] = { static struct GMT_KEYWORD_DICTIONARY gmt_common_kw[] = { #include "gmt_common_longoptions.h" }; -#endif /* Local variables to gmt_init.c */ @@ -569,8 +562,7 @@ bool gmtlib_file_unlock (struct GMT_CTRL *GMT, int fd) { } #endif -#if defined(USE_COMMON_LONG_OPTIONS) -GMT_LOCAL void gmtinit_handle_escape_text (char *text, char key, int way) { +GMT_LOCAL void gmtinit_handle_escape_text(char *text, char key, int way) { /* Deal with text that contains modifiers +? that should be seen as plain text * because they have a leading escape ("My dumb \+p text"). If way == 1 then * we replace \+ with two GMT_ASCII_ES (Escape) bytes and if way == -1 then we @@ -600,7 +592,7 @@ GMT_LOCAL void gmtinit_handle_escape_text (char *text, char key, int way) { } /*! . */ -GMT_LOCAL char * gmtinit_colon_digexcl (char *string) { +GMT_LOCAL char *gmtinit_colon_digexcl(char *string) { /* Search for the first colon character that is not * both preceded and followed by a digit. This is * intended to ignore any colon which occurs within @@ -630,7 +622,7 @@ GMT_LOCAL char * gmtinit_strchr_predexcl (char *string, char target, char predex #endif /*! . */ -GMT_LOCAL struct GMT_KEYWORD_DICTIONARY * gmtinit_find_kw (struct GMTAPI_CTRL *API, struct GMT_KEYWORD_DICTIONARY *kw1, struct GMT_KEYWORD_DICTIONARY *kw2, char *arg, int *k) { +GMT_LOCAL struct GMT_KEYWORD_DICTIONARY *gmtinit_find_kw(struct GMTAPI_CTRL *API, struct GMT_KEYWORD_DICTIONARY *kw1, struct GMT_KEYWORD_DICTIONARY *kw2, char *arg, int *k) { /* Determine if this long-format arg is found in one of the two keyword lists kw1 (common) and kw2 (current module). * If we find a match we return a pointer to the corresponding keyword list and the index *k for the array entry index. * If not found then we return NULL and set index to -1 (GMT_NOTSET) */ @@ -658,7 +650,7 @@ GMT_LOCAL struct GMT_KEYWORD_DICTIONARY * gmtinit_find_kw (struct GMTAPI_CTRL *A } /*! . */ -GMT_LOCAL int gmtinit_find_longoptmatch (struct GMTAPI_CTRL *API, char *longlist, char *shortlist, char *textin, int sepcode, unsigned int multidir, char *codechars, unsigned int codecharsbufsz, char *argout) { +GMT_LOCAL int gmtinit_find_longoptmatch(struct GMTAPI_CTRL *API, char *longlist, char *shortlist, char *textin, int sepcode, unsigned int multidir, char *codechars, unsigned int codecharsbufsz, char *argout) { /* Attempt to match the leading portion of textin with a long-option * directive or modifier string which is an element of longlist, a * single comma-subdivided string which concatenates a sequence of @@ -926,7 +918,7 @@ GMT_LOCAL int gmtinit_find_longoptmatch (struct GMTAPI_CTRL *API, char *longlist return ncodechars; } -GMT_LOCAL int gmtinit_get_section (struct GMTAPI_CTRL *API, char *arg, char separator, int k, int *sx) { +GMT_LOCAL int gmtinit_get_section(struct GMTAPI_CTRL *API, char *arg, char separator, int k, int *sx) { /* Find the k'th separator occurrence and chop off the rest, return pointer to start of k'th section */ int j = 0, kk = -1, s0 = 0, s = 0, last_s = 0; gmt_M_unused (API); @@ -953,7 +945,7 @@ GMT_LOCAL int gmtinit_get_section (struct GMTAPI_CTRL *API, char *arg, char sepa } /*! . */ -GMT_LOCAL char * gmtinit_getfirstmodifier (char *string) { +GMT_LOCAL char *gmtinit_getfirstmodifier(char *string) { /* Return a pointer to the + character that marks the start * of the first modifier substring within string, where such * a substring always begins with a + character followed by @@ -970,7 +962,7 @@ GMT_LOCAL char * gmtinit_getfirstmodifier (char *string) { } /*! . */ -GMT_LOCAL unsigned int gmtinit_copynextmodifier (char *string, unsigned int *srchstartpos, char *modstr) { +GMT_LOCAL unsigned int gmtinit_copynextmodifier(char *string, unsigned int *srchstartpos, char *modstr) { /* This routine is very loosely based (at least in terms of its * arguments and returns) on gmt_strtok() which was formerly used * in this context to return the next modifier substring within a string. @@ -1017,7 +1009,7 @@ GMT_LOCAL unsigned int gmtinit_copynextmodifier (char *string, unsigned int *src } /*! . */ -GMT_LOCAL void gmtinit_translate_to_short_options (struct GMTAPI_CTRL *API, struct GMT_KEYWORD_DICTIONARY *this_module_kw, struct GMT_OPTION **options) { +GMT_LOCAL void gmtinit_translate_to_short_options(struct GMTAPI_CTRL *API, struct GMT_KEYWORD_DICTIONARY *this_module_kw, struct GMT_OPTION **options) { /* Loop over given options and replace any recognized long-form --parameter[=value] arguments * with the corresponding classic short-format version -[value]. Specifically, long-format is defined as * @@ -1046,10 +1038,6 @@ GMT_LOCAL void gmtinit_translate_to_short_options (struct GMTAPI_CTRL *API, stru if (options == NULL) return; /* Nothing to process */ - #if !defined(USE_MODULE_LONG_OPTIONS) - this_module_kw = NULL; /* Debugging: Not testing the module long-options yet */ - #endif - for (opt = *options; opt; opt = opt->next) { /* Examine all incoming options */ if (opt->option != GMT_OPT_PARAMETER) continue; /* Cannot be a --keyword[=value] long-option pair */ if (isupper (opt->arg[0])) continue; /* Skip any upper-case GMT Default parameter settings, e.g., --FONT_TITLE=12p */ @@ -1209,7 +1197,6 @@ GMT_LOCAL void gmtinit_translate_to_long_options (struct GMTAPI_CTRL *API, struc } #endif -#endif GMT_LOCAL int gmtinit_check_markers (struct GMT_CTRL *GMT) { int error = GMT_NOERROR; @@ -15662,11 +15649,7 @@ struct GMT_CTRL *gmt_init_module (struct GMTAPI_CTRL *API, const char *lib_name, struct GMT_CTRL *GMT = API->GMT; API->error = GMT_NOERROR; - #if defined(USE_COMMON_LONG_OPTIONS) gmtinit_translate_to_short_options (API, this_module_kw, options); /* Replace --long-option syntax with equivalent -onechar options */ - #else - gmt_M_unused(this_module_kw); - #endif is_PS = gmtinit_is_PS_module (API, mod_name, keys, options); /* true if module will produce PS */ if (!is_PS) { /* Override API default since module is a data processor */ From 6bb63789f5aafd94f789e5d4e1057896b0b535a6 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Sun, 14 Apr 2024 01:12:38 +0100 Subject: [PATCH 019/105] Address issues raised in #8438 and more. (#8440) --- src/gmt_init.c | 19 ++++++++++++++----- src/gmt_plot.c | 7 +++++-- src/gmt_prototypes.h | 4 ++-- src/grdblend.c | 10 ++++++++-- src/grdimage.c | 45 ++++++++++++++++++++++++++------------------ src/psconvert.c | 2 -- 6 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index 1895dffc57c..a5226ec184d 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -15794,9 +15794,14 @@ struct GMT_CTRL *gmt_init_module (struct GMTAPI_CTRL *API, const char *lib_name, GMT->current.ps.active = is_PS; /* true if module will produce PS */ /* Check if there is an input remote grid or memory file so we may set geographic to be true now before we must decide on auto-J */ - if (options && (opt = GMT_Find_Option (API, GMT_OPT_INFILE, *options))) { - if (gmt_remote_dataset_id (API, opt->arg) != GMT_NOTSET) /* All remote data grids/images are geographic */ - gmt_set_geographic (GMT, GMT_IN); + if (options && (opt = GMT_Find_Option(API, GMT_OPT_INFILE, *options))) { + if (gmt_remote_dataset_id(API, opt->arg) != GMT_NOTSET) { /* All remote data grids/images are geographic */ + gmt_set_geographic(GMT, GMT_IN); + /* Above is not enough for tilled grids. That case looses this info when creating the final grid but a not + consulting the units in the header of any of the tiles. Se we reinforce it with a fake -fg option. + */ + API->GMT->common.f.is_geo[0] = true; + } else if (gmtlib_data_is_geographic (API, opt->arg)) /* This dataset, grid, image, matrix, or vector is geographic */ gmt_set_geographic (GMT, GMT_IN); } @@ -18238,7 +18243,7 @@ unsigned int gmt_parse_inc_option (struct GMT_CTRL *GMT, char option, char *item GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) { /* Deal with proj.4 or EPSGs passed in -J option */ - char *item_t1 = NULL, *item_t2 = NULL, wktext[32] = {""}, *pch; + char *item_t1 = NULL, *item_t2 = NULL, epsg2proj[GMT_LEN256] = {""}, wktext[32] = {""}, *pch; bool do_free = false; int error = 0, scale_pos; size_t k, len; @@ -18270,7 +18275,7 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) /* Don't remember anymore if we still need to call gmt_importproj4(). We don't for simple mapproject usage but maybe we still need for mapping purposes. To-be-rediscovered. */ - item_t2 = gmt_importproj4 (GMT, item_t1, &scale_pos); /* This is GMT -J proj string */ + item_t2 = gmt_importproj4 (GMT, item_t1, &scale_pos, epsg2proj); /* This is the GMT -J proj string */ if (item_t2 && !GMT->current.ps.active && !strcmp(item_t2, "/1:1")) { /* Even though it failed to do the mapping we can still use it in mapproject */ GMT->current.proj.projection_GMT = GMT_NO_PROJ; @@ -18290,6 +18295,10 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) } else /* Not particularly useful yet because mapproject will fail anyway when scale != 1:1 */ GMT->current.proj.projection_GMT = GMT_NO_PROJ; + + /* If input was a EPSG code, save the epsg -> proj conversion string. Save also if input was a +proj string */ + if (epsg2proj[0] != '\0') snprintf(GMT->common.J.proj4string, GMT_LEN256-1, "%s", epsg2proj); + else if (item_t1[0] == '+') snprintf(GMT->common.J.proj4string, GMT_LEN256-1, "%s", item_t1); /* Check if the scale is 1 or 1:1, and don't get fooled with, for example, 1:10 */ pch = &item_t2[scale_pos]; diff --git a/src/gmt_plot.c b/src/gmt_plot.c index d84a4180b31..b94f7db1e79 100644 --- a/src/gmt_plot.c +++ b/src/gmt_plot.c @@ -8014,9 +8014,11 @@ GMT_LOCAL void gmtplot_wipe_substr(char *str1, char *str2) { } #endif -char *gmt_importproj4 (struct GMT_CTRL *GMT, char *pStr, int *scale_pos) { +char *gmt_importproj4 (struct GMT_CTRL *GMT, char *pStr, int *scale_pos, char *epsg2proj) { /* Take a PROJ.4 projection string or EPSG code and try to find the equivalent -J syntax scale_pos is position on the return string where starts the scale sub-string. + The pStr pointer is changed when in input it contains an EPSG code. On return it will + have the proj4 string corresponding to the EPSG code. That pointer can later be freed with free() */ unsigned int pos = 0; //bool got_lonlat = false; @@ -8031,7 +8033,7 @@ char *gmt_importproj4 (struct GMT_CTRL *GMT, char *pStr, int *scale_pos) { pch[0] = '\0'; } else { - GMT->current.ps.active ? sprintf(scale_c, "14c") : sprintf(scale_c, "1:1"); + GMT->current.ps.active ? sprintf(scale_c, "15c") : sprintf(scale_c, "1:1"); } if (isdigit(szProj4[1])) { /* A EPSG code. By looking at 2nd char instead of 1st both +epsg and epsg work */ @@ -8066,6 +8068,7 @@ char *gmt_importproj4 (struct GMT_CTRL *GMT, char *pStr, int *scale_pos) { return (pStrOut); } snprintf(szProj4, GMT_LEN256-1, "%s", pszResult); + snprintf(epsg2proj, GMT_LEN256-1, "%s", pszResult); /* This one now has the proj4 conversion of the EPSG code. */ if (scale_c[0] != '\0') strcat (szProj4, scale_c); /* Add the width/scale found above */ CPLFree(pszResult); OSRDestroySpatialReference(hSRS); diff --git a/src/gmt_prototypes.h b/src/gmt_prototypes.h index a41cf69b10a..b512395bcbf 100644 --- a/src/gmt_prototypes.h +++ b/src/gmt_prototypes.h @@ -280,8 +280,8 @@ EXTERN_MSC void gmt_map_text (struct GMT_CTRL *GMT, double x, double y, struct G EXTERN_MSC void gmt_map_title (struct GMT_CTRL *GMT, double x, double y); EXTERN_MSC void gmt_linearx_grid (struct GMT_CTRL *GMT, struct PSL_CTRL *P, double w, double e, double s, double n, double dval); EXTERN_MSC int gmt_ps_append (struct GMT_CTRL *GMT, char *source, unsigned int mode, FILE *dest); -EXTERN_MSC char * gmt_export2proj4 (struct GMT_CTRL *GMT); -EXTERN_MSC char * gmt_importproj4 (struct GMT_CTRL *GMT, char *szProj4, int *scale_pos); +EXTERN_MSC char *gmt_export2proj4 (struct GMT_CTRL *GMT); +EXTERN_MSC char *gmt_importproj4 (struct GMT_CTRL *GMT, char *szProj4, int *scale_pos, char *epsg2proj); EXTERN_MSC int gmt_strip_layer (struct GMTAPI_CTRL *API, int nlayers); EXTERN_MSC void gmt_textpath_init (struct GMT_CTRL *GMT, struct GMT_PEN *BP, double Brgb[]); EXTERN_MSC void gmt_draw_map_rose (struct GMT_CTRL *GMT, struct GMT_MAP_ROSE *mr); diff --git a/src/grdblend.c b/src/grdblend.c index 4f9b3d6c8f4..5f80b963c4a 100644 --- a/src/grdblend.c +++ b/src/grdblend.c @@ -1084,8 +1084,8 @@ EXTERN_MSC int GMT_grdblend (void *V_API, int mode, void *args) { n_fill++; /* One more cell filled */ if (z[col] < Grid->header->z_min) Grid->header->z_min = z[col]; /* Update the extrema for output grid */ if (z[col] > Grid->header->z_max) Grid->header->z_max = z[col]; - if (gmt_M_is_zero (z[col])) - m = 1; + if (gmt_M_is_zero (z[col])) + m = 1; } else /* No grids covered this node, defaults to the no_data value */ z[col] = no_data_f; @@ -1162,5 +1162,11 @@ EXTERN_MSC int GMT_grdblend (void *V_API, int mode, void *args) { GMT_Report (GMT->parent, GMT_MSG_ERROR, "Failed to delete file %s\n", outfile); } + /* These two were not copied back into GMT and would be lost in gmt_end_module. Needed to set the correct + @PROJ parameters in PS files. See issue #8438 + */ + GMT_cpy->current.io.col_type[0][0] = GMT->current.io.col_type[0][0]; + GMT_cpy->current.io.col_type[0][1] = GMT->current.io.col_type[0][1]; + Return (GMT_NOERROR); } diff --git a/src/grdimage.c b/src/grdimage.c index 0d531779e8f..8054f03ad00 100644 --- a/src/grdimage.c +++ b/src/grdimage.c @@ -1511,11 +1511,16 @@ EXTERN_MSC int GMT_grdimage (void *V_API, int mode, void *args) { /* Determine if grid/image is to be projected */ need_to_project = (gmt_M_is_nonlinear_graticule (GMT) || Ctrl->E.dpi > 0); - if (need_to_project) - GMT_Report (API, GMT_MSG_DEBUG, "Projected grid is non-orthogonal, nonlinear, or dpi was changed\n"); - else if (Ctrl->D.active) /* If not projecting no need for a pad */ - gmt_set_pad(GMT, 0); + if (need_to_project && GMT->current.proj.projection == GMT_PROJ4_PROJS) { + if (GMT->current.proj.is_proj4) + if (strstr(GMT->common.J.proj4string, "longlat") || strstr(GMT->common.J.proj4string, "lonlat") || strstr(GMT->common.J.proj4string, "latlon")) + need_to_project = false; + } + + if (Ctrl->D.active) gmt_set_pad(GMT, 0); /* If not projecting no need for a pad */ + pad_mode = (need_to_project) ? GMT_GRID_NEEDS_PAD2 : 0; + /* Read the illumination grid header right away so we can use its region to set that of an image (if requested) */ if (use_intensity_grid) { /* Illumination grid desired */ if (Ctrl->I.derive) { /* Illumination grid must be derived */ @@ -1689,16 +1694,10 @@ EXTERN_MSC int GMT_grdimage (void *V_API, int mode, void *args) { Return (API->error); } if (!GMT->common.J.active) { /* No map projection was supplied, set default */ - if ((Grid_orig->header->ProjRefWKT != NULL) || (Grid_orig->header->ProjRefPROJ4 != NULL)) { - static char *Jarg[2] = {"X15c", "Q15c+"}; /* The two default projections for Cartesian and Geographic */ - unsigned int kind = gmt_M_is_geographic (GMT, GMT_IN); - gmt_parse_common_options (GMT, "J", 'J', Jarg[kind]); /* No projection specified, use linear or equidistant */ - GMT->common.J.active = true; /* Now parsed */ - } - else if (GMT->current.setting.run_mode == GMT_CLASSIC) { - GMT_Report (API, GMT_MSG_ERROR, "Must specify a map projection with the -J option\n"); - Return (GMT_PARSE_ERROR); - } + static char *Jarg[2] = {"X15c/0", "Q15c+"}; /* The two default projections for Cartesian and Geographic */ + unsigned int kind = gmt_M_is_geographic (GMT, GMT_IN); + gmt_parse_common_options (GMT, "J", 'J', Jarg[kind]); /* No projection specified, use linear or equidistant */ + GMT->common.J.active = true; /* Now parsed */ } } if (!Ctrl->C.active) /* Set no specific CPT so we turn -C on to use current or default CPT */ @@ -1718,11 +1717,13 @@ EXTERN_MSC int GMT_grdimage (void *V_API, int mode, void *args) { if (Ctrl->E.dpi == 0) grdimage_adjust_R_consideration (GMT, header_work); /* Special check for global pixel-registered plots */ - /* Initialize the projection for the selected -R -J */ - if (gmt_map_setup (GMT, GMT->common.R.wesn)) Return (GMT_PROJECTION_ERROR); + /* Initialize the projection for the selected -R -J. It shouldn't be necessary when -A is in effect because it + doesn't produce a map, but the grid projection machinery uses variables set by it. Can go away only when we implement + image projections with GDAL instead. + */ + if (gmt_map_setup(GMT, GMT->common.R.wesn)) Return (GMT_PROJECTION_ERROR); /* Determine the wesn to be used to read the grid file; or bail if file is outside -R */ - if (!gmt_grd_setregion (GMT, header_work, wesn, need_to_project * GMT->common.n.interpolant)) nothing_inside = true; /* Means we can return an empty plot, possibly with a basemap */ else if (use_intensity_grid && !Ctrl->I.derive && !gmt_grd_setregion (GMT, Intens_orig->header, wesn, need_to_project * GMT->common.n.interpolant)) @@ -1997,12 +1998,16 @@ tr_image: GMT_Report (API, GMT_MSG_INFORMATION, "Project the input image\n"); GMT_Report (API, GMT_MSG_INFORMATION, "Project the input grid\n"); if ((Grid_proj = GMT_Duplicate_Data (API, GMT_IS_GRID, GMT_DUPLICATE_NONE, Grid_orig)) == NULL) Return (API->error); /* Just to get a header we can change */ + /* Determine the dimensions of the projected grid */ + if (Ctrl->A.active && GMT->current.proj.rect[0] == GMT->current.proj.rect[1]) /* Somewhere behind we missed doing this */ + gmt_M_memcpy(GMT->current.proj.rect, Grid_orig->header->wesn, 4, double); grdimage_set_proj_limits (GMT, Grid_proj->header, Grid_orig->header, need_to_project, mixed); + if (grid_registration == GMT_GRID_NODE_REG) /* Force pixel if a dpi was specified, else keep as is */ grid_registration = (Ctrl->E.dpi > 0) ? GMT_GRID_PIXEL_REG : Grid_orig->header->registration; if (gmt_M_err_fail (GMT, gmt_project_init (GMT, Grid_proj->header, inc, nx_proj, ny_proj, Ctrl->E.dpi, grid_registration), - Ctrl->In.file)) Return (GMT_PROJECTION_ERROR); + Ctrl->In.file)) Return (GMT_PROJECTION_ERROR); gmt_set_grddim (GMT, Grid_proj->header); /* Recalculate projected grid dimensions */ if (GMT_Create_Data (API, GMT_IS_GRID, GMT_IS_SURFACE, GMT_DATA_ONLY, NULL, NULL, NULL, 0, 0, Grid_proj) == NULL) Return (API->error); /* Failed to allocate memory for the projected grid */ @@ -2077,6 +2082,10 @@ tr_image: GMT_Report (API, GMT_MSG_INFORMATION, "Project the input image\n"); else /* Use a different reference header for the image */ header_work = Img_proj->header; /* Later when need to refer to the header, use this copy */ + if (header_work->ProjRefPROJ4 == NULL && GMT->current.proj.is_proj4) header_work->ProjRefPROJ4 = strdup(GMT->common.J.proj4string); + if (!need_to_project && Ctrl->A.active && header_work->ProjRefPROJ4 == NULL && gmt_M_is_geographic(GMT, GMT_IN)) + header_work->ProjRefPROJ4 = strdup("+proj=lonlat"); + /* Assign the Conf structure members */ Conf->Grid = Grid_proj; Conf->Image = Img_proj; diff --git a/src/psconvert.c b/src/psconvert.c index d0b168675f5..da56e649c71 100644 --- a/src/psconvert.c +++ b/src/psconvert.c @@ -2786,7 +2786,6 @@ EXTERN_MSC int GMT_psconvert (void *V_API, int mode, void *args) { else if (Ctrl->W.warp && !proj4_cmd) GMT_Report (API, GMT_MSG_ERROR, "Could not find the Proj4 command in the PS file. No conversion performed.\n"); } - else if (Ctrl->W.kml) { /* Write a basic kml file */ char kml_file[PATH_MAX] = ""; if (Ctrl->D.active) @@ -2860,7 +2859,6 @@ EXTERN_MSC int GMT_psconvert (void *V_API, int mode, void *args) { GMT_Report (API, GMT_MSG_INFORMATION, "Wrote KML file %s\n", kml_file); } } - else if (Ctrl->W.active && !found_proj) { GMT_Report (API, GMT_MSG_ERROR, "Could not find the 'PROJ' tag in the PS file. No world file created.\n"); GMT_Report (API, GMT_MSG_ERROR, "This situation occurs when one of the two next cases is true:\n"); From 738c0795d4976e81e3b3b1128d9604617262eac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Mon, 15 Apr 2024 01:49:09 +0200 Subject: [PATCH 020/105] plot: Fix typos in documentation of "-M" (#8444) --- doc/rst/source/plot.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/rst/source/plot.rst b/doc/rst/source/plot.rst index e06ecdab04f..a1acaed3314 100644 --- a/doc/rst/source/plot.rst +++ b/doc/rst/source/plot.rst @@ -239,7 +239,7 @@ Optional Arguments .. _-M: -**-M**\ [**c**\|\ **s**][**+l**\ *seclabel*][**+g**\ *fill*][**p**\ *pen*][**+r**\ *pen*][**+y**\ [*level*]] ] +**-M**\ [**c**\|\ **s**][**+l**\ *seclabel*][**+g**\ *fill*][**p**\ *pen*][**+r**\ *pen*][**+y**\ [*level*]] Fill the middle area between two curves :math:`y_0(x)` and :math:`y_1(x)`, expected to be given via one or more pairs of separate tables, each pair of tables having the same number of segments (which can vary from pair to pair). Thus, the order of the even @@ -272,9 +272,9 @@ Optional Arguments :width: 600 px :align: center - Use the |-M| option to paint the area between curves. intersections and NaN-gaps are + Use the |-M| option to paint the area between curves. Intersections and NaN-gaps are found and the color depends on which curve is on top. Legends can be set as filled - rectangles or lines with colors from the fill selections via **+r**.. + rectangles or lines with colors from the fill selections via **+r**. .. _-N: From e493ccc220d9e997abb655cb461142ed2e7cc777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Mon, 15 Apr 2024 06:10:17 +0200 Subject: [PATCH 021/105] mapproject: Fix typos in documentation for "-W" (#8443) --- doc/rst/source/mapproject.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/rst/source/mapproject.rst b/doc/rst/source/mapproject.rst index ca6d958b26e..9faa4b5b0c6 100644 --- a/doc/rst/source/mapproject.rst +++ b/doc/rst/source/mapproject.rst @@ -251,27 +251,27 @@ Optional Arguments **-W**\ [**b**\|\ **B**\|\ **e**\|\ **E**\|\ **g**\|\ **h**\|\ **j**\|\ **m**\|\ **M**\|\ **n**\|\ **o**\|\ **O**\|\ **r**\|\ **R**\|\ **w**\|\ **x**][**+n**\ [*nx*\ [/*ny*]]] Report a variety of plot dimensions or map regions in projected or geographic units. No input files are read. With no argument we report the map width and height. - The chosen unit of reported plot dimensions may be changed via |-D|. For + The chosen unit of reported plot dimensions may be changed via |-D|. For other results, select from these directives: - **b** - Get the bounding box in longitude and latitude. - **B** - Same, but get the result in -Rw/e/s/n string format returned as trailing text. - **e** - Return the coordinates of the rectangular area encompassing the non-rectangular - area defined by your |-R| |-J| + area defined by your |-R| |-J|. - **E** - Same, but in -Rw/e/s/n string format returned as trailing text. - **g** - Output the plot coordinates of the appended map point *lon*/*lat*. - **h** - Only output the height of the map. - **j** - Output the map coordinates of a reference point by appending its *code* (with standard two-character justification codes). - **n** - Same, but appended reference point *rx*/*ry* is given as normalized positions - in the 0-1 range,. + in the 0-1 range. - **o** - If an oblique domain is set via |-R|\ *xmin/xmax/ymin/ymax*\ **+u**\ *unit* then - return the diagonal corner coordinates in degrees (in the order *llx urx lly ury*) + return the diagonal corner coordinates in degrees (in the order *llx urx lly ury*). - **O** - Same, but get the equivalent |-R| string format returned as trailing text. - **m** - Get the rectangular region in projected plot coordinates instead. - **M** - Same, but returned in |-R| string format returned as trailing text. - **r** - Output the rectangular domain that covers an oblique area as defined by |-R| |-J|. - - **R** - Same, but get the result in -R| string format returned as trailing text. + - **R** - Same, but get the result in |-R| string format returned as trailing text. - **w** - Only output the width of the map in current plot units. - **x** - Output the map coordinates of the specific plot reference point *px*/*py*. From a8c71e07529dc7b21fe0f5ae3370b72bf441eeea Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 15 Apr 2024 22:31:14 +0800 Subject: [PATCH 022/105] CI: Run workflows based on changed files to save CI resources (#8445) --- .github/workflows/build.yml | 20 +++++++++++++------- .github/workflows/check-links.yml | 1 + .github/workflows/code-validator.yml | 13 ++++++++++--- .github/workflows/docker.yml | 7 ++++++- .github/workflows/docs.yml | 5 +++-- .github/workflows/lint-checker.yml | 1 + .github/workflows/remind.yml | 1 + .github/workflows/scm-check.yml | 1 + .github/workflows/tests.yml | 12 ++++++++---- 9 files changed, 44 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbd39ac8e73..c5b7413d279 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,17 +4,23 @@ name: Build on: - pull_request: - paths-ignore: - - 'doc/**' - - '!doc/**/CMakeLists.txt' push: branches: - master - 6.[0-9]+ - paths-ignore: - - 'doc/**' - - '!doc/**/CMakeLists.txt' + paths: + - 'ci/**' + - 'cmake/**' + - 'src/**' + - '**/CMakeLists.txt' + - '.github/workflows/build.yml' + pull_request: + paths: + - 'ci/**' + - 'cmake/**' + - 'src/**' + - 'CMakeLists.txt' + - '.github/workflows/build.yml' defaults: run: diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 89aadb9c5e2..7345f545df9 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -4,6 +4,7 @@ name: Check Links on: # Uncomment the 'pull_request' line below to trigger the workflow in PR # pull_request: + workflow_dispatch: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index 0193890dbd8..7b80ae764bc 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -5,10 +5,17 @@ on: branches: - master - '[0-9]+.[0-9]+' + paths: + - 'src/**' + - 'cmake/**' + - '**/*.sh' + - '.github/workflows/code-validator.yml' pull_request: - paths-ignore: - - 'doc/**' - - '!doc/**/CMakeLists.txt' + paths: + - 'src/**' + - 'cmake/**' + - '**/*.sh' + - '.github/workflows/code-validator.yml' name: Code Validator diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 59e23976a96..d9934d61536 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,12 +9,17 @@ on: - master - 6.[0-9]+ paths: - - 'src/**' + - 'ci/**' - 'cmake/**' + - 'src/**' - '**/CMakeLists.txt' - '.github/workflows/docker.yml' pull_request: paths: + - 'ci/**' + - 'cmake/**' + - 'src/**' + - '**/CMakeLists.txt' - '.github/workflows/docker.yml' defaults: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index afc526a51c4..2c15f9683df 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,9 +10,10 @@ on: - master - 6.[0-9]+ paths: - - 'doc/**' - - '.github/workflows/**' - 'ci/**' + - 'doc/**' + - '**/CMakeLists.txt' + - '.github/workflows/docs.yml' release: types: - published diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml index a3ac4e6f219..fc4af3de3e6 100644 --- a/.github/workflows/lint-checker.yml +++ b/.github/workflows/lint-checker.yml @@ -3,6 +3,7 @@ on: # enable pull request for debugging # pull_request: + workflow_dispatch: # Schedule runs daily schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index edcd3d11fd3..f3891d56047 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -1,6 +1,7 @@ name: Reminders on: + workflow_dispatch: schedule: - cron: '0 0 1 */6 *' # Runs at midnight on the 1st day every 6th month diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml index 891b6ad7ff8..347e5fb4779 100644 --- a/.github/workflows/scm-check.yml +++ b/.github/workflows/scm-check.yml @@ -8,6 +8,7 @@ name: SCM Check on: # uncomment the 'pull_request' line to test the workflow in PRs # pull_request: + workflow_dispatch: schedule: # weekly cron job - cron: '0 0 * * 0' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de251c3fe40..6d550650f3c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,6 @@ name: Tests on: - pull_request: push: branches: - master @@ -12,11 +11,16 @@ on: paths: - 'src/**' - 'test/**' - - 'share/**' - 'doc/examples/**' - 'doc/scripts/**' - - '.github/workflows/**' - - 'ci/**' + - '.github/workflows/tests.yml' + pull_request: + paths: + - 'src/**' + - 'test/**' + - 'doc/examples/**' + - 'doc/scripts/**' + - '.github/workflows/tests.yml' defaults: run: From cb4fca72bb0bec8ea75d57f485233d9ec95dbeb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:34:14 +0800 Subject: [PATCH 023/105] Bump iterative/setup-cml from 2.0.1 to 3 (#8446) Bumps [iterative/setup-cml](https://github.com/iterative/setup-cml) from 2.0.1 to 3. - [Release notes](https://github.com/iterative/setup-cml/releases) - [Commits](https://github.com/iterative/setup-cml/compare/v2.0.1...v3) --- updated-dependencies: - dependency-name: iterative/setup-cml dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dvc-diff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index 47fcc17a7d1..b0a0cd511a9 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -30,7 +30,7 @@ jobs: uses: iterative/setup-dvc@v1.1.2 - name: Setup continuous machine learning (CML) - uses: iterative/setup-cml@v2.0.1 + uses: iterative/setup-cml@v3 - name: Setup Micromamba uses: mamba-org/setup-micromamba@v1.8.1 From 73d3c507aa8d4475a429a00d14dd74a36ad38367 Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Fri, 19 Apr 2024 19:51:44 -0300 Subject: [PATCH 024/105] Update movie.rst. Fix typo (#8447) --- doc/rst/source/movie.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/movie.rst b/doc/rst/source/movie.rst index 4fda8a2fdab..d67fbefe382 100644 --- a/doc/rst/source/movie.rst +++ b/doc/rst/source/movie.rst @@ -436,7 +436,7 @@ recommended that any static part of the movie be considered either a static back a static foreground (to be made once by *foreground*; see **-Sf**); **movie** will then assemble these layers per frame. Also, any computation of static data files to be used in the loop over frames can be produced by *background*. Any data or variables that depend on the frame number must be computed or set by *mainscript* or provided via the parameters as discussed above. **Note**: Using -the variables **MOVIE_WIDTH** or **MOVIE_HIGHT** to set plot dimensions may lead to clipping against the canvas since these are also the +the variables **MOVIE_WIDTH** or **MOVIE_HEIGHT** to set plot dimensions may lead to clipping against the canvas since these are also the exact canvas dimensions. External *PostScript* Layers From 067ecbcf9081a9e31f91acff5d6cc6215e84e9bc Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 20 Apr 2024 20:46:22 +0800 Subject: [PATCH 025/105] CI: Improve the 'Check Links' workflow --- .github/workflows/check-links.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 7345f545df9..851d749b3ee 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -1,4 +1,10 @@ -# This workflow checks the links in plaintext files in the repository +# Check links in plaintext files in the repository +# +# This workflow runs the lychee tool to check all links in plaintext files. It will +# create an issue if broken links are found. +# +# It is scheduled to run weekly at 12 noon every Sunday. +# name: Check Links on: @@ -13,12 +19,14 @@ jobs: check_links: name: Check Links runs-on: ubuntu-latest + if: github.repository == 'GenericMappingTools/gmt' steps: - name: Checkout the repository uses: actions/checkout@v4.1.1 - name: Link Checker + id: lychee uses: lycheeverse/lychee-action@v1.9.3 with: # 429: Too many requests @@ -44,15 +52,15 @@ jobs: **/*.rst **/*.rst_ **/*.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: Create Issue From File - uses: peter-evans/create-issue-from-file@v5 - with: - title: Link Checker Report on ${{ steps.date.outputs.date }} - content-filepath: ./lychee/out.md + if: env.lychee_exit_code != 0 + run: | + title="Link Checker Report on ${{ steps.date.outputs.date }}" + gh issue create --title "$title" --body-file ./lychee/out.md + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} From b56be20bee0b8de22a682fdcd458f9b9eeb76f64 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 20 Apr 2024 22:42:31 +0800 Subject: [PATCH 026/105] CI: Improve the 'Reminder' workflow --- .github/workflows/remind.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index f3891d56047..cab5434942c 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -1,9 +1,15 @@ +# +# Create an issue to remind us some important things. +# +# It's scheduled to run every 6 months. +# name: Reminders on: workflow_dispatch: + # Scheduled to run at midnight on the 1st day every 6 months schedule: - - cron: '0 0 1 */6 *' # Runs at midnight on the 1st day every 6th month + - cron: '0 0 1 */6 *' jobs: review-known-failures: @@ -29,5 +35,5 @@ jobs: gh issue create --title "$title" --body-file report.md fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 57d52211d47d2d17477b083bd4f633407dee3ebc Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 22 Apr 2024 22:55:25 +0800 Subject: [PATCH 027/105] Add admin/list_known_failures.sh to list known failures and simplify the workflow (#8451) --- .github/workflows/remind.yml | 12 +++--------- admin/list_known_failures.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100755 admin/list_known_failures.sh diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index cab5434942c..66895a1e4d3 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -21,17 +21,11 @@ jobs: - name: Find and report known failures run: | - # Get the list of known failures - KNOWN_FAILURES=$(grep -rl 'GMT_KNOWN_FAILURE' test/**/*.sh) + title="Review GMT's known failures" - # If there are known failures, create an issue - if [ -n "$KNOWN_FAILURES" ]; then - title="Review GMT's known failures" - - echo "The following tests are marked as GMT_KNOWN_FAILURE and need review:" > report.md - echo "" >> report.md - while IFS= read -r line ; do echo "1. $line"; done <<< $KNOWN_FAILURES >> report.md + bash admin/list_known_failures.sh > report.md + if [ -s "report.md" ]; then gh issue create --title "$title" --body-file report.md fi env: diff --git a/admin/list_known_failures.sh b/admin/list_known_failures.sh new file mode 100755 index 00000000000..a9544ca7f15 --- /dev/null +++ b/admin/list_known_failures.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Report the list of known failures. +# + +if [ ! -d cmake ]; then + echo "Must be run from top-level gmt directory" + exit 1 +fi + +known_failures=$(grep -rl "GMT_KNOWN_FAILURE" test/**/*.sh doc/**/*.sh) +if [ -n "$known_failures" ]; then + echo "The following tests are marked as GMT_KNOWN_FAILURE and need review:" + echo "" + while IFS= read -r line; do + echo "- $line" + done <<< $known_failures +fi From 98a52d4de08d18b118666c1ff9def4b5c5be43ec Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 23 Apr 2024 07:37:45 +0800 Subject: [PATCH 028/105] Minor fix of the indentations --- admin/list_known_failures.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/list_known_failures.sh b/admin/list_known_failures.sh index a9544ca7f15..e12834ab552 100755 --- a/admin/list_known_failures.sh +++ b/admin/list_known_failures.sh @@ -4,8 +4,8 @@ # if [ ! -d cmake ]; then - echo "Must be run from top-level gmt directory" - exit 1 + echo "Must be run from top-level gmt directory" + exit 1 fi known_failures=$(grep -rl "GMT_KNOWN_FAILURE" test/**/*.sh doc/**/*.sh) From af4ce9df112741f426b594635ea6bdea33523314 Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:53:22 +0200 Subject: [PATCH 029/105] grd2xyz.rst: add link to -T in description (#8455) --- doc/rst/source/grd2xyz.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/grd2xyz.rst b/doc/rst/source/grd2xyz.rst index 2f7384673f2..b6374413e23 100644 --- a/doc/rst/source/grd2xyz.rst +++ b/doc/rst/source/grd2xyz.rst @@ -41,7 +41,7 @@ precision of the ASCII output format by editing the **--FORMAT_FLOAT_OUT**\ =\ *format* on the command line, or choose binary output using single or double precision storage. As an option you may output z-values without the (*x, y*) coordinates (see |-Z| below) or you can -save the grid in the STL format for 3-D printers. Also, by giving a CPT via +save the grid in the STL format for 3-D printers with |-T|. Also, by giving a CPT via |-C| we will add *r*, *g*, *b*, *a* columns to the output based on *z* values. Required Arguments From 17eace35fcec80c6b48eb44c36917c2d4319b6aa Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 23 Apr 2024 21:13:29 +0800 Subject: [PATCH 030/105] doc: No need to show the scripts that generate the big tables (#8453) --- doc/rst/source/reference/cpts.rst | 31 ------------------- doc/rst/source/reference/custom-symbols.rst | 6 ---- doc/rst/source/reference/octal-codes.rst | 12 ------- doc/rst/source/reference/postscript-fonts.rst | 6 ---- 4 files changed, 55 deletions(-) diff --git a/doc/rst/source/reference/cpts.rst b/doc/rst/source/reference/cpts.rst index c66d5b7a08f..add502c943c 100644 --- a/doc/rst/source/reference/cpts.rst +++ b/doc/rst/source/reference/cpts.rst @@ -44,12 +44,6 @@ Color maps can be selected in various of the GMT tools using **-C**\ [*section*/ The standard 46 CPTs supported by GMT. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_M_1a.txt - .. _CPT_files_b: .. figure:: /_images/GMT_App_M_1b.* @@ -58,12 +52,6 @@ Color maps can be selected in various of the GMT tools using **-C**\ [*section*/ The 30 scientific color maps by Fabio Crameri supported by GMT. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_M_1b.txt - .. _CPT_files_c: .. figure:: /_images/GMT_App_M_1c.* @@ -75,12 +63,6 @@ Color maps can be selected in various of the GMT tools using **-C**\ [*section*/ **Note**: Any GMT colormap can be made cyclic by running :doc:`/makecpt` with the **-Ww** option (wrapped = cyclic). -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_M_1c.txt - .. _CPT_files_d: .. figure:: /_images/GMT_App_M_1d.* @@ -89,12 +71,6 @@ Color maps can be selected in various of the GMT tools using **-C**\ [*section*/ The 22 color maps from cmocean by Kristen M. Thyng supported by GMT. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_M_1d.txt - For additional color tables, visit `cpt-city `_ and `Scientific Colour-Maps `_. @@ -126,10 +102,3 @@ annotation code to **B**. .. figure:: /_images/GMT_App_M_2.* :width: 600 px :align: center - - -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_M_2.txt diff --git a/doc/rst/source/reference/custom-symbols.rst b/doc/rst/source/reference/custom-symbols.rst index 7ac01d44d0c..1e79b13c248 100644 --- a/doc/rst/source/reference/custom-symbols.rst +++ b/doc/rst/source/reference/custom-symbols.rst @@ -34,12 +34,6 @@ Several custom symbol definitions comes included with GMT (see Figure :ref:`Cust Be aware that some symbols may have a hardwired fill or no-fill component, while others duplicate what is already available as standard built-in symbols. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_N_1.txt - You may find it convenient to examine some of these and use them as a starting point for your own design; they can be found in GMT's share/custom directory. In addition to the ones listed in Figure :ref:`Custom symbols ` diff --git a/doc/rst/source/reference/octal-codes.rst b/doc/rst/source/reference/octal-codes.rst index a367ab12041..423fdbb894a 100644 --- a/doc/rst/source/reference/octal-codes.rst +++ b/doc/rst/source/reference/octal-codes.rst @@ -20,12 +20,6 @@ characters (shown in the light green boxes) you need to set Octal codes and corresponding symbols for StandardEncoding (left) and ISOLatin1Encoding (right) fonts. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_F_stand+_iso+.txt - The chart for the Symbol character set (GMT font number 12) and Pifont ZapfDingbats character set (font number 34) are presented in Figure :ref:`Octal codes for Symbol and ZapfDingbats ` below. The octal code @@ -45,12 +39,6 @@ firmware will not know about the euro). Octal codes and corresponding symbols for Symbol (left) and ZapfDingbats (right) fonts. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_F_symbol_dingbats.txt - Footnote -------- diff --git a/doc/rst/source/reference/postscript-fonts.rst b/doc/rst/source/reference/postscript-fonts.rst index 31e07d52fff..0b6e2602f91 100644 --- a/doc/rst/source/reference/postscript-fonts.rst +++ b/doc/rst/source/reference/postscript-fonts.rst @@ -12,12 +12,6 @@ usually Courier). The following is a list of the GMT fonts: The standard 35 PostScript fonts recognized by GMT. -.. toggle:: - - Here is the source script for the figure above: - - .. literalinclude:: /_verbatim/GMT_App_G.txt - For the special fonts Symbol (12) and ZapfDingbats (34), see the octal charts in Chapter :doc:`octal-codes`. When specifying fonts in GMT, you can either give the entire font name *or* just the font number listed in From b68f596c4b2849fe235b8b89e16515e5ab3d3927 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 23 Apr 2024 21:38:18 +0800 Subject: [PATCH 031/105] CI: Refactor the release-baseline-images workflow using gh --- .github/workflows/release-baseline-images.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index 862abd699e7..2f0c0011a07 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -14,6 +14,10 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'GenericMappingTools/gmt' + permissions: + # To write assets to GitHub release + contents: write + steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -39,7 +43,6 @@ jobs: shasum -a 256 baseline-images.zip - name: Upload baseline image as a release asset - uses: shogo82148/actions-upload-release-asset@v1.7.4 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: baseline-images.zip + run: gh release upload ${{ github.ref_name }} baseline-images.zip + env: + GH_TOKEN: ${{ github.token }} From db14905c77f47ad49b6ff583a212098212519572 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 23 Apr 2024 21:39:27 +0800 Subject: [PATCH 032/105] Configure dependabot to automatically update requirements.txt for docs (#8454) --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1a67d4d577f..ac06e7a1177 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,3 +14,15 @@ updates: # Specify labels for pull requests labels: - "maintenance" + + - package-ecosystem: "pip" + directory: "/doc/rst/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "weekly" + day: "tuesday" + # Allow up to 2 open pull requests at a time + open-pull-requests-limit: 2 + # Specify labels for pull requests + labels: + - "maintenance" From b4e88480e995f3c7f8f1e30dae43f5673a0345fc Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 24 Apr 2024 07:59:08 +0800 Subject: [PATCH 033/105] CI: Update dependencies monthly (#8458) --- .github/dependabot.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ac06e7a1177..b0719d8ef20 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,9 +6,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - # Check for updates to GitHub Actions every weekday - interval: "weekly" - day: "tuesday" + interval: "monthly" # Allow up to 2 open pull requests at a time open-pull-requests-limit: 2 # Specify labels for pull requests @@ -18,9 +16,7 @@ updates: - package-ecosystem: "pip" directory: "/doc/rst/" schedule: - # Check for updates to GitHub Actions every weekday - interval: "weekly" - day: "tuesday" + interval: "monthly" # Allow up to 2 open pull requests at a time open-pull-requests-limit: 2 # Specify labels for pull requests From 6ca63829894607d1a2952ec386823244f1dce4ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 08:31:08 +0800 Subject: [PATCH 034/105] Bump sphinx-rtd-theme from 1.3.0 to 2.0.0 in /doc/rst (#8456) Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.3.0 to 2.0.0. - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst) - [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.3.0...2.0.0) --- updated-dependencies: - dependency-name: sphinx-rtd-theme dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- doc/rst/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/requirements.txt b/doc/rst/requirements.txt index 151527c9a29..df42ea86291 100644 --- a/doc/rst/requirements.txt +++ b/doc/rst/requirements.txt @@ -4,7 +4,7 @@ # # pip install -r doc/rst/requirements.txt # -sphinx_rtd_theme==1.3.0 +sphinx_rtd_theme==2.0.0 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-jinja==2.0.2 From 7845f5e2cf13bf2160b2c0e467f7095005bf5fb3 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 27 Apr 2024 19:32:25 +0800 Subject: [PATCH 035/105] GMT_Call_Module: Fix the debugging message when a list of argument strings is passed (#8461) --- src/gmt_api.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gmt_api.c b/src/gmt_api.c index 6119f561cdf..369fa8ee3c9 100644 --- a/src/gmt_api.c +++ b/src/gmt_api.c @@ -869,7 +869,7 @@ GMT_LOCAL bool gmtapi_modern_casename (char *arg) { /* Return true if argument is all letters of same case, e.g., pny, PNN, tift, jxx, i.e., * the user did -pny map or -jxx map etc. We will assume that is likely a typo and report that, * but this cannot possibly be foolproof. */ - + unsigned int k = 1; /* First position beyond the leading letter */ if (islower (arg[0])) { /* Expect all to be lower case letters */ while (arg[k]) { @@ -4819,7 +4819,7 @@ GMT_LOCAL struct GMT_IMAGE *gmtapi_import_image (struct GMTAPI_CTRL *API, int ob so I had to set it to true in grdview (~# 884). However, having set to true means that gdalread would read it upside-down, so if image is not referenced GMT->common.R.active[RSET] is set to false. This is all a damn hack, but I couldn't find any other cleaner way to make it work for all the combinations of: - Classic/Modern/Referenced/notReferenced. + Classic/Modern/Referenced/notReferenced. */ if (have_CRS && (GMT->common.R.active[RSET] && !S_obj->region && !GMT->common.R.oblique)) { /* subregion not passed to object yet */ gmt_M_memcpy (S_obj->wesn, GMT->common.R.wesn, 4U, double); @@ -7627,7 +7627,7 @@ GMT_LOCAL void *gmtapi_get_data (void *V_API, int object_ID, unsigned int mode, gmtapi_set_object (API, S_obj); //gmtapi_list_objects (API, "gmtapi_get_data"); #endif - + /* 4GMT.jl For start, copy only 64 columns instead of the GMT_MAX_COLUMNS Don't change anything here without consulting with GMT.jl side */ @@ -12849,7 +12849,10 @@ int GMT_Call_Module (void *V_API, const char *module, int mode, void *args) { if ((status = gmtapi_check_for_modern_oneliner (API, module, mode, args))) return status; /* If a modern mode one-liner we must switch run--mode here, or fail if an error */ if (API->external && gmt_M_is_verbose (API->GMT, GMT_MSG_DEBUG)) { /* For externals only, print the equivalent command-line string under -Vd */ - char *text = (mode == GMT_MODULE_OPT) ? GMT_Create_Cmd (API, args) : args; + char *text; + if (mode == GMT_MODULE_OPT) text = GMT_Create_Cmd (API, args); + else if (mode == GMT_MODULE_CMD) text = args; + else text = gmt_argv2str (NULL, mode, args); GMT_Report (API, GMT_MSG_DEBUG, "GMT_Call_Command string: gmt %s %s\n", module, text); if (mode == GMT_MODULE_OPT) GMT_Destroy_Cmd (API, &text); } From 8745e7b963fe72f9890c8664886720e043baff4f Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 27 Apr 2024 19:35:15 +0800 Subject: [PATCH 036/105] CI: Need to setup miniconda for macOS-14 (#8463) --- .github/workflows/build.yml | 6 +++++- .github/workflows/docs.yml | 6 +++++- .github/workflows/tests.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5b7413d279..e46e5ce18df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ on: defaults: run: # default to use bash shell - shell: bash + shell: bash -el {0} concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -73,6 +73,10 @@ jobs: path: C:\vcpkg\installed\ if: runner.os == 'Windows' + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + if: runner.os == 'macOS' + - name: Install GMT dependencies run: | # $RUNNER_OS can be Linux, macOS or Windows diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2c15f9683df..d97aa6078bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,7 @@ on: defaults: run: # default to use bash shell - shell: bash + shell: bash -el {0} concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -67,6 +67,10 @@ jobs: path: C:\vcpkg\installed\ if: runner.os == 'Windows' + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + if: runner.os == 'macOS' + - name: Install GMT dependencies run: | # $RUNNER_OS can be Linux, macOS or Windows diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d550650f3c..63b27edb038 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ on: defaults: run: # default to use bash shell - shell: bash + shell: bash -el {0} concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -70,6 +70,10 @@ jobs: path: C:\vcpkg\installed\ if: runner.os == 'Windows' + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + if: runner.os == 'macOS' + - name: Install GMT dependencies run: | # $RUNNER_OS can be Linux, macOS or Windows From 7a9b87874ebed910e3be1c6b72e6237122672d46 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Sun, 28 Apr 2024 18:05:30 +0100 Subject: [PATCH 037/105] Update GMT.jl doc links. --- doc/rst/source/tutorial/julia/intro.rst | 6 ++++-- doc/rst/source/tutorial/julia/session-1.rst | 6 +++--- doc/rst/source/tutorial/julia/session-2.rst | 22 +++++++++++---------- doc/rst/source/tutorial/julia/session-3.rst | 12 +++++------ doc/rst/source/tutorial/julia/session-4.rst | 22 ++++++++++----------- 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/doc/rst/source/tutorial/julia/intro.rst b/doc/rst/source/tutorial/julia/intro.rst index c2a69f65ac7..dbd02bac639 100644 --- a/doc/rst/source/tutorial/julia/intro.rst +++ b/doc/rst/source/tutorial/julia/intro.rst @@ -33,6 +33,8 @@ Alternatively, you can build GMT from source by following the See also the general information about `Julia `_ as well as the introduction to the Julia wrapper at -https://www.generic-mapping-tools.org/GMT.jl/dev/usage/ and the very recommendable -`Quick Learn `_. Complement with the instructions on how to +`Introduction `_ +and the very recommendable +`Quick Learn `_. +Complement with the instructions on how to install `GMT.jl `_ diff --git a/doc/rst/source/tutorial/julia/session-1.rst b/doc/rst/source/tutorial/julia/session-1.rst index 20923d979aa..79ed88f9d60 100644 --- a/doc/rst/source/tutorial/julia/session-1.rst +++ b/doc/rst/source/tutorial/julia/session-1.rst @@ -5,7 +5,7 @@ Tutorial setup -------------- #. GMT man pages, documentation, and gallery example scripts are available from the GMT.jl documentation web page - available from https://www.generic-mapping-tools.org/GMT.jl/dev/. + available from https://www.generic-mapping-tools.org/GMTjl_doc/. #. We recommend you create a sub-directory called *tutorial*, cd into that directory, and run the commands there to keep things tidy. @@ -92,7 +92,7 @@ Laboratory Exercises We will begin our adventure by making some simple plot axes and coastline basemaps. We will do this in order to introduce the all-important common options **frame**, **proj**, and **region** and to familiarize ourselves with a few selected GMT projections. The GMT modules we will utilize are :doc:`/basemap` and -`basemap `_. +`basemap `_. Please consult their manual pages for reference. Linear projection @@ -165,7 +165,7 @@ projections offered by GMT; here we will only have time to focus on one such pro **proj=:merc** -To make coastline maps we use `basemap `_ which automatically +To make coastline maps we use `coast `_ which automatically will access the GMT coastline, river and border data base derived from the GSHHG database [See *Wessel and Smith*, 1996]. In addition to the common switches we may need to use some of several coast-specific options: diff --git a/doc/rst/source/tutorial/julia/session-2.rst b/doc/rst/source/tutorial/julia/session-2.rst index 7caf90776bc..8c81e7d4f23 100644 --- a/doc/rst/source/tutorial/julia/session-2.rst +++ b/doc/rst/source/tutorial/julia/session-2.rst @@ -38,11 +38,11 @@ colorbar Plot gray scale or color scale bar text Plot text strings ======================== ==================================================================== -Plotting lines and symbols, `plot `_ is one of the most frequently +Plotting lines and symbols, `plot `_ is one of the most frequently used modules in GMT. In addition to the common command line switches it has numerous specific options, and expects different file formats depending on what action has been selected. These circumstances make -`plot `_ harder to master than most GMT tools. The table below +`plot `_ harder to master than most GMT tools. The table below shows an abbreviated list of the options: ================================================================== =================================================================== @@ -123,7 +123,8 @@ us are shown in the table below: | **marker**\ ="y-dash" | vertical dash; *size* is length of dash | +------------------------------------+-------------------------------------------------------------------------------------------+ -The symbol option in `plot `_. Lower case symbols (**a, c, d, g, h, i, n, s, t, x**) +The symbol option in `plot `_. +Lower case symbols (**a, c, d, g, h, i, n, s, t, x**) will fit inside a circle of given diameter. Upper case symbols (**A, C, D, G, H, I, N, S, T, X**) will have area equal to that of a circle of given diameter. @@ -215,8 +216,8 @@ Exercises: #. Try using a predefined pattern. A common question is : "How can I plot symbols connected by a line -with plot?". The surprising answer is that we must call `plot `_ twice. -While this sounds cumbersome there is a reason for this: Basically, +with plot?". The surprising answer is that we must call `plot `_ +twice. While this sounds cumbersome there is a reason for this: Basically, polygons need to be kept in memory since they may need to be clipped, hence computer memory places a limit on how large polygons we may plot. Symbols, on the other hand, can be plotted one at a time so there @@ -240,7 +241,7 @@ instead of symbols over the line, as here. Result of GMT Tutorial example 8 -Our final `plot `_ example involves a more complicated scenario in +Our final `plot `_ example involves a more complicated scenario in which we want to plot the epicenters of several earthquakes over the background of a coastline basemap. We want the symbols to have a size that reflects the magnitude of the earthquakes, and that their color should reflect the depth of the hypocenter. The first few lines in the remote tut_quakes.ngdc looks like this: @@ -255,7 +256,7 @@ The first few lines in the remote tut_quakes.ngdc looks like this: Thus the file has three header records (including the blank line), but we are only interested in columns 5, 4, 6, and 7. In addition to extract those columns we must also scale the magnitudes into symbols sizes in centimeters. Given their range it looks like multiplying the magnitude by 0.1 will work well for symbol -sizes in cm. Reformatting this file to comply with the `plot `_ +sizes in cm. Reformatting this file to comply with the `plot `_ input format can be done in a number of ways. Here, we simply use the common column selection option **incol** and its :ref:`scaling/offset capabilities <-icols_full>`. To skip the first 3 header records and then select the 5th, 4rd, 6th, and 7th column and scale the 7th column by 0.1, we would use @@ -314,7 +315,7 @@ Plotting text strings --------------------- In many situations we need to annotate plots or maps with text strings; -in GMT this is done using `text `_. Apart from the common +in GMT this is done using `text `_. Apart from the common switches, there are 8 options that are particularly useful. ===================================================================== =================================================== @@ -330,7 +331,8 @@ Option Purpose **pen**\ =\ *pen* Draw the outline of text box ===================================================================== =================================================== -The input data to `text `_ is expected to contain the following information: +The input data to `text `_ +is expected to contain the following information: :: @@ -366,7 +368,7 @@ A chart of octal codes can be found in Appendix F in the GMT Technical Reference. For accented European characters you must set :term:`PS_CHAR_ENCODING` to ISOLatin1 in your :doc:`/gmt.conf` file. -We will demonstrate `text `_ with the following script: +We will demonstrate `text `_ with the following script: .. code-block:: julia diff --git a/doc/rst/source/tutorial/julia/session-3.rst b/doc/rst/source/tutorial/julia/session-3.rst index d4dfdb0d0e4..0b859e65dc5 100644 --- a/doc/rst/source/tutorial/julia/session-3.rst +++ b/doc/rst/source/tutorial/julia/session-3.rst @@ -23,11 +23,11 @@ We first use the GMT module :doc:`/grdinfo` to see what's in this file:: grdinfo(G) The file contains bathymetry for the Bermuda region and has depth values from -5475 to -89 meters. We want to -make a contour map of this data; this is a job for `grdcontour `_. + As with previous plot commands we need to set up the map projection with **proj**. Here, however, we do not have to specify the region since that is by default assumed to be the extent of the grid file. To generate any plot we will in addition need to supply information about which contours to draw. Unfortunately, -`grdcontour `_ is a complicated module with too +`grdcontour `_ is a complicated module with too many options. We put a positive spin on this situation by touting its flexibility. Here are the most useful options: +-----------------------------------------------------------------+----------------------------------------------------------------------+ @@ -201,9 +201,9 @@ Preprocessing The :doc:`/surface` module assumes that the data have been preprocessed to eliminate aliasing, hence we must ensure that this step is completed prior to gridding. GMT comes with three preprocessors, called -`blockmean `_, -`blockmedian `_, and -`blockmode `_. The first averages values inside the +`blockmean `_, +`blockmedian `_, and +`blockmode `_. The first averages values inside the grid-spacing boxes, the second returns median values, wile the latter returns modal values. As a rule of thumb, we use means for most smooth data (such as potential fields) and medians (or modes) for rough, non-Gaussian data (such as topography). In addition to the required **region** and **inc** switches, these preprocessors all take @@ -223,7 +223,7 @@ The output data can now be used with surface:: G = surface(D, region=(245,255,20,30), inc="5m", verbose=true); -If you rerun `grdcontour `_ on the new grid file +If you rerun `grdcontour `_ on the new grid file (try it!) you will notice a big difference compared to the grid made by :doc:`/nearneighbor`: since surface is a global method it will evaluate the solution at all nodes, even if there are no data constraints. There are numerous options available to us at this point: diff --git a/doc/rst/source/tutorial/julia/session-4.rst b/doc/rst/source/tutorial/julia/session-4.rst index 4bc1a5c15ae..97c2ee0dab1 100644 --- a/doc/rst/source/tutorial/julia/session-4.rst +++ b/doc/rst/source/tutorial/julia/session-4.rst @@ -19,13 +19,13 @@ CPTs can be created in any number of ways. GMT provides two mechanisms: #. Create simple, linear color tables given a master color table (several are built-in) and the desired *z*-values at color boundaries - (`makecpt `_) + (`makecpt `_) #. Create color tables based on a master CPT color table and the histogram-equalized distribution of *z*-values - in a gridded data file (`grd2cpt `_) + in a gridded data file (`grd2cpt `_) One can also make these files manually. Here we will limit our discussion to -`makecpt `_. +`makecpt `_. Its main argument is the name of the master color table (a list is shown if you run the module with no arguments) and the equidistant *z*-values to go with it. The main options are given below. @@ -47,12 +47,12 @@ from -20 to 60, with color changes at every 10, try these two variants: makecpt(cmap=:rainbow, range=(-20,60,10), write="disc.cpt") makecpt(cmap=:rainbow, range=(-20,60,10), continuous=true, write="cont.cpt") -We can plot these color tables with `colorbar `_; +We can plot these color tables with `colorbar `_; the options worth mentioning here are listed below. The placement of the color bar is particularly important and we refer you to the :ref:`Plot embellishments ` section for all the details. In addition, the **frame** option can be used to set the title and unit label (and optionally to set the annotation-, tick-, and grid-line intervals for the color bars.). Note that the makecpt commands above are done in classic mode. -If you run `makecpt `_ in modern mode then you usually +If you run `makecpt `_ in modern mode then you usually do not specify an output file via standard output since modern mode maintains what is known as the current CPT. However, if you must explicitly name an output CPT then you will need to add the -H option for modern mode to allow output to standard output. @@ -90,7 +90,7 @@ Your plot should look like :ref:`our example 14 below ` Exercises: -#. Redo the `makecpt `_ exercise using the +#. Redo the `makecpt `_ exercise using the master table *hot* and redo the bar plot. #. Try specifying **frame**\ =(annot=10, grid=5). @@ -140,7 +140,7 @@ Here, we will extract a subset of the global 30" DEM called SRTM30+: Using :doc:`/grdinfo` we find that the data ranges from about 1000m to about 4300m so we need to make a CPT with that range. -Color images are made with `grdimage `_ +Color images are made with `grdimage `_ which takes the usual common command options (by default the **region** is taken from the data set) and a CPT; the main other options are: @@ -173,7 +173,7 @@ Your plot should look like :ref:`our example 15 below ` The plain color map lacks detail and fails to reveal the topographic complexity of this Rocky Mountain region. What it needs is artificial illumination. We want to simulate shading by a sun source in the east, hence we derive the required intensities from the gradients of the topography in the N90°E direction using -`grdgradient `_. +`grdgradient `_. Other than the required input and output filenames, the available options are +----------------------------------------------+-----------------------------------------------------------------------------+ @@ -239,7 +239,7 @@ Exercises: #. Force a gray-shade image. -#. Rerun `grdgradient `_ with **norm**\ =1. +#. Rerun `grdgradient `_ with **norm**\ =1. Multi-dimensional maps ---------------------- @@ -297,7 +297,7 @@ Perspective views ----------------- Our final undertaking in this tutorial is to examine three-dimensional perspective views. The GMT module that -produces perspective views of gridded data files is `grdview `_. +produces perspective views of gridded data files is `grdview `_. It can make two kinds of plots: #. Mesh or wire-frame plot (with or without superimposed contours) @@ -384,7 +384,7 @@ Exercises: #. Choose another vantage point and scaling. -#. Redo `grdgradient `_ with another illumination +#. Redo `grdgradient `_ with another illumination direction and plot again. #. Select a higher *dpi*, e.g., 200. From 5102c4e57f9c89827b4ea4658741d9290dd696e1 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 30 Apr 2024 10:01:56 +0800 Subject: [PATCH 038/105] CI: Update the SCM-check workflow (#8466) --- .github/workflows/remind.yml | 2 +- .github/workflows/scm-check.yml | 88 ++++++++++++++++++--------------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index 66895a1e4d3..1050fbe2068 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -29,5 +29,5 @@ jobs: gh issue create --title "$title" --body-file report.md fi env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml index 347e5fb4779..6dcea9e8c8d 100644 --- a/.github/workflows/scm-check.yml +++ b/.github/workflows/scm-check.yml @@ -17,53 +17,59 @@ jobs: scm-check: name: SCM Check runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Check the latest release + id: scm + run: | + scm_version_in_gmt=8.0.0 - - name: Check the latest release - id: scm - run: | - scm_version_in_gmt=8.0.0 + # Get version string and date from Zenodo API + # https://doi.org/10.5281/zenodo.1243862 + scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g') + scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g') + echo "SCM version ${scm_version} (${scm_version_date})" - # Get version string and date from Zenodo API - # https://doi.org/10.5281/zenodo.1243862 - scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g') - scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g') - echo "SCM version ${scm_version} (${scm_version_date})" + # Set output of the current step + echo "scm_version=${scm_version}" >> $GITHUB_OUTPUT + echo "scm_version_date=${scm_version_date}" >> $GITHUB_OUTPUT + if [ "${scm_version}" != ${scm_version_in_gmt} ]; then + echo "The latest SCM version (${scm_version}) is different from the one in GMT (${scm_version_in_gmt})!" + echo "error_code=2" >> $GITHUB_OUTPUT + fi - # Set output of the current step - echo "scm_version=${scm_version}" >> $GITHUB_OUTPUT - echo "scm_version_date=${scm_version_date}" >> $GITHUB_OUTPUT - if [ "${scm_version}" != ${scm_version_in_gmt} ]; then - echo "The latest SCM version (${scm_version}) is different from the one in GMT (${scm_version_in_gmt})!" - echo "error_code=2" >> $GITHUB_OUTPUT - fi + - name: Create an update request + if: ${{ steps.scm.outputs.error_code == 2 }} + run: | + title="New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found" + cat > report.md << 'EOF' + A new Scientific Colour Maps release was found. - - name: Create an update request - if: ${{ steps.scm.outputs.error_code == 2 }} - uses: nashmaniac/create-issue-action@v1.2 - with: - title: New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found - token: ${{secrets.GITHUB_TOKEN}} - body: | - A new Scientific Colour Maps release was found. + - website: https://www.fabiocrameri.ch/colourmaps.php + - version: ${{ steps.scm.outputs.scm_version }} + - date: ${{ steps.scm.outputs.scm_version_date }} - - website: https://www.fabiocrameri.ch/colourmaps.php - - version: ${{ steps.scm.outputs.scm_version }} - - date: ${{ steps.scm.outputs.scm_version_date }} + Todo list: - Todo list: + - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862 + to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7). + - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs. + - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/` + - [ ] Make sure to update the following files: + - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml` + - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added) + - [ ] Counts of colour maps in `doc/rst/source/reference/cpts.rst` (only if new colour maps were added) + - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added) + - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s) + - [ ] Commit all changes and open a PR - - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862 - to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7). - - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs. - - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/` - - [ ] Make sure to update the following files: - - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml` - - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added) - - [ ] Counts of colour maps in `doc/rst/source/reference/cpts.rst` (only if new colour maps were added) - - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added) - - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s) - - [ ] Commit all changes and open a PR + **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the + `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again. + EOF - **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the - `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again. + gh issue create --title "${title}" --body-file report.md + env: + GH_TOKEN: ${{ github.token }} From e2592e1e58a115a34c7a30a0bad0d83a90a42cd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:03:52 +0800 Subject: [PATCH 039/105] Bump actions/checkout from 4.1.1 to 4.1.4 (#8468) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.1...v4.1.4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/check-links.yml | 2 +- .github/workflows/ci-caches.yml | 2 +- .github/workflows/code-validator.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 4 ++-- .github/workflows/dvc-diff.yml | 2 +- .github/workflows/lint-checker.yml | 2 +- .github/workflows/release-baseline-images.yml | 2 +- .github/workflows/remind.yml | 2 +- .github/workflows/scm-check.yml | 2 +- .github/workflows/tests.yml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e46e5ce18df..9fe8e7897a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 851d749b3ee..eea4430079d 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout the repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Link Checker id: lychee diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index b0965d61468..a11765d917c 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -114,7 +114,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install vcpkg libraries run: bash ci/install-dependencies-windows.sh diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index 7b80ae764bc..7dccdd49ae6 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Check PSL_strings.h run: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d9934d61536..2568a89e6df 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -68,7 +68,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install GMT dependencies run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d97aa6078bd..23ee97c9493 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 @@ -157,7 +157,7 @@ jobs: echo "${INSTALLDIR}/bin" >> $GITHUB_PATH - name: Checkout the gh-pages branch in a separate folder - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 with: ref: gh-pages # Checkout to this folder instead of the current one diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index b0a0cd511a9..908c88eab91 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml index fc4af3de3e6..a3de420b374 100644 --- a/.github/workflows/lint-checker.yml +++ b/.github/workflows/lint-checker.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Install cppcheck run: | diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index 2f0c0011a07..2c515fbd3d3 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index 1050fbe2068..a2b62723d6a 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Find and report known failures run: | diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml index 6dcea9e8c8d..c129f5765cd 100644 --- a/.github/workflows/scm-check.yml +++ b/.github/workflows/scm-check.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Check the latest release id: scm diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 63b27edb038..30d3028915a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) uses: dawidd6/action-download-artifact@v3.1.4 From a82b5b9756cb014321b05c4491f159815440f8bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:51:47 +0800 Subject: [PATCH 040/105] Bump lycheeverse/lychee-action from 1.9.3 to 1.10.0 (#8472) Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.9.3 to 1.10.0. - [Release notes](https://github.com/lycheeverse/lychee-action/releases) - [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.9.3...v1.10.0) --- updated-dependencies: - dependency-name: lycheeverse/lychee-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index eea4430079d..47bc140376b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -27,7 +27,7 @@ jobs: - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v1.9.3 + uses: lycheeverse/lychee-action@v1.10.0 with: # 429: Too many requests args: > From 65a209999f498a29cc4fd376b41140a07cc10b7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:52:03 +0800 Subject: [PATCH 041/105] Bump codecov/codecov-action from 4.2.0 to 4.3.1 (#8471) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.2.0...v4.3.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30d3028915a..4ded228160d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -192,7 +192,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.2.0 + uses: codecov/codecov-action@v4.3.1 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 4ef118ac9b9756fa9d2566d03cdfa32cf31d3b1f Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Wed, 1 May 2024 13:36:38 -0300 Subject: [PATCH 042/105] Upgrade anim01 (#8470) * Upgrade anim01 * update youtube link * Update description and link of the rst file * remove 'cat' from Unix progs --- doc/examples/anim01/anim01.sh | 22 +++++++++++----------- doc/rst/source/animations/anim01.rst | 12 +++++------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/doc/examples/anim01/anim01.sh b/doc/examples/anim01/anim01.sh index ae4a65e7e27..857161d5f6b 100755 --- a/doc/examples/anim01/anim01.sh +++ b/doc/examples/anim01/anim01.sh @@ -2,15 +2,14 @@ # GMT ANIMATION 01 # # Purpose: Make simple MP4 of sine function -# GMT modules: math, basemap, text, plot, movie -# Unix progs: echo, convert, cat +# GMT modules: math, basemap, text, plot, movie, event +# Unix progs: cat # # The finished movie is available in our YouTube channel as well: -# https://youtu.be/5m3gRhFFFLA +# https://youtu.be/NjSDpQ5S3FM # 1. Create files needed in the loop cat << 'EOF' > pre.sh -gmt math -T0/360/10 T SIND = sin_point.txt gmt math -T0/360/1 T SIND = sin_curve.txt gmt begin gmt basemap -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c \ @@ -20,14 +19,15 @@ EOF # 2. Set up the main frame script cat << 'EOF' > main.sh gmt begin + gmt basemap -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c -B+n # Plot smooth blue curve and dark red dots at all angle steps so far - last=$(gmt math -Q ${MOVIE_FRAME} 10 MUL =) - gmt convert sin_curve.txt -qi0:${last} | gmt plot -W1p,blue -R0/360/-1.2/1.6 -JX22c/11.5c -X1c -Y1c - gmt convert sin_point.txt -qi0:${MOVIE_FRAME} | gmt plot -Sc0.1i -Gdarkred -# Plot bright red dot at current angle and annotate - gmt plot -Sc0.1i -Gred <<< "${MOVIE_COL0} ${MOVIE_COL1}" - printf "0 1.6 a = %3.3d" ${MOVIE_COL0} | gmt text -F+f14p,Helvetica-Bold+jTL -N -Dj0.1i/0.05i + gmt events sin_curve.txt -i0,1,0 -T${MOVIE_FRAME} -Ar -Es -W1p,blue + gmt plot sin_curve.txt -Sc0.25c -Gdarkred -qi0:10:${MOVIE_FRAME} + +# Plot bright red dot at current angle + gmt events sin_curve.txt -T${MOVIE_FRAME} -Sc0.1i -Gred -i0,1,0 -L0 gmt end EOF # 3. Run the movie -gmt movie main.sh -Sbpre.sh -Chd -Tsin_point.txt -Vi -D5 -Zs -Nanim01 -Fmp4 +gmt movie main.sh -Sbpre.sh -Chd -Tsin_curve.txt -Vi -D50 -Zs -Nanim01 -Fmp4 \ + -Lf+t"a = %3.3d"+f14p,Helvetica-Bold+jTL+o1.25/1.15 \ No newline at end of file diff --git a/doc/rst/source/animations/anim01.rst b/doc/rst/source/animations/anim01.rst index 4c0d7c555a7..2eb6b5b57d1 100644 --- a/doc/rst/source/animations/anim01.rst +++ b/doc/rst/source/animations/anim01.rst @@ -4,12 +4,10 @@ ---------------------------------- Our first animation is not very ambitious: We wish to plot the sine -function from 0-360 and take snap shots every 10. To get a smooth curve -we must sample the function much more frequently; we settle on 10 times -more frequently than the frame spacing. We place a bright red circle at -the leading edge of the curve, and as we move forward in time (here, -angles) we dim the older circles to a dark red color. We add a label -that indicates the current angle value. Once the 36 frames are completed +function from 0-360 and take snap shots every 1.We place a bright red +circle at the leading edge of the curve, and as we move forward in time +(here, angles) we dim the older circles to a dark red color. We add a label +that indicates the current angle value. Once the 361 frames are completed we convert them to a single mp4 file. .. literalinclude:: /_verbatim/anim01.txt @@ -21,5 +19,5 @@ use for the map projection, the region, the spacing around the frame, etc. so that the final result gave a reasonable layout. Do this planning on a single PostScript plot before running a lengthy animation script. -.. youtube:: 5m3gRhFFFLA +.. youtube:: NjSDpQ5S3FM :width: 100% From 0655aae2697b1bdbf70f32eff02e0f3782c0009f Mon Sep 17 00:00:00 2001 From: andreas Date: Sun, 5 May 2024 00:00:42 +0200 Subject: [PATCH 043/105] gmt.conf.rst: link directly to data server mirrors list --- doc/rst/source/gmt.conf.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/gmt.conf.rst b/doc/rst/source/gmt.conf.rst index 0972dc26f24..83f40625857 100644 --- a/doc/rst/source/gmt.conf.rst +++ b/doc/rst/source/gmt.conf.rst @@ -367,7 +367,7 @@ GMT Miscellaneous Parameters **GMT_DATA_SERVER** Name (or URL) of a GMT data server [default is **oceania**]. Please set to the data server closest to your location for faster data download. See - `Data Server Mirrors `_ + `Data Server Mirrors `_ for a list of the currently available mirrors. **GMT_DATA_SERVER_LIMIT** From 8e3cd98c0ccca538611b67b09cdc32f66833c85e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 5 May 2024 21:04:56 +0800 Subject: [PATCH 044/105] CI: Pin to macOS 13 (#8469) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4ded228160d..aaec9104eb0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: - name: Linux os: ubuntu-latest - name: macOS - os: macos-latest + os: macos-13 # macos-14 use M1 chips, which causes many failures - name: Windows os: windows-latest From 06442fb349c8c9d6947aecc8ef4d1378b684f4c1 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Mon, 6 May 2024 15:19:45 +0100 Subject: [PATCH 045/105] Fix typo in dir sub-dir name. --- doc/rst/source/tutorial/julia/session-3.rst | 6 +++--- doc/rst/source/tutorial/julia/session-4.rst | 22 ++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/rst/source/tutorial/julia/session-3.rst b/doc/rst/source/tutorial/julia/session-3.rst index 0b859e65dc5..c4898899f1b 100644 --- a/doc/rst/source/tutorial/julia/session-3.rst +++ b/doc/rst/source/tutorial/julia/session-3.rst @@ -202,8 +202,8 @@ Preprocessing The :doc:`/surface` module assumes that the data have been preprocessed to eliminate aliasing, hence we must ensure that this step is completed prior to gridding. GMT comes with three preprocessors, called `blockmean `_, -`blockmedian `_, and -`blockmode `_. The first averages values inside the +`blockmedian `_, and +`blockmode `_. The first averages values inside the grid-spacing boxes, the second returns median values, wile the latter returns modal values. As a rule of thumb, we use means for most smooth data (such as potential fields) and medians (or modes) for rough, non-Gaussian data (such as topography). In addition to the required **region** and **inc** switches, these preprocessors all take @@ -223,7 +223,7 @@ The output data can now be used with surface:: G = surface(D, region=(245,255,20,30), inc="5m", verbose=true); -If you rerun `grdcontour `_ on the new grid file +If you rerun `grdcontour `_ on the new grid file (try it!) you will notice a big difference compared to the grid made by :doc:`/nearneighbor`: since surface is a global method it will evaluate the solution at all nodes, even if there are no data constraints. There are numerous options available to us at this point: diff --git a/doc/rst/source/tutorial/julia/session-4.rst b/doc/rst/source/tutorial/julia/session-4.rst index 97c2ee0dab1..7e5b595d154 100644 --- a/doc/rst/source/tutorial/julia/session-4.rst +++ b/doc/rst/source/tutorial/julia/session-4.rst @@ -19,13 +19,13 @@ CPTs can be created in any number of ways. GMT provides two mechanisms: #. Create simple, linear color tables given a master color table (several are built-in) and the desired *z*-values at color boundaries - (`makecpt `_) + (`makecpt `_) #. Create color tables based on a master CPT color table and the histogram-equalized distribution of *z*-values - in a gridded data file (`grd2cpt `_) + in a gridded data file (`grd2cpt `_) One can also make these files manually. Here we will limit our discussion to -`makecpt `_. +`makecpt `_. Its main argument is the name of the master color table (a list is shown if you run the module with no arguments) and the equidistant *z*-values to go with it. The main options are given below. @@ -47,12 +47,12 @@ from -20 to 60, with color changes at every 10, try these two variants: makecpt(cmap=:rainbow, range=(-20,60,10), write="disc.cpt") makecpt(cmap=:rainbow, range=(-20,60,10), continuous=true, write="cont.cpt") -We can plot these color tables with `colorbar `_; +We can plot these color tables with `colorbar `_; the options worth mentioning here are listed below. The placement of the color bar is particularly important and we refer you to the :ref:`Plot embellishments ` section for all the details. In addition, the **frame** option can be used to set the title and unit label (and optionally to set the annotation-, tick-, and grid-line intervals for the color bars.). Note that the makecpt commands above are done in classic mode. -If you run `makecpt `_ in modern mode then you usually +If you run `makecpt `_ in modern mode then you usually do not specify an output file via standard output since modern mode maintains what is known as the current CPT. However, if you must explicitly name an output CPT then you will need to add the -H option for modern mode to allow output to standard output. @@ -90,7 +90,7 @@ Your plot should look like :ref:`our example 14 below ` Exercises: -#. Redo the `makecpt `_ exercise using the +#. Redo the `makecpt `_ exercise using the master table *hot* and redo the bar plot. #. Try specifying **frame**\ =(annot=10, grid=5). @@ -140,7 +140,7 @@ Here, we will extract a subset of the global 30" DEM called SRTM30+: Using :doc:`/grdinfo` we find that the data ranges from about 1000m to about 4300m so we need to make a CPT with that range. -Color images are made with `grdimage `_ +Color images are made with `grdimage `_ which takes the usual common command options (by default the **region** is taken from the data set) and a CPT; the main other options are: @@ -173,7 +173,7 @@ Your plot should look like :ref:`our example 15 below ` The plain color map lacks detail and fails to reveal the topographic complexity of this Rocky Mountain region. What it needs is artificial illumination. We want to simulate shading by a sun source in the east, hence we derive the required intensities from the gradients of the topography in the N90°E direction using -`grdgradient `_. +`grdgradient `_. Other than the required input and output filenames, the available options are +----------------------------------------------+-----------------------------------------------------------------------------+ @@ -239,7 +239,7 @@ Exercises: #. Force a gray-shade image. -#. Rerun `grdgradient `_ with **norm**\ =1. +#. Rerun `grdgradient `_ with **norm**\ =1. Multi-dimensional maps ---------------------- @@ -297,7 +297,7 @@ Perspective views ----------------- Our final undertaking in this tutorial is to examine three-dimensional perspective views. The GMT module that -produces perspective views of gridded data files is `grdview `_. +produces perspective views of gridded data files is `grdview `_. It can make two kinds of plots: #. Mesh or wire-frame plot (with or without superimposed contours) @@ -384,7 +384,7 @@ Exercises: #. Choose another vantage point and scaling. -#. Redo `grdgradient `_ with another illumination +#. Redo `grdgradient `_ with another illumination direction and plot again. #. Select a higher *dpi*, e.g., 200. From 0eb4197975be9daab70e588ee9b04a3eb35db94e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 6 May 2024 23:51:45 +0800 Subject: [PATCH 046/105] CI: Use 'gh run download' to download GMT caches (#8450) --- .github/workflows/build.yml | 21 ++++++--------------- .github/workflows/docs.yml | 21 ++++++--------------- .github/workflows/tests.yml | 21 ++++++--------------- 3 files changed, 18 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe8e7897a9..6aee280b505 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,12 +66,10 @@ jobs: uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: vcpkg-cache - path: C:\vcpkg\installed\ + run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ if: runner.os == 'Windows' + env: + GH_TOKEN: ${{ github.token }} - name: Setup conda uses: conda-incubator/setup-miniconda@v3 @@ -124,18 +122,11 @@ jobs: if: runner.os == 'Windows' - name: Download cached GMT remote data from GitHub Artifacts - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: gmt-cache - path: gmt-cache - - # Move downloaded files to ~/.gmt directory and list them - - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt/static/ - mv gmt-cache/* ~/.gmt/static/ + gh run download -n gmt-cache -D ~/.gmt/static/ ls -lRh ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} - name: Install GMT run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23ee97c9493..e07da6a3fa1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -60,12 +60,10 @@ jobs: uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: vcpkg-cache - path: C:\vcpkg\installed\ + run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ if: runner.os == 'Windows' + env: + GH_TOKEN: ${{ github.token }} - name: Setup conda uses: conda-incubator/setup-miniconda@v3 @@ -120,18 +118,11 @@ jobs: if: runner.os == 'Windows' - name: Download cached GMT remote data from GitHub Artifacts - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: gmt-cache - path: gmt-cache - - # Move downloaded files to ~/.gmt directory and list them - - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt/static/ - mv gmt-cache/* ~/.gmt/static/ + gh run download -n gmt-cache -D ~/.gmt/static/ ls -lRh ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} - name: Build documentation run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaec9104eb0..64d4b1e21c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,12 +63,10 @@ jobs: uses: actions/checkout@v4.1.4 - name: Setup vcpkg (Windows) - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: vcpkg-cache - path: C:\vcpkg\installed\ + run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ if: runner.os == 'Windows' + env: + GH_TOKEN: ${{ github.token }} - name: Setup conda uses: conda-incubator/setup-miniconda@v3 @@ -130,18 +128,11 @@ jobs: if: runner.os == 'Windows' - name: Download cached GMT remote data from GitHub Artifacts - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: gmt-cache - path: gmt-cache - - # Move downloaded files to ~/.gmt directory and list them - - name: Move and list downloaded remote files run: | - mkdir -p ~/.gmt/static/ - mv gmt-cache/* ~/.gmt/static/ + gh run download -n gmt-cache -D ~/.gmt/static/ ls -lRh ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote From 87042537f4d190e8e80487c04aeb7b84c341c433 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Tue, 7 May 2024 00:40:33 +0100 Subject: [PATCH 047/105] These must be a bug that had not been found yet. (#8477) --- src/gmt_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index a5226ec184d..7a852c0f602 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -1257,13 +1257,13 @@ GMT_LOCAL int gmtinit_parse_h_option (struct GMT_CTRL *GMT, char *item) { } if (item[0] == 'i') {/* Apply to input only */ col = GMT_IN; - strncpy (GMT->common.g.string, item, GMT_LEN64-1); /* Verbatim copy */ + strncpy (GMT->common.h.string, item, GMT_LEN256-1); /* Verbatim copy */ } else if (item[0] == 'o') /* Apply to output only */ col = GMT_OUT; else { /* Apply to both input and output columns */ k = 0; - strncpy (GMT->common.g.string, item, GMT_LEN64-1); /* Verbatim copy */ + strncpy (GMT->common.h.string, item, GMT_LEN256-1); /* Verbatim copy */ } if ((c = strchr (item, '+'))) /* Found modifiers */ c[0] = '\0'; /* Truncate modifiers for now */ From 9d48c37ef02882fd8f97673f4da35250f8c6c05f Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 7 May 2024 08:43:29 +0800 Subject: [PATCH 048/105] CI: Update the docker workflow. Now testing Ubuntu 24.04 and Fedora 40 (#8479) --- .github/workflows/docker.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2568a89e6df..dc742e0d8b2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,14 +56,14 @@ jobs: # Ubuntu: https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions - ubuntu:20.04 # CMake 3.16.3 + GNU 9.3.0; EOL: 2025-05-29 - ubuntu:22.04 # CMake 3.22.1 + GNU 11.2.0; EOL: 2027-06-01 - - ubuntu:23.10 # CMake 3.27.4 + GNU 11.2.0; EOL: 2024-07-01 + - ubuntu:24.04 # CMake 3.28.3 + GNU 13.2.0; EOL: 2029-05-31 # Debian: https://en.wikipedia.org/wiki/Debian_version_history#Release_table - debian:11 # CMake 3.18.4 + GNU 10.2.1; EOL: 2026-06-01 - debian:12 # CMake 3.25.1 + GNU 12.2.0; EOL: 2028-06-01 - debian:sid # rolling release with latest versions # Fedora: https://en.wikipedia.org/wiki/Fedora_Linux_release_history - - fedora:38 # CMake 3.26.2 + GNU 13.0.1; EOL: 2024-05-14 - fedora:39 # CMake 3.27.7 + GNU 13.2.1; EOL: 2024-11-12 + - fedora:40 # CMake 3.28.2 + GNU 14.0.1; EOL: 2025-05-13 - fedora:rawhide # rolling release with latest versions steps: @@ -77,16 +77,18 @@ jobs: apt-get update DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y tzdata apt-get install -y --no-install-recommends --no-install-suggests \ - build-essential cmake ninja-build libcurl4-gnutls-dev libnetcdf-dev \ - ghostscript curl git \ - libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libglib2.0-dev + build-essential cmake ninja-build \ + libcurl4-gnutls-dev libnetcdf-dev libgdal-dev \ + libfftw3-dev libpcre3-dev liblapack-dev libglib2.0-dev \ + ghostscript curl git apt reinstall -y ca-certificates update-ca-certificates elif [[ "$os" = "fedora" ]]; then - dnf install -y cmake libcurl-devel netcdf-devel gdal-devel \ - ninja-build gdal pcre-devel fftw3-devel lapack-devel \ - openblas-devel glib2-devel ghostscript \ - openssl + dnf install -y \ + cmake ninja-build \ + libcurl-devel netcdf-devel gdal-devel gdal \ + fftw3-devel pcre-devel lapack-devel openblas-devel glib2-devel \ + ghostscript openssl fi - name: Cache GSHHG and DCW data From 395cfba24a52b98ddbf10ab07c7bfa9663ec4c85 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Tue, 7 May 2024 11:45:05 +0100 Subject: [PATCH 049/105] Always store the headers of ASCII files when "externals". (#8478) * Always store the headers of ASCII files when "externals". Also, always strip the \r\n in headers and initilaize the status variable otherwise reading would fail in debug mode if -h was not used. * Slight change of mind. Only store all headers if -h is set. --- src/gmt_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gmt_io.c b/src/gmt_io.c index aa3ae486472..2d2b5e8512d 100644 --- a/src/gmt_io.c +++ b/src/gmt_io.c @@ -3687,6 +3687,7 @@ GMT_LOCAL void *gmtio_ascii_input (struct GMT_CTRL *GMT, FILE *fp, uint64_t *n, if (GMT->current.setting.io_header[GMT_IN] && GMT->current.io.rec_in_tbl_no <= GMT->current.setting.io_n_header_items) { /* Must treat first io_n_header_items as headers */ gmt_fgets (GMT, line, GMT_BUFSIZ, fp); /* Get the line */ if (GMT->common.h.mode == GMT_COMMENT_IS_RESET) continue; /* Simplest way to replace headers on output is to ignore them on input */ + gmt_strstrip (line, false); /* Eliminate DOS endings and trailing white space, add linefeed */ gmtio_set_current_record (GMT, line); GMT->current.io.status = GMT_IO_TABLE_HEADER; #if 0 @@ -3781,6 +3782,7 @@ GMT_LOCAL void *gmtio_ascii_input (struct GMT_CTRL *GMT, FILE *fp, uint64_t *n, unsigned int type; if ((type = gmtio_examine_current_record (GMT, line, &start_of_text, &n_cols_this_record)) == GMT_NOT_OUTPUT_OBJECT) { GMT->current.io.status = GMT_IO_TABLE_HEADER; + if (GMT->current.setting.io_header[GMT_IN] && GMT->parent->external) gmtio_set_current_record(GMT, line); /* Useful in Julia to find the column names. */ return NULL; } else @@ -8164,7 +8166,7 @@ struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, un bool ASCII, close_file = false, header = true, no_segments, first_seg = true, poly, this_is_poly = false; bool pol_check, check_geometry; - int status; + int status = 0; uint64_t n_expected_fields, n_returned = 0; uint64_t n_read = 0, row = 0, seg = 0, col, n_poly_seg = 0, k; size_t n_head_alloc = GMT_TINY_CHUNK; From 0e38ab56dcfe595f125fcde0a1870aebd2b58435 Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Tue, 7 May 2024 09:35:26 -0300 Subject: [PATCH 050/105] SCM. remove workflow and update checklist (#8480) * remove workflow and update checklist * Update .github/ISSUE_TEMPLATE/release_checklist.md Co-authored-by: Dongdong Tian --------- Co-authored-by: Dongdong Tian --- .github/ISSUE_TEMPLATE/release_checklist.md | 1 + .github/workflows/scm-check.yml | 75 --------------------- 2 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 .github/workflows/scm-check.yml diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index 4b7e0404829..a40b218856a 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -13,6 +13,7 @@ assignees: '' **Before release**: +- [ ] check if there are new [SCM releases](https://doi.org/10.5281/zenodo.1243862) - [ ] check if all tests pass on macOS, Linux and Windows - [ ] check if other GMT-derived projects work well - [ ] MB-System (@PaulWessel) diff --git a/.github/workflows/scm-check.yml b/.github/workflows/scm-check.yml deleted file mode 100644 index c129f5765cd..00000000000 --- a/.github/workflows/scm-check.yml +++ /dev/null @@ -1,75 +0,0 @@ -# -# This workflow checks if Scientific Colour Maps has a new release. -# If a new release is found, it will open an issue automatically. -# -# https://www.fabiocrameri.ch/colourmaps.php -# -name: SCM Check -on: - # uncomment the 'pull_request' line to test the workflow in PRs - # pull_request: - workflow_dispatch: - schedule: - # weekly cron job - - cron: '0 0 * * 0' - -jobs: - scm-check: - name: SCM Check - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4.1.4 - - - name: Check the latest release - id: scm - run: | - scm_version_in_gmt=8.0.0 - - # Get version string and date from Zenodo API - # https://doi.org/10.5281/zenodo.1243862 - scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g') - scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g') - echo "SCM version ${scm_version} (${scm_version_date})" - - # Set output of the current step - echo "scm_version=${scm_version}" >> $GITHUB_OUTPUT - echo "scm_version_date=${scm_version_date}" >> $GITHUB_OUTPUT - if [ "${scm_version}" != ${scm_version_in_gmt} ]; then - echo "The latest SCM version (${scm_version}) is different from the one in GMT (${scm_version_in_gmt})!" - echo "error_code=2" >> $GITHUB_OUTPUT - fi - - - name: Create an update request - if: ${{ steps.scm.outputs.error_code == 2 }} - run: | - title="New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found" - cat > report.md << 'EOF' - A new Scientific Colour Maps release was found. - - - website: https://www.fabiocrameri.ch/colourmaps.php - - version: ${{ steps.scm.outputs.scm_version }} - - date: ${{ steps.scm.outputs.scm_version_date }} - - Todo list: - - - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862 - to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7). - - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs. - - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/` - - [ ] Make sure to update the following files: - - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml` - - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added) - - [ ] Counts of colour maps in `doc/rst/source/reference/cpts.rst` (only if new colour maps were added) - - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added) - - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s) - - [ ] Commit all changes and open a PR - - **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the - `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again. - EOF - - gh issue create --title "${title}" --body-file report.md - env: - GH_TOKEN: ${{ github.token }} From a6546deb0a3e645ff2875ca622378a08c42afc11 Mon Sep 17 00:00:00 2001 From: Max Jones <14077947+maxrjones@users.noreply.github.com> Date: Wed, 8 May 2024 13:12:28 -0400 Subject: [PATCH 051/105] Update CITATION.cff --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index a4c0df1d560..fb718cd970b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -24,7 +24,7 @@ authors: given-names: "Dongdong" orcid: "https://orcid.org/0000-0001-7967-1197" - family-names: "Jones" - given-names: "Meghan" + given-names: "Max" orcid: "https://orcid.org/0000-0003-0180-8928" - family-names: "Esteban" given-names: "Federico" From b431d419852ee7cbdf430258740c552cb8c77d98 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 12 May 2024 19:58:08 +0800 Subject: [PATCH 052/105] CI: Bump to Ghostscript 10.03.0 (#8482) --- .github/workflows/tests.yml | 2 -- ci/install-dependencies-linux.sh | 2 +- ci/install-dependencies-macos.sh | 2 +- ci/install-dependencies-windows.sh | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64d4b1e21c8..7e003d470c5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -134,7 +134,6 @@ jobs: env: GH_TOKEN: ${{ github.token }} - # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote run: dvc pull @@ -153,7 +152,6 @@ jobs: run: call ci/simple-gmt-tests.bat if: runner.os == 'Windows' - # Run full tests and rerun failed tests - name: Run full tests run: | set -x -e diff --git a/ci/install-dependencies-linux.sh b/ci/install-dependencies-linux.sh index 00e0105803c..666af4999c5 100755 --- a/ci/install-dependencies-linux.sh +++ b/ci/install-dependencies-linux.sh @@ -18,7 +18,7 @@ EXCLUDE_OPTIONAL=${EXCLUDE_OPTIONAL:-false} # packages installed via apt-get packages="build-essential cmake ninja-build libcurl4-gnutls-dev libnetcdf-dev curl git libgdal-dev" # packages installed via conda -conda_packages="ghostscript=10.02.1" +conda_packages="ghostscript=10.03.0" # optional packages if [ "$EXCLUDE_OPTIONAL" = "false" ]; then diff --git a/ci/install-dependencies-macos.sh b/ci/install-dependencies-macos.sh index cdaf3bb4666..e6e51ba694e 100755 --- a/ci/install-dependencies-macos.sh +++ b/ci/install-dependencies-macos.sh @@ -18,7 +18,7 @@ PACKAGE="${PACKAGE:-false}" # packages for compiling GMT # cmake is pre-installed on GitHub Actions packages="ninja curl pcre2 netcdf gdal geos fftw libomp" -conda_packages="ghostscript=10.02.1" +conda_packages="ghostscript=10.03.0" # packages for build documentation if [ "$BUILD_DOCS" = "true" ]; then diff --git a/ci/install-dependencies-windows.sh b/ci/install-dependencies-windows.sh index bece6bdec59..a61dfeb627c 100755 --- a/ci/install-dependencies-windows.sh +++ b/ci/install-dependencies-windows.sh @@ -28,7 +28,7 @@ echo "${VCPKG_INSTALLATION_ROOT}/installed/${WIN_PLATFORM}/tools/gdal" >> $GITHU # list installed packages vcpkg list -conda_packages="ninja ghostscript=10.02.1" +conda_packages="ninja ghostscript=10.03.0" if [ "$BUILD_DOCS" = "true" ]; then conda_packages+=" sphinx dvc" # choco install pngquant From 5e15c42ff656494ca2d7de66e162afb5a4e84217 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 12 May 2024 19:58:22 +0800 Subject: [PATCH 053/105] doc: Fix links to sessions in the sidebar (#8483) --- doc/rst/source/tutorial/bash/index.rst | 1 - doc/rst/source/tutorial/julia/index.rst | 1 - 2 files changed, 2 deletions(-) diff --git a/doc/rst/source/tutorial/bash/index.rst b/doc/rst/source/tutorial/bash/index.rst index 2ed9d97e7a4..e38191d3993 100644 --- a/doc/rst/source/tutorial/bash/index.rst +++ b/doc/rst/source/tutorial/bash/index.rst @@ -40,7 +40,6 @@ after completion of this short tutorial. .. toctree:: :maxdepth: 1 - :hidden: intro session-1 diff --git a/doc/rst/source/tutorial/julia/index.rst b/doc/rst/source/tutorial/julia/index.rst index 66b1441a2d6..0c7738f29a9 100644 --- a/doc/rst/source/tutorial/julia/index.rst +++ b/doc/rst/source/tutorial/julia/index.rst @@ -27,7 +27,6 @@ will take long time to see a Julia version of it. .. toctree:: :maxdepth: 1 - :hidden: intro session-1 From cb23e000cf6fee2c6a09874c6f87d7ee0cfb9f04 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 13 May 2024 07:17:37 +0800 Subject: [PATCH 054/105] doc: Redesign the gallery pages (#8484) --- doc/rst/_static/style.css | 16 -- doc/rst/source/animations.rst | 139 ++++++---- doc/rst/source/gallery.rst | 26 +- doc/rst/source/users-contrib-symbols.rst | 309 ++++++++++++----------- 4 files changed, 262 insertions(+), 228 deletions(-) diff --git a/doc/rst/_static/style.css b/doc/rst/_static/style.css index 31ba46a9ca1..8e300c371cc 100644 --- a/doc/rst/_static/style.css +++ b/doc/rst/_static/style.css @@ -18,22 +18,6 @@ h1, h2, h3, h4, h5, h6 { font-weight: "normal" } -/* style for example gallery */ -.gmtgallery li { - list-style: none; - width: 180px; - display: inline-grid; - margin-right: 15px; -} - -/* style for gmt movies */ -.gmtmovie li { - list-style: none; - width: 45%; - display: inline-grid; - margin: 10px; -} - /* Set tab-width to 2 spaces */ .highlight { tab-size: 2; diff --git a/doc/rst/source/animations.rst b/doc/rst/source/animations.rst index 4f3e344cbac..f1830fa487d 100644 --- a/doc/rst/source/animations.rst +++ b/doc/rst/source/animations.rst @@ -19,84 +19,127 @@ are more advanced movie examples. You can generate anything from tiny animated gif files for your PowerPoint or KeyNote presentations or a full-featured movie with thousands of frames at HD or 4k resolution. -.. cssclass:: gmtgallery +.. grid:: 1 1 1 2 -.. cssclass:: gmtmovie + .. grid-item-card:: :doc:`/animations/anim01` + :padding: 1 + :link-type: doc + :link: animations/anim01 -- .. youtube:: 5m3gRhFFFLA - :width: 100% + .. youtube:: 5m3gRhFFFLA + :width: 100% - :doc:`/animations/anim01` + .. grid-item-card:: :doc:`/animations/anim02` + :padding: 1 + :link-type: doc + :link: animations/anim02 -- .. youtube:: WQ6JrtEu_Fk - :width: 100% + .. youtube:: WQ6JrtEu_Fk + :width: 100% - :doc:`/animations/anim02` + .. grid-item-card:: :doc:`/animations/anim03` + :padding: 1 + :link-type: doc + :link: animations/anim03 -- .. youtube:: zCo0fuMkvMY - :width: 100% + .. youtube:: zCo0fuMkvMY + :width: 100% - :doc:`/animations/anim03` + .. grid-item-card:: :doc:`/animations/anim04` + :padding: 1 + :link-type: doc + :link: animations/anim04 -- .. youtube:: j75MbWb4WCE - :width: 100% + .. youtube:: j75MbWb4WCE + :width: 100% - :doc:`/animations/anim04` + .. grid-item-card:: :doc:`/animations/anim05` + :padding: 1 + :link-type: doc + :link: animations/anim05 -- .. youtube:: 7NQa4TORA3E - :width: 100% + .. youtube:: 7NQa4TORA3E + :width: 100% - :doc:`/animations/anim05` + .. grid-item-card:: :doc:`/animations/anim06` + :padding: 1 + :link-type: doc + :link: animations/anim06 -- .. youtube:: 3vB53hoLsls - :width: 100% + .. youtube:: 3vB53hoLsls + :width: 100% - :doc:`/animations/anim06` + .. grid-item-card:: :doc:`/animations/anim07` + :padding: 1 + :link-type: doc + :link: animations/anim07 -- .. youtube:: KfBwQlyjz5w - :width: 100% + .. youtube:: KfBwQlyjz5w + :width: 100% - :doc:`/animations/anim07` + .. grid-item-card:: :doc:`/animations/anim08` + :padding: 1 + :link-type: doc + :link: animations/anim08 -- .. youtube:: H0RyjHRhJ3g - :width: 100% + .. youtube:: H0RyjHRhJ3g + :width: 100% - :doc:`/animations/anim08` + .. grid-item-card:: :doc:`/animations/anim09` + :padding: 1 + :link-type: doc + :link: animations/anim09 -- .. youtube:: LTxlR5LuJ8g - :width: 100% + .. youtube:: LTxlR5LuJ8g + :width: 100% - :doc:`/animations/anim09` + .. grid-item-card:: :doc:`/animations/anim10` + :padding: 1 + :link-type: doc + :link: animations/anim10 -- .. youtube:: FLzYVo7wXAg - :width: 100% + .. youtube:: FLzYVo7wXAg + :width: 100% - :doc:`/animations/anim10` + .. grid-item-card:: :doc:`/animations/anim11` + :padding: 1 + :link-type: doc + :link: animations/anim11 -- .. youtube:: nmxy9yb2cR8 - :width: 100% + .. youtube:: nmxy9yb2cR8 + :width: 100% - :doc:`/animations/anim11` + .. grid-item-card:: :doc:`/animations/anim12` + :padding: 1 + :link-type: doc + :link: animations/anim12 -- .. youtube:: X8TojLs0NYk - :width: 100% + .. youtube:: X8TojLs0NYk + :width: 100% - :doc:`/animations/anim12` + .. grid-item-card:: :doc:`/animations/anim13` + :padding: 1 + :link-type: doc + :link: animations/anim13 -- .. youtube:: S-kRGxwOGJw - :width: 100% + .. youtube:: S-kRGxwOGJw + :width: 100% - :doc:`/animations/anim13` + .. grid-item-card:: :doc:`/animations/anim14` + :padding: 1 + :link-type: doc + :link: animations/anim14 -- .. youtube:: Wk58r72g_nk - :width: 100% + .. youtube:: Wk58r72g_nk + :width: 100% - :doc:`/animations/anim14` + .. grid-item-card:: :doc:`/animations/anim15` + :padding: 1 + :link-type: doc + :link: animations/anim15 -- .. youtube:: Pvvc4vb8G4Y - :width: 100% - - :doc:`/animations/anim15` + .. youtube:: Pvvc4vb8G4Y + :width: 100% .. toctree:: :hidden: diff --git a/doc/rst/source/gallery.rst b/doc/rst/source/gallery.rst index 96e021ac40f..fb45e9338c8 100644 --- a/doc/rst/source/gallery.rst +++ b/doc/rst/source/gallery.rst @@ -12,22 +12,26 @@ diagram or map view. The resulting plots will have in common that they are all made up of simpler plots that have been overlaid to create a complex illustration. -.. cssclass:: gmtgallery +.. grid:: 2 3 3 4 -.. jinja:: jinja_ctx + .. jinja:: - {% for i in range(1, 53) %} - {% set i = '%02d' % i %} - - .. figure:: /_images/ex{{i}}.* - :target: ./gallery/ex{{i}}.html + {% for i in range(1, 53) %} + {% set i = '%02d' % i %} + .. grid-item-card:: :doc:`gallery/ex{{i}}` + :padding: 1 + :link-type: doc + :link: gallery/ex{{i}} - :ref:`example_{{i}}` - {% endfor %} + .. figure:: /_images/ex{{i}}.* + {% endfor %} - - .. figure:: https://user-images.githubusercontent.com/14077947/123172626-62ca6880-d44b-11eb-8d91-21e448930460.png - :target: ./gallery/ex53.html + .. grid-item-card:: :ref:`example_53` + :padding: 1 + :link-type: doc + :link: gallery/ex53 - :ref:`example_53` + .. figure:: https://user-images.githubusercontent.com/14077947/123172626-62ca6880-d44b-11eb-8d91-21e448930460.png .. toctree:: :hidden: diff --git a/doc/rst/source/users-contrib-symbols.rst b/doc/rst/source/users-contrib-symbols.rst index 1b3b4ba9258..0c037b46698 100644 --- a/doc/rst/source/users-contrib-symbols.rst +++ b/doc/rst/source/users-contrib-symbols.rst @@ -15,110 +15,111 @@ These are symbols used to illustrate sightings of whales. users-contrib-symbols/biology/Cetacea.rst -.. cssclass:: gmtgallery - -.. jinja:: - - {% set symbols=[ - "atlantwhitesided", - "atlantwhitesided_high", - "atlantwhitesided_low", - "beluga", - "beluga_high", - "beluga_low", - "bottlenose", - "bottlenose_high", - "bottlenose_low", - "bowhead", - "bowhead_high", - "bowhead_low", - "burmeistersporpoise", - "burmeistersporpoise_high", - "burmeistersporpoise_low", - "commondolphin", - "commondolphin_high", - "commondolphin_low", - "commondolphin_midhigh", - "commondolphin_midlow", - "commonporpoise", - "commonporpoise_high", - "commonporpoise_low", - "cuviersbeaked", - "cuviersbeaked_high", - "cuviersbeaked_low", - "finwhale", - "finwhale_high", - "finwhale_low", - "graywhale", - "graywhale_high", - "graywhale_low", - "humpbacktail_one", - "humpbacktail_one_low", - "humpbacktail_two", - "humpbacktail_two_low", - "jumpback", - "jumpback_high", - "jumpback_low", - "killerwhale", - "killerwhale_high", - "killerwhale_low", - "longfinnedpilotwhale", - "longfinnedpilotwhale_high", - "longfinnedpilotwhale_low", - "minkewhale", - "minkewhale_high", - "minkewhale_low", - "northernrightwhale", - "northernrightwhale_high", - "northernrightwhale_low", - "pigmyspermwhale", - "pigmyspermwhale_high", - "pigmyspermwhale_low", - "rissosdolphin", - "rissosdolphin_high", - "rissosdolphin_low", - "seiwhale", - "seiwhale_high", - "seiwhale_low", - "shortfinnedpilotwhale", - "shortfinnedpilotwhale_high", - "shortfinnedpilotwhale_low", - "southernrightwhale", - "southernrightwhale_high", - "southernrightwhale_low", - "spectacledporpoise", - "spectacledporpoise_high", - "spectacledporpoise_low", - "spermwhale", - "spermwhale_high", - "spermwhale_low", - "spermwhaletail", - "spermwhaletail_high", - "spermwhaletail_low", - "srightwhaledolphin", - "srightwhaledolphin_high", - "srightwhaledolphin_low", - "stripeddolphin", - "stripeddolphin_high", - "stripeddolphin_low", - "unidentifiedbeakedwhale", - "unidentifiedbeakedwhale_high", - "unidentifiedbeakedwhale_low", - "unidentifieddolphin", - "unidentifieddolphin_high", - "unidentifieddolphin_low", - "unidentifiedwhale", - "unidentifiedwhale_high", - "unidentifiedwhale_low" - ] - %} - {% for i in symbols %} - - .. figure:: /users-contrib-symbols/biology/images/{{i}}.* - :target: ./users-contrib-symbols/biology/{{i}}.html - - :ref:`{{i}}` - - {% endfor %} +.. grid:: 1 2 3 4 + + .. jinja:: + + {% set symbols=[ + "atlantwhitesided", + "atlantwhitesided_high", + "atlantwhitesided_low", + "beluga", + "beluga_high", + "beluga_low", + "bottlenose", + "bottlenose_high", + "bottlenose_low", + "bowhead", + "bowhead_high", + "bowhead_low", + "burmeistersporpoise", + "burmeistersporpoise_high", + "burmeistersporpoise_low", + "commondolphin", + "commondolphin_high", + "commondolphin_low", + "commondolphin_midhigh", + "commondolphin_midlow", + "commonporpoise", + "commonporpoise_high", + "commonporpoise_low", + "cuviersbeaked", + "cuviersbeaked_high", + "cuviersbeaked_low", + "finwhale", + "finwhale_high", + "finwhale_low", + "graywhale", + "graywhale_high", + "graywhale_low", + "humpbacktail_one", + "humpbacktail_one_low", + "humpbacktail_two", + "humpbacktail_two_low", + "jumpback", + "jumpback_high", + "jumpback_low", + "killerwhale", + "killerwhale_high", + "killerwhale_low", + "longfinnedpilotwhale", + "longfinnedpilotwhale_high", + "longfinnedpilotwhale_low", + "minkewhale", + "minkewhale_high", + "minkewhale_low", + "northernrightwhale", + "northernrightwhale_high", + "northernrightwhale_low", + "pigmyspermwhale", + "pigmyspermwhale_high", + "pigmyspermwhale_low", + "rissosdolphin", + "rissosdolphin_high", + "rissosdolphin_low", + "seiwhale", + "seiwhale_high", + "seiwhale_low", + "shortfinnedpilotwhale", + "shortfinnedpilotwhale_high", + "shortfinnedpilotwhale_low", + "southernrightwhale", + "southernrightwhale_high", + "southernrightwhale_low", + "spectacledporpoise", + "spectacledporpoise_high", + "spectacledporpoise_low", + "spermwhale", + "spermwhale_high", + "spermwhale_low", + "spermwhaletail", + "spermwhaletail_high", + "spermwhaletail_low", + "srightwhaledolphin", + "srightwhaledolphin_high", + "srightwhaledolphin_low", + "stripeddolphin", + "stripeddolphin_high", + "stripeddolphin_low", + "unidentifiedbeakedwhale", + "unidentifiedbeakedwhale_high", + "unidentifiedbeakedwhale_low", + "unidentifieddolphin", + "unidentifieddolphin_high", + "unidentifieddolphin_low", + "unidentifiedwhale", + "unidentifiedwhale_high", + "unidentifiedwhale_low" + ] + %} + {% for i in symbols %} + .. grid-item-card:: :doc:`users-contrib-symbols/biology/{{i}}` + :padding: 1 + :link-type: doc + :link: users-contrib-symbols/biology/{{i}} + + .. figure:: /users-contrib-symbols/biology/images/{{i}}.* + {% endfor %} .. toctree:: :hidden: @@ -136,45 +137,46 @@ Structural geology symbols These are symbols used in structural geology. -.. cssclass:: gmtgallery - -.. jinja:: - - {% set symbols=[ - "geo-cleavage", - "geo-cleavage_hor", - "geo-cleavage_vert", - "geo-foliation-2", - "geo-foliation-3", - "geo-foliation", - "geo-foliation_hor", - "geo-foliation_vert", - "geo-joint", - "geo-joint_hor", - "geo-joint_vert", - "geo-lineation-2", - "geo-lineation-3", - "geo-lineation", - "geo-lineation_hor", - "geo-lineation_vert", - "geo-plane", - "geo-plane_gentle", - "geo-plane_hor", - "geo-plane_inv", - "geo-plane_medium", - "geo-plane_rake", - "geo-plane_steep", - "geo-plane_und", - "geo-plane_vert" - ] - %} - {% for i in symbols %} - - .. figure:: /users-contrib-symbols/geology/images/{{i}}.* - :target: ./users-contrib-symbols/geology/{{i}}.html - - :ref:`{{i}}` - - {% endfor %} +.. grid:: 1 2 3 4 + + .. jinja:: + + {% set symbols=[ + "geo-cleavage", + "geo-cleavage_hor", + "geo-cleavage_vert", + "geo-foliation-2", + "geo-foliation-3", + "geo-foliation", + "geo-foliation_hor", + "geo-foliation_vert", + "geo-joint", + "geo-joint_hor", + "geo-joint_vert", + "geo-lineation-2", + "geo-lineation-3", + "geo-lineation", + "geo-lineation_hor", + "geo-lineation_vert", + "geo-plane", + "geo-plane_gentle", + "geo-plane_hor", + "geo-plane_inv", + "geo-plane_medium", + "geo-plane_rake", + "geo-plane_steep", + "geo-plane_und", + "geo-plane_vert" + ] + %} + {% for i in symbols %} + .. grid-item-card:: :doc:`users-contrib-symbols/geology/{{i}}` + :padding: 1 + :link-type: doc + :link: users-contrib-symbols/geology/{{i}} + + .. figure:: /users-contrib-symbols/geology/images/{{i}}.* + {% endfor %} .. toctree:: :hidden: @@ -187,18 +189,19 @@ Miscellaneous symbols These are general-purpose symbols you may find useful. -.. cssclass:: gmtgallery +.. grid:: 1 2 3 4 -.. jinja:: + .. jinja:: - {% set symbols=['pirata'] %} - {% for i in symbols %} - - .. figure:: /users-contrib-symbols/misc/images/{{i}}.* - :target: ./users-contrib-symbols/misc/{{i}}.html - - :ref:`{{i}}` - - {% endfor %} + {% set symbols=['pirata'] %} + {% for i in symbols %} + .. grid-item-card:: :doc:`users-contrib-symbols/misc/{{i}}` + :padding: 1 + :link-type: doc + :link: users-contrib-symbols/misc/{{i}} + + .. figure:: /users-contrib-symbols/misc/images/{{i}}.* + {% endfor %} .. toctree:: :hidden: From d25a9c4d16950ae4fcd4aa7b8262ea5b5b0d385b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 13 May 2024 19:51:12 +0800 Subject: [PATCH 055/105] Remove --GMT_THEME=cookbook from examples included in the docs (#8485) --- doc/scripts/GMT_-B_radians.sh | 2 +- doc/scripts/GMT_-B_slanted.sh | 2 +- doc/scripts/GMT_-U.sh | 2 +- doc/scripts/GMT_TM.sh | 2 +- doc/scripts/GMT_az_equidistant.sh | 2 +- doc/scripts/GMT_cassini.sh | 2 +- doc/scripts/GMT_coverlogo.sh | 2 +- doc/scripts/GMT_eckert4.sh | 2 +- doc/scripts/GMT_equi_cyl.sh | 2 +- doc/scripts/GMT_general_cyl.sh | 2 +- doc/scripts/GMT_gnomonic.sh | 2 +- doc/scripts/GMT_grinten.sh | 2 +- doc/scripts/GMT_hammer.sh | 2 +- doc/scripts/GMT_lambert_az_hemi.sh | 2 +- doc/scripts/GMT_miller.sh | 2 +- doc/scripts/GMT_mollweide.sh | 2 +- doc/scripts/GMT_orthographic.sh | 2 +- doc/scripts/GMT_perspective.sh | 2 +- doc/scripts/GMT_polyconic.sh | 2 +- doc/scripts/GMT_robinson.sh | 2 +- doc/scripts/GMT_sinusoidal.sh | 2 +- doc/scripts/GMT_stereographic_polar.sh | 2 +- doc/scripts/GMT_transverse_merc.sh | 2 +- doc/scripts/GMT_winkel.sh | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/scripts/GMT_-B_radians.sh b/doc/scripts/GMT_-B_radians.sh index f9a8d54dc87..9aa8e68260b 100755 --- a/doc/scripts/GMT_-B_radians.sh +++ b/doc/scripts/GMT_-B_radians.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt basemap -R-4/2/0/1 -Jx2.5c -Bxapi3fpi6 -BS --GMT_THEME=cookbook -view GMT_-B_radians +gmt basemap -R-4/2/0/1 -Jx2.5c -Bxapi3fpi6 -BS -view GMT_-B_radians diff --git a/doc/scripts/GMT_-B_slanted.sh b/doc/scripts/GMT_-B_slanted.sh index 977e6aac7a0..28b9436bbf2 100755 --- a/doc/scripts/GMT_-B_slanted.sh +++ b/doc/scripts/GMT_-B_slanted.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt basemap -R2000/2020/35/45 -JX12c -Bxa2f+a-30 -BS --GMT_THEME=cookbook -view GMT_-B_slanted +gmt basemap -R2000/2020/35/45 -JX12c -Bxa2f+a-30 -BS -view GMT_-B_slanted diff --git a/doc/scripts/GMT_-U.sh b/doc/scripts/GMT_-U.sh index 99043c56b33..a21680f3206 100755 --- a/doc/scripts/GMT_-U.sh +++ b/doc/scripts/GMT_-U.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt plot -R0/3/0/0.1 -Jx1i -U"optional command string or text here" -T --GMT_THEME=cookbook -view GMT_-U +gmt plot -R0/3/0/0.1 -Jx1i -U"optional command string or text here" -T -view GMT_-U diff --git a/doc/scripts/GMT_TM.sh b/doc/scripts/GMT_TM.sh index 6aec2791ff9..5613535c80f 100755 --- a/doc/scripts/GMT_TM.sh +++ b/doc/scripts/GMT_TM.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R0/360/-80/80 -JT330/-45/10c -Ba30g -BWSne -Dc -A2000 -Slightblue -G0 --MAP_ANNOT_OBLIQUE=lon_horizontal --GMT_THEME=cookbook -view GMT_TM +gmt coast -R0/360/-80/80 -JT330/-45/10c -Ba30g -BWSne -Dc -A2000 -Slightblue -G0 --MAP_ANNOT_OBLIQUE=lon_horizontal -view GMT_TM diff --git a/doc/scripts/GMT_az_equidistant.sh b/doc/scripts/GMT_az_equidistant.sh index 6bd4499956b..cfbf807410f 100755 --- a/doc/scripts/GMT_az_equidistant.sh +++ b/doc/scripts/GMT_az_equidistant.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JE-100/40/12c -Bg -Dc -A10000 -Glightgray -Wthinnest --GMT_THEME=cookbook -view GMT_az_equidistant +gmt coast -Rg -JE-100/40/12c -Bg -Dc -A10000 -Glightgray -Wthinnest -view GMT_az_equidistant diff --git a/doc/scripts/GMT_cassini.sh b/doc/scripts/GMT_cassini.sh index 2b318f6b9d2..5b18c191faa 100755 --- a/doc/scripts/GMT_cassini.sh +++ b/doc/scripts/GMT_cassini.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R7:30/38:30/10:30/41:30+r -JC8.75/40/6c -Bafg -LjBR+c40+w100+f+o0.4c/0.5c -Dh -Gspringgreen -Sazure -Wthinnest -Ia/thinner --GMT_THEME=cookbook --FONT_LABEL=10p -view GMT_cassini +gmt coast -R7:30/38:30/10:30/41:30+r -JC8.75/40/6c -Bafg -LjBR+c40+w100+f+o0.4c/0.5c -Dh -Gspringgreen -Sazure -Wthinnest -Ia/thinner --FONT_LABEL=10p -view GMT_cassini diff --git a/doc/scripts/GMT_coverlogo.sh b/doc/scripts/GMT_coverlogo.sh index baceb4facb0..386bc1afbc0 100755 --- a/doc/scripts/GMT_coverlogo.sh +++ b/doc/scripts/GMT_coverlogo.sh @@ -4,4 +4,4 @@ # # Logo is 5.458" wide and 2.729" high and origin is lower left # -gmt logo -Dx0/0+w5.458i -X0 -Y0 --GMT_THEME=cookbook -view GMT_coverlogo +gmt logo -Dx0/0+w5.458i -X0 -Y0 -view GMT_coverlogo diff --git a/doc/scripts/GMT_eckert4.sh b/doc/scripts/GMT_eckert4.sh index 427e9aa08f8..c27d1f6d6ad 100755 --- a/doc/scripts/GMT_eckert4.sh +++ b/doc/scripts/GMT_eckert4.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JKf12c -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 --GMT_THEME=cookbook -view GMT_eckert4 +gmt coast -Rg -JKf12c -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 -view GMT_eckert4 diff --git a/doc/scripts/GMT_equi_cyl.sh b/doc/scripts/GMT_equi_cyl.sh index 404ae53b21c..fae202545b2 100755 --- a/doc/scripts/GMT_equi_cyl.sh +++ b/doc/scripts/GMT_equi_cyl.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JQ12c -B60f30g30 -Dc -A5000 -Gtan4 -Slightcyan --GMT_THEME=cookbook -view GMT_equi_cyl +gmt coast -Rg -JQ12c -B60f30g30 -Dc -A5000 -Gtan4 -Slightcyan -view GMT_equi_cyl diff --git a/doc/scripts/GMT_general_cyl.sh b/doc/scripts/GMT_general_cyl.sh index 5a0f546d1af..40a1c19706e 100755 --- a/doc/scripts/GMT_general_cyl.sh +++ b/doc/scripts/GMT_general_cyl.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-145/215/-90/90 -JY35/30/12c -B45g45 -Dc -A10000 -Sdodgerblue -Wthinnest --GMT_THEME=cookbook --MAP_FRAME_TYPE=fancy-rounded -view GMT_general_cyl +gmt coast -R-145/215/-90/90 -JY35/30/12c -B45g45 -Dc -A10000 -Sdodgerblue -Wthinnest --MAP_FRAME_TYPE=fancy-rounded -view GMT_general_cyl diff --git a/doc/scripts/GMT_gnomonic.sh b/doc/scripts/GMT_gnomonic.sh index a835bde6a7d..374edcfe41b 100755 --- a/doc/scripts/GMT_gnomonic.sh +++ b/doc/scripts/GMT_gnomonic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JF-120/35/60/12c -B30g15 -Dc -A10000 -Gtan -Scyan -Wthinnest --GMT_THEME=cookbook -view GMT_gnomonic +gmt coast -Rg -JF-120/35/60/12c -B30g15 -Dc -A10000 -Gtan -Scyan -Wthinnest -view GMT_gnomonic diff --git a/doc/scripts/GMT_grinten.sh b/doc/scripts/GMT_grinten.sh index 1d5a7804d51..8e77e6f7cb1 100755 --- a/doc/scripts/GMT_grinten.sh +++ b/doc/scripts/GMT_grinten.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash # GRAPHICSMAGICK_RMS = 0.0035 -gmt coast -Rg -JV10c -Bg -Dc -Glightgray -Scornsilk -A10000 -Wthinnest --GMT_THEME=cookbook -view GMT_grinten +gmt coast -Rg -JV10c -Bg -Dc -Glightgray -Scornsilk -A10000 -Wthinnest -view GMT_grinten diff --git a/doc/scripts/GMT_hammer.sh b/doc/scripts/GMT_hammer.sh index 43cdf7dfba2..fca4972e036 100755 --- a/doc/scripts/GMT_hammer.sh +++ b/doc/scripts/GMT_hammer.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JH12c -Bg -Dc -A10000 -Gblack -Scornsilk --GMT_THEME=cookbook -view GMT_hammer +gmt coast -Rg -JH12c -Bg -Dc -A10000 -Gblack -Scornsilk -view GMT_hammer diff --git a/doc/scripts/GMT_lambert_az_hemi.sh b/doc/scripts/GMT_lambert_az_hemi.sh index 23b6369d34f..0315c6eaae7 100755 --- a/doc/scripts/GMT_lambert_az_hemi.sh +++ b/doc/scripts/GMT_lambert_az_hemi.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JA280/30/12c -Bg -Dc -A1000 -Gnavy --GMT_THEME=cookbook -view GMT_lambert_az_hemi +gmt coast -Rg -JA280/30/12c -Bg -Dc -A1000 -Gnavy -view GMT_lambert_az_hemi diff --git a/doc/scripts/GMT_miller.sh b/doc/scripts/GMT_miller.sh index f5331795cf9..3babdc145b9 100755 --- a/doc/scripts/GMT_miller.sh +++ b/doc/scripts/GMT_miller.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-90/270/-80/90 -Jj1:400000000 -Bx45g45 -By30g30 -Dc -A10000 -Gkhaki -Wthinnest -Sazure --GMT_THEME=cookbook -view GMT_miller +gmt coast -R-90/270/-80/90 -Jj1:400000000 -Bx45g45 -By30g30 -Dc -A10000 -Gkhaki -Wthinnest -Sazure -view GMT_miller diff --git a/doc/scripts/GMT_mollweide.sh b/doc/scripts/GMT_mollweide.sh index 00f7bbf18d3..80f25d1895b 100755 --- a/doc/scripts/GMT_mollweide.sh +++ b/doc/scripts/GMT_mollweide.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JW12c -Bg -Dc -A10000 -Gtomato1 -Sskyblue --GMT_THEME=cookbook -view GMT_mollweide +gmt coast -Rd -JW12c -Bg -Dc -A10000 -Gtomato1 -Sskyblue -view GMT_mollweide diff --git a/doc/scripts/GMT_orthographic.sh b/doc/scripts/GMT_orthographic.sh index 190f1653d20..ba6e0c89a9b 100755 --- a/doc/scripts/GMT_orthographic.sh +++ b/doc/scripts/GMT_orthographic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JG-75/41/12c -Bg -Dc -A5000 -Gpink -Sthistle --GMT_THEME=cookbook -view GMT_orthographic +gmt coast -Rg -JG-75/41/12c -Bg -Dc -A5000 -Gpink -Sthistle -view GMT_orthographic diff --git a/doc/scripts/GMT_perspective.sh b/doc/scripts/GMT_perspective.sh index 940da2b51d7..4e5ffb4f7ac 100755 --- a/doc/scripts/GMT_perspective.sh +++ b/doc/scripts/GMT_perspective.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JG4/52/12c+z230+a90+t60+w180+v60 -Bx2g2 -By1g1 -Ia -Di -Glightbrown -Wthinnest -Slightblue --GMT_THEME=cookbook --MAP_ANNOT_MIN_SPACING=0.6c -view GMT_perspective +gmt coast -Rg -JG4/52/12c+z230+a90+t60+w180+v60 -Bx2g2 -By1g1 -Ia -Di -Glightbrown -Wthinnest -Slightblue --MAP_ANNOT_MIN_SPACING=0.6c -view GMT_perspective diff --git a/doc/scripts/GMT_polyconic.sh b/doc/scripts/GMT_polyconic.sh index 8357d0cfe24..ff855606af5 100755 --- a/doc/scripts/GMT_polyconic.sh +++ b/doc/scripts/GMT_polyconic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-180/-20/0/90 -JPoly/10c -Bx30g10 -By10g10 -Dc -A1000 -Glightgray -Wthinnest --GMT_THEME=cookbook -view GMT_polyconic +gmt coast -R-180/-20/0/90 -JPoly/10c -Bx30g10 -By10g10 -Dc -A1000 -Glightgray -Wthinnest -view GMT_polyconic diff --git a/doc/scripts/GMT_robinson.sh b/doc/scripts/GMT_robinson.sh index 322f4f1cf28..7c734532dcf 100755 --- a/doc/scripts/GMT_robinson.sh +++ b/doc/scripts/GMT_robinson.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JN12c -Bg -Dc -A10000 -Ggoldenrod -Ssnow2 --GMT_THEME=cookbook -view GMT_robinson +gmt coast -Rd -JN12c -Bg -Dc -A10000 -Ggoldenrod -Ssnow2 -view GMT_robinson diff --git a/doc/scripts/GMT_sinusoidal.sh b/doc/scripts/GMT_sinusoidal.sh index bba6fe5e355..01e3ab39dc0 100755 --- a/doc/scripts/GMT_sinusoidal.sh +++ b/doc/scripts/GMT_sinusoidal.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JI12c -Bg -Dc -A10000 -Gcoral4 -Sazure3 --GMT_THEME=cookbook -view GMT_sinusoidal +gmt coast -Rd -JI12c -Bg -Dc -A10000 -Gcoral4 -Sazure3 -view GMT_sinusoidal diff --git a/doc/scripts/GMT_stereographic_polar.sh b/doc/scripts/GMT_stereographic_polar.sh index 03188585d8a..ec1cf3327cb 100755 --- a/doc/scripts/GMT_stereographic_polar.sh +++ b/doc/scripts/GMT_stereographic_polar.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-30/30/60/72 -Js0/90/12c/60 -B10g -Dl -A250 -Groyalblue -Sseashell --GMT_THEME=cookbook -view GMT_stereographic_polar +gmt coast -R-30/30/60/72 -Js0/90/12c/60 -B10g -Dl -A250 -Groyalblue -Sseashell -view GMT_stereographic_polar diff --git a/doc/scripts/GMT_transverse_merc.sh b/doc/scripts/GMT_transverse_merc.sh index 465749b1311..5eb5d36333a 100755 --- a/doc/scripts/GMT_transverse_merc.sh +++ b/doc/scripts/GMT_transverse_merc.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R20/30/50/45+r -Jt35/0.5c -Bag -Dl -A250 -Glightbrown -Wthinnest -Sseashell --GMT_THEME=cookbook -view GMT_transverse_merc +gmt coast -R20/30/50/45+r -Jt35/0.5c -Bag -Dl -A250 -Glightbrown -Wthinnest -Sseashell -view GMT_transverse_merc diff --git a/doc/scripts/GMT_winkel.sh b/doc/scripts/GMT_winkel.sh index d3af3aac6cf..3aba3fd5544 100755 --- a/doc/scripts/GMT_winkel.sh +++ b/doc/scripts/GMT_winkel.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JR12c -Bg -Dc -A10000 -Gburlywood4 -Swheat1 --GMT_THEME=cookbook -view GMT_winkel +gmt coast -Rd -JR12c -Bg -Dc -A10000 -Gburlywood4 -Swheat1 -view GMT_winkel From 6e2cd48dc3d4d2b76f598e24b5178e7e9a25d408 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 17 May 2024 22:47:04 +0800 Subject: [PATCH 056/105] doc: Fix the order for sections included in the documentation (#8491) --- doc/rst/source/index.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/rst/source/index.rst b/doc/rst/source/index.rst index b61c6fc2ee2..16ef6bfba28 100644 --- a/doc/rst/source/index.rst +++ b/doc/rst/source/index.rst @@ -29,16 +29,6 @@ it can do. - :ref:`Grid Format Specifications ` - :doc:`theme-settings` -.. Add a hidden toctree to suppress "document isn't included in any toctree" warnings -.. toctree:: - :hidden: - - std-opts - gmt.conf - gmtcolors - color-picker - theme-settings - .. grid:: 1 2 2 2 .. grid-item-card:: @@ -90,3 +80,13 @@ it can do. GMT C API PostScriptLight C API /devdocs/devdocs + +.. Add a hidden toctree to suppress "document isn't included in any toctree" warnings +.. toctree:: + :hidden: + + std-opts + gmt.conf + gmtcolors + color-picker + theme-settings From 5ce653e0a266e82e867254dc2635ec75b520a8c3 Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Sun, 19 May 2024 00:13:45 -0300 Subject: [PATCH 057/105] Fix typo in the comments (#8492) --- doc/scripts/GMT_cap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/scripts/GMT_cap.sh b/doc/scripts/GMT_cap.sh index 891eda19d86..11c96739629 100755 --- a/doc/scripts/GMT_cap.sh +++ b/doc/scripts/GMT_cap.sh @@ -16,15 +16,15 @@ gmt begin GMT_cap 30 90 170 90 EOF - # round + # butt gmt plot -R0/250/0/100 -Jx1p --PS_LINE_CAP=butt -W10p,lightred,20_20:0 butt.txt gmt plot -Wfaint butt.txt gmt plot -Sc3p -Gwhite -Wfaint butt.txt - # miter + # round gmt plot --PS_LINE_CAP=round -W10p,lightblue,20_20:0 round.txt gmt plot -Wfaint round.txt gmt plot -Sc3p -Gwhite -Wfaint round.txt - # bevel + # square gmt plot --PS_LINE_CAP=square -W10p,lightorange,20_20:0 square.txt gmt plot -Wfaint square.txt gmt plot -Sc3p -Gwhite -Wfaint square.txt From 1100c78fd5c38e4c5d02ff12ce132325db55addc Mon Sep 17 00:00:00 2001 From: Joaquim Date: Sun, 19 May 2024 22:18:57 +0100 Subject: [PATCH 058/105] The nc check for valid_min, valid_max of xx and yy coordinates breaks valid grids. (#8493) --- src/gmt_nc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gmt_nc.c b/src/gmt_nc.c index 07d3712705d..d43abec26c7 100644 --- a/src/gmt_nc.c +++ b/src/gmt_nc.c @@ -682,10 +682,18 @@ GMT_LOCAL int gmtnc_grd_info (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *head if (has_vector && header->n_columns == 1) has_vector = false; /* One coordinate does not a vector make */ /* Look for the x-coordinate range attributes */ + + /* + Don't understand what this was meant to do. It screwes the coordinates when xx or yy have a valid_min|max + attribute set to (for example lon) [-180 180] but the vector itself contains a subset of that range, + which is a perfectly valid set. + has_range = (!nc_get_att_double (ncid, ids[HH->xy_dim[0]], "actual_range", dummy) || !nc_get_att_double (ncid, ids[HH->xy_dim[0]], "valid_range", dummy) || !(nc_get_att_double (ncid, ids[HH->xy_dim[0]], "valid_min", &dummy[0]) + nc_get_att_double (ncid, ids[HH->xy_dim[0]], "valid_max", &dummy[1]))); + */ + has_range = (!nc_get_att_double (ncid, ids[HH->xy_dim[0]], "actual_range", dummy)); if (has_vector && has_range) { /* Has both so we can do a basic sanity check */ @@ -784,10 +792,15 @@ GMT_LOCAL int gmtnc_grd_info (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *head dy = fabs (xy[1] - xy[0]); /* Grid spacing in y */ } if (has_vector && header->n_rows == 1) has_vector = false; /* One coordinate does not a vector make */ + + /* + // Don't understand what this was meant to do. It screwes the coordinates when yy have a valid_min|max has_range = (!nc_get_att_double (ncid, ids[HH->xy_dim[1]], "actual_range", dummy) || !nc_get_att_double (ncid, ids[HH->xy_dim[1]], "valid_range", dummy) || !(nc_get_att_double (ncid, ids[HH->xy_dim[1]], "valid_min", &dummy[0]) + nc_get_att_double (ncid, ids[HH->xy_dim[1]], "valid_max", &dummy[1]))); + */ + has_range = (!nc_get_att_double (ncid, ids[HH->xy_dim[1]], "actual_range", dummy)); if (has_vector && has_range) { /* Has both so we can do a basic sanity check */ threshold = (0.5+GMT_CONV5_LIMIT) * dy; From ec92607feb0e1e5327bcced6274afa6ff0a55806 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 22 May 2024 19:42:04 +0800 Subject: [PATCH 059/105] Update DVC files to new format (#8495) --- doc/scripts/images/GMT_colorbar.ps.dvc | 4 ++-- test/baseline/blockmean.dvc | 1 - test/baseline/filter1d.dvc | 2 +- test/baseline/fitcircle.dvc | 1 - test/baseline/genper.dvc | 2 +- test/baseline/geodesy.dvc | 2 +- test/baseline/gmtconnect.dvc | 1 - test/baseline/gmtconvert.dvc | 2 +- test/baseline/gmtlogo.dvc | 1 - test/baseline/gmtmath.dvc | 2 +- test/baseline/gmtregress.dvc | 2 +- test/baseline/gmtselect.dvc | 2 +- test/baseline/gmtsimplify.dvc | 1 - test/baseline/gmtspatial.dvc | 2 +- test/baseline/gmtsplit.dvc | 1 - test/baseline/gmtvector.dvc | 2 +- test/baseline/grd2cpt.dvc | 2 +- test/baseline/grd2xyz.dvc | 1 - test/baseline/grdblend.dvc | 2 +- test/baseline/grdclip.dvc | 1 - test/baseline/grdedit.dvc | 2 +- test/baseline/grdfft.dvc | 2 +- test/baseline/grdgdal.dvc | 1 - test/baseline/grdgradient.dvc | 2 +- test/baseline/grdinterpolate.dvc | 2 +- test/baseline/grdlandmask.dvc | 2 +- test/baseline/grdmask.dvc | 2 +- test/baseline/grdmath.dvc | 2 +- test/baseline/grdpaste.dvc | 2 +- test/baseline/grdsample.dvc | 2 +- test/baseline/grdselect.dvc | 2 +- test/baseline/grdtrack.dvc | 2 +- test/baseline/grdtrend.dvc | 2 +- test/baseline/grdvector.dvc | 2 +- test/baseline/grdvolume.dvc | 1 - test/baseline/gshhg.dvc | 2 +- test/baseline/img.dvc | 2 +- test/baseline/kml.dvc | 1 - test/baseline/latex.dvc | 2 +- test/baseline/makecpt.dvc | 2 +- test/baseline/mapproject.dvc | 2 +- test/baseline/mgd77.dvc | 2 +- test/baseline/modern.dvc | 2 +- test/baseline/movie.dvc | 2 +- test/baseline/nearneighbor.dvc | 1 - test/baseline/ogr.dvc | 2 +- test/baseline/postscriptlight.dvc | 1 - test/baseline/potential.dvc | 2 +- test/baseline/project.dvc | 2 +- test/baseline/psbasemap.dvc | 2 +- test/baseline/psclip.dvc | 2 +- test/baseline/pscoast.dvc | 2 +- test/baseline/pscontour.dvc | 2 +- test/baseline/pshistogram.dvc | 2 +- test/baseline/psimage.dvc | 2 +- test/baseline/pslegend.dvc | 2 +- test/baseline/psmask.dvc | 2 +- test/baseline/pspolar.dvc | 2 +- test/baseline/psrose.dvc | 2 +- test/baseline/pssac.dvc | 2 +- test/baseline/pssolar.dvc | 2 +- test/baseline/psternary.dvc | 2 +- test/baseline/pstext.dvc | 2 +- test/baseline/pswiggle.dvc | 2 +- test/baseline/psxy.dvc | 2 +- test/baseline/psxyz.dvc | 2 +- test/baseline/sample1d.dvc | 2 +- test/baseline/segy.dvc | 2 +- test/baseline/seis.dvc | 2 +- test/baseline/spectrum1d.dvc | 1 - test/baseline/sph.dvc | 2 +- test/baseline/sph2grd.dvc | 2 +- test/baseline/spotter.dvc | 2 +- test/baseline/subplot.dvc | 2 +- test/baseline/surface.dvc | 2 +- test/baseline/time.dvc | 2 +- test/baseline/trend1d.dvc | 1 - test/baseline/trend2d.dvc | 1 - test/baseline/triangulate.dvc | 2 +- test/baseline/windbarbs.dvc | 2 +- test/baseline/x2sys.dvc | 2 +- 81 files changed, 66 insertions(+), 82 deletions(-) diff --git a/doc/scripts/images/GMT_colorbar.ps.dvc b/doc/scripts/images/GMT_colorbar.ps.dvc index b3771d69d4b..e0da71ae36e 100644 --- a/doc/scripts/images/GMT_colorbar.ps.dvc +++ b/doc/scripts/images/GMT_colorbar.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: e17e23ee575e12f611210aa8761bd02d - size: 26088 +- md5: 24089afadb2e56194010c4bd22f2b6f0 + size: 26948 hash: md5 path: GMT_colorbar.ps diff --git a/test/baseline/blockmean.dvc b/test/baseline/blockmean.dvc index 69d0c910f6c..a2152751964 100644 --- a/test/baseline/blockmean.dvc +++ b/test/baseline/blockmean.dvc @@ -1,5 +1,4 @@ outs: - md5: 42d6184ac62a6af99f89ffcc0b888ae0.dir - size: 26174 nfiles: 1 path: blockmean diff --git a/test/baseline/filter1d.dvc b/test/baseline/filter1d.dvc index fb8a69848d2..cbc3e716ec8 100644 --- a/test/baseline/filter1d.dvc +++ b/test/baseline/filter1d.dvc @@ -1,5 +1,5 @@ outs: - md5: 411dc7bd2fc692a5248368543dff2800.dir - size: 251233 nfiles: 6 path: filter1d + hash: md5 diff --git a/test/baseline/fitcircle.dvc b/test/baseline/fitcircle.dvc index 4e105b38bef..dc0278cacdd 100644 --- a/test/baseline/fitcircle.dvc +++ b/test/baseline/fitcircle.dvc @@ -1,5 +1,4 @@ outs: - md5: 3d146d356a73b93a3147dbe88384261c.dir - size: 116758 nfiles: 1 path: fitcircle diff --git a/test/baseline/genper.dvc b/test/baseline/genper.dvc index 7aa5b199efd..93198c3f15c 100644 --- a/test/baseline/genper.dvc +++ b/test/baseline/genper.dvc @@ -1,5 +1,5 @@ outs: - md5: 4f8356486a3cc544654ed1c8432eb15a.dir - size: 4081037 nfiles: 20 path: genper + hash: md5 diff --git a/test/baseline/geodesy.dvc b/test/baseline/geodesy.dvc index 32ce341c6f7..fa17e9f3661 100644 --- a/test/baseline/geodesy.dvc +++ b/test/baseline/geodesy.dvc @@ -1,5 +1,5 @@ outs: - md5: e31eae40b53f2c6711aa850f51bc2eb7.dir - size: 3650328 nfiles: 15 path: geodesy + hash: md5 diff --git a/test/baseline/gmtconnect.dvc b/test/baseline/gmtconnect.dvc index e0c73cbc9f3..f9f09479d0d 100644 --- a/test/baseline/gmtconnect.dvc +++ b/test/baseline/gmtconnect.dvc @@ -1,5 +1,4 @@ outs: - md5: 51914fa7d4bc4409cf4566d5affe2024.dir - size: 33350 nfiles: 1 path: gmtconnect diff --git a/test/baseline/gmtconvert.dvc b/test/baseline/gmtconvert.dvc index a7fd2592d07..09a3a5ecb88 100644 --- a/test/baseline/gmtconvert.dvc +++ b/test/baseline/gmtconvert.dvc @@ -1,5 +1,5 @@ outs: - md5: d85339d18ffd80f9db5cd12e6e556dda.dir - size: 71118 nfiles: 2 path: gmtconvert + hash: md5 diff --git a/test/baseline/gmtlogo.dvc b/test/baseline/gmtlogo.dvc index c017622219f..3f8337c91d8 100644 --- a/test/baseline/gmtlogo.dvc +++ b/test/baseline/gmtlogo.dvc @@ -1,5 +1,4 @@ outs: - md5: ef8c5650748bf063179d9303bfc73c09.dir - size: 514800 nfiles: 1 path: gmtlogo diff --git a/test/baseline/gmtmath.dvc b/test/baseline/gmtmath.dvc index 281c3567836..274a2df2eda 100644 --- a/test/baseline/gmtmath.dvc +++ b/test/baseline/gmtmath.dvc @@ -1,5 +1,5 @@ outs: - md5: a909681cc5b43acbcf155499ca8e1e9e.dir - size: 197218 nfiles: 5 path: gmtmath + hash: md5 diff --git a/test/baseline/gmtregress.dvc b/test/baseline/gmtregress.dvc index 2c4c35efced..f79897a70f7 100644 --- a/test/baseline/gmtregress.dvc +++ b/test/baseline/gmtregress.dvc @@ -1,5 +1,5 @@ outs: - md5: 53d07fa45fe6a1ea795036f5a0b6fefb.dir - size: 347468 nfiles: 5 path: gmtregress + hash: md5 diff --git a/test/baseline/gmtselect.dvc b/test/baseline/gmtselect.dvc index 6c1b01c51bc..69314c74420 100644 --- a/test/baseline/gmtselect.dvc +++ b/test/baseline/gmtselect.dvc @@ -1,5 +1,5 @@ outs: - md5: dd2f8187016c620442cc37237ea6719d.dir - size: 311659 nfiles: 3 path: gmtselect + hash: md5 diff --git a/test/baseline/gmtsimplify.dvc b/test/baseline/gmtsimplify.dvc index 7e32e45d3a9..54f908e5aa4 100644 --- a/test/baseline/gmtsimplify.dvc +++ b/test/baseline/gmtsimplify.dvc @@ -1,5 +1,4 @@ outs: - md5: ad15e54c2c97b932f8758c2092824688.dir - size: 844101 nfiles: 1 path: gmtsimplify diff --git a/test/baseline/gmtspatial.dvc b/test/baseline/gmtspatial.dvc index 8090e48862a..9451962a9d8 100644 --- a/test/baseline/gmtspatial.dvc +++ b/test/baseline/gmtspatial.dvc @@ -1,5 +1,5 @@ outs: - md5: d2b6866973d0cc60254be54a4a4536dc.dir - size: 642598 nfiles: 10 path: gmtspatial + hash: md5 diff --git a/test/baseline/gmtsplit.dvc b/test/baseline/gmtsplit.dvc index e68ced3f49c..799c7e68b19 100644 --- a/test/baseline/gmtsplit.dvc +++ b/test/baseline/gmtsplit.dvc @@ -1,5 +1,4 @@ outs: - md5: 7586758d5877717f63e731b07be746c8.dir - size: 24177 nfiles: 1 path: gmtsplit diff --git a/test/baseline/gmtvector.dvc b/test/baseline/gmtvector.dvc index 4444693afd9..3cea6059ba6 100644 --- a/test/baseline/gmtvector.dvc +++ b/test/baseline/gmtvector.dvc @@ -1,5 +1,5 @@ outs: - md5: b037b0df3183efa86c4f58ca2ebe321a.dir - size: 107300 nfiles: 3 path: gmtvector + hash: md5 diff --git a/test/baseline/grd2cpt.dvc b/test/baseline/grd2cpt.dvc index 2ea16c509a7..6a1a5ba9537 100644 --- a/test/baseline/grd2cpt.dvc +++ b/test/baseline/grd2cpt.dvc @@ -1,5 +1,5 @@ outs: - md5: 8a11286e6dd04088ec1321ec3b0a0ad3.dir - size: 332299 nfiles: 2 path: grd2cpt + hash: md5 diff --git a/test/baseline/grd2xyz.dvc b/test/baseline/grd2xyz.dvc index 61239940fb6..b4213b104ee 100644 --- a/test/baseline/grd2xyz.dvc +++ b/test/baseline/grd2xyz.dvc @@ -1,5 +1,4 @@ outs: - md5: 515cb6fca8752bfb41113d53e47fb618.dir - size: 72261 nfiles: 1 path: grd2xyz diff --git a/test/baseline/grdblend.dvc b/test/baseline/grdblend.dvc index 1855ddff897..ca9f2b86212 100644 --- a/test/baseline/grdblend.dvc +++ b/test/baseline/grdblend.dvc @@ -1,5 +1,5 @@ outs: - md5: c26aa6d39feeec2780603ba7ebe3eaf9.dir - size: 266208 nfiles: 7 path: grdblend + hash: md5 diff --git a/test/baseline/grdclip.dvc b/test/baseline/grdclip.dvc index 65f592c7dcd..57bc8ecda0b 100644 --- a/test/baseline/grdclip.dvc +++ b/test/baseline/grdclip.dvc @@ -1,5 +1,4 @@ outs: - md5: 6e356ee3c759840deb7faf5d5c6df9c1.dir - size: 127366 nfiles: 1 path: grdclip diff --git a/test/baseline/grdedit.dvc b/test/baseline/grdedit.dvc index cb93aec4937..4a643ce9a92 100644 --- a/test/baseline/grdedit.dvc +++ b/test/baseline/grdedit.dvc @@ -1,5 +1,5 @@ outs: - md5: 0bed2477a1519da7cb0551a216bbc1d3.dir - size: 467294 nfiles: 3 path: grdedit + hash: md5 diff --git a/test/baseline/grdfft.dvc b/test/baseline/grdfft.dvc index 776ca2723f6..dd49295f584 100644 --- a/test/baseline/grdfft.dvc +++ b/test/baseline/grdfft.dvc @@ -1,5 +1,5 @@ outs: - md5: fa09d2798cb6c76a596be81bd3ddb7cc.dir - size: 1286655 nfiles: 7 path: grdfft + hash: md5 diff --git a/test/baseline/grdgdal.dvc b/test/baseline/grdgdal.dvc index d6b338bdb1d..af6c6c349dd 100644 --- a/test/baseline/grdgdal.dvc +++ b/test/baseline/grdgdal.dvc @@ -1,5 +1,4 @@ outs: - md5: cb81159dd8a40497b6aa7499d5c4dfcb.dir - size: 24997 nfiles: 1 path: grdgdal diff --git a/test/baseline/grdgradient.dvc b/test/baseline/grdgradient.dvc index 66d61ea80aa..5b43944000f 100644 --- a/test/baseline/grdgradient.dvc +++ b/test/baseline/grdgradient.dvc @@ -1,5 +1,5 @@ outs: - md5: 5378f71f4698a046d44c0f1a233a27e2.dir - size: 1652314 nfiles: 5 path: grdgradient + hash: md5 diff --git a/test/baseline/grdinterpolate.dvc b/test/baseline/grdinterpolate.dvc index 5ad22e09a85..4c890888896 100644 --- a/test/baseline/grdinterpolate.dvc +++ b/test/baseline/grdinterpolate.dvc @@ -1,5 +1,5 @@ outs: - md5: 0322b5f03575de0e74c0c3561b4526e7.dir - size: 816472 nfiles: 6 path: grdinterpolate + hash: md5 diff --git a/test/baseline/grdlandmask.dvc b/test/baseline/grdlandmask.dvc index f1823268f93..771d6f5a31c 100644 --- a/test/baseline/grdlandmask.dvc +++ b/test/baseline/grdlandmask.dvc @@ -1,5 +1,5 @@ outs: - md5: efc18c461dc115ce2e6f14da7bd261b8.dir - size: 178104 nfiles: 5 path: grdlandmask + hash: md5 diff --git a/test/baseline/grdmask.dvc b/test/baseline/grdmask.dvc index 8116f6609b1..6d4dca7099e 100644 --- a/test/baseline/grdmask.dvc +++ b/test/baseline/grdmask.dvc @@ -1,5 +1,5 @@ outs: - md5: 2177ea81a6a735a299f38e647348b35c.dir - size: 274422 nfiles: 7 path: grdmask + hash: md5 diff --git a/test/baseline/grdmath.dvc b/test/baseline/grdmath.dvc index 9755ecac703..401f032fed9 100644 --- a/test/baseline/grdmath.dvc +++ b/test/baseline/grdmath.dvc @@ -1,5 +1,5 @@ outs: - md5: 9c765011a0d41435a16922a2b4882de7.dir - size: 1542041 nfiles: 14 path: grdmath + hash: md5 diff --git a/test/baseline/grdpaste.dvc b/test/baseline/grdpaste.dvc index 1b06840c723..2c7eab60f8d 100644 --- a/test/baseline/grdpaste.dvc +++ b/test/baseline/grdpaste.dvc @@ -1,5 +1,5 @@ outs: - md5: f69906f1ad317e2105eec1b1fcee8362.dir - size: 246092 nfiles: 5 path: grdpaste + hash: md5 diff --git a/test/baseline/grdsample.dvc b/test/baseline/grdsample.dvc index e0ff321ffe2..087603fec7f 100644 --- a/test/baseline/grdsample.dvc +++ b/test/baseline/grdsample.dvc @@ -1,5 +1,5 @@ outs: - md5: c2e5e41409f36780c7e135027260c026.dir - size: 225182 nfiles: 4 path: grdsample + hash: md5 diff --git a/test/baseline/grdselect.dvc b/test/baseline/grdselect.dvc index fa2872bd948..9d763cd0aec 100644 --- a/test/baseline/grdselect.dvc +++ b/test/baseline/grdselect.dvc @@ -1,5 +1,5 @@ outs: - md5: eea2d1abf7e04bcd1088c6ef425742ad.dir - size: 106992 nfiles: 2 path: grdselect + hash: md5 diff --git a/test/baseline/grdtrack.dvc b/test/baseline/grdtrack.dvc index cfa13197d92..02f1333a39d 100644 --- a/test/baseline/grdtrack.dvc +++ b/test/baseline/grdtrack.dvc @@ -1,5 +1,5 @@ outs: - md5: 16b1149e8e1793a42baa9cb440fd5b6e.dir - size: 234507 nfiles: 5 path: grdtrack + hash: md5 diff --git a/test/baseline/grdtrend.dvc b/test/baseline/grdtrend.dvc index 58530af6e5d..cd5e8d54b35 100644 --- a/test/baseline/grdtrend.dvc +++ b/test/baseline/grdtrend.dvc @@ -1,5 +1,5 @@ outs: - md5: 5ca2f14b9f2256aa7213339aaadb2abe.dir - size: 1453855 nfiles: 2 path: grdtrend + hash: md5 diff --git a/test/baseline/grdvector.dvc b/test/baseline/grdvector.dvc index c17fefbedc3..a2aba9f663a 100644 --- a/test/baseline/grdvector.dvc +++ b/test/baseline/grdvector.dvc @@ -1,5 +1,5 @@ outs: - md5: 752b35fff020e0e8596263531ca31881.dir - size: 1445159 nfiles: 15 path: grdvector + hash: md5 diff --git a/test/baseline/grdvolume.dvc b/test/baseline/grdvolume.dvc index 6738c206fd0..e07321e2bc0 100644 --- a/test/baseline/grdvolume.dvc +++ b/test/baseline/grdvolume.dvc @@ -1,5 +1,4 @@ outs: - md5: 5dbd18ee6a3d9c634b837dcf0a890519.dir - size: 135887 nfiles: 1 path: grdvolume diff --git a/test/baseline/gshhg.dvc b/test/baseline/gshhg.dvc index 057e7d228e8..7b299f98e18 100644 --- a/test/baseline/gshhg.dvc +++ b/test/baseline/gshhg.dvc @@ -1,5 +1,5 @@ outs: - md5: 01b0e7793ebbf2a48227e15b6c429c08.dir - size: 292565 nfiles: 2 path: gshhg + hash: md5 diff --git a/test/baseline/img.dvc b/test/baseline/img.dvc index b4b1fe2dd72..778854810a2 100644 --- a/test/baseline/img.dvc +++ b/test/baseline/img.dvc @@ -1,5 +1,5 @@ outs: - md5: 2f120654289d917ec49b799a7e569707.dir - size: 309526 nfiles: 2 path: img + hash: md5 diff --git a/test/baseline/kml.dvc b/test/baseline/kml.dvc index f2f921bb73a..671b5d3dcb2 100644 --- a/test/baseline/kml.dvc +++ b/test/baseline/kml.dvc @@ -1,5 +1,4 @@ outs: - md5: 6bc10e265e829fcccec28484788687e8.dir - size: 122848 nfiles: 1 path: kml diff --git a/test/baseline/latex.dvc b/test/baseline/latex.dvc index 5bf68c18b8b..bca2b77551b 100644 --- a/test/baseline/latex.dvc +++ b/test/baseline/latex.dvc @@ -1,5 +1,5 @@ outs: - md5: 29ae68ca108d71101d044d2c19246967.dir - size: 1762679 nfiles: 6 path: latex + hash: md5 diff --git a/test/baseline/makecpt.dvc b/test/baseline/makecpt.dvc index 73656745ada..89b2d86cb7e 100644 --- a/test/baseline/makecpt.dvc +++ b/test/baseline/makecpt.dvc @@ -1,5 +1,5 @@ outs: - md5: 9917e66871e555f0f090780acd925896.dir - size: 123266 nfiles: 3 path: makecpt + hash: md5 diff --git a/test/baseline/mapproject.dvc b/test/baseline/mapproject.dvc index d5ee1867c68..820822a9d50 100644 --- a/test/baseline/mapproject.dvc +++ b/test/baseline/mapproject.dvc @@ -1,5 +1,5 @@ outs: - md5: 085c749d0cb1192a17f776a7f1b1261f.dir - size: 313584 nfiles: 4 path: mapproject + hash: md5 diff --git a/test/baseline/mgd77.dvc b/test/baseline/mgd77.dvc index 316fd074320..92851b89a1a 100644 --- a/test/baseline/mgd77.dvc +++ b/test/baseline/mgd77.dvc @@ -1,5 +1,5 @@ outs: - md5: 86bcdbb6d61b39db2fa5e257ea542148.dir - size: 94735 nfiles: 2 path: mgd77 + hash: md5 diff --git a/test/baseline/modern.dvc b/test/baseline/modern.dvc index 07363ad0fb2..44b14a66f20 100644 --- a/test/baseline/modern.dvc +++ b/test/baseline/modern.dvc @@ -1,5 +1,5 @@ outs: - md5: 5c3e7a594569985caf39a112d0780e65.dir - size: 1662829 nfiles: 20 path: modern + hash: md5 diff --git a/test/baseline/movie.dvc b/test/baseline/movie.dvc index d6b93277c18..263bb5230e4 100644 --- a/test/baseline/movie.dvc +++ b/test/baseline/movie.dvc @@ -1,5 +1,5 @@ outs: - md5: 67875375e1e3d3e583e7b762bec7bfd7.dir - size: 267246 nfiles: 8 path: movie + hash: md5 diff --git a/test/baseline/nearneighbor.dvc b/test/baseline/nearneighbor.dvc index d61959ac3d1..c0c5c36c092 100644 --- a/test/baseline/nearneighbor.dvc +++ b/test/baseline/nearneighbor.dvc @@ -1,5 +1,4 @@ outs: - md5: a178a78bc06316e7e3f0ed318653d664.dir - size: 24997 nfiles: 1 path: nearneighbor diff --git a/test/baseline/ogr.dvc b/test/baseline/ogr.dvc index 134eab17cdd..27a6ae27e1d 100644 --- a/test/baseline/ogr.dvc +++ b/test/baseline/ogr.dvc @@ -1,5 +1,5 @@ outs: - md5: 32c4b2ba21cb4229e89718235836d2ce.dir - size: 367284 nfiles: 3 path: ogr + hash: md5 diff --git a/test/baseline/postscriptlight.dvc b/test/baseline/postscriptlight.dvc index a0637229189..b5251baa584 100644 --- a/test/baseline/postscriptlight.dvc +++ b/test/baseline/postscriptlight.dvc @@ -1,5 +1,4 @@ outs: - md5: e5ec08fe1ffe6b7a29733983a3dc988b.dir - size: 90003 nfiles: 1 path: postscriptlight diff --git a/test/baseline/potential.dvc b/test/baseline/potential.dvc index a1112cd92ea..a51196b2f17 100644 --- a/test/baseline/potential.dvc +++ b/test/baseline/potential.dvc @@ -1,5 +1,5 @@ outs: - md5: a3289700143465735fd34da9cd2eca70.dir - size: 2032355 nfiles: 30 path: potential + hash: md5 diff --git a/test/baseline/project.dvc b/test/baseline/project.dvc index eeeaefd9ad0..ffff705be8e 100644 --- a/test/baseline/project.dvc +++ b/test/baseline/project.dvc @@ -1,5 +1,5 @@ outs: - md5: 2ce42fc8d158793edb1b1f1cae20a0c1.dir - size: 514432 nfiles: 6 path: project + hash: md5 diff --git a/test/baseline/psbasemap.dvc b/test/baseline/psbasemap.dvc index 734b2cf648e..2cc0841bca6 100644 --- a/test/baseline/psbasemap.dvc +++ b/test/baseline/psbasemap.dvc @@ -1,5 +1,5 @@ outs: - md5: d844a65d237eeb5ecd27b79fb325c08f.dir - size: 2904428 nfiles: 56 path: psbasemap + hash: md5 diff --git a/test/baseline/psclip.dvc b/test/baseline/psclip.dvc index e2373c76539..b2aec7ea613 100644 --- a/test/baseline/psclip.dvc +++ b/test/baseline/psclip.dvc @@ -1,5 +1,5 @@ outs: - md5: c189b8f202b8f149d9074c7b8369f9a2.dir - size: 83495 nfiles: 3 path: psclip + hash: md5 diff --git a/test/baseline/pscoast.dvc b/test/baseline/pscoast.dvc index c6dee23f3f5..92ac4a79907 100644 --- a/test/baseline/pscoast.dvc +++ b/test/baseline/pscoast.dvc @@ -1,5 +1,5 @@ outs: - md5: c7cd9a6460aeb8d046cd4078d0977f30.dir - size: 8678333 nfiles: 26 path: pscoast + hash: md5 diff --git a/test/baseline/pscontour.dvc b/test/baseline/pscontour.dvc index 263be237171..73f0bfd208b 100644 --- a/test/baseline/pscontour.dvc +++ b/test/baseline/pscontour.dvc @@ -1,5 +1,5 @@ outs: - md5: 05f5725db1e85ca2b5b67f0a9b610bbb.dir - size: 1861305 nfiles: 4 path: pscontour + hash: md5 diff --git a/test/baseline/pshistogram.dvc b/test/baseline/pshistogram.dvc index 2bf810f54ab..032d607cb28 100644 --- a/test/baseline/pshistogram.dvc +++ b/test/baseline/pshistogram.dvc @@ -1,5 +1,5 @@ outs: - md5: b5cbfe4d70fd95a208db37458813555f.dir - size: 288503 nfiles: 8 path: pshistogram + hash: md5 diff --git a/test/baseline/psimage.dvc b/test/baseline/psimage.dvc index 6f4dc1e6a8f..47beea75dc5 100644 --- a/test/baseline/psimage.dvc +++ b/test/baseline/psimage.dvc @@ -1,5 +1,5 @@ outs: - md5: 9b43a20da87f87f52574a2276b1231f8.dir - size: 1071278 nfiles: 5 path: psimage + hash: md5 diff --git a/test/baseline/pslegend.dvc b/test/baseline/pslegend.dvc index 470cd26bb17..515fd7355cb 100644 --- a/test/baseline/pslegend.dvc +++ b/test/baseline/pslegend.dvc @@ -1,5 +1,5 @@ outs: - md5: 8feb56c0d1861da696e181f9a1d32d1b.dir - size: 883406 nfiles: 20 path: pslegend + hash: md5 diff --git a/test/baseline/psmask.dvc b/test/baseline/psmask.dvc index 81940362de1..1bb4fb4e40a 100644 --- a/test/baseline/psmask.dvc +++ b/test/baseline/psmask.dvc @@ -1,5 +1,5 @@ outs: - md5: 956cf30e576b0cdaf8568bdb092536f2.dir - size: 449723 nfiles: 2 path: psmask + hash: md5 diff --git a/test/baseline/pspolar.dvc b/test/baseline/pspolar.dvc index ca495adec63..e154b2dec64 100644 --- a/test/baseline/pspolar.dvc +++ b/test/baseline/pspolar.dvc @@ -1,5 +1,5 @@ outs: - md5: a6919a698f03bfa50385d7a4af7c75cd.dir - size: 90606 nfiles: 3 path: pspolar + hash: md5 diff --git a/test/baseline/psrose.dvc b/test/baseline/psrose.dvc index 07939b924b8..5ced60fc18b 100644 --- a/test/baseline/psrose.dvc +++ b/test/baseline/psrose.dvc @@ -1,5 +1,5 @@ outs: - md5: 2d40ae29b9931e9f383b71360aa82602.dir - size: 1147371 nfiles: 8 path: psrose + hash: md5 diff --git a/test/baseline/pssac.dvc b/test/baseline/pssac.dvc index 1b79cd499bd..76603ffea3d 100644 --- a/test/baseline/pssac.dvc +++ b/test/baseline/pssac.dvc @@ -1,5 +1,5 @@ outs: - md5: 9e50290b01efe0c2fe74336061b4d5ad.dir - size: 1083727 nfiles: 12 path: pssac + hash: md5 diff --git a/test/baseline/pssolar.dvc b/test/baseline/pssolar.dvc index f5058808314..8df779799fb 100644 --- a/test/baseline/pssolar.dvc +++ b/test/baseline/pssolar.dvc @@ -1,5 +1,5 @@ outs: - md5: a8a9da721eb83e936aec2bc4f083578e.dir - size: 773435 nfiles: 3 path: pssolar + hash: md5 diff --git a/test/baseline/psternary.dvc b/test/baseline/psternary.dvc index c2878abaa1a..24c6e573e8a 100644 --- a/test/baseline/psternary.dvc +++ b/test/baseline/psternary.dvc @@ -1,5 +1,5 @@ outs: - md5: 5cfb1300b464b9bf2b24a64775dcb928.dir - size: 132430 nfiles: 3 path: psternary + hash: md5 diff --git a/test/baseline/pstext.dvc b/test/baseline/pstext.dvc index d4b72e300a1..94d5752cf91 100644 --- a/test/baseline/pstext.dvc +++ b/test/baseline/pstext.dvc @@ -1,5 +1,5 @@ outs: - md5: cc3f79d0b3d11ebdcfe61ee6096d060c.dir - size: 726418 nfiles: 16 path: pstext + hash: md5 diff --git a/test/baseline/pswiggle.dvc b/test/baseline/pswiggle.dvc index f33c1b161b4..e03d90c79cd 100644 --- a/test/baseline/pswiggle.dvc +++ b/test/baseline/pswiggle.dvc @@ -1,5 +1,5 @@ outs: - md5: a7946f021a85adadd572365252c62847.dir - size: 234197 nfiles: 2 path: pswiggle + hash: md5 diff --git a/test/baseline/psxy.dvc b/test/baseline/psxy.dvc index 530cb097b71..c70941fab9d 100644 --- a/test/baseline/psxy.dvc +++ b/test/baseline/psxy.dvc @@ -1,5 +1,5 @@ outs: - md5: 239f4bd18d38b222c7da4a1fa70bb7aa.dir - size: 9322544 nfiles: 142 path: psxy + hash: md5 diff --git a/test/baseline/psxyz.dvc b/test/baseline/psxyz.dvc index b1410b6d78f..c5c7f7df0d0 100644 --- a/test/baseline/psxyz.dvc +++ b/test/baseline/psxyz.dvc @@ -1,5 +1,5 @@ outs: - md5: e8300f3b8e45690deb50c78d03d3e548.dir - size: 1179003 nfiles: 28 path: psxyz + hash: md5 diff --git a/test/baseline/sample1d.dvc b/test/baseline/sample1d.dvc index f33a26c64a0..4552471fc7e 100644 --- a/test/baseline/sample1d.dvc +++ b/test/baseline/sample1d.dvc @@ -1,5 +1,5 @@ outs: - md5: 80fefdb9f9002469c5c61275f23d5532.dir - size: 229220 nfiles: 5 path: sample1d + hash: md5 diff --git a/test/baseline/segy.dvc b/test/baseline/segy.dvc index 27dd1dbd8f3..686a52c9aff 100644 --- a/test/baseline/segy.dvc +++ b/test/baseline/segy.dvc @@ -1,5 +1,5 @@ outs: - md5: bb87b8a2fd52352442d2a897da2d6a63.dir - size: 450775 nfiles: 5 path: segy + hash: md5 diff --git a/test/baseline/seis.dvc b/test/baseline/seis.dvc index d126bbec7fa..307758db6f8 100644 --- a/test/baseline/seis.dvc +++ b/test/baseline/seis.dvc @@ -1,5 +1,5 @@ outs: - md5: 732b3570f6a3f9291e2f6f138cdc8d0a.dir - size: 931715 nfiles: 15 path: seis + hash: md5 diff --git a/test/baseline/spectrum1d.dvc b/test/baseline/spectrum1d.dvc index e5de9d168ce..3c5c5900c7d 100644 --- a/test/baseline/spectrum1d.dvc +++ b/test/baseline/spectrum1d.dvc @@ -1,5 +1,4 @@ outs: - md5: bbf9847a80c9479aa660093b19825699.dir - size: 49045 nfiles: 1 path: spectrum1d diff --git a/test/baseline/sph.dvc b/test/baseline/sph.dvc index 695d1a008e7..d4e46b4693b 100644 --- a/test/baseline/sph.dvc +++ b/test/baseline/sph.dvc @@ -1,5 +1,5 @@ outs: - md5: fc8c98f95bfa58d37a88f740e2ad5c0a.dir - size: 2370265 nfiles: 5 path: sph + hash: md5 diff --git a/test/baseline/sph2grd.dvc b/test/baseline/sph2grd.dvc index 812995c0721..b964ee69d62 100644 --- a/test/baseline/sph2grd.dvc +++ b/test/baseline/sph2grd.dvc @@ -1,5 +1,5 @@ outs: - md5: 5b228976e91da7daa5a45ad993b53702.dir - size: 141766 nfiles: 2 path: sph2grd + hash: md5 diff --git a/test/baseline/spotter.dvc b/test/baseline/spotter.dvc index 40ad7710945..33fa223ac6c 100644 --- a/test/baseline/spotter.dvc +++ b/test/baseline/spotter.dvc @@ -1,5 +1,5 @@ outs: - md5: 1d1c9d34b7681f256a68dc0c76e88abe.dir - size: 6000305 nfiles: 11 path: spotter + hash: md5 diff --git a/test/baseline/subplot.dvc b/test/baseline/subplot.dvc index ad1367bbf69..1fab2fd648d 100644 --- a/test/baseline/subplot.dvc +++ b/test/baseline/subplot.dvc @@ -1,5 +1,5 @@ outs: - md5: b5757219e86d2bed6c0b77d3f51afc72.dir - size: 1006588 nfiles: 24 path: subplot + hash: md5 diff --git a/test/baseline/surface.dvc b/test/baseline/surface.dvc index a5e11ff89b2..f90dd0b45aa 100644 --- a/test/baseline/surface.dvc +++ b/test/baseline/surface.dvc @@ -1,5 +1,5 @@ outs: - md5: 991b70a1106508b884f81dfc6e633a67.dir - size: 450453 nfiles: 3 path: surface + hash: md5 diff --git a/test/baseline/time.dvc b/test/baseline/time.dvc index 764defb85f3..951bf00f99d 100644 --- a/test/baseline/time.dvc +++ b/test/baseline/time.dvc @@ -1,5 +1,5 @@ outs: - md5: 7f6974b5adbf3b02116789ae3a27fb68.dir - size: 116054 nfiles: 3 path: time + hash: md5 diff --git a/test/baseline/trend1d.dvc b/test/baseline/trend1d.dvc index a2822a811ac..86e4f0416d0 100644 --- a/test/baseline/trend1d.dvc +++ b/test/baseline/trend1d.dvc @@ -1,5 +1,4 @@ outs: - md5: 51905e172572bd502c27edb8d6539584.dir - size: 36199 nfiles: 1 path: trend1d diff --git a/test/baseline/trend2d.dvc b/test/baseline/trend2d.dvc index 7cfd422e778..79dd9700f21 100644 --- a/test/baseline/trend2d.dvc +++ b/test/baseline/trend2d.dvc @@ -1,5 +1,4 @@ outs: - md5: 0bb65c1c14b825e8c10172f34ac1d3db.dir - size: 115050 nfiles: 1 path: trend2d diff --git a/test/baseline/triangulate.dvc b/test/baseline/triangulate.dvc index 6ca881595b2..a21c59f61de 100644 --- a/test/baseline/triangulate.dvc +++ b/test/baseline/triangulate.dvc @@ -1,5 +1,5 @@ outs: - md5: 2962a196119a67e02c8242fb30ba1b59.dir - size: 107323 nfiles: 3 path: triangulate + hash: md5 diff --git a/test/baseline/windbarbs.dvc b/test/baseline/windbarbs.dvc index f97b5dd8b21..ce394759f4e 100644 --- a/test/baseline/windbarbs.dvc +++ b/test/baseline/windbarbs.dvc @@ -1,5 +1,5 @@ outs: - md5: 080a7857ca5509b921962ee2f9640fdd.dir - size: 458520 nfiles: 4 path: windbarbs + hash: md5 diff --git a/test/baseline/x2sys.dvc b/test/baseline/x2sys.dvc index 55bebd75845..24d0baa5914 100644 --- a/test/baseline/x2sys.dvc +++ b/test/baseline/x2sys.dvc @@ -1,5 +1,5 @@ outs: - md5: d39be5a8e995afeeffbd11dd5a761abc.dir - size: 3562931 nfiles: 6 path: x2sys + hash: md5 From eec0fc5b982ac9d721c2b99a7a15bc390da4379e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 22 May 2024 19:42:17 +0800 Subject: [PATCH 060/105] cmake: Simplify the handling of OpenMP library in CMake and set OpenMP_ROOT for macOS CI (#8494) --- ci/config-gmt-unix.sh | 5 +++++ ci/simple-gmt-tests.bat | 7 +++++-- ci/simple-gmt-tests.sh | 7 +++++-- cmake/ConfigUserAdvancedTemplate.cmake | 4 ++++ src/CMakeLists.txt | 7 +++---- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ci/config-gmt-unix.sh b/ci/config-gmt-unix.sh index bd928692ac2..b7bdf83f261 100755 --- a/ci/config-gmt-unix.sh +++ b/ci/config-gmt-unix.sh @@ -21,6 +21,11 @@ set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}") EOF +# 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 +fi + if [[ "$RUN_TESTS" == "true" ]]; then cat >> cmake/ConfigUser.cmake << 'EOF' set (CMAKE_BUILD_TYPE Debug) diff --git a/ci/simple-gmt-tests.bat b/ci/simple-gmt-tests.bat index c3b446cd506..84584360855 100644 --- a/ci/simple-gmt-tests.bat +++ b/ci/simple-gmt-tests.bat @@ -2,8 +2,8 @@ REM REM Run some simple GMT commands REM -REM Check GMT version -gmt --version +REM Check GMT splash screen +gmt REM Check GMT configuration bash %INSTALLDIR%/bin/gmt-config --all @@ -22,3 +22,6 @@ gmt grdimage @earth_relief_01d -JH10c -Baf -pdf map REM Check supplemental modules gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd + +REM Check OpenMP support +gmt grdsample @earth_relief_01d -R0/20/0/20 -I30m -Gtopo_30m.nc -x2 diff --git a/ci/simple-gmt-tests.sh b/ci/simple-gmt-tests.sh index f99cf336fd7..0a6d49135f2 100755 --- a/ci/simple-gmt-tests.sh +++ b/ci/simple-gmt-tests.sh @@ -5,8 +5,8 @@ set -x -e -# Check GMT version -gmt --version +# Check GMT splash screen +gmt # Check GMT configuration gmt-config --all @@ -28,4 +28,7 @@ gmt grdimage @earth_relief_01d -JH10c -Baf -pdf map # Check supplemental modules gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd +# Check OpenMP support +gmt grdsample @earth_relief_01d -R0/20/0/20 -I30m -Gtopo_30m.nc -x2 + set +x +e diff --git a/cmake/ConfigUserAdvancedTemplate.cmake b/cmake/ConfigUserAdvancedTemplate.cmake index 2ab0458dcfd..c909a7dca9c 100644 --- a/cmake/ConfigUserAdvancedTemplate.cmake +++ b/cmake/ConfigUserAdvancedTemplate.cmake @@ -127,6 +127,10 @@ # Set location of CURL (can be root directory or path to header file) [auto]: #set (CURL_ROOT "curl_install_prefix") +# Set location of OpenMP (can be root directory or path to header file) [auto]: +# CMake sometimes may fail to find the OpenMP library (libomp) on macOS. +#set (OpenMP_ROOT $(brew --prefix)/opt/libomp/) + # Set location of GLIB component gthread [auto]. This is an optional (and # experimental) option which you need to enable or disable: set (GMT_USE_THREADS TRUE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3844d31f83a..84ccde70f62 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -224,7 +224,7 @@ endif (LAPACK_FOUND) # Need to know if macOS and kernel is >= 22.4.0 for newLapack syntax if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - execute_process (COMMAND bash "-c" "echo ${CMAKE_HOST_SYSTEM_VERSION} | awk -F. '{if ($1 > 22 || ($1 == 22 && $2 > 3)) {print 1} else {print 0}}'" + execute_process (COMMAND bash "-c" "echo ${CMAKE_HOST_SYSTEM_VERSION} | awk -F. '{if ($1 > 22 || ($1 == 22 && $2 > 3)) {print 1} else {print 0}}'" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE ACCELERATE_NEW_LAPACK) else (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set (ACCELERATE_NEW_LAPACK 0) @@ -272,15 +272,14 @@ if (APPLE) list (APPEND GMT_OPTIONAL_LIBRARIES ${ACCELERATE_FRAMEWORK}) endif (APPLE) -find_package (OpenMP) +find_package (OpenMP COMPONENTS C) if (GMT_OPENMP) set (GMT_ENABLE_OPENMP TRUE) message (WARNING "CMake variable GMT_OPENMP is deprecated and will be removed in the future releases. Use GMT_ENABLE_OPENMP instead.") endif (GMT_OPENMP) if (OPENMP_FOUND AND GMT_ENABLE_OPENMP) + list (APPEND GMT_OPTIONAL_LIBRARIES OpenMP::OpenMP_C) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}") set (HAVE_OPENMP TRUE CACHE INTERNAL "OpenMP enabled." FORCE) set (GMT_CONFIG_OPENMP_MESSAGE "enabled" CACHE INTERNAL "OPENMP config message") elseif (OPENMP_FOUND AND NOT GMT_ENABLE_OPENMP) From 80d848df75f25fd4fdb828e00f7db9c0d3a87a17 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 24 May 2024 06:36:45 +0800 Subject: [PATCH 061/105] Fix the packaging issue on macOS M1 chips (#8496) --- cmake/dist/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/dist/CMakeLists.txt b/cmake/dist/CMakeLists.txt index 55844213f67..00b9a716eec 100644 --- a/cmake/dist/CMakeLists.txt +++ b/cmake/dist/CMakeLists.txt @@ -197,11 +197,11 @@ if (APPLE) endfunction(gp_item_default_embedded_path_override) include (BundleUtilities) - # The dir /usr/local/lib is added to address the packaging issue for Homebrew - # as reported https://github.com/GenericMappingTools/gmt/issues/6025. + # The directories /usr/local/lib;/opt/homebrew/lib are added to address the + # packaging issue for Homebrew as reported https://github.com/GenericMappingTools/gmt/issues/6025. # The root cause is unclear, possibly a cmake issue. # We should try to remove it when new cmake releases are available. - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${GMT_BINDIR}/gmt${CMAKE_EXECUTABLE_SUFFIX}\" \"\${CMAKE_INSTALL_PREFIX}/${GMT_LIBDIR}/gmt${CMAKE_EXECUTABLE_SUFFIX}/plugins/${GMT_SUPPL_LIB_NAME}.so\" \"/usr/local/lib\") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${GMT_BINDIR}/gmt${CMAKE_EXECUTABLE_SUFFIX}\" \"\${CMAKE_INSTALL_PREFIX}/${GMT_LIBDIR}/gmt${CMAKE_EXECUTABLE_SUFFIX}/plugins/${GMT_SUPPL_LIB_NAME}.so\" \"/usr/local/lib;/opt/homebrew/lib\") endif () " COMPONENT Runtime) endif (APPLE) From c7a4b02b9e3779626251a1f0aa54e591325501ac Mon Sep 17 00:00:00 2001 From: Federico Esteban Date: Mon, 27 May 2024 10:11:27 -0300 Subject: [PATCH 062/105] Fix a typo in docs (#8499) --- doc/rst/source/reference/features.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/reference/features.rst b/doc/rst/source/reference/features.rst index 98d4d86a92f..852c63dea88 100644 --- a/doc/rst/source/reference/features.rst +++ b/doc/rst/source/reference/features.rst @@ -921,7 +921,7 @@ specification. The line attribute modifiers are: visible line. Do this by specifying the desired offset between the terminal point and the start of the visible line. Unless you are giving distances in Cartesian data units, please append the distance unit, **u**. Depending on your desired effect, you can append - plot distance units (i.e., **c**\ m, **i**\ nch, **p**\ oint; Section `Dimension units`_)) or map distance units, + plot distance units (i.e., **c**\ m, **i**\ nch, **p**\ oint; Section `Dimension units`_) or map distance units, such as **k**\ m, **d**\ egrees, and many other standard distance units listed in Section `GMT units`_. If only one offset is given then it applies equally to both ends of the line. Give two slash-separated distances to indicate different offsets at the From 1f89db9d6b4fe84dc30d8973f549ca18ff772837 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 27 May 2024 22:37:14 +0800 Subject: [PATCH 063/105] CI: Add the dvc '--no-run-cache' option to avoid temporary dvc issues --- .github/workflows/docs.yml | 3 +-- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e07da6a3fa1..4a7a845a7eb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -87,9 +87,8 @@ jobs: run: bash ci/download-coastlines.sh if: steps.cache-coastline.outputs.cache-hit != 'true' - # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote - run: dvc pull + run: dvc pull --no-run-cache - name: Configure GMT run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e003d470c5..c16c09161a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -135,7 +135,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Pull baseline image data from dvc remote - run: dvc pull + run: dvc pull --no-run-cache - name: Install GMT run: | From e0bfaa0cdc201bdad6a567cd075b4dfe9949778e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 29 May 2024 13:30:58 +0800 Subject: [PATCH 064/105] CI: Install dvc via conda on macOS (#8500) --- ci/install-dependencies-macos.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/install-dependencies-macos.sh b/ci/install-dependencies-macos.sh index e6e51ba694e..d2af804cb62 100755 --- a/ci/install-dependencies-macos.sh +++ b/ci/install-dependencies-macos.sh @@ -22,13 +22,14 @@ conda_packages="ghostscript=10.03.0" # packages for build documentation if [ "$BUILD_DOCS" = "true" ]; then - packages+=" dvc pngquant" - conda_packages+=" sphinx" + packages+=" pngquant" + conda_packages+=" sphinx dvc" fi # packages for running GMT tests if [ "$RUN_TESTS" = "true" ]; then - packages+=" dvc graphicsmagick" + packages+=" graphicsmagick" + conda_packages+=" dvc" fi if [ "$PACKAGE" = "true" ]; then From 5e53ea34ea4d6163c9ce9d4f52abb91df9cbc6a7 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 31 May 2024 17:29:04 +0800 Subject: [PATCH 065/105] cmake: Set GMT_BUILD_DATE to the current date or the last commit date (#8501) --- cmake/modules/ConfigCMake.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cmake/modules/ConfigCMake.cmake b/cmake/modules/ConfigCMake.cmake index 060d76c37b1..b9b573f7df9 100644 --- a/cmake/modules/ConfigCMake.cmake +++ b/cmake/modules/ConfigCMake.cmake @@ -59,9 +59,6 @@ endif (NOT CMAKE_BUILD_TYPE) # Here we change it to add the git commit hash for non-public releases set (GMT_PACKAGE_VERSION_WITH_GIT_REVISION ${GMT_PACKAGE_VERSION}) -# ... -set (GMT_BUILD_DATE ${GMT_BUILD_DATE}) - # Check if it's a git repository or not if (EXISTS ${GMT_SOURCE_DIR}/.git) set (HAVE_GIT_VERSION TRUE) @@ -95,11 +92,15 @@ if (GIT_FOUND AND HAVE_GIT_VERSION AND NOT GMT_PUBLIC_RELEASE) endif (GIT_RETURN_CODE) endif (GIT_FOUND AND HAVE_GIT_VERSION AND NOT GMT_PUBLIC_RELEASE) -execute_process (COMMAND ${GIT_EXECUTABLE} log -1 --date=short --pretty=format:%cd - WORKING_DIRECTORY ${GMT_SOURCE_DIR} - OUTPUT_VARIABLE GMT_BUILD_DATE - OUTPUT_STRIP_TRAILING_WHITESPACE) -string(REPLACE "-" "." GMT_BUILD_DATE "${GMT_BUILD_DATE}") +# Set the GMT building date +string(TIMESTAMP GMT_BUILD_DATE "%Y.%m.%d" UTC) # Default to current year. +if (HAVE_GIT_VERSION) + execute_process (COMMAND ${GIT_EXECUTABLE} log -1 --date=short --pretty=format:%cd + WORKING_DIRECTORY ${GMT_SOURCE_DIR} + OUTPUT_VARIABLE GMT_BUILD_DATE + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REPLACE "-" "." GMT_BUILD_DATE "${GMT_BUILD_DATE}") +endif (HAVE_GIT_VERSION) # apply license restrictions if (LICENSE_RESTRICTED) # on From 58b5bea327aeb62b5b3cda6c07070cb8b7449ba3 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 31 May 2024 23:17:03 +0800 Subject: [PATCH 066/105] CI: Cache GSHHG and DCW data as artifacts to simplify workflows (#8481) --- .github/workflows/build.yml | 28 ++++++++------------- .github/workflows/ci-caches.yml | 27 ++++++++++++++++++--- .github/workflows/docker.yml | 43 ++++++++++++++------------------- .github/workflows/docs.yml | 27 ++++++--------------- .github/workflows/tests.yml | 26 +++++++------------- 5 files changed, 68 insertions(+), 83 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6aee280b505..990c8e8ed33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup conda + - name: Setup conda (macOS) uses: conda-incubator/setup-miniconda@v3 if: runner.os == 'macOS' @@ -84,16 +84,10 @@ jobs: env: EXCLUDE_OPTIONAL: ${{ matrix.EXCLUDE_OPTIONAL }} - - name: Cache GSHHG and DCW data - uses: actions/cache@v4 - id: cache-coastline - with: - path: ${{ env.COASTLINEDIR }} - key: coastline-${{ hashFiles('ci/download-coastlines.sh') }} - - - name: Download coastlines - run: bash ci/download-coastlines.sh - if: steps.cache-coastline.outputs.cache-hit != 'true' + - name: Download GSHHG and DCW data + run: gh run download -n coastline-cache -D coastline + env: + GH_TOKEN: ${{ github.token }} - name: Configure GMT run: | @@ -121,13 +115,6 @@ jobs: cmake --build . if: runner.os == 'Windows' - - name: Download cached GMT remote data from GitHub Artifacts - run: | - gh run download -n gmt-cache -D ~/.gmt/static/ - ls -lRh ~/.gmt/static/ - env: - GH_TOKEN: ${{ github.token }} - - name: Install GMT run: | cd build @@ -135,6 +122,11 @@ jobs: # Add GMT PATH to bin echo "${INSTALLDIR}/bin" >> $GITHUB_PATH + - name: Download cached GMT remote data from GitHub Artifacts + run: gh run download -n gmt-cache -D ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} + - name: Check a few simple commands run: bash ci/simple-gmt-tests.sh diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index a11765d917c..d07c13b6b6e 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -2,7 +2,8 @@ # Create CI caches for: # # 1. GMT remote data for building documentation and running tests -# 2. vcpkg libraries on Windows +# 2. GMT GSHHG and DCW datasets +# 3. vcpkg libraries on Windows # name: GMT CI Caches @@ -105,8 +106,28 @@ jobs: uses: actions/upload-artifact@v4 with: name: gmt-cache - path: | - ~/.gmt/static + path: ~/.gmt/static + + coastline_cache: + name: Cache GSHHG and DCW datasets + runs-on: ubuntu-latest + env: + COASTLINEDIR: ${{ github.workspace }}/coastline + + steps: + - name: Checkout + uses: actions/checkout@v4.1.4 + + - name: Download GSHHG and DCW datasets + run: bash ci/download-coastlines.sh + env: + COASTLINEDIR: ${{ env.COASTLINEDIR }} + + - name: Upload artifacts to GitHub + uses: actions/upload-artifact@v4 + with: + name: coastline-cache + path: ${{ env.COASTLINEDIR }} vcpkg_cache: name: Cache vcpkg libraries diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dc742e0d8b2..a0f69a6c05c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -67,9 +67,6 @@ jobs: - fedora:rawhide # rolling release with latest versions steps: - - name: Checkout - uses: actions/checkout@v4.1.4 - - name: Install GMT dependencies run: | os=$(cat /etc/os-release | grep "^ID=" | awk -F= '{print $2}') @@ -83,24 +80,29 @@ jobs: ghostscript curl git apt reinstall -y ca-certificates update-ca-certificates + # Install gh from binary deb package + curl -LO https://github.com/cli/cli/releases/download/v2.49.0/gh_2.49.0_linux_amd64.deb + apt install ./gh_2.49.0_linux_amd64.deb elif [[ "$os" = "fedora" ]]; then dnf install -y \ cmake ninja-build \ libcurl-devel netcdf-devel gdal-devel gdal \ fftw3-devel pcre-devel lapack-devel openblas-devel glib2-devel \ - ghostscript openssl + ghostscript openssl gh fi - - name: Cache GSHHG and DCW data - uses: actions/cache@v4 - id: cache-coastline - with: - path: ${{ env.COASTLINEDIR }} - key: coastline-${{ hashFiles('ci/download-coastlines.sh') }} + - name: Checkout + uses: actions/checkout@v4.1.4 + + # Fix the git error: + # "failed to run git: fatal: detected dubious ownership in repository at '/__w/gmt/gmt'" + - name: Fixup git + run: git config --global --add safe.directory $GITHUB_WORKSPACE - - name: Download coastlines - run: bash ci/download-coastlines.sh - if: steps.cache-coastline.outputs.cache-hit != 'true' + - name: Download GSHHG and DCW data + run: gh run download -n coastline-cache -D coastline + env: + GH_TOKEN: ${{ github.token }} - name: Configure GMT run: bash ci/config-gmt-unix.sh @@ -116,18 +118,9 @@ jobs: echo "${INSTALLDIR}/bin" >> $GITHUB_PATH - name: Download cached GMT remote data from GitHub Artifacts - uses: dawidd6/action-download-artifact@v3.1.4 - with: - workflow: ci-caches.yml - name: gmt-cache - path: gmt-cache - - # Move downloaded files to ~/.gmt directory and list them - - name: Move and list downloaded remote files - run: | - mkdir -p ~/.gmt/static/ - mv gmt-cache/* ~/.gmt/static/ - ls -lRh ~/.gmt/static/ + run: gh run download -n gmt-cache -D ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} - name: Check a few simple commands run: bash ci/simple-gmt-tests.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4a7a845a7eb..afae1dc3dd3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -65,7 +65,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup conda + - name: Setup conda (macOS) uses: conda-incubator/setup-miniconda@v3 if: runner.os == 'macOS' @@ -76,19 +76,10 @@ jobs: os=$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]') bash ci/install-dependencies-${os}.sh - - name: Cache GSHHG and DCW data - uses: actions/cache@v4 - id: cache-coastline - with: - path: ${{ env.COASTLINEDIR }} - key: coastline-${{ hashFiles('ci/download-coastlines.sh') }} - - - name: Download coastlines - run: bash ci/download-coastlines.sh - if: steps.cache-coastline.outputs.cache-hit != 'true' - - - name: Pull baseline image data from dvc remote - run: dvc pull --no-run-cache + - name: Download GSHHG and DCW data + run: gh run download -n coastline-cache -D coastline + env: + GH_TOKEN: ${{ github.token }} - name: Configure GMT run: | @@ -116,12 +107,8 @@ jobs: cmake --build . if: runner.os == 'Windows' - - name: Download cached GMT remote data from GitHub Artifacts - run: | - gh run download -n gmt-cache -D ~/.gmt/static/ - ls -lRh ~/.gmt/static/ - env: - GH_TOKEN: ${{ github.token }} + - name: Pull baseline image data from dvc remote + run: dvc pull --no-run-cache - name: Build documentation run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c16c09161a9..b61ce90e5b7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,16 +90,10 @@ jobs: New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.02" -Name GS_LIB -PropertyType String -Value "C:\Miniconda\Library\bin;C:\Miniconda\Library\lib;C\Miniconda\Library\Font;C:\Miniconda\Library\fonts" if: runner.os == 'Windows' - - name: Cache GSHHG and DCW data - uses: actions/cache@v4 - id: cache-coastline - with: - path: ${{ env.COASTLINEDIR }} - key: coastline-${{ hashFiles('ci/download-coastlines.sh') }} - - - name: Download coastlines - run: bash ci/download-coastlines.sh - if: steps.cache-coastline.outputs.cache-hit != 'true' + - name: Download GSHHG and DCW data + run: gh run download -n coastline-cache -D coastline + env: + GH_TOKEN: ${{ github.token }} - name: Configure GMT run: | @@ -127,13 +121,6 @@ jobs: cmake --build . if: runner.os == 'Windows' - - name: Download cached GMT remote data from GitHub Artifacts - run: | - gh run download -n gmt-cache -D ~/.gmt/static/ - ls -lRh ~/.gmt/static/ - env: - GH_TOKEN: ${{ github.token }} - - name: Pull baseline image data from dvc remote run: dvc pull --no-run-cache @@ -144,6 +131,11 @@ jobs: # Add GMT PATH to bin echo "${INSTALLDIR}/bin" >> $GITHUB_PATH + - name: Download cached GMT remote data from GitHub Artifacts + run: gh run download -n gmt-cache -D ~/.gmt/static/ + env: + GH_TOKEN: ${{ github.token }} + - name: Check a few simple commands run: bash ci/simple-gmt-tests.sh From 53adb4ada6229ff3229ad951c9491a4cc9c91986 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:06:36 +0800 Subject: [PATCH 067/105] Bump actions/checkout from 4.1.4 to 4.1.6 (#8504) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.4...v4.1.6) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/check-links.yml | 2 +- .github/workflows/ci-caches.yml | 4 ++-- .github/workflows/code-validator.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 4 ++-- .github/workflows/dvc-diff.yml | 2 +- .github/workflows/lint-checker.yml | 2 +- .github/workflows/release-baseline-images.yml | 2 +- .github/workflows/remind.yml | 2 +- .github/workflows/tests.yml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 990c8e8ed33..f4cfe398f93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Setup vcpkg (Windows) run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 47bc140376b..132d0db3d9d 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout the repository - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Link Checker id: lychee diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index d07c13b6b6e..f9e58b94e9a 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -116,7 +116,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Download GSHHG and DCW datasets run: bash ci/download-coastlines.sh @@ -135,7 +135,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Install vcpkg libraries run: bash ci/install-dependencies-windows.sh diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index 7dccdd49ae6..5995bf5f3a9 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Check PSL_strings.h run: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a0f69a6c05c..c783070beaa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -92,7 +92,7 @@ jobs: fi - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 # Fix the git error: # "failed to run git: fatal: detected dubious ownership in repository at '/__w/gmt/gmt'" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index afae1dc3dd3..6c4e9c76e13 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Setup vcpkg (Windows) run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ @@ -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.4 + uses: actions/checkout@v4.1.6 with: ref: gh-pages # Checkout to this folder instead of the current one diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index 908c88eab91..bf5424c4945 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml index a3de420b374..565f03108be 100644 --- a/.github/workflows/lint-checker.yml +++ b/.github/workflows/lint-checker.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Install cppcheck run: | diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index 2c515fbd3d3..99482be1111 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Setup data version control (DVC) uses: iterative/setup-dvc@v1.1.2 diff --git a/.github/workflows/remind.yml b/.github/workflows/remind.yml index a2b62723d6a..d6e3de50de3 100644 --- a/.github/workflows/remind.yml +++ b/.github/workflows/remind.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Find and report known failures run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b61ce90e5b7..f0115cceef6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.1.6 - name: Setup vcpkg (Windows) run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ From 5e0a07d6422528f3f2c355973030f3be4ab93ba1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:07:01 +0800 Subject: [PATCH 068/105] Bump codecov/codecov-action from 4.3.1 to 4.4.1 (#8505) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.1 to 4.4.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.3.1...v4.4.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f0115cceef6..a6ffb2246b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -173,7 +173,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.3.1 + uses: codecov/codecov-action@v4.4.1 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 69e9c4f7efcec59b7c9fc0ef22fd1af73a9c5150 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 1 Jun 2024 20:43:14 +0800 Subject: [PATCH 069/105] CI: Fix the missing images in the docs. Patches #8481 --- .github/workflows/docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6c4e9c76e13..cfc992aecd3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -81,6 +81,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} + - name: Pull baseline image data from dvc remote + run: dvc pull --no-run-cache + - name: Configure GMT run: | if [ "$RUNNER_OS" != "Windows" ]; then @@ -107,9 +110,6 @@ jobs: cmake --build . if: runner.os == 'Windows' - - name: Pull baseline image data from dvc remote - run: dvc pull --no-run-cache - - name: Build documentation run: | set -x -e From cc9c85b75c31d142bf4276c8447db70970cc1277 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:23:17 +0800 Subject: [PATCH 070/105] Bump sphinx-design from 0.5.0 to 0.6.0 in /doc/rst (#8503) Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- doc/rst/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/requirements.txt b/doc/rst/requirements.txt index df42ea86291..806a1f57e7b 100644 --- a/doc/rst/requirements.txt +++ b/doc/rst/requirements.txt @@ -6,7 +6,7 @@ # sphinx_rtd_theme==2.0.0 sphinx-copybutton==0.5.2 -sphinx-design==0.5.0 +sphinx-design==0.6.0 sphinx-jinja==2.0.2 sphinx-togglebutton==0.3.2 sphinxcontrib-youtube==1.4.1 From 9454b08b3986de33e2b0470c38d5afa8e7338400 Mon Sep 17 00:00:00 2001 From: Leonardo Taglialegne Date: Sun, 2 Jun 2024 01:15:38 +0200 Subject: [PATCH 071/105] Using gmt in NixOS (#8506) --- doc/rst/source/install.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/rst/source/install.rst b/doc/rst/source/install.rst index 916214f90ab..06aabc7d338 100644 --- a/doc/rst/source/install.rst +++ b/doc/rst/source/install.rst @@ -278,6 +278,15 @@ Install GMT via: sudo emerge --verbose --ask sci-geosciences/gmt +NixOS +~~~~~ + +Install GMT by adding these packages to your system (or home-manager) configuration: + +:: + + gmt gshhg-gmt dcw-gmt + Cross Platform Install Instructions ----------------------------------- From c59b3a1e3e72dbb73824862f86c07ac663862f44 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 2 Jun 2024 10:36:25 +0800 Subject: [PATCH 072/105] doc: Remove the cookbook GMT_THEME setting from more scripts (#8488) --- doc/scripts/GMT_-B_custom.sh | 1 - doc/scripts/GMT_-B_geo_1.sh | 1 - doc/scripts/GMT_-B_geo_2.sh | 1 - doc/scripts/GMT_-B_linear.sh | 1 - doc/scripts/GMT_-B_log.sh | 1 - doc/scripts/GMT_-B_pow.sh | 1 - doc/scripts/GMT_-B_time1.sh | 1 - doc/scripts/GMT_-B_time2.sh | 7 +++---- doc/scripts/GMT_-B_time3.sh | 1 - doc/scripts/GMT_-B_time4.sh | 1 - doc/scripts/GMT_-B_time5.sh | 1 - doc/scripts/GMT_-B_time6.sh | 1 - doc/scripts/GMT_-B_time7.sh | 1 - doc/scripts/GMT_colorbar.sh | 1 - doc/scripts/images/GMT_-B_custom.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_geo_1.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_geo_2.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_linear.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_log.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_pow.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time1.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time2.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time3.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time4.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time5.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time6.ps.dvc | 4 ++-- doc/scripts/images/GMT_-B_time7.ps.dvc | 4 ++-- doc/scripts/images/GMT_colorbar.ps.dvc | 4 ++-- 28 files changed, 31 insertions(+), 45 deletions(-) diff --git a/doc/scripts/GMT_-B_custom.sh b/doc/scripts/GMT_-B_custom.sh index d24307c2bbe..17d876632b5 100755 --- a/doc/scripts/GMT_-B_custom.sh +++ b/doc/scripts/GMT_-B_custom.sh @@ -19,7 +19,6 @@ cat << EOF >| yannots.txt EOF gmt begin GMT_-B_custom - gmt set GMT_THEME cookbook gmt basemap -R416/542/0/6.2831852 -JX-12c/6c -Bpx25f5g25+u" Ma" -Bpycyannots.txt -Bsxcxannots.txt -BWS+glightblue \ --MAP_ANNOT_OFFSET_SECONDARY=10p --MAP_GRID_PEN_SECONDARY=2p gmt end show diff --git a/doc/scripts/GMT_-B_geo_1.sh b/doc/scripts/GMT_-B_geo_1.sh index 5ee5a3d69fc..63041e9c55e 100755 --- a/doc/scripts/GMT_-B_geo_1.sh +++ b/doc/scripts/GMT_-B_geo_1.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_geo_1 - gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF gmt basemap -R-1/2/0/0.4 -JM3i -Ba1f15mg5m -BS gmt plot -Sv2p+e+a60 -W0.5p -Gblack -Y-0.35i -N << EOF diff --git a/doc/scripts/GMT_-B_geo_2.sh b/doc/scripts/GMT_-B_geo_2.sh index 61e354886f2..6e14b5bcc1e 100755 --- a/doc/scripts/GMT_-B_geo_2.sh +++ b/doc/scripts/GMT_-B_geo_2.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_geo_2 - gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF FONT_ANNOT_PRIMARY +9p gmt basemap -R-2/1/0/0.35 -JM4i -Bpa15mf5mg5m -BwSe -Bs1f30mg15m --MAP_FRAME_TYPE=fancy-rounded \ --MAP_GRID_PEN_PRIMARY=thinnest,black,. --MAP_GRID_CROSS_SIZE_SECONDARY=0.1i \ diff --git a/doc/scripts/GMT_-B_linear.sh b/doc/scripts/GMT_-B_linear.sh index fce8db72021..85a6dd3b8d1 100755 --- a/doc/scripts/GMT_-B_linear.sh +++ b/doc/scripts/GMT_-B_linear.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_linear - gmt set GMT_THEME cookbook gmt basemap -R0/12/0/0.95 -JX7.5c/0.75c -Ba4f2g1+lFrequency+u" %" -BS gmt plot -Sv2p+e+a60 -W0.5p -Gblack -Y0.25c -N << EOF 2 0 0 0.5 diff --git a/doc/scripts/GMT_-B_log.sh b/doc/scripts/GMT_-B_log.sh index 9fe7830b597..4662423b0e9 100755 --- a/doc/scripts/GMT_-B_log.sh +++ b/doc/scripts/GMT_-B_log.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_log - gmt set GMT_THEME cookbook gmt set MAP_GRID_PEN_PRIMARY thinnest,. gmt basemap -R1/1000/0/1 -JX7.5cl/0.6c -B1f2g3p+l"Axis Label" -BS gmt basemap -B1f2g3l+l"Axis Label" -BS -Y2.15c diff --git a/doc/scripts/GMT_-B_pow.sh b/doc/scripts/GMT_-B_pow.sh index 4e029a0c933..b914af99c9e 100755 --- a/doc/scripts/GMT_-B_pow.sh +++ b/doc/scripts/GMT_-B_pow.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_pow - gmt set GMT_THEME cookbook gmt set MAP_GRID_PEN_PRIMARY thinnest,. gmt basemap -R0/100/0/0.9 -JX3ip0.5/0.25i -Ba3f2g1p+l"Axis Label" -BS gmt basemap -Ba20f10g5+l"Axis Label" -BS -Y0.85i diff --git a/doc/scripts/GMT_-B_time1.sh b/doc/scripts/GMT_-B_time1.sh index a20045995c5..db53b194e64 100755 --- a/doc/scripts/GMT_-B_time1.sh +++ b/doc/scripts/GMT_-B_time1.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time1 - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP=-o FONT_ANNOT_PRIMARY +9p gmt basemap -R2000-4-1T/2000-5-25T/0/1 -JX12c/0.5c -Bpxa7Rf1d -Bsxa1O -BS gmt end show diff --git a/doc/scripts/GMT_-B_time2.sh b/doc/scripts/GMT_-B_time2.sh index 5c9ae477506..d188ce65938 100755 --- a/doc/scripts/GMT_-B_time2.sh +++ b/doc/scripts/GMT_-B_time2.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time2 - gmt set GMT_THEME cookbook - gmt set FORMAT_DATE_MAP "o dd" FORMAT_CLOCK_MAP hh:mm FONT_ANNOT_PRIMARY +9p - gmt basemap -R1969-7-21T/1969-7-23T/0/1 -JX12c/0.5c -Bpxa6Hf1h -Bsxa1K -BS - gmt basemap -Bpxa6Hf1h -Bsxa1D -BS -Y1.6c + gmt set FORMAT_DATE_MAP "o dd" FORMAT_CLOCK_MAP hh:mm FONT_ANNOT_PRIMARY +9p + gmt basemap -R1969-7-21T/1969-7-23T/0/1 -JX12c/0.5c -Bpxa6Hf1h -Bsxa1K -BS + gmt basemap -Bpxa6Hf1h -Bsxa1D -BS -Y1.6c gmt end show diff --git a/doc/scripts/GMT_-B_time3.sh b/doc/scripts/GMT_-B_time3.sh index 8c7e2f5c22e..1bf216592fc 100755 --- a/doc/scripts/GMT_-B_time3.sh +++ b/doc/scripts/GMT_-B_time3.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time3 - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP o FORMAT_TIME_PRIMARY_MAP Character FONT_ANNOT_PRIMARY +9p gmt basemap -R1997T/1999T/0/1 -JX12c/0.5c -Bpxa3Of1o -Bsxa1Y -BS gmt end show diff --git a/doc/scripts/GMT_-B_time4.sh b/doc/scripts/GMT_-B_time4.sh index e3ad1d8044c..0f17877ee53 100755 --- a/doc/scripts/GMT_-B_time4.sh +++ b/doc/scripts/GMT_-B_time4.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time4 - gmt set GMT_THEME cookbook gmt set FORMAT_CLOCK_MAP=-hham FONT_ANNOT_PRIMARY +9p TIME_UNIT d gmt basemap -R0.2t/0.35t/0/1 -JX-12c/0.5c -Bpxa15mf5m -Bsxa1H -BS gmt end show diff --git a/doc/scripts/GMT_-B_time5.sh b/doc/scripts/GMT_-B_time5.sh index 19ed8782dd4..d6671d20f33 100755 --- a/doc/scripts/GMT_-B_time5.sh +++ b/doc/scripts/GMT_-B_time5.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time5 - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP u FORMAT_TIME_PRIMARY_MAP Character FORMAT_TIME_SECONDARY_MAP full FONT_ANNOT_PRIMARY +9p gmt basemap -R1969-7-21T/1969-8-9T/0/1 -JX12c/0.5c -Bpxa1K -Bsxa1U -BS gmt set FORMAT_DATE_MAP o TIME_WEEK_START Sunday FORMAT_TIME_SECONDARY_MAP Character diff --git a/doc/scripts/GMT_-B_time6.sh b/doc/scripts/GMT_-B_time6.sh index 6fa73afab92..e6c21afc159 100755 --- a/doc/scripts/GMT_-B_time6.sh +++ b/doc/scripts/GMT_-B_time6.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time6 - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP "o yy" FORMAT_TIME_PRIMARY_MAP Abbreviated gmt basemap -R1996T/1996-6T/0/1 -JX12c/0.5c -Bxa1Of1d -BS gmt end show diff --git a/doc/scripts/GMT_-B_time7.sh b/doc/scripts/GMT_-B_time7.sh index fbd8ff5fe90..e0470160aad 100755 --- a/doc/scripts/GMT_-B_time7.sh +++ b/doc/scripts/GMT_-B_time7.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-B_time7 - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP jjj TIME_INTERVAL_FRACTION 0.05 FONT_ANNOT_PRIMARY +9p gmt basemap -R2000-12-15T/2001-1-15T/0/1 -JX12c/0.5c -Bpxa5Df1d -Bsxa1Y -BS gmt end show diff --git a/doc/scripts/GMT_colorbar.sh b/doc/scripts/GMT_colorbar.sh index 977a7c4a33b..a0225759205 100755 --- a/doc/scripts/GMT_colorbar.sh +++ b/doc/scripts/GMT_colorbar.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_colorbar - gmt set GMT_THEME cookbook gmt makecpt -T-15/15 -Cpolar gmt basemap -R0/20/0/1 -JM5i -BWse -B gmt colorbar -C -Bx+u"@." -By+l@~D@~T -DJBC+e diff --git a/doc/scripts/images/GMT_-B_custom.ps.dvc b/doc/scripts/images/GMT_-B_custom.ps.dvc index f7f681a403e..431227e01f5 100644 --- a/doc/scripts/images/GMT_-B_custom.ps.dvc +++ b/doc/scripts/images/GMT_-B_custom.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 0729013d43b0fc97070ac0b19c145695 - size: 24320 +- md5: 721c72ddec3b4efdfdd182666b8112bb + size: 24319 hash: md5 path: GMT_-B_custom.ps diff --git a/doc/scripts/images/GMT_-B_geo_1.ps.dvc b/doc/scripts/images/GMT_-B_geo_1.ps.dvc index 5554af16bdc..91a565a42bf 100644 --- a/doc/scripts/images/GMT_-B_geo_1.ps.dvc +++ b/doc/scripts/images/GMT_-B_geo_1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 89c18eb283357b7628e37fe5ba38f2a3 - size: 24898 +- md5: 1c7e66c36efedba19065c646ec522b41 + size: 24946 hash: md5 path: GMT_-B_geo_1.ps diff --git a/doc/scripts/images/GMT_-B_geo_2.ps.dvc b/doc/scripts/images/GMT_-B_geo_2.ps.dvc index 59fc69a1a59..a4cec4d85e0 100644 --- a/doc/scripts/images/GMT_-B_geo_2.ps.dvc +++ b/doc/scripts/images/GMT_-B_geo_2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 621b8cd19bc481cf93de35ec09bc0f3a - size: 29682 +- md5: e2775fc72219b0fdfc1ed72bf0ad5831 + size: 29696 hash: md5 path: GMT_-B_geo_2.ps diff --git a/doc/scripts/images/GMT_-B_linear.ps.dvc b/doc/scripts/images/GMT_-B_linear.ps.dvc index 2e1a1019d11..9f3dfee3249 100644 --- a/doc/scripts/images/GMT_-B_linear.ps.dvc +++ b/doc/scripts/images/GMT_-B_linear.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 338e7d50d6df5004d3e18c481a55b48a - size: 25033 +- md5: 336e95b954a420730a79610cc19dde9b + size: 25055 hash: md5 path: GMT_-B_linear.ps diff --git a/doc/scripts/images/GMT_-B_log.ps.dvc b/doc/scripts/images/GMT_-B_log.ps.dvc index ccd49bde36b..553bcb29d16 100644 --- a/doc/scripts/images/GMT_-B_log.ps.dvc +++ b/doc/scripts/images/GMT_-B_log.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 6e8b5000ac8dc5a7cf0f7c896f06bd5e - size: 27049 +- md5: 6fec1567f378c17673ed28d6c6a17f8f + size: 27051 hash: md5 path: GMT_-B_log.ps diff --git a/doc/scripts/images/GMT_-B_pow.ps.dvc b/doc/scripts/images/GMT_-B_pow.ps.dvc index cdd728c6386..f0e158ec513 100644 --- a/doc/scripts/images/GMT_-B_pow.ps.dvc +++ b/doc/scripts/images/GMT_-B_pow.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 0855ede68e3476b4d06ae8f99f142ac3 - size: 24132 +- md5: 7ccf37400c29b9073d8286d1c2f2d5b7 + size: 24146 hash: md5 path: GMT_-B_pow.ps diff --git a/doc/scripts/images/GMT_-B_time1.ps.dvc b/doc/scripts/images/GMT_-B_time1.ps.dvc index 8e2b13b3c6d..79fbac35f3a 100644 --- a/doc/scripts/images/GMT_-B_time1.ps.dvc +++ b/doc/scripts/images/GMT_-B_time1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 797ad940417875b0935c3adaea66ef30 - size: 23623 +- md5: 8188eafa2915239800e3b85e686a8ab4 + size: 23622 hash: md5 path: GMT_-B_time1.ps diff --git a/doc/scripts/images/GMT_-B_time2.ps.dvc b/doc/scripts/images/GMT_-B_time2.ps.dvc index 117e6740dfa..5b46a8fdc27 100644 --- a/doc/scripts/images/GMT_-B_time2.ps.dvc +++ b/doc/scripts/images/GMT_-B_time2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 88981c3aad503684e9d925c8a7d51bae - size: 25735 +- md5: 19f6eff9f70bee146fadf4680611966c + size: 25734 hash: md5 path: GMT_-B_time2.ps diff --git a/doc/scripts/images/GMT_-B_time3.ps.dvc b/doc/scripts/images/GMT_-B_time3.ps.dvc index 464c9dbf790..143a0e35b96 100644 --- a/doc/scripts/images/GMT_-B_time3.ps.dvc +++ b/doc/scripts/images/GMT_-B_time3.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 20ba40ffce4cb79191b7efe13c953feb - size: 22939 +- md5: a533591e73f0901354c275475cf52960 + size: 22938 hash: md5 path: GMT_-B_time3.ps diff --git a/doc/scripts/images/GMT_-B_time4.ps.dvc b/doc/scripts/images/GMT_-B_time4.ps.dvc index cfef52c5823..bf57e00e30f 100644 --- a/doc/scripts/images/GMT_-B_time4.ps.dvc +++ b/doc/scripts/images/GMT_-B_time4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 02c352f243665ddd2dcc03245e6eee29 - size: 23539 +- md5: aa9c9a50b73a87f914ed000dc93494fd + size: 23538 hash: md5 path: GMT_-B_time4.ps diff --git a/doc/scripts/images/GMT_-B_time5.ps.dvc b/doc/scripts/images/GMT_-B_time5.ps.dvc index b936a897b0b..270141d9f1d 100644 --- a/doc/scripts/images/GMT_-B_time5.ps.dvc +++ b/doc/scripts/images/GMT_-B_time5.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 8bfa92723bc3d34592b707883c942cf8 - size: 24907 +- md5: 2f5f95fa99eb166e00411a90e94e29d0 + size: 24906 hash: md5 path: GMT_-B_time5.ps diff --git a/doc/scripts/images/GMT_-B_time6.ps.dvc b/doc/scripts/images/GMT_-B_time6.ps.dvc index a5c4fd2fa0b..8659accb2af 100644 --- a/doc/scripts/images/GMT_-B_time6.ps.dvc +++ b/doc/scripts/images/GMT_-B_time6.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 1d21cf4c294bbe14aebbb8f7a7fb55e1 - size: 25372 +- md5: ed26eb286f1cf7ff5fba4d3b7127d83c + size: 25371 hash: md5 path: GMT_-B_time6.ps diff --git a/doc/scripts/images/GMT_-B_time7.ps.dvc b/doc/scripts/images/GMT_-B_time7.ps.dvc index 88d809e6a7d..2f7af18f3d3 100644 --- a/doc/scripts/images/GMT_-B_time7.ps.dvc +++ b/doc/scripts/images/GMT_-B_time7.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: bdf67a8da1c8e6649f3753ade3d98677 - size: 23064 +- md5: 655c39a000c59971982ee5aa10732d68 + size: 23063 hash: md5 path: GMT_-B_time7.ps diff --git a/doc/scripts/images/GMT_colorbar.ps.dvc b/doc/scripts/images/GMT_colorbar.ps.dvc index e0da71ae36e..c259bd431bb 100644 --- a/doc/scripts/images/GMT_colorbar.ps.dvc +++ b/doc/scripts/images/GMT_colorbar.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 24089afadb2e56194010c4bd22f2b6f0 - size: 26948 +- md5: 33f3046e099b3cb82dd525be715d5e67 + size: 26608 hash: md5 path: GMT_colorbar.ps From 40a234514653ce5aa592cab7aeaae0b6142e0228 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 2 Jun 2024 22:50:21 +0800 Subject: [PATCH 073/105] doc: Remove GMT_THEME setting from GMT_tut_*.sh scripts (#8507) --- doc/scripts/GMT_tut_1.sh | 1 - doc/scripts/GMT_tut_10.sh | 1 - doc/scripts/GMT_tut_11.sh | 1 - doc/scripts/GMT_tut_12.sh | 1 - doc/scripts/GMT_tut_13.sh | 1 - doc/scripts/GMT_tut_14.sh | 1 - doc/scripts/GMT_tut_15.sh | 1 - doc/scripts/GMT_tut_16.sh | 1 - doc/scripts/GMT_tut_17.sh | 1 - doc/scripts/GMT_tut_18.sh | 1 - doc/scripts/GMT_tut_19.sh | 1 - doc/scripts/GMT_tut_2.sh | 1 - doc/scripts/GMT_tut_3.sh | 1 - doc/scripts/GMT_tut_4.sh | 1 - doc/scripts/GMT_tut_5.sh | 1 - doc/scripts/GMT_tut_6.sh | 1 - doc/scripts/GMT_tut_7.sh | 1 - doc/scripts/GMT_tut_8.sh | 1 - doc/scripts/GMT_tut_9.sh | 1 - doc/scripts/images/GMT_tut_1.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_10.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_11.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_12.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_13.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_14.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_15.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_16.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_17.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_18.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_19.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_2.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_3.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_4.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_6.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_7.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_8.ps.dvc | 4 ++-- doc/scripts/images/GMT_tut_9.ps.dvc | 4 ++-- 37 files changed, 36 insertions(+), 55 deletions(-) diff --git a/doc/scripts/GMT_tut_1.sh b/doc/scripts/GMT_tut_1.sh index fe72d165b55..dff3e4e09e1 100755 --- a/doc/scripts/GMT_tut_1.sh +++ b/doc/scripts/GMT_tut_1.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_1 - gmt set GMT_THEME cookbook gmt basemap -R10/70/-3/8 -JX4i/3i -B -B+glightred+t"My first plot" gmt end show diff --git a/doc/scripts/GMT_tut_10.sh b/doc/scripts/GMT_tut_10.sh index aa9a7310672..78695bd17c9 100755 --- a/doc/scripts/GMT_tut_10.sh +++ b/doc/scripts/GMT_tut_10.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_10 - gmt set GMT_THEME cookbook gmt text -R0/7/0/5 -Jx1i -B -F+f30p,Times-Roman,DarkOrange+jBL << EOF 1 1 It's P@al, not Pal! 1 2 Try @%33%ZapfChancery@%% today diff --git a/doc/scripts/GMT_tut_11.sh b/doc/scripts/GMT_tut_11.sh index e1b34de2f6e..a497773d7c2 100755 --- a/doc/scripts/GMT_tut_11.sh +++ b/doc/scripts/GMT_tut_11.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_11 - gmt set GMT_THEME cookbook gmt grdcontour @earth_relief_05m -R-66/-60/30/35 -JM6i -C250 -A1000 -B gmt end show diff --git a/doc/scripts/GMT_tut_12.sh b/doc/scripts/GMT_tut_12.sh index 416218c4bdc..d99065859de 100755 --- a/doc/scripts/GMT_tut_12.sh +++ b/doc/scripts/GMT_tut_12.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_12 - gmt set GMT_THEME cookbook gmt nearneighbor -R245/255/20/30 -I5m -S40k -Gship.nc @tut_ship.xyz gmt grdcontour ship.nc -JM6i -B -C250 -A1000 gmt end show diff --git a/doc/scripts/GMT_tut_13.sh b/doc/scripts/GMT_tut_13.sh index 0abc38b4203..9460162d382 100755 --- a/doc/scripts/GMT_tut_13.sh +++ b/doc/scripts/GMT_tut_13.sh @@ -2,7 +2,6 @@ gmt blockmedian -R245/255/20/30 -I5m -V @tut_ship.xyz > ship_5m.xyz gmt surface ship_5m.xyz -R245/255/20/30 -I5m -Gship.nc gmt begin GMT_tut_13 - gmt set GMT_THEME cookbook gmt mask -R245/255/20/30 -I5m ship_5m.xyz -JM6i -B gmt grdcontour ship.nc -C250 -A1000 gmt mask -C diff --git a/doc/scripts/GMT_tut_14.sh b/doc/scripts/GMT_tut_14.sh index 1299537c1c6..a35c099c877 100755 --- a/doc/scripts/GMT_tut_14.sh +++ b/doc/scripts/GMT_tut_14.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_14 - gmt set GMT_THEME cookbook gmt makecpt -H -Crainbow -T-20/60/10 > disc.cpt gmt makecpt -H -Crainbow -T-20/60 > cont.cpt gmt basemap -R0/6/0/9 -Jx1i -B0 diff --git a/doc/scripts/GMT_tut_15.sh b/doc/scripts/GMT_tut_15.sh index ae3ce33020b..258188099a0 100755 --- a/doc/scripts/GMT_tut_15.sh +++ b/doc/scripts/GMT_tut_15.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_15 - gmt set GMT_THEME cookbook gmt makecpt -Crainbow -T1000/5000 gmt grdimage @earth_relief_30s -R-108/-103/35/40 -JM6i -B -BWSnE gmt colorbar -DJTC -I0.4 -Bxa -By+lm diff --git a/doc/scripts/GMT_tut_16.sh b/doc/scripts/GMT_tut_16.sh index 06739db7de6..01c0982068a 100755 --- a/doc/scripts/GMT_tut_16.sh +++ b/doc/scripts/GMT_tut_16.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_16 - gmt set GMT_THEME cookbook gmt makecpt -Crainbow -T1000/5000 gmt grdimage @earth_relief_30s -R-108/-103/35/40 -I+a100+ne0.8 -JM6i -B -BWSnE gmt colorbar -DJTC -I0.4 -Bxa -By+lm diff --git a/doc/scripts/GMT_tut_17.sh b/doc/scripts/GMT_tut_17.sh index 47e6f4879e9..fc3ce159dee 100755 --- a/doc/scripts/GMT_tut_17.sh +++ b/doc/scripts/GMT_tut_17.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_17 - gmt set GMT_THEME cookbook gmt makecpt -Cno_green -T-2/30/2 gmt grdimage -Rg -JW180/9i "@otemp.anal1deg.nc?otemp[2,0]" -Bag gmt end show diff --git a/doc/scripts/GMT_tut_18.sh b/doc/scripts/GMT_tut_18.sh index 40159c21705..396a414ad52 100755 --- a/doc/scripts/GMT_tut_18.sh +++ b/doc/scripts/GMT_tut_18.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_18 - gmt set GMT_THEME cookbook gmt grdview @earth_relief_05m -R-66/-60/30/35 -JM5i -JZ2i -p135/30 -B gmt end show diff --git a/doc/scripts/GMT_tut_19.sh b/doc/scripts/GMT_tut_19.sh index e7566d77464..b1d0aee01e7 100755 --- a/doc/scripts/GMT_tut_19.sh +++ b/doc/scripts/GMT_tut_19.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_19 - gmt set GMT_THEME cookbook gmt makecpt -Cdem2 -T1000/5000 gmt grdview @earth_relief_30s -R-108/-103/35/40 -JM4i -p135/35 -Qi50 -I+a100+ne0.8 -B -JZ0.5i gmt end show diff --git a/doc/scripts/GMT_tut_2.sh b/doc/scripts/GMT_tut_2.sh index f4494c5cbfb..acafdea58fa 100755 --- a/doc/scripts/GMT_tut_2.sh +++ b/doc/scripts/GMT_tut_2.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_2 - gmt set GMT_THEME cookbook gmt basemap -R1/10000/1e20/1e25 -JX9il/6il -Bxa2+l"Wavelength (m)" -Bya1pf3+l"Power (W)" -BWS gmt end show diff --git a/doc/scripts/GMT_tut_3.sh b/doc/scripts/GMT_tut_3.sh index d0bde0e2661..8cbb07d705a 100755 --- a/doc/scripts/GMT_tut_3.sh +++ b/doc/scripts/GMT_tut_3.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_3 - gmt set GMT_THEME cookbook gmt coast -R-90/-70/0/20 -JM6i -B -Gchocolate gmt end show diff --git a/doc/scripts/GMT_tut_4.sh b/doc/scripts/GMT_tut_4.sh index d79d1b3066f..7ee598d632c 100755 --- a/doc/scripts/GMT_tut_4.sh +++ b/doc/scripts/GMT_tut_4.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_4 - gmt set GMT_THEME cookbook gmt coast -R-130/-70/24/52 -JB-100/35/33/45/6i -B -B+t"Conic Projection" -N1/thicker -N2/thinnest -A500 -Ggray -Wthinnest gmt end show diff --git a/doc/scripts/GMT_tut_5.sh b/doc/scripts/GMT_tut_5.sh index c5a7cda0246..12f812eac0e 100755 --- a/doc/scripts/GMT_tut_5.sh +++ b/doc/scripts/GMT_tut_5.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_5 - gmt set GMT_THEME cookbook gmt coast -Rg -JG280/30/6i -Bag -Dc -A5000 -Gwhite -SDarkTurquoise gmt end show diff --git a/doc/scripts/GMT_tut_6.sh b/doc/scripts/GMT_tut_6.sh index 41d3819892f..55b146e630f 100755 --- a/doc/scripts/GMT_tut_6.sh +++ b/doc/scripts/GMT_tut_6.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_6 - gmt set GMT_THEME cookbook gmt coast -Rg -JKs180/9i -Bag -Dc -A5000 -Gchocolate -SDarkTurquoise -Wthinnest gmt end show diff --git a/doc/scripts/GMT_tut_7.sh b/doc/scripts/GMT_tut_7.sh index bde5e6416cb..cb6126df3d8 100755 --- a/doc/scripts/GMT_tut_7.sh +++ b/doc/scripts/GMT_tut_7.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_tut_7 - gmt set GMT_THEME cookbook gmt plot @tut_data.txt -R0/6/0/6 -Jx1i -B -Wthinner gmt end show diff --git a/doc/scripts/GMT_tut_8.sh b/doc/scripts/GMT_tut_8.sh index 68dc9bebc94..40d54ff7b93 100755 --- a/doc/scripts/GMT_tut_8.sh +++ b/doc/scripts/GMT_tut_8.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_8 - gmt set GMT_THEME cookbook gmt plot @tut_data.txt -R0/6/0/6 -Jx1i -B -Wthinner gmt plot @tut_data.txt -W -Si0.2i gmt end show diff --git a/doc/scripts/GMT_tut_9.sh b/doc/scripts/GMT_tut_9.sh index aa168288c2d..0e3008827d7 100755 --- a/doc/scripts/GMT_tut_9.sh +++ b/doc/scripts/GMT_tut_9.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_9 - gmt set GMT_THEME cookbook gmt makecpt -Cred,green,blue -T0,100,300,10000 gmt coast -R130/150/35/50 -JM6i -B -Ggray gmt plot @tut_quakes.ngdc -Wfaint -i4,3,5,6+s0.1 -h3 -Scc -C diff --git a/doc/scripts/images/GMT_tut_1.ps.dvc b/doc/scripts/images/GMT_tut_1.ps.dvc index 7e59489bb39..9980e3aee79 100644 --- a/doc/scripts/images/GMT_tut_1.ps.dvc +++ b/doc/scripts/images/GMT_tut_1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 5b96a5ebd950d98c279afd0f3f67f4df - size: 22966 +- md5: 5003021b6f4bcec74332385911581c72 + size: 23959 hash: md5 path: GMT_tut_1.ps diff --git a/doc/scripts/images/GMT_tut_10.ps.dvc b/doc/scripts/images/GMT_tut_10.ps.dvc index ddda0b8acb9..9f2fe23aff8 100644 --- a/doc/scripts/images/GMT_tut_10.ps.dvc +++ b/doc/scripts/images/GMT_tut_10.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: ad3967eb1c5f59c230d3f323c71e202a - size: 24659 +- md5: e4acd5b4a5d30ab466f676ad7831c52b + size: 25004 hash: md5 path: GMT_tut_10.ps diff --git a/doc/scripts/images/GMT_tut_11.ps.dvc b/doc/scripts/images/GMT_tut_11.ps.dvc index aadc5e83129..bc754d409a6 100644 --- a/doc/scripts/images/GMT_tut_11.ps.dvc +++ b/doc/scripts/images/GMT_tut_11.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a5bec10358b6f34f40f2b1e8ff17519b - size: 79953 +- md5: 0e3394e74f46f3935687d8b75b958fe8 + size: 82113 hash: md5 path: GMT_tut_11.ps diff --git a/doc/scripts/images/GMT_tut_12.ps.dvc b/doc/scripts/images/GMT_tut_12.ps.dvc index 83371ad547c..ed9cc293a65 100644 --- a/doc/scripts/images/GMT_tut_12.ps.dvc +++ b/doc/scripts/images/GMT_tut_12.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: b4bd12ec63826d465e8cc216495e49f1 - size: 123336 +- md5: 31c9bfe064f64e5cd13a7f0e49afd758 + size: 123667 hash: md5 path: GMT_tut_12.ps diff --git a/doc/scripts/images/GMT_tut_13.ps.dvc b/doc/scripts/images/GMT_tut_13.ps.dvc index 2f90148172c..0a163963f0e 100644 --- a/doc/scripts/images/GMT_tut_13.ps.dvc +++ b/doc/scripts/images/GMT_tut_13.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: f2afd860c37d6da28f7589d7bee68408 - size: 156774 +- md5: affe9d406604ce5691530c9443461e96 + size: 156854 hash: md5 path: GMT_tut_13.ps diff --git a/doc/scripts/images/GMT_tut_14.ps.dvc b/doc/scripts/images/GMT_tut_14.ps.dvc index d97b56759bf..164255e7a34 100644 --- a/doc/scripts/images/GMT_tut_14.ps.dvc +++ b/doc/scripts/images/GMT_tut_14.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 69415e0ae2ee1efbf7875ee5a30b3c94 - size: 249043 +- md5: 3b422d33b78e6e3e66c4d49790947ca7 + size: 249630 hash: md5 path: GMT_tut_14.ps diff --git a/doc/scripts/images/GMT_tut_15.ps.dvc b/doc/scripts/images/GMT_tut_15.ps.dvc index ce5294552a6..1414a266d34 100644 --- a/doc/scripts/images/GMT_tut_15.ps.dvc +++ b/doc/scripts/images/GMT_tut_15.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 9721dd25cc7ca6513a3af41a24bb544a - size: 689879 +- md5: 0b95523bf3e43dfa4908a9b0424775b8 + size: 689886 hash: md5 path: GMT_tut_15.ps diff --git a/doc/scripts/images/GMT_tut_16.ps.dvc b/doc/scripts/images/GMT_tut_16.ps.dvc index 1a116e74367..018be2838e3 100644 --- a/doc/scripts/images/GMT_tut_16.ps.dvc +++ b/doc/scripts/images/GMT_tut_16.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 569363d45e39b7a75ef8cd34461f75fb - size: 1244302 +- md5: 407e4f689fd9f8d0ef70cc3bb791f341 + size: 1244360 hash: md5 path: GMT_tut_16.ps diff --git a/doc/scripts/images/GMT_tut_17.ps.dvc b/doc/scripts/images/GMT_tut_17.ps.dvc index b7763dfeee0..228a4502eb2 100644 --- a/doc/scripts/images/GMT_tut_17.ps.dvc +++ b/doc/scripts/images/GMT_tut_17.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: c47511aceba17000da8de9a9e95b907e - size: 41444 +- md5: b5cbb1fa901d29c1387fd266ac05a5fa + size: 41665 hash: md5 path: GMT_tut_17.ps diff --git a/doc/scripts/images/GMT_tut_18.ps.dvc b/doc/scripts/images/GMT_tut_18.ps.dvc index 39f452f153c..39420bffe50 100644 --- a/doc/scripts/images/GMT_tut_18.ps.dvc +++ b/doc/scripts/images/GMT_tut_18.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: df7e85eabf8dccbfe3c2e97c5be0ea71 - size: 170264 +- md5: 74a4bb7a2308a78f2e87f7f5bb865d4d + size: 170322 hash: md5 path: GMT_tut_18.ps diff --git a/doc/scripts/images/GMT_tut_19.ps.dvc b/doc/scripts/images/GMT_tut_19.ps.dvc index cf495a7a36e..344bd507b1b 100644 --- a/doc/scripts/images/GMT_tut_19.ps.dvc +++ b/doc/scripts/images/GMT_tut_19.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 7b52eb7e06a6016edbf90d40d8ce7f77 - size: 141665 +- md5: a96c1399735f35d2bcee8a6c836155a4 + size: 141723 hash: md5 path: GMT_tut_19.ps diff --git a/doc/scripts/images/GMT_tut_2.ps.dvc b/doc/scripts/images/GMT_tut_2.ps.dvc index 1133c28a977..ea44bde1415 100644 --- a/doc/scripts/images/GMT_tut_2.ps.dvc +++ b/doc/scripts/images/GMT_tut_2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2509b1f819a57ee16bcdd3d984884814 - size: 25517 +- md5: 0286c7a699a779693625570706482d94 + size: 25862 hash: md5 path: GMT_tut_2.ps diff --git a/doc/scripts/images/GMT_tut_3.ps.dvc b/doc/scripts/images/GMT_tut_3.ps.dvc index 1dad69c4c0c..83b9623c77d 100644 --- a/doc/scripts/images/GMT_tut_3.ps.dvc +++ b/doc/scripts/images/GMT_tut_3.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 256e05242f8ef751d342213fc2748e75 - size: 73938 +- md5: 6a8ef709449917b045937a3a47ffdbbe + size: 74233 hash: md5 path: GMT_tut_3.ps diff --git a/doc/scripts/images/GMT_tut_4.ps.dvc b/doc/scripts/images/GMT_tut_4.ps.dvc index 682762a3e4e..a77aedb1b0f 100644 --- a/doc/scripts/images/GMT_tut_4.ps.dvc +++ b/doc/scripts/images/GMT_tut_4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: c748127c8563c1bd77174c188d77667b - size: 279885 +- md5: 4691dc50e944fdbd0f680e49fa561975 + size: 266442 hash: md5 path: GMT_tut_4.ps diff --git a/doc/scripts/images/GMT_tut_6.ps.dvc b/doc/scripts/images/GMT_tut_6.ps.dvc index 0924f00bbd2..4e9329da41f 100644 --- a/doc/scripts/images/GMT_tut_6.ps.dvc +++ b/doc/scripts/images/GMT_tut_6.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 3b6befe4db0ba20c7acd20f6d0cd8f40 - size: 143498 +- md5: 1bd4e216ffa9d5576ff6a7d5378d25a0 + size: 142372 hash: md5 path: GMT_tut_6.ps diff --git a/doc/scripts/images/GMT_tut_7.ps.dvc b/doc/scripts/images/GMT_tut_7.ps.dvc index 630d2048112..a84abb163a8 100644 --- a/doc/scripts/images/GMT_tut_7.ps.dvc +++ b/doc/scripts/images/GMT_tut_7.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 479a2454ffe70527d1939823a0ae7246 - size: 24075 +- md5: 7a2a4f9dc0da353eba0d92ab7c475889 + size: 24419 hash: md5 path: GMT_tut_7.ps diff --git a/doc/scripts/images/GMT_tut_8.ps.dvc b/doc/scripts/images/GMT_tut_8.ps.dvc index 5e5e30210b7..a430ecaf4a6 100644 --- a/doc/scripts/images/GMT_tut_8.ps.dvc +++ b/doc/scripts/images/GMT_tut_8.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2c5671d3f7b55d7606ce259e3ffc7f18 - size: 24578 +- md5: 306ed3df9f0824215a02494c722ddfb1 + size: 24921 hash: md5 path: GMT_tut_8.ps diff --git a/doc/scripts/images/GMT_tut_9.ps.dvc b/doc/scripts/images/GMT_tut_9.ps.dvc index 579665e7c44..7b04908d0a1 100644 --- a/doc/scripts/images/GMT_tut_9.ps.dvc +++ b/doc/scripts/images/GMT_tut_9.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: f4f28980b3c5842b462c43b26374455a - size: 53437 +- md5: ee8259b4e9a684f6f0dc9fd0bd831bba + size: 53828 hash: md5 path: GMT_tut_9.ps From b9c1536a1d4facb49fbbfcf782778ab3324be3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Sun, 2 Jun 2024 18:17:00 +0200 Subject: [PATCH 074/105] docs: Rename the name of the links from "See cookbook information" to "See technical reference" (#8508) --- doc/rst/source/common_SYN_OPTs.rst_ | 12 ++++++------ doc/rst/source/gmt.rst | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/rst/source/common_SYN_OPTs.rst_ b/doc/rst/source/common_SYN_OPTs.rst_ index 65560ff3824..cfde8cff1e8 100644 --- a/doc/rst/source/common_SYN_OPTs.rst_ +++ b/doc/rst/source/common_SYN_OPTs.rst_ @@ -80,10 +80,10 @@ .. |SYN_OPT-Area| replace:: |-A|\ *min\_area*\ [/*min\_level*/*max\_level*][**+a**\ [**g**\|\ **i**][**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*] -.. |Add_-B_links| replace:: :ref:`(See full description) <-B_full>` :ref:`(See cookbook information) +.. |Add_-B_links| replace:: :ref:`(See full description) <-B_full>` :ref:`(See technical reference) `. -.. |Add_-J_links| replace:: :ref:`(See full description) <-J_full>` :ref:`(See cookbook summary) +.. |Add_-J_links| replace:: :ref:`(See full description) <-J_full>` :ref:`(See technical reference) ` :ref:`(See projections table) `. @@ -93,16 +93,16 @@ provided, the region will be automatically determined based on the data in *table* (equivalent to using **-Ra**). |Add_-R_links| -.. |Add_-R_links| replace:: :ref:`(See full description) <-R_full>` :ref:`(See cookbook information) +.. |Add_-R_links| replace:: :ref:`(See full description) <-R_full>` :ref:`(See technical reference) `. -.. |Add_-XY_links| replace:: :ref:`(See full description) <-XY_full>` :ref:`(See cookbook information) +.. |Add_-XY_links| replace:: :ref:`(See full description) <-XY_full>` :ref:`(See technical reference) `. -.. |Add_-U_links| replace:: :ref:`(See full description) <-U_full>` :ref:`(See cookbook information) +.. |Add_-U_links| replace:: :ref:`(See full description) <-U_full>` :ref:`(See technical reference) `. -.. |Add_-V_links| replace:: :ref:`(See full description) <-V_full>` :ref:`(See cookbook information) +.. |Add_-V_links| replace:: :ref:`(See full description) <-V_full>` :ref:`(See technical reference) `. .. |br| raw:: html diff --git a/doc/rst/source/gmt.rst b/doc/rst/source/gmt.rst index dff6fe01328..47857f45c6f 100644 --- a/doc/rst/source/gmt.rst +++ b/doc/rst/source/gmt.rst @@ -211,11 +211,11 @@ These are all the common GMT options that remain the same for all GMT modules. No space between the option flag and the associated arguments. .. _-B_full: -.. |Add_-B| replace:: :ref:`(See cookbook information) `. +.. |Add_-B| replace:: :ref:`(See technical reference) `. .. include:: explain_-B.rst_ .. _-J_full: -.. |Add_-J| replace:: :ref:`(See cookbook summary) +.. |Add_-J| replace:: :ref:`(See technical reference) ` :ref:`(See projections table) `. .. include:: explain_-J.rst_ @@ -229,7 +229,7 @@ modules. No space between the option flag and the associated arguments. .. include:: explain_-Jproj_full.rst_ .. _-R_full: -.. |Add_-R| replace:: :ref:`(See cookbook information) `. +.. |Add_-R| replace:: :ref:`(See technical reference) `. .. include:: explain_-R.rst_ .. _-Rz_full: @@ -238,15 +238,15 @@ modules. No space between the option flag and the associated arguments. .. include:: explain_-Rz_full.rst_ .. _-U_full: -.. |Add_-U| replace:: :ref:`(See cookbook information) `. +.. |Add_-U| replace:: :ref:`(See technical reference) `. .. include:: explain_-U.rst_ .. _-V_full: -.. |Add_-V| replace:: :ref:`(See cookbook information) `. +.. |Add_-V| replace:: :ref:`(See technical reference) `. .. include:: explain_-V.rst_ .. _-XY_full: -.. |Add_-XY| replace:: :ref:`(See cookbook information) `. +.. |Add_-XY| replace:: :ref:`(See technical reference) `. .. include:: explain_-XY.rst_ .. _-aspatial_full: From 9b1914a2b2b901ce1ebde40d9bdcd137477c1a83 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 3 Jun 2024 04:56:40 +0800 Subject: [PATCH 075/105] cmake: Use the builtin FindLATEX module to search for latex (#8510) --- CMakeLists.txt | 3 +-- doc/scripts/CMakeLists.txt | 4 ++-- test/CMakeLists.txt | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f1bf6ad30a..a18c556ef60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,8 +90,7 @@ if (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK) endif (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK) # Find latex and dvips for LaTeX integration -find_program (LATEX latex) -find_program (DVIPS dvips) +find_package (LATEX COMPONENTS DVIPS) # Add subdirectories add_subdirectory (src) diff --git a/doc/scripts/CMakeLists.txt b/doc/scripts/CMakeLists.txt index 9d0c2132ecd..6e8e1e8a01b 100644 --- a/doc/scripts/CMakeLists.txt +++ b/doc/scripts/CMakeLists.txt @@ -94,9 +94,9 @@ foreach (skip_test GMT_-U.sh GMT_encoding.sh gen_data_App_O.sh gen_data_dummy.sh endforeach() # Remove GMT_latex.sh if latex or dvips not found -if (NOT LATEX OR NOT DVIPS) +if (NOT LATEX_FOUND) list (REMOVE_ITEM _scripts_tests doc/scripts/GMT_latex.sh doc/scripts/GMT_slope2intensity.sh doc/scripts/GMT_seamount_density.sh) -endif (NOT LATEX OR NOT DVIPS) +endif (NOT LATEX_FOUND) if (DO_TESTS AND BASH) foreach (_job ${_scripts_tests}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3f161622935..633c8aadf39 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,9 +40,9 @@ if (DO_TESTS) endif (NOT DO_SUPPLEMENT_TESTS) # Remove latex-specific tests if latex or dvips not found - if (NOT LATEX OR NOT DVIPS) + if (NOT LATEX_FOUND) list (REMOVE_ITEM GMT_TEST_DIRS latex) - endif (NOT LATEX OR NOT DVIPS) + endif (NOT LATEX_FOUND) # export HAVE_GMT_DEBUG_SYMBOLS get_directory_property (_dir_defs COMPILE_DEFINITIONS) From 2c14f4c6e761b4eaded449c689bac5cd2537f72c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 3 Jun 2024 21:35:54 +0800 Subject: [PATCH 076/105] docs: Remove GMT_THEME setting from more scripts [Part 3] (#8509) --- doc/scripts/GMT_-J.sh | 1 - doc/scripts/GMT_-R.sh | 1 - doc/scripts/GMT_-XY.sh | 1 - doc/scripts/GMT_API_flow.sh | 1 - doc/scripts/GMT_API_use.sh | 1 - doc/scripts/GMT_App_E.sh | 1 - doc/scripts/GMT_App_F_stand+_iso+.sh | 1 - doc/scripts/GMT_App_F_symbol_dingbats.sh | 1 - doc/scripts/GMT_App_G.sh | 1 - doc/scripts/GMT_App_J_1.sh | 1 - doc/scripts/GMT_App_J_2.sh | 1 - doc/scripts/GMT_App_J_3.sh | 1 - doc/scripts/GMT_App_K_1.sh | 1 - doc/scripts/GMT_App_K_2.sh | 1 - doc/scripts/GMT_App_K_3.sh | 2 +- doc/scripts/GMT_App_K_4.sh | 1 - doc/scripts/GMT_App_K_5.sh | 1 - doc/scripts/GMT_App_M_1a.sh | 1 - doc/scripts/GMT_App_M_1b.sh | 1 - doc/scripts/GMT_App_M_1c.sh | 1 - doc/scripts/GMT_App_M_1d.sh | 1 - doc/scripts/GMT_App_M_2.sh | 1 - doc/scripts/GMT_App_N_1.sh | 1 - doc/scripts/GMT_App_O_1.sh | 1 - doc/scripts/GMT_App_O_2.sh | 1 - doc/scripts/GMT_App_O_3.sh | 1 - doc/scripts/GMT_App_O_4.sh | 1 - doc/scripts/GMT_App_O_5.sh | 1 - doc/scripts/GMT_App_O_6.sh | 1 - doc/scripts/GMT_App_O_7.sh | 1 - doc/scripts/GMT_App_O_8.sh | 1 - doc/scripts/GMT_App_O_9.sh | 1 - doc/scripts/GMT_CPTscale.sh | 1 - doc/scripts/GMT_Defaults_1a.sh | 1 - doc/scripts/GMT_Defaults_1b.sh | 1 - doc/scripts/GMT_Defaults_1c.sh | 1 - doc/scripts/GMT_SRTM.sh | 1 - doc/scripts/GMT_albers.sh | 1 - doc/scripts/GMT_anchor.sh | 1 - doc/scripts/GMT_arrows.sh | 1 - doc/scripts/GMT_arrows_types.sh | 1 - doc/scripts/GMT_atan.sh | 1 - doc/scripts/GMT_autolegend.sh | 1 - doc/scripts/GMT_base_symbols1.sh | 1 - doc/scripts/GMT_base_symbols2.sh | 3 +-- doc/scripts/GMT_base_symbols3.sh | 3 +-- doc/scripts/GMT_base_symbols3D.sh | 1 - doc/scripts/GMT_base_symbols4.sh | 1 - doc/scripts/GMT_base_symbols5.sh | 1 - doc/scripts/GMT_base_symbols6.sh | 1 - doc/scripts/GMT_base_symbols7.sh | 1 - doc/scripts/GMT_base_symbols8.sh | 1 - doc/scripts/GMT_base_symbols9.sh | 1 - doc/scripts/GMT_bezier.sh | 1 - doc/scripts/GMT_blend.sh | 1 - doc/scripts/GMT_blendtype.sh | 4 ++-- doc/scripts/GMT_cap.sh | 1 - doc/scripts/GMT_chunking.sh | 1 - doc/scripts/GMT_cmyk.sh | 1 - doc/scripts/GMT_color_interpolate.sh | 1 - doc/scripts/GMT_colorlist.sh | 1 - doc/scripts/GMT_cycle_1.sh | 1 - doc/scripts/GMT_cycle_2.sh | 1 - doc/scripts/GMT_cycle_3.sh | 1 - doc/scripts/GMT_cycle_4.sh | 1 - doc/scripts/GMT_cycle_5.sh | 1 - doc/scripts/GMT_cycle_6.sh | 1 - doc/scripts/GMT_cyclic.sh | 1 - doc/scripts/GMT_dir_rose.sh | 2 +- doc/scripts/GMT_eckert6.sh | 1 - doc/scripts/GMT_encoding.sh | 1 - doc/scripts/GMT_equidistant_conic.sh | 1 - doc/scripts/GMT_fatline.sh | 1 - doc/scripts/GMT_fill_curves.sh | 1 - doc/scripts/GMT_gall_stereo.sh | 1 - doc/scripts/GMT_grid2pix.sh | 1 - doc/scripts/GMT_hinge.sh | 1 - doc/scripts/GMT_images.sh | 1 - doc/scripts/GMT_inset.sh | 1 - doc/scripts/GMT_joint.sh | 1 - doc/scripts/GMT_lambert_az_rect.sh | 1 - doc/scripts/GMT_lambert_conic.sh | 1 - doc/scripts/GMT_latex.sh | 1 - doc/scripts/GMT_legend.sh | 1 - doc/scripts/GMT_linear.sh | 1 - doc/scripts/GMT_linear_cal.sh | 1 - doc/scripts/GMT_linear_d.sh | 1 - doc/scripts/GMT_linearrow.sh | 1 - doc/scripts/GMT_linecap.sh | 1 - doc/scripts/GMT_lineoffset.sh | 1 - doc/scripts/GMT_log.sh | 1 - doc/scripts/GMT_mag_rose.sh | 2 +- doc/scripts/GMT_map_frame_type.sh | 1 - doc/scripts/GMT_mapscale.sh | 1 - doc/scripts/GMT_mercator.sh | 1 - doc/scripts/GMT_misfit.sh | 1 - doc/scripts/GMT_movie_canvas.sh | 1 - doc/scripts/GMT_movie_progress.sh | 1 - doc/scripts/GMT_nearneighbor.sh | 1 - doc/scripts/GMT_obl_baja.sh | 1 - doc/scripts/GMT_obl_merc.sh | 1 - doc/scripts/GMT_obl_nz.sh | 1 - doc/scripts/GMT_panel.sh | 1 - doc/scripts/GMT_polar.sh | 1 - doc/scripts/GMT_pow.sh | 1 - doc/scripts/GMT_pstext_clearance.sh | 1 - doc/scripts/GMT_pstext_justify.sh | 1 - doc/scripts/GMT_registration.sh | 1 - doc/scripts/GMT_seamount_azim.sh | 1 - doc/scripts/GMT_seamount_cum_inc.sh | 1 - doc/scripts/GMT_seamount_flux.sh | 1 - doc/scripts/GMT_seamount_map.sh | 1 - doc/scripts/GMT_seamount_psi.sh | 1 - doc/scripts/GMT_seamount_slide.sh | 1 - doc/scripts/GMT_seamount_specs.sh | 3 +-- doc/scripts/GMT_seamount_types.sh | 1 - doc/scripts/GMT_seamount_u0.sh | 1 - doc/scripts/GMT_segmentize.sh | 1 - doc/scripts/GMT_seislegend.sh | 1 - doc/scripts/GMT_sinus_int.sh | 1 - doc/scripts/GMT_slope2intensity.sh | 3 +-- doc/scripts/GMT_slopes.sh | 1 - doc/scripts/GMT_stereographic_general.sh | 1 - doc/scripts/GMT_stereographic_rect.sh | 1 - doc/scripts/GMT_stereonets.sh | 1 - doc/scripts/GMT_title_fade.sh | 1 - doc/scripts/GMT_utm_zones.sh | 1 - doc/scripts/GMT_vector.sh | 1 - doc/scripts/GMT_vector4.sh | 1 - doc/scripts/GMT_vertscale.sh | 1 - doc/scripts/GMT_volcano.sh | 1 - doc/scripts/grdflexure_approx.sh | 1 - doc/scripts/images/GMT_App_K_1.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_K_2.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_K_3.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_K_4.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_K_5.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_1.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_2.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_3.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_4.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_5.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_6.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_7.ps.dvc | 4 ++-- doc/scripts/images/GMT_App_O_8.ps.dvc | 4 ++-- doc/scripts/images/GMT_CPTscale.ps.dvc | 4 ++-- doc/scripts/images/GMT_Defaults_1a.ps.dvc | 4 ++-- doc/scripts/images/GMT_Defaults_1c.ps.dvc | 4 ++-- doc/scripts/images/GMT_SRTM.ps.dvc | 4 ++-- doc/scripts/images/GMT_albers.ps.dvc | 4 ++-- doc/scripts/images/GMT_anchor.ps.dvc | 4 ++-- doc/scripts/images/GMT_atan.ps.dvc | 4 ++-- doc/scripts/images/GMT_autolegend.ps.dvc | 4 ++-- doc/scripts/images/GMT_base_symbols3D.ps.dvc | 4 ++-- doc/scripts/images/GMT_base_symbols4.ps.dvc | 4 ++-- doc/scripts/images/GMT_blend.ps.dvc | 4 ++-- doc/scripts/images/GMT_color_interpolate.ps.dvc | 4 ++-- doc/scripts/images/GMT_colorlist.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_1.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_2.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_3.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_4.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_5.ps.dvc | 4 ++-- doc/scripts/images/GMT_cycle_6.ps.dvc | 4 ++-- doc/scripts/images/GMT_cyclic.ps.dvc | 4 ++-- doc/scripts/images/GMT_eckert6.ps.dvc | 4 ++-- doc/scripts/images/GMT_equidistant_conic.ps.dvc | 4 ++-- doc/scripts/images/GMT_fill_curves.ps.dvc | 4 ++-- doc/scripts/images/GMT_gall_stereo.ps.dvc | 4 ++-- doc/scripts/images/GMT_grid2pix.ps.dvc | 4 ++-- doc/scripts/images/GMT_hinge.ps.dvc | 4 ++-- doc/scripts/images/GMT_inset.ps.dvc | 4 ++-- doc/scripts/images/GMT_lambert_az_rect.ps.dvc | 4 ++-- doc/scripts/images/GMT_lambert_conic.ps.dvc | 4 ++-- doc/scripts/images/GMT_latex.ps.dvc | 4 ++-- doc/scripts/images/GMT_legend.ps.dvc | 4 ++-- doc/scripts/images/GMT_linear.ps.dvc | 4 ++-- doc/scripts/images/GMT_linear_cal.ps.dvc | 4 ++-- doc/scripts/images/GMT_linear_d.ps.dvc | 4 ++-- doc/scripts/images/GMT_linearrow.ps.dvc | 4 ++-- doc/scripts/images/GMT_lineoffset.ps.dvc | 4 ++-- doc/scripts/images/GMT_log.ps.dvc | 4 ++-- doc/scripts/images/GMT_map_frame_type.ps.dvc | 4 ++-- doc/scripts/images/GMT_mapscale.ps.dvc | 4 ++-- doc/scripts/images/GMT_mercator.ps.dvc | 4 ++-- doc/scripts/images/GMT_obl_baja.ps.dvc | 4 ++-- doc/scripts/images/GMT_obl_merc.ps.dvc | 4 ++-- doc/scripts/images/GMT_obl_nz.ps.dvc | 4 ++-- doc/scripts/images/GMT_polar.ps.dvc | 4 ++-- doc/scripts/images/GMT_pow.ps.dvc | 4 ++-- doc/scripts/images/GMT_seamount_cum_inc.ps.dvc | 4 ++-- doc/scripts/images/GMT_seamount_u0.ps.dvc | 4 ++-- doc/scripts/images/GMT_slopes.ps.dvc | 4 ++-- doc/scripts/images/GMT_stereographic_general.ps.dvc | 4 ++-- doc/scripts/images/GMT_stereographic_rect.ps.dvc | 4 ++-- doc/scripts/images/GMT_title_fade.ps.dvc | 4 ++-- doc/scripts/images/GMT_utm_zones.ps.dvc | 4 ++-- doc/scripts/images/GMT_vertscale.ps.dvc | 4 ++-- doc/scripts/images/GMT_volcano.ps.dvc | 4 ++-- doc/scripts/images/psevents_dz.ps.dvc | 4 ++-- doc/scripts/images/psevents_intensity.ps.dvc | 4 ++-- doc/scripts/images/psevents_labels.ps.dvc | 4 ++-- doc/scripts/images/psevents_size.ps.dvc | 4 ++-- doc/scripts/images/psevents_transparency.ps.dvc | 4 ++-- doc/scripts/psevents_dz.sh | 1 - doc/scripts/psevents_intensity.sh | 1 - doc/scripts/psevents_labels.sh | 1 - doc/scripts/psevents_size.sh | 1 - doc/scripts/psevents_transparency.sh | 1 - 209 files changed, 153 insertions(+), 286 deletions(-) diff --git a/doc/scripts/GMT_-J.sh b/doc/scripts/GMT_-J.sh index 264761ce8a4..eeef6b58175 100755 --- a/doc/scripts/GMT_-J.sh +++ b/doc/scripts/GMT_-J.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-J - gmt set GMT_THEME cookbook gmt text -R0/5/0/3 -Jx1i -F+f+j << EOF 2.5 2.8 16p,Helvetica-Bold BC GMT PROJECTIONS 2 2.25 12p,Helvetica-Bold BC GEOGRAPHIC PROJECTIONS diff --git a/doc/scripts/GMT_-R.sh b/doc/scripts/GMT_-R.sh index b73cdc75386..9f472e3063f 100755 --- a/doc/scripts/GMT_-R.sh +++ b/doc/scripts/GMT_-R.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-R - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE PLAIN FONT_ANNOT_PRIMARY 8p,Helvetica MAP_TICK_LENGTH_PRIMARY 0.05i \ PS_CHAR_ENCODING ISOLatin1+ gmt coast -R-90/-70/18/35.819 -JM2i -Dl -Glightbrown -Wthinnest -Ba10g5 -BWsEN diff --git a/doc/scripts/GMT_-XY.sh b/doc/scripts/GMT_-XY.sh index 6047e8b066c..e2452acddcc 100755 --- a/doc/scripts/GMT_-XY.sh +++ b/doc/scripts/GMT_-XY.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_-XY - gmt set GMT_THEME cookbook gmt basemap -R0/1.5/0/1.7 -Jx1i -B0 -B+glightyellow gmt plot -Sv5p+e -W0.5p -Gblack << EOF 0.2 0.2 0 1.1 diff --git a/doc/scripts/GMT_API_flow.sh b/doc/scripts/GMT_API_flow.sh index 7d95e9e70ee..e6259492eeb 100755 --- a/doc/scripts/GMT_API_flow.sh +++ b/doc/scripts/GMT_API_flow.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_API_flow - gmt set GMT_THEME cookbook gmt text -R-2/3/-1/1 -Jx1i -F+f14p,Helvetica-Bold -Gwhite -W0.5p -N -C50% -X2i << EOF -2 0 EXTERNAL INTERFACE 0 0 gmt diff --git a/doc/scripts/GMT_API_use.sh b/doc/scripts/GMT_API_use.sh index 9b0247c0bd7..ea418f4b05f 100755 --- a/doc/scripts/GMT_API_use.sh +++ b/doc/scripts/GMT_API_use.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_API_use - gmt set GMT_THEME cookbook gmt plot -R-4.5/4.5/-2/2 -Jx0.8i -W2p+ve0.2i+gblack+h0.5 << EOF > -2 0.75 diff --git a/doc/scripts/GMT_App_E.sh b/doc/scripts/GMT_App_E.sh index 2a39c18b2d3..7852baadae7 100755 --- a/doc/scripts/GMT_App_E.sh +++ b/doc/scripts/GMT_App_E.sh @@ -21,7 +21,6 @@ $xwidth $ywidth END gmt begin GMT_App_E -gmt set GMT_THEME cookbook gmt basemap -R0/5.75/0/7.55 -Jx1i -B0 gmt set MAP_FRAME_PEN thinner for iy in 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 diff --git a/doc/scripts/GMT_App_F_stand+_iso+.sh b/doc/scripts/GMT_App_F_stand+_iso+.sh index 8cb07fded81..52d2acedcde 100755 --- a/doc/scripts/GMT_App_F_stand+_iso+.sh +++ b/doc/scripts/GMT_App_F_stand+_iso+.sh @@ -63,7 +63,6 @@ EOF $AWK -f tt.awk tt.txt > tt.d gmt begin - gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_TITLE 14p # First chart for standard font diff --git a/doc/scripts/GMT_App_F_symbol_dingbats.sh b/doc/scripts/GMT_App_F_symbol_dingbats.sh index 2205a100f71..5a4429f8c7d 100755 --- a/doc/scripts/GMT_App_F_symbol_dingbats.sh +++ b/doc/scripts/GMT_App_F_symbol_dingbats.sh @@ -6,7 +6,6 @@ # plot it with gmt pstext, including the header row and left column gmt begin GMT_App_F_symbol_dingbats -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_TITLE 14p # Chart for Symbols font diff --git a/doc/scripts/GMT_App_G.sh b/doc/scripts/GMT_App_G.sh index 69824474679..2437de87558 100755 --- a/doc/scripts/GMT_App_G.sh +++ b/doc/scripts/GMT_App_G.sh @@ -9,7 +9,6 @@ y0=4.3 yy=4.0778 tr '",' ' ' < "${GMT_SOURCE_DIR}"/src/standard_adobe_fonts.h | awk '{print $2}' > tt.d gmt begin GMT_App_G -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner gmt plot -R0/5.4/0/$y0 -Jx1i -B0 < diff --git a/doc/scripts/GMT_App_J_1.sh b/doc/scripts/GMT_App_J_1.sh index 77e8b7ebd77..12a4d4f1326 100755 --- a/doc/scripts/GMT_App_J_1.sh +++ b/doc/scripts/GMT_App_J_1.sh @@ -73,7 +73,6 @@ #--------------------------------------------------- gmt begin GMT_App_J_1 -gmt set GMT_THEME cookbook RJ="-R-0.6/0.6/-0.1/1.1 -JX4i/2i" echo "-0.5 0" > tt.tmp gmt math -T-0.5/0.5/0.01 1 = >> tt.tmp diff --git a/doc/scripts/GMT_App_J_2.sh b/doc/scripts/GMT_App_J_2.sh index 955049e958f..a163d6c62f5 100755 --- a/doc/scripts/GMT_App_J_2.sh +++ b/doc/scripts/GMT_App_J_2.sh @@ -73,7 +73,6 @@ # #--------------------------------------------------- gmt begin GMT_App_J_2 -gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p,Times-Roman FONT_TITLE 14p,Times-Roman FONT_LABEL 12p,Times-Roman gmt math -T0/5/0.01 T SINC = | gmt plot -R0/5/-0.3/1 -JX4i/2i -Bxa1f0.2+l"Frequency (cycles per filter width)" -Bya0.2f0.1g1+l"Gain" -BWeSn -Wthick gmt math -T0/5/0.01 T SINC 1 T T MUL SUB DIV = | grep -v '^>' | $AWK '{ if ($1 == 1) print 1, 0.5; else print $0}' | gmt plot -Wthick,- diff --git a/doc/scripts/GMT_App_J_3.sh b/doc/scripts/GMT_App_J_3.sh index 53a4412426c..936778c33f1 100755 --- a/doc/scripts/GMT_App_J_3.sh +++ b/doc/scripts/GMT_App_J_3.sh @@ -585,7 +585,6 @@ EOF # Also, I found that j0(x) and j1(x) are not reliable on some machines.... # gmt begin GMT_App_J_3 -gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p,Times-Roman FONT_TITLE 14p,Times-Roman FONT_LABEL 12p,Times-Roman cut -f1,2 tt.r_tr_fns | gmt plot -R0/5/-0.3/1 -JX4i/2i -Bxa1f0.2+l"Frequency (cycles per filter width)" -Bya0.2f0.1g1+l"Gain" -BWeSn -Wthick cut -f1,3 tt.r_tr_fns | gmt plot -Wthick,- diff --git a/doc/scripts/GMT_App_K_1.sh b/doc/scripts/GMT_App_K_1.sh index 932ef322ea4..14a3870f2f9 100755 --- a/doc/scripts/GMT_App_K_1.sh +++ b/doc/scripts/GMT_App_K_1.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_App_K_1 - gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0 MAP_ANNOT_MIN_SPACING 0.3i \ MAP_ANNOT_OBLIQUE lat_horizontal,tick_normal gmt coast -R-9000/9000/-9000/9000+uk -JE130.35/-0.2/3.5i -Dc \ diff --git a/doc/scripts/GMT_App_K_2.sh b/doc/scripts/GMT_App_K_2.sh index 58242dba647..f01524c85f3 100755 --- a/doc/scripts/GMT_App_K_2.sh +++ b/doc/scripts/GMT_App_K_2.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_App_K_2 - gmt set GMT_THEME cookbook gmt coast -R-2000/2000/-2000/2000+uk -JE130.35/-0.2/3.5i -Dl -A100 \ -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B10g5 -BWSne echo 130.35 -0.2 | gmt plot -SJ-1000 -Wthicker diff --git a/doc/scripts/GMT_App_K_3.sh b/doc/scripts/GMT_App_K_3.sh index 93f6e0fd8f6..c94cf82b60b 100755 --- a/doc/scripts/GMT_App_K_3.sh +++ b/doc/scripts/GMT_App_K_3.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_App_K_3 - gmt set GMT_THEME cookbook MAP_EMBELLISHMENT_MODE manual + gmt set MAP_EMBELLISHMENT_MODE manual gmt coast -R-500/500/-500/500+uk -JE130.35/-0.2/3.5i -Di -A20 -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B2g1 -BWSne echo 133 2 | gmt plot -Sc1.4i -Gwhite gmt basemap -Tmg133/2+w1i+t45/10/5+jCM --FONT_TITLE=12p --MAP_TICK_LENGTH_PRIMARY=0.05i --FONT_ANNOT_SECONDARY=8p diff --git a/doc/scripts/GMT_App_K_4.sh b/doc/scripts/GMT_App_K_4.sh index 46f5c7f2ccb..56b31489142 100755 --- a/doc/scripts/GMT_App_K_4.sh +++ b/doc/scripts/GMT_App_K_4.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_App_K_4 - gmt set GMT_THEME cookbook gmt coast -R-100/100/-100/100+uk -JE130.35/-0.2/3.5i -Dh -A1 \ -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B30mg10m -BWSne echo 130.35 -0.2 | gmt plot -SJ-40 -Wthicker diff --git a/doc/scripts/GMT_App_K_5.sh b/doc/scripts/GMT_App_K_5.sh index df0175ce01f..20a6bd917ca 100755 --- a/doc/scripts/GMT_App_K_5.sh +++ b/doc/scripts/GMT_App_K_5.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_App_K_5 - gmt set GMT_THEME cookbook gmt coast -R-20/20/-20/20+uk -JE130.35/-0.2/3.5i -Df -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B10mg2m -BWSne gmt end show diff --git a/doc/scripts/GMT_App_M_1a.sh b/doc/scripts/GMT_App_M_1a.sh index 1d8d182ffb4..751655c2007 100755 --- a/doc/scripts/GMT_App_M_1a.sh +++ b/doc/scripts/GMT_App_M_1a.sh @@ -26,7 +26,6 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.1 ADD =) gmt begin GMT_App_M_1a -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1b.sh b/doc/scripts/GMT_App_M_1b.sh index 9a3d465404c..c002d0caf22 100755 --- a/doc/scripts/GMT_App_M_1b.sh +++ b/doc/scripts/GMT_App_M_1b.sh @@ -24,7 +24,6 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.5 MUL 0.1 ADD =) gmt begin GMT_App_M_1b -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1c.sh b/doc/scripts/GMT_App_M_1c.sh index 2820ba3b0b8..6e331813e2b 100755 --- a/doc/scripts/GMT_App_M_1c.sh +++ b/doc/scripts/GMT_App_M_1c.sh @@ -24,7 +24,6 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.5 MUL 0.25 ADD =) gmt begin GMT_App_M_1c -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1d.sh b/doc/scripts/GMT_App_M_1d.sh index 036922e5995..05db15f1dde 100755 --- a/doc/scripts/GMT_App_M_1d.sh +++ b/doc/scripts/GMT_App_M_1d.sh @@ -23,7 +23,6 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.1 ADD =) gmt begin GMT_App_M_1d -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_2.sh b/doc/scripts/GMT_App_M_2.sh index 78a530075eb..89ce2e22a7e 100755 --- a/doc/scripts/GMT_App_M_2.sh +++ b/doc/scripts/GMT_App_M_2.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_App_M_2 -gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p PROJ_LENGTH_UNIT cm PS_MEDIA 11ix8.5i # Set up color palette with named annotations diff --git a/doc/scripts/GMT_App_N_1.sh b/doc/scripts/GMT_App_N_1.sh index 8dfa3e285db..d97af9b3ae9 100755 --- a/doc/scripts/GMT_App_N_1.sh +++ b/doc/scripts/GMT_App_N_1.sh @@ -68,7 +68,6 @@ EOF done done gmt begin GMT_App_N_$p - gmt set GMT_THEME cookbook gmt plot -R0/$n_cols/0/$H -Jx${width}i tt.lines -Wthick -B0 gmt plot -S${width}i -W0.5p tt.symbols -Ggray gmt plot -Sri -Gblack tt.bars diff --git a/doc/scripts/GMT_App_O_1.sh b/doc/scripts/GMT_App_O_1.sh index 113438560c4..37bb07eede6 100755 --- a/doc/scripts/GMT_App_O_1.sh +++ b/doc/scripts/GMT_App_O_1.sh @@ -3,7 +3,6 @@ # Makes Fig 1 for Appendix O (labeled lines) # gmt begin GMT_App_O_1 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+f8p -Gd1.5i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_2.sh b/doc/scripts/GMT_App_O_2.sh index f15e77d07f6..09bbb295c7d 100755 --- a/doc/scripts/GMT_App_O_2.sh +++ b/doc/scripts/GMT_App_O_2.sh @@ -3,7 +3,6 @@ # Makes Fig 2 for Appendix O (labeled lines) # gmt begin GMT_App_O_2 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+f8p -Gn1/1i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_3.sh b/doc/scripts/GMT_App_O_3.sh index 377f86ddd6a..3c76587ecbb 100755 --- a/doc/scripts/GMT_App_O_3.sh +++ b/doc/scripts/GMT_App_O_3.sh @@ -9,7 +9,6 @@ cat << EOF > fix.txt 130 10.5 EOF gmt begin GMT_App_O_3 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -Gffix.txt/0.1i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_4.sh b/doc/scripts/GMT_App_O_4.sh index eb741ee6793..7b5694e1f48 100755 --- a/doc/scripts/GMT_App_O_4.sh +++ b/doc/scripts/GMT_App_O_4.sh @@ -3,7 +3,6 @@ # Makes Fig 4 for Appendix O (labeled lines) # gmt begin GMT_App_O_4 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -GLZ-/Z+ -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_5.sh b/doc/scripts/GMT_App_O_5.sh index 22ae701525b..7ec9ad7ac59 100755 --- a/doc/scripts/GMT_App_O_5.sh +++ b/doc/scripts/GMT_App_O_5.sh @@ -3,7 +3,6 @@ # Makes Fig 5 for Appendix O (labeled lines) # gmt begin GMT_App_O_5 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -GX@App_O_cross.txt -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_6.sh b/doc/scripts/GMT_App_O_6.sh index 8fe8d157470..0ace0ecc8fc 100755 --- a/doc/scripts/GMT_App_O_6.sh +++ b/doc/scripts/GMT_App_O_6.sh @@ -3,7 +3,6 @@ # Makes Fig 6 for Appendix O (labeled lines) # gmt begin GMT_App_O_6 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -Gl50/10S/160/10S -S10 -T+l gmt plot -SqD1000k:+g+LD+an+p -Wthick @App_O_transect.txt diff --git a/doc/scripts/GMT_App_O_7.sh b/doc/scripts/GMT_App_O_7.sh index 12a051ccf5d..8d2e9691d46 100755 --- a/doc/scripts/GMT_App_O_7.sh +++ b/doc/scripts/GMT_App_O_7.sh @@ -3,7 +3,6 @@ # Makes Fig 7 for Appendix O (labeled lines) # gmt begin GMT_App_O_7 - gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+u" m"+f8p -Gl50/10S/160/10S -S10 -T+l gmt plot -SqD15d:+gblack+fwhite+Ld+o+u@. -Wthick @App_O_transect.txt diff --git a/doc/scripts/GMT_App_O_8.sh b/doc/scripts/GMT_App_O_8.sh index 6105dbac883..65f07233cdc 100755 --- a/doc/scripts/GMT_App_O_8.sh +++ b/doc/scripts/GMT_App_O_8.sh @@ -3,7 +3,6 @@ # Makes Fig 8 for Appendix O (labeled lines) # gmt begin GMT_App_O_8 - gmt set GMT_THEME cookbook gmt convert -i0,1,4 -Em150 @App_O_transect.txt | $AWK '{print $1,$2,int($3)}' > fix2.txt gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+u" m"+f8p -Gl50/10S/160/10S -S10 -T+l diff --git a/doc/scripts/GMT_App_O_9.sh b/doc/scripts/GMT_App_O_9.sh index 1dda6af2a27..1fa564ae31f 100755 --- a/doc/scripts/GMT_App_O_9.sh +++ b/doc/scripts/GMT_App_O_9.sh @@ -3,7 +3,6 @@ # Makes Fig 9 for Appendix O (labeled lines) # gmt begin GMT_App_O_9 -gmt set GMT_THEME cookbook R=-R-85/5/10/55 gmt grdgradient @earth_relief_05m_g $R -Nt1 -A45 -Gtopo5_int.nc gmt set FORMAT_GEO_MAP ddd:mm:ssF FONT_ANNOT_PRIMARY +9p FONT_TITLE 22p diff --git a/doc/scripts/GMT_CPTscale.sh b/doc/scripts/GMT_CPTscale.sh index febad353161..0e6236ee4e9 100755 --- a/doc/scripts/GMT_CPTscale.sh +++ b/doc/scripts/GMT_CPTscale.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_CPTscale - gmt set GMT_THEME cookbook gmt plot -R0/6/0/6 -Jx1i -W0.25p << EOF > Normal scaling of whole CPT 3 2.9 diff --git a/doc/scripts/GMT_Defaults_1a.sh b/doc/scripts/GMT_Defaults_1a.sh index cfe10438c4b..d486b997135 100755 --- a/doc/scripts/GMT_Defaults_1a.sh +++ b/doc/scripts/GMT_Defaults_1a.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1a - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE fancy FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.1i FONT_ANNOT_PRIMARY +8p gmt basemap -X2i -R-60/-30/-10/10 -JM2.25i -Ba10f5g5 -BWSne+t"Plot Title" gmt text -N -F+f7p,Helvetica-Bold,blue+j << EOF diff --git a/doc/scripts/GMT_Defaults_1b.sh b/doc/scripts/GMT_Defaults_1b.sh index 62abd306cec..6ec3f4f9035 100755 --- a/doc/scripts/GMT_Defaults_1b.sh +++ b/doc/scripts/GMT_Defaults_1b.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1b - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0i \ FONT_ANNOT_PRIMARY +8p MAP_ANNOT_OBLIQUE anywhere MAP_FRAME_AXES=WESN gmt basemap -X1.5i -R-90/20/-55/25+r -JOc-80/25.5/2/69/2.25i -Ba10f5g5 diff --git a/doc/scripts/GMT_Defaults_1c.sh b/doc/scripts/GMT_Defaults_1c.sh index 77e8582b970..be6520eb589 100755 --- a/doc/scripts/GMT_Defaults_1c.sh +++ b/doc/scripts/GMT_Defaults_1c.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1c - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain FORMAT_DATE_MAP "o dd" FORMAT_CLOCK_MAP hh FONT_ANNOT_PRIMARY +8p gmt basemap -R2001-9-11T/2001-9-13T/0.01/100 -JX2.25iT/2.25il -Bpxa6Hf1hg6h+l"x-axis label" -Bpya1g3p+l"y-axis label" -BWSne \ -X2i -Bsxa1D -U"Dazed and Confused"+o-0.75i/-0.85i --GMT_LANGUAGE=pt \ diff --git a/doc/scripts/GMT_SRTM.sh b/doc/scripts/GMT_SRTM.sh index 70e7eb7b21c..94bbecbadd3 100755 --- a/doc/scripts/GMT_SRTM.sh +++ b/doc/scripts/GMT_SRTM.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Show distribution of SRTM tiles gmt begin GMT_SRTM - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain gmt coast -R-180/180/-60/60 -JQ0/15c -B -BWStr -Dc -A5000 -Glightgray --FORMAT_GEO_MAP=dddF echo "1 red 2 red" > t.cpt diff --git a/doc/scripts/GMT_albers.sh b/doc/scripts/GMT_albers.sh index 71b5bbb8a26..9a0df1f10b9 100755 --- a/doc/scripts/GMT_albers.sh +++ b/doc/scripts/GMT_albers.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_albers - gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0 gmt coast -R110/140/20/35 -JB125/20/25/45/12c -Bag -Dl -Ggreen -Wthinnest -A250 gmt end show diff --git a/doc/scripts/GMT_anchor.sh b/doc/scripts/GMT_anchor.sh index 5946fd7091a..0db4a8a90b7 100755 --- a/doc/scripts/GMT_anchor.sh +++ b/doc/scripts/GMT_anchor.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_anchor - gmt set GMT_THEME cookbook gmt basemap -R0/1/0/1 -JX5i/2i -Ba1f0.5 -BwSnE+gbisque gmt inset begin -DjTL+o0.7i/0.5i+w1.5i/0.75i -F+glightgreen+p1p gmt inset end diff --git a/doc/scripts/GMT_arrows.sh b/doc/scripts/GMT_arrows.sh index 09ca1fc4c6f..3520410b2ed 100755 --- a/doc/scripts/GMT_arrows.sh +++ b/doc/scripts/GMT_arrows.sh @@ -2,7 +2,6 @@ # # Demonstrate how arrows look like gmt begin GMT_arrows -gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX1.75i -S -W1.5p -Gred -B0 --MAP_VECTOR_SHAPE=0.5 << EOF 0.5 0.5 4.5 0.5 v0.2i+s diff --git a/doc/scripts/GMT_arrows_types.sh b/doc/scripts/GMT_arrows_types.sh index add7dc589f5..97705218102 100755 --- a/doc/scripts/GMT_arrows_types.sh +++ b/doc/scripts/GMT_arrows_types.sh @@ -2,7 +2,6 @@ # # Demonstrate how arrows heads can look like (just doing Cartesian arrows here) gmt begin GMT_arrows_types -gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/10/0/7 -JX5.75i/1.75i -S -W1.5p -Gred -B0 --MAP_VECTOR_SHAPE=0 << EOF 0.5 0.5 4.5 0.5 v0.25i+s+e+a40 diff --git a/doc/scripts/GMT_atan.sh b/doc/scripts/GMT_atan.sh index 8719ddc6129..13a60cb2ae6 100755 --- a/doc/scripts/GMT_atan.sh +++ b/doc/scripts/GMT_atan.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_atan - gmt set GMT_THEME cookbook gmt grdgradient -A45 @earth_relief_30s_p -R-108/-103/35/40 -N -fg -Gtt.t.nc gmt grd2xyz -Z tt.t.nc > tt.d gmt histogram tt.d -R-0.75/0.75/0/20 -JX1.5i/1i -Bx0.5 -By5f5 -BWSne -W0.01 -Gblack -Z1 diff --git a/doc/scripts/GMT_autolegend.sh b/doc/scripts/GMT_autolegend.sh index b1cf8197e17..d91fd6bb3b0 100755 --- a/doc/scripts/GMT_autolegend.sh +++ b/doc/scripts/GMT_autolegend.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_autolegend - gmt set GMT_THEME cookbook gmt plot -R0/7.2/3/7.2 -Jx2c @Table_5_11.txt -Sc0.35c -Glightgreen -Wfaint -lApples+H"LEGEND"+f16p+D gmt plot @Table_5_11.txt -St0.35c -Gorange -B -BWStr -lOranges gmt legend -DjTR+w3c+o0.25c -F+p1p+ggray95+s diff --git a/doc/scripts/GMT_base_symbols1.sh b/doc/scripts/GMT_base_symbols1.sh index df71cc74cb1..e7a90f6b034 100755 --- a/doc/scripts/GMT_base_symbols1.sh +++ b/doc/scripts/GMT_base_symbols1.sh @@ -3,7 +3,6 @@ # Plot psxy basic single-parameter geometric symbols for use on man page gmt begin GMT_base_symbols1 - gmt set GMT_THEME cookbook cat << EOF > tmp.txt # All the basic geometric psxy symbols 1 2 1c a diff --git a/doc/scripts/GMT_base_symbols2.sh b/doc/scripts/GMT_base_symbols2.sh index a0aa873482a..fe5ce416e23 100755 --- a/doc/scripts/GMT_base_symbols2.sh +++ b/doc/scripts/GMT_base_symbols2.sh @@ -3,7 +3,6 @@ # Plot psxy basic multi-parameter geometric symbols for use on man page gmt begin GMT_base_symbols2 - gmt set GMT_THEME cookbook cat << EOF > tmp.txt # All the basic geometric psxy symbols 1 1 30 1.5c 0.75c e @@ -13,6 +12,6 @@ cat << EOF > tmp.txt 5 1 1.5c -30 70 w EOF gmt plot tmp.txt -R0.6/5.4/0.6/1.4 -B0g1 -B+n -Jx2c -Sc1.5c -W0.25p --PROJ_LENGTH_UNIT=cm -i0,1 --MAP_GRID_PEN_PRIMARY=default,dashed - gmt plot tmp.txt -S -Glightblue -W1p --PROJ_LENGTH_UNIT=cm + gmt plot tmp.txt -S -Glightblue -W1p --PROJ_LENGTH_UNIT=cm $AWK '{if ($2 == 1) print $1, $2, $NF}' tmp.txt | gmt pstext -N -F+f10p,Helvetica-Bold+jTC -Dj0/1c gmt end show diff --git a/doc/scripts/GMT_base_symbols3.sh b/doc/scripts/GMT_base_symbols3.sh index 432553e7d0e..5d8f6eaf1c3 100755 --- a/doc/scripts/GMT_base_symbols3.sh +++ b/doc/scripts/GMT_base_symbols3.sh @@ -3,12 +3,11 @@ # Plot psxy text symbol for the man page gmt begin GMT_base_symbols3 - gmt set GMT_THEME cookbook cat << EOF > tmp.txt # All the basic geometric psxy symbols > -Gblack 1 1 1.5c l+tA+f1c,Times-Roman -> -Glightred +> -Glightred 2 1 1.5c l+tB+f1c,Helvetica-Bold > -G- 3 1 1.25c l+tNO+f1c,Palatino-Bold diff --git a/doc/scripts/GMT_base_symbols3D.sh b/doc/scripts/GMT_base_symbols3D.sh index ae5a1cd49c4..857b885d2fa 100755 --- a/doc/scripts/GMT_base_symbols3D.sh +++ b/doc/scripts/GMT_base_symbols3D.sh @@ -3,7 +3,6 @@ # Plot psxyz 3-D symbols gmt begin GMT_base_symbols3D - gmt set GMT_THEME cookbook cat << EOF > x.txt 0 a -Su 1 a -SU diff --git a/doc/scripts/GMT_base_symbols4.sh b/doc/scripts/GMT_base_symbols4.sh index d3f9b4ed9b1..e33ad683fd2 100755 --- a/doc/scripts/GMT_base_symbols4.sh +++ b/doc/scripts/GMT_base_symbols4.sh @@ -3,7 +3,6 @@ # Plot plot bar symbol for the man page gmt begin GMT_base_symbols4 - gmt set GMT_THEME cookbook cat << EOF > ttv.d 1 1 0 2 3 1 diff --git a/doc/scripts/GMT_base_symbols5.sh b/doc/scripts/GMT_base_symbols5.sh index 9fc2db9bc32..acb9a95ba01 100755 --- a/doc/scripts/GMT_base_symbols5.sh +++ b/doc/scripts/GMT_base_symbols5.sh @@ -2,7 +2,6 @@ # # Demonstrate a few arrows gmt begin GMT_base_symbols5 -gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX1.75i -S -W2p -Gred --MAP_VECTOR_SHAPE=0.5 << EOF 0.5 1.0 4.5 2.5 v0.3i+s+e+bi diff --git a/doc/scripts/GMT_base_symbols6.sh b/doc/scripts/GMT_base_symbols6.sh index 3bb3434eb2e..3afed0e6404 100755 --- a/doc/scripts/GMT_base_symbols6.sh +++ b/doc/scripts/GMT_base_symbols6.sh @@ -3,7 +3,6 @@ # Plot psxy custom symbols for use on man page gmt begin GMT_base_symbols6 - gmt set GMT_THEME cookbook cat << EOF > tmp.txt # All the basic geometric plot symbols 1 1 1.5c kdeltoid diff --git a/doc/scripts/GMT_base_symbols7.sh b/doc/scripts/GMT_base_symbols7.sh index 775da51b5dc..31cd3075b41 100755 --- a/doc/scripts/GMT_base_symbols7.sh +++ b/doc/scripts/GMT_base_symbols7.sh @@ -3,7 +3,6 @@ # Plot front symbols for use on man page gmt begin GMT_base_symbols7 - gmt set GMT_THEME cookbook cat << EOF > t.txt 0 0 10 20 diff --git a/doc/scripts/GMT_base_symbols8.sh b/doc/scripts/GMT_base_symbols8.sh index 20b401d0327..936f7eeb065 100755 --- a/doc/scripts/GMT_base_symbols8.sh +++ b/doc/scripts/GMT_base_symbols8.sh @@ -3,7 +3,6 @@ # Plot plot quoted line symbols for use on man page gmt begin GMT_base_symbols8 - gmt set GMT_THEME cookbook gmt math -T0/360/1 T 5 MUL COSD 8 MUL = t.txt # Just a cosine with line-following constant text a few times gmt plot -R0/360/-10/10 -JM6i -W2.5p,6_4:0 -Sqn4:+l"wiggly line"+v+f12p,Times-Roman,red t.txt --PS_LINE_CAP=round diff --git a/doc/scripts/GMT_base_symbols9.sh b/doc/scripts/GMT_base_symbols9.sh index 707fc5882bc..df45d93f6e7 100755 --- a/doc/scripts/GMT_base_symbols9.sh +++ b/doc/scripts/GMT_base_symbols9.sh @@ -3,7 +3,6 @@ # Plot psxy decorated line symbols for use on man page gmt begin GMT_base_symbols9 - gmt set GMT_THEME cookbook gmt math -T0/360/1 T 5 MUL COSD 9 MUL T 180 SUB 120 DIV 2 POW NEG EXP MUL = t.txt # Just a cosine with line-following constant text a few times gmt plot -R0/360/-11/11 -JM6i -W1p,navy -S~n11:+ss0.1i+glightgreen+p0.1p,red t.txt -N diff --git a/doc/scripts/GMT_bezier.sh b/doc/scripts/GMT_bezier.sh index 7c324c73f17..ae2872c4754 100755 --- a/doc/scripts/GMT_bezier.sh +++ b/doc/scripts/GMT_bezier.sh @@ -8,7 +8,6 @@ cat << EOF > line.txt EOF gmt begin GMT_bezier - gmt set GMT_THEME cookbook gmt plot line.txt -R-0.25/4.25/-0.2/2.2 -JX3i/1.25i -W2p gmt plot line.txt -Sc0.1i -Gred -Wfaint gmt plot line.txt -W2p+s -X3i diff --git a/doc/scripts/GMT_blend.sh b/doc/scripts/GMT_blend.sh index 937b6cf0afb..15d1cfd5ffe 100755 --- a/doc/scripts/GMT_blend.sh +++ b/doc/scripts/GMT_blend.sh @@ -3,7 +3,6 @@ # Large grid has no inner boundary # Crossection shows output values are correct gmt begin GMT_blend - gmt set GMT_THEME cookbook gmt grdmath -R0/100/0/45 -I0.2 1 = 1.grd gmt grdmath -R10/60/15/40 -I0.2 2 = 2.grd gmt grdmath -R45/75/5/35 -I0.2 3 = 3.grd diff --git a/doc/scripts/GMT_blendtype.sh b/doc/scripts/GMT_blendtype.sh index d9427fda568..56c467b1455 100755 --- a/doc/scripts/GMT_blendtype.sh +++ b/doc/scripts/GMT_blendtype.sh @@ -15,7 +15,7 @@ gmt grdmath -R0/6/4/10 -I0.1 8 = c.nc gmt grdmath -R4/10/4/10 -I0.1 4 = d.nc gmt begin GMT_blendtype - gmt set GMT_THEME cookbook FONT_TAG 10p,Helvetica-Bold,black FONT_ANNOT_PRIMARY 8p + gmt set FONT_TAG 10p,Helvetica-Bold,black FONT_ANNOT_PRIMARY 8p gmt makecpt -Crainbow -T0/8 gmt subplot begin 2x3 -Fs5c/3c -Sct -Srl -R0/10/0/10 -A0+jTR gmt subplot set 0 -Aaverage @@ -73,7 +73,7 @@ gmt begin GMT_blendtype # 2. Last grid encountered matters gmt grdblend ?.nc -Co -I0.1 -Gblend.nc gmt subplot set 2 -Alast - gmt grdimage blend.nc + gmt grdimage blend.nc gmt plot lines.txt -W1p # 3. First grid encountered matters gmt grdblend ?.nc -Cf -I0.1 -Gblend.nc diff --git a/doc/scripts/GMT_cap.sh b/doc/scripts/GMT_cap.sh index 11c96739629..6e1c579b940 100755 --- a/doc/scripts/GMT_cap.sh +++ b/doc/scripts/GMT_cap.sh @@ -3,7 +3,6 @@ # Demonstrate the different line caps in PostScript # gmt begin GMT_cap - gmt set GMT_THEME cookbook cat <<-EOF > butt.txt 30 50 170 50 diff --git a/doc/scripts/GMT_chunking.sh b/doc/scripts/GMT_chunking.sh index 511a82477e6..7389b42618c 100755 --- a/doc/scripts/GMT_chunking.sh +++ b/doc/scripts/GMT_chunking.sh @@ -4,7 +4,6 @@ # gmt begin GMT_chunking -gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_ANNOT_PRIMARY 9p n=1 # current cell number diff --git a/doc/scripts/GMT_cmyk.sh b/doc/scripts/GMT_cmyk.sh index 1592a76c126..3b2596c8947 100755 --- a/doc/scripts/GMT_cmyk.sh +++ b/doc/scripts/GMT_cmyk.sh @@ -11,7 +11,6 @@ gmt project -N -Z2.6+e -G0.02 -C5.75/1.3 > C.d gmt project -N -Z2.6+e -G0.02 -C5/0 > Y.d gmt begin GMT_cmyk - gmt set GMT_THEME cookbook gmt plot -R-2.25/7.25/-1.8/2.75 -Jx0.6i R.d -Gred -B0 gmt plot G.d -Ggreen gmt plot B.d -Gblue diff --git a/doc/scripts/GMT_color_interpolate.sh b/doc/scripts/GMT_color_interpolate.sh index f342c8bbe31..4d487bb182b 100755 --- a/doc/scripts/GMT_color_interpolate.sh +++ b/doc/scripts/GMT_color_interpolate.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_color_interpolate - gmt set GMT_THEME cookbook gmt basemap -Jx1i -R0/6.8/0/2.0 -B0 # Plot polar color map in the left; right (top) and wrong (bottom) diff --git a/doc/scripts/GMT_colorlist.sh b/doc/scripts/GMT_colorlist.sh index 1170ca399cf..994c731cbe0 100755 --- a/doc/scripts/GMT_colorlist.sh +++ b/doc/scripts/GMT_colorlist.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate 4 ways to build a CPT form a list of colors gmt begin GMT_colorlist - gmt set GMT_THEME cookbook gmt makecpt -T0,2,6 -Cred,yellow,purple -Z gmt colorbar -R0/4/0/4 -Jx1i -C -Bx -By+l"d)" -Dx0/0+w5i/0.2i+h+mu echo "5.1 0 -T0,2,6 -Cred,yellow,purple -Z" | gmt text -F+f12p+jLB -N diff --git a/doc/scripts/GMT_cycle_1.sh b/doc/scripts/GMT_cycle_1.sh index 23bfa27376c..4cc5fb88a2e 100755 --- a/doc/scripts/GMT_cycle_1.sh +++ b/doc/scripts/GMT_cycle_1.sh @@ -2,6 +2,5 @@ # Demonstration of -w through a series of cycle plots # This one shows the initial time series (no -w yet) gmt begin GMT_cycle_1 - gmt set GMT_THEME cookbook gmt plot @mississippi.txt -JX15cT/7c -Bxaf -Byaf+l"10@+3@+ m@+3@+/s" -BWSrt+t"Mississippi river daily discharge" -W0.25p,red -i0,1+s1e-3 gmt end show diff --git a/doc/scripts/GMT_cycle_2.sh b/doc/scripts/GMT_cycle_2.sh index 96691a47098..7dd9d44e226 100755 --- a/doc/scripts/GMT_cycle_2.sh +++ b/doc/scripts/GMT_cycle_2.sh @@ -2,6 +2,5 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap yearly and show data on a normalized year gmt begin GMT_cycle_2 - gmt set GMT_THEME cookbook gmt plot @mississippi.txt -R0/1/0/50 -JX15c/7c -W0.25p,red -Bxaf -Byaf+l"10@+3@+ m@+3@+/s" -BWSrt+t"Mississippi river annual discharge" -i0,1+s1e-3 -wy gmt end show diff --git a/doc/scripts/GMT_cycle_3.sh b/doc/scripts/GMT_cycle_3.sh index 1ef48d0412c..414280ccb90 100755 --- a/doc/scripts/GMT_cycle_3.sh +++ b/doc/scripts/GMT_cycle_3.sh @@ -2,6 +2,5 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap annual time and make a histogram gmt begin GMT_cycle_3 - gmt set GMT_THEME cookbook gmt histogram @mississippi.txt -R-3/9/0/8 -JX15c/7c -T1 -Gred -W1p -Bxaf -Byaf+l"10@+6@+ m@+3@+/s" -BWSrt+t"Average monthly discharge" -Z0+w -i0,1+s1e-6 -wa gmt end show diff --git a/doc/scripts/GMT_cycle_4.sh b/doc/scripts/GMT_cycle_4.sh index 2e8115bcb94..05e0dd11d74 100755 --- a/doc/scripts/GMT_cycle_4.sh +++ b/doc/scripts/GMT_cycle_4.sh @@ -2,7 +2,6 @@ # Demonstration of -w through a series of cycle plots # This one shows how to apply wrapping to the y-coordinate gmt begin GMT_cycle_4 - gmt set GMT_THEME cookbook gmt subplot begin 1x2 -Fs8c/10c -BWSrt -T"Mississippi river annual discharge" -A+jTR gmt plot @mississippi.txt -i1+s1e-3,0 -R0/50/0/1 -W0.25p,blue -Byaf+l"Normalized year" -Bxaf+l"10@+3@+ m@+3@+/s" -wy+c1 -c gmt histogram @mississippi.txt -R-3/9/0/8 -T1 -Gblue -W1p -Bxaf -Byaf+l"10@+6@+ m@+3@+/s" -Z0+w -i0,1+s1e-6 -A -wa -c --FORMAT_TIME_PRIMARY_MAP=a diff --git a/doc/scripts/GMT_cycle_5.sh b/doc/scripts/GMT_cycle_5.sh index 4679a4a20ae..8993da4d99a 100755 --- a/doc/scripts/GMT_cycle_5.sh +++ b/doc/scripts/GMT_cycle_5.sh @@ -2,7 +2,6 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap data and grid and make a quick image gmt begin GMT_cycle_5 - gmt set GMT_THEME cookbook gmt xyz2grd @mississippi.txt -i0,1+s1e-3,1+s1e-3 -wy -R0/1/0/50 -I50+n -r -Gtmp.grd gmt grdimage tmp.grd -JX15c/8c -BWSen -Bxaf+l"Normalized year" -Byaf+l"Discharge (10@+3@+ m@+3@+/s)" gmt colorbar -DJRM -Baf diff --git a/doc/scripts/GMT_cycle_6.sh b/doc/scripts/GMT_cycle_6.sh index eecc4ebb7f9..87d69a0c6ca 100755 --- a/doc/scripts/GMT_cycle_6.sh +++ b/doc/scripts/GMT_cycle_6.sh @@ -3,7 +3,6 @@ # First just show data, with gaps > 6 hours not connected # Notice May 2018 spikes, data gaps in the summer of 2018, Covid drop. gmt begin GMT_cycle_6 - gmt set GMT_THEME cookbook gmt set TIME_WEEK_START Monday gmt subplot begin 2x2 -Fs15c/8c -M14p/6p -A -T"Verrazzano-Narrows Bridge @%34%\337@%% Brooklyn Traffic [2018-2020]" -BWSrt # Raw time-series diff --git a/doc/scripts/GMT_cyclic.sh b/doc/scripts/GMT_cyclic.sh index a5bfd0d9a78..21291f86059 100755 --- a/doc/scripts/GMT_cyclic.sh +++ b/doc/scripts/GMT_cyclic.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_cyclic - gmt set GMT_THEME cookbook gmt makecpt -T0/100 -Cjet -Ww gmt basemap -R0/20/0/1 -JM5i -BWse -B gmt colorbar -C -B -DJBC diff --git a/doc/scripts/GMT_dir_rose.sh b/doc/scripts/GMT_dir_rose.sh index 510d3520b95..87ed7aaf62b 100755 --- a/doc/scripts/GMT_dir_rose.sh +++ b/doc/scripts/GMT_dir_rose.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Showing map directional roses gmt begin GMT_dir_rose - gmt set GMT_THEME cookbook MAP_EMBELLISHMENT_MODE manual + gmt set MAP_EMBELLISHMENT_MODE manual gmt set FONT_LABEL 10p FONT_TITLE 12p MAP_ANNOT_OBLIQUE lon_horizontal,lat_parallel gmt set MAP_TITLE_OFFSET 5p MAP_FRAME_WIDTH 3p FORMAT_GEO_MAP dddF FONT_ANNOT_PRIMARY 10p # left: Fancy kind = 1 diff --git a/doc/scripts/GMT_eckert6.sh b/doc/scripts/GMT_eckert6.sh index eb376833ecb..7969ac3a0a8 100755 --- a/doc/scripts/GMT_eckert6.sh +++ b/doc/scripts/GMT_eckert6.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_eckert6 - gmt set GMT_THEME cookbook gmt coast -Rg -JKs4.5i -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 gmt end show diff --git a/doc/scripts/GMT_encoding.sh b/doc/scripts/GMT_encoding.sh index 4ed881cf4e7..b54aa491ab3 100755 --- a/doc/scripts/GMT_encoding.sh +++ b/doc/scripts/GMT_encoding.sh @@ -55,7 +55,6 @@ BEGIN { EOF gmt begin GMT_encoding -gmt set GMT_THEME cookbook gmt set PS_CHAR_ENCODING $1 gmt plot -R0/9/-1/32 -Jx0.345i/-0.21i -Bg1 -B+t"Octal codes for $1" -Ggray -X3i -Sri tt.empty $AWK -f tt.awk tt.chart | gmt text -F+f10p,Times-Roman diff --git a/doc/scripts/GMT_equidistant_conic.sh b/doc/scripts/GMT_equidistant_conic.sh index 12479c7647e..b73dc3c24d0 100755 --- a/doc/scripts/GMT_equidistant_conic.sh +++ b/doc/scripts/GMT_equidistant_conic.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_equidistant_conic - gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.15c gmt coast -R-88/-70/18/24 -JD-79/21/19/23/12c -Bag -Di -N1/thick,red -Glightgreen -Wthinnest gmt end show diff --git a/doc/scripts/GMT_fatline.sh b/doc/scripts/GMT_fatline.sh index 8ce52aa20e2..3e70021e015 100755 --- a/doc/scripts/GMT_fatline.sh +++ b/doc/scripts/GMT_fatline.sh @@ -7,7 +7,6 @@ cat > gc.d << END -8 85 END gmt begin GMT_fatline - gmt set GMT_THEME cookbook gmt plot -R-90/82/0/87+r -JM-45/84.5/2.5i -W30p gc.d gmt plot -W1p,red gc.d gmt plot -X3.25i -W30p gc.d --PS_LINE_CAP=round --PS_LINE_JOIN=round diff --git a/doc/scripts/GMT_fill_curves.sh b/doc/scripts/GMT_fill_curves.sh index 0284b2508bb..8cc181e183f 100755 --- a/doc/scripts/GMT_fill_curves.sh +++ b/doc/scripts/GMT_fill_curves.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Demonstrate filling of area between two sinusoidal curves with a section of NaNs gmt begin GMT_fill_curves - gmt set GMT_THEME cookbook gmt math -T0/720/5 -N3/0 T -C1 COSD -C2 3 MUL SIND 4 DIV -C1,2 1 T 200 250 INRANGE SUB 0 NAN MUL = both_NaN.txt gmt plot -Mc+gblue+r+l"Short @~l@~ exceeds long" -Bxa90g90+u@. -Byafg -BWStr -JX15c/3c -R0/720/-1.25/2.5 both_NaN.txt -Gred -l"Long @~l@~ exceeds short" gmt end show diff --git a/doc/scripts/GMT_gall_stereo.sh b/doc/scripts/GMT_gall_stereo.sh index 4960633ca97..9c5ec1486a3 100755 --- a/doc/scripts/GMT_gall_stereo.sh +++ b/doc/scripts/GMT_gall_stereo.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_gall_stereo - gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP dddA gmt coast -R-180/180/-60/80 -JCyl_stere/0/45/12c -Bxa60f30g30 -Bya30g30 -Dc -A5000 -Wblack -Gseashell4 -Santiquewhite1 gmt end show diff --git a/doc/scripts/GMT_grid2pix.sh b/doc/scripts/GMT_grid2pix.sh index d895f7c7db6..905d95bc396 100755 --- a/doc/scripts/GMT_grid2pix.sh +++ b/doc/scripts/GMT_grid2pix.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the problem with grdsample -T gmt begin GMT_grid2pix - gmt set GMT_THEME cookbook gmt subplot begin 2x1 -F6i/2.5i -M3p -A+jTR+o-0.2i/0 gmt subplot set 0 gmt math -T0/7/0.02 T PI MUL COS = | gmt plot -R0/6.7/-1.5/1.7 -W2p -Bx1 -By0g10 -BWS --MAP_FRAME_TYPE=graph --MAP_GRID_PEN_PRIMARY=0.25p,- diff --git a/doc/scripts/GMT_hinge.sh b/doc/scripts/GMT_hinge.sh index b87cc079a29..040f6d51f8f 100755 --- a/doc/scripts/GMT_hinge.sh +++ b/doc/scripts/GMT_hinge.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_hinge - gmt set GMT_THEME cookbook gmt makecpt -Cglobe -T-8000/3000 gmt colorbar -B -Dx0/0+w4.5i/0.1i+h -W0.001 gmt colorbar -Cglobe -B -Dx0/0+w4.5i/0.1i+h -W0.001 -Y0.5i diff --git a/doc/scripts/GMT_images.sh b/doc/scripts/GMT_images.sh index f899f5230d2..2088ed4204f 100755 --- a/doc/scripts/GMT_images.sh +++ b/doc/scripts/GMT_images.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_images - gmt set GMT_THEME cookbook gmt image @nsf1.jpg -R0/2/0/1 -JX5i/1.6i -B0 -DjML+w1.5i+o0.1i/0i gmt image @soest.eps -DjMR+o0.1i/0i+w2i gmt end show diff --git a/doc/scripts/GMT_inset.sh b/doc/scripts/GMT_inset.sh index b866ea9f0b1..76edd79fd57 100755 --- a/doc/scripts/GMT_inset.sh +++ b/doc/scripts/GMT_inset.sh @@ -4,7 +4,6 @@ gmt begin GMT_inset # Bottom map of Australia - gmt set GMT_THEME cookbook gmt coast -R110E/170E/44S/9S -JM6i -B -BWSne -Wfaint -N2/1p -EAU+gbisque -Gbrown -Sazure1 -Da --FORMAT_GEO_MAP=dddF gmt inset begin -DjTR+w1.5i+o0.15i -F+gwhite+p1p+s -C0.05i gmt coast -Rg -JG120/30S/ -Da -Gbrown -A5000 -Bg -Wfaint -EAU+gbisque diff --git a/doc/scripts/GMT_joint.sh b/doc/scripts/GMT_joint.sh index 360513f07c4..307d7e083e0 100755 --- a/doc/scripts/GMT_joint.sh +++ b/doc/scripts/GMT_joint.sh @@ -3,7 +3,6 @@ # Demonstrate the different line joints in PostScript # gmt begin GMT_joint - gmt set GMT_THEME cookbook cat <<-EOF > round.txt 1 1 8 2 diff --git a/doc/scripts/GMT_lambert_az_rect.sh b/doc/scripts/GMT_lambert_az_rect.sh index d85a48c9b53..b6982530879 100755 --- a/doc/scripts/GMT_lambert_az_rect.sh +++ b/doc/scripts/GMT_lambert_az_rect.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_lambert_az_rect - gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0 gmt coast -R0/-40/60/-10+r -JA30/-30/12c -Bag -Dl -A500 -Gp10+r300 -Wthinnest gmt end show diff --git a/doc/scripts/GMT_lambert_conic.sh b/doc/scripts/GMT_lambert_conic.sh index 113b9200dc6..1061c279923 100755 --- a/doc/scripts/GMT_lambert_conic.sh +++ b/doc/scripts/GMT_lambert_conic.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_lambert_conic - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE FANCY FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.15c gmt coast -R-130/-70/24/52 -Jl-100/35/33/45/1:50000000 -Bag -Dl -N1/thick,red -N2/thinner -A500 -Gtan -Wthinnest,white -Sblue gmt end show diff --git a/doc/scripts/GMT_latex.sh b/doc/scripts/GMT_latex.sh index 1752a582cee..66d62b712b3 100755 --- a/doc/scripts/GMT_latex.sh +++ b/doc/scripts/GMT_latex.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_latex - gmt set GMT_THEME cookbook gmt basemap -R-200/200/0/2 -JX15c -Bxaf+l"@[\nabla^4 \psi - \Delta \sigma_{xx}^2@[ (MPa)" -BS gmt end show diff --git a/doc/scripts/GMT_legend.sh b/doc/scripts/GMT_legend.sh index e04eb037913..fbeb362cde0 100755 --- a/doc/scripts/GMT_legend.sh +++ b/doc/scripts/GMT_legend.sh @@ -3,7 +3,6 @@ # Testing gmt legend capabilities for tables with colors gmt begin GMT_legend -gmt set GMT_THEME cookbook cat < table.txt #G 0.04i H 24 Times-Roman Eight Largest Cities in North America diff --git a/doc/scripts/GMT_linear.sh b/doc/scripts/GMT_linear.sh index af7d9b90ebb..9a49591dc24 100755 --- a/doc/scripts/GMT_linear.sh +++ b/doc/scripts/GMT_linear.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_linear - gmt set GMT_THEME cookbook gmt math -T0/100/1 T SQRT = sqrt.txt gmt math -T0/100/10 T SQRT = sqrt10.txt gmt plot -R0/100/0/10 -JX8c/4c -Bag -BWSne+gsnow -Wthick,blue,- sqrt.txt diff --git a/doc/scripts/GMT_linear_cal.sh b/doc/scripts/GMT_linear_cal.sh index 90979cee9d1..70e2357cff1 100755 --- a/doc/scripts/GMT_linear_cal.sh +++ b/doc/scripts/GMT_linear_cal.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_linear_cal - gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP o TIME_WEEK_START Sunday FORMAT_CLOCK_MAP=-hham FORMAT_TIME_PRIMARY_MAP full gmt basemap -R2001-9-24T/2001-9-29T/T07:0/T15:0 -JX10c/-5c -Bxa1Kf1kg1d -Bya1Hg1h -BWsNe+glightyellow gmt end show diff --git a/doc/scripts/GMT_linear_d.sh b/doc/scripts/GMT_linear_d.sh index 85ee826775c..06383271980 100755 --- a/doc/scripts/GMT_linear_d.sh +++ b/doc/scripts/GMT_linear_d.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_linear_d - gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0.1i MAP_FRAME_TYPE FANCY FORMAT_GEO_MAP ddd:mm:ssF gmt coast -Rg-55/305/-90/90 -Jx0.04c -Bagf -BWSen -Dc -A1000 -Glightbrown -Wthinnest -Slightblue gmt end show diff --git a/doc/scripts/GMT_linearrow.sh b/doc/scripts/GMT_linearrow.sh index 78ea962cc6d..1b46863a460 100755 --- a/doc/scripts/GMT_linearrow.sh +++ b/doc/scripts/GMT_linearrow.sh @@ -2,7 +2,6 @@ gmt math -T10/30/1 T 20 SUB 10 DIV 2 POW 41.5 ADD = line.txt gmt begin GMT_linearrow - gmt set GMT_THEME cookbook gmt plot line.txt -R8/32/40/44 -JM5i -Wfaint,red -Bxaf -Bya2f1 -BWSne --MAP_FRAME_TYPE=plain gmt plot line.txt -W2p+o1c/500k+vb0.2i+gred+pfaint+bc+ve0.3i+gblue+h0.5 gmt end show diff --git a/doc/scripts/GMT_linecap.sh b/doc/scripts/GMT_linecap.sh index a420284214c..285dd9eaa36 100755 --- a/doc/scripts/GMT_linecap.sh +++ b/doc/scripts/GMT_linecap.sh @@ -5,7 +5,6 @@ cat << EOF > lines.txt EOF gmt begin GMT_linecap - gmt set GMT_THEME cookbook gmt plot lines.txt -R-0.25/5.25/-0.2/1.4 -Jx1i -W4p gmt plot lines.txt -Y0.2i -W4p,orange,. gmt plot lines.txt -Y0.2i -W4p,red,9_4_2_4:2p diff --git a/doc/scripts/GMT_lineoffset.sh b/doc/scripts/GMT_lineoffset.sh index 2dbdfb6978d..f6f779f5953 100755 --- a/doc/scripts/GMT_lineoffset.sh +++ b/doc/scripts/GMT_lineoffset.sh @@ -2,7 +2,6 @@ gmt math -T10/30/1 T 20 SUB 10 DIV 2 POW 41.5 ADD = line.txt gmt begin GMT_lineoffset - gmt set GMT_THEME cookbook gmt plot line.txt -R8/32/40/44 -JM5i -Wfaint,red -Bxaf -Bya2f1 -BWSne --MAP_FRAME_TYPE=plain gmt plot line.txt -W2p+o1c/500k gmt text -F+f10p+jCM+a << EOF diff --git a/doc/scripts/GMT_log.sh b/doc/scripts/GMT_log.sh index 538af7a7da4..62ae7a467ae 100755 --- a/doc/scripts/GMT_log.sh +++ b/doc/scripts/GMT_log.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_log - gmt set GMT_THEME cookbook gmt math -T0/100/1 T SQRT = sqrt.txt gmt math -T0/100/10 T SQRT = sqrt10.txt gmt plot -R1/100/0/10 -Jx4cl/0.4c -Bx2g3 -Bya2f1g2 -BWSne+gbisque -Wthick,blue,- -h sqrt.txt diff --git a/doc/scripts/GMT_mag_rose.sh b/doc/scripts/GMT_mag_rose.sh index 9cf1e03f415..9c253cae9bb 100755 --- a/doc/scripts/GMT_mag_rose.sh +++ b/doc/scripts/GMT_mag_rose.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_mag_rose - gmt set GMT_THEME cookbook MAP_EMBELLISHMENT_MODE manual + gmt set MAP_EMBELLISHMENT_MODE manual # Magnetic rose with a specified declination gmt basemap -R-10/-2/12.8812380332/0.661018975345+r -JOc0/0/50/60/7i -B -BWSne -X1.25i --MAP_ANNOT_OBLIQUE=lon_horizontal,lat_parallel --FONT_ANNOT_PRIMARY=12p gmt basemap -Tmg-2/0.5+w2.5i+d-14.5+t45/10/5+i0.25p,blue+p0.25p,red+l+jCM \ diff --git a/doc/scripts/GMT_map_frame_type.sh b/doc/scripts/GMT_map_frame_type.sh index 6ea3787c7c1..bfb854e97d4 100755 --- a/doc/scripts/GMT_map_frame_type.sh +++ b/doc/scripts/GMT_map_frame_type.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_map_frame_type - gmt set GMT_THEME cookbook gmt set FONT_TAG 12p,Helvetica-Bold gmt subplot begin 2x3 -Fs4c/3.5c -M0.5c -R-5/5/-4/5 -A+JTC+o4p/10p gmt subplot set -Afancy diff --git a/doc/scripts/GMT_mapscale.sh b/doc/scripts/GMT_mapscale.sh index 2373a49a2a3..98a208f58e8 100755 --- a/doc/scripts/GMT_mapscale.sh +++ b/doc/scripts/GMT_mapscale.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_mapscale - gmt set GMT_THEME cookbook gmt basemap -R0/40/50/56 -JM5i -B -LjML+c53+w1000k+f+l"Scale at 53@.N" -F+glightcyan+c0+p gmt basemap -LjBR+c53+w1000k+l+f -F+p1p+i+gwhite+c0.1i h=$(gmt mapproject -Wh -Di) diff --git a/doc/scripts/GMT_mercator.sh b/doc/scripts/GMT_mercator.sh index 49de32d097d..fea045babeb 100755 --- a/doc/scripts/GMT_mercator.sh +++ b/doc/scripts/GMT_mercator.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_mercator - gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE fancy-rounded gmt coast -R0/360/-70/70 -Jm0.03c -Bxa60f15 -Bya30f15 -Dc -A5000 -Gred gmt end show diff --git a/doc/scripts/GMT_misfit.sh b/doc/scripts/GMT_misfit.sh index 9bd6a8f2dda..85c300a6a36 100755 --- a/doc/scripts/GMT_misfit.sh +++ b/doc/scripts/GMT_misfit.sh @@ -18,7 +18,6 @@ xa=$(gmt math -Q $x 0.4 ADD =) a1=$(gmt math -Q $angle 180 ADD =) a2=$(gmt math -Q $angle 270 ADD =) gmt begin GMT_misfit ps - gmt set GMT_THEME cookbook gmt plot -R1/6/0/3 -Jx2c -Glightgreen@35 <<- EOF $x 1 4.5 1 diff --git a/doc/scripts/GMT_movie_canvas.sh b/doc/scripts/GMT_movie_canvas.sh index 7d786c06522..f4cba50f562 100755 --- a/doc/scripts/GMT_movie_canvas.sh +++ b/doc/scripts/GMT_movie_canvas.sh @@ -3,7 +3,6 @@ # Makes a plot of the general movie dimensions # gmt begin GMT_movie_canvas - gmt set GMT_THEME cookbook gmt basemap -R0/24/0/13.5 -Jx1c -B0 gmt plot -W0.5p,- <<- EOF > diff --git a/doc/scripts/GMT_movie_progress.sh b/doc/scripts/GMT_movie_progress.sh index e9f1cc635b3..c0e211d438a 100755 --- a/doc/scripts/GMT_movie_progress.sh +++ b/doc/scripts/GMT_movie_progress.sh @@ -6,7 +6,6 @@ # GMT_KNOWN_FAILURE_WINDOWS cat << EOF > map.sh gmt begin - gmt set GMT_THEME cookbook gmt basemap -R0/10/0/5 -JX7.6i/3.4i -Bafg -BWSrt+gbeige gmt end EOF diff --git a/doc/scripts/GMT_nearneighbor.sh b/doc/scripts/GMT_nearneighbor.sh index 00672b7a151..c1e6903096f 100755 --- a/doc/scripts/GMT_nearneighbor.sh +++ b/doc/scripts/GMT_nearneighbor.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_nearneighbor -gmt set GMT_THEME cookbook gmt plot -R0/2/0/2 -Jx2i -Sc2i -Wthick -Glightgreen@70 -Bg0.25 << EOF 0.75 1.25 EOF diff --git a/doc/scripts/GMT_obl_baja.sh b/doc/scripts/GMT_obl_baja.sh index 86bc5209f53..32372b8cdf2 100755 --- a/doc/scripts/GMT_obl_baja.sh +++ b/doc/scripts/GMT_obl_baja.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Oblique Mercator map for Baja California with oblique Equator along y-axis gmt begin GMT_obl_baja - gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE lon_horizontal,lat_horizontal,tick_extend gmt coast -R122W/35N/107W/22N+r -JOa120W/25N/-30/6c+v -Gsienna -Ba5g5 -B+f -N1/1p -EUS+gburlywood -Smintcream -TdjBL+l gmt end show diff --git a/doc/scripts/GMT_obl_merc.sh b/doc/scripts/GMT_obl_merc.sh index b129db0d0f0..9a21b481510 100755 --- a/doc/scripts/GMT_obl_merc.sh +++ b/doc/scripts/GMT_obl_merc.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash gmt begin GMT_obl_merc - gmt set GMT_THEME cookbook gmt coast -R270/20/305/25+r -JOc280/25.5/22/69/12c -Bag -Di -A250 -Gburlywood -Wthinnest -TdjTR+f2+l -Sazure gmt end show diff --git a/doc/scripts/GMT_obl_nz.sh b/doc/scripts/GMT_obl_nz.sh index 494790de7cb..47b56305c54 100755 --- a/doc/scripts/GMT_obl_nz.sh +++ b/doc/scripts/GMT_obl_nz.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Oblique Mercator map for NZ using complementary poles gmt begin GMT_obl_nz -gmt set GMT_THEME cookbook lon=173:17:02E lat=41:16:15S az=35 diff --git a/doc/scripts/GMT_panel.sh b/doc/scripts/GMT_panel.sh index 6893f17ec63..981e3255a93 100755 --- a/doc/scripts/GMT_panel.sh +++ b/doc/scripts/GMT_panel.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_panel - gmt set GMT_THEME cookbook gmt basemap -R0/2/0/1 -JX5i/2i -B0 gmt inset begin -DjTL+o0.2i+w1.75i/0.75i -F+glightgreen+r gmt inset end diff --git a/doc/scripts/GMT_polar.sh b/doc/scripts/GMT_polar.sh index 7897b24842d..f6a73160848 100755 --- a/doc/scripts/GMT_polar.sh +++ b/doc/scripts/GMT_polar.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_polar - gmt set GMT_THEME cookbook gmt grdmath -R0/360/2/4 -I6/0.1 X 4 MUL PI MUL 180 DIV COS Y 2 POW MUL = tt.nc gmt grdcontour tt.nc -JP8c -B30 -BNs+ghoneydew -C2 -S4 --FORMAT_GEO_MAP=+ddd gmt end show diff --git a/doc/scripts/GMT_pow.sh b/doc/scripts/GMT_pow.sh index 752d2caa7ff..d8358d1725b 100755 --- a/doc/scripts/GMT_pow.sh +++ b/doc/scripts/GMT_pow.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_pow - gmt set GMT_THEME cookbook gmt math -T0/100/1 T SQRT = sqrt.txt gmt math -T0/100/10 T SQRT = sqrt10.txt gmt plot -R0/100/0/10 -Jx0.75cp0.5/0.4c -Bxa1p -Bya2f1 -BWSne+givory -Wthick sqrt.txt diff --git a/doc/scripts/GMT_pstext_clearance.sh b/doc/scripts/GMT_pstext_clearance.sh index 37d4995157b..00b49b073a4 100755 --- a/doc/scripts/GMT_pstext_clearance.sh +++ b/doc/scripts/GMT_pstext_clearance.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_pstext_clearance -gmt set GMT_THEME cookbook gmt text -R0/3/-0.1/1.5 -Jx1i -C0.2i+tO -Wthick -F+f36p,Helvetica-Bold << EOF 1.5 0.5 My Text EOF diff --git a/doc/scripts/GMT_pstext_justify.sh b/doc/scripts/GMT_pstext_justify.sh index 7e36eb1d5d1..bb63b32916f 100755 --- a/doc/scripts/GMT_pstext_justify.sh +++ b/doc/scripts/GMT_pstext_justify.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_pstext_justify -gmt set GMT_THEME cookbook B=0.2 M=0.38 T=0.56 diff --git a/doc/scripts/GMT_registration.sh b/doc/scripts/GMT_registration.sh index ac8d0998b73..464b623129c 100755 --- a/doc/scripts/GMT_registration.sh +++ b/doc/scripts/GMT_registration.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_registration -gmt set GMT_THEME cookbook # Gridline registration gmt plot -R0/3/0/3 -JX2.5i/1.25i -B1g1 -Bwesn -Wthinner -L -Glightred << EOF 0.5 1.5 diff --git a/doc/scripts/GMT_seamount_azim.sh b/doc/scripts/GMT_seamount_azim.sh index 9f86f306311..e2476443dcd 100755 --- a/doc/scripts/GMT_seamount_azim.sh +++ b/doc/scripts/GMT_seamount_azim.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the effect of parameter u0 on slides gmt begin GMT_seamount_azim - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 9p,Times-Italic FONT_LABEL 12p,Times-Italic gmt basemap -R-1/1/0/1 -JX6i/1i -Bxaf+l"@~g@~" -Byaf+l"s(@~g@~)" v=2; s_bar=$(gmt math -Q 1 1 $v 1 ADD DIV SUB =) diff --git a/doc/scripts/GMT_seamount_cum_inc.sh b/doc/scripts/GMT_seamount_cum_inc.sh index 9e1f4ec9253..1d25d9dc88a 100755 --- a/doc/scripts/GMT_seamount_cum_inc.sh +++ b/doc/scripts/GMT_seamount_cum_inc.sh @@ -2,7 +2,6 @@ # Plot 5 life-stages in growing volcanoes in crossection # Using un-truncated Gaussian shapes with Gaussian flux gmt begin GMT_seamount_cum_inc - gmt set GMT_THEME cookbook echo "100 75 50 5000 1 0" > t.txt gmt grdseamount -R40/160/74/76+uk -I100 -Gsmtc_%05.2f.nc t.txt -T0.8/0/0.2 -Qc/g -Dk -Cg -Mc.lis gmt grdseamount -R40/160/74/76+uk -I100 -Gsmti_%05.2f.nc t.txt -T0.8/0/0.2 -Qi/g -Dk -Cg -Mi.lis diff --git a/doc/scripts/GMT_seamount_flux.sh b/doc/scripts/GMT_seamount_flux.sh index 978f54ab50f..75666227cb8 100755 --- a/doc/scripts/GMT_seamount_flux.sh +++ b/doc/scripts/GMT_seamount_flux.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the two different volume-flux curves gmt begin GMT_seamount_flux - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 14p # Two flux curves gmt math -T0/1/1 T = | gmt plot -R0/1/0/1.1 -JX6.5i/1i -W1p,- -Bxa0.25fg0.5 -Byafg0.5 -Bx+l"Normalized seamount lifespan (@%6%t/@~D@~@%6%t@%%)" -By+l"@%6%V(t)/V@-0@-@%%" -BWSne --FONT_LABEL=16p,Helvetica,black diff --git a/doc/scripts/GMT_seamount_map.sh b/doc/scripts/GMT_seamount_map.sh index 80c2ccd5a2b..f34ec09e7b3 100755 --- a/doc/scripts/GMT_seamount_map.sh +++ b/doc/scripts/GMT_seamount_map.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the circular and elliptical bases of seamounts gmt begin GMT_seamount_map - gmt set GMT_THEME cookbook gmt set MAP_VECTOR_SHAPE 0.5 # Circle diff --git a/doc/scripts/GMT_seamount_psi.sh b/doc/scripts/GMT_seamount_psi.sh index 70f7ac1ffae..0edb56b643d 100755 --- a/doc/scripts/GMT_seamount_psi.sh +++ b/doc/scripts/GMT_seamount_psi.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the effect of function psi on slides gmt begin GMT_seamount_psi - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 9p,Times-Italic FONT_LABEL 12p,Times-Italic gmt basemap -R0/1/0/1 -JX6i/1i -Bxafg0.5+l"@~t@~" -Byafg0.5+l"@~y(t)@~" beta=1; diff --git a/doc/scripts/GMT_seamount_slide.sh b/doc/scripts/GMT_seamount_slide.sh index 3b1a3120e24..fa79f423821 100755 --- a/doc/scripts/GMT_seamount_slide.sh +++ b/doc/scripts/GMT_seamount_slide.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate a Polynomial seamount with two slides gmt begin GMT_seamount_slide - gmt set GMT_THEME cookbook echo 0 0 30 5 | gmt grdseamount -R-45/40/-45/32/0/20 -I0.05 -Gsmt.grd -Co -ZNaN -F0.17 -S+h1/4+d1+a25/170+u0.2 -S+h0.7/4.7+d0.7+a200/260+u0.1+p8 gmt grdview smt.grd -Qi -I+a65+ne0.8 -Jx0.2c -JZ3c -p150/20 -Cbatlow gmt end show diff --git a/doc/scripts/GMT_seamount_specs.sh b/doc/scripts/GMT_seamount_specs.sh index b71ff33a5a1..656353b3453 100755 --- a/doc/scripts/GMT_seamount_specs.sh +++ b/doc/scripts/GMT_seamount_specs.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the parameters for specifying slides gmt begin GMT_seamount_specs - gmt set GMT_THEME cookbook gmt plot -R0/2.6/0/1.2 -Jx2.4i/1i -W1p <<- EOF 0 1 0.2 1 @@ -41,7 +40,7 @@ gmt begin GMT_seamount_specs > 0.28 0.9 0.75 0.9 - > + > 0.44 0.4 1.05 0.4 EOF diff --git a/doc/scripts/GMT_seamount_types.sh b/doc/scripts/GMT_seamount_types.sh index affe4f2e24d..a6f2c276003 100755 --- a/doc/scripts/GMT_seamount_types.sh +++ b/doc/scripts/GMT_seamount_types.sh @@ -2,7 +2,6 @@ # Plot five different seamount types selectable in grdseamount # organized by smallest to largest volume for same r,h gmt begin GMT_seamount_types - gmt set GMT_THEME cookbook gmt set MAP_VECTOR_SHAPE 0.5 # 1. Gaussian seamount echo "0 1" > tmp diff --git a/doc/scripts/GMT_seamount_u0.sh b/doc/scripts/GMT_seamount_u0.sh index 0fcb8a50d23..47511016c93 100755 --- a/doc/scripts/GMT_seamount_u0.sh +++ b/doc/scripts/GMT_seamount_u0.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Illustrate the effect of parameter u0 on slides gmt begin GMT_seamount_u0 - gmt set GMT_THEME cookbook gmt set FONT_LABEL 12p,Times-Italic gmt basemap -R0/1/0/1 -JX6i/1i -Bxaf+l"u" -Byaf+l"q(u)" gmt set FONT_ANNOT_PRIMARY 9p,Times-Italic diff --git a/doc/scripts/GMT_segmentize.sh b/doc/scripts/GMT_segmentize.sh index a2f92a1eaa3..e39a1176d11 100755 --- a/doc/scripts/GMT_segmentize.sh +++ b/doc/scripts/GMT_segmentize.sh @@ -23,7 +23,6 @@ cat << EOF > t2.txt EOF gmt begin GMT_segmentize - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 9p gmt subplot begin 2x3 -Fs5c/4.5c -R0/50/0/45 -Sct -Srl -Jx0.1cd -M1p # Show the data and its natural connectivity diff --git a/doc/scripts/GMT_seislegend.sh b/doc/scripts/GMT_seislegend.sh index 3a816541be2..843b3c0666b 100755 --- a/doc/scripts/GMT_seislegend.sh +++ b/doc/scripts/GMT_seislegend.sh @@ -3,7 +3,6 @@ # Show a basic seismicity legend # gmt begin GMT_seislegend - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p FONT_TITLE 18p FORMAT_GEO_MAP ddd:mm:ssF # Create standard seismicity color table diff --git a/doc/scripts/GMT_sinus_int.sh b/doc/scripts/GMT_sinus_int.sh index 0ecc62e3531..121d92eba81 100755 --- a/doc/scripts/GMT_sinus_int.sh +++ b/doc/scripts/GMT_sinus_int.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_sinus_int - gmt set GMT_THEME cookbook gmt coast -R200/340/-90/90 -Ji0.04c -Bg -A10000 -Dc -Gdarkred -Sazure gmt coast -R-20/60/-90/90 -Bg -Dc -A10000 -Gdarkgreen -Sazure -X5.6c gmt coast -R60/200/-90/90 -Bg -Dc -A10000 -Gdarkblue -Sazure -X3.2c diff --git a/doc/scripts/GMT_slope2intensity.sh b/doc/scripts/GMT_slope2intensity.sh index 2e7bd65dedc..f551dc241b6 100755 --- a/doc/scripts/GMT_slope2intensity.sh +++ b/doc/scripts/GMT_slope2intensity.sh @@ -28,7 +28,6 @@ cat << EOF >> t2.txt 0 0 EOF gmt begin GMT_slope2intensity - gmt set GMT_THEME cookbook gmt plot -R2/15/1.1/8.4 -Jx0.44444i -B0 t2.txt -Glightgreen -W0.25p gmt plot -Sv14p+e+jb+h0.5 -W1p,orange -Gorange -N <<- EOF 15 4 210 0.75i @@ -72,7 +71,7 @@ gmt begin GMT_slope2intensity 10 2.325 30 70 EOF echo 13.7 6.5 -60 14p,Helvetica,orange CB LIGHT SOURCE | gmt text -F+a+f+j -Gwhite -C0 - gmt text -F+a+f+j <<- EOF + gmt text -F+a+f+j <<- EOF 4.1 3.9 0 16p,Times-Roman RB \\hat{\\mathbf{n}}_1 10.7 4.1 0 16p,Times-Roman RB \\hat{\\mathbf{n}}_2 11.5 2.7 0 16p,Times-Roman LB \\hat{\\mathbf{s}} diff --git a/doc/scripts/GMT_slopes.sh b/doc/scripts/GMT_slopes.sh index d297b99c17a..e225d9b6c9c 100755 --- a/doc/scripts/GMT_slopes.sh +++ b/doc/scripts/GMT_slopes.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Show gmtregress -A option in effect gmt begin GMT_slopes - gmt set GMT_THEME cookbook cat << EOF > data 5.2957 -19.5631 7.087 -36.0337 diff --git a/doc/scripts/GMT_stereographic_general.sh b/doc/scripts/GMT_stereographic_general.sh index 13cb2c1c599..9ef41746059 100755 --- a/doc/scripts/GMT_stereographic_general.sh +++ b/doc/scripts/GMT_stereographic_general.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_stereographic_general - gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE separate gmt coast -R100/-42/160/-8+r -JS130/-30/12c -Bag -Dl -A500 -Ggreen -Slightblue -Wthinnest gmt end show diff --git a/doc/scripts/GMT_stereographic_rect.sh b/doc/scripts/GMT_stereographic_rect.sh index 2551dbe95b4..e51b642d65f 100755 --- a/doc/scripts/GMT_stereographic_rect.sh +++ b/doc/scripts/GMT_stereographic_rect.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_stereographic_rect - gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE lon_horizontal,lat_horizontal,tick_extend,tick_normal gmt coast -R-25/59/70/72+r -JS10/90/11c -B20g -Dl -A250 -Gdarkbrown -Wthinnest -Slightgray gmt end show diff --git a/doc/scripts/GMT_stereonets.sh b/doc/scripts/GMT_stereonets.sh index 049b9938612..2400a855eb3 100755 --- a/doc/scripts/GMT_stereonets.sh +++ b/doc/scripts/GMT_stereonets.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_stereonets - gmt set GMT_THEME cookbook gmt basemap -R0/360/-90/90 -JA0/0/1.75i -Bg15 echo "180 -90 SCHMIDT" | gmt text -N -D0/-0.2c -F+f12p,Helvetica-Bold+jTC gmt basemap -JS0/0/1.75i -Bg15 -X2.75i diff --git a/doc/scripts/GMT_title_fade.sh b/doc/scripts/GMT_title_fade.sh index ab5429106e8..23be19ce068 100755 --- a/doc/scripts/GMT_title_fade.sh +++ b/doc/scripts/GMT_title_fade.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_title_fade - gmt set GMT_THEME cookbook cat <<- EOF > B.txt 0 afg 0 1 afg t@-i@- diff --git a/doc/scripts/GMT_utm_zones.sh b/doc/scripts/GMT_utm_zones.sh index 6b90b471489..1106b1753ad 100755 --- a/doc/scripts/GMT_utm_zones.sh +++ b/doc/scripts/GMT_utm_zones.sh @@ -3,7 +3,6 @@ # Makes a plot of the global UTM zone grid including the exceptions near Norway/Spitsbergen # gmt begin GMT_utm_zones -gmt set GMT_THEME cookbook gmt coast -Rd -JQ9i -Groyalblue -Sazure -Dl -A2000 -Bx60f6 -By0 -BwsNe --MAP_ANNOT_OFFSET_PRIMARY=0.15i cat << EOF > tt.z.d > Do S pole zone diff --git a/doc/scripts/GMT_vector.sh b/doc/scripts/GMT_vector.sh index adf7d3bcfa7..203f25e0547 100755 --- a/doc/scripts/GMT_vector.sh +++ b/doc/scripts/GMT_vector.sh @@ -2,7 +2,6 @@ # # Demonstrate vector details gmt begin GMT_vector -gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX6i -Sv1i+s+e+a50+p0.25p,dashed -W5p <<- EOF 0.5 0.5 4.5 1.5 diff --git a/doc/scripts/GMT_vector4.sh b/doc/scripts/GMT_vector4.sh index d6a6cafe524..08318b8f323 100755 --- a/doc/scripts/GMT_vector4.sh +++ b/doc/scripts/GMT_vector4.sh @@ -2,7 +2,6 @@ # # Demonstrate deprecated GMT4 vector gmt begin GMT_vector4 -gmt set GMT_THEME cookbook # Cartesian straight arrows a=$(gmt math -Q 1 4 DIV ATAN R2D =) L=$(gmt math -Q 1 4 HYPOT =) diff --git a/doc/scripts/GMT_vertscale.sh b/doc/scripts/GMT_vertscale.sh index e4c9c3dc884..c7cfda89290 100755 --- a/doc/scripts/GMT_vertscale.sh +++ b/doc/scripts/GMT_vertscale.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_vertscale - gmt set GMT_THEME cookbook gmt math -T-8/6/0.01 -N3/0 -C2 T 3 DIV 2 POW NEG EXP T PI 2 MUL MUL COS MUL 50 MUL = t.txt gmt wiggle -R-10/10/-3/3 -JM6i -B -Z100i -DjRM+w100+lnT t.txt -Tfaint -W1p -BWSne --MAP_FRAME_TYPE=plain gmt end show diff --git a/doc/scripts/GMT_volcano.sh b/doc/scripts/GMT_volcano.sh index 7467965546b..1c787f5e07c 100755 --- a/doc/scripts/GMT_volcano.sh +++ b/doc/scripts/GMT_volcano.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_volcano -gmt set GMT_THEME cookbook echo "0 0" | gmt plot -R-0.5/0.5/-0.5/0.5 -JX2i -Ba0.25g0.05 -BWSne -Wthick -Skvolcano/2i cat < bullseye.def 0 -0.7 M -W0.5p,red diff --git a/doc/scripts/grdflexure_approx.sh b/doc/scripts/grdflexure_approx.sh index 965d5c8c2bb..e01f1dcc88c 100755 --- a/doc/scripts/grdflexure_approx.sh +++ b/doc/scripts/grdflexure_approx.sh @@ -5,7 +5,6 @@ # col 0 = x, col 1 = exact with shol != rhoi, 2 = exact solution (rhol), 3 = exact solution (rhoi), 4 approximate solution # Modified from Wessel [2016, GJI]. gmt begin grdflexure_approx - gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 9p,Helvetica,black FONT_LABEL 12p,Helvetica,black PS_MEDIA letter MAP_VECTOR_SHAPE 0.5 # Normal cat <<- EOF > line.txt diff --git a/doc/scripts/images/GMT_App_K_1.ps.dvc b/doc/scripts/images/GMT_App_K_1.ps.dvc index 75741b33315..1b9e4006572 100644 --- a/doc/scripts/images/GMT_App_K_1.ps.dvc +++ b/doc/scripts/images/GMT_App_K_1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: bb73ea10f9684ce8c8c2a53294ba68fb - size: 113732 +- md5: c4c3c5365a9e4e8fa58fe5171aaec11f + size: 112327 hash: md5 path: GMT_App_K_1.ps diff --git a/doc/scripts/images/GMT_App_K_2.ps.dvc b/doc/scripts/images/GMT_App_K_2.ps.dvc index edb86a78686..56d82e7c822 100644 --- a/doc/scripts/images/GMT_App_K_2.ps.dvc +++ b/doc/scripts/images/GMT_App_K_2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 76612d0cfc9c25235777f96491be5960 - size: 84727 +- md5: 34ef81c69d683e824566c57c395a4805 + size: 83954 hash: md5 path: GMT_App_K_2.ps diff --git a/doc/scripts/images/GMT_App_K_3.ps.dvc b/doc/scripts/images/GMT_App_K_3.ps.dvc index b4847c8efe6..eb57e7e79bf 100644 --- a/doc/scripts/images/GMT_App_K_3.ps.dvc +++ b/doc/scripts/images/GMT_App_K_3.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 895b8d1cad50a645313ac4a9df601af2 - size: 70002 +- md5: 80026cd39d210a2d0f49be49df8c5531 + size: 70018 hash: md5 path: GMT_App_K_3.ps diff --git a/doc/scripts/images/GMT_App_K_4.ps.dvc b/doc/scripts/images/GMT_App_K_4.ps.dvc index fc1f6943ae6..fec6258e133 100644 --- a/doc/scripts/images/GMT_App_K_4.ps.dvc +++ b/doc/scripts/images/GMT_App_K_4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 721849fae2994c2a1ab10b4a9a54f715 - size: 61180 +- md5: 14f2263a8fcc360f04e5339ffc87ea4e + size: 61220 hash: md5 path: GMT_App_K_4.ps diff --git a/doc/scripts/images/GMT_App_K_5.ps.dvc b/doc/scripts/images/GMT_App_K_5.ps.dvc index 87d620a459f..5567ddfc539 100644 --- a/doc/scripts/images/GMT_App_K_5.ps.dvc +++ b/doc/scripts/images/GMT_App_K_5.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 4e8d9459a80709e339af1eab2b4f1e9b - size: 74724 +- md5: c92cb0fdbd2558e41205d19597e6fcf4 + size: 74782 hash: md5 path: GMT_App_K_5.ps diff --git a/doc/scripts/images/GMT_App_O_1.ps.dvc b/doc/scripts/images/GMT_App_O_1.ps.dvc index df7ed12e761..3c595680571 100644 --- a/doc/scripts/images/GMT_App_O_1.ps.dvc +++ b/doc/scripts/images/GMT_App_O_1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 1bcb2288031faa174398691a039bdc95 - size: 72477 +- md5: ee4fc3e0cf66933598c4e4a9b2ef62ba + size: 70837 hash: md5 path: GMT_App_O_1.ps diff --git a/doc/scripts/images/GMT_App_O_2.ps.dvc b/doc/scripts/images/GMT_App_O_2.ps.dvc index 210aec15c65..9c29d31d952 100644 --- a/doc/scripts/images/GMT_App_O_2.ps.dvc +++ b/doc/scripts/images/GMT_App_O_2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 9ac82319a05e2ed04970dcbed71ee905 - size: 72439 +- md5: ca799bdb6be9845455c70d32ddd9ec45 + size: 70799 hash: md5 path: GMT_App_O_2.ps diff --git a/doc/scripts/images/GMT_App_O_3.ps.dvc b/doc/scripts/images/GMT_App_O_3.ps.dvc index bf29cd659cd..60dd76dd3e4 100644 --- a/doc/scripts/images/GMT_App_O_3.ps.dvc +++ b/doc/scripts/images/GMT_App_O_3.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 41e76b0961a8cb0486c7ea5c0a586d99 - size: 72269 +- md5: 7a805e9033d08172791b96380c03b15c + size: 70629 hash: md5 path: GMT_App_O_3.ps diff --git a/doc/scripts/images/GMT_App_O_4.ps.dvc b/doc/scripts/images/GMT_App_O_4.ps.dvc index eb13b704df9..9721f228214 100644 --- a/doc/scripts/images/GMT_App_O_4.ps.dvc +++ b/doc/scripts/images/GMT_App_O_4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: fb0c2fa56a01aed4db1c714867b3c02e - size: 72510 +- md5: 76f49c695a2a14e4ec94580be4df4375 + size: 70870 hash: md5 path: GMT_App_O_4.ps diff --git a/doc/scripts/images/GMT_App_O_5.ps.dvc b/doc/scripts/images/GMT_App_O_5.ps.dvc index 29d77abe821..6b75475c185 100644 --- a/doc/scripts/images/GMT_App_O_5.ps.dvc +++ b/doc/scripts/images/GMT_App_O_5.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 8be986f3dca287d7f4518f0996e24ce1 - size: 72691 +- md5: f012053931229145710b0e426740a776 + size: 71051 hash: md5 path: GMT_App_O_5.ps diff --git a/doc/scripts/images/GMT_App_O_6.ps.dvc b/doc/scripts/images/GMT_App_O_6.ps.dvc index 861e8b8b55f..949fb019b92 100644 --- a/doc/scripts/images/GMT_App_O_6.ps.dvc +++ b/doc/scripts/images/GMT_App_O_6.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 98ea66e2f7b743eceb63005fd3be7839 - size: 73929 +- md5: 12bc24f0138d1ee355978a4f4c225b1c + size: 72317 hash: md5 path: GMT_App_O_6.ps diff --git a/doc/scripts/images/GMT_App_O_7.ps.dvc b/doc/scripts/images/GMT_App_O_7.ps.dvc index c8f3e241c45..dfbddd7e715 100644 --- a/doc/scripts/images/GMT_App_O_7.ps.dvc +++ b/doc/scripts/images/GMT_App_O_7.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: b03fd148f0a967e5f3c2db82c54a6725 - size: 73862 +- md5: dbb065cceb659ed1ce55e645ed2d29c1 + size: 72250 hash: md5 path: GMT_App_O_7.ps diff --git a/doc/scripts/images/GMT_App_O_8.ps.dvc b/doc/scripts/images/GMT_App_O_8.ps.dvc index 93700270851..28c356ba4b4 100644 --- a/doc/scripts/images/GMT_App_O_8.ps.dvc +++ b/doc/scripts/images/GMT_App_O_8.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 6e6edb90162b393718be226842337f01 - size: 73938 +- md5: e6642b0d59a9aaa829e617eaef3d56ca + size: 72326 hash: md5 path: GMT_App_O_8.ps diff --git a/doc/scripts/images/GMT_CPTscale.ps.dvc b/doc/scripts/images/GMT_CPTscale.ps.dvc index e3815c77d59..62915ddb4a0 100644 --- a/doc/scripts/images/GMT_CPTscale.ps.dvc +++ b/doc/scripts/images/GMT_CPTscale.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 947f1e3c79ff390406dcd8679fd1737f - size: 32451 +- md5: 9fa20355d75081acc17581665581307c + size: 32465 hash: md5 path: GMT_CPTscale.ps diff --git a/doc/scripts/images/GMT_Defaults_1a.ps.dvc b/doc/scripts/images/GMT_Defaults_1a.ps.dvc index 5ded528a446..a4d509b44dc 100644 --- a/doc/scripts/images/GMT_Defaults_1a.ps.dvc +++ b/doc/scripts/images/GMT_Defaults_1a.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a8fa70978e3c3feafd57dc31223eb36a - size: 27710 +- md5: 5c41c2a464dbe941bd689104eb6ca79b + size: 27784 hash: md5 path: GMT_Defaults_1a.ps diff --git a/doc/scripts/images/GMT_Defaults_1c.ps.dvc b/doc/scripts/images/GMT_Defaults_1c.ps.dvc index 507b8e8d9e9..2bab7525959 100644 --- a/doc/scripts/images/GMT_Defaults_1c.ps.dvc +++ b/doc/scripts/images/GMT_Defaults_1c.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2f0facec3c5518c5e3111770e5d62e20 - size: 31438 +- md5: eceb51ece3a6e1172be610cf04711705 + size: 31452 hash: md5 path: GMT_Defaults_1c.ps diff --git a/doc/scripts/images/GMT_SRTM.ps.dvc b/doc/scripts/images/GMT_SRTM.ps.dvc index 80d4550eb60..13aae407fe2 100644 --- a/doc/scripts/images/GMT_SRTM.ps.dvc +++ b/doc/scripts/images/GMT_SRTM.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2d985db548d6cb7db59a985164d7632d - size: 90606 +- md5: c9965dccd120acb6a35ae2ddcef8b3ad + size: 91211 hash: md5 path: GMT_SRTM.ps diff --git a/doc/scripts/images/GMT_albers.ps.dvc b/doc/scripts/images/GMT_albers.ps.dvc index 91b96df7771..15c8dff6d5c 100644 --- a/doc/scripts/images/GMT_albers.ps.dvc +++ b/doc/scripts/images/GMT_albers.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 168a31aafd1099adbc26c43c7ba4f842 - size: 50317 +- md5: 36d94e36beace91ada37a82a6b479278 + size: 48582 hash: md5 path: GMT_albers.ps diff --git a/doc/scripts/images/GMT_anchor.ps.dvc b/doc/scripts/images/GMT_anchor.ps.dvc index 60918d384ad..e9709a54c1c 100644 --- a/doc/scripts/images/GMT_anchor.ps.dvc +++ b/doc/scripts/images/GMT_anchor.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 65d4172a6fcbd0f24dbddf2c018d6495 - size: 29122 +- md5: be143a7f2b5081f472b0645a09b1aa9b + size: 29167 hash: md5 path: GMT_anchor.ps diff --git a/doc/scripts/images/GMT_atan.ps.dvc b/doc/scripts/images/GMT_atan.ps.dvc index 05f9f1e51d4..01db919fadd 100644 --- a/doc/scripts/images/GMT_atan.ps.dvc +++ b/doc/scripts/images/GMT_atan.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a8c75635ea06fbc998e5c149c57f34bc - size: 37857 +- md5: 58d8edfed41dc434931892c395535e80 + size: 37879 hash: md5 path: GMT_atan.ps diff --git a/doc/scripts/images/GMT_autolegend.ps.dvc b/doc/scripts/images/GMT_autolegend.ps.dvc index c907e1d5e0a..b16500579a2 100644 --- a/doc/scripts/images/GMT_autolegend.ps.dvc +++ b/doc/scripts/images/GMT_autolegend.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 58582c789f976c66fb59bc2105bcb774 - size: 26169 +- md5: f26b355cb050a3c65db6fc153ce3d93c + size: 26921 hash: md5 path: GMT_autolegend.ps diff --git a/doc/scripts/images/GMT_base_symbols3D.ps.dvc b/doc/scripts/images/GMT_base_symbols3D.ps.dvc index 6657e024a2d..25fe069fae7 100644 --- a/doc/scripts/images/GMT_base_symbols3D.ps.dvc +++ b/doc/scripts/images/GMT_base_symbols3D.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: b2425edaf092ece0128f16354688e85a - size: 29900 +- md5: 908f70c9429a0c75918c171449d12db3 + size: 29899 hash: md5 path: GMT_base_symbols3D.ps diff --git a/doc/scripts/images/GMT_base_symbols4.ps.dvc b/doc/scripts/images/GMT_base_symbols4.ps.dvc index ed82c1e4fe7..ac6a66e083b 100644 --- a/doc/scripts/images/GMT_base_symbols4.ps.dvc +++ b/doc/scripts/images/GMT_base_symbols4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 607c16505ce2640cdf78d2a69d8e1f0a - size: 29663 +- md5: 15a6e6d103fdd3a9f214db4df87b12a2 + size: 29662 hash: md5 path: GMT_base_symbols4.ps diff --git a/doc/scripts/images/GMT_blend.ps.dvc b/doc/scripts/images/GMT_blend.ps.dvc index 8e7a28b59e7..97002e4a94e 100644 --- a/doc/scripts/images/GMT_blend.ps.dvc +++ b/doc/scripts/images/GMT_blend.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: eb7b1146e3de620dac085617fca15217 - size: 39080 +- md5: f1fb1db8340cb4bcd5b83e467b2ff32f + size: 40119 hash: md5 path: GMT_blend.ps diff --git a/doc/scripts/images/GMT_color_interpolate.ps.dvc b/doc/scripts/images/GMT_color_interpolate.ps.dvc index e649c308155..a338403d44f 100644 --- a/doc/scripts/images/GMT_color_interpolate.ps.dvc +++ b/doc/scripts/images/GMT_color_interpolate.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 39cc19de35f2288e78028b450d4f2f2d - size: 36439 +- md5: 5bbe477a4f9a7fd7db9c8419010beacd + size: 36453 hash: md5 path: GMT_color_interpolate.ps diff --git a/doc/scripts/images/GMT_colorlist.ps.dvc b/doc/scripts/images/GMT_colorlist.ps.dvc index 01a19100690..3b4aab3c5fd 100644 --- a/doc/scripts/images/GMT_colorlist.ps.dvc +++ b/doc/scripts/images/GMT_colorlist.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: aee572ba8ab81b02e2174548e06f321d - size: 30748 +- md5: bc891a286feedb998090b73a040cfca9 + size: 31370 hash: md5 path: GMT_colorlist.ps diff --git a/doc/scripts/images/GMT_cycle_1.ps.dvc b/doc/scripts/images/GMT_cycle_1.ps.dvc index ff0bd05bcd3..cdbb40623fd 100644 --- a/doc/scripts/images/GMT_cycle_1.ps.dvc +++ b/doc/scripts/images/GMT_cycle_1.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 768a8e75aa083d7a0bac6b6dcb27cb75 - size: 35532 +- md5: ca8c5373223aa8a064006026f8445f00 + size: 35536 hash: md5 path: GMT_cycle_1.ps diff --git a/doc/scripts/images/GMT_cycle_2.ps.dvc b/doc/scripts/images/GMT_cycle_2.ps.dvc index 7dc9ac51a3e..cf919f843a3 100644 --- a/doc/scripts/images/GMT_cycle_2.ps.dvc +++ b/doc/scripts/images/GMT_cycle_2.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: dc98a898fe2f67b4f9d45d9ba680f927 - size: 55880 +- md5: ace7de681f2e513ddb137ef145fa8964 + size: 55884 hash: md5 path: GMT_cycle_2.ps diff --git a/doc/scripts/images/GMT_cycle_3.ps.dvc b/doc/scripts/images/GMT_cycle_3.ps.dvc index 9ab5e48f189..65046bbe8f5 100644 --- a/doc/scripts/images/GMT_cycle_3.ps.dvc +++ b/doc/scripts/images/GMT_cycle_3.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 23e2c9364837bfdf7b57be91c9695903 - size: 24035 +- md5: 3c5920fdc24cb7411fdcc1e4fd7a4cd5 + size: 24039 hash: md5 path: GMT_cycle_3.ps diff --git a/doc/scripts/images/GMT_cycle_4.ps.dvc b/doc/scripts/images/GMT_cycle_4.ps.dvc index 6e9929327b6..6a7cbfbe91b 100644 --- a/doc/scripts/images/GMT_cycle_4.ps.dvc +++ b/doc/scripts/images/GMT_cycle_4.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 3cdab5810f8a867af0842be196047e51 - size: 59590 +- md5: df15b17f0c342bf624aac9a71eab979e + size: 59594 hash: md5 path: GMT_cycle_4.ps diff --git a/doc/scripts/images/GMT_cycle_5.ps.dvc b/doc/scripts/images/GMT_cycle_5.ps.dvc index b30456d72c5..5c5c1d541e9 100644 --- a/doc/scripts/images/GMT_cycle_5.ps.dvc +++ b/doc/scripts/images/GMT_cycle_5.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: aef95aa2b188daaf2c11fc44c5c1dcf3 - size: 30930 +- md5: 0965a37038ac4a34193d36a8d73a93db + size: 30943 hash: md5 path: GMT_cycle_5.ps diff --git a/doc/scripts/images/GMT_cycle_6.ps.dvc b/doc/scripts/images/GMT_cycle_6.ps.dvc index 6a6716d08ef..fe4592ccc74 100644 --- a/doc/scripts/images/GMT_cycle_6.ps.dvc +++ b/doc/scripts/images/GMT_cycle_6.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 0ccf2f473dc7da22366f9de6146585d3 - size: 318151 +- md5: 4ab039fc759746a53e44f525928523f0 + size: 318647 hash: md5 path: GMT_cycle_6.ps diff --git a/doc/scripts/images/GMT_cyclic.ps.dvc b/doc/scripts/images/GMT_cyclic.ps.dvc index 171e5e3f635..ea1520a1602 100644 --- a/doc/scripts/images/GMT_cyclic.ps.dvc +++ b/doc/scripts/images/GMT_cyclic.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2f3dc73200725fc7f33afa6d7a359af5 - size: 27320 +- md5: d0a4683239ab075c48ba80f5f54932e1 + size: 27334 hash: md5 path: GMT_cyclic.ps diff --git a/doc/scripts/images/GMT_eckert6.ps.dvc b/doc/scripts/images/GMT_eckert6.ps.dvc index 5a5afb97149..69084a417ab 100644 --- a/doc/scripts/images/GMT_eckert6.ps.dvc +++ b/doc/scripts/images/GMT_eckert6.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a158cf59669b6eef5f4ff77c5f03e999 - size: 121674 +- md5: b349bdae29029051965652874306e22a + size: 125036 hash: md5 path: GMT_eckert6.ps diff --git a/doc/scripts/images/GMT_equidistant_conic.ps.dvc b/doc/scripts/images/GMT_equidistant_conic.ps.dvc index ccdf1fccd7c..818919ef876 100644 --- a/doc/scripts/images/GMT_equidistant_conic.ps.dvc +++ b/doc/scripts/images/GMT_equidistant_conic.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 3dbe1c409a150a9ec3bebaf532330307 - size: 117304 +- md5: dcf510f1cc54ea81c75e3aac322f4ed9 + size: 112513 hash: md5 path: GMT_equidistant_conic.ps diff --git a/doc/scripts/images/GMT_fill_curves.ps.dvc b/doc/scripts/images/GMT_fill_curves.ps.dvc index 2418cbe725a..bf0385e0728 100644 --- a/doc/scripts/images/GMT_fill_curves.ps.dvc +++ b/doc/scripts/images/GMT_fill_curves.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 996efb4fb66f4edcab2e40e56026bbe0 - size: 28074 +- md5: 1a0b478f0e872a46c2ebb1f172e968f2 + size: 28094 hash: md5 path: GMT_fill_curves.ps diff --git a/doc/scripts/images/GMT_gall_stereo.ps.dvc b/doc/scripts/images/GMT_gall_stereo.ps.dvc index 8cc38fe2c0c..7d414966155 100644 --- a/doc/scripts/images/GMT_gall_stereo.ps.dvc +++ b/doc/scripts/images/GMT_gall_stereo.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: d118c533c2b890cfa4a2614a6b01844d - size: 115996 +- md5: 505b55877932bb58c522e87586b89584 + size: 116053 hash: md5 path: GMT_gall_stereo.ps diff --git a/doc/scripts/images/GMT_grid2pix.ps.dvc b/doc/scripts/images/GMT_grid2pix.ps.dvc index b86d0c5c1ca..c9b21b8e06d 100644 --- a/doc/scripts/images/GMT_grid2pix.ps.dvc +++ b/doc/scripts/images/GMT_grid2pix.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 3f2f89eb904dae0e6b1b0612fafa5b6f - size: 32383 +- md5: 51977c314bdf554c258d9b1cd4d37ef9 + size: 32504 hash: md5 path: GMT_grid2pix.ps diff --git a/doc/scripts/images/GMT_hinge.ps.dvc b/doc/scripts/images/GMT_hinge.ps.dvc index 5956351d657..3292f21193b 100644 --- a/doc/scripts/images/GMT_hinge.ps.dvc +++ b/doc/scripts/images/GMT_hinge.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: aa0d3e707a75a389edf589a7f07afb30 - size: 29099 +- md5: 4bca95773d0fa71581a5797bd0dbab6d + size: 29259 hash: md5 path: GMT_hinge.ps diff --git a/doc/scripts/images/GMT_inset.ps.dvc b/doc/scripts/images/GMT_inset.ps.dvc index f2979b63f94..f6617823202 100644 --- a/doc/scripts/images/GMT_inset.ps.dvc +++ b/doc/scripts/images/GMT_inset.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a57b691c1cac6c38e311b0a41632c10b - size: 1205524 +- md5: f1fd9369d9fb09161f8ef54f01962fd8 + size: 1205189 hash: md5 path: GMT_inset.ps diff --git a/doc/scripts/images/GMT_lambert_az_rect.ps.dvc b/doc/scripts/images/GMT_lambert_az_rect.ps.dvc index a561f2cabf1..6ce4fb0b642 100644 --- a/doc/scripts/images/GMT_lambert_az_rect.ps.dvc +++ b/doc/scripts/images/GMT_lambert_az_rect.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 407e1709d36869c4aff951b89f6f06e8 - size: 37932 +- md5: fc3a0b3687b6cec870bd61ba5f1c02ee + size: 35773 hash: md5 path: GMT_lambert_az_rect.ps diff --git a/doc/scripts/images/GMT_lambert_conic.ps.dvc b/doc/scripts/images/GMT_lambert_conic.ps.dvc index 393c111b38d..a2d4c827ae1 100644 --- a/doc/scripts/images/GMT_lambert_conic.ps.dvc +++ b/doc/scripts/images/GMT_lambert_conic.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 45f98f6e8506528525644ae98aabc273 - size: 101871 +- md5: 76f16faaca03f0f84cd4a226260c795b + size: 92004 hash: md5 path: GMT_lambert_conic.ps diff --git a/doc/scripts/images/GMT_latex.ps.dvc b/doc/scripts/images/GMT_latex.ps.dvc index 1ba9a60cb0a..80a6d445580 100644 --- a/doc/scripts/images/GMT_latex.ps.dvc +++ b/doc/scripts/images/GMT_latex.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 769a30613c4ce0771b5c9b207d267d2d - size: 109984 +- md5: a7b3a9ca19be94fecd9cffeae3fc4078 + size: 123302 hash: md5 path: GMT_latex.ps diff --git a/doc/scripts/images/GMT_legend.ps.dvc b/doc/scripts/images/GMT_legend.ps.dvc index 88dce929fa0..1de37cf5ab3 100644 --- a/doc/scripts/images/GMT_legend.ps.dvc +++ b/doc/scripts/images/GMT_legend.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: e5b35dbca9f7e0f41c630f8a6bf184f6 - size: 33874 +- md5: 0159d0dcb3fbfd382d69a27a3504cff7 + size: 33873 hash: md5 path: GMT_legend.ps diff --git a/doc/scripts/images/GMT_linear.ps.dvc b/doc/scripts/images/GMT_linear.ps.dvc index a5b43753214..2abab34266b 100644 --- a/doc/scripts/images/GMT_linear.ps.dvc +++ b/doc/scripts/images/GMT_linear.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 83161e66c7640fb0213e9eb6117f9187 - size: 24429 +- md5: 06c1b0066db18ead7f246d5ef3673855 + size: 24316 hash: md5 path: GMT_linear.ps diff --git a/doc/scripts/images/GMT_linear_cal.ps.dvc b/doc/scripts/images/GMT_linear_cal.ps.dvc index aa47425fdfb..cbd8fa3b30a 100644 --- a/doc/scripts/images/GMT_linear_cal.ps.dvc +++ b/doc/scripts/images/GMT_linear_cal.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 6edebcd95a7aef38e01b6bd1d79d0cfa - size: 24245 +- md5: c9440bf13a77e2ea3ffa07cbf298ce73 + size: 24244 hash: md5 path: GMT_linear_cal.ps diff --git a/doc/scripts/images/GMT_linear_d.ps.dvc b/doc/scripts/images/GMT_linear_d.ps.dvc index e39983d8081..0f76609264c 100644 --- a/doc/scripts/images/GMT_linear_d.ps.dvc +++ b/doc/scripts/images/GMT_linear_d.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: e256db6bce47b728beac4d7cab662392 - size: 149140 +- md5: 8293536fa84ac4e1db115add23f067cd + size: 150836 hash: md5 path: GMT_linear_d.ps diff --git a/doc/scripts/images/GMT_linearrow.ps.dvc b/doc/scripts/images/GMT_linearrow.ps.dvc index 02447ebeabb..66a032c5709 100644 --- a/doc/scripts/images/GMT_linearrow.ps.dvc +++ b/doc/scripts/images/GMT_linearrow.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: bddcc03b950e89599c3e46254be1e764 - size: 25049 +- md5: 9b90bff1bfbc8f0939fd2cb78ddff87d + size: 25124 hash: md5 path: GMT_linearrow.ps diff --git a/doc/scripts/images/GMT_lineoffset.ps.dvc b/doc/scripts/images/GMT_lineoffset.ps.dvc index 6483e03e8a9..31a1c2fa5e7 100644 --- a/doc/scripts/images/GMT_lineoffset.ps.dvc +++ b/doc/scripts/images/GMT_lineoffset.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 512e1f6e29365a79405a9f749b5b998e - size: 25315 +- md5: 0b3a80fd670199e5ee8ae90e987010b1 + size: 25344 hash: md5 path: GMT_lineoffset.ps diff --git a/doc/scripts/images/GMT_log.ps.dvc b/doc/scripts/images/GMT_log.ps.dvc index 472eeab7802..f586bfca4fb 100644 --- a/doc/scripts/images/GMT_log.ps.dvc +++ b/doc/scripts/images/GMT_log.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 480697726570ddc7bba0a063d4616bef - size: 25024 +- md5: aa662023b19d7c9873271559ed4d32d8 + size: 24911 hash: md5 path: GMT_log.ps diff --git a/doc/scripts/images/GMT_map_frame_type.ps.dvc b/doc/scripts/images/GMT_map_frame_type.ps.dvc index b05a8d4d104..a2ef144caab 100644 --- a/doc/scripts/images/GMT_map_frame_type.ps.dvc +++ b/doc/scripts/images/GMT_map_frame_type.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 99e9556a86322678d845192531e12ea2 - size: 36023 +- md5: 536a58eda69c5e9115582806bbc59e4f + size: 35688 hash: md5 path: GMT_map_frame_type.ps diff --git a/doc/scripts/images/GMT_mapscale.ps.dvc b/doc/scripts/images/GMT_mapscale.ps.dvc index 0673bec02fa..6bfc1384eba 100644 --- a/doc/scripts/images/GMT_mapscale.ps.dvc +++ b/doc/scripts/images/GMT_mapscale.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: e6de367f10eccf01e6a0f61aba9910f3 - size: 25501 +- md5: db0751b245308578fffd4f5092575e78 + size: 25503 hash: md5 path: GMT_mapscale.ps diff --git a/doc/scripts/images/GMT_mercator.ps.dvc b/doc/scripts/images/GMT_mercator.ps.dvc index d70b43f09d7..c6ac7a6234c 100644 --- a/doc/scripts/images/GMT_mercator.ps.dvc +++ b/doc/scripts/images/GMT_mercator.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: dcd27418fdd387a4831779ba24eaa355 - size: 65930 +- md5: 6126739ea6ec3a4f238678c87de38b43 + size: 65954 hash: md5 path: GMT_mercator.ps diff --git a/doc/scripts/images/GMT_obl_baja.ps.dvc b/doc/scripts/images/GMT_obl_baja.ps.dvc index 6c5952c2e72..47704f56c94 100644 --- a/doc/scripts/images/GMT_obl_baja.ps.dvc +++ b/doc/scripts/images/GMT_obl_baja.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 13ece905f38fde386b799f2f2e9a9420 - size: 86652 +- md5: 889138ba2ad1975cd75caf015129eed2 + size: 86651 hash: md5 path: GMT_obl_baja.ps diff --git a/doc/scripts/images/GMT_obl_merc.ps.dvc b/doc/scripts/images/GMT_obl_merc.ps.dvc index 3b91721ecfe..8ff8b40a134 100644 --- a/doc/scripts/images/GMT_obl_merc.ps.dvc +++ b/doc/scripts/images/GMT_obl_merc.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: b9047a688660b10bb573bb4ebbf20102 - size: 93636 +- md5: 0c89e9a8acaf76bed7f8b67235aa58fa + size: 93635 hash: md5 path: GMT_obl_merc.ps diff --git a/doc/scripts/images/GMT_obl_nz.ps.dvc b/doc/scripts/images/GMT_obl_nz.ps.dvc index 26e847d7699..000e9ae5b26 100644 --- a/doc/scripts/images/GMT_obl_nz.ps.dvc +++ b/doc/scripts/images/GMT_obl_nz.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: f47363f9de6148a69fdcd807a7d322f8 - size: 198964 +- md5: 04915cf30331c00d7766b343b04f084b + size: 198963 hash: md5 path: GMT_obl_nz.ps diff --git a/doc/scripts/images/GMT_polar.ps.dvc b/doc/scripts/images/GMT_polar.ps.dvc index bd3f93d7a65..b5124552c44 100644 --- a/doc/scripts/images/GMT_polar.ps.dvc +++ b/doc/scripts/images/GMT_polar.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 2633b458cd6e4a2082a3e2ba4ad37c49 - size: 45923 +- md5: fcfb76722ecc68f4bfd028f7af83c863 + size: 40315 hash: md5 path: GMT_polar.ps diff --git a/doc/scripts/images/GMT_pow.ps.dvc b/doc/scripts/images/GMT_pow.ps.dvc index 2b018aa8021..3128f27e68c 100644 --- a/doc/scripts/images/GMT_pow.ps.dvc +++ b/doc/scripts/images/GMT_pow.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 1c86eceefcd78fed883531f9fe52cc24 - size: 24695 +- md5: 49e1b2d4795eb72540f8d12d933d011f + size: 24582 hash: md5 path: GMT_pow.ps diff --git a/doc/scripts/images/GMT_seamount_cum_inc.ps.dvc b/doc/scripts/images/GMT_seamount_cum_inc.ps.dvc index dd441165e8a..71a18ead129 100644 --- a/doc/scripts/images/GMT_seamount_cum_inc.ps.dvc +++ b/doc/scripts/images/GMT_seamount_cum_inc.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: cbad3891d7b8c84ac3c920ee3cc251b5 - size: 110867 +- md5: d1cc8c95d1a67f004e1acd913c51faaa + size: 110863 hash: md5 path: GMT_seamount_cum_inc.ps diff --git a/doc/scripts/images/GMT_seamount_u0.ps.dvc b/doc/scripts/images/GMT_seamount_u0.ps.dvc index d799e9aa108..008a1c4785b 100644 --- a/doc/scripts/images/GMT_seamount_u0.ps.dvc +++ b/doc/scripts/images/GMT_seamount_u0.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 73e55161acc476a71b2010602f81530a - size: 29413 +- md5: 5d2f90b8449673f132299d366cbb3daa + size: 30461 hash: md5 path: GMT_seamount_u0.ps diff --git a/doc/scripts/images/GMT_slopes.ps.dvc b/doc/scripts/images/GMT_slopes.ps.dvc index 7a58990c692..e16e23942a0 100644 --- a/doc/scripts/images/GMT_slopes.ps.dvc +++ b/doc/scripts/images/GMT_slopes.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a053ba80720402e5c781af0d6d590692 - size: 26921 +- md5: d8af133740f03dcf4c1bbcfc07a42507 + size: 26920 hash: md5 path: GMT_slopes.ps diff --git a/doc/scripts/images/GMT_stereographic_general.ps.dvc b/doc/scripts/images/GMT_stereographic_general.ps.dvc index 06ce1a33f8e..539ec8e01b4 100644 --- a/doc/scripts/images/GMT_stereographic_general.ps.dvc +++ b/doc/scripts/images/GMT_stereographic_general.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: edb2c06902bcc6c3b4cdd3a6b08fa24c - size: 54144 +- md5: 3617b68e1b3d1afe86d8bd321c324834 + size: 54533 hash: md5 path: GMT_stereographic_general.ps diff --git a/doc/scripts/images/GMT_stereographic_rect.ps.dvc b/doc/scripts/images/GMT_stereographic_rect.ps.dvc index 74365238ab1..273bb404cc2 100644 --- a/doc/scripts/images/GMT_stereographic_rect.ps.dvc +++ b/doc/scripts/images/GMT_stereographic_rect.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: eeeb443b9bc903e773acb73feb844064 - size: 73493 +- md5: fa9860f4c4a3a4b83d885b4952081034 + size: 72913 hash: md5 path: GMT_stereographic_rect.ps diff --git a/doc/scripts/images/GMT_title_fade.ps.dvc b/doc/scripts/images/GMT_title_fade.ps.dvc index 3de47eaed4e..b2e471d83a3 100644 --- a/doc/scripts/images/GMT_title_fade.ps.dvc +++ b/doc/scripts/images/GMT_title_fade.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 5e091551ce9926cc68abdb101dcc8cf4 - size: 26064 +- md5: 71fbde07c3476ae22fb791352c6ee5d0 + size: 26068 hash: md5 path: GMT_title_fade.ps diff --git a/doc/scripts/images/GMT_utm_zones.ps.dvc b/doc/scripts/images/GMT_utm_zones.ps.dvc index 5699246480f..4329e948a59 100644 --- a/doc/scripts/images/GMT_utm_zones.ps.dvc +++ b/doc/scripts/images/GMT_utm_zones.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 8e509899cb2202a577dd1c3e511d5caa - size: 332339 +- md5: 8985613f536116db3f3af4ca5019e498 + size: 331808 hash: md5 path: GMT_utm_zones.ps diff --git a/doc/scripts/images/GMT_vertscale.ps.dvc b/doc/scripts/images/GMT_vertscale.ps.dvc index 8c06f470e9d..3d3d178f893 100644 --- a/doc/scripts/images/GMT_vertscale.ps.dvc +++ b/doc/scripts/images/GMT_vertscale.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 7d8f0af6ed400410ff270196b20f5aed - size: 27137 +- md5: 0ce4ce01df0250af84a85c59bc30c74a + size: 27132 hash: md5 path: GMT_vertscale.ps diff --git a/doc/scripts/images/GMT_volcano.ps.dvc b/doc/scripts/images/GMT_volcano.ps.dvc index 604ca0ccced..64e48ddc6b7 100644 --- a/doc/scripts/images/GMT_volcano.ps.dvc +++ b/doc/scripts/images/GMT_volcano.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 4ea4b65de5e1b803213b853b22bde30c - size: 28301 +- md5: 759f8382bc3006083f91b355f17a262d + size: 28300 hash: md5 path: GMT_volcano.ps diff --git a/doc/scripts/images/psevents_dz.ps.dvc b/doc/scripts/images/psevents_dz.ps.dvc index 55a5635d1b5..75f418219df 100644 --- a/doc/scripts/images/psevents_dz.ps.dvc +++ b/doc/scripts/images/psevents_dz.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 58b73ba037770309ad43f493b8e0c0f8 - size: 30149 +- md5: 2ba9d27987d262bd5d324e4e3e3fdee3 + size: 30194 hash: md5 path: psevents_dz.ps diff --git a/doc/scripts/images/psevents_intensity.ps.dvc b/doc/scripts/images/psevents_intensity.ps.dvc index bb04ddb570d..de956278e88 100644 --- a/doc/scripts/images/psevents_intensity.ps.dvc +++ b/doc/scripts/images/psevents_intensity.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: cfb01b51f2d0b8c0ad253f2c7bfc5dd9 - size: 30055 +- md5: 7e73e9d30fb3e61bd62a6902b3458ebb + size: 30100 hash: md5 path: psevents_intensity.ps diff --git a/doc/scripts/images/psevents_labels.ps.dvc b/doc/scripts/images/psevents_labels.ps.dvc index fce875dff75..d4938a0abf7 100644 --- a/doc/scripts/images/psevents_labels.ps.dvc +++ b/doc/scripts/images/psevents_labels.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: b7aa109efbe51e816cdf6d2502be9efd - size: 27731 +- md5: fabd502ad7630284eefccaff0416be34 + size: 27753 hash: md5 path: psevents_labels.ps diff --git a/doc/scripts/images/psevents_size.ps.dvc b/doc/scripts/images/psevents_size.ps.dvc index a74ce3f47aa..4e3a21088f5 100644 --- a/doc/scripts/images/psevents_size.ps.dvc +++ b/doc/scripts/images/psevents_size.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: a68908f71d18f76147618b122b56d065 - size: 30069 +- md5: dcd23712f47b7d1e0d913d11e96363e1 + size: 30114 hash: md5 path: psevents_size.ps diff --git a/doc/scripts/images/psevents_transparency.ps.dvc b/doc/scripts/images/psevents_transparency.ps.dvc index 2ac834137d1..2f9222dfa1a 100644 --- a/doc/scripts/images/psevents_transparency.ps.dvc +++ b/doc/scripts/images/psevents_transparency.ps.dvc @@ -1,5 +1,5 @@ outs: -- md5: 71fbdc6871d42b004d78ab3181b81611 - size: 29873 +- md5: b9a1ec5428cae8add5785d749362632e + size: 29918 hash: md5 path: psevents_transparency.ps diff --git a/doc/scripts/psevents_dz.sh b/doc/scripts/psevents_dz.sh index 8b31ff63b67..080c7fdfaec 100755 --- a/doc/scripts/psevents_dz.sh +++ b/doc/scripts/psevents_dz.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Make a figure illustrating dz curve for an event across time in psevents gmt begin psevents_dz - gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_intensity.sh b/doc/scripts/psevents_intensity.sh index 4c9d94db9e4..33ff2fca6ab 100755 --- a/doc/scripts/psevents_intensity.sh +++ b/doc/scripts/psevents_intensity.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Make a figure illustration intensity curve for an event across time in psevents gmt begin psevents_intensity - gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_labels.sh b/doc/scripts/psevents_labels.sh index 87ae0689bd5..6ea74b8ea99 100755 --- a/doc/scripts/psevents_labels.sh +++ b/doc/scripts/psevents_labels.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Make a figure illustrating transparency curve for an event label across time in psevents gmt begin psevents_labels - gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_size.sh b/doc/scripts/psevents_size.sh index 7ea0e6b93cd..db0c4809b3b 100755 --- a/doc/scripts/psevents_size.sh +++ b/doc/scripts/psevents_size.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Make a figure illustration size curve for an event across time in psevents gmt begin psevents_size - gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_transparency.sh b/doc/scripts/psevents_transparency.sh index 132c96d02f9..9b648aef75c 100755 --- a/doc/scripts/psevents_transparency.sh +++ b/doc/scripts/psevents_transparency.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Make a figure illustrating transparency curve for an event across time in psevents gmt begin psevents_transparency - gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- From ccc94f650ab8210d47b7d052b36221b3e16d9116 Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:44:30 +0200 Subject: [PATCH 077/105] install.rst: fix links to BUILDING.md and improve formatting (#8511) --- doc/rst/source/install.rst | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/doc/rst/source/install.rst b/doc/rst/source/install.rst index 06aabc7d338..269add4f514 100644 --- a/doc/rst/source/install.rst +++ b/doc/rst/source/install.rst @@ -234,7 +234,7 @@ Ubuntu/Debian **NOTE:** The Ubuntu/Debian official repositories may provide old GMT versions. If you want the latest GMT 6.x release, your best bet then is -to `build the latest release from source `__. +to `build the latest release from source `__. Install GMT via: @@ -270,7 +270,7 @@ Gentoo ~~~~~~ **NOTE:** This may provide old GMT versions. Consider `building from -source `__. +source `__. Install GMT via: @@ -339,7 +339,7 @@ GMT may be installed on FreeBSD using Ports or from source. **NOTE:** The Ports Collection may provide old GMT versions. If you want the latest GMT release, consider `building the latest release from -source `__. +source `__. Install via Ports ~~~~~~~~~~~~~~~~~ @@ -349,31 +349,22 @@ application software that has been ported to FreeBSD. **Precompiled** -Install precompiled gmt binaries with - -:: +Install precompiled gmt binaries with:: pkg install gmt **Compile from Ports** -If not done already, set up the **Ports Collection** See -https://docs.freebsd.org/en/books/handbook/ports/#ports-using: - -:: +If not done already, set up the `Ports Collection `__:: portsnap fetch portsnap extract -If already set up, make sure you’re up-to-date: - -:: +If already set up, make sure you’re up-to-date:: portsnap fetch update -Then change into directory ``/usr/ports/graphics/gmt`` and build: - -:: +Then change into directory ``/usr/ports/graphics/gmt`` and build:: make install clean From 5bc923fc1b7254671716440a14e962d99545bfc7 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Tue, 4 Jun 2024 12:03:52 +0100 Subject: [PATCH 078/105] Export 4 gmt_conf_* (they were local). (#8512) * Export 4 gmt_conf_* (they we local). Let the gmtlib_setparameter() function also change between CLASSIC & MODERN modes. * Rename SET_RUN_MODE to GMT_RUN_MODE * Update src/gmt_init.c Co-authored-by: Dongdong Tian * Update src/gmt_init.c Co-authored-by: Dongdong Tian --------- Co-authored-by: Dongdong Tian --- src/gmt_init.c | 19 +++++++++++++++---- src/gmt_keywords.txt | 4 +++- src/gmt_prototypes.h | 4 ++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index 7a852c0f602..75b3fe1e1b3 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -6718,7 +6718,7 @@ GMT_LOCAL int gmtinit_get_language (struct GMT_CTRL *GMT) { } /*! . */ -GMT_LOCAL void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) { +EXTERN_MSC void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) { int i, case_val; /* Update the settings to US where they differ from standard SI settings: * Setting SI US @@ -6759,7 +6759,7 @@ GMT_LOCAL void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) { } /*! . */ -GMT_LOCAL void gmtinit_conf_classic (struct GMT_CTRL *GMT) { +EXTERN_MSC void gmtinit_conf_classic (struct GMT_CTRL *GMT) { int i, error = 0; char path[PATH_MAX] = {""}; double const pt = 1.0/72.0; /* points to inch */ @@ -7274,13 +7274,13 @@ GMT_LOCAL void gmtinit_conf_modern_override (struct GMT_CTRL *GMT) { GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value during gmtdefaults modern initialization.\n");} /*! . */ -GMT_LOCAL void gmtinit_conf_modern_US (struct GMT_CTRL *GMT) { +void gmtinit_conf_modern_US (struct GMT_CTRL *GMT) { gmtinit_conf_classic_US (GMT); /* Override with US settings */ gmtinit_conf_modern_override (GMT); } /*! . */ -GMT_LOCAL void gmtinit_conf_modern (struct GMT_CTRL *GMT) { +void gmtinit_conf_modern (struct GMT_CTRL *GMT) { /* REPLACE WITH gmtinit_conf_modern when ready */ gmtinit_conf_classic (GMT); gmtinit_conf_modern_override (GMT); @@ -10930,6 +10930,14 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha case_val = gmt_hash_lookup (GMT, keyword, keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); switch (case_val) { + case GMTCASE_GMT_RUN_MODE: /* Allow changing to/from CLASSIC/MODERN mode */ + if (strcmp(value, "0") && strcmp(value, "1")) { + error = true; + GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value %s for SET_RUN_MODE\n", value); + break; + } + GMT->current.setting.run_mode = atoi(value); + break; /* FORMAT GROUP */ case GMTCASE_INPUT_CLOCK_FORMAT: gmt_M_compat_translate ("FORMAT_CLOCK_IN"); @@ -12641,6 +12649,9 @@ char *gmtlib_getparameter (struct GMT_CTRL *GMT, const char *keyword) { case_val = gmt_hash_lookup (GMT, keyword, keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); switch (case_val) { + case GMTCASE_GMT_RUN_MODE: /* Gat the current running mode CLASSIC or MODERN */ + sprintf (value, "%d", GMT->current.setting.run_mode); + break; /* FORMAT GROUP */ case GMTCASE_INPUT_CLOCK_FORMAT: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ diff --git a/src/gmt_keywords.txt b/src/gmt_keywords.txt index 597488c17fc..e912880dede 100644 --- a/src/gmt_keywords.txt +++ b/src/gmt_keywords.txt @@ -78,6 +78,8 @@ GMT_THEME # Group of GMT defaults to override GMT_TRIANGULATE # Triangulation algorithm GMT_VERBOSE # Verbosity level #------------------------------------------------------- +GMT_RUN_MODE # To change between CLASSIC and MODERN mode. Used only by externals. +#------------------------------------------------------- # IO Group: I/O settings #------------------------------------------------------- IO_COL_SEPARATOR # Column separator for output data records @@ -175,4 +177,4 @@ TIME_REPORT # Controls time or elapsed run-time stamp in messages TIME_UNIT # Unit of time measurement TIME_SYSTEM # Shortcut to setting TIME_EPOCH/UNIT [does not go in gmt.conf] TIME_WEEK_START # Day a new week starts on -TIME_Y2K_OFFSET_YEAR # For 2-digit years to separate 1900 and 2000 centuries +TIME_Y2K_OFFSET_YEAR # For 2-digit years to separate 1900 and 2000 centuries \ No newline at end of file diff --git a/src/gmt_prototypes.h b/src/gmt_prototypes.h index b512395bcbf..00d017e255f 100644 --- a/src/gmt_prototypes.h +++ b/src/gmt_prototypes.h @@ -92,6 +92,10 @@ EXTERN_MSC int gmt_get_V (char arg); EXTERN_MSC char gmt_set_V (int mode); EXTERN_MSC void gmt_conf_SI (struct GMT_CTRL *GMT); EXTERN_MSC void gmt_conf_US (struct GMT_CTRL *GMT); +EXTERN_MSC void gmtinit_conf_modern_US (struct GMT_CTRL *GMT); +EXTERN_MSC void gmtinit_conf_modern (struct GMT_CTRL *GMT); +EXTERN_MSC void gmtinit_conf_classic_US (struct GMT_CTRL *GMT); +EXTERN_MSC void gmtinit_conf_classic (struct GMT_CTRL *GMT); EXTERN_MSC int gmt_truncate_file (struct GMTAPI_CTRL *API, char *file, size_t size); EXTERN_MSC int gmt_set_current_panel (struct GMTAPI_CTRL *API, int fig, int row, int col, double gap[], char *label, unsigned int first); EXTERN_MSC int gmt_get_current_figure (struct GMTAPI_CTRL *API); From 760266daee421d5d72b64d9f1bb3fd350ceb260d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 5 Jun 2024 22:12:18 +0800 Subject: [PATCH 079/105] cmake: Do not install .dvc files in the doc directory (#8514) --- doc/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index feb7583b4ab..68458361ef7 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -66,4 +66,5 @@ install (DIRECTORY examples PATTERN "CMakeLists.txt" EXCLUDE PATTERN "gmt.history" EXCLUDE PATTERN ".DS_Store" EXCLUDE + PATTERN "*.dvc" EXCLUDE REGEX "[.](cmake|in|ps)$" EXCLUDE) From b022da4b6105ae9a3dfd798ffa2b501451ba244e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 6 Jun 2024 20:58:35 +0800 Subject: [PATCH 080/105] doc: Add a single introduction page (#8515) --- doc/rst/source/index.rst | 1 + doc/rst/source/{tutorial/bash => }/intro.rst | 12 ------ doc/rst/source/tutorial/bash/index.rst | 10 ++++- doc/rst/source/tutorial/julia/index.rst | 14 ++++++- doc/rst/source/tutorial/julia/intro.rst | 40 -------------------- 5 files changed, 23 insertions(+), 54 deletions(-) rename doc/rst/source/{tutorial/bash => }/intro.rst (78%) delete mode 100644 doc/rst/source/tutorial/julia/intro.rst diff --git a/doc/rst/source/index.rst b/doc/rst/source/index.rst index 16ef6bfba28..9659557dbce 100644 --- a/doc/rst/source/index.rst +++ b/doc/rst/source/index.rst @@ -37,6 +37,7 @@ it can do. :maxdepth: 1 :caption: Getting started + intro install gallery animations diff --git a/doc/rst/source/tutorial/bash/intro.rst b/doc/rst/source/intro.rst similarity index 78% rename from doc/rst/source/tutorial/bash/intro.rst rename to doc/rst/source/intro.rst index 522e5a8d073..ed1ab07abed 100644 --- a/doc/rst/source/tutorial/bash/intro.rst +++ b/doc/rst/source/intro.rst @@ -35,15 +35,3 @@ maximize flexibility. We standardized early on to use PostScript output instead of other graphics formats. Apart from the built-in support for coastlines, GMT completely decouples data retrieval from the main GMT modules. GMT uses architecture-independent file formats. - -GMT installation considerations -------------------------------- - -See the :doc:`install guide ` -for instructions and to make sure you have all required dependencies installed. -Alternatively, you can build GMT from source by following the -`building guide `_. - -In addition, we recommend access to any flavor of the UNIX operating system -(UNIX, Linux, macOS, Cygwin, MinGW, etc.). -We do not recommend using the DOS command window under Windows. diff --git a/doc/rst/source/tutorial/bash/index.rst b/doc/rst/source/tutorial/bash/index.rst index e38191d3993..778d2f833ea 100644 --- a/doc/rst/source/tutorial/bash/index.rst +++ b/doc/rst/source/tutorial/bash/index.rst @@ -33,6 +33,15 @@ sufficient detail. Nevertheless, it is hoped that the exposure will prompt the users to improve their GMT and UNIX skills after completion of this short tutorial. +See the :doc:`install guide ` +for instructions and to make sure you have all required dependencies installed. +Alternatively, you can build GMT from source by following the +`building guide `_. + +In addition, we recommend access to any flavor of the UNIX operating system +(UNIX, Linux, macOS, Cygwin, MinGW, etc.). +We do not recommend using the DOS command window under Windows. + .. note:: This tutorial is for GMT 6 modern mode only. Looking for the classic mode tutorial? Since classic mode commands haven't changed since GMT 5, please visit @@ -41,7 +50,6 @@ after completion of this short tutorial. .. toctree:: :maxdepth: 1 - intro session-1 session-2 session-3 diff --git a/doc/rst/source/tutorial/julia/index.rst b/doc/rst/source/tutorial/julia/index.rst index 0c7738f29a9..10890b9104d 100644 --- a/doc/rst/source/tutorial/julia/index.rst +++ b/doc/rst/source/tutorial/julia/index.rst @@ -25,10 +25,22 @@ still redirect to the hard-core GMT man pages, whilst others direct users to Jul the translated GMT manuals. A *lost case* is the GMT Technical Reference that is so big/complete that it will take long time to see a Julia version of it. +See the :doc:`install guide ` +for instructions and to make sure you have all required dependencies installed. +Alternatively, you can build GMT from source by following the +`building guide `_. + +See also the general information about `Julia `_ +as well as the introduction to the Julia wrapper at +`Introduction `_ +and the very recommendable +`Quick Learn `_. +Complement with the instructions on how to +install `GMT.jl `_ + .. toctree:: :maxdepth: 1 - intro session-1 session-2 session-3 diff --git a/doc/rst/source/tutorial/julia/intro.rst b/doc/rst/source/tutorial/julia/intro.rst deleted file mode 100644 index dbd02bac639..00000000000 --- a/doc/rst/source/tutorial/julia/intro.rst +++ /dev/null @@ -1,40 +0,0 @@ -Introduction -============ - -Historical highlights ---------------------- - -The GMT system was initiated in late 1987 at Lamont-Doherty Earth Observatory, Columbia University by graduate students -Paul Wessel and Walter H. F. Smith. Version 1 was officially introduced to Lamont scientists in July 1988. GMT 1 -migrated by word of mouth (and tape) to other institutions in the United States, UK, Japan, and France and attracted -a small following. Paul took a Post-doctoral position at SOEST in December 1989 and continued the GMT development. -Version 2.0 was released with an article in EOS, October 1991, and quickly spread worldwide. Version 3.0 in 1993 -which was released with another article in EOS on August 15, 1995. A major upgrade to GMT 4.0 took place in Oct 2004. -Finally, in 2013 we released the new GMT 5 series and we have updated this tutorial to reflect the changes in style -and syntax. However, GMT 5 is generally backwards compatible with GMT 4 syntax. In October 2019 we released the current -version GMT 6. GMT is used by tens of thousands of users worldwide in a broad range of disciplines. - -Philosophy ----------- - -GMT is written in the ANSI C programming language (very portable), is POSIX compliant, and is independent of hardware -constraints (e.g., memory). GMT was deliberately written for command-line usage, not a windows environment, in order -to maximize flexibility. We standardized early on to use PostScript output instead of other graphics formats. Apart -from the built-in support for coastlines, GMT completely decouples data retrieval from the main GMT modules. GMT uses -architecture-independent file formats. - -GMT installation considerations -------------------------------- - -See the :doc:`install guide ` -for instructions and to make sure you have all required dependencies installed. -Alternatively, you can build GMT from source by following the -`building guide `_. - -See also the general information about `Julia `_ -as well as the introduction to the Julia wrapper at -`Introduction `_ -and the very recommendable -`Quick Learn `_. -Complement with the instructions on how to -install `GMT.jl `_ From 5c105fe02756e18adc46fca1ad21e3e7504951a5 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 12 Jun 2024 17:11:37 +0800 Subject: [PATCH 081/105] Fix two broken links Closes #8518 --- doc/rst/source/reference/supplemental-packages.rst | 2 +- doc/rst/source/solar.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rst/source/reference/supplemental-packages.rst b/doc/rst/source/reference/supplemental-packages.rst index f0365301278..105655bc342 100644 --- a/doc/rst/source/reference/supplemental-packages.rst +++ b/doc/rst/source/reference/supplemental-packages.rst @@ -185,7 +185,7 @@ Footnotes three-dimensional bodies of arbitrary shape, *Geophysics, 25*, 203–225. .. [28] - `Timothy J. Henstock `_, + `Timothy J. Henstock `_, University of Southampton .. [29] diff --git a/doc/rst/source/solar.rst b/doc/rst/source/solar.rst index d384363ae6f..46904317ece 100644 --- a/doc/rst/source/solar.rst +++ b/doc/rst/source/solar.rst @@ -183,7 +183,7 @@ Set up a clip path overlay based on the day/night terminator:: References ---------- -Code from the Excel Spreadsheets in http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html +Code from the Excel Spreadsheets in https://gml.noaa.gov/grad/solcalc/calcdetails.html. Notes ----- From 0e51f6e9e9d060133e82c16d2e703171d9d009e1 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 12 Jun 2024 20:01:13 +0800 Subject: [PATCH 082/105] CI: Bump to GraphicsMagick 1.3.42 for Windows CI --- .github/workflows/tests.yml | 6 +++--- ci/install-dependencies-windows.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a6ffb2246b5..e465f959e3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -85,9 +85,9 @@ jobs: shell: pwsh run: | New-Item -Path "HKLM:\Software\GPL Ghostscript" - New-Item -Path "HKLM:\Software\GPL Ghostscript\10.02" - New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.02" -Name GS_DLL -PropertyType String -Value "C:\Miniconda\Library\bin\gsdll64.dll" - New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.02" -Name GS_LIB -PropertyType String -Value "C:\Miniconda\Library\bin;C:\Miniconda\Library\lib;C\Miniconda\Library\Font;C:\Miniconda\Library\fonts" + New-Item -Path "HKLM:\Software\GPL Ghostscript\10.03.0" + New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.03.0" -Name GS_DLL -PropertyType String -Value "C:\Miniconda\Library\bin\gsdll64.dll" + New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.03.0" -Name GS_LIB -PropertyType String -Value "C:\Miniconda\Library\bin;C:\Miniconda\Library\lib;C\Miniconda\Library\Font;C:\Miniconda\Library\fonts" if: runner.os == 'Windows' - name: Download GSHHG and DCW data diff --git a/ci/install-dependencies-windows.sh b/ci/install-dependencies-windows.sh index a61dfeb627c..529d637b76e 100755 --- a/ci/install-dependencies-windows.sh +++ b/ci/install-dependencies-windows.sh @@ -38,8 +38,8 @@ if [ "$RUN_TESTS" = "true" ]; then conda_packages+=" dvc" # Install graphicsmagick via choco - choco install graphicsmagick --version 1.3.32 --no-progress - echo 'C:\Program Files\GraphicsMagick-1.3.32-Q8' >> $GITHUB_PATH + choco install graphicsmagick --version 1.3.42 --no-progress + echo 'C:\Program Files\GraphicsMagick-1.3.42-Q8\' >> $GITHUB_PATH fi # we need the GNU tar for packaging From 1befd6f765bc4e4de7e6dc05adc492b9c41427b4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 13 Jun 2024 18:43:54 +0800 Subject: [PATCH 083/105] Remove CODE_OF_CONDUCT.md and use the organization-wide CODE OF CONDUCT file (#8519) --- CODE_OF_CONDUCT.md | 2 -- README.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index d4c6aed943f..00000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,2 +0,0 @@ -All participants in the GMT community must abide by -the [Generic Mapping Tools organization Code of Conduct](https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md). diff --git a/README.md b/README.md index 4e9c3227c71..7956fcba86f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![Coverity](https://scan.coverity.com/projects/7153/badge.svg)](https://scan.coverity.com/projects/gmt) [![Documentation (development version)](https://img.shields.io/badge/docs-development-green.svg)](http://docs.generic-mapping-tools.org/dev/) [![GitHub release](https://img.shields.io/github/release/GenericMappingTools/gmt)](https://github.com/GenericMappingTools/gmt/releases) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3407865.svg)](https://zenodo.org/doi/10.5281/zenodo.3407865) ## What is GMT? From f9064b2bd5623e68f098afd88af627268ec41159 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Mon, 17 Jun 2024 21:25:43 +0100 Subject: [PATCH 084/105] Fix the color depth returned when reading the gray.cpt master CPT. (#8522) * Fix the color depth returned when reading the gray.cpt master CPT. * Fix typo. --- src/gmt_support.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gmt_support.c b/src/gmt_support.c index 6d8c2c96bb2..8232d605cf0 100644 --- a/src/gmt_support.c +++ b/src/gmt_support.c @@ -8788,6 +8788,9 @@ struct GMT_PALETTE * gmtlib_read_cpt (struct GMT_CTRL *GMT, void *source, unsign if (n < n_alloc) X->data = gmt_M_memory (GMT, X->data, n, struct GMT_LUT); X->n_colors = n; + /* The master gray.cpt has only one slice and hence it comes out as both gray & bw, but it can only be one of them. */ + if (X->n_colors == 1 && X->is_gray && X->is_bw) X->is_bw = false; /* Prefer gray over bw (would crash grdimage with externals). */ + if (X->categorical) { /* Set up fake ranges so CPT is continuous */ dz = 1.0; /* This will presumably get reset in the loop */ for (i = 0; i < X->n_colors; i++) { From 20cbbffe6396749b563d0c335e3f8116d14ffa47 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Wed, 19 Jun 2024 13:46:54 +0100 Subject: [PATCH 085/105] Use all cores by default in grdfilter (#8523) * Let x option synopsis be printed in grdfilter independently of having OMP or not. * Let all 3 modules built with Glib use max number of cores by default like the OMP case. * Do not use multi-threads with -Ff (custom filter). It's broken. * Use API->n_cores instead of gmtlib_get_num_processors() to see if it pleases Mac * Do not use all cores by default in potential modules. Some tests are failing. Integrate the ideas of #8319 * Remove mention to -x option (not in current surface module). Variable filter width (grdfilter) does not support -x --- doc/rst/source/explain_core.rst_ | 4 +++- src/gmt_dev.h | 1 + src/gmt_glib.h | 1 + src/gmt_init.c | 20 ++++++++++++-------- src/grdfilter.c | 18 ++++++++++++++++-- src/potential/gmtgravmag3d.c | 2 +- src/potential/grdgravmag3d.c | 2 +- src/surface.c | 4 ++-- 8 files changed, 37 insertions(+), 15 deletions(-) diff --git a/doc/rst/source/explain_core.rst_ b/doc/rst/source/explain_core.rst_ index 71af45a25f0..b427144f76e 100644 --- a/doc/rst/source/explain_core.rst_ +++ b/doc/rst/source/explain_core.rst_ @@ -1,2 +1,4 @@ **-x**\ [[-]\ *n*] :ref:`(more ...) ` - Limit number of cores used in multi-threaded algorithms (OpenMP required). + Limit number of cores used in multi-threaded algorithms. Multi-threaded behavior is enabled by default. + That covers the modules that implement the OpenMP API (required at compiling stage) and GThreads (Glib) + for the grdfilter module. diff --git a/src/gmt_dev.h b/src/gmt_dev.h index 1f8e32fd920..8de3861cfdf 100644 --- a/src/gmt_dev.h +++ b/src/gmt_dev.h @@ -154,6 +154,7 @@ struct GMT_CTRL; /* forward declaration of GMT_CTRL */ #include "gmt_nan.h" /* Machine-dependent macros for making and testing NaNs */ #include "gmt_error.h" /* Only contains error codes */ #include "gmt_synopsis.h" /* Only contains macros for synopsis lines */ +#include "gmt_glib.h" /* Make the GMT_xg_OPT define visible, even if HAVE_GLIB_GTHREAD is not defined */ #include "gmt_version.h" /* Only contains the current GMT version number */ #include "gmt_project.h" /* Define GMT->current.proj and GMT->current.map.frame structures */ #include "gmt_grd.h" /* Define grd file header structure */ diff --git a/src/gmt_glib.h b/src/gmt_glib.h index e8fece8e59a..ec13ae4019e 100644 --- a/src/gmt_glib.h +++ b/src/gmt_glib.h @@ -30,6 +30,7 @@ These are used only GLIB based multi-threading */ #ifndef GMT_GLIB_H +#define GMT_GLIB_H #ifdef HAVE_GLIB_GTHREAD #include diff --git a/src/gmt_init.c b/src/gmt_init.c index 75b3fe1e1b3..207d3ed6d1b 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -2607,8 +2607,8 @@ GMT_LOCAL int gmtinit_parse_U_option (struct GMT_CTRL *GMT, char *item) { } /*! -x[[-]] */ +GMT_LOCAL int gmtinit_parse_x_option (struct GMT_CTRL *GMT, char *arg) { /* Only effective if MP is enabled */ #ifdef GMT_MP_ENABLED -GMT_LOCAL int gmtinit_parse_x_option (struct GMT_CTRL *GMT, char *arg) { GMT->common.x.active = true; if (!arg) return (GMT_PARSE_ERROR); /* -x requires a non-NULL argument */ if (arg[0] == '\0') /* Use all processors */ @@ -2622,9 +2622,9 @@ GMT_LOCAL int gmtinit_parse_x_option (struct GMT_CTRL *GMT, char *arg) { GMT->common.x.n_threads = MAX(gmtlib_get_num_processors() - abs (GMT->common.x.n_threads), 1); /* Max-n but at least one */ if (GMT->current.setting.max_cores) /* Limit to max core defaults setting */ GMT->common.x.n_threads = GMT->current.setting.max_cores; +#endif return (GMT_NOERROR); } -#endif /*! . */ GMT_LOCAL int gmtinit_parse_colon_option (struct GMT_CTRL *GMT, char *item) { @@ -8124,9 +8124,9 @@ void gmtlib_explain_options (struct GMT_CTRL *GMT, char *options) { #if defined(GMT_MP_ENABLED) case 'y': /* Number of threads (reassigned from -x in GMT_Option) */ - if (strlen (GMT_x_OPT) > 1) { /* Only print this if it is in fact available */ + if (strlen(GMT_x_OPT) > 1 || strlen(GMT_xg_OPT) > 1) { /* Only print this if it is in fact available */ cores = gmtlib_get_num_processors(); - GMT_Usage (API, 1, "\n%s", GMT_x_OPT); + (strlen(GMT_x_OPT) > 1) ? GMT_Usage(API, 1, "\n%s", GMT_x_OPT) : GMT_Usage(API, 1, "\n%s", GMT_xg_OPT); GMT_Usage (API, -2, "Limit the number of cores used in multi-threaded algorithms [Default uses all %d cores]. " "If is negative then we select (%d - ) cores (or at least 1).", cores, cores); } @@ -9151,9 +9151,12 @@ int gmt_default_error (struct GMT_CTRL *GMT, char option) { case 's': error += GMT->common.s.active == false; break; case 't': error += GMT->common.t.active == false; break; case 'w': error += GMT->common.w.active == false; break; -#if defined(GMT_MP_ENABLED) - case 'x': error += GMT->common.x.active == false; break; + case 'x': error += GMT->common.x.active == false; +#if !defined(GMT_MP_ENABLED) + error --; + GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Option -x: GMT is not compiled with parallel support. Only one core is used\n"); #endif + break; case ':': error += GMT->common.colon.active == false; break; default: @@ -18792,12 +18795,13 @@ int gmt_parse_common_options (struct GMT_CTRL *GMT, char *list, char option, cha error += gmt_M_more_than_once (GMT, GMT->common.w.active) || gmtinit_parse_w_option (GMT, item); break; -#ifdef GMT_MP_ENABLED case 'x': error += (gmt_M_more_than_once (GMT, GMT->common.x.active) || gmtinit_parse_x_option (GMT, item)); GMT->common.x.active = true; - break; +#if !defined(GMT_MP_ENABLED) + GMT_Report (GMT->parent, GMT_MSG_WARNING, "Option -x: GMT is not compiled with parallel support. Only one core is used\n"); #endif + break; case ':': error += (gmt_M_more_than_once (GMT, GMT->common.colon.active) || gmtinit_parse_colon_option (GMT, item)); diff --git a/src/grdfilter.c b/src/grdfilter.c index 61e450e4966..916c649acea 100644 --- a/src/grdfilter.c +++ b/src/grdfilter.c @@ -47,7 +47,7 @@ Use option -x to set the number of threads. e.g. -x2, -x4, ... or -xa to use all #include "gmt_dev.h" #include "longopt/grdfilter_inc.h" -#include "gmt_glib.h" +//#include "gmt_glib.h" /* Now included in gmt_dev.h */ #define THIS_MODULE_CLASSIC_NAME "grdfilter" #define THIS_MODULE_MODERN_NAME "grdfilter" @@ -828,7 +828,7 @@ static int parse (struct GMT_CTRL *GMT, struct GRDFILTER_CTRL *Ctrl, struct GMT_ Ctrl->F.rect = true; } else - Ctrl->F.width = grdfilter_get_filter_width (API, Ctrl, &txt[1]); + Ctrl->F.width = grdfilter_get_filter_width (API, Ctrl, &txt[1]); /* This has an undocumented option of reading a grid */ if (Ctrl->F.width < 0.0) { /* Old-style specification for high-pass filtering */ if (gmt_M_compat_check (GMT, 5)) { GMT_Report (API, GMT_MSG_COMPAT, @@ -893,6 +893,20 @@ static int parse (struct GMT_CTRL *GMT, struct GRDFILTER_CTRL *Ctrl, struct GMT_ } } +#ifdef HAVE_GLIB_GTHREAD + /* Make the default equal to the OMP case where we use all threads if not stated otherwise. */ + if (Ctrl->F.varwidth) { /* Variable filter width. This option is currently undocumented. */ + if (GMT->common.x.active) + GMT_Report (GMT->parent, GMT_MSG_WARNING, "Sorry, variable filter width does not support multiple threads. Reset to 1.\n" ); + GMT->common.x.n_threads = 1; + GMT->common.x.active = true; + } + if (!GMT->common.x.active) { + GMT->common.x.n_threads = API->n_cores; + GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Enable all available threads (up to %d)\n", API->n_cores); + } +#endif + n_errors += gmt_M_check_condition (GMT, !Ctrl->G.active, "Option -G: Must specify output file\n"); n_errors += gmt_M_check_condition (GMT, !Ctrl->In.file, "Must specify input file\n"); n_errors += gmt_M_check_condition (GMT, !Ctrl->D.active, "Option -D: Choose from p or 0-5\n"); diff --git a/src/potential/gmtgravmag3d.c b/src/potential/gmtgravmag3d.c index 2ac7b746ccd..1c2da2a8828 100644 --- a/src/potential/gmtgravmag3d.c +++ b/src/potential/gmtgravmag3d.c @@ -252,7 +252,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { return (GMT_MODULE_USAGE); } -static int parse (struct GMT_CTRL *GMT, struct GMTGRAVMAG3D_CTRL *Ctrl, struct GMT_OPTION *options) { +static int parse(struct GMT_CTRL *GMT, struct GMTGRAVMAG3D_CTRL *Ctrl, struct GMT_OPTION *options) { /* This parses the options provided to gmtgravmag3d and sets parameters in Ctrl. * Note Ctrl has already been initialized and non-zero default values set. diff --git a/src/potential/grdgravmag3d.c b/src/potential/grdgravmag3d.c index 9ca9129ebc6..168384fb56c 100644 --- a/src/potential/grdgravmag3d.c +++ b/src/potential/grdgravmag3d.c @@ -262,7 +262,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { return (GMT_MODULE_USAGE); } -static int parse (struct GMT_CTRL *GMT, struct GRDGRAVMAG3D_CTRL *Ctrl, struct GMT_OPTION *options) { +static int parse(struct GMT_CTRL *GMT, struct GRDGRAVMAG3D_CTRL *Ctrl, struct GMT_OPTION *options) { /* This parses the options provided to grdgravmag3d and sets parameters in Ctrl. * Note Ctrl has already been initialized and non-zero default values set. diff --git a/src/surface.c b/src/surface.c index 9dc34f3700f..28ee64cc616 100644 --- a/src/surface.c +++ b/src/surface.c @@ -57,7 +57,7 @@ #define THIS_MODULE_PURPOSE "Grid table data using adjustable tension continuous curvature splines" #define THIS_MODULE_KEYS " */ @@ -1790,7 +1790,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { GMT_Usage (API, -2, "Change over-relaxation parameter [Default = %g]. Use a value " "between 1 and 2. Larger number accelerates convergence but can be unstable. " "Use 1 if you want to be sure to have (slow) stable convergence.", SURFACE_OVERRELAXATION); - GMT_Option (API, "a,bi3,di,e,f,h,i,qi,r,w,x,:,."); + GMT_Option (API, "a,bi3,di,e,f,h,i,qi,r,w,:,."); if (gmt_M_showusage (API)) GMT_Usage (API, -2, "Note: Geographic data with 360-degree range use periodic boundary condition in longitude. " "For additional details, see Smith & Wessel, Geophysics, 55, 293-305, 1990."); From 79033c0cab34961fe18bfad8ad5d0719785485ee Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:31:05 +0200 Subject: [PATCH 086/105] coast.rst: -M argument, mention FORMAT_FLOAT_OUT to reduce number of decimals (#8524) --- doc/rst/source/coast.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/rst/source/coast.rst b/doc/rst/source/coast.rst index 76c103804e5..3a6ea733117 100644 --- a/doc/rst/source/coast.rst +++ b/doc/rst/source/coast.rst @@ -219,6 +219,10 @@ Optional Arguments just certain levels (1-4) then use the full syntax **-W**\ *level*/\ *pen* and repeat for each level (pen is not used but required to parse the level correctly). + Since the resolution of the datasets typically are in the order + of hundreds of meters, consider reducing the number of decimals by + setting :term:`FORMAT_FLOAT_OUT`. + .. _-N: **-N**\ *border*\ [/*pen*] From ec2aa4cdfcf9995f1e18aca9a780c40f338db1cf Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:54:46 +0200 Subject: [PATCH 087/105] coast.rst: -E argument, improve description of +l and +L (#8526) --- doc/rst/source/coast.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rst/source/coast.rst b/doc/rst/source/coast.rst index 3a6ea733117..b02a2783ca9 100644 --- a/doc/rst/source/coast.rst +++ b/doc/rst/source/coast.rst @@ -128,7 +128,7 @@ Optional Arguments - **+l** to just list the countries and their codes (no data extraction or plotting takes place). - **+L** to see states/territories for Argentina, Australia, Brazil, Canada, China, India, Norway, Russia and the US. - - **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list countries in that continent or country; + - **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list countries or states in that continent or country, respectively; repeat if more than one continent or country is requested. - **+n** to list the named :ref:`DCW collections ` or regions (**-E**\ *code*\ **+n** will list collections that contains the listed codes). All names are case-insensitive. From 206db56471435d75825dd72869d63b26664fe20a Mon Sep 17 00:00:00 2001 From: Joaquim Date: Fri, 21 Jun 2024 23:47:00 +0100 Subject: [PATCH 088/105] Keep the segment headers on output. (#8527) --- src/gmtsimplify.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gmtsimplify.c b/src/gmtsimplify.c index 4d7dabb5b13..0ba803b99ea 100644 --- a/src/gmtsimplify.c +++ b/src/gmtsimplify.c @@ -386,6 +386,7 @@ EXTERN_MSC int GMT_gmtsimplify (void *V_API, int mode, void *args) { S[GMT_OUT]->data[col][row] = S[GMT_IN]->data[col][index[row]]; if (smode) S[GMT_OUT]->text[row] = strdup (S[GMT_IN]->text[row]); } + if (S[GMT_IN]->header) S[GMT_OUT]->header = strdup(S[GMT_IN]->header); seg_out++; /* Move on to next output segment */ ns_in++; /* Input segment with points */ if (np_out) ns_out++; /* Output segment with points */ From f31c58347d278280c66748b4e76d7c1e6426ee2e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 24 Jun 2024 22:34:33 +0800 Subject: [PATCH 089/105] grdinfo: Fix pad for external wrappers and update grid header for -L option (#8528) --- src/grdinfo.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/grdinfo.c b/src/grdinfo.c index c995c381b27..7452123221d 100644 --- a/src/grdinfo.c +++ b/src/grdinfo.c @@ -174,7 +174,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { GMT_Usage (API, 3, "a: All of the above."); GMT_Usage (API, -2, "Note: If grid is geographic then we report area-weighted statistics."); GMT_Usage (API, 1, "\n-M[c|f]"); - GMT_Usage (API, -2, "\nSearch for the global data min and max locations (x0,y0{,z0}) and (x1,y1{,z1}) [Default]." + GMT_Usage (API, -2, "\nSearch for the global data min and max locations (x0,y0{,z0}) and (x1,y1{,z1}) [Default]." " Append c to only determine data min/max range if missing from the header, or f to force that search to override the header range."); GMT_Option (API, "R"); GMT_Usage (API, 1, "\n-T[][+a[]][+s]"); @@ -576,7 +576,7 @@ GMT_LOCAL void grdinfo_smart_increments (struct GMT_CTRL *GMT, double inc[], uns EXTERN_MSC int gmtlib_is_nc_grid (struct GMT_CTRL *GMT, struct GMT_GRID_HEADER *header); #define bailout(code) {gmt_M_free_options (mode); return (code);} -#define Return(code) {Free_Ctrl (GMT, Ctrl); gmt_set_pad (GMT, GMT_PAD_DEFAULT); gmt_end_module (GMT, GMT_cpy); bailout (code);} +#define Return(code) {Free_Ctrl (GMT, Ctrl); gmt_end_module (GMT, GMT_cpy); bailout (code);} EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) { int error = 0, k_data, k_tile_id; @@ -689,8 +689,6 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) { Out = gmt_new_record (GMT, (n_cols) ? out : NULL, (cmode) == GMT_COL_FIX ? record : NULL); /* the two items */ - gmt_set_pad (API->GMT, 0); /* Not read pads to simplify operations */ - for (opt = options; opt; opt = opt->next) { /* Loop over arguments, skip options */ if (opt->option != '<') continue; /* We are only processing filenames here */ @@ -852,7 +850,7 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) { } else /* Not a single valid node */ x_min = x_max = y_min = y_max = z_min = z_max = GMT->session.d_NaN; - if (Ctrl->M.mode == GRDINFO_FORCE) { /* Update header */ + if (Ctrl->M.mode == GRDINFO_FORCE || Ctrl->L.active) { /* Update header */ header->z_min = v_min; header->z_max = v_max; } From 7eeb284d6ff98de44aa243d5814132f31b1bff4b Mon Sep 17 00:00:00 2001 From: anbj <29237824+anbj@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:17:15 +0200 Subject: [PATCH 090/105] grd2cpt.rst, gpsgridder.rst and grdredpol.rst: make doi links (#8529) --- doc/rst/source/grd2cpt.rst | 2 +- doc/rst/source/supplements/geodesy/gpsgridder.rst | 2 +- doc/rst/source/supplements/potential/grdredpol.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/rst/source/grd2cpt.rst b/doc/rst/source/grd2cpt.rst index b871034f0fd..542066bad69 100644 --- a/doc/rst/source/grd2cpt.rst +++ b/doc/rst/source/grd2cpt.rst @@ -305,4 +305,4 @@ References Crameri, F., (2018). Scientific colour-maps. Zenodo. http://doi.org/10.5281/zenodo.1243862 Crameri, F. (2018), Geodynamic diagnostics, scientific visualisation and StagLab 3.0, -*Geosci. Model Dev.*, 11, 2541-2562, doi:10.5194/gmd-11-2541-2018. +*Geosci. Model Dev.*, 11, 2541-2562, https://doi.org/10.5194/gmd-11-2541-2018. diff --git a/doc/rst/source/supplements/geodesy/gpsgridder.rst b/doc/rst/source/supplements/geodesy/gpsgridder.rst index 9572cbb225f..dede1bf1f8e 100644 --- a/doc/rst/source/supplements/geodesy/gpsgridder.rst +++ b/doc/rst/source/supplements/geodesy/gpsgridder.rst @@ -262,7 +262,7 @@ References ---------- Haines, A. J. et al., 2015, *Enhanced Surface Imaging of Crustal Deformation*, SpringerBriefs in Earth Sciences, -doi:10.1007/978-3-319-21578-5_2. +https://doi.org/10.1007/978-3-319-21578-5_2. Sandwell, D. T. and P. Wessel, 2016, Interpolation of 2-D Vector Data Using Constraints from Elasticity, *Geophys. Res. Lett., 43*, 10,703-10,709, diff --git a/doc/rst/source/supplements/potential/grdredpol.rst b/doc/rst/source/supplements/potential/grdredpol.rst index 39110fe3a16..7f5124b5a48 100644 --- a/doc/rst/source/supplements/potential/grdredpol.rst +++ b/doc/rst/source/supplements/potential/grdredpol.rst @@ -154,4 +154,4 @@ Reference Luis, J.L. and Miranda, J.M., 2008, Reevaluation of magnetic chrons in the North Atlantic between 35N and 47N: Implications for the formation of the Azores Triple Junction and associated plateau. *JGR*, VOL. -**113**, B10105, doi:10.1029/2007JB005573 +**113**, B10105, https://doi.org/10.1029/2007JB005573 From 7612c794bf5bdab438bf299310e26e8d4b4b84ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:36:57 +0800 Subject: [PATCH 091/105] Bump mamba-org/setup-micromamba from 1.8.1 to 1.9.0 (#8535) Bumps [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) from 1.8.1 to 1.9.0. - [Release notes](https://github.com/mamba-org/setup-micromamba/releases) - [Commits](https://github.com/mamba-org/setup-micromamba/compare/v1.8.1...v1.9.0) --- updated-dependencies: - dependency-name: mamba-org/setup-micromamba dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-caches.yml | 2 +- .github/workflows/dvc-diff.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-caches.yml b/.github/workflows/ci-caches.yml index f9e58b94e9a..6b34f617fc0 100644 --- a/.github/workflows/ci-caches.yml +++ b/.github/workflows/ci-caches.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Install GMT - uses: mamba-org/setup-micromamba@v1.8.1 + uses: mamba-org/setup-micromamba@v1.9.0 with: environment-name: gmt condarc: | diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index bf5424c4945..e44a6d5d175 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -33,7 +33,7 @@ jobs: uses: iterative/setup-cml@v3 - name: Setup Micromamba - uses: mamba-org/setup-micromamba@v1.8.1 + uses: mamba-org/setup-micromamba@v1.9.0 with: environment-name: gmt condarc: | From c750843288485ac6b8aafb81230bc04e2372200b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:45:55 +0800 Subject: [PATCH 092/105] Bump codecov/codecov-action from 4.4.1 to 4.5.0 (#8534) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.4.1 to 4.5.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.4.1...v4.5.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e465f959e3e..36d3d1b650a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -173,7 +173,7 @@ jobs: if: failure() - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.4.1 + uses: codecov/codecov-action@v4.5.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 4ff95a2092d4e01db2a0e4c3d620019d71903e0d Mon Sep 17 00:00:00 2001 From: Joaquim Date: Mon, 1 Jul 2024 18:29:03 +0100 Subject: [PATCH 093/105] Add a new modifier to -f, -fa, to permit reading files with text in the first column. (#8532) --- doc/rst/source/explain_-f_full.rst_ | 11 ++++++--- src/gmt_init.c | 3 ++- src/gmt_io.c | 35 ++++++++++++++++++++++------- src/gmt_io.h | 3 ++- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/doc/rst/source/explain_-f_full.rst_ b/doc/rst/source/explain_-f_full.rst_ index 03cae0ef99c..f905d6cbccb 100644 --- a/doc/rst/source/explain_-f_full.rst_ +++ b/doc/rst/source/explain_-f_full.rst_ @@ -23,8 +23,13 @@ all items from the given column and to the end of the record should be considere Three shorthand options for common selections are available. The shorthand **-f**\ [**i**\|\ **o**]\ **g** means **-f**\ [**i**\|\ **o**]0x,1y (i.e., geographic coordinates), while **-f**\ [**i**\|\ **o**]\ **c** means -**-f**\ [**i**\|\ **o**]0:1\ **f** (i.e., Cartesian coordinates). A special use of **-f** is to select +**-f**\ [**i**\|\ **o**]0:1\ **f** (i.e., Cartesian coordinates). A first special use of **-f** is to select **-fp**\ [*unit*], which *requires* **-J -R** and lets you use *projected* map coordinates (e.g., UTM meters) as data input. Such coordinates are automatically inverted to longitude, latitude during the data import. Optionally, append a length -*unit* (see table :ref:`distance units `) [default is meter]. For more information, see Sections -:ref:`input-data-formats` and :ref:`output-data-formats`. +*unit* (see table :ref:`distance units `) [default is meter]. The second special case is to use **-fa**. +We use this when reading a file whose first column is plain text (and NO date or time) followed by numeric records. +Normally, such a file would result in a _"Selection led to no output columns"_ error because the file was interpreted +to be made only of text (_i.,e.,_ no numbers). Or even worse, only part of the file is read. The **-fa** option +forces the first column to be ignored (output as NaN) and the remaining records parsed normally. User may add the +**-i1:** to fully drop that first column in reading. For more information, see Sections :ref:`input-data-formats` +and :ref:`output-data-formats`. diff --git a/src/gmt_init.c b/src/gmt_init.c index 207d3ed6d1b..9570a9c84dc 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -1925,8 +1925,9 @@ GMT_LOCAL int gmtinit_parse_f_option (struct GMT_CTRL *GMT, char *arg) { case 'x': code = GMT_IS_LON; break; /* Longitude coordinates */ case 'y': code = GMT_IS_LAT; break; /* Latitude coordinates */ case 'f': code = GMT_IS_FLOAT; break; /* Plain floating point coordinates */ - case 'd': code = GMT_IS_DIMENSION; break; /* Length dimension (with possible unit) */ + case 'd': code = GMT_IS_DIMENSION;break; /* Length dimension (with possible unit) */ case 's': code = GMT_IS_STRING; break; /* This must be start of trailing text */ + case 'a': code = GMT_IS_FIRSTCOLSTR; break; /* First column is text followed by trailing numbers */ default: /* No suffix, consider it an error */ GMT_Report (GMT->parent, GMT_MSG_ERROR, "Malformed -f argument [%s]\n", arg); return 1; diff --git a/src/gmt_io.c b/src/gmt_io.c index 2d2b5e8512d..8ff4a43b8d8 100644 --- a/src/gmt_io.c +++ b/src/gmt_io.c @@ -3529,8 +3529,12 @@ GMT_LOCAL unsigned int gmtio_examine_current_record (struct GMT_CTRL *GMT, char got = gmt_scanf_arg (GMT, token, GMT_IS_UNKNOWN, false, &value); if (got == GMT_IS_NAN) { /* Parsing failed, which means we found our first non-number; but it could also be a valid NaN */ gmt_str_tolower (token); - if (strncmp (token, "nan", 3U)) - found_text = true; + if (strncmp(token, "nan", 3U)) { + if (GMT->current.io.col_type[GMT_IN][0] == GMT_IS_FIRSTCOLSTR) + type[col++] = got = GMT_IS_FLOAT; + else + found_text = true; + } else type[col++] = got = GMT_IS_FLOAT; } @@ -3574,6 +3578,13 @@ GMT_LOCAL unsigned int gmtio_examine_current_record (struct GMT_CTRL *GMT, char for (k = 0; k < col; k++) /* Check if we can utilize what we learned about each physical column */ gmtio_assign_col_type_if_notset (GMT, k, type[k]); + + /* When -fa & -i was used here we still have a leading col_type = GMT_IS_FIRSTCOLSTR that would cause + first col to always come out as NaN. Need to reset it GMT_IS_FLOAT. + */ + if (GMT->common.i.col.select && GMT->current.io.col_type[GMT_IN][0] == GMT_IS_FIRSTCOLSTR) + GMT->current.io.col_type[GMT_IN][0] = GMT_IS_FLOAT; + gmt_M_free (GMT, type); @@ -7384,6 +7395,10 @@ int gmt_scanf (struct GMT_CTRL *GMT, char *s, unsigned int expectation, double * return (type); break; + case GMT_IS_FIRSTCOLSTR: + return (GMT_IS_NAN); + break; + default: GMT_Report (GMT->parent, GMT_MSG_ERROR, "GMT_LOGIC_BUG: gmt_scanf() called with invalid expectation.\n"); return (GMT_IS_NAN); @@ -8161,7 +8176,7 @@ struct GMT_DATASET * gmtlib_create_dataset (struct GMT_CTRL *GMT, uint64_t n_tab } /*! . */ -struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, unsigned int source_type, bool greenwich, unsigned int *geometry, unsigned int *data_type, bool use_GMT_io) { +struct GMT_DATATABLE *gmtlib_read_table(struct GMT_CTRL *GMT, void *source, unsigned int source_type, bool greenwich, unsigned int *geometry, unsigned int *data_type, bool use_GMT_io) { /* Reads an entire data set into a single table in memory with any number of segments */ bool ASCII, close_file = false, header = true, no_segments, first_seg = true, poly, this_is_poly = false; @@ -8256,7 +8271,7 @@ struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, un } if (GMT->current.io.record.data == NULL) *data_type = GMT_READ_TEXT; - In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); /* Get first record */ + In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); /* Get first record. If == NULL means we read a header line. */ n_read++; if (gmt_M_rec_is_eof(GMT)) { GMT_Report (GMT->parent, GMT_MSG_WARNING, "File %s is empty!\n", file); @@ -8332,7 +8347,8 @@ struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, un /* Segment initialization */ row = 0; if (!no_segments) { /* Read data if we read a segment header up front, but guard against headers which sets in = NULL */ - while (!gmt_M_rec_is_eof (GMT) && (In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status)) == NULL) n_read++; + while (!gmt_M_rec_is_eof (GMT) && (In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status)) == NULL) + n_read++; } if (GMT->current.io.record_type[GMT_IN] == GMT_READ_TEXT) S->n_columns = 0; /* No numerical data */ @@ -8383,7 +8399,8 @@ struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, un row++; In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); - while (gmt_M_rec_is_table_header (GMT)) In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); /* Just wind past other comments */ + while (gmt_M_rec_is_table_header (GMT)) + In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); /* Just wind past other comments */ n_read++; } @@ -8403,14 +8420,16 @@ struct GMT_DATATABLE * gmtlib_read_table (struct GMT_CTRL *GMT, void *source, un double dlon = GMT->hidden.mem_coord[GMT_X][0] - GMT->hidden.mem_coord[GMT_X][row-1]; if (!((fabs (dlon) == 0.0 || fabs (dlon) == 360.0) && GMT->hidden.mem_coord[GMT_Y][0] == GMT->hidden.mem_coord[GMT_Y][row-1])) { gmt_prep_tmp_arrays (GMT, GMT_IN, row, S->n_columns); /* Maybe reallocate tmp read vectors */ - for (col = 0; col < S->n_columns; col++) GMT->hidden.mem_coord[col][row] = GMT->hidden.mem_coord[col][0]; + for (col = 0; col < S->n_columns; col++) + GMT->hidden.mem_coord[col][row] = GMT->hidden.mem_coord[col][0]; row++; /* Explicitly close polygon */ GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Explicitly closed open geographic polygon in file %s, segment %" PRIu64 "\n", file, seg); } } else if (gmt_polygon_is_open (GMT, GMT->hidden.mem_coord[GMT_X], GMT->hidden.mem_coord[GMT_Y], row)) { /* Cartesian closure */ gmt_prep_tmp_arrays (GMT, GMT_IN, row, S->n_columns); /* Init or update tmp read vectors */ - for (col = 0; col < S->n_columns; col++) GMT->hidden.mem_coord[col][row] = GMT->hidden.mem_coord[col][0]; + for (col = 0; col < S->n_columns; col++) + GMT->hidden.mem_coord[col][row] = GMT->hidden.mem_coord[col][0]; row++; /* Explicitly close polygon */ GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Explicitly closed open Cartesian polygon in file %s, segment %" PRIu64 "\n", file, seg); } diff --git a/src/gmt_io.h b/src/gmt_io.h index 82a450686e7..e20ee6bfce1 100644 --- a/src/gmt_io.h +++ b/src/gmt_io.h @@ -110,7 +110,8 @@ enum gmt_col_enum { GMT_IS_AZIMUTH = 512, /* An angle to be converted via map projection to angle on map */ GMT_IS_ANGLE = 1024, /* An angle to be used as is */ GMT_IS_STRING = 2048, /* An text argument [internally used, not via -f] */ - GMT_IS_UNKNOWN = 4096}; /* Input type is not knowable without -f */ + GMT_IS_FIRSTCOLSTR = 4096, /* An text first column followed by numerics [set via -f] */ + GMT_IS_UNKNOWN = 8192};/* Input type is not knowable without -f */ /*! Various ways to report longitudes */ enum GMT_lon_enum { From 59d5e2c893da8177a78ce306964c637d14811b30 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Wed, 3 Jul 2024 16:18:51 +0100 Subject: [PATCH 094/105] Add pscoast proj4_nox0y0 test ps --- test/baseline/pscoast.dvc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/baseline/pscoast.dvc b/test/baseline/pscoast.dvc index 92ac4a79907..113d55b27c3 100644 --- a/test/baseline/pscoast.dvc +++ b/test/baseline/pscoast.dvc @@ -1,5 +1,5 @@ outs: -- md5: c7cd9a6460aeb8d046cd4078d0977f30.dir - nfiles: 26 +- md5: c3150382d4ad32970349cde4f2e294ea.dir + nfiles: 27 path: pscoast hash: md5 From 0584d620d27de5ed93a90e4b0dc56a2edb2d568a Mon Sep 17 00:00:00 2001 From: Joaquim Date: Wed, 3 Jul 2024 18:36:24 +0100 Subject: [PATCH 095/105] Fix the issue with x_0 & y_0 in proj4 string used in pscoast (#8538) * Add test for fixing #8536 * Fix #8536 --- src/gmt_init.c | 31 +++++++++---------- src/gmt_map.c | 6 ++-- src/pscoast.c | 58 +++++++++++++++++++++++++++++++++--- test/pscoast/proj4_nox0y0.sh | 6 ++++ 4 files changed, 77 insertions(+), 24 deletions(-) create mode 100644 test/pscoast/proj4_nox0y0.sh diff --git a/src/gmt_init.c b/src/gmt_init.c index 9570a9c84dc..c3777dab041 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -18256,7 +18256,7 @@ unsigned int gmt_parse_inc_option (struct GMT_CTRL *GMT, char option, char *item return GMT_NOERROR; } -GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) { +GMT_LOCAL int gmtinit_parse_proj4(struct GMT_CTRL *GMT, char *item, char *dest) { /* Deal with proj.4 or EPSGs passed in -J option */ char *item_t1 = NULL, *item_t2 = NULL, epsg2proj[GMT_LEN256] = {""}, wktext[32] = {""}, *pch; bool do_free = false; @@ -18266,7 +18266,7 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) if (item[0] == '+') { bool found = false; - len = strlen (item); + len = strlen(item); for (k = 1; k < len; k++) { /* Search for glued tokens */ if (item[k] == '+' && item[k-1] != ' ') { found = true; @@ -18274,7 +18274,7 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) } } if (found) { /* OK, need to break up things like +x=0+y=0 into "+x=0 +y=0" */ - item_t1 = gmt_strrep (item, "+", " +"); + item_t1 = gmt_strrep(item, "+", " +"); do_free = true; /* Signal that we must free item_t1 */ } else @@ -18287,10 +18287,7 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) else item_t1 = item; - /* Don't remember anymore if we still need to call gmt_importproj4(). We don't for simple - mapproject usage but maybe we still need for mapping purposes. To-be-rediscovered. - */ - item_t2 = gmt_importproj4 (GMT, item_t1, &scale_pos, epsg2proj); /* This is the GMT -J proj string */ + item_t2 = gmt_importproj4(GMT, item_t1, &scale_pos, epsg2proj); /* This is the GMT -J proj string */ if (item_t2 && !GMT->current.ps.active && !strcmp(item_t2, "/1:1")) { /* Even though it failed to do the mapping we can still use it in mapproject */ GMT->current.proj.projection_GMT = GMT_NO_PROJ; @@ -18305,8 +18302,8 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) item_t2[len-1] = '\0'; } if (scale_pos != 0) { /* Because if == 0 than it means we have a scale only string (i.e. no GMT mapped proj) */ - error += (gmt_M_check_condition (GMT, GMT->common.J.active, "Option -J given more than once\n") || - gmtinit_parse_J_option (GMT, item_t2)); + error += (gmt_M_check_condition(GMT, GMT->common.J.active, "Option -J given more than once\n") || + gmtinit_parse_J_option (GMT, item_t2)); } else /* Not particularly useful yet because mapproject will fail anyway when scale != 1:1 */ GMT->current.proj.projection_GMT = GMT_NO_PROJ; @@ -18324,20 +18321,20 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) else if ((sc = atof(pch)) == 1) GMT->current.proj.pars[14] = 1; - free (item_t2); /* Cannot be freed before */ + free(item_t2); /* Cannot be freed before */ item_t2 = NULL; } else { - if (do_free) free (item_t1); + if (do_free) free(item_t1); return 1; } if (isdigit(item[0])) - sprintf (dest, "EPSG:%s", item); + sprintf(dest, "EPSG:%s", item); else if (strstr(item, "EPSG:") || strstr(item, "epsg:")) - sprintf (dest, "%s", item); + sprintf(dest, "%s", item); else - sprintf (dest, "%s", item_t1); + sprintf(dest, "%s", item_t1); /* For the proj.4 string detect if this projection is supported by GDAL. If not will append a +wktext later */ if (!strncmp(item, "+proj=", 6) && GDAL_VERSION_NUM < 2050000) { /* Almost for sure GDAL 2.5 doesn't need this */ @@ -18406,15 +18403,15 @@ GMT_LOCAL int gmtinit_parse_proj4 (struct GMT_CTRL *GMT, char *item, char *dest) } } - if (do_free) free (item_t1); /* When we got a glued +proj=... and had to insert spaces */ + if (do_free) free(item_t1); /* When we got a glued +proj=... and had to insert spaces */ - if ((pch = strchr(dest, '/')) != NULL || (pch = strstr(dest, "+width=")) != NULL || (pch = strstr(dest, "+scale=")) != NULL) + if ((pch = strstr(dest, "+width=")) != NULL || (pch = strstr(dest, "+scale=")) != NULL || (pch = strchr(dest, '/')) != NULL) /* If we have a scale, drop it before passing the string to GDAL */ pch[0] = '\0'; if (wktext[0]) strcat(dest, wktext); /* Append a +wktext to make this projection recognized by GDAL */ - if (item_t2) free (item_t2); + if (item_t2) free(item_t2); return error; } diff --git a/src/gmt_map.c b/src/gmt_map.c index 1cea55dadf0..9f39912f227 100644 --- a/src/gmt_map.c +++ b/src/gmt_map.c @@ -8047,9 +8047,9 @@ uint64_t gmt_geo_to_xy_line (struct GMT_CTRL *GMT, double *lon, double *lat, uin /* last_inside = true; */ } for (j = 1; j < n; j++) { - gmt_geo_to_xy (GMT, lon[j], lat[j], &this_x, &this_y); - this_inside = !gmt_map_outside (GMT, lon[j], lat[j]); - if (gmt_M_is_dnan (lon[j]) || gmt_M_is_dnan (lat[j])) continue; /* Skip NaN point now */ + gmt_geo_to_xy (GMT, lon[j], lat[j], &this_x, &this_y); /* This guy also checks if lon,lat are NaNs */ + this_inside = !gmt_map_outside (GMT, lon[j], lat[j]); /* This also calls gmt_geo_to_xy */ + if (gmt_M_is_dnan (lon[j]) || gmt_M_is_dnan (lat[j])) continue; /* Skip NaN point now. WHY NOT MOVE THIS LINE 2 LINES ABOVE? JL. */ if (gmt_M_is_dnan (lon[j-1]) || gmt_M_is_dnan (lat[j-1])) { /* Point after NaN needs a move */ GMT->current.plot.x[np] = this_x; GMT->current.plot.y[np] = this_y; GMT->current.plot.pen[np++] = PSL_MOVE; diff --git a/src/pscoast.c b/src/pscoast.c index bb865569196..c95b1e6706f 100644 --- a/src/pscoast.c +++ b/src/pscoast.c @@ -731,10 +731,46 @@ GMT_LOCAL int pscoast_check_antipode_status (struct GMT_CTRL *GMT, struct GMT_SH return (GMT_NOERROR); } -#define bailout(code) {gmt_M_free_options (mode); return (code);} -#define Return(code) {Free_Ctrl (GMT, Ctrl); gmt_end_module (GMT, GMT_cpy); bailout (code);} +/* + * Checks if the given GMT_CTRL structure's J.proj4string contains false eastings/northings. + * If found, strip them and re-initializes the coordinate transformations. + * See issue: https://github.com/GenericMappingTools/gmt/issues/8536 + * + * Return true if false eastings/northings are found and coordinate transformations are re-initialized, + * false otherwise + */ +GMT_LOCAL bool pscoast_proj4_no_x0y0(struct GMT_CTRL *GMT) { + unsigned int pos = 0; + size_t k; + char *pch1 = NULL, *pch2 = NULL, token[GMT_LEN64] = {""}; + char *pStr = strdup(GMT->common.J.proj4string); + if ((pch1 = strstr(pStr, "+x_0=")) != NULL) { + gmt_strtok (pch1, " \t+", &pos, token); + if ((pch2 = strstr(pStr, token)) != NULL) { + for (k = 0; k < strlen(token); k++) pch2[k] = ' '; + } + } + if ((pch1 = strstr(pStr, "+y_0=")) != NULL) { + pos = 0; gmt_strtok (pch1, " \t+", &pos, token); + if ((pch2 = strstr(pStr, token)) != NULL) { + for (k = 0; k < strlen(token); k++) pch2[k] = ' '; + } + } + /* If we have found false eastings/northings, we need to re-initialize the coordinate transformations */ + if (pos > 0) { + if (GMT->current.gdal_read_in.hCT_fwd) OCTDestroyCoordinateTransformation(GMT->current.gdal_read_in.hCT_fwd); + if (GMT->current.gdal_read_in.hCT_inv) OCTDestroyCoordinateTransformation(GMT->current.gdal_read_in.hCT_inv); + GMT->current.gdal_read_in.hCT_fwd = gmt_OGRCoordinateTransformation(GMT, "+proj=latlong +datum=WGS84", pStr); + GMT->current.gdal_read_in.hCT_inv = gmt_OGRCoordinateTransformation(GMT, pStr, "+proj=latlong +datum=WGS84"); + return true; + } + return false; +} -EXTERN_MSC int GMT_pscoast (void *V_API, int mode, void *args) { +#define bailout(code) {gmt_M_free_options(mode); return (code);} +#define Return(code) {Free_Ctrl(GMT, Ctrl); gmt_end_module(GMT, GMT_cpy); bailout(code);} + +EXTERN_MSC int GMT_pscoast(void *V_API, int mode, void *args) { /* High-level function that implements the pscoast task */ int i, np, ind, bin = 0, base, anti_bin = -1, np_new, k, last_k, err, bin_trouble, error, n; @@ -743,7 +779,7 @@ EXTERN_MSC int GMT_pscoast (void *V_API, int mode, void *args) { bool shift = false, need_coast_base, recursive, greenwich = false, possibly_donut_hell = false; bool clobber_background = false, paint_polygons = false, donut, double_recursive = false; bool donut_hell = false, world_map_save, clipping; - bool clip_to_extend_lines = false; + bool clip_to_extend_lines = false, reset_CT_transformers = false; double bin_x[5], bin_y[5], out[2], *xtmp = NULL, *ytmp = NULL; double west_border = 0.0, east_border = 0.0, anti_lon = 0.0, anti_lat = -90.0, edge = 720.0; @@ -785,6 +821,10 @@ EXTERN_MSC int GMT_pscoast (void *V_API, int mode, void *args) { /* Check and interpret the command line arguments */ + if (!Ctrl->M.active && !Ctrl->Q.active && GMT->current.proj.is_proj4 && GMT->common.J.proj4string) + reset_CT_transformers = pscoast_proj4_no_x0y0(GMT); /* x_0, y_0 in proj4 string, screw the map coords */ + + gmt_init_fill (GMT, &no_fill, -1.0, -1.0, -1.0); if (GMT->current.setting.run_mode == GMT_MODERN && !Ctrl->D.active) Ctrl->D.set = 'a'; /* Auto-select resolution under modern mode if -D not given */ @@ -1324,6 +1364,16 @@ EXTERN_MSC int GMT_pscoast (void *V_API, int mode, void *args) { gmt_br_cleanup (GMT, &b); } + /* If we had temporaryly changed the proj4 coordinate transformes, must undo that change */ + if (reset_CT_transformers) { + OCTDestroyCoordinateTransformation(GMT->current.gdal_read_in.hCT_fwd); + OCTDestroyCoordinateTransformation(GMT->current.gdal_read_in.hCT_inv); + GMT->current.gdal_read_in.hCT_fwd = + gmt_OGRCoordinateTransformation(GMT, "+proj=latlong +datum=WGS84", GMT->common.J.proj4string); + GMT->current.gdal_read_in.hCT_inv = + gmt_OGRCoordinateTransformation(GMT, GMT->common.J.proj4string, "+proj=latlong +datum=WGS84"); + } + if (!Ctrl->M.active) { /* Wrap of the plotting codes */ if (clip_to_extend_lines) gmt_map_clip_off (GMT); if (GMT->current.map.frame.init) { diff --git a/test/pscoast/proj4_nox0y0.sh b/test/pscoast/proj4_nox0y0.sh new file mode 100644 index 00000000000..202680712fa --- /dev/null +++ b/test/pscoast/proj4_nox0y0.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Plot Europe on ESA liked Lamber Equal Area EPSG 3035 +# Test that the inmplicit false Eastings and Northings do not screw the plot. +ps=proj4_nox0y0.ps + +gmt pscoast -R-23.8/24/72/59+r -J3035 -A1000/0/2 -Dc -W0.5 -Ba -P > $ps From 26851cd06ce63563c3f06bca52b7261bb9075d75 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 6 Jul 2024 23:34:32 +0800 Subject: [PATCH 096/105] Update baseline image for test/pscoast/proj4_nox0y0.sh --- test/baseline/pscoast.dvc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/baseline/pscoast.dvc b/test/baseline/pscoast.dvc index 113d55b27c3..8b13b2dd895 100644 --- a/test/baseline/pscoast.dvc +++ b/test/baseline/pscoast.dvc @@ -3,3 +3,4 @@ outs: nfiles: 27 path: pscoast hash: md5 + size: 8711715 From 742d78c793da87066fd78b2a1d72edfc5189ff5e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 7 Jul 2024 08:44:14 +0800 Subject: [PATCH 097/105] Fix the permission of proj4_nox0y0.sh --- test/pscoast/proj4_nox0y0.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/pscoast/proj4_nox0y0.sh diff --git a/test/pscoast/proj4_nox0y0.sh b/test/pscoast/proj4_nox0y0.sh old mode 100644 new mode 100755 From ff10eac4f78dd08b3adce4ac7f3b61430131ec82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:56:23 +0200 Subject: [PATCH 098/105] Example 32: Improve explanation of argument passed to "I" of "grdview" (#8539) --- doc/examples/ex32/ex32.bat | 5 +++-- doc/examples/ex32/ex32.sh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/examples/ex32/ex32.bat b/doc/examples/ex32/ex32.bat index 1a36f5db181..8ee9234634a 100644 --- a/doc/examples/ex32/ex32.bat +++ b/doc/examples/ex32/ex32.bat @@ -29,8 +29,9 @@ gmt begin ex32 gmt makecpt -C0/51/153,255/204/0 -T0,127,255 -N REM The next step is the plotting of the image. - REM We use gmt grdview to plot the topography, euflag.nc to give the color, and illum.nc to give - REM the shading. + REM We use gmt grdview to plot the topography, euflag.nc to give the color, and an illumination + REM from the azimuthal directions 0° (north) and 270° (west) with a normalization via a cumulative + REM Laplace distribution for the shading. set Rplot=%Rflag%/-10/790 gmt grdview topo_32.nc -JM13c %Rplot% -C -G@euflag.nc -I+a0/270+ne0.6 -Qc -JZ1c -p157.5/30 diff --git a/doc/examples/ex32/ex32.sh b/doc/examples/ex32/ex32.sh index 61ac70ccb34..66c8bca7453 100755 --- a/doc/examples/ex32/ex32.sh +++ b/doc/examples/ex32/ex32.sh @@ -30,8 +30,9 @@ gmt begin ex32 gmt makecpt -C0/51/153,255/204/0 -T0,127,255 -N # The next step is the plotting of the image. - # We use gmt grdview to plot the topography, euflag.nc to give the color, and illum.nc to give - # the shading. + # We use gmt grdview to plot the topography, euflag.nc to give the color, and an illumination + # from the azimuthal directions 0° (north) and 270° (west) with a normalization via a cumulative + # Laplace distribution for the shading. Rplot=$Rflag/-10/790 gmt grdview topo_32.nc -JM13c $Rplot -C -G@euflag.nc -I+a0/270+ne0.6 -Qc -JZ1c -p157.5/30 From 804d7674b890fe0e83411b1083ddbb2128b49847 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Tue, 9 Jul 2024 10:24:59 +0100 Subject: [PATCH 099/105] Fix crash when asking grdcut to output file with no extension. (#8541) * Fix crash when asking grdcut to output file with no extension. Fix #8537 * Tweak error message. * Rephrase error message. --- src/gmt_gdalwrite.c | 132 +++++++++++++++++++++++--------------------- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/src/gmt_gdalwrite.c b/src/gmt_gdalwrite.c index a402b0356f5..3d8e8763a76 100644 --- a/src/gmt_gdalwrite.c +++ b/src/gmt_gdalwrite.c @@ -47,7 +47,7 @@ static char *gdal_drv[N_GDAL_EXTENSIONS] = {"GTiff", "GIF", "PNG", "JPEG", "BMP" *----------------------------------------------------------| */ -int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { +int gmt_export_image(struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { /* Take the image stored in the I structure and write to file by calling gmt_gdalwrite() The image format is inferred from the image name (in *fname) file extension, or optionally by appending = to the file name, where is a @@ -67,7 +67,7 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { } */ - if ((to_GDALW = gmt_M_memory (GMT, NULL, 1, struct GMT_GDALWRITE_CTRL)) == NULL) return GMT_NOTSET; + if ((to_GDALW = gmt_M_memory(GMT, NULL, 1, struct GMT_GDALWRITE_CTRL)) == NULL) return GMT_NOTSET; if (I->header->ProjRefWKT != NULL) { to_GDALW->P.ProjRefWKT = I->header->ProjRefWKT; to_GDALW->P.active = true; @@ -102,14 +102,18 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { to_GDALW->ULy = I->header->n_rows; } - ext = gmt_get_ext (fname); + ext = gmt_get_ext(fname); + if (ext == NULL) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "MUST provide a file extension for the saving file (-G option). We need it to determine the output format.\n"); + return GMT_NOTSET; + } /* See if the extension if one of the well known image formats */ for (k = 0; to_GDALW->driver == NULL && k < N_GDAL_EXTENSIONS; k++) { if (k == 0 && (!strcasecmp(ext, "tif") || !strcasecmp(ext, "tiff"))) /* Tiffs happen to have a different extension<->driver naming */ to_GDALW->driver = strdup(gdal_drv[k]); else if (!strcasecmp(ext, "jpg")) to_GDALW->driver = strdup("JPEG"); /* Jpegs too */ - else if (!strcasecmp (ext, gdal_drv[k])) + else if (!strcasecmp(ext, gdal_drv[k])) to_GDALW->driver = strdup(gdal_drv[k]); } if (to_GDALW->driver == NULL) { /* None of those; need to give a driver */ @@ -119,18 +123,18 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { if ((c = strstr(fname, "=gd"))) /* Check if we have not a stray =gd in name*/ c[0] = '\0'; /* Yes, remove it too */ } - else if ((c = strchr (fname, '='))) { /* Gave file= so pass that along */ + else if ((c = strchr(fname, '='))) { /* Gave file= so pass that along */ to_GDALW->driver = strdup(&c[1]); c[0] = '\0'; } else { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unsupported image format. Supported formats are:\nBMP,GIF,JPG,PNG & TIF\n"); - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Alternatively, append : for a valid GDAL driver\n"); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "\".%s\" is an unsupported image format. Supported formats are:\n\tBMP,GIF,JPG,PNG & TIF\n", ext); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Alternatively, append : for a valid GDAL driver\n"); return GMT_NOTSET; } } - if (!strncmp (I->header->mem_layout, "TCB", 3)) { + if (!strncmp(I->header->mem_layout, "TCB", 3)) { /* Convert TCB to TRP as well as removing the pad */ to_GDALW->type = strdup("uint8"); if ((data = gmt_M_memory (GMT, NULL, I->header->nm * I->header->n_bands, char)) == NULL) return GMT_NOTSET; @@ -145,27 +149,27 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { } } if (I->alpha) { /* We have a transparency layer */ - if ((to_GDALW->alpha = gmt_M_memory (GMT, NULL, I->header->nm, char)) == NULL) return GMT_NOTSET; + if ((to_GDALW->alpha = gmt_M_memory(GMT, NULL, I->header->nm, char)) == NULL) return GMT_NOTSET; for (k = row = 0; row < I->header->n_rows; row++) for (col = 0; col < I->header->n_columns; col++) to_GDALW->alpha[k++] = I->alpha[(uint64_t)col * I->header->my + row + I->header->pad[GMT_YHI]]; } free_data = true; } - else if (!strncmp (I->header->mem_layout, "TRP", 3) || !strncmp (I->header->mem_layout, "BRP", 3)) { - bool is_padded = gmt_grd_pad_status (GMT, I->header, NULL); /* Do we have a pad */ + else if (!strncmp(I->header->mem_layout, "TRP", 3) || !strncmp(I->header->mem_layout, "BRP", 3)) { + bool is_padded = gmt_grd_pad_status(GMT, I->header, NULL); /* Do we have a pad */ to_GDALW->type = strdup("byte"); if (is_padded) { /* Must remove the pad by */ - if ((data = gmt_M_memory (GMT, NULL, I->header->nm * I->header->n_bands, char)) == NULL) return GMT_NOTSET; + if ((data = gmt_M_memory(GMT, NULL, I->header->nm * I->header->n_bands, char)) == NULL) return GMT_NOTSET; for (row = 0; row < I->header->n_rows; row++) { ijk = (uint64_t)(((row + I->header->pad[GMT_YHI]) * I->header->mx + I->header->pad[GMT_XLO]) * I->header->n_bands); - gmt_M_memcpy (&data[row*I->header->n_columns*I->header->n_bands], &(I->data[ijk]), I->header->n_columns*I->header->n_bands, char); + gmt_M_memcpy(&data[row*I->header->n_columns*I->header->n_bands], &(I->data[ijk]), I->header->n_columns*I->header->n_bands, char); } if (I->alpha) { /* We have a transparency layer */ - if ((to_GDALW->alpha = gmt_M_memory (GMT, NULL, I->header->nm, char)) == NULL) return GMT_NOTSET; + if ((to_GDALW->alpha = gmt_M_memory(GMT, NULL, I->header->nm, char)) == NULL) return GMT_NOTSET; for (row = 0; row < I->header->n_rows; row++) { ijk = (uint64_t)((row + I->header->pad[GMT_YHI]) * I->header->mx + I->header->pad[GMT_XLO]); - gmt_M_memcpy (&to_GDALW->alpha[row*I->header->n_columns], &(I->alpha[ijk]), I->header->n_columns, char); + gmt_M_memcpy(&to_GDALW->alpha[row*I->header->n_columns], &(I->alpha[ijk]), I->header->n_columns, char); } } if (to_GDALW->P.ProjRefPROJ4) { @@ -182,9 +186,9 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { } } else { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "%s memory layout is not supported, for now only: T(op)C(ol)B(and) or TRP & BRP\n", - I->header->mem_layout); - gmt_M_free (GMT, to_GDALW); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "%s memory layout is not supported, for now only: T(op)C(ol)B(and) or TRP & BRP\n", + I->header->mem_layout); + gmt_M_free(GMT, to_GDALW); return GMT_NOTSET; } @@ -199,7 +203,7 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { to_GDALW->C.cpt = (float *)calloc(n_colors*4, sizeof(float)); /* Convert the colormap to floats 0-1, still in column vector format */ for (k = 0; k < 3 * n_colors; k++) - to_GDALW->C.cpt[k] = gmt_M_is255 (I->colormap[k]); + to_GDALW->C.cpt[k] = gmt_M_is255(I->colormap[k]); if (I->n_indexed_colors > 2000) { /* Then we either have a Mx4 or a single alpha color */ float nc = I->n_indexed_colors / 1000.0; @@ -212,27 +216,27 @@ int gmt_export_image (struct GMT_CTRL *GMT, char *fname, struct GMT_IMAGE *I) { } } - HH = gmt_get_H_hidden (I->header); + HH = gmt_get_H_hidden(I->header); if (HH->pocket && (pch = strstr(HH->pocket, "+c")) != NULL) /* If we have a list of +c */ to_GDALW->co_options = strdup(pch); /* This memory is freed in gmt_gdalwrite */ strncpy(to_GDALW->layout, I->header->mem_layout, 4); to_GDALW->data = data; - gmt_gdalwrite (GMT, fname, to_GDALW); - if (free_data) gmt_M_free (GMT, data); + gmt_gdalwrite(GMT, fname, to_GDALW); + if (free_data) gmt_M_free(GMT, data); free (to_GDALW->driver); free (to_GDALW->type); - if (free_data && to_GDALW->alpha) gmt_M_free (GMT, to_GDALW->alpha); + if (free_data && to_GDALW->alpha) gmt_M_free(GMT, to_GDALW->alpha); if (to_GDALW->C.active) free(to_GDALW->C.cpt); - gmt_M_free (GMT, to_GDALW); + gmt_M_free(GMT, to_GDALW); return GMT_NOERROR; } -GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE_CTRL *prhs, GDALRasterBandH hBand, void *data, int n_rows, int n_cols) { +GMT_LOCAL int gmtgdalwrite_write_jp2(struct GMT_CTRL *GMT, struct GMT_GDALWRITE_CTRL *prhs, GDALRasterBandH hBand, void *data, int n_rows, int n_cols) { int error = 0, i, j; float *t = (float *)data; - uint64_t k, n, nm = gmt_M_get_nm (GMT, n_rows, n_cols); + uint64_t k, n, nm = gmt_M_get_nm(GMT, n_rows, n_cols); /* In gmt_gdal_write_grd we made the pointer to point to the beginning of the non-padded zone, so to make it coherent we retrieve pad[XLO]. However, nothing of this is taking into account a -R subregion so all of this (and not only this case) will probably fail for that case. @@ -247,7 +251,7 @@ GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE dataT[k++] = (char)t[n + j]; } error = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, dataT, n_cols, n_rows, GDT_Byte, 0, 0); - gmt_M_free (GMT, dataT); + gmt_M_free(GMT, dataT); } else if (prhs->orig_type == GMT_USHORT) { short int *dataT = gmt_M_memory(GMT, NULL, nm, unsigned short int); @@ -258,7 +262,7 @@ GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE dataT[k++] = (unsigned short int)t[n + j]; } error = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, dataT, n_cols, n_rows, GDT_UInt16, 0, 0); - gmt_M_free (GMT, dataT); + gmt_M_free(GMT, dataT); } else if (prhs->orig_type == GMT_SHORT) { short int *dataT = gmt_M_memory(GMT, NULL, nm, short int); @@ -269,7 +273,7 @@ GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE dataT[k++] = (short int)t[n + j]; } error = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, dataT, n_cols, n_rows, GDT_Int16, 0, 0); - gmt_M_free (GMT, dataT); + gmt_M_free(GMT, dataT); } else if (prhs->orig_type == GMT_UINT) { unsigned int *dataT = gmt_M_memory(GMT, NULL, nm, unsigned int); @@ -280,7 +284,7 @@ GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE dataT[k++] = (unsigned int)t[n + j]; } error = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, dataT, n_cols, n_rows, GDT_UInt32, 0, 0); - gmt_M_free (GMT, dataT); + gmt_M_free(GMT, dataT); } else if (prhs->orig_type == GMT_INT) { int *dataT = gmt_M_memory(GMT, NULL, nm, int); @@ -291,13 +295,13 @@ GMT_LOCAL int gmtgdalwrite_write_jp2 (struct GMT_CTRL *GMT, struct GMT_GDALWRITE dataT[k++] = (int)t[n + j]; } error = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, dataT, n_cols, n_rows, GDT_Int32, 0, 0); - gmt_M_free (GMT, dataT); + gmt_M_free(GMT, dataT); } return error; } -int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL *prhs) { +int gmt_gdalwrite(struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL *prhs) { int bStrict = false; char **papszOptions = NULL, *projWKT = NULL; char *pszFormat = "GTiff"; @@ -334,10 +338,10 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL /* Find out in which data type was given the input array */ /* The two first cases below are messy. Decision should be made by a mem layout code stored in prhs */ if (!strcmp(prhs->type,"byte")) { /* This case arrives here via grdimage */ - uint64_t imsize = gmt_M_get_nm (GMT, n_cols, n_rows); + uint64_t imsize = gmt_M_get_nm(GMT, n_cols, n_rows); typeCLASS = GDT_Byte; n_byteOffset = 1; - if ((outByte = gmt_M_memory (GMT, NULL, imsize, unsigned char)) == NULL) return GMT_NOTSET; + if ((outByte = gmt_M_memory(GMT, NULL, imsize, unsigned char)) == NULL) return GMT_NOTSET; } else if (!strcmp(prhs->type,"uint8")) { typeCLASS = GDT_Byte; @@ -365,7 +369,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL n_byteOffset = 4; } else { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: Unsupported input data class!\n"); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: Unsupported input data class!\n"); return GMT_NOTSET; } @@ -377,7 +381,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL else if (prhs->orig_type == GMT_UINT) typeCLASS_f = GDT_Int32; else if (prhs->orig_type == GMT_INT) typeCLASS_f = GDT_UInt32; else { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: The Jpeg2000 driver does not support floats.\n"); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: The Jpeg2000 driver does not support floats.\n"); gmt_M_free(GMT, outByte); return -1; } @@ -402,22 +406,22 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL dc = nc - rint(nc); } ptr = prhs->C.cpt; - hColorTable = GDALCreateColorTable (GPI_RGB); + hColorTable = GDALCreateColorTable(GPI_RGB); if (prhs->C.n_colors < 2000 || dc > 0) { /* Simple case. Not overloaded meaning */ for (i = 0; i < nColors; i++) { - sEntry.c1 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 0, nColors)); - sEntry.c2 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 1, nColors)); - sEntry.c3 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 2, nColors)); + sEntry.c1 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 0, nColors)); + sEntry.c2 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 1, nColors)); + sEntry.c3 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 2, nColors)); sEntry.c4 = (short)255; GDALSetColorEntry (hColorTable, i, &sEntry); } } else { /* Means the pointer points into a 4 columns array: RGB+alpha */ for (i = 0; i < (int)nc; i++) { - sEntry.c1 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 0, nColors)); - sEntry.c2 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 1, nColors)); - sEntry.c3 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 2, nColors)); - sEntry.c4 = gmt_M_s255 (gmt_M_get_rgba(ptr, i, 3, nColors)); + sEntry.c1 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 0, nColors)); + sEntry.c2 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 1, nColors)); + sEntry.c3 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 2, nColors)); + sEntry.c4 = gmt_M_s255(gmt_M_get_rgba(ptr, i, 3, nColors)); GDALSetColorEntry (hColorTable, i, &sEntry); } } @@ -449,8 +453,8 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL projWKT = pszPrettyWkt; } else { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite failed to convert the proj4 string\n%s\n to WKT\n", - prhs->P.ProjRefPROJ4); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite failed to convert the proj4 string\n%s\n to WKT\n", + prhs->P.ProjRefPROJ4); } OSRDestroySpatialReference(hSRS_2); @@ -464,15 +468,15 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL hDriverOut = GDALGetDriverByName(pszFormat); /* The true output format driver */ if (hDriverOut == NULL) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: Output driver %s not recognized\n", pszFormat); - if (gmt_M_is_verbose (GMT, GMT_MSG_WARNING)) { - GMT_Report (GMT->parent, GMT_MSG_WARNING, "The following format drivers are configured and support output:\n"); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "gmt_gdalwrite: Output driver %s not recognized\n", pszFormat); + if (gmt_M_is_verbose(GMT, GMT_MSG_WARNING)) { + GMT_Report(GMT->parent, GMT_MSG_WARNING, "The following format drivers are configured and support output:\n"); for (i = 0; i < GDALGetDriverCount(); i++) { hDriver = GDALGetDriver(i); if (GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATE, NULL) != NULL || GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATECOPY, NULL) != NULL) - GMT_Report (GMT->parent, GMT_MSG_WARNING, " %s: %s\n", - GDALGetDriverShortName(hDriver), GDALGetDriverLongName(hDriver)); + GMT_Report(GMT->parent, GMT_MSG_WARNING, " %s: %s\n", + GDALGetDriverShortName(hDriver), GDALGetDriverLongName(hDriver)); } } gmtlib_GDALDestroyDriverManager(GMT->parent); @@ -487,7 +491,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL if (hDstDS == NULL) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "GDALOpen failed - %d\n%s\n", CPLGetLastErrorNo(), CPLGetLastErrorMsg()); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "GDALOpen failed - %d\n%s\n", CPLGetLastErrorNo(), CPLGetLastErrorMsg()); gmtlib_GDALDestroyDriverManager(GMT->parent); gmt_M_free(GMT, outByte); return (-1); @@ -497,7 +501,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL if (prhs->co_options) { unsigned int pos = 0; char token[64]; - while (gmt_strtok (prhs->co_options, "+", &pos, token)) { + while (gmt_strtok(prhs->co_options, "+", &pos, token)) { if (token[0] == 'c') papszOptions = CSLAddString(papszOptions, &token[1]); /* Jump the 'c' */ } @@ -546,7 +550,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL hBand = GDALGetRasterBand(hDstDS, i+1); if (i == 0 && hColorTable != NULL) { if (GDALSetRasterColorTable(hBand, hColorTable) == CE_Failure) - GMT_Report (GMT->parent, GMT_MSG_ERROR, "\tERROR creating Color Table"); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "\tERROR creating Color Table"); GDALDestroyColorTable(hColorTable); } switch (typeCLASS) { @@ -556,7 +560,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL if (!strcmp(prhs->type, "byte")) { /* This case arrives here from a separate path. It started in grdimage and an originally data was in uchar but padded and possibly 3D (RGB) */ - uint64_t imsize = gmt_M_get_nm (GMT, n_cols, n_rows); + uint64_t imsize = gmt_M_get_nm(GMT, n_cols, n_rows); tmpByte = (unsigned char *)data; for (nn = 0; nn < imsize; nn++) outByte[nn] = tmpByte[nn*n_bands + i]; @@ -566,7 +570,7 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL } else { /* Here 'data' was converted to uchar in gmt_customio.c/gmt_gdal_write_grd */ - ijk = i * gmt_M_get_nm (GMT, n_cols, n_rows); + ijk = i * gmt_M_get_nm(GMT, n_cols, n_rows); if ((gdal_err = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, &img[ijk], n_cols, n_rows, typeCLASS, 0, 0)) != CE_None) GMT_Report(GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); } @@ -583,18 +587,18 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL if (rint(prhs->nan_value) == prhs->nan_value) /* Only set NoData if nan_value contains an integer value */ GDALSetRasterNoDataValue(hBand, prhs->nan_value); if ((gdal_err = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, data, n_cols, n_rows, typeCLASS, 0, 0)) != CE_None) - GMT_Report (GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); break; case GDT_Float32: GDALSetRasterNoDataValue(hBand, prhs->nan_value); if (!strcasecmp(pszFormat,"JP2OpenJPEG")) { /* JP2 driver doesn't accept floats, so we must make a copy */ - if ((gdal_err = gmtgdalwrite_write_jp2 (GMT, prhs, hBand, data, n_rows, n_cols)) != CE_None) - GMT_Report (GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); + if ((gdal_err = gmtgdalwrite_write_jp2(GMT, prhs, hBand, data, n_rows, n_cols)) != CE_None) + GMT_Report(GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); } else { if ((gdal_err = GDALRasterIO(hBand, GF_Write, 0, 0, n_cols, n_rows, data, n_cols, n_rows, typeCLASS, 0, prhs->nXSizeFull * n_byteOffset)) != CE_None) - GMT_Report (GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "GDALRasterIO failed to write band %d [err = %d]\n", i, gdal_err); } break; } @@ -613,15 +617,15 @@ int gmt_gdalwrite (struct GMT_CTRL *GMT, char *fname, struct GMT_GDALWRITE_CTRL if (!prhs->H.active && gmt_strlcmp(pszFormat,"netCDF")) { /* Change some attributes written by GDAL (not finished) */ int ncid; - error = gmt_nc_open (GMT, fname, NC_WRITE, &ncid); - error += nc_put_att_text (ncid, NC_GLOBAL, "history", strlen(prhs->command), prhs->command); - error += gmt_nc_close (GMT, ncid); + error = gmt_nc_open(GMT, fname, NC_WRITE, &ncid); + error += nc_put_att_text(ncid, NC_GLOBAL, "history", strlen(prhs->command), prhs->command); + error += gmt_nc_close(GMT, ncid); if (error) GMT_Report(GMT->parent,GMT_MSG_ERROR,"Error adding history: %d\n", error); } gmt_M_free(GMT, outByte); if (pszSRS_WKT != NULL) CPLFree(pszSRS_WKT); - if (papszOptions != NULL) CSLDestroy (papszOptions); + if (papszOptions != NULL) CSLDestroy(papszOptions); gmtlib_GDALDestroyDriverManager(GMT->parent); return error; From 157a1eae7d6079def72846f50b24954a50961788 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Wed, 10 Jul 2024 22:28:56 +0100 Subject: [PATCH 100/105] With MinGW builds, make a second try when checking if text is numeric. (#8542) The MinGW cross-compile used by Julia is probably bugged and fails above test to detect if 'text' is a number. Do a second test (probably weaker) to try to save the situation. --- src/gmt_io.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gmt_io.c b/src/gmt_io.c index 8ff4a43b8d8..92077590d53 100644 --- a/src/gmt_io.c +++ b/src/gmt_io.c @@ -9433,8 +9433,16 @@ bool gmt_is_float (struct GMT_CTRL *GMT, char *text) { if (sscanf (text, "%lf %n", &dummy, &len) == 1 && len == (int)strlen(text)) return true; - else + else { +#if defined(__MINGW32__) + /* The MinGW cross-compile used by Julia is probably bugged and fails above test to detect if 'text' is a number. + Use this test (probably weaker) to try to save the situation. + */ + if (strspn(text, ".0123456789eE") == strlen(text)) + return true; +#endif return false; + } } /*! . */ From 708d76b92bf152564cfc98c11b5547aef13ab169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 12 Jul 2024 02:27:51 +0200 Subject: [PATCH 101/105] coup / meca: Fix typo in docs for offset (-D or -A) (#8543) * Remove square bracket * Remove square bracket --- doc/rst/source/supplements/seis/coupe.rst | 2 +- doc/rst/source/supplements/seis/meca.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rst/source/supplements/seis/coupe.rst b/doc/rst/source/supplements/seis/coupe.rst index 00205c9c8fd..188726ba129 100644 --- a/doc/rst/source/supplements/seis/coupe.rst +++ b/doc/rst/source/supplements/seis/coupe.rst @@ -139,7 +139,7 @@ Optional Arguments .. _-D: -**-D**\ [**+c**][**+g**\ [*fill*]][**+o**\ *dx*\ [/*dy*]][**+p**\ *pen*][**+s**\ [*symbol*]\ *size*] ] +**-D**\ [**+c**][**+g**\ [*fill*]][**+o**\ *dx*\ [/*dy*]][**+p**\ *pen*][**+s**\ [*symbol*]\ *size*] Offsets projected focal mechanisms to the alternate distance, depth given in the last two columns of the input file before the (optional) text string. Instead, if alternate geographical coordinates are given in the two columns then use **+c** to first diff --git a/doc/rst/source/supplements/seis/meca.rst b/doc/rst/source/supplements/seis/meca.rst index e27db91ba40..460dd1d3415 100644 --- a/doc/rst/source/supplements/seis/meca.rst +++ b/doc/rst/source/supplements/seis/meca.rst @@ -76,7 +76,7 @@ Optional Arguments .. _-A: -**-A**\ [**+g**\ [*fill*]][**+o**\ *dx*\ [/*dy*]][**+p**\ *pen*][**+s**\ [*symbol*]\ *size*] ] +**-A**\ [**+g**\ [*fill*]][**+o**\ *dx*\ [/*dy*]][**+p**\ *pen*][**+s**\ [*symbol*]\ *size*] Offsets focal mechanisms to the alternate longitudes, latitudes given in the last two columns of the input file before the (optional) text string. Alternatively, use **+o** to interpret the contents of the two From ad28c59b9a5075336c50811d901fc329e044ad64 Mon Sep 17 00:00:00 2001 From: Remko Scharroo Date: Wed, 17 Jul 2024 16:16:18 +0200 Subject: [PATCH 102/105] Update grdimage.c Removed line that became obsolete with 2251504 --- src/grdimage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/grdimage.c b/src/grdimage.c index 8054f03ad00..21cfecaa740 100644 --- a/src/grdimage.c +++ b/src/grdimage.c @@ -1093,7 +1093,6 @@ GMT_LOCAL bool grdimage_transparencies (struct GMT_CTRL *GMT, struct GMT_IMAGE * */ struct GMT_GRID_HEADER *H = I->header; /* Pointer to the active image header */ - unsigned char *transparency; /* Pointer to memory where transparency resides */ int64_t row, col, node; unsigned int k, tr, tr_max = 0; /* tr_band is 0 if image has alpha channel, else 1 for gray and 3 for color */ unsigned int n_bands = H->n_bands; From 6e3d0bb7713623426f29b48cc8ff5fb1ae2f90e8 Mon Sep 17 00:00:00 2001 From: Remko Scharroo Date: Wed, 17 Jul 2024 16:21:00 +0200 Subject: [PATCH 103/105] Fix proj4string check in pscoast.c (#8545) `if (GMT->common.J.proj4string)` should be replaced by `if (GMT->common.J.proj4string[0])` because the former always evaluates to `true`, the second only when not an empty string. --- src/pscoast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pscoast.c b/src/pscoast.c index c95b1e6706f..1ea77df1bb8 100644 --- a/src/pscoast.c +++ b/src/pscoast.c @@ -821,7 +821,7 @@ EXTERN_MSC int GMT_pscoast(void *V_API, int mode, void *args) { /* Check and interpret the command line arguments */ - if (!Ctrl->M.active && !Ctrl->Q.active && GMT->current.proj.is_proj4 && GMT->common.J.proj4string) + if (!Ctrl->M.active && !Ctrl->Q.active && GMT->current.proj.is_proj4 && GMT->common.J.proj4string[0]) reset_CT_transformers = pscoast_proj4_no_x0y0(GMT); /* x_0, y_0 in proj4 string, screw the map coords */ From 3e9fcb1f54e4e93fc1e309e0be6e2288eb79f3d2 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 19 Jul 2024 11:16:33 +0800 Subject: [PATCH 104/105] gmt_common_sighandler.c: fix ucontext for Apple (#8547) --- src/gmt_common_sighandler.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gmt_common_sighandler.c b/src/gmt_common_sighandler.c index b6eaf7c9524..f21d0ae58f8 100644 --- a/src/gmt_common_sighandler.c +++ b/src/gmt_common_sighandler.c @@ -80,13 +80,19 @@ GMT_LOCAL void backtrace_symbols_fd(void *const *buffer, int size, int fd) { # if __DARWIN_UNIX03 # ifdef __x86_64__ # define UC_IP(uc) ((void *) (uc)->uc_mcontext->__ss.__rip) -# elif __arm64__ /* Apple Silicon, e.g. M1 */ +# elif defined(__arm64__) /* Apple Silicon, e.g. M1 */ # define UC_IP(uc) ((void *) (uc)->uc_mcontext->__ss.__pc) +# elif defined(__POWERPC__) /* Both ppc and ppc64 */ +# define UC_IP(uc) ((void *) (uc)->uc_mcontext->__ss.__srr0) # else # define UC_IP(uc) ((void *) (uc)->uc_mcontext->__ss.__eip) # endif # else -# define UC_IP(uc) ((void *) (uc)->uc_mcontext->ss.eip) +# ifdef __ppc__ +# define UC_IP(uc) ((void *) (uc)->uc_mcontext->ss.srr0) +# else +# define UC_IP(uc) ((void *) (uc)->uc_mcontext->ss.eip) +# endif # endif #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # ifdef __x86_64__ From 3c45afb9f1bc4315769788476c65f78115e128ca Mon Sep 17 00:00:00 2001 From: Joaquim Date: Fri, 19 Jul 2024 16:43:56 +0100 Subject: [PATCH 105/105] Let pscoast -E accept reading other DCW type files made by users. (#8546) In GMT.jl I added a function that reads an OGR file containing country borders and attributes describing each country polygon with 2 or 3 chars ISO codes and create a file with the same structure as the dcw-gmt.nc file. That file can then be read by pscoast via -E like the official DCW file. In order to do it the +f modifier was added. Besides that, this PR adds also the _continent_ **WD** to mean the entire world. --- doc/rst/source/coast.rst | 12 +- src/gmt_dcw.c | 425 ++++++++++++++++++++++----------------- src/gmt_dcw.h | 15 +- src/gmt_init.c | 2 +- src/gmt_private.h | 12 +- src/gmt_shore.c | 4 +- src/gmt_support.c | 4 +- 7 files changed, 265 insertions(+), 209 deletions(-) diff --git a/doc/rst/source/coast.rst b/doc/rst/source/coast.rst index b02a2783ca9..184c2545d32 100644 --- a/doc/rst/source/coast.rst +++ b/doc/rst/source/coast.rst @@ -111,7 +111,7 @@ Optional Arguments .. _-E: -**-E**\ *code1,code2,...*\ [**+l**\|\ **L**\|\ **n**][**+c**\|\ **C**][**+e**][**+g**\ *fill*][**+p**\ *pen*][**+r**][**+R**][**+z**] +**-E**\ *code1,code2,...*\ [**+f**\ *file*][**+l**\|\ **L**\|\ **n**][**+c**\|\ **C**][**+e**][**+g**\ *fill*][**+p**\ *pen*][**+r**][**+R**][**+z**] Select painting, clipping or dumping country polygons from the Digital Chart of the World (DCW). This is another dataset independent of GSHHG and hence the |-A| and |-D| options do not apply. The following codes are supported: @@ -121,15 +121,19 @@ Optional Arguments (e.g., NO for Norway) or the full country name (e.g., Norway). Append .\ *state* to a country code to select a state of a country (if available), e.g., US.TX for Texas. - Append =\ *continent* to specify a continent, using the abbreviations AF (Africa), - AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania), NA (North America), or SA (South America). + AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania), NA (North America), SA (South America) or WD (World). - To specify a :ref:`DCW collection ` or named region, give either the code or the full name. The following modifiers are supported: + - **+f**\ *file* to indicate that we want to use another netCDF file than the default DCW file. *file*, without extension, + can be either just the absolute file name, case in which the `file.nc` is expected to be found in the + shared folder that also contains the `dcw-gmt.nc` file, or the full file name, case in which the `file` + can be located anywhere. - **+l** to just list the countries and their codes (no data extraction or plotting takes place). - **+L** to see states/territories for Argentina, Australia, Brazil, Canada, China, India, Norway, Russia and the US. - - **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list countries or states in that continent or country, respectively; - repeat if more than one continent or country is requested. + - **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list countries or states in that continent + or country, respectively; repeat if more than one continent or country is requested. - **+n** to list the named :ref:`DCW collections ` or regions (**-E**\ *code*\ **+n** will list collections that contains the listed codes). All names are case-insensitive. - **+c** to set up an inside clip path based on your selection. diff --git a/src/gmt_dcw.c b/src/gmt_dcw.c index 9faaa41af88..477c2847357 100644 --- a/src/gmt_dcw.c +++ b/src/gmt_dcw.c @@ -38,11 +38,10 @@ * in one of the dirs accessible to GMT or pointed to by the default DIR_DCW. * We also look for dcw-collections.txt for named groups of items (2.0.2 or later) * in the DCW directory and in the users .gmt directory. - * See separate subversion project DCW for the maintenance of the raw files that - * are used to build the netCDF file [svn://gmtserver.soest.hawai.edu/DCW]. + * See separate Github project DCW for the maintenance of the raw files that + * are used to build the netCDF file [https://github.com/GenericMappingTools/dcw-gmt]. */ -#define DCW_SITE "ftp://ftp.soest.hawaii.edu/gmt" #define GMT_DCW_N_CONTINENTS 8 #define DCW_GET_COUNTRY 1 /* Extract countries only */ @@ -426,7 +425,7 @@ GMT_LOCAL int gmtdcw_found_collection (char *code, struct GMT_DCW_COLLECTION *GM #define GMT_DCW_PLOTTING 1 #define GMT_DCW_CLIPPING 2 -int gmt_DCW_version (struct GMTAPI_CTRL *API, char *version) { +int gmt_DCW_version(struct GMTAPI_CTRL *API, char *version) { /* Write DCW version into version which must have at least 8 positions */ int cdfid, err; char path[PATH_MAX] = {""}; @@ -435,20 +434,20 @@ int gmt_DCW_version (struct GMTAPI_CTRL *API, char *version) { if (version == NULL) return (GMT_PTR_IS_NULL); - if (!gmtdcw_get_path (GMT, "dcw-gmt", ".nc", path)) + if (!gmtdcw_get_path(GMT, "dcw-gmt", ".nc", path)) return (GMT_FILE_NOT_FOUND); - gmt_M_err_trap (gmt_nc_open (GMT, path, NC_NOWRITE, &cdfid)); + gmt_M_err_trap(gmt_nc_open(GMT, path, NC_NOWRITE, &cdfid)); /* Get global attributes */ - gmt_M_memset (version, strlen (version), char); - gmt_M_err_trap (nc_get_att_text (cdfid, NC_GLOBAL, "version", version)); - gmt_nc_close (GMT, cdfid); + gmt_M_memset(version, strlen(version), char); + gmt_M_err_trap(nc_get_att_text(cdfid, NC_GLOBAL, "version", version)); + gmt_nc_close(GMT, cdfid); return (GMT_NOERROR); } -struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F, double wesn[], unsigned int mode) { +struct GMT_DATASET *gmt_DCW_operation(struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F, double wesn[], unsigned int mode) { /* Given comma-separated names, read the corresponding netCDF variables. * mode = GMT_DCW_REGION : Return the joint w/e/s/n limits * mode = GMT_DCW_PLOT : Plot the polygons [This is actually same as GMT_DCW_EXTRACT internally but plots instead of returning] @@ -463,9 +462,10 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL unsigned short int *dx = NULL, *dy = NULL; unsigned int GMT_DCW_COUNTRIES = 0, GMT_DCW_STATES = 0, n_bodies[5] = {0, 0, 0, 0, 0}, special = 0; bool done, want_state, outline, fill = false, is_Antarctica = false, hole, new_CN_codes = false; + bool dtype_is_float = false, ALL = false; char TAG[GMT_LEN16] = {""}, dim[GMT_LEN16] = {""}, xname[GMT_LEN16] = {""}; - char yname[GMT_LEN16] = {""}, code[GMT_LEN16] = {""}, state[GMT_LEN16] = {""}; - char msg[GMT_BUFSIZ] = {""}, path[PATH_MAX] = {""}, list[GMT_BUFSIZ] = {""}; + char yname[GMT_LEN16] = {""}, code[GMT_LEN16] = {""}, state[GMT_LEN16] = {""}, datatype[GMT_LEN8] = {""}; + char msg[GMT_BUFSIZ] = {""}, path[PATH_MAX] = {""}, list[GMT_BUFSIZ] = {""}, dcw_name[GMT_LEN256] = {""}; char version[GMT_LEN32] = {""}, gmtversion[GMT_LEN32] = {""}, source[GMT_LEN256] = {""}, title[GMT_LEN256] = {""}; char label[GMT_LEN256] = {""}, header[GMT_LEN256] = {""}, ISO[GMT_LEN8] = {""}; double west, east, south, north, xscl, yscl, out[2], *lon = NULL, *lat = NULL; @@ -489,14 +489,14 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL if (mode & GMT_DCW_REGION) { /* Wish to determine region from polygons */ if (wesn == NULL) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Implementation error: Must pass wesn array if mode == %d\n", GMT_DCW_REGION); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Implementation error: Must pass wesn array if mode == %d\n", GMT_DCW_REGION); return NULL; } wesn[XLO] = wesn[XHI] = 0.0; /* Set to zero so it can grow below */ wesn[YLO] = +9999.0; wesn[YHI] = -9999.0; /* Initialize so we can shrink it below */ } - if (gmtdcw_load_lists (GMT, &GMT_DCW_country, &GMT_DCW_state, NULL, &GMT_DCW_collection, n_bodies)) /* Something went wrong */ + if (gmtdcw_load_lists(GMT, &GMT_DCW_country, &GMT_DCW_state, NULL, &GMT_DCW_collection, n_bodies)) /* Something went wrong */ return NULL; GMT_DCW_COUNTRIES = n_bodies[0]; @@ -504,72 +504,73 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL qsort ((void *)GMT_DCW_country, (size_t)GMT_DCW_COUNTRIES, sizeof (struct GMT_DCW_COUNTRY), gmtdcw_comp_countries); /* Sort on country code */ - if ((order = gmt_M_memory (GMT, NULL, n_alloc, unsigned int)) == NULL) return NULL; + if ((order = gmt_M_memory(GMT, NULL, n_alloc, unsigned int)) == NULL) return NULL; + ALL = (strcmp(F->item[0]->codes, "=WD") == 0); /* Get the whole world? */ for (j = 0; j < F->n_items; j++) { pos = 0; - while (gmt_strtok (F->item[j]->codes, ",", &pos, code)) { /* Loop over items */ + while (gmt_strtok(F->item[j]->codes, ",", &pos, code)) { /* Loop over items */ if (code[0] == '=') { /* Must expand a continent into all member countries */ for (k = 0; k < GMT_DCW_COUNTRIES; k++) { - if (strncmp (GMT_DCW_country[k].continent, &code[1], 2)) continue; /* Not this one */ - if (n_items) strcat (list, ","); - strcat (list, GMT_DCW_country[k].code); + if (!ALL && strncmp(GMT_DCW_country[k].continent, &code[1], 2)) continue; /* Not this one */ + if (n_items) strcat(list, ","); + strcat(list, GMT_DCW_country[k].code); order[n_items] = j; /* So we know which color/pen to apply for this item */ n_items++; if (n_items == n_alloc) { n_alloc += GMT_LEN128; - if ((order = gmt_M_memory (GMT, order, n_alloc, unsigned int)) == NULL) return NULL; + if ((order = gmt_M_memory(GMT, order, n_alloc, unsigned int)) == NULL) return NULL; } } if (n_items) - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Continent code expanded from %s to %s [%d countries]\n", F->item[j]->codes, list, n_items); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Continent code expanded from %s to %s [%d countries]\n", F->item[j]->codes, list, n_items); else - GMT_Report (GMT->parent, GMT_MSG_WARNING, "Continent code %s unrecognized\n", code); + GMT_Report(GMT->parent, GMT_MSG_WARNING, "Continent code %s unrecognized\n", code); } - else if ((ks = gmtdcw_found_collection (code, GMT_DCW_collection, n_bodies)) != GMT_NOTSET) { + else if ((ks = gmtdcw_found_collection(code, GMT_DCW_collection, n_bodies)) != GMT_NOTSET) { if (GMT_DCW_collection[ks].type == DCW_NAMED_LIST) { /* Got a collection we wish to add */ - unsigned n_list = gmt_count_char (GMT, GMT_DCW_collection[ks].list, ',') + 1; /* Number of items in collection */ - if (n_items) strcat (list, ","); + unsigned n_list = gmt_count_char(GMT, GMT_DCW_collection[ks].list, ',') + 1; /* Number of items in collection */ + if (n_items) strcat(list, ","); strcat (list, GMT_DCW_collection[ks].list); for (k = 0; k < n_list; k++) { order[n_items++] = j; /* So we know which color/pen to apply for all items in this collection */ if (n_items == n_alloc) { n_alloc += GMT_LEN128; - if ((order = gmt_M_memory (GMT, order, n_alloc, unsigned int)) == NULL) return NULL; + if ((order = gmt_M_memory(GMT, order, n_alloc, unsigned int)) == NULL) return NULL; } } - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Collection code expanded from %s to %s [%d countries]\n", F->item[j]->codes, GMT_DCW_collection[ks].list, n_list); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Collection code expanded from %s to %s [%d countries]\n", F->item[j]->codes, GMT_DCW_collection[ks].list, n_list); } else /* Named regions do not correspond to any data code so skipped here */ named_wesn++; } else { /* Just append this single one */ - if (gmtdcw_got_name (code, GMT_DCW_country, GMT_DCW_COUNTRIES, GMT_DCW_state, GMT_DCW_STATES, ISO)) /* Check if we got the name of a country or state, then replace with ISO code */ - strcpy (code, ISO); - if (n_items) strcat (list, ","); - strcat (list, code); + if (gmtdcw_got_name(code, GMT_DCW_country, GMT_DCW_COUNTRIES, GMT_DCW_state, GMT_DCW_STATES, ISO)) /* Check if we got the name of a country or state, then replace with ISO code */ + strcpy(code, ISO); + if (n_items) strcat(list, ","); + strcat(list, code); order[n_items] = j; /* So we know which color/pen to apply for this item */ n_items++; if (n_items == n_alloc) { n_alloc += GMT_LEN128; - if ((order = gmt_M_memory (GMT, order, n_alloc, unsigned int)) == NULL) return NULL; + if ((order = gmt_M_memory(GMT, order, n_alloc, unsigned int)) == NULL) return NULL; } } } } if (n_items || named_wesn) { - GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Requested %d DCW items: %s\n", n_items, list); - order = gmt_M_memory (GMT, order, n_items, unsigned int); + GMT_Report(GMT->parent, GMT_MSG_DEBUG, "Requested %d DCW items: %s\n", n_items, list); + order = gmt_M_memory(GMT, order, n_items, unsigned int); } else { - GMT_Report (GMT->parent, GMT_MSG_DEBUG, "No countries selected\n"); - gmt_M_free (GMT, order); - gmt_M_free (GMT, GMT_DCW_country); - gmt_M_free (GMT, GMT_DCW_state); - gmtdcw_freestrings (GMT_DCW_collection, dim[3]+dim[4]); - gmt_M_free (GMT, GMT_DCW_collection); + GMT_Report(GMT->parent, GMT_MSG_DEBUG, "No countries selected\n"); + gmt_M_free(GMT, order); + gmt_M_free(GMT, GMT_DCW_country); + gmt_M_free(GMT, GMT_DCW_state); + gmtdcw_freestrings(GMT_DCW_collection, dim[3]+dim[4]); + gmt_M_free(GMT, GMT_DCW_collection); return NULL; } @@ -592,96 +593,107 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL special = GMT_DCW_CLIPPING; } - if (!gmtdcw_get_path (GMT, "dcw-gmt", ".nc", path)) { - gmt_M_free (GMT, order); + (F->other_dcw_file) ? strcpy(dcw_name, F->other_dcw_file) : strcpy(dcw_name, "dcw-gmt"); + + if (strchr(dcw_name, '\\') || strchr(dcw_name, '/')) { /* Got a fname+path */ + gmt_dos_path_fix(dcw_name); + strcpy(path, dcw_name); + strcat(path, ".nc"); + } + else if (!gmtdcw_get_path(GMT, dcw_name, ".nc", path)) { + gmt_M_free(GMT, order); return NULL; } if (mode > GMT_DCW_REGION) { /* Wish to get actual polygons */ - P = GMT_Alloc_Segment (GMT->parent, GMT_NO_STRINGS, 0, 2, NULL, NULL); - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Extract polygons from DCW - The Digital Chart of the World\n"); + P = GMT_Alloc_Segment(GMT->parent, GMT_NO_STRINGS, 0, 2, NULL, NULL); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Extract polygons from DCW - The Digital Chart of the World\n"); } if (mode & GMT_DCW_EXTRACT) { /* Plan to return a dataset */ uint64_t dim[4] = {n_items, 0, 0, 2}; /* n_items tables whose records (to be allocated) will have 2 columns */ - if ((D = GMT_Create_Data (GMT->parent, GMT_IS_DATASET, GMT_IS_POLY, 0, dim, NULL, NULL, 0, 0, NULL)) == NULL) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unable to create empty dataset for DCW polygons\n"); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if ((D = GMT_Create_Data(GMT->parent, GMT_IS_DATASET, GMT_IS_POLY, 0, dim, NULL, NULL, 0, 0, NULL)) == NULL) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Unable to create empty dataset for DCW polygons\n"); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } } - if ((retval = gmt_nc_open (GMT, path, NC_NOWRITE, &ncid))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Cannot open file %s!\n", path); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if ((retval = gmt_nc_open(GMT, path, NC_NOWRITE, &ncid))) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Cannot open file %s!\n", path); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } /* Get global attributes */ - if ((retval = nc_get_att_text (ncid, NC_GLOBAL, "version", version))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute version\n"); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if ((retval = nc_get_att_text(ncid, NC_GLOBAL, "version", version))) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute version\n"); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } if (version[0] != '1') new_CN_codes = true; /* DCW 2.0.0 or later has new Chinese province codes */ - if ((retval = nc_get_att_text (ncid, NC_GLOBAL, "title", title))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute title\n"); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if ((retval = nc_get_att_text(ncid, NC_GLOBAL, "title", title))) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute title\n"); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } - if ((retval = nc_get_att_text (ncid, NC_GLOBAL, "source", source))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute source\n"); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if ((retval = nc_get_att_text(ncid, NC_GLOBAL, "source", source))) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Cannot obtain DCW attribute source\n"); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } - if ((retval = nc_get_att_text (ncid, NC_GLOBAL, "gmtversion", gmtversion)) == NC_NOERR) - GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Found gmtversion string in DCW file: %s\n", gmtversion); - - if (gmt_M_is_verbose (GMT, GMT_MSG_INFORMATION)) { - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Using country and state data from dcw-gmt\n"); - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Title : %s\n", title); - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Source : %s\n", source); - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Version: %s\n", version); - if (gmtversion[0]) GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "DCW version %s requires GMT version %s or later.\n", version, gmtversion); + if ((retval = nc_get_att_text(ncid, NC_GLOBAL, "gmtversion", gmtversion)) == NC_NOERR) + GMT_Report(GMT->parent, GMT_MSG_DEBUG, "Found gmtversion string in DCW file: %s\n", gmtversion); + + /* See if the nc file has a float data type. If "datatype" var does not exist, default to uint16 */ + if ((retval = nc_get_att_text(ncid, NC_GLOBAL, "datatype", datatype)) == NC_NOERR && !strcmp(datatype, "float")) + dtype_is_float = true; + + if (gmt_M_is_verbose(GMT, GMT_MSG_INFORMATION)) { + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Using country and state data from dcw-gmt\n"); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Title : %s\n", title); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Source : %s\n", source); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Version: %s\n", version); + if (gmtversion[0]) GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "DCW version %s requires GMT version %s or later.\n", version, gmtversion); } if (gmtversion[0]) { /* The gmtversion attribute was available [starting with DCW 2.0.0] */ int maj, min, rel; - if (sscanf (gmtversion, "%d.%d.%d", &maj, &min, &rel) != 3) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unable to parse minimum GMT version information\n"); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + if (sscanf(gmtversion, "%d.%d.%d", &maj, &min, &rel) != 3) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Unable to parse minimum GMT version information\n"); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } if (maj > GMT_MAJOR_VERSION || (maj == GMT_MAJOR_VERSION && min > GMT_MINOR_VERSION) || (maj == GMT_MAJOR_VERSION && min == GMT_MINOR_VERSION && rel > GMT_RELEASE_VERSION)) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "This DCW version (%s) requires at least GMT %s; you have %d.%d.%d\n", version, gmtversion, GMT_MAJOR_VERSION, GMT_MINOR_VERSION, GMT_RELEASE_VERSION); - gmt_free_segment (GMT, &P); - gmt_M_free (GMT, order); + GMT_Report(GMT->parent, GMT_MSG_ERROR, "This DCW version (%s) requires at least GMT %s; you have %d.%d.%d\n", version, gmtversion, GMT_MAJOR_VERSION, GMT_MINOR_VERSION, GMT_RELEASE_VERSION); + gmt_free_segment(GMT, &P); + gmt_M_free(GMT, order); return NULL; } } if ((mode & GMT_DCW_DUMP) || (mode & GMT_DCW_REGION)) { /* Dump the coordinates to stdout or return -R means setting col types */ - gmt_set_geographic (GMT, GMT_OUT); + gmt_set_geographic(GMT, GMT_OUT); } if (mode & GMT_DCW_REGION) { /* Just update wesn */ - if ((Z = gmt_M_memory (GMT, NULL, n_items+named_wesn, struct GMT_RANGE)) == NULL) return NULL; + if ((Z = gmt_M_memory(GMT, NULL, n_items+named_wesn, struct GMT_RANGE)) == NULL) return NULL; if (named_wesn) { /* Must pick up the wesn of those entities */ for (j = 0; j < F->n_items; j++) { pos = 0; - while (gmt_strtok (F->item[j]->codes, ",", &pos, code)) { /* Loop over items */ - if ((ks = gmtdcw_found_collection (code, GMT_DCW_collection, n_bodies)) != GMT_NOTSET && GMT_DCW_collection[ks].type == DCW_NAMED_WESN) { + while (gmt_strtok(F->item[j]->codes, ",", &pos, code)) { /* Loop over items */ + if ((ks = gmtdcw_found_collection(code, GMT_DCW_collection, n_bodies)) != GMT_NOTSET && GMT_DCW_collection[ks].type == DCW_NAMED_WESN) { /* Expand current wesn by this named area */ Z[r_item].west = GMT_DCW_collection[ks].wesn[XLO]; Z[r_item++].east = GMT_DCW_collection[ks].wesn[XHI]; if (GMT_DCW_collection[ks].wesn[YLO] < wesn[YLO]) wesn[YLO] = GMT_DCW_collection[ks].wesn[YLO]; if (GMT_DCW_collection[ks].wesn[YHI] > wesn[YHI]) wesn[YHI] = GMT_DCW_collection[ks].wesn[YHI]; - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Collection code expanded from %s to %s \n", F->item[j]->codes, GMT_DCW_collection[ks].wesn_string); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Collection code expanded from %s to %s \n", F->item[j]->codes, GMT_DCW_collection[ks].wesn_string); } } } @@ -689,63 +701,68 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL } pos = item = 0; - Out = gmt_new_record (GMT, out, NULL); /* Since we only need to worry about numerics in this module */ - while (gmt_strtok (list, ",", &pos, code)) { /* Loop over countries */ + Out = gmt_new_record(GMT, out, NULL); /* Since we only need to worry about numerics in this module */ + while (gmt_strtok(list, ",", &pos, code)) { /* Loop over countries */ want_state = false; if (code[2] == '.') { /* Requesting a state */ - gmt_M_memset (state, GMT_LEN16, char); - strncpy (state, &code[3], GMT_LEN16-1); + gmt_M_memset(state, GMT_LEN16, char); + strncpy(state, &code[3], GMT_LEN16-1); code[2] = '\0'; want_state = true; } - ks = gmtdcw_find_country (code, GMT_DCW_country, GMT_DCW_COUNTRIES); + ks = gmtdcw_find_country(code, GMT_DCW_country, GMT_DCW_COUNTRIES); if (ks == GMT_NOTSET) { - GMT_Report (GMT->parent, GMT_MSG_WARNING, "No country code matching %s (skipped)\n", code); + GMT_Report(GMT->parent, GMT_MSG_WARNING, "No country code matching %s (skipped)\n", code); continue; } k = ks; if (want_state) { - item = gmtdcw_find_state (GMT, state, code, GMT_DCW_state, GMT_DCW_STATES, new_CN_codes); + item = gmtdcw_find_state(GMT, state, code, GMT_DCW_state, GMT_DCW_STATES, new_CN_codes); if (item == GMT_NOTSET) { - GMT_Report (GMT->parent, GMT_MSG_WARNING, "Country %s does not have a state named %s (skipped)\n", code, state); + GMT_Report(GMT->parent, GMT_MSG_WARNING, "Country %s does not have a state named %s (skipped)\n", code, state); continue; } - snprintf (TAG, GMT_LEN16, "%s%s", GMT_DCW_country[k].code, GMT_DCW_state[item].code); + snprintf(TAG, GMT_LEN16, "%s%s", GMT_DCW_country[k].code, GMT_DCW_state[item].code); if (F->mode & GMT_DCW_ZHEADER) - snprintf (msg, GMT_BUFSIZ, "-Z%s %s (%s)\n", TAG, GMT_DCW_state[item].name, GMT_DCW_country[k].name); + snprintf(msg, GMT_BUFSIZ, "-Z%s %s (%s)\n", TAG, GMT_DCW_state[item].name, GMT_DCW_country[k].name); else - snprintf (msg, GMT_BUFSIZ, "%s (%s)\n", GMT_DCW_state[item].name, GMT_DCW_country[k].name); + snprintf(msg, GMT_BUFSIZ, "%s (%s)\n", GMT_DCW_state[item].name, GMT_DCW_country[k].name); } else { - snprintf (TAG, GMT_LEN16, "%s", GMT_DCW_country[k].code); + snprintf(TAG, GMT_LEN16, "%s", GMT_DCW_country[k].code); if (F->mode & GMT_DCW_ZHEADER) - snprintf (msg, GMT_BUFSIZ, "-Z%s %s\n", TAG, GMT_DCW_country[k].name); + snprintf(msg, GMT_BUFSIZ, "-Z%s %s\n", TAG, GMT_DCW_country[k].name); else - snprintf (msg, GMT_BUFSIZ, "%s\n", GMT_DCW_country[k].name); + snprintf(msg, GMT_BUFSIZ, "%s\n", GMT_DCW_country[k].name); } - if (!strncmp (GMT_DCW_country[k].code, "AQ", 2U)) is_Antarctica = true; + if (!strncmp(GMT_DCW_country[k].code, "AQ", 2U)) is_Antarctica = true; - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, msg); - k = strlen (msg) - 1; + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, msg); + k = strlen(msg) - 1; msg[k] = '\0'; /* Remove the newline for use as segment header */ /* Open and read the netCDF file */ - snprintf (dim, GMT_LEN16, "%s_length", TAG); - if ((retval = nc_inq_dimid (ncid, dim, &id))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Failure while getting ID for variable %s in %s!\n", dim, path); + snprintf(dim, GMT_LEN16, "%s_length", TAG); + if ((retval = nc_inq_dimid(ncid, dim, &id)) && !strncmp(dcw_name, "dcw-gmt", 7)) { /* Warn only if file = dcw-gmt.nc */ + GMT_Report(GMT->parent, GMT_MSG_WARNING, "Failure while getting ID for variable %s in %s!\n", dim, path); continue; } - if ((retval = nc_inq_dimlen (ncid, id, &np))) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Failure while getting dimension length for variable %s in %s!\n", dim, path); + if ((retval = nc_inq_dimlen(ncid, id, &np))) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Failure while getting dimension length for variable %s in %s!\n", dim, path); continue; } if (mode > GMT_DCW_REGION && np > max_np) { + bool failed = false; size_t tmp_size = max_np; - gmt_M_malloc2 (GMT, lon, lat, np, &tmp_size, double); - gmt_M_malloc2 (GMT, dx, dy, np, &max_np, unsigned short int); - if (lon == NULL || lat == NULL || dx == NULL|| dy == NULL) { - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Failure while allocating memory!\n"); + gmt_M_malloc2(GMT, lon, lat, np, &tmp_size, double); + if (lon == NULL || lat == NULL) failed = true; + if (!dtype_is_float) { /* In 'float' case we use the lon, lat arrays directly. */ + gmt_M_malloc2(GMT, dx, dy, np, &max_np, unsigned short int); + if (dx == NULL|| dy == NULL) failed = true; + } + if (failed) { + GMT_Report(GMT->parent, GMT_MSG_ERROR, "Failure while allocating memory!\n"); continue; } } @@ -754,14 +771,16 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL snprintf (xname, GMT_LEN16, "%s_lon", TAG); snprintf (yname, GMT_LEN16, "%s_lat", TAG); - if ((retval = nc_inq_varid (ncid, xname, &xvarid))) continue; - if ((retval = nc_get_att_double (ncid, xvarid, "min", &west))) continue; - if ((retval = nc_get_att_double (ncid, xvarid, "max", &east))) continue; - if ((retval = nc_get_att_double (ncid, xvarid, "scale", &xscl))) continue; - if ((retval = nc_inq_varid (ncid, yname, &yvarid))) continue; - if ((retval = nc_get_att_double (ncid, yvarid, "min", &south))) continue; - if ((retval = nc_get_att_double (ncid, yvarid, "max", &north))) continue; - if ((retval = nc_get_att_double (ncid, yvarid, "scale", &yscl))) continue; + if ((retval = nc_inq_varid(ncid, xname, &xvarid))) continue; + if ((retval = nc_get_att_double(ncid, xvarid, "min", &west))) continue; + if ((retval = nc_get_att_double(ncid, xvarid, "max", &east))) continue; + if (!dtype_is_float) + if ((retval = nc_get_att_double(ncid, xvarid, "scale", &xscl))) continue; + if ((retval = nc_inq_varid(ncid, yname, &yvarid))) continue; + if ((retval = nc_get_att_double(ncid, yvarid, "min", &south))) continue; + if ((retval = nc_get_att_double(ncid, yvarid, "max", &north))) continue; + if (!dtype_is_float) + if ((retval = nc_get_att_double(ncid, yvarid, "scale", &yscl))) continue; if (GMT->current.setting.format_geo_out[0] == 'D') { /* [-180 180]*/ if (west > 180) west -= 360; if (east > 180) east -= 360; @@ -780,25 +799,43 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL if (north > wesn[YHI]) wesn[YHI] = north; } if (mode > GMT_DCW_REGION) { /* Need to read the data arrays */ - if ((retval = nc_get_var_ushort (ncid, xvarid, dx))) continue; - if ((retval = nc_get_var_ushort (ncid, yvarid, dy))) continue; + if (dtype_is_float) { + if ((retval = nc_get_var_double(ncid, xvarid, lon))) continue; + if ((retval = nc_get_var_double(ncid, yvarid, lat))) continue; + } + else { + if ((retval = nc_get_var_ushort(ncid, xvarid, dx))) continue; + if ((retval = nc_get_var_ushort(ncid, yvarid, dy))) continue; + } } if (mode == GMT_DCW_REGION) continue; - xscl = 1.0 / xscl; yscl = 1.0 / yscl; - for (k = n_segments = 0; k < np; k++) { /* Unpack */ - if (dx[k] == 65535U) { /* Start of new segment */ - n_segments++; /* Count how many segments */ - lon[k] = GMT->session.d_NaN; /* Flag a segment with lon = NaN */ - lat[k] = (dy[k] == 1) ? 1.0 : 0.0; /* This is always 0.0 for 1.1.4 and older, which had no holes anyway */ + if (dtype_is_float) { + for (k = n_segments = 0; k < np; k++) { /* Unpack */ + if (lon[k] == 65535U) { /* Start of new segment */ + n_segments++; /* Count how many segments */ + lon[k] = GMT->session.d_NaN; /* Flag a segment with lon = NaN */ + lat[k] = (lat[k] == 1) ? 1.0 : 0.0; /* This is always 0.0 for 1.1.4 and older, which had no holes anyway */ + } } - else { - lon[k] = dx[k] * xscl + west; - lat[k] = dy[k] * yscl + south; + } + else { + xscl = 1.0 / xscl; yscl = 1.0 / yscl; + for (k = n_segments = 0; k < np; k++) { /* Unpack */ + if (dx[k] == 65535U) { /* Start of new segment */ + n_segments++; /* Count how many segments */ + lon[k] = GMT->session.d_NaN; /* Flag a segment with lon = NaN */ + lat[k] = (dy[k] == 1) ? 1.0 : 0.0; /* This is always 0.0 for 1.1.4 and older, which had no holes anyway */ + } + else { + lon[k] = dx[k] * xscl + west; + lat[k] = dy[k] * yscl + south; + } } } + if (mode & GMT_DCW_EXTRACT) { /* Allocate a table with the right number of segments */ - gmt_free_table (GMT, D->table[tbl]); - D->table[tbl] = gmt_create_table (GMT, n_segments, 0, 2, 0, false); + gmt_free_table(GMT, D->table[tbl]); + D->table[tbl] = gmt_create_table(GMT, n_segments, 0, 2, 0, false); } if (special == GMT_DCW_PLOTTING) { /* Time to consider fill/pen change */ outline = (F->item[order[tbl]]->mode & DCW_DO_OUTLINE); @@ -822,7 +859,7 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL if (first == GMT_NOTSET) { done = true; continue;} /* No more segments */ last = GMT_NOTSET; while (last == GMT_NOTSET && k < np) {/* Look for next end of segment marker (or end of line) */ - if (gmt_M_is_dnan (lon[k])) last = k - 1; /* End of segment */ + if (gmt_M_is_dnan(lon[k])) last = k - 1; /* End of segment */ k++; } if (last == GMT_NOTSET) last = np - 1; /* End of last segment */ @@ -830,45 +867,45 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL P->n_rows = last - first + 1; /* Number of points in this segment */ P->data[GMT_X] = &lon[first]; P->data[GMT_Y] = &lat[first]; - sprintf (label, " %s Segment %" PRIu64, msg, seg); + sprintf(label, " %s Segment %" PRIu64, msg, seg); header[0] = '\0'; if (hole) strcat (header, "-Ph"); if (mode & GMT_DCW_DUMP) { /* Dump the coordinates to stdout */ - strcat (header, label); - strcpy (GMT->current.io.segment_header, header); - GMT_Put_Record (GMT->parent, GMT_WRITE_SEGMENT_HEADER, NULL); + strcat(header, label); + strcpy(GMT->current.io.segment_header, header); + GMT_Put_Record(GMT->parent, GMT_WRITE_SEGMENT_HEADER, NULL); for (kk = 0; kk < P->n_rows; kk++) { out[GMT_X] = P->data[GMT_X][kk]; out[GMT_Y] = P->data[GMT_Y][kk]; - GMT_Put_Record (GMT->parent, GMT_WRITE_DATA, Out); + GMT_Put_Record(GMT->parent, GMT_WRITE_DATA, Out); } seg++; } else if (mode & GMT_DCW_EXTRACT) { /* Attach to dataset */ S = D->table[tbl]->segment[seg]; - SH = gmt_get_DS_hidden (S); + SH = gmt_get_DS_hidden(S); if (special == GMT_DCW_PLOTTING) { if (sfill) { - strcat (header, " -G"); strcat (header, gmtlib_putfill (GMT, sfill)); + strcat(header, " -G"); strcat(header, gmtlib_putfill (GMT, sfill)); } else - strcat (header, " -G-"); + strcat(header, " -G-"); if (spen) { - strcat (header, " -W"); strcat (header, gmt_putpen (GMT, spen)); + strcat(header, " -W"); strcat(header, gmt_putpen (GMT, spen)); } else - strcat (header, " -W-"); + strcat(header, " -W-"); } - strcat (header, label); - S->header = strdup (header); + strcat(header, label); + S->header = strdup(header); if (hole) SH->pol_mode = GMT_IS_HOLE; S->n_rows = P->n_rows; - gmt_M_malloc2 (GMT, S->data[GMT_X], S->data[GMT_Y], S->n_rows, NULL, double); - gmt_M_memcpy (S->data[GMT_X], P->data[GMT_X], S->n_rows, double); - gmt_M_memcpy (S->data[GMT_Y], P->data[GMT_Y], S->n_rows, double); + gmt_M_malloc2(GMT, S->data[GMT_X], S->data[GMT_Y], S->n_rows, NULL, double); + gmt_M_memcpy(S->data[GMT_X], P->data[GMT_X], S->n_rows, double); + gmt_M_memcpy(S->data[GMT_Y], P->data[GMT_Y], S->n_rows, double); SH->alloc_mode[GMT_X] = SH->alloc_mode[GMT_Y] = GMT_ALLOC_INTERNALLY; /* Allocated in GMT */ seg++; } @@ -876,19 +913,19 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL tbl++; } - gmt_nc_close (GMT, ncid); - gmt_M_free (GMT, GMT_DCW_country); - gmt_M_free (GMT, GMT_DCW_state); - gmtdcw_freestrings (GMT_DCW_collection, n_bodies[3]+n_bodies[4]); - gmt_M_free (GMT, GMT_DCW_collection); - gmt_M_free (GMT, Out); + gmt_nc_close(GMT, ncid); + gmt_M_free(GMT, GMT_DCW_country); + gmt_M_free(GMT, GMT_DCW_state); + gmtdcw_freestrings(GMT_DCW_collection, n_bodies[3]+n_bodies[4]); + gmt_M_free(GMT, GMT_DCW_collection); + gmt_M_free(GMT, Out); if (mode & GMT_DCW_REGION) { - gmt_find_range (GMT, Z, r_item, &wesn[XLO], &wesn[XHI]); - gmt_M_free (GMT, Z); + gmt_find_range(GMT, Z, r_item, &wesn[XLO], &wesn[XHI]); + gmt_M_free(GMT, Z); GMT->current.io.geo.range = GMT_IGNORE_RANGE; /* Override this setting explicitly */ - gmt_extend_region (GMT, wesn, F->adjust, F->inc); - if (is_Antarctica) { /* Must override to include south pole and full longitude range */ + gmt_extend_region(GMT, wesn, F->adjust, F->inc); + if (!ALL && is_Antarctica) { /* Must override to include south pole and full longitude range */ wesn[YLO] = -90.0; /* Since it is a South polar cap */ wesn[XLO] = 0.0; wesn[XHI] = 360.0; @@ -903,40 +940,41 @@ struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SEL /* US DCW can return dumb things like this: -R172.436/-66.9489 */ if (wesn[XLO] > 0.0 && wesn[XHI] < 0.0) /* Crazy US, RU, and Fiji crossing dateline and get backwards limit signs... */ wesn[XHI] += 360.0; - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Region implied by DCW polygons is %g/%g/%g/%g\n", wesn[XLO], wesn[XHI], wesn[YLO], wesn[YHI]); + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Region implied by DCW polygons is %g/%g/%g/%g\n", wesn[XLO], wesn[XHI], wesn[YLO], wesn[YHI]); } gmt_M_free (GMT, order); if (mode > GMT_DCW_REGION) { - gmt_M_free (GMT, dx); - gmt_M_free (GMT, dy); - gmt_M_free (GMT, lon); - gmt_M_free (GMT, lat); + if (!dtype_is_float) { + gmt_M_free(GMT, dx); gmt_M_free(GMT, dy); + } + gmt_M_free(GMT, lon); + gmt_M_free(GMT, lat); P->data[GMT_X] = P->data[GMT_Y] = NULL; - gmt_free_segment (GMT, &P); + gmt_free_segment(GMT, &P); } - if (D) gmt_set_dataset_minmax (GMT, D); /* Update stats */ + if (D) gmt_set_dataset_minmax(GMT, D); /* Update stats */ if (special) { /* Plot via psxy or clip via psclip, then free dataset */ char cmd[GMT_BUFSIZ] = {""}, in_string[GMT_VF_LEN] = {""}; static char *module[4] = {"psxy", "psclip", "plot", "clip"}; if (GMT->current.setting.run_mode == GMT_MODERN) special += 2; /* Use modern mode module names */ /* Get a virtual file for the current DCW dataset */ - if (GMT_Open_VirtualFile (GMT->parent, GMT_IS_DATASET, GMT_IS_POLY, GMT_IN|GMT_IS_REFERENCE, D, in_string) == GMT_NOTSET) { + if (GMT_Open_VirtualFile(GMT->parent, GMT_IS_DATASET, GMT_IS_POLY, GMT_IN|GMT_IS_REFERENCE, D, in_string) == GMT_NOTSET) { return (NULL); } /* All pen and fill settings are passed via segment headers, so this part is common to both psxy and psclip: */ - snprintf (cmd, GMT_BUFSIZ, "-R -J -O -K %s", in_string); + snprintf(cmd, GMT_BUFSIZ, "-R -J -O -K %s", in_string); if (F->mode & GMT_DCW_CLIP_OUT) /* Set the outside clip flag */ strcat (cmd, " -N"); /* Select the outside clip flag */ - strcat (cmd, " --GMT_HISTORY=readonly"); /* Ignore history on exit */ - GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Calling %s with args %s\n", module[special-1], cmd); - if (GMT_Call_Module (GMT->parent, module[special-1], GMT_MODULE_CMD, cmd) != GMT_OK) { + strcat(cmd, " --GMT_HISTORY=readonly"); /* Ignore history on exit */ + GMT_Report(GMT->parent, GMT_MSG_INFORMATION, "Calling %s with args %s\n", module[special-1], cmd); + if (GMT_Call_Module(GMT->parent, module[special-1], GMT_MODULE_CMD, cmd) != GMT_OK) { return (NULL); } /* Close the virtual file and destroy the resource */ - GMT_Close_VirtualFile (GMT->parent, in_string); - GMT_Destroy_Data (GMT->parent, &D); + GMT_Close_VirtualFile(GMT->parent, in_string); + GMT_Destroy_Data(GMT->parent, &D); } return (D); @@ -1050,13 +1088,13 @@ unsigned int gmt_DCW_list (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F) { return ((list_mode & GMT_DCW_LIST)); } -void gmt_DCW_option (struct GMTAPI_CTRL *API, char option, unsigned int plot) { +void gmt_DCW_option(struct GMTAPI_CTRL *API, char option, unsigned int plot) { /* Show the usage */ char *action[2] = {"extract", "plot"}; char *action2[2] = {"extracting", "plotting"}; char *usage[2] = {"Extract clipping polygons", "Apply different fill or outlines"}; - GMT_Usage (API, 1, "\n-%c%s", option, DCW_OPT); - GMT_Usage (API, -2, "%s for specified list of countries. " + GMT_Usage(API, 1, "\n-%c%s", option, DCW_OPT); + GMT_Usage(API, -2, "%s for specified list of countries. " "Based on closed polygons from the Digital Chart of the World (DCW). " "Append comma-separated list of ISO 3166 codes (or full names) for countries to %s, i.e., " ",,... etc., using the 2-character country codes. " @@ -1064,24 +1102,25 @@ void gmt_DCW_option (struct GMTAPI_CTRL *API, char option, unsigned int plot) { "To select a whole continent, give full name (e.g., Africa). For collections and named regions, " "append their codes or full name. All names are case-insensitive. Available modifiers:", usage[plot], action[plot]); if (plot == 1) { - GMT_Usage (API, 3, "+c Set clip paths for the inside area [none]."); - GMT_Usage (API, 3, "+C Set clip paths for the outside area [none]."); - GMT_Usage (API, 3, "+g Fill polygons using given to fill [none]."); + GMT_Usage(API, 3, "+f Set the name of an alternative DCW type file."); + GMT_Usage(API, 3, "+c Set clip paths for the inside area [none]."); + GMT_Usage(API, 3, "+C Set clip paths for the outside area [none]."); + GMT_Usage(API, 3, "+g Fill polygons using given to fill [none]."); } - GMT_Usage (API, 3, "+l Just list the countries and their codes [no %s takes place].", action2[plot]); - GMT_Usage (API, 3, "+L List states/territories for Argentina, Australia, Brazil, Canada, China, India, Norway, Russia and the US. " + GMT_Usage(API, 3, "+l Just list the countries and their codes [no %s takes place].", action2[plot]); + GMT_Usage(API, 3, "+L List states/territories for Argentina, Australia, Brazil, Canada, China, India, Norway, Russia and the US. " "Select =+l|L to only list countries from that continent or +L for that country(repeatable)."); - GMT_Usage (API, 3, "+n List collections and named regions, their codes and list of items (or region) [no %s takes place].", action2[plot]); + GMT_Usage(API, 3, "+n List collections and named regions, their codes and list of items (or region) [no %s takes place].", action2[plot]); if (plot == 1) - GMT_Usage (API, 3, "+p Draw outline using given [none]."); - GMT_Usage (API, 3, "+z Add -Z to multisegment headers if extracting polygons."); + GMT_Usage(API, 3, "+p Draw outline using given [none]."); + GMT_Usage(API, 3, "+z Add -Z to multisegment headers if extracting polygons."); if (plot == 1) { - GMT_Usage (API, -2, "Note: One of +c|C|p|g must be specified to plot; if -M is in effect we just get the data. " + GMT_Usage(API, -2, "Note: One of +c|C|p|g must be specified to plot; if -M is in effect we just get the data. " "Repeat -%c to give different groups of items their own pen/fill settings.", option); } } -unsigned int gmt_DCW_parse (struct GMT_CTRL *GMT, char option, char *args, struct GMT_DCW_SELECT *F) { +unsigned int gmt_DCW_parse(struct GMT_CTRL *GMT, char option, char *args, struct GMT_DCW_SELECT *F) { /* Parse the F option in pscoast */ unsigned int n_errors = 0, pos = 0; char p[GMT_BUFSIZ] = {""}, *c = NULL, *a = NULL, *q = NULL; @@ -1111,12 +1150,16 @@ unsigned int gmt_DCW_parse (struct GMT_CTRL *GMT, char option, char *args, struc /* Else it is taken to be a deprecated region increment */ } } - while ((gmt_strtok (c, "+", &pos, p))) { + while ((gmt_strtok(c, "+", &pos, p))) { switch (p[0]) { /* Listings*/ case 'R': case 'e': case 'r': /* Get region from polygon(s) BB */ F->region = true; - n_errors += gmt_parse_region_extender (GMT, option, p, &(F->adjust), F->inc); /* Possibly extend the final region before reporting */ + n_errors += gmt_parse_region_extender(GMT, option, p, &(F->adjust), F->inc); /* Possibly extend the final region before reporting */ + break; + case 'f': /* Alternative DCW file name */ + F->other_dcw_file = strdup(&p[1]); + gmt_chop_ext(F->other_dcw_file); /* Remove any extension. We want only the base name. */ break; case 'l': /* Country list */ F->mode = DCW_GET_COUNTRY; @@ -1163,6 +1206,13 @@ unsigned int gmt_DCW_parse (struct GMT_CTRL *GMT, char option, char *args, struc } } } + if (!F->mode && !F->region) { + /* If no modifiers were set we assume that the intention is to plot. This skips the need of setting the + +p modifier which is something I always forget and think I hit a bug. + */ + this_item->mode |= DCW_DO_OUTLINE; + F->mode |= GMT_DCW_PLOT; + } if ((F->mode & (GMT_DCW_PLOT|DCW_DO_FILL)) && (F->mode & (GMT_DCW_CLIP_IN|GMT_DCW_CLIP_OUT))) { GMT_Report (GMT->parent, GMT_MSG_ERROR, "Option -%c: Cannot mix clipping and plotting!\n", option); n_errors++; @@ -1189,5 +1239,6 @@ void gmt_DCW_free (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F) { gmt_M_str_free (F->item[k]->codes); gmt_M_free (GMT, F->item[k]); } + if (F->other_dcw_file) free(F->other_dcw_file); gmt_M_free (GMT, F->item); } diff --git a/src/gmt_dcw.h b/src/gmt_dcw.h index bfeb2e824e1..4628fa508df 100644 --- a/src/gmt_dcw.h +++ b/src/gmt_dcw.h @@ -31,7 +31,7 @@ #ifndef GMT_DCW_H #define GMT_DCW_H -#define DCW_OPT "[+l|L|n][+c|C][+g][+p][+z]" +#define DCW_OPT "[+f][+l|L|n][+c|C][+g][+p][+z]" enum GMT_DCW_modes { GMT_DCW_REGION = 1, @@ -57,15 +57,16 @@ struct GMT_DCW_SELECT { /* -F */ unsigned int adjust; /* Round/adjust the region from polygons using the incs */ unsigned int mode; /* 1 get countries, 2 get countries and states */ unsigned int n_items; /* Number of items (times) -F was given */ + char *other_dcw_file; /* Name of alternative dcw file (NULL if not used) */ struct GMT_DCW_ITEM **item; /* Pointer to array of n_items items */ struct GMT_OPTION *options; /* Pointer to the GMT options */ }; -EXTERN_MSC int gmt_DCW_version (struct GMTAPI_CTRL *API, char *version); -EXTERN_MSC unsigned int gmt_DCW_list (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F); -EXTERN_MSC unsigned int gmt_DCW_parse (struct GMT_CTRL *GMT, char option, char *args, struct GMT_DCW_SELECT *F); -EXTERN_MSC void gmt_DCW_option (struct GMTAPI_CTRL *API, char option, unsigned int plot); -EXTERN_MSC struct GMT_DATASET * gmt_DCW_operation (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F, double wesn[], unsigned int mode); -EXTERN_MSC void gmt_DCW_free (struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F); +EXTERN_MSC int gmt_DCW_version(struct GMTAPI_CTRL *API, char *version); +EXTERN_MSC unsigned int gmt_DCW_list(struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F); +EXTERN_MSC unsigned int gmt_DCW_parse(struct GMT_CTRL *GMT, char option, char *args, struct GMT_DCW_SELECT *F); +EXTERN_MSC void gmt_DCW_option(struct GMTAPI_CTRL *API, char option, unsigned int plot); +EXTERN_MSC struct GMT_DATASET *gmt_DCW_operation(struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F, double wesn[], unsigned int mode); +EXTERN_MSC void gmt_DCW_free(struct GMT_CTRL *GMT, struct GMT_DCW_SELECT *F); #endif /* GMT_DCW_H */ diff --git a/src/gmt_init.c b/src/gmt_init.c index c3777dab041..2909e16721f 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -15125,7 +15125,7 @@ GMT_LOCAL unsigned int gmtinit_strip_R_from_E_in_pscoast (struct GMT_CTRL *GMT, if (c) { /* Now process the modifiers */ c[0] = '+'; /* Unhide the modifiers */ pos = 0; /* Initialize position counter for this string */ - while (gmt_getmodopt (GMT, 'E', c, "lLncCgprRwz", &pos, p, &n_errors) && n_errors == 0) { + while (gmt_getmodopt (GMT, 'E', c, "flLncCgprRwz", &pos, p, &n_errors) && n_errors == 0) { switch (p[0]) { case 'r': case 'R': if (r_opt[0] == 0) { /* Only set this once */ diff --git a/src/gmt_private.h b/src/gmt_private.h index 452ac390204..223b2fdfef7 100644 --- a/src/gmt_private.h +++ b/src/gmt_private.h @@ -185,16 +185,16 @@ struct GMTAPI_CTRL { char *session_dir; /* GMT Session dir (NULL if not running in modern mode) */ char *gwf_dir; /* GMT WorkFlow dir (NULL if not running in modern mode) */ char **tmp_header; /* Temporary table headers held until we are able to write them to destination */ - char *tmp_segmentheader; /* Temporary segment header held until we are able to write it to destination */ + char *tmp_segmentheader; /* Temporary segment header held until we are able to write it to destination */ char *message; /* To be allocated by Create_Session and used for messages */ - char error_msg[4096]; /* The cached last error message */ + char error_msg[4096]; /* The cached last error message */ bool internal; /* true if session was initiated by gmt.c */ bool deep_debug; /* temporary for debugging */ bool parker_fft_default; /* Used to alter the default in -N FFT settings */ int (*print_func) (FILE *, const char *); /* Pointer to fprintf function (may be reset by external APIs like MEX) */ - unsigned int do_not_exit; /* 0 by default, meaning it is OK to call exit (may be reset by external APIs like MEX to call return instead) */ - struct GMT_LIBINFO *lib; /* List of shared libs to consider */ - unsigned int n_shared_libs; /* How many in lib */ + unsigned int do_not_exit; /* 0 by default, meaning it is OK to call exit (may be reset by external APIs like MEX to call return instead) */ + struct GMT_LIBINFO *lib; /* List of shared libs to consider */ + unsigned int n_shared_libs; /* How many in lib */ /* Items used by GMT_Put_Record and sub-functions */ int (*api_put_record) (struct GMTAPI_CTRL *API, unsigned int, struct GMT_RECORD *); /* Items used by api_put_record_fp */ @@ -211,7 +211,7 @@ struct GMTAPI_CTRL { struct GMT_VECTOR *current_put_V; GMT_putfunction *current_put_V_val; /* Items used by GMT_Put_Record and sub-functions */ - struct GMT_RECORD * (*api_get_record) (struct GMTAPI_CTRL *, unsigned int, int *); + struct GMT_RECORD *(*api_get_record) (struct GMTAPI_CTRL *, unsigned int, int *); struct GMTAPI_DATA_OBJECT *current_get_obj; bool get_next_record; /* Items used by api_get_record_dataset */ diff --git a/src/gmt_shore.c b/src/gmt_shore.c index eb4e6a7da65..a0f9342e4c4 100644 --- a/src/gmt_shore.c +++ b/src/gmt_shore.c @@ -597,8 +597,8 @@ int gmt_init_shore (struct GMT_CTRL *GMT, char res, struct GMT_SHORE *c, double if (!gmtshore_getpathname (GMT, stem, path, true, true)) return (GMT_GRDIO_FILE_NOT_FOUND); /* Failed to find file */ - /* zap structure (nc_get_att_text does not null-terminate strings!) */ - gmt_M_memset (c, 1, struct GMT_SHORE); + /* zap structure (nc_get_att_text does not null-terminate strings!) */ + gmt_M_memset(c, 1, struct GMT_SHORE); /* Open shoreline file */ gmt_M_err_trap (gmt_nc_open (GMT, path, NC_NOWRITE, &c->cdfid)); diff --git a/src/gmt_support.c b/src/gmt_support.c index 8232d605cf0..c13ef35ec82 100644 --- a/src/gmt_support.c +++ b/src/gmt_support.c @@ -7368,12 +7368,12 @@ bool gmt_getpen (struct GMT_CTRL *GMT, char *buffer, struct GMT_PEN *P) { bool set_NaN = false; char def_width[GMT_LEN256] = {""}, width[GMT_LEN256] = {""}, color[GMT_LEN256] = {""}, style[GMT_LEN256] = {""}, line[GMT_BUFSIZ] = {""}, *c = NULL; - if (!buffer || !buffer[0]) return (false); /* Nothing given: return silently, leaving P in tact */ + if (!buffer || !buffer[0]) return (false); /* Nothing given: return silently, leaving P intact */ assert (P); /* P needs to not point to NULL */ strncpy (line, buffer, GMT_BUFSIZ-1); /* Work on a copy of the arguments */ gmt_chop (line); /* Remove trailing CR, LF and properly NULL-terminate the string */ - if (!line[0]) return (false); /* Nothing given: return silently, leaving P in tact */ + if (!line[0]) return (false); /* Nothing given: return silently, leaving P intact */ /* First chop off and processes any line modifiers : * +c[l|f] : Determine how a CPT (-C) affects pen and fill colors normally controlled via -W.