Closed tomsail closed 6 months ago
Indeed this is bug. However, it's the other way around. We should replace
try:
stations["location"] = tgn.location.values
stations["provider_id"] = tgn.ioc_code.values
stations["provider"] = "ioc"
stations["longitude"] = tgn.longitude.values
stations["latitude"] = tgn.latitude.values
except:
pass
This is because the self.obs is saved in the end within the model.json
file. Saving therein thousands of lines of stations (in the global case) makes the file not readable. Saving only the filename of the station.json
works much better.
At some point this needs to be generalised. I don't like the hardcoded ioc
there.
I ran into this while implementing observation on TELEMAC:
self.obs
which should be a xr.Dataset is assigned a string hereThis leads into the assignation for obs to fail sistematically:
at line 1821
I would suggest simply to do :
self.obs = tg
instead ofself.obs = tg_database
or even better: to move this assignation a couple lines later and assign it to the normalised dataset here
self.obs = tg