BUG? [was Re: MM5toGrADS]

Eric Salathé salathe at WASHINGTON.EDU
Mon Jun 5 15:24:24 EDT 2006


On May 26, 2006, at 10:40 AM, Hristina Kirova wrote:
> I am trying to run MM5 with 5 domains and I have problem with the
> finest one.But when I tried to vizualize DOMAIN5 with GrADS, using
> MM5toGrADS there is something strange with specific longitudes around -
> 112.For example
>
> ga-> set lon -112.2
> LON set to -112.202 -112.202
> ga-> d t
> Data Request Error: Invalid grid coordinates
> World coordinates convert to non-integer grid coordinates
>     Variable = t  Dimension = 0
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = t

It appears that GrADs has a lower limit to the grid size it can handle,
which would be a bug. Can anyone confirm this? Hristina's CTL file has
the following:

dset ^MMOUT.dat
byteswapped
title MM5 data
undef -9999.
pdef  120  120 lcc   32.91 -112.76    1.00    1.00   30.00   60.00
-110.00   1000.   1000.
xdef    297 linear    -112.80  0.0045
ydef    249 linear      32.91  0.0045
zdef  23 levels
<ETC>

It is easy to test this in isolation with a generic real*4 array in the
.dat file and varying the grid spacing in the CTL file.

Make a data file like this:

program test_file
   integer, parameter :: nx=297, ny=249
   real :: data(nx,ny)

   do ix = 1, nx
      do jy=1,ny
         data(ix,jy) = ix*jy
      end do
   end do

   open (unit=1,file='test_data.dat',access='direct', recl=nx*ny*4)
   write(1,rec=1) data
   close (1)
end program test_file

And this ctl file:

dset ^test_data.dat
undef -9999.
xdef    297 linear    -112.80  0.0045
ydef    249 linear      32.91  0.0045
zdef     1 levels     0
tdef   1 linear 00:00Z11JAN2006 1hr
vars   1
t   0 99 temerature
endvars

open in grads and "set x 134" followed by "d t" I get

Data Request Error: Invalid grid coordinates
   World coordinates convert to non-integer grid coordinates
     Variable = t  Dimension = 0
   Error ocurred at column 1
DISPLAY error:  Invalid expression
   Expression = t

Simply change 0.0045 to 0.045 in xdef and ydef, and it works as
expected.

-Eric

On May 26, 2006, at 10:40 AM, Hristina Kirova wrote:

> Hi,
>
> I am trying to run MM5 with 5 domains and I have problem with the
> finest one.But when I tried to vizualize DOMAIN5 with GrADS, using
> MM5toGrADS there is something strange with specific longitudes around -
> 112.For example
>
> ga-> set lon -112.2
> LON set to -112.202 -112.202
> ga-> d t
> Data Request Error: Invalid grid coordinates
> World coordinates convert to non-integer grid coordinates
>     Variable = t  Dimension = 0
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = t
>
> The same is situation with longitudes  -112 and -112.1.These longitudes
> are  in the middle of the domain5 and there are not inside of
> particular
> grid cell.All other data for different from these lon are OK.
> I sent my problem to mm5 users list but they wrote to me that there is
> nothing wrong with my MMOUT_DOMAIN5 file and it is may be a problem
> which have to be send to the grads users list.
> In MM5toGrads there is a possibility to prepare a GrADS file only for 1
> point.So I used
> ga-> query w2gr -112 33
> Xdim = 178.778  Ydim = 21.0001
>
> and put this values in mm5_to_gradsc.csh:
> ............................
> IFSKEW=1
> ! IFSKEW=0 will write fully 3-D data
> ! IFSKEW=1 will write out data at 1 grid point only.
> ISKW=178.778 ! the i point (in N-S direction)
> JSKW=21.0001 ! the j point (in E-W direction)
>
> ..............
>
> and with so created file it is possible to be ploted  different
> variables.
>
> I put my MMOUT_DOMAIN5.gz on ftp://ftp.meteo.bg/incoming/
>
> Can someone help me to solve this problem?
>
> Thank you very much
>
> Hristina
>
>
> --
> National Institute of Meteorology and Hydrology (http://www.meteo.bg/)
>
>
--
Eric Salathé
Climate Impacts Group             <salathe at washington.edu>
University of Washington
<http://www.atmos.washington.edu/~salathe>



More information about the gradsusr mailing list