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

Last change on this file since 797 was 797, checked in by mhnguyen, 6 years ago

Updating User guide and reference doc

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