umbc9803

advertisement
Sung Yung,
This letter is to help you get started unraveling the new RTA code.
1) Changes in Philosophy
2) overview of the code
3) summary of specfic changes
The files discussed in this document are:
a) /src_gsfc/
==========
airsrad1.F
airsrad2.F
cldy_rad2.F
comp_alt.F
location
grav.F
set_solar.F
solar
computes a clear radiance
subroutine to support cldy_rad2()
computes a cloudy radiance
computes the altitude from the current state and
z(P,T,water,ozone,latitude,g(z))
computes gravity as a function of latitude, longitude,
altitude, and wind
reads the UMBC solar radiance file ..OR.. sets the
radiance to the Planck function at 5600 K.
set_orbit.F
converts solar radiance into spectral flux at the
Earth
sun_distance.F computes the Earth-Sun distance in astronomical units
(AU)
at a specified time
b) /umbc9803/
==========
common blocks
------------rta_stat.com
load_ir.F)
rta_prof.com
static common block for RTA variables (loaded by
profile dependent common block for predictors, etc.
I/O routines for RTA (static) variables
--------------------------------------load_ir.F
reads the new RTA file and parses into rta_stat.com
rta_apod.F
reads apodization parameters from rta_stat.com
I/O routines for profile variables
---------------------------------init_rtacom.F initializes values within rta_prof.com
setang_ir.F
sets all necessary secant angles as a function of
view angle, solar zenith angle, and altitude
init_trace.F
reads/sets trace gas profiles for methane, carbonmonoxide
and sets CO2 perturbation value. If not called then
the
init_rta.F
standard values are assumed.
computes all the predictors
channel dependent routines
-------------------------ir_rta.F
computes thermal and solar transmittance for a
specific
channel
ir_rta3.F
computes thermal transmittance for FIXED, WATER, and
OZONE
(diagnostic routine)
comp_down.F
computed down-welling thermal term (called by
ir_rta.F,
cldy_rad2.F)
UMBC subroutines called by ir_rta() and ir_rta3()
------------------------------------------------qikexp.F
UMBC's quick EXP function
calokw.F
compute water optical depth with OPTRAN
calt1.F
RTA #1's caltau()
calt2.F
....
calt3.F
calt4.F
calt5.F
calt6.F
calt7.F
calt8.F
calt9.F
calt10.F
calt11.F
calt12.F
calt13.F
calt14.F
calt15.F
RTA #15's caltau
programs used to convert UMBC files to GSFC format
-------------------------------------------------cnv_subs.F subroutines for the next 3 programs
cnv_598.F
convert AIRS and CrIS RTA's delivered in May of 1998
cnv_1098.F convert CrIS RTA's delivered in Oct. 1998
cnv_iasi.F convert NAST and IASI RTA's
In addition I have included a number of routines to allow compilation
of a test program, comp_rad.F. These modules are NOT expected to be
used in the AIRS Science Team code.
d) /src_gsfc/
==========
getemis1.F
mr2cd.F
cd2mr.F
sunang2.F
sunang.F
load_noise.F
calc_phi.F
calc_nedn.F
tai_to_utc.F
julian.F
dbdt.F
zeitbeg.F
e) /src_jpl/
=========
brtemp.f
lsurface.f
meantemp.F
openl1.F
openl2.F
planck.F
readl1.F
readl2.F
softexit.F
uppercase.F
writl1.F
writl2.F
f) /mwrta_v4/
==========
amsutau.F
bfield.F
mw_rta.F
mw_rta3.F
opac.F
open_mw.F
opentram.F
read_mw.F
readtram.F
setang_mw.F
setmwstart.F
shval3.F
vlint.F
Changes in Philosophy
--------------------1) The routine cldy_rad.F should have never been used in the retrieval
code. Since a parameter change was necessary for the RTA
(solar bi-directional transmittance terms, solar spectral radiance,
down-welling terms) I STRONGLY suggest removing this call from all
clear radiance computations and replacing it with a call to
AIRSRAD1().
By the way, in the near future the cloudy computation will become more
complex than the current implementation and removal of cldy_rad.F will
make the future modifications much simpler. The call to cldy_rad
should only be in FOV simulation (airsbt.F) and in the GSFC cloud
height
retrieval (cloudhgt.F).
2) The AIRSRAD1() routine originally re-computed the layer average
temperature, Tavg(L), for every channel. In a typical retrieval,
this operation takes some time (approx. 1%?). Since Tavg(L) is
computed in my version of calpar (now called init_rta()), it is
passed from this routine into AIRSRAD to save time.
3) ditto for CLDY_RAD. In addition, the JPL version of this routine
re-calls AIRSRAD (ncld+1) times each FOV. The (cnld+1) calls to
AIRSRAD only need to be done once for the 9 AIRS FOV's. The savings
is small (8*(ncld+1) AIRSRAD calls per channel), but non-zero.
4) The new UMBC code is more complex than previous deliveries. There
are now 7 types of RTA and some channels have OPTRAN, CO2 coefficients
in addition to the "PFASST" coefficients. There is also a downwellling
thermal model and standard profiles for water, ozone, carbon-monoxide,
and methane. We now require an additional transmittance computation
for the bi-directional solar transmittance during the daytime.
Even with all the extra complexity the memory storage and exexution
time are both smaller than the previous RTA.
The old RTA has 2378 channels and the following coefficients
AIRS C F W O CO CH4 TOT N*TOT
2380 4 8 13 9 0
0 34 80920
Now channels are grouped into 7 categories as follows
1 FWO
AIRS
1561
C
4
F W
8 11
O CO CH4 TOT N*TOT
5 0
0 28 43708
2 FOW
3 FMW
180
122
4
4
8 11 10
8 11 0
4
5
6
7
108
131
144
127
4 11 13
4 11 3
4 8 7
4 8 13
<-- supports OPTRAN as
well
0
0
0
9
33
32
5940
3904
3 11
1 0
1 0
1 0
0
0
0
0
42
19
20
26
4536
2489
2880
3302
well
FCOW
FWO-b
FWO-w
FWO-m
<-- supports OPTRAN as
---2373
----66759
For the IPO work, I have many additional RTA's. There are now at
least 7 instruments supported by this code. There are 8 more RTA's
required to support these instruments (calt8.F-calt15). So there is
some additional complexity which is not strictly necessary for AIRS,
but makes the code much more adapable to the these other RTA's. AIRS
does not pay a speed or memory penalty (unless dimensioned for NAST or
IASI).
For these reasons, I needed to add many items to the RTA file. The
original UMBC deliver had 10 files of coefficients (7 RTA's,
OPTRAN, CO2, and down-welling coefficients) and computed predictors
for
each RTA independently. In addition, the THERMAL and SOLAR
transmittance
was computed on successive calls to calpar and caltau and would have
made the implementation into retrievals very cumbersome.
I made a single, albeit rather complicated, file structure to allow
all
possibilities for each channel. The RTA is loaded by load_ir.F into
a static common block called rta_stat.com. I hope these formats can
be honored.
NOTE: rta_stat.com is NEVER required outside the RTA library.
are routines to interface to necessary items.
There
5) For the profile dependent variable I used a common block called
rta_prof.com. I anticipate that this will not be desirable for the
JPL environment so this can be converted to a structure and passed
into the routines with require this common block. These are
init_rtacom.F
init_trace.F
init_rta.F
ir_rta.F
ir_rta3.F
setang_ir.F
6)
The secant angle computation is much more difficult than before. I
have added a routine comp_alt.F (NOT RTA dependent, therefore NOT in
the RTA directory) to compute the altitude and pass it to a routine
which subsequently computes the secant angle. I suggest that we
do not compute it EVERY time, as done currently.
Since secant angle is needed for both thermal and solar
transmittances and both are a function of altitude, I have placed
these within the common block (or JPL structure) and not passed
them specifically or as local variables.
7) Trace gases are not used by most routines. Therefore, I have
provided
an interface, init_trace.F, to these parameters. The user can
read the standard profiles and set the profiles to be used by the
code.
The profiles are stored within rta_prof.com and NOT explicitly
passed to init_rta.F or ir_rta.F. This was done to make
implementation
of these new features as painless as possible.
Section 2: Overview of the new RTA code
=======================================
1. The comp_rad.F program
2. Overview of the subroutine calls
3. The comprta variable
The comp_rad.F program has been provided to illustrate the use of
the microwave and infrared rapid transmittance algorithm and utility
routines to simulate radiances. This program was used to produce
noise free clear radiances for the US standard atmosphere dataset
provided in the ~/src/example/ directory and can also be used to
compute cloudy radiances with the -cloud option.
Compile the libraries, the comp_rad program and then run the script
~/src/example/run_rad to produce your own copy of the radiance files.
These can be compared to the files in the ftp site.
An integer*4 bitwise flag, called "comprta", has been implemented
to improve the performance of the new RTA. This flag can be set to -1
ensure that everything is computed. If computational enhancements are
desired, this flag can direct init_rta() and ir_rta() to NOT
recompute all the predictors (init_rta()) or transmittances
(ir_rta()). This is particularly useful when finite difference
Jacobians are computed or when approximate Jacobians are desired. The
bit parameters are defined below.
At the present time, only the SOLAR and down-welling bits are used.
Computation of the trace gases is automatically linked to the calls of
load_ir(), setang_ir() and init_trace() - so the individual bits
for CO$_2$, CH$_4$, and CO are not used at this time. In the future,
the other bits may be implemented for water and ozone. To ensure
upward compatibility the user should assume that if a bit is not set,
then the predictors and transmittance associated with that state
variable may NOT be updated from a previous computation.
bit.1
bit.2
bit.3
bit.4
bit.5
bit.6
bit.7
bit.8
bit.9
bit.10
bit.11
1
2
4
8
16
32
64
128
256
512
1024
secant etc.
T(p) terms
q(p) terms
O3(p) terms
CO2 terms
CO terms
CH4 terms
spare
spare
spare
spare
bit.12 2048
bit.13 4096
bit.14 8192
bit.15 16384
bit.16 32768
bit.17-bit.32
spare
spare
SOLAR surface transmittance
DOWN-WELLING terms
SOLAR profile terms
spare
For example, to compute all the predictors and transmittances
necessary for a cloud free radiance (all levels at the
viewing angle and the solar bidirectional transmittance at the surface)
the value of comprta would be
comprta = crta_all
For cloudy radiances we need the bidirectional transmittance at the
solar+spacecraft secant angle for all levels. In this case, the flag
should be set to
comprta = crta_all + crta_SP
If a finite difference Jacobian is needed, then the second call (w/
perturbation) to init_rta() and ir_rta() could save time by NOT
re-computing predictors and transmittances of the unperturbed state.
For example, for water Jacobians,
comprta = crta_Q + crta_S
+ crta_D
For long-wave channels, additional time could be saved by not
computing the bidirectional transmittance
comprta = crta_Q
+ crta_D
Section 3: Summary of Specific Changes
======================================
1. Derivatives w.r.t. solar reflectivity have factor of 1/PI
2. Derivatives w.r.t. thermal emissivity now has thermal downwelling
component
For the discussion below, assume the call to IR_RTA() had the
following arguments:
$
CALL IR_RTA(iphys, n, fx, tau(n), numlev, Psurf,
tmp, wcd, ocd, wlcd, Pobs, comprta, Rdown(n), TAUSUN)
TAUZSN(n) = TAUSUN(numlev)
1. Derivatives w.r.t. solar reflectivity have factor of 1/PI
If the user code (NOAA, GSFC) has direct derviative for the solar
reflectivity there is now a difference of 1/3.4159 between the
old and new radiative transfer (AIRSRAD1).
rhoper = perturbation in solar reflectivity
Rsun(n) = solar irradiance (steradians*radiance) at Earth-Sun
distance
scon = cossun
if(iphys.eq.2 .or. iphys.eq.4) scon = scon/PI
dR/drho = Rsun(n) * scon * rhoper * TAUZSN(n)
2. Derivatives w.r.t. thermal emissivity now has thermal downwelling
component
** Assumes that rho_therm = (1.0-emiss)/pi **
emisper = perturbation to thermal emissivity
dR/demis = Planck(f(n),Tsurf)*tau(numlev)*emisper
if(iphys.ge.5) then
dR/de = dR/de - emisper * Rdown(n)*tau(numlev)/pi
endif
Download