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

Last change on this file since 1533 was 1182, checked in by rlacroix, 4 years ago

Update the documentation.

Document the "xios_field_is_active" function and the "check_if_active" field attribute.

File size: 125.9 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*
3439check_if_active:
3440\emph on
3441bool
3442\end_layout
3443
3444\begin_layout Standard
3445Fortran:
3446\end_layout
3447
3448\begin_layout LyX-Code
3449LOGICAL :: check_if_active
3450\end_layout
3451
3452\begin_layout Standard
3453Define whether XIOS will automatically check if the field is active at current
3454 timestep when sending data from the model.
3455 Enabling this behavior can sometimes improve the performances by avoiding
3456 unneeded data processing.
3457 This attribute is optional, the default value is
3458\begin_inset Flex Strong
3459status collapsed
3460
3461\begin_layout Plain Layout
3462false
3463\end_layout
3464
3465\end_inset
3466
3467.
3468\end_layout
3469
3470\begin_layout Subsection*
3471field_ref:
3472\emph on
3473string
3474\end_layout
3475
3476\begin_layout Standard
3477Fortran:
3478\end_layout
3479
3480\begin_layout LyX-Code
3481CHARACTER(LEN=*) :: field_ref
3482\end_layout
3483
3484\begin_layout Standard
3485Define a field reference.
3486 All attributes are inherited from the referenced field after the classical
3487 inheritance mechanism.
3488 The value assigned to the referenced field is transmitted to to current
3489 field to perform temporal operation.
3490 This attribute is optional.
3491\end_layout
3492
3493\begin_layout Subsection*
3494grid_ref:
3495\emph on
3496string
3497\end_layout
3498
3499\begin_layout Standard
3500Fortran:
3501\end_layout
3502
3503\begin_layout LyX-Code
3504CHARACTER(LEN=*) :: grid_ref
3505\end_layout
3506
3507\begin_layout Standard
3508Define on which grid the current field is defined.
3509 This attribute is optional, if missing, domain_ref and axis_ref must be
3510 defining.
3511\end_layout
3512
3513\begin_layout Subsection*
3514domain_ref:
3515\emph on
3516string
3517\end_layout
3518
3519\begin_layout Standard
3520Fortran:
3521\end_layout
3522
3523\begin_layout LyX-Code
3524CHARACTER(LEN=*) :: domain_ref
3525\end_layout
3526
3527\begin_layout Standard
3528Define on which horizontal domain the current field is defined.
3529 This attribute is optional, but if this attribute is defined,
3530\begin_inset Flex Strong
3531status collapsed
3532
3533\begin_layout Plain Layout
3534grid_ref
3535\end_layout
3536
3537\end_inset
3538
3539 must not be.
3540\end_layout
3541
3542\begin_layout Subsection*
3543axis_ref:
3544\emph on
3545string
3546\end_layout
3547
3548\begin_layout Standard
3549Fortran:
3550\end_layout
3551
3552\begin_layout LyX-Code
3553CHARACTER(LEN=*) :: axis_ref
3554\end_layout
3555
3556\begin_layout Standard
3557Define on which vertical axis the current field is defined.
3558 This attribute is optional, but if this attribute is defined,
3559\begin_inset Flex Strong
3560status collapsed
3561
3562\begin_layout Plain Layout
3563domain_ref
3564\end_layout
3565
3566\end_inset
3567
3568 must be too and
3569\begin_inset Flex Strong
3570status collapsed
3571
3572\begin_layout Plain Layout
3573grid_ref
3574\end_layout
3575
3576\end_inset
3577
3578 must not.
3579\end_layout
3580
3581\begin_layout Subsection*
3582grid_path:
3583\emph on
3584string
3585\end_layout
3586
3587\begin_layout Standard
3588Fortran:
3589\end_layout
3590
3591\begin_layout LyX-Code
3592CHARACTER(LEN=*) :: grid_path
3593\end_layout
3594
3595\begin_layout Standard
3596Define the way operations passing from a grid to others.
3597 This attribute is optional.
3598\end_layout
3599
3600\begin_layout Subsection*
3601default_value:
3602\emph on
3603double
3604\end_layout
3605
3606\begin_layout Standard
3607Fortran:
3608\end_layout
3609
3610\begin_layout LyX-Code
3611DOUBLE PRECISION :: default_value
3612\end_layout
3613
3614\begin_layout Standard
3615Define the value which should be used in place of the missing data of a
3616 field.
3617 This attribute is optional.
3618 If no value was defined, the missing data will be replaced by uninitialized
3619 values which can lead to undefined behaviors.
3620\end_layout
3621
3622\begin_layout Subsection*
3623valid_min:
3624\emph on
3625double
3626\end_layout
3627
3628\begin_layout Standard
3629Fortran:
3630\end_layout
3631
3632\begin_layout LyX-Code
3633DOUBLE PRECISION :: valid_min
3634\end_layout
3635
3636\begin_layout Standard
3637All field values below
3638\begin_inset Flex Strong
3639status collapsed
3640
3641\begin_layout Plain Layout
3642valid_min
3643\end_layout
3644
3645\end_inset
3646
3647 attribute value are set to missing value.
3648\end_layout
3649
3650\begin_layout Subsection*
3651valid_max:
3652\emph on
3653double
3654\end_layout
3655
3656\begin_layout Standard
3657Fortran:
3658\end_layout
3659
3660\begin_layout LyX-Code
3661DOUBLE PRECISION :: valid_max
3662\end_layout
3663
3664\begin_layout Standard
3665All field values above
3666\begin_inset Flex Strong
3667status collapsed
3668
3669\begin_layout Plain Layout
3670valid_max
3671\end_layout
3672
3673\end_inset
3674
3675 attribute value are set to missing value.
3676\end_layout
3677
3678\begin_layout Subsection*
3679detect_missing_value:
3680\emph on
3681bool
3682\end_layout
3683
3684\begin_layout Standard
3685Fortran:
3686\end_layout
3687
3688\begin_layout LyX-Code
3689LOGICAL:: detect_missing_value
3690\end_layout
3691
3692\begin_layout Standard
3693When XIOS detect a default value in a field, it does not include the value
3694 in the statistic of the operation, like averaging, minimum, maximum...
3695\end_layout
3696
3697\begin_layout Subsection*
3698add_offset:
3699\emph on
3700double
3701\end_layout
3702
3703\begin_layout Standard
3704Fortran:
3705\end_layout
3706
3707\begin_layout LyX-Code
3708DOUBLE PRECISION :: add_offset
3709\end_layout
3710
3711\begin_layout Standard
3712Set the
3713\begin_inset Flex Strong
3714status collapsed
3715
3716\begin_layout Plain Layout
3717add_offset
3718\end_layout
3719
3720\end_inset
3721
3722 meta-data CF attribute in the output file.
3723 In output, the
3724\begin_inset Flex Strong
3725status collapsed
3726
3727\begin_layout Plain Layout
3728add_offset
3729\end_layout
3730
3731\end_inset
3732
3733 value is subtracted to the field values.
3734\end_layout
3735
3736\begin_layout Subsection*
3737scale_factor:
3738\emph on
3739double
3740\end_layout
3741
3742\begin_layout Standard
3743Fortran:
3744\end_layout
3745
3746\begin_layout LyX-Code
3747DOUBLE PRECISION :: scale_factor
3748\end_layout
3749
3750\begin_layout Standard
3751Set the
3752\begin_inset Flex Strong
3753status collapsed
3754
3755\begin_layout Plain Layout
3756scale_factor
3757\end_layout
3758
3759\end_inset
3760
3761 meta-data CF attribute in the output file.
3762 In output, the field values are divided by the
3763\begin_inset Flex Strong
3764status collapsed
3765
3766\begin_layout Plain Layout
3767scale_factor
3768\end_layout
3769
3770\end_inset
3771
3772 value.
3773\end_layout
3774
3775\begin_layout Subsection*
3776compression_level:
3777\emph on
3778integer
3779\end_layout
3780
3781\begin_layout Standard
3782Fortran:
3783\end_layout
3784
3785\begin_layout LyX-Code
3786INTEGER :: compression_level
3787\end_layout
3788
3789\begin_layout Standard
3790Define whether the field should be compressed using NetCDF-4 built-in compressio
3791n.
3792 The compression level must range from 0 to 9.
3793 An higher compression level means a better compression at the cost of using
3794 more processing power.
3795 This attribute is optional, the default value is inherited from the file
3796 attribute
3797\series bold
3798compression_level
3799\series default
3800.
3801\end_layout
3802
3803\begin_layout Subsection*
3804indexed_output:
3805\emph on
3806bool
3807\end_layout
3808
3809\begin_layout Standard
3810Fortran:
3811\end_layout
3812
3813\begin_layout LyX-Code
3814LOGICAL :: indexed_output
3815\end_layout
3816
3817\begin_layout Standard
3818Define whether the field data must be outputted as an indexed grid instead
3819 of a full grid whenever possible.
3820 This attribute is optional, the default value is
3821\series bold
3822\emph on
3823false
3824\series default
3825\emph default
3826.
3827\end_layout
3828
3829\begin_layout Subsection*
3830ts_enabled:
3831\emph on
3832bool
3833\end_layout
3834
3835\begin_layout Standard
3836Fortran:
3837\end_layout
3838
3839\begin_layout LyX-Code
3840LOGICAL :: ts_enabled
3841\end_layout
3842
3843\begin_layout Standard
3844Define whether the field can be outputted as a timeserie if requested.
3845 This attribute is optional, the default value is
3846\series bold
3847\emph on
3848false
3849\series default
3850\emph default
3851.
3852\end_layout
3853
3854\begin_layout Subsection*
3855ts_split_freq:
3856\emph on
3857duration
3858\end_layout
3859
3860\begin_layout Standard
3861Fortran:
3862\end_layout
3863
3864\begin_layout LyX-Code
3865TYPE(xios_duration) :: ts_split_freq
3866\end_layout
3867
3868\begin_layout Standard
3869Define the splitting frequency that should be used for the timeserie if
3870 it has been requested.
3871 This attribute is optional, by default this value is inherited from the
3872 file
3873\series bold
3874split_freq
3875\series default
3876.
3877\end_layout
3878
3879\begin_layout Section
3880Variable attribute reference
3881\end_layout
3882
3883\begin_layout Subsection*
3884name:
3885\emph on
3886string
3887\end_layout
3888
3889\begin_layout Standard
3890Fortran:
3891\end_layout
3892
3893\begin_layout LyX-Code
3894CHARACTER(LEN=*) :: name
3895\end_layout
3896
3897\begin_layout Standard
3898Define the
3899\begin_inset Flex Strong
3900status collapsed
3901
3902\begin_layout Plain Layout
3903name
3904\end_layout
3905
3906\end_inset
3907
3908 of the variable as it will appear in an output file.
3909 This attribute is optional.
3910 If not present, the
3911\begin_inset Flex Strong
3912status collapsed
3913
3914\begin_layout Plain Layout
3915id
3916\end_layout
3917
3918\end_inset
3919
3920 will be used instead.
3921\end_layout
3922
3923\begin_layout Subsection*
3924type: enumeration { bool, int, int32, int16, int64, float, double, string
3925 }
3926\end_layout
3927
3928\begin_layout Standard
3929Fortran:
3930\end_layout
3931
3932\begin_layout LyX-Code
3933CHARACTER(LEN=*) :: type
3934\end_layout
3935
3936\begin_layout Standard
3937Define the
3938\begin_inset Flex Strong
3939status collapsed
3940
3941\begin_layout Plain Layout
3942type
3943\end_layout
3944
3945\end_inset
3946
3947 of the variable.
3948 Note that the
3949\series bold
3950\emph on
3951int
3952\series default
3953\emph default
3954 type is a synonym for
3955\series bold
3956\emph on
3957int32
3958\series default
3959\emph default
3960.
3961 This attribute is mandatory.
3962\end_layout
3963
3964\begin_layout Section
3965File attribute reference
3966\end_layout
3967
3968\begin_layout Subsection*
3969name:
3970\emph on
3971string
3972\end_layout
3973
3974\begin_layout Standard
3975Fortran:
3976\end_layout
3977
3978\begin_layout LyX-Code
3979CHARACTER(LEN=*) :: name
3980\end_layout
3981
3982\begin_layout Standard
3983Define the name of the file.
3984 This attribute is mandatory.
3985\end_layout
3986
3987\begin_layout Subsection*
3988description:
3989\emph on
3990string
3991\end_layout
3992
3993\begin_layout Standard
3994Fortran:
3995\end_layout
3996
3997\begin_layout LyX-Code
3998CHARACTER(LEN=*) :: description
3999\end_layout
4000
4001\begin_layout Standard
4002Define the description of the file.
4003 This attribute is optional.
4004\end_layout
4005
4006\begin_layout Subsection*
4007name_suffix:
4008\emph on
4009string
4010\end_layout
4011
4012\begin_layout Standard
4013Fortran:
4014\end_layout
4015
4016\begin_layout LyX-Code
4017CHARACTER(LEN=*) :: name_suffix
4018\end_layout
4019
4020\begin_layout Standard
4021Define a suffix to add to the name of the file.
4022 This attribute is optional.
4023\end_layout
4024
4025\begin_layout Subsection*
4026min_digits:
4027\emph on
4028integer
4029\end_layout
4030
4031\begin_layout Standard
4032Fortran:
4033\end_layout
4034
4035\begin_layout LyX-Code
4036INTEGER :: min_digits
4037\end_layout
4038
4039\begin_layout Standard
4040For multiple_file, define the minimum digits composing the suffix defining
4041 the rank of the server, which will be happened to the name of the file.
4042 This attribute is optional and the default value is
4043\begin_inset Flex Strong
4044status collapsed
4045
4046\begin_layout Plain Layout
40470
4048\end_layout
4049
4050\end_inset
4051
4052.
4053\end_layout
4054
4055\begin_layout Subsection*
4056output_freq:
4057\emph on
4058duration
4059\end_layout
4060
4061\begin_layout Standard
4062Fortran:
4063\end_layout
4064
4065\begin_layout LyX-Code
4066TYPE(xios_duration) :: output_freq
4067\end_layout
4068
4069\begin_layout Standard
4070Define the output frequency for the current file.
4071 This attribute is mandatory.
4072\end_layout
4073
4074\begin_layout Subsection*
4075output_level:
4076\emph on
4077integer
4078\end_layout
4079
4080\begin_layout Standard
4081Fortran:
4082\end_layout
4083
4084\begin_layout LyX-Code
4085INTEGER :: output_level
4086\end_layout
4087
4088\begin_layout Standard
4089Define an output level for the field defining inside the current file.
4090 Field is output only if the field attribute
4091\begin_inset Formula $level\leq output\_level$
4092\end_inset
4093
4094.
4095\end_layout
4096
4097\begin_layout Subsection*
4098sync_freq:
4099\emph on
4100duration
4101\end_layout
4102
4103\begin_layout Standard
4104Fortran:
4105\end_layout
4106
4107\begin_layout LyX-Code
4108TYPE(xios_duration) :: sync_freq
4109\end_layout
4110
4111\begin_layout Standard
4112Define the frequency for flushing the current file onto disk.
4113 It may result bad performance but data are wrote even if the file will
4114 not be closed.
4115 This attribute is optional.
4116\end_layout
4117
4118\begin_layout Subsection*
4119split_freq:
4120\emph on
4121duration
4122\end_layout
4123
4124\begin_layout Standard
4125Fortran:
4126\end_layout
4127
4128\begin_layout LyX-Code
4129TYPE(xios_duration) :: split_freq
4130\end_layout
4131
4132\begin_layout Standard
4133Define the time frequency for splitting the current file.
4134 In that case, the start and end dates are added to the file
4135\series bold
4136name
4137\series default
4138 (see
4139\begin_inset Flex Emph
4140status collapsed
4141
4142\begin_layout Plain Layout
4143
4144\series bold
4145\emph on
4146split_freq_format
4147\end_layout
4148
4149\end_inset
4150
4151 attribute).
4152 This attribute is optional, by default no splitting is done.
4153\end_layout
4154
4155\begin_layout Subsection*
4156split_freq_format:
4157\emph on
4158string
4159\end_layout
4160
4161\begin_layout Standard
4162Fortran:
4163\end_layout
4164
4165\begin_layout LyX-Code
4166CHARACTER(LEN=*) :: split_freq_format
4167\end_layout
4168
4169\begin_layout Standard
4170Define the format of the split date suffixed to the file.
4171 Can contain any character,
4172\emph on
4173
4174\begin_inset Flex Code
4175status collapsed
4176
4177\begin_layout Plain Layout
4178%y
4179\end_layout
4180
4181\end_inset
4182
4183
4184\emph default
4185 will be replaced by the year (4 characters),
4186\begin_inset Flex Code
4187status collapsed
4188
4189\begin_layout Plain Layout
4190%mo
4191\end_layout
4192
4193\end_inset
4194
4195 by the month (2 char),
4196\begin_inset Flex Code
4197status collapsed
4198
4199\begin_layout Plain Layout
4200%d
4201\end_layout
4202
4203\end_inset
4204
4205 by the day (2 char),
4206\begin_inset Flex Code
4207status collapsed
4208
4209\begin_layout Plain Layout
4210%h
4211\end_layout
4212
4213\end_inset
4214
4215 by the hour (2 char),
4216\begin_inset Flex Code
4217status collapsed
4218
4219\begin_layout Plain Layout
4220%mi
4221\end_layout
4222
4223\end_inset
4224
4225 by the minute (2 char),
4226\begin_inset Flex Code
4227status collapsed
4228
4229\begin_layout Plain Layout
4230%s
4231\end_layout
4232
4233\end_inset
4234
4235 by the second (2 char),
4236\begin_inset Flex Code
4237status collapsed
4238
4239\begin_layout Plain Layout
4240%S
4241\end_layout
4242
4243\end_inset
4244
4245 by the number of seconds since the time origin and
4246\begin_inset Flex Code
4247status collapsed
4248
4249\begin_layout Plain Layout
4250%D
4251\end_layout
4252
4253\end_inset
4254
4255 by the number of full days since the time origin.
4256 This attribute is optional and the default behavior is to create a suffix
4257 with the date until the smaller non zero unit.
4258 For example, in one day split frequency, the hour, minute and second will
4259 not appear in the suffix, only year, month and day.
4260\end_layout
4261
4262\begin_layout Subsection*
4263enabled:
4264\emph on
4265bool
4266\end_layout
4267
4268\begin_layout Standard
4269Fortran:
4270\end_layout
4271
4272\begin_layout LyX-Code
4273LOGICAL :: enabled
4274\end_layout
4275
4276\begin_layout Standard
4277Define if a file must be written/read or not.
4278 This attribute is optional, the default value is
4279\begin_inset Flex Strong
4280status collapsed
4281
4282\begin_layout Plain Layout
4283true
4284\end_layout
4285
4286\end_inset
4287
4288.
4289\end_layout
4290
4291\begin_layout Subsection*
4292mode:
4293\emph on
4294enumeration { read, write }
4295\end_layout
4296
4297\begin_layout Standard
4298Fortran:
4299\end_layout
4300
4301\begin_layout LyX-Code
4302CHARACTER(LEN=*) :: mode
4303\end_layout
4304
4305\begin_layout Standard
4306Define whether the file will be read or written.
4307 This attribute is optional, the default value is
4308\begin_inset Flex Strong
4309status collapsed
4310
4311\begin_layout Plain Layout
4312write
4313\end_layout
4314
4315\end_inset
4316
4317.
4318\end_layout
4319
4320\begin_layout Subsection*
4321type:
4322\emph on
4323enumeration { one_file, multiple_file }
4324\end_layout
4325
4326\begin_layout Standard
4327Fortran:
4328\end_layout
4329
4330\begin_layout LyX-Code
4331CHARACTER(LEN=*) :: type
4332\end_layout
4333
4334\begin_layout Standard
4335Define the type of the file:
4336\begin_inset Flex Strong
4337status collapsed
4338
4339\begin_layout Plain Layout
4340
4341\emph on
4342multiple_file
4343\end_layout
4344
4345\end_inset
4346
4347: one file by server using sequential netcdf writing,
4348\begin_inset Flex Strong
4349status collapsed
4350
4351\begin_layout Plain Layout
4352
4353\emph on
4354one_file
4355\end_layout
4356
4357\end_inset
4358
4359: one single global file is wrote using netcdf4 parallel access.
4360 This attribute is mandatory.
4361\end_layout
4362
4363\begin_layout Subsection*
4364format:
4365\emph on
4366enumeration { netcdf4, netcdf4_classic }
4367\end_layout
4368
4369\begin_layout Standard
4370Fortran:
4371\end_layout
4372
4373\begin_layout LyX-Code
4374CHARACTER(LEN=*) :: type
4375\end_layout
4376
4377\begin_layout Standard
4378Define the format of the file:
4379\begin_inset Flex Strong
4380status collapsed
4381
4382\begin_layout Plain Layout
4383
4384\emph on
4385netcdf4
4386\end_layout
4387
4388\end_inset
4389
4390: the HDF5 format will be used,
4391\begin_inset Flex Strong
4392status collapsed
4393
4394\begin_layout Plain Layout
4395
4396\emph on
4397netcdf4
4398\emph default
4399_
4400\emph on
4401classic
4402\end_layout
4403
4404\end_inset
4405
4406: the classic NetCDF format will be used.
4407 The attribute is optional, the default value is
4408\series bold
4409\emph on
4410netcdf4
4411\series default
4412\emph default
4413.
4414 Note that the
4415\series bold
4416\emph on
4417netcdf4
4418\emph default
4419_
4420\emph on
4421classic
4422\series default
4423\emph default
4424 format can be used with the attribute
4425\series bold
4426type
4427\series default
4428 set to
4429\series bold
4430\emph on
4431one_file
4432\series default
4433\emph default
4434 only if the NetCDF4 library was compiled with Parallel NetCDF support (–enable-
4435pnetcdf).
4436\end_layout
4437
4438\begin_layout Subsection*
4439par_access:
4440\emph on
4441enumeration { collective, independent }
4442\end_layout
4443
4444\begin_layout Standard
4445Fortran:
4446\end_layout
4447
4448\begin_layout LyX-Code
4449CHARACTER(LEN=*) :: par_access
4450\end_layout
4451
4452\begin_layout Standard
4453For parallel writing, define which type of MPI calls will be used.
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
4461collective
4462\end_layout
4463
4464\end_inset
4465
4466.
4467\end_layout
4468
4469\begin_layout Subsection*
4470append:
4471\emph on
4472bool
4473\end_layout
4474
4475\begin_layout Standard
4476Fortran:
4477\end_layout
4478
4479\begin_layout LyX-Code
4480LOGICAL :: append
4481\end_layout
4482
4483\begin_layout Standard
4484Define whether the output data is to be appended at the end of the file
4485 if it already exists or if the existing file is to be overwritten.
4486 This attribute is optional, the default value is
4487\begin_inset Flex Strong
4488status collapsed
4489
4490\begin_layout Plain Layout
4491
4492\emph on
4493false
4494\end_layout
4495
4496\end_inset
4497
4498.
4499\end_layout
4500
4501\begin_layout Subsection*
4502compression_level:
4503\emph on
4504integer
4505\end_layout
4506
4507\begin_layout Standard
4508Fortran:
4509\end_layout
4510
4511\begin_layout LyX-Code
4512INTEGER :: compression_level
4513\end_layout
4514
4515\begin_layout Standard
4516Define whether the fields should be compressed using NetCDF-4 built-in compressi
4517on by default.
4518 The compression level must range from 0 to 9.
4519 An higher compression level means a better compression at the cost of using
4520 more processing power.
4521 This attribute is optional, the default value is
4522\begin_inset Flex Strong
4523status collapsed
4524
4525\begin_layout Plain Layout
4526
4527\emph on
45280
4529\end_layout
4530
4531\end_inset
4532
4533 (no compression).
4534\end_layout
4535
4536\begin_layout Subsection*
4537time_counter:
4538\emph on
4539enumeration { centered, instant, record, none }
4540\end_layout
4541
4542\begin_layout Standard
4543Fortran:
4544\end_layout
4545
4546\begin_layout LyX-Code
4547CHARACTER(LEN=*) :: time_counter
4548\end_layout
4549
4550\begin_layout Standard
4551Define how the
4552\begin_inset Quotes eld
4553\end_inset
4554
4555time_counter
4556\begin_inset Quotes erd
4557\end_inset
4558
4559 variable will be outputted:
4560\end_layout
4561
4562\begin_layout Itemize
4563
4564\series bold
4565\emph on
4566centered
4567\series default
4568\emph default
4569: use centered times
4570\end_layout
4571
4572\begin_layout Itemize
4573
4574\series bold
4575\emph on
4576instant
4577\series default
4578\emph default
4579: use instant times
4580\end_layout
4581
4582\begin_layout Itemize
4583
4584\series bold
4585\emph on
4586record
4587\series default
4588\emph default
4589: use record indexes
4590\end_layout
4591
4592\begin_layout Itemize
4593
4594\series bold
4595\emph on
4596none
4597\series default
4598\emph default
4599: do not output the variable.
4600\end_layout
4601
4602\begin_layout Standard
4603This attribute is optional, the default value is
4604\series bold
4605\emph on
4606centered
4607\series default
4608\emph default
4609.
4610\end_layout
4611
4612\begin_layout Subsection*
4613time_counter_name:
4614\emph on
4615string
4616\end_layout
4617
4618\begin_layout Standard
4619Fortran:
4620\end_layout
4621
4622\begin_layout LyX-Code
4623CHARACTER(LEN=*) :: time_counter_name
4624\end_layout
4625
4626\begin_layout Standard
4627Define the name of the time counter.
4628 This attribute is optional.
4629\end_layout
4630
4631\begin_layout Subsection*
4632timeseries:
4633\emph on
4634enumeration { none, only, both, exclusive }
4635\end_layout
4636
4637\begin_layout Standard
4638Fortran:
4639\end_layout
4640
4641\begin_layout LyX-Code
4642CHARACTER(LEN=*) :: time_series
4643\end_layout
4644
4645\begin_layout Standard
4646Define whether the timeseries must be outputted:
4647\end_layout
4648
4649\begin_layout Itemize
4650
4651\series bold
4652\emph on
4653none
4654\series default
4655\emph default
4656: no timeseries are outputted, only the regular file
4657\end_layout
4658
4659\begin_layout Itemize
4660
4661\series bold
4662\emph on
4663only
4664\series default
4665\emph default
4666: only the timeseries are outputted, the regular file is not created
4667\end_layout
4668
4669\begin_layout Itemize
4670
4671\series bold
4672\emph on
4673both
4674\series default
4675\emph default
4676: both the timeseries and the regular file are outputted.
4677\end_layout
4678
4679\begin_layout Itemize
4680
4681\series bold
4682\emph on
4683exclusive
4684\series default
4685\emph default
4686: the timeseries are outputted and a regular file is created with only the
4687 fields which were not marked for output as a timeserie (if any).
4688\end_layout
4689
4690\begin_layout Standard
4691This attribute is optional, the default value is
4692\series bold
4693\emph on
4694none
4695\series default
4696\emph default
4697.
4698\end_layout
4699
4700\begin_layout Subsection*
4701ts_prefix:
4702\emph on
4703string
4704\end_layout
4705
4706\begin_layout Standard
4707Fortran:
4708\end_layout
4709
4710\begin_layout LyX-Code
4711CHARACTER(LEN=*) :: ts_prefix
4712\end_layout
4713
4714\begin_layout Standard
4715Define the prefix to use for the name of the timeseries files.
4716 This attribute is optional, by default the file
4717\series bold
4718name
4719\series default
4720 will be used.
4721\end_layout
4722
4723\begin_layout Subsection*
4724record_offset:
4725\emph on
4726integer
4727\end_layout
4728
4729\begin_layout Standard
4730Fortran:
4731\end_layout
4732
4733\begin_layout LyX-Code
4734INTEGER :: record_offset
4735\end_layout
4736
4737\begin_layout Standard
4738Define offset of record from the beginning record.
4739 This attribute is optional, by default, its value is 0.
4740\end_layout
4741
4742\begin_layout Standard
4743\begin_inset CommandInset include
4744LatexCommand include
4745filename "inputs/reference/Transformations.lyx"
4746
4747\end_inset
4748
4749
4750\end_layout
4751
4752\begin_layout Chapter
4753Fortran interface reference
4754\end_layout
4755
4756\begin_layout Section*
4757Initialization
4758\end_layout
4759
4760\begin_layout Subsection*
4761XIOS initialization
4762\end_layout
4763
4764\begin_layout Subsubsection*
4765Synopsis:
4766\end_layout
4767
4768\begin_layout LyX-Code
4769SUBROUTINE xios_initialize(client_id, local_comm, return_comm)
4770\end_layout
4771
4772\begin_layout LyX-Code
4773  CHARACTER(LEN=*),INTENT(IN)         :: client_id
4774\end_layout
4775
4776\begin_layout LyX-Code
4777  INTEGER,INTENT(IN),OPTIONAL         :: local_comm
4778\end_layout
4779
4780\begin_layout LyX-Code
4781  INTEGER,INTENT(OUT),OPTIONAL        :: return_comm
4782\end_layout
4783
4784\begin_layout Subsubsection*
4785Argument:
4786\end_layout
4787
4788\begin_layout Itemize
4789\begin_inset Flex Code
4790status collapsed
4791
4792\begin_layout Plain Layout
4793client_id
4794\end_layout
4795
4796\end_inset
4797
4798: client identifier
4799\end_layout
4800
4801\begin_layout Itemize
4802\begin_inset Flex Code
4803status collapsed
4804
4805\begin_layout Plain Layout
4806local_comm
4807\end_layout
4808
4809\end_inset
4810
4811: MPI communicator of the client
4812\end_layout
4813
4814\begin_layout Itemize
4815\begin_inset Flex Code
4816status collapsed
4817
4818\begin_layout Plain Layout
4819return_comm
4820\end_layout
4821
4822\end_inset
4823
4824: split return MPI communicator
4825\end_layout
4826
4827\begin_layout Subsubsection*
4828Description:
4829\end_layout
4830
4831\begin_layout Standard
4832This subroutine must be called before any other call of MPI client library.
4833 It may be able to initialize MPI library (calling
4834\begin_inset Flex Code
4835status collapsed
4836
4837\begin_layout Plain Layout
4838MPI_Init
4839\end_layout
4840
4841\end_inset
4842
4843) if not already initialized.
4844 Since XIOS is able to work in client/server mode (parameter
4845\begin_inset Flex Code
4846status collapsed
4847
4848\begin_layout Plain Layout
4849using_server=true
4850\end_layout
4851
4852\end_inset
4853
4854), the global communicator must be split and a local split communicator
4855 is returned to be used by the client model for it own purpose.
4856 If more than one model is present, XIOS could be interfaced with the OASIS
4857 coupler (compiled with
4858\begin_inset Flex Code
4859status collapsed
4860
4861\begin_layout Plain Layout
4862-using_oasis
4863\end_layout
4864
4865\end_inset
4866
4867 option and parameter
4868\begin_inset Flex Code
4869status collapsed
4870
4871\begin_layout Plain Layout
4872using_oasis=true
4873\end_layout
4874
4875\end_inset
4876
4877), so in this case, the splitting would be done globally by OASIS.
4878\end_layout
4879
4880\begin_layout Itemize
4881If MPI is not initialized, XIOS would initialize it calling MPI_Init function.
4882 In this case, the MPI finalization would be done by XIOS in the
4883\begin_inset Flex Code
4884status collapsed
4885
4886\begin_layout Plain Layout
4887xios_finalize
4888\end_layout
4889
4890\end_inset
4891
4892 subroutine, and must not be done by the model.
4893\end_layout
4894
4895\begin_layout Itemize
4896If OASIS coupler is not used (using_oasis=false)
4897\begin_inset Separator latexpar
4898\end_inset
4899
4900
4901\end_layout
4902
4903\begin_deeper
4904\begin_layout Itemize
4905If server mode is not activated (
4906\begin_inset Flex Code
4907status collapsed
4908
4909\begin_layout Plain Layout
4910using_server=false
4911\end_layout
4912
4913\end_inset
4914
4915): if local_comm MPI communicator is specified then it would be used for
4916 internal MPI communication otherwise
4917\begin_inset Flex Code
4918status collapsed
4919
4920\begin_layout Plain Layout
4921MPI_COMM_WORLD
4922\end_layout
4923
4924\end_inset
4925
4926 communicator would be used by default.
4927 A copy of the communicator (of
4928\begin_inset Flex Code
4929status collapsed
4930
4931\begin_layout Plain Layout
4932local_comm
4933\end_layout
4934
4935\end_inset
4936
4937 or
4938\begin_inset Flex Code
4939status collapsed
4940
4941\begin_layout Plain Layout
4942MPI_COMM_WORLD
4943\end_layout
4944
4945\end_inset
4946
4947) would be returned in return_comm argument.
4948 If
4949\begin_inset Flex Code
4950status collapsed
4951
4952\begin_layout Plain Layout
4953return_comm
4954\end_layout
4955
4956\end_inset
4957
4958 is not specified, then
4959\begin_inset Flex Code
4960status collapsed
4961
4962\begin_layout Plain Layout
4963local_comm
4964\end_layout
4965
4966\end_inset
4967
4968 or
4969\begin_inset Flex Code
4970status collapsed
4971
4972\begin_layout Plain Layout
4973MPI_COMM_WORLD
4974\end_layout
4975
4976\end_inset
4977
4978 can be used by the model for it own communication.
4979\end_layout
4980
4981\begin_layout Itemize
4982If server mode is activated (
4983\begin_inset Flex Code
4984status collapsed
4985
4986\begin_layout Plain Layout
4987using_server=true
4988\end_layout
4989
4990\end_inset
4991
4992):
4993\begin_inset Flex Code
4994status collapsed
4995
4996\begin_layout Plain Layout
4997local_comm
4998\end_layout
4999
5000\end_inset
5001
5002 must not be specified since the global
5003\begin_inset Flex Code
5004status collapsed
5005
5006\begin_layout Plain Layout
5007MPI_COMM_WORLD
5008\end_layout
5009
5010\end_inset
5011
5012 communicator would be split by XIOS.
5013 The split communicator is returned in
5014\begin_inset Flex Code
5015status collapsed
5016
5017\begin_layout Plain Layout
5018return_comm
5019\end_layout
5020
5021\end_inset
5022
5023 argument.
5024\end_layout
5025
5026\end_deeper
5027\begin_layout Itemize
5028If OASIS coupler is used (
5029\begin_inset Flex Code
5030status collapsed
5031
5032\begin_layout Plain Layout
5033using_oasis=true
5034\end_layout
5035
5036\end_inset
5037
5038)
5039\begin_inset Separator latexpar
5040\end_inset
5041
5042
5043\end_layout
5044
5045\begin_deeper
5046\begin_layout Itemize
5047If server mode is not enabled (
5048\begin_inset Flex Code
5049status collapsed
5050
5051\begin_layout Plain Layout
5052using_server=false
5053\end_layout
5054
5055\end_inset
5056
5057)
5058\begin_inset Separator latexpar
5059\end_inset
5060
5061
5062\end_layout
5063
5064\begin_deeper
5065\begin_layout Itemize
5066If
5067\begin_inset Flex Code
5068status collapsed
5069
5070\begin_layout Plain Layout
5071local_comm
5072\end_layout
5073
5074\end_inset
5075
5076 is specified, it means that OASIS has been initialized by the model and
5077 global communicator has been already split previously by OASIS, and passed
5078 as
5079\begin_inset Flex Code
5080status collapsed
5081
5082\begin_layout Plain Layout
5083local_comm
5084\end_layout
5085
5086\end_inset
5087
5088 argument.
5089 The returned communicator would be a duplicate copy of
5090\begin_inset Flex Code
5091status collapsed
5092
5093\begin_layout Plain Layout
5094local_comm
5095\end_layout
5096
5097\end_inset
5098
5099.
5100\end_layout
5101
5102\begin_layout Itemize
5103Otherwise: if MPI was not initialized, OASIS will be initialized calling
5104 
5105\begin_inset Flex Code
5106status collapsed
5107
5108\begin_layout Plain Layout
5109prism_init_comp_proto
5110\end_layout
5111
5112\end_inset
5113
5114 subroutine.
5115 In this case, XIOS will call
5116\begin_inset Flex Code
5117status collapsed
5118
5119\begin_layout Plain Layout
5120prism_terminate_proto
5121\end_layout
5122
5123\end_inset
5124
5125 when
5126\begin_inset Flex Code
5127status collapsed
5128
5129\begin_layout Plain Layout
5130xios_finalized
5131\end_layout
5132
5133\end_inset
5134
5135 is called.
5136 The split communicator is returned in
5137\begin_inset Flex Code
5138status collapsed
5139
5140\begin_layout Plain Layout
5141return_comm
5142\end_layout
5143
5144\end_inset
5145
5146 argument using
5147\begin_inset Flex Code
5148status collapsed
5149
5150\begin_layout Plain Layout
5151prism_get_localcomm_proto
5152\end_layout
5153
5154\end_inset
5155
5156 return argument.
5157\end_layout
5158
5159\end_deeper
5160\begin_layout Itemize
5161If server mode is enabled (
5162\begin_inset Flex Code
5163status collapsed
5164
5165\begin_layout Plain Layout
5166using_server=true
5167\end_layout
5168
5169\end_inset
5170
5171)
5172\begin_inset Separator latexpar
5173\end_inset
5174
5175
5176\end_layout
5177
5178\begin_deeper
5179\begin_layout Itemize
5180If
5181\begin_inset Flex Code
5182status collapsed
5183
5184\begin_layout Plain Layout
5185local_comm
5186\end_layout
5187
5188\end_inset
5189
5190 is specified, it means that OASIS has been initialized by the model and
5191 global communicator has been already split previously by OASIS, and passed
5192 as local_comm argument.
5193 The returned communicator return_comm would be a split communicator given
5194 by OASIS.
5195\end_layout
5196
5197\begin_layout Itemize
5198Otherwise: if MPI was not initialized, OASIS will be initialized calling
5199 
5200\begin_inset Flex Code
5201status collapsed
5202
5203\begin_layout Plain Layout
5204prism_init_comp_proto
5205\end_layout
5206
5207\end_inset
5208
5209 subroutine.
5210 In this case, XIOS will call
5211\begin_inset Flex Code
5212status collapsed
5213
5214\begin_layout Plain Layout
5215prism_terminate_proto
5216\end_layout
5217
5218\end_inset
5219
5220 when
5221\begin_inset Flex Code
5222status collapsed
5223
5224\begin_layout Plain Layout
5225xios_finalized
5226\end_layout
5227
5228\end_inset
5229
5230 is called.
5231 The split communicator is returned in
5232\begin_inset Flex Code
5233status collapsed
5234
5235\begin_layout Plain Layout
5236return_comm
5237\end_layout
5238
5239\end_inset
5240
5241 argument using
5242\begin_inset Flex Code
5243status collapsed
5244
5245\begin_layout Plain Layout
5246prism_get_localcomm_proto
5247\end_layout
5248
5249\end_inset
5250
5251 return argument.
5252\end_layout
5253
5254\end_deeper
5255\end_deeper
5256\begin_layout Section*
5257Finalization
5258\end_layout
5259
5260\begin_layout Subsection*
5261XIOS finalization
5262\end_layout
5263
5264\begin_layout Subsubsection*
5265Synopsis:
5266\end_layout
5267
5268\begin_layout LyX-Code
5269SUBROUTINE xios_finalize()
5270\end_layout
5271
5272\begin_layout Subsubsection*
5273Arguments:
5274\end_layout
5275
5276\begin_layout Standard
5277None
5278\end_layout
5279
5280\begin_layout Subsubsection*
5281Description:
5282\end_layout
5283
5284\begin_layout Standard
5285This call must be done at the end of the simulation for a successful execution.
5286 It gives the end signal to the xios server pools to finish it execution.
5287 If MPI has been initialize by XIOS the MPI_Finalize will be called.
5288 If OASIS coupler has been initialized by XIOS, then finalization will be
5289 done calling
5290\begin_inset Flex Code
5291status collapsed
5292
5293\begin_layout Plain Layout
5294prism_terminate_proto
5295\end_layout
5296
5297\end_inset
5298
5299 subroutine.
5300\end_layout
5301
5302\begin_layout Section*
5303Tree elements management subroutines
5304\end_layout
5305
5306\begin_layout Standard
5307This set of subroutines enable the models to interact, complete or query
5308 the XML tree data base.
5309 New elements or group of elements can be added as child in the tree, attributes
5310 of the elements can be set or query.
5311 The type of element actually available are: context, axis, domain, grid,
5312 field, variable and file.
5313 An element can be identified by a string or by an handle associated to
5314 the type of the element.
5315 Root element (ex:
5316\begin_inset Quotes eld
5317\end_inset
5318
5319axis_definition
5320\begin_inset Quotes erd
5321\end_inset
5322
5323,
5324\begin_inset Quotes eld
5325\end_inset
5326
5327field_definition
5328\begin_inset Quotes erd
5329\end_inset
5330
5331,....) are considered like a group of element and are identified by a specific
5332 string
5333\begin_inset Quotes eld
5334\end_inset
5335
5336element_definition
5337\begin_inset Quotes erd
5338\end_inset
5339
5340 where element can be any one of the existing elements.
5341\end_layout
5342
5343\begin_layout Subsection*
5344Fortran type of the handles element
5345\end_layout
5346
5347\begin_layout Quotation
5348TYPE(xios_element)
5349\end_layout
5350
5351\begin_layout Standard
5352where
5353\begin_inset Quotes eld
5354\end_inset
5355
5356element
5357\begin_inset Quotes erd
5358\end_inset
5359
5360 can be any one among
5361\begin_inset Quotes eld
5362\end_inset
5363
5364context
5365\begin_inset Quotes erd
5366\end_inset
5367
5368,
5369\begin_inset Quotes eld
5370\end_inset
5371
5372axis
5373\begin_inset Quotes erd
5374\end_inset
5375
5376,
5377\begin_inset Quotes eld
5378\end_inset
5379
5380domain
5381\begin_inset Quotes erd
5382\end_inset
5383
5384,
5385\begin_inset Quotes eld
5386\end_inset
5387
5388grid
5389\begin_inset Quotes erd
5390\end_inset
5391
5392,
5393\begin_inset Quotes eld
5394\end_inset
5395
5396field
5397\begin_inset Quotes erd
5398\end_inset
5399
5400,
5401\begin_inset Quotes eld
5402\end_inset
5403
5404variable
5405\begin_inset Quotes erd
5406\end_inset
5407
5408 or
5409\begin_inset Quotes eld
5410\end_inset
5411
5412file
5413\begin_inset Quotes erd
5414\end_inset
5415
5416, or the associated group (excepted for context):
5417\begin_inset Quotes eld
5418\end_inset
5419
5420axis_group
5421\begin_inset Quotes erd
5422\end_inset
5423
5424,
5425\begin_inset Quotes eld
5426\end_inset
5427
5428domain_group
5429\begin_inset Quotes erd
5430\end_inset
5431
5432,
5433\begin_inset Quotes eld
5434\end_inset
5435
5436grid_group
5437\begin_inset Quotes erd
5438\end_inset
5439
5440,
5441\begin_inset Quotes eld
5442\end_inset
5443
5444field_group
5445\begin_inset Quotes erd
5446\end_inset
5447
5448,
5449\begin_inset Quotes eld
5450\end_inset
5451
5452variable_group
5453\begin_inset Quotes erd
5454\end_inset
5455
5456 or
5457\begin_inset Quotes eld
5458\end_inset
5459
5460file_group
5461\begin_inset Quotes erd
5462\end_inset
5463
5464.
5465\end_layout
5466
5467\begin_layout Subsection*
5468Getting handles
5469\end_layout
5470
5471\begin_layout Subsubsection*
5472Synopsis:
5473\end_layout
5474
5475\begin_layout LyX-Code
5476SUBROUTINE xios_get_element_handle(id,handle)
5477\end_layout
5478
5479\begin_layout LyX-Code
5480CHARACTER(len = *) , INTENT(IN) :: id
5481\end_layout
5482
5483\begin_layout LyX-Code
5484TYPE(xios_element), INTENT(OUT):: handle
5485\end_layout
5486
5487\begin_layout Standard
5488where element is one of the existing element or group of element.
5489\end_layout
5490
5491\begin_layout Subsubsection*
5492Arguments:
5493\end_layout
5494
5495\begin_layout Itemize
5496\begin_inset Flex Code
5497status collapsed
5498
5499\begin_layout Plain Layout
5500id
5501\end_layout
5502
5503\end_inset
5504
5505: string identifier.
5506\end_layout
5507
5508\begin_layout Itemize
5509\begin_inset Flex Code
5510status collapsed
5511
5512\begin_layout Plain Layout
5513handle
5514\end_layout
5515
5516\end_inset
5517
5518: element handle
5519\end_layout
5520
5521\begin_layout Subsubsection*
5522Description:
5523\end_layout
5524
5525\begin_layout Standard
5526This subroutine return the handle of the specified element identified by
5527 its string.
5528 The element must be existing otherwise it raise an error.
5529\end_layout
5530
5531\begin_layout Subsection*
5532Query for a valid element
5533\end_layout
5534
5535\begin_layout Subsubsection*
5536Synopsis:
5537\end_layout
5538
5539\begin_layout LyX-Code
5540LOGICAL FUNCTION xios_is_valid_element(id)
5541\end_layout
5542
5543\begin_layout LyX-Code
5544CHARACTER(len = *) , INTENT(IN) :: id
5545\end_layout
5546
5547\begin_layout Standard
5548where element is one of the existing element or group of element.
5549\end_layout
5550
5551\begin_layout Subsubsection*
5552Arguments:
5553\end_layout
5554
5555\begin_layout Itemize
5556\begin_inset Flex Code
5557status collapsed
5558
5559\begin_layout Plain Layout
5560id
5561\end_layout
5562
5563\end_inset
5564
5565: string identifier.
5566\end_layout
5567
5568\begin_layout Subsubsection*
5569Description:
5570\end_layout
5571
5572\begin_layout Standard
5573This function return .TRUE.
5574 if the element defined by the string identifier id is existing in the data
5575 base, otherwise it return .FALSE.
5576 .
5577\end_layout
5578
5579\begin_layout Subsection*
5580Adding child
5581\end_layout
5582
5583\begin_layout Subsubsection*
5584Synopsis:
5585\end_layout
5586
5587\begin_layout LyX-Code
5588SUBROUTINE xios_add_element(parent_handle, child_handle, child_id)
5589\end_layout
5590
5591\begin_layout LyX-Code
5592TYPE(xios_element)         , INTENT(IN) :: parent_handle
5593\end_layout
5594
5595\begin_layout LyX-Code
5596TYPE(xios_element)         , INTENT(OUT):: child_handle
5597\end_layout
5598
5599\begin_layout LyX-Code
5600CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
5601\end_layout
5602
5603\begin_layout Standard
5604where element is one of the existing element or group of element.
5605\end_layout
5606
5607\begin_layout Subsubsection*
5608Arguments:
5609\end_layout
5610
5611\begin_layout Itemize
5612\begin_inset Flex Code
5613status collapsed
5614
5615\begin_layout Plain Layout
5616parent_handle
5617\end_layout
5618
5619\end_inset
5620
5621: handle of the parent element.
5622\end_layout
5623
5624\begin_layout Itemize
5625\begin_inset Flex Code
5626status collapsed
5627
5628\begin_layout Plain Layout
5629child_handle
5630\end_layout
5631
5632\end_inset
5633
5634: handle of the child element.
5635\end_layout
5636
5637\begin_layout Itemize
5638\begin_inset Flex Code
5639status collapsed
5640
5641\begin_layout Plain Layout
5642child_id
5643\end_layout
5644
5645\end_inset
5646
5647: string identifier of the child.
5648\end_layout
5649
5650\begin_layout Subsubsection*
5651Description:
5652\end_layout
5653
5654\begin_layout Standard
5655This subroutine add a child to an existing parent element.
5656 The identifier of the child, if existing, can be specified optionally.
5657 All group elements can contains child of the same kind, provided generic
5658 inheritance.
5659 Some elements can contains children of an other kind for a specific behaviour.
5660 File element may contains field_group, field, variable and variable_group
5661 child elements.
5662 Field elements may contains variable_group of variable child element.
5663\end_layout
5664
5665\begin_layout Subsection*
5666Query if a value of an element attributes is defined (by handle)
5667\end_layout
5668
5669\begin_layout Subsubsection*
5670Synopsis:
5671\end_layout
5672
5673\begin_layout LyX-Code
5674SUBROUTINE xios_is_defined_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5675 ...)
5676\end_layout
5677
5678\begin_layout LyX-Code
5679TYPE(xios_element)         , INTENT(IN) :: handle
5680\end_layout
5681
5682\begin_layout LyX-Code
5683LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5684\end_layout
5685
5686\begin_layout LyX-Code
5687LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5688\end_layout
5689
5690\begin_layout LyX-Code
5691....
5692\end_layout
5693
5694\begin_layout Standard
5695where element is one of the existing element or group of element.
5696 attribute_x is describing in the chapter dedicated to the attribute description.
5697\end_layout
5698
5699\begin_layout Subsubsection*
5700Arguments:
5701\end_layout
5702
5703\begin_layout Itemize
5704\begin_inset Flex Code
5705status collapsed
5706
5707\begin_layout Plain Layout
5708handle
5709\end_layout
5710
5711\end_inset
5712
5713: element handle.
5714\end_layout
5715
5716\begin_layout Itemize
5717\begin_inset Flex Code
5718status collapsed
5719
5720\begin_layout Plain Layout
5721attr_x
5722\end_layout
5723
5724\end_inset
5725
5726: return true if the attribute as a defined value.
5727\end_layout
5728
5729\begin_layout Subsubsection*
5730Description:
5731\end_layout
5732
5733\begin_layout Standard
5734This subroutine my be used to query if one or more attributes of an element
5735 have a defined value.
5736 The list of attributes and their type are described in a specific chapter
5737 of the documentation.
5738 
5739\end_layout
5740
5741\begin_layout Subsection*
5742Query if a value of an element attributes is defined (by identifier)
5743\end_layout
5744
5745\begin_layout Subsubsection*
5746Synopsis:
5747\end_layout
5748
5749\begin_layout LyX-Code
5750SUBROUTINE xios_is_defined_element_attr(id, attr_1=attribute_1, attr_2=attribute
5751_2, ...)
5752\end_layout
5753
5754\begin_layout LyX-Code
5755CHARACTER(len = *) , INTENT(IN) :: id
5756\end_layout
5757
5758\begin_layout LyX-Code
5759LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5760\end_layout
5761
5762\begin_layout LyX-Code
5763LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5764\end_layout
5765
5766\begin_layout LyX-Code
5767....
5768\end_layout
5769
5770\begin_layout Standard
5771where element is one of the existing element or group of element.
5772 attribute_x is describing in the chapter dedicated to the attribute description.
5773\end_layout
5774
5775\begin_layout Subsubsection*
5776Arguments:
5777\end_layout
5778
5779\begin_layout Itemize
5780\begin_inset Flex Code
5781status collapsed
5782
5783\begin_layout Plain Layout
5784id
5785\end_layout
5786
5787\end_inset
5788
5789: element identifier.
5790\end_layout
5791
5792\begin_layout Itemize
5793\begin_inset Flex Code
5794status collapsed
5795
5796\begin_layout Plain Layout
5797attr_x
5798\end_layout
5799
5800\end_inset
5801
5802: return true if the attribute as a defined value.
5803\end_layout
5804
5805\begin_layout Subsubsection*
5806Description:
5807\end_layout
5808
5809\begin_layout Standard
5810This subroutine my be used to query if one or more attributes of an element
5811 have a defined value.
5812 The list of available attributes and their type are described in a specific
5813 chapter of the documentation.
5814 
5815\end_layout
5816
5817\begin_layout Subsection*
5818Setting element attributes value by handle
5819\end_layout
5820
5821\begin_layout Subsubsection*
5822Synopsis:
5823\end_layout
5824
5825\begin_layout LyX-Code
5826SUBROUTINE xios_set_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5827 ...)
5828\end_layout
5829
5830\begin_layout LyX-Code
5831TYPE(xios_element)         , INTENT(IN) :: handle
5832\end_layout
5833
5834\begin_layout LyX-Code
5835attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5836\end_layout
5837
5838\begin_layout LyX-Code
5839attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5840\end_layout
5841
5842\begin_layout LyX-Code
5843....
5844\end_layout
5845
5846\begin_layout Standard
5847where element is one of the existing element or group of element.
5848 attribute_x and attribute_type_x are describing in the chapter dedicated
5849 to the attribute description.
5850\end_layout
5851
5852\begin_layout Subsubsection*
5853Arguments:
5854\end_layout
5855
5856\begin_layout Itemize
5857\begin_inset Flex Code
5858status collapsed
5859
5860\begin_layout Plain Layout
5861handle
5862\end_layout
5863
5864\end_inset
5865
5866: element handle.
5867\end_layout
5868
5869\begin_layout Itemize
5870\begin_inset Flex Code
5871status collapsed
5872
5873\begin_layout Plain Layout
5874attr_x
5875\end_layout
5876
5877\end_inset
5878
5879: value of the attribute to be set.
5880\end_layout
5881
5882\begin_layout Subsubsection*
5883Description:
5884\end_layout
5885
5886\begin_layout Standard
5887This subroutine my be used to set one or more attribute to an element defined
5888 by its handle.
5889 The list of available attributes and their type are described in a specific
5890 chapter of the documentation.
5891 
5892\end_layout
5893
5894\begin_layout Subsection*
5895Setting element attributes value by id
5896\end_layout
5897
5898\begin_layout Subsubsection*
5899Synopsis:
5900\end_layout
5901
5902\begin_layout LyX-Code
5903SUBROUTINE xios_set_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
5904 ...)
5905\end_layout
5906
5907\begin_layout LyX-Code
5908CHARACTER(len = *),  INTENT(IN)          :: id
5909\end_layout
5910
5911\begin_layout LyX-Code
5912attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5913\end_layout
5914
5915\begin_layout LyX-Code
5916attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5917\end_layout
5918
5919\begin_layout LyX-Code
5920....
5921\end_layout
5922
5923\begin_layout Standard
5924where element is one of the existing element or group of element.
5925 attribute_x and attribute_type_x are describing in the chapter dedicated
5926 to the attribute description.
5927\end_layout
5928
5929\begin_layout Subsubsection*
5930Arguments:
5931\end_layout
5932
5933\begin_layout Itemize
5934\begin_inset Flex Code
5935status collapsed
5936
5937\begin_layout Plain Layout
5938id
5939\end_layout
5940
5941\end_inset
5942
5943: string identifier.
5944\end_layout
5945
5946\begin_layout Itemize
5947\begin_inset Flex Code
5948status collapsed
5949
5950\begin_layout Plain Layout
5951attr_x
5952\end_layout
5953
5954\end_inset
5955
5956: value of the attribute to be set.
5957\end_layout
5958
5959\begin_layout Subsubsection*
5960Description:
5961\end_layout
5962
5963\begin_layout Standard
5964This subroutine my be used to set one or more attribute to an element defined
5965 by its string id.
5966 The list of available attributes and their type are described in a specific
5967 chapter of the documentation.
5968\end_layout
5969
5970\begin_layout Subsection*
5971Getting element attributes value (by handle)
5972\end_layout
5973
5974\begin_layout Subsubsection*
5975Synopsis:
5976\end_layout
5977
5978\begin_layout LyX-Code
5979SUBROUTINE xios_get_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5980 ...)
5981\end_layout
5982
5983\begin_layout LyX-Code
5984TYPE(xios_element)         , INTENT(IN) :: handle
5985\end_layout
5986
5987\begin_layout LyX-Code
5988attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
5989\end_layout
5990
5991\begin_layout LyX-Code
5992attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
5993\end_layout
5994
5995\begin_layout LyX-Code
5996....
5997\end_layout
5998
5999\begin_layout Standard
6000where element is one of the existing element or group of element.
6001 attribute_x and attribute_type_x are describing in the chapter dedicated
6002 to the attribute description.
6003\end_layout
6004
6005\begin_layout Subsubsection*
6006Arguments:
6007\end_layout
6008
6009\begin_layout Itemize
6010\begin_inset Flex Code
6011status collapsed
6012
6013\begin_layout Plain Layout
6014handle
6015\end_layout
6016
6017\end_inset
6018
6019: element handle.
6020\end_layout
6021
6022\begin_layout Itemize
6023\begin_inset Flex Code
6024status collapsed
6025
6026\begin_layout Plain Layout
6027attr_x
6028\end_layout
6029
6030\end_inset
6031
6032: value of the attribute to be get.
6033\end_layout
6034
6035\begin_layout Subsubsection*
6036Description:
6037\end_layout
6038
6039\begin_layout Standard
6040This subroutine my be used to get one or more attribute value of an element
6041 defined by its handle.
6042 All attributes in the arguments list must be defined.
6043 The list of available attributes and their type are described in a specific
6044 chapter of the documentation.
6045 
6046\end_layout
6047
6048\begin_layout Subsection*
6049Getting element attributes value (by identifier)
6050\end_layout
6051
6052\begin_layout Subsubsection*
6053Synopsis:
6054\end_layout
6055
6056\begin_layout LyX-Code
6057SUBROUTINE xios_get_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
6058 ...)
6059\end_layout
6060
6061\begin_layout LyX-Code
6062CHARACTER(len = *),   INTENT(IN)          :: id
6063\end_layout
6064
6065\begin_layout LyX-Code
6066attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
6067\end_layout
6068
6069\begin_layout LyX-Code
6070attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
6071\end_layout
6072
6073\begin_layout LyX-Code
6074....
6075\end_layout
6076
6077\begin_layout Standard
6078where element is one of the existing element or group of element.
6079 attribute_x is describing in the chapter dedicated to the attribute description.
6080\end_layout
6081
6082\begin_layout Subsubsection*
6083Arguments:
6084\end_layout
6085
6086\begin_layout Itemize
6087\begin_inset Flex Code
6088status collapsed
6089
6090\begin_layout Plain Layout
6091id
6092\end_layout
6093
6094\end_inset
6095
6096: element string identifier.
6097\end_layout
6098
6099\begin_layout Itemize
6100\begin_inset Flex Code
6101status collapsed
6102
6103\begin_layout Plain Layout
6104attr_x
6105\end_layout
6106
6107\end_inset
6108
6109: value of the attribute to be get.
6110\end_layout
6111
6112\begin_layout Subsubsection*
6113Description:
6114\end_layout
6115
6116\begin_layout Standard
6117This subroutine my be used to get one or more attribute value of an element
6118 defined by its handle.
6119 All attributes in the arguments list must have a defined value.
6120 The list of available attributes and their type are described in a specific
6121 chapter of the documentation.
6122\end_layout
6123
6124\begin_layout Section*
6125Interface relative to context management
6126\end_layout
6127
6128\begin_layout Subsection*
6129XIOS context initialization
6130\end_layout
6131
6132\begin_layout Subsubsection*
6133Synopsis:
6134\end_layout
6135
6136\begin_layout LyX-Code
6137SUBROUTINE xios_context_initialize(context_id, context_comm)
6138\end_layout
6139
6140\begin_layout LyX-Code
6141  CHARACTER(LEN=*),INTENT(IN)         :: context_id
6142\end_layout
6143
6144\begin_layout LyX-Code
6145  INTEGER,INTENT(IN)                  :: context_comm
6146\end_layout
6147
6148\begin_layout Subsubsection*
6149Argument:
6150\end_layout
6151
6152\begin_layout Itemize
6153\begin_inset Flex Code
6154status collapsed
6155
6156\begin_layout Plain Layout
6157context_id
6158\end_layout
6159
6160\end_inset
6161
6162: context identifier
6163\end_layout
6164
6165\begin_layout Itemize
6166\begin_inset Flex Code
6167status collapsed
6168
6169\begin_layout Plain Layout
6170context_comm
6171\end_layout
6172
6173\end_inset
6174
6175: MPI communicator of the context
6176\end_layout
6177
6178\begin_layout Subsubsection*
6179Description:
6180\end_layout
6181
6182\begin_layout Standard
6183This subroutine initialize a context identified by
6184\begin_inset Flex Code
6185status collapsed
6186
6187\begin_layout Plain Layout
6188context_id
6189\end_layout
6190
6191\end_inset
6192
6193 string and must be called before any call related to this context.
6194 A context must be associated to a communicator, which can be the returned
6195 communicator of the
6196\begin_inset Flex Code
6197status collapsed
6198
6199\begin_layout Plain Layout
6200xios_initialize
6201\end_layout
6202
6203\end_inset
6204
6205 subroutine or a sub-communicator of this.
6206 The context initialization is dynamic and can be done at any time before
6207 the
6208\begin_inset Flex Code
6209status collapsed
6210
6211\begin_layout Plain Layout
6212xios_finalize
6213\end_layout
6214
6215\end_inset
6216
6217 call.
6218\end_layout
6219
6220\begin_layout Subsection*
6221XIOS context finalization
6222\end_layout
6223
6224\begin_layout Subsubsection*
6225Synopsis:
6226\end_layout
6227
6228\begin_layout LyX-Code
6229SUBROUTINE xios_context_finalize()
6230\end_layout
6231
6232\begin_layout Subsubsection*
6233Arguments:
6234\end_layout
6235
6236\begin_layout Standard
6237None
6238\end_layout
6239
6240\begin_layout Subsubsection*
6241Description:
6242\end_layout
6243
6244\begin_layout Standard
6245This subroutine must be call to close a context, before the
6246\begin_inset Flex Code
6247status collapsed
6248
6249\begin_layout Plain Layout
6250xios_finalize
6251\end_layout
6252
6253\end_inset
6254
6255 call.
6256 It waits until that all pending request sent to the servers will be processed
6257 and the opened files will be closed.
6258\end_layout
6259
6260\begin_layout Subsection*
6261Setting current active context
6262\end_layout
6263
6264\begin_layout Subsubsection*
6265Synopsis:
6266\end_layout
6267
6268\begin_layout LyX-Code
6269SUBROUTINE xios_set_current_context(context_handle)
6270\end_layout
6271
6272\begin_layout LyX-Code
6273TYPE(xios_context),INTENT(IN) :: context_handle
6274\end_layout
6275
6276\begin_layout Standard
6277or
6278\end_layout
6279
6280\begin_layout LyX-Code
6281SUBROUTINE xios_set_current_context(context_id)
6282\end_layout
6283
6284\begin_layout LyX-Code
6285CHARACTER(LEN=*),INTENT(IN) :: context_id
6286\end_layout
6287
6288\begin_layout Subsubsection*
6289Arguments:
6290\end_layout
6291
6292\begin_layout Itemize
6293\begin_inset Flex Code
6294status collapsed
6295
6296\begin_layout Plain Layout
6297context_handle
6298\end_layout
6299
6300\end_inset
6301
6302: handle of the context
6303\end_layout
6304
6305\begin_layout Standard
6306or
6307\end_layout
6308
6309\begin_layout Itemize
6310\begin_inset Flex Code
6311status collapsed
6312
6313\begin_layout Plain Layout
6314context_id
6315\end_layout
6316
6317\end_inset
6318
6319: string context identifier
6320\end_layout
6321
6322\begin_layout Subsubsection*
6323Description:
6324\end_layout
6325
6326\begin_layout Standard
6327These subroutines set the current active context.
6328 All xios calls after will refer to this active context.
6329 If only one context is defined, it is automatically set as the active context.
6330 
6331\end_layout
6332
6333\begin_layout Subsection*
6334Closing definition
6335\end_layout
6336
6337\begin_layout Subsubsection*
6338Synopsis:
6339\end_layout
6340
6341\begin_layout LyX-Code
6342SUBROUTINE xios_close_context_definition()
6343\end_layout
6344
6345\begin_layout Subsubsection*
6346Arguments:
6347\end_layout
6348
6349\begin_layout Standard
6350None
6351\end_layout
6352
6353\begin_layout Subsubsection*
6354Description:
6355\end_layout
6356
6357\begin_layout Standard
6358This subroutine must be call when all definitions of a context is finished
6359 at the end of the initialization and before entering to the time loop.
6360 A lot of operations are performed internally (inheritance, grid definition,
6361 contacting servers,...) so this call is mandatory.
6362 Any call related to the tree management definition done after will have
6363 an undefined effect.
6364\end_layout
6365
6366\begin_layout Section*
6367Interface relative to calendar management
6368\end_layout
6369
6370\begin_layout Subsection*
6371Creating the calendar
6372\end_layout
6373
6374\begin_layout Subsubsection*
6375Synopsis:
6376\end_layout
6377
6378\begin_layout LyX-Code
6379SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
6380 &
6381\begin_inset Newline newline
6382\end_inset
6383
6384                                day_length, month_lengths, year_length,
6385 &
6386\begin_inset Newline newline
6387\end_inset
6388
6389                                leap_year_month, leap_year_drift, &
6390\begin_inset Newline newline
6391\end_inset
6392
6393                                leap_year_drift_offset)
6394\begin_inset Newline newline
6395\end_inset
6396
6397CHARACTER(len = *),              INTENT(IN) :: type
6398\begin_inset Newline newline
6399\end_inset
6400
6401TYPE(xios_duration),   OPTIONAL, INTENT(IN) :: timestep
6402\begin_inset Newline newline
6403\end_inset
6404
6405TYPE(xios_date),       OPTIONAL, INTENT(IN) :: start_date
6406\begin_inset Newline newline
6407\end_inset
6408
6409TYPE(xios_date),       OPTIONAL, INTENT(IN) :: time_origin
6410\begin_inset Newline newline
6411\end_inset
6412
6413INTEGER,               OPTIONAL, INTENT(IN) :: day_length
6414\begin_inset Newline newline
6415\end_inset
6416
6417INTEGER,               OPTIONAL, INTENT(IN) :: month_lengths(:)
6418\begin_inset Newline newline
6419\end_inset
6420
6421INTEGER,               OPTIONAL, INTENT(IN) :: year_length
6422\begin_inset Newline newline
6423\end_inset
6424
6425DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift
6426\begin_inset Newline newline
6427\end_inset
6428
6429DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift_offset
6430\begin_inset Newline newline
6431\end_inset
6432
6433INTEGER,               OPTIONAL, INTENT(IN) :: leap_year_month
6434\end_layout
6435
6436\begin_layout Subsubsection*
6437Arguments:
6438\end_layout
6439
6440\begin_layout Itemize
6441\begin_inset Flex Code
6442status collapsed
6443
6444\begin_layout Plain Layout
6445type
6446\end_layout
6447
6448\end_inset
6449
6450: the calendar type, one of
6451\begin_inset Flex Code
6452status collapsed
6453
6454\begin_layout Plain Layout
6455"Gregorian"
6456\end_layout
6457
6458\end_inset
6459
6460,
6461\begin_inset Flex Code
6462status collapsed
6463
6464\begin_layout Plain Layout
6465"Julian"
6466\end_layout
6467
6468\end_inset
6469
6470,
6471\begin_inset Flex Code
6472status collapsed
6473
6474\begin_layout Plain Layout
6475"D360"
6476\end_layout
6477
6478\end_inset
6479
6480,
6481\begin_inset Flex Code
6482status collapsed
6483
6484\begin_layout Plain Layout
6485"AllLeap"
6486\end_layout
6487
6488\end_inset
6489
6490,
6491\begin_inset Flex Code
6492status collapsed
6493
6494\begin_layout Plain Layout
6495"NoLeap"
6496\end_layout
6497
6498\end_inset
6499
6500,
6501\begin_inset Flex Code
6502status collapsed
6503
6504\begin_layout Plain Layout
6505"user_defined"
6506\end_layout
6507
6508\end_inset
6509
6510
6511\end_layout
6512
6513\begin_layout Itemize
6514\begin_inset Flex Code
6515status collapsed
6516
6517\begin_layout Plain Layout
6518timestep
6519\end_layout
6520
6521\end_inset
6522
6523: the time step of the simulation (optional, can be set later)
6524\end_layout
6525
6526\begin_layout Itemize
6527\begin_inset Flex Code
6528status collapsed
6529
6530\begin_layout Plain Layout
6531start_date
6532\end_layout
6533
6534\end_inset
6535
6536: the start date of the simulation (optional,
6537\begin_inset Flex Code
6538status collapsed
6539
6540\begin_layout Plain Layout
6541xios_date(0000, 01, 01, 00, 00, 00)
6542\end_layout
6543
6544\end_inset
6545
6546 is used by default)
6547\end_layout
6548
6549\begin_layout Itemize
6550\begin_inset Flex Code
6551status collapsed
6552
6553\begin_layout Plain Layout
6554time_origin
6555\end_layout
6556
6557\end_inset
6558
6559: the origin of the time axis (optional,
6560\begin_inset Flex Code
6561status collapsed
6562
6563\begin_layout Plain Layout
6564xios_date(0000, 01, 01, 00, 00, 00)
6565\end_layout
6566
6567\end_inset
6568
6569 is used by default)
6570\end_layout
6571
6572\begin_layout Itemize
6573\begin_inset Flex Code
6574status collapsed
6575
6576\begin_layout Plain Layout
6577day_length
6578\end_layout
6579
6580\end_inset
6581
6582: the length of a day in seconds (mandatory when creating an user defined
6583 calendar, must not be set otherwise)
6584\end_layout
6585
6586\begin_layout Itemize
6587\begin_inset Flex Code
6588status collapsed
6589
6590\begin_layout Plain Layout
6591month_lengths
6592\end_layout
6593
6594\end_inset
6595
6596: the length of each month of the year in days (either
6597\begin_inset Flex Code
6598status collapsed
6599
6600\begin_layout Plain Layout
6601month_lengths
6602\end_layout
6603
6604\end_inset
6605
6606 or
6607\begin_inset Flex Code
6608status collapsed
6609
6610\begin_layout Plain Layout
6611year_length
6612\end_layout
6613
6614\end_inset
6615
6616 must be set when creating an user defined calendar, must not be set otherwise)
6617\end_layout
6618
6619\begin_layout Itemize
6620\begin_inset Flex Code
6621status collapsed
6622
6623\begin_layout Plain Layout
6624year_length
6625\end_layout
6626
6627\end_inset
6628
6629: the length of a year in seconds (either
6630\begin_inset Flex Code
6631status collapsed
6632
6633\begin_layout Plain Layout
6634month_lengths
6635\end_layout
6636
6637\end_inset
6638
6639 or
6640\begin_inset Flex Code
6641status collapsed
6642
6643\begin_layout Plain Layout
6644year_length
6645\end_layout
6646
6647\end_inset
6648
6649 must be set when creating an user defined calendar, must not be set otherwise)
6650\end_layout
6651
6652\begin_layout Itemize
6653\begin_inset Flex Code
6654status collapsed
6655
6656\begin_layout Plain Layout
6657leap_year_drift
6658\end_layout
6659
6660\end_inset
6661
6662: the yearly drift between the user defined calendar and the astronomical
6663 calendar, expressed as a fraction of day (can optionally be set when creating
6664 an user defined calendar in which case
6665\begin_inset Flex Code
6666status collapsed
6667
6668\begin_layout Plain Layout
6669leap_year_month
6670\end_layout
6671
6672\end_inset
6673
6674 must be set too)
6675\end_layout
6676
6677\begin_layout Itemize
6678\begin_inset Flex Code
6679status collapsed
6680
6681\begin_layout Plain Layout
6682leap_year_drift_offset
6683\end_layout
6684
6685\end_inset
6686
6687: the initial drift between the user defined calendar and the astronomical
6688 calendar at the time origin, expressed as a fraction of day (can optionally
6689 be set if
6690\begin_inset Flex Code
6691status collapsed
6692
6693\begin_layout Plain Layout
6694leap_year_drift
6695\end_layout
6696
6697\end_inset
6698
6699 and
6700\begin_inset Flex Code
6701status collapsed
6702
6703\begin_layout Plain Layout
6704leap_year_month
6705\end_layout
6706
6707\end_inset
6708
6709 are set)
6710\end_layout
6711
6712\begin_layout Itemize
6713\begin_inset Flex Code
6714status collapsed
6715
6716\begin_layout Plain Layout
6717leap_year_month
6718\end_layout
6719
6720\end_inset
6721
6722: the month to which an extra day must be added in case of leap year (can
6723 optionally be set when creating an user defined calendar in which case
6724 
6725\begin_inset Flex Code
6726status collapsed
6727
6728\begin_layout Plain Layout
6729leap_year_drift
6730\end_layout
6731
6732\end_inset
6733
6734 must be set too)
6735\end_layout
6736
6737\begin_layout Standard
6738For a more detailed description of those arguments, see the description
6739 of the corresponding attributes in section 1.2
6740\begin_inset Quotes eld
6741\end_inset
6742
6743Calendar attribute reference
6744\begin_inset Quotes erd
6745\end_inset
6746
6747.
6748\end_layout
6749
6750\begin_layout Subsubsection*
6751Description:
6752\end_layout
6753
6754\begin_layout Standard
6755This subroutine creates the calendar for the current context.
6756 Note that the calendar is created once and for all, either from the XML
6757 configuration file or the Fortran interface.
6758 If it was not created from the configuration file, then this subroutine
6759 must be called once and only once before the context definition is closed.
6760 The calendar features can be used immediately after the calendar was created.
6761\begin_inset Newline newline
6762\end_inset
6763
6764
6765\begin_inset Newline newline
6766\end_inset
6767
6768If an user defined calendar is created, the following arguments must also
6769 be provided:
6770\begin_inset Flex Code
6771status collapsed
6772
6773\begin_layout Plain Layout
6774day_length
6775\end_layout
6776
6777\end_inset
6778
6779 and either
6780\begin_inset Flex Code
6781status collapsed
6782
6783\begin_layout Plain Layout
6784month_lengths
6785\end_layout
6786
6787\end_inset
6788
6789 or
6790\begin_inset Flex Code
6791status collapsed
6792
6793\begin_layout Plain Layout
6794year_length
6795\end_layout
6796
6797\end_inset
6798
6799.
6800 Optionally it is possible to configure the user defined calendar to have
6801 leap years.
6802 In this case,
6803\begin_inset Flex Code
6804status collapsed
6805
6806\begin_layout Plain Layout
6807leap_year_drift
6808\end_layout
6809
6810\end_inset
6811
6812 and
6813\begin_inset Flex Code
6814status collapsed
6815
6816\begin_layout Plain Layout
6817leap_year_month
6818\end_layout
6819
6820\end_inset
6821
6822 must also be provided and
6823\begin_inset Flex Code
6824status collapsed
6825
6826\begin_layout Plain Layout
6827leap_year_drift_offset
6828\end_layout
6829
6830\end_inset
6831
6832 might be used.
6833\end_layout
6834
6835\begin_layout Subsection*
6836Accessing the calendar type of the current calendar
6837\end_layout
6838
6839\begin_layout Subsubsection*
6840Synopsis:
6841\end_layout
6842
6843\begin_layout LyX-Code
6844SUBROUTINE xios_get_calendar_type(calendar_type)
6845\begin_inset Newline newline
6846\end_inset
6847
6848CHARACTER(len=*), INTENT(OUT) :: calendar_type
6849\end_layout
6850
6851\begin_layout Subsubsection*
6852Arguments:
6853\end_layout
6854
6855\begin_layout Itemize
6856\begin_inset Flex Code
6857status collapsed
6858
6859\begin_layout Plain Layout
6860calendar_type
6861\end_layout
6862
6863\end_inset
6864
6865: on output, the type of the calendar attached to the current context
6866\end_layout
6867
6868\begin_layout Subsubsection*
6869Description:
6870\end_layout
6871
6872\begin_layout Standard
6873This subroutine gets the calendar type associated to the current context.
6874 It will raise an error if used before the calendar was created.
6875\end_layout
6876
6877\begin_layout Subsection*
6878Accessing and defining the time step of the current calendar
6879\end_layout
6880
6881\begin_layout Subsubsection*
6882Synopsis:
6883\end_layout
6884
6885\begin_layout LyX-Code
6886SUBROUTINE xios_get_timestep(timestep)
6887\begin_inset Newline newline
6888\end_inset
6889
6890TYPE(xios_duration), INTENT(OUT) :: timestep
6891\end_layout
6892
6893\begin_layout Standard
6894and
6895\end_layout
6896
6897\begin_layout LyX-Code
6898SUBROUTINE xios_set_timestep(timestep)
6899\begin_inset Newline newline
6900\end_inset
6901
6902TYPE(xios_duration), INTENT(IN) :: timestep
6903\end_layout
6904
6905\begin_layout Subsubsection*
6906Arguments:
6907\end_layout
6908
6909\begin_layout Itemize
6910\begin_inset Flex Code
6911status collapsed
6912
6913\begin_layout Plain Layout
6914timestep
6915\end_layout
6916
6917\end_inset
6918
6919: a duration corresponding to the time step of the simulation
6920\end_layout
6921
6922\begin_layout Subsubsection*
6923Description:
6924\end_layout
6925
6926\begin_layout Standard
6927Those subroutines respectively gets and sets the time step associated to
6928 the calendar of the current context.
6929 Note that the time step must always be set before the context definition
6930 is closed and that an error will be raised if the getter subroutine is
6931 used before the time step is defined.
6932\end_layout
6933
6934\begin_layout Subsection*
6935Accessing and defining the start date of the current calendar
6936\end_layout
6937
6938\begin_layout Subsubsection*
6939Synopsis:
6940\end_layout
6941
6942\begin_layout LyX-Code
6943SUBROUTINE xios_get_start_date(start_date)
6944\begin_inset Newline newline
6945\end_inset
6946
6947TYPE(xios_date), INTENT(OUT) :: start_date
6948\end_layout
6949
6950\begin_layout Standard
6951and
6952\end_layout
6953
6954\begin_layout LyX-Code
6955SUBROUTINE xios_set_start_date(start_date)
6956\begin_inset Newline newline
6957\end_inset
6958
6959TYPE(xios_date), INTENT(IN) :: start_date
6960\end_layout
6961
6962\begin_layout Subsubsection*
6963Arguments:
6964\end_layout
6965
6966\begin_layout Itemize
6967\begin_inset Flex Code
6968status collapsed
6969
6970\begin_layout Plain Layout
6971start_date
6972\end_layout
6973
6974\end_inset
6975
6976: a date corresponding to the beginning of the simulation
6977\end_layout
6978
6979\begin_layout Subsubsection*
6980Description:
6981\end_layout
6982
6983\begin_layout Standard
6984Those subroutines respectively gets and sets the start date associated to
6985 the calendar of the current context.
6986 They must not be used before the calendar was created.
6987\end_layout
6988
6989\begin_layout Subsection*
6990Accessing and defining the time origin of the current calendar
6991\end_layout
6992
6993\begin_layout Subsubsection*
6994Synopsis:
6995\end_layout
6996
6997\begin_layout LyX-Code
6998SUBROUTINE xios_get_time_origin(time_origin)
6999\begin_inset Newline newline
7000\end_inset
7001
7002TYPE(xios_date), INTENT(OUT) :: time_origin
7003\end_layout
7004
7005\begin_layout Standard
7006and
7007\end_layout
7008
7009\begin_layout LyX-Code
7010SUBROUTINE xios_set_time_date(time_origin)
7011\begin_inset Newline newline
7012\end_inset
7013
7014TYPE(xios_date), INTENT(IN) :: time_origin
7015\end_layout
7016
7017\begin_layout Subsubsection*
7018Arguments:
7019\end_layout
7020
7021\begin_layout Itemize
7022\begin_inset Flex Code
7023status collapsed
7024
7025\begin_layout Plain Layout
7026start_date
7027\end_layout
7028
7029\end_inset
7030
7031: a date corresponding to the origin of the time axis
7032\end_layout
7033
7034\begin_layout Subsubsection*
7035Description:
7036\end_layout
7037
7038\begin_layout Standard
7039Those subroutines respectively gets and sets the origin of time associated
7040 to the calendar of the current context.
7041 They must not be used before the calendar was created.
7042\end_layout
7043
7044\begin_layout Subsection*
7045Updating the current date of the current calendar
7046\end_layout
7047
7048\begin_layout Subsubsection*
7049Synopsis:
7050\end_layout
7051
7052\begin_layout LyX-Code
7053SUBROUTINE xios_update_calendar(step)
7054\begin_inset Newline newline
7055\end_inset
7056
7057INTEGER, INTENT(IN) :: step
7058\end_layout
7059
7060\begin_layout Subsubsection*
7061Arguments:
7062\end_layout
7063
7064\begin_layout Itemize
7065\begin_inset Flex Code
7066status collapsed
7067
7068\begin_layout Plain Layout
7069step
7070\end_layout
7071
7072\end_inset
7073
7074: the current iteration number
7075\end_layout
7076
7077\begin_layout Subsubsection*
7078Description:
7079\end_layout
7080
7081\begin_layout Standard
7082This subroutine sets the current date associated to the calendar of the
7083 current context based on the current iteration number:
7084\begin_inset Formula $current\_date=start\_date+step\times timestep$
7085\end_inset
7086
7087.
7088 It must not be used before the calendar was created.
7089\end_layout
7090
7091\begin_layout Subsection*
7092Accessing the current date of the current calendar
7093\end_layout
7094
7095\begin_layout Subsubsection*
7096Synopsis:
7097\end_layout
7098
7099\begin_layout LyX-Code
7100SUBROUTINE xios_get_current_date(current_date)
7101\begin_inset Newline newline
7102\end_inset
7103
7104TYPE(xios_date), INTENT(OUT) :: current_date
7105\end_layout
7106
7107\begin_layout Subsubsection*
7108Arguments:
7109\end_layout
7110
7111\begin_layout Itemize
7112\begin_inset Flex Code
7113status collapsed
7114
7115\begin_layout Plain Layout
7116current_date
7117\end_layout
7118
7119\end_inset
7120
7121: on output, the current date
7122\end_layout
7123
7124\begin_layout Subsubsection*
7125Description:
7126\end_layout
7127
7128\begin_layout Standard
7129This subroutine gets the current date associated to the calendar of the
7130 current context.
7131 It must not be used before the calendar was created.
7132\end_layout
7133
7134\begin_layout Subsection*
7135Accessing the year length of the current calendar
7136\end_layout
7137
7138\begin_layout Subsubsection*
7139Synopsis:
7140\end_layout
7141
7142\begin_layout LyX-Code
7143INTEGER FUNCTION xios_get_year_length_in_seconds(year)
7144\begin_inset Newline newline
7145\end_inset
7146
7147INTEGER, INTENT(IN) :: year
7148\end_layout
7149
7150\begin_layout Subsubsection*
7151Arguments:
7152\end_layout
7153
7154\begin_layout Itemize
7155\begin_inset Flex Code
7156status collapsed
7157
7158\begin_layout Plain Layout
7159year
7160\end_layout
7161
7162\end_inset
7163
7164: the year whose length is requested
7165\end_layout
7166
7167\begin_layout Subsubsection*
7168Description:
7169\end_layout
7170
7171\begin_layout Standard
7172This function returns the duration in seconds of the specified year, taking
7173 leap years into account based on the calendar of the current context.
7174 It must not be used before the calendar was created.
7175\end_layout
7176
7177\begin_layout Subsection*
7178Accessing the day length of the current calendar
7179\end_layout
7180
7181\begin_layout Subsubsection*
7182Synopsis:
7183\end_layout
7184
7185\begin_layout LyX-Code
7186INTEGER FUNCTION xios_get_day_length_in_seconds()
7187\end_layout
7188
7189\begin_layout Subsubsection*
7190Arguments: None
7191\end_layout
7192
7193\begin_layout Subsubsection*
7194Description:
7195\end_layout
7196
7197\begin_layout Standard
7198This function returns the duration in seconds of a day, based on the calendar
7199 of the current context.
7200 It must not be used before the calendar was created.
7201\end_layout
7202
7203\begin_layout Section*
7204Interface relative to duration handling
7205\end_layout
7206
7207\begin_layout Subsection*
7208Duration constants
7209\end_layout
7210
7211\begin_layout Standard
7212Some duration constants are available to ease duration handling:
7213\end_layout
7214
7215\begin_layout Itemize
7216\begin_inset Flex Code
7217status collapsed
7218
7219\begin_layout Plain Layout
7220xios_year
7221\end_layout
7222
7223\end_inset
7224
7225
7226\end_layout
7227
7228\begin_layout Itemize
7229\begin_inset Flex Code
7230status collapsed
7231
7232\begin_layout Plain Layout
7233xios_month
7234\end_layout
7235
7236\end_inset
7237
7238
7239\end_layout
7240
7241\begin_layout Itemize
7242\begin_inset Flex Code
7243status collapsed
7244
7245\begin_layout Plain Layout
7246xios_day
7247\end_layout
7248
7249\end_inset
7250
7251
7252\end_layout
7253
7254\begin_layout Itemize
7255\begin_inset Flex Code
7256status collapsed
7257
7258\begin_layout Plain Layout
7259xios_hour
7260\end_layout
7261
7262\end_inset
7263
7264
7265\end_layout
7266
7267\begin_layout Itemize
7268\begin_inset Flex Code
7269status collapsed
7270
7271\begin_layout Plain Layout
7272xios_minute
7273\end_layout
7274
7275\end_inset
7276
7277
7278\end_layout
7279
7280\begin_layout Itemize
7281\begin_inset Flex Code
7282status collapsed
7283
7284\begin_layout Plain Layout
7285xios_second
7286\end_layout
7287
7288\end_inset
7289
7290
7291\end_layout
7292
7293\begin_layout Itemize
7294\begin_inset Flex Code
7295status collapsed
7296
7297\begin_layout Plain Layout
7298xios_timestep
7299\end_layout
7300
7301\end_inset
7302
7303
7304\end_layout
7305
7306\begin_layout Subsection*
7307Arithmetic operations on duration
7308\end_layout
7309
7310\begin_layout Standard
7311The following arithmetic operations on duration are available:
7312\end_layout
7313
7314\begin_layout Itemize
7315Addition:
7316\begin_inset Flex Code
7317status collapsed
7318
7319\begin_layout Plain Layout
7320xios_duration = xios_duration + xios_duration
7321\end_layout
7322
7323\end_inset
7324
7325
7326\end_layout
7327
7328\begin_layout Itemize
7329Subtraction:
7330\begin_inset Flex Code
7331status collapsed
7332
7333\begin_layout Plain Layout
7334xios_duration = xios_duration - xios_duration
7335\end_layout
7336
7337\end_inset
7338
7339
7340\end_layout
7341
7342\begin_layout Itemize
7343Multiplication by a scalar value:
7344\begin_inset Flex Code
7345status collapsed
7346
7347\begin_layout Plain Layout
7348xios_duration = scalar * xios_duration
7349\end_layout
7350
7351\end_inset
7352
7353 or
7354\begin_inset Flex Code
7355status collapsed
7356
7357\begin_layout Plain Layout
7358xios_duration = xios_duration * scalar
7359\end_layout
7360
7361\end_inset
7362
7363
7364\end_layout
7365
7366\begin_layout Itemize
7367Negation:
7368\begin_inset Flex Code
7369status collapsed
7370
7371\begin_layout Plain Layout
7372xios_duration = -xios_duration
7373\end_layout
7374
7375\end_inset
7376
7377
7378\end_layout
7379
7380\begin_layout Subsection*
7381Comparison operations on duration
7382\end_layout
7383
7384\begin_layout Standard
7385The following comparison operations on duration are available:
7386\end_layout
7387
7388\begin_layout Itemize
7389Equality:
7390\begin_inset Flex Code
7391status collapsed
7392
7393\begin_layout Plain Layout
7394LOGICAL = xios_duration == xios_duration
7395\end_layout
7396
7397\end_inset
7398
7399
7400\end_layout
7401
7402\begin_layout Itemize
7403Inequality:
7404\begin_inset Flex Code
7405status collapsed
7406
7407\begin_layout Plain Layout
7408LOGICAL = xios_duration /= xios_duration
7409\end_layout
7410
7411\end_inset
7412
7413
7414\end_layout
7415
7416\begin_layout Section*
7417Interface relative to date handling
7418\end_layout
7419
7420\begin_layout Subsection*
7421Arithmetic operations on dates
7422\end_layout
7423
7424\begin_layout Standard
7425The following arithmetic operations on dates are available:
7426\end_layout
7427
7428\begin_layout Itemize
7429Addition of a duration:
7430\begin_inset Flex Code
7431status collapsed
7432
7433\begin_layout Plain Layout
7434xios_date = xios_date + xios_duration
7435\end_layout
7436
7437\end_inset
7438
7439
7440\end_layout
7441
7442\begin_layout Itemize
7443Subtraction of a duration:
7444\begin_inset Flex Code
7445status collapsed
7446
7447\begin_layout Plain Layout
7448xios_date = xios_date - xios_duration
7449\end_layout
7450
7451\end_inset
7452
7453
7454\end_layout
7455
7456\begin_layout Itemize
7457Subtraction of two dates:
7458\begin_inset Flex Code
7459status collapsed
7460
7461\begin_layout Plain Layout
7462xios_duration = xios_date - xios_date
7463\end_layout
7464
7465\end_inset
7466
7467
7468\end_layout
7469
7470\begin_layout Subsection*
7471Comparison operations on dates
7472\end_layout
7473
7474\begin_layout Standard
7475The following comparison operations on dates are available:
7476\end_layout
7477
7478\begin_layout Itemize
7479Equality:
7480\begin_inset Flex Code
7481status collapsed
7482
7483\begin_layout Plain Layout
7484LOGICAL = xios_date == xios_date
7485\end_layout
7486
7487\end_inset
7488
7489
7490\end_layout
7491
7492\begin_layout Itemize
7493Inequality:
7494\begin_inset Flex Code
7495status collapsed
7496
7497\begin_layout Plain Layout
7498LOGICAL = xios_date /= xios_date
7499\end_layout
7500
7501\end_inset
7502
7503
7504\end_layout
7505
7506\begin_layout Itemize
7507Less than:
7508\begin_inset Flex Code
7509status collapsed
7510
7511\begin_layout Plain Layout
7512LOGICAL = xios_date < xios_date
7513\end_layout
7514
7515\end_inset
7516
7517
7518\end_layout
7519
7520\begin_layout Itemize
7521Less or equal:
7522\begin_inset Flex Code
7523status collapsed
7524
7525\begin_layout Plain Layout
7526LOGICAL = xios_date <= xios_date
7527\end_layout
7528
7529\end_inset
7530
7531
7532\end_layout
7533
7534\begin_layout Itemize
7535Greater than:
7536\begin_inset Flex Code
7537status collapsed
7538
7539\begin_layout Plain Layout
7540LOGICAL = xios_date > xios_date
7541\end_layout
7542
7543\end_inset
7544
7545
7546\end_layout
7547
7548\begin_layout Itemize
7549Greater or equal:
7550\begin_inset Flex Code
7551status collapsed
7552
7553\begin_layout Plain Layout
7554LOGICAL = xios_date >= xios_date
7555\end_layout
7556
7557\end_inset
7558
7559
7560\end_layout
7561
7562\begin_layout Subsection*
7563Converting a date to a number of seconds since the time origin
7564\end_layout
7565
7566\begin_layout Subsubsection*
7567Synopsis:
7568\end_layout
7569
7570\begin_layout LyX-Code
7571FUNCTION INTEGER(kind = 8) xios_date_convert_to_seconds(date)
7572\begin_inset Newline newline
7573\end_inset
7574
7575TYPE(xios_date), INTENT(IN) :: date
7576\end_layout
7577
7578\begin_layout Subsubsection*
7579Arguments:
7580\end_layout
7581
7582\begin_layout Itemize
7583\begin_inset Flex Code
7584status collapsed
7585
7586\begin_layout Plain Layout
7587date
7588\end_layout
7589
7590\end_inset
7591
7592: the date to convert
7593\end_layout
7594
7595\begin_layout Subsubsection*
7596Description:
7597\end_layout
7598
7599\begin_layout Standard
7600This function returns the number of seconds since the time origin for the
7601 specified date, based on the calendar of the current context.
7602 It must not be used before the calendar was created.
7603\end_layout
7604
7605\begin_layout Subsection*
7606Converting a date to a number of seconds since the beginning of the year
7607\end_layout
7608
7609\begin_layout Subsubsection*
7610Synopsis:
7611\end_layout
7612
7613\begin_layout LyX-Code
7614FUNCTION INTEGER xios(date_get_second_of_year)(date)
7615\begin_inset Newline newline
7616\end_inset
7617
7618TYPE(xios_date), INTENT(IN) :: date
7619\end_layout
7620
7621\begin_layout Subsubsection*
7622Arguments:
7623\end_layout
7624
7625\begin_layout Itemize
7626\begin_inset Flex Code
7627status collapsed
7628
7629\begin_layout Plain Layout
7630date
7631\end_layout
7632
7633\end_inset
7634
7635: the date to convert
7636\end_layout
7637
7638\begin_layout Subsubsection*
7639Description:
7640\end_layout
7641
7642\begin_layout Standard
7643This function returns the number of seconds since the beginning of the year
7644 for the specified date, based on the calendar of the current context.
7645 It must not be used before the calendar was created.
7646\end_layout
7647
7648\begin_layout Subsection*
7649Converting a date to a number of days since the beginning of the year
7650\end_layout
7651
7652\begin_layout Subsubsection*
7653Synopsis:
7654\end_layout
7655
7656\begin_layout LyX-Code
7657FUNCTION DOUBLE_PRECISION xios_date_get_day_of_year(date)
7658\begin_inset Newline newline
7659\end_inset
7660
7661TYPE(xios_date), INTENT(IN) :: date
7662\end_layout
7663
7664\begin_layout Subsubsection*
7665Arguments:
7666\end_layout
7667
7668\begin_layout Itemize
7669\begin_inset Flex Code
7670status collapsed
7671
7672\begin_layout Plain Layout
7673date
7674\end_layout
7675
7676\end_inset
7677
7678: the date to convert
7679\end_layout
7680
7681\begin_layout Subsubsection*
7682Description:
7683\end_layout
7684
7685\begin_layout Standard
7686This function returns the number of days since the beginning of the year
7687 for the specified date, based on the calendar of the current context.
7688 It must not be used before the calendar was created.
7689\end_layout
7690
7691\begin_layout Subsection*
7692Converting a date to a fraction of the current year
7693\end_layout
7694
7695\begin_layout Subsubsection*
7696Synopsis:
7697\end_layout
7698
7699\begin_layout LyX-Code
7700FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_year(date)
7701\begin_inset Newline newline
7702\end_inset
7703
7704TYPE(xios_date), INTENT(IN) :: date
7705\end_layout
7706
7707\begin_layout Subsubsection*
7708Arguments:
7709\end_layout
7710
7711\begin_layout Itemize
7712\begin_inset Flex Code
7713status collapsed
7714
7715\begin_layout Plain Layout
7716date
7717\end_layout
7718
7719\end_inset
7720
7721: the date to convert
7722\end_layout
7723
7724\begin_layout Subsubsection*
7725Description:
7726\end_layout
7727
7728\begin_layout Standard
7729This function returns the fraction of year corresponding to the specified
7730 date, based on the calendar of the current context.
7731 It must not be used before the calendar was created.
7732\end_layout
7733
7734\begin_layout Subsection*
7735Converting a date to a number of seconds since the beginning of the day
7736\end_layout
7737
7738\begin_layout Subsubsection*
7739Synopsis:
7740\end_layout
7741
7742\begin_layout LyX-Code
7743FUNCTION INTEGER xios(date_get_second_of_day)(date)
7744\begin_inset Newline newline
7745\end_inset
7746
7747TYPE(xios_date), INTENT(IN) :: date
7748\end_layout
7749
7750\begin_layout Subsubsection*
7751Arguments:
7752\end_layout
7753
7754\begin_layout Itemize
7755\begin_inset Flex Code
7756status collapsed
7757
7758\begin_layout Plain Layout
7759date
7760\end_layout
7761
7762\end_inset
7763
7764: the date to convert
7765\end_layout
7766
7767\begin_layout Subsubsection*
7768Description:
7769\end_layout
7770
7771\begin_layout Standard
7772This function returns the number of seconds since the beginning of the day
7773 for the specified date, based on the calendar of the current context.
7774 It must not be used before the calendar was created.
7775\end_layout
7776
7777\begin_layout Subsection*
7778Converting a date to a fraction of the current day
7779\end_layout
7780
7781\begin_layout Subsubsection*
7782Synopsis:
7783\end_layout
7784
7785\begin_layout LyX-Code
7786FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_day(date)
7787\begin_inset Newline newline
7788\end_inset
7789
7790TYPE(xios_date), INTENT(IN) :: date
7791\end_layout
7792
7793\begin_layout Subsubsection*
7794Arguments:
7795\end_layout
7796
7797\begin_layout Itemize
7798\begin_inset Flex Code
7799status collapsed
7800
7801\begin_layout Plain Layout
7802date
7803\end_layout
7804
7805\end_inset
7806
7807: the date to convert
7808\end_layout
7809
7810\begin_layout Subsubsection*
7811Description:
7812\end_layout
7813
7814\begin_layout Standard
7815This function returns the fraction of day corresponding to the specified
7816 date, based on the calendar of the current context.
7817 It must not be used before the calendar was created.
7818\end_layout
7819
7820\end_body
7821\end_document
Note: See TracBrowser for help on using the repository browser.