Skip to content

Byte range fails on GOES 16 URL present in tst_byterange.c #2798

@abhibaruah

Description

@abhibaruah

To report a non-security related issue, please provide:

NetCDF version: 4.9.1
HDF5 version: 1.10.10
OS: Linux

I am trying to use netCDF byte range reading on the GOES16 URL which is mentioned in the file https://github.com/Unidata/netcdf-c/blob/main/nc_test/tst_byterange.c

"https://noaa-goes16.s3.amazonaws.com/ABI-L1b-RadC/2017/059/03/OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc#mode=bytes"

However, nc_open fails with the status code -74.
Is this because of some changes to the netCDF code or changes in the GOES16 server?

#include <stdio.h>
#include <string.h>
#include <netcdf.h>
#include <iostream>

#define FILE_NAME "https://noaa-goes16.s3.amazonaws.com/ABI-L1b-RadC/2017/059/03/OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc#mode=bytes"

int
main()
{
    int status;
    int ncid;
    
    // open the NetCDF-4 file
    status = nc_open(FILE_NAME, NC_NOWRITE, &ncid);
    if(status != NC_NOERR) {
         std::cout << "Status: " << status << std::endl;
		 std::cout << "Could not open the file." << std::endl;
		 
    }
   
    // close the file 
    status = nc_close(ncid);
	
	std::cout << "Status after close: " << status << std::endl;

    return 0;
}

Status: -74
Could not open the file.
Status after close: -33

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions