ET0 的计算和调用

clear
clc
%% 前处理,数据准备
% 加载原始数据
% 用时修改字段“ShiJin6Site”即可
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_WIN.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_TEM.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_SSD.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_RHU.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_PRS.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_PRE.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_GST.mat');
load('C:\Users\zxxdd\Documents\Climate\DATA\ShiJin6Site_EVP.mat');
% 计算日序数;
DateVector1=[ShiJin6Site_WIN(:,5:7)]; % 某某年某月某日
DateVector0=[ShiJin6Site_WIN(:,5),ones(size(ShiJin6Site_WIN,1),2)]; % 某某年1月1日
jday=datenum(DateVector1)-datenum(DateVector0)+1;
% 计算日序数;

Data=[ShiJin6Site_WIN(:,1:7),ShiJin6Site_TEM(:,[9,10,8]),ShiJin6Site_RHU(:,8),ShiJin6Site_WIN(:,8),ShiJin6Site_SSD(:,8),jday,ShiJin6Site_WIN(:,4),ShiJin6Site_WIN(:,2)];
% Data 是按照(Tmax,Tmin,Tmean,Rhmean,uh,DLc,jday,elevation,latitude)顺序初步排列的原始数据。
Data0=Data;

[I_x,I_y]=find(Data==32766); % 一共1011个32766;
Data(I_x,I_y)=nan;
DailyTEM_max=Data(:,8)./10; % 最高温度 ℃
DailyTEM_min=Data(:,9)./10; % 最低温度 ℃
DailyTEM_mean=Data(:,10)./10; % 平均温度 ℃
DailyRHU_mean=Data(:,11); % 相对湿度 1%
DailyWIN_mean=Data(:,12)./10; % 平均风速 m/s
DailySSD=Data(:,13)./10; % 日照时数 h
elevation=Data(:,4)./10; % 海拔高度 m
latitude0=Data(:,2)./100; % 地理纬度, 度.分
latitude =fix(latitude0)+mod(latitude0,1)/60; % 地理纬度转换为[度] fix(latitude)+mod(latitude,1)/60
% 降水量需要单独处理
%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

%% 程序计算ET0程序调用
[ETrad,ETaero,ET0]=ET0_CalculateSub(DailyTEM_max,DailyTEM_min,DailyTEM_mean,DailyRHU_mean,DailyWIN_mean,DailySSD,jday,elevation,latitude);

Leave a Reply

Your email address will not be published. Required fields are marked *