pdidev / pdi

The PDI Data Interface
https://pdi.dev
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Provide new syntax for using size_of clause in decl_hdf5 and decl_netcdf plugins #470

Open Yushan-Wang opened 4 weeks ago

Yushan-Wang commented 4 weeks ago

For the moment, one can only use size_of clause in read section. We would like to provide a new yaml block targeting the use of size_of, for both read and write. pesudo yaml:

data:
  array_size: int
  mesh_sizes: {type: array, subtype: int, size: 3}
write:
  my_array
  array_size
read:
  my_mesh_array
  mesh_sizes
get_size:
  array_size: my_array
  mesh_sizes: my_mesh_array

When my_mesh_array is read, mesh_sizes will be set automatically. When my_array is exposed to PDI, the array_size is evaluated as well.