Problem with modis_L1A.py downloaded on February 17, 2020

Please enter here to ask a question about any NASA Science related topics!
Post Reply
smasse
Posts: 13
Joined: Wed Dec 05, 2018 3:58 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by smasse » Wed Feb 19, 2020 11:01 pm America/New_York

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?

Tags:

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1168
Joined: Wed Sep 18, 2019 6:15 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by OB.DAAC - SeanBailey » Thu Feb 20, 2020 8:18 am America/New_York

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

smasse
Posts: 13
Joined: Wed Dec 05, 2018 3:58 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by smasse » Thu Feb 20, 2020 6:14 pm America/New_York

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?

gnwiii
Posts: 605
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

Problem with modis_L1A.py downloaded on February 17, 2020

by gnwiii » Thu Feb 20, 2020 8:09 pm America/New_York

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.

gfireman
Posts: 59
Joined: Thu Jan 07, 2010 2:59 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by gfireman » Fri Feb 21, 2020 2:11 pm America/New_York

You should include the partial minute in the pcf.

smasse
Posts: 13
Joined: Wed Dec 05, 2018 3:58 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by smasse » Fri Feb 21, 2020 5:24 pm America/New_York

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.

smasse
Posts: 13
Joined: Wed Dec 05, 2018 3:58 pm America/New_York

Problem with modis_L1A.py downloaded on February 17, 2020

by smasse » Fri Feb 21, 2020 5:25 pm America/New_York

I read the code to fast. granmin does contain the partial minute.
Thanks for the quick help.

Post Reply