Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/Regridding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ to demonstrate the stretched cubed-sphere regridding process:
.. code-block:: console

$ python -m gcpy.regrid_restart_file \
--stretched-grid \
--stretch-factor 4.0 \
--target-latitude 32.0 \
--target-longitude -64.0 \
GEOSChem.Restart.20190701_0000z.c48.nc4 \
c48_to_c120_stretched_weights.nc \
GEOSChem.Restart.20190701_0000z.c48.nc4
Expand Down
6 changes: 5 additions & 1 deletion gcpy/regrid_restart_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def file_path(path):

"""
if not os.path.isfile(path):
raise argparse.ArgumentTypeError
error_message = (
f"File {path} does not exist! Please double-check the path"
" and make sure you have used the correct file extension"
)
raise argparse.ArgumentTypeError(error_message)
return path


Expand Down