[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #RJB-156641]: hgt.mon.mean.nc and nc2text



Michal.

> Thanks for the links and information.
> Maybe the easiest for me would be to convert the data back to the
> uncompressed format after downloading.
> Can you provide me with a program to download that will do the conversion?.
> Then I do would not have to worry about any problems pulling data from the
> file with my existing routines.
> 
> Is this a command to do that conversion back to uncompressed "nccopy -k
> classic filenetcdf4.nc filenetcdf3.nc" ?

Yes, that's the easiest way to do it, using nccopy.

> How can I get the program to do the conversion back to uncompressed?
>
> I have already downloaded "netCDF 4.3.2" which has in it "bin" directory
> "nccopy.exe" but it will not run due to a missing dll file "hdf5.dll".

The midding hdf5.dll is actually in the binary netcdf 4.3.2 installation, but
you have to set your system path so it can be found.  If your nccopy.exe
is in /some/install/path/bin/nccopy.exe, then I think the hdf5.dll (and 
other libraries it depends on) will be found in either

    /some/install/path/deps/win32/bin
or
    /some/install/path/deps/win64/bin

depending on which distribution you got. I'mn notr a Windows user so I don't
know how to tell your system to look in that directory, but I'm Cc:ing Ward,our 
Windows expert in case you need help with that.

> This is all just out of my depth of knowledge, if there was just a program
> to do nothing but a conversion back to uncompressed that would sold my
> problems straight away and at least I could continue to run my analysis.

There are other programs to do the conversion, but I don't think they are
significantly simpler than nccopy to install or use.  Here's an FAQ answer 
that shows an example of using "ncks" for the same purpose:

  http://www.unidata.ucar.edu/netcdf/docs/faq.html#fv14

-Russ

> Kind Regards
> Michal Snow
> 
> ----- Original Message -----
> From: "Unidata netCDF Support" <address@hidden>
> To: <address@hidden>
> Cc: <address@hidden>
> Sent: Saturday, November 08, 2014 4:06 AM
> Subject: [netCDF #RJB-156641]: hgt.mon.mean.nc and nc2text
> 
> 
> > Michal,
> >
> >> I think I understand what the problem is, now that the data is in a
> >> compressed format and I need to either uncompress it or change something
> >> in
> >> my netCDF programs.
> >>
> >> I have preciously followed these instructions from a friend;
> >> "Set up a directory to muck around in, download
> >> ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/win32/netcdf-3.6.1-beta1-win32dll.zip
> >> and ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/fan-2.0.3.win32bin.zip
> >> and
> >> extract netcdf.dll, ncdump.exe, ncmeta.exe and nc2text.exe. Place your
> >> NetCDF (.nc) file in the directory as well. Open a command prompt and
> >> change
> >> to the directory you created by typing something like 'cd
> >> \Users\amiskelly\Desktop\netcdf'."
> >>
> >> I was then able to run the nc2text command to extract the data. eg
> >> nc2text hgt.mon.mean.nc hgt[,0,35,1]>Text0\N035-1.txt
> >> nc2text hgt.mon.mean.nc hgt[,2,35,1]>Text2\N235-1.txt
> >> nc2text hgt.mon.mean.nc hgt[,5,35,1]>Text5\N535-1.txt
> >>
> >> What I need from you is also an exact set of instructions what to do so
> >> that
> >> I can continue to extract the data into text form. I need the exact step
> >> by
> >> step instrcutions to set up a working version of netCDF on my computer. I
> >> do
> >> not know how to compile files etc. Can you please provide those
> >> instructions. I have tried reading the various links but just do not know
> >> what to do. All I need to do is to achieve what I was doing before.
> >
> > I can provide instructions for how to download and install a pre-compiled
> > netCDF-4 library for Windows from this web page, under the section "Latest
> > Stable Release (netCDF-C 4.3.2)":
> >
> >  http://www.unidata.ucar.edu/software/netcdf/docs/winbin.html
> >
> > However, you will have to decide whether to download the 32-bit or 64-bit
> > configuration, that is one of the files netCDF4.3.2-NC4-32.exe or
> > netCDF4.3.2-NC4-64.exe. If you don't know which one to use, try the 32-bit
> > one first.
> >
> > I can't tell you how to get a version of nc2text.exe that is linked with
> > the new library without compiling it from source.  nc2text is not Unidata
> > software, so we don't maintain or support it.  The original developer,
> > Harvey Davies, retired from the Australian research organization that
> > employed him some years ago, and we have no current contact information
> > for him.
> >
> > However, the source for nc2text is freely available from our collection
> > of third-party software, as part of fan.tar.Z from:
> >
> >  http://www.unidata.ucar.edu/software/netcdf/Contrib.html
> >
> > and you might be able to find instructions for building it or get a
> > pre-built version from someone else, either by asking about it on
> > StackOverflow.com or on the address@hidden mailing list.
> > Beware of just downloading a pre-compiled package from a Google
> > search of nc2text.exe, as most of those seem to be linked with a
> > netCDF-3 library, and hence unable to handle compression.
> >
> > --Russ
> >
> >> ----- Original Message -----
> >> From: "Unidata netCDF Support" <address@hidden>
> >> To: <address@hidden>
> >> Cc: <address@hidden>
> >> Sent: Friday, November 07, 2014 6:05 AM
> >> Subject: [netCDF #RJB-156641]: hgt.mon.mean.nc and nc2text
> >>
> >>
> >> > Hi Michal,
> >> >
> >> >> I have been using the command "nc2text" to extract data from the "Link
> >> >> to
> >> >> files" data set in the link below that extracts the netCDF file "
> >> >> hgt.mon.mean.nc". This is or has always been a netCDF file and has
> >> >> worked
> >> >> for me over the past couple of years, yet this month for the first
> >> >> time
> >> >> the
> >> >> program is telling me "Not a netCDF file" and does not work. The file
> >> >> size
> >> >> of the file "hgt.mon.mean.nc" looks to be about 1/2 of what it should
> >> >> be
> >> >> compared to last month so I susspect the upload to the ftp server has
> >> >> failed. But I do not know if NOAA changed the format or if its corrupt
> >> >> just
> >> >> this month. If the format has changed then has there been an update to
> >> >> "nc2text"?. I have no idea currently.
> >> >>
> >> >> http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBSearch.pl?Dataset=CDC+Derived+NCEP+Reanalysis+Products+Pressure+Level&Variable=Geopotential+height&Statistic=Mean&group=0&submit=Search
> >> >
> >> > NOAA changed to use netCDF-4 classic model format instead of
> >> > netCDF classic format.  The data is still in a netCDF format
> >> > that can be read by any previous netCDF program, as long as
> >> > the program is relinked to the netCDF-4 library. You are
> >> > probably using nc2text linked with the older netCDF-3 library
> >> > that did not support lossless compression of data.  This is
> >> > a feature of netCDF-4 that many organizations are making use
> >> > of, because it results in significantly smaller data files
> >> > that can be accessed more quickly across a network.
> >> >
> >> > More information about the netCDF-4 classic model format is
> >> > available from the links below:
> >> >
> >> >  http://www.unidata.ucar.edu/netcdf/docs/faq.html#formats-and-versions
> >> >  http://www.unidata.ucar.edu/netcdf/workshops/2012/performance/
> >> >  http://www.unidata.ucar.edu/presentations/Rew/netcdf-intro-2014.pdf
> >> >
> >> > If you compiled nc2text from source, you shouldn't have to change
> >> > anything
> >> > in
> >> > the program.  Instead, you need to download a more recent version of
> >> > netCDF-4,
> >> > build and install it, then compile and link nc2text to use the newly
> >> > installed
> >> > netCDF C library.  You can get the new version and instructions for
> >> > building
> >> > it from here:
> >> >
> >> >  http://www.unidata.ucar.edu/netcdf/docs/
> >> >
> >> > --Russ
> >> >
> >> >
> >> > Russ Rew                                         UCAR Unidata Program
> >> > address@hidden                      http://www.unidata.ucar.edu
> >> >
> >> >
> >> >
> >> > Ticket Details
> >> > ===================
> >> > Ticket ID: RJB-156641
> >> > Department: Support netCDF
> >> > Priority: Normal
> >> > Status: Closed
> >> >
> >>
> >>
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: RJB-156641
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: RJB-156641
Department: Support netCDF
Priority: Normal
Status: Closed