Home > air_sea > rhadj.m

rhadj

PURPOSE ^

RHADJ: rescales RH to have a maximum of 100%.

SYNOPSIS ^

function rha = rhadj(rh,rhmax)

DESCRIPTION ^

 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.)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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;

Generated on Thu 26-Apr-2007 12:23:13 by m2html © 2003