Relative Humidity Correction Program
This program is called by
prof_file_all2.m
and uses the variable names as assigned there. This program
requires the two MATLAB functions "correct.m" and "linter.m"
which are in the tcorrect.m program.
%rhcorrect.m
% Peter Guest 4/15/99
%corrects all tower air temps based on calibration checks
%does not check for bad data flags; these should be set to NaN
%average bias
bp1=-0.72;
bp2=-0.29;
bp25=0.02
bp3= 0.22
bp4=0.54;
bp5= 0.39;
bp6= 0.27;
b1p1= -bp1;
b1p2= -bp2;
b1p25= -bp25;
b1p3= -bp3;
b1p4= -bp4;
b1p5= -bp5;
b1p6= -bp6;
b2p1= -1.0 - bp1;
b2p2= -.75 - bp2;
b2p25= -.5 - bp25;
b2p3= -.3 - bp3;
b2p4= -.2 - bp4;
b2p5= -.2 - bp5;
b2p6= -.2 - bp6;
b3p1= -1.3 - bp1;
b3p2= -0.3 - bp2;
b3p25= 0.2 - bp25;
b3p3= 0.5 - bp3;
b3p4= 1.1 - bp4;
b3p5= 1.45 - bp5;
b3p6= .7 - bp6;
b4p1= -2.1 - bp1;
b4p2= -1.2 - bp2;
b4p25= -.5 - bp25;
b4p3= 0.0 - bp3;
b4p4= 0.0 - bp4;
b4p5= 0.3 - bp5;
b4p6= 0.6 - bp6;
b5p1= 0.8 - bp1;
b5p2= 0.8 - bp2;
b5p25= 0.9 - bp25;
b5p3= 0.9 - bp3;
b5p4= 1.8 - bp4;
b5p5= 0 - bp5;
b5p6= 0 - bp6;
rhcor1=correct(rh1,jd,b1p1,b1p2,b1p25,b1p3,b1p4,b1p5,b1p6);
rhcor2=correct(rh2,jd,b2p1,b2p2,b2p25,b2p3,b2p4,b2p5,b2p6);
rhcor3=correct(rh3,jd,b3p1,b3p2,b3p25,b3p3,b3p4,b3p5,b3p6);
rhcor4=correct(rh4,jd,b4p1,b4p2,b4p25,b4p3,b4p4,b4p5,b4p6);
rhcor5=correct(rh5,jd,b5p1,b5p2,b5p25,b5p3,b5p4,b5p5,b5p6);
%make previous 100% values still 100% (they may have originally been higher and set to 100% by Ola)
%this may cause some jumps - would be best to go back to original RH data (i.e. RH > 100 not set to 100)
%and make rh>100% equal to 100%
i100=find(rhcor1>100 | rh1==100);
rhcor1(i100)=100;
i100=find(rhcor2>100 | rh2==100);
rhcor2(i100)=100;
i100=find(rhcor3>100 | rh3==100);
rhcor3(i100)=100;
i100=find(rhcor4>100 | rh4==100);
rhcor4(i100)=100;
i100=find(rhcor5>100 | rh5==100);
rhcor5(i100)=100;
|
|
| Outline Page |
Relative Humidity Page |
|
Last update: 9/27/99
Please send all comments and suggestions to the author, Peter
Guest,