Open danhamill opened 1 year ago
I am concerned because I don want the units to be converted twice.
The only place I can see where kcfs gets converted to cfs is:
units arent necessarily fully implemented it seems like we need to update the table if it is not currently tracked and modified on conversion.
so maybe this should be 'cfs'
since the units are converted parseData
You have raised two issues:
CREATE TABLE IF NOT EXISTS ensemble_timeseries
( id integer not null primary key,
location NVARCHAR(100),
parameter_name NVARCHAR(100),
units NVARCHAR(100),
data_type NVARCHAR(100),
version NVARCHAR(100),
catalog_id int references catalog(id)
);
Ensemble
takes a unit string in its constructorhttps://github.com/HydrologicEngineeringCenter/FIRO_TSEnsembles/blob/cdb29fd0b417a24eb1ae692d78d74c4209a5a437/FIRO_TSEnsembles/src/main/java/hec/ensemble/Ensemble.java#L24-L28
EnsembleTimeSeries
also takes a unit string in its constructorhttps://github.com/HydrologicEngineeringCenter/FIRO_TSEnsembles/blob/cdb29fd0b417a24eb1ae692d78d74c4209a5a437/FIRO_TSEnsembles/src/main/java/hec/ensemble/EnsembleTimeSeries.java#L37-L40
The schema for the ensemble table does not have a unit string
https://github.com/HydrologicEngineeringCenter/FIRO_TSEnsembles/blob/cdb29fd0b417a24eb1ae692d78d74c4209a5a437/FIRO_TSEnsembles/src/main/resources/database.sql#L64-L75
If read an ensemble from an existing database and add it to a new ensemble time series and write to a database:
I initially set
selectedEnsemble
units to cfs because.getValues()
on the original ensemblee
returns in units of cfs.When I go to read the ensemble from
tempDb
and callgetUnits
I am seeing kcfs units