loading data into a script

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

loading data into a script

Post by joleenf »

This is how I load my data into a script, but I "load" is also a way to load any data type into McV through a script.

remote_area="adde://eastl.ssec.wisc.edu/imagedata?&PORT=112&COMPRESS=gzip&USER=idv&PROJ=6533&GROUP=EASTL&DESCRIPTOR=FD&DAY=2010269&TIME=14:45&BAND=2&LATLON=-15 -55&PLACE=CENTER&SIZE=1000 1000&UNIT=BRIT&MAG=1&SPAC=4&AUX=YES"

a=load(remote_area)

Now the data is in variable "a." I have tried this for an area and for netcdf files and it does seem to work for both. As I understand it, load checks all the data adapters to see if the data can read into McV and chooses the correct adapter. I am not sure if Kaba has an example using a netCDF file. Unfortunately, I only tested that from the jython shell and don't a ready example.

Remember to run the script currently,

pathname/McIDAS-V-System/runMcV -islfile pathname/yourscript.py

The -islfile is currently needed even when running a python script.

Note: you must use your USER initials and your PROJ number, the one listed above should not be valid, but the error message will be:

visad.data.BadFormException: visad.data.BadFormException: Data object "adde://easts.ssec.wisc.edu/imagedata?&PORT=112&COMPRESS=gzip&USER=idv&PROJ=9681&VERSION=1&DEBUG=false&TRACE=0&GROUP=EASTS&DESCRIPTOR=CONUS&POS=-1&BAND=2&LATLON=40 -96&PLACE=CENTER&SIZE=1000 1000&UNIT=BRIT&MAG=1 1&SPAC=4&AUX=YES" not compatible with "visad.python.JPythonMethods" data family



Joleen
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: loading data into a script

Post by joleenf »

Update:

This load works in McIDAS-V previous to the October release of McIDAS-V 1.00. It is not working in the current stable release of McIDAS-V 1.01. It is currently working in the nightly build (unstable) version of McIDAS-V 1.01 released on 2011-05-02.

Joleen
Post Reply