


RHADJ: rescales RH to have a maximum of 100%. RHADJ(rh,rhmax) rescales RH so that the maximum values do not exceed 100%. Assumes values between 93% and rhmax should be rescaled to 93 - 100% (the calibration curves of RH sensors usually become nonlinear above ~ 90%, and may peak above 100% in this range above ~ 90% where their calibration becomes unstable.)


0001 function rha = rhadj(rh,rhmax) 0002 % RHADJ: rescales RH to have a maximum of 100%. 0003 % RHADJ(rh,rhmax) rescales RH so that the maximum values do not 0004 % exceed 100%. Assumes values between 93% and rhmax should be 0005 % rescaled to 93 - 100% (the calibration curves of RH sensors usually 0006 % become nonlinear above ~ 90%, and may peak above 100% in this range 0007 % above ~ 90% where their calibration becomes unstable.) 0008 0009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0010 % 4/10/98: version 1.0 0011 % 8/5/99: version 2.0 0012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0013 0014 rhl=93; 0015 0016 rhn=rh; 0017 a=(100-rhl)./(rhmax-rhl); 0018 drh=rh-rhl; 0019 j=find(drh>0); 0020 rhn(j)=rhl+a.*drh(j); 0021 0022 rha=rhn;