Opened 8 years ago

Closed 7 years ago

#95 closed defect (fixed)

Alternate, sensible, convention for lonvalue_1d when data_dim=1, for a rectilinear domain

Reported by: ssenesi Owned by: ymipsl
Priority: major Component: XIOS
Version: 2.0 Keywords: lonvalue, latvalue, rectilinear, domain
Cc:

Description

In domain.cpp, for the case of a rectilinear domain, completeLonLatClient uses lonvalue_1D with an implicit assumption that the distribution also is recti-linear (i.e. that each MPI tasks does process a rectangle in the lat-lon space)

This does not apply when data_dim=1 and the distribution follows another scheme.

The attached version of domain.cpp, domain_new.cpp, is a proposal for an alternate convention in that case : lonvalue_1d and latvalue_1d are then interpreted as providing arrays which are parallel to the data arrays (which is more intuitive in that data_dim=1 case)

Attachments (2)

domain_patch.cpp (72.0 KB) - added by ssenesi 8 years ago.
Modified,proposed, domain.cpp
domain_r876.cpp (71.0 KB) - added by ssenesi 8 years ago.
Original domain.cpp

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by ssenesi

Modified,proposed, domain.cpp

Changed 8 years ago by ssenesi

Original domain.cpp

comment:1 Changed 8 years ago by ssenesi

Is there any news about this issue ?

comment:2 Changed 7 years ago by ssenesi

I am still interested in a solution to this issue. I will be happy to clarify the issue if the text above is not clear enough

comment:3 Changed 7 years ago by mhnguyen

We can change the default behavior of completeLonLatClient to describe lon, lat more flexibly.
But just keep in mind that lon and lat are a part of local domain so their size in any case must be the size of the local domain.
Two cases will be checked in the function completeLonLatClient for rectilinear domain:
1) ni == lonvalue_1d.numElements() && nj == lonvalue_1d.numElement()
+ So classic rectilinear domain with rectangular distribution.
2) i_index.numElements() == lonvalue_1d.numElements() && j_index.numElements() == latvalue_1d.numElements()
+ In this case, lonvalue_1d and latvalue_1 must have same size which is equal to the size of i_index and j_index.
+ The value of lonvalue_1d and latvalue_1d correspond to the cell (or point) described by i_index and j_index

comment:4 follow-up: Changed 7 years ago by ssenesi

That seems fine.

Said otherwise, case 2 is the case for data_dim=1, in which case all arrays (but data_i_index) have the same size (ni) : i_index, j_index, data_index, latvalue_1D, lonvalue_1d
This is even more strict than :

i_index.numElements() == lonvalue_1d.numElements() && j_index.numElements() == latvalue_1d.numElements()

S

comment:5 in reply to: ↑ 4 Changed 7 years ago by mhnguyen

Replying to ssenesi:

That seems fine.

Said otherwise, case 2 is the case for data_dim=1, in which case all arrays (but data_i_index) have the same size (ni) : i_index, j_index, data_index, latvalue_1D, lonvalue_1d
This is even more strict than :

i_index.numElements() == lonvalue_1d.numElements() && j_index.numElements() == latvalue_1d.numElements()

S

Yes, I agree it seems to be more strict.
But I prefer separating all distribution-related attributes of local domain from data description on this domain to mixing them up in a same function.

comment:6 Changed 7 years ago by mhnguyen

  • Keywords lonvalue latvalue rectilinear domain added
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.