1 ! This file is AUTOGENERATED!!!!
2! Do not edit this file; edit m_wcml_stml.m4 and regenerate.
3!
4!
5module m_wcml_stml
6
7#ifndef DUMMYLIB
8  use FoX_wxml, only: xmlf_t
9  use FoX_wxml, only: xml_NewElement, xml_EndElement
10  use FoX_wxml, only: xml_AddCharacters, xml_AddAttribute
11
12! Fix for pgi, requires this explicitly:
13  use m_wxml_overloads
14
15  implicit none
16  private
17
18  integer, private, parameter ::  sp = selected_real_kind(6,30)
19  integer, private, parameter ::  dp = selected_real_kind(14,100)
20
21  interface stmAddValue
22     module procedure stmAddCmplxDpSca
23     module procedure stmAddCmplxSpSca
24     module procedure stmAddRealDpSca
25     module procedure stmAddRealSpSca
26     module procedure stmAddIntSca
27     module procedure stmAddLgSca
28     module procedure stmAddChSca
29
30     module procedure stmAddCmplxDpArr
31     module procedure stmAddCmplxSpArr
32     module procedure stmAddRealDpArr
33     module procedure stmAddRealSpArr
34     module procedure stmAddIntArr
35     module procedure stmAddLgArr
36     module procedure stmAddChArr
37
38     module procedure stmAddCmplxDpMat
39     module procedure stmAddCmplxSpMat
40     module procedure stmAddRealDpMat
41     module procedure stmAddRealSpMat
42     module procedure stmAddIntMat
43     module procedure stmAddLgMat
44     module procedure stmAddChMat
45
46  end interface stmAddValue
47
48  interface stmAddScalar
49     module procedure stmAddCmplxDpSca
50     module procedure stmAddCmplxSpSca
51     module procedure stmAddRealDpSca
52     module procedure stmAddRealSpSca
53     module procedure stmAddIntSca
54     module procedure stmAddLgSca
55     module procedure stmAddChSca
56
57  end interface stmAddScalar
58
59  interface stmAddArray
60     module procedure stmAddCmplxDpArr
61     module procedure stmAddCmplxSpArr
62     module procedure stmAddRealDpArr
63     module procedure stmAddRealSpArr
64     module procedure stmAddIntArr
65     module procedure stmAddLgArr
66     module procedure stmAddChArr
67
68  end interface stmAddArray
69
70  interface stmAddMatrix
71     module procedure stmAddCmplxDpMat
72     module procedure stmAddCmplxSpMat
73     module procedure stmAddRealDpMat
74     module procedure stmAddRealSpMat
75     module procedure stmAddIntMat
76     module procedure stmAddLgMat
77     module procedure stmAddChMat
78
79  end interface stmAddMatrix
80
81  public :: stmAddValue
82  public :: stmAddScalar
83  public :: stmAddArray
84  public :: stmAddMatrix
85
86contains
87
88  subroutine stmAddCmplxDpSca(xf, value, &
89id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
90, units, fmt)
91
92    type(xmlf_t), intent(inout) :: xf
93    complex(dp), intent(in)  :: value
94    character(len=*), intent(in), optional :: id
95    character(len=*), intent(in), optional :: title
96    character(len=*), intent(in), optional :: dictRef
97    character(len=*), intent(in), optional :: convention
98    character(len=*), intent(in), optional :: errorValue
99    character(len=*), intent(in), optional :: errorBasis
100    character(len=*), intent(in), optional :: min
101    character(len=*), intent(in), optional :: max
102    character(len=*), intent(in), optional :: ref
103
104    character(len=*), intent(in), optional :: units
105
106    character(len=*), intent(in), optional :: fmt
107    call xml_NewElement(xf, "scalar")
108    call xml_AddAttribute(xf, "dataType", "fpx:complex")
109
110
111    if (present(id)) call xml_addAttribute(xf, "id", id)
112    if (present(title)) call xml_addAttribute(xf, "title", title)
113    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
114    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
115    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
116    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
117    if (present(min)) call xml_addAttribute(xf, "min", min)
118    if (present(max)) call xml_addAttribute(xf, "max", max)
119    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
120
121    if (present(units)) call xml_addAttribute(xf, "units", units)
122
123    call xml_AddCharacters(xf, value, fmt)
124
125    call xml_EndElement(xf, "scalar")
126
127
128  end subroutine stmAddCmplxDpSca
129
130  subroutine stmAddCmplxSpSca(xf, value, &
131id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
132, units, fmt)
133
134    type(xmlf_t), intent(inout) :: xf
135    complex(sp), intent(in)  :: value
136    character(len=*), intent(in), optional :: id
137    character(len=*), intent(in), optional :: title
138    character(len=*), intent(in), optional :: dictRef
139    character(len=*), intent(in), optional :: convention
140    character(len=*), intent(in), optional :: errorValue
141    character(len=*), intent(in), optional :: errorBasis
142    character(len=*), intent(in), optional :: min
143    character(len=*), intent(in), optional :: max
144    character(len=*), intent(in), optional :: ref
145
146    character(len=*), intent(in), optional :: units
147
148    character(len=*), intent(in), optional :: fmt
149    call xml_NewElement(xf, "scalar")
150    call xml_AddAttribute(xf, "dataType", "fpx:complex")
151
152
153    if (present(id)) call xml_addAttribute(xf, "id", id)
154    if (present(title)) call xml_addAttribute(xf, "title", title)
155    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
156    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
157    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
158    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
159    if (present(min)) call xml_addAttribute(xf, "min", min)
160    if (present(max)) call xml_addAttribute(xf, "max", max)
161    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
162
163    if (present(units)) call xml_addAttribute(xf, "units", units)
164
165    call xml_AddCharacters(xf, value, fmt)
166
167    call xml_EndElement(xf, "scalar")
168
169
170  end subroutine stmAddCmplxSpSca
171
172  subroutine stmAddRealDpSca(xf, value, &
173id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
174, units, fmt)
175
176    type(xmlf_t), intent(inout) :: xf
177    real(dp), intent(in)  :: value
178    character(len=*), intent(in), optional :: id
179    character(len=*), intent(in), optional :: title
180    character(len=*), intent(in), optional :: dictRef
181    character(len=*), intent(in), optional :: convention
182    character(len=*), intent(in), optional :: errorValue
183    character(len=*), intent(in), optional :: errorBasis
184    character(len=*), intent(in), optional :: min
185    character(len=*), intent(in), optional :: max
186    character(len=*), intent(in), optional :: ref
187
188    character(len=*), intent(in), optional :: units
189
190    character(len=*), intent(in), optional :: fmt
191    call xml_NewElement(xf, "scalar")
192    call xml_AddAttribute(xf, "dataType", "fpx:real")
193
194
195    if (present(id)) call xml_addAttribute(xf, "id", id)
196    if (present(title)) call xml_addAttribute(xf, "title", title)
197    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
198    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
199    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
200    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
201    if (present(min)) call xml_addAttribute(xf, "min", min)
202    if (present(max)) call xml_addAttribute(xf, "max", max)
203    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
204
205    if (present(units)) call xml_addAttribute(xf, "units", units)
206
207    call xml_AddCharacters(xf, value, fmt)
208
209    call xml_EndElement(xf, "scalar")
210
211
212  end subroutine stmAddRealDpSca
213
214  subroutine stmAddRealSpSca(xf, value, &
215id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
216, units, fmt)
217
218    type(xmlf_t), intent(inout) :: xf
219    real(sp), intent(in)  :: value
220    character(len=*), intent(in), optional :: id
221    character(len=*), intent(in), optional :: title
222    character(len=*), intent(in), optional :: dictRef
223    character(len=*), intent(in), optional :: convention
224    character(len=*), intent(in), optional :: errorValue
225    character(len=*), intent(in), optional :: errorBasis
226    character(len=*), intent(in), optional :: min
227    character(len=*), intent(in), optional :: max
228    character(len=*), intent(in), optional :: ref
229
230    character(len=*), intent(in), optional :: units
231
232    character(len=*), intent(in), optional :: fmt
233    call xml_NewElement(xf, "scalar")
234    call xml_AddAttribute(xf, "dataType", "fpx:real")
235
236
237    if (present(id)) call xml_addAttribute(xf, "id", id)
238    if (present(title)) call xml_addAttribute(xf, "title", title)
239    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
240    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
241    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
242    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
243    if (present(min)) call xml_addAttribute(xf, "min", min)
244    if (present(max)) call xml_addAttribute(xf, "max", max)
245    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
246
247    if (present(units)) call xml_addAttribute(xf, "units", units)
248
249    call xml_AddCharacters(xf, value, fmt)
250
251    call xml_EndElement(xf, "scalar")
252
253
254  end subroutine stmAddRealSpSca
255
256  subroutine stmAddIntSca(xf, value, &
257id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
258, units)
259
260    type(xmlf_t), intent(inout) :: xf
261    integer, intent(in)  :: value
262    character(len=*), intent(in), optional :: id
263    character(len=*), intent(in), optional :: title
264    character(len=*), intent(in), optional :: dictRef
265    character(len=*), intent(in), optional :: convention
266    character(len=*), intent(in), optional :: errorValue
267    character(len=*), intent(in), optional :: errorBasis
268    character(len=*), intent(in), optional :: min
269    character(len=*), intent(in), optional :: max
270    character(len=*), intent(in), optional :: ref
271
272    character(len=*), intent(in), optional :: units
273
274    call xml_NewElement(xf, "scalar")
275    call xml_AddAttribute(xf, "dataType", "xsd:integer")
276
277
278    if (present(id)) call xml_addAttribute(xf, "id", id)
279    if (present(title)) call xml_addAttribute(xf, "title", title)
280    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
281    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
282    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
283    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
284    if (present(min)) call xml_addAttribute(xf, "min", min)
285    if (present(max)) call xml_addAttribute(xf, "max", max)
286    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
287
288    if (present(units)) call xml_addAttribute(xf, "units", units)
289
290    call xml_AddCharacters(xf, value)
291
292    call xml_EndElement(xf, "scalar")
293
294
295  end subroutine stmAddIntSca
296
297  subroutine stmAddLgSca(xf, value, &
298id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
299)
300
301    type(xmlf_t), intent(inout) :: xf
302    logical, intent(in)  :: value
303    character(len=*), intent(in), optional :: id
304    character(len=*), intent(in), optional :: title
305    character(len=*), intent(in), optional :: dictRef
306    character(len=*), intent(in), optional :: convention
307    character(len=*), intent(in), optional :: errorValue
308    character(len=*), intent(in), optional :: errorBasis
309    character(len=*), intent(in), optional :: min
310    character(len=*), intent(in), optional :: max
311    character(len=*), intent(in), optional :: ref
312
313    call xml_NewElement(xf, "scalar")
314    call xml_AddAttribute(xf, "dataType", "xsd:boolean")
315
316
317    if (present(id)) call xml_addAttribute(xf, "id", id)
318    if (present(title)) call xml_addAttribute(xf, "title", title)
319    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
320    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
321    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
322    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
323    if (present(min)) call xml_addAttribute(xf, "min", min)
324    if (present(max)) call xml_addAttribute(xf, "max", max)
325    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
326
327    call xml_AddCharacters(xf, value)
328
329    call xml_EndElement(xf, "scalar")
330
331
332  end subroutine stmAddLgSca
333
334  subroutine stmAddChSca(xf, value, &
335id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
336, units, dataType )
337
338    type(xmlf_t), intent(inout) :: xf
339    character(len=*), intent(in)  :: value
340    character(len=*), intent(in), optional :: id
341    character(len=*), intent(in), optional :: title
342    character(len=*), intent(in), optional :: dictRef
343    character(len=*), intent(in), optional :: convention
344    character(len=*), intent(in), optional :: errorValue
345    character(len=*), intent(in), optional :: errorBasis
346    character(len=*), intent(in), optional :: min
347    character(len=*), intent(in), optional :: max
348    character(len=*), intent(in), optional :: ref
349
350    character(len=*), intent(in), optional :: units
351
352    character(len=*), intent(in), optional :: dataType
353
354    call xml_NewElement(xf, "scalar")
355    if (present(dataType)) then
356      call xml_addAttribute(xf, "dataType", dataType)
357    else
358    call xml_AddAttribute(xf, "dataType", "xsd:string")
359    endif
360
361    if (present(id)) call xml_addAttribute(xf, "id", id)
362    if (present(title)) call xml_addAttribute(xf, "title", title)
363    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
364    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
365    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
366    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
367    if (present(min)) call xml_addAttribute(xf, "min", min)
368    if (present(max)) call xml_addAttribute(xf, "max", max)
369    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
370
371    if (present(units)) call xml_addAttribute(xf, "units", units)
372
373    call xml_AddCharacters(xf, value)
374
375    call xml_EndElement(xf, "scalar")
376
377
378  end subroutine stmAddChSca
379
380
381  subroutine stmAddCmplxDpArr(xf, value, &
382id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
383, units, fmt)
384
385    type(xmlf_t), intent(inout) :: xf
386    complex(dp), intent(in) , dimension(:) :: value
387    character(len=*), intent(in), optional :: id
388    character(len=*), intent(in), optional :: title
389    character(len=*), intent(in), optional :: dictRef
390    character(len=*), intent(in), optional :: convention
391    character(len=*), intent(in), optional :: errorValue
392    character(len=*), intent(in), optional :: errorBasis
393    character(len=*), intent(in), optional :: min
394    character(len=*), intent(in), optional :: max
395    character(len=*), intent(in), optional :: ref
396
397    character(len=*), intent(in), optional :: units
398
399    character(len=*), intent(in), optional :: fmt
400    call xml_NewElement(xf, "array")
401    call xml_AddAttribute(xf, "size", size(value))
402    call xml_AddAttribute(xf, "dataType", "fpx:complex")
403
404
405    if (present(id)) call xml_addAttribute(xf, "id", id)
406    if (present(title)) call xml_addAttribute(xf, "title", title)
407    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
408    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
409    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
410    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
411    if (present(min)) call xml_addAttribute(xf, "min", min)
412    if (present(max)) call xml_addAttribute(xf, "max", max)
413    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
414
415    if (present(units)) call xml_addAttribute(xf, "units", units)
416
417    call xml_AddCharacters(xf, value, fmt)
418
419    call xml_EndElement(xf, "array")
420
421
422  end subroutine stmAddCmplxDpArr
423
424  subroutine stmAddCmplxSpArr(xf, value, &
425id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
426, units, fmt)
427
428    type(xmlf_t), intent(inout) :: xf
429    complex(sp), intent(in) , dimension(:) :: value
430    character(len=*), intent(in), optional :: id
431    character(len=*), intent(in), optional :: title
432    character(len=*), intent(in), optional :: dictRef
433    character(len=*), intent(in), optional :: convention
434    character(len=*), intent(in), optional :: errorValue
435    character(len=*), intent(in), optional :: errorBasis
436    character(len=*), intent(in), optional :: min
437    character(len=*), intent(in), optional :: max
438    character(len=*), intent(in), optional :: ref
439
440    character(len=*), intent(in), optional :: units
441
442    character(len=*), intent(in), optional :: fmt
443    call xml_NewElement(xf, "array")
444    call xml_AddAttribute(xf, "size", size(value))
445    call xml_AddAttribute(xf, "dataType", "fpx:complex")
446
447
448    if (present(id)) call xml_addAttribute(xf, "id", id)
449    if (present(title)) call xml_addAttribute(xf, "title", title)
450    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
451    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
452    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
453    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
454    if (present(min)) call xml_addAttribute(xf, "min", min)
455    if (present(max)) call xml_addAttribute(xf, "max", max)
456    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
457
458    if (present(units)) call xml_addAttribute(xf, "units", units)
459
460    call xml_AddCharacters(xf, value, fmt)
461
462    call xml_EndElement(xf, "array")
463
464
465  end subroutine stmAddCmplxSpArr
466
467  subroutine stmAddRealDpArr(xf, value, &
468id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
469, units, fmt)
470
471    type(xmlf_t), intent(inout) :: xf
472    real(dp), intent(in) , dimension(:) :: value
473    character(len=*), intent(in), optional :: id
474    character(len=*), intent(in), optional :: title
475    character(len=*), intent(in), optional :: dictRef
476    character(len=*), intent(in), optional :: convention
477    character(len=*), intent(in), optional :: errorValue
478    character(len=*), intent(in), optional :: errorBasis
479    character(len=*), intent(in), optional :: min
480    character(len=*), intent(in), optional :: max
481    character(len=*), intent(in), optional :: ref
482
483    character(len=*), intent(in), optional :: units
484
485    character(len=*), intent(in), optional :: fmt
486    call xml_NewElement(xf, "array")
487    call xml_AddAttribute(xf, "size", size(value))
488    call xml_AddAttribute(xf, "dataType", "fpx:real")
489
490
491    if (present(id)) call xml_addAttribute(xf, "id", id)
492    if (present(title)) call xml_addAttribute(xf, "title", title)
493    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
494    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
495    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
496    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
497    if (present(min)) call xml_addAttribute(xf, "min", min)
498    if (present(max)) call xml_addAttribute(xf, "max", max)
499    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
500
501    if (present(units)) call xml_addAttribute(xf, "units", units)
502
503    call xml_AddCharacters(xf, value, fmt)
504
505    call xml_EndElement(xf, "array")
506
507
508  end subroutine stmAddRealDpArr
509
510  subroutine stmAddRealSpArr(xf, value, &
511id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
512, units, fmt)
513
514    type(xmlf_t), intent(inout) :: xf
515    real(sp), intent(in) , dimension(:) :: value
516    character(len=*), intent(in), optional :: id
517    character(len=*), intent(in), optional :: title
518    character(len=*), intent(in), optional :: dictRef
519    character(len=*), intent(in), optional :: convention
520    character(len=*), intent(in), optional :: errorValue
521    character(len=*), intent(in), optional :: errorBasis
522    character(len=*), intent(in), optional :: min
523    character(len=*), intent(in), optional :: max
524    character(len=*), intent(in), optional :: ref
525
526    character(len=*), intent(in), optional :: units
527
528    character(len=*), intent(in), optional :: fmt
529    call xml_NewElement(xf, "array")
530    call xml_AddAttribute(xf, "size", size(value))
531    call xml_AddAttribute(xf, "dataType", "fpx:real")
532
533
534    if (present(id)) call xml_addAttribute(xf, "id", id)
535    if (present(title)) call xml_addAttribute(xf, "title", title)
536    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
537    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
538    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
539    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
540    if (present(min)) call xml_addAttribute(xf, "min", min)
541    if (present(max)) call xml_addAttribute(xf, "max", max)
542    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
543
544    if (present(units)) call xml_addAttribute(xf, "units", units)
545
546    call xml_AddCharacters(xf, value, fmt)
547
548    call xml_EndElement(xf, "array")
549
550
551  end subroutine stmAddRealSpArr
552
553  subroutine stmAddIntArr(xf, value, &
554id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
555, units)
556
557    type(xmlf_t), intent(inout) :: xf
558    integer, intent(in) , dimension(:) :: value
559    character(len=*), intent(in), optional :: id
560    character(len=*), intent(in), optional :: title
561    character(len=*), intent(in), optional :: dictRef
562    character(len=*), intent(in), optional :: convention
563    character(len=*), intent(in), optional :: errorValue
564    character(len=*), intent(in), optional :: errorBasis
565    character(len=*), intent(in), optional :: min
566    character(len=*), intent(in), optional :: max
567    character(len=*), intent(in), optional :: ref
568
569    character(len=*), intent(in), optional :: units
570
571    call xml_NewElement(xf, "array")
572    call xml_AddAttribute(xf, "size", size(value))
573    call xml_AddAttribute(xf, "dataType", "xsd:integer")
574
575
576    if (present(id)) call xml_addAttribute(xf, "id", id)
577    if (present(title)) call xml_addAttribute(xf, "title", title)
578    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
579    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
580    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
581    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
582    if (present(min)) call xml_addAttribute(xf, "min", min)
583    if (present(max)) call xml_addAttribute(xf, "max", max)
584    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
585
586    if (present(units)) call xml_addAttribute(xf, "units", units)
587
588    call xml_AddCharacters(xf, value)
589
590    call xml_EndElement(xf, "array")
591
592
593  end subroutine stmAddIntArr
594
595  subroutine stmAddLgArr(xf, value, &
596id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
597)
598
599    type(xmlf_t), intent(inout) :: xf
600    logical, intent(in) , dimension(:) :: value
601    character(len=*), intent(in), optional :: id
602    character(len=*), intent(in), optional :: title
603    character(len=*), intent(in), optional :: dictRef
604    character(len=*), intent(in), optional :: convention
605    character(len=*), intent(in), optional :: errorValue
606    character(len=*), intent(in), optional :: errorBasis
607    character(len=*), intent(in), optional :: min
608    character(len=*), intent(in), optional :: max
609    character(len=*), intent(in), optional :: ref
610
611    call xml_NewElement(xf, "array")
612    call xml_AddAttribute(xf, "size", size(value))
613    call xml_AddAttribute(xf, "dataType", "xsd:boolean")
614
615
616    if (present(id)) call xml_addAttribute(xf, "id", id)
617    if (present(title)) call xml_addAttribute(xf, "title", title)
618    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
619    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
620    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
621    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
622    if (present(min)) call xml_addAttribute(xf, "min", min)
623    if (present(max)) call xml_addAttribute(xf, "max", max)
624    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
625
626    call xml_AddCharacters(xf, value)
627
628    call xml_EndElement(xf, "array")
629
630
631  end subroutine stmAddLgArr
632
633  subroutine stmAddChArr(xf, value, &
634id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
635, units, dataType , delimiter)
636
637    type(xmlf_t), intent(inout) :: xf
638    character(len=*), intent(in) , dimension(:) :: value
639    character(len=*), intent(in), optional :: id
640    character(len=*), intent(in), optional :: title
641    character(len=*), intent(in), optional :: dictRef
642    character(len=*), intent(in), optional :: convention
643    character(len=*), intent(in), optional :: errorValue
644    character(len=*), intent(in), optional :: errorBasis
645    character(len=*), intent(in), optional :: min
646    character(len=*), intent(in), optional :: max
647    character(len=*), intent(in), optional :: ref
648
649    character(len=*), intent(in), optional :: units
650
651    character(len=*), intent(in), optional :: dataType
652
653    character(len=1), intent(in), optional :: delimiter
654    call xml_NewElement(xf, "array")
655    call xml_AddAttribute(xf, "size", size(value))
656    if (present(delimiter)) then
657      call xml_AddAttribute(xf, "delimiter", delimiter)
658    else
659      call xml_AddAttribute(xf, "delimiter", " ")
660    endif
661    if (present(dataType)) then
662      call xml_addAttribute(xf, "dataType", dataType)
663    else
664    call xml_AddAttribute(xf, "dataType", "xsd:string")
665    endif
666
667    if (present(id)) call xml_addAttribute(xf, "id", id)
668    if (present(title)) call xml_addAttribute(xf, "title", title)
669    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
670    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
671    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
672    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
673    if (present(min)) call xml_addAttribute(xf, "min", min)
674    if (present(max)) call xml_addAttribute(xf, "max", max)
675    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
676
677    if (present(units)) call xml_addAttribute(xf, "units", units)
678
679    call xml_AddCharacters(xf, value, delimiter)
680
681    call xml_EndElement(xf, "array")
682
683
684  end subroutine stmAddChArr
685
686
687  subroutine stmAddCmplxDpMat(xf, value, &
688id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
689, units, fmt)
690
691    type(xmlf_t), intent(inout) :: xf
692    complex(dp), intent(in) , dimension(:,:) :: value
693    character(len=*), intent(in), optional :: id
694    character(len=*), intent(in), optional :: title
695    character(len=*), intent(in), optional :: dictRef
696    character(len=*), intent(in), optional :: convention
697    character(len=*), intent(in), optional :: errorValue
698    character(len=*), intent(in), optional :: errorBasis
699    character(len=*), intent(in), optional :: min
700    character(len=*), intent(in), optional :: max
701    character(len=*), intent(in), optional :: ref
702
703    character(len=*), intent(in), optional :: units
704
705    character(len=*), intent(in), optional :: fmt
706    call xml_NewElement(xf, "matrix")
707    call xml_AddAttribute(xf, "rows", size(value,1))
708    call xml_AddAttribute(xf, "columns", size(value,2))
709    call xml_AddAttribute(xf, "dataType", "fpx:complex")
710
711
712    if (present(id)) call xml_addAttribute(xf, "id", id)
713    if (present(title)) call xml_addAttribute(xf, "title", title)
714    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
715    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
716    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
717    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
718    if (present(min)) call xml_addAttribute(xf, "min", min)
719    if (present(max)) call xml_addAttribute(xf, "max", max)
720    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
721
722    if (present(units)) call xml_addAttribute(xf, "units", units)
723
724    call xml_AddCharacters(xf, value, fmt)
725
726    call xml_EndElement(xf, "matrix")
727
728
729  end subroutine stmAddCmplxDpMat
730
731  subroutine stmAddCmplxSpMat(xf, value, &
732id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
733, units, fmt)
734
735    type(xmlf_t), intent(inout) :: xf
736    complex(sp), intent(in) , dimension(:,:) :: value
737    character(len=*), intent(in), optional :: id
738    character(len=*), intent(in), optional :: title
739    character(len=*), intent(in), optional :: dictRef
740    character(len=*), intent(in), optional :: convention
741    character(len=*), intent(in), optional :: errorValue
742    character(len=*), intent(in), optional :: errorBasis
743    character(len=*), intent(in), optional :: min
744    character(len=*), intent(in), optional :: max
745    character(len=*), intent(in), optional :: ref
746
747    character(len=*), intent(in), optional :: units
748
749    character(len=*), intent(in), optional :: fmt
750    call xml_NewElement(xf, "matrix")
751    call xml_AddAttribute(xf, "rows", size(value,1))
752    call xml_AddAttribute(xf, "columns", size(value,2))
753    call xml_AddAttribute(xf, "dataType", "fpx:complex")
754
755
756    if (present(id)) call xml_addAttribute(xf, "id", id)
757    if (present(title)) call xml_addAttribute(xf, "title", title)
758    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
759    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
760    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
761    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
762    if (present(min)) call xml_addAttribute(xf, "min", min)
763    if (present(max)) call xml_addAttribute(xf, "max", max)
764    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
765
766    if (present(units)) call xml_addAttribute(xf, "units", units)
767
768    call xml_AddCharacters(xf, value, fmt)
769
770    call xml_EndElement(xf, "matrix")
771
772
773  end subroutine stmAddCmplxSpMat
774
775  subroutine stmAddRealDpMat(xf, value, &
776id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
777, units, fmt)
778
779    type(xmlf_t), intent(inout) :: xf
780    real(dp), intent(in) , dimension(:,:) :: value
781    character(len=*), intent(in), optional :: id
782    character(len=*), intent(in), optional :: title
783    character(len=*), intent(in), optional :: dictRef
784    character(len=*), intent(in), optional :: convention
785    character(len=*), intent(in), optional :: errorValue
786    character(len=*), intent(in), optional :: errorBasis
787    character(len=*), intent(in), optional :: min
788    character(len=*), intent(in), optional :: max
789    character(len=*), intent(in), optional :: ref
790
791    character(len=*), intent(in), optional :: units
792
793    character(len=*), intent(in), optional :: fmt
794    call xml_NewElement(xf, "matrix")
795    call xml_AddAttribute(xf, "rows", size(value,1))
796    call xml_AddAttribute(xf, "columns", size(value,2))
797    call xml_AddAttribute(xf, "dataType", "fpx:real")
798
799
800    if (present(id)) call xml_addAttribute(xf, "id", id)
801    if (present(title)) call xml_addAttribute(xf, "title", title)
802    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
803    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
804    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
805    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
806    if (present(min)) call xml_addAttribute(xf, "min", min)
807    if (present(max)) call xml_addAttribute(xf, "max", max)
808    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
809
810    if (present(units)) call xml_addAttribute(xf, "units", units)
811
812    call xml_AddCharacters(xf, value, fmt)
813
814    call xml_EndElement(xf, "matrix")
815
816
817  end subroutine stmAddRealDpMat
818
819  subroutine stmAddRealSpMat(xf, value, &
820id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
821, units, fmt)
822
823    type(xmlf_t), intent(inout) :: xf
824    real(sp), intent(in) , dimension(:,:) :: value
825    character(len=*), intent(in), optional :: id
826    character(len=*), intent(in), optional :: title
827    character(len=*), intent(in), optional :: dictRef
828    character(len=*), intent(in), optional :: convention
829    character(len=*), intent(in), optional :: errorValue
830    character(len=*), intent(in), optional :: errorBasis
831    character(len=*), intent(in), optional :: min
832    character(len=*), intent(in), optional :: max
833    character(len=*), intent(in), optional :: ref
834
835    character(len=*), intent(in), optional :: units
836
837    character(len=*), intent(in), optional :: fmt
838    call xml_NewElement(xf, "matrix")
839    call xml_AddAttribute(xf, "rows", size(value,1))
840    call xml_AddAttribute(xf, "columns", size(value,2))
841    call xml_AddAttribute(xf, "dataType", "fpx:real")
842
843
844    if (present(id)) call xml_addAttribute(xf, "id", id)
845    if (present(title)) call xml_addAttribute(xf, "title", title)
846    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
847    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
848    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
849    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
850    if (present(min)) call xml_addAttribute(xf, "min", min)
851    if (present(max)) call xml_addAttribute(xf, "max", max)
852    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
853
854    if (present(units)) call xml_addAttribute(xf, "units", units)
855
856    call xml_AddCharacters(xf, value, fmt)
857
858    call xml_EndElement(xf, "matrix")
859
860
861  end subroutine stmAddRealSpMat
862
863  subroutine stmAddIntMat(xf, value, &
864id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
865, units)
866
867    type(xmlf_t), intent(inout) :: xf
868    integer, intent(in) , dimension(:,:) :: value
869    character(len=*), intent(in), optional :: id
870    character(len=*), intent(in), optional :: title
871    character(len=*), intent(in), optional :: dictRef
872    character(len=*), intent(in), optional :: convention
873    character(len=*), intent(in), optional :: errorValue
874    character(len=*), intent(in), optional :: errorBasis
875    character(len=*), intent(in), optional :: min
876    character(len=*), intent(in), optional :: max
877    character(len=*), intent(in), optional :: ref
878
879    character(len=*), intent(in), optional :: units
880
881    call xml_NewElement(xf, "matrix")
882    call xml_AddAttribute(xf, "rows", size(value,1))
883    call xml_AddAttribute(xf, "columns", size(value,2))
884    call xml_AddAttribute(xf, "dataType", "xsd:integer")
885
886
887    if (present(id)) call xml_addAttribute(xf, "id", id)
888    if (present(title)) call xml_addAttribute(xf, "title", title)
889    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
890    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
891    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
892    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
893    if (present(min)) call xml_addAttribute(xf, "min", min)
894    if (present(max)) call xml_addAttribute(xf, "max", max)
895    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
896
897    if (present(units)) call xml_addAttribute(xf, "units", units)
898
899    call xml_AddCharacters(xf, value)
900
901    call xml_EndElement(xf, "matrix")
902
903
904  end subroutine stmAddIntMat
905
906  subroutine stmAddLgMat(xf, value, &
907id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
908)
909
910    type(xmlf_t), intent(inout) :: xf
911    logical, intent(in) , dimension(:,:) :: value
912    character(len=*), intent(in), optional :: id
913    character(len=*), intent(in), optional :: title
914    character(len=*), intent(in), optional :: dictRef
915    character(len=*), intent(in), optional :: convention
916    character(len=*), intent(in), optional :: errorValue
917    character(len=*), intent(in), optional :: errorBasis
918    character(len=*), intent(in), optional :: min
919    character(len=*), intent(in), optional :: max
920    character(len=*), intent(in), optional :: ref
921
922    call xml_NewElement(xf, "matrix")
923    call xml_AddAttribute(xf, "rows", size(value,1))
924    call xml_AddAttribute(xf, "columns", size(value,2))
925    call xml_AddAttribute(xf, "dataType", "xsd:boolean")
926
927
928    if (present(id)) call xml_addAttribute(xf, "id", id)
929    if (present(title)) call xml_addAttribute(xf, "title", title)
930    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
931    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
932    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
933    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
934    if (present(min)) call xml_addAttribute(xf, "min", min)
935    if (present(max)) call xml_addAttribute(xf, "max", max)
936    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
937
938    call xml_AddCharacters(xf, value)
939
940    call xml_EndElement(xf, "matrix")
941
942
943  end subroutine stmAddLgMat
944
945  subroutine stmAddChMat(xf, value, &
946id, title, dictRef, convention, errorValue, errorBasis, min, max, ref &
947, units, dataType , delimiter)
948
949    type(xmlf_t), intent(inout) :: xf
950    character(len=*), intent(in) , dimension(:,:) :: value
951    character(len=*), intent(in), optional :: id
952    character(len=*), intent(in), optional :: title
953    character(len=*), intent(in), optional :: dictRef
954    character(len=*), intent(in), optional :: convention
955    character(len=*), intent(in), optional :: errorValue
956    character(len=*), intent(in), optional :: errorBasis
957    character(len=*), intent(in), optional :: min
958    character(len=*), intent(in), optional :: max
959    character(len=*), intent(in), optional :: ref
960
961    character(len=*), intent(in), optional :: units
962
963    character(len=*), intent(in), optional :: dataType
964
965    character(len=1), intent(in), optional :: delimiter
966    call xml_NewElement(xf, "matrix")
967    call xml_AddAttribute(xf, "rows", size(value,1))
968    call xml_AddAttribute(xf, "columns", size(value,2))
969    if (present(delimiter)) then
970      call xml_AddAttribute(xf, "delimiter", delimiter)
971    else
972      call xml_AddAttribute(xf, "delimiter", " ")
973    endif
974    if (present(dataType)) then
975      call xml_addAttribute(xf, "dataType", dataType)
976    else
977    call xml_AddAttribute(xf, "dataType", "xsd:string")
978    endif
979
980    if (present(id)) call xml_addAttribute(xf, "id", id)
981    if (present(title)) call xml_addAttribute(xf, "title", title)
982    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
983    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
984    if (present(errorValue)) call xml_addAttribute(xf, "errorValue", errorValue)
985    if (present(errorBasis)) call xml_addAttribute(xf, "errorBasis", errorBasis)
986    if (present(min)) call xml_addAttribute(xf, "min", min)
987    if (present(max)) call xml_addAttribute(xf, "max", max)
988    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
989
990    if (present(units)) call xml_addAttribute(xf, "units", units)
991
992    call xml_AddCharacters(xf, value, delimiter)
993
994    call xml_EndElement(xf, "matrix")
995
996
997  end subroutine stmAddChMat
998
999
1000#endif
1001end module m_wcml_stml
1002