display error from fwrite data

Jennifer Adams jma at COLA.IGES.ORG
Mon Jul 6 13:45:32 EDT 2009


Starting with version 2.0.a6, the undef value of GrADS output
(including fwrite files) is -9.99e8 BY DEFAULT unless you explicitly
set the undef value with the 'set undef' command. Please read the
documentation:
http://iges.org/grads/gadoc/gradcomdsetundef.html

More comments inline below ...


On Jul 6, 2009, at 10:57 AM, Muhammad Rahiz wrote:

> I did a test run with fwrite, got an ouput but the display gives me
> junk. Does anyone know why?
>
> This was what I did;
>
> 'open sample.file.ctl'
> 'set fwrite output.bin'
> 'set gxout fwrite'
> 'define var.new = ave(var,t=1,t=124)
> 'd var.new'
There is no need to use define here. Just display your expression:
'd ave(var,t=1,t=124)'
>
> 'disable fwrite'
>
> I created the descriptor file (output.ctl) which contains the
> following,
>
> DSET ^output.bin
> UNDEF -1.e34
here you need to change -1.e34 to -9.99e8
or
leave it as is and add a 'set undef file 1' command to the script
fragment above

> XDEF 303 LINEAR 46.25 0.225198675496689
> YDEF 226 LINEAR -5.07 0.2252
> ZDEF 1 LEVELS 1008.23
> TDEF 1 LINEAR 00Z01JAN1961 1mo
note that your new data set has only one time step; that's all you've
written out. In another post you mentioned you were trying to display
other time steps ...

> VARS 1
> var.new 0 99 var.new
> ENDVARS
>
> Opened the file for display;
>
> 'open output.ctl'
> 'd var.new'
>
> Data file sample.file.bin is open as file 1
> LON set to 46.25 114.26
> LAT set to -5.07 45.6
> LEV set to 1008.23 1008.23
> Time values set: 1960:10:1:0 1960:10:1:0
> E set to 1 1
> Notice: Implied interpolation for file output.ctl
> Interpolation will be performed on any data displayed from this file
You're clearly using pdef, although you haven't included that
information in your email. If you want useful answers to your
questions, please present complete information, including which
version of GrADS you are using and which OS you are running on.
--Jennifer



>
>
>
> --
> Muhammad Rahiz  |  Doctoral Student in Regional Climate Modeling
> Climate Research Laboratory, School of Geography & the Environment
> Oxford University Centre for the Environment
> South Parks Road, Oxford, OX1 3QY, United Kingdom
> Tel: +44 (0)1865-285194  Mobile: +44 (0)7854-625974
> Email: muhammad.rahiz at ouce.ox.ac.uk
>
>
>
> <Picture1.jpg>

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090706/91c8fc04/attachment.html 


More information about the gradsusr mailing list