![]() |
VOOZH | about |
dotnet add package SDSLite --version 3.0.1
NuGet\Install-Package SDSLite -Version 3.0.1
<PackageReference Include="SDSLite" Version="3.0.1" />
<PackageVersion Include="SDSLite" Version="3.0.1" />Directory.Packages.props
<PackageReference Include="SDSLite" />Project file
paket add SDSLite --version 3.0.1
#r "nuget: SDSLite, 3.0.1"
#:package SDSLite@3.0.1
#addin nuget:?package=SDSLite&version=3.0.1Install as a Cake Addin
#tool nuget:?package=SDSLite&version=3.0.1Install as a Cake Tool
This is a cross platform .NET library for manipulating netCDF, CSV and TSV files. This is a subset of Scientific DataSet https://www.microsoft.com/en-us/research/project/scientific-dataset/.
SDSLite requires a platform dependent library available from Unidata.
For Windows go to https://docs.unidata.ucar.edu/netcdf-c/current/winbin.html and download the version of netCDF4 (without DAP) corresponding to your machine, either 32 or 64 bit. As of May 2023 these are: https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netCDF4.9.2-NC4-64.exe or https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netCDF4.9.2-NC4-64.exe.
The Scientific DataSet library looks for netcdf.dll file in the following locations:
LIBNETCDFPATH environment variable if it contains full path of the netcdf.dll file;ScientificDataSet.dll assembly;For Linux install pre-built netCDF-C libraries. For example on Ubuntu:
sudo apt-get install libnetcdf-dev
Use homebrew http://brew.sh/ to install netcdf:
brew install netcdf
C# example:
using Microsoft.Research.Science.Data;
using Microsoft.Research.Science.Data.Imperative;
// download a netCDF file from unidata web site
var client = new System.Net.Http.HttpClient();
var response = await client.GetAsync("https://www.unidata.ucar.edu/software/netcdf/examples/sresa1b_ncar_ccsm3-example.nc");
using (var stream = System.IO.File.OpenWrite("sresa1b_ncar_ccsm3-example.nc")){
await response.Content.CopyToAsync(stream);
}
// open the file and print some info
using (DataSet ds = DataSet.Open("msds:nc?file=sresa1b_ncar_ccsm3-example.nc&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()}");
}
Output:
msds:nc?openMode=readOnly&file=c:\Users\***\sresa1b_ncar_ccsm3-example.nc
[1]
DSID: ca6c1f06-f743-4190-9b94-20cf0cbc18f7
[12] ua of type Single (time:1) (plev:17) (lat:128) (lon:256)
[11] time_bnds of type Double (time:1) (bnds:2)
[10] time of type Double (time:1)
[9] tas of type Single (time:1) (lat:128) (lon:256)
[8] pr of type Single (time:1) (lat:128) (lon:256)
[7] plev of type Double (plev:17)
[6] msk_rgn of type Int32 (lat:128) (lon:256)
[5] lon_bnds of type Double (lon:256) (bnds:2)
[4] lon of type Single (lon:256)
[3] lat_bnds of type Double (lat:128) (bnds:2)
[2] lat of type Single (lat:128)
[1] area of type Single (lat:128) (lon:256)
This simulation was initiated from year 2000 of
CCSM3 model run b30.030a and executed on
hardware cheetah.ccs.ornl.gov. The input external forcings are
ozone forcing : A1B.ozone.128x64_L18_1991-2100_c040528.nc
aerosol optics : AerosolOptics_c040105.nc
aerosol MMR : AerosolMass_V_128x256_clim_c031022.nc
carbon scaling : carbonscaling_A1B_1990-2100_c040609.nc
solar forcing : Fixed at 1366.5 W m-2
GHGs : ghg_ipcc_A1B_1870-2100_c040521.nc
GHG loss rates : noaamisc.r8.nc
volcanic forcing : none
DMS emissions : DMS_emissions_128x256_clim_c040122.nc
oxidants : oxid_128x256_L26_clim_c040112.nc
SOx emissions : SOx_emissions_A1B_128x256_L2_1990-2100_c040608.nc
Physical constants used for derived data:
Lv (latent heat of evaporation): 2.501e6 J kg-1
Lf (latent heat of fusion ): 3.337e5 J kg-1
r[h2o] (density of water ): 1000 kg m-3
g2kg (grams to kilograms ): 1000 g kg-1
Integrations were performed by NCAR and CRIEPI with support
and facilities provided by NSF, DOE, MEXT and ESC/JAMSTEC.
latitude: len=128, min=-88.927734, max=88.927734
This project is licensed under MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on SDSLite:
| Package | Downloads |
|---|---|
|
GradsSharp
Opengrads port to a C# library. |
|
|
Infometeos.NetCdf.Core
Библиотека для извлечения данных в формате NetCDF |
|
|
AutreMachine.Common.NetCDF
A set of tools used to read a .nc file and convert it into a usable POCO object. |
This package is not used by any popular GitHub repositories.