NOAA-EMC / rrfs-workflow

workflow for RRFSv1
Other
13 stars 28 forks source link

python exception in blending_fv3.py #516

Open edwardhartnett opened 1 month ago

edwardhartnett commented 1 month ago

Has this script ever worked?

I don't understand how it can, with this exception.

WARNING: autodoc: failed to import module 'blending_fv3'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/rrfs-workflow-ed/envs/latest/lib/python3.11/site-packages/sphinx/ext/autodoc/importer.py", line 58, in import_module
    return importlib.import_module(modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.asdf/installs/python/3.11.9/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/docs/checkouts/readthedocs.org/user_builds/rrfs-workflow-ed/checkouts/latest/ush/blending_fv3.py", line 44, in <module>
    Lx = float(sys.argv[1])  # BLENDING_LENGTHSCALE
         ^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: '-T'
JacobCarley-NOAA commented 1 month ago

Tagging @delippi

delippi commented 1 month ago

@edwardhartnett, interesting. It should definitely work. Can you add a debug print statement in your rrfs-workflow/script/exrrfs_blend_ics.sh right before the call to blending_fv3.py to see what the value of $Lx you are passing to it? For example,

      echo Lx: $Lx
      python ${USHdir}/blending_fv3.py $Lx $glb $reg $trcr $blend $use_host_enkf

My initial guess is the value of Lx is not correctly set. It should be 960.

For reference, blending_fv3.py is located in rrfs-workflow/ush.