Changeset 820


Ignore:
Timestamp:
02/10/16 14:34:46 (5 years ago)
Author:
mhnguyen
Message:

Fixing duplicate *_ref on reading attributes from file

+) Remove *_ref from *_ref root of the reference tree

Test
+) On Curie
+) Test passes

Location:
XIOS/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/inputs/REMAP/iodef.xml

    r818 r820  
    1010     <field id="dst_field" operation="instant" field_ref="src_field" domain_ref="dst_domain"/> 
    1111     <field id="tmp_field" operation="instant" domain_ref="src_domain_regular_tmp"/> 
    12 <!--     <field id="tmp_field_1" operation="instant" grid_ref="src_grid_curvilinear" />--> 
    13 <!--     <field id="tmp_field_2" operation="instant" domain_ref="domain_src_unstructured" />--> 
    14      <field id="dst_field_regular" operation="instant" field_ref="tmp_field" domain_ref="dst_domain_regular" read_access="true"/> 
    15 <!--     <field id="dst_field_regular_pole" operation="instant" field_ref="src_field" domain_ref="dst_domain_regular_pole"/>--> 
     12     <field id="tmp_field_1" operation="instant" grid_ref="src_grid_curvilinear" /> 
     13     <field id="tmp_field_2" operation="instant" grid_ref="src_grid_unstructured" /> 
     14     <field id="dst_field_regular" operation="instant" field_ref="tmp_field_2" grid_ref="dst_grid_regular" read_access="true"/> 
     15     <field id="dst_field_regular_pole" operation="instant" field_ref="src_field" domain_ref="dst_domain_regular_pole"/> 
    1616   </field_definition> 
    1717 
     
    2525     </file> 
    2626     <file id="out_dst_regular_pole" name="out_dst_regular_pole" type="one_file"> 
    27 <!--        <field field_ref="dst_field_regular_pole" name="field" />--> 
     27        <field field_ref="dst_field_regular_pole" name="field" /> 
    2828     </file> 
    2929     <file id="output_dst_regular" name="output_dst_regular" type="one_file"> 
     
    3131     </file> 
    3232     <file id="output_dst_curvilinear" name="output_dst_curvilinear" type="one_file"> 
    33 <!--        <field field_ref="tmp_field_1" operation="instant"/>--> 
     33        <field field_ref="tmp_field_1" operation="instant"/> 
    3434     </file> 
    3535     <file id="output_dst_unstructured" name="output_dst_unstructured" type="one_file"> 
    36 <!--        <field field_ref="tmp_field_2" operation="instant"/>--> 
    37      </file> 
    38  
    39      <file id="output_src_regular" name="output_src_regular" mode="read" type="multiple_file"> 
    40 <!--        <field id="src_field_regular" name="field" domain_ref="src_domain_regular" operation="instant"/>--> 
     36        <field field_ref="tmp_field_2" operation="instant"/> 
    4137     </file> 
    4238     <file id="output_src_regular_tmp" name="output_src_regular_tmp" mode="read" type="one_file"> 
     
    4541 
    4642     <file id="output_src_curvilinear" name="output_src_curvilinear" mode="read" type="one_file"> 
    47 <!--        <field id="src_field_curvilinear" name="field_A" grid_ref="src_grid_curvilinear" operation="instant"/>--> 
     43        <field id="src_field_curvilinear" name="field_A" grid_ref="src_grid_curvilinear" operation="instant"/> 
    4844     </file> 
    4945     <file id="output_unstructured" name="output_unstructured" mode="read" type="one_file"> 
    50 <!--        <field id="field_src_unstructred" name="field" domain_ref="domain_src_unstructured" operation="instant"/>--> 
     46        <field id="field_src_unstructred" name="field" grid_ref="src_grid_unstructured" operation="instant"/> 
    5147     </file> 
    5248   </file_definition> 
     
    6864       <generate_rectilinear_domain id="domain_regular_pole"/> 
    6965       <interpolate_domain/> 
     66<!--       <zoom_domain id="zoom_0" ibegin="0" ni="180" jbegin="0" nj="90"/>--> 
    7067     </domain> 
    7168     <domain id="dst_domain_regular" ni_glo="90" nj_glo="45" type="rectilinear"> 
    7269       <generate_rectilinear_domain /> 
    7370       <interpolate_domain/> 
    74      </domain> 
    75      <domain id="src_domain_regular" ni_glo="180" nj_glo="90" type="rectilinear"> 
    76        <generate_rectilinear_domain lat_start="-90" lat_end="90" lon_start="2" lon_end="360" /> 
    7771     </domain> 
    7872     <domain id="src_domain_regular_tmp" type="rectilinear"> 
     
    8276       <generate_rectilinear_domain /> 
    8377     </domain> 
    84      <domain id="domain_src_unstructured" type="unstructured"> 
     78     <domain id="src_domain_unstructured" type="unstructured"> 
    8579       <generate_rectilinear_domain /> 
    8680     </domain> 
     
    9185      <domain domain_ref="src_domain_curvilinear"/> 
    9286      <axis axis_ref="src_axis_curvilinear" /> 
     87    </grid> 
     88    <grid id="src_grid_unstructured"> 
     89      <domain domain_ref="src_domain_unstructured"/> 
     90    </grid> 
     91    <grid id="dst_grid_regular"> 
     92      <domain domain_ref="dst_domain_regular"/> 
    9393    </grid> 
    9494  </grid_definition> 
  • XIOS/trunk/src/declare_ref_func.hpp

    r777 r820  
    5454{                                                                      \ 
    5555  for (int i = 1; i < refObjects.size(); ++i)                          \ 
    56     refObjects[i]->setAttributes(refObjects[0], apply);                \ 
     56    refObjects[i]->setAttributes(refObjects[i-1], apply);              \ 
     57  if (refObjects.size() > 1)                                           \ 
     58    refObjects[refObjects.size()-1]->removeRefInheritance();           \ 
    5759}                                                                      \ 
    5860                                                                       \ 
  • XIOS/trunk/src/test/test_remap.f90

    r786 r820  
    120120                            bounds_lon_1D=dst_boundslon, bounds_lat_1D=dst_boundslat, nvertex=dst_nvertex) 
    121121 
    122   CALL xios_set_generate_rectilinear_domain_attr("domain_regular_pole", lat_start=dble(-90.0), lat_end=dble(90), & 
    123                                                  lon_start=dble(2), lon_end=dble(360)) 
    124  
    125122  dtime%second = 3600 
    126123  CALL xios_set_timestep(dtime) 
     
    134131  ALLOCATE(tmp_field_1(src_tmp_ni*src_tmp_nj*src_tmp_n)) 
    135132 
    136   CALL xios_get_domain_attr("domain_src_unstructured", ni=src_tmp_ni, nj=src_tmp_nj) 
     133  CALL xios_get_domain_attr("src_domain_unstructured", ni=src_tmp_ni, nj=src_tmp_nj) 
    137134  ALLOCATE(tmp_field_2(src_tmp_ni*src_tmp_nj)) 
    138135 
    139136  DO ts=1,1 
     137 
    140138    CALL xios_recv_field("src_field_regular_tmp", tmp_field) 
    141139    CALL xios_recv_field("src_field_curvilinear", tmp_field_1) 
Note: See TracChangeset for help on using the changeset viewer.