MONC
Data Types | Functions/Subroutines
def_merge_atm Module Reference

Data Types

type  str_merge_atm
 

Functions/Subroutines

subroutine allocate_merge_data_fields (current_state, merge_fields, mcc)
 

Function/Subroutine Documentation

◆ allocate_merge_data_fields()

subroutine def_merge_atm::allocate_merge_data_fields ( type(model_state_type), intent(inout), target  current_state,
type (str_merge_atm), intent(inout)  merge_fields,
type (str_mcc_profiles), intent(in)  mcc 
)

Definition at line 50 of file def_merge_atm.F90.

51 
52  implicit none
53 
54  type(model_state_type), target, intent(inout) :: current_state
55  type (str_mcc_profiles), intent(in) :: mcc
56  type (str_merge_atm), intent(inout) :: merge_fields
57 
58  ! monc fields with the monc vertical grid, derived before merge of McClatchey and monc domains
59  allocate(merge_fields%pref_loc(current_state%local_grid%size(z_index)))
60  allocate(merge_fields%t_n_loc(current_state%local_grid%size(z_index)))
61  allocate(merge_fields%t_level_loc(current_state%local_grid%size(z_index)))
62 
63  ! merged fields at the centre of the grid (zn layer)
64  allocate(merge_fields%t_n(mcc%irad_levs)) ! absolute temperature
65  allocate(merge_fields%qv_n(mcc%irad_levs)) ! vapour mixing ratio
66  allocate(merge_fields%ql_n(mcc%irad_levs)) ! liquid water mixing ratio
67  allocate(merge_fields%qi_n(mcc%irad_levs)) ! ice mass mixing ratio
68  allocate(merge_fields%pres_n(mcc%irad_levs)) ! pressure
69  allocate(merge_fields%o3_n(mcc%irad_levs)) ! ozone
70  allocate(merge_fields%cloudnumber_n(mcc%irad_levs)) ! cloud drop number concentration
71 
72 
73  allocate(merge_fields%total_cloud_fraction(mcc%irad_levs)) ! liquid+ice fraction
74  allocate(merge_fields%liquid_cloud_fraction(mcc%irad_levs)) ! liquid fraction
75  allocate(merge_fields%ice_cloud_fraction(mcc%irad_levs)) ! ice fraction
76 
77  ! merged fields at the layer boundary (z layer)
78  allocate(merge_fields%t_level(0:mcc%irad_levs)) ! temperature on level
79  allocate(merge_fields%qv_level(mcc%irad_levs)) ! vapour mixing ratio
80  allocate(merge_fields%ql_level(mcc%irad_levs)) ! liquid water mixing ratio
81  allocate(merge_fields%qi_level(mcc%irad_levs)) ! ice mass mixing ratio
82  allocate(merge_fields%pres_level(0:mcc%irad_levs)) ! pressure
83  allocate(merge_fields%o3_level(mcc%irad_levs)) ! ozone
84 
85 
86  allocate(merge_fields%mass(mcc%irad_levs)) ! mass of the atmos at each
87  ! level
88 
89  allocate(merge_fields%lw_heat_rate_radlevs(mcc%irad_levs))
90  allocate(merge_fields%sw_heat_rate_radlevs(mcc%irad_levs))
91 
92  merge_fields%pref_loc(:) = 0.0
93  merge_fields%t_n_loc(:) = 0.0
94  merge_fields%t_level_loc(:) = 0.0
95 
96  merge_fields%t_n(:) = 0.0 ! absolute temperature
97  merge_fields%qv_n(:) = 0.0 ! vapour mixing ratio
98  merge_fields%ql_n(:) = 0.0 ! liquid water mixing ratio
99  merge_fields%qi_n(:) = 0.0 ! rain mass mixing ratio
100  merge_fields%pres_n(:) = 0.0 ! pressure
101  merge_fields%o3_n(:) = 0.0
102 
103  merge_fields%t_level(:) = 0.0 ! absolute temperature
104  merge_fields%qv_level(:) = 0.0 ! vapour mixing ratio
105  merge_fields%ql_level(:) = 0.0 ! liquid water mixing ratio
106  merge_fields%qi_level(:) = 0.0 ! rain mass mixing ratio
107  merge_fields%pres_level(:) = 0.0 ! pressure
108  merge_fields%o3_level(:) = 0.0
109 
110  merge_fields%total_cloud_fraction(:) = 0.0 ! liquid+ice fraction
111  merge_fields%liquid_cloud_fraction(:) = 0.0 ! liquid fraction
112  merge_fields%ice_cloud_fraction(:) = 0.0 ! ice fraction
113 
114  merge_fields%mass(:) = 0.0
115 
116  merge_fields%lw_heat_rate_radlevs(:) = 0.0
117  merge_fields%sw_heat_rate_radlevs(:) = 0.0
118