grdinterpolate -T documentation

Open
#8,797 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
cli, documentation

Research direction

Start with the grdinterpolate manual page, especially the current -T description and its first example. Confirm the documented behavior for a single level, level lists, and level files, then update the wording so z-level selection is unambiguous and consistent with the option syntax.

Written by the indexing model from the issue text.

Description

documentation good first issue

Sorry, not exactly sure how to label this. I have been using grdinterpolate to get 2-d depth slices from 3-d netCDF cubes of seismic tomography models (i.e., with longitude, latitude, depth co-ordinates).

The way to do this, as far as I can tell, is to use grdinterpolate -T[level]. To be fair, there are some clues on the manual page for grdinterpolate that this is the way to do it (e.g., the first example is reasonably clear, and there are some hints in the description of -G), but I don't think it's easy to see from the description of -T that this is the way. It starts to talk about "time-steps" and "times", but then in the second half refers to "layers" — at first reading, I did not understand that this would be the way to choose a z-coordinate (or "level" as this manual page refers to z-coordinates). There is also no mention of choosing a single z-value.

I would like to suggest that the -T description could be improved, but please let me know if I have misunderstood something.

Current text:

**-T**\ [*min/max*\ /]\ *inc*\ [**+i**\|\ **n**] \|\ |-T|\ *file*\|\ *list*
    Make evenly spaced time-steps from *min* to *max* by *inc* [Default uses input times].
    For details on array creation, see `Generate 1-D Array`_.  **Note**: If |-Z| is set
    and no output times are set with |-T| we simply rewrite the grid-produced cube as
    a 3-D data cube file and exit. Also, for |-E| and |-S| you may also just give
    a range via |-T|\ *min/max* to limit the layers considered, with no interpolation
    between the selected layers.  If |-T| is not given and neither |-E| nor |-S| are
    set, then we simply extract all layers within the bounds set by |-R|.

My idea for possible replacement text:

**-T**\ [*min/max*\ /]\ *inc*\ [**+i**\|\ **n**] \|\ |-T|\ *file*\|\ *list*
    Create evenly-spaced levels from *min* to *max* by *inc* [Default uses input levels]. 
    Alternatively, provide a comma-separated *list* of levels or a *file* containing levels 
    to output. A single value specified will result in a single layer being output.
    For details on array creation, see `Generate 1-D Array`_.  **Note**: If |-Z| is set
    and no output levels are set with |-T| we simply rewrite the grid-produced cube as
    a 3-D data cube file and exit. Also, for |-E| and |-S| you may also just give
    a range via |-T|\ *min/max* to limit the layers considered, with no interpolation
    between the selected layers.  If |-T| is not given and neither |-E| nor |-S| are
    set, then we simply extract all layers within the bounds set by |-R|.

I am not certain about some things:

  1. I am inferring from the presence of the options "file|list" that you could specify either a comma-separated list of levels or a file containing levels but I have not checked this.

  2. I think the current formatting implies you could select -T<inc>, whereas instead of an increment it will understand that as a level.

  3. I assume all the mentions about times/time-steps are legacy from what the option was previously intended for, presumably it is not needed?

Let me know what you think.

Thanks,
Tom

Dominant language
C
Stars
997
Forks
420
Avg merge
13h 27m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenericMappingTools/gmt

All issues in GenericMappingTools/gmt

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.