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