CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
radlw_main.F90
1
4
5!!!!! ============================================================== !!!!!
6!!!!! lw-rrtm3 radiation package description !!!!!
7!!!!! ============================================================== !!!!!
8! !
9! this package includes ncep's modifications of the rrtmg-lw radiation !
10! code from aer inc. !
11! !
12! the lw-rrtm3 package includes these parts: !
13! !
14! 'radlw_rrtm3_param.f' !
15! 'radlw_rrtm3_datatb.f' !
16! 'radlw_rrtm3_main.f' !
17! !
18! the 'radlw_rrtm3_param.f' contains: !
19! !
20! 'module_radlw_parameters' -- band parameters set up !
21! !
22! the 'radlw_rrtm3_datatb.f' contains: !
23! !
24! 'module_radlw_avplank' -- plank flux data !
25! 'module_radlw_ref' -- reference temperature and pressure !
26! 'module_radlw_cldprlw' -- cloud property coefficients !
27! 'module_radlw_kgbnn' -- absorption coeffients for 16 !
28! bands, where nn = 01-16 !
29! !
30! the 'radlw_rrtm3_main.f' contains: !
31! !
32! 'rrtmg_lw' -- main lw radiation transfer !
33! !
34! in the main module 'rrtmg_lw' there are only two !
35! externally callable subroutines: !
36! !
37! !
38! 'lwrad' -- main lw radiation routine !
39! inputs: !
40! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, !
41! clouds,icseed,aerosols,sfemis,sfgtmp, !
42! dzlyr,delpin,de_lgth,alpha, !
43! npts, nlay, nlp1, lprnt, !
44! outputs: !
45! hlwc,topflx,sfcflx,cldtau, !
46!! optional outputs: !
47! HLW0,HLWB,FLXPRF) !
48! !
49! 'rlwinit' -- initialization routine !
50! inputs: !
51! ( me ) !
52! outputs: !
53! (none) !
54! !
55! all the lw radiation subprograms become contained subprograms !
56! in module 'rrtmg_lw' and many of them are not directly !
57! accessable from places outside the module. !
58! !
59! derived data type constructs used: !
60! !
61! 1. radiation flux at toa: (from module 'module_radlw_parameters') !
62! topflw_type - derived data type for toa rad fluxes !
63! upfxc total sky upward flux at toa !
64! upfx0 clear sky upward flux at toa !
65! !
66! 2. radiation flux at sfc: (from module 'module_radlw_parameters') !
67! sfcflw_type - derived data type for sfc rad fluxes !
68! upfxc total sky upward flux at sfc !
69! upfx0 clear sky upward flux at sfc !
70! dnfxc total sky downward flux at sfc !
71! dnfx0 clear sky downward flux at sfc !
72! !
73! 3. radiation flux profiles(from module 'module_radlw_parameters') !
74! proflw_type - derived data type for rad vertical prof !
75! upfxc level upward flux for total sky !
76! dnfxc level downward flux for total sky !
77! upfx0 level upward flux for clear sky !
78! dnfx0 level downward flux for clear sky !
79! !
80! external modules referenced: !
81! !
82! 'module physcons' !
83! 'mersenne_twister' !
84! !
85! compilation sequence is: !
86! !
87! 'radlw_rrtm3_param.f' !
88! 'radlw_rrtm3_datatb.f' !
89! 'radlw_rrtm3_main.f' !
90! !
91! and all should be put in front of routines that use lw modules !
92! !
93!==========================================================================!
94! !
95! the original aer program declarations: !
96! !
97!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
98! !
99! Copyright (c) 2002-2020, Atmospheric & Environmental Research, Inc. (AER) !
100! All rights reserved. !
101! !
102! Redistribution and use in source and binary forms, with or without !
103! modification, are permitted provided that the following conditions are met: !
104! * Redistributions of source code must retain the above copyright !
105! notice, this list of conditions and the following disclaimer. !
106! * Redistributions in binary form must reproduce the above copyright !
107! notice, this list of conditions and the following disclaimer in the !
108! documentation and/or other materials provided with the distribution. !
109! * Neither the name of Atmospheric & Environmental Research, Inc., nor !
110! the names of its contributors may be used to endorse or promote products !
111! derived from this software without specific prior written permission. !
112! !
113! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" !
114! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE !
115! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE !
116! ARE DISCLAIMED. IN NO EVENT SHALL ATMOSPHERIC & ENVIRONMENTAL RESEARCH, INC.,!
117! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !
118! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !
119! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !
120! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !
121! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !
122! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF !
123! THE POSSIBILITY OF SUCH DAMAGE. !
124! (http://www.rtweb.aer.com/) !
125! !
126!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
127! !
128! ************************************************************************ !
129! !
130! rrtmg_lw !
131! !
132! !
133! a rapid radiative transfer model !
134! for the longwave region !
135! for application to general circulation models !
136! !
137! !
138! atmospheric and environmental research, inc. !
139! 131 hartwell avenue !
140! lexington, ma 02421 !
141! !
142! eli j. mlawer !
143! jennifer s. delamere !
144! michael j. iacono !
145! shepard a. clough !
146! !
147! !
148! email: miacono@aer.com !
149! email: emlawer@aer.com !
150! email: jdelamer@aer.com !
151! !
152! the authors wish to acknowledge the contributions of the !
153! following people: steven j. taubman, karen cady-pereira, !
154! patrick d. brown, ronald e. farren, luke chen, robert bergstrom. !
155! !
156! ************************************************************************ !
157! !
158! references: !
159! (rrtmg_lw/rrtm_lw): !
160! iacono, m.j., j.s. delamere, e.j. mlawer, m.w. shepard, !
161! s.a. clough, and w.d collins, radiative forcing by long-lived !
162! greenhouse gases: calculations with the aer radiative transfer !
163! models, j, geophys. res., 113, d13103, doi:10.1029/2008jd009944, !
164! 2008. !
165! !
166! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, !
167! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: !
168! atmospheric radiative transfer modeling: a summary of the aer !
169! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. !
170! !
171! mlawer, e.j., s.j. taubman, p.d. brown, m.j. iacono, and s.a. !
172! clough: radiative transfer for inhomogeneous atmospheres: rrtm, !
173! a validated correlated-k model for the longwave. j. geophys. res., !
174! 102, 16663-16682, 1997. !
175! !
176! (mcica): !
177! pincus, r., h. w. barker, and j.-j. morcrette: a fast, flexible, !
178! approximation technique for computing radiative transfer in !
179! inhomogeneous cloud fields, j. geophys. res., 108(d13), 4376, !
180! doi:10.1029/2002JD003322, 2003. !
181! !
182! ************************************************************************ !
183! !
184! aer's revision history: !
185! this version of rrtmg_lw has been modified from rrtm_lw to use a !
186! reduced set of g-points for application to gcms. !
187! !
188! -- original version (derived from rrtm_lw), reduction of g-points, !
189! other revisions for use with gcms. !
190! 1999: m. j. iacono, aer, inc. !
191! -- adapted for use with ncar/cam3. !
192! may 2004: m. j. iacono, aer, inc. !
193! -- revised to add mcica capability. !
194! nov 2005: m. j. iacono, aer, inc. !
195! -- conversion to f90 formatting for consistency with rrtmg_sw. !
196! feb 2007: m. j. iacono, aer, inc. !
197! -- modifications to formatting to use assumed-shape arrays. !
198! aug 2007: m. j. iacono, aer, inc. !
199! !
200! ************************************************************************ !
201! !
202! ncep modifications history log: !
203! !
204! nov 1999, ken campana -- received the original code from !
205! aer (1998 ncar ccm version), updated to link up with !
206! ncep mrf model !
207! jun 2000, ken campana -- added option to switch random and !
208! maximum/random cloud overlap !
209! 2001, shrinivas moorthi -- further updates for mrf model !
210! may 2001, yu-tai hou -- updated on trace gases and cloud !
211! property based on rrtm_v3.0 codes. !
212! dec 2001, yu-tai hou -- rewritten code into fortran 90 std !
213! set ncep radiation structure standard that contains !
214! three plug-in compatable fortran program files: !
215! 'radlw_param.f', 'radlw_datatb.f', 'radlw_main.f' !
216! fixed bugs in subprograms taugb14, taugb2, etc. added !
217! out-of-bounds protections. (a detailed note of !
218! up_to_date modifications/corrections by ncep was sent !
219! to aer in 2002) !
220! jun 2004, yu-tai hou -- added mike iacono's apr 2004 !
221! modification of variable diffusivity angles. !
222! apr 2005, yu-tai hou -- minor modifications on module !
223! structures include rain/snow effect (this version of !
224! code was given back to aer in jun 2006) !
225! mar 2007, yu-tai hou -- added aerosol effect for ncep !
226! models using the generallized aerosol optical property!
227! scheme for gfs model. !
228! apr 2007, yu-tai hou -- added spectral band heating as an !
229! optional output to support the 500 km gfs model's !
230! upper stratospheric radiation calculations. and !
231! restructure optional outputs for easy access by !
232! different models. !
233! oct 2008, yu-tai hou -- modified to include new features !
234! from aer's newer release v4.4-v4.7, including the !
235! mcica sub-grid cloud option. add rain/snow optical !
236! properties support to cloudy sky calculations. !
237! correct errors in mcica cloud optical properties for !
238! ebert & curry scheme (ilwcice=1) that needs band !
239! index conversion. simplified and unified sw and lw !
240! sub-column cloud subroutines into one module by using !
241! optional parameters. !
242! mar 2009, yu-tai hou -- replaced the original random number!
243! generator coming from the original code with ncep w3 !
244! library to simplify the program and moved sub-column !
245! cloud subroutines inside the main module. added !
246! option of user provided permutation seeds that could !
247! be randomly generated from forecast time stamp. !
248! oct 2009, yu-tai hou -- modified subrtines "cldprop" and !
249! "rlwinit" according updats from aer's rrtmg_lw v4.8. !
250! nov 2009, yu-tai hou -- modified subrtine "taumol" according
251! updats from aer's rrtmg_lw version 4.82. notice the !
252! cloud ice/liquid are assumed as in-cloud quantities, !
253! not as grid averaged quantities. !
254! jun 2010, yu-tai hou -- optimized code to improve efficiency
255! apr 2012, b. ferrier and y. hou -- added conversion factor to fu's!
256! cloud-snow optical property scheme. !
257! nov 2012, yu-tai hou -- modified control parameters thru !
258! module 'physparam'. !
259! FEB 2017 A.Cheng - add odpth output, effective radius input !
260! jun 2018, h-m lin/y-t hou -- added new option of cloud overlap !
261! method 'de-correlation-length' for mcica application !
262! !
263! ************************************************************************ !
264! !
265! additional aer revision history: !
266! jul 2020, m.j. iacono -- added new mcica cloud overlap options !
267! exponential and exponential-random. each method can !
268! use either a constant or a latitude-varying and !
269! day-of-year varying decorrelation length selected !
270! with parameter "idcor". !
271! !
272!!!!! ============================================================== !!!!!
273!!!!! end descriptions !!!!!
274!!!!! ============================================================== !!!!!
275
278 module rrtmg_lw
279!
280 use physcons, only : con_g, con_cp, con_avgd, con_amd, &
281 & con_amw, con_amo3
284 use machine, only : kind_phys, &
285 & im => kind_io4, rb => kind_phys, &
286 & kind_dbl_prec
287
289!
290 use module_radlw_avplank, only : totplnk
291 use module_radlw_ref, only : preflog, tref, chi_mls
292!
293 implicit none
294!
295 private
296!
297! ... version tag and last revision date
298 character(40), parameter :: &
299 & VTAGLW='NCEP LW v5.1 Nov 2012 -RRTMG-LW v4.82 '
300! & VTAGLW='NCEP LW v5.0 Aug 2012 -RRTMG-LW v4.82 '
301! & VTAGLW='RRTMG-LW v4.82 Nov 2009 '
302! & VTAGLW='RRTMG-LW v4.8 Oct 2009 '
303! & VTAGLW='RRTMG-LW v4.71 Mar 2009 '
304! & VTAGLW='RRTMG-LW v4.4 Oct 2008 '
305! & VTAGLW='RRTM-LW v2.3g Mar 2007 '
306! & VTAGLW='RRTM-LW v2.3g Apr 2004 '
307
308! --- constant values
309 real (kind=kind_phys), parameter :: eps = 1.0e-6
310 real (kind=kind_phys), parameter :: oneminus= 1.0-eps
311 real (kind=kind_phys), parameter :: cldmin = tiny(cldmin)
312 real (kind=kind_phys), parameter :: bpade = 1.0/0.278 ! pade approx constant
313 real (kind=kind_phys), parameter :: stpfac = 296.0/1013.0
314 real (kind=kind_phys), parameter :: wtdiff = 0.5 ! weight for radiance to flux conversion
315 real (kind=kind_phys), parameter :: tblint = ntbl ! lookup table conversion factor
316 real (kind=kind_phys), parameter :: f_zero = 0.0
317 real (kind=kind_phys), parameter :: f_one = 1.0
318
319! ... atomic weights for conversion from mass to volume mixing ratios
320 real (kind=kind_phys), parameter :: amdw = con_amd/con_amw
321 real (kind=kind_phys), parameter :: amdo3 = con_amd/con_amo3
322
323! ... band indices
324 integer, dimension(nbands) :: nspa, nspb
325
326 data nspa / 1, 1, 9, 9, 9, 1, 9, 1, 9, 1, 1, 9, 9, 1, 9, 9 /
327 data nspb / 1, 1, 5, 5, 5, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0 /
328
329! ... band wavenumber intervals
330! real (kind=kind_phys) :: wavenum1(nbands), wavenum2(nbands)
331! data wavenum1/ &
332! & 10., 350., 500., 630., 700., 820., 980., 1080., &
333!err & 1180., 1390., 1480., 1800., 2080., 2250., 2390., 2600. /
334! & 1180., 1390., 1480., 1800., 2080., 2250., 2380., 2600. /
335! data wavenum2/ &
336! & 350., 500., 630., 700., 820., 980., 1080., 1180., &
337!err & 1390., 1480., 1800., 2080., 2250., 2390., 2600., 3250. /
338! & 1390., 1480., 1800., 2080., 2250., 2380., 2600., 3250. /
339! real (kind=kind_phys) :: delwave(nbands)
340! data delwave / 340., 150., 130., 70., 120., 160., 100., 100., &
341! & 210., 90., 320., 280., 170., 130., 220., 650. /
342
343! --- reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50
344! and 1.80) as a function of total column water vapor. the function
345! has been defined to minimize flux and cooling rate errors in these bands
346! over a wide range of precipitable water values.
347 real (kind=kind_phys), dimension(nbands) :: a0, a1, a2
348
349 data a0 / 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, &
350 & 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 /
351 data a1 / 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, &
352 & -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /
353 data a2 / 0.00, -12.0, -11.7, 0.00, -0.72,-0.243, 0.19,-0.062, &
354 & 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /
355
356!! --- logical flags for optional output fields
357
358 logical :: lhlwb = .false.
359 logical :: lhlw0 = .false.
360 logical :: lflxprf= .false.
361
362! --- those data will be set up only once by "rlwinit"
363
364! ... fluxfac, heatfac are factors for fluxes (in w/m**2) and heating
365! rates (in k/day, or k/sec set by subroutine 'rlwinit')
366! semiss0 are default surface emissivity for each bands
367
368 real (kind=kind_phys) :: fluxfac, heatfac, semiss0(nbands)
369 data semiss0(:) / nbands*1.0 /
370
371 real (kind=kind_phys) :: tau_tbl(0:ntbl)
372 real (kind=kind_phys) :: exp_tbl(0:ntbl)
373 real (kind=kind_phys) :: tfn_tbl(0:ntbl)
377
378! --- the following variables are used for sub-column cloud scheme
379
380 integer, parameter :: ipsdlw0 = ngptlw ! initial permutation seed
381
382! --- public accessable subprograms
383
384 public rrtmg_lw_run, rlwinit
385
386
387! ================
388 contains
389! ================
390
391
419 subroutine rrtmg_lw_run &
420 & ( plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr_co2, gasvmr_n2o, & ! --- inputs
421 & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, &
422 & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, &
423 & icseed,aeraod,aerssa,sfemis,sfgtmp, &
424 & dzlyr,delpin,de_lgth,alpha, &
425 & npts, nlay, nlp1, lprnt, cld_cf, lslwr, top_at_1, iovr, &
426 & iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, &
427 & iovr_exprand, &
428 & inc_minor_gas, ilwcliq, ilwcice, isubclw, &
429 & hlwc,topflx,sfcflx,cldtau, & ! --- outputs
430 & hlw0,hlwb,flxprf, & ! --- optional
431 & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, &
432 & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, &
433 & cld_od, errmsg, errflg &
434 & )
435
436! ==================== defination of variables ==================== !
437! !
438! input variables: !
439! plyr (npts,nlay) : layer mean pressures (mb) !
440! plvl (npts,nlp1) : interface pressures (mb) !
441! tlyr (npts,nlay) : layer mean temperature (k) !
442! tlvl (npts,nlp1) : interface temperatures (k) !
443! qlyr (npts,nlay) : layer specific humidity (gm/gm) *see inside !
444! olyr (npts,nlay) : layer ozone concentration (gm/gm) *see inside !
445! gasvmr(npts,nlay,:): atmospheric gases amount: !
446! (check module_radiation_gases for definition) !
447! gasvmr(:,:,1) - co2 volume mixing ratio !
448! gasvmr(:,:,2) - n2o volume mixing ratio !
449! gasvmr(:,:,3) - ch4 volume mixing ratio !
450! gasvmr(:,:,4) - o2 volume mixing ratio !
451! gasvmr(:,:,5) - co volume mixing ratio !
452! gasvmr(:,:,6) - cfc11 volume mixing ratio !
453! gasvmr(:,:,7) - cfc12 volume mixing ratio !
454! gasvmr(:,:,8) - cfc22 volume mixing ratio !
455! gasvmr(:,:,9) - ccl4 volume mixing ratio !
456! clouds(npts,nlay,:): layer cloud profiles: !
457! (check module_radiation_clouds for definition) !
458! clouds(:,:,1) - layer total cloud fraction !
459! clouds(:,:,2) - layer in-cloud liq water path (g/m**2) !
460! clouds(:,:,3) - mean eff radius for liq cloud (micron) !
461! clouds(:,:,4) - layer in-cloud ice water path (g/m**2) !
462! clouds(:,:,5) - mean eff radius for ice cloud (micron) !
463! clouds(:,:,6) - layer rain drop water path (g/m**2) !
464! clouds(:,:,7) - mean eff radius for rain drop (micron) !
465! clouds(:,:,8) - layer snow flake water path (g/m**2) !
466! clouds(:,:,9) - mean eff radius for snow flake (micron) !
467! icseed(npts) : auxiliary special cloud related array !
468! when module variable isubclw=2, it provides !
469! permutation seed for each column profile that !
470! are used for generating random numbers. !
471! when isubclw /=2, it will not be used. !
472! aerosols(npts,nlay,nbands,:) : aerosol optical properties !
473! (check module_radiation_aerosols for definition)!
474! (:,:,:,1) - optical depth !
475! (:,:,:,2) - single scattering albedo !
476! (:,:,:,3) - asymmetry parameter !
477! sfemis (npts) : surface emissivity !
478! sfgtmp (npts) : surface ground temperature (k) !
479! dzlyr(npts,nlay) : layer thickness (km) !
480! delpin(npts,nlay): layer pressure thickness (mb) !
481! de_lgth(npts) : cloud decorrelation length (km) !
482! alpha(npts,nlay) : EXP/ER cloud overlap decorrelation parameter !
483! npts : total number of horizontal points !
484! nlay, nlp1 : total number of vertical layers, levels !
485! lprnt : cntl flag for diagnostic print out !
486! inc_minor_gas - control flag for rare gases (ch4,n2o,o2,cfcs, etc.) !
487! =0: do not include rare gases !
488! >0: include all rare gases !
489! ilwcliq - control flag for liq-cloud optical properties !
490! =1: input cld liqp & reliq, hu & stamnes (1993) !
491! =2: not used !
492! ilwcice - control flag for ice-cloud optical properties !
493! =1: input cld icep & reice, ebert & curry (1997) !
494! =2: input cld icep & reice, streamer (1996) !
495! =3: input cld icep & reice, fu (1998) !
496! isubclw - sub-column cloud approximation control flag !
497! =0: no sub-col cld treatment, use grid-mean cld quantities !
498! =1: mcica sub-col, prescribed seeds to get random numbers !
499! =2: mcica sub-col, providing array icseed for random numbers!
500! iovr - clouds vertical overlapping control flag !
501! =iovr_rand !
502! =iovr_maxrand !
503! =iovr_max !
504! =iovr_dcorr !
505! =iovr_exp !
506! =iovr_exprand !
507! iovr_rand - choice of cloud-overlap: random !
508! iovr_maxrand - choice of cloud-overlap: maximum random !
509! iovr_max - choice of cloud-overlap: maximum !
510! iovr_dcorr - choice of cloud-overlap: decorrelation length !
511! iovr_exp - choice of cloud-overlap: exponential !
512! iovr_exprand - choice of cloud-overlap: exponential random !
513! !
514! output variables: !
515! hlwc (npts,nlay): total sky heating rate (k/day or k/sec) !
516! topflx(npts) : radiation fluxes at top, component: !
517! (check module_radlw_paramters for definition) !
518! upfxc - total sky upward flux at top (w/m2) !
519! upfx0 - clear sky upward flux at top (w/m2) !
520! sfcflx(npts) : radiation fluxes at sfc, component: !
521! (check module_radlw_paramters for definition) !
522! upfxc - total sky upward flux at sfc (w/m2) !
523! upfx0 - clear sky upward flux at sfc (w/m2) !
524! dnfxc - total sky downward flux at sfc (w/m2) !
525! dnfx0 - clear sky downward flux at sfc (w/m2) !
526! cldtau(npts,nlay): approx 10mu band layer cloud optical depth !
527! !
528!! optional output variables: !
529! hlwb(npts,nlay,nbands): spectral band total sky heating rates !
530! hlw0 (npts,nlay): clear sky heating rate (k/day or k/sec) !
531! flxprf(npts,nlp1): level radiative fluxes (w/m2), components: !
532! (check module_radlw_paramters for definition) !
533! upfxc - total sky upward flux !
534! dnfxc - total sky dnward flux !
535! upfx0 - clear sky upward flux !
536! dnfx0 - clear sky dnward flux !
537! !
538! module parameters, control variables: !
539! nbands - number of longwave spectral bands !
540! maxgas - maximum number of absorbing gaseous !
541! maxxsec - maximum number of cross-sections !
542! ngptlw - total number of g-point subintervals !
543! ng## - number of g-points in band (##=1-16) !
544! ngb(ngptlw) - band indices for each g-point !
545! bpade - pade approximation constant (1/0.278) !
546! nspa,nspb(nbands)- number of lower/upper ref atm's per band !
547! delwave(nbands) - longwave band width (wavenumbers) !
548! ipsdlw0 - permutation seed for mcica sub-col clds !
549! !
550! major local variables: !
551! pavel (nlay) - layer pressures (mb) !
552! delp (nlay) - layer pressure thickness (mb) !
553! tavel (nlay) - layer temperatures (k) !
554! tz (0:nlay) - level (interface) temperatures (k) !
555! semiss (nbands) - surface emissivity for each band !
556! wx (nlay,maxxsec) - cross-section molecules concentration !
557! coldry (nlay) - dry air column amount !
558! (1.e-20*molecules/cm**2) !
559! cldfrc (0:nlp1) - layer cloud fraction !
560! taucld (nbands,nlay) - layer cloud optical depth for each band !
561! cldfmc (ngptlw,nlay) - layer cloud fraction for each g-point !
562! tauaer (nbands,nlay) - aerosol optical depths !
563! fracs (ngptlw,nlay) - planck fractions !
564! tautot (ngptlw,nlay) - total optical depths (gaseous+aerosols) !
565! colamt (nlay,maxgas) - column amounts of absorbing gases !
566! 1-maxgas are for watervapor, carbon !
567! dioxide, ozone, nitrous oxide, methane, !
568! oxigen, carbon monoxide, respectively !
569! (molecules/cm**2) !
570! pwvcm - column precipitable water vapor (cm) !
571! secdiff(nbands) - variable diffusivity angle defined as !
572! an exponential function of the column !
573! water amount in bands 2-3 and 5-9. !
574! this reduces the bias of several w/m2 in !
575! downward surface flux in high water !
576! profiles caused by using the constant !
577! diffusivity angle of 1.66. (mji) !
578! facij (nlay) - indicator of interpolation factors !
579! =0/1: indicate lower/higher temp & height !
580! selffac(nlay) - scale factor for self-continuum, equals !
581! (w.v. density)/(atm density at 296K,1013 mb) !
582! selffrac(nlay) - factor for temp interpolation of ref !
583! self-continuum data !
584! indself(nlay) - index of the lower two appropriate ref !
585! temp for the self-continuum interpolation !
586! forfac (nlay) - scale factor for w.v. foreign-continuum !
587! forfrac(nlay) - factor for temp interpolation of ref !
588! w.v. foreign-continuum data !
589! indfor (nlay) - index of the lower two appropriate ref !
590! temp for the foreign-continuum interp !
591! laytrop - tropopause layer index at which switch is !
592! made from one conbination kew species to !
593! another. !
594! jp(nlay),jt(nlay),jt1(nlay) !
595! - lookup table indexes !
596! totuflux(0:nlay) - total-sky upward longwave flux (w/m2) !
597! totdflux(0:nlay) - total-sky downward longwave flux (w/m2) !
598! htr(nlay) - total-sky heating rate (k/day or k/sec) !
599! totuclfl(0:nlay) - clear-sky upward longwave flux (w/m2) !
600! totdclfl(0:nlay) - clear-sky downward longwave flux (w/m2) !
601! htrcl(nlay) - clear-sky heating rate (k/day or k/sec) !
602! fnet (0:nlay) - net longwave flux (w/m2) !
603! fnetc (0:nlay) - clear-sky net longwave flux (w/m2) !
604! !
605! !
606! ====================== end of definitions =================== !
607
608! --- inputs:
609 integer, intent(in) :: npts, nlay, nlp1, ilwcliq, ilwcice, &
610 isubclw, iovr, iovr_dcorr, iovr_exp, iovr_exprand, iovr_rand,&
611 iovr_maxrand, iovr_max
612 integer, intent(in), optional :: icseed(npts)
613
614 logical, intent(in) :: lprnt, inc_minor_gas
615
616 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, &
617 & tlvl
618 real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, &
619 & tlyr, qlyr, olyr, dzlyr, delpin
620
621 real (kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co2, &
622 & gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, &
623 & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4
624
625 real (kind=kind_phys), dimension(:,:),intent(in):: cld_cf
626 real (kind=kind_phys), dimension(:,:),intent(in),optional:: &
627 & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, &
628 & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, &
629 & cld_od
630
631 real (kind=kind_phys), dimension(:), intent(in) :: sfemis, &
632 & sfgtmp, de_lgth
633 real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha
634
635 real (kind=kind_phys), dimension(:,:,:),intent(in):: &
636 & aeraod, aerssa
637 logical, intent(in) :: lslwr, top_at_1
638
639! --- outputs:
640 real (kind=kind_phys), dimension(:,:), intent(inout) :: hlwc
641 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
642 & cldtau
643
644 type (topflw_type), dimension(:), intent(inout) :: topflx
645 type (sfcflw_type), dimension(:), intent(inout) :: sfcflx
646
647 character(len=*), intent(out) :: errmsg
648 integer, intent(out) :: errflg
649
650!! --- optional outputs:
651 real (kind=kind_phys), dimension(:,:,:),optional, &
652 & intent(inout) :: hlwb
653 real (kind=kind_phys), dimension(:,:), optional, &
654 & intent(inout) :: hlw0
655 type (proflw_type), dimension(:,:), optional, &
656 & intent(inout) :: flxprf
657
658! --- locals:
659 real (kind=kind_phys), dimension(0:nlp1) :: cldfrc
660
661 real (kind=kind_phys), dimension(0:nlay) :: totuflux, totdflux, &
662 & totuclfl, totdclfl, tz
663
664 real (kind=kind_phys), dimension(nlay) :: htr, htrcl
665
666 real (kind=kind_phys), dimension(nlay) :: pavel, tavel, delp, &
667 & clwp, ciwp, relw, reiw, cda1, cda2, cda3, cda4, &
668 & coldry, colbrd, h2ovmr, o3vmr, fac00, fac01, fac10, fac11, &
669 & selffac, selffrac, forfac, forfrac, minorfrac, scaleminor, &
670 & scaleminorn2, temcol, dz
671
672 real (kind=kind_phys), dimension(nbands,0:nlay) :: pklev, pklay
673
674 real (kind=kind_phys), dimension(nlay,nbands) :: htrb
675 real (kind=kind_phys), dimension(nbands,nlay) :: taucld, tauaer
676 real (kind=kind_phys), dimension(nbands,npts,nlay) :: taucld3
677 real (kind=kind_phys), dimension(ngptlw,nlay) :: fracs, tautot
678 real (kind=kind_phys), dimension(nlay,ngptlw) :: fracs_r
679 real(kind=kind_phys), dimension(ngptlw,nlay) :: cldfmc
680 real (kind=kind_phys), dimension(nbands) :: semiss, secdiff
681
682! --- column amount of absorbing gases:
683! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co
684 real (kind=kind_phys) :: colamt(nlay,maxgas)
685
686! --- column cfc cross-section amounts:
687! (:,m) m = 1-ccl4, 2-cfc11, 3-cfc12, 4-cfc22
688 real (kind=kind_phys) :: wx(nlay,maxxsec)
689
690! --- reference ratios of binary species parameter in lower atmosphere:
691! (:,m,:) m = 1-h2o/co2, 2-h2o/o3, 3-h2o/n2o, 4-h2o/ch4, 5-n2o/co2, 6-o3/co2
692 real (kind=kind_phys) :: rfrate(nlay,nrates,2)
693
694 real (kind=kind_phys) :: tem0, tem1, tem2, pwvcm, summol, stemp, &
695 & delgth
696 real (kind=kind_phys), dimension(nlay) :: alph
697
698 integer, dimension(npts) :: ipseed
699 integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor
700 integer :: laytrop, iplon, i, j, k, k1
701 integer :: ig
702 integer :: inflglw, iceflglw, liqflglw
703 logical :: lcf1
704 integer :: istart ! beginning band of calculation
705 integer :: iend ! ending band of calculation
706 integer :: iout ! output option flag (inactive)
707
708
709!
710!===> ... begin here
711!
712 ! Initialize CCPP error handling variables
713 errmsg = ''
714 errflg = 0
715
716!mz*
717! For passing in cloud physical properties; cloud optics parameterized
718! in RRTMG:
719 inflglw = 2
720 iceflglw = 3
721 liqflglw = 1
722 istart = 1
723 iend = 16
724 iout = 0
725
726!
727 if (.not. lslwr) return
728
729! --- ... initialization
730
731 lhlwb = present ( hlwb )
732 lhlw0 = present ( hlw0 )
733 lflxprf= present ( flxprf )
734
735 colamt(:,:) = f_zero
736 cldtau(:,:) = f_zero
737
738!! --- check for optional input arguments, depending on cloud method
739 if (ilwcliq > 0) then ! use prognostic cloud method
740 if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. &
741 & .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. &
742 & .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. &
743 & .not.present(cld_swp) .or. .not.present(cld_ref_snow)) then
744 write(errmsg,'(*(a))') &
745 & 'Logic error: ilwcliq>0 requires the following', &
746 & ' optional arguments to be present:', &
747 & ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', &
748 & ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow'
749 errflg = 1
750 return
751 end if
752 else ! use diagnostic cloud method
753 if ( .not.present(cld_od) ) then
754 write(errmsg,'(*(a))') &
755 & 'Logic error: ilwcliq<=0 requires the following', &
756 & ' optional argument to be present: cld_od'
757 errflg = 1
758 return
759 end if
760 endif ! end if_ilwcliq
761
764
765 if ( isubclw == 1 ) then ! advance prescribed permutation seed
766 do i = 1, npts
767 ipseed(i) = ipsdlw0 + i
768 enddo
769 elseif ( isubclw == 2 ) then ! use input array of permutaion seeds
770 do i = 1, npts
771 ipseed(i) = icseed(i)
772 enddo
773 endif
774
775! if ( lprnt ) then
776! print *,' In rrtmg_lw, isubclw, ipsdlw0,ipseed =', &
777! & isubclw, ipsdlw0, ipseed
778! endif
779
780! --- ... loop over horizontal npts profiles
781
782 lab_do_iplon : do iplon = 1, npts
783
785 if (sfemis(iplon) > eps .and. sfemis(iplon) <= 1.0) then ! input surface emissivity
786 do j = 1, nbands
787 semiss(j) = sfemis(iplon)
788 enddo
789 else ! use default values
790 do j = 1, nbands
791 semiss(j) = semiss0(j)
792 enddo
793 endif
794
795 stemp = sfgtmp(iplon) ! surface ground temp
796 if (iovr == iovr_dcorr) delgth= de_lgth(iplon) ! clouds decorr-length
797
799! the vertical index of internal array is from surface to top
800
801! --- ... molecular amounts are input or converted to volume mixing ratio
802! and later then converted to molecular amount (molec/cm2) by the
803! dry air column coldry (in molec/cm2) which is calculated from the
804! layer pressure thickness (in mb), based on the hydrostatic equation
805! --- ... and includes a correction to account for h2o in the layer.
806
807 if (top_at_1) then ! input from toa to sfc
808
809 tem1 = 100.0 * con_g
810 tem2 = 1.0e-20 * 1.0e3 * con_avgd
811 tz(0) = tlvl(iplon,nlp1)
812
813 do k = 1, nlay
814 k1 = nlp1 - k
815 pavel(k)= plyr(iplon,k1)
816 delp(k) = delpin(iplon,k1)
817 tavel(k)= tlyr(iplon,k1)
818 tz(k) = tlvl(iplon,k1)
819 dz(k) = dzlyr(iplon,k1)
820 if (iovr == iovr_exp .or. iovr == iovr_exprand) alph(k) = alpha(iplon,k) ! alpha decorrelation
821
823
824!test use
825! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)*amdw) ! input mass mixing ratio
826! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)) ! input vol mixing ratio
827! o3vmr (k)= max(f_zero,olyr(iplon,k1)) ! input vol mixing ratio
828!ncep model use
829 h2ovmr(k)= max(f_zero,qlyr(iplon,k1) &
830 & *amdw/(f_one-qlyr(iplon,k1))) ! input specific humidity
831 o3vmr(k)= max(f_zero,olyr(iplon,k1)*amdo3) ! input mass mixing ratio
832
833! --- ... tem0 is the molecular weight of moist air
834 tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw
835 coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k)))
836 temcol(k) = 1.0e-12 * coldry(k)
837
838 colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o
839 colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k1)) ! co2
840 colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3
841 enddo
842
846
847 if (inc_minor_gas) then
848 do k = 1, nlay
849 k1 = nlp1 - k
850 colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k1)) ! n2o
851 colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k1)) ! ch4
852 colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k1)) ! o2
853 colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k1)) ! co
854
855 wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k1) ) ! ccl4
856 wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k1) ) ! cf11
857 wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k1) ) ! cf12
858 wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k1) ) ! cf22
859 enddo
860 else
861 do k = 1, nlay
862 colamt(k,4) = f_zero ! n2o
863 colamt(k,5) = f_zero ! ch4
864 colamt(k,6) = f_zero ! o2
865 colamt(k,7) = f_zero ! co
866
867 wx(k,1) = f_zero
868 wx(k,2) = f_zero
869 wx(k,3) = f_zero
870 wx(k,4) = f_zero
871 enddo
872 endif
873
875
876 do k = 1, nlay
877 k1 = nlp1 - k
878 do j = 1, nbands
879 tauaer(j,k) = aeraod(iplon,k1,j) &
880 & * (f_one - aerssa(iplon,k1,j))
881 enddo
882 enddo
883
885 if (ilwcliq > 0) then ! use prognostic cloud method
886 do k = 1, nlay
887 k1 = nlp1 - k
888 cldfrc(k)= cld_cf(iplon,k1)
889 clwp(k) = cld_lwp(iplon,k1)
890 relw(k) = cld_ref_liq(iplon,k1)
891 ciwp(k) = cld_iwp(iplon,k1)
892 reiw(k) = cld_ref_ice(iplon,k1)
893 cda1(k) = cld_rwp(iplon,k1)
894 cda2(k) = cld_ref_rain(iplon,k1)
895 cda3(k) = cld_swp(iplon,k1)
896 cda4(k) = cld_ref_snow(iplon,k1)
897 enddo
898 else ! use diagnostic cloud method
899 do k = 1, nlay
900 k1 = nlp1 - k
901 cldfrc(k)= cld_cf(iplon,k1)
902 cda1(k) = cld_od(iplon,k1)
903 enddo
904 endif ! end if_ilwcliq
905
906 cldfrc(0) = f_one ! padding value only
907 cldfrc(nlp1) = f_zero ! padding value only
908
910
911 tem1 = f_zero
912 tem2 = f_zero
913 do k = 1, nlay
914 tem1 = tem1 + coldry(k) + colamt(k,1)
915 tem2 = tem2 + colamt(k,1)
916 enddo
917
918 tem0 = 10.0 * tem2 / (amdw * tem1 * con_g)
919 pwvcm = tem0 * plvl(iplon,nlp1)
920
921 else ! input from sfc to toa
922
923 tem1 = 100.0 * con_g
924 tem2 = 1.0e-20 * 1.0e3 * con_avgd
925 tz(0) = tlvl(iplon,1)
926
927 do k = 1, nlay
928 pavel(k)= plyr(iplon,k)
929 delp(k) = delpin(iplon,k)
930 tavel(k)= tlyr(iplon,k)
931 tz(k) = tlvl(iplon,k+1)
932 dz(k) = dzlyr(iplon,k)
933 if (iovr == iovr_exp .or. iovr == iovr_exprand) alph(k) = alpha(iplon,k) ! alpha decorrelation
934
935! --- ... set absorber amount
936!test use
937! h2ovmr(k)= max(f_zero,qlyr(iplon,k)*amdw) ! input mass mixing ratio
938! h2ovmr(k)= max(f_zero,qlyr(iplon,k)) ! input vol mixing ratio
939! o3vmr (k)= max(f_zero,olyr(iplon,k)) ! input vol mixing ratio
940!ncep model use
941 h2ovmr(k)= max(f_zero,qlyr(iplon,k) &
942 & *amdw/(f_one-qlyr(iplon,k))) ! input specific humidity
943 o3vmr(k)= max(f_zero,olyr(iplon,k)*amdo3) ! input mass mixing ratio
944
945! --- ... tem0 is the molecular weight of moist air
946 tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw
947 coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k)))
948 temcol(k) = 1.0e-12 * coldry(k)
949
950 colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o
951 colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k))! co2
952 colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3
953 enddo
954
955! --- ... set up col amount for rare gases, convert from volume mixing ratio
956! to molec/cm2 based on coldry (scaled to 1.0e-20)
957
958 if (inc_minor_gas) then
959 do k = 1, nlay
960 colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k)) ! n2o
961 colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k)) ! ch4
962 colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k)) ! o2
963 colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k)) ! co
964
965 wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k) ) ! ccl4
966 wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k) ) ! cf11
967 wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k) ) ! cf12
968 wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k) ) ! cf22
969 enddo
970 else
971 do k = 1, nlay
972 colamt(k,4) = f_zero ! n2o
973 colamt(k,5) = f_zero ! ch4
974 colamt(k,6) = f_zero ! o2
975 colamt(k,7) = f_zero ! co
976
977 wx(k,1) = f_zero
978 wx(k,2) = f_zero
979 wx(k,3) = f_zero
980 wx(k,4) = f_zero
981 enddo
982 endif
983
984! --- ... set aerosol optical properties
985
986 do j = 1, nbands
987 do k = 1, nlay
988 tauaer(j,k) = aeraod(iplon,k,j) &
989 & * (f_one - aerssa(iplon,k,j))
990 enddo
991 enddo
992
993 if (ilwcliq > 0) then ! use prognostic cloud method
994 do k = 1, nlay
995 cldfrc(k)= cld_cf(iplon,k)
996 clwp(k) = cld_lwp(iplon,k)
997 relw(k) = cld_ref_liq(iplon,k)
998 ciwp(k) = cld_iwp(iplon,k)
999 reiw(k) = cld_ref_ice(iplon,k)
1000 cda1(k) = cld_rwp(iplon,k)
1001 cda2(k) = cld_ref_rain(iplon,k)
1002 cda3(k) = cld_swp(iplon,k)
1003 cda4(k) = cld_ref_snow(iplon,k)
1004 enddo
1005 else ! use diagnostic cloud method
1006 do k = 1, nlay
1007 cldfrc(k)= cld_cf(iplon,k)
1008 cda1(k) = cld_od(iplon,k)
1009 enddo
1010 endif ! end if_ilwcliq
1011
1012 cldfrc(0) = f_one ! padding value only
1013 cldfrc(nlp1) = f_zero ! padding value only
1014
1015! --- ... compute precipitable water vapor for diffusivity angle adjustments
1016
1017 tem1 = f_zero
1018 tem2 = f_zero
1019 do k = 1, nlay
1020 tem1 = tem1 + coldry(k) + colamt(k,1)
1021 tem2 = tem2 + colamt(k,1)
1022 enddo
1023
1024 tem0 = 10.0 * tem2 / (amdw * tem1 * con_g)
1025 pwvcm = tem0 * plvl(iplon,1)
1026
1027 endif ! top_at_1
1028
1030
1031 do k = 1, nlay
1032 summol = f_zero
1033 do i = 2, maxgas
1034 summol = summol + colamt(k,i)
1035 enddo
1036 colbrd(k) = coldry(k) - summol
1037 enddo
1038
1040
1041 tem1 = 1.80
1042 tem2 = 1.50
1043 do j = 1, nbands
1044 if (j==1 .or. j==4 .or. j==10) then
1045 secdiff(j) = 1.66
1046 else
1047 secdiff(j) = min( tem1, max( tem2, &
1048 & a0(j)+a1(j)*exp(a2(j)*pwvcm) ))
1049 endif
1050 enddo
1051
1052! if (lprnt) then
1053! print *,' coldry',coldry
1054! print *,' wx(*,1) ',(wx(k,1),k=1,NLAY)
1055! print *,' wx(*,2) ',(wx(k,2),k=1,NLAY)
1056! print *,' wx(*,3) ',(wx(k,3),k=1,NLAY)
1057! print *,' wx(*,4) ',(wx(k,4),k=1,NLAY)
1058! print *,' iplon ',iplon
1059! print *,' pavel ',pavel
1060! print *,' delp ',delp
1061! print *,' tavel ',tavel
1062! print *,' tz ',tz
1063! print *,' h2ovmr ',h2ovmr
1064! print *,' o3vmr ',o3vmr
1065! endif
1066
1069
1070 lcf1 = .false.
1071 lab_do_k0 : do k = 1, nlay
1072 if ( cldfrc(k) > eps ) then
1073 lcf1 = .true.
1074 exit lab_do_k0
1075 endif
1076 enddo lab_do_k0
1077
1078 if ( lcf1 ) then
1079
1080 call cldprop &
1081! --- inputs:
1082 & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, &
1083 & nlay, nlp1, ipseed(iplon), dz, delgth, iovr, alph, &
1084 & ilwcliq, ilwcice, isubclw, &
1085! --- outputs:
1086 & cldfmc, taucld &
1087 & )
1088
1089! --- ... save computed layer cloud optical depth for output
1090! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8)
1091
1092 if (top_at_1) then ! input from toa to sfc
1093 do k = 1, nlay
1094 k1 = nlp1 - k
1095 cldtau(iplon,k1) = taucld( 7,k)
1096 enddo
1097 else ! input from sfc to toa
1098 do k = 1, nlay
1099 cldtau(iplon,k) = taucld( 7,k)
1100 enddo
1101 endif ! end if_top_at_1_block
1102
1103 else
1104 cldfmc = f_zero
1105 taucld = f_zero
1106 endif
1107
1108! if (lprnt) then
1109! print *,' after cldprop'
1110! print *,' clwp',clwp
1111! print *,' ciwp',ciwp
1112! print *,' relw',relw
1113! print *,' reiw',reiw
1114! print *,' taucl',cda1
1115! print *,' cldfrac',cldfrc
1116! endif
1117
1120 call setcoef &
1121! --- inputs:
1122 & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, &
1123 & nlay, nlp1, &
1124! --- outputs:
1125 & laytrop,pklay,pklev,jp,jt,jt1, &
1126 & rfrate,fac00,fac01,fac10,fac11, &
1127 & selffac,selffrac,indself,forfac,forfrac,indfor, &
1128 & minorfrac,scaleminor,scaleminorn2,indminor &
1129 & )
1130
1131! if (lprnt) then
1132! print *,'laytrop',laytrop
1133! print *,'colh2o',(colamt(k,1),k=1,NLAY)
1134! print *,'colco2',(colamt(k,2),k=1,NLAY)
1135! print *,'colo3', (colamt(k,3),k=1,NLAY)
1136! print *,'coln2o',(colamt(k,4),k=1,NLAY)
1137! print *,'colch4',(colamt(k,5),k=1,NLAY)
1138! print *,'fac00',fac00
1139! print *,'fac01',fac01
1140! print *,'fac10',fac10
1141! print *,'fac11',fac11
1142! print *,'jp',jp
1143! print *,'jt',jt
1144! print *,'jt1',jt1
1145! print *,'selffac',selffac
1146! print *,'selffrac',selffrac
1147! print *,'indself',indself
1148! print *,'forfac',forfac
1149! print *,'forfrac',forfrac
1150! print *,'indfor',indfor
1151! endif
1152
1155
1156 call taumol &
1157! --- inputs:
1158 & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, &
1159 & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, &
1160 & selffac,selffrac,indself,forfac,forfrac,indfor, &
1161 & minorfrac,scaleminor,scaleminorn2,indminor, &
1162 & nlay, &
1163! --- outputs:
1164 & fracs, tautot &
1165 & )
1166
1167! if (lprnt) then
1168! print *,' after taumol'
1169! do k = 1, nlay
1170! write(6,121) k
1171!121 format(' k =',i3,5x,'FRACS')
1172! write(6,122) (fracs(j,k),j=1,ngptlw)
1173!122 format(10e14.7)
1174! write(6,123) k
1175!123 format(' k =',i3,5x,'TAUTOT')
1176! write(6,122) (tautot(j,k),j=1,ngptlw)
1177! enddo
1178! endif
1179
1189
1190 if (isubclw <= 0) then
1191
1192 if (iovr <= 0) then
1193
1194 call rtrn &
1195! --- inputs:
1196 & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, &
1197 & fracs,secdiff,nlay,nlp1, &
1198! --- outputs:
1199 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb &
1200 & )
1201
1202 else
1203
1204 call rtrnmr &
1205! --- inputs:
1206 & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, &
1207 & fracs,secdiff,nlay,nlp1, &
1208! --- outputs:
1209 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb &
1210 & )
1211
1212 endif ! end if_iovr_block
1213
1214 else
1215
1216 call rtrnmc &
1217! --- inputs:
1218 & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, &
1219 & fracs,secdiff,nlay,nlp1, &
1220! --- outputs:
1221 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb &
1222 & )
1223
1224 endif ! end if_isubclw_block
1225
1227
1228 topflx(iplon)%upfxc = totuflux(nlay)
1229 topflx(iplon)%upfx0 = totuclfl(nlay)
1230
1231 sfcflx(iplon)%upfxc = totuflux(0)
1232 sfcflx(iplon)%upfx0 = totuclfl(0)
1233 sfcflx(iplon)%dnfxc = totdflux(0)
1234 sfcflx(iplon)%dnfx0 = totdclfl(0)
1235
1236 if (top_at_1) then ! output from toa to sfc
1237
1238!! --- ... optional fluxes
1239 if ( lflxprf ) then
1240 do k = 0, nlay
1241 k1 = nlp1 - k
1242 flxprf(iplon,k1)%upfxc = totuflux(k)
1243 flxprf(iplon,k1)%dnfxc = totdflux(k)
1244 flxprf(iplon,k1)%upfx0 = totuclfl(k)
1245 flxprf(iplon,k1)%dnfx0 = totdclfl(k)
1246 enddo
1247 endif
1248
1249 do k = 1, nlay
1250 k1 = nlp1 - k
1251 hlwc(iplon,k1) = htr(k)
1252 enddo
1253
1254!! --- ... optional clear sky heating rate
1255 if ( lhlw0 ) then
1256 do k = 1, nlay
1257 k1 = nlp1 - k
1258 hlw0(iplon,k1) = htrcl(k)
1259 enddo
1260 endif
1261
1262!! --- ... optional spectral band heating rate
1263 if ( lhlwb ) then
1264 do j = 1, nbands
1265 do k = 1, nlay
1266 k1 = nlp1 - k
1267 hlwb(iplon,k1,j) = htrb(k,j)
1268 enddo
1269 enddo
1270 endif
1271
1272 else ! output from sfc to toa
1273
1274!! --- ... optional fluxes
1275 if ( lflxprf ) then
1276 do k = 0, nlay
1277 flxprf(iplon,k+1)%upfxc = totuflux(k)
1278 flxprf(iplon,k+1)%dnfxc = totdflux(k)
1279 flxprf(iplon,k+1)%upfx0 = totuclfl(k)
1280 flxprf(iplon,k+1)%dnfx0 = totdclfl(k)
1281 enddo
1282 endif
1283
1284 do k = 1, nlay
1285 hlwc(iplon,k) = htr(k)
1286 enddo
1287
1288!! --- ... optional clear sky heating rate
1289 if ( lhlw0 ) then
1290 do k = 1, nlay
1291 hlw0(iplon,k) = htrcl(k)
1292 enddo
1293 endif
1294
1295!! --- ... optional spectral band heating rate
1296 if ( lhlwb ) then
1297 do j = 1, nbands
1298 do k = 1, nlay
1299 hlwb(iplon,k,j) = htrb(k,j)
1300 enddo
1301 enddo
1302 endif
1303
1304 endif ! if_top_at_1
1305
1306 enddo lab_do_iplon
1307
1308!...................................
1309 end subroutine rrtmg_lw_run
1310!-----------------------------------
1311
1322 subroutine rlwinit( me, rad_hr_units, inc_minor_gas, ilwcliq, &
1323 isubclw, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr,&
1324 iovr_exp, iovr_exprand, errflg, errmsg )
1325
1326! =================== program usage description =================== !
1327! !
1328! purpose: initialize non-varying module variables, conversion factors,!
1329! and look-up tables. !
1330! !
1331! subprograms called: none !
1332! !
1333! ==================== defination of variables ==================== !
1334! !
1335! inputs: !
1336! me - print control for parallel process !
1337! rad_hr_units - 1 for heating rates in units K/day. 2 for K/s !
1338! inc_minor_gas - flag to turn on/off minor gases in rrtmg !
1339! ilwcliq - liquid cloud optical properties contrl flag !
1340! =0: input cloud opt depth from diagnostic scheme !
1341! >0: input cwp,rew, and other cloud content parameters !
1342! isubclw - sub-column cloud approximation control flag !
1343! =0: no sub-col cld treatment, use grid-mean cld quantities !
1344! =1: mcica sub-col, prescribed seeds to get random numbers !
1345! =2: mcica sub-col, providing array icseed for random numbers!
1346! iovr - clouds vertical overlapping control flag !
1347! =iovr_rand !
1348! =iovr_maxrand !
1349! =iovr_max !
1350! =iovr_dcorr !
1351! =iovr_exp !
1352! =iovr_exprand !
1353! iovr_rand - choice of cloud-overlap: random !
1354! iovr_maxrand - choice of cloud-overlap: maximum random !
1355! iovr_max - choice of cloud-overlap: maximum !
1356! iovr_dcorr - choice of cloud-overlap: decorrelation length !
1357! iovr_exp - choice of cloud-overlap: exponential !
1358! iovr_exprand - choice of cloud-overlap: exponential random !
1359! !
1360! outputs: !
1361! errflg - error flag !
1362! errmsg - error message !
1363! !
1364! ******************************************************************* !
1365! original code description !
1366! !
1367! original version: michael j. iacono; july, 1998 !
1368! first revision for ncar ccm: september, 1998 !
1369! second revision for rrtm_v3.0: september, 2002 !
1370! !
1371! this subroutine performs calculations necessary for the initialization
1372! of the longwave model. lookup tables are computed for use in the lw !
1373! radiative transfer, and input absorption coefficient data for each !
1374! spectral band are reduced from 256 g-point intervals to 140. !
1375! !
1376! ******************************************************************* !
1377! !
1378! definitions: !
1379! arrays for 10000-point look-up tables: !
1380! tau_tbl - clear-sky optical depth (used in cloudy radiative transfer!
1381! exp_tbl - exponential lookup table for tansmittance !
1382! tfn_tbl - tau transition function; i.e. the transition of the Planck!
1383! function from that for the mean layer temperature to that !
1384! for the layer boundary temperature as a function of optical
1385! depth. the "linear in tau" method is used to make the table
1386! !
1387! ******************************************************************* !
1388! !
1389! ====================== end of description block ================= !
1390
1391! --- inputs:
1392 integer, intent(in) :: me, rad_hr_units, ilwcliq, isubclw, iovr, &
1393 iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, &
1394 iovr_exprand
1395 logical, intent(in) :: inc_minor_gas
1396
1397! --- outputs:
1398 character(len=*), intent(out) :: errmsg
1399 integer, intent(out) :: errflg
1400
1401! --- locals:
1402 real (kind=kind_phys), parameter :: expeps = 1.e-20
1403
1404 real (kind=kind_phys) :: tfn, pival, explimit
1405
1406 integer :: i
1407
1408!
1409!===> ... begin here
1410!
1411 ! Initialize error-handling
1412 errflg = 0
1413 errmsg = ''
1414
1415 if ((iovr .ne. iovr_rand) .and. (iovr .ne. iovr_maxrand) .and. &
1416 (iovr .ne. iovr_max) .and. (iovr .ne. iovr_dcorr) .and. &
1417 (iovr .ne. iovr_exp) .and. (iovr .ne. iovr_exprand)) then
1418 errflg = 1
1419 errmsg = 'ERROR(rlwinit): Error in specification of cloud overlap flag'
1420 endif
1421
1422 if (me == 0) then
1423 print *,' - Using AER Longwave Radiation, Version: ', vtaglw
1424
1425 if (inc_minor_gas) then
1426 print *,' --- Include rare gases N2O, CH4, O2, CFCs ', &
1427 & 'absorptions in LW'
1428 else
1429 print *,' --- Rare gases effect is NOT included in LW'
1430 endif
1431
1432 if ( isubclw == 0 ) then
1433 print *,' --- Using standard grid average clouds, no ', &
1434 & 'sub-column clouds approximation applied'
1435 elseif ( isubclw == 1 ) then
1436 print *,' --- Using MCICA sub-colum clouds approximation ', &
1437 & 'with a prescribed sequence of permutaion seeds'
1438 elseif ( isubclw == 2 ) then
1439 print *,' --- Using MCICA sub-colum clouds approximation ', &
1440 & 'with provided input array of permutation seeds'
1441 endif
1442 endif
1443
1445
1446 semiss0(:) = f_one
1447
1450
1451 pival = 2.0 * asin(f_one)
1452 fluxfac = pival * 2.0d4
1453! fluxfac = 62831.85307179586 ! = 2 * pi * 1.0e4
1454
1455 if (rad_hr_units == 1) then
1456! heatfac = 8.4391
1457! heatfac = con_g * 86400. * 1.0e-2 / con_cp ! (in k/day)
1458 heatfac = con_g * 864.0 / con_cp ! (in k/day)
1459 else
1460 heatfac = con_g * 1.0e-2 / con_cp ! (in k/second)
1461 endif
1462
1473
1474 tau_tbl(0) = f_zero
1475 exp_tbl(0) = f_one
1476 tfn_tbl(0) = f_zero
1477
1478 tau_tbl(ntbl) = 1.e10
1479 exp_tbl(ntbl) = expeps
1480 tfn_tbl(ntbl) = f_one
1481
1482 explimit = aint( -log(tiny(exp_tbl(0))) )
1483
1484 do i = 1, ntbl-1
1485!org tfn = float(i) / float(ntbl)
1486!org tau_tbl(i) = bpade * tfn / (f_one - tfn)
1487 tfn = real(i, kind_phys) / real(ntbl-i, kind_phys)
1488 tau_tbl(i) = bpade * tfn
1489 if (tau_tbl(i) >= explimit) then
1490 exp_tbl(i) = expeps
1491 else
1492 exp_tbl(i) = exp( -tau_tbl(i) )
1493 endif
1494
1495 if (tau_tbl(i) < 0.06) then
1496 tfn_tbl(i) = tau_tbl(i) / 6.0
1497 else
1498 tfn_tbl(i) = f_one - 2.0*( (f_one / tau_tbl(i)) &
1499 & - ( exp_tbl(i) / (f_one - exp_tbl(i)) ) )
1500 endif
1501 enddo
1502
1503!...................................
1504 end subroutine rlwinit
1505!-----------------------------------
1506
1507
1530 subroutine cldprop &
1531 & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs
1532 & nlay, nlp1, ipseed, dz, de_lgth, iovr, alpha, ilwcliq, &
1533 & ilwcice, isubclw, cldfmc, taucld & ! --- outputs
1534 & )
1535
1536! =================== program usage description =================== !
1537! !
1538! purpose: compute the cloud optical depth(s) for each cloudy layer !
1539! and g-point interval. !
1540! !
1541! subprograms called: none !
1542! !
1543! ==================== defination of variables ==================== !
1544! !
1545! inputs: -size- !
1546! cfrac - real, layer cloud fraction 0:nlp1 !
1547! ..... for ilwcliq > 0 (prognostic cloud sckeme) - - - !
1548! cliqp - real, layer in-cloud liq water path (g/m**2) nlay !
1549! reliq - real, mean eff radius for liq cloud (micron) nlay !
1550! cicep - real, layer in-cloud ice water path (g/m**2) nlay !
1551! reice - real, mean eff radius for ice cloud (micron) nlay !
1552! cdat1 - real, layer rain drop water path (g/m**2) nlay !
1553! cdat2 - real, effective radius for rain drop (microm) nlay !
1554! cdat3 - real, layer snow flake water path (g/m**2) nlay !
1555! cdat4 - real, effective radius for snow flakes (micron) nlay !
1556! ..... for ilwcliq = 0 (diagnostic cloud sckeme) - - - !
1557! cdat1 - real, input cloud optical depth nlay !
1558! cdat2 - real, layer cloud single scattering albedo nlay !
1559! cdat3 - real, layer cloud asymmetry factor nlay !
1560! cdat4 - real, optional use nlay !
1561! cliqp - not used nlay !
1562! reliq - not used nlay !
1563! cicep - not used nlay !
1564! reice - not used nlay !
1565! !
1566! dz - real, layer thickness (km) nlay !
1567! de_lgth- real, layer cloud decorrelation length (km) 1 !
1568! alpha - real, EXP/ER decorrelation parameter nlay !
1569! nlay - integer, number of vertical layers 1 !
1570! nlp1 - integer, number of vertical levels 1 !
1571! ipseed- permutation seed for generating random numbers (isubclw>0) !
1572! !
1573! outputs: !
1574! cldfmc - real, cloud fraction for each sub-column ngptlw*nlay!
1575! taucld - real, cld opt depth for bands (non-mcica) nbands*nlay!
1576! !
1577! explanation of the method for each value of ilwcliq, and ilwcice. !
1578! set up in module "module_radlw_cntr_para" !
1579! !
1580! ilwcliq=0 : input cloud optical property (tau, ssa, asy). !
1581! (used for diagnostic cloud method) !
1582! ilwcliq>0 : input cloud liq/ice path and effective radius, also !
1583! require the user of 'ilwcice' to specify the method !
1584! used to compute aborption due to water/ice parts. !
1585! ................................................................... !
1586! !
1587! ilwcliq=1: the water droplet effective radius (microns) is input!
1588! and the opt depths due to water clouds are computed !
1589! as in hu and stamnes, j., clim., 6, 728-742, (1993). !
1590! the values for absorption coefficients appropriate for
1591! the spectral bands in rrtm have been obtained for a !
1592! range of effective radii by an averaging procedure !
1593! based on the work of j. pinto (private communication).
1594! linear interpolation is used to get the absorption !
1595! coefficients for the input effective radius. !
1596! !
1597! ilwcice=1: the cloud ice path (g/m2) and ice effective radius !
1598! (microns) are input and the optical depths due to ice!
1599! clouds are computed as in ebert and curry, jgr, 97, !
1600! 3831-3836 (1992). the spectral regions in this work !
1601! have been matched with the spectral bands in rrtm to !
1602! as great an extent as possible: !
1603! e&c 1 ib = 5 rrtm bands 9-16 !
1604! e&c 2 ib = 4 rrtm bands 6-8 !
1605! e&c 3 ib = 3 rrtm bands 3-5 !
1606! e&c 4 ib = 2 rrtm band 2 !
1607! e&c 5 ib = 1 rrtm band 1 !
1608! ilwcice=2: the cloud ice path (g/m2) and ice effective radius !
1609! (microns) are input and the optical depths due to ice!
1610! clouds are computed as in rt code, streamer v3.0 !
1611! (ref: key j., streamer user's guide, cooperative !
1612! institute for meteorological satellite studies, 2001,!
1613! 96 pp.) valid range of values for re are between 5.0 !
1614! and 131.0 micron. !
1615! ilwcice=3: the ice generalized effective size (dge) is input and!
1616! the optical properties, are calculated as in q. fu, !
1617! j. climate, (1998). q. fu provided high resolution !
1618! tales which were appropriately averaged for the bands!
1619! in rrtm_lw. linear interpolation is used to get the !
1620! coeff from the stored tables. valid range of values !
1621! for deg are between 5.0 and 140.0 micron. !
1622! !
1623! other cloud control module variables: !
1624! isubclw =0: standard cloud scheme, no sub-col cloud approximation !
1625! >0: mcica sub-col cloud scheme using ipseed as permutation!
1626! seed for generating rundom numbers !
1627! !
1628! ====================== end of description block ================= !
1629!
1631
1632! --- inputs:
1633 integer, intent(in) :: nlay, nlp1, ipseed, iovr, ilwcliq, ilwcice,&
1634 isubclw
1635
1636 real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac
1637 real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, &
1638 & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz
1639 real (kind=kind_phys), intent(in) :: de_lgth
1640 real (kind=kind_phys), dimension(nlay), intent(in) :: alpha
1641
1642! --- outputs:
1643 real (kind=kind_phys), dimension(ngptlw,nlay),intent(out):: cldfmc
1644 real (kind=kind_phys), dimension(nbands,nlay),intent(out):: taucld
1645
1646! --- locals:
1647 real (kind=kind_phys), dimension(nbands) :: tauliq, tauice
1648 real (kind=kind_phys), dimension(nlay) :: cldf
1649
1650 real (kind=kind_phys) :: dgeice, factor, fint, tauran, tausnw, &
1651 & cldliq, refliq, cldice, refice
1652
1653 logical :: lcloudy(ngptlw,nlay)
1654 integer :: ia, ib, ig, k, index
1655
1656!
1657!===> ... begin here
1658!
1659 do k = 1, nlay
1660 do ib = 1, nbands
1661 taucld(ib,k) = f_zero
1662 enddo
1663 enddo
1664
1665 do k = 1, nlay
1666 do ig = 1, ngptlw
1667 cldfmc(ig,k) = f_zero
1668 enddo
1669 enddo
1670
1677
1678! --- ... compute cloud radiative properties for a cloudy column
1679
1680 lab_if_ilwcliq : if (ilwcliq > 0) then
1681
1682 lab_do_k : do k = 1, nlay
1683 lab_if_cld : if (cfrac(k) > cldmin) then
1684
1685 tauran = absrain * cdat1(k) ! ncar formula
1686!! tausnw = abssnow1 * cdat3(k) ! ncar formula
1687! --- if use fu's formula it needs to be normalized by snow density
1688! !not use snow density = 0.1 g/cm**3 = 0.1 g/(mu * m**2)
1689! use ice density = 0.9167 g/cm**3 = 0.9167 g/(mu * m**2)
1690! factor 1.5396=8/(3*sqrt(3)) converts reff to generalized ice particle size
1691! use newer factor value 1.0315
1692! 1/(0.9167*1.0315) = 1.05756
1693 if (cdat3(k)>f_zero .and. cdat4(k)>10.0_kind_phys) then
1694 tausnw = abssnow0*1.05756*cdat3(k)/cdat4(k) ! fu's formula
1695 else
1696 tausnw = f_zero
1697 endif
1698
1699 cldliq = cliqp(k)
1700 cldice = cicep(k)
1701! refliq = max(2.5e0, min(60.0e0, reliq(k) ))
1702! refice = max(5.0e0, reice(k) )
1703 refliq = reliq(k)
1704 refice = reice(k)
1705
1706! --- ... calculation of absorption coefficients due to water clouds.
1707
1708 if ( cldliq <= f_zero ) then
1709 do ib = 1, nbands
1710 tauliq(ib) = f_zero
1711 enddo
1712 else
1713 if ( ilwcliq == 1 ) then
1714
1715 factor = refliq - 1.5
1716 index = max( 1, min( 57, int( factor ) ))
1717 fint = factor - float(index)
1718
1719 do ib = 1, nbands
1720 tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) &
1721 & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) ))
1722 enddo
1723 endif ! end if_ilwcliq_block
1724 endif ! end if_cldliq_block
1725
1726! --- ... calculation of absorption coefficients due to ice clouds.
1727
1728 if ( cldice <= f_zero ) then
1729 do ib = 1, nbands
1730 tauice(ib) = f_zero
1731 enddo
1732 else
1733
1734! --- ... ebert and curry approach for all particle sizes though somewhat
1735! unjustified for large ice particles
1736
1737 if ( ilwcice == 1 ) then
1738 refice = min(130.0, max(13.0, real(refice) ))
1739
1740 do ib = 1, nbands
1741 ia = ipat(ib) ! eb_&_c band index for ice cloud coeff
1742 tauice(ib) = max(f_zero, cldice*(absice1(1,ia) &
1743 & + absice1(2,ia)/refice) )
1744 enddo
1745
1746! --- ... streamer approach for ice effective radius between 5.0 and 131.0 microns
1747! and ebert and curry approach for ice eff radius greater than 131.0 microns.
1748! no smoothing between the transition of the two methods.
1749
1750 elseif ( ilwcice == 2 ) then
1751
1752 factor = (refice - 2.0) / 3.0
1753 index = max( 1, min( 42, int( factor ) ))
1754 fint = factor - float(index)
1755
1756 do ib = 1, nbands
1757 tauice(ib) = max(f_zero, cldice*(absice2(index,ib) &
1758 & + fint*(absice2(index+1,ib) - absice2(index,ib)) ))
1759 enddo
1760
1761! --- ... fu's approach for ice effective radius between 4.8 and 135 microns
1762! (generalized effective size from 5 to 140 microns)
1763
1764 elseif ( ilwcice == 3 ) then
1765
1766! dgeice = max(5.0, 1.5396*refice) ! v4.4 value
1767 dgeice = max(5.0, 1.0315*refice) ! v4.71 value
1768 factor = (dgeice - 2.0) / 3.0
1769 index = max( 1, min( 45, int( factor ) ))
1770 fint = factor - float(index)
1771
1772 do ib = 1, nbands
1773 tauice(ib) = max(f_zero, cldice*(absice3(index,ib) &
1774 & + fint*(absice3(index+1,ib) - absice3(index,ib)) ))
1775 enddo
1776
1777 endif ! end if_ilwcice_block
1778 endif ! end if_cldice_block
1779
1780 do ib = 1, nbands
1781 taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw
1782 enddo
1783
1784 endif lab_if_cld
1785 enddo lab_do_k
1786
1787 else lab_if_ilwcliq
1788
1789 do k = 1, nlay
1790 if (cfrac(k) > cldmin) then
1791 do ib = 1, nbands
1792 taucld(ib,k) = cdat1(k)
1793 enddo
1794 endif
1795 enddo
1796
1797 endif lab_if_ilwcliq
1798
1801
1802 if ( isubclw > 0 ) then ! mcica sub-col clouds approx
1803 do k = 1, nlay
1804 if ( cfrac(k) < cldmin ) then
1805 cldf(k) = f_zero
1806 else
1807 cldf(k) = cfrac(k)
1808 endif
1809 enddo
1810
1811! --- ... call sub-column cloud generator
1812
1813 call mcica_subcol &
1814! --- inputs:
1815 & ( cldf, nlay, ipseed, dz, de_lgth, alpha, iovr, &
1816! --- output:
1817 & lcloudy &
1818 & )
1819
1820 do k = 1, nlay
1821 do ig = 1, ngptlw
1822 if ( lcloudy(ig,k) ) then
1823 cldfmc(ig,k) = f_one
1824 else
1825 cldfmc(ig,k) = f_zero
1826 endif
1827 enddo
1828 enddo
1829
1830 endif ! end if_isubclw_block
1831
1832 return
1833! ..................................
1834 end subroutine cldprop
1835! ----------------------------------
1836
1847 subroutine mcica_subcol &
1848 & ( cldf, nlay, ipseed, dz, de_lgth, alpha, iovr, & ! --- inputs
1849 & lcloudy & ! --- outputs
1850 & )
1851
1852! ==================== defination of variables ==================== !
1853! !
1854! input variables: size !
1855! cldf - real, layer cloud fraction nlay !
1856! nlay - integer, number of model vertical layers 1 !
1857! ipseed - integer, permute seed for random num generator 1 !
1858! ** note : if the cloud generator is called multiple times, need !
1859! to permute the seed between each call; if between calls !
1860! for lw and sw, use values differ by the number of g-pts. !
1861! dz - real, layer thickness (km) nlay !
1862! de_lgth - real, layer cloud decorrelation length (km) 1 !
1863! alpha - real, EXP/ER decorrelation parameter nlay !
1864! iovr - control flag for cloud overlapping method 1 !
1865! =0:random; =1:maximum/random: =2:maximum; =3:decorr !
1866! =4:exponential; =5:exponential-random !
1867! !
1868! output variables: !
1869! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay!
1870! !
1871! ===================== end of definitions ==================== !
1872
1873 implicit none
1874
1875! --- inputs:
1876 integer, intent(in) :: nlay, ipseed, iovr
1877
1878 real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz
1879 real (kind=kind_phys), intent(in) :: de_lgth
1880 real (kind=kind_phys), dimension(nlay), intent(in) :: alpha
1881
1882! --- outputs:
1883 logical, dimension(ngptlw,nlay), intent(out) :: lcloudy
1884
1885! --- locals:
1886 real (kind=kind_phys) :: cdfunc(ngptlw,nlay), &
1887 & tem1, fac_lcf(nlay), &
1888 & cdfun2(ngptlw,nlay)
1889 real (kind=kind_dbl_prec) rand2d(nlay*ngptlw), rand1d(ngptlw)
1890
1891 type (random_stat) :: stat ! for thread safe random generator
1892
1893 integer :: k, n, k1
1894!
1895!===> ... begin here
1896!
1898
1899 call random_setseed &
1900! --- inputs:
1901 & ( ipseed, &
1902! --- outputs:
1903 & stat &
1904 & )
1905
1910
1911 select case ( iovr )
1912
1913 case( 0 ) ! random overlap, pick a random value at every level
1914
1915 call random_number &
1916! --- inputs: ( none )
1917! --- outputs:
1918 & ( rand2d, stat )
1919
1920 k1 = 0
1921 do n = 1, ngptlw
1922 do k = 1, nlay
1923 k1 = k1 + 1
1924 cdfunc(n,k) = rand2d(k1)
1925 enddo
1926 enddo
1927
1928 case( 1 ) ! max-ran overlap
1929
1930 call random_number &
1931! --- inputs: ( none )
1932! --- outputs:
1933 & ( rand2d, stat )
1934
1935 k1 = 0
1936 do n = 1, ngptlw
1937 do k = 1, nlay
1938 k1 = k1 + 1
1939 cdfunc(n,k) = rand2d(k1)
1940 enddo
1941 enddo
1942
1943! --- first pick a random number for bottom (or top) layer.
1944! then walk up the column: (aer's code)
1945! if layer below is cloudy, use the same rand num in the layer below
1946! if layer below is clear, use a new random number
1947
1948! --- from bottom up
1949 do k = 2, nlay
1950 k1 = k - 1
1951 tem1 = f_one - cldf(k1)
1952
1953 do n = 1, ngptlw
1954 if ( cdfunc(n,k1) > tem1 ) then
1955 cdfunc(n,k) = cdfunc(n,k1)
1956 else
1957 cdfunc(n,k) = cdfunc(n,k) * tem1
1958 endif
1959 enddo
1960 enddo
1961
1962! --- or walk down the column: (if use original author's method)
1963! if layer above is cloudy, use the same rand num in the layer above
1964! if layer above is clear, use a new random number
1965
1966! --- from top down
1967! do k = nlay-1, 1, -1
1968! k1 = k + 1
1969! tem1 = f_one - cldf(k1)
1970
1971! do n = 1, ngptlw
1972! if ( cdfunc(n,k1) > tem1 ) then
1973! cdfunc(n,k) = cdfunc(n,k1)
1974! else
1975! cdfunc(n,k) = cdfunc(n,k) * tem1
1976! endif
1977! enddo
1978! enddo
1979
1980 case( 2 )
1981
1982 call random_number &
1983! --- inputs: ( none )
1984! --- outputs:
1985 & ( rand1d, stat )
1986
1987 do n = 1, ngptlw
1988 tem1 = rand1d(n)
1989
1990 do k = 1, nlay
1991 cdfunc(n,k) = tem1
1992 enddo
1993 enddo
1994
1995 case( 3 ) ! decorrelation length overlap
1996
1997! --- compute overlapping factors based on layer midpoint distances
1998! and decorrelation depths
1999
2000 do k = nlay, 2, -1
2001 fac_lcf(k) = exp( -0.5 * (dz(k)+dz(k-1)) / de_lgth )
2002 enddo
2003
2004! --- setup 2 sets of random numbers
2005
2006 call random_number ( rand2d, stat )
2007
2008 k1 = 0
2009 do k = 1, nlay
2010 do n = 1, ngptlw
2011 k1 = k1 + 1
2012 cdfunc(n,k) = rand2d(k1)
2013 enddo
2014 enddo
2015
2016 call random_number ( rand2d, stat )
2017
2018 k1 = 0
2019 do k = 1, nlay
2020 do n = 1, ngptlw
2021 k1 = k1 + 1
2022 cdfun2(n,k) = rand2d(k1)
2023 enddo
2024 enddo
2025
2026! --- then working from the top down:
2027! if a random number (from an independent set -cdfun2) is smaller then the
2028! scale factor: use the upper layer's number, otherwise use a new random
2029! number (keep the original assigned one).
2030
2031 do k = nlay-1, 1, -1
2032 k1 = k + 1
2033
2034 do n = 1, ngptlw
2035 if ( cdfun2(n,k) <= fac_lcf(k1) ) then
2036 cdfunc(n,k) = cdfunc(n,k1)
2037 endif
2038 enddo
2039 enddo
2040
2041 case( 4:5 ) ! exponential and exponential-random cloud overlap
2042
2043! --- Use previously derived decorrelation parameter, alpha, to specify
2044! the exponenential transition of cloud correlation in the vertical column.
2045!
2046! For exponential cloud overlap, the correlation is applied across layers
2047! without regard to the configuration of clear and cloudy layers.
2048
2049! For exponential-random cloud overlap, a new exponential transition is
2050! performed within each group of adjacent cloudy layers and blocks of
2051! cloudy layers with clear layers between them are correlated randomly.
2052!
2053! NOTE: The code below is identical for case (4) and (5) because the
2054! distinction in the vertical correlation between EXP and ER is already
2055! built into the specification of alpha (in subroutine get_alpha_exper).
2056
2057! --- setup 2 sets of random numbers
2058
2059 call random_number ( rand2d, stat )
2060
2061 k1 = 0
2062 do k = 1, nlay
2063 do n = 1, ngptlw
2064 k1 = k1 + 1
2065 cdfunc(n,k) = rand2d(k1)
2066 enddo
2067 enddo
2068
2069 call random_number ( rand2d, stat )
2070
2071 k1 = 0
2072 do k = 1, nlay
2073 do n = 1, ngptlw
2074 k1 = k1 + 1
2075 cdfun2(n,k) = rand2d(k1)
2076 enddo
2077 enddo
2078
2079! --- then working upward from the surface:
2080! if a random number (from an independent set: cdfun2) is smaller than
2081! alpha, then use the previous layer's number, otherwise use a new random
2082! number (keep the originally assigned one in cdfunc for that layer).
2083
2084 do k = 2, nlay
2085 k1 = k - 1
2086 do n = 1, ngptlw
2087 if ( cdfun2(n,k) < alpha(k) ) then
2088 cdfunc(n,k) = cdfunc(n,k1)
2089 endif
2090 enddo
2091 enddo
2092
2093 end select
2094
2096
2097 do k = 1, nlay
2098 tem1 = f_one - cldf(k)
2099
2100 do n = 1, ngptlw
2101 lcloudy(n,k) = cdfunc(n,k) >= tem1
2102 enddo
2103 enddo
2104
2105 return
2106! ..................................
2107 end subroutine mcica_subcol
2108! ----------------------------------
2109
2151 subroutine setcoef &
2152 & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, & ! --- inputs:
2153 & nlay, nlp1, &
2154 & laytrop,pklay,pklev,jp,jt,jt1, & ! --- outputs:
2155 & rfrate,fac00,fac01,fac10,fac11, &
2156 & selffac,selffrac,indself,forfac,forfrac,indfor, &
2157 & minorfrac,scaleminor,scaleminorn2,indminor &
2158 & )
2159
2160! =================== program usage description =================== !
2161! !
2162! purpose: compute various coefficients needed in radiative transfer !
2163! calculations. !
2164! !
2165! subprograms called: none !
2166! !
2167! ==================== defination of variables ==================== !
2168! !
2169! inputs: -size- !
2170! pavel - real, layer pressures (mb) nlay !
2171! tavel - real, layer temperatures (k) nlay !
2172! tz - real, level (interface) temperatures (k) 0:nlay !
2173! stemp - real, surface ground temperature (k) 1 !
2174! h2ovmr - real, layer w.v. volum mixing ratio (kg/kg) nlay !
2175! colamt - real, column amounts of absorbing gases nlay*maxgas!
2176! 2nd indices range: 1-maxgas, for watervapor, !
2177! carbon dioxide, ozone, nitrous oxide, methane, !
2178! oxigen, carbon monoxide,etc. (molecules/cm**2) !
2179! coldry - real, dry air column amount nlay !
2180! colbrd - real, column amount of broadening gases nlay !
2181! nlay/nlp1 - integer, total number of vertical layers, levels 1 !
2182! !
2183! outputs: !
2184! laytrop - integer, tropopause layer index (unitless) 1 !
2185! pklay - real, integrated planck func at lay temp nbands*0:nlay!
2186! pklev - real, integrated planck func at lev temp nbands*0:nlay!
2187! jp - real, indices of lower reference pressure nlay !
2188! jt, jt1 - real, indices of lower reference temperatures nlay !
2189! rfrate - real, ref ratios of binary species param nlay*nrates*2!
2190! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2!
2191! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer !
2192! facij - real, factors multiply the reference ks, nlay !
2193! i,j=0/1 for lower/higher of the 2 appropriate !
2194! temperatures and altitudes. !
2195! selffac - real, scale factor for w. v. self-continuum nlay !
2196! equals (w. v. density)/(atmospheric density !
2197! at 296k and 1013 mb) !
2198! selffrac - real, factor for temperature interpolation of nlay !
2199! reference w. v. self-continuum data !
2200! indself - integer, index of lower ref temp for selffac nlay !
2201! forfac - real, scale factor for w. v. foreign-continuum nlay !
2202! forfrac - real, factor for temperature interpolation of nlay !
2203! reference w.v. foreign-continuum data !
2204! indfor - integer, index of lower ref temp for forfac nlay !
2205! minorfrac - real, factor for minor gases nlay !
2206! scaleminor,scaleminorn2 !
2207! - real, scale factors for minor gases nlay !
2208! indminor - integer, index of lower ref temp for minor gases nlay !
2209! !
2210! ====================== end of definitions =================== !
2211
2212! --- inputs:
2213 integer, intent(in) :: nlay, nlp1
2214
2215 real (kind=kind_phys), dimension(nlay,maxgas),intent(in):: colamt
2216 real (kind=kind_phys), dimension(0:nlay), intent(in):: tz
2217
2218 real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, &
2219 & tavel, h2ovmr, coldry, colbrd
2220
2221 real (kind=kind_phys), intent(in) :: stemp
2222
2223! --- outputs:
2224 integer, dimension(nlay), intent(out) :: jp, jt, jt1, indself, &
2225 & indfor, indminor
2226
2227 integer, intent(out) :: laytrop
2228
2229 real (kind=kind_phys), dimension(nlay,nrates,2), intent(out) :: &
2230 & rfrate
2231 real (kind=kind_phys), dimension(nbands,0:nlay), intent(out) :: &
2232 & pklev, pklay
2233
2234 real (kind=kind_phys), dimension(nlay), intent(out) :: &
2235 & fac00, fac01, fac10, fac11, selffac, selffrac, forfac, &
2236 & forfrac, minorfrac, scaleminor, scaleminorn2
2237
2238! --- locals:
2239 real (kind=kind_phys) :: tlvlfr, tlyrfr, plog, fp, ft, ft1, &
2240 & tem1, tem2
2241
2242 integer :: i, k, jp1, indlev, indlay
2243!
2244!===> ... begin here
2245!
2250
2251 indlay = min(180, max(1, int(stemp-159.0) ))
2252 indlev = min(180, max(1, int(tz(0)-159.0) ))
2253 tlyrfr = stemp - int(stemp)
2254 tlvlfr = tz(0) - int(tz(0))
2255 do i = 1, nbands
2256 tem1 = totplnk(indlay+1,i) - totplnk(indlay,i)
2257 tem2 = totplnk(indlev+1,i) - totplnk(indlev,i)
2258 pklay(i,0) = delwave(i) * (totplnk(indlay,i) + tlyrfr*tem1)
2259 pklev(i,0) = delwave(i) * (totplnk(indlev,i) + tlvlfr*tem2)
2260 enddo
2261
2262! --- ... begin layer loop
2265
2266 laytrop = 0
2267
2268 do k = 1, nlay
2269
2270 indlay = min(180, max(1, int(tavel(k)-159.0) ))
2271 tlyrfr = tavel(k) - int(tavel(k))
2272
2273 indlev = min(180, max(1, int(tz(k)-159.0) ))
2274 tlvlfr = tz(k) - int(tz(k))
2275
2276! --- ... begin spectral band loop
2277
2278 do i = 1, nbands
2279 pklay(i,k) = delwave(i) * (totplnk(indlay,i) + tlyrfr &
2280 & * (totplnk(indlay+1,i) - totplnk(indlay,i)) )
2281 pklev(i,k) = delwave(i) * (totplnk(indlev,i) + tlvlfr &
2282 & * (totplnk(indlev+1,i) - totplnk(indlev,i)) )
2283 enddo
2284
2289
2290 plog = log(pavel(k))
2291 jp(k)= max(1, min(58, int(36.0 - 5.0*(plog+0.04)) ))
2292 jp1 = jp(k) + 1
2293! --- ... limit pressure extrapolation at the top
2294 fp = max(f_zero, min(f_one, 5.0*(preflog(jp(k))-plog) ))
2295!org fp = 5.0 * (preflog(jp(k)) - plog)
2296
2304
2305 tem1 = (tavel(k)-tref(jp(k))) / 15.0
2306 tem2 = (tavel(k)-tref(jp1 )) / 15.0
2307 jt(k) = max(1, min(4, int(3.0 + tem1) ))
2308 jt1(k) = max(1, min(4, int(3.0 + tem2) ))
2309! --- ... restrict extrapolation ranges by limiting abs(det t) < 37.5 deg
2310 ft = max(-0.5, min(1.5, tem1 - float(jt(k) - 3) ))
2311 ft1 = max(-0.5, min(1.5, tem2 - float(jt1(k) - 3) ))
2312!org ft = tem1 - float(jt (k) - 3)
2313!org ft1 = tem2 - float(jt1(k) - 3)
2314
2321
2322 tem1 = f_one - fp
2323 fac10(k) = tem1 * ft
2324 fac00(k) = tem1 * (f_one - ft)
2325 fac11(k) = fp * ft1
2326 fac01(k) = fp * (f_one - ft1)
2327
2328 forfac(k) = pavel(k)*stpfac / (tavel(k)*(1.0 + h2ovmr(k)))
2329 selffac(k) = h2ovmr(k) * forfac(k)
2330
2333
2334 scaleminor(k) = pavel(k) / tavel(k)
2335 scaleminorn2(k) = (pavel(k) / tavel(k)) &
2336 & * (colbrd(k)/(coldry(k) + colamt(k,1)))
2337 tem1 = (tavel(k) - 180.8) / 7.2
2338 indminor(k) = min(18, max(1, int(tem1)))
2339 minorfrac(k) = tem1 - float(indminor(k))
2340
2343
2344 if (plog > 4.56) then
2345
2346 laytrop = laytrop + 1
2347
2348 tem1 = (332.0 - tavel(k)) / 36.0
2349 indfor(k) = min(2, max(1, int(tem1)))
2350 forfrac(k) = tem1 - float(indfor(k))
2351
2354
2355 tem1 = (tavel(k) - 188.0) / 7.2
2356 indself(k) = min(9, max(1, int(tem1)-7))
2357 selffrac(k) = tem1 - float(indself(k) + 7)
2358
2361
2362 rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k))
2363 rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1)
2364
2365 rfrate(k,2,1) = chi_mls(1,jp(k)) / chi_mls(3,jp(k))
2366 rfrate(k,2,2) = chi_mls(1,jp(k)+1) / chi_mls(3,jp(k)+1)
2367
2368 rfrate(k,3,1) = chi_mls(1,jp(k)) / chi_mls(4,jp(k))
2369 rfrate(k,3,2) = chi_mls(1,jp(k)+1) / chi_mls(4,jp(k)+1)
2370
2371 rfrate(k,4,1) = chi_mls(1,jp(k)) / chi_mls(6,jp(k))
2372 rfrate(k,4,2) = chi_mls(1,jp(k)+1) / chi_mls(6,jp(k)+1)
2373
2374 rfrate(k,5,1) = chi_mls(4,jp(k)) / chi_mls(2,jp(k))
2375 rfrate(k,5,2) = chi_mls(4,jp(k)+1) / chi_mls(2,jp(k)+1)
2376
2377 else
2378
2379 tem1 = (tavel(k) - 188.0) / 36.0
2380 indfor(k) = 3
2381 forfrac(k) = tem1 - f_one
2382
2383 indself(k) = 0
2384 selffrac(k) = f_zero
2385
2388
2389 rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k))
2390 rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1)
2391
2392 rfrate(k,6,1) = chi_mls(3,jp(k)) / chi_mls(2,jp(k))
2393 rfrate(k,6,2) = chi_mls(3,jp(k)+1) / chi_mls(2,jp(k)+1)
2394
2395 endif
2396
2398
2399 selffac(k) = colamt(k,1) * selffac(k)
2400 forfac(k) = colamt(k,1) * forfac(k)
2401
2402 enddo ! end do_k layer loop
2403
2404 return
2405! ..................................
2406 end subroutine setcoef
2407! ----------------------------------
2408
2444! ----------------------------------
2445 subroutine rtrn &
2446 & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & ! --- inputs
2447 & fracs,secdif, nlay,nlp1, &
2448 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs
2449 & )
2450
2451! =================== program usage description =================== !
2452! !
2453! purpose: compute the upward/downward radiative fluxes, and heating !
2454! rates for both clear or cloudy atmosphere. clouds are assumed as !
2455! randomly overlaping in a vertical colum. !
2456! !
2457! subprograms called: none !
2458! !
2459! ==================== defination of variables ==================== !
2460! !
2461! inputs: -size- !
2462! semiss - real, lw surface emissivity nbands!
2463! delp - real, layer pressure thickness (mb) nlay !
2464! cldfrc - real, layer cloud fraction 0:nlp1 !
2465! taucld - real, layer cloud opt depth nbands,nlay!
2466! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay!
2467! pklay - real, integrated planck func at lay temp nbands*0:nlay!
2468! pklev - real, integrated planck func at lev temp nbands*0:nlay!
2469! fracs - real, planck fractions ngptlw,nlay!
2470! secdif - real, secant of diffusivity angle nbands!
2471! nlay - integer, number of vertical layers 1 !
2472! nlp1 - integer, number of vertical levels (interfaces) 1 !
2473! !
2474! outputs: !
2475! totuflux- real, total sky upward flux (w/m2) 0:nlay !
2476! totdflux- real, total sky downward flux (w/m2) 0:nlay !
2477! htr - real, total sky heating rate (k/sec or k/day) nlay !
2478! totuclfl- real, clear sky upward flux (w/m2) 0:nlay !
2479! totdclfl- real, clear sky downward flux (w/m2) 0:nlay !
2480! htrcl - real, clear sky heating rate (k/sec or k/day) nlay !
2481! htrb - real, spectral band lw heating rate (k/day) nlay*nbands!
2482! !
2483! module veriables: !
2484! ngb - integer, band index for each g-value ngptlw!
2485! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 !
2486! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 !
2487! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 !
2488! bpade - real, pade approx constant (1/0.278) 1 !
2489! wtdiff - real, weight for radiance to flux conversion 1 !
2490! ntbl - integer, dimension of look-up tables 1 !
2491! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl !
2492! exp_tbl - real, transmittance lookup table 0:ntbl !
2493! tfn_tbl - real, tau transition function 0:ntbl !
2494! !
2495! local variables: !
2496! itgas - integer, index for gases contribution look-up table 1 !
2497! ittot - integer, index for gases plus clouds look-up table 1 !
2498! reflct - real, surface reflectance 1 !
2499! atrgas - real, gaseous absorptivity 1 !
2500! atrtot - real, gaseous and cloud absorptivity 1 !
2501! odcld - real, cloud optical depth 1 !
2502! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay !
2503! odepth - real, optical depth of gaseous only 1 !
2504! odtot - real, optical depth of gas and cloud 1 !
2505! gasfac - real, gas-only pade factor, used for planck fn 1 !
2506! totfac - real, gas+cld pade factor, used for planck fn 1 !
2507! bbdgas - real, gas-only planck function for downward rt 1 !
2508! bbugas - real, gas-only planck function for upward rt 1 !
2509! bbdtot - real, gas and cloud planck function for downward rt 1 !
2510! bbutot - real, gas and cloud planck function for upward rt 1 !
2511! gassrcu- real, upwd source radiance due to gas only nlay!
2512! totsrcu- real, upwd source radiance due to gas+cld nlay!
2513! gassrcd- real, dnwd source radiance due to gas only 1 !
2514! totsrcd- real, dnwd source radiance due to gas+cld 1 !
2515! radtotu- real, spectrally summed total sky upwd radiance 1 !
2516! radclru- real, spectrally summed clear sky upwd radiance 1 !
2517! radtotd- real, spectrally summed total sky dnwd radiance 1 !
2518! radclrd- real, spectrally summed clear sky dnwd radiance 1 !
2519! toturad- real, total sky upward radiance by layer 0:nlay*nbands!
2520! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands!
2521! totdrad- real, total sky downward radiance by layer 0:nlay*nbands!
2522! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands!
2523! fnet - real, net longwave flux (w/m2) 0:nlay !
2524! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay !
2525! !
2526! !
2527! ******************************************************************* !
2528! original code description !
2529! !
2530! original version: e. j. mlawer, et al. rrtm_v3.0 !
2531! revision for gcms: michael j. iacono; october, 2002 !
2532! revision for f90: michael j. iacono; june, 2006 !
2533! !
2534! this program calculates the upward fluxes, downward fluxes, and !
2535! heating rates for an arbitrary clear or cloudy atmosphere. the input !
2536! to this program is the atmospheric profile, all Planck function !
2537! information, and the cloud fraction by layer. a variable diffusivity!
2538! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 !
2539! use a value for secdif that varies from 1.50 to 1.80 as a function !
2540! of the column water vapor, and other bands use a value of 1.66. the !
2541! gaussian weight appropriate to this angle (wtdiff=0.5) is applied !
2542! here. note that use of the emissivity angle for the flux integration!
2543! can cause errors of 1 to 4 W/m2 within cloudy layers. !
2544! clouds are treated with a random cloud overlap method. !
2545! !
2546! ******************************************************************* !
2547! ====================== end of description block ================= !
2548
2549! --- inputs:
2550 integer, intent(in) :: nlay, nlp1
2551
2552 real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc
2553 real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, &
2554 & secdif
2555 real (kind=kind_phys), dimension(nlay), intent(in) :: delp
2556
2557 real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld
2558 real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, &
2559 & tautot
2560
2561 real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: &
2562 & pklev, pklay
2563
2564! --- outputs:
2565 real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl
2566
2567 real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb
2568
2569 real (kind=kind_phys), dimension(0:nlay), intent(out) :: &
2570 & totuflux, totdflux, totuclfl, totdclfl
2571
2572! --- locals:
2573 real (kind=kind_phys), parameter :: rec_6 = 0.166667
2574
2575 real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, &
2576 & clrdrad, toturad, totdrad
2577
2578 real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, &
2579 & trngas, efclrfr, rfdelp
2580 real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc
2581
2582 real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, &
2583 & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, &
2584 & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, &
2585 & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, &
2586 & clfr, trng, gasu
2587
2588 integer :: ittot, itgas, ib, ig, k
2589!
2590!===> ... begin here
2591!
2592 do ib = 1, nbands
2593 do k = 0, nlay
2594 toturad(k,ib) = f_zero
2595 totdrad(k,ib) = f_zero
2596 clrurad(k,ib) = f_zero
2597 clrdrad(k,ib) = f_zero
2598 enddo
2599 enddo
2600
2601 do k = 0, nlay
2602 totuflux(k) = f_zero
2603 totdflux(k) = f_zero
2604 totuclfl(k) = f_zero
2605 totdclfl(k) = f_zero
2606 enddo
2607
2608! --- ... loop over all g-points
2609
2610 do ig = 1, ngptlw
2611 ib = ngb(ig)
2612
2613 radtotd = f_zero
2614 radclrd = f_zero
2615
2617
2618 do k = nlay, 1, -1
2619
2620!!\n - clear sky, gases contribution
2621
2622 odepth = max( f_zero, secdif(ib)*tautot(ig,k) )
2623 if (odepth <= 0.06) then
2624 atrgas = odepth - 0.5*odepth*odepth
2625 trng = f_one - atrgas
2626 gasfac = rec_6 * odepth
2627 else
2628 tblind = odepth / (bpade + odepth)
2629 itgas = tblint*tblind + 0.5
2630 trng = exp_tbl(itgas)
2631 atrgas = f_one - trng
2632 gasfac = tfn_tbl(itgas)
2633 odepth = tau_tbl(itgas)
2634 endif
2635
2636 plfrac = fracs(ig,k)
2637 blay = pklay(ib,k)
2638
2639 dplnku = pklev(ib,k ) - blay
2640 dplnkd = pklev(ib,k-1) - blay
2641 bbdgas = plfrac * (blay + dplnkd*gasfac)
2642 bbugas = plfrac * (blay + dplnku*gasfac)
2643 gassrcd= bbdgas * atrgas
2644 gassrcu(k)= bbugas * atrgas
2645 trngas(k) = trng
2646
2647!!\n - total sky, gases+clouds contribution
2648
2649 clfr = cldfrc(k)
2650 if (clfr >= eps) then
2651!!\n - cloudy layer
2652
2653 odcld = secdif(ib) * taucld(ib,k)
2654 efclrfr(k) = f_one-(f_one - exp(-odcld))*clfr
2655 odtot = odepth + odcld
2656 if (odtot < 0.06) then
2657 totfac = rec_6 * odtot
2658 atrtot = odtot - 0.5*odtot*odtot
2659 else
2660 tblind = odtot / (bpade + odtot)
2661 ittot = tblint*tblind + 0.5
2662 totfac = tfn_tbl(ittot)
2663 atrtot = f_one - exp_tbl(ittot)
2664 endif
2665
2666 bbdtot = plfrac * (blay + dplnkd*totfac)
2667 bbutot = plfrac * (blay + dplnku*totfac)
2668 totsrcd= bbdtot * atrtot
2669 totsrcu(k)= bbutot * atrtot
2670
2671! --- ... total sky radiance
2672 radtotd = radtotd*trng*efclrfr(k) + gassrcd &
2673 & + clfr*(totsrcd - gassrcd)
2674 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
2675
2676! --- ... clear sky radiance
2677 radclrd = radclrd*trng + gassrcd
2678 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
2679
2680 else
2681! --- ... clear layer
2682
2683! --- ... total sky radiance
2684 radtotd = radtotd*trng + gassrcd
2685 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
2686
2687! --- ... clear sky radiance
2688 radclrd = radclrd*trng + gassrcd
2689 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
2690
2691 endif ! end if_clfr_block
2692
2693 enddo ! end do_k_loop
2694
2698
2699! note: spectral and Lambertian reflection are identical for the
2700! diffusivity angle flux integration used here.
2701
2702 reflct = f_one - semiss(ib)
2703 rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0)
2704
2706 radtotu = rad0 + reflct*radtotd
2707 toturad(0,ib) = toturad(0,ib) + radtotu
2708
2710 radclru = rad0 + reflct*radclrd
2711 clrurad(0,ib) = clrurad(0,ib) + radclru
2712
2714
2715 do k = 1, nlay
2716 clfr = cldfrc(k)
2717 trng = trngas(k)
2718 gasu = gassrcu(k)
2719
2720 if (clfr >= eps) then
2721! --- ... cloudy layer
2722
2723! --- ... total sky radiance
2724 radtotu = radtotu*trng*efclrfr(k) + gasu &
2725 & + clfr*(totsrcu(k) - gasu)
2726 toturad(k,ib) = toturad(k,ib) + radtotu
2727
2728! --- ... clear sky radiance
2729 radclru = radclru*trng + gasu
2730 clrurad(k,ib) = clrurad(k,ib) + radclru
2731
2732 else
2733! --- ... clear layer
2734
2735! --- ... total sky radiance
2736 radtotu = radtotu*trng + gasu
2737 toturad(k,ib) = toturad(k,ib) + radtotu
2738
2739! --- ... clear sky radiance
2740 radclru = radclru*trng + gasu
2741 clrurad(k,ib) = clrurad(k,ib) + radclru
2742
2743 endif ! end if_clfr_block
2744
2745 enddo ! end do_k_loop
2746
2747 enddo ! end do_ig_loop
2748
2751
2752 flxfac = wtdiff * fluxfac
2753
2754 do k = 0, nlay
2755 do ib = 1, nbands
2756 totuflux(k) = totuflux(k) + toturad(k,ib)
2757 totdflux(k) = totdflux(k) + totdrad(k,ib)
2758 totuclfl(k) = totuclfl(k) + clrurad(k,ib)
2759 totdclfl(k) = totdclfl(k) + clrdrad(k,ib)
2760 enddo
2761
2762 totuflux(k) = totuflux(k) * flxfac
2763 totdflux(k) = totdflux(k) * flxfac
2764 totuclfl(k) = totuclfl(k) * flxfac
2765 totdclfl(k) = totdclfl(k) * flxfac
2766 enddo
2767
2768! --- ... calculate net fluxes and heating rates
2769 fnet(0) = totuflux(0) - totdflux(0)
2770
2771 do k = 1, nlay
2772 rfdelp(k) = heatfac / delp(k)
2773 fnet(k) = totuflux(k) - totdflux(k)
2774 htr(k) = (fnet(k-1) - fnet(k)) * rfdelp(k)
2775 enddo
2776
2777!! --- ... optional clear sky heating rates
2778 if ( lhlw0 ) then
2779 fnetc(0) = totuclfl(0) - totdclfl(0)
2780
2781 do k = 1, nlay
2782 fnetc(k) = totuclfl(k) - totdclfl(k)
2783 htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k)
2784 enddo
2785 endif
2786
2787!! --- ... optional spectral band heating rates
2788 if ( lhlwb ) then
2789 do ib = 1, nbands
2790 fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac
2791
2792 do k = 1, nlay
2793 fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac
2794 htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k)
2795 enddo
2796 enddo
2797 endif
2798
2799! ..................................
2800 end subroutine rtrn
2801! ----------------------------------
2802
2803
2827! ----------------------------------
2828 subroutine rtrnmr &
2829 & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, &! --- inputs
2830 & fracs,secdif, nlay,nlp1, &
2831 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs:
2832 & )
2833
2834! =================== program usage description =================== !
2835! !
2836! purpose: compute the upward/downward radiative fluxes, and heating !
2837! rates for both clear or cloudy atmosphere. clouds are assumed as in !
2838! maximum-randomly overlaping in a vertical colum. !
2839! !
2840! subprograms called: none !
2841! !
2842! ==================== defination of variables ==================== !
2843! !
2844! inputs: -size- !
2845! semiss - real, lw surface emissivity nbands!
2846! delp - real, layer pressure thickness (mb) nlay !
2847! cldfrc - real, layer cloud fraction 0:nlp1 !
2848! taucld - real, layer cloud opt depth nbands,nlay!
2849! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay!
2850! pklay - real, integrated planck func at lay temp nbands*0:nlay!
2851! pklev - real, integrated planck func at lev temp nbands*0:nlay!
2852! fracs - real, planck fractions ngptlw,nlay!
2853! secdif - real, secant of diffusivity angle nbands!
2854! nlay - integer, number of vertical layers 1 !
2855! nlp1 - integer, number of vertical levels (interfaces) 1 !
2856! !
2857! outputs: !
2858! totuflux- real, total sky upward flux (w/m2) 0:nlay !
2859! totdflux- real, total sky downward flux (w/m2) 0:nlay !
2860! htr - real, total sky heating rate (k/sec or k/day) nlay !
2861! totuclfl- real, clear sky upward flux (w/m2) 0:nlay !
2862! totdclfl- real, clear sky downward flux (w/m2) 0:nlay !
2863! htrcl - real, clear sky heating rate (k/sec or k/day) nlay !
2864! htrb - real, spectral band lw heating rate (k/day) nlay*nbands!
2865! !
2866! module veriables: !
2867! ngb - integer, band index for each g-value ngptlw!
2868! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 !
2869! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 !
2870! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 !
2871! bpade - real, pade approx constant (1/0.278) 1 !
2872! wtdiff - real, weight for radiance to flux conversion 1 !
2873! ntbl - integer, dimension of look-up tables 1 !
2874! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl !
2875! exp_tbl - real, transmittance lookup table 0:ntbl !
2876! tfn_tbl - real, tau transition function 0:ntbl !
2877! !
2878! local variables: !
2879! itgas - integer, index for gases contribution look-up table 1 !
2880! ittot - integer, index for gases plus clouds look-up table 1 !
2881! reflct - real, surface reflectance 1 !
2882! atrgas - real, gaseous absorptivity 1 !
2883! atrtot - real, gaseous and cloud absorptivity 1 !
2884! odcld - real, cloud optical depth 1 !
2885! odepth - real, optical depth of gaseous only 1 !
2886! odtot - real, optical depth of gas and cloud 1 !
2887! gasfac - real, gas-only pade factor, used for planck fn 1 !
2888! totfac - real, gas+cld pade factor, used for planck fn 1 !
2889! bbdgas - real, gas-only planck function for downward rt 1 !
2890! bbugas - real, gas-only planck function for upward rt 1 !
2891! bbdtot - real, gas and cloud planck function for downward rt 1 !
2892! bbutot - real, gas and cloud planck function for upward rt 1 !
2893! gassrcu- real, upwd source radiance due to gas only nlay!
2894! totsrcu- real, upwd source radiance due to gas + cld nlay!
2895! gassrcd- real, dnwd source radiance due to gas only 1 !
2896! totsrcd- real, dnwd source radiance due to gas + cld 1 !
2897! radtotu- real, spectrally summed total sky upwd radiance 1 !
2898! radclru- real, spectrally summed clear sky upwd radiance 1 !
2899! radtotd- real, spectrally summed total sky dnwd radiance 1 !
2900! radclrd- real, spectrally summed clear sky dnwd radiance 1 !
2901! toturad- real, total sky upward radiance by layer 0:nlay*nbands!
2902! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands!
2903! totdrad- real, total sky downward radiance by layer 0:nlay*nbands!
2904! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands!
2905! fnet - real, net longwave flux (w/m2) 0:nlay !
2906! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay !
2907! !
2908! !
2909! ******************************************************************* !
2910! original code description !
2911! !
2912! original version: e. j. mlawer, et al. rrtm_v3.0 !
2913! revision for gcms: michael j. iacono; october, 2002 !
2914! revision for f90: michael j. iacono; june, 2006 !
2915! !
2916! this program calculates the upward fluxes, downward fluxes, and !
2917! heating rates for an arbitrary clear or cloudy atmosphere. the input !
2918! to this program is the atmospheric profile, all Planck function !
2919! information, and the cloud fraction by layer. a variable diffusivity!
2920! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 !
2921! use a value for secdif that varies from 1.50 to 1.80 as a function !
2922! of the column water vapor, and other bands use a value of 1.66. the !
2923! gaussian weight appropriate to this angle (wtdiff=0.5) is applied !
2924! here. note that use of the emissivity angle for the flux integration!
2925! can cause errors of 1 to 4 W/m2 within cloudy layers. !
2926! clouds are treated with a maximum-random cloud overlap method. !
2927! !
2928! ******************************************************************* !
2929! ====================== end of description block ================= !
2930
2931! --- inputs:
2932 integer, intent(in) :: nlay, nlp1
2933
2934 real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc
2935 real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, &
2936 & secdif
2937 real (kind=kind_phys), dimension(nlay), intent(in) :: delp
2938
2939 real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld
2940 real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, &
2941 & tautot
2942
2943 real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: &
2944 & pklev, pklay
2945
2946! --- outputs:
2947 real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl
2948
2949 real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb
2950
2951 real (kind=kind_phys), dimension(0:nlay), intent(out) :: &
2952 & totuflux, totdflux, totuclfl, totdclfl
2953
2954! --- locals:
2955 real (kind=kind_phys), parameter :: rec_6 = 0.166667
2956
2957 real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, &
2958 & clrdrad, toturad, totdrad
2959
2960 real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, &
2961 & trngas, trntot, rfdelp
2962 real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc
2963
2964 real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, &
2965 & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, &
2966 & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, &
2967 & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, rad, &
2968 & totradd, clrradd, totradu, clrradu, fmax, fmin, rat1, rat2,&
2969 & radmod, clfr, trng, trnt, gasu, totu
2970
2971 integer :: ittot, itgas, ib, ig, k
2972
2973! dimensions for cloud overlap adjustment
2974 real (kind=kind_phys), dimension(nlp1) :: faccld1u, faccld2u, &
2975 & facclr1u, facclr2u, faccmb1u, faccmb2u
2976 real (kind=kind_phys), dimension(0:nlay) :: faccld1d, faccld2d, &
2977 & facclr1d, facclr2d, faccmb1d, faccmb2d
2978
2979 logical :: lstcldu(nlay), lstcldd(nlay)
2980!
2981!===> ... begin here
2982!
2983 do k = 1, nlp1
2984 faccld1u(k) = f_zero
2985 faccld2u(k) = f_zero
2986 facclr1u(k) = f_zero
2987 facclr2u(k) = f_zero
2988 faccmb1u(k) = f_zero
2989 faccmb2u(k) = f_zero
2990 enddo
2991
2992 lstcldu(1) = cldfrc(1) > eps
2993 rat1 = f_zero
2994 rat2 = f_zero
2995
2996 do k = 1, nlay-1
2997
2998 lstcldu(k+1) = cldfrc(k+1)>eps .and. cldfrc(k)<=eps
2999
3000 if (cldfrc(k) > eps) then
3001
3003
3004 if (cldfrc(k+1) >= cldfrc(k)) then
3005 if (lstcldu(k)) then
3006 if (cldfrc(k) < f_one) then
3007 facclr2u(k+1) = (cldfrc(k+1) - cldfrc(k)) &
3008 & / (f_one - cldfrc(k))
3009 endif
3010 facclr2u(k) = f_zero
3011 faccld2u(k) = f_zero
3012 else
3013 fmax = max(cldfrc(k), cldfrc(k-1))
3014 if (cldfrc(k+1) > fmax) then
3015 facclr1u(k+1) = rat2
3016 facclr2u(k+1) = (cldfrc(k+1) - fmax)/(f_one - fmax)
3017 elseif (cldfrc(k+1) < fmax) then
3018 facclr1u(k+1) = (cldfrc(k+1) - cldfrc(k)) &
3019 & / (cldfrc(k-1) - cldfrc(k))
3020 else
3021 facclr1u(k+1) = rat2
3022 endif
3023 endif
3024
3025 if (facclr1u(k+1)>f_zero .or. facclr2u(k+1)>f_zero) then
3026 rat1 = f_one
3027 rat2 = f_zero
3028 else
3029 rat1 = f_zero
3030 rat2 = f_zero
3031 endif
3032 else
3033 if (lstcldu(k)) then
3034 faccld2u(k+1) = (cldfrc(k) - cldfrc(k+1)) / cldfrc(k)
3035 facclr2u(k) = f_zero
3036 faccld2u(k) = f_zero
3037 else
3038 fmin = min(cldfrc(k), cldfrc(k-1))
3039 if (cldfrc(k+1) <= fmin) then
3040 faccld1u(k+1) = rat1
3041 faccld2u(k+1) = (fmin - cldfrc(k+1)) / fmin
3042 else
3043 faccld1u(k+1) = (cldfrc(k) - cldfrc(k+1)) &
3044 & / (cldfrc(k) - fmin)
3045 endif
3046 endif
3047
3048 if (faccld1u(k+1)>f_zero .or. faccld2u(k+1)>f_zero) then
3049 rat1 = f_zero
3050 rat2 = f_one
3051 else
3052 rat1 = f_zero
3053 rat2 = f_zero
3054 endif
3055 endif
3056
3057 faccmb1u(k+1) = facclr1u(k+1) * faccld2u(k) * cldfrc(k-1)
3058 faccmb2u(k+1) = faccld1u(k+1) * facclr2u(k) &
3059 & * (f_one - cldfrc(k-1))
3060 endif
3061
3062 enddo
3063
3064 do k = 0, nlay
3065 faccld1d(k) = f_zero
3066 faccld2d(k) = f_zero
3067 facclr1d(k) = f_zero
3068 facclr2d(k) = f_zero
3069 faccmb1d(k) = f_zero
3070 faccmb2d(k) = f_zero
3071 enddo
3072
3073 lstcldd(nlay) = cldfrc(nlay) > eps
3074 rat1 = f_zero
3075 rat2 = f_zero
3076
3077 do k = nlay, 2, -1
3078
3079 lstcldd(k-1) = cldfrc(k-1) > eps .and. cldfrc(k)<=eps
3080
3081 if (cldfrc(k) > eps) then
3082
3083 if (cldfrc(k-1) >= cldfrc(k)) then
3084 if (lstcldd(k)) then
3085 if (cldfrc(k) < f_one) then
3086 facclr2d(k-1) = (cldfrc(k-1) - cldfrc(k)) &
3087 & / (f_one - cldfrc(k))
3088 endif
3089
3090 facclr2d(k) = f_zero
3091 faccld2d(k) = f_zero
3092 else
3093 fmax = max(cldfrc(k), cldfrc(k+1))
3094
3095 if (cldfrc(k-1) > fmax) then
3096 facclr1d(k-1) = rat2
3097 facclr2d(k-1) = (cldfrc(k-1) - fmax) / (f_one - fmax)
3098 elseif (cldfrc(k-1) < fmax) then
3099 facclr1d(k-1) = (cldfrc(k-1) - cldfrc(k)) &
3100 & / (cldfrc(k+1) - cldfrc(k))
3101 else
3102 facclr1d(k-1) = rat2
3103 endif
3104 endif
3105
3106 if (facclr1d(k-1)>f_zero .or. facclr2d(k-1)>f_zero) then
3107 rat1 = f_one
3108 rat2 = f_zero
3109 else
3110 rat1 = f_zero
3111 rat2 = f_zero
3112 endif
3113 else
3114 if (lstcldd(k)) then
3115 faccld2d(k-1) = (cldfrc(k) - cldfrc(k-1)) / cldfrc(k)
3116 facclr2d(k) = f_zero
3117 faccld2d(k) = f_zero
3118 else
3119 fmin = min(cldfrc(k), cldfrc(k+1))
3120
3121 if (cldfrc(k-1) <= fmin) then
3122 faccld1d(k-1) = rat1
3123 faccld2d(k-1) = (fmin - cldfrc(k-1)) / fmin
3124 else
3125 faccld1d(k-1) = (cldfrc(k) - cldfrc(k-1)) &
3126 & / (cldfrc(k) - fmin)
3127 endif
3128 endif
3129
3130 if (faccld1d(k-1)>f_zero .or. faccld2d(k-1)>f_zero) then
3131 rat1 = f_zero
3132 rat2 = f_one
3133 else
3134 rat1 = f_zero
3135 rat2 = f_zero
3136 endif
3137 endif
3138
3139 faccmb1d(k-1) = facclr1d(k-1) * faccld2d(k) * cldfrc(k+1)
3140 faccmb2d(k-1) = faccld1d(k-1) * facclr2d(k) &
3141 & * (f_one - cldfrc(k+1))
3142 endif
3143
3144 enddo
3145
3147
3148 do ib = 1, nbands
3149 do k = 0, nlay
3150 toturad(k,ib) = f_zero
3151 totdrad(k,ib) = f_zero
3152 clrurad(k,ib) = f_zero
3153 clrdrad(k,ib) = f_zero
3154 enddo
3155 enddo
3156
3157 do k = 0, nlay
3158 totuflux(k) = f_zero
3159 totdflux(k) = f_zero
3160 totuclfl(k) = f_zero
3161 totdclfl(k) = f_zero
3162 enddo
3163
3164! --- ... loop over all g-points
3165
3166 do ig = 1, ngptlw
3167 ib = ngb(ig)
3168
3169 radtotd = f_zero
3170 radclrd = f_zero
3171
3173
3174 do k = nlay, 1, -1
3175
3176! --- ... clear sky, gases contribution
3177
3178 odepth = max( f_zero, secdif(ib)*tautot(ig,k) )
3179 if (odepth <= 0.06) then
3180 atrgas = odepth - 0.5*odepth*odepth
3181 trng = f_one - atrgas
3182 gasfac = rec_6 * odepth
3183 else
3184 tblind = odepth / (bpade + odepth)
3185 itgas = tblint*tblind + 0.5
3186 trng = exp_tbl(itgas)
3187 atrgas = f_one - trng
3188 gasfac = tfn_tbl(itgas)
3189 odepth = tau_tbl(itgas)
3190 endif
3191
3192 plfrac = fracs(ig,k)
3193 blay = pklay(ib,k)
3194
3195 dplnku = pklev(ib,k ) - blay
3196 dplnkd = pklev(ib,k-1) - blay
3197 bbdgas = plfrac * (blay + dplnkd*gasfac)
3198 bbugas = plfrac * (blay + dplnku*gasfac)
3199 gassrcd = bbdgas * atrgas
3200 gassrcu(k)= bbugas * atrgas
3201 trngas(k) = trng
3202
3203! --- ... total sky, gases+clouds contribution
3204
3205 clfr = cldfrc(k)
3206 if (lstcldd(k)) then
3207 totradd = clfr * radtotd
3208 clrradd = radtotd - totradd
3209 rad = f_zero
3210 endif
3211
3212 if (clfr >= eps) then
3214
3215 odcld = secdif(ib) * taucld(ib,k)
3216 odtot = odepth + odcld
3217 if (odtot < 0.06) then
3218 totfac = rec_6 * odtot
3219 atrtot = odtot - 0.5*odtot*odtot
3220 trnt = f_one - atrtot
3221 else
3222 tblind = odtot / (bpade + odtot)
3223 ittot = tblint*tblind + 0.5
3224 totfac = tfn_tbl(ittot)
3225 trnt = exp_tbl(ittot)
3226 atrtot = f_one - trnt
3227 endif
3228
3229 bbdtot = plfrac * (blay + dplnkd*totfac)
3230 bbutot = plfrac * (blay + dplnku*totfac)
3231 totsrcd = bbdtot * atrtot
3232 totsrcu(k)= bbutot * atrtot
3233 trntot(k) = trnt
3234
3235 totradd = totradd*trnt + clfr*totsrcd
3236 clrradd = clrradd*trng + (f_one - clfr)*gassrcd
3237
3239 radtotd = totradd + clrradd
3240 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
3241
3243 radclrd = radclrd*trng + gassrcd
3244 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
3245
3246 radmod = rad*(facclr1d(k-1)*trng + faccld1d(k-1)*trnt) &
3247 & - faccmb1d(k-1)*gassrcd + faccmb2d(k-1)*totsrcd
3248
3249 rad = -radmod + facclr2d(k-1)*(clrradd + radmod) &
3250 & - faccld2d(k-1)*(totradd - radmod)
3251 totradd = totradd + rad
3252 clrradd = clrradd - rad
3253
3254 else
3255! --- ... clear layer
3256
3257! --- ... total sky radiance
3258 radtotd = radtotd*trng + gassrcd
3259 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
3260
3261! --- ... clear sky radiance
3262 radclrd = radclrd*trng + gassrcd
3263 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
3264
3265 endif ! end if_clfr_block
3266
3267 enddo ! end do_k_loop
3268
3272
3273! note: spectral and Lambertian reflection are identical for the
3274! diffusivity angle flux integration used here.
3275
3276 reflct = f_one - semiss(ib)
3277 rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0)
3278
3280 radtotu = rad0 + reflct*radtotd
3281 toturad(0,ib) = toturad(0,ib) + radtotu
3282
3284 radclru = rad0 + reflct*radclrd
3285 clrurad(0,ib) = clrurad(0,ib) + radclru
3286
3288
3289 do k = 1, nlay
3290
3291 clfr = cldfrc(k)
3292 trng = trngas(k)
3293 gasu = gassrcu(k)
3294
3295 if (lstcldu(k)) then
3296 totradu = clfr * radtotu
3297 clrradu = radtotu - totradu
3298 rad = f_zero
3299 endif
3300
3301 if (clfr >= eps) then
3303
3304 trnt = trntot(k)
3305 totu = totsrcu(k)
3306 totradu = totradu*trnt + clfr*totu
3307 clrradu = clrradu*trng + (f_one - clfr)*gasu
3308
3310 radtotu = totradu + clrradu
3311 toturad(k,ib) = toturad(k,ib) + radtotu
3312
3314 radclru = radclru*trng + gasu
3315 clrurad(k,ib) = clrurad(k,ib) + radclru
3316
3317 radmod = rad*(facclr1u(k+1)*trng + faccld1u(k+1)*trnt) &
3318 & - faccmb1u(k+1)*gasu + faccmb2u(k+1)*totu
3319 rad = -radmod + facclr2u(k+1)*(clrradu + radmod) &
3320 & - faccld2u(k+1)*(totradu - radmod)
3321 totradu = totradu + rad
3322 clrradu = clrradu - rad
3323
3324 else
3325! --- ... clear layer
3326
3327! --- ... total sky radiance
3328 radtotu = radtotu*trng + gasu
3329 toturad(k,ib) = toturad(k,ib) + radtotu
3330
3331! --- ... clear sky radiance
3332 radclru = radclru*trng + gasu
3333 clrurad(k,ib) = clrurad(k,ib) + radclru
3334
3335 endif ! end if_clfr_block
3336
3337 enddo ! end do_k_loop
3338
3339 enddo ! end do_ig_loop
3340
3343
3344 flxfac = wtdiff * fluxfac
3345
3346 do k = 0, nlay
3347 do ib = 1, nbands
3348 totuflux(k) = totuflux(k) + toturad(k,ib)
3349 totdflux(k) = totdflux(k) + totdrad(k,ib)
3350 totuclfl(k) = totuclfl(k) + clrurad(k,ib)
3351 totdclfl(k) = totdclfl(k) + clrdrad(k,ib)
3352 enddo
3353
3354 totuflux(k) = totuflux(k) * flxfac
3355 totdflux(k) = totdflux(k) * flxfac
3356 totuclfl(k) = totuclfl(k) * flxfac
3357 totdclfl(k) = totdclfl(k) * flxfac
3358 enddo
3359
3360! --- ... calculate net fluxes and heating rates
3361 fnet(0) = totuflux(0) - totdflux(0)
3362
3363 do k = 1, nlay
3364 rfdelp(k) = heatfac / delp(k)
3365 fnet(k) = totuflux(k) - totdflux(k)
3366 htr(k) = (fnet(k-1) - fnet(k)) * rfdelp(k)
3367 enddo
3368
3369!! --- ... optional clear sky heating rates
3370 if ( lhlw0 ) then
3371 fnetc(0) = totuclfl(0) - totdclfl(0)
3372
3373 do k = 1, nlay
3374 fnetc(k) = totuclfl(k) - totdclfl(k)
3375 htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k)
3376 enddo
3377 endif
3378
3379!! --- ... optional spectral band heating rates
3380 if ( lhlwb ) then
3381 do ib = 1, nbands
3382 fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac
3383
3384 do k = 1, nlay
3385 fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac
3386 htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k)
3387 enddo
3388 enddo
3389 endif
3390
3391! .................................
3392 end subroutine rtrnmr
3393! ---------------------------------
3394
3419! ---------------------------------
3420 subroutine rtrnmc &
3421 & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & ! --- inputs:
3422 & fracs,secdif, nlay,nlp1, &
3423 & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs:
3424 & )
3425
3426! =================== program usage description =================== !
3427! !
3428! purpose: compute the upward/downward radiative fluxes, and heating !
3429! rates for both clear or cloudy atmosphere. clouds are treated with !
3430! the mcica stochastic approach. !
3431! !
3432! subprograms called: none !
3433! !
3434! ==================== defination of variables ==================== !
3435! !
3436! inputs: -size- !
3437! semiss - real, lw surface emissivity nbands!
3438! delp - real, layer pressure thickness (mb) nlay !
3439! cldfmc - real, layer cloud fraction (sub-column) ngptlw*nlay!
3440! taucld - real, layer cloud opt depth nbands*nlay!
3441! tautot - real, total optical depth (gas+aerosols) ngptlw*nlay!
3442! pklay - real, integrated planck func at lay temp nbands*0:nlay!
3443! pklev - real, integrated planck func at lev temp nbands*0:nlay!
3444! fracs - real, planck fractions ngptlw*nlay!
3445! secdif - real, secant of diffusivity angle nbands!
3446! nlay - integer, number of vertical layers 1 !
3447! nlp1 - integer, number of vertical levels (interfaces) 1 !
3448! !
3449! outputs: !
3450! totuflux- real, total sky upward flux (w/m2) 0:nlay !
3451! totdflux- real, total sky downward flux (w/m2) 0:nlay !
3452! htr - real, total sky heating rate (k/sec or k/day) nlay !
3453! totuclfl- real, clear sky upward flux (w/m2) 0:nlay !
3454! totdclfl- real, clear sky downward flux (w/m2) 0:nlay !
3455! htrcl - real, clear sky heating rate (k/sec or k/day) nlay !
3456! htrb - real, spectral band lw heating rate (k/day) nlay*nbands!
3457! !
3458! module veriables: !
3459! ngb - integer, band index for each g-value ngptlw!
3460! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 !
3461! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 !
3462! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 !
3463! bpade - real, pade approx constant (1/0.278) 1 !
3464! wtdiff - real, weight for radiance to flux conversion 1 !
3465! ntbl - integer, dimension of look-up tables 1 !
3466! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl !
3467! exp_tbl - real, transmittance lookup table 0:ntbl !
3468! tfn_tbl - real, tau transition function 0:ntbl !
3469! !
3470! local variables: !
3471! itgas - integer, index for gases contribution look-up table 1 !
3472! ittot - integer, index for gases plus clouds look-up table 1 !
3473! reflct - real, surface reflectance 1 !
3474! atrgas - real, gaseous absorptivity 1 !
3475! atrtot - real, gaseous and cloud absorptivity 1 !
3476! odcld - real, cloud optical depth 1 !
3477! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay!
3478! odepth - real, optical depth of gaseous only 1 !
3479! odtot - real, optical depth of gas and cloud 1 !
3480! gasfac - real, gas-only pade factor, used for planck function 1 !
3481! totfac - real, gas and cloud pade factor, used for planck fn 1 !
3482! bbdgas - real, gas-only planck function for downward rt 1 !
3483! bbugas - real, gas-only planck function for upward rt 1 !
3484! bbdtot - real, gas and cloud planck function for downward rt 1 !
3485! bbutot - real, gas and cloud planck function for upward rt 1 !
3486! gassrcu- real, upwd source radiance due to gas nlay!
3487! totsrcu- real, upwd source radiance due to gas+cld nlay!
3488! gassrcd- real, dnwd source radiance due to gas 1 !
3489! totsrcd- real, dnwd source radiance due to gas+cld 1 !
3490! radtotu- real, spectrally summed total sky upwd radiance 1 !
3491! radclru- real, spectrally summed clear sky upwd radiance 1 !
3492! radtotd- real, spectrally summed total sky dnwd radiance 1 !
3493! radclrd- real, spectrally summed clear sky dnwd radiance 1 !
3494! toturad- real, total sky upward radiance by layer 0:nlay*nbands!
3495! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands!
3496! totdrad- real, total sky downward radiance by layer 0:nlay*nbands!
3497! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands!
3498! fnet - real, net longwave flux (w/m2) 0:nlay !
3499! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay !
3500! !
3501! !
3502! ******************************************************************* !
3503! original code description !
3504! !
3505! original version: e. j. mlawer, et al. rrtm_v3.0 !
3506! revision for gcms: michael j. iacono; october, 2002 !
3507! revision for f90: michael j. iacono; june, 2006 !
3508! !
3509! this program calculates the upward fluxes, downward fluxes, and !
3510! heating rates for an arbitrary clear or cloudy atmosphere. the input !
3511! to this program is the atmospheric profile, all Planck function !
3512! information, and the cloud fraction by layer. a variable diffusivity!
3513! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 !
3514! use a value for secdif that varies from 1.50 to 1.80 as a function !
3515! of the column water vapor, and other bands use a value of 1.66. the !
3516! gaussian weight appropriate to this angle (wtdiff=0.5) is applied !
3517! here. note that use of the emissivity angle for the flux integration!
3518! can cause errors of 1 to 4 W/m2 within cloudy layers. !
3519! clouds are treated with the mcica stochastic approach and !
3520! maximum-random cloud overlap. !
3521! !
3522! ******************************************************************* !
3523! ====================== end of description block ================= !
3524
3525! --- inputs:
3526 integer, intent(in) :: nlay, nlp1
3527
3528 real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, &
3529 & secdif
3530 real (kind=kind_phys), dimension(nlay), intent(in) :: delp
3531
3532 real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld
3533 real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, &
3534 & tautot, cldfmc
3535
3536 real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: &
3537 & pklev, pklay
3538
3539! --- outputs:
3540 real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl
3541
3542 real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb
3543
3544 real (kind=kind_phys), dimension(0:nlay), intent(out) :: &
3545 & totuflux, totdflux, totuclfl, totdclfl
3546
3547! --- locals:
3548 real (kind=kind_phys), parameter :: rec_6 = 0.166667
3549
3550 real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, &
3551 & clrdrad, toturad, totdrad
3552
3553 real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, &
3554 & trngas, efclrfr, rfdelp
3555 real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc
3556
3557 real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, &
3558 & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, &
3559 & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, &
3560 & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, &
3561 & clfm, trng, gasu
3562
3563 integer :: ittot, itgas, ib, ig, k
3564!
3565!===> ... begin here
3566!
3567 do ib = 1, nbands
3568 do k = 0, nlay
3569 toturad(k,ib) = f_zero
3570 totdrad(k,ib) = f_zero
3571 clrurad(k,ib) = f_zero
3572 clrdrad(k,ib) = f_zero
3573 enddo
3574 enddo
3575
3576 do k = 0, nlay
3577 totuflux(k) = f_zero
3578 totdflux(k) = f_zero
3579 totuclfl(k) = f_zero
3580 totdclfl(k) = f_zero
3581 enddo
3582
3583! --- ... loop over all g-points
3584
3585 do ig = 1, ngptlw
3586 ib = ngb(ig)
3587
3588 radtotd = f_zero
3589 radclrd = f_zero
3590
3597
3598 do k = nlay, 1, -1
3599
3600! --- ... clear sky, gases contribution
3601
3602 odepth = max( f_zero, secdif(ib)*tautot(ig,k) )
3603 if (odepth <= 0.06) then
3604 atrgas = odepth - 0.5*odepth*odepth
3605 trng = f_one - atrgas
3606 gasfac = rec_6 * odepth
3607 else
3608 tblind = odepth / (bpade + odepth)
3609 itgas = tblint*tblind + 0.5
3610 trng = exp_tbl(itgas)
3611 atrgas = f_one - trng
3612 gasfac = tfn_tbl(itgas)
3613 odepth = tau_tbl(itgas)
3614 endif
3615
3616 plfrac = fracs(ig,k)
3617 blay = pklay(ib,k)
3618
3619 dplnku = pklev(ib,k ) - blay
3620 dplnkd = pklev(ib,k-1) - blay
3621 bbdgas = plfrac * (blay + dplnkd*gasfac)
3622 bbugas = plfrac * (blay + dplnku*gasfac)
3623 gassrcd= bbdgas * atrgas
3624 gassrcu(k)= bbugas * atrgas
3625 trngas(k) = trng
3626
3627! --- ... total sky, gases+clouds contribution
3628
3629 clfm = cldfmc(ig,k)
3630 if (clfm >= eps) then
3631! --- ... cloudy layer
3632
3633 odcld = secdif(ib) * taucld(ib,k)
3634 efclrfr(k) = f_one - (f_one - exp(-odcld))*clfm
3635 odtot = odepth + odcld
3636 if (odtot < 0.06) then
3637 totfac = rec_6 * odtot
3638 atrtot = odtot - 0.5*odtot*odtot
3639 else
3640 tblind = odtot / (bpade + odtot)
3641 ittot = tblint*tblind + 0.5
3642 totfac = tfn_tbl(ittot)
3643 atrtot = f_one - exp_tbl(ittot)
3644 endif
3645
3646 bbdtot = plfrac * (blay + dplnkd*totfac)
3647 bbutot = plfrac * (blay + dplnku*totfac)
3648 totsrcd= bbdtot * atrtot
3649 totsrcu(k)= bbutot * atrtot
3650
3651! --- ... total sky radiance
3652 radtotd = radtotd*trng*efclrfr(k) + gassrcd &
3653 & + clfm*(totsrcd - gassrcd)
3654 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
3655
3656! --- ... clear sky radiance
3657 radclrd = radclrd*trng + gassrcd
3658 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
3659
3660 else
3661! --- ... clear layer
3662
3663! --- ... total sky radiance
3664 radtotd = radtotd*trng + gassrcd
3665 totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd
3666
3667! --- ... clear sky radiance
3668 radclrd = radclrd*trng + gassrcd
3669 clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd
3670
3671 endif ! end if_clfm_block
3672
3673 enddo ! end do_k_loop
3674
3678
3679! note: spectral and Lambertian reflection are identical for the
3680! diffusivity angle flux integration used here.
3681
3682 reflct = f_one - semiss(ib)
3683 rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0)
3684
3686 radtotu = rad0 + reflct*radtotd
3687 toturad(0,ib) = toturad(0,ib) + radtotu
3688
3690 radclru = rad0 + reflct*radclrd
3691 clrurad(0,ib) = clrurad(0,ib) + radclru
3692
3696
3697! toturad holds summed radiance for total sky stream
3698! clrurad holds summed radiance for clear sky stream
3699
3700 do k = 1, nlay
3701 clfm = cldfmc(ig,k)
3702 trng = trngas(k)
3703 gasu = gassrcu(k)
3704
3705 if (clfm > eps) then
3706! --- ... cloudy layer
3707
3708! --- ... total sky radiance
3709 radtotu = radtotu*trng*efclrfr(k) + gasu &
3710 & + clfm*(totsrcu(k) - gasu)
3711 toturad(k,ib) = toturad(k,ib) + radtotu
3712
3713! --- ... clear sky radiance
3714 radclru = radclru*trng + gasu
3715 clrurad(k,ib) = clrurad(k,ib) + radclru
3716
3717 else
3718! --- ... clear layer
3719
3720! --- ... total sky radiance
3721 radtotu = radtotu*trng + gasu
3722 toturad(k,ib) = toturad(k,ib) + radtotu
3723
3724! --- ... clear sky radiance
3725 radclru = radclru*trng + gasu
3726 clrurad(k,ib) = clrurad(k,ib) + radclru
3727
3728 endif ! end if_clfm_block
3729
3730 enddo ! end do_k_loop
3731
3732 enddo ! end do_ig_loop
3733
3736
3737 flxfac = wtdiff * fluxfac
3738
3739 do k = 0, nlay
3740 do ib = 1, nbands
3741 totuflux(k) = totuflux(k) + toturad(k,ib)
3742 totdflux(k) = totdflux(k) + totdrad(k,ib)
3743 totuclfl(k) = totuclfl(k) + clrurad(k,ib)
3744 totdclfl(k) = totdclfl(k) + clrdrad(k,ib)
3745 enddo
3746
3747 totuflux(k) = totuflux(k) * flxfac
3748 totdflux(k) = totdflux(k) * flxfac
3749 totuclfl(k) = totuclfl(k) * flxfac
3750 totdclfl(k) = totdclfl(k) * flxfac
3751 enddo
3752
3754 fnet(0) = totuflux(0) - totdflux(0)
3755
3756 do k = 1, nlay
3757 rfdelp(k) = heatfac / delp(k)
3758 fnet(k) = totuflux(k) - totdflux(k)
3759 htr(k) = (fnet(k-1) - fnet(k)) * rfdelp(k)
3760 enddo
3761
3763 if ( lhlw0 ) then
3764 fnetc(0) = totuclfl(0) - totdclfl(0)
3765
3766 do k = 1, nlay
3767 fnetc(k) = totuclfl(k) - totdclfl(k)
3768 htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k)
3769 enddo
3770 endif
3771
3773 if ( lhlwb ) then
3774 do ib = 1, nbands
3775 fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac
3776
3777 do k = 1, nlay
3778 fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac
3779 htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k)
3780 enddo
3781 enddo
3782 endif
3783
3784! ..................................
3785 end subroutine rtrnmc
3786! ----------------------------------
3787
3836 subroutine taumol &
3837 & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, & ! --- inputs
3838 & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, &
3839 & selffac,selffrac,indself,forfac,forfrac,indfor, &
3840 & minorfrac,scaleminor,scaleminorn2,indminor, &
3841 & nlay, &
3842 & fracs, tautot & ! --- outputs
3843 & )
3844
3845! ************ original subprogram description *************** !
3846! !
3847! optical depths developed for the !
3848! !
3849! rapid radiative transfer model (rrtm) !
3850! !
3851! atmospheric and environmental research, inc. !
3852! 131 hartwell avenue !
3853! lexington, ma 02421 !
3854! !
3855! eli j. mlawer !
3856! jennifer delamere !
3857! steven j. taubman !
3858! shepard a. clough !
3859! !
3860! email: mlawer@aer.com !
3861! email: jdelamer@aer.com !
3862! !
3863! the authors wish to acknowledge the contributions of the !
3864! following people: karen cady-pereira, patrick d. brown, !
3865! michael j. iacono, ronald e. farren, luke chen, !
3866! robert bergstrom. !
3867! !
3868! revision for g-point reduction: michael j. iacono; aer, inc. !
3869! !
3870! taumol !
3871! !
3872! this file contains the subroutines taugbn (where n goes from !
3873! 1 to 16). taugbn calculates the optical depths and planck !
3874! fractions per g-value and layer for band n. !
3875! !
3876! ******************************************************************* !
3877! ================== program usage description ================== !
3878! !
3879! call taumol !
3880! inputs: !
3881! ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, !
3882! rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, !
3883! selffac,selffrac,indself,forfac,forfrac,indfor, !
3884! minorfrac,scaleminor,scaleminorn2,indminor, !
3885! nlay, !
3886! outputs: !
3887! fracs, tautot ) !
3888! !
3889! subprograms called: taugb## (## = 01 -16) !
3890! !
3891! !
3892! ==================== defination of variables ==================== !
3893! !
3894! inputs: size !
3895! laytrop - integer, tropopause layer index (unitless) 1 !
3896! layer at which switch is made for key species !
3897! pavel - real, layer pressures (mb) nlay !
3898! coldry - real, column amount for dry air (mol/cm2) nlay !
3899! colamt - real, column amounts of h2o, co2, o3, n2o, ch4, !
3900! o2, co (mol/cm**2) nlay*maxgas!
3901! colbrd - real, column amount of broadening gases nlay !
3902! wx - real, cross-section amounts(mol/cm2) nlay*maxxsec!
3903! tauaer - real, aerosol optical depth nbands*nlay !
3904! rfrate - real, reference ratios of binary species parameter !
3905! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2!
3906! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer !
3907! nlay*nrates*2!
3908! facij - real, factors multiply the reference ks, i,j of 0/1 !
3909! for lower/higher of the 2 appropriate temperatures !
3910! and altitudes nlay !
3911! jp - real, index of lower reference pressure nlay !
3912! jt, jt1 - real, indices of lower reference temperatures nlay !
3913! for pressure levels jp and jp+1, respectively !
3914! selffac - real, scale factor for water vapor self-continuum !
3915! equals (water vapor density)/(atmospheric density !
3916! at 296k and 1013 mb) nlay !
3917! selffrac - real, factor for temperature interpolation of !
3918! reference water vapor self-continuum data nlay !
3919! indself - integer, index of lower reference temperature for !
3920! the self-continuum interpolation nlay !
3921! forfac - real, scale factor for w. v. foreign-continuum nlay !
3922! forfrac - real, factor for temperature interpolation of !
3923! reference w.v. foreign-continuum data nlay !
3924! indfor - integer, index of lower reference temperature for !
3925! the foreign-continuum interpolation nlay !
3926! minorfrac - real, factor for minor gases nlay !
3927! scaleminor,scaleminorn2 !
3928! - real, scale factors for minor gases nlay !
3929! indminor - integer, index of lower reference temperature for !
3930! minor gases nlay !
3931! nlay - integer, total number of layers 1 !
3932! !
3933! outputs: !
3934! fracs - real, planck fractions ngptlw,nlay!
3935! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay!
3936! !
3937! internal variables: !
3938! ng## - integer, number of g-values in band ## (##=01-16) 1 !
3939! nspa - integer, for lower atmosphere, the number of ref !
3940! atmos, each has different relative amounts of the !
3941! key species for the band nbands!
3942! nspb - integer, same but for upper atmosphere nbands!
3943! absa - real, k-values for lower ref atmospheres (no w.v. !
3944! self-continuum) (cm**2/molecule) nspa(##)*5*13*ng##!
3945! absb - real, k-values for high ref atmospheres (all sources) !
3946! (cm**2/molecule) nspb(##)*5*13:59*ng##!
3947! ka_m'mgas'- real, k-values for low ref atmospheres minor species !
3948! (cm**2/molecule) mmn##*ng##!
3949! kb_m'mgas'- real, k-values for high ref atmospheres minor species !
3950! (cm**2/molecule) mmn##*ng##!
3951! selfref - real, k-values for w.v. self-continuum for ref atmos !
3952! used below laytrop (cm**2/mol) 10*ng##!
3953! forref - real, k-values for w.v. foreign-continuum for ref atmos
3954! used below/above laytrop (cm**2/mol) 4*ng##!
3955! !
3956! ****************************************************************** !
3957
3958! --- inputs:
3959 integer, intent(in) :: nlay, laytrop
3960
3961 integer, dimension(nlay), intent(in) :: jp, jt, jt1, indself, &
3962 & indfor, indminor
3963
3964 real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, &
3965 & coldry, colbrd, fac00, fac01, fac10, fac11, selffac, &
3966 & selffrac, forfac, forfrac, minorfrac, scaleminor, &
3967 & scaleminorn2
3968
3969 real (kind=kind_phys), dimension(nlay,maxgas), intent(in):: colamt
3970 real (kind=kind_phys), dimension(nlay,maxxsec),intent(in):: wx
3971
3972 real (kind=kind_phys), dimension(nbands,nlay), intent(in):: tauaer
3973
3974 real (kind=kind_phys), dimension(nlay,nrates,2), intent(in) :: &
3975 & rfrate
3976
3977! --- outputs:
3978 real (kind=kind_phys), dimension(ngptlw,nlay), intent(out) :: &
3979 & fracs, tautot
3980
3981! --- locals
3982 real (kind=kind_phys), dimension(ngptlw,nlay) :: taug
3983
3984 integer :: ib, ig, k
3985!
3986!===> ... begin here
3987!
3988 call taugb01
3989 call taugb02
3990 call taugb03
3991 call taugb04
3992 call taugb05
3993 call taugb06
3994 call taugb07
3995 call taugb08
3996 call taugb09
3997 call taugb10
3998 call taugb11
3999 call taugb12
4000 call taugb13
4001 call taugb14
4002 call taugb15
4003 call taugb16
4004
4005! --- combine gaseous and aerosol optical depths
4006
4007 do ig = 1, ngptlw
4008 ib = ngb(ig)
4009
4010 do k = 1, nlay
4011 tautot(ig,k) = taug(ig,k) + tauaer(ib,k)
4012 enddo
4013 enddo
4014
4015! =================
4016 contains
4017! =================
4018
4022! ----------------------------------
4023 subroutine taugb01
4024! ..................................
4025
4026! ------------------------------------------------------------------ !
4027! written by eli j. mlawer, atmospheric & environmental research. !
4028! revised by michael j. iacono, atmospheric & environmental research. !
4029! !
4030! band 1: 10-350 cm-1 (low key - h2o; low minor - n2) !
4031! (high key - h2o; high minor - n2) !
4032! !
4033! compute the optical depth by interpolating in ln(pressure) and !
4034! temperature. below laytrop, the water vapor self-continuum and !
4035! foreign continuum is interpolated (in temperature) separately. !
4036! ------------------------------------------------------------------ !
4037
4039
4040! --- locals:
4041 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
4042 & indm, indmp, ig
4043
4044 real (kind=kind_phys) :: pp, corradj, scalen2, tauself, taufor, &
4045 & taun2
4046!
4047!===> ... begin here
4048!
4049! --- minor gas mapping levels:
4050! lower - n2, p = 142.5490 mbar, t = 215.70 k
4051! upper - n2, p = 142.5490 mbar, t = 215.70 k
4052
4053! --- ... lower atmosphere loop
4054
4055 do k = 1, laytrop
4056 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(1) + 1
4057 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(1) + 1
4058 inds = indself(k)
4059 indf = indfor(k)
4060 indm = indminor(k)
4061
4062 ind0p = ind0 + 1
4063 ind1p = ind1 + 1
4064 indsp = inds + 1
4065 indfp = indf + 1
4066 indmp = indm + 1
4067
4068 pp = pavel(k)
4069 scalen2 = colbrd(k) * scaleminorn2(k)
4070 if (pp < 250.0) then
4071 corradj = f_one - 0.15 * (250.0-pp) / 154.4
4072 else
4073 corradj = f_one
4074 endif
4075
4076 do ig = 1, ng01
4077 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
4078 & * (selfref(ig,indsp) - selfref(ig,inds)))
4079 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4080 & * (forref(ig,indfp) - forref(ig,indf)))
4081 taun2 = scalen2 * (ka_mn2(ig,indm) + minorfrac(k) &
4082 & * (ka_mn2(ig,indmp) - ka_mn2(ig,indm)))
4083
4084 taug(ig,k) = corradj * (colamt(k,1) &
4085 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
4086 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
4087 & + tauself + taufor + taun2)
4088
4089 fracs(ig,k) = fracrefa(ig)
4090 enddo
4091 enddo
4092
4093! --- ... upper atmosphere loop
4094
4095 do k = laytrop+1, nlay
4096 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(1) + 1
4097 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(1) + 1
4098 indf = indfor(k)
4099 indm = indminor(k)
4100
4101 ind0p = ind0 + 1
4102 ind1p = ind1 + 1
4103 indfp = indf + 1
4104 indmp = indm + 1
4105
4106 scalen2 = colbrd(k) * scaleminorn2(k)
4107 corradj = f_one - 0.15 * (pavel(k) / 95.6)
4108
4109 do ig = 1, ng01
4110 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4111 & * (forref(ig,indfp) - forref(ig,indf)))
4112 taun2 = scalen2 * (kb_mn2(ig,indm) + minorfrac(k) &
4113 & * (kb_mn2(ig,indmp) - kb_mn2(ig,indm)))
4114
4115 taug(ig,k) = corradj * (colamt(k,1) &
4116 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
4117 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
4118 & + taufor + taun2)
4119
4120 fracs(ig,k) = fracrefb(ig)
4121 enddo
4122 enddo
4123
4124! ..................................
4125 end subroutine taugb01
4126! ----------------------------------
4127
4130! ----------------------------------
4131 subroutine taugb02
4132! ..................................
4133
4134! ------------------------------------------------------------------ !
4135! band 2: 350-500 cm-1 (low key - h2o; high key - h2o) !
4136! ------------------------------------------------------------------ !
4137
4139
4140! --- locals:
4141 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
4142 & ig
4143
4144 real (kind=kind_phys) :: corradj, tauself, taufor
4145!
4146!===> ... begin here
4147!
4148! --- ... lower atmosphere loop
4149
4150 do k = 1, laytrop
4151 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(2) + 1
4152 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(2) + 1
4153 inds = indself(k)
4154 indf = indfor(k)
4155
4156 ind0p = ind0 + 1
4157 ind1p = ind1 + 1
4158 indsp = inds + 1
4159 indfp = indf + 1
4160
4161 corradj = f_one - 0.05 * (pavel(k) - 100.0) / 900.0
4162
4163 do ig = 1, ng02
4164 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
4165 & * (selfref(ig,indsp) - selfref(ig,inds)))
4166 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4167 & * (forref(ig,indfp) - forref(ig,indf)))
4168
4169 taug(ns02+ig,k) = corradj * (colamt(k,1) &
4170 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
4171 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
4172 & + tauself + taufor)
4173
4174 fracs(ns02+ig,k) = fracrefa(ig)
4175 enddo
4176 enddo
4177
4178! --- ... upper atmosphere loop
4179
4180 do k = laytrop+1, nlay
4181 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(2) + 1
4182 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(2) + 1
4183 indf = indfor(k)
4184
4185 ind0p = ind0 + 1
4186 ind1p = ind1 + 1
4187 indfp = indf + 1
4188
4189 do ig = 1, ng02
4190 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4191 & * (forref(ig,indfp) - forref(ig,indf)))
4192
4193 taug(ns02+ig,k) = colamt(k,1) &
4194 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
4195 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
4196 & + taufor
4197
4198 fracs(ns02+ig,k) = fracrefb(ig)
4199 enddo
4200 enddo
4201
4202! ..................................
4203 end subroutine taugb02
4204! ----------------------------------
4205
4209! ----------------------------------
4210 subroutine taugb03
4211! ..................................
4212
4213! ------------------------------------------------------------------ !
4214! band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o) !
4215! (high key - h2o,co2; high minor - n2o) !
4216! ------------------------------------------------------------------ !
4217
4219
4220! --- locals:
4221 integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, &
4222 & id000, id010, id100, id110, id200, id210, jmn2o, jmn2op, &
4223 & id001, id011, id101, id111, id201, id211, jpl, jplp, &
4224 & ig, js, js1
4225
4226 real (kind=kind_phys) :: absn2o, ratn2o, adjfac, adjcoln2o, &
4227 & speccomb, specparm, specmult, fs, &
4228 & speccomb1, specparm1, specmult1, fs1, &
4229 & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, &
4230 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
4231 & refrat_planck_a, refrat_planck_b, refrat_m_a, refrat_m_b, &
4232 & fac000, fac100, fac200, fac010, fac110, fac210, &
4233 & fac001, fac101, fac201, fac011, fac111, fac211, &
4234 & tau_major, tau_major1, tauself, taufor, n2om1, n2om2, &
4235 & p, p4, fk0, fk1, fk2
4236!
4237!===> ... begin here
4238!
4239! --- ... minor gas mapping levels:
4240! lower - n2o, p = 706.272 mbar, t = 278.94 k
4241! upper - n2o, p = 95.58 mbar, t = 215.7 k
4242
4243 refrat_planck_a = chi_mls(1,9)/chi_mls(2,9) ! P = 212.725 mb
4244 refrat_planck_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb
4245 refrat_m_a = chi_mls(1,3)/chi_mls(2,3) ! P = 706.270 mb
4246 refrat_m_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb
4247
4248! --- ... lower atmosphere loop
4249
4250 do k = 1, laytrop
4251 speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2)
4252 specparm = colamt(k,1) / speccomb
4253 specmult = 8.0 * min(specparm, oneminus)
4254 js = 1 + int(specmult)
4255 fs = mod(specmult, f_one)
4256 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(3) + js
4257
4258 speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2)
4259 specparm1 = colamt(k,1) / speccomb1
4260 specmult1 = 8.0 * min(specparm1, oneminus)
4261 js1 = 1 + int(specmult1)
4262 fs1 = mod(specmult1, f_one)
4263 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(3) + js1
4264
4265 speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,2)
4266 specparm_mn2o = colamt(k,1) / speccomb_mn2o
4267 specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus)
4268 jmn2o = 1 + int(specmult_mn2o)
4269 fmn2o = mod(specmult_mn2o, f_one)
4270
4271 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2)
4272 specparm_planck = colamt(k,1) / speccomb_planck
4273 specmult_planck = 8.0 * min(specparm_planck, oneminus)
4274 jpl = 1 + int(specmult_planck)
4275 fpl = mod(specmult_planck, f_one)
4276
4277 inds = indself(k)
4278 indf = indfor(k)
4279 indm = indminor(k)
4280 indsp = inds + 1
4281 indfp = indf + 1
4282 indmp = indm + 1
4283 jmn2op= jmn2o+ 1
4284 jplp = jpl + 1
4285
4286! --- ... in atmospheres where the amount of n2O is too great to be considered
4287! a minor species, adjust the column amount of n2O by an empirical factor
4288! to obtain the proper contribution.
4289
4290 p = coldry(k) * chi_mls(4,jp(k)+1)
4291 ratn2o = colamt(k,4) / p
4292 if (ratn2o > 1.5) then
4293 adjfac = 0.5 + (ratn2o - 0.5)**0.65
4294 adjcoln2o = adjfac * p
4295 else
4296 adjcoln2o = colamt(k,4)
4297 endif
4298
4299 if (specparm < 0.125) then
4300 p = fs - f_one
4301 p4 = p**4
4302 fk0 = p4
4303 fk1 = f_one - p - 2.0*p4
4304 fk2 = p + p4
4305 id000 = ind0
4306 id010 = ind0 + 9
4307 id100 = ind0 + 1
4308 id110 = ind0 +10
4309 id200 = ind0 + 2
4310 id210 = ind0 +11
4311 else if (specparm > 0.875) then
4312 p = -fs
4313 p4 = p**4
4314 fk0 = p4
4315 fk1 = f_one - p - 2.0*p4
4316 fk2 = p + p4
4317 id000 = ind0 + 1
4318 id010 = ind0 +10
4319 id100 = ind0
4320 id110 = ind0 + 9
4321 id200 = ind0 - 1
4322 id210 = ind0 + 8
4323 else
4324 fk0 = f_one - fs
4325 fk1 = fs
4326 fk2 = f_zero
4327 id000 = ind0
4328 id010 = ind0 + 9
4329 id100 = ind0 + 1
4330 id110 = ind0 +10
4331 id200 = ind0
4332 id210 = ind0
4333 endif
4334
4335 fac000 = fk0*fac00(k)
4336 fac100 = fk1*fac00(k)
4337 fac200 = fk2*fac00(k)
4338 fac010 = fk0*fac10(k)
4339 fac110 = fk1*fac10(k)
4340 fac210 = fk2*fac10(k)
4341
4342 if (specparm1 < 0.125) then
4343 p = fs1 - f_one
4344 p4 = p**4
4345 fk0 = p4
4346 fk1 = f_one - p - 2.0*p4
4347 fk2 = p + p4
4348 id001 = ind1
4349 id011 = ind1 + 9
4350 id101 = ind1 + 1
4351 id111 = ind1 +10
4352 id201 = ind1 + 2
4353 id211 = ind1 +11
4354 elseif (specparm1 > 0.875) then
4355 p = -fs1
4356 p4 = p**4
4357 fk0 = p4
4358 fk1 = f_one - p - 2.0*p4
4359 fk2 = p + p4
4360 id001 = ind1 + 1
4361 id011 = ind1 +10
4362 id101 = ind1
4363 id111 = ind1 + 9
4364 id201 = ind1 - 1
4365 id211 = ind1 + 8
4366 else
4367 fk0 = f_one - fs1
4368 fk1 = fs1
4369 fk2 = f_zero
4370 id001 = ind1
4371 id011 = ind1 + 9
4372 id101 = ind1 + 1
4373 id111 = ind1 +10
4374 id201 = ind1
4375 id211 = ind1
4376 endif
4377
4378 fac001 = fk0*fac01(k)
4379 fac101 = fk1*fac01(k)
4380 fac201 = fk2*fac01(k)
4381 fac011 = fk0*fac11(k)
4382 fac111 = fk1*fac11(k)
4383 fac211 = fk2*fac11(k)
4384
4385 do ig = 1, ng03
4386 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
4387 & * (selfref(ig,indsp) - selfref(ig,inds)))
4388 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4389 & * (forref(ig,indfp) - forref(ig,indf)))
4390 n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o &
4391 & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm))
4392 n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o &
4393 & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp))
4394 absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1)
4395
4396 tau_major = speccomb &
4397 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
4398 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
4399 & + fac200*absa(ig,id200) + fac210*absa(ig,id210))
4400
4401 tau_major1 = speccomb1 &
4402 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
4403 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
4404 & + fac201*absa(ig,id201) + fac211*absa(ig,id211))
4405
4406 taug(ns03+ig,k) = tau_major + tau_major1 &
4407 & + tauself + taufor + adjcoln2o*absn2o
4408
4409 fracs(ns03+ig,k) = fracrefa(ig,jpl) + fpl &
4410 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
4411 enddo ! end do_k_loop
4412 enddo ! end do_ig_loop
4413
4414! --- ... upper atmosphere loop
4415
4416 do k = laytrop+1, nlay
4417 speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2)
4418 specparm = colamt(k,1) / speccomb
4419 specmult = 4.0 * min(specparm, oneminus)
4420 js = 1 + int(specmult)
4421 fs = mod(specmult, f_one)
4422 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(3) + js
4423
4424 speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2)
4425 specparm1 = colamt(k,1) / speccomb1
4426 specmult1 = 4.0 * min(specparm1, oneminus)
4427 js1 = 1 + int(specmult1)
4428 fs1 = mod(specmult1, f_one)
4429 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(3) + js1
4430
4431 speccomb_mn2o = colamt(k,1) + refrat_m_b*colamt(k,2)
4432 specparm_mn2o = colamt(k,1) / speccomb_mn2o
4433 specmult_mn2o = 4.0 * min(specparm_mn2o, oneminus)
4434 jmn2o = 1 + int(specmult_mn2o)
4435 fmn2o = mod(specmult_mn2o, f_one)
4436
4437 speccomb_planck = colamt(k,1) + refrat_planck_b*colamt(k,2)
4438 specparm_planck = colamt(k,1) / speccomb_planck
4439 specmult_planck = 4.0 * min(specparm_planck, oneminus)
4440 jpl = 1 + int(specmult_planck)
4441 fpl = mod(specmult_planck, f_one)
4442
4443 indf = indfor(k)
4444 indm = indminor(k)
4445 indfp = indf + 1
4446 indmp = indm + 1
4447 jmn2op= jmn2o+ 1
4448 jplp = jpl + 1
4449
4450 id000 = ind0
4451 id010 = ind0 + 5
4452 id100 = ind0 + 1
4453 id110 = ind0 + 6
4454 id001 = ind1
4455 id011 = ind1 + 5
4456 id101 = ind1 + 1
4457 id111 = ind1 + 6
4458
4459! --- ... in atmospheres where the amount of n2o is too great to be considered
4460! a minor species, adjust the column amount of N2O by an empirical factor
4461! to obtain the proper contribution.
4462
4463 p = coldry(k) * chi_mls(4,jp(k)+1)
4464 ratn2o = colamt(k,4) / p
4465 if (ratn2o > 1.5) then
4466 adjfac = 0.5 + (ratn2o - 0.5)**0.65
4467 adjcoln2o = adjfac * p
4468 else
4469 adjcoln2o = colamt(k,4)
4470 endif
4471
4472 fk0 = f_one - fs
4473 fk1 = fs
4474 fac000 = fk0*fac00(k)
4475 fac010 = fk0*fac10(k)
4476 fac100 = fk1*fac00(k)
4477 fac110 = fk1*fac10(k)
4478
4479 fk0 = f_one - fs1
4480 fk1 = fs1
4481 fac001 = fk0*fac01(k)
4482 fac011 = fk0*fac11(k)
4483 fac101 = fk1*fac01(k)
4484 fac111 = fk1*fac11(k)
4485
4486 do ig = 1, ng03
4487 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4488 & * (forref(ig,indfp) - forref(ig,indf)))
4489 n2om1 = kb_mn2o(ig,jmn2o,indm) + fmn2o &
4490 & * (kb_mn2o(ig,jmn2op,indm) - kb_mn2o(ig,jmn2o,indm))
4491 n2om2 = kb_mn2o(ig,jmn2o,indmp) + fmn2o &
4492 & * (kb_mn2o(ig,jmn2op,indmp) - kb_mn2o(ig,jmn2o,indmp))
4493 absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1)
4494
4495 tau_major = speccomb &
4496 & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) &
4497 & + fac100*absb(ig,id100) + fac110*absb(ig,id110))
4498
4499 tau_major1 = speccomb1 &
4500 & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) &
4501 & + fac101*absb(ig,id101) + fac111*absb(ig,id111))
4502
4503 taug(ns03+ig,k) = tau_major + tau_major1 &
4504 & + taufor + adjcoln2o*absn2o
4505
4506 fracs(ns03+ig,k) = fracrefb(ig,jpl) + fpl &
4507 & * (fracrefb(ig,jplp) - fracrefb(ig,jpl))
4508 enddo
4509 enddo
4510
4511! ..................................
4512 end subroutine taugb03
4513! ----------------------------------
4514
4517! ----------------------------------
4518 subroutine taugb04
4519! ..................................
4520
4521! ------------------------------------------------------------------ !
4522! band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2) !
4523! ------------------------------------------------------------------ !
4524
4526
4527! --- locals:
4528 integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, &
4529 & id000, id010, id100, id110, id200, id210, ig, js, js1, &
4530 & id001, id011, id101, id111, id201, id211
4531
4532 real (kind=kind_phys) :: tauself, taufor, p, p4, fk0, fk1, fk2, &
4533 & speccomb, specparm, specmult, fs, &
4534 & speccomb1, specparm1, specmult1, fs1, &
4535 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
4536 & fac000, fac100, fac200, fac010, fac110, fac210, &
4537 & fac001, fac101, fac201, fac011, fac111, fac211, &
4538 & refrat_planck_a, refrat_planck_b, tau_major, tau_major1
4539!
4540!===> ... begin here
4541!
4542 refrat_planck_a = chi_mls(1,11)/chi_mls(2,11) ! P = 142.5940 mb
4543 refrat_planck_b = chi_mls(3,13)/chi_mls(2,13) ! P = 95.58350 mb
4544
4545! --- ... lower atmosphere loop
4546
4547 do k = 1, laytrop
4548 speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2)
4549 specparm = colamt(k,1) / speccomb
4550 specmult = 8.0 * min(specparm, oneminus)
4551 js = 1 + int(specmult)
4552 fs = mod(specmult, f_one)
4553 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(4) + js
4554
4555 speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2)
4556 specparm1 = colamt(k,1) / speccomb1
4557 specmult1 = 8.0 * min(specparm1, oneminus)
4558 js1 = 1 + int(specmult1)
4559 fs1 = mod(specmult1, f_one)
4560 ind1 = ( jp(k)*5 + (jt1(k)-1)) * nspa(4) + js1
4561
4562 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2)
4563 specparm_planck = colamt(k,1) / speccomb_planck
4564 specmult_planck = 8.0 * min(specparm_planck, oneminus)
4565 jpl = 1 + int(specmult_planck)
4566 fpl = mod(specmult_planck, 1.0)
4567
4568 inds = indself(k)
4569 indf = indfor(k)
4570 indsp = inds + 1
4571 indfp = indf + 1
4572 jplp = jpl + 1
4573
4574 if (specparm < 0.125) then
4575 p = fs - f_one
4576 p4 = p**4
4577 fk0 = p4
4578 fk1 = f_one - p - 2.0*p4
4579 fk2 = p + p4
4580 id000 = ind0
4581 id010 = ind0 + 9
4582 id100 = ind0 + 1
4583 id110 = ind0 +10
4584 id200 = ind0 + 2
4585 id210 = ind0 +11
4586 elseif (specparm > 0.875) then
4587 p = -fs
4588 p4 = p**4
4589 fk0 = p4
4590 fk1 = f_one - p - 2.0*p4
4591 fk2 = p + p4
4592 id000 = ind0 + 1
4593 id010 = ind0 +10
4594 id100 = ind0
4595 id110 = ind0 + 9
4596 id200 = ind0 - 1
4597 id210 = ind0 + 8
4598 else
4599 fk0 = f_one - fs
4600 fk1 = fs
4601 fk2 = f_zero
4602 id000 = ind0
4603 id010 = ind0 + 9
4604 id100 = ind0 + 1
4605 id110 = ind0 +10
4606 id200 = ind0
4607 id210 = ind0
4608 endif
4609
4610 fac000 = fk0*fac00(k)
4611 fac100 = fk1*fac00(k)
4612 fac200 = fk2*fac00(k)
4613 fac010 = fk0*fac10(k)
4614 fac110 = fk1*fac10(k)
4615 fac210 = fk2*fac10(k)
4616
4617 if (specparm1 < 0.125) then
4618 p = fs1 - f_one
4619 p4 = p**4
4620 fk0 = p4
4621 fk1 = f_one - p - 2.0*p4
4622 fk2 = p + p4
4623 id001 = ind1
4624 id011 = ind1 + 9
4625 id101 = ind1 + 1
4626 id111 = ind1 +10
4627 id201 = ind1 + 2
4628 id211 = ind1 +11
4629 elseif (specparm1 > 0.875) then
4630 p = -fs1
4631 p4 = p**4
4632 fk0 = p4
4633 fk1 = f_one - p - 2.0*p4
4634 fk2 = p + p4
4635 id001 = ind1 + 1
4636 id011 = ind1 +10
4637 id101 = ind1
4638 id111 = ind1 + 9
4639 id201 = ind1 - 1
4640 id211 = ind1 + 8
4641 else
4642 fk0 = f_one - fs1
4643 fk1 = fs1
4644 fk2 = f_zero
4645 id001 = ind1
4646 id011 = ind1 + 9
4647 id101 = ind1 + 1
4648 id111 = ind1 +10
4649 id201 = ind1
4650 id211 = ind1
4651 endif
4652
4653 fac001 = fk0*fac01(k)
4654 fac101 = fk1*fac01(k)
4655 fac201 = fk2*fac01(k)
4656 fac011 = fk0*fac11(k)
4657 fac111 = fk1*fac11(k)
4658 fac211 = fk2*fac11(k)
4659
4660 do ig = 1, ng04
4661 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
4662 & * (selfref(ig,indsp) - selfref(ig,inds)))
4663 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4664 & * (forref(ig,indfp) - forref(ig,indf)))
4665
4666 tau_major = speccomb &
4667 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
4668 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
4669 & + fac200*absa(ig,id200) + fac210*absa(ig,id210))
4670
4671 tau_major1 = speccomb1 &
4672 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
4673 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
4674 & + fac201*absa(ig,id201) + fac211*absa(ig,id211))
4675
4676 taug(ns04+ig,k) = tau_major + tau_major1 + tauself + taufor
4677
4678 fracs(ns04+ig,k) = fracrefa(ig,jpl) + fpl &
4679 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
4680 enddo ! end do_k_loop
4681 enddo ! end do_ig_loop
4682
4683! --- ... upper atmosphere loop
4684
4685 do k = laytrop+1, nlay
4686 speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2)
4687 specparm = colamt(k,3) / speccomb
4688 specmult = 4.0 * min(specparm, oneminus)
4689 js = 1 + int(specmult)
4690 fs = mod(specmult, f_one)
4691 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(4) + js
4692
4693 speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2)
4694 specparm1 = colamt(k,3) / speccomb1
4695 specmult1 = 4.0 * min(specparm1, oneminus)
4696 js1 = 1 + int(specmult1)
4697 fs1 = mod(specmult1, f_one)
4698 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(4) + js1
4699
4700 speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2)
4701 specparm_planck = colamt(k,3) / speccomb_planck
4702 specmult_planck = 4.0 * min(specparm_planck, oneminus)
4703 jpl = 1 + int(specmult_planck)
4704 fpl = mod(specmult_planck, f_one)
4705 jplp = jpl + 1
4706
4707 id000 = ind0
4708 id010 = ind0 + 5
4709 id100 = ind0 + 1
4710 id110 = ind0 + 6
4711 id001 = ind1
4712 id011 = ind1 + 5
4713 id101 = ind1 + 1
4714 id111 = ind1 + 6
4715
4716 fk0 = f_one - fs
4717 fk1 = fs
4718 fac000 = fk0*fac00(k)
4719 fac010 = fk0*fac10(k)
4720 fac100 = fk1*fac00(k)
4721 fac110 = fk1*fac10(k)
4722
4723 fk0 = f_one - fs1
4724 fk1 = fs1
4725 fac001 = fk0*fac01(k)
4726 fac011 = fk0*fac11(k)
4727 fac101 = fk1*fac01(k)
4728 fac111 = fk1*fac11(k)
4729
4730 do ig = 1, ng04
4731 tau_major = speccomb &
4732 & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) &
4733 & + fac100*absb(ig,id100) + fac110*absb(ig,id110))
4734 tau_major1 = speccomb1 &
4735 & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) &
4736 & + fac101*absb(ig,id101) + fac111*absb(ig,id111))
4737
4738 taug(ns04+ig,k) = tau_major + tau_major1
4739
4740 fracs(ns04+ig,k) = fracrefb(ig,jpl) + fpl &
4741 & * (fracrefb(ig,jplp) - fracrefb(ig,jpl))
4742 enddo
4743
4744! --- ... empirical modification to code to improve stratospheric cooling rates
4745! for co2. revised to apply weighting for g-point reduction in this band.
4746
4747 taug(ns04+ 8,k) = taug(ns04+ 8,k) * 0.92
4748 taug(ns04+ 9,k) = taug(ns04+ 9,k) * 0.88
4749 taug(ns04+10,k) = taug(ns04+10,k) * 1.07
4750 taug(ns04+11,k) = taug(ns04+11,k) * 1.1
4751 taug(ns04+12,k) = taug(ns04+12,k) * 0.99
4752 taug(ns04+13,k) = taug(ns04+13,k) * 0.88
4753 taug(ns04+14,k) = taug(ns04+14,k) * 0.943
4754 enddo
4755
4756! ..................................
4757 end subroutine taugb04
4758! ----------------------------------
4759
4763! ----------------------------------
4764 subroutine taugb05
4765! ..................................
4766
4767! ------------------------------------------------------------------ !
4768! band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) !
4769! (high key - o3,co2) !
4770! ------------------------------------------------------------------ !
4771
4773
4774! --- locals:
4775 integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, &
4776 & id000, id010, id100, id110, id200, id210, jmo3, jmo3p, &
4777 & id001, id011, id101, id111, id201, id211, jpl, jplp, &
4778 & ig, js, js1
4779
4780 real (kind=kind_phys) :: tauself, taufor, o3m1, o3m2, abso3, &
4781 & speccomb, specparm, specmult, fs, &
4782 & speccomb1, specparm1, specmult1, fs1, &
4783 & speccomb_mo3, specparm_mo3, specmult_mo3, fmo3, &
4784 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
4785 & refrat_planck_a, refrat_planck_b, refrat_m_a, &
4786 & fac000, fac100, fac200, fac010, fac110, fac210, &
4787 & fac001, fac101, fac201, fac011, fac111, fac211, &
4788 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21
4789!
4790!===> ... begin here
4791!
4792! --- ... minor gas mapping level :
4793! lower - o3, p = 317.34 mbar, t = 240.77 k
4794! lower - ccl4
4795
4796! --- ... calculate reference ratio to be used in calculation of Planck
4797! fraction in lower/upper atmosphere.
4798
4799 refrat_planck_a = chi_mls(1,5)/chi_mls(2,5) ! P = 473.420 mb
4800 refrat_planck_b = chi_mls(3,43)/chi_mls(2,43) ! P = 0.2369 mb
4801 refrat_m_a = chi_mls(1,7)/chi_mls(2,7) ! P = 317.348 mb
4802
4803! --- ... lower atmosphere loop
4804
4805 do k = 1, laytrop
4806 speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2)
4807 specparm = colamt(k,1) / speccomb
4808 specmult = 8.0 * min(specparm, oneminus)
4809 js = 1 + int(specmult)
4810 fs = mod(specmult, f_one)
4811 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(5) + js
4812
4813 speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2)
4814 specparm1 = colamt(k,1) / speccomb1
4815 specmult1 = 8.0 * min(specparm1, oneminus)
4816 js1 = 1 + int(specmult1)
4817 fs1 = mod(specmult1, f_one)
4818 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(5) + js1
4819
4820 speccomb_mo3 = colamt(k,1) + refrat_m_a*colamt(k,2)
4821 specparm_mo3 = colamt(k,1) / speccomb_mo3
4822 specmult_mo3 = 8.0 * min(specparm_mo3, oneminus)
4823 jmo3 = 1 + int(specmult_mo3)
4824 fmo3 = mod(specmult_mo3, f_one)
4825
4826 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2)
4827 specparm_planck = colamt(k,1) / speccomb_planck
4828 specmult_planck = 8.0 * min(specparm_planck, oneminus)
4829 jpl = 1 + int(specmult_planck)
4830 fpl = mod(specmult_planck, f_one)
4831
4832 inds = indself(k)
4833 indf = indfor(k)
4834 indm = indminor(k)
4835 indsp = inds + 1
4836 indfp = indf + 1
4837 indmp = indm + 1
4838 jplp = jpl + 1
4839 jmo3p = jmo3 + 1
4840
4841 if (specparm < 0.125) then
4842 p0 = fs - f_one
4843 p40 = p0**4
4844 fk00 = p40
4845 fk10 = f_one - p0 - 2.0*p40
4846 fk20 = p0 + p40
4847
4848 id000 = ind0
4849 id010 = ind0 + 9
4850 id100 = ind0 + 1
4851 id110 = ind0 +10
4852 id200 = ind0 + 2
4853 id210 = ind0 +11
4854 elseif (specparm > 0.875) then
4855 p0 = -fs
4856 p40 = p0**4
4857 fk00 = p40
4858 fk10 = f_one - p0 - 2.0*p40
4859 fk20 = p0 + p40
4860
4861 id000 = ind0 + 1
4862 id010 = ind0 +10
4863 id100 = ind0
4864 id110 = ind0 + 9
4865 id200 = ind0 - 1
4866 id210 = ind0 + 8
4867 else
4868 fk00 = f_one - fs
4869 fk10 = fs
4870 fk20 = f_zero
4871
4872 id000 = ind0
4873 id010 = ind0 + 9
4874 id100 = ind0 + 1
4875 id110 = ind0 +10
4876 id200 = ind0
4877 id210 = ind0
4878 endif
4879
4880 fac000 = fk00 * fac00(k)
4881 fac100 = fk10 * fac00(k)
4882 fac200 = fk20 * fac00(k)
4883 fac010 = fk00 * fac10(k)
4884 fac110 = fk10 * fac10(k)
4885 fac210 = fk20 * fac10(k)
4886
4887 if (specparm1 < 0.125) then
4888 p1 = fs1 - f_one
4889 p41 = p1**4
4890 fk01 = p41
4891 fk11 = f_one - p1 - 2.0*p41
4892 fk21 = p1 + p41
4893
4894 id001 = ind1
4895 id011 = ind1 + 9
4896 id101 = ind1 + 1
4897 id111 = ind1 +10
4898 id201 = ind1 + 2
4899 id211 = ind1 +11
4900 elseif (specparm1 > 0.875) then
4901 p1 = -fs1
4902 p41 = p1**4
4903 fk01 = p41
4904 fk11 = f_one - p1 - 2.0*p41
4905 fk21 = p1 + p41
4906
4907 id001 = ind1 + 1
4908 id011 = ind1 +10
4909 id101 = ind1
4910 id111 = ind1 + 9
4911 id201 = ind1 - 1
4912 id211 = ind1 + 8
4913 else
4914 fk01 = f_one - fs1
4915 fk11 = fs1
4916 fk21 = f_zero
4917
4918 id001 = ind1
4919 id011 = ind1 + 9
4920 id101 = ind1 + 1
4921 id111 = ind1 +10
4922 id201 = ind1
4923 id211 = ind1
4924 endif
4925
4926 fac001 = fk01 * fac01(k)
4927 fac101 = fk11 * fac01(k)
4928 fac201 = fk21 * fac01(k)
4929 fac011 = fk01 * fac11(k)
4930 fac111 = fk11 * fac11(k)
4931 fac211 = fk21 * fac11(k)
4932
4933 do ig = 1, ng05
4934 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
4935 & * (selfref(ig,indsp) - selfref(ig,inds)))
4936 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
4937 & * (forref(ig,indfp) - forref(ig,indf)))
4938 o3m1 = ka_mo3(ig,jmo3,indm) + fmo3 &
4939 & * (ka_mo3(ig,jmo3p,indm) - ka_mo3(ig,jmo3,indm))
4940 o3m2 = ka_mo3(ig,jmo3,indmp) + fmo3 &
4941 & * (ka_mo3(ig,jmo3p,indmp) - ka_mo3(ig,jmo3,indmp))
4942 abso3 = o3m1 + minorfrac(k)*(o3m2 - o3m1)
4943
4944 taug(ns05+ig,k) = speccomb &
4945 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
4946 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
4947 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
4948 & + speccomb1 &
4949 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
4950 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
4951 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
4952 & + tauself + taufor+abso3*colamt(k,3)+wx(k,1)*ccl4(ig)
4953
4954 fracs(ns05+ig,k) = fracrefa(ig,jpl) + fpl &
4955 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
4956 enddo
4957 enddo
4958
4959! --- ... upper atmosphere loop
4960
4961 do k = laytrop+1, nlay
4962 speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2)
4963 specparm = colamt(k,3) / speccomb
4964 specmult = 4.0 * min(specparm, oneminus)
4965 js = 1 + int(specmult)
4966 fs = mod(specmult, f_one)
4967 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(5) + js
4968
4969 speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2)
4970 specparm1 = colamt(k,3) / speccomb1
4971 specmult1 = 4.0 * min(specparm1, oneminus)
4972 js1 = 1 + int(specmult1)
4973 fs1 = mod(specmult1, f_one)
4974 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(5) + js1
4975
4976 speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2)
4977 specparm_planck = colamt(k,3) / speccomb_planck
4978 specmult_planck = 4.0 * min(specparm_planck, oneminus)
4979 jpl = 1 + int(specmult_planck)
4980 fpl = mod(specmult_planck, f_one)
4981 jplp= jpl + 1
4982
4983 id000 = ind0
4984 id010 = ind0 + 5
4985 id100 = ind0 + 1
4986 id110 = ind0 + 6
4987 id001 = ind1
4988 id011 = ind1 + 5
4989 id101 = ind1 + 1
4990 id111 = ind1 + 6
4991
4992 fk00 = f_one - fs
4993 fk10 = fs
4994
4995 fk01 = f_one - fs1
4996 fk11 = fs1
4997
4998 fac000 = fk00 * fac00(k)
4999 fac010 = fk00 * fac10(k)
5000 fac100 = fk10 * fac00(k)
5001 fac110 = fk10 * fac10(k)
5002
5003 fac001 = fk01 * fac01(k)
5004 fac011 = fk01 * fac11(k)
5005 fac101 = fk11 * fac01(k)
5006 fac111 = fk11 * fac11(k)
5007
5008 do ig = 1, ng05
5009 taug(ns05+ig,k) = speccomb &
5010 & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) &
5011 & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) &
5012 & + speccomb1 &
5013 & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) &
5014 & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) &
5015 & + wx(k,1) * ccl4(ig)
5016
5017 fracs(ns05+ig,k) = fracrefb(ig,jpl) + fpl &
5018 & * (fracrefb(ig,jplp) - fracrefb(ig,jpl))
5019 enddo
5020 enddo
5021
5022! ..................................
5023 end subroutine taugb05
5024! ----------------------------------
5025
5029! ----------------------------------
5030 subroutine taugb06
5031! ..................................
5032
5033! ------------------------------------------------------------------ !
5034! band 6: 820-980 cm-1 (low key - h2o; low minor - co2) !
5035! (high key - none; high minor - cfc11, cfc12)
5036! ------------------------------------------------------------------ !
5037
5039
5040! --- locals:
5041 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5042 & indm, indmp, ig
5043
5044 real (kind=kind_phys) :: ratco2, adjfac, adjcolco2, tauself, &
5045 & taufor, absco2, temp
5046!
5047!===> ... begin here
5048!
5049! --- ... minor gas mapping level:
5050! lower - co2, p = 706.2720 mb, t = 294.2 k
5051! upper - cfc11, cfc12
5052
5053! --- ... lower atmosphere loop
5054
5055 do k = 1, laytrop
5056 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(6) + 1
5057 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(6) + 1
5058
5059 inds = indself(k)
5060 indf = indfor(k)
5061 indm = indminor(k)
5062 indsp = inds + 1
5063 indfp = indf + 1
5064 indmp = indm + 1
5065 ind0p = ind0 + 1
5066 ind1p = ind1 + 1
5067
5068! --- ... in atmospheres where the amount of co2 is too great to be considered
5069! a minor species, adjust the column amount of co2 by an empirical factor
5070! to obtain the proper contribution.
5071
5072 temp = coldry(k) * chi_mls(2,jp(k)+1)
5073 ratco2 = colamt(k,2) / temp
5074 if (ratco2 > 3.0) then
5075 adjfac = 2.0 + (ratco2-2.0)**0.77
5076 adjcolco2 = adjfac * temp
5077 else
5078 adjcolco2 = colamt(k,2)
5079 endif
5080
5081 do ig = 1, ng06
5082 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
5083 & * (selfref(ig,indsp) - selfref(ig,inds)))
5084 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5085 & * (forref(ig,indfp) - forref(ig,indf)))
5086 absco2 = ka_mco2(ig,indm) + minorfrac(k) &
5087 & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm))
5088
5089 taug(ns06+ig,k) = colamt(k,1) &
5090 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
5091 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
5092 & + tauself + taufor + adjcolco2*absco2 &
5093 & + wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig)
5094
5095 fracs(ns06+ig,k) = fracrefa(ig)
5096 enddo
5097 enddo
5098
5099! --- ... upper atmosphere loop
5100! nothing important goes on above laytrop in this band.
5101
5102 do k = laytrop+1, nlay
5103 do ig = 1, ng06
5104 taug(ns06+ig,k) = wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig)
5105
5106 fracs(ns06+ig,k) = fracrefa(ig)
5107 enddo
5108 enddo
5109
5110! ..................................
5111 end subroutine taugb06
5112! ----------------------------------
5113
5117! ----------------------------------
5118 subroutine taugb07
5119! ..................................
5120
5121! ------------------------------------------------------------------ !
5122! band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) !
5123! (high key - o3; high minor - co2) !
5124! ------------------------------------------------------------------ !
5125
5127
5128! --- locals:
5129 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5130 & id000, id010, id100, id110, id200, id210, indm, indmp, &
5131 & id001, id011, id101, id111, id201, id211, jmco2, jmco2p, &
5132 & jpl, jplp, ig, js, js1
5133
5134 real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, &
5135 & speccomb, specparm, specmult, fs, &
5136 & speccomb1, specparm1, specmult1, fs1, &
5137 & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, &
5138 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
5139 & refrat_planck_a, refrat_m_a, ratco2, adjfac, adjcolco2, &
5140 & fac000, fac100, fac200, fac010, fac110, fac210, &
5141 & fac001, fac101, fac201, fac011, fac111, fac211, &
5142 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp
5143!
5144!===> ... begin here
5145!
5146! --- ... minor gas mapping level :
5147! lower - co2, p = 706.2620 mbar, t= 278.94 k
5148! upper - co2, p = 12.9350 mbar, t = 234.01 k
5149
5150! --- ... calculate reference ratio to be used in calculation of Planck
5151! fraction in lower atmosphere.
5152
5153 refrat_planck_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2620 mb
5154 refrat_m_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2720 mb
5155
5156! --- ... lower atmosphere loop
5157
5158 do k = 1, laytrop
5159 speccomb = colamt(k,1) + rfrate(k,2,1)*colamt(k,3)
5160 specparm = colamt(k,1) / speccomb
5161 specmult = 8.0 * min(specparm, oneminus)
5162 js = 1 + int(specmult)
5163 fs = mod(specmult, f_one)
5164 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(7) + js
5165
5166 speccomb1 = colamt(k,1) + rfrate(k,2,2)*colamt(k,3)
5167 specparm1 = colamt(k,1) / speccomb1
5168 specmult1 = 8.0 * min(specparm1, oneminus)
5169 js1 = 1 + int(specmult1)
5170 fs1 = mod(specmult1, f_one)
5171 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(7) + js1
5172
5173 speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,3)
5174 specparm_mco2 = colamt(k,1) / speccomb_mco2
5175 specmult_mco2 = 8.0 * min(specparm_mco2, oneminus)
5176 jmco2 = 1 + int(specmult_mco2)
5177 fmco2 = mod(specmult_mco2, f_one)
5178
5179 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,3)
5180 specparm_planck = colamt(k,1) / speccomb_planck
5181 specmult_planck = 8.0 * min(specparm_planck, oneminus)
5182 jpl = 1 + int(specmult_planck)
5183 fpl = mod(specmult_planck, f_one)
5184
5185 inds = indself(k)
5186 indf = indfor(k)
5187 indm = indminor(k)
5188 indsp = inds + 1
5189 indfp = indf + 1
5190 indmp = indm + 1
5191 jplp = jpl + 1
5192 jmco2p= jmco2+ 1
5193 ind0p = ind0 + 1
5194 ind1p = ind1 + 1
5195
5196! --- ... in atmospheres where the amount of CO2 is too great to be considered
5197! a minor species, adjust the column amount of CO2 by an empirical factor
5198! to obtain the proper contribution.
5199
5200 temp = coldry(k) * chi_mls(2,jp(k)+1)
5201 ratco2 = colamt(k,2) / temp
5202 if (ratco2 > 3.0) then
5203 adjfac = 3.0 + (ratco2-3.0)**0.79
5204 adjcolco2 = adjfac * temp
5205 else
5206 adjcolco2 = colamt(k,2)
5207 endif
5208
5209 if (specparm < 0.125) then
5210 p0 = fs - f_one
5211 p40 = p0**4
5212 fk00 = p40
5213 fk10 = f_one - p0 - 2.0*p40
5214 fk20 = p0 + p40
5215
5216 id000 = ind0
5217 id010 = ind0 + 9
5218 id100 = ind0 + 1
5219 id110 = ind0 +10
5220 id200 = ind0 + 2
5221 id210 = ind0 +11
5222 elseif (specparm > 0.875) then
5223 p0 = -fs
5224 p40 = p0**4
5225 fk00 = p40
5226 fk10 = f_one - p0 - 2.0*p40
5227 fk20 = p0 + p40
5228
5229 id000 = ind0 + 1
5230 id010 = ind0 +10
5231 id100 = ind0
5232 id110 = ind0 + 9
5233 id200 = ind0 - 1
5234 id210 = ind0 + 8
5235 else
5236 fk00 = f_one - fs
5237 fk10 = fs
5238 fk20 = f_zero
5239
5240 id000 = ind0
5241 id010 = ind0 + 9
5242 id100 = ind0 + 1
5243 id110 = ind0 +10
5244 id200 = ind0
5245 id210 = ind0
5246 endif
5247
5248 fac000 = fk00 * fac00(k)
5249 fac100 = fk10 * fac00(k)
5250 fac200 = fk20 * fac00(k)
5251 fac010 = fk00 * fac10(k)
5252 fac110 = fk10 * fac10(k)
5253 fac210 = fk20 * fac10(k)
5254
5255 if (specparm1 < 0.125) then
5256 p1 = fs1 - f_one
5257 p41 = p1**4
5258 fk01 = p41
5259 fk11 = f_one - p1 - 2.0*p41
5260 fk21 = p1 + p41
5261
5262 id001 = ind1
5263 id011 = ind1 + 9
5264 id101 = ind1 + 1
5265 id111 = ind1 +10
5266 id201 = ind1 + 2
5267 id211 = ind1 +11
5268 elseif (specparm1 > 0.875) then
5269 p1 = -fs1
5270 p41 = p1**4
5271 fk01 = p41
5272 fk11 = f_one - p1 - 2.0*p41
5273 fk21 = p1 + p41
5274
5275 id001 = ind1 + 1
5276 id011 = ind1 +10
5277 id101 = ind1
5278 id111 = ind1 + 9
5279 id201 = ind1 - 1
5280 id211 = ind1 + 8
5281 else
5282 fk01 = f_one - fs1
5283 fk11 = fs1
5284 fk21 = f_zero
5285
5286 id001 = ind1
5287 id011 = ind1 + 9
5288 id101 = ind1 + 1
5289 id111 = ind1 +10
5290 id201 = ind1
5291 id211 = ind1
5292 endif
5293
5294 fac001 = fk01 * fac01(k)
5295 fac101 = fk11 * fac01(k)
5296 fac201 = fk21 * fac01(k)
5297 fac011 = fk01 * fac11(k)
5298 fac111 = fk11 * fac11(k)
5299 fac211 = fk21 * fac11(k)
5300
5301 do ig = 1, ng07
5302 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
5303 & * (selfref(ig,indsp) - selfref(ig,inds)))
5304 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5305 & * (forref(ig,indfp) - forref(ig,indf)))
5306 co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 &
5307 & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm))
5308 co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 &
5309 & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp))
5310 absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1)
5311
5312 taug(ns07+ig,k) = speccomb &
5313 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
5314 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
5315 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
5316 & + speccomb1 &
5317 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
5318 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
5319 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
5320 & + tauself + taufor + adjcolco2*absco2
5321
5322 fracs(ns07+ig,k) = fracrefa(ig,jpl) + fpl &
5323 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
5324 enddo
5325 enddo
5326
5327! --- ... upper atmosphere loop
5328
5329! --- ... in atmospheres where the amount of co2 is too great to be considered
5330! a minor species, adjust the column amount of co2 by an empirical factor
5331! to obtain the proper contribution.
5332
5333 do k = laytrop+1, nlay
5334 temp = coldry(k) * chi_mls(2,jp(k)+1)
5335 ratco2 = colamt(k,2) / temp
5336 if (ratco2 > 3.0) then
5337 adjfac = 2.0 + (ratco2-2.0)**0.79
5338 adjcolco2 = adjfac * temp
5339 else
5340 adjcolco2 = colamt(k,2)
5341 endif
5342
5343 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(7) + 1
5344 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(7) + 1
5345
5346 indm = indminor(k)
5347 indmp = indm + 1
5348 ind0p = ind0 + 1
5349 ind1p = ind1 + 1
5350
5351 do ig = 1, ng07
5352 absco2 = kb_mco2(ig,indm) + minorfrac(k) &
5353 & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm))
5354
5355 taug(ns07+ig,k) = colamt(k,3) &
5356 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
5357 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
5358 & + adjcolco2 * absco2
5359
5360 fracs(ns07+ig,k) = fracrefb(ig)
5361 enddo
5362
5363! --- ... empirical modification to code to improve stratospheric cooling rates
5364! for o3. revised to apply weighting for g-point reduction in this band.
5365
5366 taug(ns07+ 6,k) = taug(ns07+ 6,k) * 0.92
5367 taug(ns07+ 7,k) = taug(ns07+ 7,k) * 0.88
5368 taug(ns07+ 8,k) = taug(ns07+ 8,k) * 1.07
5369 taug(ns07+ 9,k) = taug(ns07+ 9,k) * 1.1
5370 taug(ns07+10,k) = taug(ns07+10,k) * 0.99
5371 taug(ns07+11,k) = taug(ns07+11,k) * 0.855
5372 enddo
5373
5374! ..................................
5375 end subroutine taugb07
5376! ----------------------------------
5377
5381! ----------------------------------
5382 subroutine taugb08
5383! ..................................
5384
5385! ------------------------------------------------------------------ !
5386! band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) !
5387! (high key - o3; high minor - co2, n2o) !
5388! ------------------------------------------------------------------ !
5389
5391
5392! --- locals:
5393 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5394 & indm, indmp, ig
5395
5396 real (kind=kind_phys) :: tauself, taufor, absco2, abso3, absn2o, &
5397 & ratco2, adjfac, adjcolco2, temp
5398!
5399!===> ... begin here
5400!
5401! --- ... minor gas mapping level:
5402! lower - co2, p = 1053.63 mb, t = 294.2 k
5403! lower - o3, p = 317.348 mb, t = 240.77 k
5404! lower - n2o, p = 706.2720 mb, t= 278.94 k
5405! lower - cfc12,cfc11
5406! upper - co2, p = 35.1632 mb, t = 223.28 k
5407! upper - n2o, p = 8.716e-2 mb, t = 226.03 k
5408
5409! --- ... lower atmosphere loop
5410
5411 do k = 1, laytrop
5412 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(8) + 1
5413 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(8) + 1
5414
5415 inds = indself(k)
5416 indf = indfor(k)
5417 indm = indminor(k)
5418 ind0p = ind0 + 1
5419 ind1p = ind1 + 1
5420 indsp = inds + 1
5421 indfp = indf + 1
5422 indmp = indm + 1
5423
5424! --- ... in atmospheres where the amount of co2 is too great to be considered
5425! a minor species, adjust the column amount of co2 by an empirical factor
5426! to obtain the proper contribution.
5427
5428 temp = coldry(k) * chi_mls(2,jp(k)+1)
5429 ratco2 = colamt(k,2) / temp
5430 if (ratco2 > 3.0) then
5431 adjfac = 2.0 + (ratco2-2.0)**0.65
5432 adjcolco2 = adjfac * temp
5433 else
5434 adjcolco2 = colamt(k,2)
5435 endif
5436
5437 do ig = 1, ng08
5438 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
5439 & * (selfref(ig,indsp) - selfref(ig,inds)))
5440 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5441 & * (forref(ig,indfp) - forref(ig,indf)))
5442 absco2 = (ka_mco2(ig,indm) + minorfrac(k) &
5443 & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm)))
5444 abso3 = (ka_mo3(ig,indm) + minorfrac(k) &
5445 & * (ka_mo3(ig,indmp) - ka_mo3(ig,indm)))
5446 absn2o = (ka_mn2o(ig,indm) + minorfrac(k) &
5447 & * (ka_mn2o(ig,indmp) - ka_mn2o(ig,indm)))
5448
5449 taug(ns08+ig,k) = colamt(k,1) &
5450 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
5451 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
5452 & + tauself+taufor + adjcolco2*absco2 &
5453 & + colamt(k,3)*abso3 + colamt(k,4)*absn2o &
5454 & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig)
5455
5456 fracs(ns08+ig,k) = fracrefa(ig)
5457 enddo
5458 enddo
5459
5460! --- ... upper atmosphere loop
5461
5462 do k = laytrop+1, nlay
5463 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(8) + 1
5464 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(8) + 1
5465
5466 indm = indminor(k)
5467 ind0p = ind0 + 1
5468 ind1p = ind1 + 1
5469 indmp = indm + 1
5470
5471! --- ... in atmospheres where the amount of co2 is too great to be considered
5472! a minor species, adjust the column amount of co2 by an empirical factor
5473! to obtain the proper contribution.
5474
5475 temp = coldry(k) * chi_mls(2,jp(k)+1)
5476 ratco2 = colamt(k,2) / temp
5477 if (ratco2 > 3.0) then
5478 adjfac = 2.0 + (ratco2-2.0)**0.65
5479 adjcolco2 = adjfac * temp
5480 else
5481 adjcolco2 = colamt(k,2)
5482 endif
5483
5484 do ig = 1, ng08
5485 absco2 = (kb_mco2(ig,indm) + minorfrac(k) &
5486 & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm)))
5487 absn2o = (kb_mn2o(ig,indm) + minorfrac(k) &
5488 & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm)))
5489
5490 taug(ns08+ig,k) = colamt(k,3) &
5491 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
5492 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
5493 & + adjcolco2*absco2 + colamt(k,4)*absn2o &
5494 & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig)
5495
5496 fracs(ns08+ig,k) = fracrefb(ig)
5497 enddo
5498 enddo
5499
5500! ..................................
5501 end subroutine taugb08
5502! ----------------------------------
5503
5507! ----------------------------------
5508 subroutine taugb09
5509! ..................................
5510
5511! ------------------------------------------------------------------ !
5512! band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) !
5513! (high key - ch4; high minor - n2o) !
5514! ------------------------------------------------------------------ !
5515
5517
5518! --- locals:
5519 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5520 & id000, id010, id100, id110, id200, id210, indm, indmp, &
5521 & id001, id011, id101, id111, id201, id211, jmn2o, jmn2op, &
5522 & jpl, jplp, ig, js, js1
5523
5524 real (kind=kind_phys) :: tauself, taufor, n2om1, n2om2, absn2o, &
5525 & speccomb, specparm, specmult, fs, &
5526 & speccomb1, specparm1, specmult1, fs1, &
5527 & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, &
5528 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
5529 & refrat_planck_a, refrat_m_a, ratn2o, adjfac, adjcoln2o, &
5530 & fac000, fac100, fac200, fac010, fac110, fac210, &
5531 & fac001, fac101, fac201, fac011, fac111, fac211, &
5532 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp
5533!
5534!===> ... begin here
5535!
5536! --- ... minor gas mapping level :
5537! lower - n2o, p = 706.272 mbar, t = 278.94 k
5538! upper - n2o, p = 95.58 mbar, t = 215.7 k
5539
5540! --- ... calculate reference ratio to be used in calculation of Planck
5541! fraction in lower/upper atmosphere.
5542
5543 refrat_planck_a = chi_mls(1,9)/chi_mls(6,9) ! P = 212 mb
5544 refrat_m_a = chi_mls(1,3)/chi_mls(6,3) ! P = 706.272 mb
5545
5546! --- ... lower atmosphere loop
5547
5548 do k = 1, laytrop
5549 speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5)
5550 specparm = colamt(k,1) / speccomb
5551 specmult = 8.0 * min(specparm, oneminus)
5552 js = 1 + int(specmult)
5553 fs = mod(specmult, f_one)
5554 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(9) + js
5555
5556 speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5)
5557 specparm1 = colamt(k,1) / speccomb1
5558 specmult1 = 8.0 * min(specparm1, oneminus)
5559 js1 = 1 + int(specmult1)
5560 fs1 = mod(specmult1, f_one)
5561 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(9) + js1
5562
5563 speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,5)
5564 specparm_mn2o = colamt(k,1) / speccomb_mn2o
5565 specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus)
5566 jmn2o = 1 + int(specmult_mn2o)
5567 fmn2o = mod(specmult_mn2o, f_one)
5568
5569 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5)
5570 specparm_planck = colamt(k,1) / speccomb_planck
5571 specmult_planck = 8.0 * min(specparm_planck, oneminus)
5572 jpl = 1 + int(specmult_planck)
5573 fpl = mod(specmult_planck, f_one)
5574
5575 inds = indself(k)
5576 indf = indfor(k)
5577 indm = indminor(k)
5578 indsp = inds + 1
5579 indfp = indf + 1
5580 indmp = indm + 1
5581 jplp = jpl + 1
5582 jmn2op= jmn2o+ 1
5583
5584! --- ... in atmospheres where the amount of n2o is too great to be considered
5585! a minor species, adjust the column amount of n2o by an empirical factor
5586! to obtain the proper contribution.
5587
5588 temp = coldry(k) * chi_mls(4,jp(k)+1)
5589 ratn2o = colamt(k,4) / temp
5590 if (ratn2o > 1.5) then
5591 adjfac = 0.5 + (ratn2o-0.5)**0.65
5592 adjcoln2o = adjfac * temp
5593 else
5594 adjcoln2o = colamt(k,4)
5595 endif
5596
5597 if (specparm < 0.125) then
5598 p0 = fs - f_one
5599 p40 = p0**4
5600 fk00 = p40
5601 fk10 = f_one - p0 - 2.0*p40
5602 fk20 = p0 + p40
5603
5604 id000 = ind0
5605 id010 = ind0 + 9
5606 id100 = ind0 + 1
5607 id110 = ind0 +10
5608 id200 = ind0 + 2
5609 id210 = ind0 +11
5610 elseif (specparm > 0.875) then
5611 p0 = -fs
5612 p40 = p0**4
5613 fk00 = p40
5614 fk10 = f_one - p0 - 2.0*p40
5615 fk20 = p0 + p40
5616
5617 id000 = ind0 + 1
5618 id010 = ind0 +10
5619 id100 = ind0
5620 id110 = ind0 + 9
5621 id200 = ind0 - 1
5622 id210 = ind0 + 8
5623 else
5624 fk00 = f_one - fs
5625 fk10 = fs
5626 fk20 = f_zero
5627
5628 id000 = ind0
5629 id010 = ind0 + 9
5630 id100 = ind0 + 1
5631 id110 = ind0 +10
5632 id200 = ind0
5633 id210 = ind0
5634 endif
5635
5636 fac000 = fk00 * fac00(k)
5637 fac100 = fk10 * fac00(k)
5638 fac200 = fk20 * fac00(k)
5639 fac010 = fk00 * fac10(k)
5640 fac110 = fk10 * fac10(k)
5641 fac210 = fk20 * fac10(k)
5642
5643 if (specparm1 < 0.125) then
5644 p1 = fs1 - f_one
5645 p41 = p1**4
5646 fk01 = p41
5647 fk11 = f_one - p1 - 2.0*p41
5648 fk21 = p1 + p41
5649
5650 id001 = ind1
5651 id011 = ind1 + 9
5652 id101 = ind1 + 1
5653 id111 = ind1 +10
5654 id201 = ind1 + 2
5655 id211 = ind1 +11
5656 elseif (specparm1 > 0.875) then
5657 p1 = -fs1
5658 p41 = p1**4
5659 fk01 = p41
5660 fk11 = f_one - p1 - 2.0*p41
5661 fk21 = p1 + p41
5662
5663 id001 = ind1 + 1
5664 id011 = ind1 +10
5665 id101 = ind1
5666 id111 = ind1 + 9
5667 id201 = ind1 - 1
5668 id211 = ind1 + 8
5669 else
5670 fk01 = f_one - fs1
5671 fk11 = fs1
5672 fk21 = f_zero
5673
5674 id001 = ind1
5675 id011 = ind1 + 9
5676 id101 = ind1 + 1
5677 id111 = ind1 +10
5678 id201 = ind1
5679 id211 = ind1
5680 endif
5681
5682 fac001 = fk01 * fac01(k)
5683 fac101 = fk11 * fac01(k)
5684 fac201 = fk21 * fac01(k)
5685 fac011 = fk01 * fac11(k)
5686 fac111 = fk11 * fac11(k)
5687 fac211 = fk21 * fac11(k)
5688
5689 do ig = 1, ng09
5690 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
5691 & * (selfref(ig,indsp) - selfref(ig,inds)))
5692 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5693 & * (forref(ig,indfp) - forref(ig,indf)))
5694 n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o &
5695 & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm))
5696 n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o &
5697 & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp))
5698 absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1)
5699
5700 taug(ns09+ig,k) = speccomb &
5701 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
5702 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
5703 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
5704 & + speccomb1 &
5705 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
5706 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
5707 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
5708 & + tauself + taufor + adjcoln2o*absn2o
5709
5710 fracs(ns09+ig,k) = fracrefa(ig,jpl) + fpl &
5711 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
5712 enddo
5713 enddo
5714
5715! --- ... upper atmosphere loop
5716
5717 do k = laytrop+1, nlay
5718 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(9) + 1
5719 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(9) + 1
5720
5721 indm = indminor(k)
5722 ind0p = ind0 + 1
5723 ind1p = ind1 + 1
5724 indmp = indm + 1
5725
5726! --- ... in atmospheres where the amount of n2o is too great to be considered
5727! a minor species, adjust the column amount of n2o by an empirical factor
5728! to obtain the proper contribution.
5729
5730 temp = coldry(k) * chi_mls(4,jp(k)+1)
5731 ratn2o = colamt(k,4) / temp
5732 if (ratn2o > 1.5) then
5733 adjfac = 0.5 + (ratn2o - 0.5)**0.65
5734 adjcoln2o = adjfac * temp
5735 else
5736 adjcoln2o = colamt(k,4)
5737 endif
5738
5739 do ig = 1, ng09
5740 absn2o = kb_mn2o(ig,indm) + minorfrac(k) &
5741 & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm))
5742
5743 taug(ns09+ig,k) = colamt(k,5) &
5744 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
5745 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
5746 & + adjcoln2o*absn2o
5747
5748 fracs(ns09+ig,k) = fracrefb(ig)
5749 enddo
5750 enddo
5751
5752! ..................................
5753 end subroutine taugb09
5754! ----------------------------------
5755
5758! ----------------------------------
5759 subroutine taugb10
5760! ..................................
5761
5762! ------------------------------------------------------------------ !
5763! band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o) !
5764! ------------------------------------------------------------------ !
5765
5767
5768! --- locals:
5769 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5770 & ig
5771
5772 real (kind=kind_phys) :: tauself, taufor
5773!
5774!===> ... begin here
5775!
5776! --- ... lower atmosphere loop
5777
5778 do k = 1, laytrop
5779 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(10) + 1
5780 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(10) + 1
5781
5782 inds = indself(k)
5783 indf = indfor(k)
5784 ind0p = ind0 + 1
5785 ind1p = ind1 + 1
5786 indsp = inds + 1
5787 indfp = indf + 1
5788
5789 do ig = 1, ng10
5790 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
5791 & * (selfref(ig,indsp) - selfref(ig,inds)))
5792 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5793 & * (forref(ig,indfp) - forref(ig,indf)))
5794
5795 taug(ns10+ig,k) = colamt(k,1) &
5796 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
5797 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
5798 & + tauself + taufor
5799
5800 fracs(ns10+ig,k) = fracrefa(ig)
5801 enddo
5802 enddo
5803
5804! --- ... upper atmosphere loop
5805
5806 do k = laytrop+1, nlay
5807 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(10) + 1
5808 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(10) + 1
5809
5810 indf = indfor(k)
5811 ind0p = ind0 + 1
5812 ind1p = ind1 + 1
5813 indfp = indf + 1
5814
5815 do ig = 1, ng10
5816 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5817 & * (forref(ig,indfp) - forref(ig,indf)))
5818
5819 taug(ns10+ig,k) = colamt(k,1) &
5820 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
5821 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
5822 & + taufor
5823
5824 fracs(ns10+ig,k) = fracrefb(ig)
5825 enddo
5826 enddo
5827
5828! ..................................
5829 end subroutine taugb10
5830! ----------------------------------
5831
5835! ----------------------------------
5836 subroutine taugb11
5837! ..................................
5838
5839! ------------------------------------------------------------------ !
5840! band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) !
5841! (high key - h2o; high minor - o2) !
5842! ------------------------------------------------------------------ !
5843
5845
5846! --- locals:
5847 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
5848 & indm, indmp, ig
5849
5850 real (kind=kind_phys) :: scaleo2, tauself, taufor, tauo2
5851!
5852!===> ... begin here
5853!
5854! --- ... minor gas mapping level :
5855! lower - o2, p = 706.2720 mbar, t = 278.94 k
5856! upper - o2, p = 4.758820 mbarm t = 250.85 k
5857
5858! --- ... lower atmosphere loop
5859
5860 do k = 1, laytrop
5861 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(11) + 1
5862 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(11) + 1
5863
5864 inds = indself(k)
5865 indf = indfor(k)
5866 indm = indminor(k)
5867 ind0p = ind0 + 1
5868 ind1p = ind1 + 1
5869 indsp = inds + 1
5870 indfp = indf + 1
5871 indmp = indm + 1
5872
5873 scaleo2 = colamt(k,6) * scaleminor(k)
5874
5875 do ig = 1, ng11
5876 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
5877 & * (selfref(ig,indsp) - selfref(ig,inds)))
5878 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5879 & * (forref(ig,indfp) - forref(ig,indf)))
5880 tauo2 = scaleo2 * (ka_mo2(ig,indm) + minorfrac(k) &
5881 & * (ka_mo2(ig,indmp) - ka_mo2(ig,indm)))
5882
5883 taug(ns11+ig,k) = colamt(k,1) &
5884 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
5885 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
5886 & + tauself + taufor + tauo2
5887
5888 fracs(ns11+ig,k) = fracrefa(ig)
5889 enddo
5890 enddo
5891
5892! --- ... upper atmosphere loop
5893
5894 do k = laytrop+1, nlay
5895 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(11) + 1
5896 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(11) + 1
5897
5898 indf = indfor(k)
5899 indm = indminor(k)
5900 ind0p = ind0 + 1
5901 ind1p = ind1 + 1
5902 indfp = indf + 1
5903 indmp = indm + 1
5904
5905 scaleo2 = colamt(k,6) * scaleminor(k)
5906
5907 do ig = 1, ng11
5908 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
5909 & * (forref(ig,indfp) - forref(ig,indf)))
5910 tauo2 = scaleo2 * (kb_mo2(ig,indm) + minorfrac(k) &
5911 & * (kb_mo2(ig,indmp) - kb_mo2(ig,indm)))
5912
5913 taug(ns11+ig,k) = colamt(k,1) &
5914 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
5915 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) &
5916 & + taufor + tauo2
5917
5918 fracs(ns11+ig,k) = fracrefb(ig)
5919 enddo
5920 enddo
5921
5922! ..................................
5923 end subroutine taugb11
5924! ----------------------------------
5925
5928! ----------------------------------
5929 subroutine taugb12
5930! ..................................
5931
5932! ------------------------------------------------------------------ !
5933! band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) !
5934! ------------------------------------------------------------------ !
5935
5937
5938! --- locals:
5939 integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, &
5940 & id000, id010, id100, id110, id200, id210, ig, js, js1, &
5941 & id001, id011, id101, id111, id201, id211
5942
5943 real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, &
5944 & speccomb, specparm, specmult, fs, &
5945 & speccomb1, specparm1, specmult1, fs1, &
5946 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
5947 & fac000, fac100, fac200, fac010, fac110, fac210, &
5948 & fac001, fac101, fac201, fac011, fac111, fac211, &
5949 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21
5950!
5951!===> ... begin here
5952!
5953! --- ... calculate reference ratio to be used in calculation of Planck
5954! fraction in lower/upper atmosphere.
5955
5956 refrat_planck_a = chi_mls(1,10)/chi_mls(2,10) ! P = 174.164 mb
5957
5958! --- ... lower atmosphere loop
5959
5960 do k = 1, laytrop
5961 speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2)
5962 specparm = colamt(k,1) / speccomb
5963 specmult = 8.0 * min(specparm, oneminus)
5964 js = 1 + int(specmult)
5965 fs = mod(specmult, f_one)
5966 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(12) + js
5967
5968 speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2)
5969 specparm1 = colamt(k,1) / speccomb1
5970 specmult1 = 8.0 * min(specparm1, oneminus)
5971 js1 = 1 + int(specmult1)
5972 fs1 = mod(specmult1, f_one)
5973 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(12) + js1
5974
5975 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2)
5976 specparm_planck = colamt(k,1) / speccomb_planck
5977 if (specparm_planck >= oneminus) specparm_planck=oneminus
5978 specmult_planck = 8.0 * specparm_planck
5979 jpl = 1 + int(specmult_planck)
5980 fpl = mod(specmult_planck, f_one)
5981
5982 inds = indself(k)
5983 indf = indfor(k)
5984 indsp = inds + 1
5985 indfp = indf + 1
5986 jplp = jpl + 1
5987
5988 if (specparm < 0.125) then
5989 p0 = fs - f_one
5990 p40 = p0**4
5991 fk00 = p40
5992 fk10 = f_one - p0 - 2.0*p40
5993 fk20 = p0 + p40
5994
5995 id000 = ind0
5996 id010 = ind0 + 9
5997 id100 = ind0 + 1
5998 id110 = ind0 +10
5999 id200 = ind0 + 2
6000 id210 = ind0 +11
6001 elseif (specparm > 0.875) then
6002 p0 = -fs
6003 p40 = p0**4
6004 fk00 = p40
6005 fk10 = f_one - p0 - 2.0*p40
6006 fk20 = p0 + p40
6007
6008 id000 = ind0 + 1
6009 id010 = ind0 +10
6010 id100 = ind0
6011 id110 = ind0 + 9
6012 id200 = ind0 - 1
6013 id210 = ind0 + 8
6014 else
6015 fk00 = f_one - fs
6016 fk10 = fs
6017 fk20 = f_zero
6018
6019 id000 = ind0
6020 id010 = ind0 + 9
6021 id100 = ind0 + 1
6022 id110 = ind0 +10
6023 id200 = ind0
6024 id210 = ind0
6025 endif
6026
6027 fac000 = fk00 * fac00(k)
6028 fac100 = fk10 * fac00(k)
6029 fac200 = fk20 * fac00(k)
6030 fac010 = fk00 * fac10(k)
6031 fac110 = fk10 * fac10(k)
6032 fac210 = fk20 * fac10(k)
6033
6034 if (specparm1 < 0.125) then
6035 p1 = fs1 - f_one
6036 p41 = p1**4
6037 fk01 = p41
6038 fk11 = f_one - p1 - 2.0*p41
6039 fk21 = p1 + p41
6040
6041 id001 = ind1
6042 id011 = ind1 + 9
6043 id101 = ind1 + 1
6044 id111 = ind1 +10
6045 id201 = ind1 + 2
6046 id211 = ind1 +11
6047 elseif (specparm1 > 0.875) then
6048 p1 = -fs1
6049 p41 = p1**4
6050 fk01 = p41
6051 fk11 = f_one - p1 - 2.0*p41
6052 fk21 = p1 + p41
6053
6054 id001 = ind1 + 1
6055 id011 = ind1 +10
6056 id101 = ind1
6057 id111 = ind1 + 9
6058 id201 = ind1 - 1
6059 id211 = ind1 + 8
6060 else
6061 fk01 = f_one - fs1
6062 fk11 = fs1
6063 fk21 = f_zero
6064
6065 id001 = ind1
6066 id011 = ind1 + 9
6067 id101 = ind1 + 1
6068 id111 = ind1 +10
6069 id201 = ind1
6070 id211 = ind1
6071 endif
6072
6073 fac001 = fk01 * fac01(k)
6074 fac101 = fk11 * fac01(k)
6075 fac201 = fk21 * fac01(k)
6076 fac011 = fk01 * fac11(k)
6077 fac111 = fk11 * fac11(k)
6078 fac211 = fk21 * fac11(k)
6079
6080 do ig = 1, ng12
6081 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
6082 & * (selfref(ig,indsp) - selfref(ig,inds)))
6083 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
6084 & * (forref(ig,indfp) - forref(ig,indf)))
6085
6086 taug(ns12+ig,k) = speccomb &
6087 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
6088 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
6089 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
6090 & + speccomb1 &
6091 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
6092 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
6093 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
6094 & + tauself + taufor
6095
6096 fracs(ns12+ig,k) = fracrefa(ig,jpl) + fpl &
6097 & *(fracrefa(ig,jplp) - fracrefa(ig,jpl))
6098 enddo
6099 enddo
6100
6101! --- ... upper atmosphere loop
6102
6103 do k = laytrop+1, nlay
6104 do ig = 1, ng12
6105 taug(ns12+ig,k) = f_zero
6106 fracs(ns12+ig,k) = f_zero
6107 enddo
6108 enddo
6109
6110! ..................................
6111 end subroutine taugb12
6112! ----------------------------------
6113
6116! ----------------------------------
6117 subroutine taugb13
6118! ..................................
6119
6120! ------------------------------------------------------------------ !
6121! band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor) !
6122! ------------------------------------------------------------------ !
6123
6125
6126! --- locals:
6127 integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, &
6128 & id000, id010, id100, id110, id200, id210, jmco2, jpl, &
6129 & id001, id011, id101, id111, id201, id211, jmco2p, jplp, &
6130 & jmco, jmcop, ig, js, js1
6131
6132 real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, &
6133 & speccomb, specparm, specmult, fs, &
6134 & speccomb1, specparm1, specmult1, fs1, &
6135 & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, &
6136 & speccomb_mco, specparm_mco, specmult_mco, fmco, &
6137 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
6138 & refrat_planck_a, refrat_m_a, refrat_m_a3, ratco2, &
6139 & adjfac, adjcolco2, com1, com2, absco, abso3, &
6140 & fac000, fac100, fac200, fac010, fac110, fac210, &
6141 & fac001, fac101, fac201, fac011, fac111, fac211, &
6142 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp
6143!
6144!===> ... begin here
6145!
6146! --- ... minor gas mapping levels :
6147! lower - co2, p = 1053.63 mb, t = 294.2 k
6148! lower - co, p = 706 mb, t = 278.94 k
6149! upper - o3, p = 95.5835 mb, t = 215.7 k
6150
6151! --- ... calculate reference ratio to be used in calculation of Planck
6152! fraction in lower/upper atmosphere.
6153
6154 refrat_planck_a = chi_mls(1,5)/chi_mls(4,5) ! P = 473.420 mb (Level 5)
6155 refrat_m_a = chi_mls(1,1)/chi_mls(4,1) ! P = 1053. (Level 1)
6156 refrat_m_a3 = chi_mls(1,3)/chi_mls(4,3) ! P = 706. (Level 3)
6157
6158! --- ... lower atmosphere loop
6159
6160 do k = 1, laytrop
6161 speccomb = colamt(k,1) + rfrate(k,3,1)*colamt(k,4)
6162 specparm = colamt(k,1) / speccomb
6163 specmult = 8.0 * min(specparm, oneminus)
6164 js = 1 + int(specmult)
6165 fs = mod(specmult, f_one)
6166 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(13) + js
6167
6168 speccomb1 = colamt(k,1) + rfrate(k,3,2)*colamt(k,4)
6169 specparm1 = colamt(k,1) / speccomb1
6170 specmult1 = 8.0 * min(specparm1, oneminus)
6171 js1 = 1 + int(specmult1)
6172 fs1 = mod(specmult1, f_one)
6173 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(13) + js1
6174
6175 speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,4)
6176 specparm_mco2 = colamt(k,1) / speccomb_mco2
6177 specmult_mco2 = 8.0 * min(specparm_mco2, oneminus)
6178 jmco2 = 1 + int(specmult_mco2)
6179 fmco2 = mod(specmult_mco2, f_one)
6180
6181! --- ... in atmospheres where the amount of co2 is too great to be considered
6182! a minor species, adjust the column amount of co2 by an empirical factor
6183! to obtain the proper contribution.
6184
6185 speccomb_mco = colamt(k,1) + refrat_m_a3*colamt(k,4)
6186 specparm_mco = colamt(k,1) / speccomb_mco
6187 specmult_mco = 8.0 * min(specparm_mco, oneminus)
6188 jmco = 1 + int(specmult_mco)
6189 fmco = mod(specmult_mco, f_one)
6190
6191 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,4)
6192 specparm_planck = colamt(k,1) / speccomb_planck
6193 specmult_planck = 8.0 * min(specparm_planck, oneminus)
6194 jpl = 1 + int(specmult_planck)
6195 fpl = mod(specmult_planck, f_one)
6196
6197 inds = indself(k)
6198 indf = indfor(k)
6199 indm = indminor(k)
6200 indsp = inds + 1
6201 indfp = indf + 1
6202 indmp = indm + 1
6203 jplp = jpl + 1
6204 jmco2p= jmco2+ 1
6205 jmcop = jmco + 1
6206
6207! --- ... in atmospheres where the amount of co2 is too great to be considered
6208! a minor species, adjust the column amount of co2 by an empirical factor
6209! to obtain the proper contribution.
6210
6211 temp = coldry(k) * 3.55e-4
6212 ratco2 = colamt(k,2) / temp
6213 if (ratco2 > 3.0) then
6214 adjfac = 2.0 + (ratco2-2.0)**0.68
6215 adjcolco2 = adjfac * temp
6216 else
6217 adjcolco2 = colamt(k,2)
6218 endif
6219
6220 if (specparm < 0.125) then
6221 p0 = fs - f_one
6222 p40 = p0**4
6223 fk00 = p40
6224 fk10 = f_one - p0 - 2.0*p40
6225 fk20 = p0 + p40
6226
6227 id000 = ind0
6228 id010 = ind0 + 9
6229 id100 = ind0 + 1
6230 id110 = ind0 +10
6231 id200 = ind0 + 2
6232 id210 = ind0 +11
6233 elseif (specparm > 0.875) then
6234 p0 = -fs
6235 p40 = p0**4
6236 fk00 = p40
6237 fk10 = f_one - p0 - 2.0*p40
6238 fk20 = p0 + p40
6239
6240 id000 = ind0 + 1
6241 id010 = ind0 +10
6242 id100 = ind0
6243 id110 = ind0 + 9
6244 id200 = ind0 - 1
6245 id210 = ind0 + 8
6246 else
6247 fk00 = f_one - fs
6248 fk10 = fs
6249 fk20 = f_zero
6250
6251 id000 = ind0
6252 id010 = ind0 + 9
6253 id100 = ind0 + 1
6254 id110 = ind0 +10
6255 id200 = ind0
6256 id210 = ind0
6257 endif
6258
6259 fac000 = fk00 * fac00(k)
6260 fac100 = fk10 * fac00(k)
6261 fac200 = fk20 * fac00(k)
6262 fac010 = fk00 * fac10(k)
6263 fac110 = fk10 * fac10(k)
6264 fac210 = fk20 * fac10(k)
6265
6266 if (specparm1 < 0.125) then
6267 p1 = fs1 - f_one
6268 p41 = p1**4
6269 fk01 = p41
6270 fk11 = f_one - p1 - 2.0*p41
6271 fk21 = p1 + p41
6272
6273 id001 = ind1
6274 id011 = ind1 + 9
6275 id101 = ind1 + 1
6276 id111 = ind1 +10
6277 id201 = ind1 + 2
6278 id211 = ind1 +11
6279 elseif (specparm1 > 0.875) then
6280 p1 = -fs1
6281 p41 = p1**4
6282 fk01 = p41
6283 fk11 = f_one - p1 - 2.0*p41
6284 fk21 = p1 + p41
6285
6286 id001 = ind1 + 1
6287 id011 = ind1 +10
6288 id101 = ind1
6289 id111 = ind1 + 9
6290 id201 = ind1 - 1
6291 id211 = ind1 + 8
6292 else
6293 fk01 = f_one - fs1
6294 fk11 = fs1
6295 fk21 = f_zero
6296
6297 id001 = ind1
6298 id011 = ind1 + 9
6299 id101 = ind1 + 1
6300 id111 = ind1 +10
6301 id201 = ind1
6302 id211 = ind1
6303 endif
6304
6305 fac001 = fk01 * fac01(k)
6306 fac101 = fk11 * fac01(k)
6307 fac201 = fk21 * fac01(k)
6308 fac011 = fk01 * fac11(k)
6309 fac111 = fk11 * fac11(k)
6310 fac211 = fk21 * fac11(k)
6311
6312 do ig = 1, ng13
6313 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
6314 & * (selfref(ig,indsp) - selfref(ig,inds)))
6315 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
6316 & * (forref(ig,indfp) - forref(ig,indf)))
6317 co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 &
6318 & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm))
6319 co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 &
6320 & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp))
6321 absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1)
6322 com1 = ka_mco(ig,jmco,indm) + fmco &
6323 & * (ka_mco(ig,jmcop,indm) - ka_mco(ig,jmco,indm))
6324 com2 = ka_mco(ig,jmco,indmp) + fmco &
6325 & * (ka_mco(ig,jmcop,indmp) - ka_mco(ig,jmco,indmp))
6326 absco = com1 + minorfrac(k) * (com2 - com1)
6327
6328 taug(ns13+ig,k) = speccomb &
6329 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
6330 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
6331 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
6332 & + speccomb1 &
6333 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
6334 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
6335 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
6336 & + tauself + taufor + adjcolco2*absco2 &
6337 & + colamt(k,7)*absco
6338
6339 fracs(ns13+ig,k) = fracrefa(ig,jpl) + fpl &
6340 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
6341 enddo
6342 enddo
6343
6344! --- ... upper atmosphere loop
6345
6346 do k = laytrop+1, nlay
6347 indm = indminor(k)
6348 indmp = indm + 1
6349
6350 do ig = 1, ng13
6351 abso3 = kb_mo3(ig,indm) + minorfrac(k) &
6352 & * (kb_mo3(ig,indmp) - kb_mo3(ig,indm))
6353
6354 taug(ns13+ig,k) = colamt(k,3)*abso3
6355
6356 fracs(ns13+ig,k) = fracrefb(ig)
6357 enddo
6358 enddo
6359
6360! ..................................
6361 end subroutine taugb13
6362! ----------------------------------
6363
6366! ----------------------------------
6367 subroutine taugb14
6368! ..................................
6369
6370! ------------------------------------------------------------------ !
6371! band 14: 2250-2380 cm-1 (low - co2; high - co2) !
6372! ------------------------------------------------------------------ !
6373
6375
6376! --- locals:
6377 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
6378 & ig
6379
6380 real (kind=kind_phys) :: tauself, taufor
6381!
6382!===> ... begin here
6383!
6384! --- ... lower atmosphere loop
6385
6386 do k = 1, laytrop
6387 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(14) + 1
6388 ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(14) + 1
6389
6390 inds = indself(k)
6391 indf = indfor(k)
6392 ind0p = ind0 + 1
6393 ind1p = ind1 + 1
6394 indsp = inds + 1
6395 indfp = indf + 1
6396
6397 do ig = 1, ng14
6398 tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) &
6399 & * (selfref(ig,indsp) - selfref(ig,inds)))
6400 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
6401 & * (forref(ig,indfp) - forref(ig,indf)))
6402
6403 taug(ns14+ig,k) = colamt(k,2) &
6404 & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) &
6405 & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) &
6406 & + tauself + taufor
6407
6408 fracs(ns14+ig,k) = fracrefa(ig)
6409 enddo
6410 enddo
6411
6412! --- ... upper atmosphere loop
6413
6414 do k = laytrop+1, nlay
6415 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(14) + 1
6416 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(14) + 1
6417
6418 ind0p = ind0 + 1
6419 ind1p = ind1 + 1
6420
6421 do ig = 1, ng14
6422 taug(ns14+ig,k) = colamt(k,2) &
6423 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
6424 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p))
6425
6426 fracs(ns14+ig,k) = fracrefb(ig)
6427 enddo
6428 enddo
6429
6430! ..................................
6431 end subroutine taugb14
6432! ----------------------------------
6433
6437! ----------------------------------
6438 subroutine taugb15
6439! ..................................
6440
6441! ------------------------------------------------------------------ !
6442! band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) !
6443! (high - nothing) !
6444! ------------------------------------------------------------------ !
6445
6447
6448! --- locals:
6449 integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, &
6450 & id000, id010, id100, id110, id200, id210, jpl, jplp, &
6451 & id001, id011, id101, id111, id201, id211, jmn2, jmn2p, &
6452 & ig, js, js1
6453
6454 real (kind=kind_phys) :: scalen2, tauself, taufor, &
6455 & speccomb, specparm, specmult, fs, &
6456 & speccomb1, specparm1, specmult1, fs1, &
6457 & speccomb_mn2, specparm_mn2, specmult_mn2, fmn2, &
6458 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
6459 & refrat_planck_a, refrat_m_a, n2m1, n2m2, taun2, &
6460 & fac000, fac100, fac200, fac010, fac110, fac210, &
6461 & fac001, fac101, fac201, fac011, fac111, fac211, &
6462 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21
6463!
6464!===> ... begin here
6465!
6466! --- ... minor gas mapping level :
6467! lower - nitrogen continuum, P = 1053., T = 294.
6468
6469! --- ... calculate reference ratio to be used in calculation of Planck
6470! fraction in lower atmosphere.
6471
6472 refrat_planck_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb (Level 1)
6473 refrat_m_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb
6474
6475! --- ... lower atmosphere loop
6476
6477 do k = 1, laytrop
6478 speccomb = colamt(k,4) + rfrate(k,5,1)*colamt(k,2)
6479 specparm = colamt(k,4) / speccomb
6480 specmult = 8.0 * min(specparm, oneminus)
6481 js = 1 + int(specmult)
6482 fs = mod(specmult, f_one)
6483 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(15) + js
6484
6485 speccomb1 = colamt(k,4) + rfrate(k,5,2)*colamt(k,2)
6486 specparm1 = colamt(k,4) / speccomb1
6487 specmult1 = 8.0 * min(specparm1, oneminus)
6488 js1 = 1 + int(specmult1)
6489 fs1 = mod(specmult1, f_one)
6490 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(15) + js1
6491
6492 speccomb_mn2 = colamt(k,4) + refrat_m_a*colamt(k,2)
6493 specparm_mn2 = colamt(k,4) / speccomb_mn2
6494 specmult_mn2 = 8.0 * min(specparm_mn2, oneminus)
6495 jmn2 = 1 + int(specmult_mn2)
6496 fmn2 = mod(specmult_mn2, f_one)
6497
6498 speccomb_planck = colamt(k,4) + refrat_planck_a*colamt(k,2)
6499 specparm_planck = colamt(k,4) / speccomb_planck
6500 specmult_planck = 8.0 * min(specparm_planck, oneminus)
6501 jpl = 1 + int(specmult_planck)
6502 fpl = mod(specmult_planck, f_one)
6503
6504 scalen2 = colbrd(k) * scaleminor(k)
6505
6506 inds = indself(k)
6507 indf = indfor(k)
6508 indm = indminor(k)
6509 indsp = inds + 1
6510 indfp = indf + 1
6511 indmp = indm + 1
6512 jplp = jpl + 1
6513 jmn2p = jmn2 + 1
6514
6515 if (specparm < 0.125) then
6516 p0 = fs - f_one
6517 p40 = p0**4
6518 fk00 = p40
6519 fk10 = f_one - p0 - 2.0*p40
6520 fk20 = p0 + p40
6521
6522 id000 = ind0
6523 id010 = ind0 + 9
6524 id100 = ind0 + 1
6525 id110 = ind0 +10
6526 id200 = ind0 + 2
6527 id210 = ind0 +11
6528 elseif (specparm > 0.875) then
6529 p0 = -fs
6530 p40 = p0**4
6531 fk00 = p40
6532 fk10 = f_one - p0 - 2.0*p40
6533 fk20 = p0 + p40
6534
6535 id000 = ind0 + 1
6536 id010 = ind0 +10
6537 id100 = ind0
6538 id110 = ind0 + 9
6539 id200 = ind0 - 1
6540 id210 = ind0 + 8
6541 else
6542 fk00 = f_one - fs
6543 fk10 = fs
6544 fk20 = f_zero
6545
6546 id000 = ind0
6547 id010 = ind0 + 9
6548 id100 = ind0 + 1
6549 id110 = ind0 +10
6550 id200 = ind0
6551 id210 = ind0
6552 endif
6553
6554 fac000 = fk00 * fac00(k)
6555 fac100 = fk10 * fac00(k)
6556 fac200 = fk20 * fac00(k)
6557 fac010 = fk00 * fac10(k)
6558 fac110 = fk10 * fac10(k)
6559 fac210 = fk20 * fac10(k)
6560
6561 if (specparm1 < 0.125) then
6562 p1 = fs1 - f_one
6563 p41 = p1**4
6564 fk01 = p41
6565 fk11 = f_one - p1 - 2.0*p41
6566 fk21 = p1 + p41
6567
6568 id001 = ind1
6569 id011 = ind1 + 9
6570 id101 = ind1 + 1
6571 id111 = ind1 +10
6572 id201 = ind1 + 2
6573 id211 = ind1 +11
6574 elseif (specparm1 > 0.875) then
6575 p1 = -fs1
6576 p41 = p1**4
6577 fk01 = p41
6578 fk11 = f_one - p1 - 2.0*p41
6579 fk21 = p1 + p41
6580
6581 id001 = ind1 + 1
6582 id011 = ind1 +10
6583 id101 = ind1
6584 id111 = ind1 + 9
6585 id201 = ind1 - 1
6586 id211 = ind1 + 8
6587 else
6588 fk01 = f_one - fs1
6589 fk11 = fs1
6590 fk21 = f_zero
6591
6592 id001 = ind1
6593 id011 = ind1 + 9
6594 id101 = ind1 + 1
6595 id111 = ind1 +10
6596 id201 = ind1
6597 id211 = ind1
6598 endif
6599
6600 fac001 = fk01 * fac01(k)
6601 fac101 = fk11 * fac01(k)
6602 fac201 = fk21 * fac01(k)
6603 fac011 = fk01 * fac11(k)
6604 fac111 = fk11 * fac11(k)
6605 fac211 = fk21 * fac11(k)
6606
6607 do ig = 1, ng15
6608 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
6609 & * (selfref(ig,indsp) - selfref(ig,inds)))
6610 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
6611 & * (forref(ig,indfp) - forref(ig,indf)))
6612 n2m1 = ka_mn2(ig,jmn2,indm) + fmn2 &
6613 & * (ka_mn2(ig,jmn2p,indm) - ka_mn2(ig,jmn2,indm))
6614 n2m2 = ka_mn2(ig,jmn2,indmp) + fmn2 &
6615 & * (ka_mn2(ig,jmn2p,indmp) - ka_mn2(ig,jmn2,indmp))
6616 taun2 = scalen2 * (n2m1 + minorfrac(k) * (n2m2 - n2m1))
6617
6618 taug(ns15+ig,k) = speccomb &
6619 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
6620 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
6621 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
6622 & + speccomb1 &
6623 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
6624 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
6625 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
6626 & + tauself + taufor + taun2
6627
6628 fracs(ns15+ig,k) = fracrefa(ig,jpl) + fpl &
6629 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
6630 enddo
6631 enddo
6632
6633! --- ... upper atmosphere loop
6634
6635 do k = laytrop+1, nlay
6636 do ig = 1, ng15
6637 taug(ns15+ig,k) = f_zero
6638
6639 fracs(ns15+ig,k) = f_zero
6640 enddo
6641 enddo
6642
6643! ..................................
6644 end subroutine taugb15
6645! ----------------------------------
6646
6649! ----------------------------------
6650 subroutine taugb16
6651! ..................................
6652
6653! ------------------------------------------------------------------ !
6654! band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4) !
6655! ------------------------------------------------------------------ !
6656
6658
6659! --- locals:
6660 integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, &
6661 & id000, id010, id100, id110, id200, id210, jpl, jplp, &
6662 & id001, id011, id101, id111, id201, id211, ig, js, js1
6663
6664 real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, &
6665 & speccomb, specparm, specmult, fs, &
6666 & speccomb1, specparm1, specmult1, fs1, &
6667 & speccomb_planck,specparm_planck,specmult_planck,fpl, &
6668 & fac000, fac100, fac200, fac010, fac110, fac210, &
6669 & fac001, fac101, fac201, fac011, fac111, fac211, &
6670 & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21
6671!
6672!===> ... begin here
6673!
6674! --- ... calculate reference ratio to be used in calculation of Planck
6675! fraction in lower atmosphere.
6676
6677 refrat_planck_a = chi_mls(1,6)/chi_mls(6,6) ! P = 387. mb (Level 6)
6678
6679! --- ... lower atmosphere loop
6680
6681 do k = 1, laytrop
6682 speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5)
6683 specparm = colamt(k,1) / speccomb
6684 specmult = 8.0 * min(specparm, oneminus)
6685 js = 1 + int(specmult)
6686 fs = mod(specmult, f_one)
6687 ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(16) + js
6688
6689 speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5)
6690 specparm1 = colamt(k,1) / speccomb1
6691 specmult1 = 8.0 * min(specparm1, oneminus)
6692 js1 = 1 + int(specmult1)
6693 fs1 = mod(specmult1, f_one)
6694 ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(16) + js1
6695
6696 speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5)
6697 specparm_planck = colamt(k,1) / speccomb_planck
6698 specmult_planck = 8.0 * min(specparm_planck, oneminus)
6699 jpl = 1 + int(specmult_planck)
6700 fpl = mod(specmult_planck, f_one)
6701
6702 inds = indself(k)
6703 indf = indfor(k)
6704 indsp = inds + 1
6705 indfp = indf + 1
6706 jplp = jpl + 1
6707
6708 if (specparm < 0.125) then
6709 p0 = fs - f_one
6710 p40 = p0**4
6711 fk00 = p40
6712 fk10 = f_one - p0 - 2.0*p40
6713 fk20 = p0 + p40
6714
6715 id000 = ind0
6716 id010 = ind0 + 9
6717 id100 = ind0 + 1
6718 id110 = ind0 +10
6719 id200 = ind0 + 2
6720 id210 = ind0 +11
6721 elseif (specparm > 0.875) then
6722 p0 = -fs
6723 p40 = p0**4
6724 fk00 = p40
6725 fk10 = f_one - p0 - 2.0*p40
6726 fk20 = p0 + p40
6727
6728 id000 = ind0 + 1
6729 id010 = ind0 +10
6730 id100 = ind0
6731 id110 = ind0 + 9
6732 id200 = ind0 - 1
6733 id210 = ind0 + 8
6734 else
6735 fk00 = f_one - fs
6736 fk10 = fs
6737 fk20 = f_zero
6738
6739 id000 = ind0
6740 id010 = ind0 + 9
6741 id100 = ind0 + 1
6742 id110 = ind0 +10
6743 id200 = ind0
6744 id210 = ind0
6745 endif
6746
6747 fac000 = fk00 * fac00(k)
6748 fac100 = fk10 * fac00(k)
6749 fac200 = fk20 * fac00(k)
6750 fac010 = fk00 * fac10(k)
6751 fac110 = fk10 * fac10(k)
6752 fac210 = fk20 * fac10(k)
6753
6754 if (specparm1 < 0.125) then
6755 p1 = fs1 - f_one
6756 p41 = p1**4
6757 fk01 = p41
6758 fk11 = f_one - p1 - 2.0*p41
6759 fk21 = p1 + p41
6760
6761 id001 = ind1
6762 id011 = ind1 + 9
6763 id101 = ind1 + 1
6764 id111 = ind1 +10
6765 id201 = ind1 + 2
6766 id211 = ind1 +11
6767 elseif (specparm1 > 0.875) then
6768 p1 = -fs1
6769 p41 = p1**4
6770 fk01 = p41
6771 fk11 = f_one - p1 - 2.0*p41
6772 fk21 = p1 + p41
6773
6774 id001 = ind1 + 1
6775 id011 = ind1 +10
6776 id101 = ind1
6777 id111 = ind1 + 9
6778 id201 = ind1 - 1
6779 id211 = ind1 + 8
6780 else
6781 fk01 = f_one - fs1
6782 fk11 = fs1
6783 fk21 = f_zero
6784
6785 id001 = ind1
6786 id011 = ind1 + 9
6787 id101 = ind1 + 1
6788 id111 = ind1 +10
6789 id201 = ind1
6790 id211 = ind1
6791 endif
6792
6793 fac001 = fk01 * fac01(k)
6794 fac101 = fk11 * fac01(k)
6795 fac201 = fk21 * fac01(k)
6796 fac011 = fk01 * fac11(k)
6797 fac111 = fk11 * fac11(k)
6798 fac211 = fk21 * fac11(k)
6799
6800 do ig = 1, ng16
6801 tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) &
6802 & * (selfref(ig,indsp) - selfref(ig,inds)))
6803 taufor = forfac(k) * (forref(ig,indf) + forfrac(k) &
6804 & * (forref(ig,indfp) - forref(ig,indf)))
6805
6806 taug(ns16+ig,k) = speccomb &
6807 & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) &
6808 & + fac100*absa(ig,id100) + fac110*absa(ig,id110) &
6809 & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) &
6810 & + speccomb1 &
6811 & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) &
6812 & + fac101*absa(ig,id101) + fac111*absa(ig,id111) &
6813 & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) &
6814 & + tauself + taufor
6815
6816 fracs(ns16+ig,k) = fracrefa(ig,jpl) + fpl &
6817 & * (fracrefa(ig,jplp) - fracrefa(ig,jpl))
6818 enddo
6819 enddo
6820
6821! --- ... upper atmosphere loop
6822
6823 do k = laytrop+1, nlay
6824 ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(16) + 1
6825 ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(16) + 1
6826
6827 ind0p = ind0 + 1
6828 ind1p = ind1 + 1
6829
6830 do ig = 1, ng16
6831 taug(ns16+ig,k) = colamt(k,5) &
6832 & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) &
6833 & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p))
6834
6835 fracs(ns16+ig,k) = fracrefb(ig)
6836 enddo
6837 enddo
6838
6839! ..................................
6840 end subroutine taugb16
6841! ----------------------------------
6842
6843! ..................................
6844 end subroutine taumol
6845
6846! ------------------------------------------------------------------------------
6847 subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, &
6848 & ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, ncbands, taucmc, errmsg, errflg)
6849! ------------------------------------------------------------------------------
6850
6851! Purpose: Compute the cloud optical depth(s) for each cloudy layer.
6852
6853! ------- Input -------
6854
6855 integer(kind=im), intent(in) :: nlayers ! total number of layers
6856 integer(kind=im), intent(in) :: inflag ! see definitions
6857 integer(kind=im), intent(in) :: iceflag ! see definitions
6858 integer(kind=im), intent(in) :: liqflag ! see definitions
6859
6860 real(kind=rb), intent(in) :: cldfmc(:,:) ! cloud fraction [mcica]
6861 ! Dimensions: (ngptlw,nlayers)
6862 real(kind=rb), intent(in) :: ciwpmc(:,:) ! cloud ice water path [mcica]
6863 ! Dimensions: (ngptlw,nlayers)
6864 real(kind=rb), intent(in) :: clwpmc(:,:) ! cloud liquid water path [mcica]
6865 ! Dimensions: (ngptlw,nlayers)
6866 real(kind=rb), intent(in) :: cswpmc(:,:) ! cloud snow path [mcica]
6867 ! Dimensions: (ngptlw,nlayers)
6868 real(kind=rb), intent(in) :: relqmc(:) ! liquid particle effective radius (microns)
6869 ! Dimensions: (nlayers)
6870 real(kind=rb), intent(in) :: reicmc(:) ! ice particle effective radius (microns)
6871 ! Dimensions: (nlayers)
6872 real(kind=rb), intent(in) :: resnmc(:) ! snow particle effective radius (microns)
6873 ! Dimensions: (nlayers)
6874 ! specific definition of reicmc depends on setting of iceflag:
6875 ! iceflag = 0: ice effective radius, r_ec, (Ebert and Curry, 1992),
6876 ! r_ec must be >= 10.0 microns
6877 ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
6878 ! r_ec range is limited to 13.0 to 130.0 microns
6879 ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
6880 ! r_k range is limited to 5.0 to 131.0 microns
6881 ! iceflag = 3: generalized effective size, dge, (Fu, 1996),
6882 ! dge range is limited to 5.0 to 140.0 microns
6883 ! [dge = 1.0315 * r_ec]
6884
6885! ------- Output -------
6886
6887 integer(kind=im), intent(out) :: ncbands ! number of cloud spectral bands
6888 real(kind=rb), intent(inout) :: taucmc(:,:) ! cloud optical depth [mcica]
6889 ! Dimensions: (ngptlw,nlayers)
6890 character(len=*), intent(inout) :: errmsg
6891 integer, intent(inout) :: errflg
6892
6893! ------- Local -------
6894
6895 integer(kind=im) :: lay ! Layer index
6896 integer(kind=im) :: ib ! spectral band index
6897 integer(kind=im) :: ig ! g-point interval index
6898 integer(kind=im) :: index
6899 integer(kind=im) :: icb(nbands)
6900 real(kind=rb) , dimension(2) :: absice0
6901 real(kind=rb) , dimension(2,5) :: absice1
6902 real(kind=rb) , dimension(43,16) :: absice2
6903 real(kind=rb) , dimension(46,16) :: absice3
6904 real(kind=rb) :: absliq0
6905 real(kind=rb) , dimension(58,16) :: absliq1
6906
6907 real(kind=rb) :: abscoice(ngptlw) ! ice absorption coefficients
6908 real(kind=rb) :: abscoliq(ngptlw) ! liquid absorption coefficients
6909 real(kind=rb) :: abscosno(ngptlw) ! snow absorption coefficients
6910 real(kind=rb) :: cwp ! cloud water path
6911 real(kind=rb) :: radice ! cloud ice effective size (microns)
6912 real(kind=rb) :: factor !
6913 real(kind=rb) :: fint !
6914 real(kind=rb) :: radliq ! cloud liquid droplet radius (microns)
6915 real(kind=rb) :: radsno ! cloud snow effective size (microns)
6916 real(kind=rb), parameter :: eps = 1.e-6_rb ! epsilon
6917 real(kind=rb), parameter :: cldmin = 1.e-20_rb ! minimum value for cloud quantities
6918
6919! ------- Definitions -------
6920
6921! Explanation of the method for each value of INFLAG. Values of
6922! 0 or 1 for INFLAG do not distingish being liquid and ice clouds.
6923! INFLAG = 2 does distinguish between liquid and ice clouds, and
6924! requires further user input to specify the method to be used to
6925! compute the aborption due to each.
6926! INFLAG = 0: For each cloudy layer, the cloud fraction and (gray)
6927! optical depth are input.
6928! INFLAG = 1: For each cloudy layer, the cloud fraction and cloud
6929! water path (g/m2) are input. The (gray) cloud optical
6930! depth is computed as in CCM2.
6931! INFLAG = 2: For each cloudy layer, the cloud fraction, cloud
6932! water path (g/m2), and cloud ice fraction are input.
6933! ICEFLAG = 0: The ice effective radius (microns) is input and the
6934! optical depths due to ice clouds are computed as in CCM3.
6935! ICEFLAG = 1: The ice effective radius (microns) is input and the
6936! optical depths due to ice clouds are computed as in
6937! Ebert and Curry, JGR, 97, 3831-3836 (1992). The
6938! spectral regions in this work have been matched with
6939! the spectral bands in RRTM to as great an extent
6940! as possible:
6941! E&C 1 IB = 5 RRTM bands 9-16
6942! E&C 2 IB = 4 RRTM bands 6-8
6943! E&C 3 IB = 3 RRTM bands 3-5
6944! E&C 4 IB = 2 RRTM band 2
6945! E&C 5 IB = 1 RRTM band 1
6946! ICEFLAG = 2: The ice effective radius (microns) is input and the
6947! optical properties due to ice clouds are computed from
6948! the optical properties stored in the RT code,
6949! STREAMER v3.0 (Reference: Key. J., Streamer
6950! User's Guide, Cooperative Institute for
6951! Meteorological Satellite Studies, 2001, 96 pp.).
6952! Valid range of values for re are between 5.0 and
6953! 131.0 micron.
6954! ICEFLAG = 3: The ice generalized effective size (dge) is input
6955! and the optical properties, are calculated as in
6956! Q. Fu, J. Climate, (1998). Q. Fu provided high resolution
6957! tables which were appropriately averaged for the
6958! bands in RRTM_LW. Linear interpolation is used to
6959! get the coefficients from the stored tables.
6960! Valid range of values for dge are between 5.0 and
6961! 140.0 micron.
6962! LIQFLAG = 0: The optical depths due to water clouds are computed as
6963! in CCM3.
6964! LIQFLAG = 1: The water droplet effective radius (microns) is input
6965! and the optical depths due to water clouds are computed
6966! as in Hu and Stamnes, J., Clim., 6, 728-742, (1993).
6967! The values for absorption coefficients appropriate for
6968! the spectral bands in RRTM have been obtained for a
6969! range of effective radii by an averaging procedure
6970! based on the work of J. Pinto (private communication).
6971! Linear interpolation is used to get the absorption
6972! coefficients for the input effective radius.
6973
6974 data icb /1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5/
6975! Everything below is for INFLAG = 2.
6976
6977! ABSICEn(J,IB) are the parameters needed to compute the liquid water
6978! absorption coefficient in spectral region IB for ICEFLAG=n. The units
6979! of ABSICEn(1,IB) are m2/g and ABSICEn(2,IB) has units (microns (m2/g)).
6980! For ICEFLAG = 0.
6981
6982 absice0(:)= (/0.005_rb, 1.0_rb/)
6983
6984! For ICEFLAG = 1.
6985 absice1(1,:) = (/0.0036_rb, 0.0068_rb, 0.0003_rb, 0.0016_rb, &
6986 & 0.0020_rb/)
6987 absice1(2,:) = (/1.136_rb , 0.600_rb , 1.338_rb , 1.166_rb , &
6988 & 1.118_rb /)
6989
6990! For ICEFLAG = 2. In each band, the absorption
6991! coefficients are listed for a range of effective radii from 5.0
6992! to 131.0 microns in increments of 3.0 microns.
6993! Spherical Ice Particle Parameterization
6994! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)]
6995 absice2(:,1) = (/ &
6996! band 1
6997 7.798999e-02_rb,6.340479e-02_rb,5.417973e-02_rb,4.766245e-02_rb,4.272663e-02_rb, &
6998 3.880939e-02_rb,3.559544e-02_rb,3.289241e-02_rb,3.057511e-02_rb,2.855800e-02_rb, &
6999 2.678022e-02_rb,2.519712e-02_rb,2.377505e-02_rb,2.248806e-02_rb,2.131578e-02_rb, &
7000 2.024194e-02_rb,1.925337e-02_rb,1.833926e-02_rb,1.749067e-02_rb,1.670007e-02_rb, &
7001 1.596113e-02_rb,1.526845e-02_rb,1.461739e-02_rb,1.400394e-02_rb,1.342462e-02_rb, &
7002 1.287639e-02_rb,1.235656e-02_rb,1.186279e-02_rb,1.139297e-02_rb,1.094524e-02_rb, &
7003 1.051794e-02_rb,1.010956e-02_rb,9.718755e-03_rb,9.344316e-03_rb,8.985139e-03_rb, &
7004 8.640223e-03_rb,8.308656e-03_rb,7.989606e-03_rb,7.682312e-03_rb,7.386076e-03_rb, &
7005 7.100255e-03_rb,6.824258e-03_rb,6.557540e-03_rb/)
7006 absice2(:,2) = (/ &
7007! band 2
7008 2.784879e-02_rb,2.709863e-02_rb,2.619165e-02_rb,2.529230e-02_rb,2.443225e-02_rb, &
7009 2.361575e-02_rb,2.284021e-02_rb,2.210150e-02_rb,2.139548e-02_rb,2.071840e-02_rb, &
7010 2.006702e-02_rb,1.943856e-02_rb,1.883064e-02_rb,1.824120e-02_rb,1.766849e-02_rb, &
7011 1.711099e-02_rb,1.656737e-02_rb,1.603647e-02_rb,1.551727e-02_rb,1.500886e-02_rb, &
7012 1.451045e-02_rb,1.402132e-02_rb,1.354084e-02_rb,1.306842e-02_rb,1.260355e-02_rb, &
7013 1.214575e-02_rb,1.169460e-02_rb,1.124971e-02_rb,1.081072e-02_rb,1.037731e-02_rb, &
7014 9.949167e-03_rb,9.526021e-03_rb,9.107615e-03_rb,8.693714e-03_rb,8.284096e-03_rb, &
7015 7.878558e-03_rb,7.476910e-03_rb,7.078974e-03_rb,6.684586e-03_rb,6.293589e-03_rb, &
7016 5.905839e-03_rb,5.521200e-03_rb,5.139543e-03_rb/)
7017 absice2(:,3) = (/ &
7018! band 3
7019 1.065397e-01_rb,8.005726e-02_rb,6.546428e-02_rb,5.589131e-02_rb,4.898681e-02_rb, &
7020 4.369932e-02_rb,3.947901e-02_rb,3.600676e-02_rb,3.308299e-02_rb,3.057561e-02_rb, &
7021 2.839325e-02_rb,2.647040e-02_rb,2.475872e-02_rb,2.322164e-02_rb,2.183091e-02_rb, &
7022 2.056430e-02_rb,1.940407e-02_rb,1.833586e-02_rb,1.734787e-02_rb,1.643034e-02_rb, &
7023 1.557512e-02_rb,1.477530e-02_rb,1.402501e-02_rb,1.331924e-02_rb,1.265364e-02_rb, &
7024 1.202445e-02_rb,1.142838e-02_rb,1.086257e-02_rb,1.032445e-02_rb,9.811791e-03_rb, &
7025 9.322587e-03_rb,8.855053e-03_rb,8.407591e-03_rb,7.978763e-03_rb,7.567273e-03_rb, &
7026 7.171949e-03_rb,6.791728e-03_rb,6.425642e-03_rb,6.072809e-03_rb,5.732424e-03_rb, &
7027 5.403748e-03_rb,5.086103e-03_rb,4.778865e-03_rb/)
7028 absice2(:,4) = (/ &
7029! band 4
7030 1.804566e-01_rb,1.168987e-01_rb,8.680442e-02_rb,6.910060e-02_rb,5.738174e-02_rb, &
7031 4.902332e-02_rb,4.274585e-02_rb,3.784923e-02_rb,3.391734e-02_rb,3.068690e-02_rb, &
7032 2.798301e-02_rb,2.568480e-02_rb,2.370600e-02_rb,2.198337e-02_rb,2.046940e-02_rb, &
7033 1.912777e-02_rb,1.793016e-02_rb,1.685420e-02_rb,1.588193e-02_rb,1.499882e-02_rb, &
7034 1.419293e-02_rb,1.345440e-02_rb,1.277496e-02_rb,1.214769e-02_rb,1.156669e-02_rb, &
7035 1.102694e-02_rb,1.052412e-02_rb,1.005451e-02_rb,9.614854e-03_rb,9.202335e-03_rb, &
7036 8.814470e-03_rb,8.449077e-03_rb,8.104223e-03_rb,7.778195e-03_rb,7.469466e-03_rb, &
7037 7.176671e-03_rb,6.898588e-03_rb,6.634117e-03_rb,6.382264e-03_rb,6.142134e-03_rb, &
7038 5.912913e-03_rb,5.693862e-03_rb,5.484308e-03_rb/)
7039 absice2(:,5) = (/ &
7040! band 5
7041 2.131806e-01_rb,1.311372e-01_rb,9.407171e-02_rb,7.299442e-02_rb,5.941273e-02_rb, &
7042 4.994043e-02_rb,4.296242e-02_rb,3.761113e-02_rb,3.337910e-02_rb,2.994978e-02_rb, &
7043 2.711556e-02_rb,2.473461e-02_rb,2.270681e-02_rb,2.095943e-02_rb,1.943839e-02_rb, &
7044 1.810267e-02_rb,1.692057e-02_rb,1.586719e-02_rb,1.492275e-02_rb,1.407132e-02_rb, &
7045 1.329989e-02_rb,1.259780e-02_rb,1.195618e-02_rb,1.136761e-02_rb,1.082583e-02_rb, &
7046 1.032552e-02_rb,9.862158e-03_rb,9.431827e-03_rb,9.031157e-03_rb,8.657217e-03_rb, &
7047 8.307449e-03_rb,7.979609e-03_rb,7.671724e-03_rb,7.382048e-03_rb,7.109032e-03_rb, &
7048 6.851298e-03_rb,6.607615e-03_rb,6.376881e-03_rb,6.158105e-03_rb,5.950394e-03_rb, &
7049 5.752942e-03_rb,5.565019e-03_rb,5.385963e-03_rb/)
7050 absice2(:,6) = (/ &
7051! band 6
7052 1.546177e-01_rb,1.039251e-01_rb,7.910347e-02_rb,6.412429e-02_rb,5.399997e-02_rb, &
7053 4.664937e-02_rb,4.104237e-02_rb,3.660781e-02_rb,3.300218e-02_rb,3.000586e-02_rb, &
7054 2.747148e-02_rb,2.529633e-02_rb,2.340647e-02_rb,2.174723e-02_rb,2.027731e-02_rb, &
7055 1.896487e-02_rb,1.778492e-02_rb,1.671761e-02_rb,1.574692e-02_rb,1.485978e-02_rb, &
7056 1.404543e-02_rb,1.329489e-02_rb,1.260066e-02_rb,1.195636e-02_rb,1.135657e-02_rb, &
7057 1.079664e-02_rb,1.027257e-02_rb,9.780871e-03_rb,9.318505e-03_rb,8.882815e-03_rb, &
7058 8.471458e-03_rb,8.082364e-03_rb,7.713696e-03_rb,7.363817e-03_rb,7.031264e-03_rb, &
7059 6.714725e-03_rb,6.413021e-03_rb,6.125086e-03_rb,5.849958e-03_rb,5.586764e-03_rb, &
7060 5.334707e-03_rb,5.093066e-03_rb,4.861179e-03_rb/)
7061 absice2(:,7) = (/ &
7062! band 7
7063 7.583404e-02_rb,6.181558e-02_rb,5.312027e-02_rb,4.696039e-02_rb,4.225986e-02_rb, &
7064 3.849735e-02_rb,3.538340e-02_rb,3.274182e-02_rb,3.045798e-02_rb,2.845343e-02_rb, &
7065 2.667231e-02_rb,2.507353e-02_rb,2.362606e-02_rb,2.230595e-02_rb,2.109435e-02_rb, &
7066 1.997617e-02_rb,1.893916e-02_rb,1.797328e-02_rb,1.707016e-02_rb,1.622279e-02_rb, &
7067 1.542523e-02_rb,1.467241e-02_rb,1.395997e-02_rb,1.328414e-02_rb,1.264164e-02_rb, &
7068 1.202958e-02_rb,1.144544e-02_rb,1.088697e-02_rb,1.035218e-02_rb,9.839297e-03_rb, &
7069 9.346733e-03_rb,8.873057e-03_rb,8.416980e-03_rb,7.977335e-03_rb,7.553066e-03_rb, &
7070 7.143210e-03_rb,6.746888e-03_rb,6.363297e-03_rb,5.991700e-03_rb,5.631422e-03_rb, &
7071 5.281840e-03_rb,4.942378e-03_rb,4.612505e-03_rb/)
7072 absice2(:,8) = (/ &
7073! band 8
7074 9.022185e-02_rb,6.922700e-02_rb,5.710674e-02_rb,4.898377e-02_rb,4.305946e-02_rb, &
7075 3.849553e-02_rb,3.484183e-02_rb,3.183220e-02_rb,2.929794e-02_rb,2.712627e-02_rb, &
7076 2.523856e-02_rb,2.357810e-02_rb,2.210286e-02_rb,2.078089e-02_rb,1.958747e-02_rb, &
7077 1.850310e-02_rb,1.751218e-02_rb,1.660205e-02_rb,1.576232e-02_rb,1.498440e-02_rb, &
7078 1.426107e-02_rb,1.358624e-02_rb,1.295474e-02_rb,1.236212e-02_rb,1.180456e-02_rb, &
7079 1.127874e-02_rb,1.078175e-02_rb,1.031106e-02_rb,9.864433e-03_rb,9.439878e-03_rb, &
7080 9.035637e-03_rb,8.650140e-03_rb,8.281981e-03_rb,7.929895e-03_rb,7.592746e-03_rb, &
7081 7.269505e-03_rb,6.959238e-03_rb,6.661100e-03_rb,6.374317e-03_rb,6.098185e-03_rb, &
7082 5.832059e-03_rb,5.575347e-03_rb,5.327504e-03_rb/)
7083 absice2(:,9) = (/ &
7084! band 9
7085 1.294087e-01_rb,8.788217e-02_rb,6.728288e-02_rb,5.479720e-02_rb,4.635049e-02_rb, &
7086 4.022253e-02_rb,3.555576e-02_rb,3.187259e-02_rb,2.888498e-02_rb,2.640843e-02_rb, &
7087 2.431904e-02_rb,2.253038e-02_rb,2.098024e-02_rb,1.962267e-02_rb,1.842293e-02_rb, &
7088 1.735426e-02_rb,1.639571e-02_rb,1.553060e-02_rb,1.474552e-02_rb,1.402953e-02_rb, &
7089 1.337363e-02_rb,1.277033e-02_rb,1.221336e-02_rb,1.169741e-02_rb,1.121797e-02_rb, &
7090 1.077117e-02_rb,1.035369e-02_rb,9.962643e-03_rb,9.595509e-03_rb,9.250088e-03_rb, &
7091 8.924447e-03_rb,8.616876e-03_rb,8.325862e-03_rb,8.050057e-03_rb,7.788258e-03_rb, &
7092 7.539388e-03_rb,7.302478e-03_rb,7.076656e-03_rb,6.861134e-03_rb,6.655197e-03_rb, &
7093 6.458197e-03_rb,6.269543e-03_rb,6.088697e-03_rb/)
7094 absice2(:,10) = (/ &
7095! band 10
7096 1.593628e-01_rb,1.014552e-01_rb,7.458955e-02_rb,5.903571e-02_rb,4.887582e-02_rb, &
7097 4.171159e-02_rb,3.638480e-02_rb,3.226692e-02_rb,2.898717e-02_rb,2.631256e-02_rb, &
7098 2.408925e-02_rb,2.221156e-02_rb,2.060448e-02_rb,1.921325e-02_rb,1.799699e-02_rb, &
7099 1.692456e-02_rb,1.597177e-02_rb,1.511961e-02_rb,1.435289e-02_rb,1.365933e-02_rb, &
7100 1.302890e-02_rb,1.245334e-02_rb,1.192576e-02_rb,1.144037e-02_rb,1.099230e-02_rb, &
7101 1.057739e-02_rb,1.019208e-02_rb,9.833302e-03_rb,9.498395e-03_rb,9.185047e-03_rb, &
7102 8.891237e-03_rb,8.615185e-03_rb,8.355325e-03_rb,8.110267e-03_rb,7.878778e-03_rb, &
7103 7.659759e-03_rb,7.452224e-03_rb,7.255291e-03_rb,7.068166e-03_rb,6.890130e-03_rb, &
7104 6.720536e-03_rb,6.558794e-03_rb,6.404371e-03_rb/)
7105 absice2(:,11) = (/ &
7106! band 11
7107 1.656227e-01_rb,1.032129e-01_rb,7.487359e-02_rb,5.871431e-02_rb,4.828355e-02_rb, &
7108 4.099989e-02_rb,3.562924e-02_rb,3.150755e-02_rb,2.824593e-02_rb,2.560156e-02_rb, &
7109 2.341503e-02_rb,2.157740e-02_rb,2.001169e-02_rb,1.866199e-02_rb,1.748669e-02_rb, &
7110 1.645421e-02_rb,1.554015e-02_rb,1.472535e-02_rb,1.399457e-02_rb,1.333553e-02_rb, &
7111 1.273821e-02_rb,1.219440e-02_rb,1.169725e-02_rb,1.124104e-02_rb,1.082096e-02_rb, &
7112 1.043290e-02_rb,1.007336e-02_rb,9.739338e-03_rb,9.428223e-03_rb,9.137756e-03_rb, &
7113 8.865964e-03_rb,8.611115e-03_rb,8.371686e-03_rb,8.146330e-03_rb,7.933852e-03_rb, &
7114 7.733187e-03_rb,7.543386e-03_rb,7.363597e-03_rb,7.193056e-03_rb,7.031072e-03_rb, &
7115 6.877024e-03_rb,6.730348e-03_rb,6.590531e-03_rb/)
7116 absice2(:,12) = (/ &
7117! band 12
7118 9.194591e-02_rb,6.446867e-02_rb,4.962034e-02_rb,4.042061e-02_rb,3.418456e-02_rb, &
7119 2.968856e-02_rb,2.629900e-02_rb,2.365572e-02_rb,2.153915e-02_rb,1.980791e-02_rb, &
7120 1.836689e-02_rb,1.714979e-02_rb,1.610900e-02_rb,1.520946e-02_rb,1.442476e-02_rb, &
7121 1.373468e-02_rb,1.312345e-02_rb,1.257858e-02_rb,1.209010e-02_rb,1.164990e-02_rb, &
7122 1.125136e-02_rb,1.088901e-02_rb,1.055827e-02_rb,1.025531e-02_rb,9.976896e-03_rb, &
7123 9.720255e-03_rb,9.483022e-03_rb,9.263160e-03_rb,9.058902e-03_rb,8.868710e-03_rb, &
7124 8.691240e-03_rb,8.525312e-03_rb,8.369886e-03_rb,8.224042e-03_rb,8.086961e-03_rb, &
7125 7.957917e-03_rb,7.836258e-03_rb,7.721400e-03_rb,7.612821e-03_rb,7.510045e-03_rb, &
7126 7.412648e-03_rb,7.320242e-03_rb,7.232476e-03_rb/)
7127 absice2(:,13) = (/ &
7128! band 13
7129 1.437021e-01_rb,8.872535e-02_rb,6.392420e-02_rb,4.991833e-02_rb,4.096790e-02_rb, &
7130 3.477881e-02_rb,3.025782e-02_rb,2.681909e-02_rb,2.412102e-02_rb,2.195132e-02_rb, &
7131 2.017124e-02_rb,1.868641e-02_rb,1.743044e-02_rb,1.635529e-02_rb,1.542540e-02_rb, &
7132 1.461388e-02_rb,1.390003e-02_rb,1.326766e-02_rb,1.270395e-02_rb,1.219860e-02_rb, &
7133 1.174326e-02_rb,1.133107e-02_rb,1.095637e-02_rb,1.061442e-02_rb,1.030126e-02_rb, &
7134 1.001352e-02_rb,9.748340e-03_rb,9.503256e-03_rb,9.276155e-03_rb,9.065205e-03_rb, &
7135 8.868808e-03_rb,8.685571e-03_rb,8.514268e-03_rb,8.353820e-03_rb,8.203272e-03_rb, &
7136 8.061776e-03_rb,7.928578e-03_rb,7.803001e-03_rb,7.684443e-03_rb,7.572358e-03_rb, &
7137 7.466258e-03_rb,7.365701e-03_rb,7.270286e-03_rb/)
7138 absice2(:,14) = (/ &
7139! band 14
7140 1.288870e-01_rb,8.160295e-02_rb,5.964745e-02_rb,4.703790e-02_rb,3.888637e-02_rb, &
7141 3.320115e-02_rb,2.902017e-02_rb,2.582259e-02_rb,2.330224e-02_rb,2.126754e-02_rb, &
7142 1.959258e-02_rb,1.819130e-02_rb,1.700289e-02_rb,1.598320e-02_rb,1.509942e-02_rb, &
7143 1.432666e-02_rb,1.364572e-02_rb,1.304156e-02_rb,1.250220e-02_rb,1.201803e-02_rb, &
7144 1.158123e-02_rb,1.118537e-02_rb,1.082513e-02_rb,1.049605e-02_rb,1.019440e-02_rb, &
7145 9.916989e-03_rb,9.661116e-03_rb,9.424457e-03_rb,9.205005e-03_rb,9.001022e-03_rb, &
7146 8.810992e-03_rb,8.633588e-03_rb,8.467646e-03_rb,8.312137e-03_rb,8.166151e-03_rb, &
7147 8.028878e-03_rb,7.899597e-03_rb,7.777663e-03_rb,7.662498e-03_rb,7.553581e-03_rb, &
7148 7.450444e-03_rb,7.352662e-03_rb,7.259851e-03_rb/)
7149 absice2(:,15) = (/ &
7150! band 15
7151 8.254229e-02_rb,5.808787e-02_rb,4.492166e-02_rb,3.675028e-02_rb,3.119623e-02_rb, &
7152 2.718045e-02_rb,2.414450e-02_rb,2.177073e-02_rb,1.986526e-02_rb,1.830306e-02_rb, &
7153 1.699991e-02_rb,1.589698e-02_rb,1.495199e-02_rb,1.413374e-02_rb,1.341870e-02_rb, &
7154 1.278883e-02_rb,1.223002e-02_rb,1.173114e-02_rb,1.128322e-02_rb,1.087900e-02_rb, &
7155 1.051254e-02_rb,1.017890e-02_rb,9.873991e-03_rb,9.594347e-03_rb,9.337044e-03_rb, &
7156 9.099589e-03_rb,8.879842e-03_rb,8.675960e-03_rb,8.486341e-03_rb,8.309594e-03_rb, &
7157 8.144500e-03_rb,7.989986e-03_rb,7.845109e-03_rb,7.709031e-03_rb,7.581007e-03_rb, &
7158 7.460376e-03_rb,7.346544e-03_rb,7.238978e-03_rb,7.137201e-03_rb,7.040780e-03_rb, &
7159 6.949325e-03_rb,6.862483e-03_rb,6.779931e-03_rb/)
7160 absice2(:,16) = (/ &
7161! band 16
7162 1.382062e-01_rb,8.643227e-02_rb,6.282935e-02_rb,4.934783e-02_rb,4.063891e-02_rb, &
7163 3.455591e-02_rb,3.007059e-02_rb,2.662897e-02_rb,2.390631e-02_rb,2.169972e-02_rb, &
7164 1.987596e-02_rb,1.834393e-02_rb,1.703924e-02_rb,1.591513e-02_rb,1.493679e-02_rb, &
7165 1.407780e-02_rb,1.331775e-02_rb,1.264061e-02_rb,1.203364e-02_rb,1.148655e-02_rb, &
7166 1.099099e-02_rb,1.054006e-02_rb,1.012807e-02_rb,9.750215e-03_rb,9.402477e-03_rb, &
7167 9.081428e-03_rb,8.784143e-03_rb,8.508107e-03_rb,8.251146e-03_rb,8.011373e-03_rb, &
7168 7.787140e-03_rb,7.577002e-03_rb,7.379687e-03_rb,7.194071e-03_rb,7.019158e-03_rb, &
7169 6.854061e-03_rb,6.697986e-03_rb,6.550224e-03_rb,6.410138e-03_rb,6.277153e-03_rb, &
7170 6.150751e-03_rb,6.030462e-03_rb,5.915860e-03_rb/)
7171
7172! ICEFLAG = 3; Fu parameterization. Particle size 5 - 140 micron in
7173! increments of 3 microns.
7174! units = m2/g
7175! Hexagonal Ice Particle Parameterization
7176! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)]
7177 absice3(:,1) = (/ &
7178! band 1
7179 3.110649e-03_rb,4.666352e-02_rb,6.606447e-02_rb,6.531678e-02_rb,6.012598e-02_rb, &
7180 5.437494e-02_rb,4.906411e-02_rb,4.441146e-02_rb,4.040585e-02_rb,3.697334e-02_rb, &
7181 3.403027e-02_rb,3.149979e-02_rb,2.931596e-02_rb,2.742365e-02_rb,2.577721e-02_rb, &
7182 2.433888e-02_rb,2.307732e-02_rb,2.196644e-02_rb,2.098437e-02_rb,2.011264e-02_rb, &
7183 1.933561e-02_rb,1.863992e-02_rb,1.801407e-02_rb,1.744812e-02_rb,1.693346e-02_rb, &
7184 1.646252e-02_rb,1.602866e-02_rb,1.562600e-02_rb,1.524933e-02_rb,1.489399e-02_rb, &
7185 1.455580e-02_rb,1.423098e-02_rb,1.391612e-02_rb,1.360812e-02_rb,1.330413e-02_rb, &
7186 1.300156e-02_rb,1.269801e-02_rb,1.239127e-02_rb,1.207928e-02_rb,1.176014e-02_rb, &
7187 1.143204e-02_rb,1.109334e-02_rb,1.074243e-02_rb,1.037786e-02_rb,9.998198e-03_rb, &
7188 9.602126e-03_rb/)
7189 absice3(:,2) = (/ &
7190! band 2
7191 3.984966e-04_rb,1.681097e-02_rb,2.627680e-02_rb,2.767465e-02_rb,2.700722e-02_rb, &
7192 2.579180e-02_rb,2.448677e-02_rb,2.323890e-02_rb,2.209096e-02_rb,2.104882e-02_rb, &
7193 2.010547e-02_rb,1.925003e-02_rb,1.847128e-02_rb,1.775883e-02_rb,1.710358e-02_rb, &
7194 1.649769e-02_rb,1.593449e-02_rb,1.540829e-02_rb,1.491429e-02_rb,1.444837e-02_rb, &
7195 1.400704e-02_rb,1.358729e-02_rb,1.318654e-02_rb,1.280258e-02_rb,1.243346e-02_rb, &
7196 1.207750e-02_rb,1.173325e-02_rb,1.139941e-02_rb,1.107487e-02_rb,1.075861e-02_rb, &
7197 1.044975e-02_rb,1.014753e-02_rb,9.851229e-03_rb,9.560240e-03_rb,9.274003e-03_rb, &
7198 8.992020e-03_rb,8.713845e-03_rb,8.439074e-03_rb,8.167346e-03_rb,7.898331e-03_rb, &
7199 7.631734e-03_rb,7.367286e-03_rb,7.104742e-03_rb,6.843882e-03_rb,6.584504e-03_rb, &
7200 6.326424e-03_rb/)
7201 absice3(:,3) = (/ &
7202! band 3
7203 6.933163e-02_rb,8.540475e-02_rb,7.701816e-02_rb,6.771158e-02_rb,5.986953e-02_rb, &
7204 5.348120e-02_rb,4.824962e-02_rb,4.390563e-02_rb,4.024411e-02_rb,3.711404e-02_rb, &
7205 3.440426e-02_rb,3.203200e-02_rb,2.993478e-02_rb,2.806474e-02_rb,2.638464e-02_rb, &
7206 2.486516e-02_rb,2.348288e-02_rb,2.221890e-02_rb,2.105780e-02_rb,1.998687e-02_rb, &
7207 1.899552e-02_rb,1.807490e-02_rb,1.721750e-02_rb,1.641693e-02_rb,1.566773e-02_rb, &
7208 1.496515e-02_rb,1.430509e-02_rb,1.368398e-02_rb,1.309865e-02_rb,1.254634e-02_rb, &
7209 1.202456e-02_rb,1.153114e-02_rb,1.106409e-02_rb,1.062166e-02_rb,1.020224e-02_rb, &
7210 9.804381e-03_rb,9.426771e-03_rb,9.068205e-03_rb,8.727578e-03_rb,8.403876e-03_rb, &
7211 8.096160e-03_rb,7.803564e-03_rb,7.525281e-03_rb,7.260560e-03_rb,7.008697e-03_rb, &
7212 6.769036e-03_rb/)
7213 absice3(:,4) = (/ &
7214! band 4
7215 1.765735e-01_rb,1.382700e-01_rb,1.095129e-01_rb,8.987475e-02_rb,7.591185e-02_rb, &
7216 6.554169e-02_rb,5.755500e-02_rb,5.122083e-02_rb,4.607610e-02_rb,4.181475e-02_rb, &
7217 3.822697e-02_rb,3.516432e-02_rb,3.251897e-02_rb,3.021073e-02_rb,2.817876e-02_rb, &
7218 2.637607e-02_rb,2.476582e-02_rb,2.331871e-02_rb,2.201113e-02_rb,2.082388e-02_rb, &
7219 1.974115e-02_rb,1.874983e-02_rb,1.783894e-02_rb,1.699922e-02_rb,1.622280e-02_rb, &
7220 1.550296e-02_rb,1.483390e-02_rb,1.421064e-02_rb,1.362880e-02_rb,1.308460e-02_rb, &
7221 1.257468e-02_rb,1.209611e-02_rb,1.164628e-02_rb,1.122287e-02_rb,1.082381e-02_rb, &
7222 1.044725e-02_rb,1.009154e-02_rb,9.755166e-03_rb,9.436783e-03_rb,9.135163e-03_rb, &
7223 8.849193e-03_rb,8.577856e-03_rb,8.320225e-03_rb,8.075451e-03_rb,7.842755e-03_rb, &
7224 7.621418e-03_rb/)
7225 absice3(:,5) = (/ &
7226! band 5
7227 2.339673e-01_rb,1.692124e-01_rb,1.291656e-01_rb,1.033837e-01_rb,8.562949e-02_rb, &
7228 7.273526e-02_rb,6.298262e-02_rb,5.537015e-02_rb,4.927787e-02_rb,4.430246e-02_rb, &
7229 4.017061e-02_rb,3.669072e-02_rb,3.372455e-02_rb,3.116995e-02_rb,2.894977e-02_rb, &
7230 2.700471e-02_rb,2.528842e-02_rb,2.376420e-02_rb,2.240256e-02_rb,2.117959e-02_rb, &
7231 2.007567e-02_rb,1.907456e-02_rb,1.816271e-02_rb,1.732874e-02_rb,1.656300e-02_rb, &
7232 1.585725e-02_rb,1.520445e-02_rb,1.459852e-02_rb,1.403419e-02_rb,1.350689e-02_rb, &
7233 1.301260e-02_rb,1.254781e-02_rb,1.210941e-02_rb,1.169468e-02_rb,1.130118e-02_rb, &
7234 1.092675e-02_rb,1.056945e-02_rb,1.022757e-02_rb,9.899560e-03_rb,9.584021e-03_rb, &
7235 9.279705e-03_rb,8.985479e-03_rb,8.700322e-03_rb,8.423306e-03_rb,8.153590e-03_rb, &
7236 7.890412e-03_rb/)
7237 absice3(:,6) = (/ &
7238! band 6
7239 1.145369e-01_rb,1.174566e-01_rb,9.917866e-02_rb,8.332990e-02_rb,7.104263e-02_rb, &
7240 6.153370e-02_rb,5.405472e-02_rb,4.806281e-02_rb,4.317918e-02_rb,3.913795e-02_rb, &
7241 3.574916e-02_rb,3.287437e-02_rb,3.041067e-02_rb,2.828017e-02_rb,2.642292e-02_rb, &
7242 2.479206e-02_rb,2.335051e-02_rb,2.206851e-02_rb,2.092195e-02_rb,1.989108e-02_rb, &
7243 1.895958e-02_rb,1.811385e-02_rb,1.734245e-02_rb,1.663573e-02_rb,1.598545e-02_rb, &
7244 1.538456e-02_rb,1.482700e-02_rb,1.430750e-02_rb,1.382150e-02_rb,1.336499e-02_rb, &
7245 1.293447e-02_rb,1.252685e-02_rb,1.213939e-02_rb,1.176968e-02_rb,1.141555e-02_rb, &
7246 1.107508e-02_rb,1.074655e-02_rb,1.042839e-02_rb,1.011923e-02_rb,9.817799e-03_rb, &
7247 9.522962e-03_rb,9.233688e-03_rb,8.949041e-03_rb,8.668171e-03_rb,8.390301e-03_rb, &
7248 8.114723e-03_rb/)
7249 absice3(:,7) = (/ &
7250! band 7
7251 1.222345e-02_rb,5.344230e-02_rb,5.523465e-02_rb,5.128759e-02_rb,4.676925e-02_rb, &
7252 4.266150e-02_rb,3.910561e-02_rb,3.605479e-02_rb,3.342843e-02_rb,3.115052e-02_rb, &
7253 2.915776e-02_rb,2.739935e-02_rb,2.583499e-02_rb,2.443266e-02_rb,2.316681e-02_rb, &
7254 2.201687e-02_rb,2.096619e-02_rb,2.000112e-02_rb,1.911044e-02_rb,1.828481e-02_rb, &
7255 1.751641e-02_rb,1.679866e-02_rb,1.612598e-02_rb,1.549360e-02_rb,1.489742e-02_rb, &
7256 1.433392e-02_rb,1.380002e-02_rb,1.329305e-02_rb,1.281068e-02_rb,1.235084e-02_rb, &
7257 1.191172e-02_rb,1.149171e-02_rb,1.108936e-02_rb,1.070341e-02_rb,1.033271e-02_rb, &
7258 9.976220e-03_rb,9.633021e-03_rb,9.302273e-03_rb,8.983216e-03_rb,8.675161e-03_rb, &
7259 8.377478e-03_rb,8.089595e-03_rb,7.810986e-03_rb,7.541170e-03_rb,7.279706e-03_rb, &
7260 7.026186e-03_rb/)
7261 absice3(:,8) = (/ &
7262! band 8
7263 6.711058e-02_rb,6.918198e-02_rb,6.127484e-02_rb,5.411944e-02_rb,4.836902e-02_rb, &
7264 4.375293e-02_rb,3.998077e-02_rb,3.683587e-02_rb,3.416508e-02_rb,3.186003e-02_rb, &
7265 2.984290e-02_rb,2.805671e-02_rb,2.645895e-02_rb,2.501733e-02_rb,2.370689e-02_rb, &
7266 2.250808e-02_rb,2.140532e-02_rb,2.038609e-02_rb,1.944018e-02_rb,1.855918e-02_rb, &
7267 1.773609e-02_rb,1.696504e-02_rb,1.624106e-02_rb,1.555990e-02_rb,1.491793e-02_rb, &
7268 1.431197e-02_rb,1.373928e-02_rb,1.319743e-02_rb,1.268430e-02_rb,1.219799e-02_rb, &
7269 1.173682e-02_rb,1.129925e-02_rb,1.088393e-02_rb,1.048961e-02_rb,1.011516e-02_rb, &
7270 9.759543e-03_rb,9.421813e-03_rb,9.101089e-03_rb,8.796559e-03_rb,8.507464e-03_rb, &
7271 8.233098e-03_rb,7.972798e-03_rb,7.725942e-03_rb,7.491940e-03_rb,7.270238e-03_rb, &
7272 7.060305e-03_rb/)
7273 absice3(:,9) = (/ &
7274! band 9
7275 1.236780e-01_rb,9.222386e-02_rb,7.383997e-02_rb,6.204072e-02_rb,5.381029e-02_rb, &
7276 4.770678e-02_rb,4.296928e-02_rb,3.916131e-02_rb,3.601540e-02_rb,3.335878e-02_rb, &
7277 3.107493e-02_rb,2.908247e-02_rb,2.732282e-02_rb,2.575276e-02_rb,2.433968e-02_rb, &
7278 2.305852e-02_rb,2.188966e-02_rb,2.081757e-02_rb,1.982974e-02_rb,1.891599e-02_rb, &
7279 1.806794e-02_rb,1.727865e-02_rb,1.654227e-02_rb,1.585387e-02_rb,1.520924e-02_rb, &
7280 1.460476e-02_rb,1.403730e-02_rb,1.350416e-02_rb,1.300293e-02_rb,1.253153e-02_rb, &
7281 1.208808e-02_rb,1.167094e-02_rb,1.127862e-02_rb,1.090979e-02_rb,1.056323e-02_rb, &
7282 1.023786e-02_rb,9.932665e-03_rb,9.646744e-03_rb,9.379250e-03_rb,9.129409e-03_rb, &
7283 8.896500e-03_rb,8.679856e-03_rb,8.478852e-03_rb,8.292904e-03_rb,8.121463e-03_rb, &
7284 7.964013e-03_rb/)
7285 absice3(:,10) = (/ &
7286! band 10
7287 1.655966e-01_rb,1.134205e-01_rb,8.714344e-02_rb,7.129241e-02_rb,6.063739e-02_rb, &
7288 5.294203e-02_rb,4.709309e-02_rb,4.247476e-02_rb,3.871892e-02_rb,3.559206e-02_rb, &
7289 3.293893e-02_rb,3.065226e-02_rb,2.865558e-02_rb,2.689288e-02_rb,2.532221e-02_rb, &
7290 2.391150e-02_rb,2.263582e-02_rb,2.147549e-02_rb,2.041476e-02_rb,1.944089e-02_rb, &
7291 1.854342e-02_rb,1.771371e-02_rb,1.694456e-02_rb,1.622989e-02_rb,1.556456e-02_rb, &
7292 1.494415e-02_rb,1.436491e-02_rb,1.382354e-02_rb,1.331719e-02_rb,1.284339e-02_rb, &
7293 1.239992e-02_rb,1.198486e-02_rb,1.159647e-02_rb,1.123323e-02_rb,1.089375e-02_rb, &
7294 1.057679e-02_rb,1.028124e-02_rb,1.000607e-02_rb,9.750376e-03_rb,9.513303e-03_rb, &
7295 9.294082e-03_rb,9.092003e-03_rb,8.906412e-03_rb,8.736702e-03_rb,8.582314e-03_rb, &
7296 8.442725e-03_rb/)
7297 absice3(:,11) = (/ &
7298! band 11
7299 1.775615e-01_rb,1.180046e-01_rb,8.929607e-02_rb,7.233500e-02_rb,6.108333e-02_rb, &
7300 5.303642e-02_rb,4.696927e-02_rb,4.221206e-02_rb,3.836768e-02_rb,3.518576e-02_rb, &
7301 3.250063e-02_rb,3.019825e-02_rb,2.819758e-02_rb,2.643943e-02_rb,2.487953e-02_rb, &
7302 2.348414e-02_rb,2.222705e-02_rb,2.108762e-02_rb,2.004936e-02_rb,1.909892e-02_rb, &
7303 1.822539e-02_rb,1.741975e-02_rb,1.667449e-02_rb,1.598330e-02_rb,1.534084e-02_rb, &
7304 1.474253e-02_rb,1.418446e-02_rb,1.366325e-02_rb,1.317597e-02_rb,1.272004e-02_rb, &
7305 1.229321e-02_rb,1.189350e-02_rb,1.151915e-02_rb,1.116859e-02_rb,1.084042e-02_rb, &
7306 1.053338e-02_rb,1.024636e-02_rb,9.978326e-03_rb,9.728357e-03_rb,9.495613e-03_rb, &
7307 9.279327e-03_rb,9.078798e-03_rb,8.893383e-03_rb,8.722488e-03_rb,8.565568e-03_rb, &
7308 8.422115e-03_rb/)
7309 absice3(:,12) = (/ &
7310! band 12
7311 9.465447e-02_rb,6.432047e-02_rb,5.060973e-02_rb,4.267283e-02_rb,3.741843e-02_rb, &
7312 3.363096e-02_rb,3.073531e-02_rb,2.842405e-02_rb,2.651789e-02_rb,2.490518e-02_rb, &
7313 2.351273e-02_rb,2.229056e-02_rb,2.120335e-02_rb,2.022541e-02_rb,1.933763e-02_rb, &
7314 1.852546e-02_rb,1.777763e-02_rb,1.708528e-02_rb,1.644134e-02_rb,1.584009e-02_rb, &
7315 1.527684e-02_rb,1.474774e-02_rb,1.424955e-02_rb,1.377957e-02_rb,1.333549e-02_rb, &
7316 1.291534e-02_rb,1.251743e-02_rb,1.214029e-02_rb,1.178265e-02_rb,1.144337e-02_rb, &
7317 1.112148e-02_rb,1.081609e-02_rb,1.052642e-02_rb,1.025178e-02_rb,9.991540e-03_rb, &
7318 9.745130e-03_rb,9.512038e-03_rb,9.291797e-03_rb,9.083980e-03_rb,8.888195e-03_rb, &
7319 8.704081e-03_rb,8.531306e-03_rb,8.369560e-03_rb,8.218558e-03_rb,8.078032e-03_rb, &
7320 7.947730e-03_rb/)
7321 absice3(:,13) = (/ &
7322! band 13
7323 1.560311e-01_rb,9.961097e-02_rb,7.502949e-02_rb,6.115022e-02_rb,5.214952e-02_rb, &
7324 4.578149e-02_rb,4.099731e-02_rb,3.724174e-02_rb,3.419343e-02_rb,3.165356e-02_rb, &
7325 2.949251e-02_rb,2.762222e-02_rb,2.598073e-02_rb,2.452322e-02_rb,2.321642e-02_rb, &
7326 2.203516e-02_rb,2.096002e-02_rb,1.997579e-02_rb,1.907036e-02_rb,1.823401e-02_rb, &
7327 1.745879e-02_rb,1.673819e-02_rb,1.606678e-02_rb,1.544003e-02_rb,1.485411e-02_rb, &
7328 1.430574e-02_rb,1.379215e-02_rb,1.331092e-02_rb,1.285996e-02_rb,1.243746e-02_rb, &
7329 1.204183e-02_rb,1.167164e-02_rb,1.132567e-02_rb,1.100281e-02_rb,1.070207e-02_rb, &
7330 1.042258e-02_rb,1.016352e-02_rb,9.924197e-03_rb,9.703953e-03_rb,9.502199e-03_rb, &
7331 9.318400e-03_rb,9.152066e-03_rb,9.002749e-03_rb,8.870038e-03_rb,8.753555e-03_rb, &
7332 8.652951e-03_rb/)
7333 absice3(:,14) = (/ &
7334! band 14
7335 1.559547e-01_rb,9.896700e-02_rb,7.441231e-02_rb,6.061469e-02_rb,5.168730e-02_rb, &
7336 4.537821e-02_rb,4.064106e-02_rb,3.692367e-02_rb,3.390714e-02_rb,3.139438e-02_rb, &
7337 2.925702e-02_rb,2.740783e-02_rb,2.578547e-02_rb,2.434552e-02_rb,2.305506e-02_rb, &
7338 2.188910e-02_rb,2.082842e-02_rb,1.985789e-02_rb,1.896553e-02_rb,1.814165e-02_rb, &
7339 1.737839e-02_rb,1.666927e-02_rb,1.600891e-02_rb,1.539279e-02_rb,1.481712e-02_rb, &
7340 1.427865e-02_rb,1.377463e-02_rb,1.330266e-02_rb,1.286068e-02_rb,1.244689e-02_rb, &
7341 1.205973e-02_rb,1.169780e-02_rb,1.135989e-02_rb,1.104492e-02_rb,1.075192e-02_rb, &
7342 1.048004e-02_rb,1.022850e-02_rb,9.996611e-03_rb,9.783753e-03_rb,9.589361e-03_rb, &
7343 9.412924e-03_rb,9.253977e-03_rb,9.112098e-03_rb,8.986903e-03_rb,8.878039e-03_rb, &
7344 8.785184e-03_rb/)
7345 absice3(:,15) = (/ &
7346! band 15
7347 1.102926e-01_rb,7.176622e-02_rb,5.530316e-02_rb,4.606056e-02_rb,4.006116e-02_rb, &
7348 3.579628e-02_rb,3.256909e-02_rb,3.001360e-02_rb,2.791920e-02_rb,2.615617e-02_rb, &
7349 2.464023e-02_rb,2.331426e-02_rb,2.213817e-02_rb,2.108301e-02_rb,2.012733e-02_rb, &
7350 1.925493e-02_rb,1.845331e-02_rb,1.771269e-02_rb,1.702531e-02_rb,1.638493e-02_rb, &
7351 1.578648e-02_rb,1.522579e-02_rb,1.469940e-02_rb,1.420442e-02_rb,1.373841e-02_rb, &
7352 1.329931e-02_rb,1.288535e-02_rb,1.249502e-02_rb,1.212700e-02_rb,1.178015e-02_rb, &
7353 1.145348e-02_rb,1.114612e-02_rb,1.085730e-02_rb,1.058633e-02_rb,1.033263e-02_rb, &
7354 1.009564e-02_rb,9.874895e-03_rb,9.669960e-03_rb,9.480449e-03_rb,9.306014e-03_rb, &
7355 9.146339e-03_rb,9.001138e-03_rb,8.870154e-03_rb,8.753148e-03_rb,8.649907e-03_rb, &
7356 8.560232e-03_rb/)
7357 absice3(:,16) = (/ &
7358! band 16
7359 1.688344e-01_rb,1.077072e-01_rb,7.994467e-02_rb,6.403862e-02_rb,5.369850e-02_rb, &
7360 4.641582e-02_rb,4.099331e-02_rb,3.678724e-02_rb,3.342069e-02_rb,3.065831e-02_rb, &
7361 2.834557e-02_rb,2.637680e-02_rb,2.467733e-02_rb,2.319286e-02_rb,2.188299e-02_rb, &
7362 2.071701e-02_rb,1.967121e-02_rb,1.872692e-02_rb,1.786931e-02_rb,1.708641e-02_rb, &
7363 1.636846e-02_rb,1.570743e-02_rb,1.509665e-02_rb,1.453052e-02_rb,1.400433e-02_rb, &
7364 1.351407e-02_rb,1.305631e-02_rb,1.262810e-02_rb,1.222688e-02_rb,1.185044e-02_rb, &
7365 1.149683e-02_rb,1.116436e-02_rb,1.085153e-02_rb,1.055701e-02_rb,1.027961e-02_rb, &
7366 1.001831e-02_rb,9.772141e-03_rb,9.540280e-03_rb,9.321966e-03_rb,9.116517e-03_rb, &
7367 8.923315e-03_rb,8.741803e-03_rb,8.571472e-03_rb,8.411860e-03_rb,8.262543e-03_rb, &
7368 8.123136e-03_rb/)
7369
7370! For LIQFLAG = 0.
7371 absliq0 = 0.0903614_rb
7372
7373! For LIQFLAG = 1. In each band, the absorption
7374! coefficients are listed for a range of effective radii from 2.5
7375! to 59.5 microns in increments of 1.0 micron.
7376 absliq1(:, 1) = (/ &
7377! band 1
7378 1.64047e-03_rb, 6.90533e-02_rb, 7.72017e-02_rb, 7.78054e-02_rb, 7.69523e-02_rb, &
7379 7.58058e-02_rb, 7.46400e-02_rb, 7.35123e-02_rb, 7.24162e-02_rb, 7.13225e-02_rb, &
7380 6.99145e-02_rb, 6.66409e-02_rb, 6.36582e-02_rb, 6.09425e-02_rb, 5.84593e-02_rb, &
7381 5.61743e-02_rb, 5.40571e-02_rb, 5.20812e-02_rb, 5.02245e-02_rb, 4.84680e-02_rb, &
7382 4.67959e-02_rb, 4.51944e-02_rb, 4.36516e-02_rb, 4.21570e-02_rb, 4.07015e-02_rb, &
7383 3.92766e-02_rb, 3.78747e-02_rb, 3.64886e-02_rb, 3.53632e-02_rb, 3.41992e-02_rb, &
7384 3.31016e-02_rb, 3.20643e-02_rb, 3.10817e-02_rb, 3.01490e-02_rb, 2.92620e-02_rb, &
7385 2.84171e-02_rb, 2.76108e-02_rb, 2.68404e-02_rb, 2.61031e-02_rb, 2.53966e-02_rb, &
7386 2.47189e-02_rb, 2.40678e-02_rb, 2.34418e-02_rb, 2.28392e-02_rb, 2.22586e-02_rb, &
7387 2.16986e-02_rb, 2.11580e-02_rb, 2.06356e-02_rb, 2.01305e-02_rb, 1.96417e-02_rb, &
7388 1.91682e-02_rb, 1.87094e-02_rb, 1.82643e-02_rb, 1.78324e-02_rb, 1.74129e-02_rb, &
7389 1.70052e-02_rb, 1.66088e-02_rb, 1.62231e-02_rb/)
7390 absliq1(:, 2) = (/ &
7391! band 2
7392 2.19486e-01_rb, 1.80687e-01_rb, 1.59150e-01_rb, 1.44731e-01_rb, 1.33703e-01_rb, &
7393 1.24355e-01_rb, 1.15756e-01_rb, 1.07318e-01_rb, 9.86119e-02_rb, 8.92739e-02_rb, &
7394 8.34911e-02_rb, 7.70773e-02_rb, 7.15240e-02_rb, 6.66615e-02_rb, 6.23641e-02_rb, &
7395 5.85359e-02_rb, 5.51020e-02_rb, 5.20032e-02_rb, 4.91916e-02_rb, 4.66283e-02_rb, &
7396 4.42813e-02_rb, 4.21236e-02_rb, 4.01330e-02_rb, 3.82905e-02_rb, 3.65797e-02_rb, &
7397 3.49869e-02_rb, 3.35002e-02_rb, 3.21090e-02_rb, 3.08957e-02_rb, 2.97601e-02_rb, &
7398 2.86966e-02_rb, 2.76984e-02_rb, 2.67599e-02_rb, 2.58758e-02_rb, 2.50416e-02_rb, &
7399 2.42532e-02_rb, 2.35070e-02_rb, 2.27997e-02_rb, 2.21284e-02_rb, 2.14904e-02_rb, &
7400 2.08834e-02_rb, 2.03051e-02_rb, 1.97536e-02_rb, 1.92271e-02_rb, 1.87239e-02_rb, &
7401 1.82425e-02_rb, 1.77816e-02_rb, 1.73399e-02_rb, 1.69162e-02_rb, 1.65094e-02_rb, &
7402 1.61187e-02_rb, 1.57430e-02_rb, 1.53815e-02_rb, 1.50334e-02_rb, 1.46981e-02_rb, &
7403 1.43748e-02_rb, 1.40628e-02_rb, 1.37617e-02_rb/)
7404 absliq1(:, 3) = (/ &
7405! band 3
7406 2.95174e-01_rb, 2.34765e-01_rb, 1.98038e-01_rb, 1.72114e-01_rb, 1.52083e-01_rb, &
7407 1.35654e-01_rb, 1.21613e-01_rb, 1.09252e-01_rb, 9.81263e-02_rb, 8.79448e-02_rb, &
7408 8.12566e-02_rb, 7.44563e-02_rb, 6.86374e-02_rb, 6.36042e-02_rb, 5.92094e-02_rb, &
7409 5.53402e-02_rb, 5.19087e-02_rb, 4.88455e-02_rb, 4.60951e-02_rb, 4.36124e-02_rb, &
7410 4.13607e-02_rb, 3.93096e-02_rb, 3.74338e-02_rb, 3.57119e-02_rb, 3.41261e-02_rb, &
7411 3.26610e-02_rb, 3.13036e-02_rb, 3.00425e-02_rb, 2.88497e-02_rb, 2.78077e-02_rb, &
7412 2.68317e-02_rb, 2.59158e-02_rb, 2.50545e-02_rb, 2.42430e-02_rb, 2.34772e-02_rb, &
7413 2.27533e-02_rb, 2.20679e-02_rb, 2.14181e-02_rb, 2.08011e-02_rb, 2.02145e-02_rb, &
7414 1.96561e-02_rb, 1.91239e-02_rb, 1.86161e-02_rb, 1.81311e-02_rb, 1.76673e-02_rb, &
7415 1.72234e-02_rb, 1.67981e-02_rb, 1.63903e-02_rb, 1.59989e-02_rb, 1.56230e-02_rb, &
7416 1.52615e-02_rb, 1.49138e-02_rb, 1.45791e-02_rb, 1.42565e-02_rb, 1.39455e-02_rb, &
7417 1.36455e-02_rb, 1.33559e-02_rb, 1.30761e-02_rb/)
7418 absliq1(:, 4) = (/ &
7419! band 4
7420 3.00925e-01_rb, 2.36949e-01_rb, 1.96947e-01_rb, 1.68692e-01_rb, 1.47190e-01_rb, &
7421 1.29986e-01_rb, 1.15719e-01_rb, 1.03568e-01_rb, 9.30028e-02_rb, 8.36658e-02_rb, &
7422 7.71075e-02_rb, 7.07002e-02_rb, 6.52284e-02_rb, 6.05024e-02_rb, 5.63801e-02_rb, &
7423 5.27534e-02_rb, 4.95384e-02_rb, 4.66690e-02_rb, 4.40925e-02_rb, 4.17664e-02_rb, &
7424 3.96559e-02_rb, 3.77326e-02_rb, 3.59727e-02_rb, 3.43561e-02_rb, 3.28662e-02_rb, &
7425 3.14885e-02_rb, 3.02110e-02_rb, 2.90231e-02_rb, 2.78948e-02_rb, 2.69109e-02_rb, &
7426 2.59884e-02_rb, 2.51217e-02_rb, 2.43058e-02_rb, 2.35364e-02_rb, 2.28096e-02_rb, &
7427 2.21218e-02_rb, 2.14700e-02_rb, 2.08515e-02_rb, 2.02636e-02_rb, 1.97041e-02_rb, &
7428 1.91711e-02_rb, 1.86625e-02_rb, 1.81769e-02_rb, 1.77126e-02_rb, 1.72683e-02_rb, &
7429 1.68426e-02_rb, 1.64344e-02_rb, 1.60427e-02_rb, 1.56664e-02_rb, 1.53046e-02_rb, &
7430 1.49565e-02_rb, 1.46214e-02_rb, 1.42985e-02_rb, 1.39871e-02_rb, 1.36866e-02_rb, &
7431 1.33965e-02_rb, 1.31162e-02_rb, 1.28453e-02_rb/)
7432 absliq1(:, 5) = (/ &
7433! band 5
7434 2.64691e-01_rb, 2.12018e-01_rb, 1.78009e-01_rb, 1.53539e-01_rb, 1.34721e-01_rb, &
7435 1.19580e-01_rb, 1.06996e-01_rb, 9.62772e-02_rb, 8.69710e-02_rb, 7.87670e-02_rb, &
7436 7.29272e-02_rb, 6.70920e-02_rb, 6.20977e-02_rb, 5.77732e-02_rb, 5.39910e-02_rb, &
7437 5.06538e-02_rb, 4.76866e-02_rb, 4.50301e-02_rb, 4.26374e-02_rb, 4.04704e-02_rb, &
7438 3.84981e-02_rb, 3.66948e-02_rb, 3.50394e-02_rb, 3.35141e-02_rb, 3.21038e-02_rb, &
7439 3.07957e-02_rb, 2.95788e-02_rb, 2.84438e-02_rb, 2.73790e-02_rb, 2.64390e-02_rb, &
7440 2.55565e-02_rb, 2.47263e-02_rb, 2.39437e-02_rb, 2.32047e-02_rb, 2.25056e-02_rb, &
7441 2.18433e-02_rb, 2.12149e-02_rb, 2.06177e-02_rb, 2.00495e-02_rb, 1.95081e-02_rb, &
7442 1.89917e-02_rb, 1.84984e-02_rb, 1.80269e-02_rb, 1.75755e-02_rb, 1.71431e-02_rb, &
7443 1.67283e-02_rb, 1.63303e-02_rb, 1.59478e-02_rb, 1.55801e-02_rb, 1.52262e-02_rb, &
7444 1.48853e-02_rb, 1.45568e-02_rb, 1.42400e-02_rb, 1.39342e-02_rb, 1.36388e-02_rb, &
7445 1.33533e-02_rb, 1.30773e-02_rb, 1.28102e-02_rb/)
7446 absliq1(:, 6) = (/ &
7447! band 6
7448 8.81182e-02_rb, 1.06745e-01_rb, 9.79753e-02_rb, 8.99625e-02_rb, 8.35200e-02_rb, &
7449 7.81899e-02_rb, 7.35939e-02_rb, 6.94696e-02_rb, 6.56266e-02_rb, 6.19148e-02_rb, &
7450 5.83355e-02_rb, 5.49306e-02_rb, 5.19642e-02_rb, 4.93325e-02_rb, 4.69659e-02_rb, &
7451 4.48148e-02_rb, 4.28431e-02_rb, 4.10231e-02_rb, 3.93332e-02_rb, 3.77563e-02_rb, &
7452 3.62785e-02_rb, 3.48882e-02_rb, 3.35758e-02_rb, 3.23333e-02_rb, 3.11536e-02_rb, &
7453 3.00310e-02_rb, 2.89601e-02_rb, 2.79365e-02_rb, 2.70502e-02_rb, 2.62618e-02_rb, &
7454 2.55025e-02_rb, 2.47728e-02_rb, 2.40726e-02_rb, 2.34013e-02_rb, 2.27583e-02_rb, &
7455 2.21422e-02_rb, 2.15522e-02_rb, 2.09869e-02_rb, 2.04453e-02_rb, 1.99260e-02_rb, &
7456 1.94280e-02_rb, 1.89501e-02_rb, 1.84913e-02_rb, 1.80506e-02_rb, 1.76270e-02_rb, &
7457 1.72196e-02_rb, 1.68276e-02_rb, 1.64500e-02_rb, 1.60863e-02_rb, 1.57357e-02_rb, &
7458 1.53975e-02_rb, 1.50710e-02_rb, 1.47558e-02_rb, 1.44511e-02_rb, 1.41566e-02_rb, &
7459 1.38717e-02_rb, 1.35960e-02_rb, 1.33290e-02_rb/)
7460 absliq1(:, 7) = (/ &
7461! band 7
7462 4.32174e-02_rb, 7.36078e-02_rb, 6.98340e-02_rb, 6.65231e-02_rb, 6.41948e-02_rb, &
7463 6.23551e-02_rb, 6.06638e-02_rb, 5.88680e-02_rb, 5.67124e-02_rb, 5.38629e-02_rb, &
7464 4.99579e-02_rb, 4.86289e-02_rb, 4.70120e-02_rb, 4.52854e-02_rb, 4.35466e-02_rb, &
7465 4.18480e-02_rb, 4.02169e-02_rb, 3.86658e-02_rb, 3.71992e-02_rb, 3.58168e-02_rb, &
7466 3.45155e-02_rb, 3.32912e-02_rb, 3.21390e-02_rb, 3.10538e-02_rb, 3.00307e-02_rb, &
7467 2.90651e-02_rb, 2.81524e-02_rb, 2.72885e-02_rb, 2.62821e-02_rb, 2.55744e-02_rb, &
7468 2.48799e-02_rb, 2.42029e-02_rb, 2.35460e-02_rb, 2.29108e-02_rb, 2.22981e-02_rb, &
7469 2.17079e-02_rb, 2.11402e-02_rb, 2.05945e-02_rb, 2.00701e-02_rb, 1.95663e-02_rb, &
7470 1.90824e-02_rb, 1.86174e-02_rb, 1.81706e-02_rb, 1.77411e-02_rb, 1.73281e-02_rb, &
7471 1.69307e-02_rb, 1.65483e-02_rb, 1.61801e-02_rb, 1.58254e-02_rb, 1.54835e-02_rb, &
7472 1.51538e-02_rb, 1.48358e-02_rb, 1.45288e-02_rb, 1.42322e-02_rb, 1.39457e-02_rb, &
7473 1.36687e-02_rb, 1.34008e-02_rb, 1.31416e-02_rb/)
7474 absliq1(:, 8) = (/ &
7475! band 8
7476 1.41881e-01_rb, 7.15419e-02_rb, 6.30335e-02_rb, 6.11132e-02_rb, 6.01931e-02_rb, &
7477 5.92420e-02_rb, 5.78968e-02_rb, 5.58876e-02_rb, 5.28923e-02_rb, 4.84462e-02_rb, &
7478 4.60839e-02_rb, 4.56013e-02_rb, 4.45410e-02_rb, 4.31866e-02_rb, 4.17026e-02_rb, &
7479 4.01850e-02_rb, 3.86892e-02_rb, 3.72461e-02_rb, 3.58722e-02_rb, 3.45749e-02_rb, &
7480 3.33564e-02_rb, 3.22155e-02_rb, 3.11494e-02_rb, 3.01541e-02_rb, 2.92253e-02_rb, &
7481 2.83584e-02_rb, 2.75488e-02_rb, 2.67925e-02_rb, 2.57692e-02_rb, 2.50704e-02_rb, &
7482 2.43918e-02_rb, 2.37350e-02_rb, 2.31005e-02_rb, 2.24888e-02_rb, 2.18996e-02_rb, &
7483 2.13325e-02_rb, 2.07870e-02_rb, 2.02623e-02_rb, 1.97577e-02_rb, 1.92724e-02_rb, &
7484 1.88056e-02_rb, 1.83564e-02_rb, 1.79241e-02_rb, 1.75079e-02_rb, 1.71070e-02_rb, &
7485 1.67207e-02_rb, 1.63482e-02_rb, 1.59890e-02_rb, 1.56424e-02_rb, 1.53077e-02_rb, &
7486 1.49845e-02_rb, 1.46722e-02_rb, 1.43702e-02_rb, 1.40782e-02_rb, 1.37955e-02_rb, &
7487 1.35219e-02_rb, 1.32569e-02_rb, 1.30000e-02_rb/)
7488 absliq1(:, 9) = (/ &
7489! band 9
7490 6.72726e-02_rb, 6.61013e-02_rb, 6.47866e-02_rb, 6.33780e-02_rb, 6.18985e-02_rb, &
7491 6.03335e-02_rb, 5.86136e-02_rb, 5.65876e-02_rb, 5.39839e-02_rb, 5.03536e-02_rb, &
7492 4.71608e-02_rb, 4.63630e-02_rb, 4.50313e-02_rb, 4.34526e-02_rb, 4.17876e-02_rb, &
7493 4.01261e-02_rb, 3.85171e-02_rb, 3.69860e-02_rb, 3.55442e-02_rb, 3.41954e-02_rb, &
7494 3.29384e-02_rb, 3.17693e-02_rb, 3.06832e-02_rb, 2.96745e-02_rb, 2.87374e-02_rb, &
7495 2.78662e-02_rb, 2.70557e-02_rb, 2.63008e-02_rb, 2.52450e-02_rb, 2.45424e-02_rb, &
7496 2.38656e-02_rb, 2.32144e-02_rb, 2.25885e-02_rb, 2.19873e-02_rb, 2.14099e-02_rb, &
7497 2.08554e-02_rb, 2.03230e-02_rb, 1.98116e-02_rb, 1.93203e-02_rb, 1.88482e-02_rb, &
7498 1.83944e-02_rb, 1.79578e-02_rb, 1.75378e-02_rb, 1.71335e-02_rb, 1.67440e-02_rb, &
7499 1.63687e-02_rb, 1.60069e-02_rb, 1.56579e-02_rb, 1.53210e-02_rb, 1.49958e-02_rb, &
7500 1.46815e-02_rb, 1.43778e-02_rb, 1.40841e-02_rb, 1.37999e-02_rb, 1.35249e-02_rb, &
7501 1.32585e-02_rb, 1.30004e-02_rb, 1.27502e-02_rb/)
7502 absliq1(:,10) = (/ &
7503! band 10
7504 7.97040e-02_rb, 7.63844e-02_rb, 7.36499e-02_rb, 7.13525e-02_rb, 6.93043e-02_rb, &
7505 6.72807e-02_rb, 6.50227e-02_rb, 6.22395e-02_rb, 5.86093e-02_rb, 5.37815e-02_rb, &
7506 5.14682e-02_rb, 4.97214e-02_rb, 4.77392e-02_rb, 4.56961e-02_rb, 4.36858e-02_rb, &
7507 4.17569e-02_rb, 3.99328e-02_rb, 3.82224e-02_rb, 3.66265e-02_rb, 3.51416e-02_rb, &
7508 3.37617e-02_rb, 3.24798e-02_rb, 3.12887e-02_rb, 3.01812e-02_rb, 2.91505e-02_rb, &
7509 2.81900e-02_rb, 2.72939e-02_rb, 2.64568e-02_rb, 2.54165e-02_rb, 2.46832e-02_rb, &
7510 2.39783e-02_rb, 2.33017e-02_rb, 2.26531e-02_rb, 2.20314e-02_rb, 2.14359e-02_rb, &
7511 2.08653e-02_rb, 2.03187e-02_rb, 1.97947e-02_rb, 1.92924e-02_rb, 1.88106e-02_rb, &
7512 1.83483e-02_rb, 1.79043e-02_rb, 1.74778e-02_rb, 1.70678e-02_rb, 1.66735e-02_rb, &
7513 1.62941e-02_rb, 1.59286e-02_rb, 1.55766e-02_rb, 1.52371e-02_rb, 1.49097e-02_rb, &
7514 1.45937e-02_rb, 1.42885e-02_rb, 1.39936e-02_rb, 1.37085e-02_rb, 1.34327e-02_rb, &
7515 1.31659e-02_rb, 1.29075e-02_rb, 1.26571e-02_rb/)
7516 absliq1(:,11) = (/ &
7517! band 11
7518 1.49438e-01_rb, 1.33535e-01_rb, 1.21542e-01_rb, 1.11743e-01_rb, 1.03263e-01_rb, &
7519 9.55774e-02_rb, 8.83382e-02_rb, 8.12943e-02_rb, 7.42533e-02_rb, 6.70609e-02_rb, &
7520 6.38761e-02_rb, 5.97788e-02_rb, 5.59841e-02_rb, 5.25318e-02_rb, 4.94132e-02_rb, &
7521 4.66014e-02_rb, 4.40644e-02_rb, 4.17706e-02_rb, 3.96910e-02_rb, 3.77998e-02_rb, &
7522 3.60742e-02_rb, 3.44947e-02_rb, 3.30442e-02_rb, 3.17079e-02_rb, 3.04730e-02_rb, &
7523 2.93283e-02_rb, 2.82642e-02_rb, 2.72720e-02_rb, 2.61789e-02_rb, 2.53277e-02_rb, &
7524 2.45237e-02_rb, 2.37635e-02_rb, 2.30438e-02_rb, 2.23615e-02_rb, 2.17140e-02_rb, &
7525 2.10987e-02_rb, 2.05133e-02_rb, 1.99557e-02_rb, 1.94241e-02_rb, 1.89166e-02_rb, &
7526 1.84317e-02_rb, 1.79679e-02_rb, 1.75238e-02_rb, 1.70983e-02_rb, 1.66901e-02_rb, &
7527 1.62983e-02_rb, 1.59219e-02_rb, 1.55599e-02_rb, 1.52115e-02_rb, 1.48761e-02_rb, &
7528 1.45528e-02_rb, 1.42411e-02_rb, 1.39402e-02_rb, 1.36497e-02_rb, 1.33690e-02_rb, &
7529 1.30976e-02_rb, 1.28351e-02_rb, 1.25810e-02_rb/)
7530 absliq1(:,12) = (/ &
7531! band 12
7532 3.71985e-02_rb, 3.88586e-02_rb, 3.99070e-02_rb, 4.04351e-02_rb, 4.04610e-02_rb, &
7533 3.99834e-02_rb, 3.89953e-02_rb, 3.74886e-02_rb, 3.54551e-02_rb, 3.28870e-02_rb, &
7534 3.32576e-02_rb, 3.22444e-02_rb, 3.12384e-02_rb, 3.02584e-02_rb, 2.93146e-02_rb, &
7535 2.84120e-02_rb, 2.75525e-02_rb, 2.67361e-02_rb, 2.59618e-02_rb, 2.52280e-02_rb, &
7536 2.45327e-02_rb, 2.38736e-02_rb, 2.32487e-02_rb, 2.26558e-02_rb, 2.20929e-02_rb, &
7537 2.15579e-02_rb, 2.10491e-02_rb, 2.05648e-02_rb, 1.99749e-02_rb, 1.95704e-02_rb, &
7538 1.91731e-02_rb, 1.87839e-02_rb, 1.84032e-02_rb, 1.80315e-02_rb, 1.76689e-02_rb, &
7539 1.73155e-02_rb, 1.69712e-02_rb, 1.66362e-02_rb, 1.63101e-02_rb, 1.59928e-02_rb, &
7540 1.56842e-02_rb, 1.53840e-02_rb, 1.50920e-02_rb, 1.48080e-02_rb, 1.45318e-02_rb, &
7541 1.42631e-02_rb, 1.40016e-02_rb, 1.37472e-02_rb, 1.34996e-02_rb, 1.32586e-02_rb, &
7542 1.30239e-02_rb, 1.27954e-02_rb, 1.25728e-02_rb, 1.23559e-02_rb, 1.21445e-02_rb, &
7543 1.19385e-02_rb, 1.17376e-02_rb, 1.15417e-02_rb/)
7544
7545 absliq1(:,13) = (/ &
7546! band 13
7547 3.11868e-02_rb, 4.48357e-02_rb, 4.90224e-02_rb, 4.96406e-02_rb, 4.86806e-02_rb, &
7548 4.69610e-02_rb, 4.48630e-02_rb, 4.25795e-02_rb, 4.02138e-02_rb, 3.78236e-02_rb, &
7549 3.74266e-02_rb, 3.60384e-02_rb, 3.47074e-02_rb, 3.34434e-02_rb, 3.22499e-02_rb, &
7550 3.11264e-02_rb, 3.00704e-02_rb, 2.90784e-02_rb, 2.81463e-02_rb, 2.72702e-02_rb, &
7551 2.64460e-02_rb, 2.56698e-02_rb, 2.49381e-02_rb, 2.42475e-02_rb, 2.35948e-02_rb, &
7552 2.29774e-02_rb, 2.23925e-02_rb, 2.18379e-02_rb, 2.11793e-02_rb, 2.07076e-02_rb, &
7553 2.02470e-02_rb, 1.97981e-02_rb, 1.93613e-02_rb, 1.89367e-02_rb, 1.85243e-02_rb, &
7554 1.81240e-02_rb, 1.77356e-02_rb, 1.73588e-02_rb, 1.69935e-02_rb, 1.66392e-02_rb, &
7555 1.62956e-02_rb, 1.59624e-02_rb, 1.56393e-02_rb, 1.53259e-02_rb, 1.50219e-02_rb, &
7556 1.47268e-02_rb, 1.44404e-02_rb, 1.41624e-02_rb, 1.38925e-02_rb, 1.36302e-02_rb, &
7557 1.33755e-02_rb, 1.31278e-02_rb, 1.28871e-02_rb, 1.26530e-02_rb, 1.24253e-02_rb, &
7558 1.22038e-02_rb, 1.19881e-02_rb, 1.17782e-02_rb/)
7559 absliq1(:,14) = (/ &
7560! band 14
7561 1.58988e-02_rb, 3.50652e-02_rb, 4.00851e-02_rb, 4.07270e-02_rb, 3.98101e-02_rb, &
7562 3.83306e-02_rb, 3.66829e-02_rb, 3.50327e-02_rb, 3.34497e-02_rb, 3.19609e-02_rb, &
7563 3.13712e-02_rb, 3.03348e-02_rb, 2.93415e-02_rb, 2.83973e-02_rb, 2.75037e-02_rb, &
7564 2.66604e-02_rb, 2.58654e-02_rb, 2.51161e-02_rb, 2.44100e-02_rb, 2.37440e-02_rb, &
7565 2.31154e-02_rb, 2.25215e-02_rb, 2.19599e-02_rb, 2.14282e-02_rb, 2.09242e-02_rb, &
7566 2.04459e-02_rb, 1.99915e-02_rb, 1.95594e-02_rb, 1.90254e-02_rb, 1.86598e-02_rb, &
7567 1.82996e-02_rb, 1.79455e-02_rb, 1.75983e-02_rb, 1.72584e-02_rb, 1.69260e-02_rb, &
7568 1.66013e-02_rb, 1.62843e-02_rb, 1.59752e-02_rb, 1.56737e-02_rb, 1.53799e-02_rb, &
7569 1.50936e-02_rb, 1.48146e-02_rb, 1.45429e-02_rb, 1.42782e-02_rb, 1.40203e-02_rb, &
7570 1.37691e-02_rb, 1.35243e-02_rb, 1.32858e-02_rb, 1.30534e-02_rb, 1.28270e-02_rb, &
7571 1.26062e-02_rb, 1.23909e-02_rb, 1.21810e-02_rb, 1.19763e-02_rb, 1.17766e-02_rb, &
7572 1.15817e-02_rb, 1.13915e-02_rb, 1.12058e-02_rb/)
7573 absliq1(:,15) = (/ &
7574! band 15
7575 5.02079e-03_rb, 2.17615e-02_rb, 2.55449e-02_rb, 2.59484e-02_rb, 2.53650e-02_rb, &
7576 2.45281e-02_rb, 2.36843e-02_rb, 2.29159e-02_rb, 2.22451e-02_rb, 2.16716e-02_rb, &
7577 2.11451e-02_rb, 2.05817e-02_rb, 2.00454e-02_rb, 1.95372e-02_rb, 1.90567e-02_rb, &
7578 1.86028e-02_rb, 1.81742e-02_rb, 1.77693e-02_rb, 1.73866e-02_rb, 1.70244e-02_rb, &
7579 1.66815e-02_rb, 1.63563e-02_rb, 1.60477e-02_rb, 1.57544e-02_rb, 1.54755e-02_rb, &
7580 1.52097e-02_rb, 1.49564e-02_rb, 1.47146e-02_rb, 1.43684e-02_rb, 1.41728e-02_rb, &
7581 1.39762e-02_rb, 1.37797e-02_rb, 1.35838e-02_rb, 1.33891e-02_rb, 1.31961e-02_rb, &
7582 1.30051e-02_rb, 1.28164e-02_rb, 1.26302e-02_rb, 1.24466e-02_rb, 1.22659e-02_rb, &
7583 1.20881e-02_rb, 1.19131e-02_rb, 1.17412e-02_rb, 1.15723e-02_rb, 1.14063e-02_rb, &
7584 1.12434e-02_rb, 1.10834e-02_rb, 1.09264e-02_rb, 1.07722e-02_rb, 1.06210e-02_rb, &
7585 1.04725e-02_rb, 1.03269e-02_rb, 1.01839e-02_rb, 1.00436e-02_rb, 9.90593e-03_rb, &
7586 9.77080e-03_rb, 9.63818e-03_rb, 9.50800e-03_rb/)
7587 absliq1(:,16) = (/ &
7588! band 16
7589 5.64971e-02_rb, 9.04736e-02_rb, 8.11726e-02_rb, 7.05450e-02_rb, 6.20052e-02_rb, &
7590 5.54286e-02_rb, 5.03503e-02_rb, 4.63791e-02_rb, 4.32290e-02_rb, 4.06959e-02_rb, &
7591 3.74690e-02_rb, 3.52964e-02_rb, 3.33799e-02_rb, 3.16774e-02_rb, 3.01550e-02_rb, &
7592 2.87856e-02_rb, 2.75474e-02_rb, 2.64223e-02_rb, 2.53953e-02_rb, 2.44542e-02_rb, &
7593 2.35885e-02_rb, 2.27894e-02_rb, 2.20494e-02_rb, 2.13622e-02_rb, 2.07222e-02_rb, &
7594 2.01246e-02_rb, 1.95654e-02_rb, 1.90408e-02_rb, 1.84398e-02_rb, 1.80021e-02_rb, &
7595 1.75816e-02_rb, 1.71775e-02_rb, 1.67889e-02_rb, 1.64152e-02_rb, 1.60554e-02_rb, &
7596 1.57089e-02_rb, 1.53751e-02_rb, 1.50531e-02_rb, 1.47426e-02_rb, 1.44428e-02_rb, &
7597 1.41532e-02_rb, 1.38734e-02_rb, 1.36028e-02_rb, 1.33410e-02_rb, 1.30875e-02_rb, &
7598 1.28420e-02_rb, 1.26041e-02_rb, 1.23735e-02_rb, 1.21497e-02_rb, 1.19325e-02_rb, &
7599 1.17216e-02_rb, 1.15168e-02_rb, 1.13177e-02_rb, 1.11241e-02_rb, 1.09358e-02_rb, &
7600 1.07525e-02_rb, 1.05741e-02_rb, 1.04003e-02_rb/)
7601
7602!jm not thread safe hvrclc = '$Revision: 1.8 $'
7603
7604 ncbands = 1
7605
7606! This initialization is done in rrtmg_lw_subcol.F90.
7607! do lay = 1, nlayers
7608! do ig = 1, ngptlw
7609! taucmc(ig,lay) = 0.0_rb
7610! enddo
7611! enddo
7612
7613! Main layer loop
7614 do lay = 1, nlayers
7615
7616 do ig = 1, ngptlw
7617 cwp = ciwpmc(ig,lay) + clwpmc(ig,lay) + cswpmc(ig,lay)
7618 if (cldfmc(ig,lay) .ge. cldmin .and. &
7619 & (cwp .ge. cldmin .or. taucmc(ig,lay) .ge. cldmin)) then
7620
7621
7622! Ice clouds and water clouds combined.
7623 if (inflag .eq. 0) then
7624! Cloud optical depth already defined in taucmc, return to main program
7625 return
7626
7627 elseif(inflag .eq. 1) then
7628 errflg = 1
7629 errmsg = 'ERROR(rlwinit): INFLAG = 1 OPTION NOT AVAILABLE WITH MCICA'
7630 return
7631! cwp = ciwpmc(ig,lay) + clwpmc(ig,lay)
7632! taucmc(ig,lay) = abscld1 * cwp
7633
7634! Separate treatement of ice clouds and water clouds.
7635 elseif(inflag .ge. 2) then
7636 radice = reicmc(lay)
7637
7638! Calculation of absorption coefficients due to ice clouds.
7639 if ((ciwpmc(ig,lay)+cswpmc(ig,lay)) .eq. 0.0_rb) then
7640 abscoice(ig) = 0.0_rb
7641 abscosno(ig) = 0.0_rb
7642
7643 elseif (iceflag .eq. 0) then
7644! if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL'
7645 abscoice(ig) = absice0(1) + absice0(2)/max(radice,10.0_rb)
7646 abscosno(ig) = 0.0_rb
7647
7648 elseif (iceflag .eq. 1) then
7649! if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop&
7650! & 'ICE RADIUS OUT OF BOUNDS'
7651 ncbands = 5
7652 ib = icb(ngb(ig))
7653 abscoice(ig) = absice1(1,ib) + absice1(2,ib)/min(max(radice,13.0_rb),130._rb)
7654 abscosno(ig) = 0.0_rb
7655
7656! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns
7657
7658 elseif (iceflag .eq. 2) then
7659! if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop&
7660! & 'ICE RADIUS OUT OF BOUNDS'
7661 ncbands = 16
7662 factor = (min(max(radice,5.0_rb),131._rb) - 2._rb)/3._rb
7663 index = int(factor)
7664 if (index .eq. 43) index = 42
7665 fint = factor - float(index)
7666 ib = ngb(ig)
7667 abscoice(ig) = &
7668 & absice2(index,ib) + fint * &
7669 & (absice2(index+1,ib) - (absice2(index,ib)))
7670 abscosno(ig) = 0.0_rb
7671
7672! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns
7673
7674 elseif (iceflag .ge. 3) then
7675! if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) then
7676! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) &
7677! & 'ERROR: ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' &
7678! & ,ig, lay, ciwpmc(ig,lay), radice
7679! errflg = 1
7680! return
7681! end if
7682 ncbands = 16
7683 factor = (min(max(radice,5.0_rb),140._rb) - 2._rb)/3._rb
7684 index = int(factor)
7685 if (index .eq. 46) index = 45
7686 fint = factor - float(index)
7687 ib = ngb(ig)
7688 abscoice(ig) = &
7689 & absice3(index,ib) + fint * &
7690 & (absice3(index+1,ib) - (absice3(index,ib)))
7691 abscosno(ig) = 0.0_rb
7692
7693 endif
7694
7695!..Incorporate additional effects due to snow.
7696 if (cswpmc(ig,lay).gt.0.0_rb .and. iceflag .eq. 5) then
7697 radsno = resnmc(lay)
7698! if (radsno .lt. 5.0_rb .or. radsno .gt. 140.0_rb) then
7699! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) &
7700! & 'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' &
7701! & ,ig, lay, cswpmc(ig,lay), radsno
7702! errflg = 1
7703! return
7704! end if
7705 ncbands = 16
7706 factor = (min(max(radsno,5.0_rb),140.0_rb) - 2._rb)/3._rb
7707 index = int(factor)
7708 if (index .eq. 46) index = 45
7709 fint = factor - float(index)
7710 ib = ngb(ig)
7711 abscosno(ig) = &
7712 & absice3(index,ib) + fint * &
7713 & (absice3(index+1,ib) - (absice3(index,ib)))
7714 endif
7715
7716
7717
7718! Calculation of absorption coefficients due to water clouds.
7719 if (clwpmc(ig,lay) .eq. 0.0_rb) then
7720 abscoliq(ig) = 0.0_rb
7721
7722 elseif (liqflag .eq. 0) then
7723 abscoliq(ig) = absliq0
7724
7725 elseif (liqflag .eq. 1) then
7726 radliq = relqmc(lay)
7727! if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) then
7728! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) &
7729!& 'ERROR: LIQUID EFFECTIVE SIZE OUT OF BOUNDS' &
7730!& ,ig, lay, clwpmc(ig,lay), radliq
7731! errflg = 1
7732! return
7733! end if
7734 index = int(min(max(radliq,2.5_rb),60._rb) - 1.5_rb)
7735 if (index .eq. 0) index = 1
7736 if (index .eq. 58) index = 57
7737 fint = radliq - 1.5_rb - float(index)
7738 ib = ngb(ig)
7739 abscoliq(ig) = &
7740 & absliq1(index,ib) + fint * &
7741 & (absliq1(index+1,ib) - (absliq1(index,ib)))
7742 endif
7743
7744 taucmc(ig,lay) = ciwpmc(ig,lay) * abscoice(ig) + &
7745 & clwpmc(ig,lay) * abscoliq(ig) + &
7746 & cswpmc(ig,lay) * abscosno(ig)
7747
7748 endif
7749 endif
7750 enddo
7751 enddo
7752
7753 end subroutine cldprmc
7754
7756!........................................!$
7757 end module rrtmg_lw !$
7758!========================================!$
subroutine taugb01
band 1: 10-350 cm-1 (low key - h2o; low minor - n2); (high key - h2o; high minor - n2)
subroutine rtrnmr(semiss, delp, cldfrc, taucld, tautot, pklay, pklev, fracs, secdif, nlay, nlp1, totuflux, totdflux, htr, totuclfl, totdclfl, htrcl, htrb)
This subroutine computes the upward/downward radiative fluxes, and heating rates for both clear or cl...
subroutine taugb08
Band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) (high key - o3; high minor - co2,...
subroutine cldprop(cfrac, cliqp, reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, nlay, nlp1, ipseed, dz, de_lgth, iovr, alpha, ilwcliq, ilwcice, isubclw, cldfmc, taucld)
This subroutine computes the cloud optical depth(s) for each cloudy layer and g-point interval.
subroutine taugb07
Band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) (high key - o3; high minor - co2)
subroutine taugb14
Band 14: 2250-2380 cm-1 (low - co2; high - co2)
subroutine taugb13
Band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor)
subroutine, public rlwinit(me, rad_hr_units, inc_minor_gas, ilwcliq, isubclw, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, errflg, errmsg)
This subroutine performs calculations necessary for the initialization of the longwave model,...
subroutine rtrnmc(semiss, delp, cldfmc, taucld, tautot, pklay, pklev, fracs, secdif, nlay, nlp1, totuflux, totdflux, htr, totuclfl, totdclfl, htrcl, htrb)
This subroutine computes the upward/downward radiative fluxes, and heating rates for both clear or cl...
subroutine taugb03
Band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o); (high key - h2o,co2; high minor - n2o)
subroutine setcoef(pavel, tavel, tz, stemp, h2ovmr, colamt, coldry, colbrd, nlay, nlp1, laytrop, pklay, pklev, jp, jt, jt1, rfrate, fac00, fac01, fac10, fac11, selffac, selffrac, indself, forfac, forfrac, indfor, minorfrac, scaleminor, scaleminorn2, indminor)
This subroutine computes various coefficients needed in radiative transfer calculations.
subroutine taugb11
Band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) (high key - h2o; high minor - o2)
subroutine rtrn(semiss, delp, cldfrc, taucld, tautot, pklay, pklev, fracs, secdif, nlay, nlp1, totuflux, totdflux, htr, totuclfl, totdclfl, htrcl, htrb)
This subroutine computes the upward/downward radiative fluxes, and heating rates for both clear or cl...
subroutine taugb06
Band 6: 820-980 cm-1 (low key - h2o; low minor - co2) (high key - none; high minor - cfc11,...
subroutine taugb10
Band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o)
subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, ncbands, taucmc, errmsg, errflg)
subroutine taumol(laytrop, pavel, coldry, colamt, colbrd, wx, tauaer, rfrate, fac00, fac01, fac10, fac11, jp, jt, jt1, selffac, selffrac, indself, forfac, forfrac, indfor, minorfrac, scaleminor, scaleminorn2, indminor, nlay, fracs, tautot)
This subroutine contains optical depths developed for the rapid radiative transfer model.
subroutine taugb09
Band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) (high key - ch4; high minor - n2o)
subroutine taugb02
Band 2: 350-500 cm-1 (low key - h2o; high key - h2o)
subroutine taugb05
Band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) (high key - o3,co2)
subroutine taugb15
Band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) (high - nothing)
subroutine taugb16
Band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4)
subroutine mcica_subcol(cldf, nlay, ipseed, dz, de_lgth, alpha, iovr, lcloudy)
This suroutine computes sub-colum cloud profile flag array.
subroutine taugb12
Band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing)
subroutine taugb04
Band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2)
subroutine, public rrtmg_lw_run(plyr, plvl, tlyr, tlvl, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, icseed, aeraod, aerssa, sfemis, sfgtmp, dzlyr, delpin, de_lgth, alpha, npts, nlay, nlp1, lprnt, cld_cf, lslwr, top_at_1, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, inc_minor_gas, ilwcliq, ilwcice, isubclw, hlwc, topflx, sfcflx, cldtau, hlw0, hlwb, flxprf, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_od, errmsg, errflg)
This module calculates random numbers using the Mersenne twister.
This module contains plank flux data.
This module contains cloud property coefficients.
This module sets up absorption coefficients for band 01: 10-350 cm-1 (low - h2o; high - h2o)
This module sets up absorption coefficients for band 02: 350-500 cm-1 (low - h2o; high - h2o)
This module sets up absorption coefficients for band 03: 500-630 cm-1 (low - h2o, co2; high - h2o,...
This module sets up absorption coefficients for band 04: 630-700 cm-1 (low - h2o, co2; high - co2,...
This module sets up absorption coefficients for band 05: 700-820 cm-1 (low - h2o, co2; high - co2,...
This module sets up absorption coefficients for band 06: 820-980 cm-1 (low - h2o; high - /)
This module sets up absorption coefficients for band 07: 980-1080 cm-1 (low - h2o,...
This module sets up absorption coefficients for band 08: 1080-1180 cm-1 (low - h2o; high - o3)
This module sets up absorption coefficients for band 09: 1180-1390 cm-1 (low - h2o,...
This module sets up absorption coefficients for band 10: 1390-1480 cm-1 (low - h2o; high - h2o)
This module sets up absorption coefficients for band 11: 1480-1800 cm-1 (low - h2o; high - h2o)
This module sets up absorption coefficients for band 12: 1800-2080 cm-1 (low - h2o,...
This module sets up absorption coefficients for band 13: 2080-2250 cm-1 (low - h2o,...
This module sets up absorption coefficients for band 14: 2250-2380 cm-1 (low - co2; high - co2)
This module sets up absorption coefficients for band 15: 2380-2600 cm-1 (low - n2o,...
This module sets up absorption coefficients for band 16: 2600-3000 cm-1 (low - h2o,...
This module contains LW band parameters set up.
Definition radlw_param.f:61
This module contains reference temperature and pressure.
This module contains the CCPP-compliant NCEP's modifications of the rrtmg-lw radiation code from aer ...
define type construct for optional radiation flux profiles
Definition radlw_param.f:94
derived type for LW fluxes at surface
Definition radlw_param.f:87
derived type for LW fluxes at top of atmosphere
Definition radlw_param.f:78