Closed taobrienlbl closed 5 years ago
sure we can add capability to write non-geometric data. I have questions for you, probably more suitable for a face to face. Can we meet early next week?
@burlen - cool, and yes, I figured this might benefit from some verbal discussion. I'll follow up in e-mail for a time to meet next week.
solved in #285
@burlen - in looking at
teca_cf_writer.cxx
, it appears that there is not currently an easy way to add extra, non-spatial variables to the output. Do you agree?To be specific, here is the
ncdump -h
output of a netCDF file from #258, and below are the additional fields that I would want to add:Additional fields to add:
I think what prevents this right now is that the additional variables have a non-spatial dimension:
mcmc_sample_index
. (This dimension corresponds to the index of parameter values inteca_bayesian_ar_detect_parameters.cxx
.) The current cf_writer code creates only spatial dimensions, and it doesn't appear to have a generalizeable way to create new ones. Relatedly, it doesn't look like there is currently a way to add variables to thearrays
argument inteca_cf_writer_internals::write()
that have non-spatial dimensions.Do you have a recommendation for how we might approach this?
One thought that comes to mind is that we could add two new arguments to
teca_cf_writer_internals::write()
:extra_arrays
andextra_arrays_metadata
. Theextra_arrays_metadata
argument would contain the information necessary to create the non-spatial dimensions/variables.extra_arrays_metadata
would look something like this:What do you think @burlen?