Presentation is loading. Please wait.

Presentation is loading. Please wait.

GFESuite Configuration Mark Mathewson. Sept. 24-27, 2002GFESuite Configuration2 Topics Documentation Directory Structure Base/Site Configuration Base/Site/User.

Similar presentations


Presentation on theme: "GFESuite Configuration Mark Mathewson. Sept. 24-27, 2002GFESuite Configuration2 Topics Documentation Directory Structure Base/Site Configuration Base/Site/User."— Presentation transcript:

1 GFESuite Configuration Mark Mathewson

2 Sept , 2002GFESuite Configuration2 Topics Documentation Directory Structure Base/Site Configuration Base/Site/User configuration Problem Solving Misc. Items

3 Sept , 2002GFESuite Configuration3 Documentation

4 Sept , 2002GFESuite Configuration4 Where is it? GFE HELP menu FSL AWIPS doc web site Many other regional/national web sites contain information listservers another source ndfd_team, ifpsrppinfo, ifps

5 Sept , 2002GFESuite Configuration5 What is available? User Training Guides Reference Manuals Configuration Guides Product Generation Guides README file

6 Sept , 2002GFESuite Configuration6 How good is it? Issues: Little indexing available…. High priority for accurate info. Lower priority for indexing than s/w enhancements Generally fairly accurate – especially the configuration guides Spend a few minutes with it – it will save you time.

7 Sept , 2002GFESuite Configuration7 Directory Structures

8 Sept , 2002GFESuite Configuration8Top-Level Server configuration documentation examples Run scripts

9 Sept , 2002GFESuite Configuration9 databases Structure KEEP OUT!

10 Sept , 2002GFESuite Configuration10 databases Structure

11 Sept , 2002GFESuite Configuration11 Database grids Structure

12 Sept , 2002GFESuite Configuration12 GFE files on HPUX

13 Sept , 2002GFESuite Configuration13 Directory Tips Do not modify ANY files in etc/BASE Use etc/SITE instead Do not modify ANY files under data/databases These are controlled by the ifpServer README file contains list of directories that will be “purged” during installation

14 Sept , 2002GFESuite Configuration14 BASE/SITE Concepts ifpServer Configurability

15 Sept , 2002GFESuite Configuration15 Base/Site concept Applies to /etc/BASE, /etc/SITE Used to preserve YOUR changes from upgrade to upgrade. BASE fileSITE filePurpose serverConfig.pylocalConfig.pyGeneral server overrides serverConfig.pylocalWxConfig.pyWx configuration override Maps.py, MapFiles.py localMaps.py, localMapFiles.py Map background override dfcConfig.pylocalDfcConfig.pyDaily Forecast Critique override MapFiles – new in IFPS12

16 Sept , 2002GFESuite Configuration16 Base/Site concept Use favorite text editor to change files. Normally have to restart ifpServer after changing files. Use runIFPServer –n to check for errors. If server doesn’t come up, check for errors. Look through log files.

17 Sept , 2002GFESuite Configuration17 Base/Site concept Configuration files are Python- executable code Very particular to syntax. Local (e.g., SITE) overrides using Python importing Can be tricky

18 Sept , 2002GFESuite Configuration18 Server Configuration Overrides serverConfig.py Maps.py localConfig.py Maps.py SITEBASE Python Path: SITE, then BASE Copied Then modified import Partial overrides Complete Override (don’t do)

19 Sept , 2002GFESuite Configuration19 Python “dual” Importing serverConfig TC6NG = (0*HOUR,6*HOUR,6*HOUR) DFC_UPDATE_INTERVAL = 15 Dbs = DBS + localConfig.parms Eta = (ETA, TC6NG) import localConfig localConfig serverConfig.TC6NG = (1*HOUR,…) TC6NG = … parms = [([MaxT], TC6NG)] parms = [([QPF], TC6NG)] DFC_UPDATE_INTERVAL = 10 import serverConfig from serverConfig import *

20 Sept , 2002GFESuite Configuration20 Python “dual” Importing serverConfig DFC_UPDATE_INTERVAL = 15 import localConfig localConfig DFC_UPDATE_INTERVAL = 10 import serverConfig from serverConfig import * Result? DFC_UPDATE_INTERVAL = ??? start

21 Sept , 2002GFESuite Configuration21 Python “dual” Importing import serverConfig Allows you to access variables/methods from the module you import, via: serverConfig.varName from serverConfig import * Makes a copy of the variables, you can access the copies of these variables directly, via: varName, but these are COPIES. If you change them, the originals aren’t changed. Exceptions: dictionaries, arrays Don’t require serverConfig. in front of variable.

22 Sept , 2002GFESuite Configuration22 Python “dual” Importing serverConfig TC6NG = (0,6,6) MaxT = (“MaxT”, SCALAR, "F", …) Dbs = DBS + localConfig.parms MaxT_PG = (MaxT, TC6NG) import localConfig localConfig serverConfig.TC6NG = (1,6,6) TC6NG = (2,6,6) parms = [([MaxT], TC6NG)] parms = [([QPF], TC6NG)] import serverConfig from serverConfig import * What is TC6NG at this point? What is the TC for MaxT at this point? Two parm lines

23 Sept , 2002GFESuite Configuration23 Base/Site concept GOTCHA – Python files.py.pyc.pyo If you delete the.py file, such as localConfig.py, you may still have *pyc or *pyo files. The system will use those and will behave as if you never deleted the.py file.

24 Sept , 2002GFESuite Configuration24 localConfig capabilities Adding new weather elements Adding new models Changing characteristics (# of versions) Changing time constraints for elements Changing domain/resolution

25 Sept , 2002GFESuite Configuration25 localMaps/localMapFiles Overrides Maps.py and MapFiles.py Add new maps Remove existing maps Modify characteristics of maps Filters Automatic edit areas MapFiles/localMapFiles (new IFPS12) Defines the names of the shapefiles

26 Sept , 2002GFESuite Configuration26 Changing map backgrounds – filtering Can filter by shapefile attributes. Make a new map just for ifpIMAGE generation. CWAzones.filter(lambda x : x['CWA'] == CWA) def cwaZoneFilt(x): return x['CWA'] == CWA CWAzones.filter(cwaZoneFilt) Shapefile Attribute Identical Filter

27 Sept , 2002GFESuite Configuration27 Changing map backgrounds - filtering def exampleFilt(x): myCounties = ['Summit', 'Sandusky', 'Huron', 'Medina'] return x['COUNTYNAME'] in myCounties and \ x['STATE'] == "OH" and x['CWA'] = 'CLE' excludedCities = [‘Clinton’, ‘Pearl’, ‘Brandon’] cities.filter(lambda x,y=excludedCities: x[‘POP_1990’] > \ and x[‘NAME’] not in y Note:

28 Sept , 2002GFESuite Configuration28 Updating Map Shapefiles Download new shapefiles from NWSH gzip each component: *.dbf, *.shp, *.shx Place into /awips/GFESuite/data/maps If the name changed, add/edit localMapFiles.py [IFPS12] to point to the new file Caution: shapefiles replaced during upgrade

29 Sept , 2002GFESuite Configuration29 localWxConfig Similar to localConfig, except for the Weather Definition Uses: Adding additional attributes Adding additional weather types Adding additional coverage/prob, intensities May make incompatible grids with other NWS offices.

30 Sept , 2002GFESuite Configuration30 Tips (and Rules) DON’T edit files in etc/BASE They are wiped clean each upgrade Check your changes immediately: runIFPServer –n (even with server running) Some changes may not be compatible with IFPS Time constraints, domains/resolution

31 Sept , 2002GFESuite Configuration31 BASE/SITE/USER Concepts GFE / ifpIMAGE Configurability

32 Sept , 2002GFESuite Configuration32 Base/Site/User concept Applies to: gfe and ifpIMAGE configuration files Sample sets, edit areas Color tables Smart Tools/Procedures User-defined time ranges Weather Element Groups

33 Sept , 2002GFESuite Configuration33 Tips (and Rules) Just like etc/BASE, do not edit files in data/databases/BASE since they are wiped clean during the next upgrade. Do not edit files directly in the databases directory. Some files require associated metadata files that can’t be created with a text editor Changing files can confuse the ifpServer and GFEs if they are running at the time. Use the GFE to edit files, OR use the ifpServerText program.

34 Sept , 2002GFESuite Configuration34 “Special” Users SITE – site administrator login. Files in this category are seen by all users. BASE – brings up GFE using BASE configuration only --- as supplied by FSL. Good way to verify a problem is a local configuration problem. “BASE” and “SITE” will not appear in the GFE startup dialog.

35 Sept , 2002GFESuite Configuration35 Python Errors…GFE is hung! FSL Not any more…. Starting GFE with a bad configuration file will cause a dialog to popup showing you the error location.

36 Sept , 2002GFESuite Configuration36 Why Can’t I find my config files Are your config files lost? Perhaps you created them under a different user? Use ifpServerStats to help you find them. ifpIMAGE uses the user SITE for execution – you need to create files in correct place.

37 Sept , 2002GFESuite Configuration37 I changed my config file, but the change isn’t working… gfeConfig BASE 3. Later, log onto awipsusr, the BOUsiteConfig “seen” doesn’t have the latest changes. BOUsiteConfig awipsusr (or other user) 1. User awipsusr creates BOUsiteConfig, to test out the new configuration. BOUsiteConfig SITE 2. Later, the same user logs onto user SITE and copies the awipsusr BOUsiteConfig using ifpServerText. Makes another change to it. import

38 Sept , 2002GFESuite Configuration38 The “READ-ONLY” flag Setting the Read-Only flag on the various configuration files will stop the user from overriding them. No GFE GUI to set the read-only flag. Must do it directly on the file system. chmod 444 filename Fully implemented with IFPS12

39 Sept , 2002GFESuite Configuration39 Some sites have… Made copies of files in BASE and placed them in SITE Copied lots of files from SITE to “user” This practice is NOT recommended. You might get different behavior based on login name. BASESITEuser gfeConfig 50 tools copied

40 Sept , 2002GFESuite Configuration40 Concepts to understand Python files (gfeConfig) Can use Python importer for partial overrides Non-Python files (sample sets) Must use complete overrides, no importer capability

41 Sept , 2002GFESuite Configuration41 Order of Precedence ERROR no SITE File Exists? yes no Return SITE File BASE File Exists? no yes Return BASE File USER File Exists? Request File yes Return USER File

42 Sept , 2002GFESuite Configuration42 Retrieval of Color Table Example QPF Color Table BASE QPF Color Table SITE QPF Color Table USER XX

43 Sept , 2002GFESuite Configuration43 Some files are Python You can use the Python “import” mechanism and you should. Advantage: You can override small pieces of files. You don’t need to redefine everything Examples: Smart Tools, gfe/ifpIMAGE configuration files

44 Sept , 2002GFESuite Configuration44 Python importing A BC import B code code code import A code code code

45 Sept , 2002GFESuite Configuration45 Python importing CC import C code code code X Can’t import from “yourself”, even if at different BASE/SITE/USER levels

46 Sept , 2002GFESuite Configuration46 Python-file Retrieval

47 Sept , 2002GFESuite Configuration47 GFE Config file example … T_defaultColorTable=‘midRange’ ImageOnActive=yes … USER (joeConfig) import gfeConfig T_defaultColorTable=‘lowRange’ … SITE (siteGfeConfig) Site could also have redefined the color table import siteGfeConfig T_defaultColorTable=‘myOwn’ ImageOnActive=no Contour_font=3 T_spatialImageType = [‘Image’, ‘Contour’] … User could also have imported directly from the base. BASE (gfeConfig)

48 Sept , 2002GFESuite Configuration48 Tips Software doesn’t seem to be working. Start GFE as user “BASE”, config “gfeConfig” Run ifpServerStats and look at your environment. Move files around if needed using moveGFEData.

49 Sept , 2002GFESuite Configuration49 Misc. Topics

50 Sept , 2002GFESuite Configuration50 Installs/Upgrades SITE and USER directories not touched by installs. BASE files overwritten. Recommend you do partial overrides, not complete files copies in order to ensure operability of software and to catch latest changes in the upgrade. Watch out for directories that are overwritten! README file.

51 Sept , 2002GFESuite Configuration51 Product Generation Site/base/user concept applies to all programs using the server. By Default, many product generation programs become user “SITE”. Prevents user overrides from affecting site’s products Can start programs with specific user switch (-u username).

52 Sept , 2002GFESuite Configuration52 Watch your localConfig configuration changes…. Some changes may “drop” your database. Changing domains, resolutions, data type Some changes only “drop” a single weather element. Changing the Weather definition Some changes may shift around the grids in time. Changing time constraints

53 Sept , 2002GFESuite Configuration53 Problems…and how to diagnose them Each program uses logfiles. Located in /awips/GFESuite/data/logfiles Search logfiles for “PROBLEM”, “BUG” Many problems can be diagnosed simply by examining the logfiles. But some entries in logfiles are cryptic to forecasters.


Download ppt "GFESuite Configuration Mark Mathewson. Sept. 24-27, 2002GFESuite Configuration2 Topics Documentation Directory Structure Base/Site Configuration Base/Site/User."

Similar presentations


Ads by Google