vergauwenthomas / MetObs_toolkit

A toolkit for using non-traditional meteorological observations
https://vergauwenthomas.github.io/MetObs_toolkit/
MIT License
12 stars 4 forks source link

Error when reading in single station #405

Open amberJ99 opened 9 months ago

amberJ99 commented 9 months ago

Bij het inlezen van data en metadata van een single station, komt de volgende error: SystemExit: Fatal: The given template: ['temp', 'name', 'lat', 'lon'] does not match with any of the metadata columns: ['Station', 'Latitude', 'Longitude'].

Gebruikte files: BAS_2016and2020_standard_1H.csv [template.csv](https://github.com/vergauwenthomas/MetObs_toolkit/files/13675708/template.csv) BAS_coordinates_original.csv

Code:

 #%% READ IN STATION WITH METADATA

    #1. Define the paths to your files: 

    data_file = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\BAS_2016and2020_standard_1H.csv"
    meta_data_file = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\BAS_coordinates.csv"
    template = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\template.csv"

    #2. initiate a dataset: 

    your_dataset = metobs_toolkit.Dataset()

    #3. Update the paths to your files: 

    your_dataset.update_settings(
        input_data_file = data_file,
        input_metadata_file = meta_data_file,
        template_file = template,
        )

    #4. Import your data : 

    your_dataset.import_data_from_file()
amberJ99 commented 8 months ago

The same error occurs when reading in a dataframe in wide format.

vergauwenthomas commented 8 months ago

@amberJ99 Tomorrow i have some time to take a look at these. Can you specify which version you are working on ?

print(metobs_toolkit.__version__)

amberJ99 commented 8 months ago

I'm working with version 0.1.2. Let me know if you need more explanation on the problem.