import network_parsers
from crossnetwork_processing_functions import get_data_files

filename = '/gpfs/projects/bsc32/AC_cache/obs/ghost/EBAS/original_files/1.5.1/precip/SO4--/SI0008R.20100101070000.20150127080735.wet_only_sampler.sulphate_total.precip.1y.1d.SI01L_wados_08.SI01L_IC_a.lev2.nas'
run_details = {'parameter': 'SO4--_PREC'} #, 'data_root':'/gpfs/projects/bsc32/AC_cache/obs/ghost/', 'network': 'WMO_WDCPC', 'ghost_version': '1.5.1', 'end_year': '1990', 'end_month': '1', 'end_year': '2024', 'end_month': '1'}
parameter_details = {'matrix': 'precip'}

# filename = '/gpfs/projects/bsc32/AC_cache/obs/ghost/WMO_WDCPC/original_files/1.6/SDZ_20091030_20100921.csv'
# run_details = {'parameter': 'Ca++_PREC', 'data_root':'/gpfs/projects/bsc32/AC_cache/obs/ghost/', 'network': 'WMO_WDCPC', 'ghost_version': '1.5.1', 'end_year': '1990', 'end_month': '1', 'end_year': '2024', 'end_month': '1'}
# parameter_details = {}

parser = network_parsers.ParseNASAAmesFile(filename,'UA0007R', run_details)
parser.read_header()
data = parser.read_data()
print(data)