• 大小: 3.92MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-03
  • 语言: C#
  • 标签: c#  netcdf  

资源简介

vs2013开发环境 内含有测数据

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.Research.ScientificDataSet.NetCDF4
{
    public partial class NetCDF
    {
        /// 
        /// ‘size‘ argument to ncdimdef for an unlimited dimension
        /// 

        public const int NC_UNLIMITED = 0;

        /// 
        /// attribute id to put/get a global attribute
        /// 

        public const int NC_GLOBAL = -1;

        /// 
        /// The netcdf external data types
        /// 

        public enum NcType : int
        {
            /// signed 1 byte intege
            NC_BYTE = 1
            /// ISO/ASCII character
            NC_CHAR = 2
            /// signed 2 byte integer
            NC_SHORT = 3
            /// signed 4 byte integer
            NC_INT = 4
            /// single precision floating point number
            NC_FLOAT = 5
            /// double precision floating point number
            NC_DOUBLE = 6
            /// signed 8-byte int
            NC_INT64 = 10
            /// string
            NC_STRING = 12
        }

        public static Type GetCLRType(NcType ncType)
        {
            switch (ncType)
            {
                case NcType.NC_BYTE:
                    return typeof(byte);
                case NcType.NC_CHAR:
                    return typeof(sbyte);
                case NcType.NC_SHORT:
                    return typeof(short);
                case NcType.NC_INT:
                    return typeof(int);
                case NcType.NC_INT64:
                    return typeof(long);
                case NcType.NC_FLOAT:
                    return typeof(float);
                case NcType.NC_DOUBLE:
                    return typeof(double);
                case NcType.NC_STRING:
                    return typeof(string);
                default:
                    throw new ApplicationException(“Unknown nc type“);
            }
        }

        public static NcType GetNcType(Type type)
        {
            switch (Type.GetTypeCode(type))
            {
                case TypeCode.Double:
                    return NcType.NC_DOUBLE;

                case TypeCode.Single:
                    return NcType.NC_FLOAT;

                case TypeCode.Int64:
                    return NcType.NC_INT64;

                case TypeCode.Int32:
                    return NcType.NC_INT;

                case TypeCode.Int16:
                    return NcType.NC_SHORT;

                case TypeCode.Byte:
                    return NcType.NC_BYTE;

                case TypeCode.SByte:
                    return NcType.NC_CHAR;

                case TypeCode.String:
                   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2016-05-14 23:13  netcdfRead\netcdfRead\App.config

     文件    1739776  2016-05-14 23:09  netcdfRead\netcdfRead\bin\Debug\netcdf4.dll

     文件      12288  2016-05-15 14:45  netcdfRead\netcdfRead\bin\Debug\netcdfRead.exe

     文件        187  2016-05-14 23:13  netcdfRead\netcdfRead\bin\Debug\netcdfRead.exe.config

     文件      17920  2016-05-15 14:45  netcdfRead\netcdfRead\bin\Debug\netcdfRead.pdb

     文件      23168  2016-05-15 14:45  netcdfRead\netcdfRead\bin\Debug\netcdfRead.vshost.exe

     文件        187  2016-05-14 23:13  netcdfRead\netcdfRead\bin\Debug\netcdfRead.vshost.exe.config

     文件        490  2015-10-30 15:19  netcdfRead\netcdfRead\bin\Debug\netcdfRead.vshost.exe.manifest

     文件    6921120  2016-05-09 22:44  netcdfRead\netcdfRead\bin\Debug\test.nc

     文件       6064  2016-05-14 23:14  netcdfRead\netcdfRead\Constants.cs

     文件      12071  2016-05-15 00:19  netcdfRead\netcdfRead\DotNetCdf.cs

     文件       2642  2016-05-14 23:22  netcdfRead\netcdfRead\netcdfRead.csproj

     文件       6689  2016-05-14 23:14  netcdfRead\netcdfRead\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        694  2016-05-15 14:45  netcdfRead\netcdfRead\obj\Debug\netcdfRead.csproj.FileListAbsolute.txt

     文件       1755  2016-05-14 23:22  netcdfRead\netcdfRead\obj\Debug\netcdfRead.csprojResolveAssemblyReference.cache

     文件      12288  2016-05-15 14:45  netcdfRead\netcdfRead\obj\Debug\netcdfRead.exe

     文件      17920  2016-05-15 14:45  netcdfRead\netcdfRead\obj\Debug\netcdfRead.pdb

     文件          0  2016-05-14 23:13  netcdfRead\netcdfRead\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-05-14 23:13  netcdfRead\netcdfRead\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-05-14 23:13  netcdfRead\netcdfRead\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       1016  2016-05-15 14:45  netcdfRead\netcdfRead\Program.cs

     文件       1432  2016-05-14 23:13  netcdfRead\netcdfRead\Properties\AssemblyInfo.cs

     文件        999  2016-05-14 23:13  netcdfRead\netcdfRead.sln

    ..A..H.     35840  2016-05-15 01:23  netcdfRead\netcdfRead.v12.suo

     目录          0  2016-05-14 23:13  netcdfRead\netcdfRead\obj\Debug\TempPE

     目录          0  2016-05-14 23:22  netcdfRead\netcdfRead\bin\Debug

     目录          0  2016-05-15 14:45  netcdfRead\netcdfRead\obj\Debug

     目录          0  2016-05-14 23:13  netcdfRead\netcdfRead\bin

     目录          0  2016-05-14 23:13  netcdfRead\netcdfRead\obj

     目录          0  2016-05-14 23:13  netcdfRead\netcdfRead\Properties

............此处省略5个文件信息

评论

共有 条评论