Page 1 of 1

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Wed Feb 19, 2020 11:01 pm America/New_York
by smasse
I downloaded and installed SeaDAS 7.5 on February 17, 2020. While attempting to execute modis_L1A.py with the following command:

   /usr/local/seadas/7.5/run/scripts/modis_L1A.py /home/seadas/data/20200214172718.eam1/T20200214172718.gran.L0P.pkt.tmp \
                                                  --output=/home/seadas/data/20200214172718.eam1/T20200214172718.gran.L1A.hdf \
                                                  --mission=TERRA --startnudge=15 --stopnudge=15

I get the following error:

  Traceback (most recent call last):
     File "/usr/local/seadas/7.5/run/scripts/modis_L1A.py", line 62, in <module> m.l0()
     File "/usr/local/seadas/7.5_20200217/scripts/modules/modis_L1A_utils.py", line 250, in l0 \
                                   self.gransec = ProcUtils.diffsecs(self.start, self.stop, 't')
     File "/usr/local/seadas/7.5_20200217/scripts/modules/ProcUtils.py", line 209, in diffsecs
        return (t1-t0).total_seconds()
  AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'

Did I miss something with the download?

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Thu Feb 20, 2020 8:18 am America/New_York
by OB.DAAC - SeanBailey
Which version of python are you running?...The "total_seconds" object was added to the datetime.timedelta with python v2.7 - which is a minimum requirement for SeaDAS7.5 (seems we failed to update the requirements page - we'll fix that soon)

Sean

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Thu Feb 20, 2020 6:14 pm America/New_York
by smasse
I am running Python 2.6.6 on that particular machine. When I downloaded and installed the latest 7.5, install_osccw.py tells me my Python was OK.
Perhaps the script that checks the Python version check could be updated.

I  checked with Red Hat for a new Python version . Unfortunately, 2.6.6 is the only one available for RHEL 6.10. In order to proceed, I replaced the
diffsecs line in modis_L1A_utils.py with 'self.gransec = float(self.gransec) - self.startnudge - self.stopnudge'. It seems to work correctly because I
make sure that self.rounding is always False.

Which brings me to the next question. The line following diffsec computes the minutes of the granules which is used in the generated the PCF file.
Is it important that the minute variable does not include the partial minute, if any, of the granule? For example, a granule of 750 seconds is 10 /1/2 minute.
Should the minute by 11?

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Thu Feb 20, 2020 8:09 pm America/New_York
by gnwiii
RedHat may have newer versions of python in their Software Collections, see Using Native Python on RHEL6 or RHEL7: If you want a newer version of Python for either RHEL 6 or 7, use the updated versions available via Red Hat Software Collections.

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Fri Feb 21, 2020 2:11 pm America/New_York
by gfireman
You should include the partial minute in the pcf.

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Fri Feb 21, 2020 5:24 pm America/New_York
by smasse
Thanks for the information.  I am stuck using RHEL 6.10 "as is" until my customers upgrade to RHEL 7 which will be soon I hope!
I will keep this site in mind if the need arise for other applications.

Problem with modis_L1A.py downloaded on February 17, 2020

Posted: Fri Feb 21, 2020 5:25 pm America/New_York
by smasse
I read the code to fast. granmin does contain the partial minute.
Thanks for the quick help.