9 + ( nlen , len , nlm , pl2
11 +, qcwl , qcil , qril , o3l
12 +, ts , amu0 , slr , alvdf
13 +, alndf , alvdr , alndr , s0
14 +, grav , cp , asl , atl
15 +, fdsw , fusw , fdlw , fulw
16 +, acld, umco2, umch4, umn2o )
55 integer (kind=int_kind),
intent(in)::
60 real (kind=dbl_kind),
intent(in)::
65 real (kind=dbl_kind),
intent(in),
dimension(nlen)::
74 real (kind=dbl_kind),
intent(in),
dimension(nlen,nlm)::
83 real (kind=dbl_kind),
intent(in),
dimension(nlen,nlm+1)::
86 real (kind=dbl_kind),
intent(in),
dimension(nlen,nlm)::
88 real (kind=dbl_kind),
intent(in),
dimension(nlen) ::
97 real (kind=dbl_kind),
dimension(nlen)::
107 real (kind=dbl_kind),
dimension(len,nlm+1)::
116 real (kind=dbl_kind),
dimension(nlen,nlm)::
124 character(len=80),
save::
128 logical (kind=log_kind)::
132 logical (kind=log_kind),
dimension(len)::
135 integer (kind=int_kind)::
140 integer (kind=int_kind),
dimension(len)::
143 real (kind=dbl_kind)::
146 real (kind=dbl_kind),
dimension(len)::
167 real (kind=dbl_kind),
dimension(len,nlm)::
185 real (kind=dbl_kind),
dimension(len,nlm+1)::
188 real (kind=dbl_kind),
dimension(:),
allocatable::
198 real (kind=dbl_kind),
dimension(:,:),
allocatable::
208 real (kind=dbl_kind),
dimension(:,:),
allocatable::
219 real (kind=dbl_kind),
dimension(:),
allocatable::
257 radvbc_loc(1:len) = 0.
258 radvdc_loc(1:len) = 0.
259 radnbc_loc(1:len) = 0.
260 radndc_loc(1:len) = 0.
261 radvbcc_loc(1:len) = 0.
262 radvdcc_loc(1:len) = 0.
263 radnbcc_loc(1:len) = 0.
264 radndcc_loc(1:len) = 0.
270 &
"Version:$Id: bugs_rad.F,v 1.7 2003/11/12 20:37:49 norm Exp $"
274 sel_rules_sw = .false.
275 sel_rules_lw = .false.
277 heat_fac = grav*0.01/cp
281 ts_loc(:) = ts(1:len)
282 amu0_loc(:) = amu0(1:len)
283 slr_loc(:) = slr(1:len)
284 alvdr_loc(:) = alvdr(1:len)
285 alndr_loc(:) = alndr(1:len)
286 alvdf_loc(:) = alvdf(1:len)
287 alndf_loc(:) = alndf(1:len)
290 pl2_loc(:,:) = pl2(:,:)
291 pl_loc(:,:) = pl(:,:)
292 dpl_loc(:,:) = dpl(:,:)
293 tl_loc(:,:) = tl(:,:)
294 ql_loc(:,:) = ql(:,:)
295 qcwl_loc(:,:)= qcwl(:,:)
296 qcil_loc(:,:)= qcil(:,:)
297 o3l_loc(:,:) = o3l(:,:)
298 acld_loc(:,:)= acld(1:len,1:nlm)
301 acldmx(1:len) = max(acldmx(1:len),acld_loc(1:len,l))
308 b1(i,1) = 1.0 - acld_loc(i,1)
311 if (acld_loc(i,l-1).eq.1.0)
then
314 b1(i,l) = (1.0 - max(acld_loc(i,l),acld_loc(i,l-1))) /
315 * (1.0 - acld_loc(i,l-1))
317 if (acld_loc(i,l-1).eq.0.0)
then
320 b3(i,l) = min(acld_loc(i,l),acld_loc(i,l-1)) /
325 b2(i,nlm) = 1.0 - acld_loc(i,nlm)
328 if (acld_loc(i,l+1).eq.1.0)
then
331 b2(i,l) = (1.0 - max(acld_loc(i,l),acld_loc(i,l+1))) /
332 * (1.0 - acld_loc(i,l+1))
334 if (acld_loc(i,l+1).eq.0.0)
then
337 b4(i,l) = min(acld_loc(i,l),acld_loc(i,l+1)) /
348 den(1:len) = pl_loc(1:len,l)*100/(287.*tl_loc(1:len,l))
349 rmix(1:len,l) = ql_loc(1:len,l)/(1.-ql_loc(1:len,l))
350 cwrho(1:len,l) = den*1000.*qcwl_loc(1:len,l)*acld_loc(1:len,l)
351 cirho(1:len,l) = den*1000.*qcil_loc(1:len,l)*acld_loc(1:len,l)
352 o3mix(1:len,l) = o3l_loc(1:len,l)
360 + ( len , nnp , pl2_loc , pl_loc
361 +, dpl_loc , tl_loc , rmix , cwrho
362 +, cirho , o3mix , ts_loc ,acld_loc
363 +, acldmx , b1 , b2 , b3
364 +, b4 , umco2 , umch4 , umn2o
365 +, fdlw , fdlwcl , fulw , fulwcl
375 slr_loc(1:len) = slr_loc(1:len) * s0/1339.945
379 bitx(1:len) = amu0_loc(1:len) .ge. 0.01
387 if(nday .eq. 0) goto 1000
389 allocate(ts_day(nday))
390 allocate(amu0_day(nday))
391 allocate(slr_day(nday))
392 allocate(alvdr_day(nday))
393 allocate(alndr_day(nday))
394 allocate(alvdf_day(nday))
395 allocate(alndf_day(nday))
396 allocate(acldmx_day(nday))
397 allocate(pl_day(nday,nnp))
398 allocate(dpl_day(nday,nnp))
399 allocate(tl_day(nday,nnp))
400 allocate(rmix_day(nday,nnp))
401 allocate(cwrho_day(nday,nnp))
402 allocate(cirho_day(nday,nnp))
403 allocate(o3mix_day(nday,nnp))
404 allocate(acld_day(nday,nnp))
405 allocate(b1_day(nday,nnp))
406 allocate(b2_day(nday,nnp))
407 allocate(b3_day(nday,nnp))
408 allocate(b4_day(nday,nnp))
410 allocate(pl2_day(nday,nnp+1))
412 allocate(fdsw_day(nday,nnp+1))
413 allocate(fdswcl_day(nday,nnp+1))
414 allocate(fusw_day(nday,nnp+1))
415 allocate(fuswcl_day(nday,nnp+1))
416 allocate(radvbc_day(nday))
417 allocate(radvdc_day(nday))
418 allocate(radnbc_day(nday))
419 allocate(radndc_day(nday))
420 allocate(radvbcc_day(nday))
421 allocate(radvdcc_day(nday))
422 allocate(radnbcc_day(nday))
423 allocate(radndcc_day(nday))
425 ts_day(1:nday) = ts_loc(iday(1:nday))
426 amu0_day(1:nday) = amu0_loc(iday(1:nday))
427 slr_day(1:nday) = slr_loc(iday(1:nday))
428 alvdf_day(1:nday) = alvdf_loc(iday(1:nday))
429 alndf_day(1:nday) = alndf_loc(iday(1:nday))
430 alvdr_day(1:nday) = alvdr_loc(iday(1:nday))
431 alndr_day(1:nday) = alndr_loc(iday(1:nday))
432 acldmx_day(1:nday) = acldmx(iday(1:nday))
433 pl_day(1:nday,1:nnp) = pl_loc(iday(1:nday),1:nnp)
434 dpl_day(1:nday,1:nnp) = dpl_loc(iday(1:nday),1:nnp)
435 tl_day(1:nday,1:nnp) = tl_loc(iday(1:nday),1:nnp)
436 rmix_day(1:nday,1:nnp) = rmix(iday(1:nday),1:nnp)
437 cwrho_day(1:nday,1:nnp) = cwrho(iday(1:nday),1:nnp)
438 cirho_day(1:nday,1:nnp) = cirho(iday(1:nday),1:nnp)
439 o3mix_day(1:nday,1:nnp) = o3mix(iday(1:nday),1:nnp)
440 acld_day(1:nday,1:nnp) = acld_loc(iday(1:nday),1:nnp)
441 b1_day(1:nday,1:nnp) = b1(iday(1:nday),1:nnp)
442 b2_day(1:nday,1:nnp) = b2(iday(1:nday),1:nnp)
443 b3_day(1:nday,1:nnp) = b3(iday(1:nday),1:nnp)
444 b4_day(1:nday,1:nnp) = b4(iday(1:nday),1:nnp)
445 pl2_day(1:nday,1:nnp+1) = pl2_loc(iday(1:nday),1:nnp+1)
450 + ( nday , nnp , pl2_day , pl_day
451 +, dpl_day , tl_day , rmix_day , cwrho_day
452 +, cirho_day , o3mix_day , ts_day , amu0_day
453 +, slr_day , alvdf_day , alndf_day , alvdr_day
454 +, alndr_day , acld_day , acldmx_day , umco2
455 +, umch4 , umn2o , b1_day , b2_day
456 +, b3_day , b4_day , fdsw_day , fdswcl_day
457 +, fusw_day , fuswcl_day , radvbc_day , radvbcc_day
458 +, radvdc_day , radvdcc_day , radnbc_day , radnbcc_day
459 +, radndc_day , radndcc_day , sel_rules_sw
464 radvbc_loc(iday(1:nday)) = radvbc_day(1:nday)
465 radvdc_loc(iday(1:nday)) = radvdc_day(1:nday)
466 radnbc_loc(iday(1:nday)) = radnbc_day(1:nday)
467 radndc_loc(iday(1:nday)) = radndc_day(1:nday)
468 radvbcc_loc(iday(1:nday)) = radvbcc_day(1:nday)
469 radvdcc_loc(iday(1:nday)) = radvdcc_day(1:nday)
470 radnbcc_loc(iday(1:nday)) = radnbcc_day(1:nday)
471 radndcc_loc(iday(1:nday)) = radndcc_day(1:nday)
472 fdsw(iday(1:nday),:) = fdsw_day(1:nday,:)
473 fdswcl(iday(1:nday),:) = fdswcl_day(1:nday,:)
474 fusw(iday(1:nday),:) = fusw_day(1:nday,:)
475 fuswcl(iday(1:nday),:) = fuswcl_day(1:nday,:)
480 deallocate(alvdr_day)
481 deallocate(alndr_day)
482 deallocate(alvdf_day)
483 deallocate(alndf_day)
484 deallocate(acldmx_day)
489 deallocate(cwrho_day)
490 deallocate(cirho_day)
491 deallocate(o3mix_day)
498 deallocate(radvbc_day)
499 deallocate(radvdc_day)
500 deallocate(radnbc_day)
501 deallocate(radndc_day)
502 deallocate(radvbcc_day)
503 deallocate(radvdcc_day)
504 deallocate(radnbcc_day)
505 deallocate(radndcc_day)
507 deallocate(fdswcl_day)
509 deallocate(fuswcl_day)
517 delf(1:len) = fulw(1:len,ll)-fdlw(1:len,ll)
518 + - fulw(1:len,ll+1)+fdlw(1:len,ll+1)
519 delfcl(1:len) = fulwcl(1:len,ll)-fdlwcl(1:len,ll)
520 + - fulwcl(1:len,ll+1)+ fdlwcl(1:len,ll+1)
521 atl(1:len,l) = -heat_fac*delf/dpl(1:len,l)
522 atlcl(1:len,l) = -heat_fac*delfcl/dpl(1:len,l)
524 delf(1:len) = fusw(1:len,ll)-fdsw(1:len,ll)
525 + - fusw(1:len,ll+1)+fdsw(1:len,ll+1)
526 delfcl(1:len) = fuswcl(1:len,ll)-fdswcl(1:len,ll)
527 + - fuswcl(1:len,ll+1) + fdswcl(1:len,ll+1)
528 asl(1:len,l) = -heat_fac*delf/dpl(1:len,l)
529 aslcl(1:len,l) = -heat_fac*delfcl/dpl(1:len,l)
534 radvbc(1:len) = radvbc_loc(1:len)
535 radvdc(1:len) = radvdc_loc(1:len)
536 radnbc(1:len) = radnbc_loc(1:len)
537 radndc(1:len) = radndc_loc(1:len)
538 radvbcc(1:len) = radvbcc_loc(1:len)
539 radvdcc(1:len) = radvdcc_loc(1:len)
540 radnbcc(1:len) = radnbcc_loc(1:len)
541 radndcc(1:len) = radndcc_loc(1:len)