Changeset 1921


Ignore:
Timestamp:
07/31/20 12:21:59 (11 days ago)
Author:
yushan
Message:

trunk : complete axis transformation tests

Location:
XIOS/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/generic_testcase/context_atm.xml

    r1920 r1921  
    77    <domain id="domain" /> 
    88    <domain id="other_domain" /> 
    9     <domain id="dst_domain" ni_glo="36" nj_glo="18" type="rectilinear"/> 
    10   </domain_definition> 
    11  
     9  </domain> 
     10   
    1211  <axis_definition> 
    1312    <axis id="axis" /> 
     
    1615    <axis id="ensemble" /> 
    1716 
    18  
    1917    <axis id="other_axis" /> 
    2018    <axis id="other_domain_X" /> 
     
    4442    </grid> 
    4543    
    46  
    47  
    4844 
    4945    <grid id="grid_X"> 
     
    299295 
    300296  <file_definition  type="one_file" > 
    301     <file id="atm_output_reduction" output_freq="6ts" type="one_file" enabled="true" split_freq="12ts"  > 
    302        <field field_ref="field2D" freq_op="3ts" operation="average" name="field2D_average"/> 
    303        <field field_ref="field2D" freq_op="3ts" operation="accumulate" name="field2D_sum"/> 
    304        <field field_ref="field2D" freq_op="3ts" operation="maximum" name="field2D_max"/> 
    305        <field field_ref="field2D" freq_op="3ts" operation="minimum" name="field2D_min"/> 
     297    <file id="atm_output_inverse_axis" output_freq="4ts" type="one_file" enabled="true"> 
     298       <field field_ref="field_Z" /> 
     299       <field id="field_inverse_axis" field_ref="field_Z" grid_ref="grid1D_inverse_axis"   /> 
    306300    </file> 
    307     
    308     <file id="atm_output_ref" output_freq="1ts" type="one_file" enabled="true"> 
    309        <field field_ref="field2D"   /> 
    310     </file> 
    311  
    312301 
    313302   
  • XIOS/trunk/generic_testcase/iodef.xml

    r1919 r1921  
    4040 
    4141 
    42   <context id="atm" src="./context_atm.xml"/> 
     42  <context id="atm" src="./lk_context_atm.xml"/> 
    4343  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/> 
    4444   
     
    6161        <variable id="check_event_sync" type="bool">true</variable> 
    6262      </variable_group> 
    63       <variable id="activate_non_distributed_transformation" type="bool">true</variable> 
     63      <variable id="activate_non_distributed_transformation" type="bool">false</variable> 
    6464    </variable_definition> 
    6565  </context> 
  • XIOS/trunk/src/test/generic_testcase.f90

    r1914 r1921  
    356356    pressure=1e20 
    357357    DO j=0,z-1 
    358       pressure(:,j)=axis_value(j) ; 
     358      pressure(:,j)=axis_value(j) * 100000; 
    359359      DO i=0,xy-1 
    360360        IF (domain_index(i)/=-1) THEN 
     
    559559    ENDDO 
    560560          
    561     pressure=1e20 
     561    other_pressure=1e20 
    562562    DO j=0,z-1 
    563       pressure(:,j)=axis_value(j) ; 
     563      other_pressure(:,j)=axis_value(j) * 100000 ; 
    564564      DO i=0,xy-1 
    565565        IF (domain_index(i)/=-1) THEN 
  • XIOS/trunk/src/transformation/axis_algorithm_extract_domain.cpp

    r1852 r1921  
    7878TRY 
    7979{ 
     80  double defaultValue = std::numeric_limits<double>::quiet_NaN(); 
     81  if(firstPass) dataOut = defaultValue; 
    8082  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    8183} 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/iodef.xml

    r1909 r1921  
    99      <variable id="domain"> XIOS::ATMdomain </variable> 
    1010      <variable id="domain_mask"> true </variable> 
    11       <variable id="axis_mask"> true </variable> 
     11      <variable id="axis_mask"> false </variable> 
    1212      <variable id="init_field2D"> rank </variable> 
    1313      <variable id="ni"> 36 </variable> 
     
    6161        <variable id="check_event_sync" type="bool">true</variable> 
    6262      </variable_group> 
    63       <variable id="activate_non_distributed_transformation" type="bool">true</variable> 
     63      <variable id="activate_non_distributed_transformation" type="bool">false</variable> 
    6464    </variable_definition> 
    6565  </context> 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/test_axis_algo/checkfile.def

    r1888 r1921  
    11#all 
    2 atm_output_zoom.nc 
    3 #atm_output_inverse.nc 
     2#atm_output_zoom.nc 
     3atm_output_axis_transformation_reduce.nc 
     4atm_output_axis_transformation_zoom.nc 
     5atm_output_axis_transformation_extract.nc 
     6atm_output_axis_transformation_extract_domain.nc 
     7atm_output_axis_transformation_interpolate.nc 
     8atm_output_axis_transformation_temporal_splitting.nc 
     9atm_output_axis_transformation_duplicate_scalar.nc 
     10atm_output_axis_transformation_inverse.nc 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/test_axis_algo/context_atm.xml

    r1807 r1921  
    1111  <axis_definition> 
    1212    <axis id="axis" /> 
    13     <axis id="axis_dup" /> 
    1413    <axis id="domain_X" /> 
    1514    <axis id="domain_Y" /> 
    1615    <axis id="ensemble" /> 
     16    <axis id="axis_interpolate" n_glo="2" value="(0,1)[80000 40000]"> 
     17      <interpolate_axis type="polynomial" order="1" coordinate="pressure"/>  
     18    </axis> 
     19    <axis id="axis_temporal_splitting" n_glo="4"> 
     20      <temporal_splitting />  
     21    </axis> 
     22     
     23    <axis id="axis_duplicate_scalar" n_glo="5"> 
     24      <duplicate_scalar />  
     25    </axis> 
     26 
     27 
     28 
    1729 
    1830    <axis id="other_axis" /> 
     
    2234  </axis_definition> 
    2335 
    24   <axis_definition> 
    25     <axis id="axis_zoom" axis_ref="axis"> 
    26         <zoom_axis begin="0" n="5"/> 
    27     </axis> 
    28  
    29     <axis id="domain_X_zoom" axis_ref="domain_X"> 
    30         <zoom_axis begin="0" n="10"/> 
    31     </axis> 
    32  
    33     <axis id="domain_Y_zoom" axis_ref="domain_Y"> 
    34         <zoom_axis begin="3" n="5"/> 
    35     </axis> 
    36  
    37     <axis id="domain_Y_inverse" axis_ref="domain_Y"> 
    38         <inverse_axis /> 
    39     </axis> 
    40  
    41   </axis_definition> 
    42  
    4336  <scalar_definition> 
    4437    <scalar id="scalar" />  
     
    5346      <axis axis_ref="axis" /> 
    5447    </grid> 
    55      
     48      
     49    <grid id="grid3D_interpolate_axis"> 
     50      <domain domain_ref="domain" /> 
     51      <axis axis_ref="axis_interpolate" /> 
     52    </grid> 
     53 
     54 
    5655    <grid id="grid2D"> 
    5756      <domain domain_ref="domain" /> 
    5857    </grid> 
    5958 
     59    <grid id="grid2D_extract_domain"> 
     60      <axis n_glo="36" > 
     61      <extract_domain direction="iDir" position="5" /> 
     62      </axis> 
     63    </grid> 
     64 
     65 
     66 
    6067    <grid id="grid1D"> 
    6168      <axis axis_ref="axis" /> 
    6269    </grid> 
     70   
     71    <grid id="grid1D_extract"> 
     72      <axis id="axis_extract" axis_ref="axis"> 
     73      <extract_axis n="5" begin="0" /> 
     74      </axis> 
     75    </grid>    
     76 
     77    <grid id="grid1D_zoom"> 
     78      <axis id="axis_zoom" axis_ref="axis"> 
     79      <zoom_axis n="5" begin="0" /> 
     80      </axis> 
     81    </grid>    
     82 
     83 
     84    <grid id="grid1D_inverse"> 
     85      <axis id="axis_inverse" axis_ref="axis"> 
     86      <inverse_axis /> 
     87      </axis> 
     88    </grid>    
     89 
     90    <grid id="grid1D_reduce_sum"> 
     91      <axis id="axis_reduce_sum" axis_ref="axis"> 
     92      <reduce_axis operation="sum"/> 
     93      </axis> 
     94    </grid>    
     95 
     96    <grid id="grid1D_reduce_max"> 
     97      <axis id="axis_reduce_max" axis_ref="axis"> 
     98      <reduce_axis operation="max"/> 
     99      </axis> 
     100    </grid>    
     101 
     102 
     103    <grid id="grid1D_reduce_min"> 
     104      <axis id="axis_reduce_min" axis_ref="axis"> 
     105      <reduce_axis operation="min"/> 
     106      </axis> 
     107    </grid>    
     108   
     109    <grid id="grid1D_reduce_ave"> 
     110      <axis id="axis_reduce_ave" axis_ref="axis"> 
     111      <reduce_axis operation="average"/> 
     112      </axis> 
     113    </grid>    
     114 
     115    <grid id="grid_src"> 
     116      <domain domain_ref="domain" /> 
     117      <axis axis_ref="axis" /> 
     118      <scalar scalar_ref="scalar"/> 
     119    </grid> 
     120   
     121     <grid id="grid_dst"> 
     122      <domain domain_ref="domain" /> 
     123      <axis axis_ref="axis" /> 
     124      <axis axis_ref="axis_temporal_splitting"/> 
     125    </grid> 
     126   
     127   <grid id="grid0D"> 
     128      <scalar scalar_ref="scalar" /> 
     129    </grid> 
     130    
     131    <grid id="grid1D_duplicate_scalar"> 
     132      <axis axis_ref="axis_duplicate_scalar" /> 
     133    </grid> 
     134  
     135 
     136 
    63137 
    64138    <grid id="grid_X"> 
     
    66140    </grid> 
    67141 
    68      <grid id="grid_X_zoom"> 
    69       <axis axis_ref="domain_X_zoom" /> 
    70     </grid> 
    71  
    72142    <grid id="grid_Y"> 
    73143      <axis axis_ref="domain_Y" /> 
    74144    </grid> 
    75145 
    76     <grid id="grid_Y_inverse"> 
    77       <axis axis_ref="domain_Y_inverse" /> 
    78     </grid> 
    79  
    80146    <grid id="grid_XY"> 
    81147      <axis axis_ref="domain_X" /> 
    82148      <axis axis_ref="domain_Y" /> 
    83149    </grid> 
     150     
     151    <grid id="gridXY_zoomX"> 
     152      <axis id="domain_X_zoom" axis_ref="domain_X"> 
     153      <zoom_axis n="6" begin="1" /> 
     154      </axis> 
     155      <axis axis_ref="domain_Y" /> 
     156    </grid> 
     157    
     158    <grid id="gridXY_zoomY"> 
     159      <axis axis_ref="domain_X" /> 
     160      <axis id="domain_Y_zoom" axis_ref="domain_Y"> 
     161      <zoom_axis n="4" begin="2" /> 
     162      </axis> 
     163    </grid> 
     164 
     165 
    84166 
    85167    <grid id="grid_XYZ"> 
     
    151233    </grid> 
    152234 
    153  
    154     <grid id="grid_XY_zoom_Y"> 
    155       <axis axis_ref="domain_X" /> 
    156       <axis axis_ref="domain_Y_zoom" /> 
    157     </grid> 
    158  
    159     <grid id="grid_XY_zoom_X"> 
    160       <axis axis_ref="domain_X_zoom" /> 
    161       <axis axis_ref="domain_Y" /> 
    162     </grid> 
    163  
    164  
    165  
    166   
    167235  
    168236  
     
    261329    </grid> 
    262330 
    263  
    264  
    265  
    266  
    267  
    268  
    269  
    270  
    271  
    272     <grid id="grid_vert_reduce"> 
    273       <domain domain_ref="domain" /> 
    274       <scalar > 
    275         <reduce_axis operation="sum" /> 
    276       </scalar> 
    277     </grid> 
    278  
    279     <grid id="grid_horiz_reduce"> 
    280       <scalar > 
    281         <reduce_domain operation="sum" /> 
    282       </scalar> 
    283       <axis axis_ref="axis" /> 
    284     </grid> 
    285        
    286     <grid id="grid_zoom_vert"> 
    287       <domain domain_ref="domain" /> 
    288       <axis axis_ref="axis_zoom" /> 
    289     </grid> 
    290  
    291     <grid id="grid_zoom_vert_sum"> 
    292       <scalar > 
    293         <reduce_domain operation="sum" /> 
    294       </scalar> 
    295       <axis axis_ref="axis_zoom" /> 
    296     </grid> 
    297  
    298    <grid id="grid_lat"> 
    299        <axis axis_ref="domain_Y"> 
    300          <reduce_domain direction="iDir" operation="sum"/>  
    301        </axis> 
    302        <axis axis_ref="axis" /> 
    303     </grid> 
    304      
    305  
    306     <grid id="grid3D_invert"> 
    307       <domain domain_ref="domain"> 
    308         <reorder_domain invert_lat="true" /> 
    309       </domain> 
    310       <axis axis_ref="axis" /> 
    311     </grid> 
    312      
    313     <grid id="grid2D_invert"> 
    314       <domain domain_ref="domain"> 
    315         <reorder_domain invert_lat="true" shift_lon_fraction="0.5" min_lon="0" max_lon="360"/> 
    316       </domain> 
    317     </grid> 
    318  
    319      
     331    
    320332  </grid_definition> 
    321333   
    322334   
    323335  <field_definition level="1" prec="8" operation="instant" freq_op="1ts" enabled=".true." default_value="1.e+20" detect_missing_value="true"> 
    324     <field id="field2D" grid_ref="grid2D" build_workflow_graph="false" /> 
    325     <field id="field3D" grid_ref="grid3D" build_workflow_graph="true" /> 
     336    <field id="field2D" grid_ref="grid2D" /> 
     337    <field id="field3D" grid_ref="grid3D" /> 
    326338    <field id="pressure" grid_ref="grid3D"  /> 
    327339    <field id="field3D_recv" read_access="true" grid_ref="grid3D"  field_ref="field3D" /> 
    328340    <field id="field3D_resend" grid_ref="grid3D" /> 
    329341 
    330     <field id="field_X" grid_ref="grid_X" build_workflow_graph="false" /> 
    331     <field id="field_Y" grid_ref="grid_Y" build_workflow_graph="false" /> 
    332     <field id="field_Z" grid_ref="grid1D" build_workflow_graph="false" /> 
     342    <field id="field_X" grid_ref="grid_X" /> 
     343    <field id="field_Y" grid_ref="grid_Y" /> 
     344    <field id="field_Z" grid_ref="grid1D" /> 
    333345    <field id="field_XY" grid_ref="grid_XY" /> 
    334346    <field id="field_XYZ" grid_ref="grid_XYZ" /> 
    335347    <field id="field_XZ" grid_ref="grid_XZ" /> 
    336348    <field id="field_YZ" grid_ref="grid_YZ" /> 
    337  
    338     <field id="field_zoom_vert" field_ref="field3D" grid_ref="grid_zoom_vert"  /> 
    339     <field id="field_zoom_vert_sum" field_ref="field_zoom_vert" grid_ref="grid_zoom_vert_sum"  /> 
    340  
    341349 
    342350 
     
    356364 
    357365 
    358  
    359  
    360366    <field id="other_field2D" grid_ref="other_grid2D"/> 
    361367    <field id="other_field3D" grid_ref="other_grid3D"  /> 
     
    386392    <field id="other_field_YZW" grid_ref="other_grid_YZW" /> 
    387393 
    388  
    389  
    390  
     394    <field id="field_src" grid_ref="grid_src" > field3D </field> 
    391395     
    392396     
    393397  </field_definition> 
     398 
     399 
     400 
     401<!-- implementation of specifics test case --> 
     402<!-- simplest test cases : output data to file --> 
     403 
    394404   
    395405 
    396406  <file_definition  type="one_file" > 
    397    
    398  
    399      <file id="atm_output_zoom" output_freq="1ts" enabled="true"> 
    400        <field field_ref="field_XY" grid_ref="grid_XY_zoom_Y" operation="instant" enabled="true"/> 
    401        <!-- <field field_ref="field_Y" grid_ref="grid_Y_inverse" operation="instant" enabled="true"/> --> 
    402      </file> 
    403  
    404  
    405  
    406     <file id="atm_output_other" output_freq="1ts"  enabled="false"> 
    407        <field field_ref="other_field3D" enabled="false"/> 
    408        <field field_ref="other_field2D" enabled="true"/>  
    409        <field field_ref="other_field_X" enabled="false"/> 
    410        <field field_ref="other_field_Y" enabled="false"/> 
    411        <field field_ref="other_field_XY" enabled="false"/> 
    412        <field field_ref="other_field_Z" enabled="false"/> 
    413        <field field_ref="other_field_XYZ" enabled="false"/> 
    414        <field field_ref="other_field_XZ" enabled="false"/> 
    415        <field field_ref="other_field_YZ" enabled="false"/> 
     407    <file id="atm_output_axis_transformation_reduce" output_freq="4ts" type="one_file" enabled="true"> 
     408       <field field_ref="field_Z" /> 
     409       <field id="field_Z_reduce_sum" field_ref="field_Z" grid_ref="grid1D_reduce_sum" /> 
     410       <field id="field_Z_reduce_max" field_ref="field_Z" grid_ref="grid1D_reduce_max" /> 
     411       <field id="field_Z_reduce_min" field_ref="field_Z" grid_ref="grid1D_reduce_min" /> 
     412       <field id="field_Z_reduce_ave" field_ref="field_Z" grid_ref="grid1D_reduce_ave" /> 
     413    </file> 
     414 
     415    <file id="atm_output_axis_transformation_zoom" output_freq="12ts" type="one_file" enabled="true"> 
     416       <field field_ref="field_Z" /> 
     417       <field id="field_Z_zoom"       field_ref="field_Z" grid_ref="grid1D_zoom"       /> 
     418       <field field_ref="field_XY" /> 
     419       <field id="field_XY_zoomX"       field_ref="field_XY" grid_ref="gridXY_zoomX"       /> 
     420       <field id="field_XY_zoomY"       field_ref="field_XY" grid_ref="gridXY_zoomY"       /> 
     421    </file> 
     422     
     423    <file id="atm_output_axis_transformation_extract" output_freq="12ts" type="one_file" enabled="true"> 
     424       <field field_ref="field_Z" /> 
     425       <field id="field_Z_extract"    field_ref="field_Z" grid_ref="grid1D_extract"    />  
     426    </file> 
     427     
     428  
     429    <file id="atm_output_axis_transformation_inverse" output_freq="12ts" type="one_file" enabled="true"> 
     430       <field field_ref="field_Z" /> 
     431       <field id="field_Z_inverse"    field_ref="field_Z" grid_ref="grid1D_inverse"    /> 
     432    </file> 
     433     
     434    <file id="atm_output_axis_transformation_extract_domain" output_freq="12ts" type="one_file" enabled="true"> 
     435       <field field_ref="field2D" /> 
     436       <field id="field2D_extract"       field_ref="field2D" grid_ref="grid2D_extract_domain"       /> 
     437    </file> 
     438     
     439    <file id="atm_output_axis_transformation_interpolate" output_freq="24ts" type="one_file" enabled="true"> 
     440       <field field_ref="field3D"  /> 
     441       <field field_ref="pressure"  /> 
     442       <field id="field_interpolate_axis" field_ref="field3D" grid_ref="grid3D_interpolate_axis" /> 
     443    </file> 
     444 
     445    <file id="atm_output_axis_transformation_temporal_splitting" output_freq="4ts" type="one_file" enabled="true"> 
     446       <field field_ref="field_src" operation="instant" /> 
     447       <field id="field_temporal_splitting" field_ref="field_src" grid_ref="grid_dst" /> 
     448    </file> 
     449     
     450    <file id="atm_output_axis_transformation_duplicate_scalar" output_freq="4ts" type="one_file" enabled="true"> 
     451       <field field_ref="field_Z" /> 
     452       <field id="field_0D" field_ref="field_Z" name="field_0D" grid_ref="grid0D" /> 
     453       <field id="field_duplicate_scalar" field_ref="field_0D" name="field_duplicate_scalar" grid_ref="grid1D_duplicate_scalar" /> 
     454    </file> 
     455 
     456 
     457 
     458 
     459 
     460    <file id="atm_output" output_freq="1ts" type="one_file" enabled="false"> 
     461       <field field_ref="field3D" /> 
     462       <field field_ref="field2D" />  
     463       <field field_ref="field_X" /> 
     464       <field field_ref="field_Y" /> 
     465       <field field_ref="field_XY" /> 
     466       <field field_ref="field_Z" /> 
     467       <field field_ref="field_XYZ" /> 
     468       <field field_ref="field_XZ" /> 
     469       <field field_ref="field_YZ" /> 
     470       <field field_ref="pressure"  />  
     471       <field field_ref="field3D_resend" /> 
     472    </file> 
     473 
     474    <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="false"> 
     475       <field field_ref="other_field3D" /> 
     476       <field field_ref="other_field2D" />  
     477       <field field_ref="other_field_X" /> 
     478       <field field_ref="other_field_Y" /> 
     479       <field field_ref="other_field_XY" /> 
     480       <field field_ref="other_field_Z" /> 
     481       <field field_ref="other_field_XYZ" /> 
     482       <field field_ref="other_field_XZ" /> 
     483       <field field_ref="other_field_YZ" /> 
     484       <field field_ref="other_pressure"  />  
     485       <field field_ref="other_field3D_resend" /> 
    416486    </file> 
    417487 
    418488    <file id="atm_output_W" output_freq="1ts" enabled="false"> 
    419        <field field_ref="field3D_W" enabled="true"/> 
    420        <field field_ref="field2D_W" enabled="true"/>  
    421        <field field_ref="field_XW" enabled="true"/> 
    422        <field field_ref="field_YW" enabled="true"/> 
    423        <field field_ref="field_XYW" enabled="true"/> 
    424        <field field_ref="field_ZW" enabled="true"/> 
    425        <field field_ref="field_XYZW" enabled="true"/> 
    426        <field field_ref="field_XZW" enabled="true"/> 
    427        <field field_ref="field_YZW" enabled="true"/> 
    428     </file> 
    429      
    430  
    431     <file id="atm_output_reorder" output_freq="1ts" enabled="false" > 
    432        <field field_ref="field2D" grid_ref="grid2D_invert" enabled="true"/> 
    433     </file> 
    434      
    435     <file id="test_grid_lat" output_freq="1ts" enabled="false"> 
    436       <field field_ref="field3D" operation="instant" /> 
    437       <field id="field_reduce_lat" field_ref="field3D" grid_ref="grid_lat" operation="instant" /> 
    438     </file> 
     489       <field field_ref="field3D_W" /> 
     490       <field field_ref="field2D_W" />  
     491       <field field_ref="field_XW" /> 
     492       <field field_ref="field_YW" /> 
     493       <field field_ref="field_XYW" /> 
     494       <field field_ref="field_ZW" /> 
     495       <field field_ref="field_XYZW" /> 
     496       <field field_ref="field_XZW" /> 
     497       <field field_ref="field_YZW" /> 
     498    </file> 
     499     
    439500     
    440501  </file_definition> 
Note: See TracChangeset for help on using the changeset viewer.