MONC
Functions/Subroutines
set_bound.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine set_bound (control, isolir, atm, dimen, spectrum, bound, socrates_derived_fields)
 

Function/Subroutine Documentation

◆ set_bound()

subroutine set_bound ( type(strctrl), intent(in)  control,
integer, intent(in)  isolir,
type(stratm), intent(in)  atm,
type(strdim), intent(in)  dimen,
type (strspecdata), intent(in)  spectrum,
type(strbound), intent(out)  bound,
type (str_socrates_derived_fields), intent(in)  socrates_derived_fields 
)

Definition at line 10 of file set_bound.F90.

14 
15 USE rad_pcf
16 USE def_control, ONLY: strctrl
17 USE def_atm, ONLY: stratm
18 USE def_spectrum, ONLY: strspecdata
19 USE def_dimen, ONLY: strdim
20 USE def_bound, ONLY: strbound, allocate_bound
22 
23 IMPLICIT NONE
24 
25 ! Control options:
26 TYPE(StrCtrl), INTENT(IN) :: control
27 
28 !Spectral region
29 INTEGER, INTENT(IN) :: isolir
30 
31 ! Atmospheric properties:
32 TYPE(StrAtm), INTENT(IN) :: atm
33 
34 ! Dimensions:
35 TYPE(StrDim), INTENT(IN) :: dimen
36 
37 ! Spectral data:
38 TYPE (StrSpecData), INTENT(IN) :: spectrum
39 
40 ! Boundary conditions:
41 TYPE(StrBound), INTENT(OUT) :: bound
42 
43 ! solar variables from MONC solar_position_angle_mod and timestep_callback
44 type (str_socrates_derived_fields), intent(in) :: socrates_derived_fields
45 
46 call allocate_bound(bound, dimen, spectrum)
47 
48 ! Set the surface basis functions for a Lambertian surface.
49 bound%n_brdf_basis_fnc = 1
50 ! By setting F_{1,0,0,0} equal to 4 we can set rho_alb equal to
51 ! the diffuse albedo
52 bound%f_brdf(1,0,0,0) = 4.0
53 if ( isolir == ip_solar ) then
54 ! Need to set this initially using input from config
55  bound%rho_alb(1:atm%n_profile, ip_surf_alb_diff, 1:spectrum%basic%n_band) = &
56  socrates_derived_fields%albedoin1
57  bound%rho_alb(1:atm%n_profile, ip_surf_alb_dir, 1:spectrum%basic%n_band) = &
58  socrates_derived_fields%albedoin1
59 else if ( isolir == ip_infra_red ) then
60  bound%rho_alb(1:atm%n_profile, ip_surf_alb_diff, 1:spectrum%basic%n_band) = &
61  0.0
62  bound%rho_alb(1:atm%n_profile, ip_surf_alb_dir, 1:spectrum%basic%n_band) = &
63  0.0
64 end if
65 ! Holds the secant of the zenith angle for the fluxes
66 bound%zen_0(1:atm%n_profile) = socrates_derived_fields%sec_out
67 ! sol_const = default_solar_const * scs (calced in timestep_callback)
68 ! fractional_lit = lit in UM (is 0 or 1)
69 bound%solar_irrad(:) = socrates_derived_fields%sol_const * socrates_derived_fields%fraction_lit
70 ! pass from the MONC surface temperature
71 bound%t_ground(1:atm%n_profile) = socrates_derived_fields%srf_temperature ! Needs sorting
72 
Here is the caller graph for this function:
def_socrates_derived_fields
Definition: def_socrates_derived_fields.F90:1
def_socrates_derived_fields::str_socrates_derived_fields
Definition: def_socrates_derived_fields.F90:7