Skip to content

grdmath SUB operator #916

Open
Open

Description

@arleaman

grdmath SUB operator

I would like to use this feature to calculate residuals by finding the difference between two grid files.

Are you willing to help implement and maintain this feature? Yes, with guidance

Activity

  1. welcome commented on Feb 16, 2021

    @welcome

    👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

  2. weiji14 commented on Feb 17, 2021

    @weiji14
    Member

    Hi @arleaman, just need a bit more information on what your 'grids' are. Are they NetCDF files, xarray.DataArray/xarray.Dataset objects, or something else? This will help us to advice you a bit better.

    About calculating residuals (using SUB), I would recommend doing it directly in xarray (see http://xarray.pydata.org/en/v0.16.2/computation.html#basic-array-math) using the minus '-' operator if possible, assuming that you are already familiar with xarray. Not to say we can't wrap a grdmath function in PyGMT, but the reverse polish notation of grdmath will make implementing this a bit tricky (though you are welcome to try).

  3. arleaman commented on Feb 23, 2021

    @arleaman
    ContributorAuthor

    Thanks @weiji14 - I am using NetCDF files for my grids and will look into performing calculations in xarray.

  4. added a commit that references this issue on Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions