Skip to content
Snippets Groups Projects
Commit 1ab9cb25 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

better selection of default nav variables in the GUI

parent 5b0e3db4
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,8 @@ DATA_FORMS = [SIMPLE_2D,
ONLY_1D]
# the default names that the model will try to select for the latitude and longitude
DEFAULT_LONGITUDE = 'pixel_longitude'
DEFAULT_LATITUDE = 'pixel_latitude'
DEFAULT_LONGITUDES = ['pixel_longitude', 'longitude', 'Longitude',]
DEFAULT_LATITUDES = ['pixel_latitude', 'latitude', 'Latitude',]
# the number of bins to use for histograms
DEFAULT_NUM_BINS = 50
......
......@@ -242,10 +242,12 @@ class GlanceGUIModel (object) :
# set the longitude and latitude names, using the defaults if they exist
self.fileData[filePrefix].latitude = tempVariable
self.fileData[filePrefix].longitude = tempVariable
if DEFAULT_LATITUDE in variableList :
self.fileData[filePrefix].latitude = DEFAULT_LATITUDE
if DEFAULT_LONGITUDE in variableList :
self.fileData[filePrefix].longitude = DEFAULT_LONGITUDE
for temp_lat_name in DEFAULT_LATITUDES :
if temp_lat_name in variableList :
self.fileData[filePrefix].latitude = temp_lat_name
for temp_lon_name in DEFAULT_LONGITUDES :
if temp_lon_name in variableList :
self.fileData[filePrefix].longitude = temp_lon_name
# make sure the longitude and latitude are loaded into our local cache
# TODO, it would be good to background this task at some point
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment