Top Banner
Copyright © 2014 University of Maryland. This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014 HDF & NetCDF files; Regression; File Compression & Data Access Week 11, Day 1 10 Nov 2014 Analysis Methods in Atmospheric and Oceanic Science AOSC 652 Today: Data Access for Projects; HDF & NetCDF Wed: Multiple Linear Regression Fri: Disk Usage, File Compression, & HW #10
38

AOSC 652: Week 11, Day 1 - UMD

Mar 02, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

HDF & NetCDF files; Regression;File Compression & Data Access

Week 11, Day 1

10 Nov 2014

Analysis Methods in Atmospheric and Oceanic Science

AOSC 652

• Today: Data Access for Projects; HDF & NetCDF• Wed: Multiple Linear Regression• Fri: Disk Usage, File Compression, & HW #10

Page 2: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

• There are a myriad of websites that provide access to Atmospheric and OceanicScience Data

• Some are public, some are protected in a cursory manner, others requireaffiliation with a project or agency for access

• The next slide details some of our favorite website, all of which we have used,for our own research

Data Access

2

Page 3: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

• Global temperature, modern eraEast Anglia CRU: http://www.cru.uea.ac.ukNASA GISS: http://data.giss.nasa.gov/gistempNOAA NCDC: http://www.ncdc.noaa.gov/monitoring-references/faq

• PaleoclimateNOAA NCDC: http://www.ncdc.noaa.gov/data-access/paleoclimatology-data

• Aerosols, air quality, ocean colorNASA GIOVANNI: http://disc.sci.gsfc.nasa.gov/giovanni

• Trace gasesCO2 – CDIAC: http://cdiac.ornl.govOthers – NOAA ESRL: http://www.esrl.noaa.gov/gmd/dv/ftpdata.html

• WeatherNOAA CPC: http://www.cpc.noaa.gov/productsNRL Monterey: http://www.nrlmry.navy.mil/sat_products.html

• Arctic and Antarctic Snow and IceNational Snow and Ice Data Center: http://nsidc.org

Data Access :Top Ten Websites (as of 141110 … subject to change)

3

Page 4: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

Data Access :Top Ten Websites (as of 141110 … subject to change)

• Can freely access data on these websites and analyze these measurements using tools developed in class !

• Free access to plethora of data: exciting, relatively new development !!• Data rich world: only limit to science we conduct is our imagination !!!

• Global temperature, modern eraEast Anglia CRU: http://www.cru.uea.ac.ukNASA GISS: http://data.giss.nasa.gov/gistempNOAA NCDC: http://www.ncdc.noaa.gov/monitoring-references/faq

• PaleoclimateNOAA NCDC: http://www.ncdc.noaa.gov/data-access/paleoclimatology-data

• Aerosols, air quality, ocean colorNASA GIOVANNI: http://disc.sci.gsfc.nasa.gov/giovanni

• Trace gasesCO2 – CDIAC: http://cdiac.ornl.govOthers – NOAA ESRL: http://www.esrl.noaa.gov/gmd/dv/ftpdata.html

• WeatherNOAA CPC: http://www.cpc.noaa.gov/productsNRL Monterey: http://www.nrlmry.navy.mil/sat_products.html

• Arctic and Antarctic Snow and IceNational Snow and Ice Data Center: http://nsidc.org

4

Page 5: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

5

AOSC 652: Analysis Methods in AOSC

File Formats

• So far we've only used ASCII files.

• For many years, this is how data was archived.

• With the advent of larger, complex data sets, binary file formats have come into favor

• Two most commonly used binary file formats are HDF and netCDF

• An ability to read (or extract information) from binary files is ESSENTIAL fora graduate student in Atmospheric and Oceanic Science

Page 6: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

HDF: Hierarchical Data Format

• Developed by the National Center for Supercomputing Applications

• More than a “file format”; HDF includes a software library and various applications

• Several versions of HDF (hdf,hdf4, and hdf5) but most often hdf5 is used in AOSC

• HDF5 files have extension *.h5 or *.he5

• HDF homepage: http://www.hdfgroup.org– Can access support, file descriptions, and software to extract information from hdf

files at the linux command line– FORTRAN, IDL, MATLAB

6

Page 7: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

Please copy

~rjs/aosc652/week_11/omi/ *.*

to your working directory, and at the command line type:

% hdfview

A gui utility should pop up. Under the file menu, navigate to your current working directory and double-click the OMI*he5 file you just copied

Click on HDFEOS ... GRIDS ... OMI Column Amount ... Data Fields ...double click on ColumnAmountO3

Under the “Table” menu on the new spread sheet, select Export Data to File

You've now created an ascii file that contains the total column ozone for this date

7

Page 8: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

To access he5 file content from the command line, we can use software provided by the HDF Group. More information can be found here

http://www.hdfgroup.org/HDF5/doc/RM/Tools.html

To determine the structure of the file, type we'll use the h5dump commandwith the -n option

8

Page 9: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

% h5dump -n OMI-Aura_L3-OMTO3d_2014m0301*.he5

9

Page 10: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

% h5dump -n OMI-Aura_L3-OMTO3d_2014m0301*.he5

What linux command would we issue to learn more about h5dump?

10

Page 11: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

To extract data from this file:

h5dump −d "/HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3" −o o3col_2014_0301.dat −y OMI−Aura_L3−OMTO3d_2014m0301*.he5

This command places ozone column data into an ascii file called o3col_2007_0326.dat

All one line in linux

11

Page 12: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

To extract data from this file:

h5dump −d "/HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3" −o o3col_2014_0301.dat −y OMI−Aura_L3−OMTO3d_2014m0301*.he5

This command places ozone column data into an ascii file called o3col_2011_0301.dat

All one line in linux

12

Page 13: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

FORTRAN:

The HDF group has support for interfacing hdf files with FORTRAN 90. Support for FORTRAN 77 is limited.

Can read hdf files directly in FORTRAN 90: various software libraries provided athttp://www.hdfgroup.org/ftp/HDF5/examples/src-html/f90.html

13

Page 14: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDL has some nice functions to read hdf files

Start IDL

To view information about the hdf file, type

result=h5_browser('filename')

14

Page 15: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

15

AOSC 652: Analysis Methods in AOSC

IDL has some nice functions to read hdf files

Start IDL

To view information about the hdf file, type

browse=h5_browser('OMI-Aura_L3-OMTO3d_2014m0301*.he5')

Page 16: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDL has some nice functions to read hdf files.

You can click through the menus to see what fields are available as well as the metadata (information about the data sets, such as variables names, missing data values, etc). This information is useful when reading in data into an IDL program.

16

Page 17: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDL

Please have a look at read_omi_hdf5.pro (copied from my omi directory)

To read in the data, we need to extract the data from the .he5 file and put intoa variable

result=h5_parse('OMI-Aura_L3-OMTO3d_2014m0301_v003-2014m0304t143959.he5',/read_data)

Contains all of the data in the HDF5 file

17

Page 18: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

18

AOSC 652: Analysis Methods in AOSC

IDL

Please have a look at read_omi_hdf5.pro (copied from my omi directory)

To read in the data, we need to extract the data from the .he5 file and put intoa variable

result=h5_parse('OMI-Aura_L3-OMTO3d_2014m0301_v003-2014m0304t143959.he5',/read_data)

o3_column=result.hdfeos.grids.OMI_Column_Amount_O3.Data_Fields.ColumnAmountO3._data

Variable o3_column contains only ozone column data from HDF5 file

Page 19: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

19

AOSC 652: Analysis Methods in AOSC

IDL

Please have a look at read_omi_hdf5.pro (copied from my omi directory)

To read in the data, we need to extract the data from the .he5 file and put intoa variable

result=h5_parse('OMI-Aura_L3-OMTO3d_2014m0301_v003-2014m0304t143959.he5',/read_data)

o3_column=result.hdfeos.grids.OMI_Column_Amount_O3.Data_Fields.ColumnAmountO3._data

Variable o3_column contains only ozone column data from HDF5 file

This syntax allows for selection of fields of interest of data file (subsetting)

Page 20: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

20

AOSC 652: Analysis Methods in AOSC

IDL

Please have a look at read_omi_hdf5.pro (copied from my omi directory)

To read in the data, we need to extract the data from the .he5 file and put intoa variable

result=h5_parse('OMI-Aura_L3-OMTO3d_2014m0301_v003-2014m0304t143959.he5',/read_data)

o3_column=result.hdfeos.grids.OMI_Column_Amount_O3.Data_Fields.ColumnAmountO3._data

Variable o3_column contains only ozone column data from HDF5 file

This syntax allows for selection of fields of interest of data file (subsetting)

Can then analyse and display the ozone column data

Page 21: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

21

AOSC 652: Analysis Methods in AOSC

IDL

Please have a look at read_omi_hdf5.pro (copied from my omi directory)

To read in the data, we need to extract the data from the .he5 file and put intoa variable

result=h5_parse('OMI-Aura_L3-OMTO3d_2014m0301_v003-2014m0304t143959.he5',/read_data)

o3_column=result.hdfeos.grids.OMI_Column_Amount_O3.Data_Fields.ColumnAmountO3._data

Variable o3_column contains only ozone column data from HDF5 file

This syntax allows for selection of fields of interest of data file (subsetting)

Can then analyse and display the ozone column data

Let’s run read_omi_hdf5.pro

Page 22: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

22

AOSC 652: Analysis Methods in AOSC

MATLAB

Please have a look at read_omi_hdf5.m (copied from my omi directory)

The procedure to read hdf5 files into MATLAB is a little more complicated

% Open the HDF5 filefile_id=H5F.open (FILE_NAME,’H5F_ACC_RDONLY’,’H5P_DEFAULT’)DATAFIELD_NAME=‘/HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3’

% Read the datasetdata_id=H5D.open(file_id,DATAFIELD_NAME);data=H5D.read (data_id,’H5T_NATIVE_DOUBLE’,’H5S_ALL’,’H5S_ALL’,’H5P_DEFAULT’);

Contains total column ozone

Page 23: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

23

AOSC 652: Analysis Methods in AOSC

MATLAB

Please have a look at read_omi_hdf5.m (copied from my omi directory)

The procedure to read hdf5 files into MATLAB is a little more complicated

% Open the HDF5 filefile_id=H5F.open (FILE_NAME,’H5F_ACC_RDONLY’,’H5P_DEFAULT’)DATAFIELD_NAME=‘/HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3’

% Read the datasetdata_id=H5D.open(file_id,DATAFIELD_NAME);data=H5D.read (data_id,’H5T_NATIVE_DOUBLE’,’H5S_ALL’,’H5S_ALL’,’H5P_DEFAULT’);

For more information regarding these commands, please visit:

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html

http://www.mathworks.com/help/matlab/hdf5-files.html

Page 24: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

24

AOSC 652: Analysis Methods in AOSC

MATLAB

Please have a look at read_omi_hdf5.m (copied from my omi directory)

The procedure to read hdf5 files into MATLAB is a little more complicated

% Open the HDF5 filefile_id=H5F.open (FILE_NAME,’H5F_ACC_RDONLY’,’H5P_DEFAULT’)DATAFIELD_NAME=‘/HDFEOS/GRIDS/OMI Column Amount O3/Data Fields/ColumnAmountO3’

% Read the datasetdata_id=H5D.open(file_id,DATAFIELD_NAME);data=H5D.read (data_id,’H5T_NATIVE_DOUBLE’,’H5S_ALL’,’H5S_ALL’,’H5P_DEFAULT’);

For more information regarding these commands, please visit:

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html

http://www.mathworks.com/help/matlab/hdf5-files.html

Let’s run read_omi_hdf5.m

Page 25: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

netCDF: network common data format

File format system developed by the University Corporation for Atmospheric Research inBoulder, Co

http://www.unidata.ucar.edu/software/netcdf/

netCDF files have *.nc extension

A variety of netCDF interfaces are available and installed on metosrv

To access, as with HDF, can run either command line scripts or can use readers (programs)in FORTRAN, IDL, or MATLAB.

25

Page 26: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

Please copy:

~rjs/aosc652/week_11/start08/*.*

Contains file: START08_rf01_AWAS_merged_final_v03.nc

To read the header information in a netCDF from the command line:

ncdump -h START08_rf01_AWAS_merged_final_v03.nc

To look at the structure of the file:

ncdump -c START08_rf01_AWAS_merged_final_v03.nc

To extract specific variables and send to an output ascii format file:

ncdump -v LATC START08_rf01_AWAS_merged_final_v03 > output.dat

26

Page 27: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

FORTRAN:

Often in the research world people extract data from netCDF into various ASCII files,then read using codes similar to those used in class

Can read netCDF files directly in FORTRAN: various software libraries provided athttp://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f77/

27

Page 28: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

28

AOSC 652: Analysis Methods in AOSC

IDL

First copy ~rjs/idl/ncdf_browser.zipinto your idl directory that you created last week.

Unzip the file:unzip ncdf_browser.zip

Go back to your working directory

Start IDL and type

ncdf_browser,'START08_rf01_AWAS_merged_final_v03.nc'

Page 29: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDL

Hopefully, you'll see somethinglike this. You can use thisbrowser to read the metadata(dimensions, fill values, etc.)

29

Page 30: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDLPlease have a look at read_start08_netCDF.pro which you have copied

To read data in the *.nc file (either in an IDL program or at the command line), need to first get ID number for the *.nc file.

cdfid=ncdf_open(‘filename’)

Use this ID number (variable cdfid) and names of variables to extract data from the *.nc file

ncdf_varget,cdfid,'variable_name',your_new_name_for_this_dataset

example:ncdf_varget,cdfid,'LATC',lat_airplane

30

Page 31: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

IDLPlease have a look at read_start08_netCDF.pro which you have copied

To read data in the *.nc file (either in an IDL program or at the command line), need to first get ID number for the *.nc file.

cdfid=ncdf_open(‘filename’)

Use this ID number (variable cdfid) and names of variables to extract data from the *.nc file

ncdf_varget,cdfid,'variable_name', your_new_name_for_this_dataset

example:ncdf_varget,cdfid,'LATC',lat_haiper

AOSC 652: Analysis Methods in AOSC

Your choice for this variable

31

Page 32: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

IDLPlease have a look at read_start08_netCDF.pro which you have copied

This program reads data from *.nc file and assigns variable names

filename=‘START08_rf01_AWAS_merged_final_v03.nc'cdfid=ncdf_open(filename)ncdf_varget,cdfid,'GGALT',alt_hiancdf_varget,cdfid,'LATC',lat_hiancdf_varget,cdfid,'LONC',lon_hiancdf_varget,cdfid,'PALT',palt_hiancdf_varget,cdfid,'PSXC',press_hiancdf_varget,cdfid,'UTMID',time_hiancdf_close,cdfid

Rest of code (not shown here) plots aircraft flight track and altitude time series.

32

Page 33: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

33

AOSC 652: Analysis Methods in AOSC

IDLPlease have a look at read_start08_netCDF.pro which you have copied

This program reads data from *.nc file and assigns variable names

filename=‘START08_rf01_AWAS_merged_final_v03.nc'cdfid=ncdf_open(filename)ncdf_varget,cdfid,'GGALT',alt_hiancdf_varget,cdfid,'LATC',lat_hiancdf_varget,cdfid,'LONC',lon_hiancdf_varget,cdfid,'PALT',palt_hiancdf_varget,cdfid,'PSXC',press_hiancdf_varget,cdfid,'UTMID',time_hiancdf_close,cdfid

Rest of code (not shown here) plots aircraft flight track and altitude time series.

Let’s run read_start08_netCDF.pro

Page 34: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

MATLABPlease have a look at read_start08_netCDF.m which you have copied

As we in IDL, we must obtain a file ID

ncid=netcdf.open('filename','NOWRITE')

To inquire as to what variables are in the file:

name=netcdf.inqVar(ncid,#)

To extract the data:

var1=netcdf.getvar(ncid,#)or

var1id=netcdf.varinqID(ncid,name)var1=netcdf.getvar(ncid,var1id)

Close the file

netcdf.close(ncid)

34

Page 35: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

MATLAB

Let’s run read_start08_netCDF.m

This program is written in a fashion VERY similar to IDL

Should see a plot similar to the one we created in IDL

35

Page 36: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

AOSC 652: Analysis Methods in AOSC

Different research groups use various file formats.

Many satellite teams use HDF while modelling groups prefer netCDF.

HDF:Aura (OMI, MLS, TES, HIRDLS)Aqua (AMSR-E, MODIS, AMSU-A, CERES, MODIS)

NetCDF:Whole-Atmosphere Community Climate Model (WACCM)Regional Air Quality Modeling System (RAQMS)Goddard Chemistry Aerosol Radiation and Transport model (GOCART)Goddard Earth Observing System Model v5 (GEOS-5)Community Multiscale Air Quality Modeling System (CMAQ)

36

Page 37: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

37

AOSC 652: Analysis Methods in AOSC

Different research groups use various file formats.

Many satellite teams use HDF while modelling groups prefer netCDF.

HDF:Aura (OMI, MLS, TES, HIRDLS)Aqua (AMSR-E, MODIS, AMSU-A, CERES, MODIS)

NetCDF:Whole-Atmosphere Community Climate Model (WACCM)Regional Air Quality Modeling System (RAQMS)Goddard Chemistry Aerosol Radiation and Transport model (GOCART)Goddard Earth Observing System Model v5 (GEOS-5)Community Multiscale Air Quality Modeling System (CMAQ)

NASA Aircraft Measurement Community ???

Page 38: AOSC 652: Week 11, Day 1 - UMD

Copyright © 2014 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch or Tim Canty. 10 Nov 2014

38

AOSC 652: Analysis Methods in AOSC

Different research groups use various file formats.

Many satellite teams use HDF while modelling groups prefer netCDF.

HDF:Aura (OMI, MLS, TES, HIRDLS)Aqua (AMSR-E, MODIS, AMSU-A, CERES, MODIS)

NetCDF:Whole-Atmosphere Community Climate Model (WACCM)Regional Air Quality Modeling System (RAQMS)Goddard Chemistry Aerosol Radiation and Transport model (GOCART)Goddard Earth Observing System Model v5 (GEOS-5)Community Multiscale Air Quality Modeling System (CMAQ)

NASA Aircraft Measurement Community uses other formats, the so-calledGaines/Hipskind (or ICARTT) suite of ASCII file formats

http://www-air.larc.nasa.gov/missions/etc/IcarttDataFormat.htm