#!/usr/bin/env python # encoding: utf-8 """ This configuration describes the mapping between the cloud and ozone product variable names in GEOCAT and the AIT Framework. Created by Eva Schiffer August 2009. Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. """ import numpy as np import glance.filters as filters import numpy as np import glance.filters as filters # various general settings to control how reports are created settings = {} # whether or not images should be generated and shown in the report settings['shouldIncludeImages'] = True # should we create multiple processes to make more than one image at a time? # turning on this option can cause glance to use a very large amount of system # resources (if your data set is particularly large, your machine may not have # enough), but will speed up image generation in cases where your data set is # relatively small or your machine is very powerful settings['doFork'] = False # the names of the latitude and longitude variables lat_lon_info = {} lat_lon_info['longitude'] = 'pixel_longitude' lat_lon_info['latitude'] = 'pixel_latitude' # If the latitude and longitude are more different than this, we need to be # warned that there is something bad going on lat_lon_info['lon_lat_epsilon'] = 0.1 # per variable defaults defaultValues = { # this default is for our variables, type variables # like cloud mask will have individual epsilons # definied in their entries below 'epsilon': 0.0, # the value to be interpreted as "missing" data 'missing_value': -128., # we will accept up to .01% of difference between the files # before we start looking more carefully at the problem 'epsilon_failure_tolerance': 0.0001, # we will not accept any non finite data difference between the files 'nonfinite_data_tolerance': 0.0001, # we only need to see plots of the variable data if the # variable fails comparison 'only_plot_on_fail': False } # a list of all the variables to analyze setOfVariables = {} # general variables #setOfVariables['Latitude'] = { # 'variable_name': 'pixel_latitude', # } #setOfVariables['Longitude'] = { # 'variable_name': 'pixel_longitude', # } #setOfVariables['Ref 2'] = { # 'variable_name': 'channel_2_reflectance', # } setOfVariables['Total Cloud Fraction'] = { 'variable_name': 'cloud_fraction', 'alternate_name_in_B': 'Total_Cloud_Fraction', 'missing_value_alt_in_b': -999., } setOfVariables['Cloud Height'] = { 'variable_name': 'cld_height_top_acha', 'alternate_name_in_B': 'CldTopHght', 'missing_value': -32768, 'missing_value_alt_in_b': -999., 'data_filter_function_a':(lambda data: filters.set_to_value_between_bounds(data, -32768, 0., 30000)), 'data_filter_function_b': (lambda data: filters.set_to_value_between_bounds(data, -999., 0., 30000)) } setOfVariables['Cloud Temperature'] = { 'variable_name': 'cld_temp_acha', 'alternate_name_in_B': 'CldTopTemp', 'missing_value': -32768, 'missing_value_alt_in_b': -999., 'data_filter_function_a':(lambda data: filters.set_to_value_between_bounds(data, -32768, 140., 360)), 'data_filter_function_b': (lambda data: filters.set_to_value_between_bounds(data, -999., 140., 360)) } setOfVariables['FL240_TOA Cloud fraction'] = { 'variable_name': 'cloud_fraction_fl', 'alternate_name_in_B': 'Layer_Frac', 'missing_value_alt_in_b': -999., 'data_filter_function_a':(lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 0)), # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) 'data_filter_function_b': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 0)) # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) } setOfVariables['FL180_FL240 Cloud fraction'] = { 'variable_name': 'cloud_fraction_fl', 'alternate_name_in_B': 'Layer_Frac', 'missing_value_alt_in_b': -999., 'data_filter_function_a': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 1)), 'data_filter_function_b': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 1)) # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) } setOfVariables['FL100_FL180 Cloud fraction'] = { 'variable_name': 'cloud_fraction_fl', 'alternate_name_in_B': 'Layer_Frac', 'missing_value_alt_in_b': -999., 'data_filter_function_a': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 2)), 'data_filter_function_b': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 2)) # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) } setOfVariables['FL050_FL100 Cloud fraction'] = { 'variable_name': 'cloud_fraction_fl', 'alternate_name_in_B': 'Layer_Frac', 'missing_value_alt_in_b': -999., 'data_filter_function_a': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 3)), 'data_filter_function_b': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 3)) # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) } setOfVariables['SFC_FL050 Cloud fraction'] = { 'variable_name': 'cloud_fraction_fl', 'alternate_name_in_B': 'Layer_Frac', 'missing_value_alt_in_b': -999., 'data_filter_function_a': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 4)), 'data_filter_function_b': (lambda data: filters.select_slice_from_3D_last( filters.rotate_indexes_right ( filters.rotate_indexes_right ( data)), 4)) # filters.set_to_value_between_bounds(data, -127., 0., 1.0))), 0)) }