[ncl-talk] NetCDF filter error: bad id or parameters or duplicate filter

Jonathan Vigh jvigh at ucar.edu
Mon Nov 27 12:27:50 MST 2023


Hi NCL'ers,

My issue has been resolved. NCAR's IT person for my lab was able to build a
version for RAL that uses the "correct" NetCDF library.
I'm sharing this information in case someone else runs into the same issue.

The IT person compared the shared libraries linked in to each version
(i.e. using "ldd") and made a guess as to the culprit. Given the error
message
itself comes from the netcdf c library, it was a pretty safe bet.

>From his email:
"Well, the short answer is to "use netcdf-c-4.8.0". The long answer
involves knowing how to build ncl and all of its dependencies which is a
beast.
He built it with gdal and vis5d which are optional but needed by folks in
RAL (or have been in the past). Newer GDAL builds require the PROJ library
at v6 or greater
(PROJ is at 9.x) while NCL cannot use PROJ greater than 7 and greater than
5 requires hacking a ncl file (minor hack, but still). That's just one
example.
All the shared libs *and* the shared-libs' shared-libs have to match
up exactly or ncl won't build."

I am not sure why the conda-provided version of NCL also had this issue
(maybe something related to my path?). It makes me wonder if a service
update of NCL is in order to ensure it continues working on new OSs.

Best regards,
Jonathan


Jonathan Vigh						
Project Scientist II, Joint Numerical Testbed	
Research Applications Laboratory (RAL)
National Center for Atmospheric Research (NCAR)
P.O. Box 3000                    tel: +1 (303) 497-8205
Boulder, CO 80307-3000   fax: +1 (303) 497-8171Jonathan's Staff Web
Page <http://staff.ral.ucar.edu/jvigh/> (CV, publications,
etc.)Tropical Cyclone Guidance Project
<http://hurricanes.ral.ucar.edu/> (real-time hurricane data)

Tropical Cyclone Data Project <https://verif.rap.ucar.edu/tcdata/>
(FLIGHT+, VDM+, TC-OBS datasets)

HurricaneRiskCalculator®️ <https://wxrisk.io/> (Now available --
Personalized hurricane wind hazard assessments for decision support)

During COVID-19, my working day is likely different from your working
day. Please do not feel obliged to reply to this email outside of your
normal working hours.



On Mon, Nov 20, 2023 at 9:28 PM Jonathan Vigh <jvigh at ucar.edu> wrote:

> Greetings NCL'ers,
>
> Has anyone ever encountered an error like this before when defining a
> filevar for a NetCDF file?
>
>
> *fatal:["NclNetCDF4.c":5409]:NetCDF: Filter error: bad id or parameters or
> duplicate filterfatal:["NclAdvancedFile.c":6126]:AdvancedFileAddVar: Error
> adding variable as type: <none>*
>
> The line of code that this is coming from is where the file variable is
> being defined:
>      filevardef(fout, "CYCLONE_ATCF_stormid",typeof(CYCLONE_ATCF_stormid)
> ,"cyclone")
>
> The variable is of type string and I am using the advanced features to
> write out strings:
>      setfileoption("nc","FileStructure","Advanced")
>      setfileoption("nc","Format","NetCDF4")
>
> Variable: CYCLONE_ATCF_stormid
> Type: string
> Total Size: 3328 bytes
>             416 values
> Number of Dimensions: 1
> Dimensions and sizes:   [416]
> Coordinates:
> Number Of Attributes: 4
>   units :       none
>   description : ATCF STORM ID used to designate a given storm in the Best
> Track dataset b-deck file and the Storm Table (e.g. 'AL012013')
>   long_name :   BT_STORM_stormid
>   _FillValue :
> (0)     string
>
> I did not get this error previously, but my machine was recently upgraded
> to Debian Bookworm and now this error is occurring both for the RAL-built
> NCL binary and the one from conda forge.
>
> I do *not* get the error when running on a machine that hasn't been
> upgraded to the new OS. I've boiled the script down to a standalone test
> script in case anyone would like to try it (see attached).
>
> Thanks,
> Jonathan
>
>
>
>
> Jonathan Vigh						
> Project Scientist II, Joint Numerical Testbed	
> Research Applications Laboratory (RAL)
> National Center for Atmospheric Research (NCAR)
> P.O. Box 3000                    tel: +1 (303) 497-8205
> Boulder, CO 80307-3000   fax: +1 (303) 497-8171Jonathan's Staff Web Page <http://staff.ral.ucar.edu/jvigh/> (CV, publications, etc.)Tropical Cyclone Guidance Project <http://hurricanes.ral.ucar.edu/> (real-time hurricane data)
>
> Tropical Cyclone Data Project <https://verif.rap.ucar.edu/tcdata/> (FLIGHT+, VDM+, TC-OBS datasets)
>
> HurricaneRiskCalculator®️ <https://wxrisk.io/> (Now available -- Personalized hurricane wind hazard assessments for decision support)
>
> During COVID-19, my working day is likely different from your working day. Please do not feel obliged to reply to this email outside of your normal working hours.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20231127/ce43d964/attachment.htm>


More information about the ncl-talk mailing list