E3SM-Project / E3SM-Project/scorpio

Do we need nc_initialize()/nc_finalize() in PIO?

Open
#200 1 comment 0 reactions 1 assignee Claimed by @dqwu View on GitHub
Low Priority question
Dominant language
C++
Stars
22
Forks
20
Avg merge
12d 19m
Merged PRs (30d)
1

Description

This issue is to investigate whether nc_initialize() and nc_finalize() should be added to PIO. These APIs are used to initialize/finalize low-level libraries (DAP/HDF5/... etc) used by NetCDF.

AFAICT, nc_initialize() is called inside the NetCDF library. nc_initialize() is called via nc_create() or nc_open() - if nc_initialize() is not already called by the user. So it looks like the user does not need to explicitly call nc_initialize().

However the library never calls nc_finalize() . This could be problematic if the low-level libraries (used by NetCDF) performs some cleanup in the library-specific finalize calls (that is only called by NetCDF in nc_finalize() ).

This is a peculiar behaviour of the NetCDF library since the library should have invoked nc_finalize() without explicit calls from the user (since the library implicitly calls nc_initialize()).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.