- 积分
- 426
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-3-20
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
是matlab 新手,老师给了我一个绘制footprint的函数
函数如下
FFP Input
% All inputs as scalars
% zm = Measurement height above displacement height (i.e. z-d) [m]
% z0 = Roughness length [m] - enter [NaN] if not known
% umean = Mean wind speed at zm [ms-1] - enter [NaN] if not known
% Either z0 or umean is required. If both are given,
% z0 is selected to calculate the footprint
% h = Boundary layer height [m]
% ol = Obukhov length [m]
% sigmav = Standard deviation of lateral velocity fluctuations [ms-1]
% ustar = Friction velocity [ms-1]
%
% Optional input (varargin):
% Enter as calc_footprint_FFP(...,'OptionalInput',InputValue)
% wind_dir = Wind direction in degrees (of 360) for rotation of the footprint
% r = Percentage of source area for which to provide contours, must be between 10% and 90%.
% Can be either a single value (e.g., "80") or an array of percentage values
% (e.g., "[10:10:80]")
% Expressed either in percentages ("80") or in fractions of 1 ("0.8")
% Default is [10:10:80]. Set to "NaN" for no output of percentages
% nx = Integer scalar defining the number of grid elements of the scaled footprint.
% Large nx results in higher spatial resolution and higher computing time.
% Default is 1000, nx must be >=600.
% rslayer = Calculate footprint even if zm within roughness sublayer: set rslayer = 1
% Note that this only gives a rough estimate of the footprint as the model is not valid within
% the roughness sublayer. Default is 0 (i.e. no footprint for within RS).
% z0 is needed for estimation of the RS.
% crop = Crop output area to size of the 80% footprint or the largest r given if crop=1
%
% FFP output
% FFP = Structure array with footprint data for measurement at [0 0 zm] m
% FFP.x_ci_max = x location of footprint peak (distance from measurement) [m]
% FFP.x_ci = x array of crosswind integrated footprint [m]
% FFP.f_ci = array with footprint function values of crosswind integrated footprint [m-1]
% FFP.x_2d = x-grid of 2-dimensional footprint [m], rotated if wind_dir is provided
% FFP.y_2d = y-grid of 2-dimensional footprint [m], rotated if wind_dir is provided
% FFP.f_2d = Footprint function values of 2-dimensional footprint [m-2]
% FFP.r = Percentage of footprint as in input, if provided
% FFP.fr = Footprint value at r, if r is provided
% FFP.xr = x-array for contour line of r, if r is provided
% FFP.yr = y-array for contour line of r, if r is provided
% For array of percentage values, structure entries can be accessed
% as FFP(1).r, FFP(1).xr, etc.
% flag_err = 1 in case of error, 0 otherwise
%
%
% Example
% [FFP,flag_err]=calc_footprint_FFP(20,0.01,NaN,2000,-10,0.9,0.5,'wind_dir',30,'r',[10:20:80]) |
|