Skip to Content.

mget-help - [mget-help] Error importing MGET toolbox in Python

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


[mget-help] Error importing MGET toolbox in Python


Chronological Thread 
  • From: Lesley Thorne <>
  • To:
  • Subject: [mget-help] Error importing MGET toolbox in Python
  • Date: Fri, 25 Sep 2015 11:13:57 -0400

Hi Jason, 

I hope everything is well with you. 

I am using MGET's Cayula-Cornillon fronts tool to look at Gulf Stream fronts relative to pilot whale habitat use over a 1 year period. It works well when I run it in ModelBuilder in Arc, but  when I run this via python code pasted into the python window in Arc, and I'm getting the error below when I try to import the MGET toolbox.

Any suggestions about this?

Many thanks,
Lesley


>>> # Load required toolboxes
... arcpy.ImportToolbox("C:/Program Files/GeoEco/ArcGISToolbox/Marine Geospatial Ecology Tools.tbx")
... 
Runtime error 
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 124, in ImportToolbox
    return import_toolbox(input_file, module_name)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox_code.py", line 443, in import_toolbox
    mymodule = generate_toolbox_module(toolbox, None, False, False, False, module_name, use_alt_alias)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox_code.py", line 418, in generate_toolbox_module
    'exec')
  File "C:\Program Files\GeoEco\ArcGISToolbox\Marine Geospatial Ecology Tools.tbx", line 35518
    """CoastWatchAVHRRCopyNavigationOffsets_GeoEco(sourceFile, sourceVariable, destFile, {destVariables;destVariables...})

        Copies the navigation offsets from one variable in a CoastWatch POES AVHRR CWF
        or HDF file to one or more variables in another file.The navigation offsets are
        the e and f coefficients of the navigation affine
        attribute of each variable (the HDF nav_affine attribute). Prior to setting the
        navigation offsets in the destination file, the entire navigation affine is
        reset by invoking the cwnavigate utility with the -R option.

     INPUTS:
      sourceFile (File):
          CoastWatch POES AVHRR CWF or HDF file containing the variable from which the
          navigation offsets should be copied.Only CoastWatch POES AVHRR files are
          supported. An error will be raised for
          other CoastWatch files, such as those for the GOES satellite series.
      sourceVariable (String):
          CoastWatch variable in the source file from which navigation offsets should be
          copied.
      destFile (File):
          CoastWatch POES AVHRR CWF or HDF file containing the variables to which the
          navigation offsets should be applied. This file can be the same as the source
          file.Only CoastWatch POES AVHRR files are supported. An error will be raised for
          other CoastWatch files, such as those for the GOES satellite series.
      destVariables {String}:
          CoastWatch variables in the destination file to which the navigation offsets
          should be applied. In general, navigation offsets should only be applied to
          variables that are derived from sensor data. At the time of this writing, the
          variables derived from sensor data included:avhrr_ch1 avhrr_ch2 avhrr_ch3
          avhrr_ch3a avhrr_ch4 avhrr_ch5 cloud cloudx sstPeter Hollemans, one of the lead
          CoastWatch researchers at NOAA, suggested that
          navigation offsets should not be applied to the graphics, rel_azimuth,
          sat_zenith, and sun_zenith variables. With respect to the last three, he
          said:"I've thought about it for a while and my inclination is to say don't
          correct
          the angle data. It's not a perfect solution -- ie: if we knew the satellite's
          position and orientation perfectly and recomputed the angle data, we would find
          very small discrepancies compared with the navigation-corrected version.""""
                                                                                                                         

                                                                                      
                                                                                       
                                                         
                                                                                       
                                                                                   
                                                                    

            
                        
                                                                                      
                                                                                  
                                                
                                                                              
                              
                                                                                        
                 
                      
                                                                                     
                                                                                       
                                                                                          
                                                                              
                             
                                                                                      
                                                                                     
                                                                                       
                                                                                   
                                                                                         
                                                        
                                                                                
                                                                                  
                                                                                    
                 
                                                                                       
                                                                                         
                                                                                      ^
SyntaxError: EOL while scanning string literal
____________________________________________________
Lesley Thorne, Assistant Professor
School of Marine and Atmospheric Sciences
Stony Brook University,  
Stony Brook, NY 11794-5000
631.632.5117



Archive powered by MHonArc 2.6.19.

Top of Page