I can imagine in future we would like to support various data backends for storing fesom output, like fdb, zarr etc. In any such output stream we would like to control what variable to write to that backend via namelist like it is currently done for netcdf io. A common theme in all such cases is to associate variable name in namelist to its actual data in module o_arrays and its units etc.
Currently in module io_meandata for netcdf-io it is accomplished using a switch case like:
where sst is id in the namelist and is associated to tr_arr(....,1) and has units 'C' and so on
It would be good if we can reuse this part for any new IO backends so that apart from repeting code we may use same name convention in the namelists for other io backends. So I wonder if we can abstract this part and express each variable as type (atleast for io part in may be another module) with any such attributes common for all data output backends.
I will update this thread with my thoughts after experimenting in future but others have an opinion?
I can imagine in future we would like to support various data backends for storing fesom output, like fdb, zarr etc. In any such output stream we would like to control what variable to write to that backend via namelist like it is currently done for netcdf io. A common theme in all such cases is to associate variable name in namelist to its actual data in module o_arrays and its units etc.
Currently in module
io_meandata
for netcdf-io it is accomplished using a switch case like:where
sst
is id in the namelist and is associated totr_arr(....,1) and has units 'C' and so on
It would be good if we can reuse this part for any new IO backends so that apart from repeting code we may use same name convention in the namelists for other io backends. So I wonder if we can abstract this part and express each variable as type (atleast for io part in may be another module) with any such attributes common for all data output backends.
I will update this thread with my thoughts after experimenting in future but others have an opinion?