Opened 5 years ago

Closed 5 years ago

#111 closed defect (fixed)

wrong consistency check in domaion.cpp on ni when data_dim=1

Reported by: ssenesi Owned by: ymipsl
Priority: major Component: XIOS
Version: 1.0 Keywords: checking condition, data_dim
Cc:

Description

domain.cpp reads at line 730 :

      if ((ni.getValue() < 0 || ibegin.getValue() < 0) ||
         ((type_attr::unstructured != type) && ((ibegin.getValue() + ni.getValue()) > ni_glo.getValue())))

while it should be:

      if ((ni.getValue() < 0 || ibegin.getValue() < 0) ||
         ((data_dim.get(Value()== 2 && ((ibegin.getValue() + ni.getValue()) > ni_glo.getValue())))

as you can have data_dim=1 and e.g. type=curvilinear, which breaks the relationship between ni and ni_glo.
Another formulation would be to use as a ceiling value for ni :

  • ni_glo if data_dim==2
  • ni_glo * nj_glo if data_dim==1

Change History (1)

comment:1 Changed 5 years ago by mhnguyen

  • Keywords checking condition data_dim added
  • Resolution set to fixed
  • Status changed from new to closed

This ticket can be considered an enhancement for XIOS.
There should not be a direct connection between the distribution of a domain (defined with ?begin/n? or ?_index) and the way to access data on domain (defined with data_*). So I chose to loosen the checking condition for ?begin/n? and ?_index. This way allows us to do more flexible things.

Note: See TracTickets for help on using tickets.