@@ -49,4 +49,136 @@ subroutine f_aero_particle_volumes(ptr_c, arr_data, arr_size) bind(C)
4949 call c_f_pointer(ptr_c, aero_particle)
5050 arr_data = aero_particle% vol
5151 end subroutine
52+
53+ subroutine f_aero_particle_volume (ptr_c , vol ) bind(C)
54+ type (aero_particle_t), pointer :: ptr_f = > null ()
55+ type (c_ptr), intent (in ) :: ptr_c
56+ real (c_double), intent (out ) :: vol
57+
58+ call c_f_pointer(ptr_c, ptr_f)
59+
60+ vol = aero_particle_volume(ptr_f)
61+ end subroutine
62+
63+ subroutine f_aero_particle_species_volume (ptr_c , i_spec , vol ) bind(C)
64+ type (aero_particle_t), pointer :: ptr_f = > null ()
65+ type (c_ptr), intent (in ) :: ptr_c
66+ integer (c_int), intent (in ) :: i_spec
67+ real (c_double), intent (out ) :: vol
68+
69+ call c_f_pointer(ptr_c, ptr_f)
70+
71+ vol = aero_particle_species_volume(ptr_f, i_spec+1 )
72+ end subroutine
73+
74+ subroutine f_aero_particle_dry_volume (aero_particle_ptr_c , aero_data_ptr_c , vol ) bind(C)
75+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
76+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
77+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
78+ real (c_double), intent (out ) :: vol
79+
80+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
81+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
82+
83+ vol = aero_particle_dry_volume(aero_particle_ptr_f, aero_data_ptr_f)
84+ end subroutine
85+
86+ subroutine f_aero_particle_radius (aero_particle_ptr_c , aero_data_ptr_c , radius ) bind(C)
87+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
88+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
89+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
90+ real (c_double), intent (out ) :: radius
91+
92+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
93+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
94+
95+ radius = aero_particle_radius(aero_particle_ptr_f, aero_data_ptr_f)
96+ end subroutine
97+
98+ subroutine f_aero_particle_dry_radius (aero_particle_ptr_c , aero_data_ptr_c , radius ) bind(C)
99+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
100+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
101+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
102+ real (c_double), intent (out ) :: radius
103+
104+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
105+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
106+
107+ radius = aero_particle_dry_radius(aero_particle_ptr_f, aero_data_ptr_f)
108+ end subroutine
109+
110+ subroutine f_aero_particle_diameter (aero_particle_ptr_c , aero_data_ptr_c , diameter ) bind(C)
111+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
112+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
113+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
114+ real (c_double), intent (out ) :: diameter
115+
116+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
117+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
118+
119+ diameter = aero_particle_diameter(aero_particle_ptr_f, aero_data_ptr_f)
120+ end subroutine
121+
122+ subroutine f_aero_particle_dry_diameter (aero_particle_ptr_c , aero_data_ptr_c , diameter ) bind(C)
123+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
124+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
125+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
126+ real (c_double), intent (out ) :: diameter
127+
128+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
129+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
130+
131+ diameter = aero_particle_dry_diameter(aero_particle_ptr_f, aero_data_ptr_f)
132+ end subroutine
133+
134+ subroutine f_aero_particle_mass (aero_particle_ptr_c , aero_data_ptr_c , mass ) bind(C)
135+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
136+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
137+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
138+ real (c_double), intent (out ) :: mass
139+
140+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
141+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
142+
143+ mass = aero_particle_mass(aero_particle_ptr_f, aero_data_ptr_f)
144+ end subroutine
145+
146+ subroutine f_aero_particle_species_mass ( &
147+ aero_particle_ptr_c , &
148+ i_spec , &
149+ aero_data_ptr_c , &
150+ mass &
151+ ) bind(C)
152+
153+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
154+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
155+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
156+ integer (c_int), intent (in ) :: i_spec
157+ real (c_double), intent (out ) :: mass
158+
159+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
160+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
161+
162+ mass = aero_particle_species_mass(aero_particle_ptr_f, i_spec+1 , aero_data_ptr_f)
163+ end subroutine
164+
165+ subroutine f_aero_particle_species_masses ( &
166+ aero_particle_ptr_c , &
167+ aero_data_ptr_c , &
168+ size_masses , &
169+ masses &
170+ ) bind(C)
171+
172+ type (aero_particle_t), pointer :: aero_particle_ptr_f = > null ()
173+ type (aero_data_t), pointer :: aero_data_ptr_f = > null ()
174+ type (c_ptr), intent (in ) :: aero_particle_ptr_c, aero_data_ptr_c
175+ integer (c_int), intent (in ) :: size_masses
176+ real (c_double), dimension (size_masses), intent (out ) :: masses
177+
178+ call c_f_pointer(aero_particle_ptr_c, aero_particle_ptr_f)
179+ call c_f_pointer(aero_data_ptr_c, aero_data_ptr_f)
180+
181+ masses = aero_particle_species_masses(aero_particle_ptr_f, aero_data_ptr_f)
182+ end subroutine
183+
52184end module
0 commit comments