Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static_layers_folder = os.path.join(testdata_folder,
'sat/h_saf/static_layer')
# init the ASCAT SSM reader with the paths
ascat_SSM_reader = ascat.AscatSsmCdr(ascat_data_folder, ascat_grid_folder,
grid_filename='TUW_WARP5_grid_info_2_1.nc',
static_layer_path=static_layers_folder)
ascat_SSM_reader.read_bulk = True
# set path to ISMN data
ismn_data_folder = os.path.join(testdata_folder,
'ismn/multinetwork/header_values')
# Initialize reader
ISMN_reader = ismn.ISMN_Interface(ismn_data_folder)
i = 0
label_ascat = 'sm'
label_insitu = 'insitu_sm'
# this loops through all stations that measure soil moisture
for station in ISMN_reader.stations_that_measure('soil moisture'):
# this loops through all time series of this station that measure soil moisture
# between 0 and 0.1 meters
for ISMN_time_series in station.data_for_variable('soil moisture', min_depth=0, max_depth=0.1):
ascat_time_series = ascat_SSM_reader.read(ISMN_time_series.longitude,
ISMN_time_series.latitude,