diff --git a/examples/config-files/vectors.py b/examples/config-files/vectors.py new file mode 100644 index 0000000000000000000000000000000000000000..a4d816bd222d532a4e6293c7401630742f26d680 --- /dev/null +++ b/examples/config-files/vectors.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# encoding: utf-8 +""" +An example config file for plotting winds vectors using vector plots. + +Created by Eva Schiffer July 2021. +Copyright (c) 2021 University of Wisconsin SSEC. All rights reserved. +""" + +# you will need to import the glance.constants to get the standard names +import glance.constants as constants + +# various general settings to control how reports are created +settings = {} +# whether or not images should be generated and shown in the report +settings[constants.DO_MAKE_IMAGES_KEY] = True +settings[constants.USE_SHARED_ORIG_RANGE_KEY] = True + +# the names of the latitude and longitude variables that will be used +lat_lon_info = {} +lat_lon_info[constants.LONGITUDE_NAME_KEY] = 'lon'# the name of the longitude variable +lat_lon_info [constants.LATITUDE_NAME_KEY] = 'lat' # the name of the latitude variable +# how similar the longitude and latitude must be to be considered matching +lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001 + +# per variable defaults +# note: if all your plots are vector plots you can define your magnitude and direction here instead +defaultValues = { } + +# a list of all the variables to analyze +setOfVariables = { } + +setOfVariables['Wind Vectors, colored by Air Pressure'] = { + + # when making vector plots, the arrows will be colored using the data you're nominally comparing + constants.VARIABLE_TECH_NAME_KEY: 'pressure', + + constants.MAGNITUDE_VAR_NAME_KEY: 'wind_speed', + constants.DIRECTION_VAR_NAME_KEY: 'wind_direction', + + # if the magnitude and direction have a different name in the second file, use these + # Note: if you are using Glance 0.5.0 or earlier you must define all four of these for + # a comparison report, even if the B File has the same variable names as the A file. + #constants.MAGNITUDE_B_VAR_NAME_KEY: 'speed', + #constants.DIRECTION_B_VAR_NAME_KEY: 'direction', + }