Mcidas header blocks

How do I...?
Post Reply
User avatar
jconrado
Posts: 10
Joined: Thu Jan 28, 2016 5:16 pm

Mcidas header blocks

Post by jconrado »

HI,

I have some images "Infrared Global Geostationary Composite" from the https://ghrc.nsstc.nasa.gov/hydro/search.pl.

I visualize them using the MCIDAS-V but I would like know how can I read the informations of these blocks:

Directory, Navigation, Calibration and Supplemental.

Someone has a fortran or IDL code for readt these blocks.


Conrado
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: Mcidas header blocks

Post by bobc »

Hello Conrado -

I'm not aware of any fortran or IDL code to read the blocks you mentioned. We will have to see if any other McIDAS-V users are able to submit any code if anyone has it.

From using McIDAS-V, you can print out the directory block of an AREA file in a local ADDE dataset. For example, if your dataset is called 'AREA', and the Image Type is 'my area files', you can run the following lines of code in the Jython Shell (Tools>Formulas>Jython Shell from the Main Display window):

Code: Select all

desc = getLocalADDEEntry(dataset='AREA',imageType='my area files')
data = loadADDEImage(localEntry=desc,time='17:00:00')
# note that the 'time' keyword above will have to be changed to match your data
print data['directory-block']

For more information on this scripting, see the Create an Object page in the McIDAS-V User's Guide. 'directory-block' is one of the keys included with the data object returned from loadADDEImage. There are several other keys that contain different information included with the data object as well, and you can see all of them by running the following line of code:

Code: Select all

print data.keys()

The directory block prints out in a list, and you can find what each value corresponds to using the Directory block chart on the Areannnn page in the McIDAS-X Programmer's Manual. For an example of extracting data from this list, if you are interested in word 4 for 'nominal year and Julian day of the image', you can run the following:

Code: Select all

dirList = data['directory-block']
print dirList[3]

This prints out the year/day of the AREA. Even though I'm looking to print out the 4th word, I pass '[3]' through dirList because this list is 0-based.

Hopefully this at least gets you started. I did write up an inquiry to come up with a way of returning the navigation, calibration, and supplemental blocks in McIDAS-V.

- Bob Carp
McIDAS Help Desk
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: Mcidas header blocks

Post by tomw »

From IDL you could also use the VisAD library's AreaFile class that contains methods to extract those blocks.

See: http://www.ssec.wisc.edu/visad-docs/javadoc/edu/wisc/ssec/mcidas/AreaFile.html
Post Reply