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

Last change on this file since 714 was 714, checked in by rlacroix, 6 years ago

Update the reference doc to account for my recent changes.

Also fixe some mistakes in the "Variables" section and the "default_value" description.

File size: 116.5 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*
1005size:
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 :: size
1024\end_layout
1025
1026\begin_layout Standard
1027Define the size of the axis.
1028 This attribute is mandatory.
1029\end_layout
1030
1031\begin_layout Subsection*
1032zoom_begin:
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 :: zoom_begin
1051\end_layout
1052
1053\begin_layout Standard
1054Define the the beginning of the zoom.
1055 This must be an index between 1 and
1056\begin_inset Flex Strong
1057status collapsed
1058
1059\begin_layout Plain Layout
1060size
1061\end_layout
1062
1063\end_inset
1064
1065.
1066 If not specified the default value is 1.
1067 It must also be evaluated from
1068\begin_inset Flex Strong
1069status collapsed
1070
1071\begin_layout Plain Layout
1072zoom_end
1073\end_layout
1074
1075\end_inset
1076
1077 and
1078\begin_inset Flex Strong
1079status collapsed
1080
1081\begin_layout Plain Layout
1082zoom_size
1083\end_layout
1084
1085\end_inset
1086
1087 if these are specified.
1088\end_layout
1089
1090\begin_layout Subsection*
1091zoom_end:
1092\begin_inset Flex Emph
1093status collapsed
1094
1095\begin_layout Plain Layout
1096integer
1097\end_layout
1098
1099\end_inset
1100
1101
1102\end_layout
1103
1104\begin_layout Standard
1105Fortran:
1106\end_layout
1107
1108\begin_layout LyX-Code
1109INTEGER :: zoom_end
1110\end_layout
1111
1112\begin_layout Standard
1113Define the the end of the zoom.
1114 This must be an index between 1 and
1115\begin_inset Flex Strong
1116status collapsed
1117
1118\begin_layout Plain Layout
1119size
1120\end_layout
1121
1122\end_inset
1123
1124.
1125 If not specified the default value is
1126\begin_inset Flex Strong
1127status collapsed
1128
1129\begin_layout Plain Layout
1130size
1131\end_layout
1132
1133\end_inset
1134
1135.
1136 It must also be evaluated from
1137\begin_inset Flex Strong
1138status collapsed
1139
1140\begin_layout Plain Layout
1141zoom_begin
1142\end_layout
1143
1144\end_inset
1145
1146 and
1147\begin_inset Flex Strong
1148status collapsed
1149
1150\begin_layout Plain Layout
1151zoom_size
1152\end_layout
1153
1154\end_inset
1155
1156 if these are specified.
1157\end_layout
1158
1159\begin_layout Subsection*
1160zoom_size:
1161\begin_inset Flex Emph
1162status collapsed
1163
1164\begin_layout Plain Layout
1165integer
1166\end_layout
1167
1168\end_inset
1169
1170
1171\end_layout
1172
1173\begin_layout Standard
1174Fortran:
1175\end_layout
1176
1177\begin_layout LyX-Code
1178INTEGER :: zoom_size
1179\end_layout
1180
1181\begin_layout Standard
1182Define the the size of the zoom.
1183 This must be an integer between 1 and
1184\begin_inset Flex Strong
1185status collapsed
1186
1187\begin_layout Plain Layout
1188size
1189\end_layout
1190
1191\end_inset
1192
1193.
1194 If not specified the default value is
1195\begin_inset Flex Strong
1196status collapsed
1197
1198\begin_layout Plain Layout
1199size
1200\end_layout
1201
1202\end_inset
1203
1204.
1205 It must also be evaluated from
1206\begin_inset Flex Strong
1207status collapsed
1208
1209\begin_layout Plain Layout
1210zoom_begin
1211\end_layout
1212
1213\end_inset
1214
1215 and
1216\begin_inset Flex Strong
1217status collapsed
1218
1219\begin_layout Plain Layout
1220zoom_end
1221\end_layout
1222
1223\end_inset
1224
1225 if these are specified.
1226\end_layout
1227
1228\begin_layout Subsection*
1229value:
1230\begin_inset Flex Emph
1231status collapsed
1232
1233\begin_layout Plain Layout
12341D-array of double
1235\end_layout
1236
1237\end_inset
1238
1239
1240\end_layout
1241
1242\begin_layout Standard
1243Fortran:
1244\end_layout
1245
1246\begin_layout LyX-Code
1247DOUBLE PRECISION :: value(:)
1248\end_layout
1249
1250\begin_layout Standard
1251Define the value of each level of a vertical axis.
1252 The size of the array must be equal to the
1253\begin_inset Flex Strong
1254status collapsed
1255
1256\begin_layout Plain Layout
1257size
1258\end_layout
1259
1260\end_inset
1261
1262 attribute.
1263 If not defined the default values are filled with values from 1 to
1264\begin_inset Flex Strong
1265status collapsed
1266
1267\begin_layout Plain Layout
1268size
1269\end_layout
1270
1271\end_inset
1272
1273.
1274\end_layout
1275
1276\begin_layout Subsection*
1277bounds:
1278\begin_inset Flex Emph
1279status collapsed
1280
1281\begin_layout Plain Layout
12822D-array of double
1283\end_layout
1284
1285\end_inset
1286
1287
1288\end_layout
1289
1290\begin_layout Standard
1291Fortran:
1292\end_layout
1293
1294\begin_layout LyX-Code
1295DOUBLE PRECISION :: value(:,:)
1296\end_layout
1297
1298\begin_layout Standard
1299Define the boundaries of each level of a the vertical axis.
1300 The dimensions of the array must be
1301\begin_inset Formula $2\times\textbf{size}$
1302\end_inset
1303
1304.
1305\end_layout
1306
1307\begin_layout Section
1308Domain attribute reference
1309\end_layout
1310
1311\begin_layout Subsection*
1312name:
1313\begin_inset Flex Emph
1314status collapsed
1315
1316\begin_layout Plain Layout
1317string
1318\end_layout
1319
1320\end_inset
1321
1322
1323\end_layout
1324
1325\begin_layout Standard
1326Fortran:
1327\end_layout
1328
1329\begin_layout LyX-Code
1330CHARACTER(LEN=*) :: name
1331\end_layout
1332
1333\begin_layout Standard
1334Define the name of the horizontal domain.
1335 This attribute may be used in case of multiple domains defined in the same
1336 file.
1337 In this case, the
1338\begin_inset Flex Strong
1339status collapsed
1340
1341\begin_layout Plain Layout
1342name
1343\end_layout
1344
1345\end_inset
1346
1347 attribute will be suffixed to the longitude and latitude dimensions and
1348 axis name.
1349 Otherwise, a suffix will be self-generated.
1350\end_layout
1351
1352\begin_layout Subsection*
1353type:
1354\begin_inset Flex Emph
1355status collapsed
1356
1357\begin_layout Plain Layout
1358enumeration { regular, curvilinear, unstructured }
1359\end_layout
1360
1361\end_inset
1362
1363
1364\end_layout
1365
1366\begin_layout Standard
1367Fortran:
1368\end_layout
1369
1370\begin_layout LyX-Code
1371CHARACTER(LEN=*) :: type
1372\end_layout
1373
1374\begin_layout Standard
1375Define the type of the grid.
1376\end_layout
1377
1378\begin_layout Subsection*
1379ni_glo:
1380\begin_inset Flex Emph
1381status collapsed
1382
1383\begin_layout Plain Layout
1384integer
1385\end_layout
1386
1387\end_inset
1388
1389
1390\end_layout
1391
1392\begin_layout Standard
1393Fortran:
1394\end_layout
1395
1396\begin_layout LyX-Code
1397INTEGER :: ni_glo
1398\end_layout
1399
1400\begin_layout Standard
1401Define the first dimension of the global domain.
1402 This attribute is mandatory.
1403\end_layout
1404
1405\begin_layout Subsection*
1406nj_glo:
1407\begin_inset Flex Emph
1408status collapsed
1409
1410\begin_layout Plain Layout
1411integer
1412\end_layout
1413
1414\end_inset
1415
1416
1417\end_layout
1418
1419\begin_layout Standard
1420Fortran:
1421\end_layout
1422
1423\begin_layout LyX-Code
1424INTEGER :: nj_glo
1425\end_layout
1426
1427\begin_layout Standard
1428Define the second dimension of the global domain.
1429 This attribute is mandatory.
1430\end_layout
1431
1432\begin_layout Subsection*
1433ni:
1434\begin_inset Flex Emph
1435status collapsed
1436
1437\begin_layout Plain Layout
1438integer
1439\end_layout
1440
1441\end_inset
1442
1443
1444\end_layout
1445
1446\begin_layout Standard
1447Fortran:
1448\end_layout
1449
1450\begin_layout LyX-Code
1451INTEGER :: ni
1452\end_layout
1453
1454\begin_layout Standard
1455Define the first dimension of the local domain.
1456 This attribute may be also computed from
1457\begin_inset Flex Strong
1458status collapsed
1459
1460\begin_layout Plain Layout
1461ibegin
1462\end_layout
1463
1464\end_inset
1465
1466 and
1467\begin_inset Flex Strong
1468status collapsed
1469
1470\begin_layout Plain Layout
1471iend
1472\end_layout
1473
1474\end_inset
1475
1476 attribute value, so this attribute is optional.
1477 But, if defined, a consistent value must be supplied.
1478\end_layout
1479
1480\begin_layout Standard
1481\begin_inset Formula $ni=iend-ibegin+1$
1482\end_inset
1483
1484
1485\end_layout
1486
1487\begin_layout Standard
1488\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
1489\end_inset
1490
1491
1492\end_layout
1493
1494\begin_layout Subsection*
1495ibegin:
1496\begin_inset Flex Emph
1497status collapsed
1498
1499\begin_layout Plain Layout
1500integer
1501\end_layout
1502
1503\end_inset
1504
1505
1506\end_layout
1507
1508\begin_layout Standard
1509Fortran:
1510\end_layout
1511
1512\begin_layout LyX-Code
1513INTEGER :: ibegin
1514\end_layout
1515
1516\begin_layout Standard
1517Define the begining index of the first dimension of the local domain.
1518 This attribute may be also computed from
1519\begin_inset Flex Strong
1520status collapsed
1521
1522\begin_layout Plain Layout
1523ni
1524\end_layout
1525
1526\end_inset
1527
1528 and
1529\begin_inset Flex Strong
1530status collapsed
1531
1532\begin_layout Plain Layout
1533iend
1534\end_layout
1535
1536\end_inset
1537
1538 attribute values, so this attribute is optional.
1539 But, if defined, a consistent value must be supplied.
1540\end_layout
1541
1542\begin_layout Standard
1543\begin_inset Formula $ibegin=iend-ni+1$
1544\end_inset
1545
1546
1547\end_layout
1548
1549\begin_layout Standard
1550\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
1551\end_inset
1552
1553
1554\end_layout
1555
1556\begin_layout Subsection*
1557iend:
1558\begin_inset Flex Emph
1559status collapsed
1560
1561\begin_layout Plain Layout
1562integer
1563\end_layout
1564
1565\end_inset
1566
1567
1568\end_layout
1569
1570\begin_layout Standard
1571Fortran:
1572\end_layout
1573
1574\begin_layout LyX-Code
1575INTEGER :: iend
1576\end_layout
1577
1578\begin_layout Standard
1579Define the end index of the first dimension of the local domain.
1580 This attribute may be also computed from
1581\begin_inset Flex Strong
1582status collapsed
1583
1584\begin_layout Plain Layout
1585ni
1586\end_layout
1587
1588\end_inset
1589
1590 and
1591\begin_inset Flex Strong
1592status collapsed
1593
1594\begin_layout Plain Layout
1595ibegin
1596\end_layout
1597
1598\end_inset
1599
1600 attribute values, so this attribute is optional.
1601 But, if defined, a consistent value must be supplied.
1602\end_layout
1603
1604\begin_layout Standard
1605\begin_inset Formula $iend=ibegin+ni-1$
1606\end_inset
1607
1608
1609\end_layout
1610
1611\begin_layout Standard
1612\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
1613\end_inset
1614
1615
1616\end_layout
1617
1618\begin_layout Subsection*
1619nj:
1620\begin_inset Flex Emph
1621status collapsed
1622
1623\begin_layout Plain Layout
1624integer
1625\end_layout
1626
1627\end_inset
1628
1629
1630\end_layout
1631
1632\begin_layout Standard
1633Fortran:
1634\end_layout
1635
1636\begin_layout LyX-Code
1637INTEGER :: nj
1638\end_layout
1639
1640\begin_layout Standard
1641Define the second dimension of the local domain.
1642 This attribute may be also computed from
1643\begin_inset Flex Strong
1644status collapsed
1645
1646\begin_layout Plain Layout
1647jbegin
1648\end_layout
1649
1650\end_inset
1651
1652 and
1653\begin_inset Flex Strong
1654status collapsed
1655
1656\begin_layout Plain Layout
1657jend
1658\end_layout
1659
1660\end_inset
1661
1662 attribute values, so this attribute is optional.
1663 But, if defined, a consistent value must be supplied.
1664\end_layout
1665
1666\begin_layout Standard
1667\begin_inset Formula $nj=jend-jbegin+1$
1668\end_inset
1669
1670
1671\end_layout
1672
1673\begin_layout Standard
1674\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
1675\end_inset
1676
1677
1678\end_layout
1679
1680\begin_layout Subsection*
1681jbegin:
1682\begin_inset Flex Emph
1683status collapsed
1684
1685\begin_layout Plain Layout
1686integer
1687\end_layout
1688
1689\end_inset
1690
1691
1692\end_layout
1693
1694\begin_layout Standard
1695Fortran:
1696\end_layout
1697
1698\begin_layout LyX-Code
1699INTEGER :: jbegin
1700\end_layout
1701
1702\begin_layout Standard
1703Define the beginning index of the second dimension of the local domain.
1704 This attribute may be also computed from
1705\begin_inset Flex Strong
1706status collapsed
1707
1708\begin_layout Plain Layout
1709nj
1710\end_layout
1711
1712\end_inset
1713
1714 and
1715\begin_inset Flex Strong
1716status collapsed
1717
1718\begin_layout Plain Layout
1719jend
1720\end_layout
1721
1722\end_inset
1723
1724 attribute values, so this attribute is optional.
1725 But, if defined, a consistent value must be supplied.
1726\end_layout
1727
1728\begin_layout Standard
1729\begin_inset Formula $jbegin=jend-nj+1$
1730\end_inset
1731
1732
1733\end_layout
1734
1735\begin_layout Standard
1736\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
1737\end_inset
1738
1739
1740\end_layout
1741
1742\begin_layout Subsection*
1743jend:
1744\begin_inset Flex Emph
1745status collapsed
1746
1747\begin_layout Plain Layout
1748integer
1749\end_layout
1750
1751\end_inset
1752
1753
1754\end_layout
1755
1756\begin_layout Standard
1757Fortran:
1758\end_layout
1759
1760\begin_layout LyX-Code
1761INTEGER :: jend
1762\end_layout
1763
1764\begin_layout Standard
1765Define the ending index of the second dimension of the local domain.
1766 This attribute may be also computed from
1767\begin_inset Flex Strong
1768status collapsed
1769
1770\begin_layout Plain Layout
1771nj
1772\end_layout
1773
1774\end_inset
1775
1776 and
1777\begin_inset Flex Strong
1778status collapsed
1779
1780\begin_layout Plain Layout
1781jbegin
1782\end_layout
1783
1784\end_inset
1785
1786 attribute values, so this attribute is optional.
1787 But, if defined, a consistent value must be supplied.
1788\end_layout
1789
1790\begin_layout Standard
1791\begin_inset Formula $jend=jbegin+nj-1$
1792\end_inset
1793
1794
1795\end_layout
1796
1797\begin_layout Standard
1798\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
1799\end_inset
1800
1801
1802\end_layout
1803
1804\begin_layout Subsection*
1805zoom_ni:
1806\emph on
1807integer
1808\end_layout
1809
1810\begin_layout Standard
1811Fortran:
1812\end_layout
1813
1814\begin_layout LyX-Code
1815INTEGER :: zoom_ni
1816\end_layout
1817
1818\begin_layout Standard
1819Define the size of the zoom on the first dimension on the global domain.
1820 This attribute is optional.
1821 The default value is
1822\begin_inset Flex Strong
1823status collapsed
1824
1825\begin_layout Plain Layout
1826ni
1827\end_layout
1828
1829\end_inset
1830
1831.
1832\end_layout
1833
1834\begin_layout Standard
1835\begin_inset Formula $1\leq zoom\_ni\leq ni$
1836\end_inset
1837
1838
1839\end_layout
1840
1841\begin_layout Subsection*
1842zoom_ibegin:
1843\emph on
1844integer
1845\end_layout
1846
1847\begin_layout Standard
1848Fortran
1849\end_layout
1850
1851\begin_layout LyX-Code
1852INTEGER :: zoom_ibegin
1853\end_layout
1854
1855\begin_layout Standard
1856Define the beginning index on the first dimension of the zoom for the global
1857 domain.
1858 This attribute is optional.
1859 The default value is
1860\begin_inset Flex Strong
1861status collapsed
1862
1863\begin_layout Plain Layout
18641
1865\end_layout
1866
1867\end_inset
1868
1869.
1870\end_layout
1871
1872\begin_layout Subsection*
1873zoom_nj:
1874\emph on
1875integer
1876\end_layout
1877
1878\begin_layout Standard
1879Fortran:
1880\end_layout
1881
1882\begin_layout LyX-Code
1883INTEGER :: zoom_nj
1884\end_layout
1885
1886\begin_layout Standard
1887Define the size of the zoom on the second dimension for the global domain.
1888 This attribute is optional.
1889 The default value is
1890\begin_inset Flex Strong
1891status collapsed
1892
1893\begin_layout Plain Layout
1894nj
1895\end_layout
1896
1897\end_inset
1898
1899.
1900\end_layout
1901
1902\begin_layout Standard
1903\begin_inset Formula $1\leq zoom\_ni\leq ni$
1904\end_inset
1905
1906
1907\end_layout
1908
1909\begin_layout Subsection*
1910zoom_jbegin:
1911\emph on
1912integer
1913\end_layout
1914
1915\begin_layout Standard
1916Fortran:
1917\end_layout
1918
1919\begin_layout LyX-Code
1920INTEGER :: zoom_jbegin
1921\end_layout
1922
1923\begin_layout Standard
1924Define the beginning index on the second dimension of the zoom for the global
1925 domain.
1926 This attribute is optional.
1927 The default value is
1928\begin_inset Flex Strong
1929status collapsed
1930
1931\begin_layout Plain Layout
19321
1933\end_layout
1934
1935\end_inset
1936
1937.
1938\end_layout
1939
1940\begin_layout Subsection*
1941mask:
1942\emph on
19432D-array of bool
1944\end_layout
1945
1946\begin_layout Standard
1947Fortran:
1948\end_layout
1949
1950\begin_layout LyX-Code
1951LOGICAL :: mask(:,:)
1952\end_layout
1953
1954\begin_layout Standard
1955Define the mask of the local domain.
1956 The masked value will be replaced by the value of the field attribute
1957\begin_inset Flex Strong
1958status collapsed
1959
1960\begin_layout Plain Layout
1961default_value
1962\end_layout
1963
1964\end_inset
1965
1966 in the output file.
1967\end_layout
1968
1969\begin_layout Subsection*
1970lonvalue:
1971\emph on
19721D-array of double
1973\end_layout
1974
1975\begin_layout Standard
1976Fortran:
1977\end_layout
1978
1979\begin_layout LyX-Code
1980DOUBLE PRECISION :: lonvalue(:)
1981\end_layout
1982
1983\begin_layout Standard
1984Define the value of the longitude on the local domain.
1985 For a cartesian grid, the size of the array will be
1986\begin_inset Flex Strong
1987status collapsed
1988
1989\begin_layout Plain Layout
1990ni
1991\end_layout
1992
1993\end_inset
1994
1995.
1996 For a curvilinear grid, the size of the array will be
1997\begin_inset Flex Strong
1998status collapsed
1999
2000\begin_layout Plain Layout
2001ni
2002\begin_inset Formula $\times$
2003\end_inset
2004
2005nj
2006\end_layout
2007
2008\end_inset
2009
2010.
2011 This attribute is mandatory.
2012\end_layout
2013
2014\begin_layout Subsection*
2015latvalue:
2016\emph on
20171D-array of double
2018\end_layout
2019
2020\begin_layout Standard
2021Fortran:
2022\end_layout
2023
2024\begin_layout LyX-Code
2025DOUBLE PRECISION :: latvalue(:)
2026\end_layout
2027
2028\begin_layout Standard
2029Define the value of the latitude on the local domain.
2030 For a cartesian grid, the size of the array will be nj.
2031 For a curvilinear grid, the size of the array will be
2032\begin_inset Flex Strong
2033status collapsed
2034
2035\begin_layout Plain Layout
2036ni
2037\begin_inset Formula $\times$
2038\end_inset
2039
2040nj
2041\end_layout
2042
2043\end_inset
2044
2045.
2046 This attribute is mandatory.
2047\end_layout
2048
2049\begin_layout Subsection*
2050nvertex:
2051\emph on
2052integer
2053\end_layout
2054
2055\begin_layout Standard
2056Fortran:
2057\end_layout
2058
2059\begin_layout LyX-Code
2060INTEGER :: nvertex
2061\end_layout
2062
2063\begin_layout Standard
2064Define the the maximum number of vertices for a cell.
2065 This is useful to specify the boundaries of cells for an unstructured mesh.
2066 This attribute is optional.
2067\end_layout
2068
2069\begin_layout Subsection*
2070bounds_lon:
2071\emph on
20721D-array of double
2073\end_layout
2074
2075\begin_layout Standard
2076Fortran:
2077\end_layout
2078
2079\begin_layout LyX-Code
2080DOUBLE PRECISION :: bounds_lon(:)
2081\end_layout
2082
2083\begin_layout Standard
2084Longitude value of the vertex of the cells.
2085\begin_inset Flex Strong
2086status collapsed
2087
2088\begin_layout Plain Layout
2089nvertex
2090\end_layout
2091
2092\end_inset
2093
2094 attribute must also be defined.
2095 This attribute is optional.
2096\end_layout
2097
2098\begin_layout Subsection*
2099bounds_lat:
2100\emph on
21011D-array of double
2102\end_layout
2103
2104\begin_layout Standard
2105Fortran:
2106\end_layout
2107
2108\begin_layout LyX-Code
2109DOUBLE PRECISION :: bounds_lat(:)
2110\end_layout
2111
2112\begin_layout Standard
2113Latitude value of the vertex of the cells.
2114\begin_inset Flex Strong
2115status collapsed
2116
2117\begin_layout Plain Layout
2118nvertex
2119\end_layout
2120
2121\end_inset
2122
2123 attribute must also be defined.
2124 This attribute is optional.
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 mandatory.
2232\end_layout
2233
2234\begin_layout Subsection*
2235data_ibegin:
2236\emph on
2237 integer
2238\end_layout
2239
2240\begin_layout Standard
2241Fortran:
2242\end_layout
2243
2244\begin_layout LyX-Code
2245INTEGER :: data_ibegin
2246\end_layout
2247
2248\begin_layout Standard
2249Define the beginning index of the field data for the first dimension.
2250 This attribute is an offset regarding the local domain, so the value can
2251 be negative.
2252 A negative value indicates that only some valid part of the data will extracted
2253, for example in the case of a ghost cell.
2254 A positive value indicates that the local domain is greater than the data
2255 stored in memory.
2256 A 0-value means that the local domain matches the data in memory.
2257 This attribute is optional and the default value is 0.
2258 Otherwise
2259\begin_inset Flex Strong
2260status collapsed
2261
2262\begin_layout Plain Layout
2263data_ibegin
2264\end_layout
2265
2266\end_inset
2267
2268 and
2269\begin_inset Flex Strong
2270status collapsed
2271
2272\begin_layout Plain Layout
2273data_ni
2274\end_layout
2275
2276\end_inset
2277
2278 must be defined together.
2279\end_layout
2280
2281\begin_layout Subsection*
2282data_ni:
2283\emph on
2284integer
2285\end_layout
2286
2287\begin_layout Standard
2288Fortran:
2289\end_layout
2290
2291\begin_layout LyX-Code
2292INTEGER :: data_ni
2293\end_layout
2294
2295\begin_layout Standard
2296Define the size of the field data for the first dimension.
2297 This attribute is optional and the default value is
2298\begin_inset Flex Strong
2299status collapsed
2300
2301\begin_layout Plain Layout
2302ni
2303\end_layout
2304
2305\end_inset
2306
2307.
2308 Otherwise
2309\begin_inset Flex Strong
2310status collapsed
2311
2312\begin_layout Plain Layout
2313data_ibegin
2314\end_layout
2315
2316\end_inset
2317
2318 and
2319\begin_inset Flex Strong
2320status collapsed
2321
2322\begin_layout Plain Layout
2323data_ni
2324\end_layout
2325
2326\end_inset
2327
2328 must be defined together.
2329\end_layout
2330
2331\begin_layout Subsection*
2332data_jbegin:
2333\emph on
2334integer
2335\end_layout
2336
2337\begin_layout Standard
2338Fortran:
2339\end_layout
2340
2341\begin_layout LyX-Code
2342INTEGER :: data_jbegin
2343\end_layout
2344
2345\begin_layout Standard
2346Define the beginning index of the field data for the second dimension.
2347 This attribute is take account only if
2348\begin_inset Flex Strong
2349status collapsed
2350
2351\begin_layout Plain Layout
2352 data_dim=2
2353\end_layout
2354
2355\end_inset
2356
2357.
2358 This attribute is an offset regarding the local domain, so the value can
2359 be negative.
2360 A negative value indicate that only some valid part of the data will extracted,
2361 for example in case of ghost cell.
2362 A positive value indicate that the local domain is greater than the data
2363 stored in memory.
2364 A 0-value means that the local domain match the data in memory.
2365 This attribute is optional and the default value is
2366\begin_inset Flex Strong
2367status collapsed
2368
2369\begin_layout Plain Layout
23700
2371\end_layout
2372
2373\end_inset
2374
2375.
2376 Otherwise
2377\begin_inset Flex Strong
2378status collapsed
2379
2380\begin_layout Plain Layout
2381data_jbegin
2382\end_layout
2383
2384\end_inset
2385
2386 and
2387\begin_inset Flex Strong
2388status collapsed
2389
2390\begin_layout Plain Layout
2391data_nj
2392\end_layout
2393
2394\end_inset
2395
2396 must be defined together.
2397\end_layout
2398
2399\begin_layout Subsection*
2400data_nj:
2401\emph on
2402integer
2403\end_layout
2404
2405\begin_layout Standard
2406Fortran:
2407\end_layout
2408
2409\begin_layout LyX-Code
2410INTEGER :: data_nj
2411\end_layout
2412
2413\begin_layout Standard
2414Define the size of the field data for the first dimension.
2415 This attribute is take account only if
2416\begin_inset Flex Strong
2417status collapsed
2418
2419\begin_layout Plain Layout
2420data_dim=2
2421\end_layout
2422
2423\end_inset
2424
2425.
2426 This attribute is optional and the default value is
2427\begin_inset Flex Strong
2428status collapsed
2429
2430\begin_layout Plain Layout
2431nj
2432\end_layout
2433
2434\end_inset
2435
2436.
2437 Otherwise
2438\begin_inset Flex Strong
2439status collapsed
2440
2441\begin_layout Plain Layout
2442data_jbegin
2443\end_layout
2444
2445\end_inset
2446
2447 and
2448\begin_inset Flex Strong
2449status collapsed
2450
2451\begin_layout Plain Layout
2452data_nj
2453\end_layout
2454
2455\end_inset
2456
2457 must be defined together.
2458\end_layout
2459
2460\begin_layout Subsection*
2461data_n_index:
2462\emph on
2463integer
2464\end_layout
2465
2466\begin_layout Standard
2467Fortran:
2468\end_layout
2469
2470\begin_layout LyX-Code
2471INTEGER :: data_nindex
2472\end_layout
2473
2474\begin_layout Standard
2475In case of a compressed horizontal domain, this attribute define the number
2476 of points stored in memory on the local domain.
2477\end_layout
2478
2479\begin_layout Subsection*
2480data_i_index:
2481\emph on
24821D-array of integer
2483\end_layout
2484
2485\begin_layout Standard
2486Fortran:
2487\end_layout
2488
2489\begin_layout LyX-Code
2490INTEGER :: data_i_index(:)
2491\end_layout
2492
2493\begin_layout Standard
2494In case of a compressed horizontal domain, define the indexation the indexation
2495 of the data for the first dimension.
2496 The size of the array must be
2497\begin_inset Flex Strong
2498status collapsed
2499
2500\begin_layout Plain Layout
2501data_nindex
2502\end_layout
2503
2504\end_inset
2505
2506.
2507 This attribute is optional.
2508\end_layout
2509
2510\begin_layout Subsection*
2511data_j_index:
2512\emph on
25131D-array of integer
2514\end_layout
2515
2516\begin_layout Standard
2517Fortran:
2518\end_layout
2519
2520\begin_layout LyX-Code
2521INTEGER :: data_j_index(:)
2522\end_layout
2523
2524\begin_layout Standard
2525In case of a compressed horizontal domain, define the indexation the indexation
2526 of the data for the second dimension.
2527 This is meaningful only if
2528\begin_inset Flex Strong
2529status collapsed
2530
2531\begin_layout Plain Layout
2532data_dim=2
2533\end_layout
2534
2535\end_inset
2536
2537.
2538 The size of the array must be
2539\begin_inset Flex Strong
2540status collapsed
2541
2542\begin_layout Plain Layout
2543data_nindex
2544\end_layout
2545
2546\end_inset
2547
2548.
2549 This attribute is optional.
2550\end_layout
2551
2552\begin_layout Section
2553Grid attribute reference
2554\end_layout
2555
2556\begin_layout Subsection*
2557name: string
2558\end_layout
2559
2560\begin_layout Standard
2561Fortran:
2562\end_layout
2563
2564\begin_layout LyX-Code
2565CHARACTER(LEN=*) :: name
2566\end_layout
2567
2568\begin_layout Standard
2569Define the name of the grid.
2570 This attribute is actually not used internally.
2571 Optional attribute.
2572\end_layout
2573
2574\begin_layout Subsection*
2575domain_ref: string
2576\end_layout
2577
2578\begin_layout Standard
2579Fortran:
2580\end_layout
2581
2582\begin_layout LyX-Code
2583CHARACTER(LEN=*) :: domain_ref
2584\end_layout
2585
2586\begin_layout Standard
2587Define the horizontal domain reference of the grid.
2588 This attribute is mandatory.
2589\end_layout
2590
2591\begin_layout Subsection*
2592axis_ref: string
2593\end_layout
2594
2595\begin_layout Standard
2596Fortran:
2597\end_layout
2598
2599\begin_layout LyX-Code
2600CHARACTER(LEN=*) :: axis_ref
2601\end_layout
2602
2603\begin_layout Standard
2604Define the axis reference of the grid.
2605 This attribute is optional, if not defined, the grid will be considered
2606 as a 2-Dimensionnal grid without vertical layer.
2607\end_layout
2608
2609\begin_layout Subsection*
2610mask:
2611\emph on
26123D-array of bool
2613\end_layout
2614
2615\begin_layout Standard
2616Fortran:
2617\end_layout
2618
2619\begin_layout LyX-Code
2620LOGICAL :: mask(:,:,:)
2621\end_layout
2622
2623\begin_layout Standard
2624Define the mask of the local grid.
2625 Masked value will be replaced by the value of the field attribute
2626\begin_inset Flex Strong
2627status collapsed
2628
2629\begin_layout Plain Layout
2630default_value
2631\end_layout
2632
2633\end_inset
2634
2635 in the output file.
2636\end_layout
2637
2638\begin_layout Section
2639Field attribute reference
2640\end_layout
2641
2642\begin_layout Subsection*
2643name:
2644\emph on
2645string
2646\end_layout
2647
2648\begin_layout Standard
2649Fortran:
2650\end_layout
2651
2652\begin_layout LyX-Code
2653CHARACTER(LEN=*) :: name
2654\end_layout
2655
2656\begin_layout Standard
2657Define the
2658\begin_inset Flex Strong
2659status collapsed
2660
2661\begin_layout Plain Layout
2662name
2663\end_layout
2664
2665\end_inset
2666
2667 of the field as it will appear in an output file.
2668 This attribute is optional.
2669 If not present, the identifier
2670\begin_inset Flex Strong
2671status collapsed
2672
2673\begin_layout Plain Layout
2674id
2675\end_layout
2676
2677\end_inset
2678
2679 will be substituted.
2680\end_layout
2681
2682\begin_layout Subsection*
2683standard_name:
2684\emph on
2685string
2686\end_layout
2687
2688\begin_layout Standard
2689Fortran:
2690\end_layout
2691
2692\begin_layout LyX-Code
2693CHARACTER(LEN=*) :: standard_name
2694\end_layout
2695
2696\begin_layout Standard
2697Define the
2698\begin_inset Flex Strong
2699status collapsed
2700
2701\begin_layout Plain Layout
2702standard_name
2703\end_layout
2704
2705\end_inset
2706
2707 attribute as it will appear in the metadata of an output file.
2708 This attribute is optional.
2709\end_layout
2710
2711\begin_layout Subsection*
2712long_name:
2713\emph on
2714string
2715\end_layout
2716
2717\begin_layout Standard
2718Fortran:
2719\end_layout
2720
2721\begin_layout LyX-Code
2722CHARACTER(LEN=*) :: long_name
2723\end_layout
2724
2725\begin_layout Standard
2726Define the
2727\begin_inset Flex Strong
2728status collapsed
2729
2730\begin_layout Plain Layout
2731long_name
2732\end_layout
2733
2734\end_inset
2735
2736 attribute as it will appear in the metadata of an output file.
2737 This attribute is optional.
2738\end_layout
2739
2740\begin_layout Subsection*
2741unit:
2742\emph on
2743string
2744\end_layout
2745
2746\begin_layout Standard
2747Fortran:
2748\end_layout
2749
2750\begin_layout LyX-Code
2751CHARACTER(LEN=*) :: unit
2752\end_layout
2753
2754\begin_layout Standard
2755Define the
2756\begin_inset Flex Strong
2757status collapsed
2758
2759\begin_layout Plain Layout
2760unit
2761\end_layout
2762
2763\end_inset
2764
2765 of the field.
2766 This attribute is optional.
2767\end_layout
2768
2769\begin_layout Subsection*
2770operation: enumeration
2771\emph on
2772 { once, instant, average, maximum, minimum, accumulate }
2773\end_layout
2774
2775\begin_layout Standard
2776Fortran:
2777\end_layout
2778
2779\begin_layout LyX-Code
2780CHARACTER(LEN=*) :: operation
2781\end_layout
2782
2783\begin_layout Standard
2784Define the temporal operation applied on the field.
2785 This attribute is optional, by default no operation is applied.
2786\end_layout
2787
2788\begin_layout Subsection*
2789freq_op:
2790\emph on
2791duration
2792\end_layout
2793
2794\begin_layout Standard
2795Fortran:
2796\end_layout
2797
2798\begin_layout LyX-Code
2799TYPE(xios_duration) :: freq_op
2800\end_layout
2801
2802\begin_layout Standard
2803Define the frequency of the sampling for the temporal operation, so a field
2804 value will be used for temporal averaging every
2805\begin_inset Flex Strong
2806status collapsed
2807
2808\begin_layout Plain Layout
2809freq_op
2810\end_layout
2811
2812\end_inset
2813
2814 time step.
2815 It is very useful for sub-processes called at different frequency in a
2816 model.
2817 This attribute is optional, the default value is
2818\begin_inset Flex Strong
2819status collapsed
2820
2821\begin_layout Plain Layout
28221ts
2823\end_layout
2824
2825\end_inset
2826
2827(1 time step).
2828\end_layout
2829
2830\begin_layout Subsection*
2831freq_offset:
2832\emph on
2833duration
2834\end_layout
2835
2836\begin_layout Standard
2837Fortran:
2838\end_layout
2839
2840\begin_layout LyX-Code
2841TYPE(xios_duration) :: freq_offset
2842\end_layout
2843
2844\begin_layout Standard
2845Define the offset when
2846\begin_inset Flex Strong
2847status collapsed
2848
2849\begin_layout Plain Layout
2850freq_op
2851\end_layout
2852
2853\end_inset
2854
2855 is defined.
2856 This attribute is optional, the default value is
2857\begin_inset Flex Strong
2858status collapsed
2859
2860\begin_layout Plain Layout
28610ts
2862\end_layout
2863
2864\end_inset
2865
2866(0 time step).
2867\end_layout
2868
2869\begin_layout Standard
2870\begin_inset Formula $0\leq freq\_offset<freq\_op$
2871\end_inset
2872
2873
2874\end_layout
2875
2876\begin_layout Subsection*
2877level:
2878\emph on
2879integer
2880\end_layout
2881
2882\begin_layout Standard
2883Fortran:
2884\end_layout
2885
2886\begin_layout LyX-Code
2887INTEGER :: level
2888\end_layout
2889
2890\begin_layout Standard
2891Define the level of output of the field.
2892 A field will be output only if the file attribute
2893\begin_inset Flex Strong
2894status collapsed
2895
2896\begin_layout Plain Layout
2897 output_level
2898\begin_inset Formula $\geq$
2899\end_inset
2900
2901level
2902\end_layout
2903
2904\end_inset
2905
2906.
2907 This attribute is optional, the default value is
2908\begin_inset Flex Strong
2909status collapsed
2910
2911\begin_layout Plain Layout
29120
2913\end_layout
2914
2915\end_inset
2916
2917.
2918\end_layout
2919
2920\begin_layout Subsection*
2921prec:
2922\emph on
2923integer
2924\end_layout
2925
2926\begin_layout Standard
2927Fortran:
2928\end_layout
2929
2930\begin_layout LyX-Code
2931INTEGER :: prec
2932\end_layout
2933
2934\begin_layout Standard
2935Define the precision in byte of a field in an output file.
2936 Available value are: 2 (integer), 4 (float single precision) and 8 (float
2937 double precision).
2938\end_layout
2939
2940\begin_layout Subsection*
2941enabled:
2942\emph on
2943bool
2944\end_layout
2945
2946\begin_layout Standard
2947Fortran:
2948\end_layout
2949
2950\begin_layout LyX-Code
2951LOGICAL :: enabled
2952\end_layout
2953
2954\begin_layout Standard
2955Define if a field must be output or not.
2956 This attribute is optional, the default value is
2957\begin_inset Flex Strong
2958status collapsed
2959
2960\begin_layout Plain Layout
2961true
2962\end_layout
2963
2964\end_inset
2965
2966.
2967\end_layout
2968
2969\begin_layout Subsection*
2970read_access:
2971\emph on
2972bool
2973\end_layout
2974
2975\begin_layout Standard
2976Fortran:
2977\end_layout
2978
2979\begin_layout LyX-Code
2980LOGICAL :: read_access
2981\end_layout
2982
2983\begin_layout Standard
2984Define whether a field can be read from the model or not.
2985 This attribute is optional, the default value is
2986\begin_inset Flex Strong
2987status collapsed
2988
2989\begin_layout Plain Layout
2990false
2991\end_layout
2992
2993\end_inset
2994
2995.
2996 Note that for fields belonging to a file in
2997\series bold
2998\emph on
2999read
3000\series default
3001\emph default
3002 
3003\series bold
3004mode
3005\series default
3006, this attribute is always
3007\series bold
3008true
3009\series default
3010.
3011\end_layout
3012
3013\begin_layout Subsection*
3014field_ref:
3015\emph on
3016string
3017\end_layout
3018
3019\begin_layout Standard
3020Fortran:
3021\end_layout
3022
3023\begin_layout LyX-Code
3024CHARACTER(LEN=*) :: field_ref
3025\end_layout
3026
3027\begin_layout Standard
3028Define a field reference.
3029 All attributes are inherited from the referenced field after the classical
3030 inheritance mechanism.
3031 The value assigned to the referenced field is transmitted to to current
3032 field to perform temporal operation.
3033 This attribute is optional.
3034\end_layout
3035
3036\begin_layout Subsection*
3037grid_ref:
3038\emph on
3039string
3040\end_layout
3041
3042\begin_layout Standard
3043Fortran:
3044\end_layout
3045
3046\begin_layout LyX-Code
3047CHARACTER(LEN=*) :: grid_ref
3048\end_layout
3049
3050\begin_layout Standard
3051Define on which grid the current field is defined.
3052 This attribute is optional, if missing, domain_ref and axis_ref must be
3053 defining.
3054\end_layout
3055
3056\begin_layout Subsection*
3057domain_ref:
3058\emph on
3059string
3060\end_layout
3061
3062\begin_layout Standard
3063Fortran:
3064\end_layout
3065
3066\begin_layout LyX-Code
3067CHARACTER(LEN=*) :: domain_ref
3068\end_layout
3069
3070\begin_layout Standard
3071Define on which horizontal domain the current field is defined.
3072 This attribute is optional, but if this attribute is defined,
3073\begin_inset Flex Strong
3074status collapsed
3075
3076\begin_layout Plain Layout
3077grid_ref
3078\end_layout
3079
3080\end_inset
3081
3082 must not be.
3083\end_layout
3084
3085\begin_layout Subsection*
3086axis_ref:
3087\emph on
3088string
3089\end_layout
3090
3091\begin_layout Standard
3092Fortran:
3093\end_layout
3094
3095\begin_layout LyX-Code
3096CHARACTER(LEN=*) :: axis_ref
3097\end_layout
3098
3099\begin_layout Standard
3100Define on which vertical axis the current field is defined.
3101 This attribute is optional, but if this attribute is defined,
3102\begin_inset Flex Strong
3103status collapsed
3104
3105\begin_layout Plain Layout
3106domain_ref
3107\end_layout
3108
3109\end_inset
3110
3111 must be too and
3112\begin_inset Flex Strong
3113status collapsed
3114
3115\begin_layout Plain Layout
3116grid_ref
3117\end_layout
3118
3119\end_inset
3120
3121 must not.
3122\end_layout
3123
3124\begin_layout Subsection*
3125default_value:
3126\emph on
3127double
3128\end_layout
3129
3130\begin_layout Standard
3131Fortran:
3132\end_layout
3133
3134\begin_layout LyX-Code
3135DOUBLE PRECISION :: default_value
3136\end_layout
3137
3138\begin_layout Standard
3139Define the value which should be used in place of the missing data of a
3140 field.
3141 This attribute is optional.
3142 If no value was defined, the missing data will be replaced by uninitialized
3143 values which can lead to undefined behaviors.
3144\end_layout
3145
3146\begin_layout Subsection*
3147valid_min:
3148\emph on
3149double
3150\end_layout
3151
3152\begin_layout Standard
3153Fortran:
3154\end_layout
3155
3156\begin_layout LyX-Code
3157DOUBLE PRECISION :: valid_min
3158\end_layout
3159
3160\begin_layout Standard
3161All field values below
3162\begin_inset Flex Strong
3163status collapsed
3164
3165\begin_layout Plain Layout
3166valid_min
3167\end_layout
3168
3169\end_inset
3170
3171 attribute value are set to missing value.
3172\end_layout
3173
3174\begin_layout Subsection*
3175valid_min:
3176\emph on
3177double
3178\end_layout
3179
3180\begin_layout Standard
3181Fortran:
3182\end_layout
3183
3184\begin_layout LyX-Code
3185DOUBLE PRECISION :: valid_min
3186\end_layout
3187
3188\begin_layout Standard
3189All field values above
3190\begin_inset Flex Strong
3191status collapsed
3192
3193\begin_layout Plain Layout
3194valid_max
3195\end_layout
3196
3197\end_inset
3198
3199 attribute value are set to missing value.
3200\end_layout
3201
3202\begin_layout Subsection*
3203detect_missing_value:
3204\emph on
3205bool
3206\end_layout
3207
3208\begin_layout Standard
3209Fortran:
3210\end_layout
3211
3212\begin_layout LyX-Code
3213LOGICAL: detect_missing_value
3214\end_layout
3215
3216\begin_layout Standard
3217When XIOS detect a default value in a field, it does not include the value
3218 in the statistic of the operation, like averaging, minimum, maximum...
3219\end_layout
3220
3221\begin_layout Subsection*
3222add_offset:
3223\emph on
3224double
3225\end_layout
3226
3227\begin_layout Standard
3228Fortran:
3229\end_layout
3230
3231\begin_layout LyX-Code
3232DOUBLE PRECISION: add_offset
3233\end_layout
3234
3235\begin_layout Standard
3236Set the
3237\begin_inset Flex Strong
3238status collapsed
3239
3240\begin_layout Plain Layout
3241add_offset
3242\end_layout
3243
3244\end_inset
3245
3246 metadata CF attribute in the output file.
3247 In output, the
3248\begin_inset Flex Strong
3249status collapsed
3250
3251\begin_layout Plain Layout
3252add_offset
3253\end_layout
3254
3255\end_inset
3256
3257 value is subtracted to the field values.
3258\end_layout
3259
3260\begin_layout Subsection*
3261scale_factor:
3262\emph on
3263double
3264\end_layout
3265
3266\begin_layout Standard
3267Fortran:
3268\end_layout
3269
3270\begin_layout LyX-Code
3271DOUBLE PRECISION: scale_factor
3272\end_layout
3273
3274\begin_layout Standard
3275Set the
3276\begin_inset Flex Strong
3277status collapsed
3278
3279\begin_layout Plain Layout
3280scale_factor
3281\end_layout
3282
3283\end_inset
3284
3285 metadata CF attribute in the output file.
3286 In output, the field values are divided by the
3287\begin_inset Flex Strong
3288status collapsed
3289
3290\begin_layout Plain Layout
3291scale_factor
3292\end_layout
3293
3294\end_inset
3295
3296 value.
3297\end_layout
3298
3299\begin_layout Subsection*
3300compression_level:
3301\emph on
3302integer
3303\end_layout
3304
3305\begin_layout Standard
3306Fortran:
3307\end_layout
3308
3309\begin_layout LyX-Code
3310INTEGER :: compression_level
3311\end_layout
3312
3313\begin_layout Standard
3314Define whether the field should be compressed using NetCDF-4 built-in compressio
3315n.
3316 The compression level must range from 0 to 9.
3317 An higher compression level means a better compression at the cost of using
3318 more processing power.
3319 This attribute is optional, the default value is inherited from the file
3320 attribute
3321\series bold
3322compression_level
3323\series default
3324.
3325\end_layout
3326
3327\begin_layout Subsection*
3328indexed_output:
3329\emph on
3330bool
3331\end_layout
3332
3333\begin_layout Standard
3334Fortran:
3335\end_layout
3336
3337\begin_layout LyX-Code
3338LOGICAL :: indexed_output
3339\end_layout
3340
3341\begin_layout Standard
3342Define whether the field data must be outputted as an indexed grid instead
3343 of a full grid whenever possible.
3344 This attribute is optional, the default value is
3345\series bold
3346\emph on
3347false
3348\series default
3349\emph default
3350.
3351\end_layout
3352
3353\begin_layout Subsection*
3354ts_enabled:
3355\emph on
3356bool
3357\end_layout
3358
3359\begin_layout Standard
3360Fortran:
3361\end_layout
3362
3363\begin_layout LyX-Code
3364LOGICAL :: ts_enabled
3365\end_layout
3366
3367\begin_layout Standard
3368Define whether the field can be outputted as a timeserie if requested.
3369 This attribute is optional, the default value is
3370\series bold
3371\emph on
3372false
3373\series default
3374\emph default
3375.
3376\end_layout
3377
3378\begin_layout Subsection*
3379ts_split_freq:
3380\emph on
3381duration
3382\end_layout
3383
3384\begin_layout Standard
3385Fortran:
3386\end_layout
3387
3388\begin_layout LyX-Code
3389TYPE(xios_duration) :: ts_split_freq
3390\end_layout
3391
3392\begin_layout Standard
3393Define the splitting frequency that should be used for the timeserie if
3394 it has been requested.
3395 This attribute is optional, by default this value is inherited from the
3396 file
3397\series bold
3398split_freq
3399\series default
3400.
3401\end_layout
3402
3403\begin_layout Section
3404Variable attribute reference
3405\end_layout
3406
3407\begin_layout Subsection*
3408name:
3409\emph on
3410string
3411\end_layout
3412
3413\begin_layout Standard
3414Fortran:
3415\end_layout
3416
3417\begin_layout LyX-Code
3418CHARACTER(LEN=*) :: name
3419\end_layout
3420
3421\begin_layout Standard
3422Define the
3423\begin_inset Flex Strong
3424status collapsed
3425
3426\begin_layout Plain Layout
3427name
3428\end_layout
3429
3430\end_inset
3431
3432 of the variable as it will appear in an output file.
3433 This attribute is optional.
3434 If not present, the
3435\begin_inset Flex Strong
3436status collapsed
3437
3438\begin_layout Plain Layout
3439id
3440\end_layout
3441
3442\end_inset
3443
3444 will be used instead.
3445\end_layout
3446
3447\begin_layout Subsection*
3448type: enumeration { bool, int, int32, int16, int64, float, double, string
3449 }
3450\end_layout
3451
3452\begin_layout Standard
3453Fortran:
3454\end_layout
3455
3456\begin_layout LyX-Code
3457CHARACTER(LEN=*) :: type
3458\end_layout
3459
3460\begin_layout Standard
3461Define the
3462\begin_inset Flex Strong
3463status collapsed
3464
3465\begin_layout Plain Layout
3466type
3467\end_layout
3468
3469\end_inset
3470
3471 of the variable.
3472 Note that the
3473\series bold
3474\emph on
3475int
3476\series default
3477\emph default
3478 type is a synonym for
3479\series bold
3480\emph on
3481int32
3482\series default
3483\emph default
3484.
3485 This attribute is mandatory.
3486\end_layout
3487
3488\begin_layout Section
3489File attribute reference
3490\end_layout
3491
3492\begin_layout Subsection*
3493name:
3494\emph on
3495string
3496\end_layout
3497
3498\begin_layout Standard
3499Fortran:
3500\end_layout
3501
3502\begin_layout LyX-Code
3503CHARACTER(LEN=*) :: name
3504\end_layout
3505
3506\begin_layout Standard
3507Define the name of the file.
3508 This attribute is mandatory.
3509\end_layout
3510
3511\begin_layout Subsection*
3512name_suffix:
3513\emph on
3514string
3515\end_layout
3516
3517\begin_layout Standard
3518Fortran:
3519\end_layout
3520
3521\begin_layout LyX-Code
3522CHARACTER(LEN=*) :: name_suffix
3523\end_layout
3524
3525\begin_layout Standard
3526Define a suffix to add to the name of the file.
3527 This attribute is optional.
3528\end_layout
3529
3530\begin_layout Subsection*
3531min_digits:
3532\emph on
3533integer
3534\end_layout
3535
3536\begin_layout Standard
3537Fortran:
3538\end_layout
3539
3540\begin_layout LyX-Code
3541INTEGER :: min_digits
3542\end_layout
3543
3544\begin_layout Standard
3545For multiple_file, define the minimum digits composing the suffix defining
3546 the rank of the server, which will be happened to the name of the file.
3547 This attribute is optional and the default value is
3548\begin_inset Flex Strong
3549status collapsed
3550
3551\begin_layout Plain Layout
35520
3553\end_layout
3554
3555\end_inset
3556
3557.
3558\end_layout
3559
3560\begin_layout Subsection*
3561output_freq:
3562\emph on
3563duration
3564\end_layout
3565
3566\begin_layout Standard
3567Fortran:
3568\end_layout
3569
3570\begin_layout LyX-Code
3571TYPE(xios_duration) :: output_freq
3572\end_layout
3573
3574\begin_layout Standard
3575Define the output frequency for the current file.
3576 This attribute is mandatory.
3577\end_layout
3578
3579\begin_layout Subsection*
3580output_level:
3581\emph on
3582integer
3583\end_layout
3584
3585\begin_layout Standard
3586Fortran:
3587\end_layout
3588
3589\begin_layout LyX-Code
3590INTEGER :: output_level
3591\end_layout
3592
3593\begin_layout Standard
3594Define an output level for the field defining inside the current file.
3595 Field is output only if the field attribute
3596\begin_inset Formula $level\leq output\_level$
3597\end_inset
3598
3599.
3600\end_layout
3601
3602\begin_layout Subsection*
3603sync_freq:
3604\emph on
3605duration
3606\end_layout
3607
3608\begin_layout Standard
3609Fortran:
3610\end_layout
3611
3612\begin_layout LyX-Code
3613TYPE(xios_duration) :: sync_freq
3614\end_layout
3615
3616\begin_layout Standard
3617Define the frequency for flushing the current file onto disk.
3618 It may result bad performance but data are wrote even if the file will
3619 not be closed.
3620 This attribute is optional.
3621\end_layout
3622
3623\begin_layout Subsection*
3624split_freq:
3625\emph on
3626duration
3627\end_layout
3628
3629\begin_layout Standard
3630Fortran:
3631\end_layout
3632
3633\begin_layout LyX-Code
3634TYPE(xios_duration) :: split_freq
3635\end_layout
3636
3637\begin_layout Standard
3638Define the time frequency for splitting the current file.
3639 In that case, the start and end dates are added to the file
3640\series bold
3641name
3642\series default
3643 (see
3644\begin_inset Flex Emph
3645status collapsed
3646
3647\begin_layout Plain Layout
3648
3649\series bold
3650\emph on
3651split_freq_format
3652\end_layout
3653
3654\end_inset
3655
3656 attribute).
3657 This attribute is optional, by default no splitting is done.
3658\end_layout
3659
3660\begin_layout Subsection*
3661split_freq_format:
3662\emph on
3663string
3664\end_layout
3665
3666\begin_layout Standard
3667Fortran:
3668\end_layout
3669
3670\begin_layout LyX-Code
3671CHARACTER(LEN=*) :: split_freq_format
3672\end_layout
3673
3674\begin_layout Standard
3675Define the format of the split date suffixed to the file.
3676 Can contain any character,
3677\emph on
3678
3679\begin_inset Flex Code
3680status collapsed
3681
3682\begin_layout Plain Layout
3683%y
3684\end_layout
3685
3686\end_inset
3687
3688
3689\emph default
3690 will be replaced by the year (4 characters),
3691\begin_inset Flex Code
3692status collapsed
3693
3694\begin_layout Plain Layout
3695%mo
3696\end_layout
3697
3698\end_inset
3699
3700 by the month (2 char),
3701\begin_inset Flex Code
3702status collapsed
3703
3704\begin_layout Plain Layout
3705%d
3706\end_layout
3707
3708\end_inset
3709
3710 by the day (2 char),
3711\begin_inset Flex Code
3712status collapsed
3713
3714\begin_layout Plain Layout
3715%h
3716\end_layout
3717
3718\end_inset
3719
3720 by the hour (2 char),
3721\begin_inset Flex Code
3722status collapsed
3723
3724\begin_layout Plain Layout
3725%mi
3726\end_layout
3727
3728\end_inset
3729
3730 by the minute (2 char),
3731\begin_inset Flex Code
3732status collapsed
3733
3734\begin_layout Plain Layout
3735%s
3736\end_layout
3737
3738\end_inset
3739
3740 by the second (2 char),
3741\begin_inset Flex Code
3742status collapsed
3743
3744\begin_layout Plain Layout
3745%S
3746\end_layout
3747
3748\end_inset
3749
3750 by the number of seconds since the time origin and
3751\begin_inset Flex Code
3752status collapsed
3753
3754\begin_layout Plain Layout
3755%D
3756\end_layout
3757
3758\end_inset
3759
3760 by the number of full days since the time origin.
3761 This attribute is optional and the default behavior is to create a suffix
3762 with the date until the smaller non zero unit.
3763 For example, in one day split frequency, the hour, minute and second will
3764 not appear in the suffix, only year, month and day.
3765\end_layout
3766
3767\begin_layout Subsection*
3768enabled:
3769\emph on
3770bool
3771\end_layout
3772
3773\begin_layout Standard
3774Fortran:
3775\end_layout
3776
3777\begin_layout LyX-Code
3778LOGICAL :: enabled
3779\end_layout
3780
3781\begin_layout Standard
3782Define if a file must be written/read or not.
3783 This attribute is optional, the default value is
3784\begin_inset Flex Strong
3785status collapsed
3786
3787\begin_layout Plain Layout
3788true
3789\end_layout
3790
3791\end_inset
3792
3793.
3794\end_layout
3795
3796\begin_layout Subsection*
3797type:
3798\emph on
3799mode { read, write }
3800\end_layout
3801
3802\begin_layout Standard
3803Fortran:
3804\end_layout
3805
3806\begin_layout LyX-Code
3807CHARACTER(LEN=*) :: mode
3808\end_layout
3809
3810\begin_layout Standard
3811Define whether the file will be read or written.
3812 This attribute is optional, the default value is
3813\begin_inset Flex Strong
3814status collapsed
3815
3816\begin_layout Plain Layout
3817write
3818\end_layout
3819
3820\end_inset
3821
3822.
3823\end_layout
3824
3825\begin_layout Subsection*
3826type:
3827\emph on
3828enumeration { one_file, multiple_file }
3829\end_layout
3830
3831\begin_layout Standard
3832Fortran:
3833\end_layout
3834
3835\begin_layout LyX-Code
3836CHARACTER(LEN=*) :: type
3837\end_layout
3838
3839\begin_layout Standard
3840Define the type of the file:
3841\begin_inset Flex Strong
3842status collapsed
3843
3844\begin_layout Plain Layout
3845
3846\emph on
3847multiple_file
3848\end_layout
3849
3850\end_inset
3851
3852: one file by server using sequential netcdf writing,
3853\begin_inset Flex Strong
3854status collapsed
3855
3856\begin_layout Plain Layout
3857
3858\emph on
3859one_file
3860\end_layout
3861
3862\end_inset
3863
3864: one single global file is wrote using netcdf4 parallel access.
3865 This attribute is mandatory.
3866\end_layout
3867
3868\begin_layout Subsection*
3869format:
3870\emph on
3871enumeration { netcdf4, netcdf4_classic }
3872\end_layout
3873
3874\begin_layout Standard
3875Fortran:
3876\end_layout
3877
3878\begin_layout LyX-Code
3879CHARACTER(LEN=*) :: type
3880\end_layout
3881
3882\begin_layout Standard
3883Define the format of the file:
3884\begin_inset Flex Strong
3885status collapsed
3886
3887\begin_layout Plain Layout
3888
3889\emph on
3890netcdf4
3891\end_layout
3892
3893\end_inset
3894
3895: the HDF5 format will be used,
3896\begin_inset Flex Strong
3897status collapsed
3898
3899\begin_layout Plain Layout
3900
3901\emph on
3902netcdf4
3903\emph default
3904_
3905\emph on
3906classic
3907\end_layout
3908
3909\end_inset
3910
3911: the classic NetCDF format will be used.
3912 The attribute is optional, the default value is
3913\series bold
3914\emph on
3915netcdf4
3916\series default
3917\emph default
3918.
3919\begin_inset Newline newline
3920\end_inset
3921
3922
3923\begin_inset Newline newline
3924\end_inset
3925
3926Note that the
3927\series bold
3928\emph on
3929netcdf4
3930\emph default
3931_
3932\emph on
3933classic
3934\series default
3935\emph default
3936 format can be used with the attribute
3937\series bold
3938type
3939\series default
3940 set to
3941\series bold
3942\emph on
3943one_file
3944\series default
3945\emph default
3946 only if the NetCDF4 library was compiled with Parallel NetCDF support (--enable
3947-pnetcdf).
3948\end_layout
3949
3950\begin_layout Subsection*
3951par_access:
3952\emph on
3953enumeration { collective, independent }
3954\end_layout
3955
3956\begin_layout Standard
3957Fortran:
3958\end_layout
3959
3960\begin_layout LyX-Code
3961CHARACTER(LEN=*) :: par_access
3962\end_layout
3963
3964\begin_layout Standard
3965For parallel writing, define which type of MPI calls will be used.
3966 This attribute is optional, the default value is
3967\begin_inset Flex Strong
3968status collapsed
3969
3970\begin_layout Plain Layout
3971
3972\emph on
3973collective
3974\end_layout
3975
3976\end_inset
3977
3978.
3979\end_layout
3980
3981\begin_layout Subsection*
3982append:
3983\emph on
3984bool
3985\end_layout
3986
3987\begin_layout Standard
3988Fortran:
3989\end_layout
3990
3991\begin_layout LyX-Code
3992LOGICAL :: append
3993\end_layout
3994
3995\begin_layout Standard
3996Define whether the output data is to be appended at the end of the file
3997 if it already exists or if the existing file is to be overwritten.
3998 This attribute is optional, the default value is
3999\begin_inset Flex Strong
4000status collapsed
4001
4002\begin_layout Plain Layout
4003
4004\emph on
4005false
4006\end_layout
4007
4008\end_inset
4009
4010.
4011\end_layout
4012
4013\begin_layout Subsection*
4014compression_level:
4015\emph on
4016integer
4017\end_layout
4018
4019\begin_layout Standard
4020Fortran:
4021\end_layout
4022
4023\begin_layout LyX-Code
4024INTEGER :: compression_level
4025\end_layout
4026
4027\begin_layout Standard
4028Define whether the fields should be compressed using NetCDF-4 built-in compressi
4029on by default.
4030 The compression level must range from 0 to 9.
4031 An higher compression level means a better compression at the cost of using
4032 more processing power.
4033 This attribute is optional, the default value is
4034\begin_inset Flex Strong
4035status collapsed
4036
4037\begin_layout Plain Layout
4038
4039\emph on
40400
4041\end_layout
4042
4043\end_inset
4044
4045 (no compression).
4046\end_layout
4047
4048\begin_layout Subsection*
4049time_counter:
4050\emph on
4051enumeration { centered, instant, record, none }
4052\end_layout
4053
4054\begin_layout Standard
4055Fortran:
4056\end_layout
4057
4058\begin_layout LyX-Code
4059CHARACTER(LEN=*) :: time_counter
4060\end_layout
4061
4062\begin_layout Standard
4063Define how the
4064\begin_inset Quotes eld
4065\end_inset
4066
4067time_counter
4068\begin_inset Quotes erd
4069\end_inset
4070
4071 variable will be outputted:
4072\end_layout
4073
4074\begin_layout Itemize
4075
4076\series bold
4077\emph on
4078centered
4079\series default
4080\emph default
4081: use centered times
4082\end_layout
4083
4084\begin_layout Itemize
4085
4086\series bold
4087\emph on
4088instant
4089\series default
4090\emph default
4091: use instant times
4092\end_layout
4093
4094\begin_layout Itemize
4095
4096\series bold
4097\emph on
4098record
4099\series default
4100\emph default
4101: use record indexes
4102\end_layout
4103
4104\begin_layout Itemize
4105
4106\series bold
4107\emph on
4108none
4109\series default
4110\emph default
4111: do not output the variable.
4112\end_layout
4113
4114\begin_layout Standard
4115This attribute is optional, the default value is
4116\series bold
4117\emph on
4118centered
4119\series default
4120\emph default
4121.
4122\end_layout
4123
4124\begin_layout Subsection*
4125timeseries:
4126\emph on
4127enumeration { none, only, both, exclusive }
4128\end_layout
4129
4130\begin_layout Standard
4131Fortran:
4132\end_layout
4133
4134\begin_layout LyX-Code
4135CHARACTER(LEN=*) :: time_counter
4136\end_layout
4137
4138\begin_layout Standard
4139Define whether the timeseries must be outputted:
4140\end_layout
4141
4142\begin_layout Itemize
4143
4144\series bold
4145\emph on
4146none
4147\series default
4148\emph default
4149: no timeseries are outputted, only the regular file
4150\end_layout
4151
4152\begin_layout Itemize
4153
4154\series bold
4155\emph on
4156only
4157\series default
4158\emph default
4159: only the timeseries are outputted, the regular file is not created
4160\end_layout
4161
4162\begin_layout Itemize
4163
4164\series bold
4165\emph on
4166both
4167\series default
4168\emph default
4169: both the timeseries and the regular file are outputted.
4170\end_layout
4171
4172\begin_layout Itemize
4173
4174\series bold
4175\emph on
4176exclusive
4177\series default
4178\emph default
4179: the timeseries are outputted and a regular file is created with only the
4180 fields which were not marked for output as a timeserie (if any).
4181\end_layout
4182
4183\begin_layout Standard
4184This attribute is optional, the default value is
4185\series bold
4186\emph on
4187none
4188\series default
4189\emph default
4190.
4191\end_layout
4192
4193\begin_layout Subsection*
4194ts_prefix:
4195\emph on
4196string
4197\end_layout
4198
4199\begin_layout Standard
4200Fortran:
4201\end_layout
4202
4203\begin_layout LyX-Code
4204CHARACTER(LEN=*) :: ts_prefix
4205\end_layout
4206
4207\begin_layout Standard
4208Define the prefix to use for the name of the timeseries files.
4209 This attribute is optional, by default the file
4210\series bold
4211name
4212\series default
4213 will be used.
4214\end_layout
4215
4216\begin_layout Chapter
4217Fortran interface reference
4218\end_layout
4219
4220\begin_layout Section*
4221Initialization
4222\end_layout
4223
4224\begin_layout Subsection*
4225XIOS initialization
4226\end_layout
4227
4228\begin_layout Subsubsection*
4229Synopsis:
4230\end_layout
4231
4232\begin_layout LyX-Code
4233SUBROUTINE xios_initialize(client_id, local_comm, return_comm)
4234\end_layout
4235
4236\begin_layout LyX-Code
4237  CHARACTER(LEN=*),INTENT(IN)         :: client_id
4238\end_layout
4239
4240\begin_layout LyX-Code
4241  INTEGER,INTENT(IN),OPTIONAL         :: local_comm
4242\end_layout
4243
4244\begin_layout LyX-Code
4245  INTEGER,INTENT(OUT),OPTIONAL        :: return_comm
4246\end_layout
4247
4248\begin_layout Subsubsection*
4249Argument:
4250\end_layout
4251
4252\begin_layout Itemize
4253\begin_inset Flex Code
4254status collapsed
4255
4256\begin_layout Plain Layout
4257client_id
4258\end_layout
4259
4260\end_inset
4261
4262: client identifier
4263\end_layout
4264
4265\begin_layout Itemize
4266\begin_inset Flex Code
4267status collapsed
4268
4269\begin_layout Plain Layout
4270local_comm
4271\end_layout
4272
4273\end_inset
4274
4275: MPI communicator of the client
4276\end_layout
4277
4278\begin_layout Itemize
4279\begin_inset Flex Code
4280status collapsed
4281
4282\begin_layout Plain Layout
4283return_comm
4284\end_layout
4285
4286\end_inset
4287
4288: split return MPI communicator
4289\end_layout
4290
4291\begin_layout Subsubsection*
4292Description:
4293\end_layout
4294
4295\begin_layout Standard
4296This subroutine must be called before any other call of MPI client library.
4297 It may be able to initialize MPI library (calling
4298\begin_inset Flex Code
4299status collapsed
4300
4301\begin_layout Plain Layout
4302MPI_Init
4303\end_layout
4304
4305\end_inset
4306
4307) if not already initialized.
4308 Since XIOS is able to work in client/server mode (parameter
4309\begin_inset Flex Code
4310status collapsed
4311
4312\begin_layout Plain Layout
4313using_server=true
4314\end_layout
4315
4316\end_inset
4317
4318), the global communicator must be split and a local split communicator
4319 is returned to be used by the client model for it own purpose.
4320 If more than one model is present, XIOS could be interfaced with the OASIS
4321 coupler (compiled with
4322\begin_inset Flex Code
4323status collapsed
4324
4325\begin_layout Plain Layout
4326-using_oasis
4327\end_layout
4328
4329\end_inset
4330
4331 option and parameter
4332\begin_inset Flex Code
4333status collapsed
4334
4335\begin_layout Plain Layout
4336using_oasis=true
4337\end_layout
4338
4339\end_inset
4340
4341), so in this case, the splitting would be done globally by OASIS.
4342\end_layout
4343
4344\begin_layout Itemize
4345If MPI is not initialized, XIOS would initialize it calling MPI_Init function.
4346 In this case, the MPI finalization would be done by XIOS in the
4347\begin_inset Flex Code
4348status collapsed
4349
4350\begin_layout Plain Layout
4351xios_finalize
4352\end_layout
4353
4354\end_inset
4355
4356 subroutine, and must not be done by the model.
4357\end_layout
4358
4359\begin_layout Itemize
4360If OASIS coupler is not used (using_oasis=false)
4361\end_layout
4362
4363\begin_deeper
4364\begin_layout Itemize
4365If server mode is not activated (
4366\begin_inset Flex Code
4367status collapsed
4368
4369\begin_layout Plain Layout
4370using_server=false
4371\end_layout
4372
4373\end_inset
4374
4375): if local_comm MPI communicator is specified then it would be used for
4376 internal MPI communication otherwise
4377\begin_inset Flex Code
4378status collapsed
4379
4380\begin_layout Plain Layout
4381MPI_COMM_WORLD
4382\end_layout
4383
4384\end_inset
4385
4386 communicator would be used by default.
4387 A copy of the communicator (of
4388\begin_inset Flex Code
4389status collapsed
4390
4391\begin_layout Plain Layout
4392local_comm
4393\end_layout
4394
4395\end_inset
4396
4397 or
4398\begin_inset Flex Code
4399status collapsed
4400
4401\begin_layout Plain Layout
4402MPI_COMM_WORLD
4403\end_layout
4404
4405\end_inset
4406
4407) would be returned in return_comm argument.
4408 If
4409\begin_inset Flex Code
4410status collapsed
4411
4412\begin_layout Plain Layout
4413return_comm
4414\end_layout
4415
4416\end_inset
4417
4418 is not specified, then
4419\begin_inset Flex Code
4420status collapsed
4421
4422\begin_layout Plain Layout
4423local_comm
4424\end_layout
4425
4426\end_inset
4427
4428 or
4429\begin_inset Flex Code
4430status collapsed
4431
4432\begin_layout Plain Layout
4433MPI_COMM_WORLD
4434\end_layout
4435
4436\end_inset
4437
4438 can be used by the model for it own communication.
4439\end_layout
4440
4441\begin_layout Itemize
4442If server mode is activated (
4443\begin_inset Flex Code
4444status collapsed
4445
4446\begin_layout Plain Layout
4447using_server=true
4448\end_layout
4449
4450\end_inset
4451
4452):
4453\begin_inset Flex Code
4454status collapsed
4455
4456\begin_layout Plain Layout
4457local_comm
4458\end_layout
4459
4460\end_inset
4461
4462 must not be specified since the global
4463\begin_inset Flex Code
4464status collapsed
4465
4466\begin_layout Plain Layout
4467MPI_COMM_WORLD
4468\end_layout
4469
4470\end_inset
4471
4472 communicator would be split by XIOS.
4473 The split communicator is returned in
4474\begin_inset Flex Code
4475status collapsed
4476
4477\begin_layout Plain Layout
4478return_comm
4479\end_layout
4480
4481\end_inset
4482
4483 argument.
4484\end_layout
4485
4486\end_deeper
4487\begin_layout Itemize
4488If OASIS coupler is used (
4489\begin_inset Flex Code
4490status collapsed
4491
4492\begin_layout Plain Layout
4493using_oasis=true
4494\end_layout
4495
4496\end_inset
4497
4498)
4499\end_layout
4500
4501\begin_deeper
4502\begin_layout Itemize
4503If server mode is not enabled (
4504\begin_inset Flex Code
4505status collapsed
4506
4507\begin_layout Plain Layout
4508using_server=false
4509\end_layout
4510
4511\end_inset
4512
4513)
4514\end_layout
4515
4516\begin_deeper
4517\begin_layout Itemize
4518If
4519\begin_inset Flex Code
4520status collapsed
4521
4522\begin_layout Plain Layout
4523local_comm
4524\end_layout
4525
4526\end_inset
4527
4528 is specified, it means that OASIS has been initialized by the model and
4529 global communicator has been already split previously by OASIS, and passed
4530 as
4531\begin_inset Flex Code
4532status collapsed
4533
4534\begin_layout Plain Layout
4535local_comm
4536\end_layout
4537
4538\end_inset
4539
4540 argument.
4541 The returned communicator would be a duplicate copy of
4542\begin_inset Flex Code
4543status collapsed
4544
4545\begin_layout Plain Layout
4546local_comm
4547\end_layout
4548
4549\end_inset
4550
4551.
4552\end_layout
4553
4554\begin_layout Itemize
4555Otherwise: if MPI was not initialized, OASIS will be initialized calling
4556 
4557\begin_inset Flex Code
4558status collapsed
4559
4560\begin_layout Plain Layout
4561prism_init_comp_proto
4562\end_layout
4563
4564\end_inset
4565
4566 subroutine.
4567 In this case, XIOS will call
4568\begin_inset Flex Code
4569status collapsed
4570
4571\begin_layout Plain Layout
4572prism_terminate_proto
4573\end_layout
4574
4575\end_inset
4576
4577 when
4578\begin_inset Flex Code
4579status collapsed
4580
4581\begin_layout Plain Layout
4582xios_finalized
4583\end_layout
4584
4585\end_inset
4586
4587 is called.
4588 The split communicator is returned in
4589\begin_inset Flex Code
4590status collapsed
4591
4592\begin_layout Plain Layout
4593return_comm
4594\end_layout
4595
4596\end_inset
4597
4598 argument using
4599\begin_inset Flex Code
4600status collapsed
4601
4602\begin_layout Plain Layout
4603prism_get_localcomm_proto
4604\end_layout
4605
4606\end_inset
4607
4608 return argument.
4609\end_layout
4610
4611\end_deeper
4612\begin_layout Itemize
4613If server mode is enabled (
4614\begin_inset Flex Code
4615status collapsed
4616
4617\begin_layout Plain Layout
4618using_server=true
4619\end_layout
4620
4621\end_inset
4622
4623)
4624\end_layout
4625
4626\begin_deeper
4627\begin_layout Itemize
4628If
4629\begin_inset Flex Code
4630status collapsed
4631
4632\begin_layout Plain Layout
4633local_comm
4634\end_layout
4635
4636\end_inset
4637
4638 is specified, it means that OASIS has been initialized by the model and
4639 global communicator has been already split previously by OASIS, and passed
4640 as local_comm argument.
4641 The returned communicator return_comm would be a split communicator given
4642 by OASIS.
4643\end_layout
4644
4645\begin_layout Itemize
4646Otherwise: if MPI was not initialized, OASIS will be initialized calling
4647 
4648\begin_inset Flex Code
4649status collapsed
4650
4651\begin_layout Plain Layout
4652prism_init_comp_proto
4653\end_layout
4654
4655\end_inset
4656
4657 subroutine.
4658 In this case, XIOS will call
4659\begin_inset Flex Code
4660status collapsed
4661
4662\begin_layout Plain Layout
4663prism_terminate_proto
4664\end_layout
4665
4666\end_inset
4667
4668 when
4669\begin_inset Flex Code
4670status collapsed
4671
4672\begin_layout Plain Layout
4673xios_finalized
4674\end_layout
4675
4676\end_inset
4677
4678 is called.
4679 The split communicator is returned in
4680\begin_inset Flex Code
4681status collapsed
4682
4683\begin_layout Plain Layout
4684return_comm
4685\end_layout
4686
4687\end_inset
4688
4689 argument using
4690\begin_inset Flex Code
4691status collapsed
4692
4693\begin_layout Plain Layout
4694prism_get_localcomm_proto
4695\end_layout
4696
4697\end_inset
4698
4699 return argument.
4700\end_layout
4701
4702\end_deeper
4703\end_deeper
4704\begin_layout Section*
4705Finalization
4706\end_layout
4707
4708\begin_layout Subsection*
4709XIOS finalization
4710\end_layout
4711
4712\begin_layout Subsubsection*
4713Synopsis:
4714\end_layout
4715
4716\begin_layout LyX-Code
4717SUBROUTINE xios_finalize()
4718\end_layout
4719
4720\begin_layout Subsubsection*
4721Arguments:
4722\end_layout
4723
4724\begin_layout Standard
4725None
4726\end_layout
4727
4728\begin_layout Subsubsection*
4729Description:
4730\end_layout
4731
4732\begin_layout Standard
4733This call must be done at the end of the simulation for a successful execution.
4734 It gives the end signal to the xios server pools to finish it execution.
4735 If MPI has been initialize by XIOS the MPI_Finalize will be called.
4736 If OASIS coupler has been initialized by XIOS, then finalization will be
4737 done calling
4738\begin_inset Flex Code
4739status collapsed
4740
4741\begin_layout Plain Layout
4742prism_terminate_proto
4743\end_layout
4744
4745\end_inset
4746
4747 subroutine.
4748\end_layout
4749
4750\begin_layout Section*
4751Tree elements management subroutines
4752\end_layout
4753
4754\begin_layout Standard
4755This set of subroutines enable the models to interact, complete or query
4756 the XML tree data base.
4757 New elements or group of elements can be added as child in the tree, attributes
4758 of the elements can be set or query.
4759 The type of element actually available are: context, axis, domain, grid,
4760 field, variable and file.
4761 An element can be identified by a string or by an handle associated to
4762 the type of the element.
4763 Root element (ex:
4764\begin_inset Quotes eld
4765\end_inset
4766
4767axis_definition
4768\begin_inset Quotes erd
4769\end_inset
4770
4771,
4772\begin_inset Quotes eld
4773\end_inset
4774
4775field_definition
4776\begin_inset Quotes erd
4777\end_inset
4778
4779,....) are considered like a group of element and are identified by a specific
4780 string
4781\begin_inset Quotes eld
4782\end_inset
4783
4784element_definition
4785\begin_inset Quotes erd
4786\end_inset
4787
4788 where element can be any one of the existing elements.
4789\end_layout
4790
4791\begin_layout Subsection*
4792Fortran type of the handles element
4793\end_layout
4794
4795\begin_layout Quotation
4796TYPE(xios_element)
4797\end_layout
4798
4799\begin_layout Standard
4800where
4801\begin_inset Quotes eld
4802\end_inset
4803
4804element
4805\begin_inset Quotes erd
4806\end_inset
4807
4808 can be any one among
4809\begin_inset Quotes eld
4810\end_inset
4811
4812context
4813\begin_inset Quotes erd
4814\end_inset
4815
4816,
4817\begin_inset Quotes eld
4818\end_inset
4819
4820axis
4821\begin_inset Quotes erd
4822\end_inset
4823
4824,
4825\begin_inset Quotes eld
4826\end_inset
4827
4828domain
4829\begin_inset Quotes erd
4830\end_inset
4831
4832,
4833\begin_inset Quotes eld
4834\end_inset
4835
4836grid
4837\begin_inset Quotes erd
4838\end_inset
4839
4840,
4841\begin_inset Quotes eld
4842\end_inset
4843
4844field
4845\begin_inset Quotes erd
4846\end_inset
4847
4848,
4849\begin_inset Quotes eld
4850\end_inset
4851
4852variable
4853\begin_inset Quotes erd
4854\end_inset
4855
4856 or
4857\begin_inset Quotes eld
4858\end_inset
4859
4860file
4861\begin_inset Quotes erd
4862\end_inset
4863
4864, or the associated group (excepted for context):
4865\begin_inset Quotes eld
4866\end_inset
4867
4868axis_group
4869\begin_inset Quotes erd
4870\end_inset
4871
4872,
4873\begin_inset Quotes eld
4874\end_inset
4875
4876domain_group
4877\begin_inset Quotes erd
4878\end_inset
4879
4880,
4881\begin_inset Quotes eld
4882\end_inset
4883
4884grid_group
4885\begin_inset Quotes erd
4886\end_inset
4887
4888,
4889\begin_inset Quotes eld
4890\end_inset
4891
4892field_group
4893\begin_inset Quotes erd
4894\end_inset
4895
4896,
4897\begin_inset Quotes eld
4898\end_inset
4899
4900variable_group
4901\begin_inset Quotes erd
4902\end_inset
4903
4904 or
4905\begin_inset Quotes eld
4906\end_inset
4907
4908file_group
4909\begin_inset Quotes erd
4910\end_inset
4911
4912.
4913\end_layout
4914
4915\begin_layout Subsection*
4916Getting handles
4917\end_layout
4918
4919\begin_layout Subsubsection*
4920Synopsis:
4921\end_layout
4922
4923\begin_layout LyX-Code
4924SUBROUTINE xios_get_element_handle(id,handle)
4925\end_layout
4926
4927\begin_layout LyX-Code
4928CHARACTER(len = *) , INTENT(IN) :: id
4929\end_layout
4930
4931\begin_layout LyX-Code
4932TYPE(xios_element), INTENT(OUT):: handle
4933\end_layout
4934
4935\begin_layout Standard
4936where element is one of the existing element or group of element.
4937\end_layout
4938
4939\begin_layout Subsubsection*
4940Arguments:
4941\end_layout
4942
4943\begin_layout Itemize
4944\begin_inset Flex Code
4945status collapsed
4946
4947\begin_layout Plain Layout
4948id
4949\end_layout
4950
4951\end_inset
4952
4953: string identifier.
4954\end_layout
4955
4956\begin_layout Itemize
4957\begin_inset Flex Code
4958status collapsed
4959
4960\begin_layout Plain Layout
4961handle
4962\end_layout
4963
4964\end_inset
4965
4966: element handle
4967\end_layout
4968
4969\begin_layout Subsubsection*
4970Description:
4971\end_layout
4972
4973\begin_layout Standard
4974This subroutine return the handle of the specified element identified by
4975 its string.
4976 The element must be existing otherwise it raise an error.
4977\end_layout
4978
4979\begin_layout Subsection*
4980Query for a valid element
4981\end_layout
4982
4983\begin_layout Subsubsection*
4984Synopsis:
4985\end_layout
4986
4987\begin_layout LyX-Code
4988LOGICAL FUNCTION xios_is_valid_element(id)
4989\end_layout
4990
4991\begin_layout LyX-Code
4992CHARACTER(len = *) , INTENT(IN) :: id
4993\end_layout
4994
4995\begin_layout Standard
4996where element is one of the existing element or group of element.
4997\end_layout
4998
4999\begin_layout Subsubsection*
5000Arguments:
5001\end_layout
5002
5003\begin_layout Itemize
5004\begin_inset Flex Code
5005status collapsed
5006
5007\begin_layout Plain Layout
5008id
5009\end_layout
5010
5011\end_inset
5012
5013: string identifier.
5014\end_layout
5015
5016\begin_layout Subsubsection*
5017Description:
5018\end_layout
5019
5020\begin_layout Standard
5021This function return .TRUE.
5022 if the element defined by the string identifier id is existing in the data
5023 base, otherwise it return .FALSE.
5024 .
5025\end_layout
5026
5027\begin_layout Subsection*
5028Adding child
5029\end_layout
5030
5031\begin_layout Subsubsection*
5032Synopsis:
5033\end_layout
5034
5035\begin_layout LyX-Code
5036SUBROUTINE xios_add_element(parent_handle, child_handle, child_id)
5037\end_layout
5038
5039\begin_layout LyX-Code
5040TYPE(xios_element)         , INTENT(IN) :: parent_handle
5041\end_layout
5042
5043\begin_layout LyX-Code
5044TYPE(xios_element)         , INTENT(OUT):: child_handle
5045\end_layout
5046
5047\begin_layout LyX-Code
5048CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
5049\end_layout
5050
5051\begin_layout Standard
5052where element is one of the existing element or group of element.
5053\end_layout
5054
5055\begin_layout Subsubsection*
5056Arguments:
5057\end_layout
5058
5059\begin_layout Itemize
5060\begin_inset Flex Code
5061status collapsed
5062
5063\begin_layout Plain Layout
5064parent_handle
5065\end_layout
5066
5067\end_inset
5068
5069: handle of the parent element.
5070\end_layout
5071
5072\begin_layout Itemize
5073\begin_inset Flex Code
5074status collapsed
5075
5076\begin_layout Plain Layout
5077child_handle
5078\end_layout
5079
5080\end_inset
5081
5082: handle of the child element.
5083\end_layout
5084
5085\begin_layout Itemize
5086\begin_inset Flex Code
5087status collapsed
5088
5089\begin_layout Plain Layout
5090child_id
5091\end_layout
5092
5093\end_inset
5094
5095: string identifier of the child.
5096\end_layout
5097
5098\begin_layout Subsubsection*
5099Description:
5100\end_layout
5101
5102\begin_layout Standard
5103This subroutine add a child to an existing parent element.
5104 The identifier of the child, if existing, can be specified optionally.
5105 All group elements can contains child of the same kind, provided generic
5106 inheritance.
5107 Some elements can contains children of an other kind for a specific behaviour.
5108 File element may contains field_group, field, variable and variable_group
5109 child elements.
5110 Field elements may contains variable_group of variable child element.
5111\end_layout
5112
5113\begin_layout Subsection*
5114Query if a value of an element attributes is defined (by handle)
5115\end_layout
5116
5117\begin_layout Subsubsection*
5118Synopsis:
5119\end_layout
5120
5121\begin_layout LyX-Code
5122SUBROUTINE xios_is_defined_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5123 ...)
5124\end_layout
5125
5126\begin_layout LyX-Code
5127TYPE(xios_element)         , INTENT(IN) :: handle
5128\end_layout
5129
5130\begin_layout LyX-Code
5131LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5132\end_layout
5133
5134\begin_layout LyX-Code
5135LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5136\end_layout
5137
5138\begin_layout LyX-Code
5139....
5140\end_layout
5141
5142\begin_layout Standard
5143where element is one of the existing element or group of element.
5144 attribute_x is describing in the chapter dedicated to the attribute description.
5145\end_layout
5146
5147\begin_layout Subsubsection*
5148Arguments:
5149\end_layout
5150
5151\begin_layout Itemize
5152\begin_inset Flex Code
5153status collapsed
5154
5155\begin_layout Plain Layout
5156handle
5157\end_layout
5158
5159\end_inset
5160
5161: element handle.
5162\end_layout
5163
5164\begin_layout Itemize
5165\begin_inset Flex Code
5166status collapsed
5167
5168\begin_layout Plain Layout
5169attr_x
5170\end_layout
5171
5172\end_inset
5173
5174: return true if the attribute as a defined value.
5175\end_layout
5176
5177\begin_layout Subsubsection*
5178Description:
5179\end_layout
5180
5181\begin_layout Standard
5182This subroutine my be used to query if one or more attributes of an element
5183 have a defined value.
5184 The list of attributes and their type are described in a specific chapter
5185 of the documentation.
5186 
5187\end_layout
5188
5189\begin_layout Subsection*
5190Query if a value of an element attributes is defined (by identifier)
5191\end_layout
5192
5193\begin_layout Subsubsection*
5194Synopsis:
5195\end_layout
5196
5197\begin_layout LyX-Code
5198SUBROUTINE xios_is_defined_element_attr(id, attr_1=attribute_1, attr_2=attribute
5199_2, ...)
5200\end_layout
5201
5202\begin_layout LyX-Code
5203CHARACTER(len = *) , INTENT(IN) :: id
5204\end_layout
5205
5206\begin_layout LyX-Code
5207LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
5208\end_layout
5209
5210\begin_layout LyX-Code
5211LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
5212\end_layout
5213
5214\begin_layout LyX-Code
5215....
5216\end_layout
5217
5218\begin_layout Standard
5219where element is one of the existing element or group of element.
5220 attribute_x is describing in the chapter dedicated to the attribute description.
5221\end_layout
5222
5223\begin_layout Subsubsection*
5224Arguments:
5225\end_layout
5226
5227\begin_layout Itemize
5228\begin_inset Flex Code
5229status collapsed
5230
5231\begin_layout Plain Layout
5232id
5233\end_layout
5234
5235\end_inset
5236
5237: element identifier.
5238\end_layout
5239
5240\begin_layout Itemize
5241\begin_inset Flex Code
5242status collapsed
5243
5244\begin_layout Plain Layout
5245attr_x
5246\end_layout
5247
5248\end_inset
5249
5250: return true if the attribute as a defined value.
5251\end_layout
5252
5253\begin_layout Subsubsection*
5254Description:
5255\end_layout
5256
5257\begin_layout Standard
5258This subroutine my be used to query if one or more attributes of an element
5259 have a defined value.
5260 The list of available attributes and their type are described in a specific
5261 chapter of the documentation.
5262 
5263\end_layout
5264
5265\begin_layout Subsection*
5266Setting element attributes value by handle
5267\end_layout
5268
5269\begin_layout Subsubsection*
5270Synopsis:
5271\end_layout
5272
5273\begin_layout LyX-Code
5274SUBROUTINE xios_set_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5275 ...)
5276\end_layout
5277
5278\begin_layout LyX-Code
5279TYPE(xios_element)         , INTENT(IN) :: handle
5280\end_layout
5281
5282\begin_layout LyX-Code
5283attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5284\end_layout
5285
5286\begin_layout LyX-Code
5287attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5288\end_layout
5289
5290\begin_layout LyX-Code
5291....
5292\end_layout
5293
5294\begin_layout Standard
5295where element is one of the existing element or group of element.
5296 attribute_x and attribute_type_x are describing in the chapter dedicated
5297 to the attribute description.
5298\end_layout
5299
5300\begin_layout Subsubsection*
5301Arguments:
5302\end_layout
5303
5304\begin_layout Itemize
5305\begin_inset Flex Code
5306status collapsed
5307
5308\begin_layout Plain Layout
5309handle
5310\end_layout
5311
5312\end_inset
5313
5314: element handle.
5315\end_layout
5316
5317\begin_layout Itemize
5318\begin_inset Flex Code
5319status collapsed
5320
5321\begin_layout Plain Layout
5322attr_x
5323\end_layout
5324
5325\end_inset
5326
5327: value of the attribute to be set.
5328\end_layout
5329
5330\begin_layout Subsubsection*
5331Description:
5332\end_layout
5333
5334\begin_layout Standard
5335This subroutine my be used to set one or more attribute to an element defined
5336 by its handle.
5337 The list of available attributes and their type are described in a specific
5338 chapter of the documentation.
5339 
5340\end_layout
5341
5342\begin_layout Subsection*
5343Setting element attributes value by id
5344\end_layout
5345
5346\begin_layout Subsubsection*
5347Synopsis:
5348\end_layout
5349
5350\begin_layout LyX-Code
5351SUBROUTINE xios_set_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
5352 ...)
5353\end_layout
5354
5355\begin_layout LyX-Code
5356CHARACTER(len = *),  INTENT(IN)          :: id
5357\end_layout
5358
5359\begin_layout LyX-Code
5360attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
5361\end_layout
5362
5363\begin_layout LyX-Code
5364attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
5365\end_layout
5366
5367\begin_layout LyX-Code
5368....
5369\end_layout
5370
5371\begin_layout Standard
5372where element is one of the existing element or group of element.
5373 attribute_x and attribute_type_x are describing in the chapter dedicated
5374 to the attribute description.
5375\end_layout
5376
5377\begin_layout Subsubsection*
5378Arguments:
5379\end_layout
5380
5381\begin_layout Itemize
5382\begin_inset Flex Code
5383status collapsed
5384
5385\begin_layout Plain Layout
5386id
5387\end_layout
5388
5389\end_inset
5390
5391: string identifier.
5392\end_layout
5393
5394\begin_layout Itemize
5395\begin_inset Flex Code
5396status collapsed
5397
5398\begin_layout Plain Layout
5399attr_x
5400\end_layout
5401
5402\end_inset
5403
5404: value of the attribute to be set.
5405\end_layout
5406
5407\begin_layout Subsubsection*
5408Description:
5409\end_layout
5410
5411\begin_layout Standard
5412This subroutine my be used to set one or more attribute to an element defined
5413 by its string id.
5414 The list of available attributes and their type are described in a specific
5415 chapter of the documentation.
5416\end_layout
5417
5418\begin_layout Subsection*
5419Getting element attributes value (by handle)
5420\end_layout
5421
5422\begin_layout Subsubsection*
5423Synopsis:
5424\end_layout
5425
5426\begin_layout LyX-Code
5427SUBROUTINE xios_get_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
5428 ...)
5429\end_layout
5430
5431\begin_layout LyX-Code
5432TYPE(xios_element)         , INTENT(IN) :: handle
5433\end_layout
5434
5435\begin_layout LyX-Code
5436attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
5437\end_layout
5438
5439\begin_layout LyX-Code
5440attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
5441\end_layout
5442
5443\begin_layout LyX-Code
5444....
5445\end_layout
5446
5447\begin_layout Standard
5448where element is one of the existing element or group of element.
5449 attribute_x and attribute_type_x are describing in the chapter dedicated
5450 to the attribute description.
5451\end_layout
5452
5453\begin_layout Subsubsection*
5454Arguments:
5455\end_layout
5456
5457\begin_layout Itemize
5458\begin_inset Flex Code
5459status collapsed
5460
5461\begin_layout Plain Layout
5462handle
5463\end_layout
5464
5465\end_inset
5466
5467: element handle.
5468\end_layout
5469
5470\begin_layout Itemize
5471\begin_inset Flex Code
5472status collapsed
5473
5474\begin_layout Plain Layout
5475attr_x
5476\end_layout
5477
5478\end_inset
5479
5480: value of the attribute to be get.
5481\end_layout
5482
5483\begin_layout Subsubsection*
5484Description:
5485\end_layout
5486
5487\begin_layout Standard
5488This subroutine my be used to get one or more attribute value of an element
5489 defined by its handle.
5490 All attributes in the arguments list must be defined.
5491 The list of available attributes and their type are described in a specific
5492 chapter of the documentation.
5493 
5494\end_layout
5495
5496\begin_layout Subsection*
5497Getting element attributes value (by identifier)
5498\end_layout
5499
5500\begin_layout Subsubsection*
5501Synopsis:
5502\end_layout
5503
5504\begin_layout LyX-Code
5505SUBROUTINE xios_get_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
5506 ...)
5507\end_layout
5508
5509\begin_layout LyX-Code
5510CHARACTER(len = *),   INTENT(IN)          :: id
5511\end_layout
5512
5513\begin_layout LyX-Code
5514attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
5515\end_layout
5516
5517\begin_layout LyX-Code
5518attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
5519\end_layout
5520
5521\begin_layout LyX-Code
5522....
5523\end_layout
5524
5525\begin_layout Standard
5526where element is one of the existing element or group of element.
5527 attribute_x is describing in the chapter dedicated to the attribute description.
5528\end_layout
5529
5530\begin_layout Subsubsection*
5531Arguments:
5532\end_layout
5533
5534\begin_layout Itemize
5535\begin_inset Flex Code
5536status collapsed
5537
5538\begin_layout Plain Layout
5539id
5540\end_layout
5541
5542\end_inset
5543
5544: element string identifier.
5545\end_layout
5546
5547\begin_layout Itemize
5548\begin_inset Flex Code
5549status collapsed
5550
5551\begin_layout Plain Layout
5552attr_x
5553\end_layout
5554
5555\end_inset
5556
5557: value of the attribute to be get.
5558\end_layout
5559
5560\begin_layout Subsubsection*
5561Description:
5562\end_layout
5563
5564\begin_layout Standard
5565This subroutine my be used to get one or more attribute value of an element
5566 defined by its handle.
5567 All attributes in the arguments list must have a defined value.
5568 The list of available attributes and their type are described in a specific
5569 chapter of the documentation.
5570\end_layout
5571
5572\begin_layout Section*
5573Interface relative to context management
5574\end_layout
5575
5576\begin_layout Subsection*
5577XIOS context initialization
5578\end_layout
5579
5580\begin_layout Subsubsection*
5581Synopsis:
5582\end_layout
5583
5584\begin_layout LyX-Code
5585SUBROUTINE xios_context_initialize(context_id, context_comm)
5586\end_layout
5587
5588\begin_layout LyX-Code
5589  CHARACTER(LEN=*),INTENT(IN)         :: context_id
5590\end_layout
5591
5592\begin_layout LyX-Code
5593  INTEGER,INTENT(IN)                  :: context_comm
5594\end_layout
5595
5596\begin_layout Subsubsection*
5597Argument:
5598\end_layout
5599
5600\begin_layout Itemize
5601\begin_inset Flex Code
5602status collapsed
5603
5604\begin_layout Plain Layout
5605context_id
5606\end_layout
5607
5608\end_inset
5609
5610: context identifier
5611\end_layout
5612
5613\begin_layout Itemize
5614\begin_inset Flex Code
5615status collapsed
5616
5617\begin_layout Plain Layout
5618context_comm
5619\end_layout
5620
5621\end_inset
5622
5623: MPI communicator of the context
5624\end_layout
5625
5626\begin_layout Subsubsection*
5627Description:
5628\end_layout
5629
5630\begin_layout Standard
5631This subroutine initialize a context identified by
5632\begin_inset Flex Code
5633status collapsed
5634
5635\begin_layout Plain Layout
5636context_id
5637\end_layout
5638
5639\end_inset
5640
5641 string and must be called before any call related to this context.
5642 A context must be associated to a communicator, which can be the returned
5643 communicator of the
5644\begin_inset Flex Code
5645status collapsed
5646
5647\begin_layout Plain Layout
5648xios_initialize
5649\end_layout
5650
5651\end_inset
5652
5653 subroutine or a sub-communicator of this.
5654 The context initialization is dynamic and can be done at any time before
5655 the
5656\begin_inset Flex Code
5657status collapsed
5658
5659\begin_layout Plain Layout
5660xios_finalize
5661\end_layout
5662
5663\end_inset
5664
5665 call.
5666\end_layout
5667
5668\begin_layout Subsection*
5669XIOS context finalization
5670\end_layout
5671
5672\begin_layout Subsubsection*
5673Synopsis:
5674\end_layout
5675
5676\begin_layout LyX-Code
5677SUBROUTINE xios_context_finalize()
5678\end_layout
5679
5680\begin_layout Subsubsection*
5681Arguments:
5682\end_layout
5683
5684\begin_layout Standard
5685None
5686\end_layout
5687
5688\begin_layout Subsubsection*
5689Description:
5690\end_layout
5691
5692\begin_layout Standard
5693This subroutine must be call to close a context, before the
5694\begin_inset Flex Code
5695status collapsed
5696
5697\begin_layout Plain Layout
5698xios_finalize
5699\end_layout
5700
5701\end_inset
5702
5703 call.
5704 It waits until that all pending request sent to the servers will be processed
5705 and the opened files will be closed.
5706\end_layout
5707
5708\begin_layout Subsection*
5709Setting current active context
5710\end_layout
5711
5712\begin_layout Subsubsection*
5713Synopsis:
5714\end_layout
5715
5716\begin_layout LyX-Code
5717SUBROUTINE xios_set_current_context(context_handle)
5718\end_layout
5719
5720\begin_layout LyX-Code
5721TYPE(xios_context),INTENT(IN) :: context_handle
5722\end_layout
5723
5724\begin_layout Standard
5725or
5726\end_layout
5727
5728\begin_layout LyX-Code
5729SUBROUTINE xios_set_current_context(context_id)
5730\end_layout
5731
5732\begin_layout LyX-Code
5733CHARACTER(LEN=*),INTENT(IN) :: context_id
5734\end_layout
5735
5736\begin_layout Subsubsection*
5737Arguments:
5738\end_layout
5739
5740\begin_layout Itemize
5741\begin_inset Flex Code
5742status collapsed
5743
5744\begin_layout Plain Layout
5745context_handle
5746\end_layout
5747
5748\end_inset
5749
5750: handle of the context
5751\end_layout
5752
5753\begin_layout Standard
5754or
5755\end_layout
5756
5757\begin_layout Itemize
5758\begin_inset Flex Code
5759status collapsed
5760
5761\begin_layout Plain Layout
5762context_id
5763\end_layout
5764
5765\end_inset
5766
5767: string context identifier
5768\end_layout
5769
5770\begin_layout Subsubsection*
5771Description:
5772\end_layout
5773
5774\begin_layout Standard
5775These subroutines set the current active context.
5776 All xios calls after will refer to this active context.
5777 If only one context is defined, it is automatically set as the active context.
5778 
5779\end_layout
5780
5781\begin_layout Subsection*
5782Closing definition
5783\end_layout
5784
5785\begin_layout Subsubsection*
5786Synopsis:
5787\end_layout
5788
5789\begin_layout LyX-Code
5790SUBROUTINE xios_close_context_definition()
5791\end_layout
5792
5793\begin_layout Subsubsection*
5794Arguments:
5795\end_layout
5796
5797\begin_layout Standard
5798None
5799\end_layout
5800
5801\begin_layout Subsubsection*
5802Description:
5803\end_layout
5804
5805\begin_layout Standard
5806This subroutine must be call when all definitions of a context is finished
5807 at the end of the initialization and before entering to the time loop.
5808 A lot of operations are performed internally (inheritance, grid definition,
5809 contacting servers,...) so this call is mandatory.
5810 Any call related to the tree management definition done after will have
5811 an undefined effect.
5812\end_layout
5813
5814\begin_layout Section*
5815Interface relative to calendar management
5816\end_layout
5817
5818\begin_layout Subsection*
5819Creating the calendar
5820\end_layout
5821
5822\begin_layout Subsubsection*
5823Synopsis:
5824\end_layout
5825
5826\begin_layout LyX-Code
5827SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
5828 &
5829\begin_inset Newline newline
5830\end_inset
5831
5832                                day_length, month_lengths, year_length,
5833 &
5834\begin_inset Newline newline
5835\end_inset
5836
5837                                leap_year_month, leap_year_drift, &
5838\begin_inset Newline newline
5839\end_inset
5840
5841                                leap_year_drift_offset)
5842\begin_inset Newline newline
5843\end_inset
5844
5845CHARACTER(len = *),              INTENT(IN) :: type
5846\begin_inset Newline newline
5847\end_inset
5848
5849TYPE(xios_duration),   OPTIONAL, INTENT(IN) :: timestep
5850\begin_inset Newline newline
5851\end_inset
5852
5853TYPE(xios_date),       OPTIONAL, INTENT(IN) :: start_date
5854\begin_inset Newline newline
5855\end_inset
5856
5857TYPE(xios_date),       OPTIONAL, INTENT(IN) :: time_origin
5858\begin_inset Newline newline
5859\end_inset
5860
5861INTEGER,               OPTIONAL, INTENT(IN) :: day_length
5862\begin_inset Newline newline
5863\end_inset
5864
5865INTEGER,               OPTIONAL, INTENT(IN) :: month_lengths(:)
5866\begin_inset Newline newline
5867\end_inset
5868
5869INTEGER,               OPTIONAL, INTENT(IN) :: year_length
5870\begin_inset Newline newline
5871\end_inset
5872
5873DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift
5874\begin_inset Newline newline
5875\end_inset
5876
5877DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift_offset
5878\begin_inset Newline newline
5879\end_inset
5880
5881INTEGER,               OPTIONAL, INTENT(IN) :: leap_year_month
5882\end_layout
5883
5884\begin_layout Subsubsection*
5885Arguments:
5886\end_layout
5887
5888\begin_layout Itemize
5889\begin_inset Flex Code
5890status collapsed
5891
5892\begin_layout Plain Layout
5893type
5894\end_layout
5895
5896\end_inset
5897
5898: the calendar type, one of
5899\begin_inset Flex Code
5900status collapsed
5901
5902\begin_layout Plain Layout
5903"Gregorian"
5904\end_layout
5905
5906\end_inset
5907
5908,
5909\begin_inset Flex Code
5910status collapsed
5911
5912\begin_layout Plain Layout
5913"Julian"
5914\end_layout
5915
5916\end_inset
5917
5918,
5919\begin_inset Flex Code
5920status collapsed
5921
5922\begin_layout Plain Layout
5923"D360"
5924\end_layout
5925
5926\end_inset
5927
5928,
5929\begin_inset Flex Code
5930status collapsed
5931
5932\begin_layout Plain Layout
5933"AllLeap"
5934\end_layout
5935
5936\end_inset
5937
5938,
5939\begin_inset Flex Code
5940status collapsed
5941
5942\begin_layout Plain Layout
5943"NoLeap"
5944\end_layout
5945
5946\end_inset
5947
5948,
5949\begin_inset Flex Code
5950status collapsed
5951
5952\begin_layout Plain Layout
5953"user_defined"
5954\end_layout
5955
5956\end_inset
5957
5958
5959\end_layout
5960
5961\begin_layout Itemize
5962\begin_inset Flex Code
5963status collapsed
5964
5965\begin_layout Plain Layout
5966timestep
5967\end_layout
5968
5969\end_inset
5970
5971: the time step of the simulation (optional, can be set later)
5972\end_layout
5973
5974\begin_layout Itemize
5975\begin_inset Flex Code
5976status collapsed
5977
5978\begin_layout Plain Layout
5979start_date
5980\end_layout
5981
5982\end_inset
5983
5984: the start date of the simulation (optional,
5985\begin_inset Flex Code
5986status collapsed
5987
5988\begin_layout Plain Layout
5989xios_date(0000, 01, 01, 00, 00, 00)
5990\end_layout
5991
5992\end_inset
5993
5994 is used by default)
5995\end_layout
5996
5997\begin_layout Itemize
5998\begin_inset Flex Code
5999status collapsed
6000
6001\begin_layout Plain Layout
6002time_origin
6003\end_layout
6004
6005\end_inset
6006
6007: the origin of the time axis (optional,
6008\begin_inset Flex Code
6009status collapsed
6010
6011\begin_layout Plain Layout
6012xios_date(0000, 01, 01, 00, 00, 00)
6013\end_layout
6014
6015\end_inset
6016
6017 is used by default)
6018\end_layout
6019
6020\begin_layout Itemize
6021\begin_inset Flex Code
6022status collapsed
6023
6024\begin_layout Plain Layout
6025day_length
6026\end_layout
6027
6028\end_inset
6029
6030: the length of a day in seconds (mandatory when creating an user defined
6031 calendar, must not be set otherwise)
6032\end_layout
6033
6034\begin_layout Itemize
6035\begin_inset Flex Code
6036status collapsed
6037
6038\begin_layout Plain Layout
6039month_lengths
6040\end_layout
6041
6042\end_inset
6043
6044: the length of each month of the year in days (either
6045\begin_inset Flex Code
6046status collapsed
6047
6048\begin_layout Plain Layout
6049month_lengths
6050\end_layout
6051
6052\end_inset
6053
6054 or
6055\begin_inset Flex Code
6056status collapsed
6057
6058\begin_layout Plain Layout
6059year_length
6060\end_layout
6061
6062\end_inset
6063
6064 must be set when creating an user defined calendar, must not be set otherwise)
6065\end_layout
6066
6067\begin_layout Itemize
6068\begin_inset Flex Code
6069status collapsed
6070
6071\begin_layout Plain Layout
6072year_length
6073\end_layout
6074
6075\end_inset
6076
6077: the length of a year in seconds (either
6078\begin_inset Flex Code
6079status collapsed
6080
6081\begin_layout Plain Layout
6082month_lengths
6083\end_layout
6084
6085\end_inset
6086
6087 or
6088\begin_inset Flex Code
6089status collapsed
6090
6091\begin_layout Plain Layout
6092year_length
6093\end_layout
6094
6095\end_inset
6096
6097 must be set when creating an user defined calendar, must not be set otherwise)
6098\end_layout
6099
6100\begin_layout Itemize
6101\begin_inset Flex Code
6102status collapsed
6103
6104\begin_layout Plain Layout
6105leap_year_drift
6106\end_layout
6107
6108\end_inset
6109
6110: the yearly drift between the user defined calendar and the astronomical
6111 calendar, expressed as a fraction of day (can optionally be set when creating
6112 an user defined calendar in which case
6113\begin_inset Flex Code
6114status collapsed
6115
6116\begin_layout Plain Layout
6117leap_year_month
6118\end_layout
6119
6120\end_inset
6121
6122 must be set too)
6123\end_layout
6124
6125\begin_layout Itemize
6126\begin_inset Flex Code
6127status collapsed
6128
6129\begin_layout Plain Layout
6130leap_year_drift_offset
6131\end_layout
6132
6133\end_inset
6134
6135: the initial drift between the user defined calendar and the astronomical
6136 calendar at the time origin, expressed as a fraction of day (can optionally
6137 be set if
6138\begin_inset Flex Code
6139status collapsed
6140
6141\begin_layout Plain Layout
6142leap_year_drift
6143\end_layout
6144
6145\end_inset
6146
6147 and
6148\begin_inset Flex Code
6149status collapsed
6150
6151\begin_layout Plain Layout
6152leap_year_month
6153\end_layout
6154
6155\end_inset
6156
6157 are set)
6158\end_layout
6159
6160\begin_layout Itemize
6161\begin_inset Flex Code
6162status collapsed
6163
6164\begin_layout Plain Layout
6165leap_year_month
6166\end_layout
6167
6168\end_inset
6169
6170: the month to which an extra day must be added in case of leap year (can
6171 optionally be set when creating an user defined calendar in which case
6172 
6173\begin_inset Flex Code
6174status collapsed
6175
6176\begin_layout Plain Layout
6177leap_year_drift
6178\end_layout
6179
6180\end_inset
6181
6182 must be set too)
6183\end_layout
6184
6185\begin_layout Standard
6186For a more detailed description of those arguments, see the description
6187 of the corresponding attributes in section 1.2
6188\begin_inset Quotes eld
6189\end_inset
6190
6191Calendar attribute reference
6192\begin_inset Quotes erd
6193\end_inset
6194
6195.
6196\end_layout
6197
6198\begin_layout Subsubsection*
6199Description:
6200\end_layout
6201
6202\begin_layout Standard
6203This subroutine creates the calendar for the current context.
6204 Note that the calendar is created once and for all, either from the XML
6205 configuration file or the Fortran interface.
6206 If it was not created from the configuration file, then this subroutine
6207 must be called once and only once before the context definition is closed.
6208 The calendar features can be used immediately after the calendar was created.
6209\begin_inset Newline newline
6210\end_inset
6211
6212
6213\begin_inset Newline newline
6214\end_inset
6215
6216If an user defined calendar is created, the following arguments must also
6217 be provided:
6218\begin_inset Flex Code
6219status collapsed
6220
6221\begin_layout Plain Layout
6222day_length
6223\end_layout
6224
6225\end_inset
6226
6227 and either
6228\begin_inset Flex Code
6229status collapsed
6230
6231\begin_layout Plain Layout
6232month_lengths
6233\end_layout
6234
6235\end_inset
6236
6237 or
6238\begin_inset Flex Code
6239status collapsed
6240
6241\begin_layout Plain Layout
6242year_length
6243\end_layout
6244
6245\end_inset
6246
6247.
6248 Optionally it is possible to configure the user defined calendar to have
6249 leap years.
6250 In this case,
6251\begin_inset Flex Code
6252status collapsed
6253
6254\begin_layout Plain Layout
6255leap_year_drift
6256\end_layout
6257
6258\end_inset
6259
6260 and
6261\begin_inset Flex Code
6262status collapsed
6263
6264\begin_layout Plain Layout
6265leap_year_month
6266\end_layout
6267
6268\end_inset
6269
6270 must also be provided and
6271\begin_inset Flex Code
6272status collapsed
6273
6274\begin_layout Plain Layout
6275leap_year_drift_offset
6276\end_layout
6277
6278\end_inset
6279
6280 might be used.
6281\end_layout
6282
6283\begin_layout Subsection*
6284Accessing the calendar type of the current calendar
6285\end_layout
6286
6287\begin_layout Subsubsection*
6288Synopsis:
6289\end_layout
6290
6291\begin_layout LyX-Code
6292SUBROUTINE xios_get_calendar_type(calendar_type)
6293\begin_inset Newline newline
6294\end_inset
6295
6296CHARACTER(len=*), INTENT(OUT) :: calendar_type
6297\end_layout
6298
6299\begin_layout Subsubsection*
6300Arguments:
6301\end_layout
6302
6303\begin_layout Itemize
6304\begin_inset Flex Code
6305status collapsed
6306
6307\begin_layout Plain Layout
6308calendar_type
6309\end_layout
6310
6311\end_inset
6312
6313: on output, the type of the calendar attached to the current context
6314\end_layout
6315
6316\begin_layout Subsubsection*
6317Description:
6318\end_layout
6319
6320\begin_layout Standard
6321This subroutine gets the calendar type associated to the current context.
6322 It will raise an error if used before the calendar was created.
6323\end_layout
6324
6325\begin_layout Subsection*
6326Accessing and defining the time step of the current calendar
6327\end_layout
6328
6329\begin_layout Subsubsection*
6330Synopsis:
6331\end_layout
6332
6333\begin_layout LyX-Code
6334SUBROUTINE xios_get_timestep(timestep)
6335\begin_inset Newline newline
6336\end_inset
6337
6338TYPE(xios_duration), INTENT(OUT) :: timestep
6339\end_layout
6340
6341\begin_layout Standard
6342and
6343\end_layout
6344
6345\begin_layout LyX-Code
6346SUBROUTINE xios_set_timestep(timestep)
6347\begin_inset Newline newline
6348\end_inset
6349
6350TYPE(xios_duration), INTENT(IN) :: timestep
6351\end_layout
6352
6353\begin_layout Subsubsection*
6354Arguments:
6355\end_layout
6356
6357\begin_layout Itemize
6358\begin_inset Flex Code
6359status collapsed
6360
6361\begin_layout Plain Layout
6362timestep
6363\end_layout
6364
6365\end_inset
6366
6367: a duration corresponding to the time step of the simulation
6368\end_layout
6369
6370\begin_layout Subsubsection*
6371Description:
6372\end_layout
6373
6374\begin_layout Standard
6375Those subroutines respectively gets and sets the time step associated to
6376 the calendar of the current context.
6377 Note that the time step must always be set before the context definition
6378 is closed and that an error will be raised if the getter subroutine is
6379 used before the time step is defined.
6380\end_layout
6381
6382\begin_layout Subsection*
6383Accessing and defining the start date of the current calendar
6384\end_layout
6385
6386\begin_layout Subsubsection*
6387Synopsis:
6388\end_layout
6389
6390\begin_layout LyX-Code
6391SUBROUTINE xios_get_start_date(start_date)
6392\begin_inset Newline newline
6393\end_inset
6394
6395TYPE(xios_date), INTENT(OUT) :: start_date
6396\end_layout
6397
6398\begin_layout Standard
6399and
6400\end_layout
6401
6402\begin_layout LyX-Code
6403SUBROUTINE xios_set_start_date(start_date)
6404\begin_inset Newline newline
6405\end_inset
6406
6407TYPE(xios_date), INTENT(IN) :: start_date
6408\end_layout
6409
6410\begin_layout Subsubsection*
6411Arguments:
6412\end_layout
6413
6414\begin_layout Itemize
6415\begin_inset Flex Code
6416status collapsed
6417
6418\begin_layout Plain Layout
6419start_date
6420\end_layout
6421
6422\end_inset
6423
6424: a date corresponding to the beginning of the simulation
6425\end_layout
6426
6427\begin_layout Subsubsection*
6428Description:
6429\end_layout
6430
6431\begin_layout Standard
6432Those subroutines respectively gets and sets the start date associated to
6433 the calendar of the current context.
6434 They must not be used before the calendar was created.
6435\end_layout
6436
6437\begin_layout Subsection*
6438Accessing and defining the time origin of the current calendar
6439\end_layout
6440
6441\begin_layout Subsubsection*
6442Synopsis:
6443\end_layout
6444
6445\begin_layout LyX-Code
6446SUBROUTINE xios_get_time_origin(time_origin)
6447\begin_inset Newline newline
6448\end_inset
6449
6450TYPE(xios_date), INTENT(OUT) :: time_origin
6451\end_layout
6452
6453\begin_layout Standard
6454and
6455\end_layout
6456
6457\begin_layout LyX-Code
6458SUBROUTINE xios_set_time_date(time_origin)
6459\begin_inset Newline newline
6460\end_inset
6461
6462TYPE(xios_date), INTENT(IN) :: time_origin
6463\end_layout
6464
6465\begin_layout Subsubsection*
6466Arguments:
6467\end_layout
6468
6469\begin_layout Itemize
6470\begin_inset Flex Code
6471status collapsed
6472
6473\begin_layout Plain Layout
6474start_date
6475\end_layout
6476
6477\end_inset
6478
6479: a date corresponding to the origin of the time axis
6480\end_layout
6481
6482\begin_layout Subsubsection*
6483Description:
6484\end_layout
6485
6486\begin_layout Standard
6487Those subroutines respectively gets and sets the origin of time associated
6488 to the calendar of the current context.
6489 They must not be used before the calendar was created.
6490\end_layout
6491
6492\begin_layout Subsection*
6493Updating the current date of the current calendar
6494\end_layout
6495
6496\begin_layout Subsubsection*
6497Synopsis:
6498\end_layout
6499
6500\begin_layout LyX-Code
6501SUBROUTINE xios_update_calendar(step)
6502\begin_inset Newline newline
6503\end_inset
6504
6505INTEGER, INTENT(IN) :: step
6506\end_layout
6507
6508\begin_layout Subsubsection*
6509Arguments:
6510\end_layout
6511
6512\begin_layout Itemize
6513\begin_inset Flex Code
6514status collapsed
6515
6516\begin_layout Plain Layout
6517step
6518\end_layout
6519
6520\end_inset
6521
6522: the current iteration number
6523\end_layout
6524
6525\begin_layout Subsubsection*
6526Description:
6527\end_layout
6528
6529\begin_layout Standard
6530This subroutine sets the current date associated to the calendar of the
6531 current context based on the current iteration number:
6532\begin_inset Formula $current\_date=start\_date+step\times timestep$
6533\end_inset
6534
6535.
6536 It must not be used before the calendar was created.
6537\end_layout
6538
6539\begin_layout Subsection*
6540Accessing the current date of the current calendar
6541\end_layout
6542
6543\begin_layout Subsubsection*
6544Synopsis:
6545\end_layout
6546
6547\begin_layout LyX-Code
6548SUBROUTINE xios_get_current_date(current_date)
6549\begin_inset Newline newline
6550\end_inset
6551
6552TYPE(xios_date), INTENT(OUT) :: current_date
6553\end_layout
6554
6555\begin_layout Subsubsection*
6556Arguments:
6557\end_layout
6558
6559\begin_layout Itemize
6560\begin_inset Flex Code
6561status collapsed
6562
6563\begin_layout Plain Layout
6564current_date
6565\end_layout
6566
6567\end_inset
6568
6569: on output, the current date
6570\end_layout
6571
6572\begin_layout Subsubsection*
6573Description:
6574\end_layout
6575
6576\begin_layout Standard
6577This subroutine gets the current date associated to the calendar of the
6578 current context.
6579 It must not be used before the calendar was created.
6580\end_layout
6581
6582\begin_layout Subsection*
6583Accessing the year length of the current calendar
6584\end_layout
6585
6586\begin_layout Subsubsection*
6587Synopsis:
6588\end_layout
6589
6590\begin_layout LyX-Code
6591INTEGER FUNCTION xios_get_year_length_in_seconds(year)
6592\begin_inset Newline newline
6593\end_inset
6594
6595INTEGER, INTENT(IN) :: year
6596\end_layout
6597
6598\begin_layout Subsubsection*
6599Arguments:
6600\end_layout
6601
6602\begin_layout Itemize
6603\begin_inset Flex Code
6604status collapsed
6605
6606\begin_layout Plain Layout
6607year
6608\end_layout
6609
6610\end_inset
6611
6612: the year whose length is requested
6613\end_layout
6614
6615\begin_layout Subsubsection*
6616Description:
6617\end_layout
6618
6619\begin_layout Standard
6620This function returns the duration in seconds of the specified year, taking
6621 leap years into account based on the calendar of the current context.
6622 It must not be used before the calendar was created.
6623\end_layout
6624
6625\begin_layout Subsection*
6626Accessing the day length of the current calendar
6627\end_layout
6628
6629\begin_layout Subsubsection*
6630Synopsis:
6631\end_layout
6632
6633\begin_layout LyX-Code
6634INTEGER FUNCTION xios_get_day_length_in_seconds()
6635\end_layout
6636
6637\begin_layout Subsubsection*
6638Arguments: None
6639\end_layout
6640
6641\begin_layout Subsubsection*
6642Description:
6643\end_layout
6644
6645\begin_layout Standard
6646This function returns the duration in seconds of a day, based on the calendar
6647 of the current context.
6648 It must not be used before the calendar was created.
6649\end_layout
6650
6651\begin_layout Section*
6652Interface relative to duration handling
6653\end_layout
6654
6655\begin_layout Subsection*
6656Duration constants
6657\end_layout
6658
6659\begin_layout Standard
6660Some duration constants are available to ease duration handling:
6661\end_layout
6662
6663\begin_layout Itemize
6664\begin_inset Flex Code
6665status collapsed
6666
6667\begin_layout Plain Layout
6668xios_year
6669\end_layout
6670
6671\end_inset
6672
6673
6674\end_layout
6675
6676\begin_layout Itemize
6677\begin_inset Flex Code
6678status collapsed
6679
6680\begin_layout Plain Layout
6681xios_month
6682\end_layout
6683
6684\end_inset
6685
6686
6687\end_layout
6688
6689\begin_layout Itemize
6690\begin_inset Flex Code
6691status collapsed
6692
6693\begin_layout Plain Layout
6694xios_day
6695\end_layout
6696
6697\end_inset
6698
6699
6700\end_layout
6701
6702\begin_layout Itemize
6703\begin_inset Flex Code
6704status collapsed
6705
6706\begin_layout Plain Layout
6707xios_hour
6708\end_layout
6709
6710\end_inset
6711
6712
6713\end_layout
6714
6715\begin_layout Itemize
6716\begin_inset Flex Code
6717status collapsed
6718
6719\begin_layout Plain Layout
6720xios_minute
6721\end_layout
6722
6723\end_inset
6724
6725
6726\end_layout
6727
6728\begin_layout Itemize
6729\begin_inset Flex Code
6730status collapsed
6731
6732\begin_layout Plain Layout
6733xios_second
6734\end_layout
6735
6736\end_inset
6737
6738
6739\end_layout
6740
6741\begin_layout Itemize
6742\begin_inset Flex Code
6743status collapsed
6744
6745\begin_layout Plain Layout
6746xios_timestep
6747\end_layout
6748
6749\end_inset
6750
6751
6752\end_layout
6753
6754\begin_layout Subsection*
6755Arithmetic operations on durations
6756\end_layout
6757
6758\begin_layout Standard
6759The following arithmetic operations on durations are available:
6760\end_layout
6761
6762\begin_layout Itemize
6763Addition:
6764\begin_inset Flex Code
6765status collapsed
6766
6767\begin_layout Plain Layout
6768xios_duration = xios_duration + xios_duration
6769\end_layout
6770
6771\end_inset
6772
6773
6774\end_layout
6775
6776\begin_layout Itemize
6777Subtraction:
6778\begin_inset Flex Code
6779status collapsed
6780
6781\begin_layout Plain Layout
6782xios_duration = xios_duration - xios_duration
6783\end_layout
6784
6785\end_inset
6786
6787
6788\end_layout
6789
6790\begin_layout Itemize
6791Multiplication by a scalar value:
6792\begin_inset Flex Code
6793status collapsed
6794
6795\begin_layout Plain Layout
6796xios_duration = scalar * xios_duration
6797\end_layout
6798
6799\end_inset
6800
6801 or
6802\begin_inset Flex Code
6803status collapsed
6804
6805\begin_layout Plain Layout
6806xios_duration = xios_duration * scalar
6807\end_layout
6808
6809\end_inset
6810
6811
6812\end_layout
6813
6814\begin_layout Itemize
6815Negation:
6816\begin_inset Flex Code
6817status collapsed
6818
6819\begin_layout Plain Layout
6820xios_duration = -xios_duration
6821\end_layout
6822
6823\end_inset
6824
6825
6826\end_layout
6827
6828\begin_layout Subsection*
6829Comparison operations on durations
6830\end_layout
6831
6832\begin_layout Standard
6833The following comparison operations on durations are available:
6834\end_layout
6835
6836\begin_layout Itemize
6837Equality:
6838\begin_inset Flex Code
6839status collapsed
6840
6841\begin_layout Plain Layout
6842LOGICAL = xios_duration == xios_duration
6843\end_layout
6844
6845\end_inset
6846
6847
6848\end_layout
6849
6850\begin_layout Itemize
6851Inequality:
6852\begin_inset Flex Code
6853status collapsed
6854
6855\begin_layout Plain Layout
6856LOGICAL = xios_duration /= xios_duration
6857\end_layout
6858
6859\end_inset
6860
6861
6862\end_layout
6863
6864\begin_layout Section*
6865Interface relative to date handling
6866\end_layout
6867
6868\begin_layout Subsection*
6869Arithmetic operations on dates
6870\end_layout
6871
6872\begin_layout Standard
6873The following arithmetic operations on dates are available:
6874\end_layout
6875
6876\begin_layout Itemize
6877Addition of a duration:
6878\begin_inset Flex Code
6879status collapsed
6880
6881\begin_layout Plain Layout
6882xios_date = xios_date + xios_duration
6883\end_layout
6884
6885\end_inset
6886
6887
6888\end_layout
6889
6890\begin_layout Itemize
6891Subtraction of a duration:
6892\begin_inset Flex Code
6893status collapsed
6894
6895\begin_layout Plain Layout
6896xios_date = xios_date - xios_duration
6897\end_layout
6898
6899\end_inset
6900
6901
6902\end_layout
6903
6904\begin_layout Itemize
6905Subtraction of two dates:
6906\begin_inset Flex Code
6907status collapsed
6908
6909\begin_layout Plain Layout
6910xios_duration = xios_date - xios_date
6911\end_layout
6912
6913\end_inset
6914
6915
6916\end_layout
6917
6918\begin_layout Subsection*
6919Comparison operations on dates
6920\end_layout
6921
6922\begin_layout Standard
6923The following comparison operations on dates are available:
6924\end_layout
6925
6926\begin_layout Itemize
6927Equality:
6928\begin_inset Flex Code
6929status collapsed
6930
6931\begin_layout Plain Layout
6932LOGICAL = xios_date == xios_date
6933\end_layout
6934
6935\end_inset
6936
6937
6938\end_layout
6939
6940\begin_layout Itemize
6941Inequality:
6942\begin_inset Flex Code
6943status collapsed
6944
6945\begin_layout Plain Layout
6946LOGICAL = xios_date /= xios_date
6947\end_layout
6948
6949\end_inset
6950
6951
6952\end_layout
6953
6954\begin_layout Itemize
6955Less than:
6956\begin_inset Flex Code
6957status collapsed
6958
6959\begin_layout Plain Layout
6960LOGICAL = xios_date < xios_date
6961\end_layout
6962
6963\end_inset
6964
6965
6966\end_layout
6967
6968\begin_layout Itemize
6969Less or equal:
6970\begin_inset Flex Code
6971status collapsed
6972
6973\begin_layout Plain Layout
6974LOGICAL = xios_date <= xios_date
6975\end_layout
6976
6977\end_inset
6978
6979
6980\end_layout
6981
6982\begin_layout Itemize
6983Greater than:
6984\begin_inset Flex Code
6985status collapsed
6986
6987\begin_layout Plain Layout
6988LOGICAL = xios_date > xios_date
6989\end_layout
6990
6991\end_inset
6992
6993
6994\end_layout
6995
6996\begin_layout Itemize
6997Greater or equal:
6998\begin_inset Flex Code
6999status collapsed
7000
7001\begin_layout Plain Layout
7002LOGICAL = xios_date >= xios_date
7003\end_layout
7004
7005\end_inset
7006
7007
7008\end_layout
7009
7010\begin_layout Subsection*
7011Converting a date to a number of seconds since the time origin
7012\end_layout
7013
7014\begin_layout Subsubsection*
7015Synopsis:
7016\end_layout
7017
7018\begin_layout LyX-Code
7019FUNCTION INTEGER(kind = 8) xios_date_convert_to_seconds(date)
7020\begin_inset Newline newline
7021\end_inset
7022
7023TYPE(xios_date), INTENT(IN) :: date
7024\end_layout
7025
7026\begin_layout Subsubsection*
7027Arguments:
7028\end_layout
7029
7030\begin_layout Itemize
7031\begin_inset Flex Code
7032status collapsed
7033
7034\begin_layout Plain Layout
7035date
7036\end_layout
7037
7038\end_inset
7039
7040: the date to convert
7041\end_layout
7042
7043\begin_layout Subsubsection*
7044Description:
7045\end_layout
7046
7047\begin_layout Standard
7048This function returns the number of seconds since the time origin for the
7049 specified date, based on the calendar of the current context.
7050 It must not be used before the calendar was created.
7051\end_layout
7052
7053\begin_layout Subsection*
7054Converting a date to a number of seconds since the beginning of the year
7055\end_layout
7056
7057\begin_layout Subsubsection*
7058Synopsis:
7059\end_layout
7060
7061\begin_layout LyX-Code
7062FUNCTION INTEGER xios(date_get_second_of_year)(date)
7063\begin_inset Newline newline
7064\end_inset
7065
7066TYPE(xios_date), INTENT(IN) :: date
7067\end_layout
7068
7069\begin_layout Subsubsection*
7070Arguments:
7071\end_layout
7072
7073\begin_layout Itemize
7074\begin_inset Flex Code
7075status collapsed
7076
7077\begin_layout Plain Layout
7078date
7079\end_layout
7080
7081\end_inset
7082
7083: the date to convert
7084\end_layout
7085
7086\begin_layout Subsubsection*
7087Description:
7088\end_layout
7089
7090\begin_layout Standard
7091This function returns the number of seconds since the beginning of the year
7092 for the specified date, based on the calendar of the current context.
7093 It must not be used before the calendar was created.
7094\end_layout
7095
7096\begin_layout Subsection*
7097Converting a date to a number of days since the beginning of the year
7098\end_layout
7099
7100\begin_layout Subsubsection*
7101Synopsis:
7102\end_layout
7103
7104\begin_layout LyX-Code
7105FUNCTION DOUBLE_PRECISION xios_date_get_day_of_year(date)
7106\begin_inset Newline newline
7107\end_inset
7108
7109TYPE(xios_date), INTENT(IN) :: date
7110\end_layout
7111
7112\begin_layout Subsubsection*
7113Arguments:
7114\end_layout
7115
7116\begin_layout Itemize
7117\begin_inset Flex Code
7118status collapsed
7119
7120\begin_layout Plain Layout
7121date
7122\end_layout
7123
7124\end_inset
7125
7126: the date to convert
7127\end_layout
7128
7129\begin_layout Subsubsection*
7130Description:
7131\end_layout
7132
7133\begin_layout Standard
7134This function returns the number of days since the beginning of the year
7135 for the specified date, based on the calendar of the current context.
7136 It must not be used before the calendar was created.
7137\end_layout
7138
7139\begin_layout Subsection*
7140Converting a date to a fraction of the current year
7141\end_layout
7142
7143\begin_layout Subsubsection*
7144Synopsis:
7145\end_layout
7146
7147\begin_layout LyX-Code
7148FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_year(date)
7149\begin_inset Newline newline
7150\end_inset
7151
7152TYPE(xios_date), INTENT(IN) :: date
7153\end_layout
7154
7155\begin_layout Subsubsection*
7156Arguments:
7157\end_layout
7158
7159\begin_layout Itemize
7160\begin_inset Flex Code
7161status collapsed
7162
7163\begin_layout Plain Layout
7164date
7165\end_layout
7166
7167\end_inset
7168
7169: the date to convert
7170\end_layout
7171
7172\begin_layout Subsubsection*
7173Description:
7174\end_layout
7175
7176\begin_layout Standard
7177This function returns the fraction of year corresponding to the specified
7178 date, based on the calendar of the current context.
7179 It must not be used before the calendar was created.
7180\end_layout
7181
7182\begin_layout Subsection*
7183Converting a date to a number of seconds since the beginning of the day
7184\end_layout
7185
7186\begin_layout Subsubsection*
7187Synopsis:
7188\end_layout
7189
7190\begin_layout LyX-Code
7191FUNCTION INTEGER xios(date_get_second_of_day)(date)
7192\begin_inset Newline newline
7193\end_inset
7194
7195TYPE(xios_date), INTENT(IN) :: date
7196\end_layout
7197
7198\begin_layout Subsubsection*
7199Arguments:
7200\end_layout
7201
7202\begin_layout Itemize
7203\begin_inset Flex Code
7204status collapsed
7205
7206\begin_layout Plain Layout
7207date
7208\end_layout
7209
7210\end_inset
7211
7212: the date to convert
7213\end_layout
7214
7215\begin_layout Subsubsection*
7216Description:
7217\end_layout
7218
7219\begin_layout Standard
7220This function returns the number of seconds since the beginning of the day
7221 for the specified date, based on the calendar of the current context.
7222 It must not be used before the calendar was created.
7223\end_layout
7224
7225\begin_layout Subsection*
7226Converting a date to a fraction of the current day
7227\end_layout
7228
7229\begin_layout Subsubsection*
7230Synopsis:
7231\end_layout
7232
7233\begin_layout LyX-Code
7234FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_day(date)
7235\begin_inset Newline newline
7236\end_inset
7237
7238TYPE(xios_date), INTENT(IN) :: date
7239\end_layout
7240
7241\begin_layout Subsubsection*
7242Arguments:
7243\end_layout
7244
7245\begin_layout Itemize
7246\begin_inset Flex Code
7247status collapsed
7248
7249\begin_layout Plain Layout
7250date
7251\end_layout
7252
7253\end_inset
7254
7255: the date to convert
7256\end_layout
7257
7258\begin_layout Subsubsection*
7259Description:
7260\end_layout
7261
7262\begin_layout Standard
7263This function returns the fraction of day corresponding to the specified
7264 date, based on the calendar of the current context.
7265 It must not be used before the calendar was created.
7266\end_layout
7267
7268\end_body
7269\end_document
Note: See TracBrowser for help on using the repository browser.