在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 public static class NetCDF
2 { 3 [DllImport("netcdf4.dll")] 4 public static extern int nc_put_att_uchar(int ncid, int varid, string name, NcType xtype, int len, byte[] op); 5 [DllImport("netcdf4.dll")] 6 public static extern int nc_get_att_uchar(int ncid, int varid, string name, byte[] op); 7 8 [DllImport("netcdf4.dll")] 9 public static extern int nc_get_var_uchar(int ncid, int varid, byte[] ip); 10 [DllImport("netcdf4.dll")] 11 public static extern int nc_get_var_text(int ncid, int varid, StringBuilder ip); 12 13 14 [DllImport("netcdf4.dll")] 15 public static extern int nc_open(string path, CreateMode mode, out int ncidp); 16 [DllImport("netcdf4.dll")] 17 public static extern int nc_create(string path, CreateMode mode, out int ncidp); 18 [DllImport("netcdf4.dll")] 19 public static extern int nc_close(int ncidp); 20 [DllImport("netcdf4.dll")] 21 public static extern int nc_sync(int ncid); 22 [DllImport("netcdf4.dll")] 23 public static extern int nc_enddef(int ncid); 24 [DllImport("netcdf4.dll")] 25 public static extern int nc_redef(int ncid); 26 [DllImport("netcdf4.dll")] 27 public static extern string nc_strerror(int ncerror); 28 29 [DllImport("netcdf4.dll")] 30 public static extern int nc_inq(int ncid, out int ndims, out int nvars, out int ngatts, out int unlimdimid); 31 32 [DllImport("netcdf4.dll")] 33 public static extern int nc_def_var(int ncid, string name, NcType xtype, int ndims, int[] dimids, out int varidp); 34 [DllImport("netcdf4.dll")] 35 public static extern int nc_inq_var(int ncid, int varid, StringBuilder name, out NcType type, out int ndims, int[] dimids, out int natts); 36 [DllImport("netcdf4.dll")] 37 public static extern int nc_inq_varids(int ncid, out int nvars, int[] varids); 38 [DllImport("netcdf4.dll")] 39 public static extern int nc_inq_vartype(int ncid, int varid, out NcType xtypep); 40 [DllImport("netcdf4.dll")] 41 public static extern int nc_inq_varnatts(int ncid, int varid, out int nattsp); 42 [DllImport("netcdf4.dll")] 43 public static extern int nc_inq_varid(int ncid, string name, out int varidp); 44 45 [DllImport("netcdf4.dll")] 46 public static extern int nc_inq_ndims(int ncid, out int ndims); 47 [DllImport("netcdf4.dll")] 48 public static extern int nc_inq_nvars(int ncid, out int nvars); 49 [DllImport("netcdf4.dll")] 50 public static extern int nc_inq_varname(int ncid, int varid, StringBuilder name); 51 [DllImport("netcdf4.dll")] 52 public static extern int nc_inq_varndims(int ncid, int varid, out int ndims); 53 [DllImport("netcdf4.dll")] 54 public static extern int nc_inq_vardimid(int ncid, int varid, int[] dimids); 55 [DllImport("netcdf4.dll")] 56 public static extern int nc_inq_var_fill(int ncid, int varid, out int no_fill, out object fill_value); 57 58 59 [DllImport("netcdf4.dll")] 60 public static extern int nc_inq_natts(int ncid, out int ngatts); 61 [DllImport("netcdf4.dll")] 62 public static extern int nc_inq_unlimdim(int ncid, out int unlimdimid); 63 [DllImport("netcdf4.dll")] 64 public static extern int nc_inq_format(int ncid, out int format); 65 66 [DllImport("netcdf4.dll")] 67 public static extern int nc_inq_attname(int ncid, int varid, int attnum, StringBuilder name); 68 [DllImport("netcdf4.dll")] 69 public static extern int nc_inq_att(int ncid, int varid, string name, out NcType type, out int length); 70 [DllImport("netcdf4.dll")] 71 public static extern int nc_get_att_text(int ncid, int varid, string name, StringBuilder value); 72 [DllImport("netcdf4.dll")] 73 public static extern int nc_get_att_schar(int ncid, int varid, string name, sbyte[] data); 74 [DllImport("netcdf4.dll")] 75 public static extern int nc_get_att_short(int ncid, int varid, string name, short[] data); 76 [DllImport("netcdf4.dll")] 77 public static extern int nc_get_att_int(int ncid, int varid, string name, int[] data); 78 [DllImport("netcdf4.dll")] 79 public static extern int nc_get_att_float(int ncid, int varid, string name, float[] data); 80 [DllImport("netcdf4.dll")] 81 public static extern int nc_get_att_double(int ncid, int varid, string name, double[] data); 82 [DllImport("netcdf4.dll")] 83 public static extern int nc_get_att_long(int ncid, int varid, string name, long[] data); 84 [DllImport("netcdf4.dll")] 85 public static extern int nc_get_att_longlong(int ncid, int varid, string name, long[] data); 86 87 [DllImport("netcdf4.dll")] 88 public static extern int nc_put_att_text(int ncid, int varid, string name, int len, string tp); 89 [DllImport("netcdf4.dll")] 90 public static extern int nc_put_att_double(int ncid, int varid, string name, NcType type, int len, double[] tp); 91 [DllImport("netcdf4.dll")] 92 public static extern int nc_put_att_int(int ncid, int varid, string name, NcType type, int len, int[] tp); 93 [DllImport("netcdf4.dll")] 94 public static extern int nc_put_att_short(int ncid, int varid, string name, NcType type, int len, short[] tp); 95 [DllImport("netcdf4.dll")] 96 public static extern int nc_put_att_float(int ncid, int varid, string name, NcType type, int len, float[] tp); 97 [DllImport("netcdf4.dll")] 98 public static extern int nc_put_att_byte(int ncid, int varid, string name, NcType type, int len, sbyte[] tp); 99 [DllImport("netcdf4.dll")] 100 public static extern int nc_put_att_long(int ncid, int varid, string name, NcType type, int len, long[] tp); 101 [DllImport("netcdf4.dll")] 102 public static extern int nc_put_att_longlong(int ncid, int varid, string name, NcType type, int len, long[] tp); 103 104 [DllImport("netcdf4.dll")] 105 public static extern int nc_def_dim(int ncid, string name, int len, out int dimidp); 106 [DllImport("netcdf4.dll")] 107 public static extern int nc_inq_dim(int ncid, int dimid, StringBuilder name, out int length); 108 [DllImport("netcdf4.dll")] 109 public static extern int nc_inq_dimname(int ncid, int dimid, StringBuilder name); 110 [DllImport("netcdf4.dll")] 111 public static extern int nc_inq_dimid(int ncid, string name, out int dimid); 112 [DllImport("netcdf4.dll")] 113 public static extern int nc_inq_dimlen(int ncid, int dimid, out int length); 114 115 116 [DllImport("netcdf4.dll")] 117 public static extern int nc_get_var_text(int ncid, int varid, byte[] data); 118 [DllImport("netcdf4.dll")] 119 public static extern int nc_get_var_schar(int ncid, int varid, sbyte[] data); 120 [DllImport("netcdf4.dll")] 121 public static extern int nc_get_var_short(int ncid, int varid, short[] data); 122 [DllImport("netcdf4.dll")] 123 public static extern int nc_get_var_int(int ncid, int varid, int[] data); 124 [DllImport("netcdf4.dll")] 125 public static extern int nc_get_var_long(int ncid, int varid, long[] data); 126 [DllImport("netcdf4.dll")] 127 public static extern int nc_get_var_float(int ncid, int varid, float[,] data); 128 [DllImport("netcdf4.dll")] 129 public static extern int nc_get_var_double(int ncid, int varid, double[] data); 130 131 [DllImport("netcdf4.dll")] 132 public static extern int nc_put_var_ubyte(int ncid, int varid, byte[,] data); 133 [DllImport("netcdf4.dll")] 134 public static extern int nc_put_var_int(int ncid, int varid, int[,] data); 135 [DllImport("netcdf4.dll")] 136 public static extern int nc_put_var_text(int ncid, int varid, string op); 137 [DllImport("netcdf4.dll")] 138 public static extern int nc_put_var_uchar(int ncid, int varid, out byte[] op); 139 [DllImport("netcdf4.dll")] 140 public static extern int nc_put_var_float(int ncid, int varid, float[,] data); 141 [DllImport("netcdf4.dll")] 142 public static extern int nc_put_var_long(int ncid, int varid, long[] data); 143 144 145 [DllImport("netcdf4.dll")] 146 public static extern int nc_put_vara_double(int ncid, int varid, int[] start, int[] count, double[] dp); 147 [DllImport("netcdf4.dll")] 148 public static extern int nc_put_vara_float(int ncid, int varid, int[] start, int[] count, float[] fp); 149 [DllImport("netcdf4.dll")] 150 public static extern int nc_put_vara_short(int ncid, int varid, int[] start, int[] count, short[] sp); 151 [DllImport("netcdf4.dll")] 152 public static extern int nc_put_vara_int(int ncid, int varid, int[] start, int[] count, int[] ip); 153 [DllImport("netcdf4.dll")] 154 public static extern int nc_put_vara_long(int ncid, int varid, int[] start, int[] count, long[] lp); 155 [DllImport("netcdf4.dll")] 156 public static extern int nc_put_vara_ubyte(int ncid, int varid, int[] start, int[] count, byte[] bp); 157 [DllImport("netcdf4.dll")] 158 public static extern int nc_put_vara_schar(int ncid, int varid, int[] start, int[] count, sbyte[] cp); 159 [DllImport("netcdf4.dll")] 160 public static extern int nc_put_vara_string(int ncid, int varid, int[] start, int[] count, string[] sp); 161 162 163 [DllImport("netcdf4.dll")] 164 public static extern int nc_get_vara_text(int ncid, int varid, int[] start, int[] count, byte[] data); 165 [DllImport("netcdf4.dll")] 166 public static extern int nc_get_vara_schar(int ncid, int varid, int[] start, int[] count, sbyte[] data); 167 [DllImport("netcdf4.dll")] 168 public static extern int nc_get_vara_short(int ncid, int varid, int[] start, int[] count, short[] data); 169 [DllImport("netcdf4.dll")] 170 public static extern int nc_get_vara_ubyte(int ncid, int varid, int[] start, int[] count, byte[] data); 171 [DllImport("netcdf4.dll")] 172 public static extern int nc_get_vara_long(int ncid, int varid, int[] start, int[] count, long[] data); 173 [DllImport("netcdf4.dll")] 174 public static extern int nc_get_vara_int(int ncid, int varid, int[] start, int[] count, int[] data); 175 [DllImport("netcdf4.dll")] 176 public static extern int nc_get_vara_float(int ncid, int varid, int[] start, int[] count, float[] data); 177 [DllImport("netcdf4.dll")] 178 public static extern int nc_get_vara_double(int ncid, int varid, int[] start, int[] count, double[] data); 179 [DllImport("netcdf4.dll")] 180 public static extern int nc_get_vara_string(int ncid, int varid, int[] start, int[] count, string[] data); 181 182 ///<summary> 183 ///'size' argument to ncdimdef for an unlimited dimension 184 ///</summary> 全部评论
专题导读
热门推荐
热门话题
阅读排行榜
|
请发表评论