How Do I calculate the Dew Point from the Temperature and Relative Humidity. The equation I need to use is: Td = T - ((100 - RH)/5.)

31 visualizaciones (últimos 30 días)
%% Import data from text file
% Script for importing data from the following text file:
%
% filename: C:\Users\smctu\OneDrive\Documents\School\Remote Sensing\sonde_data.txt
%
% Auto-generated by MATLAB on 18-Mar-2021 01:23:08
%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 7);
% Specify range and delimiter
opts.DataLines = [4, Inf];
opts.Delimiter = " ";
% Specify column names and types
opts.VariableNames = ["FltTime", "Press", "Temp", "RelHum", "WSpeed", "WDirn", "GPM_AGL"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
opts.ConsecutiveDelimitersRule = "join";
opts.LeadingDelimitersRule = "ignore";
% Import the data
sondedata = readtable("C:\Users\smctu\OneDrive\Documents\School\Remote Sensing\sonde_data.txt", opts);
figure
subplot(2,1,1)
X=sondedata.Temp+273.15
Y=sondedata.GPM_AGL
Z=sondedata.RelHum
plot(X,Y,'r')
hold on;
plot(X,Z,'b-')
xlabel("Temperature(K)")
ylabel("Altitude(km)")
ylim([0,25000])
yticks(0:5000:30000)
clear opts

Respuestas (1)

KSSV
KSSV el 30 de Mzo. de 2021
If X, Z are your Temperature and Relative Humidity arrays, use:
Td = X-((100 - Z)/5.) ;

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by