Providing data services, tools and cyberinfrastructure leadership The Unidata UDUNITS-2 Package for the Handling of Units of Physical Quantities Steve.

Slides:



Advertisements
Similar presentations
Esperanza Rising 9a: Reviewing Character Responses to Challenges
Advertisements

Metric Measurements.
CS193H: High Performance Web Sites Lecture 17: Rule 14 – Make Ajax Cacheable Steve Souders Google
The creation of "Yaolan.com" A Site for Pre-natal and Parenting Education in Chinese by James Caldwell DAE Interactive Marketing a Web Connection Company.
Math – Chapter 8 Lesson 1 – Understanding Length and Height Length – how long something is from one end to the other Height – distance from the bottom.
Lecture 11 Macroeconomic Analysis 2003 Approaches to Macroeconomics.
Princess Sumaya University Dr. Bassam Kahhaleh
Copyright © Steven W. Johnson
Any quantity we measure,( length, mass, volume… ) a number and unit consists of a number and unit If we are given a quantity in one type of unit, and.
Unit 1 Using SI Units.
Building International Applications with Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corporation.
Data Representation. Units & Prefixes Review kilo, mega, and giga are different in binary! bit (b) – binary digit Byte (B) – 8 binary digits KiloByte.
NCAR Aviation Facility Processing Software. Current System Architecture Raw Data Processor On The Ground In Flight netCDF file WINDS Display Display &
SI Units and Standards of Measurement
Discovering Computers & Microsoft Office 2010 Discovering Computers Chapter 3.
Chemistry: SI Units & Conversions
21-July-111 University of Toronto Radioactive materials In Progress ELMER (
Dimensional Analysis. When you convert a given result from one system of units to another Method called unit factor method, or dimensional analysis.
CS 1 Introduction CS 1 Part 11. Hardware 1.Central Processing Unit (CPU) 2.Main Memory 3.Secondary Memory / Storage 4.Input Devices 5.Output Devices CS.
Data Formats: Using self-describing data formats Curt Tilmes NASA Version 1.0 Review Date.
Lecture 4 Sending and Receiving Messages Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
1 XML Web Services Practical Implementations Bob Steemson Product Architect iSOFT plc.
 2000 Prentice Hall, Inc. All rights reserved Fundamentals of Strings and Characters String declarations –Declare as a character array or a variable.
Copyright © 2011 Pearson Education, Inc. Approaches to Problem Solving.
Ratios & Rates. What is a ratio? A ratio is the comparison between two quantities Have we studied anything that would be considered a ratio? Fractions.
Unit Systems Conversions Powers of 10 Physical Quantities Dimensions
Data Representation Kieran Mathieson. Outline Digital constraints Data types Integer Real Character Boolean Memory address.
CHEMISTRY IS LARGELY A QUANTITATIVE SCIENCE
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
International system of unit. International system of units.
Status of netCDF-3, netCDF-4, and CF Conventions Russ Rew Community Standards for Unstructured Grids Workshop, Boulder
Today’s Lesson Dimensional Analysis
Subcommittee 3D DATA SETS FOR LIBRARIES. SC 3D Exchange of dictionary data Cape Town, (Cape Town/Radley)3 Donald Radley Chairman, SC3D.
Ratios and Units of Measure
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Lecture 2 Fundamental Data Types. Variable Declaration.
Binary, Decimal and Hexadecimal Numbers Svetlin Nakov Telerik Corporation
Essential Questions How do I convert from one unit to another?
Chapter 1 Introduction. 2 Hints on Problem Solving First –Make a sketch –Mark on it what you want to know –Identify what you are trying to determine This.
Mathematics Math in Physics 1 What is a physical quantity? A physical quantity is any quantity that can be measured with a certain mathematical precision.
Chapter 2 Standards of Measurement Objectives:  Understand Mass and Weight (2.1)  Identify the metric units of measurement (2.6)  Explain what causes.
MEASUREMENTS AND CONVERSIONS. METRIC BASE UNITS Length – Meter (m) Mass – Gram (g) Volume – Liter (L) Time – Seconds (s) Temperature – Kelvin (K) Celsius.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
Chapter 2 – Section 2 Suggested Reading Pages 33-42
JSON Java Script Object Notation Copyright © 2013 Curt Hill.
CS360 Windows Programming
Fractions of Quantities
NetCDF and Scientific Data Durability Russ Rew, UCAR Unidata ESIP Federation Summer Meeting
Web Services from 10,000 feet Part I Tom Perkins NTPCUG CertSIG XML Web Services.
PQDIF PQDIF: A Technical Overview Prepared by: Erich Gunther, Bill Dabbs, and Rob Scott Electrotek Concepts, Inc. NEW! IMPROVED!
Understanding Character Encodings Basics of Character Encodings that all Programmers should Know. Pritam Barhate, Cofounder and CTO Mobisoft Infotech.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Numbers and Measurement measurements often very small or very large to handle these numbers, we use scientific notation.
Ch 5 Measurements Scientific measurements are based on the metric system. This is a decimal based system that uses a system of prefixes to relate the magnitude.
XML Extensible Markup Language
Lecture 11 Introduction to R and Accessing USGS Data from Web Services Jeffery S. Horsburgh Hydroinformatics Fall 2013 This work was funded by National.
The UDUNITS-2 Package for Handling Units of Physical Quantities Steve Emmerson 2011 Unidata netCDF Workshop.
Dimensional Analysis. What is Dimensional Analysis? Have you ever used a map? Since the map is a small-scale representation of a large area, there is.
SIERRA ROBERTS MATHEMATICS ARITHMETICS
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
BINARY CODE.
Dimensional Analysis.
4.7 Ratios, Proportions, & Converting Units of Measure
Binary, Decimal and Hexadecimal Numbers
Classes, Libraries & Packages
Chapter Two: Introduction to Engineering Calculations
1.7 – Dimensional Analysis
Direct Conversions Dr. Shildneck.
Presentation transcript:

providing data services, tools and cyberinfrastructure leadership The Unidata UDUNITS-2 Package for the Handling of Units of Physical Quantities Steve Emmerson 2012 Unidata netCDF Workshop

providing data services, tools and cyberinfrastructure leadership What About the Package? Programmatically converts between string specifications of units of physical quantities and internal binary representations Operates on the binary unit representation – Unary Operations: raise to a power, logarithm, etc. – Binary Operations: multiply, divide, compare, etc. Converts numeric values between binary unit representations Has a library and a utility (program) Has a user-editable database Written in C

providing data services, tools and cyberinfrastructure leadership Converting from String to Binary include... ut_system* system = ut_read_xml(NULL); ut_unit* watt = ut_parse(system, “joule/second”, UT_ASCII); ut_unit* fahrenheit = ut_parse(system, ”, UT_ASCII); ut_unit* wattPerOhm = ut_parse(system, “(kg·m²)/(s³·Ω)”, UT_LATIN1); The supported characters encodings are US ASCII, ISO (Latin-1), and UTF-8 (Unicode)

providing data services, tools and cyberinfrastructure leadership Unary Operations include … ut_unit* yard = ut_scale(3, foot); ut_unit* celsius = ut_offset(kelvin, ); ut_unit* meter2 = ut_raise(meter, 2); ut_unit* meter = ut_root(meter2, 2); ut_unit* bel1mW = ut_log(10, milliwatt); … ut_free(yard);

providing data services, tools and cyberinfrastructure leadership Binary Operations include … ut_unit* newtonMeter = ut_multiply(newton, meter); ut_unit* meterPerSecond = ut_divide(meter, second); … if (ut_compare(unit1, unit2) == 0) { /* Same units */ … }

providing data services, tools and cyberinfrastructure leadership Converting Values include … if (ut_are_convertible(foot, meter)) { cv_converter* ft2m = ut_get_converter(foot, meter); float meter = cv_convert_float(ft2m, 3); float* feet = …; /* input array of n floats */ float* meters = …; /* output array of n floats */ cv_convert_floats(ft2m, feet, n, meters); // _doubles(…) cv_free(ft2m); }

providing data services, tools and cyberinfrastructure leadership UDUNITS-2 Utility $ udunits2 -A udunits2: using default XML database You have: watt You want: m2.kg.s-3 You have: furlongs/fortnight You want: cm/minute 1 furlongs/fortnight = cm/minute x/(cm/minute) = (x/(furlongs/fortnight)) You have: ^D $

providing data services, tools and cyberinfrastructure leadership XML Database udunits2-prefixes.xml udunits2-base.xml udunits2-derived.xml udunits2-accepted.xml udunits2-common.xml

providing data services, tools and cyberinfrastructure leadership XML Database of Common Units e-1 kg avoirdupois_pound pound lb …

providing data services, tools and cyberinfrastructure leadership Challenges No Fortran support in the package yet, but Michel Valin has a Fortran-2003 interface module on GitHub: Timestamp “units” – Example: “seconds since :17:00 -6:00” – Gregorian calendar only (ergo, no 360-day calendars) – No leap seconds – Appropriate for simple situations only

providing data services, tools and cyberinfrastructure leadership Resources Web Site Homepage FOSS Repository Support