Support the Arctic Sea Ice Forum and Blog

Author Topic: The Programming Thread  (Read 9729 times)

BornFromTheVoid

  • Nilas ice
  • Posts: 1339
    • View Profile
  • Liked: 679
  • Likes Given: 299
The Programming Thread
« on: March 20, 2013, 09:32:30 PM »
Hi folks,

As part of my MSc course this year, I've had a module in python programming. While I certainly don't consider myself at all a natural, or particularly adept at it, I have enjoyed it and would like to improve my abilities.
As something of an added impetus, for my dissertation this summer, I've decided to look at how last years unusual weather conditions and surface melt across Greenland affected supraglacial lakes in southwest Greenland, using an algorithm to automate the process, similar to that outlined in a recent paper by Liang et al. http://xa.yimg.com/kq/groups/18383638/251354232/name/1-s2.0-S0034425712001393-main.pdf

I've literally had 8 python classes so far and have no other programming experience, so I've a fairly steep learning curve ahead of me!

Anywho, I'm wondering if anyone has any tips for books or websites that give a good crash course I could use. Paid and free recommendations both appreciated. General tips very much welcome too!

Cheers
I recently joined the twitter thing, where I post more analysis, pics and animations: @Icy_Samuel

ivica

  • Nilas ice
  • Posts: 1475
  • Kelele
    • View Profile
  • Liked: 99
  • Likes Given: 0
Re: The Programming Thread
« Reply #1 on: March 21, 2013, 09:35:28 AM »
Hello BFTV,
I do not use Python and what follow is quite general, I did some Googling:

(putting aside specifics of your task and usual syntax/semantic bugs/quirks related to programming with basic Python language)

Getting Started
   http://www.python.org/about/gettingstarted/

To set-up ProjectEnvironment one have to make many decisions/choices before starting actual Project:

Development and Deployment Platform (Win, Linux,...)
What IDE/RAD environment ?
Database, if needed ?
Report Generator ?
Python 2.x or 3.x ?
   http://www.python.org/
   http://wiki.python.org/moin/Python2orPython3
   http://docs.python.org/3/whatsnew/3.0.html

FAQ
   http://docs.python.org/2/faq/index.html

Actual questions/problems raised during Project's realization phase also
depends on choices above.

Python Community is quite active and many Components has Forums/Tutorials.
Also, Usenet newsgroup "comp.lang.python" is very active.

You have tight deadline, uh,
Good luck! Let Python Force be with you :-)
« Last Edit: March 21, 2013, 11:04:24 AM by ivica »

ivica

  • Nilas ice
  • Posts: 1475
  • Kelele
    • View Profile
  • Liked: 99
  • Likes Given: 0
Re: The Programming Thread
« Reply #2 on: March 21, 2013, 11:42:48 AM »
I know nothing about specifics of your task, anyway:

Maybe you do not need GUI, ...
i.e. maybe you can accomplish your task ("algorithm to automate the process") with poor Python scripts only!

You could spare a lot of time then.

« Last Edit: March 21, 2013, 11:48:18 AM by ivica »

Wipneus

  • Citizen scientist
  • Young ice
  • Posts: 4220
    • View Profile
    • Arctische Pinguin
  • Liked: 1025
  • Likes Given: 0
Re: The Programming Thread
« Reply #3 on: March 21, 2013, 11:50:23 AM »
The O'reilly book "Learning Python", Mark Lutz is not a bad book to have (over 1160 pages!).
I have also"Beginning Python", James Payne. Too shallow for my liking.

There are excellent treatments on the net. I usually start with google.com and find what I need.

Perhaps as a beginner you should start with Python 3.x, but lots of software is still based on 2.6. There are a lot of annoying differences between them.

I have programmed professionally in dozens of program languages, mostly learned "on the job". Don't be afraid of another language, it is just the local rules that vary most.

If you are cooperating in a team, ask them what they use. Eases tapping the existing collective knowledge.

BornFromTheVoid

  • Nilas ice
  • Posts: 1339
    • View Profile
  • Liked: 679
  • Likes Given: 299
Re: The Programming Thread
« Reply #4 on: March 21, 2013, 12:43:48 PM »
Thanks for the replies. Some of yer suggestions were a little over my head!

I've been learning on 2.7 so far, just using the GUI interface that comes with ArcGIS 10.1 in Uni. I've the same on my laptop, but also got it set up and running on powershell and notepad++

I'll be doing most of the work on my own, with just a supervisor and co-supervisor helping out. The co-supervisor I'm expecting to get has experience in python and working with MODIS data, which is what I'll be using. My python lecturer has also agreed to give a hand and look over scripts for me.

I've gone through the "Getting Started with Python" book, but am looking for something a little more advanced now.

The dissertation is due on September 13th I think, but I'd like to have the algorithm up and running by the end of July so I'll have time to do the analysis. Would that be realistic? I'll be finishing lectures next week so I should have plenty of time to delve into it after that.
I recently joined the twitter thing, where I post more analysis, pics and animations: @Icy_Samuel

ivica

  • Nilas ice
  • Posts: 1475
  • Kelele
    • View Profile
  • Liked: 99
  • Likes Given: 0
Re: The Programming Thread
« Reply #5 on: March 24, 2013, 07:31:42 AM »
I did more browsing to satisfy my curiosity, you'll see if its of any value for you - or not.

Search path:
----------------

EOSDIS WorldView: Information item
http://earthdata.nasa.gov/labs/worldview/

Global Imagery Browse Services (GIBS) 
http://earthdata.nasa.gov/about-eosdis/system-description/global-imagery-browse-services-gibs

GIBS Supported Clients
http://earthdata.nasa.gov/about-eosdis/system-description/global-imagery-browse-services-gibs/gibs-supported-clients#script_level_access

On that page, Script-Level Access to Imagery

GDAL - Geospatial Data Abstraction Library
http://gdal.org/

On that page, GDAL In Other Languages

GDAL/OGR in Python                                
http://trac.osgeo.org/gdal/wiki/GdalOgrInPython