comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: netCDF/CF conventions

Re: netCDF/CF conventions
type: item
description: jutta.holst@meteo.uni-freiburg.de wrote: > Hello, > I am trying to convert ascii data into netCDF files using the > climate&forecast conventions. > > Unfortunately, it does not really work as the CF-checker allways gives > the warning: > 'no standard_name or long_name atrributes'. > > Does anyone have an idea what I am doing wrong (code is given below)? > > Thank you! > Jutta > Hi Jutta if that is a corrosponding netcdf short_name than the ' ' blank makes trouble. prep_name = ' precipitation_amount' I have written a book about how we do create netCDF files based on a structure, may be you are interested: http://www.fz-juelich.de/zb/datapool/page/439/00322_Bauer.pd f that depends on our library see below cheers Reimar > PRO WRITE_NETCDF_TUT3 > ;+ > ;Name: > ; WRITE_NetCDF > ; > ;Purpose: > ; This program creates simple NetCDF files containing > ; meteorological data > ; > ;Input: > ; Meteorological data > ; 1. year > ; 2 DOY > ; 3. time > ; 4. air temperature above canopy 1.3h (ï¿½C) > ; 5. air temperature within canopy 1.3 m a.g.l. (ï¿½C) > ; 6. relative humidity above canopy 1.3h (%) > ; 7. relative humidity within canopy 1.3 m a.g.l (%) > ; 8. wind velocity 42 m a.g.l. (ï¿½) > ; 9. wind direction 42 m a.g.l. (ï¿½) > ; 10. precipitation above canopy 30 m a.g.l. (mm) > ; 11. net radiation 16 m a.g.l. (W/m2) > ; 12. incoming short wave radiation 1.3h (W/m2) > ; 13. outgoing short wave radiation 1.3h (W/m2) > ; 14. incoming long wave radiation 1.3h (W/m2) > ; 15. outgoing long wave radiation 1.3h (W/m2) > ; 16. soil temperature 0.01 m depth (ï¿½C) > ; 17. soil temperature 0.03 m depth (ï¿½C) > ; 18. soil temperature 0.05 m depth (ï¿½C) > ; 19. soil temperature 0.10 m depth (ï¿½C) > ; 20. soil temperature 0.20 m depth (ï¿½C) > ; 21. soil temperature 0.40 m depth (ï¿½C) > ; 22. volumetric soil moisture content (%) > ; > ;Output: > ; NetCDF file containing Tuttlingen meteorological data > ; > ;Keywords: > ; none > ; > ;Author and history: > ; Dirk Schindler Oct 2006 > > …
creator: R.Bauer
date: 2007-02-01T15:18:18-00:00

Re: netCDF/CF conventions
type: item
description: jutta.holst@meteo.uni-freiburg.de wrote: > Hello, > I am trying to convert ascii data into netCDF files using the > climate&forecast conventions. > > Unfortunately, it does not really work as the CF-checker allways gives > the warning: > 'no standard_name or long_name atrributes'. > > Does anyone have an idea what I am doing wrong (code is given below)? Yes. You are not writing variables attributes with the names "standard_name" and "long_name". "longname" /= "long_name" and there is nothing that comes close to "standard_name" in your variable attributes. BTW, you might want to "object-ify" the code a little bit to minimise the cut-n-paste programming. Makes it easier to find bugs and you won;t have to do a NCDF_ATTPUT for "long_name" (and others) more than once. cheers, paulv [code snipped] -- Paul van Delst Ride lots. CIMSS @ NOAA/NCEP/EMC Eddy Merckx
creator: Paul Van Delst[1]
date: 2007-02-01T15:44:32-00:00

Re: netCDF/CF conventions
type: item
description: Thank you vry much for your answers! These helped a lot. But now another "problem" came up: I do have time series of air temperature below and above the canopy - both have the standard_name air_temperature. How do I manage to include both temperatures in the netcdf file? Until now, it only shows the last temperature as the variable name is the same? PS: Sorry for the "ugly" programming and stupid questions...
creator: jutta.holst
date: 2007-02-02T08:55:50-00:00

Re: netCDF/CF conventions
type: item
description: jutta.holst@meteo.uni-freiburg.de wrote: > Thank you vry much for your answers! These helped a lot. > > But now another "problem" came up: I do have time series of air > temperature below and above the canopy - both have the standard_name > air_temperature. How do I manage to include both temperatures in the > netcdf file? Until now, it only shows the last temperature as the > variable name is the same? You could add the experiment name to each short_name We do that by a separator of : For using that sign you need a recent netCDF library installed. The one delivered with idl is now about 6 years old and it is to old for this sign So may be use an _ cheers Reimar > > PS: Sorry for the "ugly" programming and stupid questions... > -- Reimar Bauer Institut fuer Stratosphaerische Chemie (ICG-1) Forschungszentrum Juelich email: R.Bauer@fz-juelich.de ------------------------------------------------------------ ------- a IDL library at ForschungsZentrum Juelich http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html ============================================================ =======
creator: R.Bauer
date: 2007-02-02T11:24:10-00:00

Re: netCDF/CF conventions
type: item
description: > You could add the experiment name to each short_name > We do that by a separator of : > > For using that sign you need a recent netCDF library installed. The one > delivered with idl is now about 6 years old and it is to old for this sign > > So may be use an _ > So I can just give other names such as air_temperature_below_canopy ? Jutta
creator: jutta.holst
date: 2007-02-02T11:41:15-00:00

Re: netCDF/CF conventions
type: item
description: jutta.holst@meteo.uni-freiburg.de wrote: >> You could add the experiment name to each short_name >> We do that by a separator of : >> >> For using that sign you need a recent netCDF library installed. The one >> delivered with idl is now about 6 years old and it is to old for this sign >> >> So may be use an _ >> > > > So I can just give other names such as air_temperature_below_canopy ? > > Jutta Depends on you and your applications if they are name sensitive cheers Reimar -- Reimar Bauer Institut fuer Stratosphaerische Chemie (ICG-1) Forschungszentrum Juelich email: R.Bauer@fz-juelich.de ------------------------------------------------------------ ------- a IDL library at ForschungsZentrum Juelich http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html ============================================================ =======
creator: R.Bauer
date: 2007-02-02T15:05:17-00:00

Re: netCDF/CF conventions
type: item
description: > Depends on you and your applications if they are name sensitive OK - I'll ask them, what they want... Thank you!
creator: jutta.holst
date: 2007-02-02T15:30:14-00:00

Re: netCDF/CF conventions
type: item
description: jutta.holst@meteo.uni-freiburg.de wrote: > Thank you vry much for your answers! These helped a lot. > > But now another "problem" came up: I do have time series of air > temperature below and above the canopy - both have the standard_name > air_temperature. How do I manage to include both temperatures in the > netcdf file? Until now, it only shows the last temperature as the > variable name is the same? From your original post, I assumed "standard_name" was an attribute. Do you mean that it is actually the variable name? If so, then, no, you can't have two variables with the same name. As you have already figured out, names of air_temperature_below_canopy and air_temperature_above_canopy will work (assuming you don't other field-accepted names for those quantities.) > PS: Sorry for the "ugly" programming and stupid questions... We all write wet[1] code at some point, and there are no stupid questions[2] :o) cheers, paulv [1] http://en.wikipedia.org/wiki/DRY_code [2] some could be considered asinine I guess; but your questions do not fall into that category. :o) -- Paul van Delst Ride lots. CIMSS @ NOAA/NCEP/EMC Eddy Merckx Ph: (301)763-8000 x7748 Fax:(301)763-8545
creator: Paul Van Delst[1]
date: 2007-02-02T16:42:32-00:00

Re: netCDF/CF conventions
type: item
description: > From your original post, I assumed "standard_name" was an attribute. Do you mean that it > is actually the variable name? If so, then, no, you can't have two variables with the same > name. The way, I have it now is, that the standard_name is the variable name and the long_name has some more information. Before it was somewhat different... > As you have already figured out, names of air_temperature_below_canopy and > air_temperature_above_canopy will work (assuming you don't other field-accepted names for > those quantities.) OK > [1]http://en.wikipedia.org/wiki/DRY_code I'll try to keep that in mind ;-) Have a nice weekend, Jutta
creator: jutta.holst
date: 2007-02-02T17:44:17-00:00