Differences between revisions 4 and 7 (spanning 3 versions)
Revision 4 as of 2009-11-23 12:00:22
Size: 519
Editor: anonymous
Comment:
Revision 7 as of 2009-11-23 12:18:21
Size: 2296
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:

The [[http://matplotlib.sourceforge.net/basemap/doc/html/| matplotlib basemap toolkit]] is a library for plotting 2D data on maps in Python.
Line 30: Line 32:

Set the correct path for using Basemap
{{{
module load R/2.7.0
module load Python/2.6.2
}}}

== GMT ==

== Using Google Earth for visualization ==

{{attachment:600px-Google_earth_chlorophyll.png}}

Documentation:

http://code.google.com/apis/kml/documentation/

Chlorophyll data:

http://oceancolor.gsfc.nasa.gov/cgi/climatologies.pl

Download png and make black transparent

{{{
convert -transparent black A20020012007273.L3m_CU_CHLO_4.png A20020012007273.L3m_CU_CHLO_4_trans.png
}}}


Create ''.kml'' file


{{{
<?xml version="1.0"?>
<kml xmlns="http://earth.google.com/kml/2.1"><Document><name>Chlorophyll Climatology</name>
  <Folder>
<Snippet maxLines="0"/>
<name>MODIS</name>
<ScreenOverlay>
  <name>UHH Logo</name>
  <color>ffffffff</color>
  <visibility>1</visibility>
  <Icon>
    <href>http://www.ifm.uni-hamburg.de/logo_uhh_neu.gif</href>
  </Icon>
      <overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
      <screenXY x="5" y="5" xunits="pixels" yunits="insetPixels"/>
      <size x="90" y="90" xunits="pixel" yunits="pixel"/>
</ScreenOverlay>
<LookAt>
 <longitude>8</longitude>
 <latitude>53</latitude>
  <altitude>2000000</altitude>
  <heading>0</heading>
</LookAt>
<Folder> <Snippet maxLines="0"/>
<name>Chlorophyll</name><GroundOverlay> <name>2002-2007</name>
<visibility>1</visibility><color>ffffffff</color>
<Icon><href>A20020012007273.L3m_CU_CHLO_4_trans.png</href></Icon>
<LatLonBox><north>90</north><south>-90</south><east>180</east><west>-180</west></LatLonBox>
</GroundOverlay></Folder></Folder></Document></kml>
}}}

Visualisation

Basemap

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.

Map1.png

   1 from pylab import *
   2 from mpl_toolkits.basemap import Basemap
   3 
   4 m = Basemap(projection='ortho',lon_0=10.0,lat_0=45.0,resolution='l')
   5 m.bluemarble()
   6 
   7 lon,lat=10.0,53.5 # Hamburg
   8 
   9 x,y=m(lon,lat)
  10 m.plot(x,y,'r.')
  11     
  12 show()
  13 savefig('Map1.png',dpi=75)

Set the correct path for using Basemap

module load R/2.7.0
module load Python/2.6.2

GMT

Using Google Earth for visualization

600px-Google_earth_chlorophyll.png

Documentation:

http://code.google.com/apis/kml/documentation/

Chlorophyll data:

http://oceancolor.gsfc.nasa.gov/cgi/climatologies.pl

Download png and make black transparent

convert -transparent black A20020012007273.L3m_CU_CHLO_4.png A20020012007273.L3m_CU_CHLO_4_trans.png

Create .kml file

<?xml version="1.0"?>
<kml xmlns="http://earth.google.com/kml/2.1"><Document><name>Chlorophyll Climatology</name>
  <Folder>
<Snippet maxLines="0"/>
<name>MODIS</name>
<ScreenOverlay>
  <name>UHH Logo</name>
  <color>ffffffff</color>
  <visibility>1</visibility>
  <Icon>
    <href>http://www.ifm.uni-hamburg.de/logo_uhh_neu.gif</href>
  </Icon>
      <overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
      <screenXY x="5" y="5" xunits="pixels" yunits="insetPixels"/>
      <size x="90" y="90" xunits="pixel" yunits="pixel"/>
</ScreenOverlay>
<LookAt>
        <longitude>8</longitude>
        <latitude>53</latitude>
         <altitude>2000000</altitude>       
  <heading>0</heading>          
</LookAt>
<Folder> <Snippet maxLines="0"/>
<name>Chlorophyll</name><GroundOverlay> <name>2002-2007</name>
<visibility>1</visibility><color>ffffffff</color>
<Icon><href>A20020012007273.L3m_CU_CHLO_4_trans.png</href></Icon>
<LatLonBox><north>90</north><south>-90</south><east>180</east><west>-180</west></LatLonBox>
</GroundOverlay></Folder></Folder></Document></kml>

LehreWiki: OpenSource2010/Lesson6 (last edited 2010-11-22 12:55:36 by anonymous)