source: XIOS/trunk/doc/XIOS_reference_guide.lyx @ 1171

Last change on this file since 1171 was 1084, checked in by mhnguyen, 8 years ago

Update user guide and reference guide

File size: 125.3 KB
Line 
1#LyX 2.2 created this file. For more info see http://www.lyx.org/
2\lyxformat 508
3\begin_document
4\begin_header
5\save_transient_properties true
6\origin unavailable
7\textclass book
8\use_default_options true
9\begin_modules
10logicalmkup
11\end_modules
12\maintain_unincluded_children false
13\language english
14\language_package default
15\inputencoding auto
16\fontencoding global
17\font_roman "default" "default"
18\font_sans "default" "default"
19\font_typewriter "default" "default"
20\font_math "auto" "auto"
21\font_default_family default
22\use_non_tex_fonts false
23\font_sc false
24\font_osf false
25\font_sf_scale 100 100
26\font_tt_scale 100 100
27\graphics default
28\default_output_format default
29\output_sync 0
30\bibtex_command default
31\index_command default
32\paperfontsize default
33\spacing single
34\use_hyperref false
35\papersize a4paper
36\use_geometry false
37\use_package amsmath 1
38\use_package amssymb 1
39\use_package cancel 1
40\use_package esint 1
41\use_package mathdots 1
42\use_package mathtools 1
43\use_package mhchem 1
44\use_package stackrel 1
45\use_package stmaryrd 1
46\use_package undertilde 1
47\cite_engine basic
48\cite_engine_type default
49\biblio_style plain
50\use_bibtopic false
51\use_indices false
52\paperorientation portrait
53\suppress_date false
54\justification true
55\use_refstyle 0
56\index Index
57\shortcut idx
58\color #008000
59\end_index
60\secnumdepth 3
61\tocdepth 3
62\paragraph_separation indent
63\paragraph_indentation default
64\quotes_language english
65\papercolumns 1
66\papersides 1
67\paperpagestyle default
68\tracking_changes false
69\output_changes false
70\html_math_output 0
71\html_css_as_file 0
72\html_be_strict false
73\end_header
74
75\begin_body
76
77\begin_layout Title
78XIOS Fortran Reference Guide
79\end_layout
80
81\begin_layout Author
82Yann Meurdesoif
83\end_layout
84
85\begin_layout Standard
86\begin_inset CommandInset toc
87LatexCommand tableofcontents
88
89\end_inset
90
91
92\end_layout
93
94\begin_layout Chapter
95Attribute reference
96\end_layout
97
98\begin_layout Section
99Context attribute reference
100\end_layout
101
102\begin_layout Section
103Calendar attribute reference
104\end_layout
105
106\begin_layout Subsection*
107type:
108\begin_inset Flex Emph
109status collapsed
110
111\begin_layout Plain Layout
112enumeration { Gregorian, Julian, D360, AllLeap, NoLeap, user_defined }
113\end_layout
114
115\end_inset
116
117
118\end_layout
119
120\begin_layout Standard
121Fortran:
122\end_layout
123
124\begin_layout LyX-Code
125CHARACTER(LEN=*) :: type
126\end_layout
127
128\begin_layout Standard
129Define the calendar used for the current context.
130 This attribute is mandatory and cannot be modified once it has been set.
131\begin_inset Newline newline
132\end_inset
133
134
135\begin_inset Newline newline
136\end_inset
137
138When using the Fortran interface, this attribute must be defined using the
139 following subroutine:
140\end_layout
141
142\begin_layout LyX-Code
143SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
144\begin_inset Newline newline
145\end_inset
146
147                                day_length, month_lengths, year_length,
148\begin_inset Newline newline
149\end_inset
150
151                                leap_year_month, leap_year_drift,
152\begin_inset Newline newline
153\end_inset
154
155                                leap_year_drift_offset)
156\end_layout
157
158\begin_layout Subsection*
159start_date:
160\begin_inset Flex Emph
161status collapsed
162
163\begin_layout Plain Layout
164date
165\end_layout
166
167\end_inset
168
169
170\end_layout
171
172\begin_layout Standard
173Fortran:
174\end_layout
175
176\begin_layout LyX-Code
177TYPE(xios_date) :: start_date
178\end_layout
179
180\begin_layout Standard
181Define the start date of the simulation for the current context.
182 This attribute is optional, the default value is
183\begin_inset Flex Emph
184status collapsed
185
186\begin_layout Plain Layout
187
188\series bold
1890000-01-01 00:00:00
190\end_layout
191
192\end_inset
193
194.
195 The
196\begin_inset Flex Strong
197status collapsed
198
199\begin_layout Plain Layout
200type
201\end_layout
202
203\end_inset
204
205 attribute must always be set at the same time or before this attribute
206 is defined.
207\begin_inset Newline newline
208\end_inset
209
210
211\begin_inset Newline newline
212\end_inset
213
214A partial date is allowed in the configuration file as long as the omitted
215 parts are at the end, in which case they are initialized as in the default
216 value.
217 Optionally an offset can be added to the date using the notation "
218\emph on
219+ duration
220\emph default
221".
222 
223\begin_inset Newline newline
224\end_inset
225
226
227\begin_inset Newline newline
228\end_inset
229
230When using the Fortran interface, this attribute can be defined at the same
231 time as the calendar
232\series bold
233type
234\series default
235:
236\end_layout
237
238\begin_layout LyX-Code
239SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
240\begin_inset Newline newline
241\end_inset
242
243                                day_length, month_lengths, year_length,
244\begin_inset Newline newline
245\end_inset
246
247                                leap_year_month, leap_year_drift,
248\begin_inset Newline newline
249\end_inset
250
251                                leap_year_drift_offset)
252\end_layout
253
254\begin_layout Standard
255or later using the following subroutine:
256\end_layout
257
258\begin_layout LyX-Code
259SUBROUTINE xios_set_start_date(start_date)
260\end_layout
261
262\begin_layout Subsection*
263time_origin:
264\begin_inset Flex Emph
265status collapsed
266
267\begin_layout Plain Layout
268date
269\end_layout
270
271\end_inset
272
273
274\end_layout
275
276\begin_layout Standard
277Fortran:
278\end_layout
279
280\begin_layout LyX-Code
281TYPE(xios_date) :: time_origin
282\end_layout
283
284\begin_layout Standard
285Define the time origin of the time axis.
286 It will appear as meta-data attached to the time axis in the output file.
287 This attribute is optional, the default value is
288\begin_inset Flex Emph
289status collapsed
290
291\begin_layout Plain Layout
292
293\series bold
2940000-01-01 00:00:00
295\end_layout
296
297\end_inset
298
299.
300 The
301\begin_inset Flex Strong
302status collapsed
303
304\begin_layout Plain Layout
305type
306\end_layout
307
308\end_inset
309
310 attribute must always be set at the same time or before this attribute
311 is defined.
312\begin_inset Newline newline
313\end_inset
314
315
316\begin_inset Newline newline
317\end_inset
318
319A partial date is allowed in the configuration file as long as the omitted
320 parts are at the end, in which case they are initialized as in the default
321 value.
322 Optionally an offset can be added to the date using the notation "
323\emph on
324+ duration
325\emph default
326".
327 
328\begin_inset Newline newline
329\end_inset
330
331
332\begin_inset Newline newline
333\end_inset
334
335When using the Fortran interface, this attribute can be defined at the same
336 time as the calendar
337\series bold
338type
339\series default
340:
341\end_layout
342
343\begin_layout LyX-Code
344SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
345\begin_inset Newline newline
346\end_inset
347
348                                day_length, month_lengths, year_length,
349\begin_inset Newline newline
350\end_inset
351
352                                leap_year_month, leap_year_drift,
353\begin_inset Newline newline
354\end_inset
355
356                                leap_year_drift_offset)
357\end_layout
358
359\begin_layout Standard
360or later using the following subroutine:
361\end_layout
362
363\begin_layout LyX-Code
364SUBROUTINE xios_set_time_origin(time_origin)
365\end_layout
366
367\begin_layout Subsection*
368timestep:
369\begin_inset Flex Emph
370status collapsed
371
372\begin_layout Plain Layout
373duration
374\end_layout
375
376\end_inset
377
378
379\end_layout
380
381\begin_layout Standard
382Fortran:
383\end_layout
384
385\begin_layout LyX-Code
386TYPE(xios_duration) :: timestep
387\end_layout
388
389\begin_layout Standard
390Define the time step of the simulation for the current context.
391 This attribute is mandatory.
392\begin_inset Newline newline
393\end_inset
394
395
396\begin_inset Newline newline
397\end_inset
398
399When using the Fortran interface, this attribute can be defined at the same
400 time as the calendar
401\series bold
402type
403\series default
404:
405\end_layout
406
407\begin_layout LyX-Code
408SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
409\begin_inset Newline newline
410\end_inset
411
412                                day_length, month_lengths, year_length,
413\begin_inset Newline newline
414\end_inset
415
416                                leap_year_month, leap_year_drift,
417\begin_inset Newline newline
418\end_inset
419
420                                leap_year_drift_offset)
421\end_layout
422
423\begin_layout Standard
424or using the following subroutine:
425\end_layout
426
427\begin_layout LyX-Code
428SUBROUTINE xios_set_timestep(timestep)
429\end_layout
430
431\begin_layout Subsection*
432day_length:
433\begin_inset Flex Emph
434status collapsed
435
436\begin_layout Plain Layout
437integer
438\end_layout
439
440\end_inset
441
442
443\end_layout
444
445\begin_layout Standard
446Fortran:
447\end_layout
448
449\begin_layout LyX-Code
450INTEGER :: day_length
451\end_layout
452
453\begin_layout Standard
454Define the duration of a day, in seconds, when using a custom calendar.
455 This attribute is mandatory if the calendar
456\series bold
457type
458\series default
459 is set to "
460\emph on
461user_defined
462\emph default
463", otherwise it must not be defined.
464\begin_inset Newline newline
465\end_inset
466
467
468\begin_inset Newline newline
469\end_inset
470
471When using the Fortran interface, this attribute must be defined at the
472 same time as the calendar
473\series bold
474type
475\series default
476:
477\end_layout
478
479\begin_layout LyX-Code
480SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
481\begin_inset Newline newline
482\end_inset
483
484                                day_length, month_lengths, year_length,
485\begin_inset Newline newline
486\end_inset
487
488                                leap_year_month, leap_year_drift,
489\begin_inset Newline newline
490\end_inset
491
492                                leap_year_drift_offset)
493\end_layout
494
495\begin_layout Subsection*
496month_lengths:
497\begin_inset Flex Emph
498status collapsed
499
500\begin_layout Plain Layout
5011D-array of integer
502\end_layout
503
504\end_inset
505
506
507\end_layout
508
509\begin_layout Standard
510Fortran:
511\end_layout
512
513\begin_layout LyX-Code
514INTEGER :: month_lengths(:)
515\end_layout
516
517\begin_layout Standard
518Define the duration of each month, in days, when using a custom calendar.
519 The number of elements in the array defines the number of months in a year
520 and the sum of all elements is the total number of days in a year.
521 This attribute is mandatory if the calendar
522\series bold
523type
524\series default
525 is set to
526\series bold
527\emph on
528user_defined
529\series default
530\emph default
531 and the
532\series bold
533year_length
534\series default
535 attribute is not used, otherwise it must not be defined.
536\begin_inset Newline newline
537\end_inset
538
539
540\begin_inset Newline newline
541\end_inset
542
543When using the Fortran interface, this attribute must be defined at the
544 same time as the calendar
545\series bold
546type
547\series default
548:
549\end_layout
550
551\begin_layout LyX-Code
552SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
553\begin_inset Newline newline
554\end_inset
555
556                                day_length, month_lengths, year_length,
557\begin_inset Newline newline
558\end_inset
559
560                                leap_year_month, leap_year_drift,
561\begin_inset Newline newline
562\end_inset
563
564                                leap_year_drift_offset)
565\end_layout
566
567\begin_layout Subsection*
568year_length:
569\begin_inset Flex Emph
570status collapsed
571
572\begin_layout Plain Layout
573integer
574\end_layout
575
576\end_inset
577
578
579\end_layout
580
581\begin_layout Standard
582Fortran:
583\end_layout
584
585\begin_layout LyX-Code
586INTEGER :: year_length
587\end_layout
588
589\begin_layout Standard
590Define the duration of a year, in seconds, when using a custom calendar.
591 This attribute is mandatory if the calendar
592\series bold
593type
594\series default
595 is set to
596\series bold
597\emph on
598user_defined
599\series default
600\emph default
601 and the
602\series bold
603month_lengths
604\series default
605 attribute is not used, otherwise it must not be defined.
606\begin_inset Newline newline
607\end_inset
608
609
610\begin_inset Newline newline
611\end_inset
612
613Note that the date format is modified when using this attribute: the month
614 must be always be omitted and the day must also be omitted if
615\begin_inset Formula $year\_length\leq day\_length$
616\end_inset
617
618.
619\begin_inset Newline newline
620\end_inset
621
622
623\begin_inset Newline newline
624\end_inset
625
626When using the Fortran interface, this attribute must be defined at the
627 same time as the calendar
628\series bold
629type
630\series default
631:
632\end_layout
633
634\begin_layout LyX-Code
635SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
636\begin_inset Newline newline
637\end_inset
638
639                                day_length, month_lengths, year_length,
640\begin_inset Newline newline
641\end_inset
642
643                                leap_year_month, leap_year_drift,
644\begin_inset Newline newline
645\end_inset
646
647                                leap_year_drift_offset)
648\end_layout
649
650\begin_layout Subsection*
651leap_year_month:
652\begin_inset Flex Emph
653status collapsed
654
655\begin_layout Plain Layout
656integer
657\end_layout
658
659\end_inset
660
661
662\end_layout
663
664\begin_layout Standard
665Fortran:
666\end_layout
667
668\begin_layout LyX-Code
669INTEGER :: leap_year_month
670\end_layout
671
672\begin_layout Standard
673Define the month to which the extra day will be added in case of leap year,
674 when using a custom calendar.
675 This attribute is optional if the calendar
676\series bold
677type
678\series default
679 is set to
680\series bold
681\emph on
682user_defined
683\series default
684\emph default
685 and the
686\series bold
687month_lengths
688\series default
689 attribute is used, otherwise it must not be defined.
690 The default behaviour is not to have any leap year.
691 If defined, this attribute must comply with the following constraint:
692\begin_inset Formula $1\leq leap\_year\_month\leq size(month\_lengths)$
693\end_inset
694
695 and the
696\series bold
697leap_year_drift
698\series default
699 attribute must also be defined.
700\begin_inset Newline newline
701\end_inset
702
703
704\begin_inset Newline newline
705\end_inset
706
707When using the Fortran interface, this attribute must be defined at the
708 same time as the calendar
709\series bold
710type
711\series default
712:
713\end_layout
714
715\begin_layout LyX-Code
716SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
717\begin_inset Newline newline
718\end_inset
719
720                                day_length, month_lengths, year_length,
721\begin_inset Newline newline
722\end_inset
723
724                                leap_year_month, leap_year_drift,
725\begin_inset Newline newline
726\end_inset
727
728                                leap_year_drift_offset)
729\end_layout
730
731\begin_layout Subsection*
732leap_year_drift:
733\begin_inset Flex Emph
734status collapsed
735
736\begin_layout Plain Layout
737double
738\end_layout
739
740\end_inset
741
742
743\end_layout
744
745\begin_layout Standard
746Fortran:
747\end_layout
748
749\begin_layout LyX-Code
750DOUBLE PRECISION :: leap_year_drift
751\end_layout
752
753\begin_layout Standard
754Define the yearly drift, expressed as a fraction of a day, between the calendar
755 year and the astronomical year, when using a custom calendar.
756 This attribute is optional if the calendar
757\series bold
758type
759\series default
760 is set to
761\series bold
762\emph on
763user_defined
764\series default
765\emph default
766 and the
767\series bold
768month_lengths
769\series default
770 attribute is used, otherwise it must not be defined.
771 The default behaviour is not to have any leap year, i.e.
772 the default value is
773\begin_inset Formula $\mathbf{0}$
774\end_inset
775
776.
777 If defined, this attribute must comply with the following constraint:
778\begin_inset Formula $0\leq leap\_year\_drift<1$
779\end_inset
780
781 and the
782\series bold
783leap_year_month
784\series default
785 attribute must also be defined.
786\begin_inset Newline newline
787\end_inset
788
789
790\begin_inset Newline newline
791\end_inset
792
793When using the Fortran interface, this attribute must be defined at the
794 same time as the calendar
795\series bold
796type
797\series default
798:
799\end_layout
800
801\begin_layout LyX-Code
802SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
803\begin_inset Newline newline
804\end_inset
805
806                                day_length, month_lengths, year_length,
807\begin_inset Newline newline
808\end_inset
809
810                                leap_year_month, leap_year_drift,
811\begin_inset Newline newline
812\end_inset
813
814                                leap_year_drift_offset)
815\end_layout
816
817\begin_layout Subsection*
818leap_year_drift_offset:
819\begin_inset Flex Emph
820status collapsed
821
822\begin_layout Plain Layout
823double
824\end_layout
825
826\end_inset
827
828
829\end_layout
830
831\begin_layout Standard
832Fortran:
833\end_layout
834
835\begin_layout LyX-Code
836DOUBLE PRECISION :: leap_year_drift_offset
837\end_layout
838
839\begin_layout Standard
840Define the initial drift between the calendar year and the astronomical
841 year, expressed as a fraction of a day, at the beginning of the time origin's
842 year, when using a custom calendar.
843 This attribute is optional if the
844\series bold
845leap_year_month
846\series default
847 and
848\series bold
849leap_year_drift
850\series default
851 attributes are used, otherwise it must not be defined.
852 The default value is
853\begin_inset Formula $\mathbf{0}$
854\end_inset
855
856.
857 If defined, this attribute must comply with the following constraint:
858\begin_inset Formula $0\leq leap\_year\_drift\_offset<1$
859\end_inset
860
861.
862 If
863\begin_inset Formula $leap\_yeap\_drift\_offset+leap\_yeap\_drift$
864\end_inset
865
866 is greater or equal to 1, then the first year will be a leap year.
867\begin_inset Newline newline
868\end_inset
869
870
871\begin_inset Newline newline
872\end_inset
873
874When using the Fortran interface, this attribute must be defined at the
875 same time as the calendar
876\series bold
877type
878\series default
879:
880\end_layout
881
882\begin_layout LyX-Code
883SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
884\begin_inset Newline newline
885\end_inset
886
887                                day_length, month_lengths, year_length,
888\begin_inset Newline newline
889\end_inset
890
891                                leap_year_month, leap_year_drift,
892\begin_inset Newline newline
893\end_inset
894
895                                leap_year_drift_offset)
896\end_layout
897
898\begin_layout Section
899Scalar attribute reference
900\end_layout
901
902\begin_layout Subsection*
903name:
904\begin_inset Flex Emph
905status collapsed
906
907\begin_layout Plain Layout
908string
909\end_layout
910
911\end_inset
912
913
914\end_layout
915
916\begin_layout Standard
917Fortran:
918\end_layout
919
920\begin_layout LyX-Code
921CHARACTER(LEN=*) :: name
922\end_layout
923
924\begin_layout Standard
925Define the name of the scalar, as it will appear in a file.
926 If not defined, a name is self generated from the id.
927 If multiple scalars are defined in a same file, each name must be different.
928 
929\end_layout
930
931\begin_layout Subsection*
932standard_name:
933\begin_inset Flex Emph
934status collapsed
935
936\begin_layout Plain Layout
937string
938\end_layout
939
940\end_inset
941
942
943\end_layout
944
945\begin_layout Standard
946Fortran:
947\end_layout
948
949\begin_layout LyX-Code
950CHARACTER(LEN=*) :: standard_name
951\end_layout
952
953\begin_layout Standard
954Define the standard name of the scalar, as it will appear in the meta-data
955 attached to the scalar of the output file.
956 
957\end_layout
958
959\begin_layout Subsection*
960long_name:
961\begin_inset Flex Emph
962status collapsed
963
964\begin_layout Plain Layout
965string
966\end_layout
967
968\end_inset
969
970
971\end_layout
972
973\begin_layout Standard
974Fortran:
975\end_layout
976
977\begin_layout LyX-Code
978CHARACTER(LEN=*) :: long_name
979\end_layout
980
981\begin_layout Standard
982Define the long name of the scalar, as it will appear in the meta-data attached
983 to the scalar of the output file.
984 
985\end_layout
986
987\begin_layout Subsection*
988unit:
989\begin_inset Flex Emph
990status collapsed
991
992\begin_layout Plain Layout
993string
994\end_layout
995
996\end_inset
997
998
999\end_layout
1000
1001\begin_layout Standard
1002Fortran:
1003\end_layout
1004
1005\begin_layout LyX-Code
1006CHARACTER(LEN=*) :: unit
1007\end_layout
1008
1009\begin_layout Standard
1010Define the unit of the scalar as it will appear in the meta-data attached
1011 to the scalar in the output file.
1012\end_layout
1013
1014\begin_layout Subsection*
1015value:
1016\begin_inset Flex Emph
1017status collapsed
1018
1019\begin_layout Plain Layout
1020double
1021\end_layout
1022
1023\end_inset
1024
1025
1026\end_layout
1027
1028\begin_layout Standard
1029Fortran:
1030\end_layout
1031
1032\begin_layout LyX-Code
1033DOUBLE PRECISION :: value
1034\end_layout
1035
1036\begin_layout Standard
1037Define the value of a scalar.
1038 
1039\end_layout
1040
1041\begin_layout Subsection*
1042scalar_ref: string
1043\end_layout
1044
1045\begin_layout Standard
1046Fortran:
1047\end_layout
1048
1049\begin_layout LyX-Code
1050CHARACTER(LEN=*) :: axis_ref
1051\end_layout
1052
1053\begin_layout Standard
1054Define the reference of the scalar.
1055 All attributes are inherited from the referenced scalar with the classical
1056 inheritance mechanism.
1057 The value assigned to the referenced axis is transmitted to to current
1058 scalar.
1059 This attribute is optional.
1060\end_layout
1061
1062\begin_layout Subsection*
1063prec:
1064\emph on
1065integer
1066\end_layout
1067
1068\begin_layout Standard
1069Fortran:
1070\end_layout
1071
1072\begin_layout LyX-Code
1073INTEGER :: prec
1074\end_layout
1075
1076\begin_layout Standard
1077Define the precision in byte of a field in an output file.
1078 Available value are: 2 (integer), 4 (float single precision) and 8 (float
1079 double precision).
1080\end_layout
1081
1082\begin_layout Section
1083Axis attribute reference
1084\end_layout
1085
1086\begin_layout Subsection*
1087name:
1088\begin_inset Flex Emph
1089status collapsed
1090
1091\begin_layout Plain Layout
1092string
1093\end_layout
1094
1095\end_inset
1096
1097
1098\end_layout
1099
1100\begin_layout Standard
1101Fortran:
1102\end_layout
1103
1104\begin_layout LyX-Code
1105CHARACTER(LEN=*) :: name
1106\end_layout
1107
1108\begin_layout Standard
1109Define the name of the vertical axis, as it will appear in a file.
1110 If not defined, a name is self generated from the id.
1111 If multiple vertical axis are defined in a same file, each name must be
1112 different.
1113 
1114\end_layout
1115
1116\begin_layout Subsection*
1117standard_name:
1118\begin_inset Flex Emph
1119status collapsed
1120
1121\begin_layout Plain Layout
1122string
1123\end_layout
1124
1125\end_inset
1126
1127
1128\end_layout
1129
1130\begin_layout Standard
1131Fortran:
1132\end_layout
1133
1134\begin_layout LyX-Code
1135CHARACTER(LEN=*) :: standard_name
1136\end_layout
1137
1138\begin_layout Standard
1139Define the standard name of the vertical axis, as it will appear in the
1140 meta-data attached to the axis of the output file.
1141 
1142\end_layout
1143
1144\begin_layout Subsection*
1145long_name:
1146\begin_inset Flex Emph
1147status collapsed
1148
1149\begin_layout Plain Layout
1150string
1151\end_layout
1152
1153\end_inset
1154
1155
1156\end_layout
1157
1158\begin_layout Standard
1159Fortran:
1160\end_layout
1161
1162\begin_layout LyX-Code
1163CHARACTER(LEN=*) :: long_name
1164\end_layout
1165
1166\begin_layout Standard
1167Define the long name of the vertical axis, as it will appear in the meta-data
1168 attached to the axis of the output file.
1169 
1170\end_layout
1171
1172\begin_layout Subsection*
1173unit:
1174\begin_inset Flex Emph
1175status collapsed
1176
1177\begin_layout Plain Layout
1178string
1179\end_layout
1180
1181\end_inset
1182
1183
1184\end_layout
1185
1186\begin_layout Standard
1187Fortran:
1188\end_layout
1189
1190\begin_layout LyX-Code
1191CHARACTER(LEN=*) :: unit
1192\end_layout
1193
1194\begin_layout Standard
1195Define the unit of the axis as it will appear in the meta-data attached
1196 to the axis in the output file.
1197\end_layout
1198
1199\begin_layout Subsection*
1200n_glo:
1201\begin_inset Flex Emph
1202status collapsed
1203
1204\begin_layout Plain Layout
1205integer
1206\end_layout
1207
1208\end_inset
1209
1210
1211\end_layout
1212
1213\begin_layout Standard
1214Fortran:
1215\end_layout
1216
1217\begin_layout LyX-Code
1218INTEGER :: n_glo
1219\end_layout
1220
1221\begin_layout Standard
1222Define the global size of the axis.
1223 This attribute is mandatory.
1224\end_layout
1225
1226\begin_layout Subsection*
1227begin:
1228\begin_inset Flex Emph
1229status collapsed
1230
1231\begin_layout Plain Layout
1232integer
1233\end_layout
1234
1235\end_inset
1236
1237
1238\end_layout
1239
1240\begin_layout Standard
1241Fortran:
1242\end_layout
1243
1244\begin_layout LyX-Code
1245INTEGER :: begin
1246\end_layout
1247
1248\begin_layout Standard
1249Define the the beginning index of the local domain.
1250 This attribute is optional.
1251 This must be an index between 0 and
1252\begin_inset Flex Strong
1253status collapsed
1254
1255\begin_layout Plain Layout
1256n_glo-1
1257\end_layout
1258
1259\end_inset
1260
1261.
1262 If not specified the default value is 0.
1263\end_layout
1264
1265\begin_layout Subsection*
1266n:
1267\begin_inset Flex Emph
1268status collapsed
1269
1270\begin_layout Plain Layout
1271integer
1272\end_layout
1273
1274\end_inset
1275
1276
1277\end_layout
1278
1279\begin_layout Standard
1280Fortran:
1281\end_layout
1282
1283\begin_layout LyX-Code
1284INTEGER :: zoom_size
1285\end_layout
1286
1287\begin_layout Standard
1288Define the the local size of the axis.
1289 This attribute is optional.
1290 This must be an integer between 1 and
1291\begin_inset Flex Strong
1292status collapsed
1293
1294\begin_layout Plain Layout
1295n_glo
1296\end_layout
1297
1298\end_inset
1299
1300.
1301 If not specified the default value is
1302\begin_inset Flex Strong
1303status collapsed
1304
1305\begin_layout Plain Layout
1306n_glo
1307\end_layout
1308
1309\end_inset
1310
1311.
1312 
1313\end_layout
1314
1315\begin_layout Subsection*
1316value:
1317\begin_inset Flex Emph
1318status collapsed
1319
1320\begin_layout Plain Layout
13211D-array of double
1322\end_layout
1323
1324\end_inset
1325
1326
1327\end_layout
1328
1329\begin_layout Standard
1330Fortran:
1331\end_layout
1332
1333\begin_layout LyX-Code
1334DOUBLE PRECISION :: value(:)
1335\end_layout
1336
1337\begin_layout Standard
1338Define the value of each level of a vertical axis.
1339 The size of the array must be equal to the
1340\begin_inset Flex Strong
1341status collapsed
1342
1343\begin_layout Plain Layout
1344size
1345\end_layout
1346
1347\end_inset
1348
1349 attribute.
1350 If not defined the default values are filled with values from 1 to
1351\begin_inset Flex Strong
1352status collapsed
1353
1354\begin_layout Plain Layout
1355size
1356\end_layout
1357
1358\end_inset
1359
1360.
1361\end_layout
1362
1363\begin_layout Subsection*
1364bounds:
1365\begin_inset Flex Emph
1366status collapsed
1367
1368\begin_layout Plain Layout
13692D-array of double
1370\end_layout
1371
1372\end_inset
1373
1374
1375\end_layout
1376
1377\begin_layout Standard
1378Fortran:
1379\end_layout
1380
1381\begin_layout LyX-Code
1382DOUBLE PRECISION :: value(:,:)
1383\end_layout
1384
1385\begin_layout Standard
1386Define the boundaries of each level of a the vertical axis.
1387 The dimensions of the array must be
1388\begin_inset Formula $2\times n$
1389\end_inset
1390
1391.
1392\end_layout
1393
1394\begin_layout Subsection*
1395data_begin:
1396\emph on
1397 integer
1398\end_layout
1399
1400\begin_layout Standard
1401Fortran:
1402\end_layout
1403
1404\begin_layout LyX-Code
1405INTEGER :: data_begin
1406\end_layout
1407
1408\begin_layout Standard
1409Define the beginning index of the field data for the axis.
1410 This attribute is an offset regarding the local axis, so the value can
1411 be negative.
1412 A negative value indicates that only some valid part of the data will extracted
1413, for example in the case of a ghost cell.
1414 A positive value indicates that the local domain is greater than the data
1415 stored in memory.
1416 A 0-value means that the local domain matches the data in memory.
1417 This attribute is optional and the default value is 0.
1418 Otherwise
1419\begin_inset Flex Strong
1420status collapsed
1421
1422\begin_layout Plain Layout
1423data_begin
1424\end_layout
1425
1426\end_inset
1427
1428 and
1429\begin_inset Flex Strong
1430status collapsed
1431
1432\begin_layout Plain Layout
1433data_n
1434\end_layout
1435
1436\end_inset
1437
1438 must be defined together.
1439\end_layout
1440
1441\begin_layout Subsection*
1442data_n:
1443\emph on
1444integer
1445\end_layout
1446
1447\begin_layout Standard
1448Fortran:
1449\end_layout
1450
1451\begin_layout LyX-Code
1452INTEGER :: data_n
1453\end_layout
1454
1455\begin_layout Standard
1456Define the size of the field data for the first axis.
1457 This attribute is optional and the default value is
1458\begin_inset Flex Strong
1459status collapsed
1460
1461\begin_layout Plain Layout
1462n
1463\end_layout
1464
1465\end_inset
1466
1467.
1468 Otherwise
1469\begin_inset Flex Strong
1470status collapsed
1471
1472\begin_layout Plain Layout
1473data_begin
1474\end_layout
1475
1476\end_inset
1477
1478 and
1479\begin_inset Flex Strong
1480status collapsed
1481
1482\begin_layout Plain Layout
1483data_n
1484\end_layout
1485
1486\end_inset
1487
1488 must be defined together.
1489\end_layout
1490
1491\begin_layout Subsection*
1492data_index:
1493\emph on
1494integer
1495\end_layout
1496
1497\begin_layout Standard
1498Fortran:
1499\end_layout
1500
1501\begin_layout LyX-Code
1502INTEGER :: data_index
1503\end_layout
1504
1505\begin_layout Standard
1506In case of a compressed vertical axis, this attribute define the number
1507 of points stored in memory on the local axis.
1508\end_layout
1509
1510\begin_layout Subsection*
1511mask:
1512\emph on
15131D-array of bool
1514\end_layout
1515
1516\begin_layout Standard
1517Fortran:
1518\end_layout
1519
1520\begin_layout LyX-Code
1521LOGICAL :: mask(:)
1522\end_layout
1523
1524\begin_layout Standard
1525Define the mask of the local axis.
1526 The masked value will be replaced by the value of the field attribute
1527\begin_inset Flex Strong
1528status collapsed
1529
1530\begin_layout Plain Layout
1531default_value
1532\end_layout
1533
1534\end_inset
1535
1536 in the output file.
1537\end_layout
1538
1539\begin_layout Subsection*
1540n_distributed_partition:
1541\emph on
1542integer
1543\end_layout
1544
1545\begin_layout Standard
1546Fortran:
1547\end_layout
1548
1549\begin_layout LyX-Code
1550INTEGER :: n_distributed_partition
1551\end_layout
1552
1553\begin_layout Standard
1554Define the number of local axis in case axis is auto-generated.
1555 This attribute is optional and the default value is
1556\begin_inset Flex Strong
1557status collapsed
1558
1559\begin_layout Plain Layout
15601
1561\end_layout
1562
1563\end_inset
1564
1565.
1566\end_layout
1567
1568\begin_layout Subsection*
1569positive:
1570\begin_inset Flex Emph
1571status collapsed
1572
1573\begin_layout Plain Layout
1574enumeration { up, down }
1575\end_layout
1576
1577\end_inset
1578
1579
1580\end_layout
1581
1582\begin_layout Standard
1583Fortran:
1584\end_layout
1585
1586\begin_layout LyX-Code
1587CHARACTER(LEN=*) :: positive
1588\end_layout
1589
1590\begin_layout Standard
1591Define the direction of vertical axis.
1592\end_layout
1593
1594\begin_layout Subsection*
1595axis_ref: string
1596\end_layout
1597
1598\begin_layout Standard
1599Fortran:
1600\end_layout
1601
1602\begin_layout LyX-Code
1603CHARACTER(LEN=*) :: axis_ref
1604\end_layout
1605
1606\begin_layout Standard
1607Define the reference of the axis.
1608 All attributes are inherited from the referenced axis with the classical
1609 inheritance mechanism.
1610 The value assigned to the referenced axis is transmitted to to current
1611 axis.
1612 This attribute is optional.
1613\end_layout
1614
1615\begin_layout Subsection*
1616index:
1617\begin_inset Flex Emph
1618status collapsed
1619
1620\begin_layout Plain Layout
16211D-array of double
1622\end_layout
1623
1624\end_inset
1625
1626
1627\end_layout
1628
1629\begin_layout Standard
1630Fortran:
1631\end_layout
1632
1633\begin_layout LyX-Code
1634DOUBLE PRECISION :: index(:)
1635\end_layout
1636
1637\begin_layout Standard
1638Define the global index of axis which the local axis holds.
1639 This attribute is optional and the size of the array is equal to
1640\begin_inset Flex Strong
1641status collapsed
1642
1643\begin_layout Plain Layout
1644n
1645\end_layout
1646
1647\end_inset
1648
1649.
1650\end_layout
1651
1652\begin_layout Section
1653Domain attribute reference
1654\end_layout
1655
1656\begin_layout Subsection*
1657name:
1658\begin_inset Flex Emph
1659status collapsed
1660
1661\begin_layout Plain Layout
1662string
1663\end_layout
1664
1665\end_inset
1666
1667
1668\end_layout
1669
1670\begin_layout Standard
1671Fortran:
1672\end_layout
1673
1674\begin_layout LyX-Code
1675CHARACTER(LEN=*) :: name
1676\end_layout
1677
1678\begin_layout Standard
1679Define the name of the horizontal domain.
1680 This attribute may be used in case of multiple domains defined in the same
1681 file.
1682 In this case, the
1683\begin_inset Flex Strong
1684status collapsed
1685
1686\begin_layout Plain Layout
1687name
1688\end_layout
1689
1690\end_inset
1691
1692 attribute will be suffixed to the longitude and latitude dimensions and
1693 axis name.
1694 Otherwise, a suffix will be self-generated.
1695\end_layout
1696
1697\begin_layout Subsection*
1698standard_name:
1699\begin_inset Flex Emph
1700status collapsed
1701
1702\begin_layout Plain Layout
1703string
1704\end_layout
1705
1706\end_inset
1707
1708
1709\end_layout
1710
1711\begin_layout Standard
1712Fortran:
1713\end_layout
1714
1715\begin_layout LyX-Code
1716CHARACTER(LEN=*) :: standard_name
1717\end_layout
1718
1719\begin_layout Standard
1720Define the standard name of the domain, as it will appear in the meta-data
1721 attached to the domain of the output file.
1722 
1723\end_layout
1724
1725\begin_layout Subsection*
1726long_name:
1727\begin_inset Flex Emph
1728status collapsed
1729
1730\begin_layout Plain Layout
1731string
1732\end_layout
1733
1734\end_inset
1735
1736
1737\end_layout
1738
1739\begin_layout Standard
1740Fortran:
1741\end_layout
1742
1743\begin_layout LyX-Code
1744CHARACTER(LEN=*) :: long_name
1745\end_layout
1746
1747\begin_layout Standard
1748Define the long name of the domain, as it will appear in the meta-data attached
1749 to the domain of the output file.
1750 
1751\end_layout
1752
1753\begin_layout Subsection*
1754type:
1755\begin_inset Flex Emph
1756status collapsed
1757
1758\begin_layout Plain Layout
1759enumeration { rectilinear, curvilinear, unstructured }
1760\end_layout
1761
1762\end_inset
1763
1764
1765\end_layout
1766
1767\begin_layout Standard
1768Fortran:
1769\end_layout
1770
1771\begin_layout LyX-Code
1772CHARACTER(LEN=*) :: type
1773\end_layout
1774
1775\begin_layout Standard
1776Define the type of the grid.
1777 This attribute is mandatory.
1778\end_layout
1779
1780\begin_layout Subsection*
1781ni_glo:
1782\begin_inset Flex Emph
1783status collapsed
1784
1785\begin_layout Plain Layout
1786integer
1787\end_layout
1788
1789\end_inset
1790
1791
1792\end_layout
1793
1794\begin_layout Standard
1795Fortran:
1796\end_layout
1797
1798\begin_layout LyX-Code
1799INTEGER :: ni_glo
1800\end_layout
1801
1802\begin_layout Standard
1803Define the first dimension of the global domain.
1804 This attribute is mandatory.
1805\end_layout
1806
1807\begin_layout Subsection*
1808nj_glo:
1809\begin_inset Flex Emph
1810status collapsed
1811
1812\begin_layout Plain Layout
1813integer
1814\end_layout
1815
1816\end_inset
1817
1818
1819\end_layout
1820
1821\begin_layout Standard
1822Fortran:
1823\end_layout
1824
1825\begin_layout LyX-Code
1826INTEGER :: nj_glo
1827\end_layout
1828
1829\begin_layout Standard
1830Define the second dimension of the global domain.
1831 This attribute is mandatory.
1832\end_layout
1833
1834\begin_layout Subsection*
1835ibegin:
1836\begin_inset Flex Emph
1837status collapsed
1838
1839\begin_layout Plain Layout
1840integer
1841\end_layout
1842
1843\end_inset
1844
1845
1846\end_layout
1847
1848\begin_layout Standard
1849Fortran:
1850\end_layout
1851
1852\begin_layout LyX-Code
1853INTEGER :: ibegin
1854\end_layout
1855
1856\begin_layout Standard
1857Define the beginning index of the first dimension of the local domain.
1858 This attribute is optional.
1859 This must be an integer between
1860\begin_inset Flex Strong
1861status collapsed
1862
1863\begin_layout Plain Layout
18640
1865\end_layout
1866
1867\end_inset
1868
1869 and
1870\begin_inset Flex Strong
1871status collapsed
1872
1873\begin_layout Plain Layout
1874ni_glo-1
1875\end_layout
1876
1877\end_inset
1878
1879.
1880 If not specified the default value is
1881\begin_inset Flex Strong
1882status collapsed
1883
1884\begin_layout Plain Layout
18850
1886\end_layout
1887
1888\end_inset
1889
1890.
1891\end_layout
1892
1893\begin_layout Subsection*
1894ni:
1895\begin_inset Flex Emph
1896status collapsed
1897
1898\begin_layout Plain Layout
1899integer
1900\end_layout
1901
1902\end_inset
1903
1904
1905\end_layout
1906
1907\begin_layout Standard
1908Fortran:
1909\end_layout
1910
1911\begin_layout LyX-Code
1912INTEGER :: ni
1913\end_layout
1914
1915\begin_layout Standard
1916Define the first dimension of the local domain.
1917 This attribute is optional.
1918 This must be an integer between
1919\begin_inset Flex Strong
1920status collapsed
1921
1922\begin_layout Plain Layout
19231
1924\end_layout
1925
1926\end_inset
1927
1928and
1929\begin_inset Flex Strong
1930status collapsed
1931
1932\begin_layout Plain Layout
1933ni_glo
1934\end_layout
1935
1936\end_inset
1937
1938.
1939 If not specified the default value is
1940\begin_inset Flex Strong
1941status collapsed
1942
1943\begin_layout Plain Layout
1944ni_glo
1945\end_layout
1946
1947\end_inset
1948
1949.
1950\end_layout
1951
1952\begin_layout Subsection*
1953jbegin:
1954\begin_inset Flex Emph
1955status collapsed
1956
1957\begin_layout Plain Layout
1958integer
1959\end_layout
1960
1961\end_inset
1962
1963
1964\end_layout
1965
1966\begin_layout Standard
1967Fortran:
1968\end_layout
1969
1970\begin_layout LyX-Code
1971INTEGER :: jbegin
1972\end_layout
1973
1974\begin_layout Standard
1975Define the beginning index of the second dimension of the local domain.
1976 This attribute is optional.
1977 This must be an integer between
1978\begin_inset Flex Strong
1979status collapsed
1980
1981\begin_layout Plain Layout
19820
1983\end_layout
1984
1985\end_inset
1986
1987 and
1988\begin_inset Flex Strong
1989status collapsed
1990
1991\begin_layout Plain Layout
1992nj_glo-1
1993\end_layout
1994
1995\end_inset
1996
1997.
1998 If not specified the default value is
1999\begin_inset Flex Strong
2000status collapsed
2001
2002\begin_layout Plain Layout
20030
2004\end_layout
2005
2006\end_inset
2007
2008.
2009\end_layout
2010
2011\begin_layout Subsection*
2012nj:
2013\begin_inset Flex Emph
2014status collapsed
2015
2016\begin_layout Plain Layout
2017integer
2018\end_layout
2019
2020\end_inset
2021
2022
2023\end_layout
2024
2025\begin_layout Standard
2026Fortran:
2027\end_layout
2028
2029\begin_layout LyX-Code
2030INTEGER :: nj
2031\end_layout
2032
2033\begin_layout Standard
2034Define the second dimension of the local domain.
2035 This attribute is optional.
2036 This must be an integer between
2037\begin_inset Flex Strong
2038status collapsed
2039
2040\begin_layout Plain Layout
20411
2042\end_layout
2043
2044\end_inset
2045
2046and
2047\begin_inset Flex Strong
2048status collapsed
2049
2050\begin_layout Plain Layout
2051nj_glo
2052\end_layout
2053
2054\end_inset
2055
2056.
2057 If not specified the default value is
2058\begin_inset Flex Strong
2059status collapsed
2060
2061\begin_layout Plain Layout
2062nj_glo
2063\end_layout
2064
2065\end_inset
2066
2067.
2068\end_layout
2069
2070\begin_layout Subsection*
2071lonvalue_1d:
2072\emph on
20731D-array of double
2074\end_layout
2075
2076\begin_layout Standard
2077Fortran:
2078\end_layout
2079
2080\begin_layout LyX-Code
2081DOUBLE PRECISION :: lonvalue(:)
2082\end_layout
2083
2084\begin_layout Standard
2085Define the value of the longitude on the local domain.
2086 For a Cartesian grid, the size of the array will be
2087\begin_inset Flex Strong
2088status collapsed
2089
2090\begin_layout Plain Layout
2091ni
2092\end_layout
2093
2094\end_inset
2095
2096.
2097 For a curvilinear grid, the size of the array will be
2098\begin_inset Flex Strong
2099status collapsed
2100
2101\begin_layout Plain Layout
2102ni
2103\begin_inset Formula $\times$
2104\end_inset
2105
2106nj
2107\end_layout
2108
2109\end_inset
2110
2111.
2112 This attribute is optional.
2113\end_layout
2114
2115\begin_layout Subsection*
2116lonvalue_2d:
2117\emph on
21182D-array of double
2119\end_layout
2120
2121\begin_layout Standard
2122Fortran:
2123\end_layout
2124
2125\begin_layout LyX-Code
2126DOUBLE PRECISION :: lonvalue(:,:)
2127\end_layout
2128
2129\begin_layout Standard
2130Define the value of the longitude on the local domain.
2131 For a Cartesian and curvilinear grid, the size of the array will be
2132\begin_inset Flex Strong
2133status collapsed
2134
2135\begin_layout Plain Layout
2136ni
2137\begin_inset Formula $\times$
2138\end_inset
2139
2140nj
2141\end_layout
2142
2143\end_inset
2144
2145.
2146 This attribute is mandatory.
2147 Only lonvalue_1d or lonvalue_2d can be defined.
2148\end_layout
2149
2150\begin_layout Subsection*
2151latvalue_1d:
2152\emph on
21531D-array of double
2154\end_layout
2155
2156\begin_layout Standard
2157Fortran:
2158\end_layout
2159
2160\begin_layout LyX-Code
2161DOUBLE PRECISION :: latvalue(:)
2162\end_layout
2163
2164\begin_layout Standard
2165Define the value of the latitude on the local domain.
2166 For a Cartesian grid, the size of the array will be nj.
2167 For a curvilinear grid, the size of the array will be
2168\begin_inset Flex Strong
2169status collapsed
2170
2171\begin_layout Plain Layout
2172ni
2173\begin_inset Formula $\times$
2174\end_inset
2175
2176nj
2177\end_layout
2178
2179\end_inset
2180
2181.
2182 This attribute is optional.
2183\end_layout
2184
2185\begin_layout Subsection*
2186latvalue_2d:
2187\emph on
21882D-array of double
2189\end_layout
2190
2191\begin_layout Standard
2192Fortran:
2193\end_layout
2194
2195\begin_layout LyX-Code
2196DOUBLE PRECISION :: latvalue(:,:)
2197\end_layout
2198
2199\begin_layout Standard
2200Define the value of the latitude on the local domain.
2201 For a Cartesian and a curvilinear grid, the size of the array will be
2202\begin_inset Flex Strong
2203status collapsed
2204
2205\begin_layout Plain Layout
2206ni
2207\begin_inset Formula $\times$
2208\end_inset
2209
2210nj
2211\end_layout
2212
2213\end_inset
2214
2215.
2216 This attribute is mandatory.
2217 Only latvalue_1d or latvalue_2d can be defined.
2218\end_layout
2219
2220\begin_layout Subsection*
2221nvertex:
2222\emph on
2223integer
2224\end_layout
2225
2226\begin_layout Standard
2227Fortran:
2228\end_layout
2229
2230\begin_layout LyX-Code
2231INTEGER :: nvertex
2232\end_layout
2233
2234\begin_layout Standard
2235Define the the maximum number of vertices for a cell.
2236 This is useful to specify the boundaries of cells for an unstructured mesh.
2237 This attribute is optional.
2238\end_layout
2239
2240\begin_layout Subsection*
2241bounds_lon_1d:
2242\emph on
22432D-array of double
2244\end_layout
2245
2246\begin_layout Standard
2247Fortran:
2248\end_layout
2249
2250\begin_layout LyX-Code
2251DOUBLE PRECISION :: bounds_lon(:,:)
2252\end_layout
2253
2254\begin_layout Standard
2255Longitude value of the vertex of the cells.
2256\begin_inset Flex Strong
2257status collapsed
2258
2259\begin_layout Plain Layout
2260nvertex
2261\end_layout
2262
2263\end_inset
2264
2265 attribute must also be defined.
2266 This attribute is optional.
2267\end_layout
2268
2269\begin_layout Subsection*
2270bounds_lon_2d:
2271\emph on
22723D-array of double
2273\end_layout
2274
2275\begin_layout Standard
2276Fortran:
2277\end_layout
2278
2279\begin_layout LyX-Code
2280DOUBLE PRECISION :: bounds_lon(:,:,:)
2281\end_layout
2282
2283\begin_layout Standard
2284Longitude value of the vertex of the cells.
2285\begin_inset Flex Strong
2286status collapsed
2287
2288\begin_layout Plain Layout
2289nvertex
2290\end_layout
2291
2292\end_inset
2293
2294 attribute must also be defined.
2295 This attribute is optional.
2296 This attribute is useful when lonvalue_2d is defined.
2297 Only bounds_lon_1d or bounds_lon_2d can be defined.
2298\end_layout
2299
2300\begin_layout Subsection*
2301bounds_lat_1d:
2302\emph on
23032D-array of double
2304\end_layout
2305
2306\begin_layout Standard
2307Fortran:
2308\end_layout
2309
2310\begin_layout LyX-Code
2311DOUBLE PRECISION :: bounds_lat(:,:)
2312\end_layout
2313
2314\begin_layout Standard
2315Latitude value of the vertex of the cells.
2316\begin_inset Flex Strong
2317status collapsed
2318
2319\begin_layout Plain Layout
2320nvertex
2321\end_layout
2322
2323\end_inset
2324
2325 attribute must also be defined.
2326 This attribute is optional.
2327\end_layout
2328
2329\begin_layout Subsection*
2330bounds_lat_2d:
2331\emph on
23323D-array of double
2333\end_layout
2334
2335\begin_layout Standard
2336Fortran:
2337\end_layout
2338
2339\begin_layout LyX-Code
2340DOUBLE PRECISION :: bounds_lat(:,:)
2341\end_layout
2342
2343\begin_layout Standard
2344Latitude value of the vertex of the cells.
2345\begin_inset Flex Strong
2346status collapsed
2347
2348\begin_layout Plain Layout
2349nvertex
2350\end_layout
2351
2352\end_inset
2353
2354 attribute must also be defined.
2355 This attribute is optional.
2356 This attribute is useful when latvalue_2d is defined.
2357 Only bounds_lat_1d or bounds_lat_2d can be defined.
2358\end_layout
2359
2360\begin_layout Subsection*
2361area:
2362\emph on
23632D-array of double
2364\end_layout
2365
2366\begin_layout Standard
2367Fortran:
2368\end_layout
2369
2370\begin_layout LyX-Code
2371DOUBLE PRECISION :: area(:,:)
2372\end_layout
2373
2374\begin_layout Standard
2375Area of the cells.
2376 The size of the array must be
2377\begin_inset Flex Strong
2378status collapsed
2379
2380\begin_layout Plain Layout
2381ni
2382\begin_inset Formula $\times$
2383\end_inset
2384
2385nj
2386\end_layout
2387
2388\end_inset
2389
2390.
2391 This attribute is optional.
2392\end_layout
2393
2394\begin_layout Subsection*
2395data_dim:
2396\emph on
2397integer
2398\end_layout
2399
2400\begin_layout Standard
2401Fortran:
2402\end_layout
2403
2404\begin_layout LyX-Code
2405INTEGER :: datadim
2406\end_layout
2407
2408\begin_layout Standard
2409Define how a field is stored on memory for the client code.
2410 
2411\begin_inset Flex Strong
2412status collapsed
2413
2414\begin_layout Plain Layout
2415datadim
2416\end_layout
2417
2418\end_inset
2419
2420 value can be
2421\begin_inset Flex Strong
2422status collapsed
2423
2424\begin_layout Plain Layout
24251
2426\end_layout
2427
2428\end_inset
2429
2430 or
2431\begin_inset Flex Strong
2432status collapsed
2433
2434\begin_layout Plain Layout
24352
2436\end_layout
2437
2438\end_inset
2439
2440.
2441 A value of
2442\begin_inset Flex Strong
2443status collapsed
2444
2445\begin_layout Plain Layout
24461
2447\end_layout
2448
2449\end_inset
2450
2451 indicates that the horizontal layer of the field is stored on a 1D array
2452 as a vector of points.
2453 A value of
2454\begin_inset Flex Strong
2455status collapsed
2456
2457\begin_layout Plain Layout
24582
2459\end_layout
2460
2461\end_inset
2462
2463 indicates that the horizontal layer is stored in a 2D array.
2464 This attribute is optional.
2465 The default value is
2466\begin_inset Flex Strong
2467status collapsed
2468
2469\begin_layout Plain Layout
24701
2471\end_layout
2472
2473\end_inset
2474
2475.
2476\end_layout
2477
2478\begin_layout Subsection*
2479data_ibegin:
2480\emph on
2481 integer
2482\end_layout
2483
2484\begin_layout Standard
2485Fortran:
2486\end_layout
2487
2488\begin_layout LyX-Code
2489INTEGER :: data_ibegin
2490\end_layout
2491
2492\begin_layout Standard
2493Define the beginning index of the field data for the first dimension.
2494 This attribute is an offset regarding the local domain, so the value can
2495 be negative.
2496 A negative value indicates that only some valid part of the data will extracted
2497, for example in the case of a ghost cell.
2498 A positive value indicates that the local domain is greater than the data
2499 stored in memory.
2500 A 0-value means that the local domain matches the data in memory.
2501 This attribute is optional and the default value is 0.
2502 Otherwise
2503\begin_inset Flex Strong
2504status collapsed
2505
2506\begin_layout Plain Layout
2507data_ibegin
2508\end_layout
2509
2510\end_inset
2511
2512 and
2513\begin_inset Flex Strong
2514status collapsed
2515
2516\begin_layout Plain Layout
2517data_ni
2518\end_layout
2519
2520\end_inset
2521
2522 must be defined together.
2523\end_layout
2524
2525\begin_layout Subsection*
2526data_ni:
2527\emph on
2528integer
2529\end_layout
2530
2531\begin_layout Standard
2532Fortran:
2533\end_layout
2534
2535\begin_layout LyX-Code
2536INTEGER :: data_ni
2537\end_layout
2538
2539\begin_layout Standard
2540Define the size of the field data for the first dimension.
2541 This attribute is optional and the default value is
2542\begin_inset Flex Strong
2543status collapsed
2544
2545\begin_layout Plain Layout
2546ni
2547\end_layout
2548
2549\end_inset
2550
2551.
2552 Otherwise
2553\begin_inset Flex Strong
2554status collapsed
2555
2556\begin_layout Plain Layout
2557data_ibegin
2558\end_layout
2559
2560\end_inset
2561
2562 and
2563\begin_inset Flex Strong
2564status collapsed
2565
2566\begin_layout Plain Layout
2567data_ni
2568\end_layout
2569
2570\end_inset
2571
2572 must be defined together.
2573\end_layout
2574
2575\begin_layout Subsection*
2576data_jbegin:
2577\emph on
2578integer
2579\end_layout
2580
2581\begin_layout Standard
2582Fortran:
2583\end_layout
2584
2585\begin_layout LyX-Code
2586INTEGER :: data_jbegin
2587\end_layout
2588
2589\begin_layout Standard
2590Define the beginning index of the field data for the second dimension.
2591 This attribute is take account only if
2592\begin_inset Flex Strong
2593status collapsed
2594
2595\begin_layout Plain Layout
2596 data_dim=2
2597\end_layout
2598
2599\end_inset
2600
2601.
2602 This attribute is an offset regarding the local domain, so the value can
2603 be negative.
2604 A negative value indicate that only some valid part of the data will extracted,
2605 for example in case of ghost cell.
2606 A positive value indicate that the local domain is greater than the data
2607 stored in memory.
2608 A 0-value means that the local domain match the data in memory.
2609 This attribute is optional and the default value is
2610\begin_inset Flex Strong
2611status collapsed
2612
2613\begin_layout Plain Layout
26140
2615\end_layout
2616
2617\end_inset
2618
2619.
2620 Otherwise
2621\begin_inset Flex Strong
2622status collapsed
2623
2624\begin_layout Plain Layout
2625data_jbegin
2626\end_layout
2627
2628\end_inset
2629
2630 and
2631\begin_inset Flex Strong
2632status collapsed
2633
2634\begin_layout Plain Layout
2635data_nj
2636\end_layout
2637
2638\end_inset
2639
2640 must be defined together.
2641\end_layout
2642
2643\begin_layout Subsection*
2644data_nj:
2645\emph on
2646integer
2647\end_layout
2648
2649\begin_layout Standard
2650Fortran:
2651\end_layout
2652
2653\begin_layout LyX-Code
2654INTEGER :: data_nj
2655\end_layout
2656
2657\begin_layout Standard
2658Define the size of the field data for the second dimension.
2659 This attribute is taken account only if
2660\begin_inset Flex Strong
2661status collapsed
2662
2663\begin_layout Plain Layout
2664data_dim=2
2665\end_layout
2666
2667\end_inset
2668
2669.
2670 This attribute is optional and the default value is
2671\begin_inset Flex Strong
2672status collapsed
2673
2674\begin_layout Plain Layout
2675nj
2676\end_layout
2677
2678\end_inset
2679
2680.
2681 Otherwise
2682\begin_inset Flex Strong
2683status collapsed
2684
2685\begin_layout Plain Layout
2686data_jbegin
2687\end_layout
2688
2689\end_inset
2690
2691 and
2692\begin_inset Flex Strong
2693status collapsed
2694
2695\begin_layout Plain Layout
2696data_nj
2697\end_layout
2698
2699\end_inset
2700
2701 must be defined together.
2702\end_layout
2703
2704\begin_layout Subsection*
2705data_i_index:
2706\emph on
27071D-array of integer
2708\end_layout
2709
2710\begin_layout Standard
2711Fortran:
2712\end_layout
2713
2714\begin_layout LyX-Code
2715INTEGER :: data_i_index(:)
2716\end_layout
2717
2718\begin_layout Standard
2719In case of a compressed horizontal domain, define the indexation the indexation
2720 of the data for the first dimension.
2721 The size of the array must be
2722\begin_inset Flex Strong
2723status collapsed
2724
2725\begin_layout Plain Layout
2726data_nindex
2727\end_layout
2728
2729\end_inset
2730
2731.
2732 This attribute is optional.
2733\end_layout
2734
2735\begin_layout Subsection*
2736data_j_index:
2737\emph on
27381D-array of integer
2739\end_layout
2740
2741\begin_layout Standard
2742Fortran:
2743\end_layout
2744
2745\begin_layout LyX-Code
2746INTEGER :: data_j_index(:)
2747\end_layout
2748
2749\begin_layout Standard
2750In case of a compressed horizontal domain, define the indexation the indexation
2751 of the data for the second dimension.
2752 This is meaningful only if
2753\begin_inset Flex Strong
2754status collapsed
2755
2756\begin_layout Plain Layout
2757data_dim=2
2758\end_layout
2759
2760\end_inset
2761
2762.
2763 This attribute is optional.
2764\end_layout
2765
2766\begin_layout Subsection*
2767mask_1d:
2768\emph on
27691D-array of bool
2770\end_layout
2771
2772\begin_layout Standard
2773Fortran:
2774\end_layout
2775
2776\begin_layout LyX-Code
2777LOGICAL :: mask(:)
2778\end_layout
2779
2780\begin_layout Standard
2781Define the 1-dimension mask of the local domain.
2782 The attribute is optional.
2783 By default, none value is masked.
2784 The masked value will be replaced by the value of the field attribute
2785\begin_inset Flex Strong
2786status collapsed
2787
2788\begin_layout Plain Layout
2789default_value
2790\end_layout
2791
2792\end_inset
2793
2794 in the output file.
2795 This value is useful in case a field is stored linearly in memory.
2796 This attribute is optional.
2797\end_layout
2798
2799\begin_layout Subsection*
2800mask_2d:
2801\emph on
28022D-array of bool
2803\end_layout
2804
2805\begin_layout Standard
2806Fortran:
2807\end_layout
2808
2809\begin_layout LyX-Code
2810LOGICAL :: mask(:,:)
2811\end_layout
2812
2813\begin_layout Standard
2814Define the mask of the local domain.
2815 The attribute is optional.
2816 By default, none value is masked.
2817 The masked value will be replaced by the value of the field attribute
2818\begin_inset Flex Strong
2819status collapsed
2820
2821\begin_layout Plain Layout
2822default_value
2823\end_layout
2824
2825\end_inset
2826
2827 in the output file.
2828 Only mask_2d or mask_1d can be defined.
2829\end_layout
2830
2831\begin_layout Subsection*
2832domain_ref: string
2833\end_layout
2834
2835\begin_layout Standard
2836Fortran:
2837\end_layout
2838
2839\begin_layout LyX-Code
2840CHARACTER(LEN=*) :: domain_ref
2841\end_layout
2842
2843\begin_layout Standard
2844Define the reference of the domain.
2845 All attributes are inherited from the referenced domain with the classic
2846 inheritance mechanism.
2847 The value assigned to the referenced domain is transmitted to to current
2848 domain.
2849 This attribute is optional.
2850\end_layout
2851
2852\begin_layout Subsection*
2853i_index:
2854\begin_inset Flex Emph
2855status collapsed
2856
2857\begin_layout Plain Layout
28581D-array of double
2859\end_layout
2860
2861\end_inset
2862
2863
2864\end_layout
2865
2866\begin_layout Standard
2867Fortran:
2868\end_layout
2869
2870\begin_layout LyX-Code
2871DOUBLE PRECISION :: i_index(:)
2872\end_layout
2873
2874\begin_layout Standard
2875Define the global index of the first dimension of domain which the local
2876 domain holds.
2877 This attribute is optional and by default, the size of the array is equal
2878 to
2879\begin_inset Flex Strong
2880status collapsed
2881
2882\begin_layout Plain Layout
2883ni*nj
2884\end_layout
2885
2886\end_inset
2887
2888.
2889\end_layout
2890
2891\begin_layout Subsection*
2892j_index:
2893\begin_inset Flex Emph
2894status collapsed
2895
2896\begin_layout Plain Layout
28971D-array of double
2898\end_layout
2899
2900\end_inset
2901
2902
2903\end_layout
2904
2905\begin_layout Standard
2906Fortran:
2907\end_layout
2908
2909\begin_layout LyX-Code
2910DOUBLE PRECISION :: j_index(:)
2911\end_layout
2912
2913\begin_layout Standard
2914Define the global index of the second dimension of domain which the local
2915 domain holds.
2916 This attribute is optional and by default, the size of the array is equal
2917 to
2918\begin_inset Flex Strong
2919status collapsed
2920
2921\begin_layout Plain Layout
2922ni*nj
2923\end_layout
2924
2925\end_inset
2926
2927.
2928\end_layout
2929
2930\begin_layout Section
2931Grid attribute reference
2932\end_layout
2933
2934\begin_layout Subsection*
2935name: string
2936\end_layout
2937
2938\begin_layout Standard
2939Fortran:
2940\end_layout
2941
2942\begin_layout LyX-Code
2943CHARACTER(LEN=*) :: name
2944\end_layout
2945
2946\begin_layout Standard
2947Define the name of the grid.
2948 This attribute is actually not used internally.
2949 Optional attribute.
2950\end_layout
2951
2952\begin_layout Subsection*
2953description: string
2954\end_layout
2955
2956\begin_layout Standard
2957Fortran:
2958\end_layout
2959
2960\begin_layout LyX-Code
2961CHARACTER(LEN=*) :: description
2962\end_layout
2963
2964\begin_layout Standard
2965Define the description of the grid.
2966 This attribute is optional.
2967\end_layout
2968
2969\begin_layout Subsection*
2970mask_1d:
2971\emph on
29721D-array of bool
2973\end_layout
2974
2975\begin_layout Standard
2976Fortran:
2977\end_layout
2978
2979\begin_layout LyX-Code
2980LOGICAL :: mask_1d(:)
2981\end_layout
2982
2983\begin_layout Standard
2984Define the mask of the local 1-dimension grid.
2985 Masked value will be replaced by the value of the field attribute
2986\begin_inset Flex Strong
2987status collapsed
2988
2989\begin_layout Plain Layout
2990default_value
2991\end_layout
2992
2993\end_inset
2994
2995 in the output file.
2996 This attribute is optional.
2997 By default, none value is masked.
2998\end_layout
2999
3000\begin_layout Subsection*
3001mask_2d:
3002\emph on
30032D-array of bool
3004\end_layout
3005
3006\begin_layout Standard
3007Fortran:
3008\end_layout
3009
3010\begin_layout LyX-Code
3011LOGICAL :: mask_2d(:,:)
3012\end_layout
3013
3014\begin_layout Standard
3015Define the mask of the local 2-dimension grid.
3016 Masked value will be replaced by the value of the field attribute
3017\begin_inset Flex Strong
3018status collapsed
3019
3020\begin_layout Plain Layout
3021default_value
3022\end_layout
3023
3024\end_inset
3025
3026 in the output file.
3027 This attribute is optional.
3028 By default, none value is masked.
3029\end_layout
3030
3031\begin_layout Subsection*
3032mask_3d:
3033\emph on
30343D-array of bool
3035\end_layout
3036
3037\begin_layout Standard
3038Fortran:
3039\end_layout
3040
3041\begin_layout LyX-Code
3042LOGICAL :: mask_3d(:,:,:)
3043\end_layout
3044
3045\begin_layout Standard
3046Define the mask of the local 3-dimension grid.
3047 Masked value will be replaced by the value of the field attribute
3048\begin_inset Flex Strong
3049status collapsed
3050
3051\begin_layout Plain Layout
3052default_value
3053\end_layout
3054
3055\end_inset
3056
3057 in the output file.
3058 This attribute is optional.
3059 By default, none value is masked.
3060 Only one mask can be defined.
3061\end_layout
3062
3063\begin_layout Section
3064Field attribute reference
3065\end_layout
3066
3067\begin_layout Subsection*
3068name:
3069\emph on
3070string
3071\end_layout
3072
3073\begin_layout Standard
3074Fortran:
3075\end_layout
3076
3077\begin_layout LyX-Code
3078CHARACTER(LEN=*) :: name
3079\end_layout
3080
3081\begin_layout Standard
3082Define the
3083\begin_inset Flex Strong
3084status collapsed
3085
3086\begin_layout Plain Layout
3087name
3088\end_layout
3089
3090\end_inset
3091
3092 of the field as it will appear in an output file.
3093 This attribute is optional.
3094 If not present, the identifier
3095\begin_inset Flex Strong
3096status collapsed
3097
3098\begin_layout Plain Layout
3099id
3100\end_layout
3101
3102\end_inset
3103
3104 will be substituted.
3105\end_layout
3106
3107\begin_layout Subsection*
3108standard_name:
3109\emph on
3110string
3111\end_layout
3112
3113\begin_layout Standard
3114Fortran:
3115\end_layout
3116
3117\begin_layout LyX-Code
3118CHARACTER(LEN=*) :: standard_name
3119\end_layout
3120
3121\begin_layout Standard
3122Define the
3123\begin_inset Flex Strong
3124status collapsed
3125
3126\begin_layout Plain Layout
3127standard_name
3128\end_layout
3129
3130\end_inset
3131
3132 attribute as it will appear in the meta-data of an output file.
3133 This attribute is optional.
3134\end_layout
3135
3136\begin_layout Subsection*
3137long_name:
3138\emph on
3139string
3140\end_layout
3141
3142\begin_layout Standard
3143Fortran:
3144\end_layout
3145
3146\begin_layout LyX-Code
3147CHARACTER(LEN=*) :: long_name
3148\end_layout
3149
3150\begin_layout Standard
3151Define the
3152\begin_inset Flex Strong
3153status collapsed
3154
3155\begin_layout Plain Layout
3156long_name
3157\end_layout
3158
3159\end_inset
3160
3161 attribute as it will appear in the meta-data of an output file.
3162 This attribute is optional.
3163\end_layout
3164
3165\begin_layout Subsection*
3166unit:
3167\emph on
3168string
3169\end_layout
3170
3171\begin_layout Standard
3172Fortran:
3173\end_layout
3174
3175\begin_layout LyX-Code
3176CHARACTER(LEN=*) :: unit
3177\end_layout
3178
3179\begin_layout Standard
3180Define the
3181\begin_inset Flex Strong
3182status collapsed
3183
3184\begin_layout Plain Layout
3185unit
3186\end_layout
3187
3188\end_inset
3189
3190 of the field.
3191 This attribute is optional.
3192\end_layout
3193
3194\begin_layout Subsection*
3195operation: enumeration
3196\emph on
3197 { once, instant, average, maximum, minimum, accumulate }
3198\end_layout
3199
3200\begin_layout Standard
3201Fortran:
3202\end_layout
3203
3204\begin_layout LyX-Code
3205CHARACTER(LEN=*) :: operation
3206\end_layout
3207
3208\begin_layout Standard
3209Define the temporal operation applied on the field.
3210 This attribute is optional, by default no operation is applied.
3211\end_layout
3212
3213\begin_layout Subsection*
3214freq_op:
3215\emph on
3216duration
3217\end_layout
3218
3219\begin_layout Standard
3220Fortran:
3221\end_layout
3222
3223\begin_layout LyX-Code
3224TYPE(xios_duration) :: freq_op
3225\end_layout
3226
3227\begin_layout Standard
3228Define the frequency of the sampling for the temporal operation, so a field
3229 value will be used for temporal averaging every
3230\begin_inset Flex Strong
3231status collapsed
3232
3233\begin_layout Plain Layout
3234freq_op
3235\end_layout
3236
3237\end_inset
3238
3239 time step.
3240 It is very useful for sub-processes called at different frequency in a
3241 model.
3242 This attribute is optional, the default value is
3243\begin_inset Flex Strong
3244status collapsed
3245
3246\begin_layout Plain Layout
32471ts
3248\end_layout
3249
3250\end_inset
3251
3252(1 time step).
3253\end_layout
3254
3255\begin_layout Subsection*
3256freq_offset:
3257\emph on
3258duration
3259\end_layout
3260
3261\begin_layout Standard
3262Fortran:
3263\end_layout
3264
3265\begin_layout LyX-Code
3266TYPE(xios_duration) :: freq_offset
3267\end_layout
3268
3269\begin_layout Standard
3270Define the offset when
3271\begin_inset Flex Strong
3272status collapsed
3273
3274\begin_layout Plain Layout
3275freq_op
3276\end_layout
3277
3278\end_inset
3279
3280 is defined.
3281 This attribute is optional, the default value is
3282\begin_inset Flex Strong
3283status collapsed
3284
3285\begin_layout Plain Layout
32860ts
3287\end_layout
3288
3289\end_inset
3290
3291(0 time step).
3292\end_layout
3293
3294\begin_layout Standard
3295\begin_inset Formula $0\leq freq\_offset<freq\_op$
3296\end_inset
3297
3298
3299\end_layout
3300
3301\begin_layout Subsection*
3302level:
3303\emph on
3304integer
3305\end_layout
3306
3307\begin_layout Standard
3308Fortran:
3309\end_layout
3310
3311\begin_layout LyX-Code
3312INTEGER :: level
3313\end_layout
3314
3315\begin_layout Standard
3316Define the level of output of the field.
3317 A field will be output only if the file attribute
3318\begin_inset Flex Strong
3319status collapsed
3320
3321\begin_layout Plain Layout
3322 output_level
3323\begin_inset Formula $\geq$
3324\end_inset
3325
3326level
3327\end_layout
3328
3329\end_inset
3330
3331.
3332 This attribute is optional, the default value is
3333\begin_inset Flex Strong
3334status collapsed
3335
3336\begin_layout Plain Layout
33370
3338\end_layout
3339
3340\end_inset
3341
3342.
3343\end_layout
3344
3345\begin_layout Subsection*
3346prec:
3347\emph on
3348integer
3349\end_layout
3350
3351\begin_layout Standard
3352Fortran:
3353\end_layout
3354
3355\begin_layout LyX-Code
3356INTEGER :: prec
3357\end_layout
3358
3359\begin_layout Standard
3360Define the precision in byte of a field in an output file.
3361 Available value are: 2 (integer), 4 (float single precision) and 8 (float
3362 double precision).
3363\end_layout
3364
3365\begin_layout Subsection*
3366enabled:
3367\emph on
3368bool
3369\end_layout
3370
3371\begin_layout Standard
3372Fortran:
3373\end_layout
3374
3375\begin_layout LyX-Code
3376LOGICAL :: enabled
3377\end_layout
3378
3379\begin_layout Standard
3380Define if a field must be output or not.
3381 This attribute is optional, the default value is
3382\begin_inset Flex Strong
3383status collapsed
3384
3385\begin_layout Plain Layout
3386true
3387\end_layout
3388
3389\end_inset
3390
3391.
3392\end_layout
3393
3394\begin_layout Subsection*
3395read_access:
3396\emph on
3397bool
3398\end_layout
3399
3400\begin_layout Standard
3401Fortran:
3402\end_layout
3403
3404\begin_layout LyX-Code
3405LOGICAL :: read_access
3406\end_layout
3407
3408\begin_layout Standard
3409Define whether a field can be read from the model or not.
3410 This attribute is optional, the default value is
3411\begin_inset Flex Strong
3412status collapsed
3413
3414\begin_layout Plain Layout
3415false
3416\end_layout
3417
3418\end_inset
3419
3420.
3421 Note that for fields belonging to a file in
3422\series bold
3423\emph on
3424read
3425\series default
3426\emph default
3427 
3428\series bold
3429mode
3430\series default
3431, this attribute is always
3432\series bold
3433true
3434\series default
3435.
3436\end_layout
3437
3438\begin_layout Subsection*
3439field_ref:
3440\emph on
3441string
3442\end_layout
3443
3444\begin_layout Standard
3445Fortran:
3446\end_layout
3447
3448\begin_layout LyX-Code
3449CHARACTER(LEN=*) :: field_ref
3450\end_layout
3451
3452\begin_layout Standard
3453Define a field reference.
3454 All attributes are inherited from the referenced field after the classical
3455 inheritance mechanism.
3456 The value assigned to the referenced field is transmitted to to current
3457 field to perform temporal operation.
3458 This attribute is optional.
3459\end_layout
3460
3461\begin_layout Subsection*
3462grid_ref:
3463\emph on
3464string
3465\end_layout
3466
3467\begin_layout Standard
3468Fortran:
3469\end_layout
3470
3471\begin_layout LyX-Code
3472CHARACTER(LEN=*) :: grid_ref
3473\end_layout
3474
3475\begin_layout Standard
3476Define on which grid the current field is defined.
3477 This attribute is optional, if missing, domain_ref and axis_ref must be
3478 defining.
3479\end_layout
3480
3481\begin_layout Subsection*
3482domain_ref:
3483\emph on
3484string
3485\end_layout
3486
3487\begin_layout Standard
3488Fortran:
3489\end_layout
3490
3491\begin_layout LyX-Code
3492CHARACTER(LEN=*) :: domain_ref
3493\end_layout
3494
3495\begin_layout Standard
3496Define on which horizontal domain the current field is defined.
3497 This attribute is optional, but if this attribute is defined,
3498\begin_inset Flex Strong
3499status collapsed
3500
3501\begin_layout Plain Layout
3502grid_ref
3503\end_layout
3504
3505\end_inset
3506
3507 must not be.
3508\end_layout
3509
3510\begin_layout Subsection*
3511axis_ref:
3512\emph on
3513string
3514\end_layout
3515
3516\begin_layout Standard
3517Fortran:
3518\end_layout
3519
3520\begin_layout LyX-Code
3521CHARACTER(LEN=*) :: axis_ref
3522\end_layout
3523
3524\begin_layout Standard
3525Define on which vertical axis the current field is defined.
3526 This attribute is optional, but if this attribute is defined,
3527\begin_inset Flex Strong
3528status collapsed
3529
3530\begin_layout Plain Layout
3531domain_ref
3532\end_layout
3533
3534\end_inset
3535
3536 must be too and
3537\begin_inset Flex Strong
3538status collapsed
3539
3540\begin_layout Plain Layout
3541grid_ref
3542\end_layout
3543
3544\end_inset
3545
3546 must not.
3547\end_layout
3548
3549\begin_layout Subsection*
3550grid_path:
3551\emph on
3552string
3553\end_layout
3554
3555\begin_layout Standard
3556Fortran:
3557\end_layout
3558
3559\begin_layout LyX-Code
3560CHARACTER(LEN=*) :: grid_path
3561\end_layout
3562
3563\begin_layout Standard
3564Define the way operations passing from a grid to others.
3565 This attribute is optional.
3566\end_layout
3567
3568\begin_layout Subsection*
3569default_value:
3570\emph on
3571double
3572\end_layout
3573
3574\begin_layout Standard
3575Fortran:
3576\end_layout
3577
3578\begin_layout LyX-Code
3579DOUBLE PRECISION :: default_value
3580\end_layout
3581
3582\begin_layout Standard
3583Define the value which should be used in place of the missing data of a
3584 field.
3585 This attribute is optional.
3586 If no value was defined, the missing data will be replaced by uninitialized
3587 values which can lead to undefined behaviors.
3588\end_layout
3589
3590\begin_layout Subsection*
3591valid_min:
3592\emph on
3593double
3594\end_layout
3595
3596\begin_layout Standard
3597Fortran:
3598\end_layout
3599
3600\begin_layout LyX-Code
3601DOUBLE PRECISION :: valid_min
3602\end_layout
3603
3604\begin_layout Standard
3605All field values below
3606\begin_inset Flex Strong
3607status collapsed
3608
3609\begin_layout Plain Layout
3610valid_min
3611\end_layout
3612
3613\end_inset
3614
3615 attribute value are set to missing value.
3616\end_layout
3617
3618\begin_layout Subsection*
3619valid_max:
3620\emph on
3621double
3622\end_layout
3623
3624\begin_layout Standard
3625Fortran:
3626\end_layout
3627
3628\begin_layout LyX-Code
3629DOUBLE PRECISION :: valid_max
3630\end_layout
3631
3632\begin_layout Standard
3633All field values above
3634\begin_inset Flex Strong
3635status collapsed
3636
3637\begin_layout Plain Layout
3638valid_max
3639\end_layout
3640
3641\end_inset
3642
3643 attribute value are set to missing value.
3644\end_layout
3645
3646\begin_layout Subsection*
3647detect_missing_value:
3648\emph on
3649bool
3650\end_layout
3651
3652\begin_layout Standard
3653Fortran:
3654\end_layout
3655
3656\begin_layout LyX-Code
3657LOGICAL:: detect_missing_value
3658\end_layout
3659
3660\begin_layout Standard
3661When XIOS detect a default value in a field, it does not include the value
3662 in the statistic of the operation, like averaging, minimum, maximum...
3663\end_layout
3664
3665\begin_layout Subsection*
3666add_offset:
3667\emph on
3668double
3669\end_layout
3670
3671\begin_layout Standard
3672Fortran:
3673\end_layout
3674
3675\begin_layout LyX-Code
3676DOUBLE PRECISION :: add_offset
3677\end_layout
3678
3679\begin_layout Standard
3680Set the
3681\begin_inset Flex Strong
3682status collapsed
3683
3684\begin_layout Plain Layout
3685add_offset
3686\end_layout
3687
3688\end_inset
3689
3690 meta-data CF attribute in the output file.
3691 In output, the
3692\begin_inset Flex Strong
3693status collapsed
3694
3695\begin_layout Plain Layout
3696add_offset
3697\end_layout
3698
3699\end_inset
3700
3701 value is subtracted to the field values.
3702\end_layout
3703
3704\begin_layout Subsection*
3705scale_factor:
3706\emph on
3707double
3708\end_layout
3709
3710\begin_layout Standard
3711Fortran:
3712\end_layout
3713
3714\begin_layout LyX-Code
3715DOUBLE PRECISION :: scale_factor
3716\end_layout
3717
3718\begin_layout Standard
3719Set the
3720\begin_inset Flex Strong
3721status collapsed
3722
3723\begin_layout Plain Layout
3724scale_factor
3725\end_layout
3726
3727\end_inset
3728
3729 meta-data CF attribute in the output file.
3730 In output, the field values are divided by the
3731\begin_inset Flex Strong
3732status collapsed
3733
3734\begin_layout Plain Layout
3735scale_factor
3736\end_layout
3737
3738\end_inset
3739
3740 value.
3741\end_layout
3742
3743\begin_layout Subsection*
3744compression_level:
3745\emph on
3746integer
3747\end_layout
3748
3749\begin_layout Standard
3750Fortran:
3751\end_layout
3752
3753\begin_layout LyX-Code
3754INTEGER :: compression_level
3755\end_layout
3756
3757\begin_layout Standard
3758Define whether the field should be compressed using NetCDF-4 built-in compressio
3759n.
3760 The compression level must range from 0 to 9.
3761 An higher compression level means a better compression at the cost of using
3762 more processing power.
3763 This attribute is optional, the default value is inherited from the file
3764 attribute
3765\series bold
3766compression_level
3767\series default
3768.
3769\end_layout
3770
3771\begin_layout Subsection*
3772indexed_output:
3773\emph on
3774bool
3775\end_layout
3776
3777\begin_layout Standard
3778Fortran:
3779\end_layout
3780
3781\begin_layout LyX-Code
3782LOGICAL :: indexed_output
3783\end_layout
3784
3785\begin_layout Standard
3786Define whether the field data must be outputted as an indexed grid instead
3787 of a full grid whenever possible.
3788 This attribute is optional, the default value is
3789\series bold
3790\emph on
3791false
3792\series default
3793\emph default
3794.
3795\end_layout
3796
3797\begin_layout Subsection*
3798ts_enabled:
3799\emph on
3800bool
3801\end_layout
3802
3803\begin_layout Standard
3804Fortran:
3805\end_layout
3806
3807\begin_layout LyX-Code
3808LOGICAL :: ts_enabled
3809\end_layout
3810
3811\begin_layout Standard
3812Define whether the field can be outputted as a timeserie if requested.
3813 This attribute is optional, the default value is
3814\series bold
3815\emph on
3816false
3817\series default
3818\emph default
3819.
3820\end_layout
3821
3822\begin_layout Subsection*
3823ts_split_freq:
3824\emph on
3825duration
3826\end_layout
3827
3828\begin_layout Standard
3829Fortran:
3830\end_layout
3831
3832\begin_layout LyX-Code
3833TYPE(xios_duration) :: ts_split_freq
3834\end_layout
3835
3836\begin_layout Standard
3837Define the splitting frequency that should be used for the timeserie if
3838 it has been requested.
3839 This attribute is optional, by default this value is inherited from the
3840 file
3841\series bold
3842split_freq
3843\series default
3844.
3845\end_layout
3846
3847\begin_layout Section
3848Variable attribute reference
3849\end_layout
3850
3851\begin_layout Subsection*
3852name:
3853\emph on
3854string
3855\end_layout
3856
3857\begin_layout Standard
3858Fortran:
3859\end_layout
3860
3861\begin_layout LyX-Code
3862CHARACTER(LEN=*) :: name
3863\end_layout
3864
3865\begin_layout Standard
3866Define the
3867\begin_inset Flex Strong
3868status collapsed
3869
3870\begin_layout Plain Layout
3871name
3872\end_layout
3873
3874\end_inset
3875
3876 of the variable as it will appear in an output file.
3877 This attribute is optional.
3878 If not present, the
3879\begin_inset Flex Strong
3880status collapsed
3881
3882\begin_layout Plain Layout
3883id
3884\end_layout
3885
3886\end_inset
3887
3888 will be used instead.
3889\end_layout
3890
3891\begin_layout Subsection*
3892type: enumeration { bool, int, int32, int16, int64, float, double, string
3893 }
3894\end_layout
3895
3896\begin_layout Standard
3897Fortran:
3898\end_layout
3899
3900\begin_layout LyX-Code
3901CHARACTER(LEN=*) :: type
3902\end_layout
3903
3904\begin_layout Standard
3905Define the
3906\begin_inset Flex Strong
3907status collapsed
3908
3909\begin_layout Plain Layout
3910type
3911\end_layout
3912
3913\end_inset
3914
3915 of the variable.
3916 Note that the
3917\series bold
3918\emph on
3919int
3920\series default
3921\emph default
3922 type is a synonym for
3923\series bold
3924\emph on
3925int32
3926\series default
3927\emph default
3928.
3929 This attribute is mandatory.
3930\end_layout
3931
3932\begin_layout Section
3933File attribute reference
3934\end_layout
3935
3936\begin_layout Subsection*
3937name:
3938\emph on
3939string
3940\end_layout
3941
3942\begin_layout Standard
3943Fortran:
3944\end_layout
3945
3946\begin_layout LyX-Code
3947CHARACTER(LEN=*) :: name
3948\end_layout
3949
3950\begin_layout Standard
3951Define the name of the file.
3952 This attribute is mandatory.
3953\end_layout
3954
3955\begin_layout Subsection*
3956description:
3957\emph on
3958string
3959\end_layout
3960
3961\begin_layout Standard
3962Fortran:
3963\end_layout
3964
3965\begin_layout LyX-Code
3966CHARACTER(LEN=*) :: description
3967\end_layout
3968
3969\begin_layout Standard
3970Define the description of the file.
3971 This attribute is optional.
3972\end_layout
3973
3974\begin_layout Subsection*
3975name_suffix:
3976\emph on
3977string
3978\end_layout
3979
3980\begin_layout Standard
3981Fortran:
3982\end_layout
3983
3984\begin_layout LyX-Code
3985CHARACTER(LEN=*) :: name_suffix
3986\end_layout
3987
3988\begin_layout Standard
3989Define a suffix to add to the name of the file.
3990 This attribute is optional.
3991\end_layout
3992
3993\begin_layout Subsection*
3994min_digits:
3995\emph on
3996integer
3997\end_layout
3998
3999\begin_layout Standard
4000Fortran:
4001\end_layout
4002
4003\begin_layout LyX-Code
4004INTEGER :: min_digits
4005\end_layout
4006
4007\begin_layout Standard
4008For multiple_file, define the minimum digits composing the suffix defining
4009 the rank of the server, which will be happened to the name of the file.
4010 This attribute is optional and the default value is
4011\begin_inset Flex Strong
4012status collapsed
4013
4014\begin_layout Plain Layout
40150
4016\end_layout
4017
4018\end_inset
4019
4020.
4021\end_layout
4022
4023\begin_layout Subsection*
4024output_freq:
4025\emph on
4026duration
4027\end_layout
4028
4029\begin_layout Standard
4030Fortran:
4031\end_layout
4032
4033\begin_layout LyX-Code
4034TYPE(xios_duration) :: output_freq
4035\end_layout
4036
4037\begin_layout Standard
4038Define the output frequency for the current file.
4039 This attribute is mandatory.
4040\end_layout
4041
4042\begin_layout Subsection*
4043output_level:
4044\emph on
4045integer
4046\end_layout
4047
4048\begin_layout Standard
4049Fortran:
4050\end_layout
4051
4052\begin_layout LyX-Code
4053INTEGER :: output_level
4054\end_layout
4055
4056\begin_layout Standard
4057Define an output level for the field defining inside the current file.
4058 Field is output only if the field attribute
4059\begin_inset Formula $level\leq output\_level$
4060\end_inset
4061
4062.
4063\end_layout
4064
4065\begin_layout Subsection*
4066sync_freq:
4067\emph on
4068duration
4069\end_layout
4070
4071\begin_layout Standard
4072Fortran:
4073\end_layout
4074
4075\begin_layout LyX-Code
4076TYPE(xios_duration) :: sync_freq
4077\end_layout
4078
4079\begin_layout Standard
4080Define the frequency for flushing the current file onto disk.
4081 It may result bad performance but data are wrote even if the file will
4082 not be closed.
4083 This attribute is optional.
4084\end_layout
4085
4086\begin_layout Subsection*
4087split_freq:
4088\emph on
4089duration
4090\end_layout
4091
4092\begin_layout Standard
4093Fortran:
4094\end_layout
4095
4096\begin_layout LyX-Code
4097TYPE(xios_duration) :: split_freq
4098\end_layout
4099
4100\begin_layout Standard
4101Define the time frequency for splitting the current file.
4102 In that case, the start and end dates are added to the file
4103\series bold
4104name
4105\series default
4106 (see
4107\begin_inset Flex Emph
4108status collapsed
4109
4110\begin_layout Plain Layout
4111
4112\series bold
4113\emph on
4114split_freq_format
4115\end_layout
4116
4117\end_inset
4118
4119 attribute).
4120 This attribute is optional, by default no splitting is done.
4121\end_layout
4122
4123\begin_layout Subsection*
4124split_freq_format:
4125\emph on
4126string
4127\end_layout
4128
4129\begin_layout Standard
4130Fortran:
4131\end_layout
4132
4133\begin_layout LyX-Code
4134CHARACTER(LEN=*) :: split_freq_format
4135\end_layout
4136
4137\begin_layout Standard
4138Define the format of the split date suffixed to the file.
4139 Can contain any character,
4140\emph on
4141
4142\begin_inset Flex Code
4143status collapsed
4144
4145\begin_layout Plain Layout
4146%y
4147\end_layout
4148
4149\end_inset
4150
4151
4152\emph default
4153 will be replaced by the year (4 characters),
4154\begin_inset Flex Code
4155status collapsed
4156
4157\begin_layout Plain Layout
4158%mo
4159\end_layout
4160
4161\end_inset
4162
4163 by the month (2 char),
4164\begin_inset Flex Code
4165status collapsed
4166
4167\begin_layout Plain Layout
4168%d
4169\end_layout
4170
4171\end_inset
4172
4173 by the day (2 char),
4174\begin_inset Flex Code
4175status collapsed
4176
4177\begin_layout Plain Layout
4178%h
4179\end_layout
4180
4181\end_inset
4182
4183 by the hour (2 char),
4184\begin_inset Flex Code
4185status collapsed
4186
4187\begin_layout Plain Layout
4188%mi
4189\end_layout
4190
4191\end_inset
4192
4193 by the minute (2 char),
4194\begin_inset Flex Code
4195status collapsed
4196
4197\begin_layout Plain Layout
4198%s
4199\end_layout
4200
4201\end_inset
4202
4203 by the second (2 char),
4204\begin_inset Flex Code
4205status collapsed
4206
4207\begin_layout Plain Layout
4208%S
4209\end_layout
4210
4211\end_inset
4212
4213 by the number of seconds since the time origin and
4214\begin_inset Flex Code
4215status collapsed
4216
4217\begin_layout Plain Layout
4218%D
4219\end_layout
4220
4221\end_inset
4222
4223 by the number of full days since the time origin.
4224 This attribute is optional and the default behavior is to create a suffix
4225 with the date until the smaller non zero unit.
4226 For example, in one day split frequency, the hour, minute and second will
4227 not appear in the suffix, only year, month and day.
4228\end_layout
4229
4230\begin_layout Subsection*
4231enabled:
4232\emph on
4233bool
4234\end_layout
4235
4236\begin_layout Standard
4237Fortran:
4238\end_layout
4239
4240\begin_layout LyX-Code
4241LOGICAL :: enabled
4242\end_layout
4243
4244\begin_layout Standard
4245Define if a file must be written/read or not.
4246 This attribute is optional, the default value is
4247\begin_inset Flex Strong
4248status collapsed
4249
4250\begin_layout Plain Layout
4251true
4252\end_layout
4253
4254\end_inset
4255
4256.
4257\end_layout
4258
4259\begin_layout Subsection*
4260mode:
4261\emph on
4262enumeration { read, write }
4263\end_layout
4264
4265\begin_layout Standard
4266Fortran:
4267\end_layout
4268
4269\begin_layout LyX-Code
4270CHARACTER(LEN=*) :: mode
4271\end_layout
4272
4273\begin_layout Standard
4274Define whether the file will be read or written.
4275 This attribute is optional, the default value is
4276\begin_inset Flex Strong
4277status collapsed
4278
4279\begin_layout Plain Layout
4280write
4281\end_layout
4282
4283\end_inset
4284
4285.
4286\end_layout
4287
4288\begin_layout Subsection*
4289type:
4290\emph on
4291enumeration { one_file, multiple_file }
4292\end_layout
4293
4294\begin_layout Standard
4295Fortran:
4296\end_layout
4297
4298\begin_layout LyX-Code
4299CHARACTER(LEN=*) :: type
4300\end_layout
4301
4302\begin_layout Standard
4303Define the type of the file:
4304\begin_inset Flex Strong
4305status collapsed
4306
4307\begin_layout Plain Layout
4308
4309\emph on
4310multiple_file
4311\end_layout
4312
4313\end_inset
4314
4315: one file by server using sequential netcdf writing,
4316\begin_inset Flex Strong
4317status collapsed
4318
4319\begin_layout Plain Layout
4320
4321\emph on
4322one_file
4323\end_layout
4324
4325\end_inset
4326
4327: one single global file is wrote using netcdf4 parallel access.
4328 This attribute is mandatory.
4329\end_layout
4330
4331\begin_layout Subsection*
4332format:
4333\emph on
4334enumeration { netcdf4, netcdf4_classic }
4335\end_layout
4336
4337\begin_layout Standard
4338Fortran:
4339\end_layout
4340
4341\begin_layout LyX-Code
4342CHARACTER(LEN=*) :: type
4343\end_layout
4344
4345\begin_layout Standard
4346Define the format of the file:
4347\begin_inset Flex Strong
4348status collapsed
4349
4350\begin_layout Plain Layout
4351
4352\emph on
4353netcdf4
4354\end_layout
4355
4356\end_inset
4357
4358: the HDF5 format will be used,
4359\begin_inset Flex Strong
4360status collapsed
4361
4362\begin_layout Plain Layout
4363
4364\emph on
4365netcdf4
4366\emph default
4367_
4368\emph on
4369classic
4370\end_layout
4371
4372\end_inset
4373
4374: the classic NetCDF format will be used.
4375 The attribute is optional, the default value is
4376\series bold
4377\emph on
4378netcdf4
4379\series default
4380\emph default
4381.
4382 Note that the
4383\series bold
4384\emph on
4385netcdf4
4386\emph default
4387_
4388\emph on
4389classic
4390\series default
4391\emph default
4392 format can be used with the attribute
4393\series bold
4394type
4395\series default
4396 set to
4397\series bold
4398\emph on
4399one_file
4400\series default
4401\emph default
4402 only if the NetCDF4 library was compiled with Parallel NetCDF support (–enable-
4403pnetcdf).
4404\end_layout
4405
4406\begin_layout Subsection*
4407par_access:
4408\emph on
4409enumeration { collective, independent }
4410\end_layout
4411
4412\begin_layout Standard
4413Fortran:
4414\end_layout
4415
4416\begin_layout LyX-Code
4417CHARACTER(LEN=*) :: par_access
4418\end_layout
4419
4420\begin_layout Standard
4421For parallel writing, define which type of MPI calls will be used.
4422 This attribute is optional, the default value is
4423\begin_inset Flex Strong
4424status collapsed
4425
4426\begin_layout Plain Layout
4427
4428\emph on
4429collective
4430\end_layout
4431
4432\end_inset
4433
4434.
4435\end_layout
4436
4437\begin_layout Subsection*
4438append:
4439\emph on
4440bool
4441\end_layout
4442
4443\begin_layout Standard
4444Fortran:
4445\end_layout
4446
4447\begin_layout LyX-Code
4448LOGICAL :: append
4449\end_layout
4450
4451\begin_layout Standard
4452Define whether the output data is to be appended at the end of the file
4453 if it already exists or if the existing file is to be overwritten.
4454 This attribute is optional, the default value is
4455\begin_inset Flex Strong
4456status collapsed
4457
4458\begin_layout Plain Layout
4459
4460\emph on
4461false
4462\end_layout
4463
4464\end_inset
4465
4466.
4467\end_layout
4468
4469\begin_layout Subsection*
4470compression_level:
4471\emph on
4472integer
4473\end_layout
4474
4475\begin_layout Standard
4476Fortran:
4477\end_layout
4478
4479\begin_layout LyX-Code
4480INTEGER :: compression_level
4481\end_layout
4482
4483\begin_layout Standard
4484Define whether the fields should be compressed using NetCDF-4 built-in compressi
4485on by default.
4486 The compression level must range from 0 to 9.
4487 An higher compression level means a better compression at the cost of using
4488 more processing power.
4489 This attribute is optional, the default value is
4490\begin_inset Flex Strong
4491status collapsed
4492
4493\begin_layout Plain Layout
4494
4495\emph on
44960
4497\end_layout
4498
4499\end_inset
4500
4501 (no compression).
4502\end_layout
4503
4504\begin_layout Subsection*
4505time_counter:
4506\emph on
4507enumeration { centered, instant, record, none }
4508\end_layout
4509
4510\begin_layout Standard
4511Fortran:
4512\end_layout
4513
4514\begin_layout LyX-Code
4515CHARACTER(LEN=*) :: time_counter
4516\end_layout
4517
4518\begin_layout Standard
4519Define how the
4520\begin_inset Quotes eld
4521\end_inset
4522
4523time_counter
4524\begin_inset Quotes erd
4525\end_inset
4526
4527 variable will be outputted:
4528\end_layout
4529
4530\begin_layout Itemize
4531
4532\series bold
4533\emph on
4534centered
4535\series default
4536\emph default
4537: use centered times
4538\end_layout
4539
4540\begin_layout Itemize
4541
4542\series bold
4543\emph on
4544instant
4545\series default
4546\emph default
4547: use instant times
4548\end_layout
4549
4550\begin_layout Itemize
4551
4552\series bold
4553\emph on
4554record
4555\series default
4556\emph default
4557: use record indexes
4558\end_layout
4559
4560\begin_layout Itemize
4561
4562\series bold
4563\emph on
4564none
4565\series default
4566\emph default
4567: do not output the variable.
4568\end_layout
4569
4570\begin_layout Standard
4571This attribute is optional, the default value is
4572\series bold
4573\emph on
4574centered
4575\series default
4576\emph default
4577.
4578\end_layout
4579
4580\begin_layout Subsection*
4581time_counter_name:
4582\emph on
4583string
4584\end_layout
4585
4586\begin_layout Standard
4587Fortran:
4588\end_layout
4589
4590\begin_layout LyX-Code
4591CHARACTER(LEN=*) :: time_counter_name
4592\end_layout
4593
4594\begin_layout Standard
4595Define the name of the time counter.
4596 This attribute is optional.
4597\end_layout
4598
4599\begin_layout Subsection*
4600timeseries:
4601\emph on
4602enumeration { none, only, both, exclusive }
4603\end_layout
4604
4605\begin_layout Standard
4606Fortran:
4607\end_layout
4608
4609\begin_layout LyX-Code
4610CHARACTER(LEN=*) :: time_series
4611\end_layout
4612
4613\begin_layout Standard
4614Define whether the timeseries must be outputted:
4615\end_layout
4616
4617\begin_layout Itemize
4618
4619\series bold
4620\emph on
4621none
4622\series default
4623\emph default
4624: no timeseries are outputted, only the regular file
4625\end_layout
4626
4627\begin_layout Itemize
4628
4629\series bold
4630\emph on
4631only
4632\series default
4633\emph default
4634: only the timeseries are outputted, the regular file is not created
4635\end_layout
4636
4637\begin_layout Itemize
4638
4639\series bold
4640\emph on
4641both
4642\series default
4643\emph default
4644: both the timeseries and the regular file are outputted.
4645\end_layout
4646
4647\begin_layout Itemize
4648
4649\series bold
4650\emph on
4651exclusive
4652\series default
4653\emph default
4654: the timeseries are outputted and a regular file is created with only the
4655 fields which were not marked for output as a timeserie (if any).
4656\end_layout
4657
4658\begin_layout Standard
4659This attribute is optional, the default value is
4660\series bold
4661\emph on
4662none
4663\series default
4664\emph default
4665.
4666\end_layout
4667
4668\begin_layout Subsection*
4669ts_prefix:
4670\emph on
4671string
4672\end_layout
4673
4674\begin_layout Standard
4675Fortran:
4676\end_layout
4677
4678\begin_layout LyX-Code
4679CHARACTER(LEN=*) :: ts_prefix
4680\end_layout
4681
4682\begin_layout Standard
4683Define the prefix to use for the name of the timeseries files.
4684 This attribute is optional, by default the file
4685\series bold
4686name
4687\series default
4688 will be used.
4689\end_layout
4690
4691\begin_layout Subsection*
4692record_offset:
4693\emph on
4694integer
4695\end_layout
4696
4697\begin_layout Standard
4698Fortran:
4699\end_layout
4700
4701\begin_layout LyX-Code
4702INTEGER :: record_offset
4703\end_layout
4704
4705\begin_layout Standard
4706Define offset of record from the beginning record.
4707 This attribute is optional, by default, its value is 0.
4708\end_layout
4709
4710\begin_layout Standard
4711\begin_inset CommandInset include
4712LatexCommand include
4713filename "inputs/reference/Transformations.lyx"
4714
4715\end_inset
4716
4717
4718\end_layout
4719
4720\begin_layout Chapter
4721Fortran interface reference
4722\end_layout
4723
4724\begin_layout Section*
4725Initialization
4726\end_layout
4727
4728\begin_layout Subsection*
4729XIOS initialization
4730\end_layout
4731
4732\begin_layout Subsubsection*
4733Synopsis:
4734\end_layout
4735
4736\begin_layout LyX-Code
4737SUBROUTINE xios_initialize(client_id, local_comm, return_comm)
4738\end_layout
4739
4740\begin_layout LyX-Code
4741  CHARACTER(LEN=*),INTENT(IN)         :: client_id
4742\end_layout
4743
4744\begin_layout LyX-Code
4745  INTEGER,INTENT(IN),OPTIONAL         :: local_comm
4746\end_layout
4747
4748\begin_layout LyX-Code
4749  INTEGER,INTENT(OUT),OPTIONAL        :: return_comm
4750\end_layout
4751
4752\begin_layout Subsubsection*
4753Argument:
4754\end_layout
4755
4756\begin_layout Itemize
4757\begin_inset Flex Code
4758status collapsed
4759
4760\begin_layout Plain Layout
4761client_id
4762\end_layout
4763
4764\end_inset
4765
4766: client identifier
4767\end_layout
4768
4769\begin_layout Itemize
4770\begin_inset Flex Code
4771status collapsed
4772
4773\begin_layout Plain Layout
4774local_comm
4775\end_layout
4776
4777\end_inset
4778
4779: MPI communicator of the client
4780\end_layout
4781
4782\begin_layout Itemize
4783\begin_inset Flex Code
4784status collapsed
4785
4786\begin_layout Plain Layout
4787return_comm
4788\end_layout
4789
4790\end_inset
4791
4792: split return MPI communicator
4793\end_layout
4794
4795\begin_layout Subsubsection*
4796Description:
4797\end_layout
4798
4799\begin_layout Standard
4800This subroutine must be called before any other call of MPI client library.
4801 It may be able to initialize MPI library (calling
4802\begin_inset Flex Code
4803status collapsed
4804
4805\begin_layout Plain Layout
4806MPI_Init
4807\end_layout
4808
4809\end_inset
4810
4811) if not already initialized.
4812 Since XIOS is able to work in client/server mode (parameter
4813\begin_inset Flex Code
4814status collapsed
4815
4816\begin_layout Plain Layout
4817using_server=true
4818\end_layout
4819
4820\end_inset
4821
4822), the global communicator must be split and a local split communicator
4823 is returned to be used by the client model for it own purpose.
4824 If more than one model is present, XIOS could be interfaced with the OASIS
4825 coupler (compiled with
4826\begin_inset Flex Code
4827status collapsed
4828
4829\begin_layout Plain Layout
4830-using_oasis
4831\end_layout
4832
4833\end_inset
4834
4835 option and parameter
4836\begin_inset Flex Code
4837status collapsed
4838
4839\begin_layout Plain Layout
4840using_oasis=true
4841\end_layout
4842
4843\end_inset
4844
4845), so in this case, the splitting would be done globally by OASIS.
4846\end_layout
4847
4848\begin_layout Itemize
4849If MPI is not initialized, XIOS would initialize it calling MPI_Init function.
4850 In this case, the MPI finalization would be done by XIOS in the
4851\begin_inset Flex Code
4852status collapsed
4853
4854\begin_layout Plain Layout
4855xios_finalize
4856\end_layout
4857
4858\end_inset
4859
4860 subroutine, and must not be done by the model.
4861\end_layout
4862
4863\begin_layout Itemize
4864If OASIS coupler is not used (using_oasis=false)
4865\begin_inset Separator latexpar
4866\end_inset
4867
4868
4869\end_layout
4870
4871\begin_deeper
4872\begin_layout Itemize
4873If server mode is not activated (
4874\begin_inset Flex Code
4875status collapsed
4876
4877\begin_layout Plain Layout
4878using_server=false
4879\end_layout
4880
4881\end_inset
4882
4883): if local_comm MPI communicator is specified then it would be used for
4884 internal MPI communication otherwise
4885\begin_inset Flex Code
4886status collapsed
4887
4888\begin_layout Plain Layout
4889MPI_COMM_WORLD
4890\end_layout
4891
4892\end_inset
4893
4894 communicator would be used by default.
4895 A copy of the communicator (of
4896\begin_inset Flex Code
4897status collapsed
4898
4899\begin_layout Plain Layout
4900local_comm
4901\end_layout
4902
4903\end_inset
4904
4905 or
4906\begin_inset Flex Code
4907status collapsed
4908
4909\begin_layout Plain Layout
4910MPI_COMM_WORLD
4911\end_layout
4912
4913\end_inset
4914
4915) would be returned in return_comm argument.
4916 If
4917\begin_inset Flex Code
4918status collapsed
4919
4920\begin_layout Plain Layout
4921return_comm
4922\end_layout
4923
4924\end_inset
4925
4926 is not specified, then
4927\begin_inset Flex Code
4928status collapsed
4929
4930\begin_layout Plain Layout
4931local_comm
4932\end_layout
4933
4934\end_inset
4935
4936 or
4937\begin_inset Flex Code
4938status collapsed
4939
4940\begin_layout Plain Layout
4941MPI_COMM_WORLD
4942\end_layout
4943
4944\end_inset
4945
4946 can be used by the model for it own communication.
4947\end_layout
4948
4949\begin_layout Itemize
4950If server mode is activated (
4951\begin_inset Flex Code
4952status collapsed
4953
4954\begin_layout Plain Layout
4955using_server=true
4956\end_layout
4957
4958\end_inset
4959
4960):
4961\begin_inset Flex Code
4962status collapsed
4963
4964\begin_layout Plain Layout
4965local_comm
4966\end_layout
4967
4968\end_inset
4969
4970 must not be specified since the global
4971\begin_inset Flex Code
4972status collapsed
4973
4974\begin_layout Plain Layout
4975MPI_COMM_WORLD
4976\end_layout
4977
4978\end_inset
4979
4980 communicator would be split by XIOS.
4981 The split communicator is returned in
4982\begin_inset Flex Code
4983status collapsed
4984
4985\begin_layout Plain Layout
4986return_comm
4987\end_layout
4988
4989\end_inset
4990
4991 argument.
4992\end_layout
4993
4994\end_deeper
4995\begin_layout Itemize
4996If OASIS coupler is used (
4997\begin_inset Flex Code
4998status collapsed
4999
5000\begin_layout Plain Layout
5001using_oasis=true
5002\end_layout
5003
5004\end_inset
5005
5006)
5007\begin_inset Separator latexpar
5008\end_inset
5009
5010
5011\end_layout
5012
5013\begin_deeper
5014\begin_layout Itemize
5015If server mode is not enabled (
5016\begin_inset Flex Code
5017status collapsed
5018
5019\begin_layout Plain Layout
5020using_server=false
5021\end_layout
5022
5023\end_inset
5024
5025)
5026\begin_inset Separator latexpar
5027\end_inset
5028
5029
5030\end_layout
5031
5032\begin_deeper
5033\begin_layout Itemize
5034If
5035\begin_inset Flex Code
5036status collapsed
5037
5038\begin_layout Plain Layout
5039local_comm
5040\end_layout
5041
5042\end_inset
5043
5044 is specified, it means that OASIS has been initialized by the model and
5045 global communicator has been already split previously by OASIS, and passed
5046 as
5047\begin_inset Flex Code
5048status collapsed
5049
5050\begin_layout Plain Layout
5051local_comm
5052\end_layout
5053
5054\end_inset
5055
5056 argument.
5057 The returned communicator would be a duplicate copy of
5058\begin_inset Flex Code
5059status collapsed
5060
5061\begin_layout Plain Layout
5062local_comm
5063\end_layout
5064
5065\end_inset
5066
5067.
5068\end_layout
5069
5070\begin_layout Itemize
5071Otherwise: if MPI was not initialized, OASIS will be initialized calling
5072 
5073\begin_inset Flex Code
5074status collapsed
5075
5076\begin_layout Plain Layout
5077prism_init_comp_proto
5078\end_layout
5079
5080\end_inset
5081
5082 subroutine.
5083 In this case, XIOS will call
5084\begin_inset Flex Code
5085status collapsed
5086
5087\begin_layout Plain Layout
5088prism_terminate_proto
5089\end_layout
5090
5091\end_inset
5092
5093 when
5094\begin_inset Flex Code
5095status collapsed
5096
5097\begin_layout Plain Layout
5098xios_finalized
5099\end_layout
5100
5101\end_inset
5102
5103 is called.
5104 The split communicator is returned in
5105\begin_inset Flex Code
5106status collapsed
5107
5108\begin_layout Plain Layout
5109return_comm
5110\end_layout
5111
5112\end_inset
5113
5114 argument using
5115\begin_inset Flex Code
5116status collapsed
5117
5118\begin_layout Plain Layout
5119prism_get_localcomm_proto
5120\end_layout
5121
5122\end_inset
5123
5124 return argument.
5125\end_layout
5126
5127\end_deeper
5128\begin_layout Itemize
5129If server mode is enabled (
5130\begin_inset Flex Code
5131status collapsed
5132
5133\begin_layout Plain Layout
5134using_server=true
5135\end_layout
5136
5137\end_inset
5138
5139)
5140\begin_inset Separator latexpar
5141\end_inset
5142
5143
5144\end_layout
5145
5146\begin_deeper
5147\begin_layout Itemize
5148If
5149\begin_inset Flex Code
5150status collapsed
5151
5152\begin_layout Plain Layout
5153local_comm
5154\end_layout
5155
5156\end_inset
5157
5158 is specified, it means that OASIS has been initialized by the model and
5159 global communicator has been already split previously by OASIS, and passed
5160 as local_comm argument.
5161 The returned communicator return_comm would be a split communicator given
5162 by OASIS.
5163\end_layout
5164
5165\begin_layout Itemize
5166Otherwise: if MPI was not initialized, OASIS will be initialized calling
5167 
5168\begin_inset Flex Code
5169status collapsed
5170
5171\begin_layout Plain Layout
5172prism_init_comp_proto
5173\end_layout
5174
5175\end_inset
5176
5177 subroutine.
5178 In this case, XIOS will call
5179\begin_inset Flex Code
5180status collapsed
5181
5182\begin_layout Plain Layout
5183prism_terminate_proto
5184\end_layout
5185
5186\end_inset
5187
5188 when
5189\begin_inset Flex Code
5190status collapsed
5191
5192\begin_layout Plain Layout
5193xios_finalized
5194\end_layout
5195
5196\end_inset
5197
5198 is called.
5199 The split communicator is returned in
5200\begin_inset Flex Code
5201status collapsed
5202
5203\begin_layout Plain Layout
5204return_comm
5205\end_layout
5206
5207\end_inset
5208
5209 argument using
5210\begin_inset Flex Code
5211status collapsed
5212
5213\begin_layout Plain Layout
5214prism_get_localcomm_proto
5215\end_layout
5216
5217\end_inset
5218
5219 return argument.
5220\end_layout
5221
5222\end_deeper
5223\end_deeper
5224\begin_layout Section*
5225Finalization
5226\end_layout
5227
5228\begin_layout Subsection*
5229XIOS finalization
5230\end_layout
5231
5232\begin_layout Subsubsection*
5233Synopsis:
5234\end_layout
5235
5236\begin_layout LyX-Code
5237SUBROUTINE xios_finalize()
5238\end_layout
5239
5240\begin_layout Subsubsection*
5241Arguments:
5242\end_layout
5243
5244\begin_layout Standard
5245None
5246\end_layout
5247
5248\begin_layout Subsubsection*
5249Description:
5250\end_layout
5251
5252\begin_layout Standard
5253This call must be done at the end of the simulation for a successful execution.
5254 It gives the end signal to the xios server pools to finish it execution.
5255 If MPI has been initialize by XIOS the MPI_Finalize will be called.
5256 If OASIS coupler has been initialized by XIOS, then finalization will be
5257 done calling
5258\begin_inset Flex Code
5259status collapsed
5260
5261\begin_layout Plain Layout
5262prism_terminate_proto
5263\end_layout
5264
5265\end_inset
5266
5267 subroutine.
5268\end_layout
5269
5270\begin_layout Section*
5271Tree elements management subroutines
5272\end_layout
5273
5274\begin_layout Standard
5275This set of subroutines enable the models to interact, complete or query
5276 the XML tree data base.
5277 New elements or group of elements can be added as child in the tree, attributes
5278 of the elements can be set or query.
5279 The type of element actually available are: context, axis, domain, grid,
5280 field, variable and file.
5281 An element can be identified by a string or by an handle associated to
5282 the type of the element.
5283 Root element (ex:
5284\begin_inset Quotes eld
5285\end_inset
5286
5287axis_definition
5288\begin_inset Quotes erd
5289\end_inset
5290
5291,
5292\begin_inset Quotes eld
5293\end_inset
5294
5295field_definition
5296\begin_inset Quotes erd
5297\end_inset
5298
5299,....) are considered like a group of element and are identified by a specific
5300 string
5301\begin_inset Quotes eld
5302\end_inset
5303
5304element_definition
5305\begin_inset Quotes erd
5306\end_inset
5307
5308 where element can be any one of the existing elements.
5309\end_layout
5310
5311\begin_layout Subsection*
5312Fortran type of the handles element
5313\end_layout
5314
5315\begin_layout Quotation
5316TYPE(xios_element)
5317\end_layout
5318
5319\begin_layout Standard
5320where
5321\begin_inset Quotes eld
5322\end_inset
5323
5324element
5325\begin_inset Quotes erd
5326\end_inset
5327
5328 can be any one among
5329\begin_inset Quotes eld
5330\end_inset
5331
5332context
5333\begin_inset Quotes erd
5334\end_inset
5335
5336,
5337\begin_inset Quotes eld
5338\end_inset
5339
5340axis
5341\begin_inset Quotes erd
5342\end_inset
5343
5344,
5345\begin_inset Quotes eld
5346\end_inset
5347
5348domain
5349\begin_inset Quotes erd
5350\end_inset
5351
5352,
5353\begin_inset Quotes eld
5354\end_inset
5355
5356grid
5357\begin_inset Quotes erd
5358\end_inset
5359
5360,
5361\begin_inset Quotes eld
5362\end_inset
5363
5364field
5365\begin_inset Quotes erd
5366\end_inset
5367
5368,
5369\begin_inset Quotes eld
5370\end_inset
5371
5372variable
5373\begin_inset Quotes erd
5374\end_inset
5375
5376 or
5377\begin_inset Quotes eld
5378\end_inset
5379
5380file
5381\begin_inset Quotes erd
5382\end_inset
5383
5384, or the associated group (excepted for context):
5385\begin_inset Quotes eld
5386\end_inset
5387
5388axis_group
5389\begin_inset Quotes erd
5390\end_inset
5391
5392,
5393\begin_inset Quotes eld
5394\end_inset
5395
5396domain_group
5397\begin_inset Quotes erd
5398\end_inset
5399
5400,
5401\begin_inset Quotes eld
5402\end_inset
5403
5404grid_group
5405\begin_inset Quotes erd
5406\end_inset
5407
5408,
5409\begin_inset Quotes eld
5410\end_inset
5411
5412field_group
5413\begin_inset Quotes erd
5414\end_inset
5415
5416,
5417\begin_inset Quotes eld
5418\end_inset
5419
5420variable_group
5421\begin_inset Quotes erd
5422\end_inset
5423
5424 or
5425\begin_inset Quotes eld
5426\end_inset
5427
5428file_group
5429\begin_inset Quotes erd
5430\end_inset
5431
5432.
5433\end_layout
5434
5435\begin_layout Subsection*
5436Getting handles
5437\end_layout
5438
5439\begin_layout Subsubsection*
5440Synopsis:
5441\end_layout
5442
5443\begin_layout LyX-Code
5444SUBROUTINE xios_get_element_handle(id,handle)
5445\end_layout
5446
5447\begin_layout LyX-Code
5448CHARACTER(len = *) , INTENT(IN) :: id
5449\end_layout
5450
5451\begin_layout LyX-Code
5452TYPE(xios_element), INTENT(OUT):: handle
5453\end_layout
5454
5455\begin_layout Standard
5456where element is one of the existing element or group of element.
5457\end_layout
5458
5459\begin_layout Subsubsection*
5460Arguments:
5461\end_layout
5462
5463\begin_layout Itemize
5464\begin_inset Flex Code
5465status collapsed
5466
5467\begin_layout Plain Layout
5468id
5469\end_layout
5470
5471\end_inset
5472
5473: string identifier.
5474\end_layout
5475
5476\begin_layout Itemize
5477\begin_inset Flex Code
5478status collapsed
5479
5480\begin_layout Plain Layout
5481handle
5482\end_layout
5483
5484\end_inset
5485
5486: element handle
5487\end_layout
5488
5489\begin_layout Subsubsection*
5490Description:
5491\end_layout
5492
5493\begin_layout Standard
5494This subroutine return the handle of the specified element identified by
5495 its string.
5496 The element must be existing otherwise it raise an error.
5497\end_layout
5498
5499\begin_layout Subsection*
5500Query for a valid element
5501\end_layout
5502
5503\begin_layout Subsubsection*
5504Synopsis:
5505\end_layout
5506
5507\begin_layout LyX-Code
5508LOGICAL FUNCTION xios_is_valid_element(id)
5509\end_layout
5510
5511\begin_layout LyX-Code
5512CHARACTER(len = *) , INTENT(IN) :: id
5513\end_layout
5514
5515\begin_layout Standard
5516where element is one of the existing element or group of element.
5517\end_layout
5518
5519\begin_layout Subsubsection*
5520Arguments:
5521\end_layout
5522
5523\begin_layout Itemize
5524\begin_inset Flex Code
5525status collapsed
5526
5527\begin_layout Plain Layout
5528id
5529\end_layout
5530
5531\end_inset
5532
5533: string identifier.
5534\end_layout
5535
5536\begin_layout Subsubsection*
5537Description:
5538\end_layout
5539
5540\begin_layout Standard
5541This function return .TRUE.
5542 if the element defined by the string identifier id is existing in the data
5543 base, otherwise it return .FALSE.
5544 .
5545\end_layout
5546
5547\begin_layout Subsection*
5548Adding child
5549\end_layout
5550
5551\begin_layout Subsubsection*
5552Synopsis:
5553\end_layout
5554
5555\begin_layout LyX-Code
5556SUBROUTINE xios_add_element(parent_handle, child_handle, child_id)
5557\end_layout
5558
5559\begin_layout LyX-Code
5560TYPE(xios_element)         , INTENT(IN) :: parent_handle
5561\end_layout
5562
5563\begin_layout LyX-Code
5564TYPE(xios_element)         , INTENT(OUT):: child_handle
5565\end_layout
5566
5567\begin_layout LyX-Code
5568CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
5569\end_layout
5570
5571\begin_layout Standard
5572where element is one of the existing element or group of element.
5573\end_layout
5574
5575\begin_layout Subsubsection*
5576Arguments:
5577\end_layout
5578
5579\begin_layout Itemize
5580\begin_inset Flex Code
5581status collapsed
5582
5583\begin_layout Plain Layout
5584parent_handle
5585\end_layout
5586
5587\end_inset
5588
5589: handle of the parent element.
5590\end_layout
5591
5592\begin_layout Itemize
5593\begin_inset Flex Code
5594status collapsed
5595
5596\begin_layout Plain Layout
5597child_handle
5598\end_layout
5599
5600\end_inset
5601
5602: handle of the child element.
5603\end_layout
5604
5605\begin_layout Itemize
5606\begin_inset Flex Code
5607status collapsed
5608
5609\begin_layout Plain Layout
5610child_id
5611\end_layout
5612
5613\end_inset
5614
5615: string identifier of the child.
5616\end_layout
5617
5618\begin_layout Subsubsection*
5619Description:
5620\end_layout
5621
5622\begin_layout Standard
5623This subroutine add a child to an existing parent element.
5624 The identifier of the child, if existing, can be specified optionally.
5625 All group elements can contains child of the same kind, provided generic
5626 inheritance.
5627 Some elements can contains children of an other kind for a specific behaviour.
5628 File element may contains field_group, field, variable and variable_group
5629 child elements.
5630 Field elements may contains variable_group of variable child element.
5631\end_layout
5632
5633\begin_layout Subsection*
5634Query if a value of an element attributes is defined (by handle)
5635\end_layout
5636
5637\begin_layout Subsubsection*
5638Synopsis:
5639\end_layout
5640
5641\begin_layout LyX-Code
5642SUBROUTINE xios_is_defined_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5643 ...)
5644\end_layout
5645
5646\begin_layout LyX-Code
5647TYPE(xios_element)         , INTENT(IN) :: handle
5648\end_layout
5649
5650\begin_layout LyX-Code
5651LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5652\end_layout
5653
5654\begin_layout LyX-Code
5655LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5656\end_layout
5657
5658\begin_layout LyX-Code
5659....
5660\end_layout
5661
5662\begin_layout Standard
5663where element is one of the existing element or group of element.
5664 attribute_x is describing in the chapter dedicated to the attribute description.
5665\end_layout
5666
5667\begin_layout Subsubsection*
5668Arguments:
5669\end_layout
5670
5671\begin_layout Itemize
5672\begin_inset Flex Code
5673status collapsed
5674
5675\begin_layout Plain Layout
5676handle
5677\end_layout
5678
5679\end_inset
5680
5681: element handle.
5682\end_layout
5683
5684\begin_layout Itemize
5685\begin_inset Flex Code
5686status collapsed
5687
5688\begin_layout Plain Layout
5689attr_x
5690\end_layout
5691
5692\end_inset
5693
5694: return true if the attribute as a defined value.
5695\end_layout
5696
5697\begin_layout Subsubsection*
5698Description:
5699\end_layout
5700
5701\begin_layout Standard
5702This subroutine my be used to query if one or more attributes of an element
5703 have a defined value.
5704 The list of attributes and their type are described in a specific chapter
5705 of the documentation.
5706 
5707\end_layout
5708
5709\begin_layout Subsection*
5710Query if a value of an element attributes is defined (by identifier)
5711\end_layout
5712
5713\begin_layout Subsubsection*
5714Synopsis:
5715\end_layout
5716
5717\begin_layout LyX-Code
5718SUBROUTINE xios_is_defined_element_attr(id, attr_1=attribute_1, attr_2=attribute
5719_2, ...)
5720\end_layout
5721
5722\begin_layout LyX-Code
5723CHARACTER(len = *) , INTENT(IN) :: id
5724\end_layout
5725
5726\begin_layout LyX-Code
5727LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5728\end_layout
5729
5730\begin_layout LyX-Code
5731LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5732\end_layout
5733
5734\begin_layout LyX-Code
5735....
5736\end_layout
5737
5738\begin_layout Standard
5739where element is one of the existing element or group of element.
5740 attribute_x is describing in the chapter dedicated to the attribute description.
5741\end_layout
5742
5743\begin_layout Subsubsection*
5744Arguments:
5745\end_layout
5746
5747\begin_layout Itemize
5748\begin_inset Flex Code
5749status collapsed
5750
5751\begin_layout Plain Layout
5752id
5753\end_layout
5754
5755\end_inset
5756
5757: element identifier.
5758\end_layout
5759
5760\begin_layout Itemize
5761\begin_inset Flex Code
5762status collapsed
5763
5764\begin_layout Plain Layout
5765attr_x
5766\end_layout
5767
5768\end_inset
5769
5770: return true if the attribute as a defined value.
5771\end_layout
5772
5773\begin_layout Subsubsection*
5774Description:
5775\end_layout
5776
5777\begin_layout Standard
5778This subroutine my be used to query if one or more attributes of an element
5779 have a defined value.
5780 The list of available attributes and their type are described in a specific
5781 chapter of the documentation.
5782 
5783\end_layout
5784
5785\begin_layout Subsection*
5786Setting element attributes value by handle
5787\end_layout
5788
5789\begin_layout Subsubsection*
5790Synopsis:
5791\end_layout
5792
5793\begin_layout LyX-Code
5794SUBROUTINE xios_set_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5795 ...)
5796\end_layout
5797
5798\begin_layout LyX-Code
5799TYPE(xios_element)         , INTENT(IN) :: handle
5800\end_layout
5801
5802\begin_layout LyX-Code
5803attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5804\end_layout
5805
5806\begin_layout LyX-Code
5807attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5808\end_layout
5809
5810\begin_layout LyX-Code
5811....
5812\end_layout
5813
5814\begin_layout Standard
5815where element is one of the existing element or group of element.
5816 attribute_x and attribute_type_x are describing in the chapter dedicated
5817 to the attribute description.
5818\end_layout
5819
5820\begin_layout Subsubsection*
5821Arguments:
5822\end_layout
5823
5824\begin_layout Itemize
5825\begin_inset Flex Code
5826status collapsed
5827
5828\begin_layout Plain Layout
5829handle
5830\end_layout
5831
5832\end_inset
5833
5834: element handle.
5835\end_layout
5836
5837\begin_layout Itemize
5838\begin_inset Flex Code
5839status collapsed
5840
5841\begin_layout Plain Layout
5842attr_x
5843\end_layout
5844
5845\end_inset
5846
5847: value of the attribute to be set.
5848\end_layout
5849
5850\begin_layout Subsubsection*
5851Description:
5852\end_layout
5853
5854\begin_layout Standard
5855This subroutine my be used to set one or more attribute to an element defined
5856 by its handle.
5857 The list of available attributes and their type are described in a specific
5858 chapter of the documentation.
5859 
5860\end_layout
5861
5862\begin_layout Subsection*
5863Setting element attributes value by id
5864\end_layout
5865
5866\begin_layout Subsubsection*
5867Synopsis:
5868\end_layout
5869
5870\begin_layout LyX-Code
5871SUBROUTINE xios_set_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
5872 ...)
5873\end_layout
5874
5875\begin_layout LyX-Code
5876CHARACTER(len = *),  INTENT(IN)          :: id
5877\end_layout
5878
5879\begin_layout LyX-Code
5880attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5881\end_layout
5882
5883\begin_layout LyX-Code
5884attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5885\end_layout
5886
5887\begin_layout LyX-Code
5888....
5889\end_layout
5890
5891\begin_layout Standard
5892where element is one of the existing element or group of element.
5893 attribute_x and attribute_type_x are describing in the chapter dedicated
5894 to the attribute description.
5895\end_layout
5896
5897\begin_layout Subsubsection*
5898Arguments:
5899\end_layout
5900
5901\begin_layout Itemize
5902\begin_inset Flex Code
5903status collapsed
5904
5905\begin_layout Plain Layout
5906id
5907\end_layout
5908
5909\end_inset
5910
5911: string identifier.
5912\end_layout
5913
5914\begin_layout Itemize
5915\begin_inset Flex Code
5916status collapsed
5917
5918\begin_layout Plain Layout
5919attr_x
5920\end_layout
5921
5922\end_inset
5923
5924: value of the attribute to be set.
5925\end_layout
5926
5927\begin_layout Subsubsection*
5928Description:
5929\end_layout
5930
5931\begin_layout Standard
5932This subroutine my be used to set one or more attribute to an element defined
5933 by its string id.
5934 The list of available attributes and their type are described in a specific
5935 chapter of the documentation.
5936\end_layout
5937
5938\begin_layout Subsection*
5939Getting element attributes value (by handle)
5940\end_layout
5941
5942\begin_layout Subsubsection*
5943Synopsis:
5944\end_layout
5945
5946\begin_layout LyX-Code
5947SUBROUTINE xios_get_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5948 ...)
5949\end_layout
5950
5951\begin_layout LyX-Code
5952TYPE(xios_element)         , INTENT(IN) :: handle
5953\end_layout
5954
5955\begin_layout LyX-Code
5956attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
5957\end_layout
5958
5959\begin_layout LyX-Code
5960attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
5961\end_layout
5962
5963\begin_layout LyX-Code
5964....
5965\end_layout
5966
5967\begin_layout Standard
5968where element is one of the existing element or group of element.
5969 attribute_x and attribute_type_x are describing in the chapter dedicated
5970 to the attribute description.
5971\end_layout
5972
5973\begin_layout Subsubsection*
5974Arguments:
5975\end_layout
5976
5977\begin_layout Itemize
5978\begin_inset Flex Code
5979status collapsed
5980
5981\begin_layout Plain Layout
5982handle
5983\end_layout
5984
5985\end_inset
5986
5987: element handle.
5988\end_layout
5989
5990\begin_layout Itemize
5991\begin_inset Flex Code
5992status collapsed
5993
5994\begin_layout Plain Layout
5995attr_x
5996\end_layout
5997
5998\end_inset
5999
6000: value of the attribute to be get.
6001\end_layout
6002
6003\begin_layout Subsubsection*
6004Description:
6005\end_layout
6006
6007\begin_layout Standard
6008This subroutine my be used to get one or more attribute value of an element
6009 defined by its handle.
6010 All attributes in the arguments list must be defined.
6011 The list of available attributes and their type are described in a specific
6012 chapter of the documentation.
6013 
6014\end_layout
6015
6016\begin_layout Subsection*
6017Getting element attributes value (by identifier)
6018\end_layout
6019
6020\begin_layout Subsubsection*
6021Synopsis:
6022\end_layout
6023
6024\begin_layout LyX-Code
6025SUBROUTINE xios_get_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
6026 ...)
6027\end_layout
6028
6029\begin_layout LyX-Code
6030CHARACTER(len = *),   INTENT(IN)          :: id
6031\end_layout
6032
6033\begin_layout LyX-Code
6034attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
6035\end_layout
6036
6037\begin_layout LyX-Code
6038attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
6039\end_layout
6040
6041\begin_layout LyX-Code
6042....
6043\end_layout
6044
6045\begin_layout Standard
6046where element is one of the existing element or group of element.
6047 attribute_x is describing in the chapter dedicated to the attribute description.
6048\end_layout
6049
6050\begin_layout Subsubsection*
6051Arguments:
6052\end_layout
6053
6054\begin_layout Itemize
6055\begin_inset Flex Code
6056status collapsed
6057
6058\begin_layout Plain Layout
6059id
6060\end_layout
6061
6062\end_inset
6063
6064: element string identifier.
6065\end_layout
6066
6067\begin_layout Itemize
6068\begin_inset Flex Code
6069status collapsed
6070
6071\begin_layout Plain Layout
6072attr_x
6073\end_layout
6074
6075\end_inset
6076
6077: value of the attribute to be get.
6078\end_layout
6079
6080\begin_layout Subsubsection*
6081Description:
6082\end_layout
6083
6084\begin_layout Standard
6085This subroutine my be used to get one or more attribute value of an element
6086 defined by its handle.
6087 All attributes in the arguments list must have a defined value.
6088 The list of available attributes and their type are described in a specific
6089 chapter of the documentation.
6090\end_layout
6091
6092\begin_layout Section*
6093Interface relative to context management
6094\end_layout
6095
6096\begin_layout Subsection*
6097XIOS context initialization
6098\end_layout
6099
6100\begin_layout Subsubsection*
6101Synopsis:
6102\end_layout
6103
6104\begin_layout LyX-Code
6105SUBROUTINE xios_context_initialize(context_id, context_comm)
6106\end_layout
6107
6108\begin_layout LyX-Code
6109  CHARACTER(LEN=*),INTENT(IN)         :: context_id
6110\end_layout
6111
6112\begin_layout LyX-Code
6113  INTEGER,INTENT(IN)                  :: context_comm
6114\end_layout
6115
6116\begin_layout Subsubsection*
6117Argument:
6118\end_layout
6119
6120\begin_layout Itemize
6121\begin_inset Flex Code
6122status collapsed
6123
6124\begin_layout Plain Layout
6125context_id
6126\end_layout
6127
6128\end_inset
6129
6130: context identifier
6131\end_layout
6132
6133\begin_layout Itemize
6134\begin_inset Flex Code
6135status collapsed
6136
6137\begin_layout Plain Layout
6138context_comm
6139\end_layout
6140
6141\end_inset
6142
6143: MPI communicator of the context
6144\end_layout
6145
6146\begin_layout Subsubsection*
6147Description:
6148\end_layout
6149
6150\begin_layout Standard
6151This subroutine initialize a context identified by
6152\begin_inset Flex Code
6153status collapsed
6154
6155\begin_layout Plain Layout
6156context_id
6157\end_layout
6158
6159\end_inset
6160
6161 string and must be called before any call related to this context.
6162 A context must be associated to a communicator, which can be the returned
6163 communicator of the
6164\begin_inset Flex Code
6165status collapsed
6166
6167\begin_layout Plain Layout
6168xios_initialize
6169\end_layout
6170
6171\end_inset
6172
6173 subroutine or a sub-communicator of this.
6174 The context initialization is dynamic and can be done at any time before
6175 the
6176\begin_inset Flex Code
6177status collapsed
6178
6179\begin_layout Plain Layout
6180xios_finalize
6181\end_layout
6182
6183\end_inset
6184
6185 call.
6186\end_layout
6187
6188\begin_layout Subsection*
6189XIOS context finalization
6190\end_layout
6191
6192\begin_layout Subsubsection*
6193Synopsis:
6194\end_layout
6195
6196\begin_layout LyX-Code
6197SUBROUTINE xios_context_finalize()
6198\end_layout
6199
6200\begin_layout Subsubsection*
6201Arguments:
6202\end_layout
6203
6204\begin_layout Standard
6205None
6206\end_layout
6207
6208\begin_layout Subsubsection*
6209Description:
6210\end_layout
6211
6212\begin_layout Standard
6213This subroutine must be call to close a context, before the
6214\begin_inset Flex Code
6215status collapsed
6216
6217\begin_layout Plain Layout
6218xios_finalize
6219\end_layout
6220
6221\end_inset
6222
6223 call.
6224 It waits until that all pending request sent to the servers will be processed
6225 and the opened files will be closed.
6226\end_layout
6227
6228\begin_layout Subsection*
6229Setting current active context
6230\end_layout
6231
6232\begin_layout Subsubsection*
6233Synopsis:
6234\end_layout
6235
6236\begin_layout LyX-Code
6237SUBROUTINE xios_set_current_context(context_handle)
6238\end_layout
6239
6240\begin_layout LyX-Code
6241TYPE(xios_context),INTENT(IN) :: context_handle
6242\end_layout
6243
6244\begin_layout Standard
6245or
6246\end_layout
6247
6248\begin_layout LyX-Code
6249SUBROUTINE xios_set_current_context(context_id)
6250\end_layout
6251
6252\begin_layout LyX-Code
6253CHARACTER(LEN=*),INTENT(IN) :: context_id
6254\end_layout
6255
6256\begin_layout Subsubsection*
6257Arguments:
6258\end_layout
6259
6260\begin_layout Itemize
6261\begin_inset Flex Code
6262status collapsed
6263
6264\begin_layout Plain Layout
6265context_handle
6266\end_layout
6267
6268\end_inset
6269
6270: handle of the context
6271\end_layout
6272
6273\begin_layout Standard
6274or
6275\end_layout
6276
6277\begin_layout Itemize
6278\begin_inset Flex Code
6279status collapsed
6280
6281\begin_layout Plain Layout
6282context_id
6283\end_layout
6284
6285\end_inset
6286
6287: string context identifier
6288\end_layout
6289
6290\begin_layout Subsubsection*
6291Description:
6292\end_layout
6293
6294\begin_layout Standard
6295These subroutines set the current active context.
6296 All xios calls after will refer to this active context.
6297 If only one context is defined, it is automatically set as the active context.
6298 
6299\end_layout
6300
6301\begin_layout Subsection*
6302Closing definition
6303\end_layout
6304
6305\begin_layout Subsubsection*
6306Synopsis:
6307\end_layout
6308
6309\begin_layout LyX-Code
6310SUBROUTINE xios_close_context_definition()
6311\end_layout
6312
6313\begin_layout Subsubsection*
6314Arguments:
6315\end_layout
6316
6317\begin_layout Standard
6318None
6319\end_layout
6320
6321\begin_layout Subsubsection*
6322Description:
6323\end_layout
6324
6325\begin_layout Standard
6326This subroutine must be call when all definitions of a context is finished
6327 at the end of the initialization and before entering to the time loop.
6328 A lot of operations are performed internally (inheritance, grid definition,
6329 contacting servers,...) so this call is mandatory.
6330 Any call related to the tree management definition done after will have
6331 an undefined effect.
6332\end_layout
6333
6334\begin_layout Section*
6335Interface relative to calendar management
6336\end_layout
6337
6338\begin_layout Subsection*
6339Creating the calendar
6340\end_layout
6341
6342\begin_layout Subsubsection*
6343Synopsis:
6344\end_layout
6345
6346\begin_layout LyX-Code
6347SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
6348 &
6349\begin_inset Newline newline
6350\end_inset
6351
6352                                day_length, month_lengths, year_length,
6353 &
6354\begin_inset Newline newline
6355\end_inset
6356
6357                                leap_year_month, leap_year_drift, &
6358\begin_inset Newline newline
6359\end_inset
6360
6361                                leap_year_drift_offset)
6362\begin_inset Newline newline
6363\end_inset
6364
6365CHARACTER(len = *),              INTENT(IN) :: type
6366\begin_inset Newline newline
6367\end_inset
6368
6369TYPE(xios_duration),   OPTIONAL, INTENT(IN) :: timestep
6370\begin_inset Newline newline
6371\end_inset
6372
6373TYPE(xios_date),       OPTIONAL, INTENT(IN) :: start_date
6374\begin_inset Newline newline
6375\end_inset
6376
6377TYPE(xios_date),       OPTIONAL, INTENT(IN) :: time_origin
6378\begin_inset Newline newline
6379\end_inset
6380
6381INTEGER,               OPTIONAL, INTENT(IN) :: day_length
6382\begin_inset Newline newline
6383\end_inset
6384
6385INTEGER,               OPTIONAL, INTENT(IN) :: month_lengths(:)
6386\begin_inset Newline newline
6387\end_inset
6388
6389INTEGER,               OPTIONAL, INTENT(IN) :: year_length
6390\begin_inset Newline newline
6391\end_inset
6392
6393DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift
6394\begin_inset Newline newline
6395\end_inset
6396
6397DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift_offset
6398\begin_inset Newline newline
6399\end_inset
6400
6401INTEGER,               OPTIONAL, INTENT(IN) :: leap_year_month
6402\end_layout
6403
6404\begin_layout Subsubsection*
6405Arguments:
6406\end_layout
6407
6408\begin_layout Itemize
6409\begin_inset Flex Code
6410status collapsed
6411
6412\begin_layout Plain Layout
6413type
6414\end_layout
6415
6416\end_inset
6417
6418: the calendar type, one of
6419\begin_inset Flex Code
6420status collapsed
6421
6422\begin_layout Plain Layout
6423"Gregorian"
6424\end_layout
6425
6426\end_inset
6427
6428,
6429\begin_inset Flex Code
6430status collapsed
6431
6432\begin_layout Plain Layout
6433"Julian"
6434\end_layout
6435
6436\end_inset
6437
6438,
6439\begin_inset Flex Code
6440status collapsed
6441
6442\begin_layout Plain Layout
6443"D360"
6444\end_layout
6445
6446\end_inset
6447
6448,
6449\begin_inset Flex Code
6450status collapsed
6451
6452\begin_layout Plain Layout
6453"AllLeap"
6454\end_layout
6455
6456\end_inset
6457
6458,
6459\begin_inset Flex Code
6460status collapsed
6461
6462\begin_layout Plain Layout
6463"NoLeap"
6464\end_layout
6465
6466\end_inset
6467
6468,
6469\begin_inset Flex Code
6470status collapsed
6471
6472\begin_layout Plain Layout
6473"user_defined"
6474\end_layout
6475
6476\end_inset
6477
6478
6479\end_layout
6480
6481\begin_layout Itemize
6482\begin_inset Flex Code
6483status collapsed
6484
6485\begin_layout Plain Layout
6486timestep
6487\end_layout
6488
6489\end_inset
6490
6491: the time step of the simulation (optional, can be set later)
6492\end_layout
6493
6494\begin_layout Itemize
6495\begin_inset Flex Code
6496status collapsed
6497
6498\begin_layout Plain Layout
6499start_date
6500\end_layout
6501
6502\end_inset
6503
6504: the start date of the simulation (optional,
6505\begin_inset Flex Code
6506status collapsed
6507
6508\begin_layout Plain Layout
6509xios_date(0000, 01, 01, 00, 00, 00)
6510\end_layout
6511
6512\end_inset
6513
6514 is used by default)
6515\end_layout
6516
6517\begin_layout Itemize
6518\begin_inset Flex Code
6519status collapsed
6520
6521\begin_layout Plain Layout
6522time_origin
6523\end_layout
6524
6525\end_inset
6526
6527: the origin of the time axis (optional,
6528\begin_inset Flex Code
6529status collapsed
6530
6531\begin_layout Plain Layout
6532xios_date(0000, 01, 01, 00, 00, 00)
6533\end_layout
6534
6535\end_inset
6536
6537 is used by default)
6538\end_layout
6539
6540\begin_layout Itemize
6541\begin_inset Flex Code
6542status collapsed
6543
6544\begin_layout Plain Layout
6545day_length
6546\end_layout
6547
6548\end_inset
6549
6550: the length of a day in seconds (mandatory when creating an user defined
6551 calendar, must not be set otherwise)
6552\end_layout
6553
6554\begin_layout Itemize
6555\begin_inset Flex Code
6556status collapsed
6557
6558\begin_layout Plain Layout
6559month_lengths
6560\end_layout
6561
6562\end_inset
6563
6564: the length of each month of the year in days (either
6565\begin_inset Flex Code
6566status collapsed
6567
6568\begin_layout Plain Layout
6569month_lengths
6570\end_layout
6571
6572\end_inset
6573
6574 or
6575\begin_inset Flex Code
6576status collapsed
6577
6578\begin_layout Plain Layout
6579year_length
6580\end_layout
6581
6582\end_inset
6583
6584 must be set when creating an user defined calendar, must not be set otherwise)
6585\end_layout
6586
6587\begin_layout Itemize
6588\begin_inset Flex Code
6589status collapsed
6590
6591\begin_layout Plain Layout
6592year_length
6593\end_layout
6594
6595\end_inset
6596
6597: the length of a year in seconds (either
6598\begin_inset Flex Code
6599status collapsed
6600
6601\begin_layout Plain Layout
6602month_lengths
6603\end_layout
6604
6605\end_inset
6606
6607 or
6608\begin_inset Flex Code
6609status collapsed
6610
6611\begin_layout Plain Layout
6612year_length
6613\end_layout
6614
6615\end_inset
6616
6617 must be set when creating an user defined calendar, must not be set otherwise)
6618\end_layout
6619
6620\begin_layout Itemize
6621\begin_inset Flex Code
6622status collapsed
6623
6624\begin_layout Plain Layout
6625leap_year_drift
6626\end_layout
6627
6628\end_inset
6629
6630: the yearly drift between the user defined calendar and the astronomical
6631 calendar, expressed as a fraction of day (can optionally be set when creating
6632 an user defined calendar in which case
6633\begin_inset Flex Code
6634status collapsed
6635
6636\begin_layout Plain Layout
6637leap_year_month
6638\end_layout
6639
6640\end_inset
6641
6642 must be set too)
6643\end_layout
6644
6645\begin_layout Itemize
6646\begin_inset Flex Code
6647status collapsed
6648
6649\begin_layout Plain Layout
6650leap_year_drift_offset
6651\end_layout
6652
6653\end_inset
6654
6655: the initial drift between the user defined calendar and the astronomical
6656 calendar at the time origin, expressed as a fraction of day (can optionally
6657 be set if
6658\begin_inset Flex Code
6659status collapsed
6660
6661\begin_layout Plain Layout
6662leap_year_drift
6663\end_layout
6664
6665\end_inset
6666
6667 and
6668\begin_inset Flex Code
6669status collapsed
6670
6671\begin_layout Plain Layout
6672leap_year_month
6673\end_layout
6674
6675\end_inset
6676
6677 are set)
6678\end_layout
6679
6680\begin_layout Itemize
6681\begin_inset Flex Code
6682status collapsed
6683
6684\begin_layout Plain Layout
6685leap_year_month
6686\end_layout
6687
6688\end_inset
6689
6690: the month to which an extra day must be added in case of leap year (can
6691 optionally be set when creating an user defined calendar in which case
6692 
6693\begin_inset Flex Code
6694status collapsed
6695
6696\begin_layout Plain Layout
6697leap_year_drift
6698\end_layout
6699
6700\end_inset
6701
6702 must be set too)
6703\end_layout
6704
6705\begin_layout Standard
6706For a more detailed description of those arguments, see the description
6707 of the corresponding attributes in section 1.2
6708\begin_inset Quotes eld
6709\end_inset
6710
6711Calendar attribute reference
6712\begin_inset Quotes erd
6713\end_inset
6714
6715.
6716\end_layout
6717
6718\begin_layout Subsubsection*
6719Description:
6720\end_layout
6721
6722\begin_layout Standard
6723This subroutine creates the calendar for the current context.
6724 Note that the calendar is created once and for all, either from the XML
6725 configuration file or the Fortran interface.
6726 If it was not created from the configuration file, then this subroutine
6727 must be called once and only once before the context definition is closed.
6728 The calendar features can be used immediately after the calendar was created.
6729\begin_inset Newline newline
6730\end_inset
6731
6732
6733\begin_inset Newline newline
6734\end_inset
6735
6736If an user defined calendar is created, the following arguments must also
6737 be provided:
6738\begin_inset Flex Code
6739status collapsed
6740
6741\begin_layout Plain Layout
6742day_length
6743\end_layout
6744
6745\end_inset
6746
6747 and either
6748\begin_inset Flex Code
6749status collapsed
6750
6751\begin_layout Plain Layout
6752month_lengths
6753\end_layout
6754
6755\end_inset
6756
6757 or
6758\begin_inset Flex Code
6759status collapsed
6760
6761\begin_layout Plain Layout
6762year_length
6763\end_layout
6764
6765\end_inset
6766
6767.
6768 Optionally it is possible to configure the user defined calendar to have
6769 leap years.
6770 In this case,
6771\begin_inset Flex Code
6772status collapsed
6773
6774\begin_layout Plain Layout
6775leap_year_drift
6776\end_layout
6777
6778\end_inset
6779
6780 and
6781\begin_inset Flex Code
6782status collapsed
6783
6784\begin_layout Plain Layout
6785leap_year_month
6786\end_layout
6787
6788\end_inset
6789
6790 must also be provided and
6791\begin_inset Flex Code
6792status collapsed
6793
6794\begin_layout Plain Layout
6795leap_year_drift_offset
6796\end_layout
6797
6798\end_inset
6799
6800 might be used.
6801\end_layout
6802
6803\begin_layout Subsection*
6804Accessing the calendar type of the current calendar
6805\end_layout
6806
6807\begin_layout Subsubsection*
6808Synopsis:
6809\end_layout
6810
6811\begin_layout LyX-Code
6812SUBROUTINE xios_get_calendar_type(calendar_type)
6813\begin_inset Newline newline
6814\end_inset
6815
6816CHARACTER(len=*), INTENT(OUT) :: calendar_type
6817\end_layout
6818
6819\begin_layout Subsubsection*
6820Arguments:
6821\end_layout
6822
6823\begin_layout Itemize
6824\begin_inset Flex Code
6825status collapsed
6826
6827\begin_layout Plain Layout
6828calendar_type
6829\end_layout
6830
6831\end_inset
6832
6833: on output, the type of the calendar attached to the current context
6834\end_layout
6835
6836\begin_layout Subsubsection*
6837Description:
6838\end_layout
6839
6840\begin_layout Standard
6841This subroutine gets the calendar type associated to the current context.
6842 It will raise an error if used before the calendar was created.
6843\end_layout
6844
6845\begin_layout Subsection*
6846Accessing and defining the time step of the current calendar
6847\end_layout
6848
6849\begin_layout Subsubsection*
6850Synopsis:
6851\end_layout
6852
6853\begin_layout LyX-Code
6854SUBROUTINE xios_get_timestep(timestep)
6855\begin_inset Newline newline
6856\end_inset
6857
6858TYPE(xios_duration), INTENT(OUT) :: timestep
6859\end_layout
6860
6861\begin_layout Standard
6862and
6863\end_layout
6864
6865\begin_layout LyX-Code
6866SUBROUTINE xios_set_timestep(timestep)
6867\begin_inset Newline newline
6868\end_inset
6869
6870TYPE(xios_duration), INTENT(IN) :: timestep
6871\end_layout
6872
6873\begin_layout Subsubsection*
6874Arguments:
6875\end_layout
6876
6877\begin_layout Itemize
6878\begin_inset Flex Code
6879status collapsed
6880
6881\begin_layout Plain Layout
6882timestep
6883\end_layout
6884
6885\end_inset
6886
6887: a duration corresponding to the time step of the simulation
6888\end_layout
6889
6890\begin_layout Subsubsection*
6891Description:
6892\end_layout
6893
6894\begin_layout Standard
6895Those subroutines respectively gets and sets the time step associated to
6896 the calendar of the current context.
6897 Note that the time step must always be set before the context definition
6898 is closed and that an error will be raised if the getter subroutine is
6899 used before the time step is defined.
6900\end_layout
6901
6902\begin_layout Subsection*
6903Accessing and defining the start date of the current calendar
6904\end_layout
6905
6906\begin_layout Subsubsection*
6907Synopsis:
6908\end_layout
6909
6910\begin_layout LyX-Code
6911SUBROUTINE xios_get_start_date(start_date)
6912\begin_inset Newline newline
6913\end_inset
6914
6915TYPE(xios_date), INTENT(OUT) :: start_date
6916\end_layout
6917
6918\begin_layout Standard
6919and
6920\end_layout
6921
6922\begin_layout LyX-Code
6923SUBROUTINE xios_set_start_date(start_date)
6924\begin_inset Newline newline
6925\end_inset
6926
6927TYPE(xios_date), INTENT(IN) :: start_date
6928\end_layout
6929
6930\begin_layout Subsubsection*
6931Arguments:
6932\end_layout
6933
6934\begin_layout Itemize
6935\begin_inset Flex Code
6936status collapsed
6937
6938\begin_layout Plain Layout
6939start_date
6940\end_layout
6941
6942\end_inset
6943
6944: a date corresponding to the beginning of the simulation
6945\end_layout
6946
6947\begin_layout Subsubsection*
6948Description:
6949\end_layout
6950
6951\begin_layout Standard
6952Those subroutines respectively gets and sets the start date associated to
6953 the calendar of the current context.
6954 They must not be used before the calendar was created.
6955\end_layout
6956
6957\begin_layout Subsection*
6958Accessing and defining the time origin of the current calendar
6959\end_layout
6960
6961\begin_layout Subsubsection*
6962Synopsis:
6963\end_layout
6964
6965\begin_layout LyX-Code
6966SUBROUTINE xios_get_time_origin(time_origin)
6967\begin_inset Newline newline
6968\end_inset
6969
6970TYPE(xios_date), INTENT(OUT) :: time_origin
6971\end_layout
6972
6973\begin_layout Standard
6974and
6975\end_layout
6976
6977\begin_layout LyX-Code
6978SUBROUTINE xios_set_time_date(time_origin)
6979\begin_inset Newline newline
6980\end_inset
6981
6982TYPE(xios_date), INTENT(IN) :: time_origin
6983\end_layout
6984
6985\begin_layout Subsubsection*
6986Arguments:
6987\end_layout
6988
6989\begin_layout Itemize
6990\begin_inset Flex Code
6991status collapsed
6992
6993\begin_layout Plain Layout
6994start_date
6995\end_layout
6996
6997\end_inset
6998
6999: a date corresponding to the origin of the time axis
7000\end_layout
7001
7002\begin_layout Subsubsection*
7003Description:
7004\end_layout
7005
7006\begin_layout Standard
7007Those subroutines respectively gets and sets the origin of time associated
7008 to the calendar of the current context.
7009 They must not be used before the calendar was created.
7010\end_layout
7011
7012\begin_layout Subsection*
7013Updating the current date of the current calendar
7014\end_layout
7015
7016\begin_layout Subsubsection*
7017Synopsis:
7018\end_layout
7019
7020\begin_layout LyX-Code
7021SUBROUTINE xios_update_calendar(step)
7022\begin_inset Newline newline
7023\end_inset
7024
7025INTEGER, INTENT(IN) :: step
7026\end_layout
7027
7028\begin_layout Subsubsection*
7029Arguments:
7030\end_layout
7031
7032\begin_layout Itemize
7033\begin_inset Flex Code
7034status collapsed
7035
7036\begin_layout Plain Layout
7037step
7038\end_layout
7039
7040\end_inset
7041
7042: the current iteration number
7043\end_layout
7044
7045\begin_layout Subsubsection*
7046Description:
7047\end_layout
7048
7049\begin_layout Standard
7050This subroutine sets the current date associated to the calendar of the
7051 current context based on the current iteration number:
7052\begin_inset Formula $current\_date=start\_date+step\times timestep$
7053\end_inset
7054
7055.
7056 It must not be used before the calendar was created.
7057\end_layout
7058
7059\begin_layout Subsection*
7060Accessing the current date of the current calendar
7061\end_layout
7062
7063\begin_layout Subsubsection*
7064Synopsis:
7065\end_layout
7066
7067\begin_layout LyX-Code
7068SUBROUTINE xios_get_current_date(current_date)
7069\begin_inset Newline newline
7070\end_inset
7071
7072TYPE(xios_date), INTENT(OUT) :: current_date
7073\end_layout
7074
7075\begin_layout Subsubsection*
7076Arguments:
7077\end_layout
7078
7079\begin_layout Itemize
7080\begin_inset Flex Code
7081status collapsed
7082
7083\begin_layout Plain Layout
7084current_date
7085\end_layout
7086
7087\end_inset
7088
7089: on output, the current date
7090\end_layout
7091
7092\begin_layout Subsubsection*
7093Description:
7094\end_layout
7095
7096\begin_layout Standard
7097This subroutine gets the current date associated to the calendar of the
7098 current context.
7099 It must not be used before the calendar was created.
7100\end_layout
7101
7102\begin_layout Subsection*
7103Accessing the year length of the current calendar
7104\end_layout
7105
7106\begin_layout Subsubsection*
7107Synopsis:
7108\end_layout
7109
7110\begin_layout LyX-Code
7111INTEGER FUNCTION xios_get_year_length_in_seconds(year)
7112\begin_inset Newline newline
7113\end_inset
7114
7115INTEGER, INTENT(IN) :: year
7116\end_layout
7117
7118\begin_layout Subsubsection*
7119Arguments:
7120\end_layout
7121
7122\begin_layout Itemize
7123\begin_inset Flex Code
7124status collapsed
7125
7126\begin_layout Plain Layout
7127year
7128\end_layout
7129
7130\end_inset
7131
7132: the year whose length is requested
7133\end_layout
7134
7135\begin_layout Subsubsection*
7136Description:
7137\end_layout
7138
7139\begin_layout Standard
7140This function returns the duration in seconds of the specified year, taking
7141 leap years into account based on the calendar of the current context.
7142 It must not be used before the calendar was created.
7143\end_layout
7144
7145\begin_layout Subsection*
7146Accessing the day length of the current calendar
7147\end_layout
7148
7149\begin_layout Subsubsection*
7150Synopsis:
7151\end_layout
7152
7153\begin_layout LyX-Code
7154INTEGER FUNCTION xios_get_day_length_in_seconds()
7155\end_layout
7156
7157\begin_layout Subsubsection*
7158Arguments: None
7159\end_layout
7160
7161\begin_layout Subsubsection*
7162Description:
7163\end_layout
7164
7165\begin_layout Standard
7166This function returns the duration in seconds of a day, based on the calendar
7167 of the current context.
7168 It must not be used before the calendar was created.
7169\end_layout
7170
7171\begin_layout Section*
7172Interface relative to duration handling
7173\end_layout
7174
7175\begin_layout Subsection*
7176Duration constants
7177\end_layout
7178
7179\begin_layout Standard
7180Some duration constants are available to ease duration handling:
7181\end_layout
7182
7183\begin_layout Itemize
7184\begin_inset Flex Code
7185status collapsed
7186
7187\begin_layout Plain Layout
7188xios_year
7189\end_layout
7190
7191\end_inset
7192
7193
7194\end_layout
7195
7196\begin_layout Itemize
7197\begin_inset Flex Code
7198status collapsed
7199
7200\begin_layout Plain Layout
7201xios_month
7202\end_layout
7203
7204\end_inset
7205
7206
7207\end_layout
7208
7209\begin_layout Itemize
7210\begin_inset Flex Code
7211status collapsed
7212
7213\begin_layout Plain Layout
7214xios_day
7215\end_layout
7216
7217\end_inset
7218
7219
7220\end_layout
7221
7222\begin_layout Itemize
7223\begin_inset Flex Code
7224status collapsed
7225
7226\begin_layout Plain Layout
7227xios_hour
7228\end_layout
7229
7230\end_inset
7231
7232
7233\end_layout
7234
7235\begin_layout Itemize
7236\begin_inset Flex Code
7237status collapsed
7238
7239\begin_layout Plain Layout
7240xios_minute
7241\end_layout
7242
7243\end_inset
7244
7245
7246\end_layout
7247
7248\begin_layout Itemize
7249\begin_inset Flex Code
7250status collapsed
7251
7252\begin_layout Plain Layout
7253xios_second
7254\end_layout
7255
7256\end_inset
7257
7258
7259\end_layout
7260
7261\begin_layout Itemize
7262\begin_inset Flex Code
7263status collapsed
7264
7265\begin_layout Plain Layout
7266xios_timestep
7267\end_layout
7268
7269\end_inset
7270
7271
7272\end_layout
7273
7274\begin_layout Subsection*
7275Arithmetic operations on duration
7276\end_layout
7277
7278\begin_layout Standard
7279The following arithmetic operations on duration are available:
7280\end_layout
7281
7282\begin_layout Itemize
7283Addition:
7284\begin_inset Flex Code
7285status collapsed
7286
7287\begin_layout Plain Layout
7288xios_duration = xios_duration + xios_duration
7289\end_layout
7290
7291\end_inset
7292
7293
7294\end_layout
7295
7296\begin_layout Itemize
7297Subtraction:
7298\begin_inset Flex Code
7299status collapsed
7300
7301\begin_layout Plain Layout
7302xios_duration = xios_duration - xios_duration
7303\end_layout
7304
7305\end_inset
7306
7307
7308\end_layout
7309
7310\begin_layout Itemize
7311Multiplication by a scalar value:
7312\begin_inset Flex Code
7313status collapsed
7314
7315\begin_layout Plain Layout
7316xios_duration = scalar * xios_duration
7317\end_layout
7318
7319\end_inset
7320
7321 or
7322\begin_inset Flex Code
7323status collapsed
7324
7325\begin_layout Plain Layout
7326xios_duration = xios_duration * scalar
7327\end_layout
7328
7329\end_inset
7330
7331
7332\end_layout
7333
7334\begin_layout Itemize
7335Negation:
7336\begin_inset Flex Code
7337status collapsed
7338
7339\begin_layout Plain Layout
7340xios_duration = -xios_duration
7341\end_layout
7342
7343\end_inset
7344
7345
7346\end_layout
7347
7348\begin_layout Subsection*
7349Comparison operations on duration
7350\end_layout
7351
7352\begin_layout Standard
7353The following comparison operations on duration are available:
7354\end_layout
7355
7356\begin_layout Itemize
7357Equality:
7358\begin_inset Flex Code
7359status collapsed
7360
7361\begin_layout Plain Layout
7362LOGICAL = xios_duration == xios_duration
7363\end_layout
7364
7365\end_inset
7366
7367
7368\end_layout
7369
7370\begin_layout Itemize
7371Inequality:
7372\begin_inset Flex Code
7373status collapsed
7374
7375\begin_layout Plain Layout
7376LOGICAL = xios_duration /= xios_duration
7377\end_layout
7378
7379\end_inset
7380
7381
7382\end_layout
7383
7384\begin_layout Section*
7385Interface relative to date handling
7386\end_layout
7387
7388\begin_layout Subsection*
7389Arithmetic operations on dates
7390\end_layout
7391
7392\begin_layout Standard
7393The following arithmetic operations on dates are available:
7394\end_layout
7395
7396\begin_layout Itemize
7397Addition of a duration:
7398\begin_inset Flex Code
7399status collapsed
7400
7401\begin_layout Plain Layout
7402xios_date = xios_date + xios_duration
7403\end_layout
7404
7405\end_inset
7406
7407
7408\end_layout
7409
7410\begin_layout Itemize
7411Subtraction of a duration:
7412\begin_inset Flex Code
7413status collapsed
7414
7415\begin_layout Plain Layout
7416xios_date = xios_date - xios_duration
7417\end_layout
7418
7419\end_inset
7420
7421
7422\end_layout
7423
7424\begin_layout Itemize
7425Subtraction of two dates:
7426\begin_inset Flex Code
7427status collapsed
7428
7429\begin_layout Plain Layout
7430xios_duration = xios_date - xios_date
7431\end_layout
7432
7433\end_inset
7434
7435
7436\end_layout
7437
7438\begin_layout Subsection*
7439Comparison operations on dates
7440\end_layout
7441
7442\begin_layout Standard
7443The following comparison operations on dates are available:
7444\end_layout
7445
7446\begin_layout Itemize
7447Equality:
7448\begin_inset Flex Code
7449status collapsed
7450
7451\begin_layout Plain Layout
7452LOGICAL = xios_date == xios_date
7453\end_layout
7454
7455\end_inset
7456
7457
7458\end_layout
7459
7460\begin_layout Itemize
7461Inequality:
7462\begin_inset Flex Code
7463status collapsed
7464
7465\begin_layout Plain Layout
7466LOGICAL = xios_date /= xios_date
7467\end_layout
7468
7469\end_inset
7470
7471
7472\end_layout
7473
7474\begin_layout Itemize
7475Less than:
7476\begin_inset Flex Code
7477status collapsed
7478
7479\begin_layout Plain Layout
7480LOGICAL = xios_date < xios_date
7481\end_layout
7482
7483\end_inset
7484
7485
7486\end_layout
7487
7488\begin_layout Itemize
7489Less or equal:
7490\begin_inset Flex Code
7491status collapsed
7492
7493\begin_layout Plain Layout
7494LOGICAL = xios_date <= xios_date
7495\end_layout
7496
7497\end_inset
7498
7499
7500\end_layout
7501
7502\begin_layout Itemize
7503Greater than:
7504\begin_inset Flex Code
7505status collapsed
7506
7507\begin_layout Plain Layout
7508LOGICAL = xios_date > xios_date
7509\end_layout
7510
7511\end_inset
7512
7513
7514\end_layout
7515
7516\begin_layout Itemize
7517Greater or equal:
7518\begin_inset Flex Code
7519status collapsed
7520
7521\begin_layout Plain Layout
7522LOGICAL = xios_date >= xios_date
7523\end_layout
7524
7525\end_inset
7526
7527
7528\end_layout
7529
7530\begin_layout Subsection*
7531Converting a date to a number of seconds since the time origin
7532\end_layout
7533
7534\begin_layout Subsubsection*
7535Synopsis:
7536\end_layout
7537
7538\begin_layout LyX-Code
7539FUNCTION INTEGER(kind = 8) xios_date_convert_to_seconds(date)
7540\begin_inset Newline newline
7541\end_inset
7542
7543TYPE(xios_date), INTENT(IN) :: date
7544\end_layout
7545
7546\begin_layout Subsubsection*
7547Arguments:
7548\end_layout
7549
7550\begin_layout Itemize
7551\begin_inset Flex Code
7552status collapsed
7553
7554\begin_layout Plain Layout
7555date
7556\end_layout
7557
7558\end_inset
7559
7560: the date to convert
7561\end_layout
7562
7563\begin_layout Subsubsection*
7564Description:
7565\end_layout
7566
7567\begin_layout Standard
7568This function returns the number of seconds since the time origin for the
7569 specified date, based on the calendar of the current context.
7570 It must not be used before the calendar was created.
7571\end_layout
7572
7573\begin_layout Subsection*
7574Converting a date to a number of seconds since the beginning of the year
7575\end_layout
7576
7577\begin_layout Subsubsection*
7578Synopsis:
7579\end_layout
7580
7581\begin_layout LyX-Code
7582FUNCTION INTEGER xios(date_get_second_of_year)(date)
7583\begin_inset Newline newline
7584\end_inset
7585
7586TYPE(xios_date), INTENT(IN) :: date
7587\end_layout
7588
7589\begin_layout Subsubsection*
7590Arguments:
7591\end_layout
7592
7593\begin_layout Itemize
7594\begin_inset Flex Code
7595status collapsed
7596
7597\begin_layout Plain Layout
7598date
7599\end_layout
7600
7601\end_inset
7602
7603: the date to convert
7604\end_layout
7605
7606\begin_layout Subsubsection*
7607Description:
7608\end_layout
7609
7610\begin_layout Standard
7611This function returns the number of seconds since the beginning of the year
7612 for the specified date, based on the calendar of the current context.
7613 It must not be used before the calendar was created.
7614\end_layout
7615
7616\begin_layout Subsection*
7617Converting a date to a number of days since the beginning of the year
7618\end_layout
7619
7620\begin_layout Subsubsection*
7621Synopsis:
7622\end_layout
7623
7624\begin_layout LyX-Code
7625FUNCTION DOUBLE_PRECISION xios_date_get_day_of_year(date)
7626\begin_inset Newline newline
7627\end_inset
7628
7629TYPE(xios_date), INTENT(IN) :: date
7630\end_layout
7631
7632\begin_layout Subsubsection*
7633Arguments:
7634\end_layout
7635
7636\begin_layout Itemize
7637\begin_inset Flex Code
7638status collapsed
7639
7640\begin_layout Plain Layout
7641date
7642\end_layout
7643
7644\end_inset
7645
7646: the date to convert
7647\end_layout
7648
7649\begin_layout Subsubsection*
7650Description:
7651\end_layout
7652
7653\begin_layout Standard
7654This function returns the number of days since the beginning of the year
7655 for the specified date, based on the calendar of the current context.
7656 It must not be used before the calendar was created.
7657\end_layout
7658
7659\begin_layout Subsection*
7660Converting a date to a fraction of the current year
7661\end_layout
7662
7663\begin_layout Subsubsection*
7664Synopsis:
7665\end_layout
7666
7667\begin_layout LyX-Code
7668FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_year(date)
7669\begin_inset Newline newline
7670\end_inset
7671
7672TYPE(xios_date), INTENT(IN) :: date
7673\end_layout
7674
7675\begin_layout Subsubsection*
7676Arguments:
7677\end_layout
7678
7679\begin_layout Itemize
7680\begin_inset Flex Code
7681status collapsed
7682
7683\begin_layout Plain Layout
7684date
7685\end_layout
7686
7687\end_inset
7688
7689: the date to convert
7690\end_layout
7691
7692\begin_layout Subsubsection*
7693Description:
7694\end_layout
7695
7696\begin_layout Standard
7697This function returns the fraction of year corresponding to the specified
7698 date, based on the calendar of the current context.
7699 It must not be used before the calendar was created.
7700\end_layout
7701
7702\begin_layout Subsection*
7703Converting a date to a number of seconds since the beginning of the day
7704\end_layout
7705
7706\begin_layout Subsubsection*
7707Synopsis:
7708\end_layout
7709
7710\begin_layout LyX-Code
7711FUNCTION INTEGER xios(date_get_second_of_day)(date)
7712\begin_inset Newline newline
7713\end_inset
7714
7715TYPE(xios_date), INTENT(IN) :: date
7716\end_layout
7717
7718\begin_layout Subsubsection*
7719Arguments:
7720\end_layout
7721
7722\begin_layout Itemize
7723\begin_inset Flex Code
7724status collapsed
7725
7726\begin_layout Plain Layout
7727date
7728\end_layout
7729
7730\end_inset
7731
7732: the date to convert
7733\end_layout
7734
7735\begin_layout Subsubsection*
7736Description:
7737\end_layout
7738
7739\begin_layout Standard
7740This function returns the number of seconds since the beginning of the day
7741 for the specified date, based on the calendar of the current context.
7742 It must not be used before the calendar was created.
7743\end_layout
7744
7745\begin_layout Subsection*
7746Converting a date to a fraction of the current day
7747\end_layout
7748
7749\begin_layout Subsubsection*
7750Synopsis:
7751\end_layout
7752
7753\begin_layout LyX-Code
7754FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_day(date)
7755\begin_inset Newline newline
7756\end_inset
7757
7758TYPE(xios_date), INTENT(IN) :: date
7759\end_layout
7760
7761\begin_layout Subsubsection*
7762Arguments:
7763\end_layout
7764
7765\begin_layout Itemize
7766\begin_inset Flex Code
7767status collapsed
7768
7769\begin_layout Plain Layout
7770date
7771\end_layout
7772
7773\end_inset
7774
7775: the date to convert
7776\end_layout
7777
7778\begin_layout Subsubsection*
7779Description:
7780\end_layout
7781
7782\begin_layout Standard
7783This function returns the fraction of day corresponding to the specified
7784 date, based on the calendar of the current context.
7785 It must not be used before the calendar was created.
7786\end_layout
7787
7788\end_body
7789\end_document
Note: See TracBrowser for help on using the repository browser.