亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? getnc.m

?? 讀取Network Common Data Form (netCDF)數(shù)據(jù)
?? M
?? 第 1 頁 / 共 3 頁
字號:
function values = getnc(file, varid, corner, end_point, stride, order, ...      change_miss, new_miss, squeeze_it, rescale_opts)%  GETNC retrieves data from a NetCDF file.%%  function values = getnc(file, varid, corner, end_point, stride, order, ...%        change_miss, new_miss, squeeze_it, rescale_opts)%% DESCRIPTION:%  getnc retrieves data from a NetCDF file.  The way getnc behaves%  depends on how many of the input arguments are passed to it.  If no%  arguments are passed then it returns this help message.  If one%  argument is passed then the user is asked questions to determine%  information necessary for the data retrieval.  If more than one%  argument is passed then getnc returns the data without needing to%  ask any questions.  The input arguments are listed below.%  % INPUT:%  file is the name of a netCDF file with or without the .cdf or .nc extent.%  varid may be an integer or a string.  If it is an integer then it%    must be the menu number of the n dimensional variable as used%    by a call to inqnc or getnc.  If it is a string then it should%    be the name of the variable.%  corner is a vector of length n specifying the hyperslab corner%    with the lowest index values (the bottom left-hand corner in a%    2-space).  The corners refer to the dimensions in the same%    order that these dimensions are listed in the relevant questions%    in getnc.m and in the inqnc.m description of the variable.  A%    negative element means that all values in that direction will be%    returned.  If a negative scalar is used this means that all of the%    elements in the array will be returned.%  end_point is a vector of length n specifying the hyperslab corner%    with the highest index values (the top right-hand corner in a%    2-space).  The corners refer to the dimensions in the same order%    that these dimensions are listed in the relevant questions in%    getnc.m and in the inqnc.m description of the variable.  An%    element in the end_point vector wil be ignored if the corresponding%    element in the corner vector is negative.%  stride is a vector of length n specifying the interval between%    accessed values of the hyperslab (sub-sampling) in each of the n%    dimensions.  A value of 1 accesses adjacent values in the given%    dimension; a value of 2 accesses every other value; and so on. If%    no sub-sampling is required in any direction then it is allowable%    to just pass the scalar 1 (or -1 to be consistent with the corner%    and end_point notation).%  order is a vector of length n specifying the order of the dimensions in%    the returned array.  order = -1 or [1 2 3 .. n] for an n dimensional%    netCDF variable will return an array with the dimensions in the same%    order  as described by a call to inqnc(file) from within matlab or%    'ncdump  -h' from the command line.  Putting order = -2 will reverse%    this order.  More general permutations are given re-arranging the%    numbers 1 to n in the vector.%  change_miss == 1 causes missing values to be returned unchanged.%    change_miss == 2 causes missing values to be changed to NaN.%    change_miss == 3 causes missing values to be changed to new_miss%    (after rescaling if that is necessary).%    change_miss < 0 produces the default (missing values to be changed to%    NaN).%  new_miss is the value given to missing data if change_miss = 3.%  squeeze_it specifies whether the returned array should be squeezed.%    That is, when squeeze_it is non-zero then the squeeze function will%    be applied to the returned array to eliminate singleton array%    dimensions.  This is the default.  Note also that a 1-d array is%    returned as a column vector.%  rescale_opts is a 2 element vector specifying whether or not rescaling is%    carried out on retrieved variables or attributes. Only use this option%    if you are sure that you know what you are doing.%    If rescale_opts(1) == 1 then a variable read in by getnc.m will be%    rescaled by 'scale_factor' and  'add_offset' if these are attributes of%    the variable; this is the default. If rescale_opts(1) == 0 then this%    rescaling will not be done.%    If rescale_opts(2) == 1 then the attributes '_FillValue', 'valid_range',%    'valid_min' and 'valid_max' read in by getnc.m (and used to find the%    missing values of the relevant variable) will be rescaled by%    'scale_factor' and 'add_offset'; this is the default. If rescale_opts(2)%    == 0 then this rescaling will not be done.%%% OUTPUT:%  values is a scalar, vector or array of values that is read in%     from the NetCDF file%% NOTES:% 1) In order for getnc to work non-interactively it is only strictly% necessary to pass the first 2 input arguments to getnc - sensible% defaults are available for the rest.% These are:% corner, end_point = [-1 ... -1], => all elements retrieved% stride = 1, => all elements retrieved% order = [1 2 3 .. n] for an n dimensional netCDF variable% change_miss = 2, => missing values replaced by NaNs% new_miss = 0;% squeeze_it = 1; => singleton dimensions will be removed% 2) It is not acceptable to pass only 3 input arguments since there is% no default in the case of the corner points being specified but the% end points not.% 3) By default the order of the dimensions of a returned array will be the% same as they appear in the relevant call to 'inqnc' (from matlab) or% 'ncdump -h' (from the command line).  (This is the opposite to what% happened in an earlier version of getnc.)  This actually involves getnc% re-arranging the returned array because the netCDF utilities follow the C% convention for data storage and matlab follows the fortran convention.%    To be more explicit, suppose that we use inqnc to examine a netCDF file.% Then 2 lines in the output might read:%% The 3 dimensions are  1) month = 12  2) lat = 90  3) lon = 180.%     ---  Information about airtemp(month lat lon )  ---%% Likewise using 'ncdump -h' from the command line would have the% corresponding line:%%        short airtemp(month, lat, lon);%% The simplest possible call to getnc will give, as you would expect,%% >> airtemp = getnc('oberhuber', 'airtemp');% >> size(airtemp) = 12    90   180%% Since the netCDF file follows the C convention this means that in the% actual storage of the data lon is the fastest changing index, followed by% lat, and then month.  However matlab (and fortran) use the opposite% convention and so month is the fastest changing index, followed by lat, and% then lon.  getnc actually used the permute function to reverse the storage% order.  If efficiency is a concern (because of using very large arrays or% a large number of small arrays) then passing order == -2 to getnc will% produce the fastest response by returning the data in its 'natural' order% (a 180x90x12 array in our example)%% 4) If the values are returned in a one-dimensional array then this will be a% column vector.  This choice provides consistency if there is an% unlimited dimension.  That is, if the length of the unlimited% dimension is n then an m x n array will be returned even for n = 1.)%% 5) A strange 'feature' of matlab 5 is that it will not tolerate a singleton% dimension as the final dimension of a multidimensional array.  Thus, if% you chose to have only one element in the final dimension this dimension% will be 'squeezed' whether you want it to be or not - this seems to be% unavoidable.%% EXAMPLES:% 1) Get all the elements of the variable, note the order of the dimensions:% >> airtemp = getnc('oberhuber', 'airtemp');% >> size(airtemp)% ans =%     12    90   180%% 2) Get a subsample of the variable, note the stride:% >> airtemp = getnc('oberhuber', 'airtemp', [-1 1 3], [-1 46 6], [1 5 1]);% >> size(airtemp)% ans =%     12    10     4%% 3) Get all the elements of the variable, but with dimensions permuted:% >> airtemp = getnc('oberhuber', 'airtemp', -1, -1, -1, [2 3 1]);% >> size(airtemp)% ans =%     90   180    12% % 4) Get all the elements of the variable, but with missing values%    replaced with 1000.  Note that the corner, end_point, stride and%    order vectors have been replaced by -1 to indicate that the whole%    range is required in the default order:% >> airtemp = getnc('oberhuber', 'airtemp', -1, -1, -1, -1, 3, 1000); % >> size(airtemp)% ans =%     12    90   180%% 5) Get a subsample of the variable, a singleton dimension is squeezed:% >> airtemp = getnc('oberhuber', 'airtemp', [-1 7 -1], [-1 7 -1]);   % >> size(airtemp)                                                         % ans =%     12   180% % 6) Get a subsample of the variable, a singleton dimension is not squeezed:% >> airtemp = getnc('oberhuber','airtemp',[-1 7 -1],[-1 7 -1],-1,-1,-1,-1,0);% >> size(airtemp)                                                            % ans =%     12     1   180%%% CALLER:   general purpose% CALLEE:   fill_att.m, check_st.m, y_rescal.m, ncmex.mex%% AUTHOR:   J. V. Mansbridge, CSIRO%---------------------------------------------------------------------%     Copyright (C), J.V. Mansbridge, 1992%     Commonwealth Scientific and Industrial Research Organisation%     Revision $Revision: 1.12 $%     Author   $Author: man133 $%     Date     $Date: 2004/11/16 04:50:30 $%     RCSfile  $RCSfile: getnc.m,v $% %--------------------------------------------------------------------% In November 1998 some code was added to deal better with byte type data. Note% that any values greater than 127 will have 256 subtracted from them. This is% because on some machines (an SGI running irix6.2 is an example) values are% returned in the range 0 to 255. Note that in the fix the values less than 128% are unaltered and so we do not have to know whether the particular problem has% occurred or not; for machines where there is no problem no values will be% altered. This is applied to byte type attributes (like _FillValue) as well as% the variable values.% Check the number of arguments.  If there are no arguments then return% the help message.  If there is more than one argument then call% getnc_s which reads the netcdf file in a non-interactive way.% If there is only one argument then drop through and find the values% interactively.if nargin == 0  help getnc  returnelseif nargin == 2  values = getnc_s(file, varid);  returnelseif nargin == 3  values = getnc_s(file, varid, corner);  returnelseif nargin == 4  values = getnc_s(file, varid, corner, end_point);  returnelseif nargin == 5  values = getnc_s(file, varid, corner, end_point, stride);    returnelseif nargin == 6  values = getnc_s(file, varid, corner, end_point, ...      stride, order);  returnelseif nargin == 7  values = getnc_s(file, varid, corner, end_point, ...      stride, order, change_miss);  returnelseif nargin == 8  values = getnc_s(file, varid, corner, end_point, ...      stride, order, change_miss, new_miss);  returnelseif nargin == 9  values = getnc_s(file, varid, corner, end_point, ...      stride, order, change_miss, new_miss, squeeze_it);  returnelseif nargin == 10  values = getnc_s(file, varid, corner, end_point, ...      stride, order, change_miss, new_miss, squeeze_it, rescale_opts);  returnelseif nargin > 10  disp('ERROR: getnc: Too many input arguments')  disp(' ')  help getnc  returnend% I make ncmex calls to find the integers that specify the attribute% typesnc_byte = ncmex('parameter', 'nc_byte'); %1nc_char = ncmex('parameter', 'nc_char'); %2nc_short = ncmex('parameter', 'nc_short'); %3nc_long = ncmex('parameter', 'nc_long'); %4nc_float = ncmex('parameter', 'nc_float'); %5nc_double = ncmex('parameter', 'nc_double'); %6% Find out whether values should be automatically rescaled or not.[rescale_var, rescale_att] = y_rescal;% Set the value of imap.  Note that this is used simply as a% placeholder in calls to vargetg - its value is never used.imap = 0;% Set some constants.blank = abs(' ');% Check that the file is accessible.  If it is then its full name will% be stored in the variable cdf.  The file may have the extent .cdf or% .nc and be in the current directory or the common data set (whose% path can be found by a call to pos_cds.m.  If a compressed form% of the file is in the current directory then the user is prompted to% uncompress it.  If, after all this, the netcdf file is not accessible% then the m file is exited with an error message.cdf_list = { '' '.nc' '.cdf'};ilim = length(cdf_list);for i = 1:ilim   cdf = [ file cdf_list{i} ];  err = check_nc(cdf);  if  (err == 0) | (err == 4)    break;  elseif err == 1    if i == ilim      error([ file ' could not be found' ])    end  elseif err == 2    path_name = pos_cds;    cdf = [ path_name cdf ];    break;  elseif err == 3    err1 = uncmp_nc(cdf);    if err1 == 0      break;    elseif err1 == 1      error([ 'exiting because you chose not to uncompress ' cdf ])    elseif err1 == 2      error([ 'exiting because ' cdf ' could not be uncompressed' ])    end  endend% Open the netcdf file.[cdfid, rcode] = ncmex('OPEN', cdf, 'NC_NOWRITE');if rcode == -1  error(['** ERROR ** ncopen: rcode = ' num2str(rcode)])end% Suppress all error messages from netCDF [rcode] = ncmex('setopts', 0);% Collect information about the cdf file.[ndims_tot, nvars, ngatts, recdim, rcode] =  ncmex('ncinquire', cdfid);if rcode == -1  error(['** ERROR ** ncinquire: rcode = ' num2str(rcode)])endvarstring = fill_var(cdfid, nvars);% Prompt the user for the name of the variable containing the hyperslab.k = -1;while k <1 | k > nvars   disp(' ')   s = [ '----- Choose the variable -----'];   disp(s)   disp(' ')   for i = 0:3:nvars-1      stri = int2str(i+1);      if length(stri) == 1         stri = [ ' ' stri];      end      [varnam, vartyp, nvdims, vdims, nvatts, rcode] = ...	  ncmex('ncvarinq', cdfid, i);      if rcode == -1	error(['** ERROR ** ncvarinq: rcode = ' num2str(rcode)])      end      s = [ '  ' stri ') ' varnam ];      addit = 26 - length(s);      for j =1:addit         s = [ s ' '];      end      if i < nvars - 1         stri = int2str(i+2);         if length(stri) == 1            stri = [ ' ' stri];         end         [varnam, vartyp, nvdims, vdims, nvatts, rcode] = ...	     ncmex('ncvarinq', cdfid, i+1);	 if rcode == -1	   error(['** ERROR ** ncvarinq: rcode = ' num2str(rcode)])

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国产免费观看| 亚洲黄色片在线观看| 亚洲少妇30p| 日本中文字幕一区二区视频| 成人午夜精品在线| 日韩一区二区在线观看视频播放| 亚洲国产精品99久久久久久久久| 日韩精品一卡二卡三卡四卡无卡| 91视频免费看| 国产精品网站在线| 国产高清在线精品| 日韩美女视频在线| 日韩电影在线一区| 欧美日韩国产片| 伊人色综合久久天天人手人婷| 国产激情一区二区三区桃花岛亚洲| 欧美性极品少妇| 亚洲美女视频在线| 97久久人人超碰| 亚洲欧洲三级电影| 成人av电影免费观看| 国产欧美日韩亚州综合 | 成人午夜视频免费看| 日韩小视频在线观看专区| 亚洲成人先锋电影| 在线亚洲高清视频| 亚洲一区二区三区中文字幕| 91一区二区在线| 中文字幕综合网| 91女人视频在线观看| 亚洲精品免费电影| 欧美吻胸吃奶大尺度电影 | 亚洲视频一二区| 成人精品一区二区三区四区 | 日韩一级二级三级| 青青草国产成人99久久| 日韩视频一区二区在线观看| 日本视频一区二区| 久久先锋影音av| 国产精品乡下勾搭老头1| 国产午夜精品福利| 成人av电影在线网| 亚洲一区二区偷拍精品| 欧美日韩极品在线观看一区| 日本视频一区二区| 久久天堂av综合合色蜜桃网| 国产在线播放一区| 中文字幕亚洲不卡| 欧美日韩三级一区| 九九**精品视频免费播放| 久久免费电影网| 97精品国产露脸对白| 午夜精品一区在线观看| 日韩三级在线观看| 国产酒店精品激情| 一区二区三区在线视频观看| 91精品国产欧美一区二区| 国产黑丝在线一区二区三区| 亚洲精品久久7777| 日韩精品专区在线| jlzzjlzz欧美大全| 日韩精品亚洲一区| 欧美高清在线一区二区| 欧美久久一区二区| 成人美女视频在线观看18| 一区二区三区美女| 久久久高清一区二区三区| 91激情在线视频| 国产在线日韩欧美| 亚洲免费观看高清| 日韩欧美一级在线播放| 99精品黄色片免费大全| 美女网站色91| 亚洲自拍欧美精品| 欧美国产日韩a欧美在线观看 | 国产成人aaa| 樱桃国产成人精品视频| 精品国产不卡一区二区三区| 97精品久久久午夜一区二区三区 | 偷拍日韩校园综合在线| 国产日韩影视精品| 欧美大度的电影原声| 91国产视频在线观看| 福利一区福利二区| 精品一区二区久久| 日韩精品久久久久久| 亚洲精品国产第一综合99久久| 久久久久久久精| 精品久久久久久久久久久院品网 | 一本大道久久a久久精二百 | 人人精品人人爱| 夜夜精品视频一区二区| 国产欧美日韩视频在线观看| 日韩欧美自拍偷拍| 欧美日韩亚洲丝袜制服| 色哟哟精品一区| 97成人超碰视| 成人黄色在线网站| 成人午夜视频网站| 国产成人在线视频网址| 精品一区二区在线免费观看| 亚洲成人动漫在线免费观看| 亚洲精品日韩专区silk | 欧美v国产在线一区二区三区| 欧美日本一道本| 日本韩国欧美在线| 91原创在线视频| 色综合 综合色| 色婷婷综合视频在线观看| 91麻豆免费在线观看| 99国产精品视频免费观看| www..com久久爱| 色综合久久综合网97色综合| eeuss鲁片一区二区三区在线看| 国产成人综合在线播放| 国产福利精品导航| 99天天综合性| 色美美综合视频| 欧美视频在线一区二区三区 | 国产成人啪免费观看软件| 国产精一区二区三区| 欧美一区二区久久| 欧美一区二区三区小说| 日韩一卡二卡三卡四卡| 欧美做爰猛烈大尺度电影无法无天| 国产精品一区三区| 国产suv一区二区三区88区| 成人免费看片app下载| 成人av手机在线观看| 色综合久久久久网| 久久夜色精品一区| 日韩女优视频免费观看| 久久久国产综合精品女国产盗摄| 91亚洲资源网| 久久久久久免费毛片精品| 天天综合日日夜夜精品| 99久久精品国产一区| 久久婷婷久久一区二区三区| 亚洲成a人片综合在线| 成人午夜av在线| 26uuu国产日韩综合| 日韩精品一级中文字幕精品视频免费观看 | 91精品国产aⅴ一区二区| 亚洲卡通动漫在线| 国产91高潮流白浆在线麻豆 | 91麻豆视频网站| 国产喷白浆一区二区三区| 久久精品国产久精国产| 69堂国产成人免费视频| 亚洲午夜在线视频| 色综合久久久久综合99| 国产精品久久久久久久久免费桃花 | 亚洲一区二区视频| 91免费看片在线观看| 欧美国产丝袜视频| 国产成人午夜精品影院观看视频 | 国产精品麻豆视频| 国产精品一区二区三区乱码| 欧美xxx久久| 蜜桃视频一区二区三区| 在线播放91灌醉迷j高跟美女| 一区二区三区毛片| 色婷婷综合久久久中文一区二区| 亚洲欧洲日韩女同| 99re成人精品视频| 中文字幕日本乱码精品影院| 成人h精品动漫一区二区三区| 国产精品少妇自拍| av动漫一区二区| 亚洲人被黑人高潮完整版| 一本大道久久精品懂色aⅴ | 美女一区二区三区| 欧美精品一区二区三区蜜桃| 国产综合色精品一区二区三区| 欧美xxxxx裸体时装秀| 国产专区欧美精品| 欧美韩国日本不卡| 色综合天天综合网天天狠天天| 国产精品入口麻豆原神| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 成人一区二区三区视频在线观看| 国产精品国产三级国产有无不卡 | 国产欧美日韩另类一区| 成人免费精品视频| 亚洲一区中文在线| 欧美一区二区精品在线| 国产成人免费网站| 亚洲欧美韩国综合色| 欧美日韩一区二区在线视频| 日韩av中文字幕一区二区 | 一本到三区不卡视频| 亚洲高清中文字幕| 日韩欧美一区在线观看| 国产精品一区专区| 一区二区三区自拍| 日韩精品一区在线| k8久久久一区二区三区| 丝袜a∨在线一区二区三区不卡 | 国产精品久久久久久久蜜臀| 色乱码一区二区三区88|