Ticket #454: ropp_io_assign.f90

File ropp_io_assign.f90, 30.4 KB (added by Ian Culverwell, 9 years ago)

ropp_io_assign.f90

Line 
1! $Id: ropp_io_assign.f90 4688 2016-01-19 16:18:00Z idculv $
2
3!****s* Initialisation/ropp_io_assign *
4!
5! NAME
6! ropp_io_assign - Initialise an RO derived type with another RO derived type
7!
8! SYNOPSIS
9! use ropp_io
10! type(ROprof) :: ro_data
11! ...
12! call ropp_io_assign(ro_data_old, ro_data_new)
13! call ropp_io_assign(ro_data%Lev1a_old, ro_data%Lev1a_old)
14! call ropp_io_assign(ro_data%Lev1b_old, ro_data%Lev1b_old)
15! call ropp_io_assign(ro_data%Lev2a_old, ro_data%Lev2a_old)
16! call ropp_io_assign(ro_data%Lev2b_old, ro_data%Lev2b_old)
17! call ropp_io_assign(ro_data%Lev2c_old, ro_data%Lev2c_old)
18! call ropp_io_assign(ro_data%Lev2d_old, ro_data%Lev2d_old)
19!
20! DESCRIPTION
21! This subroutine initialises a RO data structure or parts thereof with the
22! elements of an exisitng RO data structure.
23! These subroutines can be used to overloading the assign operator (=)
24! for RO data structures
25!
26! INPUT
27! ro_data_old dtyp RO data (derived type)
28!
29! OUTPUT
30! ro_data_new dtyp RO data (derived type)
31!
32! SEE ALSO
33! ropp_io_types
34! ropp_io_init
35!
36! NOTES
37!
38! REFERENCES
39! Format Definition for Radio Occultation Files -
40! CLIMAP Format Version 2.2a, Issue 1.6, 8 January 2004
41!
42! AUTHOR
43! Met Office, Exeter, UK.
44! Any comments on this software should be given via the ROM SAF
45! Helpdesk at http://www.romsaf.org
46!
47! COPYRIGHT
48! (c) EUMETSAT. All rights reserved.
49! For further details please refer to the file COPYRIGHT
50! which you should have received as part of this distribution.
51!
52!****
53
54!-------------------------------------------------------------------------------
55! 1. L1atype
56!-------------------------------------------------------------------------------
57
58SUBROUTINE ropp_io_l1atype_l1atype(from_var, to_var)
59
60! 1.1 Declarations
61! ----------------
62
63 USE ropp_utils
64 USE ropp_io, not_this => ropp_io_l1atype_l1atype
65 USE ropp_io_types, ONLY: L1atype
66
67 IMPLICIT NONE
68
69 TYPE(L1atype), INTENT(in) :: from_var
70 TYPE(L1atype), INTENT(inout) :: to_var
71
72! 1.2 Copy contents
73! -----------------
74
75 to_var % Npoints = from_var % Npoints
76
77 to_var % Missing = from_var % Missing
78
79 IF ( to_var%Npoints > 0 ) THEN
80
81 CALL copy_alloc( from_var % dtime(1:from_var%Npoints), to_var % dtime )
82 CALL copy_alloc( from_var % snr_L1ca(1:from_var % Npoints) , to_var % snr_L1ca )
83 CALL copy_alloc( from_var % snr_L1p(1:from_var % Npoints) , to_var % snr_L1p )
84 CALL copy_alloc( from_var % snr_L2p(1:from_var % Npoints) , to_var % snr_L2p )
85 CALL copy_alloc( from_var % phase_L1(1:from_var % Npoints) , to_var % phase_L1 )
86 CALL copy_alloc( from_var % phase_L2(1:from_var % Npoints) , to_var % phase_L2 )
87 CALL copy_alloc( from_var % phase_qual(1:from_var % Npoints) , to_var % phase_qual )
88 CALL copy_alloc( from_var % r_gns(1:from_var % Npoints, :) , to_var % r_gns )
89 CALL copy_alloc( from_var % v_gns(1:from_var % Npoints, :) , to_var % v_gns )
90 CALL copy_alloc( from_var % r_leo(1:from_var % Npoints, :) , to_var % r_leo )
91 CALL copy_alloc( from_var % v_leo(1:from_var % Npoints, :) , to_var % v_leo )
92
93 ENDIF
94
95END SUBROUTINE ropp_io_l1atype_l1atype
96
97!-------------------------------------------------------------------------------
98! 2. L1atype (assignment)
99!-------------------------------------------------------------------------------
100
101SUBROUTINE ropp_io_assign_l1atype(to_var, from_var)
102
103! 2.1 Declarations
104! ----------------
105
106 USE ropp_utils
107 USE ropp_io, not_this => ropp_io_assign_l1atype
108 USE ropp_io_types, ONLY: L1atype
109
110 IMPLICIT NONE
111
112 TYPE(L1atype), INTENT(in) :: from_var
113 TYPE(L1atype), INTENT(inout) :: to_var
114
115! 2.2 Copy contents
116! -----------------
117
118 to_var % Npoints = from_var % Npoints
119
120 to_var % Missing = from_var % Missing
121
122 IF ( to_var%Npoints > 0 ) THEN
123
124 CALL copy_alloc( from_var % dtime(1:from_var % Npoints) , to_var % dtime )
125 CALL copy_alloc( from_var % snr_L1ca(1:from_var % Npoints) , to_var % snr_L1ca )
126 CALL copy_alloc( from_var % snr_L1p(1:from_var % Npoints) , to_var % snr_L1p )
127 CALL copy_alloc( from_var % snr_L2p(1:from_var % Npoints) , to_var % snr_L2p )
128 CALL copy_alloc( from_var % phase_L1(1:from_var % Npoints) , to_var % phase_L1 )
129 CALL copy_alloc( from_var % phase_L2(1:from_var % Npoints) , to_var % phase_L2 )
130 CALL copy_alloc( from_var % phase_qual(1:from_var % Npoints) , to_var % phase_qual )
131 CALL copy_alloc( from_var % r_gns(1:from_var % Npoints, :) , to_var % r_gns )
132 CALL copy_alloc( from_var % v_gns(1:from_var % Npoints, :) , to_var % v_gns )
133 CALL copy_alloc( from_var % r_leo(1:from_var % Npoints, :) , to_var % r_leo )
134 CALL copy_alloc( from_var % v_leo(1:from_var % Npoints, :) , to_var % v_leo )
135
136 ENDIF
137
138END SUBROUTINE ropp_io_assign_l1atype
139
140
141!-------------------------------------------------------------------------------
142! 3. L1btype
143!-------------------------------------------------------------------------------
144
145SUBROUTINE ropp_io_l1btype_l1btype(from_var, to_var)
146
147! 3.1 Declarations
148! ----------------
149
150 USE ropp_utils
151 USE ropp_io, not_this => ropp_io_l1btype_l1btype
152 USE ropp_io_types, ONLY: L1btype
153
154 IMPLICIT NONE
155
156 TYPE(L1btype), INTENT(in) :: from_var
157 TYPE(L1btype), INTENT(inout) :: to_var
158
159! 3.2 Copy contents
160! -----------------
161
162 to_var%Npoints = from_var%Npoints
163
164 to_var%Missing = from_var%Missing
165
166 IF ( to_var%Npoints > 0 ) THEN
167
168 CALL copy_alloc( from_var%lat_tp(1:from_var % Npoints) , to_var%lat_tp )
169 CALL copy_alloc( from_var%lon_tp(1:from_var % Npoints) , to_var%lon_tp )
170 CALL copy_alloc( from_var%azimuth_tp(1:from_var % Npoints) , to_var%azimuth_tp )
171 CALL copy_alloc( from_var%impact_L1(1:from_var % Npoints) , to_var%impact_L1 )
172 CALL copy_alloc( from_var%impact_L2 (1:from_var % Npoints) , to_var%impact_L2 )
173 CALL copy_alloc( from_var%impact(1:from_var % Npoints) , to_var%impact )
174 CALL copy_alloc( from_var%impact_Opt(1:from_var % Npoints) , to_var%impact_Opt )
175 CALL copy_alloc( from_var%bangle_L1(1:from_var % Npoints) , to_var%bangle_L1 )
176 CALL copy_alloc( from_var%bangle_L2(1:from_var % Npoints) , to_var%bangle_L2 )
177 CALL copy_alloc( from_var%bangle(1:from_var % Npoints) , to_var%bangle )
178 CALL copy_alloc( from_var%bangle_Opt(1:from_var % Npoints) , to_var%bangle_Opt )
179 CALL copy_alloc( from_var%bangle_L1_sigma(1:from_var % Npoints) , to_var%bangle_L1_sigma )
180 CALL copy_alloc( from_var%bangle_L2_sigma(1:from_var % Npoints) , to_var%bangle_L2_sigma )
181 CALL copy_alloc( from_var%bangle_sigma(1:from_var % Npoints) , to_var%bangle_sigma )
182 CALL copy_alloc( from_var%bangle_Opt_sigma(1:from_var % Npoints) , to_var%bangle_Opt_sigma )
183 CALL copy_alloc( from_var%bangle_L1_qual(1:from_var % Npoints) , to_var%bangle_L1_qual )
184 CALL copy_alloc( from_var%bangle_L2_qual(1:from_var % Npoints) , to_var%bangle_L2_qual )
185 CALL copy_alloc( from_var%bangle_qual(1:from_var % Npoints) , to_var%bangle_qual )
186 CALL copy_alloc( from_var%bangle_Opt_qual(1:from_var % Npoints) , to_var%bangle_Opt_qual )
187
188 ENDIF
189
190END SUBROUTINE ropp_io_l1btype_l1btype
191
192!-------------------------------------------------------------------------------
193! 4. L1btype (assignment)
194!-------------------------------------------------------------------------------
195
196SUBROUTINE ropp_io_assign_l1btype(to_var, from_var)
197
198! 4.1 Declarations
199! ----------------
200
201 USE ropp_utils
202 USE ropp_io, not_this => ropp_io_assign_l1btype
203 USE ropp_io_types, ONLY: L1btype
204
205 IMPLICIT NONE
206
207 TYPE(L1btype), INTENT(in) :: from_var
208 TYPE(L1btype), INTENT(inout) :: to_var
209
210! 4.2 Copy contents
211! -----------------
212
213 to_var%Npoints = from_var%Npoints
214
215 to_var%Missing = from_var%Missing
216
217 IF ( to_var%Npoints > 0 ) THEN
218
219 CALL copy_alloc( from_var%lat_tp(1:from_var % Npoints) , to_var%lat_tp )
220 CALL copy_alloc( from_var%lon_tp(1:from_var % Npoints) , to_var%lon_tp )
221 CALL copy_alloc( from_var%azimuth_tp(1:from_var % Npoints) , to_var%azimuth_tp )
222 CALL copy_alloc( from_var%impact_L1(1:from_var % Npoints) , to_var%impact_L1 )
223 CALL copy_alloc( from_var%impact_L2(1:from_var % Npoints) , to_var%impact_L2 )
224 CALL copy_alloc( from_var%impact(1:from_var % Npoints) , to_var%impact )
225 CALL copy_alloc( from_var%impact_Opt(1:from_var % Npoints) , to_var%impact_Opt )
226 CALL copy_alloc( from_var%bangle_L1(1:from_var % Npoints) , to_var%bangle_L1 )
227 CALL copy_alloc( from_var%bangle_L2(1:from_var % Npoints) , to_var%bangle_L2 )
228 CALL copy_alloc( from_var%bangle(1:from_var % Npoints) , to_var%bangle )
229 CALL copy_alloc( from_var%bangle_Opt(1:from_var % Npoints) , to_var%bangle_Opt )
230 CALL copy_alloc( from_var%bangle_L1_sigma(1:from_var % Npoints) , to_var%bangle_L1_sigma )
231 CALL copy_alloc( from_var%bangle_L2_sigma(1:from_var % Npoints) , to_var%bangle_L2_sigma )
232 CALL copy_alloc( from_var%bangle_sigma(1:from_var % Npoints) , to_var%bangle_sigma )
233 CALL copy_alloc( from_var%bangle_Opt_sigma(1:from_var % Npoints) , to_var%bangle_Opt_sigma )
234 CALL copy_alloc( from_var%bangle_L1_qual(1:from_var % Npoints) , to_var%bangle_L1_qual )
235 CALL copy_alloc( from_var%bangle_L2_qual(1:from_var % Npoints) , to_var%bangle_L2_qual )
236 CALL copy_alloc( from_var%bangle_qual(1:from_var % Npoints) , to_var%bangle_qual )
237 CALL copy_alloc( from_var%bangle_Opt_qual(1:from_var % Npoints) , to_var%bangle_Opt_qual )
238
239 ENDIF
240
241END SUBROUTINE ropp_io_assign_l1btype
242
243!-------------------------------------------------------------------------------
244! 5. L2atype
245!-------------------------------------------------------------------------------
246
247SUBROUTINE ropp_io_l2atype_l2atype(from_var, to_var)
248
249! 5.1 Declarations
250! ----------------
251
252 USE ropp_utils
253 USE ropp_io, not_this => ropp_io_l2atype_l2atype
254 USE ropp_io_types, ONLY: L2atype
255
256 IMPLICIT NONE
257
258 TYPE(L2atype), INTENT(in) :: from_var
259 TYPE(L2atype), INTENT(inout) :: to_var
260
261! 5.2 Allocate memory for all structure elements
262! ----------------------------------------------
263
264 to_var%Npoints = from_var%Npoints
265
266 to_var%Missing = from_var%Missing
267
268 IF ( to_var%Npoints > 0 ) THEN
269
270 CALL copy_alloc( from_var%alt_refrac(1:from_var % Npoints) , to_var%alt_refrac )
271 CALL copy_alloc( from_var%geop_refrac(1:from_var % Npoints) , to_var%geop_refrac )
272 CALL copy_alloc( from_var%refrac(1:from_var % Npoints) , to_var%refrac )
273 CALL copy_alloc( from_var%refrac_sigma(1:from_var % Npoints) , to_var%refrac_sigma )
274 CALL copy_alloc( from_var%refrac_qual(1:from_var % Npoints) , to_var%refrac_qual )
275 CALL copy_alloc( from_var%dry_temp(1:from_var % Npoints) , to_var%dry_temp )
276 CALL copy_alloc( from_var%dry_temp_sigma(1:from_var % Npoints) , to_var%dry_temp_sigma )
277 CALL copy_alloc( from_var%dry_temp_qual(1:from_var % Npoints) , to_var%dry_temp_qual )
278
279 ENDIF
280
281END SUBROUTINE ropp_io_l2atype_l2atype
282
283!-------------------------------------------------------------------------------
284! 6. L2atype (assignment)
285!-------------------------------------------------------------------------------
286
287SUBROUTINE ropp_io_assign_l2atype(to_var, from_var)
288
289! 6.1 Declarations
290! ----------------
291
292 USE ropp_utils
293 USE ropp_io, not_this => ropp_io_assign_l2atype
294 USE ropp_io_types, ONLY: L2atype
295
296 IMPLICIT NONE
297
298 TYPE(L2atype), INTENT(in) :: from_var
299 TYPE(L2atype), INTENT(inout) :: to_var
300
301! 6.2 Allocate memory for all structure elements
302! ----------------------------------------------
303
304 to_var%Npoints = from_var%Npoints
305
306 to_var%Missing = from_var%Missing
307
308 IF ( to_var%Npoints > 0 ) THEN
309
310 CALL copy_alloc( from_var%alt_refrac(1:from_var % Npoints) , to_var%alt_refrac )
311 CALL copy_alloc( from_var%geop_refrac(1:from_var % Npoints) , to_var%geop_refrac )
312 CALL copy_alloc( from_var%refrac(1:from_var % Npoints) , to_var%refrac )
313 CALL copy_alloc( from_var%refrac_sigma(1:from_var % Npoints) , to_var%refrac_sigma )
314 CALL copy_alloc( from_var%refrac_qual(1:from_var % Npoints) , to_var%refrac_qual )
315 CALL copy_alloc( from_var%dry_temp(1:from_var % Npoints) , to_var%dry_temp )
316 CALL copy_alloc( from_var%dry_temp_sigma(1:from_var % Npoints) , to_var%dry_temp_sigma )
317 CALL copy_alloc( from_var%dry_temp_qual(1:from_var % Npoints) , to_var%dry_temp_qual )
318
319 ENDIF
320
321END SUBROUTINE ropp_io_assign_l2atype
322
323!-------------------------------------------------------------------------------
324! 7. L2btype
325!-------------------------------------------------------------------------------
326
327SUBROUTINE ropp_io_l2btype_l2btype(from_var, to_var)
328
329! 7.1 Declarations
330! ----------------
331
332 USE ropp_utils
333 USE ropp_io, not_this => ropp_io_l2btype_l2btype
334 USE ropp_io_types, ONLY: L2btype
335
336 IMPLICIT NONE
337
338 TYPE(L2btype), INTENT(in) :: from_var
339 TYPE(L2btype), INTENT(inout) :: to_var
340
341! 7.2 Copy contents
342! -----------------
343
344 to_var%Npoints = from_var%Npoints
345
346 to_var%Missing = from_var%Missing
347
348 IF ( to_var%Npoints > 0 ) THEN
349
350 CALL copy_alloc( from_var%geop(1:from_var % Npoints) , to_var%geop )
351 CALL copy_alloc( from_var%geop_sigma(1:from_var % Npoints) , to_var%geop_sigma )
352 CALL copy_alloc( from_var%press(1:from_var % Npoints) , to_var%press )
353 CALL copy_alloc( from_var%press_sigma(1:from_var % Npoints) , to_var%press_sigma )
354 CALL copy_alloc( from_var%temp(1:from_var % Npoints) , to_var%temp )
355 CALL copy_alloc( from_var%temp_sigma(1:from_var % Npoints) , to_var%temp_sigma )
356 CALL copy_alloc( from_var%shum(1:from_var % Npoints) , to_var%shum )
357 CALL copy_alloc( from_var%shum_sigma(1:from_var % Npoints) , to_var%shum_sigma )
358 CALL copy_alloc( from_var%meteo_qual(1:from_var % Npoints) , to_var%meteo_qual )
359
360 ENDIF
361
362END SUBROUTINE ropp_io_l2btype_l2btype
363
364!-------------------------------------------------------------------------------
365! 8. L2btype (assignment)
366!-------------------------------------------------------------------------------
367
368SUBROUTINE ropp_io_assign_l2btype(to_var, from_var)
369
370! 8.1 Declarations
371! ----------------
372
373 USE ropp_utils
374 USE ropp_io, not_this => ropp_io_assign_l2btype
375 USE ropp_io_types, ONLY: L2btype
376
377 IMPLICIT NONE
378
379 TYPE(L2btype), INTENT(in) :: from_var
380 TYPE(L2btype), INTENT(inout) :: to_var
381
382! 8.2 Copy contents
383! -----------------
384
385 to_var%Npoints = from_var%Npoints
386
387 to_var%Missing = from_var%Missing
388
389 IF ( to_var%Npoints > 0 ) THEN
390
391 CALL copy_alloc( from_var%geop(1:from_var % Npoints) , to_var%geop )
392 CALL copy_alloc( from_var%geop_sigma(1:from_var % Npoints) , to_var%geop_sigma )
393 CALL copy_alloc( from_var%press(1:from_var % Npoints) , to_var%press )
394 CALL copy_alloc( from_var%press_sigma(1:from_var % Npoints) , to_var%press_sigma )
395 CALL copy_alloc( from_var%temp(1:from_var % Npoints) , to_var%temp )
396 CALL copy_alloc( from_var%temp_sigma(1:from_var % Npoints) , to_var%temp_sigma )
397 CALL copy_alloc( from_var%shum(1:from_var % Npoints) , to_var%shum )
398 CALL copy_alloc( from_var%shum_sigma(1:from_var % Npoints) , to_var%shum_sigma )
399 CALL copy_alloc( from_var%meteo_qual(1:from_var % Npoints) , to_var%meteo_qual )
400
401 ENDIF
402
403END SUBROUTINE ropp_io_assign_l2btype
404
405
406!-------------------------------------------------------------------------------
407! 9. L2ctype
408!-------------------------------------------------------------------------------
409
410SUBROUTINE ropp_io_l2ctype_l2ctype(from_var, to_var)
411
412! 9.1 Declarations
413! ----------------
414
415 USE ropp_utils
416 USE ropp_io, not_this => ropp_io_l2ctype_l2ctype
417 USE ropp_io_types, ONLY: L2ctype
418
419 IMPLICIT NONE
420
421 TYPE(L2ctype), INTENT(in) :: from_var
422 TYPE(L2ctype), INTENT(inout) :: to_var
423
424! 9.2 Copy contents
425! -----------------
426
427 to_var%Npoints = from_var%Npoints
428 to_var%Missing = from_var%Missing
429 to_var%geop_sfc = from_var%geop_sfc
430 to_var%press_sfc = from_var%press_sfc
431 to_var%press_sfc_sigma = from_var%press_sfc_sigma
432 to_var%press_sfc_qual = from_var%press_sfc_qual
433
434 to_var%Ne_max = from_var%Ne_max
435 to_var%Ne_max_sigma = from_var%Ne_max_sigma
436
437 to_var%H_peak = from_var%H_peak
438 to_var%H_peak_sigma = from_var%H_peak_sigma
439
440 to_var%H_width = from_var%H_width
441 to_var%H_width_sigma = from_var%H_width_sigma
442
443 to_var%tph_bangle = from_var%tph_bangle
444 to_var%tpa_bangle = from_var%tpa_bangle
445 to_var%tph_bangle_flag = from_var%tph_bangle_flag
446
447 to_var%tph_refrac = from_var%tph_refrac
448 to_var%tpn_refrac = from_var%tpn_refrac
449 to_var%tph_refrac_flag = from_var%tph_refrac_flag
450
451 to_var%tph_tdry_lrt = from_var%tph_tdry_lrt
452 to_var%tpt_tdry_lrt = from_var%tpt_tdry_lrt
453 to_var%tph_tdry_lrt_flag = from_var%tph_tdry_lrt_flag
454
455 to_var%tph_tdry_cpt = from_var%tph_tdry_cpt
456 to_var%tpt_tdry_cpt = from_var%tpt_tdry_cpt
457 to_var%tph_tdry_cpt_flag = from_var%tph_tdry_cpt_flag
458
459 to_var%prh_tdry_cpt = from_var%prh_tdry_cpt
460 to_var%prt_tdry_cpt = from_var%prt_tdry_cpt
461 to_var%prh_tdry_cpt_flag = from_var%prh_tdry_cpt_flag
462
463 to_var%tph_temp_lrt = from_var%tph_temp_lrt
464 to_var%tpt_temp_lrt = from_var%tpt_temp_lrt
465 to_var%tph_temp_lrt_flag = from_var%tph_temp_lrt_flag
466
467 to_var%tph_temp_cpt = from_var%tph_temp_cpt
468 to_var%tpt_temp_cpt = from_var%tpt_temp_cpt
469 to_var%tph_temp_cpt_flag = from_var%tph_temp_cpt_flag
470
471 to_var%prh_temp_cpt = from_var%prh_temp_cpt
472 to_var%prt_temp_cpt = from_var%prt_temp_cpt
473 to_var%prh_temp_cpt_flag = from_var%prh_temp_cpt_flag
474
475 to_var%pblh_bangle = from_var%pblh_bangle
476 to_var%pblh_bangle2 = from_var%pblh_bangle2
477 to_var%pbla_bangle = from_var%pbla_bangle
478 to_var%pbla_bangle2 = from_var%pbla_bangle2
479 to_var%pblh_bangle_flag = from_var%pblh_bangle_flag
480
481 to_var%pblh_refrac = from_var%pblh_refrac
482 to_var%pblh_refrac2 = from_var%pblh_refrac2
483 to_var%pbln_refrac = from_var%pbln_refrac
484 to_var%pbln_refrac2 = from_var%pbln_refrac2
485 to_var%pblh_refrac_flag = from_var%pblh_refrac_flag
486
487 to_var%pblh_tdry = from_var%pblh_tdry
488 to_var%pblh_tdry2 = from_var%pblh_tdry2
489 to_var%pblt_tdry = from_var%pblt_tdry
490 to_var%pblt_tdry2 = from_var%pblt_tdry2
491 to_var%pblh_tdry_flag = from_var%pblh_tdry_flag
492
493 to_var%pblh_temp = from_var%pblh_temp
494 to_var%pblh_temp2 = from_var%pblh_temp2
495 to_var%pblt_temp = from_var%pblt_temp
496 to_var%pblt_temp2 = from_var%pblt_temp2
497 to_var%pblh_temp_flag = from_var%pblh_temp_flag
498
499 to_var%pblh_shum = from_var%pblh_shum
500 to_var%pblh_shum2 = from_var%pblh_shum2
501 to_var%pblq_shum = from_var%pblq_shum
502 to_var%pblq_shum2 = from_var%pblq_shum2
503 to_var%pblh_shum_flag = from_var%pblh_shum_flag
504
505 to_var%pblh_rhum = from_var%pblh_rhum
506 to_var%pblh_rhum2 = from_var%pblh_rhum2
507 to_var%pblr_rhum = from_var%pblr_rhum
508 to_var%pblr_rhum2 = from_var%pblr_rhum2
509 to_var%pblh_rhum_flag = from_var%pblh_rhum_flag
510
511END SUBROUTINE ropp_io_l2ctype_l2ctype
512
513!-------------------------------------------------------------------------------
514! 10. L2ctype (assignment)
515!-------------------------------------------------------------------------------
516
517SUBROUTINE ropp_io_assign_l2ctype(to_var, from_var)
518
519! 10.1 Declarations
520! ----------------
521
522 USE ropp_utils
523 USE ropp_io, not_this => ropp_io_assign_l2ctype
524 USE ropp_io_types, ONLY: L2ctype
525
526 IMPLICIT NONE
527
528 TYPE(L2ctype), INTENT(in) :: from_var
529 TYPE(L2ctype), INTENT(inout) :: to_var
530
531! 10.2 Copy contents
532! -----------------
533
534 to_var%Npoints = from_var%Npoints
535 to_var%Missing = from_var%Missing
536 to_var%geop_sfc = from_var%geop_sfc
537 to_var%press_sfc = from_var%press_sfc
538 to_var%press_sfc_sigma = from_var%press_sfc_sigma
539 to_var%press_sfc_qual = from_var%press_sfc_qual
540
541 to_var%Ne_max = from_var%Ne_max
542 to_var%Ne_max_sigma = from_var%Ne_max_sigma
543
544 to_var%H_peak = from_var%H_peak
545 to_var%H_peak_sigma = from_var%H_peak_sigma
546
547 to_var%H_width = from_var%H_width
548 to_var%H_width_sigma = from_var%H_width_sigma
549
550 to_var%tph_bangle = from_var%tph_bangle
551 to_var%tpa_bangle = from_var%tpa_bangle
552 to_var%tph_bangle_flag = from_var%tph_bangle_flag
553
554 to_var%tph_refrac = from_var%tph_refrac
555 to_var%tpn_refrac = from_var%tpn_refrac
556 to_var%tph_refrac_flag = from_var%tph_refrac_flag
557
558 to_var%tph_tdry_lrt = from_var%tph_tdry_lrt
559 to_var%tpt_tdry_lrt = from_var%tpt_tdry_lrt
560 to_var%tph_tdry_lrt_flag = from_var%tph_tdry_lrt_flag
561
562 to_var%tph_tdry_cpt = from_var%tph_tdry_cpt
563 to_var%tpt_tdry_cpt = from_var%tpt_tdry_cpt
564 to_var%tph_tdry_cpt_flag = from_var%tph_tdry_cpt_flag
565
566 to_var%prh_tdry_cpt = from_var%prh_tdry_cpt
567 to_var%prt_tdry_cpt = from_var%prt_tdry_cpt
568 to_var%prh_tdry_cpt_flag = from_var%prh_tdry_cpt_flag
569
570 to_var%tph_temp_lrt = from_var%tph_temp_lrt
571 to_var%tpt_temp_lrt = from_var%tpt_temp_lrt
572 to_var%tph_temp_lrt_flag = from_var%tph_temp_lrt_flag
573
574 to_var%tph_temp_cpt = from_var%tph_temp_cpt
575 to_var%tpt_temp_cpt = from_var%tpt_temp_cpt
576 to_var%tph_temp_cpt_flag = from_var%tph_temp_cpt_flag
577
578 to_var%prh_temp_cpt = from_var%prh_temp_cpt
579 to_var%prt_temp_cpt = from_var%prt_temp_cpt
580 to_var%prh_temp_cpt_flag = from_var%prh_temp_cpt_flag
581
582END SUBROUTINE ropp_io_assign_l2ctype
583
584
585!-------------------------------------------------------------------------------
586! 11. L2dtype
587!-------------------------------------------------------------------------------
588
589SUBROUTINE ropp_io_l2dtype_l2dtype(from_var, to_var)
590
591! 11.1 Declarations
592! ----------------
593
594 USE ropp_utils
595 USE ropp_io, not_this => ropp_io_l2dtype_l2dtype
596 USE ropp_io_types, ONLY: L2dtype
597
598 IMPLICIT NONE
599
600 TYPE(L2dtype), INTENT(in) :: from_var
601 TYPE(L2dtype), INTENT(inout) :: to_var
602
603! 11.2 Copy contents
604! ------------------
605
606 to_var%Npoints = from_var%Npoints
607
608 to_var%Missing = from_var%Missing
609
610 to_var%level_type = from_var%level_type
611
612 IF ( to_var%Npoints > 0 ) THEN
613
614 CALL copy_alloc( from_var%level_coeff_a(1:from_var % Npoints) , to_var%level_coeff_a )
615 CALL copy_alloc( from_var%level_coeff_b(1:from_var % Npoints) , to_var%level_coeff_b )
616
617 ENDIF
618
619END SUBROUTINE ropp_io_l2dtype_l2dtype
620
621!-------------------------------------------------------------------------------
622! 12. L2dtype (assignment)
623!-------------------------------------------------------------------------------
624
625SUBROUTINE ropp_io_assign_l2dtype(to_var, from_var)
626
627! 12.1 Declarations
628! ----------------
629
630 USE ropp_utils
631 USE ropp_io, not_this => ropp_io_assign_l2dtype
632 USE ropp_io_types, ONLY: L2dtype
633
634 IMPLICIT NONE
635
636 TYPE(L2dtype), INTENT(in) :: from_var
637 TYPE(L2dtype), INTENT(inout) :: to_var
638
639! 12.2 Copy contents
640! ------------------
641
642 to_var%Npoints = from_var%Npoints
643
644 to_var%Missing = from_var%Missing
645
646 to_var%level_type = from_var%level_type
647
648 IF ( to_var%Npoints > 0 ) THEN
649
650 CALL copy_alloc( from_var%level_coeff_a(1:from_var % Npoints) , to_var%level_coeff_a )
651 CALL copy_alloc( from_var%level_coeff_b(1:from_var % Npoints) , to_var%level_coeff_b )
652
653 ENDIF
654
655END SUBROUTINE ropp_io_assign_l2dtype
656
657!-------------------------------------------------------------------------------
658! 13. Joint RO data type
659!-------------------------------------------------------------------------------
660
661SUBROUTINE ropp_io_rotype_rotype(from_ROdata, to_ROdata)
662
663! 13.1 Declarations
664! ----------------
665
666 USE ropp_io, not_this => ropp_io_rotype_rotype
667 USE ropp_io_types, ONLY: ROprof
668
669 IMPLICIT NONE
670
671 TYPE(ROprof), INTENT(in) :: from_ROdata
672 TYPE(ROprof), INTENT(inout) :: to_ROdata
673
674! 13.2 Copy attributes
675! --------------------
676
677 to_ROdata%FmtVersion = from_ROdata%FmtVersion
678 to_ROdata%occ_id = from_ROdata%occ_id
679 to_ROdata%leo_id = from_ROdata%leo_id
680 to_ROdata%gns_id = from_ROdata%gns_id
681 to_ROdata%stn_id = from_ROdata%stn_id
682 to_ROdata%processing_centre = from_ROdata%processing_centre
683 to_ROdata%processing_software = from_ROdata%processing_software
684 to_ROdata%pod_method = from_ROdata%pod_method
685 to_ROdata%phase_method = from_ROdata%phase_method
686 to_ROdata%bangle_method = from_ROdata%bangle_method
687 to_ROdata%refrac_method = from_ROdata%refrac_method
688 to_ROdata%meteo_method = from_ROdata%meteo_method
689 to_ROdata%thin_method = from_ROdata%thin_method
690 to_ROdata%software_version = from_ROdata%software_version
691
692! 13.3 Copy time contents
693! -----------------------
694
695 to_ROdata%DTocc%Year = from_ROdata%DTocc%Year
696 to_ROdata%DTocc%Month = from_ROdata%DTocc%Month
697 to_ROdata%DTocc%Day = from_ROdata%DTocc%Day
698 to_ROdata%DTocc%Hour = from_ROdata%DTocc%Hour
699 to_ROdata%DTocc%Minute = from_ROdata%DTocc%Minute
700 to_ROdata%DTocc%Second = from_ROdata%DTocc%Second
701 to_ROdata%DTocc%Msec = from_ROdata%DTocc%Msec
702
703 to_ROdata%DTpro%Year = from_ROdata%DTpro%Year
704 to_ROdata%DTpro%Month = from_ROdata%DTpro%Month
705 to_ROdata%DTpro%Day = from_ROdata%DTpro%Day
706 to_ROdata%DTpro%Hour = from_ROdata%DTpro%Hour
707 to_ROdata%DTpro%Minute = from_ROdata%DTpro%Minute
708 to_ROdata%DTpro%Second = from_ROdata%DTpro%Second
709 to_ROdata%DTpro%Msec = from_ROdata%DTpro%Msec
710
711! 13.4 Copy PCD and quality
712! -------------------------
713
714 to_ROdata%PCD = from_ROdata%PCD
715 to_ROdata%overall_qual = from_ROdata%overall_qual
716
717! 13.5 Copy georeferencing
718! ------------------------
719
720 to_ROdata%GEOref%time_offset = from_ROdata%GEOref%time_offset
721 to_ROdata%GEOref%lat = from_ROdata%GEOref%lat
722 to_ROdata%GEOref%lon = from_ROdata%GEOref%lon
723 to_ROdata%GEOref%roc = from_ROdata%GEOref%roc
724 to_ROdata%GEOref%r_coc(1:3) = from_ROdata%GEOref%r_coc(1:3)
725 to_ROdata%GEOref%azimuth = from_ROdata%GEOref%azimuth
726 to_ROdata%GEOref%undulation = from_ROdata%GEOref%undulation
727
728! 13.6 Copy background info
729! -------------------------
730
731 to_ROdata%BG%source = from_ROdata%BG%source
732 to_ROdata%BG%year = from_ROdata%BG%year
733 to_ROdata%BG%month = from_ROdata%BG%month
734 to_ROdata%BG%day = from_ROdata%BG%day
735 to_ROdata%BG%hour = from_ROdata%BG%hour
736 to_ROdata%BG%minute = from_ROdata%BG%minute
737 to_ROdata%BG%fcperiod = from_ROdata%BG%fcperiod
738
739! 13.7 Level 1a profile
740! ---------------------
741
742 to_ROdata%Lev1a = from_ROdata%Lev1a
743
744! 13.8 Level 1b profile
745! ---------------------
746
747 to_ROdata%Lev1b = from_ROdata%Lev1b
748
749! 13.9 Level 2a profile
750! ---------------------
751
752 to_ROdata%Lev2a = from_ROdata%Lev2a
753
754! 13.10 Level 2b profile
755! ----------------------
756
757 to_ROdata%Lev2b = from_ROdata%Lev2b
758
759! 13.11 Level 2c profile
760! ----------------------
761
762 to_ROdata%Lev2c = from_ROdata%Lev2c
763
764! 13.12 Level 2d profile
765! ----------------------
766
767 to_ROdata%Lev2d = from_ROdata%Lev2d
768
769END SUBROUTINE ropp_io_rotype_rotype
770
771
772!-------------------------------------------------------------------------------
773! 14. Joint RO data type (assignment)
774!-------------------------------------------------------------------------------
775
776SUBROUTINE ropp_io_assign_rotype(to_ROdata, from_ROdata)
777
778! 14.1 Declarations
779! ----------------
780
781 USE ropp_io, not_this => ropp_io_assign_rotype
782 USE ropp_io_types, ONLY: ROprof
783
784 IMPLICIT NONE
785
786 TYPE(ROprof), INTENT(in) :: from_ROdata
787 TYPE(ROprof), INTENT(inout) :: to_ROdata
788
789! 14.2 Copy attributes
790! --------------------
791
792 to_ROdata%FmtVersion = from_ROdata%FmtVersion
793 to_ROdata%occ_id = from_ROdata%occ_id
794 to_ROdata%leo_id = from_ROdata%leo_id
795 to_ROdata%gns_id = from_ROdata%gns_id
796 to_ROdata%stn_id = from_ROdata%stn_id
797 to_ROdata%processing_centre = from_ROdata%processing_centre
798 to_ROdata%processing_software = from_ROdata%processing_software
799 to_ROdata%pod_method = from_ROdata%pod_method
800 to_ROdata%phase_method = from_ROdata%phase_method
801 to_ROdata%bangle_method = from_ROdata%bangle_method
802 to_ROdata%refrac_method = from_ROdata%refrac_method
803 to_ROdata%meteo_method = from_ROdata%meteo_method
804 to_ROdata%thin_method = from_ROdata%thin_method
805 to_ROdata%software_version = from_ROdata%software_version
806
807! 14.3 Copy time contents
808! -----------------------
809
810 to_ROdata%DTocc%Year = from_ROdata%DTocc%Year
811 to_ROdata%DTocc%Month = from_ROdata%DTocc%Month
812 to_ROdata%DTocc%Day = from_ROdata%DTocc%Day
813 to_ROdata%DTocc%Hour = from_ROdata%DTocc%Hour
814 to_ROdata%DTocc%Minute = from_ROdata%DTocc%Minute
815 to_ROdata%DTocc%Second = from_ROdata%DTocc%Second
816 to_ROdata%DTocc%Msec = from_ROdata%DTocc%Msec
817
818 to_ROdata%DTpro%Year = from_ROdata%DTpro%Year
819 to_ROdata%DTpro%Month = from_ROdata%DTpro%Month
820 to_ROdata%DTpro%Day = from_ROdata%DTpro%Day
821 to_ROdata%DTpro%Hour = from_ROdata%DTpro%Hour
822 to_ROdata%DTpro%Minute = from_ROdata%DTpro%Minute
823 to_ROdata%DTpro%Second = from_ROdata%DTpro%Second
824 to_ROdata%DTpro%Msec = from_ROdata%DTpro%Msec
825
826! 14.4 Copy PCD and quality
827! -------------------------
828
829 to_ROdata%PCD = from_ROdata%PCD
830 to_ROdata%overall_qual = from_ROdata%overall_qual
831
832! 14.5 Copy georeferencing
833! ------------------------
834
835 to_ROdata%GEOref%time_offset = from_ROdata%GEOref%time_offset
836 to_ROdata%GEOref%lat = from_ROdata%GEOref%lat
837 to_ROdata%GEOref%lon = from_ROdata%GEOref%lon
838 to_ROdata%GEOref%roc = from_ROdata%GEOref%roc
839 to_ROdata%GEOref%r_coc(1:3) = from_ROdata%GEOref%r_coc(1:3)
840 to_ROdata%GEOref%azimuth = from_ROdata%GEOref%azimuth
841 to_ROdata%GEOref%undulation = from_ROdata%GEOref%undulation
842
843! 14.6 Copy background info
844! -------------------------
845
846 to_ROdata%BG%source = from_ROdata%BG%source
847 to_ROdata%BG%year = from_ROdata%BG%year
848 to_ROdata%BG%month = from_ROdata%BG%month
849 to_ROdata%BG%day = from_ROdata%BG%day
850 to_ROdata%BG%hour = from_ROdata%BG%hour
851 to_ROdata%BG%minute = from_ROdata%BG%minute
852 to_ROdata%BG%fcperiod = from_ROdata%BG%fcperiod
853
854! 14.7 Level 1a profile
855! ---------------------
856
857 to_ROdata%Lev1a = from_ROdata%Lev1a
858
859! 14.8 Level 1b profile
860! ---------------------
861
862 to_ROdata%Lev1b = from_ROdata%Lev1b
863
864! 14.9 Level 2a profile
865! ---------------------
866
867 to_ROdata%Lev2a = from_ROdata%Lev2a
868
869! 15.10 Level 2b profile
870! ----------------------
871
872 to_ROdata%Lev2b = from_ROdata%Lev2b
873
874! 15.11 Level 2c profile
875! ----------------------
876
877 to_ROdata%Lev2c = from_ROdata%Lev2c
878
879! 15.12 Level 2d profile
880! ----------------------
881
882 to_ROdata%Lev2d = from_ROdata%Lev2d
883
884END SUBROUTINE ropp_io_assign_rotype
885
886