[gradsusr] Displaying a .nc file
Hosmay Lopez
hlopez at rsmas.miami.edu
Thu Jun 19 10:22:18 EDT 2014
Try this CTL file:
The only difference is how you defined the variables' arguments.
DSET ^atmos_month.nc.0000
UNDEF 1.e-10
DTYPE netcdf
TITLE 6 Months Sample Model Output
*
XDEF 96 LINEAR 0.0 3.75
*
YDEF 80 GAUSR30 1
*
ZDEF 18 LEVELS 1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300
250 200 150
*
TDEF 804 LINEAR JAN0 1MO
*
VARS 7
u 18 t,z,y,x u
v 18 t,z,y,x v
w 18 t,z,y,x v
t 18 t,z,y,x v
sh 18 t,z,y,x v
rh 18 t,z,y,x v
z 18 t,z,y,x v
ENDVARS
Good luck!
Hosmay Lopez
UM/CIMAS/RSMAS NOAA/AOML/PHOD
4301 Rickenbacker Causeway,
Miami, FL 33149, USA
Phone: (305) 361-4329
________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of David Stanfel [dstanfel at ualberta.ca]
Sent: Thursday, June 19, 2014 12:07 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] Displaying a .nc file
It did prompt a list of variables including u, v, w, and z. It still doesn't want to display them.
ga-> q file
File 1 : 6 Months Sample Model Output
Descriptor: cont.ctl
Binary: atmos_month.nc.0000
Type = Gridded
Xsize = 96 Ysize = 80 Zsize = 18 Tsize = 804 Esize = 1
Number of Variables = 7
u 18 0 u
v 18 0 v
w 18 0 v
t 18 0 v
sh 18 0 v
rh 18 0 v
z 18 0 v
ga-> d v
Data Request Error: Error for variable 'v'
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = v
ga-> d sh
Error: Variable sh not in netcdf file
Data Request Error: Error for variable 'sh'
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = sh
Thanks,
David
On Wed, Jun 18, 2014 at 11:58 PM, James T. Potemra <jimp at hawaii.edu<mailto:jimp at hawaii.edu>> wrote:
If you enter "q file" at the GrADS prompt it should list the variables.
On 6/18/14 5:52 PM, David Stanfel wrote:
How do I know what variable name will work? I've tried u, v, w, and z and still only get:
ga-> d v
Error: Variable v not in netcdf file
Data Request Error: Error for variable 'v'
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = v
Thanks,
David
On Wed, Jun 18, 2014 at 11:13 PM, Hosmay Lopez <hlopez at rsmas.miami.edu<mailto:hlopez at rsmas.miami.edu>> wrote:
David,
You should let GrADS know that the file is a netCDF. You do that by adding the following text line in your control file:
DTYPE netcdf
Insert such after the UNDEF line.
Good luck!
Hosmay Lopez
UM/CIMAS/RSMAS NOAA/AOML/PHOD
4301 Rickenbacker Causeway,
Miami, FL 33149, USA
Phone: (305) 361-4329<tel:%28305%29%20361-4329>
________________________________
From: gradsusr-bounces at gradsusr.org<mailto:gradsusr-bounces at gradsusr.org> [gradsusr-bounces at gradsusr.org<mailto:gradsusr-bounces at gradsusr.org>] on behalf of David Stanfel [dstanfel at ualberta.ca<mailto:dstanfel at ualberta.ca>]
Sent: Wednesday, June 18, 2014 10:58 PM
To: GrADS Users Forum
Subject: [gradsusr] Displaying a .nc file
So I figured out how to use a descriptor file but I am still having troubles opening the file. My descriptor file is as follows:
DSET ^atmos_month.nc.0000
UNDEF 1.e-10
TITLE 6 Months Sample Model Output
*
XDEF 96 LINEAR 0.0 3.75
*
YDEF 80 GAUSR30 1
*
ZDEF 18 LEVELS 1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300
250 200 150
*
TDEF 804 LINEAR JAN0 1MO
*
VARS 7
u 18 0 u
v 18 0 v
w 18 0 v
t 18 0 v
sh 18 0 v
rh 18 0 v
z 18 0 v
ENDVARS
It was able to open it without issue:
ga-> open cont.ctl
Scanning description file: cont.ctl
Data file atmos_month.nc.0000 is open as file 1
LON set to 0 360
LAT set to -88.29 88.29
LEV set to 1000 1000
Time values set: 0:1:1:0 0:1:1:0
E set to 1 1
However, I am having trouble displaying the data. I tried to use the display command (d) with this result:
ga-> d atmos_month.nc.0000
Syntax error: Bad file number for variable atmos_month
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = atmos_month.nc.0000
Is my syntax off?
Thanks,
David
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140619/24cbd237/attachment-0001.html
More information about the gradsusr
mailing list