source: Roms_tools/air_sea/rhadj.m @ 2

Last change on this file since 2 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

File size: 707 bytes
Line 
1function rha = rhadj(rh,rhmax)
2% RHADJ: rescales RH to have a maximum of 100%.
3% RHADJ(rh,rhmax) rescales RH so that the maximum values do not
4% exceed 100%. Assumes values between 93% and rhmax should be
5% rescaled to 93 - 100% (the calibration curves of RH sensors usually
6% become nonlinear above ~ 90%, and may peak above 100% in this range
7% above ~ 90% where their calibration becomes unstable.)
8
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10% 4/10/98: version 1.0
11% 8/5/99: version 2.0
12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14rhl=93;
15
16rhn=rh;
17a=(100-rhl)./(rhmax-rhl);
18drh=rh-rhl;
19j=find(drh>0);
20rhn(j)=rhl+a.*drh(j);
21
22rha=rhn;
Note: See TracBrowser for help on using the repository browser.