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

Last change on this file since 560 was 559, checked in by rlacroix, 9 years ago

Update the reference guide to account for all recent changes I did.

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