Skip to content

Commit 269a7e2

Browse files
committed
suport for reading longwave radiation - net and downward
1 parent d6e64f1 commit 269a7e2

2 files changed

Lines changed: 78 additions & 45 deletions

File tree

src/airsea/airsea.F90

Lines changed: 71 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module airsea_driver
6262
! !PUBLIC DATA MEMBERS:
6363
!
6464
! Meteorological forcing variables
65+
integer, public :: longwave_type
6566
integer, public :: hum_method
6667
character(len=PATH_MAX) :: meteo_file
6768
type (type_scalar_input), public, target :: u10_input,v10_input
@@ -168,12 +169,12 @@ subroutine init_airsea_yaml()
168169
! & 1: Kondo (1975) \\
169170
! & 2: Fairall et al. (1996) \\
170171
! {\tt longwave\_radiation\_method} & Select which parameterisation to use: \\
171-
! & 1: Clark et al. (1974) \\
172-
! & 2: Hastenrath and Lamb (1978) \\
173-
! & 3: Bignami et al. (1995) \\
174-
! & 4: Berliandand Berliand (1952) \\
175-
! & 5: Josey et al. (2003) - 1 \\
176-
! & 6: Josey et al. (2003) - 2 \\
172+
! & 3: Clark et al. (1974) \\
173+
! & 4: Hastenrath and Lamb (1978) \\
174+
! & 5: Bignami et al. (1995) \\
175+
! & 6: Berliandand Berliand (1952) \\
176+
! & 7: Josey et al. (2003) - 1 \\
177+
! & 8: Josey et al. (2003) - 2 \\
177178
! {\tt meteo\_file} & file with meteo data (for {\tt calc\_fluxes=.true.}) with \\
178179
! & date: {\tt yyyy-mm-dd hh:mm:ss} \\
179180
! & $x$-component of wind (10 m) in m\,s$^{-1}$ \\
@@ -281,8 +282,10 @@ subroutine init_airsea_yaml()
281282
call branch%get(I_0, 'swr', 'shortwave radiation', 'W/m^2', &
282283
minimum=0._rk,default=0._rk, method_constant=1, method_file=2, extra_options=(/option(3, 'from time, location and cloud cover', 'calculate')/))
283284
call branch%get(ql_input, 'longwave_radiation', 'net longwave radiation', 'W/m^2', &
284-
default=0._rk, &
285+
pchild=leaf, default=0._rk, method_file=2, &
285286
extra_options=(/option(CLARK, 'Clark et al. (1974)', 'Clark'), option(HASTENRATH_LAMB, 'Hastenrath and Lamb (1978)', 'Hastenrath_Lamb'), option(BIGNAMI, 'Bignami et al. (1995)', 'Bignami'), option(BERLIAND_BERLIAND, 'Berliand and Berliand (1952)', 'Berliand_Berliand'), option(JOSEY1, 'Josey et al. (2003) - 1', 'Josey1'), option(JOSEY2, 'Josey et al. (2003) - 2', 'Josey2')/), default_method=CLARK)
287+
call leaf%get(longwave_type, 'type', 'longwave type from file', &
288+
options=(/option(1, 'net longwave radiation'), option(2, 'downward longwave radiation')/), default=1)
286289

287290
twig => branch%get_typed_child('albedo')
288291
call twig%get(albedo_method, 'method', 'method to compute albedo', &
@@ -438,20 +441,7 @@ subroutine post_init_airsea(lat,lon)
438441
dlon = lon
439442
dlat = lat
440443

441-
! The short wave radiation
442-
select case (I_0%method)
443-
case (3)
444-
if (fluxes_method == 0) then
445-
LEVEL2 'Not possible to calculate swr if heat and momentum fluxes are prescribed'
446-
stop 'init_airsea'
447-
else
448-
LEVEL2 'Calculating swr=swr(t(lon),lat,cloud)'
449-
end if
450-
LEVEL2 'Albedo method: ',albedo_method
451-
case default
452-
call register_input(I_0)
453-
end select
454-
444+
LEVEL1 'Air-sea fluxes:'
455445
if (fluxes_method /= 0) then
456446

457447
#ifndef INTERPOLATE_METEO
@@ -464,36 +454,60 @@ subroutine post_init_airsea(lat,lon)
464454
call register_input(hum_input)
465455
call register_input(cloud_input)
466456
#endif
467-
LEVEL2 'Air-sea exchanges will be calculated'
468457

469-
LEVEL3 'heat- and momentum-fluxes:'
458+
LEVEL2 'albedo method: ',albedo_method
459+
460+
! The short wave radiation
461+
LEVEL2 'short wave radation:'
462+
select case (I_0%method)
463+
case (3)
464+
LEVEL3 'swr=swr(t(lon),lat,cloud)'
465+
case default
466+
call register_input(I_0)
467+
end select
468+
469+
LEVEL2 'latent, sensible and momentum-fluxes:'
470470
select case (fluxes_method)
471471
case(1)
472-
LEVEL4 'using Kondo formulation'
472+
LEVEL3 'using Kondo formulation'
473473
case(2)
474-
LEVEL4 'using Fairall et. all formulation'
474+
LEVEL3 'using Fairall et. all formulation'
475475
case default
476476
end select
477-
LEVEL3 'net longwave radiation:'
478-
call register_input(ql_input)
479477
select case (ql_input%method)
478+
case(2)
479+
call register_input(ql_input)
480+
select case (longwave_type)
481+
case(1)
482+
LEVEL3 'net longwave radiation'
483+
case(2)
484+
LEVEL3 'downward longwave radiation'
485+
end select
480486
case(CLARK)
481-
LEVEL4 'using Clark formulation'
487+
LEVEL2 'longwave radiation:'
488+
LEVEL3 'using Clark formulation'
482489
case(HASTENRATH_LAMB)
483-
LEVEL4 'using Hastenrath formulation'
490+
LEVEL2 'longwave radiation:'
491+
LEVEL3 'using Hastenrath formulation'
484492
case(BIGNAMI)
485-
LEVEL4 'using Bignami formulation'
493+
LEVEL2 'longwave radiation:'
494+
LEVEL3 'using Bignami formulation'
486495
case(BERLIAND_BERLIAND)
487-
LEVEL4 'using Berliand formulation'
496+
LEVEL2 'longwave radiation:'
497+
LEVEL3 'using Berliand formulation'
488498
case(JOSEY1)
489-
LEVEL4 'using Josey-1 formulation'
499+
LEVEL2 'longwave radiation:'
500+
LEVEL3 'using Josey-1 formulation'
490501
case(JOSEY2)
491-
LEVEL4 'using Josey-2 formulation'
502+
LEVEL2 'longwave radiation:'
503+
LEVEL3 'using Josey-2 formulation'
492504
case default
493505
end select
494506

495507
else
496508

509+
LEVEL2 'Air-sea exchanges will be read from file(s)'
510+
call register_input(I_0)
497511
! The heat fluxes
498512
call register_input(heat_input)
499513

@@ -772,9 +786,18 @@ subroutine flux_from_meteo(jul,secs)
772786
cloud1 = cloud2
773787

774788
call humidity(hum_method,hum_input,airp_input,tw,ta)
775-
if (ql_input%method .gt. 2) then
789+
if (ql_input%method .eq. 0) then
790+
! constant
791+
elseif (ql_input%method .eq. 2) then
792+
select case(longwave_type)
793+
case(1)
794+
! already read in
795+
case(2)
796+
ql_input%value=ql_input%value-bolz*emiss*(tw**4)
797+
end select
798+
else ! (ql_input%method .gt. 2) then
776799
call longwave_radiation(ql_input%method, &
777-
dlat,tw_k,ta_k,cloud,ql_input)
800+
dlat,tw_k,ta_k,cloud_input%value,ql_input%value)
778801
end if
779802
#if 0
780803
call airsea_fluxes(fluxes_method,rain_impact,calc_evaporation, &
@@ -824,10 +847,20 @@ subroutine flux_from_meteo(jul,secs)
824847
end if
825848

826849
call humidity(hum_method,hum_input%value,airp_input%value,tw,ta)
827-
if (ql_input%method .gt. 2) then
850+
if (ql_input%method .eq. 0) then
851+
! constant
852+
elseif (ql_input%method .eq. 2) then
853+
select case(longwave_type)
854+
case(1)
855+
! already read in
856+
case(2)
857+
ql_input%value=ql_input%value-bolz*emiss*(tw_k**4)
858+
end select
859+
else ! (ql_input%method .gt. 2) then
828860
call longwave_radiation(ql_input%method, &
829-
dlat,tw_k,ta_k,cloud_input%value,ql_input%value)
830-
endif
861+
dlat,tw_k,ta_k,cloud_input%value,ql_input%value)
862+
end if
863+
831864
call airsea_fluxes(fluxes_method, &
832865
tw,ta,u10_input%value-ssu,v10_input%value-ssv,precip_input%value,evap,tx_input%value,ty_input%value,qe,qh)
833866
heat_input%value = (ql_input%value+qe+qh)

src/airsea/longwave_radiation.F90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ subroutine longwave_radiation(method,dlat,tw,ta,cloud,ql)
1212
! Here, the net longwave radiation is calculated by means of one out
1313
! of six methods, which depend on the value given to the parameter
1414
! {\tt method}:
15-
! {\tt method}=1: \cite{Clarketal74},
16-
! {\tt method}=2: \cite{HastenrathLamb78},
17-
! {\tt method}=3: \cite{Bignamietal95},
18-
! {\tt method}=4: \cite{BerliandBerliand52}.
19-
! {\tt method}=5: \cite{Joseyetal2003} - (J1,9).
20-
! {\tt method}=6: \cite{Joseyetal2003} - (J2,14).
15+
! {\tt method}=3: \cite{Clarketal74},
16+
! {\tt method}=4: \cite{HastenrathLamb78},
17+
! {\tt method}=5: \cite{Bignamietal95},
18+
! {\tt method}=6: \cite{BerliandBerliand52}.
19+
! {\tt method}=7: \cite{Joseyetal2003} - (J1,9).
20+
! {\tt method}=8: \cite{Joseyetal2003} - (J2,14).
2121
! It should be noted that the latitude must here be given in degrees.
2222
!
2323
! !USES:
@@ -31,7 +31,7 @@ subroutine longwave_radiation(method,dlat,tw,ta,cloud,ql)
3131
REALTYPE, intent(in) :: dlat,tw,ta,cloud
3232
!
3333
! !OUTPUT PARAMETERS:
34-
REALTYPE, intent(out) :: ql
34+
REALTYPE, intent(inout) :: ql
3535
!
3636
! !REVISION HISTORY:
3737
! Original author(s): Adolf Stips, Hans Burchard & Karsten Bolding

0 commit comments

Comments
 (0)