TypeError encountered when running file_regrid.py #278
Labels
category: Bug
Something isn't working
topic: Regridding
Issues pertaining to horizontal & vertical regridding
Milestone
Name and Institution (Required)
Name: Bob Yantosca
Institution: Harvard + GCST
Confirm you have reviewed the following documentation
Description of your issue or question
When using the
file_regrid.py
script as described in the documentation, aTypeError
is encountered.To reproduce
Explanation
I have traced this to this block of code where the command-line arguments are parsed:
Note that the regridding weights directory (
--weightsdir
argument) should be a string but it has a default value ofFalse
(which is of typebool
). This was likely a cut-n-paste error.Solution
Changing the
to
fixes the issue. I will prepare a PR with this fix.
Temporary workaround
This error only happens when the
--weightsdir
argument is not supplied, which causes the default value to be used. Until we can fix this issue, make sure to callfile_regrid.py
with e.g.--weightsdir "."
.The text was updated successfully, but these errors were encountered: