17/* ------------------ MODTRAN API --------------------------- */
18
19/*
20 typedef struct
21 {
22 float lam; // wavelength in microns
23 float alt; // altitude in meters
24 float prd; // path radiance coefficient in W/m3/sr/um
25 float ext; // extinction coefficient in m-1
26 float psc; // phase function [sr-1] psc="rho"=dsigma dx / domega /dvol (cross section per unit solid angle per unit volume, times the differential path length).
27 float agd; // angle at which phase function calculated [rad]
28 } MODCOEF;
29
30 typedef struct{
31 double rho,beta;
32 double h1,angle;
33 double h2,phi;
34 double range,minh;
35 double path_i,path_j,path_k;
36 }MODPATH;
37 */
38
39/*
40 #define LAYDIM 100 // [unitless int] max # Modtran atmospheric layers (should be read in from Param.lst)
41 #define MANGLS 50 // [unitless int] max # Modtran Scattering Function angles
42 #define MWLF 15 // [unitless int] max # Modtran Scattering Function wavelengths
43 #define MAERF 4 // [unitless int] max # Modtran Scattering Function aerosols
44 #define MXWVLN 788 // [unitless int] max # Modtran Cloud spectral data points
45
46 typedef struct
47 {
48
49 // SCENV (required) : Set SigSim Modtran Data and Output Directory Paths ---------
50 char IDIR[255],ODIR[255]; // Full path of Modtran input and output directories
51
52 //SC1 (required) : General operation ---------------------------------------------
53 char c1Modtrn[4]; // T,M,blank for Modtran band model, C or K for correlated-k option, F or L for Lowtran
56 int c1Imult; // Multiple scattering : off(0) or on(-1 or 1)
57 int c1Itype; // Path type : horizontal(1), slant(2), slant to space or ground(3)
58 int c1M1; // Default temp & pressure to model atm 1-6
59 int c1M2; // Default H2O to model atm 1-6
60 int c1M3; // Default O3 to model atm 1-6
61 int c1M4; // Default CH4 to model atm 1-6
62 int c1M5; // Default N2O to model atm 1-6
63 int c1M6; // Default CO to model atm 1-6
64 int c1Mdef; // 1=Default heavy species profiles, 2=user-input heavy species
65 int c1IM; // 0=normal operation or use previous model atm, 1=read user model atm
66 int c1Noprnt; // 0=normal operation of tape6 output, 1=minimize Xmit/Rad tables in tape6, -1=control tape8 out, -2=generate cooling rate data to clrates file
67 float c1Tbound; // Ground Temp [degK] for IEMSCT=1,2. If =0, use lowest atm level temp.
92 int c2Ihaze; // c2Ihaze : -1=no aerosol attenuation, but possibly cloud (if ICLD>0). 0=no cloud or aerosol atten,1=rural vis=23km,2=rural vis=5km,3=navy maritime,4=maritime,5=urban,6=tropospheric,7=user-def(cards2Dx),8=fog1(0.2km),9=fog2(0.5km),10=desert
93 char c2Cnovam[4]; // Blank = default; "N" = use Navy Oceanic Vertical Aerosol Model output (see appendix B)
94 int c2Iseasn; // c2Iseasn : 0=use summer for models 0,1,2,4,6,7. 1=use summer, 2=use winter
95 char c2Aruss[4]; // Blank=default, "USS"= use user-defined optical properties
96 int c2Ivulcn; // [0,1]=background, [2-8]=volcanic : 2=moderate&aged,3=high&fresh,4=high&aged,5=moderate&fresh,6=moderate&background,7=high&background,8=extreme&fresh
97 int c2Icstl; // NOVAM air mass character: [1=open ocean...10=strong continental]
98 int c2Icld; // Cloud Model : 0=none,1=cumulus,2=altostratus,3=stratus,4=stratocumulus,5=nimbostratus,6=stratus_drizzle,7=nimbostratus_light,8=nimbostratus_moderate,9=cumulus_heavy,10=cumulus_extreme,11=user-defined(cards2D),18=standard_cirrus,19=subvisual_cirrus
99 int c2Ivsa; // Vertical Structure Algorithm (VSA model): off(0) or on(1)
100 float c2Vis; // Visibility [km] , or 0=default set by Ihaze
101 float c2Wss; // Current wind speed [m/s] (Navy Maritime or desert models only -- IHAZE=3 or 10)
102 float c2Whh; // 24hr ave wind speed [m/s] (Navy Maritime or desert models only -- IHAZE=3 or 10)
103 float c2Rainrt; // Rain rate [mm/hr], or [<=0] if using user-defined rain rate in card2E1.
106 //SC2A (required for all cloud models except ICLD=11) : Cloud model parameters. ---------
107 int c2aNcrspc; // [>=2]=number of cloud spectral data wavelengths (triggers card 2E2), [<2]=use default
108 int c2aNcralt; // [>=3]=number of cloud boundary layers (triggers card2E1), [<3]=use default
109 int c2aIseed; // Unused???
110 float c2aCwavln; // [0.2-200.0 um] vertical extinction reference wavelength [microns]. Values outside this range give default=0.55um
111 float c2aCthik; // Cloud vertical thickness [km], or <0=default
112 float c2aColip; // Ice Particle vertical column density [km g/m3], or if [<], do not scale.
113 float c2aChumid; // Relative Humidity [0-105%] at cloud boundaries, or taken=100% if outside [0-105%] bounds
114 float c2aCext; // [<=0] = do not scale extinction coeffs, [>0]=cloud H2O vert extinction [km-1]
115 float c2aCcolwd; // Water droplet vertical column density [km g/m3], or if [<], do not scale.
116 float c2aCalt; // Cloud base altitude [km], or <0=default
117 float c2aAsymwd; // [<1] Water Henyey-Greenstein scattering asymmetry parameter at all wavelengths, or [>=1] uses user-defined or model
118 float c2aAsymip; // [<1] Ice Henyey-Greenstein scattering asymmetry parameter at all wavelengths, or [>=1] uses user-defined or model
119
120 //SC2AP (used if c2Aplus = "A+") : Modtran 3.7 flexible aerosol model ---------------
121 float C2AP_Z11; // Base altitude of aerosol #1 [km]
122 float C2AP_Z12; // Top altitude of aerosol #1 [km] if >0. If <0, translate original profile to new base, if =0, set values to default & ignore scaling
123 float C2AP_S1; // Scaling factor for aerosol #1, if >0. Else no scaling. [unitless]
124 float C2AP_Z21; // Base altitude of aerosol #2 [km]
125 float C2AP_Z22; // Top altitude of aerosol #2 [km] if >0. If <0, translate original profile to new base, if =0, set values to default & ignore scaling
126 float C2AP_S2; // Scaling factor for aerosol #2, if >0. Else no scaling. [unitless]
127 float C2AP_Z31; // Base altitude of aerosol #3 [km]
128 float C2AP_Z32; // Top altitude of aerosol #3 [km] if >0. If <0, translate original profile to new base, if =0, set values to default & ignore scaling
129 float C2AP_S3; // Scaling factor for aerosol #3, if >0. Else no scaling. [unitless]
130 float C2AP_Z41; // Base altitude of aerosol #4 [km]
131 float C2AP_Z42; // Top altitude of aerosol #4 [km] if >0. If <0, translate original profile to new base, if =0, set values to default & ignore scaling
132 float C2AP_S4; // Scaling factor for aerosol #4, if >0. Else no scaling. [unitless]
133
134 //SC2B (used if C2IVSA=1) Army VSA subroutine -----------------------
135 float C2BZCV; // ZCVSA : Cloud Ceiling Height [km] if positive, no ceiling if negative, unknown if =0.
136 float C2BZTV; // ZTVSA : Cloud/Fog Thickness [km] if positive, unknown (default=2km) if =0.
137 float C2BZINV; // ZINVSA: Inversion/boundary layer height [km] if positive, no layer if negative, unknown (default=2km or 0.2 for fog) if =0.
138
139 //SC2C (used when MODEL=IM=0 or MODEL=7, IM=1 on card1) : User-defined atmospheric profile controls.
140 int C2CML; // Number of layers (max=LAYDIM)
141 int C2CRD1; // Species densities: 0=Don't read card2C2, 1=read card2C2
142 int C2CRD2; // Aerosol/Cloud/Rain: 0=Don't read card2C3, 1=read old version of card2C3, 2=read new version of card2C3
143 char C2CMDL[20]; // Model atmosphere title
144
145 //SC2C1 (used when MODEL=IM=0 or MODEL=7, IM=1 on card1) : User-defined atmospheric profile
146 char C2C1JCHAR[LAYDIM*17]; // [char1=pressure units]: A=mb, B=atm, C=torr, 1-6=MODEL; [char2=tempunits]: A=degK, B=degC, 1-6=MODEL, [char3=H2O units (see below)]
147 // [chars4-16 = species units]: A=ppmv,B=#/cm3,C=g/kg,D=g/m3,E=mb,F=dewpt[degK],G=dewpt[degC],H=%relhum,1-6=MODEL
150 float C2C1T[LAYDIM]; // Layer Temperature [char2 units]
151 float C2C1WMOL1[LAYDIM]; // H2O density [char3 units]
152 float C2C1WMOL2[LAYDIM]; // CO2 density [char4 units]
153 float C2C1WMOL3[LAYDIM]; // O3 density [char5 units]
154
155 //SC2C2 (used when MODEL=IM=0 or MODEL=7, IM=1 and MDEF=2 on card1) : User-defined atmospheric profile
156 float WMOL4[LAYDIM]; // N2O density [char6 units]
157 float WMOL5[LAYDIM]; // CO density [char7 units]
158 float WMOL6[LAYDIM]; // CH4 density [char8 units]
159 float WMOL7[LAYDIM]; // O2 density [char9 units]
160 float WMOL8[LAYDIM]; // NO density [char10 units]
161 float WMOL9[LAYDIM]; // SO2 density [char11 units]
162 float WMOL10[LAYDIM]; // NO2 density [char12 units]
163 float WMOL11[LAYDIM]; // NH3 density [char13 units]
164 float WMOL12[LAYDIM]; // HNO3 density [char14 units]
165
166 //SC2C2X (used when MODEL=IM=0 or MODEL=7, IM=1 on card1) : User-defined atmospheric profile
167 float WMOLX1[LAYDIM]; // CCl3F density [char15 units]
168 float WMOLX2[LAYDIM]; // CCl2F2 density [char15 units]
169 float WMOLX3[LAYDIM]; // CClF3 density [char15 units]
170 float WMOLX4[LAYDIM]; // CF4 density [char15 units]
171 float WMOLX5[LAYDIM]; // CHClF2 density [char15 units]
172 float WMOLX6[LAYDIM]; // C2CL3F3 density [char15 units]
173 float WMOLX7[LAYDIM]; // C2Cl2F4 density [char15 units]
174 float WMOLX8[LAYDIM]; // C2ClF5 density [char15 units]
175 float WMOLX9[LAYDIM]; // ClONO2 density [char15 units]
176 float WMOLX10[LAYDIM]; // HNO4 density [char15 units]
177 float WMOLX11[LAYDIM]; // CHCl2F density [char15 units]
178 float WMOLX12[LAYDIM]; // CCl density [char15 units]
179 float WMOLX13[LAYDIM]; // N2O5 density [char15 units]
180
181 //SC2C3 (used when card2C IRD2=1) : User-specified Cloud/Rain model -------------------
182 int IHA1[LAYDIM]; // Haze/Range control for alt[i]. See IHAZE for options
183 int ICLD1[LAYDIM]; // Cloud extinction control for alt[i]. See ICLD for options
184 int IVUL1[LAYDIM]; // Stratospheric extinction control for alt[i]. See IVULCN for options
185 int ISEA1[LAYDIM]; // Aerosol season control at alt[i]. See ISEASN for options
186 int ICHR[LAYDIM]; // 0=no boundary change, 1=boundary change (IHAZE=7 or ICLD=11 only)
187 float AHAZE1[LAYDIM]; // 0.55um extinction coeff at alt[i] [km-1]
188 float AHAZE2[LAYDIM]; // 0.55um extinction coeff at alt[i] [km-1]
189 float AHAZE3[LAYDIM]; // 0.55um extinction coeff at alt[i] [km-1]
190 float AHAZE4[LAYDIM]; // 0.55um extinction coeff at alt[i] [km-1]
191 float EQLWCZ[LAYDIM]; // Liquid water content [g/m3] at alt[i]
192 float RRATZ[LAYDIM]; // Rain rate [mm/hr] at alt[i]
193
194 //SC2D (used if C2IHAZE=7 or C2ICLD=11) : User-input Aerosol and Cloud Parameters -------
195 int C2DIREG[4]; // [=0] Use default value for region i (i=1,2,3,4); [=1] Read extinction, absorption, and asymmetry param for the region from Cards 2D1 and 2D2.
196
197 //SC2D1 (used if C2IHAZE=7 or C2ICLD=11) : User-input Aerosol and Cloud Parameters -------
198 float C2D1AWCCON[4]; // Conversion factor from equiv liquid water content [g/m3] to extinction coef [km-1]. Units are [km g/m3].
199 char C2D1TITLE[4][72]; // Title for aerosol region i=1,2,3,4
200
201 //SC2D2 (used if C2IHAZE=7 or C2ICLD=11) : User-input Aerosol and Cloud Parameters -------
202 float C2D2VARSPC[4][47]; // Wavelengths [microns] for aerosol/cloud coefs if USS not used. Must increase.
203 float C2D2EXTC[4][47]; // Extinction coeff, normalized to 1.0km-1 at 0.55um.
204 float C2D2ABSC[4][47]; // Absorption coeff, normalized to 1.0km-1 at 0.55um.
236 int c3a1Iprm; // Specification method. 0=source & observer lat/long, 1=observer lat/long & time, 2=solar angle and path angle, [10-12]=same as [0-2] but w.r.t. H2, not H1.
237 int c3a1Iph; // Phase function : 0=spectrally-independent Henyey-Greenstein (see 3A2), 1=user-supplied (3B), 2=Mie internal database for MODEL.
242 float c3a2Prm1; // [Iprm=0,1] H1 latitude [deg], [Iprm=2] azimuth between LOS and source direction [deg], [Iprm=10,11] H2 latitude [deg], [Iprm=12] relative solar azimuth at H2 [deg]
243 float c3a2Prm2; // [Iprm=0,1] H1 longitude[deg], [Iprm=2] solar zenith angle at H1 [deg], [Iprm=10,11] H2 longitude [deg], [Iprm=12] solar zenith at H2 [deg]
244 float c3a2Prm3; // [Iprm=0,10] Source latitude [deg], [Iprm=1,2,11,12] unused
274 jrmbool c4Degrade ; // [FALSE=blank]: Degrade only total, [TRUE=A]: Degrade all
275 char c4Xflag[4]; // Output units : W=freq in wavenumber, radiance in [W/cm2/sr/cm-1]; M=wavelength in um, radiance in [W/cm2/sr/um]; N=wavelength in nm, radiance in [uW/cm2/sr/nm]
276 char c4Yflag[4]; // T=output transmittances to pltout files, R=output radiances to pltout files.
277 char c4Flags[8]; // Flags[0]: Input band units : CM-1, MICRON, or NM