[ncl-install] NCL install with NetCDF-4 undeclared variable NC_NETCDF4

Marcin Sliwowski ms275 at duke.edu
Tue Feb 17 11:17:03 MST 2009


Mary,

Thank you very much for your explanation. I am now content with this.

One last thing I need to ask, even though I say no to the classic
netCDF-4 support question in NCL's configure, will NCL still be able to
handle other  prior netCDF formatted input files such as the ones
without compression?


In case you are curious I am installing NCL and NCARG for use with a
Weather Research Forcasting (WRF) model, and they state that they do not
support netCDF-4 enhanced features, and instead to use netcdf-3 and
netCDF-3.6 for large file support. They told me that if you install
netcdf4 without invoking HDF5 and netCDF-4 capabilities, it should be ok
to use netcdf4. I believe that this is what I have done by disabling
netcdf4 along the way, I just hope the NCL I end up with still has some
netCDF support in it.

Thank You,
Marcin

Mary Haley wrote:
>> Mary,
>>
>> I am still confused on this topic.
>>
>> The netcdf site states the following:
>>
>> the netCDF-4.x releases will only build with the netCDF-4 enhanced
>> features if "--enable-netcdf-4" is provided as a configure option. By
>> default the distribution will build the classic netCDF-3 library. We
>> believe that most users will not need the enhanced netCDF-4 features at
>> this time.
>>
>> So when I read the above I actually did not have to specify
>> --disable-netcdf-4 when configuring my netCDF install but I did it just
>> in case.
>
> That's correct. The NetCDF-4 features are not built by default.
>
>> expected the end product to be a classic netCDF-4 without the
>> new enhanced features. Then when I am configuring NCL and it asks do I
>> want classic netCDF-4 support I say yes.
>>
>> Is there a mislabeling of what classic means between NCL and netCDF-4?
>>
>> I thought that classic NetCDF-4 is basically the previous netCDF-3
>> format support within netCDF-4. The new enhanced netCDF-4 feature is the
>> use of HDF-5 instead of HDF-4 and is enabled by the config flag
>> --enable-netcdf-4
>>
>
> Yes, this is half correct, but classic NetCDF-4 and classic NetCDF-3
> are *not* the same thing.
>
> Classic NetCDF-4 is using HDF 5 under the hood, and has
> compression capabilities.  What this means is that the NetCDF-3
> interface is still being used to create the files, but under the hood,
> an HDF-5 file is being written *and* you have access to compression.
>
> If you don't need compression capabilities, then my recommendation
> is to build NetCDF with the --disable-netcdf-4 option, and then
> when you run NCL's "./Configure", answer "no" to the "do you need
> classic NetCDF 4 support" question.
>
> --Mary
>
>> I have read the NCL installation guide front and back focusing on the
>> NetCDF section and there does seem to be some confusion regarding what
>> classic means:
>>
>> The guide states without classic netCDF-4 support configure the
>> following way:
>>
>> ./configure --disable-f90 --prefix=/usr/local
>>
>> With "classic" netCDF-4 support it instructs to get HDF-5 and set the
>> configure flag enable-netcdf-4, but this is in contrast to what the
>> netCDF site states. It seems that NCL is misusing the term classic, to
>> mean the brand new and enhanced netCDF-4.
>>
>> Please correct me if I am wrong.
>>
>> Thanks,
>> Marcin
>>
>>
>> Mary Haley wrote:
>>> Hi Marcin,
>>>
>>> If you want classic NetCDF 4 support, then you will need to build
>>> NetCDF 4.x with --enable-netcdf set, and make sure --disable-netcdf-4
>>> is not set.
>>> Everything else you're doing is correct.
>>>
>>> You may also want to look at #6 at:
>>>
>>> http://www.ncl.ucar.edu/Download/build_from_src.shtml#Troubleshooting
>>>
>>> With the newer versions of HDF, the "hdf/netcdf.h" include file
>>> doesn't get installed, so you need to remove this reference from the
>>> NCL code.
>>>
>>> --Mary
>>>
>>> On Mon, 16 Feb 2009 15:42:37 -0500
>>>  Marcin Sliwowski <ms275 at duke.edu> wrote:
>>>> Hello Everyone,
>>>>
>>>> I installed netCDF-4 and used the following config flags:
>>>>
>>>> --prefix=/usr/local/netcdf-4.0-pgi --disable-shared
>>>> --enable-large-file-tests --enable-docs-install --disable-netcdf-4
>>>>
>>>> I installed hdf4.2r4 and used the following config flags:
>>>>
>>>> --prefix=/usr/local/hdf4.2r4-pgi/ --disable-netcdf
>>>> --with-jpeg=/usr/local/jpeg-6b-pgi
>>>>
>>>>
>>>> My problem is on compiling NCL v5.0.0, Two problems encountered and
>>>> solved via troubleshooting guide, one last error remains.
>>>>
>>>> During the NCL configure I say yes to include netCDF-4 support into
>>>> NCL
>>>> because according to the way I understand it I am only asking for the
>>>> "classic" NetCDF support not the new extended netCDF, which is why
>>>> I set
>>>> the flag --disable-netcdf-4 on the config for netCDF-4
>>>>
>>>> Error 1: PGC-F-0206-Can't find include file hdf/netcdf.h (NclHDF.c:
>>>> 26)
>>>> Solved by commenting out: #include <hdf/netcdf.h> in NclHDF.c and
>>>> NclHDFEOS.c as suggested by troubleshooting guide
>>>>
>>>> Error 2: PGC-S-0039-Use of undeclared variable MAX_NC_NAME (NclHDF.c:
>>>> 313)
>>>> Solved by inserting the #defines as indicated in the troubleshooting
>>>> guide
>>>>
>>>> Error 3: PGC-S-0039-Use of undeclared variable NC_NETCDF4
>>>> (NclNetCdf.c: 744)
>>>> PGC-S-0039-Use of undeclared variable NC_CLASSIC_MODEL (NclNetCdf.c:
>>>> 744)
>>>>
>>>> This error does not occur when I answer "no" to the include netCDF-4
>>>> support into NCL, but I want the classic NetCDF-4 support in NCL.
>>>>
>>>> Does anyone have any guidance or advice to get by this error?
>>>>
>>>> Thank You,
>>>> Marcin
>>>>
>>>> -- 
>>>> Marcin Sliwowski
>>>> Systems Programmer
>>>> Duke University - Pratt School of Engineering
>>>> 919-660-8450
>>>>
>>>> _______________________________________________
>>>> ncl-install mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>>
>>
>>
>> -- 
>> Marcin Sliwowski
>> Systems Programmer
>> Duke University - Pratt School of Engineering
>> 919-660-8450
>>
>>


-- 
Marcin Sliwowski
Systems Programmer
Duke University - Pratt School of Engineering
919-660-8450



More information about the ncl-install mailing list