glamod/glamod-nuim

issues with daily cdm conversion for august release

Closed this issue · 2 comments

A couple of minor issues with the code and the ancillary files.
1)The code is creating triplicate timestamps for the same observation.
AGE00147708-3-1879-01-07--44-13|3|1879-01-07 00:00:00+00|1|36.72|4.05|1|44|710|20.0|13|13||1|AGE00147708|TIZI OUZOU|0|1|229
AGE00147708-2-1879-01-07--44-13|3|1879-01-07 00:00:00+00|1|36.72|4.05|1|44|710|20.0|13|13||1|AGE00147708|TIZI OUZOU|0|1|229
AGE00147708-1-1879-01-07--44-13|3|1879-01-07 00:00:00+00|1|36.72|4.05|1|44|710|20.0|13|13||1|AGE00147708|TIZI OUZOU|0|1|229
It's because of source 229 is mingled several times within one station , (ECA&D ) is the source so you in the record_id file you will have:
AG000060590-229-1
AG000060590-229-2
AG000060590-229-3
I have edited the record_id.csv now so that it maps to only one record _id for all stations with source 229.

  1. Line 271 of the daily_to_cdm_obs_table_v1.py has an extra +"-" which needs to be removed
    original: df["observation_id"] = df["observation_id"] +"-" + df['observed_variable'] + '-' + df['value_significance']
    should be: df["observation_id"] = df["observation_id"] + df['observed_variable'] + '-' + df['value_significance']

  2. Line 211 of the daily_to_cdm_lite_v1.py has an extra +"-" which needs to be removed
    original: df["observation_id"] = df["observation_id"] +"-" + df['observed_variable'] + '-' + df['value_significance']
    should be: df["observation_id"] = df["observation_id"] + df['observed_variable'] + '-' + df['value_significance']

rjhd2 commented

Note - will need to ensure local changes to record_id.csv are transferred to JASMIN

A new record_id.csv has ben upload to JASMIN with the neccassary edits