@@ -87,7 +87,7 @@ subroutine f_env_state_get_height(ptr_c, height) bind(C)
8787 type (env_state_t), pointer :: ptr_f = > null ()
8888 type (c_ptr), intent (in ) :: ptr_c
8989 real (c_double), intent (out ) :: height
90-
90+
9191 call c_f_pointer(ptr_c, ptr_f)
9292
9393 height = ptr_f% height
@@ -109,7 +109,7 @@ subroutine f_env_state_get_additive_kernel_coefficient(ptr_c, target) bind(C)
109109 type (env_state_t), pointer :: ptr_f = > null ()
110110 type (c_ptr), intent (in ) :: ptr_c
111111 real (c_double), intent (out ) :: target
112-
112+
113113 call c_f_pointer(ptr_c, ptr_f)
114114
115115 target = ptr_f% additive_kernel_coefficient
@@ -141,7 +141,7 @@ subroutine f_env_state_get_pressure(ptr_c, pressure) bind(C)
141141 subroutine f_env_state_get_elapsed_time (ptr_c , elapsed_time ) bind(C)
142142 type (env_state_t), pointer :: ptr_f = > null ()
143143 type (c_ptr), intent (in ) :: ptr_c
144- real (c_double), intent (out ) :: elapsed_time
144+ real (c_double), intent (out ) :: elapsed_time
145145
146146 call c_f_pointer(ptr_c, ptr_f)
147147
@@ -171,4 +171,116 @@ subroutine f_env_state_air_dens(ptr_c, air_density) bind(C)
171171
172172 end subroutine
173173
174+ subroutine f_env_state_air_molar_dens (ptr_c , air_molar_density ) bind(C)
175+ type (env_state_t), pointer :: ptr_f = > null ()
176+ type (c_ptr), intent (in ) :: ptr_c
177+ real (c_double), intent (out ) :: air_molar_density
178+
179+ call c_f_pointer(ptr_c, ptr_f)
180+
181+ air_molar_density = env_state_air_molar_den(ptr_f)
182+
183+ end subroutine
184+
185+ subroutine f_env_state_get_latitude (ptr_c , latitude ) bind(C)
186+ type (env_state_t), pointer :: ptr_f = > null ()
187+ type (c_ptr), intent (in ) :: ptr_c
188+ real (c_double), intent (out ) :: latitude
189+
190+ call c_f_pointer(ptr_c, ptr_f)
191+
192+ latitude = ptr_f% latitude
193+
194+ end subroutine
195+
196+ subroutine f_env_state_set_latitude (ptr_c , latitude ) bind(C)
197+ type (env_state_t), pointer :: ptr_f = > null ()
198+ type (c_ptr), intent (inout ) :: ptr_c
199+ real (c_double), intent (in ) :: latitude
200+
201+ call c_f_pointer(ptr_c, ptr_f)
202+
203+ ptr_f% latitude = latitude
204+
205+ end subroutine
206+
207+ subroutine f_env_state_get_longitude (ptr_c , longitude ) bind(C)
208+ type (env_state_t), pointer :: ptr_f = > null ()
209+ type (c_ptr), intent (in ) :: ptr_c
210+ real (c_double), intent (out ) :: longitude
211+
212+ call c_f_pointer(ptr_c, ptr_f)
213+
214+ longitude = ptr_f% longitude
215+
216+ end subroutine
217+
218+ subroutine f_env_state_set_longitude (ptr_c , longitude ) bind(C)
219+ type (env_state_t), pointer :: ptr_f = > null ()
220+ type (c_ptr), intent (inout ) :: ptr_c
221+ real (c_double), intent (in ) :: longitude
222+
223+ call c_f_pointer(ptr_c, ptr_f)
224+
225+ ptr_f% longitude = longitude
226+
227+ end subroutine
228+
229+ subroutine f_env_state_get_altitude (ptr_c , altitude ) bind(C)
230+ type (env_state_t), pointer :: ptr_f = > null ()
231+ type (c_ptr), intent (in ) :: ptr_c
232+ real (c_double), intent (out ) :: altitude
233+
234+ call c_f_pointer(ptr_c, ptr_f)
235+
236+ altitude = ptr_f% altitude
237+
238+ end subroutine
239+
240+ subroutine f_env_state_set_altitude (ptr_c , altitude ) bind(C)
241+ type (env_state_t), pointer :: ptr_f = > null ()
242+ type (c_ptr), intent (inout ) :: ptr_c
243+ real (c_double), intent (in ) :: altitude
244+
245+ call c_f_pointer(ptr_c, ptr_f)
246+
247+ ptr_f% altitude = altitude
248+
249+ end subroutine
250+
251+ subroutine f_env_state_ppb_to_conc (ptr_c , ppb , conc ) bind(C)
252+ type (env_state_t), pointer :: ptr_f = > null ()
253+ type (c_ptr), intent (in ) :: ptr_c
254+ real (c_double), intent (in ) :: ppb
255+ real (c_double), intent (out ) :: conc
256+
257+ call c_f_pointer(ptr_c, ptr_f)
258+
259+ conc = env_state_ppb_to_conc(ptr_f, ppb)
260+
261+ end subroutine
262+
263+ subroutine f_env_state_conc_to_ppb (ptr_c , conc , ppb ) bind(C)
264+ type (env_state_t), pointer :: ptr_f = > null ()
265+ type (c_ptr), intent (in ) :: ptr_c
266+ real (c_double), intent (out ) :: ppb
267+ real (c_double), intent (in ) :: conc
268+
269+ call c_f_pointer(ptr_c, ptr_f)
270+
271+ ppb = env_state_conc_to_ppb(ptr_f, conc)
272+
273+ end subroutine
274+
275+ subroutine f_env_state_sat_vapor_pressure (ptr_c , sat_vapor_pressure ) bind(C)
276+ type (env_state_t), pointer :: ptr_f = > null ()
277+ type (c_ptr), intent (in ) :: ptr_c
278+ real (c_double), intent (out ) :: sat_vapor_pressure
279+
280+ call c_f_pointer(ptr_c, ptr_f)
281+
282+ sat_vapor_pressure = env_state_sat_vapor_pressure(ptr_f)
283+
284+ end subroutine
285+
174286end module
0 commit comments