a few issues with TS_depth_integrals.py in ocean_annual.frepp
There are the following issues with TS_depth_integrals.py in ocean_annual.frepp.
issues with ocean_annual.frepp
-
MIDAS has to be built before the tool can be used. This can be done with "make local"
-
module load gcc should be dropped, it'll break the MIDAS build!
-
module load intel_compilers should be added
-
There is no need for module load fre and module load fre-analysis
-
PYTHONPATH has to be set before using the tool.
issue with MIDAS/Makefile_GFDL
make local fails This problem can be fixed by upgrading MIDAS submodule to the latest or minimally by:
- (${PYTHONPATH:="./local"};python setup_complete.py install --home=$(INSTALL_PATH))
+ (python setup_complete.py install --home=$(INSTALL_PATH))
issues with TS_depth_integrals.py
After MIDAS is built the tool works interactively on analysis node but it fails when submitted as a job to pp nodes with:
Traceback (most recent call last):
File "/nbhome/Niki.Zadeh/testing_20141017/CM4_c96L48_am4a1r1_2000climo/mom6/tools/analysis/TS_depth_integrals.py", line 122, in <module>
fig=plt.figure(1,figsize=(8.5,11))
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 423, in figure
**kwargs)
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4agg.py", line 31, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4agg.py", line 38, in new_figure_manager_given_figure
canvas = FigureCanvasQTAgg(figure)
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4agg.py", line 70, in __init__
FigureCanvasQT.__init__( self, figure )
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4.py", line 207, in __init__
_create_qApp()
File "/usr/local/python/2.7.3/lib/python2.7/site-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4.py", line 62, in _create_qApp
raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
This can be cured by making sure that matplotlib to not use any Xwindows backend. This is achieved by
import matplotlib
matplotlib.use('Agg')
before
import matplotlib.pyplot as plt