← Back to Documentation Home
CCPP SciDoc v8.0.0  v8.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
radiation_surface.f
1
4
5! ========================================================== !!!!!
6! 'module_radiation_surface' description !!!!!
7! ========================================================== !!!!!
8! !
9! this module sets up surface albedo for sw radiation and surface !
10! emissivity for lw radiation. !
11! !
12! !
13! in the module, the externally callabe subroutines are : !
14! !
15! 'sfc_init' -- initialization radiation surface data !
16! inputs: !
17! ( me ) !
18! outputs: !
19! (none) !
20! !
21! 'setalb' -- set up four-component surface albedoes !
22! inputs: !
23! (slmsk,snodi,sncovr,snoalb,zorlf,coszf,tsknf,tairf,hprif, !
24! alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc !
25! IMAX) !
26! outputs: !
27! (sfcalb) !
28! !
29! 'setemis' -- set up surface emissivity for lw radiation !
30! ( lsm,lsm_noahmp,lsm_ruc,frac_grid,cplice,use_lake_model, !
31! --- inputs:
32! lakefrac,xlon,xlat,slmsk,snodl,snodi,sncovr,sncovr_ice, !
33! zorlf,tsknf,tairf,hprif, !
34! semis_lnd,semis_ice,semis_wat,IMAX,fracl,fraco,fraci,icy, !
35!
36! --- outputs:
37! semisbase, sfcemis !
38!
39! !
40! external modules referenced: !
41! !
42! 'module machine' in 'machine.f' !
43! 'module physcons' in 'physcons.f' !
44! 'module module_iounitdef' in 'iounitdef.f' !
45! !
46! !
47! program history log: !
48! 1995 y.t. hou - created albaer.f (include albedo !
49! and aerosols calculations) !
50! nov 1997 y.t. hou - modified snow albedo !
51! jan 1998 y.t. hou - included grumbine's sea-ice scheme !
52! feb 1998 h.l. pan - seasonal interpolation in cycle !
53! mar 2000 y.t. hou - modified to use opac aerosol data !
54! apr 2003 y.t. hou - seperate albedo and aerosols into !
55! two subroutines, rewritten in f90 modulized form !
56! jan 2005 s. moorthi - xingren's sea-ice fraction added !
57! apr 2005 y.t. hou - revised module structure !
58! feb 2006 y.t. hou - add varying surface emissivity, !
59! modified sfc albedo structure for modis shceme !
60! Mar 2006 s. moorthi - added surface temp over ice fraction !
61! mar 2007 c. marshall & h. wei !
62! - added modis based sfc albedo scheme !
63! may 2007 y. hou & s. moorthi !
64! - fix bug in modis albedo over ocean !
65! aug 2007 h. wei & s. moorthi !
66! - fix bug in modis albedo over sea-ice !
67! aug 2007 y. hou - fix bug in emissivity over ocean in !
68! the modis scheme option !
69! dec 2008 f. yang - modified zenith angle dependence on !
70! surface albedo over land. (2008 jamc)!
71! aug 2012 y. hou - minor modification in initialization !
72! subr 'sfc_init'. !
73! nov 2012 y. hou - modified control parameters through !
74! module 'physparam'. !
75! jun 2018 h-m lin/y-t hou - correct error in clim-scheme of !
76! weak/strong factor and restore to the orig form !
77! !
78!!!!! ========================================================== !!!!!
79!!!!! end descriptions !!!!!
80!!!!! ========================================================== !!!!!
81
82
102
106!
107 use mpi_f08
108 use mpiutil, only : ccpp_bcast
109 use machine, only : kind_phys
110 use module_iounitdef, only : niradsf
111 use surface_perturbation, only : ppfbet
112!
113 implicit none
114!
115 private
116
117! --- version tag and last revision date
118 character(40), parameter :: &
119 & VTAGSFC='NCEP-Radiation_surface v5.1 Nov 2012 '
120! & VTAGSFC='NCEP-Radiation_surface v5.0 Aug 2012 '
121
122! --- constant parameters
123 integer, parameter, public :: IMXEMS = 360 ! number of longtitude points in global emis-type map
124 integer, parameter, public :: JMXEMS = 180 ! number of latitude points in global emis-type map
125 real (kind=kind_phys), parameter :: f_zero = 0.0
126 real (kind=kind_phys), parameter :: f_one = 1.0
127 real (kind=kind_phys), parameter :: epsln = 1.0e-6
128 real (kind=kind_phys) :: rad2dg
129 integer, allocatable :: idxems(:,:) ! global surface emissivity index array
130 integer :: iemslw = 1 ! global surface emissivity control flag set up in 'sfc_init'
131!
132 public sfc_init, setalb, setemis
133 public f_zero, f_one, epsln
134
135! =================
136 contains
137! =================
138
142!-----------------------------------
143 subroutine sfc_init &
144 & ( mpicomm, mpirank, mpiroot, ialbflg, iemsflg, semis_file, &
145 & con_pi, errmsg, errflg ) ! --- inputs/outputs:
146!
147! =================================================================== !
148! !
149! this program is the initialization program for surface radiation !
150! related quantities (albedo, emissivity, etc.) !
151! !
152! usage: call sfc_init !
153! !
154! subprograms called: none !
155! !
156! ==================== defination of variables ==================== !
157! !
158! inputs: !
159! me - print control flag !
160! ialbflg - control flag for surface albedo schemes !
161! =1: use modis based surface albedo !
162! =2: use surface albedo from land model !
163! iemsflg - control flag for sfc emissivity schemes (ab:2-dig)!
164! a:=0 set sfc air/ground t same for lw radiation !
165! =1 set sfc air/ground t diff for lw radiation !
166! b:=1 use varying climtology sfc emiss (veg based) !
167! =2 use surface emissivity from land model !
168! !
169! outputs: (CCPP error handling) !
170! errmsg - CCPP error message !
171! errflg - CCPP error flag !
172! !
173! ==================== end of description ===================== !
174!
175 implicit none
176
177! --- inputs:
178 type(mpi_comm), intent(in) :: mpicomm
179 integer, intent(in) :: mpirank, mpiroot
180 integer, intent(in) :: ialbflg, iemsflg
181 real(kind=kind_phys), intent(in) :: con_pi
182 character(len=26), intent(in) :: semis_file
183! --- outputs: ( none )
184 character(len=*), intent(out) :: errmsg
185 integer, intent(out) :: errflg
186
187! --- locals:
188 integer :: i, k
189! integer :: ia, ja
190 logical :: file_exist
191 character :: cline*80
192!
193!===> ... begin here
194!
195 errmsg = ''
196 errflg = 0
197!
198 ! Module
199 rad2dg = 180.0 / con_pi
200 if ( mpirank==mpiroot ) print *, vtagsfc ! print out version tag
201
206
207 if ( ialbflg == 1 ) then
208
209 if ( mpirank==mpiroot ) then
210 print *,' - Using MODIS based land surface albedo for sw'
211 endif
212
213 elseif ( ialbflg == 2 ) then ! use albedo from land model
214
215 if ( mpirank==mpiroot ) then
216 print *,' - Using Albedo From Land Model'
217 endif
218
219 else
220
221 errmsg = 'module_radiation_surface: invalid ialbflg option'
222 errflg = 1
223 return
224
225 endif ! end if_ialbflg_block
226
231
232 iemslw = mod(iemsflg, 10) ! emissivity control
233
234 if ( iemslw == 1 ) then ! input sfc emiss type map
235
236! --- allocate data space
237 if ( .not. allocated(idxems) ) then
238 allocate ( idxems(imxems,jmxems) )
239 endif
240
241! --- check to see if requested emissivity data file existed
242
243 read_and_broadcast: if (mpirank==mpiroot) then
244 inquire (file=semis_file, exist=file_exist)
245
246 if ( .not. file_exist ) then
247 print *,' - Using Varying Surface Emissivity for lw'
248 print *,' Requested data file "',semis_file,'" not found!'
249 errmsg = 'module_radiation_surface: surface emissivity
250 & file not provided'
251 errflg = 1
252 return
253
254 else
255 close(niradsf)
256 open (niradsf,file=semis_file,form='formatted',status='old')
257 rewind niradsf
258
259 read (niradsf,12) cline
260 12 format(a80)
261
262 read (niradsf,14) idxems
263 14 format(80i1)
264
265 print *,' - Using Varying Surface Emissivity for lw'
266 print *,' Opened data file: ',semis_file
267 print *, cline
268!check print *,' CHECK: Sample emissivity index data'
269! ia = IMXEMS / 5
270! ja = JMXEMS / 5
271! print *, idxems(1:IMXEMS:ia,1:JMXEMS:ja)
272 close(niradsf)
273 endif ! end if_file_exist_block
274 endif read_and_broadcast
275
276 call ccpp_bcast(idxems, mpiroot, mpicomm, errflg)
277
278 elseif ( iemslw == 2 ) then ! use emiss from land model
279
280 if ( mpirank==mpiroot ) then
281 print *,' - Using Surface Emissivity From Land Model'
282 endif
283
284 else
285
286 errmsg = 'module_radiation_surface: invalid iemslw option'
287 errflg = 1
288 return
289
290 endif ! end if_iemslw_block
291
292!
293 return
294!...................................
295 end subroutine sfc_init
296!-----------------------------------
297
346!-----------------------------------
347 subroutine setalb &
348 & ( slmsk,lsm,lsm_noahmp,lsm_ruc,use_cice_alb,snodi, & ! --- inputs:
349 & sncovr,sncovr_ice,snoalb,zorlf,coszf, &
350 & tsknf,tairf,hprif,frac_grid, lakefrac, &
351 & alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc, &
352 & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir, &
353 & icealbdvis, icealbdnir, icealbivis, icealbinir, &
354 & imax, albppert, pertalb, fracl, fraco, fraci, icy, &
355 & ialbflg, con_ttp, &
356 & sfcalb & ! --- outputs:
357 & )
358
359! =================================================================== !
360! !
361! this program computes four components of surface albedos (i.e. !
362! vis-nir, direct-diffused) according to controflag ialbflg. !
363! 1) climatological surface albedo scheme (briegleb 1992) !
364! 2) modis retrieval based scheme from boston univ. !
365! !
366! !
367! usage: call setalb !
368! !
369! subprograms called: none !
370! !
371! ==================== defination of variables ==================== !
372! !
373! inputs: !
374! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid !
375! snodi (IMAX) - snow depth water equivalent in mm over ice !
376! sncovr(IMAX) - ialgflg=0: not used !
377! ialgflg=1: snow cover over land in fraction !
378! sncovr_ice(IMAX) - ialgflg=0: not used !
379! ialgflg=1: snow cover over ice in fraction !
380! snoalb(IMAX) - ialbflg=0: not used !
381! ialgflg=1: max snow albedo over land in fraction !
382! zorlf (IMAX) - surface roughness in cm !
383! coszf (IMAX) - cosin of solar zenith angle !
384! tsknf (IMAX) - ground surface temperature in k !
385! tairf (IMAX) - lowest model layer air temperature in k !
386! hprif (IMAX) - topographic sdv in m !
387! --- for ialbflg=0 climtological albedo scheme --- !
388! alvsf (IMAX) - 60 degree vis albedo with strong cosz dependency !
389! alnsf (IMAX) - 60 degree nir albedo with strong cosz dependency !
390! alvwf (IMAX) - 60 degree vis albedo with weak cosz dependency !
391! alnwf (IMAX) - 60 degree nir albedo with weak cosz dependency !
392! --- for ialbflg=1 modis based land albedo scheme --- !
393! alvsf (IMAX) - visible black sky albedo at zenith 60 degree !
394! alnsf (IMAX) - near-ir black sky albedo at zenith 60 degree !
395! alvwf (IMAX) - visible white sky albedo !
396! alnwf (IMAX) - near-ir white sky albedo !
397! !
398! facsf (IMAX) - fractional coverage with strong cosz dependency !
399! facwf (IMAX) - fractional coverage with weak cosz dependency !
400! fice (IMAX) - sea-ice fraction !
401! tisfc (IMAX) - sea-ice surface temperature !
402! IMAX - array horizontal dimension !
403! ialbflg - control flag for surface albedo schemes !
404! =1: use modis based surface albedo !
405! =2: use surface albedo from land model !
406! !
407! outputs: !
408! sfcalb(IMAX,NF_ALBD) !
409! ( :, 1) - near ir direct beam albedo !
410! ( :, 2) - near ir diffused albedo !
411! ( :, 3) - uv+vis direct beam albedo !
412! ( :, 4) - uv+vis diffused albedo !
413! !
414! ==================== end of description ===================== !
415!
416 implicit none
417
418! --- inputs
419 integer, intent(in) :: imax, ialbflg
420 integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc
421 logical, intent(in) :: use_cice_alb, frac_grid
422
423 real (kind=kind_phys), dimension(:), intent(in) :: &
424 & lakefrac, &
425 & slmsk, snodi, zorlf, coszf, tsknf, tairf, hprif, &
426 & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, &
427 & sncovr, sncovr_ice, snoalb, albppert ! sfc-perts, mgehne
428 real (kind=kind_phys), dimension(:), intent(in), optional :: &
429 & icealbdvis, icealbdnir, icealbivis, icealbinir
430 real (kind=kind_phys), intent(in) :: pertalb, con_ttp! sfc-perts, mgehne
431 real (kind=kind_phys), dimension(:), intent(in) :: &
432 & fracl, fraco, fraci
433 real (kind=kind_phys), dimension(:),intent(inout) :: &
434 & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir
435
436 logical, dimension(:), intent(in) :: &
437 & icy
438
439! --- outputs
440 real (kind=kind_phys), dimension(:,:), intent(out) :: sfcalb
441
442! --- locals:
443 real (kind=kind_phys) :: asnvb, asnnb, asnvd, asnnd, asevb &
444 &, asenb, asevd, asend, fsno, fsea, rfcs, rfcw, flnd &
445 &, asnow, argh, hrgh, fsno0, fsno1, flnd0, fsea0, csnow &
446 &, a1, a2, b1, b2, b3, ab1bm, ab2bm, m, s, alpha, beta, albtmp
447
448 real (kind=kind_phys) :: asevb_wat,asenb_wat,asevd_wat,asend_wat, &
449 & asevb_ice,asenb_ice,asevd_ice,asend_ice
450
451 real (kind=kind_phys) :: alndnb, alndnd, alndvb, alndvd
452
453 real (kind=kind_phys) ffw, dtgd, icealb
454 real (kind=kind_phys), parameter :: epsln=1.0e-8_kind_phys
455
456 integer :: i, k, kk, iflag
457
458!
459!===> ... begin here
460!
462 if ( ialbflg == 1 ) then
463
464 do i = 1, imax
465
466 !-- water albedo
467 asevd_wat = 0.06
468 asend_wat = 0.06
469 asevb_wat = asevd_wat
470 asenb_wat = asevd_wat
471
472 ! direct albedo CZA dependence over water
473 if (fraco(i) > f_zero .and. coszf(i) > 0.0001) then
474 asevb_wat = max(asevd_wat, 0.026/(coszf(i)**1.7 + 0.065) &
475 & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) &
476 & * (coszf(i)-f_one))
477 asenb_wat = asevb_wat
478 endif
479
480 if (icy(i)) then !-- Computation of ice albedo
481
482 if (use_cice_alb .and. lakefrac(i) < epsln) then
483 icealb = icealbivis(i)
484 else
485 icealb = f_zero
486 endif
487 if (icealb > epsln) then !-- use ice albedo from CICE for sea-ice
488 asevd_ice = icealbivis(i)
489 asend_ice = icealbinir(i)
490 asevb_ice = icealbdvis(i)
491 asenb_ice = icealbdnir(i)
492 else
493 asnow = 0.02*snodi(i)
494 argh = min(0.50, max(.025, 0.01*zorlf(i)))
495 hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i)))
496 fsno0 = asnow / (argh + asnow) * hrgh ! snow fraction on ice
497 ! diffused
498 if (tsknf(i) > 271.1 .and. tsknf(i) < 271.5) then
499 !tgs: looks like albedo reduction from puddles on ice
500 a1 = (tsknf(i) - 271.1)**2
501 asevd_ice = 0.7 - 4.0*a1
502 asend_ice = 0.65 - 3.6875*a1
503 else
504 asevd_ice = 0.70
505 asend_ice = 0.65
506 endif
507 ! direct
508 asevb_ice = asevd_ice
509 asenb_ice = asend_ice
510
511 if (fsno0 > f_zero) then ! Snow on ice
512 dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) ))
513 b1 = 0.03 * dtgd
514 asnvd = (asevd_ice + b1) ! diffused snow albedo
515 asnnd = (asend_ice + b1)
516 if (coszf(i) > 0.0001 .and. coszf(i) < 0.5) then ! direct snow albedo
517 csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one)
518 asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow )
519 asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow )
520 else
521 asnvb = asnvd
522 asnnb = asnnd
523 endif
524
525 ! composite ice and snow albedos
526 asevd_ice = asevd_ice * (1. - fsno0) + asnvd * fsno0
527 asend_ice = asend_ice * (1. - fsno0) + asnnd * fsno0
528 asevb_ice = asevb_ice * (1. - fsno0) + asnvb * fsno0
529 asenb_ice = asenb_ice * (1. - fsno0) + asnnb * fsno0
530 endif ! snow
531 endif ! if (use_cice_alb .and. lakefrac < epsln)
532 else ! icy = false, fill in values
533 asevd_ice = 0.70
534 asend_ice = 0.65
535 asevb_ice = 0.70
536 asenb_ice = 0.65
537 endif ! end icy
538
539 if (fracl(i) > f_zero) then
542
543 fsno0 = sncovr(i) ! snow fraction on land
544
545 fsno1 = f_one - fsno0
546 flnd0 = min(f_one, facsf(i)+facwf(i))
547 flnd = flnd0 * fsno1 ! snow-free fraction
548 fsno = f_one - flnd ! snow-covered fraction
549
550 ! - use Fanglin's zenith angle treatment.
551 if (coszf(i) > 0.0001) then
552 rfcs = 1.775/(1.0+1.55*coszf(i))
553 else
554 !- no sun
555 rfcs = f_one
556 endif
557 !- zenith dependence is applied only to direct beam albedo
558 ab1bm = min(0.99, alnsf(i)*rfcs)
559 ab2bm = min(0.99, alvsf(i)*rfcs)
560
561 alndnb = ab1bm *flnd + snoalb(i) * fsno
562 alndnd = alnwf(i)*flnd + snoalb(i) * fsno
563 alndvb = ab2bm *flnd + snoalb(i) * fsno
564 alndvd = alvwf(i)*flnd + snoalb(i) * fsno
565 lsmalbdnir(i) = min(0.99,max(0.01,alndnb))
566 lsmalbinir(i) = min(0.99,max(0.01,alndnd))
567 lsmalbdvis(i) = min(0.99,max(0.01,alndvb))
568 lsmalbivis(i) = min(0.99,max(0.01,alndvd))
569 else
570 !-- fill in values for land albedo
571 alndnb = 0.
572 alndnd = 0.
573 alndvb = 0.
574 alndvd = 0.
575 endif ! end land
576
577 !-- Composite mean surface albedo from land, open water and
578 !-- ice fractions
579 sfcalb(i,1) = min(0.99,max(0.01,alndnb))*fracl(i) & ! direct beam NIR
580 & + asenb_wat*fraco(i) + asenb_ice*fraci(i)
581 sfcalb(i,2) = min(0.99,max(0.01,alndnd))*fracl(i) & ! diffuse NIR
582 & + asend_wat*fraco(i) + asend_ice*fraci(i)
583 sfcalb(i,3) = min(0.99,max(0.01,alndvb))*fracl(i) & ! direct beam visible
584 & + asevb_wat*fraco(i) + asevb_ice*fraci(i)
585 sfcalb(i,4) = min(0.99,max(0.01,alndvd))*fracl(i) & ! diffuse visible
586 & + asevd_wat*fraco(i) + asevd_ice*fraci(i)
587
588 enddo ! end_do_i_loop
589
591 elseif ( ialbflg == 2 ) then
592 do i = 1, imax
593
594 !-- water albedo
595 asevd_wat = 0.06
596 asend_wat = 0.06
597 asevb_wat = asevd_wat
598 asenb_wat = asevd_wat
599
600 ! direct albedo CZA dependence over water
601 if (fraco(i) > f_zero .and. coszf(i) > 0.0001) then
602 asevb_wat = max(asevd_wat, 0.026/(coszf(i)**1.7 + 0.065) &
603 & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) &
604 & * (coszf(i)-f_one))
605 asenb_wat = asevb_wat
606 endif
607
608 !-- ice albedo
609 !tgs: this part of the code needs the input from the ice
610 ! model. Otherwise it uses the backup albedo computation
611 ! from ialbflg = 1.
612
613 if (icy(i)) then !-- Computation of ice albedo
614
615 if (use_cice_alb .and. lakefrac(i) < epsln) then
616 icealb = icealbivis(i)
617 else
618 icealb = f_zero
619 endif
620
621 if (lsm == lsm_ruc .or. icealb > epsln) then !-- use ice albedo from the RUC ice model or
622 !-- use ice albedo from CICE for sea-ice
623 asevd_ice = icealbivis(i)
624 asend_ice = icealbinir(i)
625 asevb_ice = icealbdvis(i)
626 asenb_ice = icealbdnir(i)
627 else
628 !-- Computation of ice albedo
629 asnow = 0.02*snodi(i)
630 argh = min(0.50, max(.025, 0.01*zorlf(i)))
631 hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i)))
632 fsno0 = asnow / (argh + asnow) * hrgh
633 ! diffused
634 if (tsknf(i) > 271.1 .and. tsknf(i) < 271.5) then
635 !tgs: looks like albedo reduction from puddles on ice
636 a1 = (tsknf(i) - 271.1)**2
637 asevd_ice = 0.7 - 4.0*a1
638 asend_ice = 0.65 - 3.6875*a1
639 else
640 asevd_ice = 0.70
641 asend_ice = 0.65
642 endif
643 ! direct
644 asevb_ice = asevd_ice
645 asenb_ice = asend_ice
646
647 if (fsno0 > f_zero) then
648 ! Snow on ice
649 dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) ))
650 b1 = 0.03 * dtgd
651 asnvd = (asevd_ice + b1) ! diffused snow albedo
652 asnnd = (asend_ice + b1)
653
654 if (coszf(i) > 0.0001 .and. coszf(i) < 0.5) then ! direct snow albedo
655 csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one)
656 asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow )
657 asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow )
658 else
659 asnvb = asnvd
660 asnnb = asnnd
661 endif
662
663 ! composite ice and snow albedos
664 asevd_ice = asevd_ice * (1. - fsno0) + asnvd * fsno0
665 asend_ice = asend_ice * (1. - fsno0) + asnnd * fsno0
666 asevb_ice = asevb_ice * (1. - fsno0) + asnvb * fsno0
667 asenb_ice = asenb_ice * (1. - fsno0) + asnnb * fsno0
668 endif ! snow
669 endif ! ice option from LSM or otherwise
670 else
671 ! icy = false, fill in values
672 asevd_ice = 0.70
673 asend_ice = 0.65
674 asevb_ice = 0.70
675 asenb_ice = 0.65
676 endif ! end icy
677
678 !-- Composite mean surface albedo from land, open water and
679 !-- ice fractions
680 sfcalb(i,1) = min(0.99,max(0.01,lsmalbdnir(i)))*fracl(i) & ! direct beam NIR
681 & + asenb_wat*fraco(i) + asenb_ice*fraci(i)
682 sfcalb(i,2) = min(0.99,max(0.01,lsmalbinir(i)))*fracl(i) & ! diffuse NIR
683 & + asend_wat*fraco(i) + asend_ice*fraci(i)
684 sfcalb(i,3) = min(0.99,max(0.01,lsmalbdvis(i)))*fracl(i) & ! direct beam visible
685 & + asevb_wat*fraco(i) + asevb_ice*fraci(i)
686 sfcalb(i,4) = min(0.99,max(0.01,lsmalbivis(i)))*fracl(i) & ! diffuse visible
687 & + asevd_wat*fraco(i) + asevd_ice*fraci(i)
688
689 enddo ! end_do_i_loop
690
691 endif ! end if_ialbflg
692!
693
694! sfc-perts, mgehne ***
696 if (pertalb>0.0) then
697 do i = 1, imax
698 do kk=1, 4
699 ! compute beta distribution parameters for all 4 albedos
700 m = sfcalb(i,kk)
701 s = pertalb*m*(1.-m)
702 alpha = m*m*(1.-m)/(s*s)-m
703 beta = alpha*(1.-m)/m
704 ! compute beta distribution value corresponding
705 ! to the given percentile albPpert to use as new albedo
706 call ppfbet(albppert(i),alpha,beta,iflag,albtmp)
707 sfcalb(i,kk) = albtmp
708 enddo
709 enddo ! end_do_i_loop
710 endif
711
712! *** sfc-perts, mgehne
713
714
715 return
716!...................................
717 end subroutine setalb
718!-----------------------------------
719
752!-----------------------------------
753 subroutine setemis &
754 & ( lsm,lsm_noahmp,lsm_ruc,frac_grid,cplice,use_lake_model, & ! --- inputs:
755 & lakefrac,xlon,xlat,slmsk,snodl,snodi,sncovr,sncovr_ice, &
756 & zorlf,tsknf,tairf,hprif, &
757 & semis_lnd,semis_ice,semis_wat,imax,fracl,fraco,fraci,icy, &
758 & semisbase, sfcemis & ! --- outputs:
759 & )
760
761! =================================================================== !
762! !
763! this program computes surface emissivity for lw radiation. !
764! !
765! usage: call setemis !
766! !
767! subprograms called: none !
768! !
769! ==================== defination of variables ==================== !
770! !
771! inputs: !
772! cplice - logical, ".true." when coupled to an ice model !
773! xlon (IMAX) - longitude in radiance, ok for both 0->2pi or !
774! -pi -> +pi ranges !
775! xlat (IMAX) - latitude in radiance, default to pi/2 -> -pi/2 !
776! range, otherwise see in-line comment !
777! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid !
778! snodl (IMAX) - snow depth water equivalent in mm over land !
779! snodi (IMAX) - snow depth water equivalent in mm over ice !
780! sncovr(IMAX) - ialbflg=1: snow cover over land in fraction !
781! sncovr_ice(IMAX) - snow cover over ice in fraction !
782! zorlf (IMAX) - surface roughness in cm !
783! tsknf (IMAX) - ground surface temperature in k !
784! tairf (IMAX) - lowest model layer air temperature in k !
785! hprif (IMAX) - topographic sdv in m !
786! IMAX - array horizontal dimension !
787! !
788! inputs/outputs: !
789! semis_lnd (IMAX) - land emissivity !
790! semis_ice (IMAX) - ice emissivity !
791! semis_wat (IMAX) - water emissivity !
792! !
793! outputs: !
794! sfcemis(IMAX) - surface emissivity !
795! !
796! ------------------------------------------------------------------- !
797! !
798! surface type definations: !
799! 1. open water 2. grass/wood/shrub land !
800! 3. tundra/bare soil 4. sandy desert !
801! 5. rocky desert 6. forest !
802! 7. ice 8. snow !
803! !
804! input index data lon from 0 towards east, lat from n to s !
805! !
806! ==================== end of description ===================== !
807!
808
809 implicit none
810
811! --- inputs
812 integer, intent(in) :: imax
813 integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc
814 logical, intent(in) :: frac_grid, cplice
815 integer, dimension(:), intent(in) :: use_lake_model
816 real (kind=kind_phys), dimension(:), intent(in) :: lakefrac
817
818 real (kind=kind_phys), dimension(:), intent(in) :: &
819 & xlon,xlat, slmsk, snodl, snodi, sncovr, sncovr_ice, &
820 & zorlf, tsknf, tairf, hprif
821 real (kind=kind_phys), dimension(:), intent(in) :: &
822 & fracl, fraco, fraci
823 real (kind=kind_phys), dimension(:), intent(inout) :: &
824 & semis_lnd, semis_ice, semis_wat
825 logical, dimension(:), intent(in) :: &
826 & icy
827
828! --- outputs
829 real (kind=kind_phys), dimension(:), intent(out) :: semisbase
830 real (kind=kind_phys), dimension(:), intent(out) :: sfcemis
831
832! --- locals:
833 integer :: i, i1, i2, j1, j2, idx
834 integer :: ivgtyp
835
836 real (kind=kind_phys) :: dltg, hdlt, tmp1, tmp2, &
837 & asnow, argh, hrgh, fsno
838 real (kind=kind_phys) :: sfcemis_land, sfcemis_ice
839
840! --- reference emiss value for diff surface emiss index
841! 1-open water, 2-grass/shrub land, 3-bare soil, tundra,
842! 4-sandy desert, 5-rocky desert, 6-forest, 7-ice, 8-snow
843
844 real (kind=kind_phys) :: emsref(8)
845 data emsref / 0.97, 0.95, 0.94, 0.90, 0.93, 0.96, 0.96, 0.99 /
846
847!
848!===> ... begin here
849!
851
852 semis_wat = emsref(1)
853 if ( iemslw == 1 ) then
854
855 dltg = 360.0 / float(imxems)
856 hdlt = 0.5 * dltg
857
858! --- ... mapping input data onto model grid
859! note: this is a simple mapping method, an upgrade is needed if
860! the model grid is much coarser than the 1-deg data resolution
861
862 lab_do_imax : do i = 1, imax
863
864 if (.not. cplice .or. lakefrac(i) > f_zero) then
865 semis_ice(i) = emsref(7)
866 endif
867 if (fracl(i) < epsln) then ! no land
868 if ( abs(fraco(i)-f_one) < epsln ) then ! open water point
869 sfcemis(i) = emsref(1)
870 elseif ( abs(fraci(i)-f_one) < epsln ) then ! complete sea/lake ice
871 sfcemis(i) = semis_ice(i)
872 else
873 !-- fractional sea ice
874 sfcemis(i) = fraco(i)*emsref(1) + fraci(i)*semis_ice(i)
875 endif
876
877 else ! land or fractional grid
878
879! --- map grid in longitude direction
880 i2 = 1
881 j2 = 1
882
883 tmp1 = xlon(i) * rad2dg
884 if (tmp1 < f_zero) tmp1 = tmp1 + 360.0
885
886 lab_do_imxems : do i1 = 1, imxems
887 tmp2 = dltg * (i1 - 1) + hdlt
888
889 if (abs(tmp1-tmp2) <= hdlt) then
890 i2 = i1
891 exit lab_do_imxems
892 endif
893 enddo lab_do_imxems
894
895! --- map grid in latitude direction
896 tmp1 = xlat(i) * rad2dg ! if xlat in pi/2 -> -pi/2 range
897! tmp1 = 90.0 - xlat(i)*rad2dg ! if xlat in 0 -> pi range
898
899 lab_do_jmxems : do j1 = 1, jmxems
900 tmp2 = 90.0 - dltg * (j1 - 1)
901
902 if (abs(tmp1-tmp2) <= hdlt) then
903 j2 = j1
904 exit lab_do_jmxems
905 endif
906 enddo lab_do_jmxems
907
908 idx = max( 2, idxems(i2,j2) )
909 if ( idx >= 7 ) idx = 2
910 if (abs(fracl(i)-f_one) < epsln) then
911 sfcemis(i) = emsref(idx)
912 else
913 sfcemis(i) = fracl(i)*emsref(idx) + fraco(i)*emsref(1) &
914 & + fraci(i)*emsref(7)
915 endif
916 semisbase(i) = sfcemis(i)
917 semis_lnd(i) = emsref(idx)
918
919 endif
920
924
925 if (fracl(i) > epsln) then
926 if (sncovr(i) > f_zero) then
927 semis_lnd(i) = semis_lnd(i) * (f_one - sncovr(i)) &
928 & + emsref(8) * sncovr(i)
929 elseif (snodl(i) > f_zero) then
930 asnow = 0.02*snodl(i)
931 argh = min(0.50, max(.025, 0.01*zorlf(i)))
932 hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) )
933 fsno = min(f_one, max(f_zero, asnow/(argh+asnow) * hrgh))
934 semis_lnd(i) = semis_lnd(i)*(f_one-fsno) + emsref(8)*fsno
935 endif
936 endif
937 if (fraci(i) > epsln .and. &
938 & (lakefrac(i) > f_zero .or. .not. cplice)) then
939 if (sncovr_ice(i) > f_zero) then
940 semis_ice(i) = semis_ice(i) * (f_one - sncovr_ice(i)) &
941 & + emsref(8) * sncovr_ice(i)
942 elseif (snodi(i) > f_zero) then
943 asnow = 0.02*snodi(i)
944 argh = min(0.50, max(.025, 0.01*zorlf(i)))
945 hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) )
946 fsno = min(f_one, max(f_zero, asnow/(argh+asnow) * hrgh))
947 semis_ice(i) = semis_ice(i)*(f_one-fsno) + emsref(8)*fsno
948 endif
949 endif
950 sfcemis(i) = fracl(i)*semis_lnd(i) + fraco(i)*emsref(1) &
951 & + fraci(i)*semis_ice(i)
952
953 enddo lab_do_imax
954
955 elseif ( iemslw == 2 ) then ! sfc emiss updated in land model: Noah MP or RUC
956
957 do i = 1, imax
958
959 sfcemis_ice = emsref(7)
960 if ( icy(i) ) then !-- ice emissivity
961
962 !-- complete or fractional ice
963 if (lsm == lsm_noahmp) then
964 if (.not. cplice .or. lakefrac(i) > f_zero) then
965 if (sncovr_ice(i) > f_zero) then
966 sfcemis_ice = emsref(7) * (f_one-sncovr_ice(i)) &
967 & + emsref(8) * sncovr_ice(i)
968 elseif (snodi(i) > f_zero) then
969 asnow = 0.02*snodi(i)
970 argh = min(0.50, max(.025,0.01*zorlf(i)))
971 hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i)))
972 fsno = asnow / (argh + asnow) * hrgh
973 sfcemis_ice = emsref(7)*(f_one-fsno) + emsref(8)*fsno
974 endif
975 semis_ice(i) = sfcemis_ice
976 else
977 sfcemis_ice = semis_ice(i) ! output from CICE
978 endif
979 elseif (lsm == lsm_ruc) then
980 if (use_lake_model(i)>0) then
981 if (sncovr_ice(i) > f_zero) then
982 sfcemis_ice = emsref(7) * (f_one-sncovr_ice(i)) &
983 & + emsref(8) * sncovr_ice(i)
984 elseif (snodi(i) > f_zero) then
985 asnow = 0.02*snodi(i)
986 argh = min(0.50, max(.025,0.01*zorlf(i)))
987 hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i)))
988 fsno = asnow / (argh + asnow) * hrgh
989 sfcemis_ice = emsref(7)*(f_one-fsno) + emsref(8)*fsno
990 endif
991 semis_ice(i) = sfcemis_ice
992 else
993 sfcemis_ice = semis_ice(i) ! output from CICE or from RUC lsm (with snow effect)
994 endif
995 endif ! lsm check
996 endif ! icy
997
998 !-- land emissivity
999 !-- from Noah MP or RUC lsms
1000 sfcemis_land = semis_lnd(i) ! albedo with snow effect from LSM
1001
1002 !-- Composite emissivity from land, water and ice fractions.
1003 sfcemis(i) = fracl(i)*sfcemis_land + fraco(i)*emsref(1) &
1004 & + fraci(i)*sfcemis_ice
1005
1006 enddo ! i
1007
1008 endif ! end if_iemslw_block
1009
1010!chk print *,' In setemis, iemsflg, sfcemis =',iemsflg,sfcemis
1011
1012!
1013 return
1014!...................................
1015 end subroutine setemis
1016!-----------------------------------
1017
1018!.........................................!
1019 end module module_radiation_surface !
1021!=========================================!
subroutine, public ppfbet(pr, p, q, iflag, x)
This subroutine computes the beta distribution value that matches the percentile from the random patt...
subroutine, public sfc_init(mpicomm, mpirank, mpiroot, ialbflg, iemsflg, semis_file, con_pi, errmsg, errflg)
This subroutine is the initialization program for surface radiation related quantities (albedo,...
subroutine, public setemis(lsm, lsm_noahmp, lsm_ruc, frac_grid, cplice, use_lake_model, lakefrac, xlon, xlat, slmsk, snodl, snodi, sncovr, sncovr_ice, zorlf, tsknf, tairf, hprif, semis_lnd, semis_ice, semis_wat, imax, fracl, fraco, fraci, icy, semisbase, sfcemis)
This subroutine computes surface emissivity for LW radiation.
subroutine, public setalb(slmsk, lsm, lsm_noahmp, lsm_ruc, use_cice_alb, snodi, sncovr, sncovr_ice, snoalb, zorlf, coszf, tsknf, tairf, hprif, frac_grid, lakefrac, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir, icealbdvis, icealbdnir, icealbivis, icealbinir, imax, albppert, pertalb, fracl, fraco, fraci, icy, ialbflg, con_ttp, sfcalb)
This subroutine computes four components of surface albedos (i.e., vis-nir, direct-diffused) accordin...
This module contain the RUC land surface model driver.
Definition lsm_ruc.F90:5
this module defines fortran unit numbers for input/output data files for the ncep gfs model.
Definition iounitdef.f:53
This module sets up surface albedo for SW radiation and surface emissivity for LW radiation.
This module contains routines used in the percentile matching algorithm for the albedo and vegetation...