You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by hu...@apache.org on 2016/08/25 19:32:00 UTC
[1/3] climate git commit: CLIMATE-861 - An example to plot aerosol
optical depth climatology from NASA MISR instrument
Repository: climate
Updated Branches:
refs/heads/master 1c85945fa -> 9deb819f7
CLIMATE-861 - An example to plot aerosol optical depth climatology from NASA MISR instrument
- example/draw_climatology_map_MISR_AOD.py has been added.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/992ab591
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/992ab591
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/992ab591
Branch: refs/heads/master
Commit: 992ab591b8be01061340697750bf66d508adc301
Parents: 818784e
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Aug 24 16:28:54 2016 -0700
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Aug 24 16:28:54 2016 -0700
----------------------------------------------------------------------
examples/draw_climatology_map_MISR_AOD.py | 34 ++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/992ab591/examples/draw_climatology_map_MISR_AOD.py
----------------------------------------------------------------------
diff --git a/examples/draw_climatology_map_MISR_AOD.py b/examples/draw_climatology_map_MISR_AOD.py
new file mode 100644
index 0000000..1af834d
--- /dev/null
+++ b/examples/draw_climatology_map_MISR_AOD.py
@@ -0,0 +1,34 @@
+import ocw.dataset as ds
+import ocw.data_source.local as local
+import ocw.dataset_processor as dsp
+import ocw.plotter as plotter
+
+import numpy as np
+import numpy.ma as ma
+
+
+''' data source: https://dx.doi.org/10.6084/m9.figshare.3753321.v1'''
+dataset = local.load_file('/home/huikyole/climate/examples/AOD_monthly_2000-MAR_2016-FEB_from_MISR_L3_JOINT.nc',
+ 'nonabsorbing_ave')
+''' Subset the data for East Asia'''
+Bounds = ds.Bounds(lat_min=20, lat_max=57.7, lon_min=90, lon_max=150)
+dataset = dsp.subset(dataset, Bounds)
+
+'''The original dataset includes nonabsorbing AOD values between March 2000 and February 2015.
+dsp.temporal_subset will extract data in September-October-November.'''
+dataset_SON = dsp.temporal_subset(dataset, month_start=9, month_end=11, average_each_year=True)
+
+ny, nx = dataset_SON.values.shape[1:]
+
+# multi-year mean aod
+clim_aod = ma.zeros([3, ny, nx])
+
+clim_aod[0,:] = ma.mean(dataset_SON.values, axis=0) # 16-year mean
+clim_aod[1,:] = ma.mean(dataset_SON.values[-5:,:], axis=0) # the last 5-year mean
+clim_aod[2,:] = dataset_SON.values[-1,:] # the last year's value
+
+# plot clim_aod (3 subplots)
+plotter.draw_contour_map(clim_aod, dataset_SON.lats, dataset_SON.lons,
+ fname='nonabsorbing_AOD_clim_East_Asia_Sep-Nov',
+ gridshape=[1,3],subtitles=['2000-2015: 16 years','2011-2015: 5 years', '2015: 1 year'],
+ clevs=np.arange(21)*0.02)
[2/3] climate git commit: revised with comments
Posted by hu...@apache.org.
revised with comments
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/0981830a
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/0981830a
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/0981830a
Branch: refs/heads/master
Commit: 0981830adbcac53524317ccd62b6f2ced1ecea46
Parents: 992ab59
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Thu Aug 25 08:24:09 2016 -0700
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Thu Aug 25 08:24:09 2016 -0700
----------------------------------------------------------------------
examples/draw_climatology_map_MISR_AOD.py | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/0981830a/examples/draw_climatology_map_MISR_AOD.py
----------------------------------------------------------------------
diff --git a/examples/draw_climatology_map_MISR_AOD.py b/examples/draw_climatology_map_MISR_AOD.py
index 1af834d..d243641 100644
--- a/examples/draw_climatology_map_MISR_AOD.py
+++ b/examples/draw_climatology_map_MISR_AOD.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import ocw.dataset as ds
import ocw.data_source.local as local
import ocw.dataset_processor as dsp
@@ -7,8 +24,9 @@ import numpy as np
import numpy.ma as ma
-''' data source: https://dx.doi.org/10.6084/m9.figshare.3753321.v1'''
-dataset = local.load_file('/home/huikyole/climate/examples/AOD_monthly_2000-MAR_2016-FEB_from_MISR_L3_JOINT.nc',
+''' data source: https://dx.doi.org/10.6084/m9.figshare.3753321.v1
+ AOD_monthly_2000-Mar_2016-FEB_from_MISR_L3_JOINT.nc is publicly available.'''
+dataset = local.load_file('AOD_monthly_2000-MAR_2016-FEB_from_MISR_L3_JOINT.nc',
'nonabsorbing_ave')
''' Subset the data for East Asia'''
Bounds = ds.Bounds(lat_min=20, lat_max=57.7, lon_min=90, lon_max=150)
[3/3] climate git commit: CLIMATE-861 - An example to plot aerosol
optical depth climatology from NASA MISR instrument
Posted by hu...@apache.org.
CLIMATE-861 - An example to plot aerosol optical depth climatology from NASA MISR instrument
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/9deb819f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/9deb819f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/9deb819f
Branch: refs/heads/master
Commit: 9deb819f79ce9de75a76364c73a29fd93cb7a394
Parents: 1c85945 0981830
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Thu Aug 25 12:30:23 2016 -0700
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Thu Aug 25 12:30:23 2016 -0700
----------------------------------------------------------------------
examples/draw_climatology_map_MISR_AOD.py | 52 ++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
----------------------------------------------------------------------