Thanks to visit codestin.com
Credit goes to github.com

Skip to content

a few issues with TS_depth_integrals.py in ocean_annual.frepp #2

Description

@nikizadehgfdl

There are the following issues with TS_depth_integrals.py in ocean_annual.frepp.

issues with ocean_annual.frepp

  1. MIDAS has to be built before the tool can be used. This can be done with "make local"

  2. module load gcc should be dropped, it'll break the MIDAS build!

  3. module load intel_compilers should be added

  4. There is no need for module load fre and module load fre-analysis

  5. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions