Opened 8 years ago

Closed 8 years ago

#45 closed defect (fixed)

problem including a file containing a context in iodef.xml

Reported by: jgipsl Owned by: ymipsl
Priority: major Component: XIOS
Version: 1.0 Keywords:
Cc:

Description

Following exemple does not work :

iodef.xml :

<?xml version="1.0"?>
<simulation>
  <context id="xios">
    <variable_definition>
      <variable_group id="buffer">
            buffer_size = 80000000
            buffer_server_factor_size = 2
         </variable_group>
      <variable_group id="parameters">
        <variable id="using_server" type="boolean">false</variable>
        <variable id="info_level" type="int">0</variable>
      </variable_group>
    </variable_definition>
  </context>

  <context src=".context_orchidee.xml"/>

</simulation>

context_orchidee.xml :

  <context id="orchidee">
    <field_definition src="./field_def_orchidee.xml"/>
    <file_definition src="./file_def_orchidee.xml"/>

    <domain_definition>
      <domain id="domain_landpoints"/>
    </domain_definition>

    <axis_definition>
      <!-- Vertical axis and extra dimensions in sechiba -->
      <axis id="veget" standard_name="model_level_number" long_name="Vegetation types" unit="1"/>
      <axis id="laiax" standard_name="model_level_number" long_name="Nb LAI" unit="1"/>
      <axis id="solth" standard_name="model_level_number" long_name="Soil levels" unit="m"/>
      <axis id="soiltyp" standard_name="model_level_number" long_name="Soil types" unit="1"/>
      <axis id="nobio" standard_name="model_level_number" long_name="Other surface types" unit="1"/>
      <axis id="albtyp" standard_name="model_level_number" long_name="Albedo types" unit="1"/>
      <axis id="solay" standard_name="model_level_number" long_name="Hydrol soil levels" unit="m"/>
      <!-- Vertical axis and extra dimensions in stomate -->
      <axis id="PFT" standard_name="model_level_number" long_name="Plant functional type" unit="1"/>
      <axis id="P10" standard_name="model_level_number" long_name="Pool 10 years" unit="1"/>
      <axis id="P100" standard_name="model_level_number" long_name="Pool 100 years" unit="1"/>
      <axis id="P11" standard_name="model_level_number" long_name="Pool 10 years + 1" unit="1"/>
      <axis id="P101" standard_name="model_level_number" long_name="Pool 100 years + 1" unit="1"/>
    </axis_definition>
  </context>

The same example works if putting the contents from the file context_orchidee.xml directly into iodef.xml instead of including the file by src.

Change History (3)

comment:1 in reply to: ↑ description Changed 8 years ago by ymipsl

Hi,

You need to have the identifier of the context in the primary file, ie :


iodef.xml :

<?xml version="1.0"?>
<simulation>
  <context id="xios">
    <variable_definition>
      <variable_group id="buffer">
            buffer_size = 80000000
            buffer_server_factor_size = 2
         </variable_group>
      <variable_group id="parameters">
        <variable id="using_server" type="boolean">false</variable>
        <variable id="info_level" type="int">0</variable>
      </variable_group>
    </variable_definition>
  </context>

  <context id="orchidee" src=".context_orchidee.xml"/>

</simulation>

This is because a context without id is not parsed.

Could you test it and report please ?

Regards,

Yann

comment:2 Changed 8 years ago by jgipsl

OK. It works.
Thanks.
Josefine

comment:3 Changed 8 years ago by ymipsl

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, ticket closed

Yann

Note: See TracTickets for help on using tickets.