Netcdf course 2008-10-28 Intro CF convention Netcdf excercises.

Slides:



Advertisements
Similar presentations
Data Formats: Using self-describing data formats Curt Tilmes NASA Version 1.0 Review Date.
Advertisements

Data Standards Workflow Raw dataScriptsDatabase Store raw data in subversion to keep track of history Stored files (netcdf) accessible through the web.
Reading HDF family of formats via NetCDF-Java / CDM
WMO GRIB as a Data Model Gil Ross, UK Met Office
Use of OpenEarthTools to make netCDF
Recent Work in Progress
The Model Output Interoperability Experiment in the Gulf of Maine: A Success Story Made Possible By CF, NcML, NetCDF-Java and THREDDS Rich Signell (USGS,
The NCAR Command Language (NCL) and the NetCDF Data Format Research Tools Presentation Matthew Janiga 10/30/2012.
Streaming NetCDF John Caron July What does NetCDF do for you? Data Storage: machine-, OS-, compiler-independent Standard API (Application Programming.
The Future of NetCDF Russ Rew UCAR Unidata Program Center Acknowledgments: John Caron, Ed Hartnett, NASA’s Earth Science Technology Office, National Science.
Introduction to NetCDF Ernesto Munoz. Outline Overview of NetCDF Overview of NetCDF NetCDF file information NetCDF file information CDL utilities: ncdump,
NetCDF 3.6: What’s New Russ Rew Unidata Program Center University Corporation for Atmospheric Research
Активное распределенное хранилище для многомерных массивов Дмитрий Медведев ИКИ РАН.
NetCDF Ed Hartnett Unidata/UCAR
Introduction to NetCDF Russ Rew, UCAR Unidata ICTP Advanced School on High Performance and Grid Computing 13 April 2011.
Status of netCDF-3, netCDF-4, and CF Conventions Russ Rew Community Standards for Unstructured Grids Workshop, Boulder
Show of Hands... How many traveled to be here? University/Gov't/Industry How many use netCDF? Primary programming language for netCDF? Other data formats.
1 NetCDF and Self-Describing Data Kate Hedstrom January 2010
Developing a NetCDF-4 Interface to HDF5 Data
OPeNDAP and the Data Access Protocol (DAP) Original version by Dave Fulker.
Data Formats: Using Self-describing Data Formats Curt Tilmes NASA Version 1.0 February 2013 Section: Local Data Management Copyright 2013 Curt Tilmes.
NetCDF-4 The Marriage of Two Data Formats Ed Hartnett, Unidata June, 2004.
Multidimensional Data and GIS Steve Kopp Nawajish Noman ESRI.
1 High level view of HDF5 Data structures and library HDF Summit Boeing Seattle September 19, 2006.
NetCDF for Developers and Data Providers Russ Rew, UCAR Unidata ICTP Advanced School on High Performance and Grid Computing 14 April 2011.
Unidata’s TDS Workshop TDS Overview – Part II October 2012.
DM_PPT_NP_v01 SESIP_0715_AJ HDF Product Designer Aleksandar Jelenak, H. Joe Lee, Ted Habermann Gerd Heber, John Readey, Joel Plutchak The HDF Group HDF.
THREDDS Data Server Ethan Davis GEOSS Climate Workshop 23 September 2011.
NetCDF-4 and Parallel I/O GSFC, Nov 20,2008 Ed Hartnett.
NetCDF for High Performance Computing Introduction to NetCDF What is netCDF? NetCDF Data Models How we think of data. NetCDF Software Libraries Using.
Mid-Course Review: NetCDF in the Current Proposal Period Russ Rew
Accomplishments and Remaining Challenges: THREDDS Data Server and Common Data Model Ethan Davis Unidata Policy Committee Meeting May 2011.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
NetCDF Operators 1 netCDF Operators [NCO]
Integrated Grid workflow for mesoscale weather modeling and visualization Zhizhin, M., A. Polyakov, D. Medvedev, A. Poyda, S. Berezin Space Research Institute.
Documentation from NcML to ISO Ted Habermann, NOAA NESDIS NGDC.
Project 4 : SciDAC All Hands Meeting, September 11-13, 2002 A. Choudhary, W. LiaoW. Gropp, R. Ross, R. Thakur Northwestern UniversityArgonne National Lab.
The HDF Group HDF/HDF-EOS Workshop XV1 Tools to Improve the Usability of NASA HDF Data Kent Yang and Joe Lee The HDF Group April 17, 2012.
Climate Data Formats Deniz Bozkurt
NetCDF file generated from ASDC CERES SSF Subsetter ATMOSPHERIC SCIENCE DATA CENTER Conversion of Archived HDF Satellite Level 2 Swath Data Products to.
Metadata Standards for Gridded Climate Data in the Earth System Grid Robert Drach LLNL/PCMDI UCRL-PRES
The HDF Group Introduction to netCDF-4 Elena Pourmal The HDF Group 110/17/2015.
NetCDF-4: Software Implementing an Enhanced Data Model for the Geosciences Russ Rew, Ed Hartnett, and John Caron UCAR Unidata Program, Boulder
NetCDF and Scientific Data Durability Russ Rew, UCAR Unidata ESIP Federation Summer Meeting
Data File Formats: netCDF by Tom Whittaker University of Wisconsin-Madison SSEC/CIMSS 2009 MUG Meeting June, 2009.
GIS for Atmospheric Sciences and Hydrology By David R. Maidment University of Texas at Austin National Center for Atmospheric Research, 6 July 2005.
UC 2006 Tech Session 1 NetCDF in ArcGIS 9.2. UC 2006 Tech Session2 Overview Introduction to Multidimensional DataIntroduction to Multidimensional Data.
CF 2.0 Coming Soon? (Climate and Forecast Conventions for netCDF) Ethan Davis ESO Developing Standards - ESIP Summer Mtg 14 July 2015.
Rich Signell Roland Viger Curtis Price USGS Community for Data Integration Feb 15, 2012.
NetCDF Operators 1 netCDF Operators [NCO]
NetCDF and binary read in MATLAB Pierre Chien 2009/03/19.
NetCDF: Data Model, Programming Interfaces, Conventions and Format Adapted from Presentations by Russ Rew Unidata Program Center University Corporation.
Update on Unidata Technologies for Data Access Russ Rew
Unidata Infrastructure for Data Services Russ Rew GO-ESSP Workshop, LLNL
Libcf – A CF Convention Library for NetCDF Ed Hartnett Unidata Program Center Boulder Colorado June 11, 2007.
NetCDF-Java version 2.2 Common Data Model John Caron Unidata/UCAR Dec 10, 2004.
Data Browsing/Mining/Metadata
Adding CF Attributes to an HDF5 File
IRI Data Library Overview
Efficiently serving HDF5 via OPeNDAP
MATLAB, netCDF, and OPeNDAP
National Scientific Library at Tbilisi State University
CEE 6440 GIS in Water Resources Fall 2004 Term Paper Presentation
NetCDF and Scientific Data Standard
Interface to the current CCPP: A simple model’s perspective
Status for Endeavor 6: Improved Scientific Data Access Infrastructure
Libcf – A CF Convention Library for NetCDF
HDF-EOS Workshop XXI / The 2018 ESIP Summer Meeting
ExPLORE Complex Oceanographic Data
ECMWF usage, governance and perspectives
Presentation transcript:

Netcdf course Intro CF convention Netcdf excercises

File format library for fortran, c, c++, java, etc... text, xml and binary format From netcdf4 HDF storage NetCDF

Data model NetCDF Data model for netcdf and others. Also usable for hdf, opendap, grib, etc. See the java library for details Data model for netcdf and others. Also usable for hdf, opendap, grib, etc. See the java library for details

>> url = ' TM/w100w20s10n90.nc'; TM/w100w20s10n90.nc' >> lon = nc_varget ( url, 'lon' ); >> size(lon) ans = >> lon(1:5) ans = Matlab Using the open source MEXNC you can read and write netcdf from matlab.

ArcGis ArcGis also reads and writes netcdf files.

‘VBA interface to netcdf ReDim myVar(0 To dimLen - 1) 'Open File status = nc_open(fileName, NC_NOWRITE, ncid) status = nc_inq_varid(ncid, varName, varid) status = nc_get_var_int(ncid, varid, myVar(0)) Excel Excel is limited to rows. Be careful! Excel only understands 1D & 2D. Excel is limited to rows. Be careful! Excel only understands 1D & 2D.

Emacs xml representation of a netcdf file

Other Tools NCO #diff ncdiff -v time file1.nc file2.nc #compression & packingncpdq -4 -L 9 in.nc out.nc # Deflated packing (~80% lossy compression) #selecting variables by regex ncks -v '^Q..' in.nc # Q01--Q99, QAA--QZZ, etc. IDV Very useful Web hyperslabs, cool! Not so stable.

Why netcdf? Open standard Transparent path to improvement Prepares us for future innovations CF Standard

Use case Customer finds a output file and wants to understand it? CF Standard

What? (Quantity) Where? (Location, cell centered, sigma, coordinate system?, projection?) When? (Time, calendar, interval, timezone?) How much? (Value, unit,, cell method) An output file should contain:

Open standard Climate & Forecasting Metadata convention – Version 1.3, 9 October, 2008 – Main contributors: NOAA, MetOffice, UCAR, NCAR, USGS, PCMDI Formalized yet open Well designed CF Standard

Open standard What is standardized? – Variable names – Units – Locations (lat, lon) – Levels (z, sigma, bar) – Cells (boundaries, measures) – Time CF Standard

Variable names runoff_amount: "Amount" means mass per unit area. Runoff is the liquid water which drains from land. If not specified,.... accordance runoff_flux: Runoff is the liquid water which drains from land. If not specified, "runoff" refers to the sum of surface runoff and subsurface drainage. In accordance with common... CF Standard

Variable names sea_water_potential_temperature: Potential temperature is the temperature a parcel of air or sea water would have if moved adiabatically to sea level pressure. normalized_difference_vegetation_inde x: "Normalized_difference_vegetation_ind ex", usually abbreviated to NDVI, is an index calculated from reflectances.... CF Standard

Variable names standard-names (v10 21 oktober) standard-names CF Standard

Netcdf Excercise

Checkout dhs-cursus

Add dependency

Create dependency Right click project -> project dependencies f77_netcdf f90_netcdf netcdf program

Add include directory

Data model NetCDF Data model for netcdf and others. Also usable for hdf, opendap, grib, etc. See the java library for details Data model for netcdf and others. Also usable for hdf, opendap, grib, etc. See the java library for details

Dataset functions NF90_CREATE NF90_OPEN NF90_CLOSE NF90_REDEF NF90_ENDDEF NF90_INQUIRE Family NF90_INQ_LIBVERS NF90_STRERROR NF90_SET_FILL

NF90_CREATE function nf90_create(path, cmode, ncid) character (len = *), intent(in ) :: path integer, intent(in ) :: cmode integer, optional, intent(in ) :: initialsize integer, optional, intent(inout) :: chunksize integer, intent( out) :: ncid integer :: nf90_create

NF90_CREATE

Dimensions NF90_DEF_DIM NF90_INQ_DIMID NF90_INQUIRE_DIMENSION NF90_RENAME_DIM

NF90_DEF_DIM function nf90_def_dim(ncid, name, len, dimid) integer, intent( in) :: ncid character (len = *), intent( in) :: name integer, intent( in) :: len integer, intent(out) :: dimid integer :: nf90_def_dim

NF90_DEF_DIM

Attributes NF90_PUT_ATT NF90_INQUIRE_ATTRIBUTE NF90_GET_ATT NF90_COPY_ATT NF90_RENAME_ATT NF90_DEL_ATT

NF90_PUT_ATT function nf90_put_att(ncid, varid, name, values) integer, intent( in) :: ncid, varid character(len = *), intent( in) :: name any valid type, scalar or array of rank 1, & intent( in) :: values integer :: nf90_put_att

NF90_PUT_ATT

Variables NF90_DEF_VAR: Create a VariableNF90_DEF_VAR NF90_DEF_VAR_CHUNKING: Set Var Chunking ParametersNF90_DEF_VAR_CHUNKING NF90_INQ_VAR_CHUNKING: Get Var Chunking ParametersNF90_INQ_VAR_CHUNKING NF90_DEF_VAR_DEFLATE: Set Var Compression ParametersNF90_DEF_VAR_DEFLATE NF90_INQ_VAR_DEFLATE: Get Var Compression ParametersNF90_INQ_VAR_DEFLATE NF90_DEF_VAR_FLETCHER32: Set Var Fletcher32 FilterNF90_DEF_VAR_FLETCHER32 NF90_INQ_VAR_FLETCHER32: Get Var Fletcher32 FilterNF90_INQ_VAR_FLETCHER32 NF90_DEF_VAR_ENDIAN: Set Var EndiannessNF90_DEF_VAR_ENDIAN NF90_INQ_VAR_ENDIAN: Get Var EndiannessNF90_INQ_VAR_ENDIAN NF90_INQUIRE_VARIABLE: Get Var MetadataNF90_INQUIRE_VARIABLE NF90_PUT_VAR: Write dataNF90_PUT_VAR NF90_GET_VAR: Read dataNF90_GET_VAR NF90_RENAME_VAR

NF90_DEF_VAR function nf90_def_var(ncid, name, xtype, dimids, varid) integer, intent( in) :: ncid character (len = *), intent( in) :: name integer, intent( in) :: xtype integer, dimension(:), intent( in) :: dimids integer, intent(out) :: varid integer :: nf90_def_var

NF90_DEF_VAR

NF90_PUT_VAR function nf90_put_var(ncid, varid, values, start, count, stride, map) integer, intent( in) :: ncid, varid any valid type, scalar or array of any rank, & intent( in) :: values integer, dimension(:), optional, intent( in) :: start, count, stride, map integer :: nf90_put_var

NF90_PUT_VAR

NF90_OPEN function nf90_open(path, mode, ncid, chunksize) character (len = *), intent(in ) :: path integer, intent(in ) :: mode integer, intent( out) :: ncid integer, optional, intent(inout) :: chunksize integer :: nf90_open

NF90_INQUIRE function nf90_inquire(ncid, nDimensions, nVariables, nAttributes, & unlimitedDimId, formatNum) integer, intent( in) :: ncid integer, optional, intent(out) :: nDimensions, nVariables, & nAttributes, unlimitedDimId, & formatNum integer :: nf90_inquire

NF90_INQUIRE

NF90_INQUIRE_VARIABLE function nf90_inquire_variable(ncid, varid, name, xtype, ndims, dimids, nAtts) integer, intent( in) :: ncid, varid character (len = *), optional, intent(out) :: name integer, optional, intent(out) :: xtype, ndims integer, dimension(*), optional, intent(out) :: dimids integer, optional, intent(out) :: nAtts integer :: nf90_inquire_variable

NF90_INQUIRE_VARIABLE

Read the data using nf90_inquire_attributes nf90_get_var