[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #PRS-970596]: Help
- Subject: [netCDF #PRS-970596]: Help
- Date: Mon, 23 Aug 2010 13:23:10 -0600
Stephen,
> This did not seem to add the values to the level axis
Did it return an error? Do you have a complete program that
we can use to reproduce the problem? Sorry, but from the above
it's just not clear what you are trying to do and how it's
failing ...
> (I am using netCDF 3.6.x if this make a difference )
That shouldn't make any difference, it looks like you are only using
netCDF-3 functions.
--Russ
> Stephen
>
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: Friday, August 13, 2010 3:32 PM
> To: Ashworth, Stephen - IS
> Cc: address@hidden
> Subject: [netCDF #PRS-970596]: Help
>
> Hi Stephan,
>
> > FYI: I have been able to build netCDF in the Windows by rebuild the c
> > project as a static library and then using the C++ interface inside my
> > Project
>
> Good, congratulations!
>
> > I have another question / issue:
> >
> > Using the pres_temp_4D_wr.cpp example, I have been able to create a file
> > and then display it.
> >
> > I would like to be able to define a 3rd dimension ( i.e. in the example
> > "level") in terms of a variable for altitudes. When using the display tool
> > (LLnL VisIt), I can not display the pressure.
>
> I'm not usre I understand the question, but maybe you just want to define a
> third coordinate variable, level, to provide the altitudes corresponding to
> each level dimension index. In that case, just follow the pattern for latVar
> and lonVar:
>
> // Define the level coordinate variable for altitudes
> NcVar *levelVar;
> if (!(levelVar = dataFile.add_var("level", ncFloat, lvlDim)))
>
> // Define the units attribute for the level coordinate variable.
> if (!levelVar->add_att("units", "meters"))
> return NC_ERR;
>
> // Write the level coordinate variable data to the file.
> float levels[NLVL];
> for (int lvl = 0; lvl < NLVL; lvl++)
> levels[lvl] = 100.0 * lvl; // for 0 meters, 100 meters, ...
> if (!levelVar->put(levels, NLVL))
> return NC_ERR;
>
> --Russ
>
> Russ Rew UCAR Unidata Program
> address@hidden http://www.unidata.ucar.edu
>
>
>
> Ticket Details
> ===================
> Ticket ID: PRS-970596
> Department: Support netCDF
> Priority: Normal
> Status: Closed
>
>
> This e-mail and any files transmitted with it may be proprietary and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this e-mail in error please notify the sender.
> Please note that any views or opinions presented in this e-mail are solely
> those of the author and do not necessarily represent those of ITT
> Corporation. The recipient should check this e-mail and any attachments for
> the presence of viruses. ITT accepts no liability for any damage caused by
> any virus transmitted by this e-mail.
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: PRS-970596
Department: Support netCDF
Priority: Normal
Status: Closed