{"id":62174,"library":"netcdf-cxx4","title":"NetCDF-CXX4","description":"C++ interface for NetCDF, a set of machine-independent data formats for array-oriented scientific data.","status":"active","version":"4.3.1","language":"cpp","source_language":null,"source_url":null,"tags":["netcdf","scientific-data","hdf5","array"],"install":[{"cmd":"vcpkg install netcdf-cxx4","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(netcdf_cxx4 CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE netCDF::netcdf)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"netcdf","correct":"#include <netcdf>"}],"quickstart":{"code":"#include <netcdf>\n#include <iostream>\n\nint main() {\n    netCDF::NcFile dataFile(\"test.nc\", netCDF::NcFile::replace);\n    netCDF::NcDim dim = dataFile.addDim(\"x\", 10);\n    netCDF::NcVar var = dataFile.addVar(\"data\", netCDF::ncDouble, dim);\n    std::cout << \"NetCDF file created\\n\";\n    return 0;\n}","lang":"cpp","description":"Create a NetCDF file with a dimension and variable"},"warnings":[{"fix":"Install netcdf-c via vcpkg or system package manager before using netcdf-cxx4.","message":"Requires the C NetCDF library (netcdf-c) to be installed separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'array':18,27 'array-ori':17 'c':4 'cxx4':3 'data':14,21,25 'format':15 'hdf5':26 'independ':13 'interfac':5 'machin':12 'machine-independ':11 'netcdf':2,7,22 'netcdf-cxx4':1 'orient':19 'scientif':20,24 'scientific-data':23 'set':9","created_at":"2026-06-17T05:19:19.107929+00:00","updated_at":"2026-06-17T05:19:19.107929+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}