- 积分
- 3601
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-9-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 hillside 于 2013-5-31 20:54 编辑
用户手册——User Manual (Ver1.0)
Climate & Ocean Analysis Laboratory
(COAL)
National University of Malaysia
Juneng L. and F.T. Tangang
Introduction
CLIMABOX – stands for ‘Climate Analysis Toolbox’, is a product of Climate and Ocean Analysis Laboratory (COAL) at the National University of Malaysia. It is a collection of over 10 MATLAB (Mathwork Inc.) *.m files which we created or modified from other sources to ease our statistical climate diagnostic tasks on various climatic and oceanic data sets. Although the fundamental usage of this package lies within the climate research framework, minor modification for application in other research field is possible. At this time of writing, the package provides easy implementation of two major statistical techniques in the climate research field namely the Empirical Orthogonal Function (EOF) Analysis and the Canonical Correlation Analysis (CCA), which when combined, provides powerful linear diagnostic and forecasting tools. This package is released under GNU license. Modification of the source is allowed and reporting of bugs is most welcome and should head to juneng.liew@lycos.com . The collection of *.m files or functions are categorized into to 2 subsets – the ‘core’ functions which do the major EOF and CCA task and the ‘auxiliary’ functions which is called by the core functions. Most often, the auxiliary functions are also used explicitly for specific purposes. The collections of all the core and auxiliary functions are listed in Table 1. Read Appendix A for installation instruction.
CORE FUNCTIONS
AUXILIARY FUNCTIONS
eof.m
eofproj.m
eofrecon.m
getcca.m
simulcca.m
varimax.m
anomlong.m
crosspt.m
getseason.m
movaverg.m
poststdz.m
powspec.m
prestdz.m
rs2d3d.m
s3d2d.m
skillestim.m
sorteig.m
Table 1. List of all the core and auxiliary functions in CLIMABOX
The best way to master the skill of using a particular program or software is to actually experimenting or running it with some sample data set. Together with the package, a sample file (sample.mat) for testing and learning purposes is also provided. In this manual, we will first start-up by giving a brief introduction to EOF and CCA. A cookbook-styled instruction on using CLIMABOX will be delivered via an experimental analysis with the provided sample data.
Empirical Orthogonal Function Analysis
Empirical Orthogonal Function (EOF) analysis or Principle Component Analysis is a common multivariate analysis technique used to derive the dominant patterns from a statistical field (Storch and Zwiers, 1997). That is to say it serves as a noise reduction tool for a random field. Besides, it is common to use it as a dimension reduction tool prior to certain statistical modeling approaches such as CCA, Artificial Neural Networks etc ( ref ). CLIMABOX provides 4 core functions which are associated with the EOF analysis namely eof.m, eofrecon.m,
eofproj.m and varimax.m. The eof.m performs the regular EOF analysis while the varimax.m generates the rotated EOFs from the given eigen-vectors and specified number of modes to rotate. For noise reduction purposes, we often need to reconstruct the original (noise-reduced) fields from the first few significant modes. Function eofrecons.m does exactly what it means here.
eof.m
This function performs the SVD-based Empirical Orthogonal Function Analysis to the input matrix utillizing the MATLAB built-in SVD function.
SYNTAX
[AMPL, EVAL, EVEC] = EOF(INPUTX);
The only input matrix - INPUTX should be arranged in (temporal x spatial) dimension where the compression is along the spatial dimension. If the number of spatial points is greater then the number of temporal points, where this is the common case of the data set involved in the climatology analysis, the 'economic' type of routine are used. This produces the 'economic size' of the compression applying only to the smaller covariance matrix.
There are a total of 3 output produce by this function. The first output – AMPL, gives the correspondence principle components (PCs) in the columns arranging in descending sequences based on the variances explained. Thus the first column gives the 1st PC which explained the most variance in the data field. All the PCs are normalized to their respective square root of eigen value. The second output – EVAL gives the square root of the corresponding eigen value which can be utilized to compute the percentage of variance explained by each mode.
e.g. EVAL(k)^2 / sum( EVAL.^2 )
gives the percentage of variance explain by the k-th mode of the EOFs
e.g. sum( EVAL(1:q).^2 ) / sum(EVAL.^2)
gives the total percentage of the variance explained by the first q modes of the PC. The 3rd output -EVEC gives the corresponding eigen vector which can usually be used in the physical interpretation of the complex data set. The eigen vectors is given by each column in descending order. The 1st column gives the eigen vector associated with the 1st EOF mode. Each column should have the same length as the total spatial points in INPUTX.
Canonical Correlation Analysis
Overviews of CLIMABOX’s auxiliary functions
prestdz.m
This function normalized the time-series (or matrix) passed as the first argument to the respective means and standardized deviations. The mean and standard deviation of each column are first computed and later used for the normalization. User can also explicitly specified the desired mean
and standard deviation values as 2nd and 3rd arguments. This is of extremely useful when the data set is divided into 2 subsets used as training and test set. In order to assure the real forecast skill, the normalization of the test set should based on the mean and std. dev computed from training set. More on the validation and the usage of prestdz.m will be addressed later in next section.
SYNTAX:
[STDZ_MATRIX, MEAN_VEC, STD_VEC] = PRESTDZ(ORI_MATRIX);
[STDZ_MATRIX] = PRESTDZ(ORI_MATRIX, MEAN_VEC2, STD_VEC2);
If only one argument is passed, the function will automatically compute the mean and standard deviation of each column in the ORI_MATRIX and normalized each of the column accordingly. If the desired explicitly defined mean and standard deviation is passed as the MEAN_VEC2 and STD_VEC2 respectively, the output matrix is normalized with the defined mean and standard deviation values.
poststdz.m
This function “de-normalized” the standardized matrix based on the output - MEAN_VEC, STD_VEC from the prestdz.m. It is particularly useful when the real values instead of the standardized values of the forecast are desired.
SYNTAX:
[ORI_MATRIX] = POSTSTDZ( STDZ_MATRIX, MEAN_VEC, STD_VEC);
The first input STDZ_MATRIX is the standardized matrix to be de-normalized. MEAN_VEC and STD_VED from prestdz.m are crucial to get the de-normalized matrix – ORI_MATRIX.
APPENDIX A
Installing CLIMABOX
CLIMABOX is distributed as zip archive (CLIMABOX.zip). Download and unzip the file into a folder e.g C:\MATLABR11\toolbox\. A new folder named CLIMABOX should appear in the directory. Copy the sample.mat to your working directory (e,g C:\MATLABR11\work) for easy loading. Do not forget to set your working path to C:\MATLAR11\toolbox\CLIMABOX. Open File > Set Path to obtain a Path Browser window. Click on Browse button and search for the CLIMABOX folder. Click OK when you are done. Now in the Path Browser window, open menu Path > Add Path and File > Save Path. Done? Close the Path Browser window.
注:此软件来自于pudn。原网站链接已失效。具体用法我不太清楚。网上已搜不到相关消息,马来西亚大学官网上似乎已无气候研究者个人链接。
|
|