1 / 11

n emsio library

n emsio library. Jun Wang, Mark Iredell. Introduction. nemsio is a package to support input/output in NOAA Environmental Modeling System (NEMS) Current NEMSIO can handle binary data and GRIB-1 data NEMSIO has serial version and MPI version. DATA STRUCTURE.

berny
Download Presentation

n emsio library

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. nemsio library Jun Wang, Mark Iredell

  2. Introduction • nemsio is a package to support input/output in NOAA Environmental Modeling System (NEMS) • Current NEMSIO can handle binary data and GRIB-1 data • NEMSIO has serial version and MPI version

  3. DATA STRUCTURE • A NEMSIO file contains two parts: meta data and data fields. • Meta data: • Standard model meta data • User defined meta data (optional) • Data fields: • Same dimension for all the fields • Real kind (4 or 8 bytes real) • Same format for all the fields

  4. Standard meta data • required by NEMS model applications such as NMMB and GFS and NCEP GSI • Total 12 meta data records, can be reduced by users • First 2 meta data are required in all cases: • Gtype, gdatatype, modelname,version, nmeta • Nrec, idate, forecast time, dimention, nframe, nsoil, ntrac,jcap,ncldt,idsl,idvc,idvm,idrt,rlon_min, rlon_max,rlat_min,rlat_max • 10 other meta data records: recname, reclevtyp and reclev (meta data 3:5), vcoord,lat,lon,dx,dy,Cpi,Ri

  5. User defined meta data • extrameta in second standard meta data indicates if there are any user defined meta data • User defined mata data can have 5 data type: integer, real(4), real(8), logical and character(16) • if extrameta is true, meta data record exists: • Nmetavari,nmetavarr,nmetavarl,nmetavarc,nmetavarr8 • Nmetaaryi,nmetaaryr,nmetaaryl,nmetaaryc,nmetaaryr8 • User defined meta data records holds each meta data’s name, length (for array) and value

  6. nemsio interfaces –serial version • nemsio_init(iret) • nemsio_finalize(iret) • nemsio_open(gfile,gname,'read|write|rdwr',optarg,iret) • nemsio_close(gfile, iret) • nemsio_getfilehead(gfile,optargs,iret) • nemsio_getheadvar(gfile,argname,argval,iret) • nemsio_getrechead(gfile,jrec,vname,vlevtyp,vlev,iret) • nemsio_setfilehead(gfile,optarg,iret) • nemsio_readrec(gfile,jrec,data,nframe,iret) • nemsio_readrecv(gfile,name,levtyp,lev,data,nframe,iret) • nemsio_writerec(gfile,jrec,itr,zhour,data,iret) • nemsio_writerecv(gfile,name,levtyp,lev,itr,zhour,data,iret)

  7. nemsio parallel version • Using MPI 2 • More efficient for file size ~GB

  8. nemsio interface – parallel version • nemsio_open(gfile,gfname,gaction,mpi_comm,optargs,iret) • nemsio_denseread(gfile,ista,iend,jsta,jend,data,iret) • nemsio_densewrite(gfile,ista,iend,jsta,jend,data,jrecs,jrece,iret)

  9. Utilities for nemsio files • nemsio_read: read a nemsio file, list all the meta data information and maxium/minium of each data field • nemsio_get: get value of a specific meta data variable or a data field • mknmmbctl: create .ctl file from a nemsio file for viewing the data in Grads • nemsio_cvt: convert a nemsio file from big/little endian to little/big endian

  10. Future work • Add GRIB2 format data type • Add NetCDF data type

  11. Documentation • http://www.emc.ncep.noaa.gov/NEMS/nemsio.php

More Related