SDSlite
SDSlite copied to clipboard
Failed to Create Dataset Instance
Hi, my following code is reflecting error. Try { // open the file and print some info string filePath = "D:\AccessNetCDF\sresa1b_ncar_ccsm3-example.nc"; using (DataSet ds = DataSet.Open("msds:nc" + filePath + "&openMode=readOnly")) { Console.WriteLine(ds); Console.WriteLine(ds.Metadata["comment"]); var lat = ds.GetData<float[]>("lat"); Console.WriteLine($"latitude: len={lat.Length}, min={lat.Min()}, max={lat.Max()}"); }
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine($"Error reading NETCDF file: {ex.Message}");
Console.ReadLine();
}
}
ERROR: Error reading NETCDF file: Failed to create dataset instance from URI msds;ncD:%5CAccessNetCDF%5Csresalb_ncar_ccm3-example.nc&openMode=readOnly: Provider ncD:%5Csresalb_ncar_ccm3-example.nc&openMode=readOnly is not registered.
Any suggestion where could be possibly wrong?
Thanks, JesC
You just need to install the required software in your PC and register the path in your environment variable and should be working,