Giter Site home page Giter Site logo

Comments (9)

wanglei5212749 avatar wanglei5212749 commented on August 23, 2024

Hi, I have checked the netcdf version 4.1.3 and I find that the NF_DEF_VAR_DEFLATE is a netcdff-77 function. The usage of it is to deflate the variable to a small storage. However, there are two prerequisites to use this function. First, the variable to be deflated must has a netCDF-4 feature. Second, this function can't be used when using parallel I/O for writing data.

from isca.

sit23 avatar sit23 commented on August 23, 2024

OK - thanks @wanglei5212749. That's good to know. Given that this function compiles OK with later NETCDF versions, do you think those requirements changed between NETCDF versions?

from isca.

wanglei5212749 avatar wanglei5212749 commented on August 23, 2024

In my view, most of the climate models use a parallel I/O for writing data. And sometimes we use "--disable-netcdf-4" parameter when compile netcdf to avoid some library conflicts. This means we just build a netCDF-3 library without support for the netCDF-4 formats or functions(see here: https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html).
In any of this two conditions, we can not use NF_DEF_VAR_DEFLATE function because the interface of NF_DEF_VAR_DEFLATE is not existing in the netcdf library we compiled. and it will cause a compile-error when we compile the model.

from isca.

wanglei5212749 avatar wanglei5212749 commented on August 23, 2024

To avoid this error, We have two ways. (1)we can recompile the netcdf library we used to make it support for the netCDF-4 formats or functions(But still not use the parallel I/O for writing data). (2)we just comment this line to avoid the compile-error and this will not cause any difference to the model simulation performance except that it may have a little large disk storage. Also we can just comment the usage of #ifndef use_netCDF3 directly to avoid the compile-error.

from isca.

wanglei5212749 avatar wanglei5212749 commented on August 23, 2024

OK - thanks @wanglei5212749. That's good to know. Given that this function compiles OK with later NETCDF versions, do you think those requirements changed between NETCDF versions?

In this condition, I think this problem has little relationship with the version we used, But may be caused by that we don't have the netCDF-4 formats or functions supported. Maybe can be tested by another netcdf library with the netCDF-4 formats or functions supported to see if this compile-error still existed.

from isca.

gregcolyer avatar gregcolyer commented on August 23, 2024

I'm not sure I'm following exactly, but option (1) should be what happens normally, i.e. new netCDF features are supported but not used by default (e.g. for created output files). So maybe this is broken by --disable-netcdf-4 and a different workaround for the library conflicts is needed. (Have you tried --disable-dap instead, mentioned in the documentation page linked to above?) According to git blame, the whole of mpp_io_write.inc is from the original GFDL import, so it hasn't changed in 3 years.

from isca.

gregcolyer avatar gregcolyer commented on August 23, 2024

Or under option (2), can you set the flag use_netCDF3 (matching the downgraded library) so that the #ifndef fails as intended?

from isca.

wanglei5212749 avatar wanglei5212749 commented on August 23, 2024

Or under option (2), can you set the flag use_netCDF3 (matching the downgraded library) so that the #ifndef fails as intended?

Yes can set a definition for use_netCDF3 instead.

from isca.

RuthG avatar RuthG commented on August 23, 2024

We'll add a mention of this in the debug docs to help users who run into similar issues.

from isca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.