I received new test data for ABI. Using this new data, I started having problems with setting the projection of the image to the native projection when running from the command line script. This does not seem to happen when running in the Jython Shell, or when running through the normal point and click GUI controls. In trying to isolate the problem, I ran into a few errors even before I got to the point of resetting the projection.
The test script is this:
Code: Select all
filename='<path to DO3>/OR_ABI-L2-CMIPC-M3C03_G16_s20161101232415_e20161101235192_c20161101241235.nc'
params=dict(
field='CMI',
stride=1
)
thisData=loadGrid(filename, **params)
panel = buildWindow()
thisLayer=panel[0].createLayer('Color-Shaded Plan View', thisData)
panel[0].setProjection(thisLayer)
panel[0].captureImage('/Users/joleenf/data/test.png')
1.) Start McV 1.6 beta 1 with an alternative userpath to ensure that no jython code is interfering with process (strange errors needed to be eliminated...more on this later).
2.) Check Non Power of Two, and fast rendering for layer in preferences
3.) Open the Jython shell and run code above. For me, there is no problem. An image is created.
4.) Close McV and run the code above from the command line using the alternate user path. For me, I get an error in this process.
5.) Add some confusion to the errors: Start McIDAS-V with an alternate user path. Open the jython shell and test the following code
Code: Select all
with open('test.txt', 'r') as f:
for i,line in enumerate(f):
print line
print 'Done'
This should run without errors.
6.) Close McIDAS-V and run the loadGrid script on the command line again, use the alternate user path. A new error appears in the mcidasv.log
Am I incorrect in using the with Open format for file i/o? As far as I can tell, that is okay in python even though "with" is a reserved keyword.
Sample file is at ftp://ftp.ssec.wisc.edu/pub/ssec/joleen ... 1241235.nc
Joleen