Home
XIOS User Guide - Forge
Contents
1. lt xml version 1 0 gt CHAPTER 1 CALENDAR 3 lt simulation gt lt context id test gt lt The order of the arguments does not matter so S this is valid lt calendar time origin 2011 11 1113 37 42 type S Gregorian gt lt context gt lt simulation gt Of course it is always possible to define or redefine those parameters from the Fortran interface directly when defining the calendar TYPE xios context ctx hdl Context initialization ommited see the corresponding amp section of this user manual and of the reference S manual CALL xios get handle test ctx hdl CALL xios set current context ctx hdl CALL xios define calendar type Gregorian time origin amp xios date 1977 10 19 00 00 00 start date 6 xios date 2011 11 11 13 37 42 or at a later time TYPE xios context ctx hdl Context initialization ommited see the corresponding amp section of this user manual and of the reference S manual CALL xios get handle test ctx hdl CALL xios set current context ctx hdl CALL xios define calendar type Gregorian CALL xios set time origin time origin xios date 1977 10 S 19 00 00 00 CALL xios set start date start date xios date 2011 11 11 13 37 42 To simplify the use of dates in the XML configuration files it is possible to partially define a date as long as the omitted parts are the rightmost In this c
2. 12 CHAPTER 3 FIELDS AND VARIABLES 13 lt file definition gt lt context gt lt simulation gt It defines one file named output which contains one field field A defined on a grid grid_ A The file and the field are configured so that the data is written in the file at every timestep using the output _ freq file attribute without any transformation using the operation field attribute set to instant The corresponding Fortran simulation loop could be DO ts 1 numberOfTimestep Inform XIOS of the current timestep CALL xios_update_calendar ts Compute field_A for current timestep Output the data CAIL xios send field field A field A ENDDO As you can see the id of the field is used in the model to select the field for which data is being provided which makes this attribute extremely important Note that it must be unique for all fields even if they are defined in different files By default the id of a field is also used as the name of the corresponding NetCDF variable It is however possible to override this default name using the field attribute name Two fields can share the same name as long as they are not used in the same file The second argument of the xios send field function is an array containing the data Its shape and content are not described here as they depend directly on the grid For more information on the data layout refer to the chapters focusing on grids
3. lt context gt lt simulation gt As you know the astronomical year on Earth is approximately a quarter of day longer than the Gregorian calendar year so we have to define the yearly drift as 0 25 day In case of a leap year an extra day is added at the end of February which is the second month ofthe year so leap year month should be set to 2 We start our time axis in 2012 which was a leap year in the Gregorian calendar This means there was previously three non leap years in a row so the current drift was approximately 3x0 25 days hence leap year drift offset should be set to 0 75 At the beginning of 2013 the drift would have been 0 75 0 25 1 day so 2012 will be a leap year as expected CHAPTER 1 CALENDAR 6 1 3 How to use the calendar The calendar is created immediately after the calendar type has been defined and thus can be used even before the context definition has been closed Once the calendar is created you have to keep it updated so that it is in sync with your simulation To do that you haveto callthexios update calendar subroutine for each iteration of your code E be INTEGER ts Pis DO ts 1 end CALL xios update calendar ts Do useful stuff ENDDO The current date is updated to start date ts x timestep after each call Many other calendar operations are available including e accessing various calendar related information like the time step the time origin the start date the d
4. domains and axis The same configuration could also be obtained using the Fortran interface xios context ctx hdl TYPE xios file file hdl TYPE xios filegroup filegroup hdl TYPE xios field field hdl Context calendar and grid initializations ommited see S the corresponding section of this user manual and S of the reference manual CALL xios get_handle test ctx hdl CALL xios set current context ctx hdl CAIL xios get filegroup handle file definition filegroup hdl CALL xios_add_file filegroup_hdl file_ hdl CALL xios set attr file hdl name output output_freq amp xios_ timestep CHAPTER 3 FIELDS AND VARIABLES 14 CALL xios add field file hdl field hdl field A CALL xios set attr field hdl grid ref grid AP amp operation instant Note that if you want to define a field on a grid with only one domain and or one axis it is possible to use the domain ref and axis ref attributes instead of thegrid ref attribute A temporary grid will be created based on the domain and or axis defined this way If you are using a grid with some masked points see the relevant sections of this manual you must set the default value attribute to define the default value that will replace the missing values in the output file If you wish to disable a field without having to remove its definition from the configuration file you can set the enabled attribute to false 3 2 How to use tem
5. represented by blue cells are valid With the secon way data can be represented with CALL xios set domain attr domain A data dim 2 amp data i index datal data j index dataJ with e data 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 2 2 2 3 3 3 3 3 e datal 1 0 1 2 3 1 0 1 2 3 1 0 1 2 3 1 0 1 2 3 1 0 1 2 3 As mentioned data on a domain are two dimensional but in some cases there is a need to write data continously there comes one dimensional data With the precedent example we can define one dimensional data with CALL xios set domain attr domain A data dim 1 amp data index datal and e datal 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Above are the mandatory attributes to define local domain There are some auxilliary attributes which make data meaningful especially for meteorological one The next section disscuses these attributes 5 2 4 Longitude and latitude Different from the previous version in XIOS 2 0 lonngitude and latitude are optional Moreover to be coherent to the data_dim concept there are more ways to input longitude and latitude values Like data longitude and latitude values can be one or two dimension The first ones are represented with lonvalue_1d latvalue_1d the second ones are specified with lonvalue_ 2d and latvalue_ 2d With the same domain_ A we can have longitude and latitude by calling CALL xios set domain attr domain A lonvalue_
6. top to bottom with e i_index j index array of global position of every point in the local domain It is very useful when local domains do not align with each other For example with the first method the local domain in the middle the blue one can be specified with CHAPTER 5 DOMAIN Figure 5 1 Global domain data 32 CHAPTER 5 DOMAIN 33 CALL xios set domain attr domain A ni glo 9 nj glo 9 S ibegin 3 ni 3 jbegin 3 nj 8 The second method demands only two arrays CALL xios set domain attr domain A i index ilndex amp j index jIndex and e ilndex 3 4 5 3 4 5 3 4 5 jIndex 3 3 3 4 4 4 5 5 5 5 2 3 Local domain data Similar to define local index local data can be done in two ways Specify the begining and size of data on the local domain e data_ibegin data jbegin the local position of data on x axis and y axis where data begins e data_ni data_nj size of data on each axis Or specify data with its position in the local domain from left to right top to bottom with e data_i_index data_j_index array of local position of data in the local domain Beside the attributes above one of the essential attributes to define is dimen sional size of data data_ dim Although domain has two dimensions data are not required to be 2 dimensional In particular for case of data dim 1 XIOS uses an 1 dimensional block distribution of data distributed along the first dimension t
7. Additionally the day must also be omitted from the dates in the configuration file for example 2015 13 37 42 and must always be set to 1 when using the Fortran interface for example xios date 2015 01 01 13 37 42 If months have been defined you might want to have leap years to correct the drift between the calendar year and the astronomical year This can be achieved by using the leap year drift and leap year month attributes and optionally the leap year drift offset attribute The idea is to define leap year drift the yearly drift between the calendar year and the astro nomical year as a fraction of a day This yearly drift is summed each year to know the current drift and each time the current drift is greater or equal to one day the year is considered a leap year In that case an extra day is added to the month defined by leap year month and one day is subtracted to the current drift The initial drift is null by default but it can be fixed by the leap year drift offset attribute The following configuration file defines a simplified Gregorian calendar using the user calendar feature lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type user_ defined day length 86400 month lengths 1 12 31 28 31 30 31 30 31031 amp 30 31 30 31 leap year month 2 leap year drift 0 25 leap year drift offset 0 75 time origin 2012 02 29_15 00 00 start date 2012 03 01_15 00 00 gt
8. gt lt calendar type Gregorian gt lt context gt lt simulation gt and the Fortran interface TYPE xios context ctx hdl Context initialization ommited see the corresponding amp section of this user manual and of the reference S manual CALL xios get handle test ctx hdl CALL xios set current context ctx hdl xios define calendar cannot be used here because the S type was already defined in the configuration file Ommiting the following line would lead to an error S because the timestep would be undefined CALL xios set timestep timestep 1 5 xios hour The calendar also has two optional date parameters e the start date which corresponds to the beginning of the simulation e the time origin which corresponds to the origin of the time axis If they are undefined those parameters are set by default to 0000 01 01 00 00 00 If you are not interested in specific dates you can ignore those parameters completely However if you wish to set them please note that they must not be set before the calendar is defined Thus the following XML config uration file would be for example invalid lt xml version 1 0 gt lt simulation gt lt context id test gt lt Invalid because the calendar type cannot be S known at that point lt calendar start _date 2011 11 11_13 37 42 gt lt context gt lt simulation gt while the following configuration file would be valid
9. of domain So it s the turn of Fortran interface 5 2 Working with FORTRAN code One of the important concepts to grasp in mind in using FORTRAN interface is the data distribution With a distributed memory XIOS data are broken into disjoint blocks one per client process In the next sections local describes everything related to a client process whereas global means whole data The followings describe the essential parts of domain Details of its attributes and operations can be found in XIOS reference guide 5 2 1 Domain type Domain is a two dimensional coordinates which can be considered to be com posed of two axis y axis and x axis However different from two axis com CHAPTER 5 DOMAIN 31 posed mechanically a domain contains more typical information which play an important role in specific cases Very often in meteorological applications do main represents a surface with latitude and longitude Because these properties change from one domain type to another it is recommended to use domain in case of representing a surface In XIOS a domain can be represented by one of three different types of coordinate system which also differentiate the way to represent latitude and longitude correspondingly e rectilinear a simple 2 dimensional Cartesian coordinates with two per pendicular axes Latitude represents the y axe while longitude represents the x axe e curvilinear a 2 dimensional coordinates allows the generality of t
10. of the output files can sometimes become a problem XIOS provides some features which may help to reduce the size of the output files losslessly The first solution is to use the compression feature provided by HDF5 which allows a field to be compressed using gzip Since it depends directly on HDF5 this feature works only when the NetCDF 4 format is used Unfortunately HDF5 does not support compression yet for parallel output so you have to use only one server or to engage the multiple file mode To enable the gzip compression of a field you need to set the compression level attribute to any integer between 1 and 9 by default this attribute is set to 0 which means that compression is disabled Using an higher compression level should improve the compression ratio at the cost of using more processing power Generally using a compression level of 2 should be a good trade off The following example illustrates the use of the gzip compression lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt CHAPTER 3 FIELDS AND VARIABLES 24 lt grid definition gt lt file definition gt lt file name output output freg Its L compression level 2 gt lt field id field A grid ref grid A amp operation average compression level G 4 gt lt field
11. processes each of which has size 3 The local axis can be described by the following way Specify the the beginning and size of local axis with e n glo global size of axis e begin global position where a local axis begin e n local size of axis on each process For example the local axis in the middle the yellow one can be specified with CALL xios set axis attr axis A n glo 9 begin 3 n 3 6 2 2 Local axis data Simpler than local domain data data on axis is always on dimension Like local domain data local axis data represent the data offset from local axis and it can be defined in two ways Specify the begining and size of data on the local axis e data begin the local position of data on axis where data begins e data n size of data on each local axis CHAPTER 6 AXIS Figure 6 1 Global axis data 40 CHAPTER 6 AXIS 41 Or specify data with its position in the local axis e data index array of local position of data in the local axis Although the valid data must be inside a local axis it is not neccessary for data to have same size In fact data can have larger size than local axis CALL xios set axis attr axis A data begin 1 data n n S 2 For local axis_ A the negative value of data_begin indicates that data is larger than local axis the valid part of data needs extracted from the real data If data_ begin has a positive value that means data size is smaller than local
12. the interval between two records In the example the data would be written for every timestep independently of the timestep duration It is possible to use any duration as the output frequency but be careful if you are not using a du ration which is a multiple of the timestep duration since XIOS might not be doing what you want The same configuration could be obtained from the Fortran interface as well TYPE xios context ctx hdl TYPE xios file file hdl TYPE xios filegroup filegroup hdl Context and calendar initializations ommited see the S corresponding section of this user manual and of amp the reference manual CALL xios get_handle test ctx hdl CALL xios set current context ctx hdl CAIL xios get filegroup handle file definition filegroup hdl CALL xios_add_file filegroup_hdl file hdl CALL xios set attr file hdl name output output_freq amp xios_ timestep Another important parameter for file is the mode attribute which is set by de fault to write You need to set it to read if you want to use XIOS to handle inputs Note that in this case the output freq attribute must correspond to the output frequency used to create the input file When using the write mode it is possible to append the data to an existing file instead of overwriting it by setting the append attribute to true In this case you must be careful not to modify the structure of the file i
13. 1d lon1D amp latvalue 1d latiD with e lon1D 30 40 50 30 40 50 30 40 50 e latiD 30 30 30 40 40 40 50 50 50 Or by using two dimension longitude and latitude CALL xios set domain attr domain A lonvalue 2d lon2D amp latvalue Id lat2D with CHAPTER 5 DOMAIN 36 30 40 50 e lon2D 30 40 50 30 40 50 30 30 30 elatiD 4 40 40 40 50 50 50 For unstructured mesh a cell can have different number of vertices than rectin linear in this case longitude and latitude value of the vertex of cell are specified with bounds_lon_1d and bounds lat 1d For curlinear mesh bounds lon 2d and bounds lat 2d provide a con venient way to define longitude and latitude value for the vertex of the cell However it is possible to use bounds lon 1d and bounds lat 1d to describe these values One thing to remind only 1d or 2d attributes are used if 1d and 2d of a same attribute are provides there will be runtime error All attributes of domain can be found in Reference Guide Chapter 6 Axis Like Domain Axis is a sub component of Grid but is one dimension In mete orological applications axis represents a vertical line with different levels 6 1 Working with configuration file The way to define an axis with configuration file is similar to define a domain 6 1 1 Basic configuration Similar to domain an axis is defined inside its definition part with the tag axis definition
14. Fields and variables XIOS outsources the input output definitions in its XML configuration file In the last chapter we presented some general points about file objects This chap ter focuses on how to use fields and variables that is variables and attributes in NetCDF nomenclature to populate files 3 1 How to define your first field If you wish to input or to output data using XIOS you will need to define at least one file with one field This can be done from both the XML configuration file and the Fortran interface Fields are often defined in the configuration file although their definitions are sometimes amended using the API Field objects are defined with the lt field gt tag and should always be inside a lt field definition gt or a lt file gt section Only the grid and the operation attached to the field are mandatory to have a well defined field but it is gener ally a good idea to give it an identifier The following example shows a minimal configuration file which defines one file with one field lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid definition gt lt file definition gt lt file name output type one file output freq 1 amp ts gt lt field id field_A grid ref grid A operation instant gt lt file gt
15. XIOS User Guide Draft September 10 2015 Chapter 1 Calendar 1 1 How to define a calendar XIOS has an embedded calendar module which needs to be configured before you can run your simulation Only the calendar type and the time step used by your simulation are manda tory to have a well defined calendar For example a minimal calendar definition could be from the XML configuration file lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1 5h gt lt context gt lt simulation gt from the Fortran interface TYPE xios context ctx hdl Context initialization ommited see the S corresponding section of this user manual and S of the reference manual CALL xios get handle test ctx hdl CALL xios set current context ctx hdl CALL xios define calendar type Gregorian timestep amp 1 5 xios_ hour The calendar type definition is done once and for all either from the XML con figuration file or the Fortran interface and cannot be modified However there CHAPTER 1 CALENDAR 2 is no such restriction regarding the time step which can be defined at a different time than the calendar type and even redefined multiple times For example it is possible to the achieve the same minimal configuration as above by using both the XML configuration file lt xml version 1 0 gt lt simulation gt lt context id test
16. ase the remainder of the date is initialized as in the default date For example it would be valid to write start_date 1977 10 19 instead of start_date 1977 10 19 00 00 00 or even time_origin 1789 instead of time_origin 1789 01 01 00 00 00 Similarly it is possible to express a date with an optional duration offset in the configuration file by using the date duration notation with date potentially partially defined or even completely omitted Consequently the following examples are all valid in the XML config uration file e time origin 2011 11 11 13 37 00 42s CHAPTER 1 CALENDAR 4 e time origin 2014 ly 2d e start date 36h 1 2 How to define a user defined calendar Predefined calendars might not be enough for your needs if you simulate phe nomenons on another planet than the Earth For this reason XIOS can let you configure a completely user defined calendar by setting the type attribute to user defined In that case the calendar type alone is not sufficient to define the calendar and other parameters should be provided since the duration of a day or a year are not known in advance Two approaches are possible depending on whether you want that your cus tom calendar to have months or not either use the month _ lengths attribute to define the duration of each months in days or use the year length attribute to define the duration of the year in seconds In both cases you have to define day length the d
17. ature is now considered to be a transfor mation It can be more complicated for other geometric transformation such as inversion or interpolation All transformation are taken place on grid level Tt means that it is neccessary to define a grid source and a grid destination as well as a transformation or list of transformation which we d like to have In order to transform a grid to one another we need to specify a transformation on its sub component domain or axis Because transformation on a domain is different from one on an axis we dif ferenciate two categories of transformation transformation domain and trans formation axis Till now XIOS supports the following transformation on domain e zoom domain Like zoom functionality in XIOS 1 0 the destination grid is the zoomed region of the source grid e interpolation domain Implement interpolation from a domain to one another for now XIOS can only do interpolation by reading calculated weight values from a file The calculation on the fly will be implemented soon It is not difficult to define a transformation Include type of transformation inside domain definition as the following lt domain definition gt lt domain id domain A gt lt domain id domain A zoom domain ref domain A gt lt zoom domain zoom ibegin 1 zoom ni 3 zoom jbegin amp 0 zoom nj 2 gt CHAPTER 5 DOMAIN 30 lt domain gt lt domain definition gt The concrete example abo
18. ave a few smaller files containing contiguous temporal portions of the output data CHAPTER 2 FILES 10 This behavior can be achieved in XIOS by setting the split freq attribute to the duration you want as illustrated in the following example lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt file definition gt lt file name output output freq 1d split freq 1y CR lt Content of the file ommited for now gt lt file gt lt file definition gt lt context gt lt simulation gt With this configuration some data will be outputted every day and a new file will be created every year Note that the split frequency is the duration after which a new file will be created it does not mean that a new file will be created at the beginning of each period For example if you start your simulation the first of June 2014 and run it for two years with a split frequency of one year e you will get two files containing respectively the period from June Ist 2014 to May 31th 2015 and from June Ist 2015 to May 31th 2016 e you will NOT get three files containing respectively the last six months of 2014 the full year of 2015 and the first six months of 2016 XIOS automatically suffixes the file names with the start and end dates when using file splitting By default it will try to use the shortest date that still enables to distingu
19. axis The default value of data_ begin is 0 which implies that local data fit into local axis properly Loal data can be defined with CALL xios set axis attr axis A data index data with e data 1 0 1 2 3 6 2 3 Value Value of axis plays a same role as longitude and latitude of domain As local data it can be distributed among processes CALL xios set axis attr axis A value valueAxis with e valueAxis 30 40 50 Because there is a need of direction of an axis then comes the attribute positive CALL xios set axis attr axis A positive up All attributes of axis can be found in Reference Guide
20. d not the result of the operation on the field Similarly it is sometimes useful to output the result of a temporal operation on a field for different periods In this case it does not really make sense to define the field that will be then inherited in one file rather than another A solution is to make use of the field definition section so that it is clear that the field can be reused in any file This is illustrated in the following sample configuration file lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid_definition gt lt field definition gt lt field id field A name field_ A grid ref amp grid A operation average gt lt field definition gt lt file definition gt lt file name output 1d output_freq 1d gt lt field field ref field A gt lt file gt lt file name output Imo output freg Imo gt lt field field ref field A gt lt file gt lt file definition gt lt context gt lt simulation gt CHAPTER 3 FIELDS AND VARIABLES 19 3 5 How to use arithmetic operations Since XIOS aims to reduce as much as possible the need for post processing it can apply some arithmetic operations on the data it handles regardless of its provenance All usual operators that is addition subt
21. f axis A zoom gt lt grid gt On defining this way we tell XIOS to establish a connection between two grids by a transformation zoom with grid source grid A grid destination grid A zoom CHAPTER 6 AXIS 39 As mentioned in Grid Chapter in order to use transformed grid just refer ence to it in field definition lt field definition level 1 enabled TRUE amp default value 9 96921e 36 gt lt field id field A operation average freq op 3600s amp grid ref grid A gt lt field id field A zoom operation average freq op amp 3600s grid ref grid A zoom gt lt field definition gt Although xml is helpful to define several configurations it can not be used to customize attributes of axis So it s the turn of Fortran interface 6 2 Working with FORTRAN code Although axis is not as complexe as domain there are some mandatory at tributes to define Different from precedent version XIOS 2 0 supports distri bution of data on a axis The followings describe the essential parts of axis Details of its attributes and operations can be found in XIOS reference guide 6 2 1 Local axis index Axis is often used with domain which is broken into several distributed pieces to make a 3 dimension grid However there are cases in which data on axis are distributed among processes Following we consider a simple case a axis with global size 9 and its data are distributed evenly among 3 client
22. first file If you wish to input or to output data using XIOS you will need to define at least one file This can be done from both the XML configuration file and the Fortran interface Files are usually defined in the configuration file although their definitions are sometimes amended using the API File objects are defined with the lt file gt tag and should always be inside the lt file_definition gt section Only the output frequency is mandatory to have a well defined file but it is generally a good idea to give it a name The following example shows a minimal configuration file which defines one file lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt file definition gt lt file name output output_freq 1ts gt lt Content of the file ommited for now gt lt file gt lt file definition gt lt context gt lt simulation gt CHAPTER 2 FILES 8 Note that the file extension could depend of the format so it is automatically added to the chosen name by XIOS Since XIOS only support NetCDF formats for now the extension is always nc If the name is not set XIOS will use the id of the file object instead This id is generated automatically by XIOS if it was not set by the user The output frequency is particularly important since it defines the interval of time between two consecutive outputs that is in NetCDF nomenclature
23. grid A grid is defined with the tag grid While it is not crucial for a grid group not to have an identification specified by attribute id a grid must be assigned an id to become useful Unlike grid group is a way of hierarchically organizing related grid only a grid itself is referenced by fields with its id Without the id a grid can not be made used of by a field Id is a string of anything but there is one thing to remember id of a grid as well as id of any component in XIOS are unique among this kind of components It is not allowed to have two grids with a same id but it is permitted a grid and for example a domain to share a same one A grid is defined by domain s and axis A domain represents two dimension data while an axis serves as one dimension data They are defined inside the grid definition One of the convenient and effective way to reuse the definitions in XIOS is to take advantage of attribute _ ref On using _ ref the referencing component has all attributes from its referenced one As the example below grid with id grid_ A from now one called grid_ A is composed of one domain whose attributes derived directly from another one domain_ A and one axis whose attributes are taken from axis axis_C which are defined previously lt domain id domain_A _ gt lt axis_id axis A _ gt lt grid_lid grid_ A gt lt domain domain _ref domain_A _ gt o lt axiscaxis ref axis_C _ gt lt grid
24. gt The ref can only used to reference to a already defined element e g do main axis grid etc If these ref have not been defined yet there will be a runtime error Details about domain and axis can be found in other sections but there is one thing to bear in mind A domain represents two dimension data and it also contains several special information longitude latitude bound etc For the meteorological mind domain indicates a surface with latitude and longitude whereas axis represents a vertical level In general cases there is only a need of writing some multidimensional data to a netCDF without any specific information then comes the following defini tion of grid lt grid id grid AN Axis gt lt axis axis ref axis A gt lt axis axis ref axis B gt lt axis axis ref axis C gt lt grid gt CHAPTER 4 GRID 27 The grid All Axis is similar to grid A but with three dimensions defined by 3 axis that can be described in any way on demand of user For example the axis A and the axis B can have corresponding name latitude and longitude to characterize a two dimension surface with latitude and longitude Very often one dimensional data needs writing to netCDF it can be easily done with the following XML code lt grid id grid Axis gt lt axis axis ref axis D gt lt grid gt As it is discussed more details in the next section but remember that even the non distributed o
25. he current field For example the previous configuration file could be rewritten as follow lt xml version 1 0 gt lt simulation gt CHAPTER 3 FIELDS AND VARIABLES 20 lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid_ definition gt lt file definition gt lt file name output output_freq 1d gt lt field id field_B grid ref grid A operation average gt this 273 15 lt field gt lt field id field_C field_ref field_B gt log10 field_B lt field gt lt file gt lt file definition gt lt context gt lt simulation gt and the Fortran call would be replaced by xios send field field B field A 3 6 How to chain multiple temporal operations By default all field names appearing in an expression refer to the instant data of those fields To refer to the result of a temporal operation the field name must be prefixed with Q This feature allows to chain multiple temporal operations as illustrated bellow lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid GS gt lt grid definition gt lt field definition gt lt field id field A grid ref grid A operation amp a
26. he x axis With the first way to define data on a local domain we can use CALL xios set domain attr domain A data dim 2 S data ibegin 1 data ni ni 2 data jbegin 1 amp data nj nj 2 In order to be processed correctly data must be specified with the be gining and size of its block For two dimensional data it can be done with data ibegin data ni for the first dimension and data jbegin data nj for the second dimension In case of one dimensional data it is only necessary to de termine data ibegin and data ni Although the valid data must be inside a domain it is not neccessary for data to have same size as domain In fact data can have larger size than domain on each dimension this is often the case of ghost cell The attributes data ibegin and data jbegin specify the offset of data from local domain For local domain A the negative value indicates that data is larger than local domain the valid part of data needs extracted from the real data A positive value indicates data is smaller than local domain The default value of data ibegimn data jbegin is 0 which implies that data fit into local domain properly CHAPTER 5 DOMAIN Valid data local domain Data Global domain Figure 5 2 Local domain with data CHAPTER 5 DOMAIN 35 On Figure 5 2 local domain occupies the center of the global domain whereas real data fill up a larger region Only data inside the local domain
27. id field B grid ref grid A amp operation average compression level L 0 gt lt field id field C grid_ref grid_A 4 operation average gt lt file gt lt file_definition gt lt context gt lt simulation gt Note that the compression _ level attribute can also be set at a file level in this case it is inherited by all fields of the file unless they explicitly override the attribute The second solution is available only if you are using a grid with masked val ues In this case you can choose to output the indexed grid instead of the full grid by setting the indexed output attribute to true Missing values are then omitted and extra arrays are outputted so that the translation from the compressed indexes to the true indexes can be done Due to those ar rays of indexes indexed output should be considered only if there is enough masked values For more details about this feature please refer to section 8 2 Compression by Gathering of the Climate and Forecast CF Convention Chapter 4 Grid 4 1 Overview Grid plays an important role in XIOS Same as Field Grid is one of the basic elements in XIOS which should be well defined not only in the configuration file but also in the FORTRAN code Because until now XIOS has mainly served for writing NetCDF data format most of its components are inspired from NetCDF Data Model and Grid is not an exception Grid is a concept describing dimensi
28. imestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid definition gt lt file definition gt lt file name output type one file output freq 1d g gt lt field id field_A grid ref grid A operation average gt lt file gt lt file definition gt lt context gt lt simulation gt Compared to the previous example only the file attribute output _ freq and the field attribute operation have been modified Computing the weekly minimum instead of the daily average would be as simple as using output freg 7d and operation minimum Note that if you use a temporal operation and have default value defined it might be useful to set the attribute detect missing value to true This way temporal operations will not be applied when a default value is detected For example we consider the values of a 2x2 domain for three timesteps Fil Bd bd If we suppose that the field is configured to compute the average on three timesteps the resulting field would be 73 13 3 E 4 If default value is set to 1 and detect missing value is set to true the resulting field would be 4 7 5 7 3 3 How to use a specific data sampling It is sometimes useful to have more control on the data sampling By default the input data is used at every timestep but sometimes it is not what you want The following examples illustrate such case
29. ish the files Thus in the above example the files would be named output_ 2014 2015 nc and output 2015 2016 nc If you wish to force the date format used to prefix the files you can define the split freq format attribute to override the default behavior 2 5 A word about file synchronization File synchronization is usually not something you should worry about However it is important to understand that data written by XIOS might not be immedi ately written on the disk in practice Input output libraries like NetCDF and HDF5 and parallel file systems generally use complex caching policies for per formance reasons This means that your data might still be stored in memory after it was supposedly written It might become critical to control this behavior for two main reasons e if you want to mitigate the impact of a crash as all buffered data would be lost CHAPTER 2 FILES 11 e if you want to be able to access the data from the output file immediately after writing it By default XIOS will never force file synchronization but you can require it to do so by setting the sync freq attribute to the wanted duration In this case XIOS will regularly instruct NetCDF to synchronize the file on disk by flushing its internal buffers Note file synchronization must be used sparingly as it can have a disastrous impact on performance Make sure to use a reasonably high synchronization frequency to avoid any issue Chapter 3
30. k for a while if the data was not yet received from the server s but it should not happen too often thanks to the prefetching done by XIOS Since the read access attribute allows to the access fields which depend di rectly on data from the model you must be very careful with the order of the xios_send_field and xios_recv_field calls For example consider the fol lowing configuration file just a simple example as in practice it does not make much sense to use it lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt CHAPTER 3 FIELDS AND VARIABLES 23 lt grid id grid_A gt lt Definition ommited gt lt grid GQ gt lt grid definition gt lt field definition gt lt field id field A grid ref grid A operation amp instant gt lt field definition gt lt file definition gt lt file name output output_freq 1ts gt lt field id field B grid ref grid A S4 operation instant read access true gt amp field A 42 lt field gt lt file gt lt file definition gt lt context gt lt simulation gt If you call xios_recv_field field_B field B beforexios send field field A field A the requested data will never be available and a deadlock could occur In practice XIOS will detect the problem and throw an error 3 8 How to reduce the size of an output file The size
31. ld_A square field_A 2 lt field gt lt file gt lt file definition gt lt context gt lt simulation gt Note that since an instant operation is used freg op and output freq are identical in this scenario 3 7 How to access the data of a field In order not to waste memory the instant data of a field can be read from the model only if e it is part of a file whose attribute mode is read CHAPTER 3 FIELDS AND VARIABLES 22 e or its attribute read access is set to true In any other case trying to access the field data would cause an error The following configuration file lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid GS gt lt grid definition gt lt file definition gt lt file name input output_freq 1ts gt lt field id field_A grid _ref grid_ A operation instant gt lt file gt lt file definition gt lt context gt lt simulation gt can be used with this Fortran code DO ts 1 numberOfTimestep Get field A for current timestep CAIL xios recv field field A field A field A must amp be an allocated array with the right size Do useful things Inform XIOS of the current timestep CALL xios_update_calendar ts ENDDO The call to xios_recv_field might bloc
32. lt axis definition gt lt axis id axis A gt lt axis axis ref axis A gt lt axis definition gt The first one is to specify explicitly identification of an axis with an id lt axis definition gt lt axis id axis A gt lt axis definition gt In this way with id the axis can be processed e x modified its attributes with Fortran interface besides it is only possible to reference to a axis whose id is explicitly defined To make a reference to an axis we use axis ref lt axis definition gt lt axis axis ref axis A gt lt axis definition gt An axis defined by axis ref will inherit all attributes of the referenced one except its id attribute If there is no id specified an implicit one is assigned to this new axis The axis with implicit id can only be used inside the scope where it is defined it can not be referenced nor be processed Tt is rare to define an axis without id inside axis definition 37 CHAPTER 6 AXIS 38 To define a new axis inside a grid we use the tag axis lt grid id grid A gt lt axis axis ref axis A gt lt grid gt The xml lines above can be translated as the grid A composed of an axis A that is defined somewhere else before More precisely the grid grid A is con stituted of a unknown id axis which has inherited all attributes and their values from axis A name long name i index j index etc 6 1 2 Advanced configu
33. n particular no fields should be added modified nor removed or XIOS will throw an error If you wish to disable a file without having to remove its definition from the configuration file you can set the enabled attribute to false 2 2 How to use parallel I O By default XIOS will create one file by server each file being suffixed with the rank of the server For example if the sample configuration used in the pre CHAPTER 2 FILES 9 vious section was used with two servers two files named output O nc and output 1 nc would be created Each file would contain only the portion of the fields affected to the corresponding server This default mode can also be explicitly configured by setting the type attribute to multiple file Using the multiple file mode is often a reliable way to achieve good perfor mances particularly if you only have a few servers However having multiple files also increases the complexity of the post processing chains and it is often much easier to always get one file regardless of how many servers are used It is possible to achieve such behavior in XIOS by setting the type attribute to one file This feature depends directly on the NetCDF library capabilities so you need to make sure that XIOS was properly linked with a parallel version of NetCDF If the library was not compiled with parallel input output support XIOS will issue a warning and revert to the multiple_ file m
34. ne dimensional data can be well processed by XIOS As mentioned above grid includes by default one unlimited dimension which is often used as time step axis In order to write only time step to netCDF XIOS provides a special way to do empty grid a grid without any domain or axis lt grid id grid TimeStep gt lt grid gt AThe order of domain and or in grid definition decides order of data written to netCDF data on domain or axis appearing firstly in grid definition will vary the most For example on using ncdump command on netCDF which contains data written on the grid A float field A time counter axis A y x field A online operation average field A interval operation 3600s field Asinterval write 6h field A coordinates time centered axis Acnav lato amp nav_lon The data vary most quickly on dimension y x which are two axes of do main A These are the default name of these dimension of a domain The data on axis vary slower than on the domain and all the data are written one time step defined by time_counter at a time Although a grid can be easily configured in XML file it also needs defining in the FORTRAN via the definition of domain and axis for a model to work fully and correctly All these instruction will be detailed in the next section 4 3 Working with FORTRAN code Because grid is composed of domain and axis all processing are taken grid via Domain and Axis The
35. next chapters supply the detail of these two sub components Chapter 5 Domain Domain is a two dimensional coordinates which can be considered to be com posed of two axis y axis and x axis However different from two axis composed mechanically a domain contains more typical information which play an impor tant role in specific cases Very often in meteorological applications domain represents a surface with latitude and longitude 5 1 Working with configuration file 5 1 1 Basic configuration Similar to Grid as well as other components in XIOS a domain is defined inside its definition part with the tag domain definition lt domain definition gt lt domain id domain A gt lt domain domain ref domain A gt lt domain definition gt The first one is to specify explicitly identification of a domain with an id One repetition id of any component in XIOS are unique among this kind of components It is not allowed to have two domains with a same id but it is permitted a domain and a grid for example to share a same one lt domain definition gt lt domain id domain A gt lt domain definition gt In this way with id the domain can be processed e x modified its attributes with Fortran interface besides it is only possible to reference to a domain whose id is explicitly defined Very often after a domain is defined it may be referenced many times To make a reference to a domain we use d
36. ode 2 3 Supported NetCDF formats XIOS supports only the version 4 or later of NetCDF library It uses by default the new NetCDF 4 format which relies on HDF5 format as a back end This for mat can also be selected explicitly by setting the format attribute to netcdfZ Alternatively it also possible to force NetCDF 4 to use the classic NetCDF 3 binary format by setting the format attribute to netedf4 classic When using this older format some features might be unavailable but current version of XIOS should not be affected much Depending on the format there are some specific requirements on how the NetCDF library should have been compiled e netcdfZ format requires that HDF5 support has been enabled in NetCDF using the configuration option enable netcdf4 and that the HDF5 li brary has been properly linked o netcdf4 format used in one file mode requires that the HDF5 li brary has been compiled with parallel support using the configuration option enable parallel e netcdf4 classic format used in one file mode requires that Paral lel Net CDF support has been enabled in NetCDF using the configuration option enable pnetcdf and that the Parallel NetCDF library has been properly linked 2 4 How to use file splitting Output files can often be quite huge particularly if the one_ file mode is used In this case it can be interesting to periodically split the file in order to h
37. omain ref lt domain definition gt lt domain domain ref domain A gt lt domain definition gt 28 CHAPTER 5 DOMAIN 29 A domain defined by domain ref will inherit all attributes of the referenced one except its id attribute If there is no id specified an implicit one is assigned to this new domain The domain with implicit id can only be used inside the scope where it is defined it can not be referenced nor be processed It is rare to define a domain without id inside domain definition However the domain ref is utilized widely outside the scope of domain_ definition Because a domain is a sub component of grid it is possible to define a new domain inside a grid with the tag domain Moreover it is the only region where we can define a new domain outside domain_ definition lt grid id grid_A gt lt domain domain ref domain A gt lt grid gt The xml lines above can be translated as the grid A composed of a do main that is defined somewhere else before More precisely the grid grid A is constituted of a unknown id domain which has inherited all attributes and their values from domain A name long name i index j index etc With this approach we only define a domain once but reuse it as many time as we like in different configurations 5 1 2 Advanced configuration One of a new concept which differenciates XIOS 2 0 from its precedent is trans formation In a simple case zoom fe
38. ons that contain the axes of the data arrays Moreover Grid always consists of an unlimited dimension whose length can be expanded at any time Other dimensions can be described with Domain and Axis The followings describe how to make use of Grid in XIOS Details of its attributes and operations can be found in XIOS reference guide 4 2 Working with configuration file As mentioned above a grid contains the axes of the data arrays which are characterized by Domain and or Axis A domain is composed of a 2 dimension array meanwhile an axis is as its name an 1 dimension array Like other components of XIOS a grid is defined inside its definition part with the tag grid definition lt grid definition gt lt grid group id gridGroup gt lt grid id grid_A gt lt domain domain ref domain A gt lt axis axis ref axis C gt lt grid gt lt grid id grid Axis gt lt axis axis ref axis D gt lt grid gt lt grid id grid Al Axis gt lt axis axis ref axis A gt lt axis axis ref axis B gt lt axis axis ref axis C gt 25 CHAPTER 4 GRID 26 lt grid gt lt grid group gt lt grid_ definition gt As XIOS supports netCDF 4 HDF5 it allows user to gather several grids into groups to better organize data Very often grids are grouped basing on the dimensions that they describe However there is not a limit for user to group out the grids The more important thing than grid_ group is
39. poral operations The last section showed a very basic example where the data was outputted at every timestep using the instant operation However in many use cases it might be more interesting to output only the mean value on a certain period of time for example This section describes the use of temporal operations avail able in XIOS The field attribute operation currently supports six modes e instant no temporal operation is applied which means the new data always overrides the previous one even if it was not outputted e average compute and output the mean value e accumulate compute and output the sum e minimum compute and output the minimum value e maximum compute and output the maximum value e once the data is written to the file only the first time it is received from the model any subsequent data is ignored The corresponding NetCDF variable does not have a time dimension The output frequency of the file defined by the output _ freq attribute is used as the temporal operation period except for the once operation for which there is no period This means it is for example not possible to output a daily average and a weekly average in the same file This updated example shows how to output the daily average instead of the instant data for all timesteps lt xml version 1 0 gt lt simulation gt lt context id test gt CHAPTER 3 FIELDS AND VARIABLES 15 lt calendar type Gregorian t
40. raction multiplica tion division and exponentiation and some common functions like cos sin tan exp log log10 sqrt are supported The following example shows how to use arithmetic operations lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid definition gt lt field definition gt lt field id field A grid ref grid A operation S average gt lt field definition gt lt file definition gt lt file name output output_freq 1d gt lt field id field_B field ref field A gt field A 273 15 lt field gt lt field id field C field ref field A gt log10 amp field B lt field gt lt file gt lt file definition gt lt context gt lt simulation gt With this configuration only one call to xios send field field A field A is needed In this example field ref is used only to inherit the attributes from field_ A the instant values are not inherited since an expression has been given for field B and field_C Note that it is possible to use fields obtained from an expression in another expression thus the expression of field C is equiva lent to logl0 field_A 273 15 The special keyword this can be used in an expression to refer to the instant data received from the model by t
41. ration Like domain there are several transformation which can be defined with con figuration file All transformations on an axis have form axis Till now XIOS supports the following transformation on axis e zoom axis Like zoom functionality in XIOS 1 0 the destination grid is the zoomed region of the source grid e interpolation_ axis Implement interpolation from an axis to one another For now only polynominal interpolation is available It is not difficult to define a transformation Include type of transformation inside axis definition as the following lt axis definition gt lt axis id axis_A gt lt axis id axis A zoom axis _ref axis A gt lt zoom axis zoom begin 1 zoom size 3 gt lt axis gt lt axis definition gt The concrete example above says many things the axis named axis A zoom is transformed from axis name axis A with a zoom activity The detailed at tributes of zoom axis can be found in reference document but simply it con tains the begining and size of zoomed region One remark is the transformed axis SHOULD have an id in this case it s axis A zoom As mentioned before a no id axis or any no id component of XIOS can only be used inside its definition scope To make use of transformation the grid must contain axis which references to transformed ones lt grid id grid_A gt lt axis axis ref axis A gt lt grid gt lt grid id grid A zoom gt lt axis axis re
42. rid_ref grid_A 4 operation average gt lt field id field A min grid ref grid A operation min gt lt field id field A max grid ref grid A operation max gt lt file gt lt file definition gt lt context gt lt simulation gt To simplify the handling of such scenarios XIOS has a reference feature which allows one field to inherit the attributes except the id and the instant data of another field The above example can then be rewritten lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid_definition gt lt file definition gt lt file name output output_freq 1d gt CHAPTER 3 FIELDS AND VARIABLES 18 lt field id field A name field A avg amp grid ref grid A operation average amp gt lt field field ref field A name field_ A min S operation min gt lt field field ref field A name field A max 4 operation max gt lt file gt lt file definition gt lt context gt lt simulation gt With this configuration only one call to xios send field field A field A is needed Note how inherited attributes like name or operation for example are overwritten to obtain the desired configuration Additionally be aware that it is the instant values which are inherite
43. s 1 the model is not computing updated values at the same frequency for all fields for example a field is updated every two timesteps CHAPTER 3 FIELDS AND VARIABLES 16 2 you want to output a specific instant value in the interval between two outputs 3 you want to compute an average without taking into account all instant values in the interval between two outputs Data sampling can be controlled in XIOS using the freq op one timestep by default and freq offset null by default attributes Those attributes define respectively how often data from the model must be used and the amount of time before starting to use it For following excerpts of configuration files show you to use those attributes to handle the motivating examples 1 In this example we suppose that we get two fields from the model field A which is computed for each timestep and field B which is only computed every two timesteps For both fields we show how to compute and output the sum of all values received during 6 timesteps lt file definition gt lt file name output output_freq 6ts gt lt field id field A grid ref grid A operation accumulate gt lt field id field_B grid ref grid B operation amp accumulate freq _op 2ts gt lt file gt lt file definition gt 2 In this example we show how to output the 11th instant value every 12 timesteps lt file definition gt lt file name output o
44. uration of a day in seconds Those attributes have to be defined at the same time than the calendar type either from the XML configu ration file or the Fortran interface for example lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type user defined day length 86400 amp month_lengths 1 12 _ 31_28_31_30_31_30_31 31 S 30031 30031 gt lt context gt lt simulation gt or TYPE xios context ctx hdl Context initialization ommited see the corresponding amp section of this user manual and of the reference S manual CALL xios get handle test ctx hdl CALL xios set current context ctx hdl CALL xios define calendar type Gregorian day length amp 86400 year length 31557600 Note that if no months are defined the format of the dates is modified in the XML configuration file since the month must be omitted For example 2015 71 13 37 42 would be the correct way to refer to the 71st day of the year 2015 at 13 37 42 If you use the Fortran interface the month cannot be omitted but you have to make sure to always set it to 1 in that case For ex ample use xios date 2015 01 71 13 37 42 for 2015 71 13 37 42 CHAPTER 1 CALENDAR 5 Moreover it is possible that the duration of the day is greater than the dura tion of the year on some planets In this case it obviously not possible to define months so you have to use the year length attribute
45. uration of a day or a year the current date etc e doing arithmetic and comparison operations on date TYPE xios date datel date TYPE xios duration duration LOGICAL res we suppose a calendar is defined CALL xios get current date datel duration xios duration 0 0 1 0 0 0 0 0 12 x xios hour date2 datel duration 0 5 x xios hour res date2 gt datel duration date datel e converting dates to the number of seconds since the time origin the beginning of the year or the beginning of the day the number of days since the beginning of the year the fraction of the day or the year For more detailed about the calendar attributes and operations see the XIOS reference guide Chapter 2 Files Since files are central to an I O server the configuration of XIOS is built around file objects Those objects correspond directly to files on the computer file system which are either to be written or to be read Although XIOS currently only supports the NetCDF format XIOS files are a generic abstraction Each file can contain one or more fields each field being defined on a grid and optionally variables In the NetCDF nomenclature fields defined in XIOS correspond to NetCDF variables and XIOS variables are NetCDF attributes As fields variables and grids are complex objects they have their own chapters and we will focus only on files in this section 2 1 How to define your
46. utput_freq 12ts gt lt field id field A grid_ref grid_ A operation S instant freq op 11ts freq offset 12ts amp gt lt file gt lt file definition gt 3 In this example we suppose that the timestep is equal to one hour and that the simulation starts at midnight We show how to compute the weekly average of the field value at midday lt file definition gt lt file name output output freg Iw gt lt field id field A grid ref erid A operation amp average freq op 1d freq_offset 12h gt lt file gt lt file definition gt CHAPTER 3 FIELDS AND VARIABLES 17 3 4 How to use field references It is quite common that different temporal operations must be applied to the same instant data provided by the model In theory the only solution to handle this scenario would be to define a field for each operation give them different id and and call xios send field with the same array of data for each of those fields The following example illustrates this solution for a field for which we want to compute the average minimal and maximal values lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid definition gt lt file definition gt lt file name output output_freq 1d gt lt field id field A avg g
47. ve says many things a domain named domain A zoom is transformed from domain name domain with a zoom activity The detailed attributes of z2om domain can be found in reference document but simply it contains the begining and size of zoomed region One remark is the transformed domain SHOULD have an id in this case it s domain A zoom As mentioned before a no id domain or any no id com ponent of XIOS can only be used inside its definition scope It exists but is useless So care about that To make use of transformation the grid must contain domains which refer ence to transformed ones lt grid id grid_A gt lt domain domain ref domain A gt lt grid gt lt grid id grid A zoom gt lt domain domain ref domain A zoom gt lt grid gt On defining this way we tell XIOS to establish a connection between two grids by a transformation zoom with grid source grid A grid destination grid A zoom As mentioned in Grid Chapter in order to use transformed grid just refer ence to it in field definition lt field definition level 1 enabled TRUE amp default value 9 96921e 36 gt lt field id field A operation average freq op 3600s amp grid ref grid A gt lt field id field A zoom operation average freq op amp 3600s grid ref grid A zoom gt lt field definition gt Although xml is helpful to define several configurations it can not be used to customize attributes
48. verage gt lt field definition gt lt file definition gt lt file name output output_freq 7d gt lt field name field A min of average grid ref amp grid A operation min freq op Id gt amp field_ A lt field gt CHAPTER 3 FIELDS AND VARIABLES 21 lt file gt lt file definition gt lt context gt lt simulation gt This example shows how to compute the minimum on 7 days of the daily average of field A In this context the freq op attribute defines the period of the temporal operation for all fields pointed with the operator in the expression Another use of this feature is to do arithmetic operations on the result of tem poral operations The following configuration file for example shows how to output the standard deviation for a field on a one day period lt xml version 1 0 gt lt simulation gt lt context id test gt lt calendar type Gregorian timestep 1h gt lt grid definition gt lt grid id grid_A gt lt Definition ommited gt lt grid g gt lt grid definition gt lt field definition gt lt field id field A grid ref grid A operation S average gt lt field id field A square field ref grid A gt field A x field A lt field gt lt field definition gt lt file definition gt lt file name output output_freq 1d gt lt field name field A std dev grid ref S grid A operation instant freq_op 1d S gt sqrt fie
49. wo axes not perpendicular to each other Latitude and longitude have the size equivalent to size of whole domain e unstructured not any of two above the latitutude and longitude as curvi linear are reprensented with the help of boundaries Different from XIOS 1 0 in this new version users must explicitly specify the type of domain which they would like to use CALL xios set domain attr domain A type rectilinear Althoug there are different domain types they share the similar patterns to settle local data on a client process There are some essential attributes to define The next sections describe their meanings and how to specify correctly data for a local domain 5 2 2 Local domain index It is not uncommon that a global domain is broken into several pieces each of which is distributed to one process Following we consider a simple case a domain of rectilinear type with global size 9 x 9 and its data is distributed evenly among 9 client processes each of which has 3x3 The region of local domain can be described by one of the following way Specify the the beginning and size of local domain with e ni glo nj_ glo global size of x axis and y axis correspondingly e ibegin jbegin global position on x axis and y axis where a local domain begin e ni nj local size of domain of each process on x axis and y axis Or tell XIOS exactly the global position of each point in the local domain from left to right
Download Pdf Manuals
Related Search
Related Contents
Svantek SV106 Ground Vibration Measurement User Guide instrukcja obsługi kamera termowizyjna kt-130 Particle Imaging Velocimetry of Self Benutzerhandbuch Percursos de vida de sucesso - Repositório da Universidade dos GE 98971 User's Manual User Manual - Dolby Medical 808 Hair Removal Product User manual Copyright © All rights reserved.
Failed to retrieve file