#!/usr/bin/env python3 """ NAME: wcm_twc.py PURPOSE: Demostration of coding the WCM equations to calculate Total Water Content. SYNTAX: ./wcm_twc.py PARAMETERS: None EXAMPLE: ./wcm_twc.py MODIFICATIONS: David Delene - 2022/10/25 NOTES: Equations based on the WCM 2000 manual, see /nas/Instruments/SEA_WCM2000/WCM2000User.pdf Data is from the 2022 IMPACTS field project. Parameters is from the January 11, 2022 file at 16:55:53 (60953 sfm). Equations are giving in the 2022/10/20 slide presentation, see http://aerosol.atmos.und.edu/AtSc594_Fall2022/index.html Copyright 2022 David Delene This program is distributed under the terms of the GNU General Public License This file is part of Airborne Data Processing and Analysis (ADPAA). ADPAA is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ADPAA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ADPAA. If not, see . """ # Using IMPACTS data on January 11, 2022 data at 16:55:53 (60953 sfm). # Define Sensor Total Power (watts). P_sense_total = 11.36 # Define Sensor Dry Power (watts). P_sense_dry = 5.0 # Calculate Sensor Wet Power (watts). P_sense_wet = P_sense_total - P_sense_dry # Define ambient (static) Pressure (mbars). # Using IMPACTS data on January 11, 2022 data at 16:55:53 (60953 sfm). P_amb = 829.5 # Calculate evaporation temperature (C). # Equation is from the WCM manual. T_evap = 32.16 + 0.1801*P_amb-(2.391e-4)*(P_amb**2)+(1.785e-7)*(P_amb**3)-(5.19e-11)*(P_amb**4) # Calculate Latent Heat of Evaporation (cal/g). # Equation is from the WCM manual. L_evap = 594.4 - 0.484*T_evap - (7.0e-4)*T_evap**2 # Define ambient temperature (C). # Using IMPACTS data on January 11, 2022 data at 16:55:53 (60953 sfm). T_amb = -12.0 # Define true air speed (m/s). # Using IMPACTS data on January 11, 2022 data at 16:55:53 (60953 sfm). TAS = 116.0 # Define length of the Sense Element (mm). L_sense = 10.008 # Define width of the Sense Element (mm). W_sense = 2.4380 # Calculate Total Water Content. # Equation is from the WCM 2000 manual page 65. # LWC = (P_sense * 2.389e5) / ((L_evap + 1.0*(T_evap-T_amb))*TAS*L_sense*W_sense)) # The 2.389e-5 term is to convert (cal/s * mm^2) to (watts * m^2) TWC = ( P_sense_wet * (2.389e5) ) / ( ( L_evap + 1.0*(T_evap-T_amb) ) * TAS * L_sense * W_sense) # The calculated value can be compared to value available in the d1 file. print("Total Water Content = ",TWC," (g/m^3)")