-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathftam.m
38 lines (30 loc) · 1.25 KB
/
ftam.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function [Tatm,wlayers]=ftam(T,tau,tau_a,masterindex)
% function ftam
%
%
% Calculate the brightness temperature, and weighting function for a given ray.
%
% VARIABLE DEFINITIONS:
%
% ->INPUT:
% -> T: physical temperature of the layer
% ->tau: total optical depth from bottom to current layer
% -> tau_a: optical depth of each layer across ds
% -> masterindex: layer index
%
% <-OUTPUT:
% <-Tatm: Brightiness temperature for each ray
% <-wlayers: weighting function for each ray
%JPH function Tatm=ftam(T,tau,tau_a)
%JPH T is the vector from ?top to bottom of thermal temperatures
%JPH tau is the vector of integrated absorptions from top to bottom ?
%JPH tau_a is the vector of absorptions for each layer top to bottom
%JPH Units are kelvin and opdepths
%JPH The first layer is the ray from the craft to the surface
%JPH its tau, tau_a, T, are zero
%JPH So T(1) should always be zero
loss=exp(-tau);
emit=T(masterindex).*(1-exp(-tau_a));
wlayers=loss.*(1-exp(-tau_a));
layers=loss.*emit;
Tatm=sum(layers);