In [22]:
# get NO3 and CHL data from MyOcean 
from IPython.core.display import HTML
HTML('<iframe src=http://resources.myocean.eu/?'
     'option=com_csw&view=details&product_id=GLOBAL_ANALYSIS_BIO_001_008_a# '
     'width=700 height=400></iframe>')


Out[22]:

In [ ]:
import os
os.system('python /home/rsignell/python/motu-client-python/motu-client.py -u rsignell' 
          '-m http://atoll.mercator-ocean.fr/mfcglo-mercator-gateway-servlet/Motu '
          '-s http://purl.org/myocean/ontology/service/database#GLOBAL_ANALYSIS_BIO_001_008_a-TDS '
          '-d global-analysis-bio-001-008-a -x -75.3 -X -67.0 -y 17.0 -Y 20.0 -t "2013-05-04 12:00:00" -T "2013-05-05 12:00:00" '
          '-z 0.49 -Z 5727.92 -v NO3 -v CHL -o /usgs/data2/notebook/data -f foo2.nc')

In [14]:
import iris
import iris.plot as iplt

In [12]:
cubes = iris.load('/usgs/data2/notebook/data/foo2.nc')

In [13]:
print cubes


0: mass_concentration_of_chlorophyll_in_sea_water / (mg/m^3) (time: 1; depth: 50; latitude: 7; longitude: 18)
1: mole_concentration_of_nitrate_in_sea_water / (mmol/m^3) (time: 1; depth: 50; latitude: 7; longitude: 18)

In [23]:
print cubes[1]


mole_concentration_of_nitrate_in_sea_water / (mmol/m^3) (time: 1; depth: 50; latitude: 7; longitude: 18)
     Dimension coordinates:
          time                                               x         -             -             -
          depth                                              -         x             -             -
          latitude                                           -         -             x             -
          longitude                                          -         -             -             x
     Attributes:
          Conventions: CF-1.0
          _CoordinateAxes: time_counter depth latitude longitude 
          history: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:4408...
          institution: MERCATOR OCEAN
          julian_day_unit: hours since 1950-01-01 00:00:00
          latitude_max: 20.0
          latitude_min: 17.0
          longitude_max: -67.0
          longitude_min: -75.5
          references: http://www.mercator-ocean.fr
          source: MERCATOR BIOMER1V2R1
          time_max: 555228.0
          time_min: 555228.0
          title: CLASS1 MyOcean BIOMER1V2R1
          unit_long: millimoles of Nitrate per cubic meter
          z_max: 5727.91699219
          z_min: 0.494024991989
     Cell methods:
          mean: area

In [25]:
slice=cubes[1][0,0,:,:]

In [26]:
print slice


mole_concentration_of_nitrate_in_sea_water / (mmol/m^3) (latitude: 7; longitude: 18)
     Dimension coordinates:
          latitude                                               x             -
          longitude                                              -             x
     Scalar coordinates:
          depth: 0.494025 m
          time: 2013-05-04 12:00:00
     Attributes:
          Conventions: CF-1.0
          _CoordinateAxes: time_counter depth latitude longitude 
          history: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:4408...
          institution: MERCATOR OCEAN
          julian_day_unit: hours since 1950-01-01 00:00:00
          latitude_max: 20.0
          latitude_min: 17.0
          longitude_max: -67.0
          longitude_min: -75.5
          references: http://www.mercator-ocean.fr
          source: MERCATOR BIOMER1V2R1
          time_max: 555228.0
          time_min: 555228.0
          title: CLASS1 MyOcean BIOMER1V2R1
          unit_long: millimoles of Nitrate per cubic meter
          z_max: 5727.91699219
          z_min: 0.494024991989
     Cell methods:
          mean: area

In [28]:
iplt.contourf(slice)


Out[28]:
<matplotlib.contour.QuadContourSet instance at 0x3be67a0>

In [ ]: