Skip to content. | Skip to navigation

Personal tools
You are here: GES DISC Home Services Data Tools simap example7.bat

example7.bat

;This batch file example shows an inefficient
;job which, however, is neccessitated by the different sizes
;of the SDS arrays in the Atmosphere product MOD05_L2.


.full_reset_session
.compile simap

sel={name:"",chans:STRARR(38),numch:0}
sel=REPLICATE(sel,20)


inpath="/var/scratch"
outpath="/var/scratch"



hdfname="MOD05_L2.A2000338.1810.002.2001025062547.hdf"

sel[0].name=['Water_Vapor_Infrared']
sel[0].chans=['1']




;====================FLAGS DEFINITIONS============================

intrpl=1 ;Set to 1 activate filling
;up of holes in the images. This may slow
;the process, but will clean the images.
;Set to 0 to deactivate.


extgeo=0 ;set to 1 to use EXTERNAL geolocations
;set to 0 to use INTERNAL geolocations

igeo=1 ;set to 1 to interpolate geolocations
;It must be 1 when using internal geolocations
;and L1B MODIS files

sdsprint=0 ;Flag to list SDS
;0=no list
;1=short list, SDS names only, no attributes
;2=long list, SDS names, attributes and their
;values


True_col=1 ;Flag to generate image after all procedures
;are completed.
;Set to 3 to save RGB image composite from the
;first 3 channels selected.
;Set to 1 to save grey/color scale separate
;images of all selected channels.

flcnt=0 ;set to 1 to fill continents
;set to 0 not to fill continents

automap=1 ;Set to 1 to automaticaly
;set map limits.
; Set to 0 to use the default
; map limits.


autointen=0 ;Set to 1 to automatically set image intensity.
;Set to 0 to use default image intensity
;ranges "intens"


zlog=0 ;Set to different than 0 to show image
;in log scale

gallery=1 ;Flag to generate galleries of image files.
;0=no gallery, will do global map
;1=gif or jpeg gallery of gray/color scale,
;of true color, RGB, image files. If
;True_col=1 then grey/color scale.
;If True_col=3 then RGB


debug=-1 ;debug mode: -1 will print to monitor
; 4 will print to log file
;============================================================




;============PARAMETERS DEFINITIONS===========================

;---------SUBSET-------
xstart="" ;leave as NULL string for full size
xend="" ;or give numerical value

ystart=""
yend=""


;---------Default map settings-----------------
latmin=21.
latmax=31.
lonmin=-118. ;westboundcoordinate
lonmax=-106. ;eastboundcoordinate

map_limit=[latmin,lonmin,latmax,lonmax]
center_lat=0;latmin+(latmax-latmin)/2.
center_lon=atan((sin(lonmin*!dtor)+sin(lonmax*!dtor)),$
(cos(lonmin*!dtor)+cos(lonmax*!dtor)))*!radeg


mappos=[.05,.08,.95,.97] ;map position and size,
; relative to the graphic window

proj=1 ;1 - cylindrical
;2 - stereo
;--------------------------------------------

;IMAGE INTENSITY
;default ranges for data planes:
intens=FLTARR(2,20)
intens[*,0]=[0.,6] ;


slice=3 ;For 3D arrays, this is the dimension
;to fix. In IDL, dimensions are
;e.g. array[x,y,z]. Set slice=1 or 2 or 3 to fix
; x or y or z dimension, correspondingly.
;For most SDS's slice=3, i.e. they are stacked
;over the z-dimension. However, for example MODIS
;Atmosphere L2 Quality_Assurance needs slice=1 !!!
;I.e. it is stacked over the x-dimension


NXM=700 ;Request in pxl on the size of map
NYM=700 ;to be produced.


ctab=33 ;IDL color table

backgnd=254 ;background inside map
;and ouside the granule(s)

;this will be the size of the graphic window to
;hold the map:
NX=NXM/(mappos[2]-mappos[0])
NY=NYM/(mappos[3]-mappos[1])
;================================================================


simap,hdfname


;Now will prepare to map 'Water_Vapor_Near_Infrared'.
;The hdf file name is the same, as are most of the input switches
;and parameters. We change only the image intensity and
;the interpolation procedure, coni=0.


coni=0 ;Water_Vapor_Near_Infrared is a large array, 1354x2030
;and thus there is little sense to use this interpolation.
;Thus we deactivate it.
;However, intrpl is still active from above, intrpl=1,
;and can be used to fill remaining holes from the mapping.

intens[*,0]=[0.,5]

sel[0].name=['Water_Vapor_Near_Infrared']
sel[0].chans=['1']

simap,hdfname

Document Actions
NASA Logo - nasa.gov
NASA Privacy Policy and Important Notices
Last updated: Sep 10, 2010 02:20 PM ET
Top