RClimDex中文用户手册_第1页
RClimDex中文用户手册_第2页
RClimDex中文用户手册_第3页
RClimDex中文用户手册_第4页
RClimDex中文用户手册_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

RClimDex (1.0)极端气候指数计算软件用户手册 张学斌 Feng Yang加拿大环境部气候研究中心2004年9月10日南京信息工程大学遥感学院 陈昌春 译注20138 作 者 致 谢 RClimDex 由Xuebin Zhang(张学斌)and Feng Yang(加拿大气象局气候研究部)开发与维护,最初的开发由加拿大国际发展办事处通过加中气候协作项目,C5资助。Lisa Alexander, Francis Zwiers, Byron Gleason, David Stephenson, Albert Klan Tank, Mark New, Lucie Vincent与Tom Peterson对R包的开发与测试作出了重要贡献。CCl/CLIVAR ETCCDMI的有关研讨会也对RClimDex的改进提供了宝贵的意见。. 译者的话原英文说明中所介绍的下载网址链接已无效,新网址包括http:/www.pcic.uvic.ca/tools-and-data/climdex/software.shtmlRClimdex可计算极端气候指数27项,以下摘录来自一硕士论文内蒙古地区极端气候事件时空变化及其与NDVI的相关性(使用RClimdex软件)的15项指数名称翻译及一段简要说明。.指数名称、解释、单位FD0 霜日 一年中日最低温0的日数 天SU25 夏日日数 日最高气温25的日数 天GSL 作物生长期 连续6 日5或5的时间跨度 天TN10p 冷夜日数 日最低气温90%分位值的日数 天TX10p 冷昼日数 日最高温90%分位值的日数 天WSDI 热持续指数 连续6 日最高温在90%分位值日数 天CSDI 冷持续指数 连续6 日最低温在10%分位值日数 天RX5day 5 日最大降水量 每月内连续五日的最大降水量 mmCDD 持续干燥指数 日降水量日最高温(2)日降水量”下,输入源文件(R包)名称:source(“rclimdex.r”)。如文件不在缺省目录( 什么目录? )中,在rclimdex.r名称之前,你可能需要用全路径名,此时在提示符下输入:source(f:/rclimdex/rclimdex.r(注意:全路径名之间的间隔符为unix下采用的“/”而不是windows操作系统命令行(即以前的DOS操作系统)下的“”)。这将加载RClimDex。 一旦源程序加载成功,RClimDex主菜单就会出现:译者注:英文原文中,3.1中1、2方法出现次序相反。为便利用户使用作了调换。3.2. 加载数据,运行质量控制模块(QC)数据质量控制模块是计算极端指数的预备性处理工作。RClimDex质量控制模块执行如下功能: 1) 用R语言认可的数据格式代替缺失值 (假设原数据以-99.9表示), 如用“NA”表示“不可得”;2) 用“NA”代替所有的不合理值。这些值包括 a) 小于0的日降水量; b) 小于日最小气温的日最大气温。此外,质量控制模块还能识别日最大气温与日最大气温的离群值(不正常值)。这些离群值是由用户定义的区域之外的日特征值。 当前,这个区域被定义为均值日特征值的n倍标准差(翻译待审核!),即mean n*std, mean+n*std。std表示日特征值的标准差 , n 表示一个用户的输入,mean(均值) 表示气候特征的日值。 在RClimDex主菜单中选择 “Load Data and Run QC” ,打开的窗口形式如下。用户能够选取用于计算极端指数的气候数据文件。 文件名的格式应该有如“stationname.txt”。文件中数值格式应该符合附录B的要求。 在这个实例中,我们使用一个名为“21946.txt”、 ASCII格式的站点数据。 数据加载成功之后,一个弹出窗口出现。 如果这一步没有顺利完成,一个错误信息提示将会出现。这通常是由于输入格式有误。请比较你的数据格式与手册提供的样例数据格式。 不合理的值将被自动识别,但离群值需要用户进行确认。 n的缺省值是3 (根据“为数据质量控制设定参数”的设定),但这个数值用户可以改写。因为3可能标志(flag)着一个很大的数值,用户可能希望设定为4。当参数设定是为了以后使用(翻译待复核!),不需要填写“Station name or code”,点击 “OK” 继续。译者注:此处n表示原始气象数据序列的标准差。如某地实际降水等变化超出此缺省值,可以适当放大,如将“”改成“5”以避免误将真实值当成离群值。如果发现不合理值,将会出现弹出窗口。例如,日最小气温大于日最大气温。 如果在日降水量中出现负值 (除了以-99.9表示缺测的情况) ,将会出现以下窗口: 如果有离群值出现,将出现以下窗口。 译者注:离群值的查找很方便。如果出现离群值,根据系统提示的目录中生成的文件21946tepstdQC.csv对原始数据中的不合理值进行查找与修改即可。数据控制模块完成,将会弹出一个窗口。同时,4个Excel文件: “21946tempQC.csv”, “21946prcpQC.csv”, “21946tepstdQC.csv”, and “21946indcal.csv” 将建立在一个名为log 的子目录中。开始的2个文件包含着气温与降水中存在的不合理值(比“离群值”还不合理)信息,第3个文件标记所有可能的气温离群值及其出现日期。最后一个文件包含着数据控制模块的信息,并将用于指数的计算。注意:在最后的一个文件中,仅用NA代替缺失值 和不合理值,并未改变作了标记的离群值。 为了可视化,4个 用于日最高、最低气温、日降水时间序列范围绘图的PDF文档 (缺失值被标为红点) 放置在log目录之中。. 因此,用户可能需要检查文件 “21946tepstdQC.csv” 中的数据,是否标记为离群值的数据真的为离群值。文件 “21946indcal.csv” 可以用Windows 系统下的Excel 软件或Unix系统下的编辑器进行修改。这一步操作完成之后,用户点击OK,进入后续的指数计算。 注意:指数采用数据质量控制后的数据进行计算。原始的输入文件并未改变。译者注:21946tepstdQC.csv中保存着软件认为可能不合理的值,用户可以查看或修改。不合理值包括:降水量为负值、最低气温大于最高气温。系统自动生成一个校核过的新数据文件进行后续处理,并不直接使用原始数据文件)因此,用户想要修改原始数据文件以改正错误值的话,应当重新加载数据,数据质量控制模块也需要再次运行。3.3. 指数计算RClimDex能够计算附录A中全部的27种核心气候指数,用户可以根据需要选择指数进行计算。 在主菜单中选择值“计算指数(Indices Calculation)”之后,用户被要求设置某些参数。“设置参数值(Set Parameter Values)”窗口允许用户输入用于门槛值计算的基期的第1年和最后1年、站点纬度(南半球为负值)、用户定义的日降水门槛值P (用毫米mm表示), 当日降水超过这个门槛值时计算持续日数 (Rnn指示器)、4个用户定义的气温门槛值。“用户定义的日最高限值(User defined Upper Limit of Day High)”用于计算日最高气温高于门槛值时的持续日数。 “用户定义的日最高限值(User defined Lower Limit of Day High)”用于计算日最高气温低于该值时的持续日数。 “用户定义的日低值上限(User defined Upper Limit of Day Low)” 用于计算日最低气温超过该值时的持续日数。“用户定义的日低值下限(User defined Lower Limit of Day Low)” 用于计算日最低气温低于此值的持续日数。这些指数分别被称作SUmm、FDmm、TRmm、IDmm, “mm”对应于用户定义的值。 译者注:基期的第1年系统自动识别为原始序列的第2个值的年份,而不是第个值的年份,原因见4. 已知的差错。采用默认设置不作改动可以运行,但具体影响本人尚未深入分析。对于降水指数的计算可能无直接影响,但影响温度指数的计算。4. 已知的差错提供的一个补救方法是在观测数据前面增加一个值(但标为-99.9)详见4. 已知的差错。“用户定义的日降水门槛值P (用毫米mm表示), 当日降水超过这个门槛值时计算持续日数 (Rnn指示器)”的修改可能影响连续湿润指数的计算(CWD)。这一步完成之后,一个窗口会出现,允许用户选择需要计算的指数。缺省设置为计算所有指数。 退选不需计算的指数项目后,点击 “OK” 进行计算。根据选择计算的指数多少,这一步的计算时间各有长短。译者注:在调试过程中,为节约运算时间可退选暂不需要计算的项目。如仅需CDD,保留CDD选项即可。需要计算的指数运算完成之后 ,出现一个弹出窗口。 计算所得的指数序列以Excel格式存放在名为indices 的子目录中。指数结果文件名称类似 “21946_XXX.cvs”, XXX表示指数的名称。数据的各列用逗号(“,”)分隔 。考虑可视化需要,绘制了年序列、趋势(最小线性二乘法solid line,locally weighted linear regression (dashed line))的图形,线性回归的趋势拟合也进行了绘制。这些图形被保存在名为JPEG的子目录中,图形文件名命名方法与前述类似,仅将 “cvs”换成 “jpg”。 译者注:提示窗口仅标出了plots目录,其他结果文件也在相应目录之中。选择“计算指数(Indices Calculation)”可以为同样的站点计算其它的指数。对于其他站点,选择“数据质量控制模块(Data QC)”、重复上述的同样过程。所有的计算完成之后,选择 “Exit”即可。 4. 已知的差错在RClimDex本版以及此前版本中有一个已知的差错。假如可得数据 的第1年与基期的第1年相同 的话,程序将中止执行。产生这个差错的原因之一是气温百分比指数计算中需要一个基期以外的数据。避免这个差错的一个方法是在观测序列的第1个数据之前增加一个值,比如数据文件的基期为1961-1990、现有数据从1961年1月1日开始,可以在数据文件中增加1个前1天的数据(视作缺测,标为-99.9):“1960 12 31 -99.9 -99.9 -99.9”5. 差错报告Please report any bugs/errors to yang.fengec.gc.ca with error messages and data being used for the calculation of the indices. This will be helpful in producing a better release in the near future. We would also appreciate your suggestions for further improvement. APPENDIX A: List of ETCCDMI core Climate IndicesIDIndicator nameDefinitionsUNITSFD0Frost daysAnnual count when TN(daily minimum)25CDaysID0Ice daysAnnual count when TX(daily maximum)20CDaysGSLGrowing season LengthAnnual (1st Jan to 31st Dec in NH, 1st July to 30th June in SH) count between first span of at least 6 days with TG5C and first span after July 1 (January 1 in SH) of 6 days with TG5CDaysTXxMax TmaxMonthly maximum value of daily maximum tempCTNxMax TminMonthly maximum value of daily minimum tempCTXnMin TmaxMonthly minimum value of daily maximum tempCTNnMin TminMonthly minimum value of daily minimum tempCTN10pCool nightsPercentage of days when TN10th percentileDaysTX10pCool daysPercentage of days when TX90th percentileDaysTX90pWarm daysPercentage of days when TX90th percentileDaysWSDIWarm spell duration indicatorAnnual count of days with at least 6 consecutive days when TX90th percentileDaysCSDICold spell duration indicatorAnnual count of days with at least 6 consecutive days when TN=1.0mm) in the yearMm/dayR10Number of heavy precipitation daysAnnual count of days when PRCP=10mmDaysR20Number of very heavy precipitation daysAnnual count of days when PRCP=20mmDaysRnnNumber of days above nn mmAnnual count of days when PRCP=nn mm, nn is user defined thresholdDaysCDDConsecutive dry daysMaximum number of consecutive days with RR=1mmDaysR95pVery wet daysAnnual total PRCP when RR95th percentileMmR99pExtremely wet daysAnnual total PRCP when RR99th percentilemmPRCPTOTAnnual total wet-day precipitationAnnual total PRCP in wet days (RR=1mm)mmAPPENDIX B: 输入数据格式译者注:用于输入的观测数据文件只能使用纯文本格式,不能使用CSV文件等。All of the data files that are read or written are in list formatted format. The exception is the very first data file that is processed in the “ Quality Control” step. This input data file has several requirements:1. ASCII text file 译者注:ASCII码文本文件2. Columns as following sequences: Year, Month, Day, PRCP, TMAX, TMIN. (NOTE: PRCP units = millimeters and Temperature units= degrees Celsius)3. The format as described above must be space delimited (e.g. each element separated by one or more spaces).4. For data records, missing data must be coded as -99.9; data records must be in calendar date order. Missing dates allowed.Example data Format for the initial data file (e.g. used in the Quality Control step):190111-99.9-3.1-6.8190112-99.9-1.3-3.6190113-99.9-0.5-7.9190114-99.9-1-9.1190117-99.9-1.8-8.4译者注:数据格式必须与上表保持一致,年、月、日、降水值(mm)、最高气温、最低气温(摄氏温度)。缺测值必须使用-99.9。所有记录必须按日历年排序,但允许有缺失。比如上表中1月5、6、7日缺失。APPENDIX C: Indices definitionsDefinitions for indicators listed in Appendix A. For practical reasons, in this version of the software, not all indices are calculated on a monthly basis. Monthly indices are calculated if no more than 3 days are missing in a month, while annual values are calculated if no more than 15 days are missing in a year. No annual value will be calculated if any one months data are missing. For threshold indices, a threshold is calculated if at least 70% of data are present. For spell duration indicators (marked with a *), a spell can continue into the next year and is counted against the year in which the spell ends e.g. a cold spell (CSDI) in the Northern Hemisphere beginning on 31st December 2000 and ending on 6th January 2001 is counted towards the total number of cold spells in 2001.1. FD0Let be the daily minimum temperature on day in period. Count the number of days where:2. SU25Let be the daily maximum temperature on day period. Count the number of days where:3. ID0Let be the daily maximum temperature on day in period. Count the number of days where:4. TR20Let be the daily minimum temperature on dayin period. Count the number of days where:5. GSL Let be the mean temperature on dayin period. Count the number of days between the first occurrence of at least 6 consecutive days with:and the first occurrence after 1st July (1st January in SH) of at least 6 consecutive days with:6. TXxLet be the daily maximum temperatures in month, period. The maximum daily maximum temperature each month is then:-7. TNxLet be the daily minimum temperatures in month, period. The maximum daily minimum temperature each month is then:-8. TXnLet be the daily maximum temperatures in month, period. The minimum daily maximum temperature each month is then:-9. TNnLet be the daily minimum temperatures in month, period. The minimum daily minimum temperature each month is then:-10. Tn10pLet be the daily minimum temperature on day in period and let be the calendar day 10th percentile centred on a 5-day window (calculated using method from Appendix D). The percentage of time is determined where:11. Tx10pLet be the daily maximum temperature on dayin period and let be the calendar day 10th percentile centred on a 5-day window (calculated using method from Appendix D). The percentage of time is determined where:12. Tn90pLet be the daily minimum temperature on day in period and let be the calendar day 90th percentile centred on a 5-day window (calculated using method from Appendix D). The percentage of time is determined where:13. Tx90pLet be the daily maximum temperature on day in period and let be the calendar day 90th percentile centred on a 5-day window (calculated using method from Appendix D). The percentage of time is determined where:14. WSDI*Let be the daily maximum temperature on day in period and let be the calendar day 90th percentile centred on a 5-day window (calculated using method from Appendix D). Then the number of days per period is summed where, in intervals of at least 6 consecutive days:-15. CSDI*Let be the daily minimum temperature at day in period and let be the calendar day 10th percentile centred on a 5-day window (calculated using the method from Appendix D). Then the number of days per period is summed where, in intervals of at least 6 consecutive days:-16. DTRLet and be the daily maximum and minimum temperature respectively on day in period. If represents the number of days in, then:17. RX1dayLet be the daily precipitation amount on day in period. Then maximum 1-day values for period are:18. Rx5dayLet be the precipitation amount for the 5-day interval ending, period. Then maximum 5-day values for period are:19. SDIILet be the daily precipitation amount on wet days,in period. If represents number of wet days in, then:20. R10Let be the daily precipitation amount on day in period. Count the number of days where:21. R20Let be the daily precipitation amount on day in period. Count the number of days where:22. RnnLet be the daily precipitation amount on day in period. If represents any reasonable daily precipitation value then, count the number of days where:23. CDD*连续无雨日数(持续干燥指数),阈值为1mmLet be the daily precipitation amount on day in period. Count the largest number of consecutive days where:译者注:译者通过对源程序CDD模块的分析,找到了修改阈值的语句。因为RCLIMDEX自带的CDD阈值仅是1mm,而农业干旱等实际研究中存在多种降水阈值的设定。如3mm,5mm等。一篇美国农业干旱文献设为=1改为prcp=6.35(或其他因地制宜之干旱指标阈值)2.第303行 将PRCP=1mm改为PRCP=6.35mm(此句仅用作绘图标题,并不参与计算,不改亦无大碍) 3.第1905行这是最关键的一句。应将midj1改为 midj6.3524. CWD*Let be the daily precipitation amount on day in period. Count the largest number of consecutive days where:25. R95pTOTLet be the daily precipitation amount on a wet day in periodand letbe the 95th percentile of precipitation on wet days in the 1961-1990 period. If represents the number of wet days in the period, then:26. R99pLet be the daily precipitation amount on a wet day in periodand letbe the 99th percentile of precipitation on wet days in the 1961-1990 period. If represents number of wet days in the period, then:27. PRCPTOTLet be the daily precipitation amount on day in period. If represents the number of days in, thenAppendix D: 阈值(门槛值)估计与基期温度指数计算Empirical quantile estimation:The quantile of a distribution is defined as , 1p1,where F(x) is the distribution function. Let denote the order statistics of (i.e. sorted values of X), and let denote the ith sample quantile definition. The sample quantiles can be generally written as.Hyndman and Fan (1996) suggest a formula to obtain medium un-biased estimate of the quantile by letting and letting , where int(u) is the largest integer not greater than u. The empirical quantile is set to the smallest or largest value in the sample when j n respectively. That is, quantile estimates corresponding to pn/(n+1) are set to the largest value in the sample.Bootstrap procedure for the estimation of exceedance rate for the base period:It is not possible to make an exact estimate of the thresholds due to sampling uncertainty. To provide t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论