TUW-GEO / ismn

Readers for the data from the International Soil Moisture Network
https://ismn.earth/en/
MIT License
32 stars 21 forks source link

how to read the cosmos, fr_aqui and sosmania data? #25

Closed xushanthu-2014 closed 4 years ago

xushanthu-2014 commented 4 years ago

Hi thanks for your help! And I downloaded the data within southeastern France which contains sites from cosmos, fr_aqui and sosmania. They are all contained in the ismn dataset. When I tried the data listed in your demo (https://pytesmo.readthedocs.io/en/latest/examples.html#examples-page), I can successfully read the data under the directory of 'SOSMANIA', but not of 'FR_Aqui' or 'COSMOS'. So how can I do that?

here is the directory of my data downloaded from https://www.geo.tuwien.ac.at/insitu/data_viewer/?user_id=7565&session=2mj3vrhpg1ho06zj3lfizaz1lkobexhd# (ceop format):

Data_seperate_files_19960101_20191231_7565_Qqnl_20200622 xushan$ pwd /Users/xushan/research/TUD/surfex/southfr/Data_seperate_files_19960101_20191231_7565_Qqnl_20200622 Data_seperate_files_19960101_20191231_7565_Qqnl_20200622 xushan$ ls COSMOS Readme.txt FR_Aqui SMOSMANIA ISMN_qualityflags_description.txt python_metadata Metadata.xml

my code is: import os import pytesmo.validation_framework.metric_calculators as metrics_calculators from ascat import AscatSsmCdr

from pytesmo.io.ismn.interface import ISMN_Interface

from ismn.interface import ISMN_Interface from pytesmo.validation_framework.validation import Validation from pytesmo.validation_framework.results_manager import netcdf_results_manager testdata_folder = '/Users/xushan/research/TUD/surfex/southfr/Data_seperate_files_19960101_20191231_7565_Qqnl_20200622/'

testdata_folder = '/Users/xushan/research/TUD/surfex/southfr/pytesmo-test-data-master/'

output_folder = '/pytesmo/code/examples/output'

ismn_data_folder = testdata_folder#os.path.join(testdata_folder,'COSMOS/Toulouse')

ismn_reader = ISMN_Interface(ismn_data_folder)

jobs = []

ids = ismn_reader.get_dataset_ids(variable='soil moisture', min_depth=0, max_depth=0.1) for idx in ids: metadata = ismn_reader.metadata[idx] jobs.append((idx, metadata['longitude'], metadata['latitude'], metadata[1])) print((idx, metadata['longitude'], metadata['latitude'], metadata[1]))

thanks and hope for your early reply!

sebhahn commented 4 years ago

Do you have a traceback/error or is the data just not read?

xushanthu-2014 commented 4 years ago

Do you have a traceback/error or is the data just not read?

thanks for your reply! There is no error, just the data is not read...the station in directory 'COSMOS' is Toulouse, but it is not among the output list...

daberer commented 4 years ago

Dear xushanthu-2014,

for me your code is working fine. You are correct that Toulouse does not appear in the output list.

This is because the depth of station Toulouse is 0 - 0.2 and you are only searching for ids from min_depth=0 to max_depth=0.1. If you set max_depth to 0.2 it should work.

ids = ismn_reader.get_dataset_ids(variable='soil moisture', min_depth=0, max_depth=0.2)

hope this helps, Daniel

xushanthu-2014 commented 4 years ago

Dear xushanthu-2014,

for me your code is working fine. You are correct that Toulouse does not appear in the output list.

This is because the depth of station Toulouse is 0 - 0.2 and you are only searching for ids from min_depth=0 to max_depth=0.1. If you set max_depth to 0.2 it should work.

ids = ismn_reader.get_dataset_ids(variable='soil moisture', min_depth=0, max_depth=0.2)

hope this helps, Daniel

thanks a lot!