Changeset 1919


Ignore:
Timestamp:
07/20/20 12:22:40 (2 years ago)
Author:
yushan
Message:

trunk : bug in routine checkValid in extract_domain_to_axis

Location:
XIOS/trunk
Files:
4 edited

Legend:

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

    r1912 r1919  
    77    <domain id="domain" /> 
    88    <domain id="other_domain" /> 
    9   </domain> 
    10    
     9    <domain id="dst_domain" ni_glo="36" nj_glo="18" type="rectilinear"/> 
     10  </domain_definition> 
     11 
    1112  <axis_definition> 
    1213    <axis id="axis" /> 
     
    1516    <axis id="ensemble" /> 
    1617 
     18 
    1719    <axis id="other_axis" /> 
    1820    <axis id="other_domain_X" /> 
     
    4143      <axis axis_ref="axis" /> 
    4244    </grid> 
     45    
     46 
     47 
    4348 
    4449    <grid id="grid_X"> 
     
    294299 
    295300  <file_definition  type="one_file" > 
    296      
    297     <file id="atm_output" output_freq="1ts" type="one_file" enabled="true"> 
     301    <file id="atm_output_reduction" output_freq="6ts" type="one_file" enabled="true"> 
     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"/> 
     306    </file> 
     307    
     308    <file id="atm_output_ref" output_freq="1ts" type="one_file" enabled="true"> 
     309       <field field_ref="field2D"   /> 
     310    </file> 
     311 
     312 
     313   
     314    <file id="atm_output" output_freq="1ts" type="one_file" enabled="false"> 
    298315       <field field_ref="field3D" /> 
    299316       <field field_ref="field2D" />  
     
    309326    </file> 
    310327 
    311     <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="true"> 
     328    <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="false"> 
    312329       <field field_ref="other_field3D" /> 
    313330       <field field_ref="other_field2D" />  
     
    323340    </file> 
    324341 
    325     <file id="atm_output_W" output_freq="1ts" enabled="true"> 
     342    <file id="atm_output_W" output_freq="1ts" enabled="false"> 
    326343       <field field_ref="field3D_W" /> 
    327344       <field field_ref="field2D_W" />  
  • XIOS/trunk/generic_testcase/iodef.xml

    r1904 r1919  
    99      <variable id="domain"> lmdz </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> 
  • XIOS/trunk/generic_testcase/param.def

    r1912 r1919  
    11&params_run 
    22duration='1d' 
    3 nb_proc_atm=1 
     3nb_proc_atm=4 
    44/ 
  • XIOS/trunk/src/node/extract_domain_to_axis.cpp

    r980 r1919  
    6666    { 
    6767      case direction_attr::jDir: 
    68         if (axis_n_glo != domain_ni_glo) 
     68        if (axis_n_glo != domain_nj_glo) 
    6969          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    70             << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source" 
    71             << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl 
     70            << "Extract domain along j, axis destination should have n_glo equal to nj_glo of domain source" 
     71            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl 
    7272            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 
    73         if ((position < 0) || (position > domain_ni_glo)) 
     73        if ((position < 0) || (position >= domain_ni_glo)) 
    7474        ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    75           << "Extract domain along j, position should be inside 0 and ni_glo of domain source" 
    76           << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl 
     75          << "Extract domain along j, position should be inside 0 and ni_glo-1 of domain source" 
     76          << "Domain source " <<domainSrc->getId() << " has ni_glo " << domain_ni_glo << std::endl 
    7777          << "Axis destination " << axisDst->getId() << std::endl 
    7878          << "Position " << position); 
     
    8080 
    8181      case direction_attr::iDir: 
    82         if (axis_n_glo != domain_nj_glo) 
     82        if (axis_n_glo != domain_ni_glo) 
    8383          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    84             << "Extract domain along i, axis destination should have n_glo equal to nj_glo of domain source" 
    85             << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl 
     84            << "Extract domain along i, axis destination should have n_glo equal to ni_glo of domain source" 
     85            << "Domain source " <<domainSrc->getId() << " has ni_glo " << domain_ni_glo << std::endl 
    8686            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 
    87         if ((position < 0) || (position > domain_nj_glo)) 
     87        if ((position < 0) || (position >= domain_nj_glo)) 
    8888        ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    89           << "Extract domain along i, position should be inside 0 and nj_glo of domain source" 
    90           << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl 
     89          << "Extract domain along i, position should be inside 0 and nj_glo-1 of domain source" 
     90          << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl 
    9191          << "Axis destination " << axisDst->getId() << std::endl 
    9292          << "Position " << position); 
Note: See TracChangeset for help on using the changeset viewer.