%% temph0.m determines the required base height to use with
%% the temperature models when FLIP profiles used. Values 
%% based on inspection of profiles.

function h0=temph0(lsh)

% lsh = L-shell of point of interest
% h0 = base height to use (km)

re=6371;                                %Earth radi (km)
sv=ones(size(lsh));
latm=lshpar(lsh,-sv,re+300*sv);         %Magnetic latitude along field line at 300km
sl2=sin(latm).^2;                       %sL parameter

xo=0.45;
x2=0.05;
h0=500+100./(exp((sl2-xo)/x2)+1);       %base temperature (K)
