%% Test file to demonstrate temperature model.
%%
%% Author: Phillip A. Webb
%% Last updated: June 9 2004                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
%%

clear all
close all

% lonmat = geographic longitude of points of interest (rads).
% latmat = geographic latitude of points of interest (rads).
% dismat = distance from center of Earth of points of interest (km).
% timmat = univerisal time (UT) of points of interest (fractional hours). 
% year = year matrix.
% month = month matrix.
% day = day matrix.
% tmpn = neutral temperatures at point of interest (K).
% tmpnc = neutral temperatures at conjugate point of interest (K).
% kp = 3-hourly Kp
% f107 = F10.7 flux

re=6371;
lonmat=[pi/3 pi/3]; 
latmat=[pi/6 pi/6];
dismat=[re+750 re+750];
timmat=[3 15];
year=[1999 1999];
month=[6 6];
day=[15 15];
tmpn=[1200 1200];
tmpnc=[1200 1200];
kp=[3 3];
f107=[150 150];

[tmpi,tmpe,tmpic,tmpec]=temppaw2(lonmat,latmat,dismat,timmat,year,month,day,tmpn,tmpnc,kp,f107)

%This outputs the following.
%tmpi = 1.0e+003 *[1.9100    1.6593]
%tmpe = 1.0e+003 *[3.1295    2.4239]
%tmpic = 1.0e+003 *[2.0510    1.7249]
%tmpec = 1.0e+003 *[3.7888    2.7151]

