Skip to content

Commit

Permalink
Correction for dry air density
Browse files Browse the repository at this point in the history
  • Loading branch information
kebasaa committed Apr 21, 2022
1 parent cb83ccf commit 763caad
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions 02_laser.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,20 @@
" return(RH)\n",
"\n",
"# Density of dry air\n",
"# - https://en.wikipedia.org/wiki/Density_of_air\n",
"def calculate_rho_dry_air(T_C, P_Pa):\n",
"# - https://www.licor.com/env/support/EddyPro/topics/calculate-micromet-variables.html\n",
"def calculate_rho_dry_air(T_C, h2o_mmol_mol, P_Pa):\n",
" # Constants\n",
" R_dry_air = 287.058 # [J/(kg·K)] Specific gas const dry air\n",
" # Calculations\n",
" R_dry_air = 287.058 # [J kg-1 K-1] Specific gas const dry air\n",
" T_K = T_C + 273.15\n",
" rho_dry_air = P_Pa / (R_dry_air * T_K) # Density of dry air (use for approximation)\n",
" \n",
" # Preparations\n",
" R = 8.314463 # Ideal gas constant (J K-1 mol-1)\n",
" M_d = 0.02897 # molecular weights of dry air (kg mol-1)\n",
" M_h2o = 0.01802 # molecular weights of water vapour (kg mol-1)\n",
" e = h2o_mol_mol * P_Pa # Water vapor partial pressure (Pa)\n",
" P_d = P_Pa - e # Dry air partial pressure (P_d, P_a)\n",
" \n",
" rho_dry_air = P_d / (R_dry_air * T_K) # Density of dry air (use for approximation)\n",
" return(rho_dry_air)\n",
"\n",
"# Density of moist air\n",
Expand Down

0 comments on commit 763caad

Please sign in to comment.