Open andreustaylor opened 5 years ago
https://github.com/andreustaylor/rads/commit/aed44a5de398884c4c37c13b580d582c4f979504
method
attribute ambiguity with alias
correctionsFlaw in the method
attribute implementation on my fork.
When the correction is an alias (eg dac
) the method string cant identify exactly which flavor/s of the correction were actually accessed.
This is shame as the intention was to encode the exact corrections used in the output file.
In the process, created a variant attribute that records the corrections by rads3 field codes rather than long names. No difference for the ambiguity issue though.
Suspect this cant be resolved for the general case without going beyond simple netcdf attributes.
Latest fork version: https://github.com/andreustaylor/rads/commit/c6bca5c839186253d3420d8dcfa47100b51da3a6
dac
is an alias for list of possible correction sourcesmethod
attribute string is a comma-separated list that reflects the content of the rads.xml file<alias name="dac" field="10">inv_bar_mog2d_era inv_bar_mog2d inv_bar_mok2d</alias>
MOG2D dynamic atmospheric correction (ERA Interim forcing), MOG2D dynamic atmospheric correction, MOK2D inverse barometer correction
sla:method = "RPN=|CNES GDR-F, CNES GDR-E orbital altitude|Ku-band range corrected for instr. effects|SUB|ECMWF dry tropospheric correction|SUB|radiometer, ECMWF wet tropospheric correction|SUB|smoothed dual-frequency, JPL GIM, NIC09 ionospheric correction|SUB|solid earth tide|SUB|FES2014b ocean tide|SUB|FES2014a load tide|SUB|pole tide|SUB|Tran et al. 2012 non-parametric sea state bias|SUB|DTU15 mean sea surface height|SUB|reference frame offset|SUB|MOG2D dynamic atmospheric correction (ERA Interim forcing), MOG2D dynamic atmospheric correction, MOK2D inverse barometer correction|SUB" ;
sla:method_fields = "| 4: -1| 6: -1|SUB| 7: -1|SUB| 8: -1|SUB| 9: -1|SUB|1101: 11|SUB| 12: -1|SUB| 13: -1|SUB|1401: 14|SUB| 15: -1|SUB| 16: -1|SUB|3801: 38|SUB| 10: -1|SUB" ;
rads2nc: record SLA details
'sla' construction details are only in input xml, not output netcdf
It would be beneficial to include a summary of SLA calculation choices within each netcdf file.
complication
1) When using a hierarchy of xml inputs, how can we be confident exactly which fields were used?
ideas
(A) 'data' xml string as an an attribute
(B) field code summation string as an attribute
Add a summary of low level field codes used to netcdf attribute 'source' or a new attribute like 'rads_source_fields'.
(C) field codes and factors in two new variables
This is a solution we had in place using rads3 low level functions