Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect use of optional parameters in nf90_create call in chgres_cube.fd/write_data.F90 #307

Closed
edwardhartnett opened this issue Feb 18, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Collaborator

in chgres_cube.fd/write_data.F90 we have:

error = nf90_create(outfile, IOR(NF90_NETCDF4,NF90_CLASSIC_MODEL), &
                     ncid, initialsize=initial, chunksize=fsize)

I need to doublecheck but I'm pretty sure that the initialsize and chunksize parameters are only used for classic files, and are ignored for netcdf4 files. So they should be removed.

@edwardhartnett edwardhartnett added the enhancement New feature or request label Feb 18, 2021
@GeorgeGayno-NOAA
Copy link
Collaborator

This will be addressed in #689.

@edwardhartnett
Copy link
Collaborator Author

Correct: initialsize and chunksize in nf90_create() are holdovers from attempts to make classic files perform better. I don't think they really help much in any case, but certainly with NETCDF4 files they are not needed and will simply be ignored.

The chunksize here is not to be confused with the HDF5 chunksizes that netCDF-4 supports. The HDF5 chunksizes are set on a per-variable basis, and are multi-dimensional, with dimensions that match the variable. For example, a 3D variable needs 3 chunksizes, a 5D variable needs 5.

In netCDF-4 files, chunksizes can be optimized for faster reading and writing. If you don't select chunksizes for a variable, then netCDF picks them for you, doing the best it can.

@LarissaReames-NOAA
Copy link
Collaborator

@edwardhartnett Can we close this issue now that #704 is merged?

@edwardhartnett
Copy link
Collaborator Author

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants