Upgrading issues with seadas

Please enter here to ask a question about any NASA Science related topics!
woodbri
Posts: 52
Joined: Thu Jun 04, 2015 10:50 am America/New_York

Upgrading issues with seadas

by woodbri » Wed Aug 28, 2019 5:25 pm America/New_York

Hello all,

A few years ago, I setup a process for converting Modis-A L0 files into GeoTiff rasters and everything has worked fine until 8-21-2019 when it broke.

I surmise that this was because I need to update the software to from 7.4 to 7.5. So I moved the old software aside, and install it new with:

#!/bin/sh

mkdir -p /u/oceandata
cd /u/oceandata

wget -N https://oceandata.sci.gsfc.nasa.gov/ocssw/install_ocssw.py
chmod +x install_ocssw.py

./install_ocssw.py -v --install-dir=/u/oceandata  --git-branch=v7.5 --arch=linux_64 --aqua --avhrr --terra --viirsn --viirsj1 --viirsdem --src

# old install was like this
#./install_ocssw.py -v -i /u/oceandata -g https://oceandata.sci.gsfc.nasa.gov/ocssw/ -b v7.4 -a linux_64 --aqua --src

my processing script is pretty simple
   * downloads in L0 shots
   * calls process-seadas
   * does some postprocessing

ISSUES:

1. my old script depended on a process-seadas which does not appear to be available anymore. Should this work with the 7.5 software? Is there an equivalent script that I can use?

2. running the scripts fails with:

# ./process-nasa-aqua.sh
## composites=
## contoursonly=
days_ago: 0
jdate: 240
date: 20190828
days_since_jan_1_2015: 1700
ocssw_day: 18136
Looking for swatches in north east coast AOI ...
Looking for swatches in south east coast AOI ...
Looking for swatches in gulf of mexico and western carribean AOI ...
--------------------------------------
$TODO = {
          'A2019240165000.L0_LAC' => 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019240165000.L0_LAC.bz2',
          'A2019240165500.L0_LAC' => 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019240165500.L0_LAC.bz2',
          'A2019240182500.L0_LAC' => 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019240182500.L0_LAC.bz2',
          'A2019240183000.L0_LAC' => 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019240183000.L0_LAC.bz2'
        };
## wget -q 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019240165000.L0_LAC.bz2'
## /u/oceancolor-bin/process-seadas A2019240165000.L0_LAC
Wed Aug 28 16:26:07 EDT 2019
infile: A2019240165000.L0_LAC
infile2: A2019240165000.L0_LAC
outfile: A2019240165000.L0_LAC
modis_L1A.py A2019240165000.L0_LAC -o A2019240165000.L0_LAC.L1A
MODIS L1A version 6.0.6, built Aug 16 2019 12:46:26
scan: 0 out of 208 Wed Aug 28 16:26:08 2019
scan: 10 out of 208 Wed Aug 28 16:26:09 2019
scan: 20 out of 208 Wed Aug 28 16:26:09 2019
scan: 30 out of 208 Wed Aug 28 16:26:09 2019
scan: 40 out of 208 Wed Aug 28 16:26:09 2019
scan: 50 out of 208 Wed Aug 28 16:26:09 2019
scan: 60 out of 208 Wed Aug 28 16:26:10 2019
scan: 70 out of 208 Wed Aug 28 16:26:10 2019
scan: 80 out of 208 Wed Aug 28 16:26:10 2019
scan: 90 out of 208 Wed Aug 28 16:26:10 2019
scan: 100 out of 208 Wed Aug 28 16:26:10 2019
scan: 110 out of 208 Wed Aug 28 16:26:10 2019
scan: 120 out of 208 Wed Aug 28 16:26:10 2019
scan: 130 out of 208 Wed Aug 28 16:26:10 2019
scan: 140 out of 208 Wed Aug 28 16:26:11 2019
scan: 150 out of 208 Wed Aug 28 16:26:11 2019
scan: 160 out of 208 Wed Aug 28 16:26:11 2019
scan: 170 out of 208 Wed Aug 28 16:26:11 2019
scan: 180 out of 208 Wed Aug 28 16:26:11 2019
scan: 190 out of 208 Wed Aug 28 16:26:11 2019
scan: 200 out of 208 Wed Aug 28 16:26:11 2019
real 4.14
user 2.64
sys 1.43

getanc.py --refreshDB A2019240165000.L0_LAC.L1A
Aqua
icefile=/u/oceandata/var/anc/2019/239/N201923900_SEAICE_NSIDC_24h.hdf
met1=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
met2=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
met3=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
sstfile=/u/oceandata/var/anc/2019/239/N2019239_SST_OIV2AV_24h.nc
()
*** WARNING: The following ancillary data types were missing or are not optimal:  MET OZONE
*** Beware that certain MET and OZONE files just chosen by this program are not optimal.
*** For near real-time processing the remaining files may become available soon.
Command exited with non-zero status 3
real 0.47
user 0.12
sys 0.03

modis_GEO.py A2019240165000.L0_LAC.L1A -o A2019240165000.L0_LAC.GEO
Missing attitude files!
Missing ephemeris files!
Cannot create geolocation from A2019240165000.L0_LAC.L1A; exiting.
Command exited with non-zero status 31

So where are the attitude and ephemeris files?
I have /u/oceandata/share/common/digital_elevation_map.hdf

The following are some of the ENV vars set when running the above script:

SHELL=/bin/bash
TERM=xterm
LIB3_DIR=/u/oceandata/opt
PROJ_LIB=/u/oceandata/opt/share/proj
LIB3_CHECK=0
LIB3_LIB=/u/oceandata/opt/lib
LIB3_BIN=/u/oceandata/opt/bin
LIB3_INC=/u/oceandata/opt/include
SWTBL=/u/oceandata/share/seawifs
OCVARROOT=/u/oceandata/var
OCSSW_ARCH=linux_64
ASAP_PARMS=/u/oceandata/share/common/nav
L2GEN_ANC=/u/oceandata/var/anc
PATH=/u/oceandata/opt/bin:/u/oceandata/scripts:/u/oceandata/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/u/oceandata/bin
NAVCTL=/u/oceandata/share/seawifs/nav
OCSSWROOT=/u/oceandata
OCSSW_BIN=/u/oceandata/bin
HRPT_STATION_IDENTIFICATION_FILE=/u/oceandata/share/seawifs/station/station_id.dat
HDFEOS_LIB=/u/oceandata/opt/EOS/lib/linux64
PWD=/u/oceancolor-bin
LANG=en_US.UTF-8
OCSSW_SVN=localhost
SWFTBL=/u/oceandata/share/seawifs/qc
OCDATAROOT=/u/oceandata/share
PGSLIB=/u/oceandata/opt/EOS/lib/linux64
OCSSW_DEBUG=0
CXX=g++
FC=gfortran
PYTHONPATH=/u/oceandata/scripts/modules:/u/oceandata/scripts:
ORBCTL=/u/oceandata/share/seawifs/nav
GCC_TUNE=
OCTS_REGISTRATION_TABLES=/u/oceandata/share/octs/nav
EOS_LIB_PREFIX=linux64
CC=gcc
ELEMENTS=/u/oceandata/var/seawifs
PGSINC=/u/oceandata/opt/EOS/include
NAVQC=/u/oceandata/share/seawifs/nav

Any help getting this running again would be appreciated.

Thanks,
  -Steve

Tags:

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

Upgrading issues with seadas

by OB.DAAC - SeanBailey » Wed Aug 28, 2019 6:26 pm America/New_York


woodbri
Posts: 52
Joined: Thu Jun 04, 2015 10:50 am America/New_York

Upgrading issues with seadas

by woodbri » Thu Aug 29, 2019 9:22 am America/New_York

Thanks Sean,
I saw that, but don't have the GUI installed (its running on a headless server). Is there a way to manually install the missing files?
-Steve

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 220
Joined: Thu Mar 05, 2009 10:25 am America/New_York

Upgrading issues with seadas

by OB SeaDAS - dshea » Thu Aug 29, 2019 10:14 am America/New_York

yes, just run your "install_ocssw.py" line again.

don

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

Upgrading issues with seadas

by gnwiii » Thu Aug 29, 2019 10:30 am America/New_York

Running `install_ocssw.py -b v7.5 ...` worked for me.   For the record, I didn't see the
    Missing attitude files!
    Missing ephemeris files!

messages from modis_GEO.py, which just ran (slowly) and then reported the failure:
  MODIS GEO version 6.1.0, built Aug 16 2019 12:46:24
  scan: 0 out of 203 Wed Aug 28 11:57:11 2019
  [...]
  scan: 200 out of 203 Wed Aug 28 11:57:40 2019
  Percent valid data (0.00) is less than threshold (95.00)
  ERROR: MODIS geolocation processing failed.


The original report of this problem used the multi-level processor, which reported: Error! Cannot find GEO file None.

Regarding your previous question about process-seadas, when SeaWiFS was working there many SeaDAS 6 scripts floating around to do processing from level-0 to level-3, but I don't recall one by that name.  Have you looked at $OCSSWROOT/scripts/multilevel_processor.py?

woodbri
Posts: 52
Joined: Thu Jun 04, 2015 10:50 am America/New_York

Upgrading issues with seadas

by woodbri » Thu Aug 29, 2019 11:06 am America/New_York

Thanks all for the suggestions.
I have rerun install_ocssw.py multiple times. Originally with -b v7.5 to do a clean install.
Regarding the process-seadas perl script, it is possible that I renamed it but yes, it just does the processing from level-0 to level-3.
I'll take another look at multilevel_processor.py. I'm trying to setup an automated cron script the checks for new images, downloads them, processes them and integrates the images into my site.

I'm curious why modis_GEO.py could not find attitude or ephemeris files. What file names is it looking for?

-Steve

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

Upgrading issues with seadas

by OB.DAAC - SeanBailey » Thu Aug 29, 2019 1:09 pm America/New_York

Steve,
modis_GEO.py could not find attitude or ephemeris files because there was a discrepancy with the PCF file used by the geogen_modis code caused by an update to the script.
The PCF file that needed updating is part of the modis data tree.  It's no longer missing, so if you ran install_ocssw.py with the --aqua (or --terra) flag set, you should have gotten the file.

If you navigate to $OCSSWROOT/share/modis and run git log --oneline you should see:
cf27102 (HEAD -> master, origin/v7.5, origin/master, origin/HEAD, v7.5) adding missed PCF update

Sean

woodbri
Posts: 52
Joined: Thu Jun 04, 2015 10:50 am America/New_York

Upgrading issues with seadas

by woodbri » Thu Aug 29, 2019 1:33 pm America/New_York

Sean,

/u/oceandata/share/modis# git log --oneline
cf27102 adding missed PCF update
e7d697f updated defaults
30c1843 updates for v7.5
69b15a7 v7.5 updates
6779f0f updated to V2013.3
ce383b1 added attributes to prevent compression of dem files
f73202a mods for C6 MODIS GEO/L1A
46864c3 deleted static/ENG_DATA_LIST
2a0f384 minor mods to PCF files
279dddb initial import modis
/u/oceandata/share/modis# git status
On branch v7.5
Your branch is up-to-date with 'origin/v7.5'.
nothing to commit, working directory clean

So I seem to have that update. I have manually run the following commands:

$ ls
A2019240165500.L0_LAC.bz2

$ bunzip2 A2019240165500.L0_LAC.bz2
$ modis_L1A.py A2019240165000.L0_LAC -o A2019240165000.L0_LAC.L1A
MODIS L1A version 6.0.6, built Aug 16 2019 12:46:26
scan: 0 out of 208 Thu Aug 29 13:13:10 2019
scan: 10 out of 208 Thu Aug 29 13:13:11 2019
scan: 20 out of 208 Thu Aug 29 13:13:11 2019
scan: 30 out of 208 Thu Aug 29 13:13:11 2019
scan: 40 out of 208 Thu Aug 29 13:13:11 2019
scan: 50 out of 208 Thu Aug 29 13:13:12 2019
scan: 60 out of 208 Thu Aug 29 13:13:12 2019
scan: 70 out of 208 Thu Aug 29 13:13:12 2019
scan: 80 out of 208 Thu Aug 29 13:13:12 2019
scan: 90 out of 208 Thu Aug 29 13:13:12 2019
scan: 100 out of 208 Thu Aug 29 13:13:12 2019
scan: 110 out of 208 Thu Aug 29 13:13:12 2019
scan: 120 out of 208 Thu Aug 29 13:13:12 2019
scan: 130 out of 208 Thu Aug 29 13:13:12 2019
scan: 140 out of 208 Thu Aug 29 13:13:13 2019
scan: 150 out of 208 Thu Aug 29 13:13:13 2019
scan: 160 out of 208 Thu Aug 29 13:13:13 2019
scan: 170 out of 208 Thu Aug 29 13:13:13 2019
scan: 180 out of 208 Thu Aug 29 13:13:13 2019
scan: 190 out of 208 Thu Aug 29 13:13:13 2019
scan: 200 out of 208 Thu Aug 29 13:13:13 2019

$ getanc.py A2019240165000.L0_LAC.L1A
Warning! Non-optimal data exist in local repository.
Consider re-running with the --refreshDB option to check for optimal ancillary files
Aqua
icefile=/u/oceandata/var/anc/2019/239/N201923900_SEAICE_NSIDC_24h.hdf
met1=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
met2=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
met3=/u/oceandata/var/anc/2019/240/N201924012_MET_NCEP_6h.hdf
sstfile=/u/oceandata/var/anc/2019/239/N2019239_SST_OIV2AV_24h.nc
()
*** WARNING: The following ancillary data types were missing or are not optimal:  MET OZONE
*** Beware that certain MET and OZONE files just chosen by this program are not optimal.
*** For near real-time processing the remaining files may become available soon.

$ modis_GEO.py A2019240165000.L0_LAC.L1A -o A2019240165000.L0_LAC.GEO
Missing attitude files!
Missing ephemeris files!
Cannot create geolocation from A2019240165000.L0_LAC.L1A; exiting.

-Steve

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

Upgrading issues with seadas

by gnwiii » Thu Aug 29, 2019 2:09 pm America/New_York

You should post the exact install_ocssw.py command line you use (also OS and python versions in case there is some quirk to your setup).   I have had transient problems generating GEO files on some recent linux versions.  Also, invoke it using the path, e.g., $OCSSWROOT/scripts/install_ocssw.py ... in case there is an old install script on your system.  To compare with your version, I have:
$ $OCSSWROOT/scripts/install_ocssw.py --version
install_ocssw.py 3.0


To see the names and locations of the  attitude and ephemeris files (for convenience, I substituted $OCSSWROOT for the actual path):
$ modis_atteph.py -v A2019241160000.L1A
Aqua
Searching database: $OCSSWROOT/ocssw/var/ancillary_data.db
Determining pass start and end times...
Aqua
()
Input file: A2019241160000.L1A
Sensor    : aqua
Start time: 2019241160000
End time  : 2019241160500
()
Downloading 'PM1EPHND_NRT.A2019241.1600.061' to $OCSSWROOT/ocssw/var/anc/2019/241
Downloading 'PM1ATTNR_NRT.A2019241.1600.061' to $OCSSWROOT/ocssw/var/anc/2019/241
All required attitude and ephemeris files successfully determined and downloaded.
att1=$OCSSWROOT/ocssw/var/anc/2019/241/PM1ATTNR_NRT.A2019241.1600.061
eph1=$OCSSWROOT/ocssw/var/anc/2019/241/PM1EPHND_NRT.A2019241.1600.061
()
- All optimal ancillary data files were determined and downloaded. -


I don't think the recent changes affect the location of the files, the problem seems to have been getting geogen_modis to look for the right files.
My last run of install_ocssw.py gave new versions of modis_GEO_utils.py and modis_utils.py (most of the changes seem to be
for python3 support).

woodbri
Posts: 52
Joined: Thu Jun 04, 2015 10:50 am America/New_York

Upgrading issues with seadas

by woodbri » Thu Aug 29, 2019 2:20 pm America/New_York

This is the script I use to do the install
And I/m running Python 2.7.12
-Steve

#!/bin/sh

mkdir -p /u/oceandata
cd /u/oceandata

wget -N https://oceandata.sci.gsfc.nasa.gov/ocssw/install_ocssw.py
chmod +x install_ocssw.py

./install_ocssw.py -v --install-dir=/u/oceandata  --git-branch=v7.5 --arch=linux_64 --aqua --avhrr --terra --viirsn --viirsj1 --viirsdem --src

Post Reply