#include <stdio.h>
#include <string.h>
#include <netcdf.h>
// ISSUE 1
#define FILENAME "https://power-analysis-ready-datastore.s3.us-west-2.amazonaws.com/power_901_annual_meteorology_utc.zarr/#mode=zarr"
// ISSUE 2
//#define FILENAME "https://hrrrzarr.s3.us-west-1.amazonaws.com/grid/HRRR_chunk_index.zarr#mode=zarr,s3"
int main()
{
int ncid1;
int status;
// Open the file
status = nc_open(FILENAME, NC_NOWRITE, &ncid1);
printf("status code after open = %d\n", status);
status = nc_close(ncid1);
printf("status code after close = %d\n", status);
printf("End of test.\n\n");
return 0;
}
NetCDF version: v4.9.0
HDF5 version: 1.10.8
OS: Linux
I am trying to access the zarr datasets here (https://power-analysis-ready-datastore.s3.us-west-2.amazonaws.com/index.html) and here (https://hrrrzarr.s3.amazonaws.com/index.html) using netcdf.open. I am seeing two issues here:
If I only append '#mode=zarr' or '#mode=nczarr,zarr' without specifying the driver to be used, the process stalls for a bit and then gets killed. This happens even if I build netCDF without NCZarr support.
I also see a process abortion if I try and open the dataset here ("https://hrrrzarr.s3.us-west-1.amazonaws.com/prs/20180712/20180712_12z_anl.zarr#mode=zarr,s3")
The error message is as follows:
"netcdf/libnczarr/zclose.c:228: zclose_type: Assertion `type && type->format_type_info != NULL' failed.
Abort
"
Please find my repro code below: