This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: Roger Proctor <address@hidden> >Subject: query >Organization: . >Keywords: 199905192208.QAA23759 Hi Roger, > i'm a new user of netcdf. > if i have two scalar components of wind, say uwind & vwind, how do > i combine them into a vector variable so that i can plot the vectors > in a package like ferret? Good question. We just use separate variables u_wind and v_wind, but then applications must "know" that these represent components of a single vector variable. This can be done in other ways by convention, depending on what conventions you choose to use. I'm not sure what conventions Ferret uses for such variables, and in a quick look at the documentation, I was unable to figure it out. The Ferret documentation states that data must conform to the COARDS conventions, described at http://ferret.wrc.noaa.gov/noaa_coop/coop_cdf_profile.html but I couldn't find this subject addressed in the COARDS conventions. In the "GDT conventions document" at http://www-pcmdi.llnl.gov/drach/GDT_convention.html they say ... Components of vector or tensor quantities could be contained in a single data variable by giving the variable a dimension over components. While there exist advantages for manipulating such a variable in memory, we see no strong advantage in introducing this complexity into the netCDF description, and do not recommend it. Descriptions of other conventions are available from http://www.unidata.ucar.edu/packages/netcdf/conventions.html You might try contacting Steve Hankin <address@hidden> to get a definitive answer about how to make Ferret understand vector variables. I'd be interested in the answer. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu --------------------------------------- Date: Tue, 25 May 1999 19:09:13 +0100 From: roger proctor <address@hidden> Organization: Natural Environment Research Council X-Mailer: Mozilla 3.01SGoldC-SGI (X11; I; IRIX 6.3 IP32) MIME-Version: 1.0 To: address@hidden Subject: NetCDF query [Fwd: Re: ferret] Russ Attached is the answer to the question about forming vector quantities. I'm quite happy with this. Thanks for your idea. Cheers Roger -- CCMS - Proudman Oceanographic Laboratory, Bidston Observatory, Birkenhead, Merseyside L43 7RA, U.K. Tel: +44-151-653-8633 Fax: +44-151-653-6269 Email: address@hidden URL: http://www.pol.ac.uk --------------4531158753D5 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: <address@hidden> Received: from zeta.pmel.noaa.gov by unixa.nerc-bidston.ac.uk (8.8.7/NERC-1.5(Solaris 2.x, SMTP)) id AAA20535; Fri, 21 May 1999 00:12:41 +0100 (BST) Received: from pmel.noaa.gov (outlaw.pmel.noaa.gov) by ZETA.PMEL.NOAA.GOV (PMDF V5.1-12 #27385) with ESMTP id <address@hidden> for address@hidden; Thu, 20 May 1999 16:12:37 PDT Date: Thu, 20 May 1999 16:16:14 -0700 From: Steve Hankin <address@hidden> Subject: Re: ferret To: Roger Proctor <address@hidden> Message-id: <address@hidden> Organization: NOAA/Pacific Marine Environmental Laboratory MIME-version: 1.0 X-Mailer: Mozilla 4.5 [en] (WinNT; I) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <address@hidden> The two variables "uwnd" and "vwnd" are entirely independent. The command VECTOR uwnd, vwnd is the point at which they are associated into a "vector". In the GUI identifies likely variable pairs based on clues in the variable names. It is only a figment of the user interface. If you use the "SCRIPTS ->COMMAND LINE" menu (something close to those names), you'll see that you could make vector pairs out of anything. So in your netCDF file just write the variables temp salt u v w Ferret will handle the rest. Easy as pie (we hope :-} ). - steve Roger Proctor wrote: > > Hello Steve > I'm a new user of ferret. I have looked at the examples and particularly > the navy winds example which has three data variables > uwind, vwind and uwind,vwind > thus allowing the wind vector to be drawn. I want to do the same > but don't understand how to create the variable (uwind,vwind) in a netcdf > file. I can see from the documentation how to do this within ferret > by loading uwind and vwind as scalars and creating the vector. > However I would like to create the vector outside of ferret in the > netcdf file. doing a nvdump on the navy winds file doesn't provide me > with any clues. Can you help me? (oops, nvdump = ncdump). > > What i really want to do is output my model data directly in netcdf format, > i.e. creating a file with 3d variables salinity, temperature and currents. > Surely someone must have done this! > > best wishes > > Roger Proctor > > ps what i should have added is that i am a new user of netcdf too! I > contacted the netcdf help & they are not sure how to do it!! > Centre for Coastal and Marine Sciences, Proudman Oceanographic Laboratory, > Bidston Observatory, Birkenhead, Merseyside L43 7RA, U.K. > Tel: +44-151-653-8633 Fax: +44-151-653-6269 > URL: http://www.pol.ac.uk====================Internet: address@hidden -- | NOAA/PMEL | ph. (206) 526-6080 Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744 | Seattle, WA 98115-0070 | address@hidden