Page 1 of 1

getADDE() does not find data with relative time

Posted: Sun Apr 27, 2014 4:02 pm
by hproe
Hi -

I have Jython code that retrieves recent image slots from geosat ADDE servers. I have not used it for a while - 3 months, say. Running it now again (with a very recent nightly), it does not find any time slots. I have extracted the essential part of the code:

Code: Select all

def dummy():
 perms=('?','?')
 addeParmsMETEOSAT=dict(
    server='msg.ssec.wisc.edu',
    dataset='MSG',
    descriptor='FD',
    band=9,   
    unit='TEMP',
    coordinateSystem=LATLON,
    size='ALL',
    mag=-4,
    accounting=perms
)
 METEOSATloop=[]
 for pos in range(-1,0):
    try:
       metadata,myImages=getADDEImage(position=(pos),**addeParmsMETEOSAT)
    except:
       print pos,'not available'
    else:
       METEOSATloop.append(myImages)
       print pos,metadata.get('nominal-time')

Running this from the Jython shell as dummy() will print the message given in the except clause in the fourth-to-last line, i.e. it does not find the most recent METEOSAT slot. When running it, do not forget to give the proper project parameters to variable perms.

cheers, HP

Re: getADDE() does not find data with relative time

Posted: Mon Apr 28, 2014 2:11 pm
by bobc
Hi HP -

I think there are a couple problems in your script:

1. Somewhat recently, we made it so that when you specify size='ALL', you can't also specify coordinateSystem, place or location. In your script, you use size='ALL' and coordinateSystem=LATLON. Can you try pulling the coordinateSystem=LATLON from your script?
2. Mag must be specified as (x,y)... so can you try changing your mag=-4 to mag=(-4,-4)?

Both problems 1 and 2 should return different error messages from getADDEImage, but I think the second half of your script (the for loop) is just printing out the message '-1 not available' regardless of the actual error.

I'll ask our scripting group about #2, as i think it would be nice to just be able to enter in a single numerical value for mag, which would just be used as both the x and y values.

Please let me know if making modifications 1 and 2 above to your script don't help.

Thanks -
Bob Carp

Re: getADDE() does not find data with relative time

Posted: Wed Apr 30, 2014 1:42 pm
by hproe
Hi Bob -

Thank you very much. My code is running again. It is your #1 remark that did the trick (and makes sense as the code was running earlier on in the life of version 1.5). #2 is due a misprint from my side, introduced when extracting the essential part of code.

cheers, HP