From 8a6807705ee9a2a86b72f050b06e83458b9cae92 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 10 Nov 2025 17:28:58 +0800 Subject: [PATCH] pygmt.grdproject: Improve the checking of required parameter 'projection'(J) is specified --- pygmt/src/grdproject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/grdproject.py b/pygmt/src/grdproject.py index 91e472e5496..2bf82e83dc6 100644 --- a/pygmt/src/grdproject.py +++ b/pygmt/src/grdproject.py @@ -116,8 +116,8 @@ def grdproject( >>> # Project the geographic gridded data onto a rectangular grid >>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", region=region) """ - if projection is None: - msg = "The projection must be specified." + if kwargs.get("J", projection) is None: + msg = "Parameter 'projection' must be specified." raise GMTInvalidInput(msg) aliasdict = AliasSystem().add_common(