l2gen MOD02/MYD02

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
cassandranormandin
Posts: 23
Joined: Mon Apr 24, 2017 4:08 pm America/New_York
Answers: 0

l2gen MOD02/MYD02

by cassandranormandin » Thu Jul 13, 2017 11:11 am America/New_York

I did exactly the same process than you and it doesn't work..

-rwxrwx--- 1 cnormandin cnormandin 163298009 juil.  7 14:02 MOD021KM.A2013191.1015.006.2014220154608.hdf
-rwxrwx--- 1 cnormandin cnormandin 162287634 juil.  7 14:03 MOD021KM.A2013223.1015.006.2014220123927.hdf
-rwxrwx--- 1 cnormandin cnormandin 161605822 juil.  7 14:20 MOD021KM.A2017170.1015.006.2017170192412.hdf
-rwxrwx--- 1 cnormandin cnormandin 149427178 juil. 12 11:33 MOD02HKM.A2013191.1015.006.2014220154608.hdf
-rwxrwx--- 1 cnormandin cnormandin 146854804 août   7  2014 MOD02HKM.A2013223.1015.006.2014220123927.hdf
-rwxrwx--- 1 cnormandin cnormandin 145904465 juin  19 09:27 MOD02HKM.A2017170.1015.006.2017170192412.hdf
-rwxrwx--- 1 cnormandin cnormandin 158485970 juin  27 11:41 MOD02QKM.A2013191.1015.006.2014220154608.hdf
-rwxrwx--- 1 cnormandin cnormandin 155126820 juin  28 14:34 MOD02QKM.A2013223.1015.006.2014220123927.hdf
-rwxrwx--- 1 cnormandin cnormandin 155513018 juin  29 10:44 MOD02QKM.A2017170.1015.006.2017170192412.hdf
-rwxrwx--- 1 cnormandin cnormandin  38113339 juil.  7 14:20 MOD03.A2013191.1015.006.2013191172659.hdf
-rwxrwx--- 1 cnormandin cnormandin  37832725 juil.  7 14:20 MOD03.A2013223.1015.006.2013223173229.hdf
-rwxrwx--- 1 cnormandin cnormandin  38051813 juil.  7 14:25 MOD03.A2017170.1015.006.2017170170944.hdf

~/Terra$ l2gen ifile=MOD021KM.A2017170.1015.006.2017170192412.hdf geofile=MOD03.A2017170.1015.006.2017170170944.hdf ofile=test.L2.nc resolution=250

Tags:

cassandranormandin
Posts: 23
Joined: Mon Apr 24, 2017 4:08 pm America/New_York
Answers: 0

l2gen MOD02/MYD02

by cassandranormandin » Thu Jul 13, 2017 11:17 am America/New_York

Ok gnwii, thank you for your message.
I've downloaded the new pyverchk3.py (and rename it) and delete the old.

This is what I get in the terminal:
cnormandin@Normandin-VirtualBox:~/seadas-7.4/ocssw/run/scripts$ pyverchk.py
Your default python interpreter is either too old or too new.
Do you have another python2 installation >= v2.6? (Y or N): Y
What is the full path to your python2 (v2.6 or greater)?: /home/cnormandin/anaconda3/bin/python
The following scripts have been modified to use /home/cnormandin/anaconda3/bin/python as the interpreter:
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_atteph.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/getanc.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/rewrite_seadas_config.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/ProcessParFile.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_L1A_extract.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/mk_matchup.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/ProcessWrapper.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_geocheck.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/next_level_name.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/getanc_aquarius.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_L1B.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/l1mapgen.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/l2mapgen.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/ProcessHandler.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_GEO.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/install_ocssw.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/fd_matchup.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/multilevel_processor.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/get_obpg_file_type.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/getobpgsubscription.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/modis_L1A.py
   /home/cnormandin/seadas-7.4/ocssw/run/scripts/update_luts.py

What I have to do after this?

Thank you very much,
Cassandra

cassandranormandin
Posts: 23
Joined: Mon Apr 24, 2017 4:08 pm America/New_York
Answers: 0

l2gen MOD02/MYD02

by cassandranormandin » Tue Jul 18, 2017 3:35 am America/New_York

Hello,

When I try to run update_luts.py (as in your example on the forum (https://oceancolor.gsfc.nasa.gov/forum/oceancolor/forum_search.pl?words=pyverchk3&user=&board=0&field=body&min=&max=&order=desc), it doesn't work. However, I've done all the steps writen on the post.

/seadas-7.4/ocssw/run/scripts$ update_luts.py --verbose aqua
  File "/home/cnormandin/seadas-7.4/ocssw/run/scripts/update_luts.py", line 50
    print "Mission needs to be one of:"
                                      ^
SyntaxError: Missing parentheses in call to 'print'

Thank you,
Cassandra

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

l2gen MOD02/MYD02

by gnwiii » Tue Jul 18, 2017 6:54 am America/New_York

I think you have seen the "SyntaxError: Missing parentheses in call to 'print'" problem before.   It means a script intended for use with python2 has been
run with python3.   The pyverchk.py script was originally written to deal with different python2 versions.  It does this by editing the first line of
each Python script to replace "#! /usr/bin/env python" with a user supplied python2 path, e.g., something like "#! /home/seadas_user/anaconda2/bin/python".  The original pyverchk.py script doesn't work for users whose default python is python3 (e.g.,
because they installed anaconda3).  The pyverchk3.py script allows a python3 user to change the OCSSW python scripts to use python2.

When you ran  pyverchk3.py, you entered /home/cnormandin/anaconda3/bin/python.  This appears to be python3, not python2. 
Since you already have anaconda3, you can install python2 as an "environment" (see the Anaconda documentation), determine the path of
the python2 program, and run pyverchk3.py with this python2 path.  If you installed anaconda3 for use with seadas, you could just
remove anaconda3 and install anacaonda2.

cassandranormandin
Posts: 23
Joined: Mon Apr 24, 2017 4:08 pm America/New_York
Answers: 0

l2gen MOD02/MYD02

by cassandranormandin » Tue Jul 18, 2017 9:06 am America/New_York

Thank you gnwii for your answer again!
I've uninstalled anaconda 3 and seadas then I've installed seadas and anaconda2.
It works well on the command line and using the GUI.

Thank you!
Cassandra

jordan62
Posts: 1
Joined: Mon Nov 27, 2023 2:05 am America/New_York
Answers: 0

Re: l2gen MOD02/MYD02

by jordan62 » Mon Nov 27, 2023 2:10 am America/New_York

"Grateful for your response!
Last edited by jordan62 on Mon Nov 27, 2023 2:10 am America/New_York, edited 1 time in total.

Post Reply