Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UW-Glance
Manage
Activity
Members
Labels
Plan
Issues
28
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eva Schiffer
UW-Glance
Commits
873d7d59
Commit
873d7d59
authored
3 years ago
by
Eva Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
a vector plotting config file example
parent
a1710a47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/config-files/vectors.py
+46
-0
46 additions, 0 deletions
examples/config-files/vectors.py
with
46 additions
and
0 deletions
examples/config-files/vectors.py
0 → 100644
+
46
−
0
View file @
873d7d59
#!/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',
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment