[NARCCAP-discuss] FAN

Antonia Rosati arosati at ucar.edu
Tue May 31 16:27:56 MDT 2011


Greetings narccap-discuss!
We received a great question last week. If anyone has any further 
input or experience with this type of problem, please post a response!


QUESTION:

I'm new to using netdcf files but have followed your link at
http://www.narccap.ucar.edu/data/ascii-howto.html and it has been very 
helpful. A problem I'm having however is when trying to extract a 
range of coordinates what is the format you use? I have tried nc2text 
pr_WRFP.nc pr[,yc=3-10,xc=5-10] > data.y3.x5.txt and other variations 
but they do not seem to work.
I am trying to take U and V wind component data from multiple 
Reanalysis files for a specific region, all of Europe, and produce a 
time series of the magnitude which can then be queried in MS Access. I 
want the output to be organized as a time series for each specific 
location on the grid, such as:

Time              Lat Lon U  V    Magnitude
01/01/2000 00:00  35 -10  2.7 8.9  9.3
01/01/2000 06:00  35 -7.5 x y sqrt(x^2 + y^2)
And so on..

The source is Reanalysis data from the NCEP website.

Any help would be much appreciated.

Thanks in advance,
David
__________________________________

ANSWER:

Hi David,

FAN (File Array Notation) is an array-oriented language for 
identifying data items in files for the purpose of extraction or 
modification.
One of FAN's utilities is nc2text which prints selected data from 
netCDF variables. ncdump can also print data from netCDF variables, 
but only entire variables and only together with metadata in CDL form.

Explanation of how to specify a range of values for nc2text is in the 
FAN documentation:
http://www.unidata.ucar.edu/software/netcdf/fan_utils.html

Please note that files from other datasets will probably have 
different dimension and variable names than the NARCCAP data does. It 
is always good to check the specific file you are using by doing 
“ncdump -h” on the file to learn more about its structure.


Toni Rosati
NARCCAP User Community Liaison
National Center for Atmospheric Research (NCAR)
narccap at ucar.edu


More information about the narccap-discuss mailing list