Skip to content
Snippets Groups Projects
Commit 5d05e429 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent d17c466f
Branches
No related tags found
No related merge requests found
......@@ -65,11 +65,11 @@ def process_cld_prob(grd_k):
def process_cld_opd(grd_k):
keep = np.invert(np.isnan(grd_k))
num_keep = np.sum(keep)
# keep_cld = np.where(keep, np.logical_and(0.1 < grd_k, grd_k < 158.0), False)
keep_cld = np.where(keep, 2.0 < grd_k, False)
keep_cld = np.where(keep, np.logical_and(0.1 < grd_k, grd_k < 158.0), False)
# keep_cld = np.where(keep, 2.0 < grd_k, False)
frac_cld = np.sum(keep_cld)/num_keep
# if not (0.20 < frac_cld < 0.80):
if not (0.40 < frac_cld):
# if not (0.40 < frac_cld):
if not (0.25 < frac_cld):
return None
grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaN to 0
return grd_k
......@@ -79,7 +79,8 @@ def run_all(directory, out_directory, day_night='ANY', pattern='clavrx_*.nc', st
cnt = start
total_num_train_samples = 0
total_num_valid_samples = 0
num_keep_x_tiles = 4
# num_keep_x_tiles = 4
num_keep_x_tiles = 2
# path = directory + '**' + '/' + pattern
path = directory + '*_v3/2020/' + '**' + '/' + pattern
......@@ -112,7 +113,8 @@ def run_all(directory, out_directory, day_night='ANY', pattern='clavrx_*.nc', st
try:
num_not_missing, num_snow_covered = \
run(h5f, params_m, data_tiles_m, params_i, data_tiles_i,
num_keep_x_tiles=num_keep_x_tiles, tile_width=16, kernel_size=4, factor=4,
# num_keep_x_tiles=num_keep_x_tiles, tile_width=16, kernel_size=4, factor=4,
num_keep_x_tiles=num_keep_x_tiles, tile_width=64, kernel_size=7, factor=2,
day_night=day_night, is_snow_covered=is_snow_covered)
except Exception as e:
print(e)
......@@ -181,7 +183,8 @@ def run_all(directory, out_directory, day_night='ANY', pattern='clavrx_*.nc', st
try:
num_not_missing, num_snow_covered = \
run(h5f, params_m, data_tiles_m, params_i, data_tiles_i,
num_keep_x_tiles=num_keep_x_tiles, tile_width=16, kernel_size=4, factor=4,
# num_keep_x_tiles=num_keep_x_tiles, tile_width=16, kernel_size=4, factor=4,
num_keep_x_tiles=num_keep_x_tiles, tile_width=64, kernel_size=7, factor=2,
day_night=day_night, is_snow_covered=is_snow_covered)
except Exception as e:
print(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment