ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
302 stars 307 forks source link

Better error messaging for mksurfdata_esmf when conda not loaded... #2481

Open ekluzek opened 5 months ago

ekluzek commented 5 months ago

Brief summary of bug

When a conda environment isn't loaded the error message when running

cd tools/mksurfdata_esmf
make all

should be improved. This also means the same thing for the underlying python scripts in tools/mksurfdata_esmf.

General bug information

CTSM version you are using: alpha-ctsm5.2.mksrf.27_ctsm5.1.dev176 (and will be ctsm5.2.0) Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: python scripts associated with mksurfdata_esmf

Details of bug

Important output or errors that show the problem

 make all
/glade/derecho/scratch/erik/alpha-ctsm5.2.mksrf.27_ctsm5.1.dev176/tools/mksurfdata_esmf/../site_and_regional/subset_data point --silent --overwrite --uniform-snowpack --cap-saturation --crop --outdir . --include-nonveg --create-surface --lat -7 --lon -55 --site 1x1_brazil
Traceback (most recent call last):
  File "/glade/derecho/scratch/erik/alpha-ctsm5.2.mksrf.27_ctsm5.1.dev176/tools/mksurfdata_esmf/../site_and_regional/subset_data", line 34, in <module>
    from ctsm.subset_data import main
  File "/glade/derecho/scratch/erik/alpha-ctsm5.2.mksrf.27_ctsm5.1.dev176/tools/site_and_regional/../../python/ctsm/subset_data.py", line 65, in <module>
    from ctsm.site_and_regional.base_case import DatmFiles
  File "/glade/derecho/scratch/erik/alpha-ctsm5.2.mksrf.27_ctsm5.1.dev176/tools/site_and_regional/../../python/ctsm/site_and_regional/base_case.py", line 17, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
make: *** [Makefile:160: 1x1_brazil-present] Error 1
wwieder commented 2 weeks ago

Not sure this is required for a 5.3 release. Should it fall into a later tag that's a quality of life improvement?