Opened 6 months ago

Last modified 6 months ago

#2694 new Defect

iom_put without halos

Reported by: smasson Owned by:
Priority: low Milestone:
Component: MULTIPLE Version: trunk
Severity: minor Keywords:
Cc: Branch review:
MP ready?: Task progress:

Description (last modified by smasson)

Context

In the actual version of the code, in iom_put (and because of the way we defined our interface with xios):

  • we give to xios arrays defined over the full domain (jpi,jpi)
  • we say to xios to write data only over the inner domain (Ni_0, Nj_0)

The problem is that in many cases (in most of cases?), output variables are diagnostics that could be computed only over the inner domain. Having to use full domain arrays forces us to do more computation, to call lbc_lbk (that is incompatible with a proper use of the tiles) or to use arrays with uninitialized halos which prevents to use the debug options.

The ideal solution would be to be able to use iom_put (and therefore xios) for variables defined over the full domain or over the inner domain only.
Unfortunately this is something which is not possible easily with the actual version of xios.

Analysis

I had a discussion with Yann Meurdesoif to try to find the best way to sort this out.
He proposed 2 “solutions":

1) the simplest solution is to setup xios so it is expecting is inner domain arrays and to “cut” the full domain into inner domain arrays before calling xios.
This is the solution I coded last year but it generates arrays copies and slow down the code significantly. We decided to remove it.
see #2563 and changeset [13747]

2) the second solution is good for performances but bad for users and maintenance:
The idea is to define 2 set of grids: gridT/U/V/F over the full domain and gridT/U/V/F over the inner domain. The modifications are quite easy to do in the code. The problem is that we would have to modify the xml files:

  • We would need to duplicated the contain of grid_def_nemo.xml to have for example grid_T_2D_full and grid_T_2D_inner instead than a simple grid_T_2D
  • next in all the field_def_nemo-*.xml files, we sould make sure that the grid linked to the variable is the proper one… there is more than 1200 variables…

Recommendation

we decide to go for solution (2)

Commit History (1)

ChangesetAuthorTimeChangeLog
15017smasson2021-06-18T12:12:53+02:00

trunk: introduce iom_put without halos, #2694

Change History (3)

comment:1 Changed 6 months ago by smasson

  • Description modified (diff)

comment:2 Changed 6 months ago by smasson

In 15017:

trunk: introduce iom_put without halos, #2694

comment:3 Changed 6 months ago by smasson

This is a first implementation of iom_put without halos.

I applied this new possibility to diawri.F90.

2 remarks:

  • array manipulation in xml files (like toce * e3t) requires that the arrays are defined on the same grid (either full or inner domain)
  • this method replace nav_lon, nav_lat variable names by nav_lon_grid_T, nav_lat_grid_T (for T point). I did not output nav_lon_grid_T_inner, nav_lat_grid_T_inner variables as they are the same as nav_lon_grid_T, nav_lat_grid_T but, I think this is a problem for the CF-convention.
Note: See TracTickets for help on using tickets.