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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? getnc_s.m

?? 讀取Network Common Data Form (netCDF)數(shù)據(jù)
?? M
?? 第 1 頁 / 共 3 頁
字號:
function values = getnc_s(file, varid, corner, end_point, stride, order, ...      change_miss, new_miss, squeeze_it, rescale_opts)% GETNC_S returns a hyperslab of values from a netCDF variable.%%  function values = getnc_s(file, varid, corner, end_point, stride, order, ...%        change_miss, new_miss, squeeze_it, rescale_opts)%% DESCRIPTION:% getnc_s is an non-interactive function that gets a hyperslab% of values from a netCDF variable; its arguments specify what data% points are to be retrieved.  Thus, getnc_s is suitable for use% in a matlab script or function file.  In practice its common use is to be% called by getnc.%  % 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.  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_s.m,v $% %--------------------------------------------------------------------% Written by Jim Mansbridge december 10 1991% 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 that there are the correct number of arguments. If the 6th, 7th% or 8th arguments are missing then they are set here.  If the 3rd, 4th% or 5th arguments are missing then their defaults will be set later% when we find out the dimensions of the variable.  It produces an error% if the corner is set but the end_point is not.if (nargin == 2) | (nargin == 4) | (nargin == 5)  order = -1;  change_miss = 2;  new_miss = 0;  squeeze_it = 1;elseif nargin == 6  change_miss = 2;  new_miss = 0;  squeeze_it = 1;elseif nargin == 7  new_miss = 0;  squeeze_it = 1;elseif nargin == 8  squeeze_it = 1;elseif (nargin ~= 9) & (nargin ~= 10)  s = [ ' number of input arguments = ' int2str(nargin) ];  disp(s)  help getnc_s  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.if nargin == 10  [rescale_var, rescale_att] = y_rescal(rescale_opts);else  [rescale_var, rescale_att] = y_rescal;end% 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 values of the first 2 input arguments are acceptable.if ~isstr(file)  error(' FILE is not a string');endif ~isstr(varid)  size_var = size(varid);  if size_var(1) ~= 1 | size_var(2) ~= 1    error('ERROR: varid must be a scalar or a string')  end  if varid < 0    error('ERROR: varid is less than zero');  endend% 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 procedure gives an% error message and exits.  This is unlike the interactive version ,% getnc.m.  If 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    error([ 'exiting because ' cdf ' is in compressed form' ]);  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.[ndimens, nvars, ngatts, recdim, rcode] =  ncmex('ncinquire', cdfid);if rcode == -1  error(['** ERROR ** ncinquire: rcode = ' num2str(rcode)])end% Determine the netcdf id number for the required variable.  If varid% is a string then an appropriate call to ncmex is used to convert it% to the relevant integer.  Note the ugly way that the letters varid% have 3 meanings in the one line of code.  If varid is a number then% it is decremented.  This is done because inqnc & getnc count the% variables from 1 to nvars whereas the calls to the ncmex routines% use c-type counting, from 0 to nvars - 1.if isstr(varid)  varid = ncmex('varid', cdfid, varid);  if rcode == -1    error(['** ERROR ** ncvarid: rcode = ' num2str(rcode)])  endelse  varid = varid - 1;end% Check the value of varidif varid < 0 | varid >= nvars   error([ 'getnc_s was passed varid = ' int2str(varid) ])end% Find out info about the variable, in particular find nvdims, the number of% dimensions that the variable has.[varnam, vartypv, nvdims, vdims, nvatts, rcode] = ...    ncmex('ncvarinq', cdfid, varid);if rcode == -1

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产三级电影在线观看| 99久久久久久| 日韩精品中文字幕在线不卡尤物 | 国产精品女主播av| 国产福利91精品一区二区三区| 精品精品欲导航| 韩国三级中文字幕hd久久精品| 久久免费看少妇高潮| 国产精品一区在线| 中文字幕色av一区二区三区| 色婷婷综合久色| 婷婷国产在线综合| 精品sm在线观看| 成人午夜av影视| 亚洲最新视频在线播放| 91精品视频网| 国产精品一二二区| 亚洲伦理在线精品| 91精品国产入口| 粉嫩13p一区二区三区| 亚洲欧美日韩国产一区二区三区| 欧美日韩美少妇| 国内精品国产成人国产三级粉色 | 欧美综合色免费| 麻豆成人91精品二区三区| 欧美国产综合色视频| 日本电影亚洲天堂一区| 麻豆91免费观看| 亚洲天堂成人在线观看| 91精品国产乱| 97久久精品人人做人人爽50路| 亚洲国产精品嫩草影院| 久久精品亚洲国产奇米99| 91久久一区二区| 国模冰冰炮一区二区| 亚洲激情六月丁香| 久久久久久99精品| 欧美日韩一区二区三区高清| 国产经典欧美精品| 日韩av午夜在线观看| 国产精品第五页| 欧美mv日韩mv亚洲| 欧美吻胸吃奶大尺度电影| 国产成人精品免费看| 天天综合天天做天天综合| 国产精品久久久久一区二区三区 | 欧美吻胸吃奶大尺度电影| 国产91在线看| 蜜桃视频第一区免费观看| 亚洲精品日产精品乱码不卡| 亚洲精品一区二区在线观看| 欧美亚洲图片小说| 99视频在线观看一区三区| 国产一区二区在线视频| 日本美女视频一区二区| 亚洲精品午夜久久久| 国产精品色哟哟| 久久综合狠狠综合久久综合88 | 亚洲精品欧美二区三区中文字幕| 欧美成人a视频| 91精品国产美女浴室洗澡无遮挡| 一本色道久久综合亚洲91| 成人免费视频播放| 国产成人欧美日韩在线电影| 精品在线你懂的| 久久不见久久见免费视频1| 日韩成人精品在线观看| 午夜精品一区二区三区电影天堂 | 亚洲天堂精品在线观看| 欧美国产日韩一二三区| 国产亚洲精品中文字幕| 久久精品人人爽人人爽| 久久久久综合网| 精品国产凹凸成av人导航| 日韩精品中文字幕在线不卡尤物| 欧美一区二区三区人| 欧美一区二区日韩| 欧美大片顶级少妇| 精品国产伦一区二区三区观看方式 | av在线不卡网| 91在线视频播放地址| 91亚洲国产成人精品一区二三| 成人一道本在线| a亚洲天堂av| 99精品视频免费在线观看| av中文字幕亚洲| 91高清在线观看| 欧美日本韩国一区二区三区视频| 欧美影院一区二区三区| 欧美高清dvd| 精品三级在线观看| 国产嫩草影院久久久久| 国产成人亚洲综合a∨婷婷 | 亚洲色图一区二区三区| 一区二区免费在线| 偷偷要91色婷婷| 国产一区激情在线| aaa亚洲精品| 欧美日韩久久久一区| 日韩欧美一区电影| 欧美韩日一区二区三区四区| 亚洲免费观看高清在线观看| 视频在线观看91| 国产乱子伦一区二区三区国色天香| 国产成人啪免费观看软件| 色婷婷久久一区二区三区麻豆| 欧美日韩一区二区三区四区| 精品999在线播放| 亚洲人成人一区二区在线观看 | 777久久久精品| 日韩美女一区二区三区四区| 国产亚洲精品久| 亚洲123区在线观看| 国产精品综合一区二区三区| 色婷婷av一区二区三区gif| 欧美猛男gaygay网站| 久久久久久亚洲综合| 一区二区三区欧美| 精油按摩中文字幕久久| 91在线精品一区二区| 91麻豆精品国产91久久久久| 久久久久久麻豆| 日本亚洲一区二区| 99久久精品费精品国产一区二区| 欧美日韩视频不卡| 国产精品你懂的| 免费观看日韩电影| 色88888久久久久久影院按摩| 日韩免费观看高清完整版 | 欧美精品久久天天躁| 国产欧美一区二区精品性| 亚洲亚洲精品在线观看| 国产999精品久久久久久绿帽| 欧美日韩高清一区二区三区| 国产精品高潮久久久久无| 日本成人在线不卡视频| 日本乱人伦一区| 久久精品男人的天堂| 日本在线不卡视频一二三区| 一本色道久久综合亚洲91| 国产拍揄自揄精品视频麻豆| 日韩影院免费视频| 在线观看国产91| 亚洲三级小视频| 成人免费毛片aaaaa**| 久久综合久久综合九色| 日本美女一区二区三区视频| 欧美视频第二页| 亚洲欧美激情视频在线观看一区二区三区| 九九精品视频在线看| 亚洲午夜久久久久| 99精品久久免费看蜜臀剧情介绍| 久久这里只有精品视频网| 日本特黄久久久高潮| 欧洲日韩一区二区三区| 亚洲三级小视频| 99久久久精品| 亚洲欧美成aⅴ人在线观看| 不卡欧美aaaaa| 亚洲国产岛国毛片在线| 国产传媒日韩欧美成人| 久久影院午夜论| 国产伦精品一区二区三区视频青涩 | 中文字幕第一区| 大白屁股一区二区视频| 欧美激情一区在线观看| 国产激情精品久久久第一区二区 | 欧美在线你懂的| 亚洲国产高清aⅴ视频| 国产精品亚洲一区二区三区妖精| 日韩视频一区二区三区| 青青草成人在线观看| 色综合久久天天综合网| 欧美性xxxxxx少妇| 亚洲线精品一区二区三区| 精品国产一二三| 一本大道久久a久久综合婷婷| 午夜精品久久久久久久久久 | 欧美色偷偷大香| 精品综合久久久久久8888| 欧美国产1区2区| 欧美日韩中字一区| 国产精一品亚洲二区在线视频| 一区二区在线免费| 精品国精品国产尤物美女| 一本到不卡免费一区二区| 蜜臀av在线播放一区二区三区| 国产精品网曝门| 日韩网站在线看片你懂的| 久久久.com| 亚洲精品日日夜夜| 天堂久久久久va久久久久| 免费在线观看视频一区| 欧美日韩国产精品成人| 91精品国产色综合久久不卡蜜臀 | 国产精品三级av在线播放| 国产精品午夜在线| 成人性生交大片免费看在线播放 | 精品国产亚洲一区二区三区在线观看| 国产日产欧美一区二区视频|