<br>Hi,<br><br>I've been able to use the MOD11 data in grads on a linux box for some time. one of my xdf files is attached below. (note I'm using MOD11C1)<br><br>You didn't mention why you have the "1 z" in the VARS line for lst_day_cmg and no others. Is it only that variable? In other words, change "1 z,y,x" to "0 y,x".
<br><br>I could be wrong, but grads links to the libraries on each machine. You may like to check the hdf libraries, if this persists.<br><br>Also, were it me, I'd have the correct date in the TDEF. I don't think that is your problem, but it could lead to difficulties down the line.
<br><br>Good Luck,<br><br>Mike<br><br>DSET data/Y2004/M%m2/MOD11C1.A2004%m2%d2.004.hdf<br>title MODIS Land Surface Temperature (LST) CMG v4 by Zhengming Wan<br>DTYPE hdfsds<br>OPTIONS yrev template<br>unpack scale_factor add_offset
<br>undef -999.0<br>XDEF 7200 linear -180 0.05<br>YDEF 3600 linear -90 0.05<br>ZDEF 1 linear 1 1<br>TDEF 31 linear 01JUL2004 1dy<br>VARS 6<br>LST_Day_CMG=>LSTDay 0 y,x Daily daytime 3min CMG Land-surface Temp<br>LST_Night_CMG=>LSTNite 0 y,x Daily nighttime 3min CMG Land-surface Temp
<br>QC_Day=>QCDay 0 y,x Quality control for daytime LST and emissivity<br>QC_Night=>QCNite 0 y,x Quality control for nighttime LST and emissivity<br>Day_view_time=>DayTime 0 y,x Time of daytime LST observation (UTC)
<br>Night_view_time=>NiteTime 0 y,x Time of nighttime LST observation (UTC)<br>ENDVARS<br><br><br><br><div class="gmail_quote">On Jan 12, 2008 2:34 PM, li zhao <<a href="mailto:janelizhao@yahoo.com">janelizhao@yahoo.com
</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Brian,<br><br>I think the problem is not with scale_factor and<br>add_off. Also, I did "ncdump" on that hdf file and
<br>figured out the variables and included them in the ctl<br>file when I posted my question in the previous mail.<br><br>Infact I ran this script on GrADS v1.9b4 on alpha<br>machine. However when I run the same version of grads
<br>on LINUX X86_64, the script gives error messages as I<br>mentioned in the last mail.<br><br><br>For your information I am attaching the errors again:<br><div class="Ih2E3d"> ga-> d lst_day_cmg<br></div><div class="Ih2E3d">
HDF-SDS Read Error for dtype UINT16<br>Data Request Error: Error for variable 'lst_day_cmg'<br>Error ocurred at column 1<br>DISPLAY error: Invalid expression<br>Expression = lst_day_cmg<br><br><br></div>Please also see the attached ctl file:
<br><div><div></div><div class="Wj3C7c"><br><br> ***********************************************<br> dset ^MOD11C3.A2000061.004.2004116185101.hdf<br> dtype hdfsds<br> options yrev<br> undef 0s<br> unpack scale_factor add_off
<br> xdef 7200 linear -180.0 0.05<br> ydef 3600 linear -90.0 0.05<br> zdef 1 levels 1<br> tdef 1 linear 1jan1989 1dy<br> vars 16<br> LST_Day_CMG=>lst_day_cmg 1 z,y,x Monthly daytime<br> 3min<br> CMG Land-surface Temperature
<br> QC_Day=>qc_day 0 y,x Sea surface temperature<br> Day_view_time=>day_view_time 0 y,x Sea surface<br> temperature<br> Day_view_angl=>day_view_angl 0 y,x Sea surface<br> temperature<br> Clear_sky_days=>clear_sky_days 0 y,x Sea surface
<br> temperature<br> LST_Night_CMG=>lst_night_cmg 0 y,x Sea surface<br> temperature<br> QC_Night=>qc_night 0 y,x Sea surface temperature<br> Night_view_time=>night_view_time 0 y,x Sea surface<br> temperature<br> Night_view_angl=>night_view_angl 0 y,x Sea surface
<br> temperature<br> Clear_sky_Night=>clear_sky_night 0 y,x Sea surface<br> temperature<br> Emis_20=>emis_20 0 y,x Sea surface temperature<br> Emis_22=>emis_22 0 y,x Sea surface temperature<br> Emis_23=>emis_23 0 y,x Sea surface temperature
<br> Emis_29=>emis_29 0 y,x Sea surface temperature<br> Emis_31=>emis_31 0 y,x Sea surface temperature<br> Emis_32=>emis_32 0 y,x Sea surface temperature<br> endvars<br></div></div>***********************************************************************
<br><br>regards<br>Zhao<br><div><div></div><div class="Wj3C7c"><br>--- brian vant-hull <<a href="mailto:brianvanthull@YAHOO.COM">brianvanthull@YAHOO.COM</a>> wrote:<br><br>> Zhao;<br>> 'scale_factor' and 'add_off' are just example
<br>> variables in user's guide. You have to provide<br>> names<br>> that are spelled exactly as they appear in the hdf<br>> file. Unfortunately these names often change<br>> depending on the variable within each file! In that
<br>> case you'd have to open the file separately for each<br>> variable.<br>><br>> I don't know if there's a way to have GrADS dump the<br>> variable names so you can put them in the ctl file.<br>
> If not, IDL and Matlab have built in functions, and<br>> you can download libraries to read hdf in C or<br>> Fortran. Or just ask someone else who's figured out<br>> how to use your particular dataset. Once you have
<br>> the<br>> correct names for the offset and scale you are good<br>> to<br>> go.<br>><br>> Anybody who has worked with hdf before should be<br>> able<br>> to give you something that will get the variable
<br>> names<br>> for you, but it's a multiple step process or<br>> program.<br>> If you have IDL or Matlab go to<br>> <a href="http://www.atmos.umd.edu/%7Egcm" target="_blank">http://www.atmos.umd.edu/~gcm
</a> and click on the blue<br>> useful button, then go down to the link about<br>> reading<br>> hdf in matlab and IDL. This will show you how to go<br>> about it.<br>><br>> -Brian.<br>><br>> --- li zhao <
<a href="mailto:janelizhao@YAHOO.COM">janelizhao@YAHOO.COM</a>> wrote:<br>><br>> > Hi everybody,<br>> ><br>> > Probably this is a simple fix but I must be<br>> missing<br>> > something. I try to open a hdf file and it loads
<br>> > well,<br>> > but giving the following error message when<br>> > displaying<br>> > the variable.<br>> ><br>> > ga-> d lst_day_cmg<br>> > Warning: HDF attribute named "add_off" does not
<br>> > exist<br>> > Warning: Could not retrieve "add_off" -- setting<br>> to<br>> > 0.0<br>> > HDF-SDS Read Error for dtype UINT16<br>> > Data Request Error: Error for variable
<br>> > 'lst_day_cmg'<br>> > Error ocurred at column 1<br>> > DISPLAY error: Invalid expression<br>> > Expression = lst_day_cmg<br>> ><br>> ><br>> > Grads configuration as follows:
<br>> > (Config: v1.9b4 32-bit little-endian readline<br>> > sdf/xdf<br>> > hdf-sds netcdf lats printim)<br>> ><br>> ><br>> > Below is the actual ctl file I am using:<br>> ><br>> > ***********************************************
<br>> > dset ^MOD11C3.A2000061.004.2004116185101.hdf<br>> > dtype hdfsds<br>> > options yrev<br>> > undef 0s<br>> > unpack scale_factor add_off<br>> > xdef 7200 linear -180.0 0.05<br>> > ydef 3600 linear -
90.0 0.05<br>> > zdef 1 levels 1<br>> > tdef 1 linear 1jan1989 1dy<br>> > vars 16<br>> > LST_Day_CMG=>lst_day_cmg 1 z,y,x Monthly daytime<br>> > 3min<br>> > CMG Land-surface Temperature
<br>> > QC_Day=>qc_day 0 y,x Sea surface temperature<br>> > Day_view_time=>day_view_time 0 y,x Sea surface<br>> > temperature<br>> > Day_view_angl=>day_view_angl 0 y,x Sea surface<br>> > temperature
<br>> > Clear_sky_days=>clear_sky_days 0 y,x Sea surface<br>> > temperature<br>> > LST_Night_CMG=>lst_night_cmg 0 y,x Sea surface<br>> > temperature<br>> > QC_Night=>qc_night 0 y,x Sea surface temperature
<br>> > Night_view_time=>night_view_time 0 y,x Sea surface<br>> > temperature<br>> > Night_view_angl=>night_view_angl 0 y,x Sea surface<br>> > temperature<br>> > Clear_sky_Night=>clear_sky_night 0 y,x Sea surface
<br>> > temperature<br>> > Emis_20=>emis_20 0 y,x Sea surface temperature<br>> > Emis_22=>emis_22 0 y,x Sea surface temperature<br>> > Emis_23=>emis_23 0 y,x Sea surface temperature<br>> > Emis_29=>emis_29 0 y,x Sea surface temperature
<br>> > Emis_31=>emis_31 0 y,x Sea surface temperature<br>> > Emis_32=>emis_32 0 y,x Sea surface temperature<br>> > endvars<br>> ><br>> > Thanks for your help,<br>> > Zhao<br>> >
<br>> ><br>> ><br>> ><br>><br>____________________________________________________________________________________<br>> > Looking for last minute shopping deals?<br>> > Find them fast with Yahoo! Search.
<br>> ><br>><br><a href="http://tools.search.yahoo.com/newsearch/category.php?category=shopping" target="_blank">http://tools.search.yahoo.com/newsearch/category.php?category=shopping</a><br>> ><br>><br>
><br>> Brian Vant-Hull<br>> 917-318-4481<br>><br>><br>><br>><br>____________________________________________________________________________________<br>> Looking for last minute shopping deals?<br>
> Find them fast with Yahoo! Search.<br>><br><a href="http://tools.search.yahoo.com/newsearch/category.php?category=shopping" target="_blank">http://tools.search.yahoo.com/newsearch/category.php?category=shopping</a>
<br>><br><br><br><br></div></div><div class="WgoR0d"> ____________________________________________________________________________________<br>Never miss a thing. Make Yahoo your home page.<br><a href="http://www.yahoo.com/r/hs" target="_blank">
http://www.yahoo.com/r/hs</a><br></div></blockquote></div><br>