[Wrf-users] WRF post-treatement compute RH

HEDDE Thierry 137147 thierry.hedde at cea.fr
Fri Jan 15 00:30:28 MST 2016


Hi,

I'm using this formula from Vaissala, see below
It's in Perl

Thierry
###############################################################################
#  Compute Relative humidity & Dew point temperature
# http://www.vaisala.com/Vaisala%20Documents/Application%20notes/Humidity_Conversion_Formulas_B210973EN-F.pdf

sub ComputeRelativeHumidity{
  push(@subindent,$indent);

  my $Q = 0;                                       # Vapour content Kg/kg
  my $T = 0;                                        # Temperature K
  my $P = 0;                                        # Pressure  (Pa)

  ($Q, $T, $P) = @_;
  my $subname = (caller(0))[3];
  ($debug1) && print  "@subindent>$subname\n";

  # Constant parameters
  my $C1 = -7.85951783;
  my $C2 = 1.84408259 ;
  my $C3 = -11.7866497;
  my $C4 = 22.6807411 ;
  my $C5 = -15.9618719;
  my $C6 = 1.80122502 ;
  my $Pc = 22064000;                      # Critical Pressure Pa
  my $Tc = 647.096;                         # Critical temperature K
  my $B  = 0.6219907; # kg/kg = Molecular mass of H2O/ Molecular mass of air
  my $A  = 611.6441;                       #Pa
  my $m  = 7.591386;                      # -
  my $Tn = 240.7263;                      # ?

  my $Pw;                                           # Water vapour pressure  (Pa)
  my $Pws;                                # Saturation water vapour pressure  (Pa)
  my $RH ;                                           # relative Humidity percentage
  my $TD_C ;                                      # Dew point temperature °C

  my $T_C = $T - $KELVIN_TO_CELSIUS;

  #    my $tt = 1 - $T/$TC;
  #    $Pws = $Pc * exp(($Tc/$T)*($C1*$tt + $C2*$tt**1.5 + $C3*$tt**3 + $C4*$tt**3.5 + $C5*$tt**4 + $C6*$tt**7.5));
  $Pws = $A * 10**(($m*$T_C)/($T_C+$Tn));
  $Pw  = $P * ($Q / ($Q + $B));
  $RH = $Pw/$Pws*100.;
  ($RH > 100) && ($RH = 100);
  ($RH <   0) && ($RH =   0);

  $TD_C = $Tn/(($m*log(10))/(log($Pw/$A)) - 1);
  ($TD_C > $T_C) && ($TD_C = $T_C); # some times TD is > T when we have saturation


  pop(@subindent);
  return ($RH, $TD_C);
}
###############################################################################

Thierry HEDDE
[Description : cid:image001.png at 01CD508D.94A56310]

Laboratoire de Modélisation des Transferts dans l'Environnement<http://www-cadarache.cea.fr/fr/activites/fission/dtn/Plateformes/Environnement/Plateforme_environnement.php>
CEA/Cadarache
SIRET : 775 685 019 00587
Bât 727 P102
13108 Saint Paul lez Durance cedex


ü 43.6877°N  5.7611°E
     Géoportail<http://geoportail.fr/url/7F7oz2>

[cid:image002.png at 01D14F6E.FC2FE850]
[cid:image003.png at 01D14F6E.FC2FE850]


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20160115/06c2745a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2819 bytes
Desc: image001.gif
Url : http://mailman.ucar.edu/pipermail/wrf-users/attachments/20160115/06c2745a/attachment-0001.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2272 bytes
Desc: image002.png
Url : http://mailman.ucar.edu/pipermail/wrf-users/attachments/20160115/06c2745a/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1320 bytes
Desc: image003.png
Url : http://mailman.ucar.edu/pipermail/wrf-users/attachments/20160115/06c2745a/attachment-0003.png 


More information about the Wrf-users mailing list