Oh, do I miss out_track

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
blesht
Posts: 86
Joined: Mon Sep 19, 2005 3:06 pm America/New_York
Answers: 0

Oh, do I miss out_track

by blesht » Fri Jul 19, 2019 5:09 pm America/New_York

OK - I installed Anaconda python and after some fiddling got my test mk_matchup.py command to run.  There were some warnings ("no units found in SeaBASS file header") that I take to be insignificant in my application.  I find, however, that although mk_matchup returns the means and standard deviations of the L2 variables, it does not return the number of valid pixels in the sampled box. I know that I can specify the minimum percentage of valid pixels on the command line but I'd like to have the number as well.  Maybe that could be added to the list of possible modifications whenever the script is updated.  I guess I can make this work (with a fair amount of downstream coding) for my purposes, but I still miss out_track.  Thanks again and have a great weekend.Barry

Tags:

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

Oh, do I miss out_track

by gnwiii » Fri Jul 19, 2019 8:15 pm America/New_York

Check the first line of the python script:

$ head -1 ~/ocssw/scripts/mk_matchup.py
#!/usr/bin/env python3


What do python3 --version and which python3 give?

For macports, the subprocess module should be part of the base python-3.7 installation.  You can set python3 to use macports python3.7 by running "sudo port select python3 python37".

blesht
Posts: 86
Joined: Mon Sep 19, 2005 3:06 pm America/New_York
Answers: 0

Oh, do I miss out_track

by blesht » Fri Jul 19, 2019 8:29 pm America/New_York

Hi George - Good to hear from you.  How are you doing?  Thanks!  Well, since I did the anaconda python installation this afternoon, this is what I get (not unexpected).

bash-3.2$ head -1 mk_matchup.py
#!/usr/bin/env python3
bash-3.2$

bash-3.2$ python3 --version
Python 3.7.3
bash-3.2$ which python3
/Users/blesht/anaconda3/bin/python3

In fact, before doing the anaconda installation, I had done exactly what you suggested for the MacPorts install.  Before that, python-2.7 (I think) was my default.  I don't know enough about python or its installation details to have gotten very far in checking if the subprocess module was there.  Now that things are working with the anaconda python, I guess I won't worry about it.

Best regards,

Barry

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

Oh, do I miss out_track

by gnwiii » Sat Jul 20, 2019 7:22 am America/New_York

Thinking of others who might encounter this thread, especially those who rely on macports' python3 for things like QGIS, it would be useful to understand why mk_matchup.py didn't work with macports' python3.7 installed, but then using mk_matchup.py is a hack so maybe not worth investigating unless the problem comes up in the future.

As for missing out_track, at BIO we used SeaDAS 6 to create "along track" images (e.g., storm tracks) which relies heavily on SeaDAS 6 IDL functions.   In the long run, ocean colour users will benefit from tools that rely on open GIS tools that are maintained outside the ocean colour community.   Extracting values from a georeferenced image along a path is a common problem, so there are many partial solutions, but in the past these suffered from lack of standards for representing paths and/or requirements that images be in a particular format, and were often implemented in proprietary GIS systems.   I'm searching for existing open GIS tools that can provide the low-level functions needed for "along track" images or "out_track" extractions.  ESRI How to Extract Raster Values at Point Locations describes some use cases in a way that applies to generic GIS systems.   The "Simple Feature Access Standard (ISO 19125)" should become widely supported.  A couple years ago I  experimented with this in R (the first entry in the Wikipedia list of implementations), but ran into space and performance problems because each point was stored as a structure much larger than needed for a (lon,lat) value.  Implementations should improve in time.

I am doing very well in retirement, particularly with not having to limit outdoor activities to evenings and weekends -- with weather radar I get to time bike rides and dog walks between showers.

blesht
Posts: 86
Joined: Mon Sep 19, 2005 3:06 pm America/New_York
Answers: 0

Oh, do I miss out_track

by blesht » Sat Jul 20, 2019 11:27 am America/New_York

Good morning, George.  Your first comment about why my MacPorts installation didn't work led me to go back and try the whole process again.  I must have done something wrong the first time I attempted it because now it works fine.  I suspect that my I issued the 'sudo port select python3' command improperly (I have a tendency to type "phython" rather than "python.")  So, for other followers of this thread, the mk_matchup.py script does work with MacPorts python.

I couldn't agree more with you about open-source solutions.  I'm not much of a GIS person, but I was planning on trying to duplicate out_track in R.  I definitely will be checking the ISO19125 document.

Glad to hear that retirement is going well.  I'm sort of half-retired and do seem to spend a lot of time walking the dogs and, given the wet spring/summer we've had here in the midwest, dodging the rain.  As always, thanks very much for sharing your experience and insights.

Best, Barry

Post Reply