SlideShare a Scribd company logo
1 of 52
Download to read offline
Visualizing
JMA High-Resolution GSM
    Data with GrADS
  Numerical Prediction Division
   Forecast Department, JMA
Contents
Getting Meteorological Data
   JMA High Resolution GSM Data Service
Preparing for Visualization
Visualizing Data with GrADS
   Basic interactive operation
   Customizing images
   Converting images
Scripting with GrADS
                                           2
JMA High-Resolution GSM
      Data Service
       Established in Jan. 2009
       Target: NMHSs
           Mainly in WMO Region II
       Model: GSM(TL959)
       Data Format: GRIB2
       Preservation Term: Latest 7 days




                                      3
Profile (Global)
                           Upper Air                          Surface
Resolution        0.5deg (720 x 361)                          0.25deg (1440 x 721)
Region            Lon: 0E – 180 – 0W, Lat: 90S – 90N
Initial Time      00, 06, 12, 18 UTC (4 times per day)
Forecast Time     00 to 84 hours by 3 hours (any initials)
                  90 to 216 hours by 6 hours (12UTC initial only)
Levels            21 (1000, 975, 950, 925, 900,   1 (surf)
                  850, 800, 700, 600, 500, 400,
                  300, 250, 200, 150, 100, 70,
                  50, 30, 20, 10 hPa)
                  * All levels in one file
Elements          U, V, T, Rh, Z, Omg             U, V, T, Rh, Ps, Psea, Rain,
                  Stream Function, Velocity       Cloudiness (total, high, middle,
                  Potential (at 850, 250 hPa)     low)
                  Vorticity (at 500 hPa)
File size (gzip   40MB                            5MB         12MB
compressed)                                                                      4
Profile (WMO Region II)
                           Upper Air                           Surface
Resolution        0.5deg (331 x 191)                           0.25deg (661 x 381)
Region            Lon: 30E – 180 – 165W, Lat: 5S – 90N
Initial Time      00, 06, 12, 18 UTC (4 times per day)
Forecast Time     00 to 84 hours by 3 hours (any initials)
                  90 to 216 hours by 6 hours (12UTC initial only)
Levels            21 (1000, 975, 950, 925, 900,    1 (surf)
                  850, 800, 700, 600, 500, 400,
                  300, 250, 200, 150, 100, 70,
                  50, 30, 20, 10 hPa)
                  * Separated 21 files by levels
Elements          U, V, T, Rh, Z, Omg              U, V, T, Rh, Ps, Psea, Rain,
                  Stream Function, Velocity        Cloudiness (total, high, middle,
                  Potential (at 850, 250 hPa)      low)
                  Vorticity (at 500 hPa)
File size (gzip   500 – 700KB                      800KB       3MB
compressed)                                                                       5
Directories of Server
200910011800/ Initial Date/Time (format: YYYYMMDDhhmm)
  gl/                       Global region
        0p5/                0.5deg. resolution
           p-all/            1000hPa – 10hPa Levels in one file
                 0000/
                    Z__C_RJTD_20091001180000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0000_grib2.bin.gz
                 0003/
                    Z__C_RJTD_20091001180000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0003_grib2.bin.gz
                  :
           surf/             Surface
        0p25/               0.25deg. resolution
           surf/
  ra2/               WMO Region II
        0p5/
           p1000/           Level 1000hPa only
                 0000/      FT = 00 days 00 hours
                  :
           p975/            Level 975hPa only
             :
           p10/
           surf/            Surface
        0p25/
           surf/
                                                                                         6
Naming rule of data files
              [R]egion:            [L]evels                  gzip compressed
              gl: Global           -pall: All upper levels   GRIB2 format
              ra2: WMO RA II       pLLL: LLL hPa
                                   surf: Surface



Z__C_RJTD_20091002000000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.gz


                         Resolution:
 Initial Date/Time       0p5: 0.5 degrees             FD: Forecast Date/Time
 YYYYMMDDhhmmss          0p25: 0.25 degrees           DDhh: DD days, hh hours




                                                                          7
How to apply service

 Ask to “Contact Person” of your NHMS.



                                              We sent a letter and
      Fill the application, and send it     application of this service
           to contact point of JMA.               in Jan. 2009.


                                             E-mail address of the
       Obtain account ID/Password           contact point is written in
              of this service.                  the application.


                                                 We inform you
Access to this service and download GPVs.         by e-mail.
             (by FTP protocol)
                                                                    8
Workflow for processing
         meteorological data
    Access JMA High Resolution GSM
     Website, and research products



   Download products (GPV data files)              Requirements:
           (Format: GRIB2)                         ID / Password




Prepare meta files (or convert data format)   e.g.) grib2ctl.pl, g2ctl.pl,
                 with tools                       gribmap, wgrib2




                                                 e.g.) OpenGrADS
  Visualize data with tools / applications
                                                                         9
What’s GRIB?
GRIB (GRIdded Binary)
   CBS(Commission for Basic Systems)/WMO
    Data format
      Described in WMO Manual on Codes No.306
   For the storage and the exchange of Weather
    Products in Gridded Binary Form
   Editions:
      GRIB(GRIB1): Used world-wide for NWP
      GRIB2: Latest edition (much different in format)
                                    See References: p.40 - 41
                                                                10
Tools for GRIB/GRIB2
Decoding tools
   wgrib : decoding / converting GRIB data file
   wgrib2 : decoding / converting GRIB2 data file
Preprocessing tools for GrADS
   grib2ctl.pl : making GrADS control file from GRIB data file
   g2ctl.pl : making GrADS control file from GRIB2 data file
   gribmap : making GrADS index file from GRIB or GRIB2
    data file

    Note: ‘wgrib’, ‘wgrib2’, and ‘gribmap’ are installed with GrADS
          (‘Windows superpack’ edition).
         ‘grib2ctl.pl’ and ‘g2ctl.pl’ are Perl scripts. They require Perl.   11
What’s GrADS?
       GrADS(The Grid Analysis and Display System)
           Interactive desktop tool
           Commonly used for easy access, manipulation, and
            visualization of earth science data
           CUI(Character User Interface) / GUI(Graphical User
            Interface) Application
       OpenGrADS
           Based on ‘GrADS’
           Open Source
               Available sources/binaries
               of several OSs
           Some useful Extensions
            (User Defined
             Commands/Functions)
                                                                                    12
For details: http://www.iges.org/grads (GrADS), http://opengrads.org/ (OpenGrADS)
What’s GrADS?
       Display Window
                               Enter commands, and
                              Set visualizing properties




 Visualize image in
synchronization with
    commands
                            Console Window           13
Installing grib2ctl.pl, g2ctl.pl
Download Perl scripts from
“CPC/NOAA” website, and
allocate them adequately
   grib2ctl.pl
       http://www.cpc.noaa.gov/products
       /wesley/grib2ctl.html
   g2ctl.pl
       http://www.cpc.noaa.gov/products
       /wesley/g2ctl.html
Download and Install Perl
   ActivePerl (for Windows)
       http://downloads.activestate.com/
       ActivePerl/Windows/5.10/ActiveP
       erl-5.10.1.1006-MSWin32-x86-
       291086.msi

                                           14
Installing GrADS
            (Windows)
Download installation
binary (.exe) from
“SourceForge” website
   Filename:
    grads-2.0.*-
    win32_superpack.exe
Execute the binary
   Automatic installation
   Follow installer’s guidance
    For details:
    http://opengrads.org/wiki/index.php?title=Installing
    _GrADS_v2.0_on_Microsoft_Windows                       15
Installed GrADS Directories
                                   e.g.) C:¥OpenGrADS
GrADS_ROOT/
 Contents/ --- map data bases, GrADS fonts
    Resources/
       SampleDatasets/ --- sample data files
       Documentation/ --- user’s guide, references, and so on.
       Scripts/ --- GrADS utility scripts
       SupportData/ --- fonts, coastal data
       Xming/ --- bundled Xming X window server
    Cygwin/ --- programs, DLLs
 Classic/ --- Shortcuts for conventional user.

                                                                 16
Requirements for visualizing with GrADS
                                      Requirements
Data Format
                        Data file               Configuration file
32bit IEEE
                    binary data file                 control file     by yourself
floats


                     GRIB data file                  control file
GRIB
                  ‘wgrib’     ‘grib2ctl.pl’              index file   ‘gribmap’



                    GRIB2 data file                 control file
GRIB2
                  ‘wgrib2’     ‘g2ctl.pl’            index file       ‘gribmap’



NetCDF             NetCDF data file                        none

        self-describing data formats developed by UCAR                            17
Preparation for GRIB / GRIB2
GRIB2
                                                  If the data contain forecast, use ‘-verf’.
       (1) Create control file                              (If analysis, use ‘-0’)
 from GRIB2 data file with ‘g2ctl.pl’
                                $ perl g2ctl.pl –verf data.grib2.bin > data.ctl


                                           Data file name

                                                                          You can name the
                                                                          control file name.
         (2) Create index file
     from control file with ‘gribmap’
                                $ gribmap –i data.ctl -e
                                                                          Automatically
                                                                        creates ‘.idx’ file.
GRIB
      (1) Create control file
from GRIB data file with ‘grib2ctl.pl’
                                $ perl grib2ctl.pl –verf data.grib.bin > data.ctl

                                                                                        18
Control file (GRIB2): Sample
dset ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin
index ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.idx
undef 9.999E+20
title GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin
* produced by g2ctl v0.0.4n
* griddef=1.1:0:(720 x 361):grid_template=0:lat-lon grid:(720 x 361) units 1e-006
  input WE:NS output WE:SN res 48 lat 90.0 to -90.0 by 0.5 lon 0.0 to 359.5 by 0.5
  #points=259920:winds(N/S)
dtype grib2
ydef 361 linear -90.000000 0.5
xdef 720 linear 0.000000 0.500000
tdef 1 linear 12Z22aug2009 1mo
* PROFILE hPa
zdef 21 levels 100000 97500 95000 92500 90000 85000 80000 70000 60000 50000 40000 30000
                25000 20000 15000 10000 7000 5000 3000 2000 1000
options pascals
vars 11
HGTprs     21,100 0,3,5 ** (1000 975 950 925.. 50 30 20 10) Geopotential Height [gpm]
RELV500mb   0,100,50000 0,2,12 ** 500 mb Relative Vorticity [1/s]
RHprs      21,100 0,1,1 ** (1000 975 950 925.. 50 30 20 10) Relative Humidity [%]
STRM850mb   0,100,85000 0,2,4 ** 850 mb Stream Function [m^2/s]
STRM200mb   0,100,20000 0,2,4 ** 200 mb Stream Function [m^2/s]
TMPprs     21,100 0,0,0 ** (1000 975 950 925.. 50 30 20 10) Temperature [K]
UGRDprs    21,100 0,2,2 ** (1000 975 950 925.. 50 30 20 10) U-Component of Wind [m/s]
VGRDprs    21,100 0,2,3 ** (1000 975 950 925.. 50 30 20 10) V-Component of Wind [m/s]
VPOT850mb   0,100,85000 0,2,5 ** 850 mb Velocity Potential [m^2/s]
VPOT200mb   0,100,20000 0,2,5 ** 200 mb Velocity Potential [m^2/s]
VVELprs    21,100 0,2,8 ** (1000 975 950 925.. 50 30 20 10) Vertical Velocity (Pressure) [Pa/s]
ENDVARS

                                                                                         19
Control file (GRIB2): Sample
  “^” indicates same directory
         with control file.

dset ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin                                       Data file path
index ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.idx
undef 9.999E+20                                                                          Index file path
title GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin
* produced by g2ctl v0.0.4n                                      Definition of ‘undefined value’ (=No Data)
* griddef=1.1:0:(720 x 361):grid_template=0:lat-lon grid:(720 x 361) units 1e-006
  input WE:NS output WE:SN res 48 lat 90.0 to -90.0 by 0.5 lon 0.0 to 359.5 by 0.5 Title
  #points=259920:winds(N/S)
dtype grib2                                                                                 Comment
ydef 361 linear -90.000000 0.5
xdef 720 linear 0.000000 0.500000                               Grid definition for Y-axis (grid size, latitude
tdef 1 linear 12Z22aug2009 1mo                                            of southern end, interval)
* PROFILE hPa                                                  Grid definition for X-axis (grid size, longitude
zdef 21 levels 100000 97500 95000 92500 90000 85000 80000 70000 60000 of western end, interval)
                                                                           50000 40000 30000
                25000 20000 15000 10000 7000 5000 3000 2000 1000
options pascals                                                   Grid definition for Time-axis (size, initial
vars 11                                                                       date/time, interval)
HGTprs     21,100Number and information
                    0,3,5 ** (1000 975 950 925.. 50 30 20 10) Geopotential Height [gpm]
RELV500mb   0,100,50000 elements ** 500 mb Relative Vorticity [1/s] definition for Vertical-axis (grid size,
                      of 0,2,12                                  Grid
RHprs      21,100 0,1,1 ** (1000 975 950 925.. 50 30 20 10) Relative Humidity [%]    levels)
STRM850mb   0,100,85000 0,2,4 ** 850 mb Stream Function [m^2/s]
STRM200mb   0,100,20000 0,2,4 ** 200 mb Stream Function [m^2/s]
TMPprs     21,100 0,0,0 ** (1000 975 950 925.. 50 30 20 10) Temperature [K]
UGRDprs    21,100 0,2,2 ** (1000 975 950 925.. 50 30 20 10) U-Component of Wind [m/s]
VGRDprs    21,100 0,2,3 ** (1000 975 950 925.. 50 30 20 10) V-Component of Wind [m/s]
VPOT850mb   0,100,85000 0,2,5 ** 850 mb Velocity Potential [m^2/s]
VPOT200mb   0,100,20000 0,2,5 ** 200 mb Velocity Potential [m^2/s]
VVELprs    21,100 0,2,8 ** (1000 975 950 925.. 50 30 20 10) Vertical Velocity (Pressure) [Pa/s]
ENDVARS

                                                                                                        20
Preparation for time-series dataset
  How to treat separated data files by forecast time
      Concatenate GRIB files by “cat” command before making
       Control file
GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0000_grib2.bin
GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0003_grib2.bin
GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0006_grib2.bin
   :                                            Command “cat” :
   :
GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin
                                                1) Display contents of file
                                                2) Concatenate files

                          $ cat GSM_GPV_Rgl_Gll0p5deg_L-pall_*_grib2.bin
                           > GSM_GPV_Rgl_Gll0p5deg_L-pall_grib2.bin


GSM_GPV_Rgl_Gll0p5deg_L-pall_grib2.bin



                          $ g2ctl ……
                          $ gribmap ……                                        21
- How to use GrADS -
  Visualizing by GrADS CUI
- Lesson 1 : How to launch GrADS -
( 1 ) Launch Command Prompt (Shell) and GrADS
                                          Command prompt which
                                          enables using ‘bash’ for
                                                Unix/Linux.
                                           (Powered by Cygwin)




  Launch GrADS
 command prompt
     directly.


                  Enter ‘grads’
                                                 Select shape of
                                                     display:
                                                Enter ‘yes’ or ‘no’
                   Enter GrADS commands                       22
- How to use GrADS -
  Visualizing by GrADS CUI
- Lesson 2 : How to open data and visualize them -
( 2 ) Open control file. ( “ga->” means GrADS command prompt)
      ga-> open data.ctl
                              Control file name that was
                                 created by g2ctl.pl
( 3 ) Check available elements.
                                                           Italic words depend
      ga-> q ctlinfo      (query ctlinfo)                         on your
                                                           environment / setting
( 4 ) Visualize for an element (e.g. Surf. Pres.).
      ga-> d pressfc (display pressfc)

                             Element name is shown
( 5 ) Clear screen.           in results of ‘q ctlinfo’.

      ga-> c (clear)                      To reset settings,
                                             use ‘reinit’.                    23
- How to use GrADS -
  Visualizing by GrADS CUI
- Lesson 3 : How to draw by various rendering methods -

( 6 ) Use ‘contour’ option (default).
      ga-> set gxout contour
      ga-> d pressfc

( 7 ) Use ‘grid-fill’ option.
      ga-> set gxout grfill
      ga-> d pressfc

( 8 ) Overlay ‘shaded’ and ‘contour’ images.
      ga->   set gxout shaded
      ga->   d pressfc
      ga->   set gxout contour
      ga->   d pressfc
                                                              24
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 4 : How to change latitude and longitude -

( 6 ) Set latitude range
     ga-> set LAT -15 25


       Latitude Range (South North)
       ( South Latitude: negative value )

( 7 ) Set longitude range
     ga-> set LON 90 150


      Longitude Range (West East)
      ( West Longitude: negative value )
                                                           25
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 5 : How to change level -
  ( 8 ) Change level.
      ga-> set LEV 500

 ( 9 ) Visualize data (e.g. Geopotential height)
      ga-> d hgtprs        # Draw Z at 500hPa



- Lesson 6 : How to change target time -
  ( 10 ) Change target time.

      ga-> set t 2      (set time 00Z02oct2009)

 ( 11 ) Visualize data (e.g. Geopotential height)
      ga-> d hgtprs
                                                                   26
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 7 : How to visualize section -
 GrADS treats 4 dimensions (latitude and longitude, level and
 time). If you set these to range value or single value, you can
 draw many kinds of figures.

( 12 ) Visualize with longitude fixed
 ga->   set LON 140     # Fix as 140E
 ga->   set LAT 20 60




                                                     Level
                           # 20N – 60N
 ga->   set LEV 1000 100       # 1000hPa – 100hPa
 ga->   d tmpprs    # Valuable: Lat., Level
                                                              Lat.
( 13 ) Visualize with latitude fixed
 ga->   set LON 120 160 # 120E – 160E
 ga->   set LAT 40 # Fix as 40N




                                                     Level
 ga->   set LEV 1000 100 # 1000hPa – 100hPa
 ga->   d tmpprs   # Valuable: Lon., Level
                                                                     27
                                                              Lon.
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 8 : How to visualize time graph -
  ( 14 ) Visualize time-series graph
   ga->   set LON 140
   ga->   set LAT 40          Fix as Single
                              value
   ga->   set LEV 500




                                                Value
   ga->   set t 1 5
   ga->   d tmpprs
                # Valuable: 1 dimension(Time)
                                                              Time
- Lesson 9 : How to visualize plane map -
  ( 15 ) Visualize plane map
   ga->   set LON 20 60
   ga->   set LAT 120 160
   ga->   set LEV 500           Fix as Single
   ga->   set t 1               value
   ga->   d tmpprs
          # Valuable: 2 dimensions(Lon.,Lat.)                          28
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 10 : How to visualize wind -
( 16 ) Visualize                Zonal          Meridional
                              Component        Component
      wind strength                                                         Contour +
 ga-> d mag(ugrdprs,vgrdprs) # Wind Magnitude                                Shaded
 Note: mag(ugrdprs, vgrdprs) = sqrt(ugrdprs*ugrdprs+vgrdprs*vgrdprs)

( 17 ) Visualize wind arrow (as vector)
 ga-> set gxout vector
                                                                           Wind arrow
 ga-> d ugrdprs;vgrdprs


( 18 ) Visualize stream line
       (color indicates wind strength)
 ga-> set gxout stream                                                    Stream line
 ga-> d ugrdprs;vgrdprs;mag(ugrdprs,vgrdprs)

                                                                                 29
- How to use GrADS -
 Visualizing by GrADS CUI
- Lesson 11 : How to calculate / visualize the differences -
( 19 ) Calculate and visualize the differences
 ga-> d hgtprs(t=2)–hgtprs(t=1)
 ga-> d hgtprs(lev=500)-hgtprs(lev=850)




- Lesson 12 : How to use various map projections -
( 20 ) Visualize by using Northern Hemisphere
       Polar Stereo projection
  ga->   set mproj nps      # Projection
  ga->   set mpdset mres    # Resolution
  ga->   set lat 20 90      # Region
  ga->   d hgtprs
                                                                30
- How to use GrADS -
Export images by GrADS CUI
- Lesson 13 : How to export into image file -

( 21 ) Export as GrADS metafile,
       and Convert into image (e.g. format: PNG)
    ga->   enable print image.gm
    ga->   print
    ga->   disable print
    ga->   !gxyat –o image.png image.gm
           (or exit GrADS, and type
            $ gxyat –o image.png image.gm)

   The suffixes “.gm” or “.gmf” are typical for GrADS metafile.
   Format of image file: PNG, PostScript, PDF, SVG (Scalable Vector
   Graphics)



                                                                          31
GrADS Script Library
Useful GrADS Utilities
   cbarn.gs, cbarc.gs, …
        Draw legends
   map.gs
        Automates settings for a
        variety of useful map
        projections
   basemap.gs
        Overlays a land or ocean
        mask that exactly fits the
        coastal outlines
    For details:
    http://www.iges.org/grads/ga
    doc/library.html                 32
GrADS Scripting Language
User facility to program GrADS
operations
   Automatic production           *GrADS script sample 1:

   Saving procedures              ‘open ./tl959_p-all_0p5.ctl'

                                   'set lon -30 180'
Run by GrADS                       'set lat -60 60'
                                   'set lev 850'
                                                             * … : Comments
ga-> run script.gs                 'set mpdset mres'
                                                             ‘…’ : GrADS statements
                                   'set gxout shaded'
   or                              'set grads off'
$ grads –c script.gs               'set strsiz 0.2'
                                   'set string 1 c 3'
                                   'draw string 5.25 8 Temperature @ 850hPa(degC)'

    For details:                   'd tmpprs - 273.15'        Exchange (K) to (degC)

    http://www.iges.org/grads/ga   'run cbarn.gs'
                                                              Call GrADS library
    doc/script.html                                                                33
Sample: Overlay data and print image

* GrADS script sample 2:

'open ./tl959_surf_0p25.ctl'
                          Use high-resolution
'set lon 110 150'
                          coastal map dataset
'set lat 5 35'
'set mpdset hires'
                       Change intervals of contour
'set gxout shaded'
'set clevs 0.1 10 20 40 60 80 100'
'set cmin 0.1'
'd maskout(apcpsfc, apcpsfc - 0.1)'
'cbarn'
                            Not draw if “apcpsfc < 0.1”
'set gxout contour'
'd prmslmsl / 100'       Alias of ‘run cbarn.gs’

'set gxout vector'
'd skip(ugrd10m, 5, 5);vgrd10m'

'draw title Pres.@MSL(hPa), Wind@10m(m/s), Prec.6hr(mm)'

'enable print tmp.gm'
'print'                                    Export as GrADS meta image
'disable print'

‘!gxyat -i tmp.gm -o output_sample2.png'                  Convert image into PNG format image
                                                                                                34
Sample: Using arguments, prompts
* GrADS script sample 3:
                                  Arguments
function main(args)
  ctl_file = “./tl959_p-all_0p5.ctl"

 if subwrd(args, 1) != ""
   level = subwrd(args, 1)
                              If you run script by
 else
                              “run sample3.gs 850”,
   prompt "Enter Level : "
                              level will be automatically set
   pull level
                              as “level = 850”.
 endif

 'open 'ctl_file
 'set lon 30 210'          If you don’t set arguments, you
 'set lat -60 60'          can enter level manually.
 'set lev 'level
 'set gxout shaded'
 'd hgtprs'

 'set gxout vector'                 Config and draw title.
 'd skip(ugrdprs,5,5);vgrdprs'

 ‘set strsiz 0.2’;'set string 1 c 3'
 'draw string 5.25 8 Z,U,V @ 'level'hPa(degC)'
 'run cbarn.gs 0.8 1 10.25 4.25'

 prompt "Press any key to quit."
 pull answer

  'quit'
return                                                          35
Sample: Extracting values at 1 grid point
* GrADS script sample 4:
                                                         Geopotential Height (gpm)
function main()                                          1000 28.7195
 ctl_file = "./tl959_p-all_0p5.ctl"                      975 252.417
 out_file = "./output_sample4.txt"                       950 480.678
                                                         925 713.9
 say "Geopotential Height (gpm)"
 output = write(out_file, "Geopotential Height (gpm)")             :
                                                                   :
 'open 'ctl_file
 'set lon 140'        Write data to out_file
                                                              output_sample4.txt
 'set lat 36'
 'set t 1'
 'set gxout value'
                           Loop 21 times
 Z = 1                     (Z=1, 2, 3, … ,21)

 while(Z<=21)
   'set z 'Z
   zlev = subwrd(result, 4)
   'd hgtprs'
   height = subwrd(result, 4)
   say zlev' 'height
   output = write(out_file, zlev' 'height, append)

   Z = Z + 1
 endwhile

  'quit'
return                                                                             36
Sample: Extracting values at 1 grid point
                                                                      Geopotential Height (gpm)
* GrADS script sample 5:                                                   28.71
* GrADS script sample 5:                                                  252.41
                                                                          480.67
function main()                                                           713.90
 ctl_file = "./tl959_p-all_0p5.ctl"                                            :
 out_file = "./output_sample5.txt"                                             :
 say "Geopotential Height (gpm)"                                           output_sample5.txt
 output = write(out_file, "Geopotential Height (gpm)")

 'open 'ctl_file
 'set lon 140'
 'set lat 36'
 'set t 1'
                                      Output single value
 'set z 1 21'
 'set gxout print'
 'set prnopts %10.2f 1 1'                     Format outputs
 'd hgtprs'

 output = write(out_file, result)            Output at once without
 output = close(out_file)                    ‘while’ loop

 'quit'
return
                                                                                                37
Reference: GRIB(GRIB Edition 1)
Format
   SECTION0: Indicator (the first 4byte is the
    ASCII ‘GRIB’)
   SECTION1: Product definition
   SECTION2: Grid description
   SECTION3: Bitmap
   SECTION4: Binary data
   SECTION5: End (the last 4byte is the ASCII
    ‘7777’)
For details: http://www.wmo.int/pages/prog/www/WMOCodes/GRIB.html   38
Reference: GRIB2(GRIB Edition 2)
Format
   SECTION0: Indicator (the first 4byte is the ASCII ‘GRIB’)
   SECTION1: Identification
   SECTION2: (Local use section)
   SECTION3: Grid definition
   SECTION4: Product definition                        repeat
   SECTION5: Data Representation                repeat
                                         repeat
   SECTION6: Bitmap
   SECTION7: Data
   SECTION8: End (the last 4byte is the ASCII ‘7777’)

    For details: http://www.wmo.int/pages/prog/www/WMOCodes/GRIB.html   39
References: Preparation for time-
          series dataset (Analysis)
 How to treat many initials by one Control file
 (Analysis)
     Edit Control file, and apply template for “dset” before
      making Index file
Example:
                                                     %y4   :   year    4   digits
Data/Anal/Hist/Daily/20090930.grib2                  %m2   :   month   2   digits
Data/Anal/Hist/Daily/20091001.grib2                  %d2   :   date    2   digits
Data/Anal/Hist/Daily/20091002.grib2                  %h2   :   hour    2   digits
Anal_Hist_Daily.ctl

                      dset ^Data/Anal/Hist/Daily/%y4%m2%d2.grib2
                      index ……
                         :
                      options pascals template
                         :
                                 Contents of “Anal_Hist_Daily.ctl”                  40
Reference: GMT
GMT (Generic Mapping Tool)
   Software package for reading
    script (batch) files, generating
    fine PostScript images
   Easier than GrADS when
    visualizing Station-Data
   Interactive operation is not
    supported.
        ‘iGMT’ would be enable interactive
        operation?
   GRIB/GRIB2 are not supported.
    For details:
    http://gmt.soest.hawaii.edu/
                                             41
Reference: NCARG / PyNGL
NCARG(NCAR Graphics)
   Software package for scientific
    visualization
   NCAR Command Language (NCL;
    Fortran/C library)
   Difficult to master than GrADS/GMT
PyNGL
   Python wrapper for NCL
   Easier than using NCL directly
   Interactive operation is not supported by
    NCARG and PyNGL
   Binary is available for only Linux, Solaris
    and Macintosh.
For details:
http://www.ncarg.ucar.edu/
http://www.pyngl.ucar.edu/                        42
Appendix: Training

1.     Setup GrADS, ActivePerl on your PC.
2.     Download GPVs (GRIB2) from JMA High-Resolution
       GSM Data Service.
3.     Concatenate data and create control and index file
       by ‘g2ctl.pl’, ‘gribmap’.
4.     Launch GrADS, and visualize data by interactive
       operation.
     • Try to customize the images
5.     Export the images into PNG by ‘gxyat’.
     •    … and print them out
6.     Try to develop GrADS Scripts.
7.     (If possible, …)
                                                       43
1. Setup GrADS, ActivePerl
 Copy installers, scripts from shared PC.
   grads-2.0.a5.oga.5-win32_superpack.exe
   ActivePerl-5.10.1.1006-MSWin32-x86-291086.msi
   Perl Scripts (grib2ctl.pl, g2ctl.pl)
 Launch installers and install applications.
   GrADS  C:¥OpenGrADS
   Perl  C:¥Perl
 Copy Perl scripts
    C:¥OpenGrADS¥Contents
 Edit Environment Valuables
   Append following pathes to “PATH”
       C:¥OpenGrADS¥Contents¥Cygwin¥Versions¥2.0.a5.oga.
        5¥i686
       C:¥Perl¥bin

                                                       44
2. Download GPVs from JMA High-
Resolution GSM Data Service
 Access Information
   Server: ds.data.jma.go.jp
   UserID:
   Passwd:
 Download GRIB2 data files.
   Initial: 00Z 02 Oct. 2009 (200910020000)
   Region: Global (gl)
   Resolution: 0.25 * 0.25(deg) (0p25)
   Level: Surface (surf)
   Forecast Time: Any FTs (0000, 0003, …, 0312)
 Working Directory
   C:¥OpenGrADS¥Contents¥Resources¥SampleDatasets

                                                45
2. Download GPVs (3 ways)
1.   Download from website (Firefox)
        URL: http://ds.data.jma.go.jp/tl959/members/
2.   FTP access by browser (IE, Firefox)
        URL: ftp://[ID]:[PASSWORD]@ds.data.jma.go.jp/
3.   FTP access by command line      $ pwd
        ‘$ ftp ds.data.jma.go.jp’   /cygdrive/c/OpenGrADS/work
                                     $ ftp ds.data.jma.go.jp
                                       :
                                     Name (XXX XXX XXX XXX:xxxxxxxx): XXXXXXXX
                                       :
                                     Password: ********
                                       :
                                     ftp> cd 200910011200/gl/0p25/surf/0000/
                                     ftp> ls
                                     Z__C_RJTD_20091001120000………….gz
                                     ftp> bi
                                     ftp> prompt
                                     ftp> get Z__C_RJTD_20091001120000………….gz
                                         :
                                     226 Transfer complete.
                                     ftp> quit
                                     $ ls
                                     Z__C_RJTD_20091001120000………….gz     46
                                     $
3(1). Concatenate data and create
 control file
  Unpack ‘.gz’ file by ‘gzip –d’ command.
  Concatenate data by ‘cat’ command.
  Execute perl script ‘g2ctl.pl’ and make
   control file as follows.
$ pwd
/cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets
$ gzip –d ./*.gz
$ ls
GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0000_grib2.bin
GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0003_grib2.bin
   :
GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0312_grib2.bin
$ cat GSM_GPV_*.bin > GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin
$ perl ../Contents/g2ctl.pl –verf ./GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin > ./gsm.ctl
$ cat ./gsm.ctl
dset ^GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin
index ^GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin.idx
undef 9.999E+20
title GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin
   :
   :                                                                                47
$
3(2). Create index file
 Execute ‘gribmap’ and make index file
  as follows.
  $ pwd
  /cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets
  $ gribmap –i ./gsm.ctl –e
  $




                                                            48
4. Launch GrADS, Visualize data
       Execute GrADS and visualize data as
$ pwd
                                    follows.
/cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets
$ grads -l
ga-> open gsm.ctl
Scanning description file: gsm.ctl
Data file GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1 1
Time values set: 2009:10:2:00 2009:10:2:00
E set to 1 1
ga-> q ctlinfo
dset GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin
title GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin
undef 9.999e+20
xdef 1440 linear 0 0.25
ydef 721 linear -90 0.25
zdef 1 linear 1 1
tdef 29 linear 00Z02OCT2009 180mn
vars 11
apcpsfc 0 0,1,8,1 ** surface Total Precipitation [kg/m^2]
   :
ga-> d prmslmsl / 100
                                                                     49
Contouring: 950 to 1040 interval 10
ga->
5. Customize data, Export image
  Customize image by using GrADS commands for
   settings/options.
  Print and export image
   to PNG format.
ga->   c                           Your convenient
ga->   set lon @@@ @@@
ga->   set lat @@@ @@@               region / time
ga->   set time @@@@@@
ga->   set gxout shaded
ga->   d apcpsfc
ga->   cbarn
ga->   set gxout contour
ga->   d prmslmsl / 100
ga->   set gxout vector
ga->   d skip(ugrd10m, 8, 8);vgrd10m
ga->   enable print tmp.gm
ga->   print
ga->   disable print
ga->   !gxyat -o tmp.png tmp.gm
ga->   quit
                                                     50
6. Scripting with GrADS
                                  * GrADS script:

                                  function main()

                                   ctl_file = "./gsm.ctl"
   Edit “sample4.gs” (see         out_file = "./time-tmp2m.txt"
    p.38) and make script
    which outputs data list        say "Surface Temperature (degC)"
                                   output = write(out_file, "Surface Temperature (degC)")
    of Time-series of
    Surface Temperature            'open 'ctl_file
                                   'set lon 140'
    at 1 grid point.               'set lat 36'
                                   'set t 1 29'
                                   'set gxout value'

                                   T = 1

                                   while(T<=29)
                                     'set t 'T
                                     time = subwrd(result, 4)
                                     'd tmp2m - 273.15'
                                     temp = subwrd(result, 4)
     [Output of this script]         say time' 'temp
     Surface Temperature (degC)      output = write(out_file, time' 'temp, append)
     2009:9:28:12 22.779
     2009:9:28:15 21.6382            T = T + 1
     2009:9:28:18 20.8             endwhile
        :
        :                           'quit'                                       51
     2009:10:2:0 22.0815          return
7. (If possible, ) try to draw various
images and develop scripts




                               Overlay multiple elements




                                                           52
 Calculate at fixed Lat.   Develop and test GrADS scripts

More Related Content

What's hot

Introdution to Landsat and Google Earth Engine
Introdution to Landsat and Google Earth EngineIntrodution to Landsat and Google Earth Engine
Introdution to Landsat and Google Earth EngineVeerachai Tanpipat
 
Fundamentals of Remote Sensing- A training module
Fundamentals of Remote Sensing- A training moduleFundamentals of Remote Sensing- A training module
Fundamentals of Remote Sensing- A training moduleNishant Sinha
 
Ground Penetrating Radar : Basic and Applications for Civil Engineering
Ground Penetrating Radar : Basic and Applications for Civil EngineeringGround Penetrating Radar : Basic and Applications for Civil Engineering
Ground Penetrating Radar : Basic and Applications for Civil EngineeringKorea Expressway Corporation
 
c,c++,java and python in gis development
c,c++,java and python in gis developmentc,c++,java and python in gis development
c,c++,java and python in gis developmentSakthivel R
 
Weather and Climate Visualization software
Weather and Climate Visualization softwareWeather and Climate Visualization software
Weather and Climate Visualization softwareRahul Gupta
 
A presention on remote sensing & its application (1)
A presention on remote sensing & its application (1)A presention on remote sensing & its application (1)
A presention on remote sensing & its application (1)Ankit Singh
 
Lecture for landsat
Lecture for landsatLecture for landsat
Lecture for landsatGeoMedeelel
 
passive and active remote sensing systems, characteristics and operations
passive and active remote sensing systems,  characteristics and operationspassive and active remote sensing systems,  characteristics and operations
passive and active remote sensing systems, characteristics and operationsNzar Braim
 
ground penetration rader
ground  penetration raderground  penetration rader
ground penetration raderAmir Khan
 
Introduction to sar-marjolaine_rouault
Introduction to sar-marjolaine_rouaultIntroduction to sar-marjolaine_rouault
Introduction to sar-marjolaine_rouaultNaivedya Mishra
 
Watershed delineation and LULC mapping
Watershed delineation and LULC mappingWatershed delineation and LULC mapping
Watershed delineation and LULC mappingKapil Thakur
 

What's hot (20)

Introdution to Landsat and Google Earth Engine
Introdution to Landsat and Google Earth EngineIntrodution to Landsat and Google Earth Engine
Introdution to Landsat and Google Earth Engine
 
Fundamentals of Remote Sensing- A training module
Fundamentals of Remote Sensing- A training moduleFundamentals of Remote Sensing- A training module
Fundamentals of Remote Sensing- A training module
 
Ground Penetrating Radar : Basic and Applications for Civil Engineering
Ground Penetrating Radar : Basic and Applications for Civil EngineeringGround Penetrating Radar : Basic and Applications for Civil Engineering
Ground Penetrating Radar : Basic and Applications for Civil Engineering
 
Digital Mapping
Digital MappingDigital Mapping
Digital Mapping
 
c,c++,java and python in gis development
c,c++,java and python in gis developmentc,c++,java and python in gis development
c,c++,java and python in gis development
 
Weather and Climate Visualization software
Weather and Climate Visualization softwareWeather and Climate Visualization software
Weather and Climate Visualization software
 
Thematic mapper
Thematic mapperThematic mapper
Thematic mapper
 
GEOID-DETERMINAION
GEOID-DETERMINAIONGEOID-DETERMINAION
GEOID-DETERMINAION
 
Unit 5
Unit 5Unit 5
Unit 5
 
A presention on remote sensing & its application (1)
A presention on remote sensing & its application (1)A presention on remote sensing & its application (1)
A presention on remote sensing & its application (1)
 
Lecture for landsat
Lecture for landsatLecture for landsat
Lecture for landsat
 
Landsat seminar
Landsat seminarLandsat seminar
Landsat seminar
 
SAR-Guidebook (1).pptx
SAR-Guidebook (1).pptxSAR-Guidebook (1).pptx
SAR-Guidebook (1).pptx
 
Spatial Data Model
Spatial Data ModelSpatial Data Model
Spatial Data Model
 
passive and active remote sensing systems, characteristics and operations
passive and active remote sensing systems,  characteristics and operationspassive and active remote sensing systems,  characteristics and operations
passive and active remote sensing systems, characteristics and operations
 
ground penetration rader
ground  penetration raderground  penetration rader
ground penetration rader
 
GPS-errors-2
GPS-errors-2GPS-errors-2
GPS-errors-2
 
Introduction to sar-marjolaine_rouault
Introduction to sar-marjolaine_rouaultIntroduction to sar-marjolaine_rouault
Introduction to sar-marjolaine_rouault
 
GIS & Raster
GIS & RasterGIS & Raster
GIS & Raster
 
Watershed delineation and LULC mapping
Watershed delineation and LULC mappingWatershed delineation and LULC mapping
Watershed delineation and LULC mapping
 

Viewers also liked

Jma hr gsm_data_gr_ads_20130529
Jma hr gsm_data_gr_ads_20130529Jma hr gsm_data_gr_ads_20130529
Jma hr gsm_data_gr_ads_20130529JMA_447
 
SATAID_manual_201611
SATAID_manual_201611SATAID_manual_201611
SATAID_manual_201611JMA_447
 
Annex 2 -- examples of observation data
Annex 2 -- examples of observation dataAnnex 2 -- examples of observation data
Annex 2 -- examples of observation dataJMA_447
 
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...dwi fitria ningsih
 
Esri Course Catalog 2014
Esri Course Catalog 2014Esri Course Catalog 2014
Esri Course Catalog 2014Esri
 

Viewers also liked (9)

Supporting HDF5 in GrADS
Supporting HDF5 in GrADSSupporting HDF5 in GrADS
Supporting HDF5 in GrADS
 
Jma hr gsm_data_gr_ads_20130529
Jma hr gsm_data_gr_ads_20130529Jma hr gsm_data_gr_ads_20130529
Jma hr gsm_data_gr_ads_20130529
 
Meteo penerbangan
Meteo penerbanganMeteo penerbangan
Meteo penerbangan
 
SATAID_manual_201611
SATAID_manual_201611SATAID_manual_201611
SATAID_manual_201611
 
Annex 2 -- examples of observation data
Annex 2 -- examples of observation dataAnnex 2 -- examples of observation data
Annex 2 -- examples of observation data
 
NetCDF and HDF5
NetCDF and HDF5NetCDF and HDF5
NetCDF and HDF5
 
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...
Tutorial pengolahan data salinitas menggunakan aplikasi SeaDas, Excel dan ODV...
 
Working with HDF and netCDF Data in ArcGIS: Tools and Case Studies
Working with HDF and netCDF Data in ArcGIS: Tools and Case StudiesWorking with HDF and netCDF Data in ArcGIS: Tools and Case Studies
Working with HDF and netCDF Data in ArcGIS: Tools and Case Studies
 
Esri Course Catalog 2014
Esri Course Catalog 2014Esri Course Catalog 2014
Esri Course Catalog 2014
 

Similar to Guide for visualizing JMA's GSM outputs using GrADS

Mago3D: A Brand-New Live 3D Geo-Platform
Mago3D: A Brand-New Live 3D Geo-PlatformMago3D: A Brand-New Live 3D Geo-Platform
Mago3D: A Brand-New Live 3D Geo-PlatformSANGHEE SHIN
 
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...GIS in the Rockies
 
BWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 PresentationBWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 Presentationlilyco
 
Fosdem'20_Past, present & future of DRLM project
Fosdem'20_Past, present & future of DRLM projectFosdem'20_Past, present & future of DRLM project
Fosdem'20_Past, present & future of DRLM projectDidac Oliveira
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionRedge Technologies
 
Oracle cluster installation with grid and nfs
Oracle cluster  installation with grid and nfsOracle cluster  installation with grid and nfs
Oracle cluster installation with grid and nfsChanaka Lasantha
 
Info gdal 20150915
Info gdal 20150915Info gdal 20150915
Info gdal 20150915GeoMedeelel
 
Novidades interessantes e importantes do z/os 2.2
Novidades interessantes e importantes do z/os 2.2Novidades interessantes e importantes do z/os 2.2
Novidades interessantes e importantes do z/os 2.2Joao Galdino Mello de Souza
 
Oracle cluster installation with grid and iscsi
Oracle cluster  installation with grid and iscsiOracle cluster  installation with grid and iscsi
Oracle cluster installation with grid and iscsiChanaka Lasantha
 
Sataid auto-download
Sataid auto-downloadSataid auto-download
Sataid auto-downloadJMA_447
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Yahoo Developer Network
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learnedbasisspace
 
Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Peter Tröger
 
Hw09 Production Deep Dive With High Availability
Hw09   Production Deep Dive With High AvailabilityHw09   Production Deep Dive With High Availability
Hw09 Production Deep Dive With High AvailabilityCloudera, Inc.
 
Get Your Head in the Cloud - Lessons in GPU Computing with Schlumberger
Get Your Head in the Cloud - Lessons in GPU Computing with SchlumbergerGet Your Head in the Cloud - Lessons in GPU Computing with Schlumberger
Get Your Head in the Cloud - Lessons in GPU Computing with Schlumbergerinside-BigData.com
 
NetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and VerticaNetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and VerticaJosef Niedermeier
 
TLD Anycast DNS servers to ISPs
TLD Anycast DNS servers to ISPsTLD Anycast DNS servers to ISPs
TLD Anycast DNS servers to ISPsAPNIC
 
Dryad Paper Review and System Analysis
Dryad Paper Review and System AnalysisDryad Paper Review and System Analysis
Dryad Paper Review and System AnalysisJinGui LI
 
onos-day-dkim-20150914-lkin
onos-day-dkim-20150914-lkinonos-day-dkim-20150914-lkin
onos-day-dkim-20150914-lkinDongkyun Kim
 

Similar to Guide for visualizing JMA's GSM outputs using GrADS (20)

Mago3D: A Brand-New Live 3D Geo-Platform
Mago3D: A Brand-New Live 3D Geo-PlatformMago3D: A Brand-New Live 3D Geo-Platform
Mago3D: A Brand-New Live 3D Geo-Platform
 
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...
2017 ASPRS-RMR Big Data Track: Practical Considerations and Uses of USGS 3DEP...
 
BWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 PresentationBWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 Presentation
 
Fosdem'20_Past, present & future of DRLM project
Fosdem'20_Past, present & future of DRLM projectFosdem'20_Past, present & future of DRLM project
Fosdem'20_Past, present & future of DRLM project
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solution
 
Oracle cluster installation with grid and nfs
Oracle cluster  installation with grid and nfsOracle cluster  installation with grid and nfs
Oracle cluster installation with grid and nfs
 
Info gdal 20150915
Info gdal 20150915Info gdal 20150915
Info gdal 20150915
 
Novidades interessantes e importantes do z/os 2.2
Novidades interessantes e importantes do z/os 2.2Novidades interessantes e importantes do z/os 2.2
Novidades interessantes e importantes do z/os 2.2
 
Oracle cluster installation with grid and iscsi
Oracle cluster  installation with grid and iscsiOracle cluster  installation with grid and iscsi
Oracle cluster installation with grid and iscsi
 
Sataid auto-download
Sataid auto-downloadSataid auto-download
Sataid auto-download
 
Nomads
NomadsNomads
Nomads
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2
 
Hw09 Production Deep Dive With High Availability
Hw09   Production Deep Dive With High AvailabilityHw09   Production Deep Dive With High Availability
Hw09 Production Deep Dive With High Availability
 
Get Your Head in the Cloud - Lessons in GPU Computing with Schlumberger
Get Your Head in the Cloud - Lessons in GPU Computing with SchlumbergerGet Your Head in the Cloud - Lessons in GPU Computing with Schlumberger
Get Your Head in the Cloud - Lessons in GPU Computing with Schlumberger
 
NetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and VerticaNetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and Vertica
 
TLD Anycast DNS servers to ISPs
TLD Anycast DNS servers to ISPsTLD Anycast DNS servers to ISPs
TLD Anycast DNS servers to ISPs
 
Dryad Paper Review and System Analysis
Dryad Paper Review and System AnalysisDryad Paper Review and System Analysis
Dryad Paper Review and System Analysis
 
onos-day-dkim-20150914-lkin
onos-day-dkim-20150914-lkinonos-day-dkim-20150914-lkin
onos-day-dkim-20150914-lkin
 

More from JMA_447

Quick guide to_sataid
Quick guide to_sataidQuick guide to_sataid
Quick guide to_sataidJMA_447
 
Sataid manual
Sataid manualSataid manual
Sataid manualJMA_447
 
Quick guide to_sataid
Quick guide to_sataidQuick guide to_sataid
Quick guide to_sataidJMA_447
 
Quick_guide_to_sataid_201611
Quick_guide_to_sataid_201611Quick_guide_to_sataid_201611
Quick_guide_to_sataid_201611JMA_447
 
Introduction to dar_gisc_tokyo_rev03
Introduction to dar_gisc_tokyo_rev03Introduction to dar_gisc_tokyo_rev03
Introduction to dar_gisc_tokyo_rev03JMA_447
 
Sataid manual
Sataid manualSataid manual
Sataid manualJMA_447
 
[Quick guide]sataid for-wis
[Quick guide]sataid for-wis[Quick guide]sataid for-wis
[Quick guide]sataid for-wisJMA_447
 
SATAID Operation Manual
SATAID Operation ManualSATAID Operation Manual
SATAID Operation ManualJMA_447
 

More from JMA_447 (9)

Manual
ManualManual
Manual
 
Quick guide to_sataid
Quick guide to_sataidQuick guide to_sataid
Quick guide to_sataid
 
Sataid manual
Sataid manualSataid manual
Sataid manual
 
Quick guide to_sataid
Quick guide to_sataidQuick guide to_sataid
Quick guide to_sataid
 
Quick_guide_to_sataid_201611
Quick_guide_to_sataid_201611Quick_guide_to_sataid_201611
Quick_guide_to_sataid_201611
 
Introduction to dar_gisc_tokyo_rev03
Introduction to dar_gisc_tokyo_rev03Introduction to dar_gisc_tokyo_rev03
Introduction to dar_gisc_tokyo_rev03
 
Sataid manual
Sataid manualSataid manual
Sataid manual
 
[Quick guide]sataid for-wis
[Quick guide]sataid for-wis[Quick guide]sataid for-wis
[Quick guide]sataid for-wis
 
SATAID Operation Manual
SATAID Operation ManualSATAID Operation Manual
SATAID Operation Manual
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Guide for visualizing JMA's GSM outputs using GrADS

  • 1. Visualizing JMA High-Resolution GSM Data with GrADS Numerical Prediction Division Forecast Department, JMA
  • 2. Contents Getting Meteorological Data  JMA High Resolution GSM Data Service Preparing for Visualization Visualizing Data with GrADS  Basic interactive operation  Customizing images  Converting images Scripting with GrADS 2
  • 3. JMA High-Resolution GSM Data Service Established in Jan. 2009 Target: NMHSs  Mainly in WMO Region II Model: GSM(TL959) Data Format: GRIB2 Preservation Term: Latest 7 days 3
  • 4. Profile (Global) Upper Air Surface Resolution 0.5deg (720 x 361) 0.25deg (1440 x 721) Region Lon: 0E – 180 – 0W, Lat: 90S – 90N Initial Time 00, 06, 12, 18 UTC (4 times per day) Forecast Time 00 to 84 hours by 3 hours (any initials) 90 to 216 hours by 6 hours (12UTC initial only) Levels 21 (1000, 975, 950, 925, 900, 1 (surf) 850, 800, 700, 600, 500, 400, 300, 250, 200, 150, 100, 70, 50, 30, 20, 10 hPa) * All levels in one file Elements U, V, T, Rh, Z, Omg U, V, T, Rh, Ps, Psea, Rain, Stream Function, Velocity Cloudiness (total, high, middle, Potential (at 850, 250 hPa) low) Vorticity (at 500 hPa) File size (gzip 40MB 5MB 12MB compressed) 4
  • 5. Profile (WMO Region II) Upper Air Surface Resolution 0.5deg (331 x 191) 0.25deg (661 x 381) Region Lon: 30E – 180 – 165W, Lat: 5S – 90N Initial Time 00, 06, 12, 18 UTC (4 times per day) Forecast Time 00 to 84 hours by 3 hours (any initials) 90 to 216 hours by 6 hours (12UTC initial only) Levels 21 (1000, 975, 950, 925, 900, 1 (surf) 850, 800, 700, 600, 500, 400, 300, 250, 200, 150, 100, 70, 50, 30, 20, 10 hPa) * Separated 21 files by levels Elements U, V, T, Rh, Z, Omg U, V, T, Rh, Ps, Psea, Rain, Stream Function, Velocity Cloudiness (total, high, middle, Potential (at 850, 250 hPa) low) Vorticity (at 500 hPa) File size (gzip 500 – 700KB 800KB 3MB compressed) 5
  • 6. Directories of Server 200910011800/ Initial Date/Time (format: YYYYMMDDhhmm) gl/ Global region 0p5/ 0.5deg. resolution p-all/ 1000hPa – 10hPa Levels in one file 0000/ Z__C_RJTD_20091001180000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0000_grib2.bin.gz 0003/ Z__C_RJTD_20091001180000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0003_grib2.bin.gz : surf/ Surface 0p25/ 0.25deg. resolution surf/ ra2/ WMO Region II 0p5/ p1000/ Level 1000hPa only 0000/ FT = 00 days 00 hours : p975/ Level 975hPa only : p10/ surf/ Surface 0p25/ surf/ 6
  • 7. Naming rule of data files [R]egion: [L]evels gzip compressed gl: Global -pall: All upper levels GRIB2 format ra2: WMO RA II pLLL: LLL hPa surf: Surface Z__C_RJTD_20091002000000_GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.gz Resolution: Initial Date/Time 0p5: 0.5 degrees FD: Forecast Date/Time YYYYMMDDhhmmss 0p25: 0.25 degrees DDhh: DD days, hh hours 7
  • 8. How to apply service Ask to “Contact Person” of your NHMS. We sent a letter and Fill the application, and send it application of this service to contact point of JMA. in Jan. 2009. E-mail address of the Obtain account ID/Password contact point is written in of this service. the application. We inform you Access to this service and download GPVs. by e-mail. (by FTP protocol) 8
  • 9. Workflow for processing meteorological data Access JMA High Resolution GSM Website, and research products Download products (GPV data files) Requirements: (Format: GRIB2) ID / Password Prepare meta files (or convert data format) e.g.) grib2ctl.pl, g2ctl.pl, with tools gribmap, wgrib2 e.g.) OpenGrADS Visualize data with tools / applications 9
  • 10. What’s GRIB? GRIB (GRIdded Binary)  CBS(Commission for Basic Systems)/WMO Data format Described in WMO Manual on Codes No.306  For the storage and the exchange of Weather Products in Gridded Binary Form  Editions: GRIB(GRIB1): Used world-wide for NWP GRIB2: Latest edition (much different in format) See References: p.40 - 41 10
  • 11. Tools for GRIB/GRIB2 Decoding tools  wgrib : decoding / converting GRIB data file  wgrib2 : decoding / converting GRIB2 data file Preprocessing tools for GrADS  grib2ctl.pl : making GrADS control file from GRIB data file  g2ctl.pl : making GrADS control file from GRIB2 data file  gribmap : making GrADS index file from GRIB or GRIB2 data file Note: ‘wgrib’, ‘wgrib2’, and ‘gribmap’ are installed with GrADS (‘Windows superpack’ edition). ‘grib2ctl.pl’ and ‘g2ctl.pl’ are Perl scripts. They require Perl. 11
  • 12. What’s GrADS? GrADS(The Grid Analysis and Display System)  Interactive desktop tool  Commonly used for easy access, manipulation, and visualization of earth science data  CUI(Character User Interface) / GUI(Graphical User Interface) Application OpenGrADS  Based on ‘GrADS’  Open Source Available sources/binaries of several OSs  Some useful Extensions (User Defined Commands/Functions) 12 For details: http://www.iges.org/grads (GrADS), http://opengrads.org/ (OpenGrADS)
  • 13. What’s GrADS? Display Window Enter commands, and Set visualizing properties Visualize image in synchronization with commands Console Window 13
  • 14. Installing grib2ctl.pl, g2ctl.pl Download Perl scripts from “CPC/NOAA” website, and allocate them adequately  grib2ctl.pl http://www.cpc.noaa.gov/products /wesley/grib2ctl.html  g2ctl.pl http://www.cpc.noaa.gov/products /wesley/g2ctl.html Download and Install Perl  ActivePerl (for Windows) http://downloads.activestate.com/ ActivePerl/Windows/5.10/ActiveP erl-5.10.1.1006-MSWin32-x86- 291086.msi 14
  • 15. Installing GrADS (Windows) Download installation binary (.exe) from “SourceForge” website  Filename: grads-2.0.*- win32_superpack.exe Execute the binary  Automatic installation  Follow installer’s guidance For details: http://opengrads.org/wiki/index.php?title=Installing _GrADS_v2.0_on_Microsoft_Windows 15
  • 16. Installed GrADS Directories e.g.) C:¥OpenGrADS GrADS_ROOT/ Contents/ --- map data bases, GrADS fonts Resources/ SampleDatasets/ --- sample data files Documentation/ --- user’s guide, references, and so on. Scripts/ --- GrADS utility scripts SupportData/ --- fonts, coastal data Xming/ --- bundled Xming X window server Cygwin/ --- programs, DLLs Classic/ --- Shortcuts for conventional user. 16
  • 17. Requirements for visualizing with GrADS Requirements Data Format Data file Configuration file 32bit IEEE binary data file control file by yourself floats GRIB data file control file GRIB ‘wgrib’ ‘grib2ctl.pl’ index file ‘gribmap’ GRIB2 data file control file GRIB2 ‘wgrib2’ ‘g2ctl.pl’ index file ‘gribmap’ NetCDF NetCDF data file none self-describing data formats developed by UCAR 17
  • 18. Preparation for GRIB / GRIB2 GRIB2 If the data contain forecast, use ‘-verf’. (1) Create control file (If analysis, use ‘-0’) from GRIB2 data file with ‘g2ctl.pl’ $ perl g2ctl.pl –verf data.grib2.bin > data.ctl Data file name You can name the control file name. (2) Create index file from control file with ‘gribmap’ $ gribmap –i data.ctl -e Automatically creates ‘.idx’ file. GRIB (1) Create control file from GRIB data file with ‘grib2ctl.pl’ $ perl grib2ctl.pl –verf data.grib.bin > data.ctl 18
  • 19. Control file (GRIB2): Sample dset ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin index ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.idx undef 9.999E+20 title GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin * produced by g2ctl v0.0.4n * griddef=1.1:0:(720 x 361):grid_template=0:lat-lon grid:(720 x 361) units 1e-006 input WE:NS output WE:SN res 48 lat 90.0 to -90.0 by 0.5 lon 0.0 to 359.5 by 0.5 #points=259920:winds(N/S) dtype grib2 ydef 361 linear -90.000000 0.5 xdef 720 linear 0.000000 0.500000 tdef 1 linear 12Z22aug2009 1mo * PROFILE hPa zdef 21 levels 100000 97500 95000 92500 90000 85000 80000 70000 60000 50000 40000 30000 25000 20000 15000 10000 7000 5000 3000 2000 1000 options pascals vars 11 HGTprs 21,100 0,3,5 ** (1000 975 950 925.. 50 30 20 10) Geopotential Height [gpm] RELV500mb 0,100,50000 0,2,12 ** 500 mb Relative Vorticity [1/s] RHprs 21,100 0,1,1 ** (1000 975 950 925.. 50 30 20 10) Relative Humidity [%] STRM850mb 0,100,85000 0,2,4 ** 850 mb Stream Function [m^2/s] STRM200mb 0,100,20000 0,2,4 ** 200 mb Stream Function [m^2/s] TMPprs 21,100 0,0,0 ** (1000 975 950 925.. 50 30 20 10) Temperature [K] UGRDprs 21,100 0,2,2 ** (1000 975 950 925.. 50 30 20 10) U-Component of Wind [m/s] VGRDprs 21,100 0,2,3 ** (1000 975 950 925.. 50 30 20 10) V-Component of Wind [m/s] VPOT850mb 0,100,85000 0,2,5 ** 850 mb Velocity Potential [m^2/s] VPOT200mb 0,100,20000 0,2,5 ** 200 mb Velocity Potential [m^2/s] VVELprs 21,100 0,2,8 ** (1000 975 950 925.. 50 30 20 10) Vertical Velocity (Pressure) [Pa/s] ENDVARS 19
  • 20. Control file (GRIB2): Sample “^” indicates same directory with control file. dset ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin Data file path index ^GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin.idx undef 9.999E+20 Index file path title GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin * produced by g2ctl v0.0.4n Definition of ‘undefined value’ (=No Data) * griddef=1.1:0:(720 x 361):grid_template=0:lat-lon grid:(720 x 361) units 1e-006 input WE:NS output WE:SN res 48 lat 90.0 to -90.0 by 0.5 lon 0.0 to 359.5 by 0.5 Title #points=259920:winds(N/S) dtype grib2 Comment ydef 361 linear -90.000000 0.5 xdef 720 linear 0.000000 0.500000 Grid definition for Y-axis (grid size, latitude tdef 1 linear 12Z22aug2009 1mo of southern end, interval) * PROFILE hPa Grid definition for X-axis (grid size, longitude zdef 21 levels 100000 97500 95000 92500 90000 85000 80000 70000 60000 of western end, interval) 50000 40000 30000 25000 20000 15000 10000 7000 5000 3000 2000 1000 options pascals Grid definition for Time-axis (size, initial vars 11 date/time, interval) HGTprs 21,100Number and information 0,3,5 ** (1000 975 950 925.. 50 30 20 10) Geopotential Height [gpm] RELV500mb 0,100,50000 elements ** 500 mb Relative Vorticity [1/s] definition for Vertical-axis (grid size, of 0,2,12 Grid RHprs 21,100 0,1,1 ** (1000 975 950 925.. 50 30 20 10) Relative Humidity [%] levels) STRM850mb 0,100,85000 0,2,4 ** 850 mb Stream Function [m^2/s] STRM200mb 0,100,20000 0,2,4 ** 200 mb Stream Function [m^2/s] TMPprs 21,100 0,0,0 ** (1000 975 950 925.. 50 30 20 10) Temperature [K] UGRDprs 21,100 0,2,2 ** (1000 975 950 925.. 50 30 20 10) U-Component of Wind [m/s] VGRDprs 21,100 0,2,3 ** (1000 975 950 925.. 50 30 20 10) V-Component of Wind [m/s] VPOT850mb 0,100,85000 0,2,5 ** 850 mb Velocity Potential [m^2/s] VPOT200mb 0,100,20000 0,2,5 ** 200 mb Velocity Potential [m^2/s] VVELprs 21,100 0,2,8 ** (1000 975 950 925.. 50 30 20 10) Vertical Velocity (Pressure) [Pa/s] ENDVARS 20
  • 21. Preparation for time-series dataset How to treat separated data files by forecast time  Concatenate GRIB files by “cat” command before making Control file GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0000_grib2.bin GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0003_grib2.bin GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0006_grib2.bin : Command “cat” : : GSM_GPV_Rgl_Gll0p5deg_L-pall_FD0312_grib2.bin 1) Display contents of file 2) Concatenate files $ cat GSM_GPV_Rgl_Gll0p5deg_L-pall_*_grib2.bin > GSM_GPV_Rgl_Gll0p5deg_L-pall_grib2.bin GSM_GPV_Rgl_Gll0p5deg_L-pall_grib2.bin $ g2ctl …… $ gribmap …… 21
  • 22. - How to use GrADS - Visualizing by GrADS CUI - Lesson 1 : How to launch GrADS - ( 1 ) Launch Command Prompt (Shell) and GrADS Command prompt which enables using ‘bash’ for Unix/Linux. (Powered by Cygwin) Launch GrADS command prompt directly. Enter ‘grads’ Select shape of display: Enter ‘yes’ or ‘no’ Enter GrADS commands 22
  • 23. - How to use GrADS - Visualizing by GrADS CUI - Lesson 2 : How to open data and visualize them - ( 2 ) Open control file. ( “ga->” means GrADS command prompt) ga-> open data.ctl Control file name that was created by g2ctl.pl ( 3 ) Check available elements. Italic words depend ga-> q ctlinfo (query ctlinfo) on your environment / setting ( 4 ) Visualize for an element (e.g. Surf. Pres.). ga-> d pressfc (display pressfc) Element name is shown ( 5 ) Clear screen. in results of ‘q ctlinfo’. ga-> c (clear) To reset settings, use ‘reinit’. 23
  • 24. - How to use GrADS - Visualizing by GrADS CUI - Lesson 3 : How to draw by various rendering methods - ( 6 ) Use ‘contour’ option (default). ga-> set gxout contour ga-> d pressfc ( 7 ) Use ‘grid-fill’ option. ga-> set gxout grfill ga-> d pressfc ( 8 ) Overlay ‘shaded’ and ‘contour’ images. ga-> set gxout shaded ga-> d pressfc ga-> set gxout contour ga-> d pressfc 24
  • 25. - How to use GrADS - Visualizing by GrADS CUI - Lesson 4 : How to change latitude and longitude - ( 6 ) Set latitude range ga-> set LAT -15 25 Latitude Range (South North) ( South Latitude: negative value ) ( 7 ) Set longitude range ga-> set LON 90 150 Longitude Range (West East) ( West Longitude: negative value ) 25
  • 26. - How to use GrADS - Visualizing by GrADS CUI - Lesson 5 : How to change level - ( 8 ) Change level. ga-> set LEV 500 ( 9 ) Visualize data (e.g. Geopotential height) ga-> d hgtprs # Draw Z at 500hPa - Lesson 6 : How to change target time - ( 10 ) Change target time. ga-> set t 2 (set time 00Z02oct2009) ( 11 ) Visualize data (e.g. Geopotential height) ga-> d hgtprs 26
  • 27. - How to use GrADS - Visualizing by GrADS CUI - Lesson 7 : How to visualize section - GrADS treats 4 dimensions (latitude and longitude, level and time). If you set these to range value or single value, you can draw many kinds of figures. ( 12 ) Visualize with longitude fixed ga-> set LON 140 # Fix as 140E ga-> set LAT 20 60 Level # 20N – 60N ga-> set LEV 1000 100 # 1000hPa – 100hPa ga-> d tmpprs # Valuable: Lat., Level Lat. ( 13 ) Visualize with latitude fixed ga-> set LON 120 160 # 120E – 160E ga-> set LAT 40 # Fix as 40N Level ga-> set LEV 1000 100 # 1000hPa – 100hPa ga-> d tmpprs # Valuable: Lon., Level 27 Lon.
  • 28. - How to use GrADS - Visualizing by GrADS CUI - Lesson 8 : How to visualize time graph - ( 14 ) Visualize time-series graph ga-> set LON 140 ga-> set LAT 40 Fix as Single value ga-> set LEV 500 Value ga-> set t 1 5 ga-> d tmpprs # Valuable: 1 dimension(Time) Time - Lesson 9 : How to visualize plane map - ( 15 ) Visualize plane map ga-> set LON 20 60 ga-> set LAT 120 160 ga-> set LEV 500 Fix as Single ga-> set t 1 value ga-> d tmpprs # Valuable: 2 dimensions(Lon.,Lat.) 28
  • 29. - How to use GrADS - Visualizing by GrADS CUI - Lesson 10 : How to visualize wind - ( 16 ) Visualize Zonal Meridional Component Component wind strength Contour + ga-> d mag(ugrdprs,vgrdprs) # Wind Magnitude Shaded Note: mag(ugrdprs, vgrdprs) = sqrt(ugrdprs*ugrdprs+vgrdprs*vgrdprs) ( 17 ) Visualize wind arrow (as vector) ga-> set gxout vector Wind arrow ga-> d ugrdprs;vgrdprs ( 18 ) Visualize stream line (color indicates wind strength) ga-> set gxout stream Stream line ga-> d ugrdprs;vgrdprs;mag(ugrdprs,vgrdprs) 29
  • 30. - How to use GrADS - Visualizing by GrADS CUI - Lesson 11 : How to calculate / visualize the differences - ( 19 ) Calculate and visualize the differences ga-> d hgtprs(t=2)–hgtprs(t=1) ga-> d hgtprs(lev=500)-hgtprs(lev=850) - Lesson 12 : How to use various map projections - ( 20 ) Visualize by using Northern Hemisphere Polar Stereo projection ga-> set mproj nps # Projection ga-> set mpdset mres # Resolution ga-> set lat 20 90 # Region ga-> d hgtprs 30
  • 31. - How to use GrADS - Export images by GrADS CUI - Lesson 13 : How to export into image file - ( 21 ) Export as GrADS metafile, and Convert into image (e.g. format: PNG) ga-> enable print image.gm ga-> print ga-> disable print ga-> !gxyat –o image.png image.gm (or exit GrADS, and type $ gxyat –o image.png image.gm) The suffixes “.gm” or “.gmf” are typical for GrADS metafile. Format of image file: PNG, PostScript, PDF, SVG (Scalable Vector Graphics) 31
  • 32. GrADS Script Library Useful GrADS Utilities  cbarn.gs, cbarc.gs, … Draw legends  map.gs Automates settings for a variety of useful map projections  basemap.gs Overlays a land or ocean mask that exactly fits the coastal outlines For details: http://www.iges.org/grads/ga doc/library.html 32
  • 33. GrADS Scripting Language User facility to program GrADS operations  Automatic production *GrADS script sample 1:  Saving procedures ‘open ./tl959_p-all_0p5.ctl' 'set lon -30 180' Run by GrADS 'set lat -60 60' 'set lev 850' * … : Comments ga-> run script.gs 'set mpdset mres' ‘…’ : GrADS statements 'set gxout shaded' or 'set grads off' $ grads –c script.gs 'set strsiz 0.2' 'set string 1 c 3' 'draw string 5.25 8 Temperature @ 850hPa(degC)' For details: 'd tmpprs - 273.15' Exchange (K) to (degC) http://www.iges.org/grads/ga 'run cbarn.gs' Call GrADS library doc/script.html 33
  • 34. Sample: Overlay data and print image * GrADS script sample 2: 'open ./tl959_surf_0p25.ctl' Use high-resolution 'set lon 110 150' coastal map dataset 'set lat 5 35' 'set mpdset hires' Change intervals of contour 'set gxout shaded' 'set clevs 0.1 10 20 40 60 80 100' 'set cmin 0.1' 'd maskout(apcpsfc, apcpsfc - 0.1)' 'cbarn' Not draw if “apcpsfc < 0.1” 'set gxout contour' 'd prmslmsl / 100' Alias of ‘run cbarn.gs’ 'set gxout vector' 'd skip(ugrd10m, 5, 5);vgrd10m' 'draw title Pres.@MSL(hPa), Wind@10m(m/s), Prec.6hr(mm)' 'enable print tmp.gm' 'print' Export as GrADS meta image 'disable print' ‘!gxyat -i tmp.gm -o output_sample2.png' Convert image into PNG format image 34
  • 35. Sample: Using arguments, prompts * GrADS script sample 3: Arguments function main(args) ctl_file = “./tl959_p-all_0p5.ctl" if subwrd(args, 1) != "" level = subwrd(args, 1) If you run script by else “run sample3.gs 850”, prompt "Enter Level : " level will be automatically set pull level as “level = 850”. endif 'open 'ctl_file 'set lon 30 210' If you don’t set arguments, you 'set lat -60 60' can enter level manually. 'set lev 'level 'set gxout shaded' 'd hgtprs' 'set gxout vector' Config and draw title. 'd skip(ugrdprs,5,5);vgrdprs' ‘set strsiz 0.2’;'set string 1 c 3' 'draw string 5.25 8 Z,U,V @ 'level'hPa(degC)' 'run cbarn.gs 0.8 1 10.25 4.25' prompt "Press any key to quit." pull answer 'quit' return 35
  • 36. Sample: Extracting values at 1 grid point * GrADS script sample 4: Geopotential Height (gpm) function main() 1000 28.7195 ctl_file = "./tl959_p-all_0p5.ctl" 975 252.417 out_file = "./output_sample4.txt" 950 480.678 925 713.9 say "Geopotential Height (gpm)" output = write(out_file, "Geopotential Height (gpm)") : : 'open 'ctl_file 'set lon 140' Write data to out_file output_sample4.txt 'set lat 36' 'set t 1' 'set gxout value' Loop 21 times Z = 1 (Z=1, 2, 3, … ,21) while(Z<=21) 'set z 'Z zlev = subwrd(result, 4) 'd hgtprs' height = subwrd(result, 4) say zlev' 'height output = write(out_file, zlev' 'height, append) Z = Z + 1 endwhile 'quit' return 36
  • 37. Sample: Extracting values at 1 grid point Geopotential Height (gpm) * GrADS script sample 5: 28.71 * GrADS script sample 5: 252.41 480.67 function main() 713.90 ctl_file = "./tl959_p-all_0p5.ctl" : out_file = "./output_sample5.txt" : say "Geopotential Height (gpm)" output_sample5.txt output = write(out_file, "Geopotential Height (gpm)") 'open 'ctl_file 'set lon 140' 'set lat 36' 'set t 1' Output single value 'set z 1 21' 'set gxout print' 'set prnopts %10.2f 1 1' Format outputs 'd hgtprs' output = write(out_file, result) Output at once without output = close(out_file) ‘while’ loop 'quit' return 37
  • 38. Reference: GRIB(GRIB Edition 1) Format  SECTION0: Indicator (the first 4byte is the ASCII ‘GRIB’)  SECTION1: Product definition  SECTION2: Grid description  SECTION3: Bitmap  SECTION4: Binary data  SECTION5: End (the last 4byte is the ASCII ‘7777’) For details: http://www.wmo.int/pages/prog/www/WMOCodes/GRIB.html 38
  • 39. Reference: GRIB2(GRIB Edition 2) Format  SECTION0: Indicator (the first 4byte is the ASCII ‘GRIB’)  SECTION1: Identification  SECTION2: (Local use section)  SECTION3: Grid definition  SECTION4: Product definition repeat  SECTION5: Data Representation repeat repeat  SECTION6: Bitmap  SECTION7: Data  SECTION8: End (the last 4byte is the ASCII ‘7777’) For details: http://www.wmo.int/pages/prog/www/WMOCodes/GRIB.html 39
  • 40. References: Preparation for time- series dataset (Analysis) How to treat many initials by one Control file (Analysis)  Edit Control file, and apply template for “dset” before making Index file Example: %y4 : year 4 digits Data/Anal/Hist/Daily/20090930.grib2 %m2 : month 2 digits Data/Anal/Hist/Daily/20091001.grib2 %d2 : date 2 digits Data/Anal/Hist/Daily/20091002.grib2 %h2 : hour 2 digits Anal_Hist_Daily.ctl dset ^Data/Anal/Hist/Daily/%y4%m2%d2.grib2 index …… : options pascals template : Contents of “Anal_Hist_Daily.ctl” 40
  • 41. Reference: GMT GMT (Generic Mapping Tool)  Software package for reading script (batch) files, generating fine PostScript images  Easier than GrADS when visualizing Station-Data  Interactive operation is not supported. ‘iGMT’ would be enable interactive operation?  GRIB/GRIB2 are not supported. For details: http://gmt.soest.hawaii.edu/ 41
  • 42. Reference: NCARG / PyNGL NCARG(NCAR Graphics)  Software package for scientific visualization  NCAR Command Language (NCL; Fortran/C library)  Difficult to master than GrADS/GMT PyNGL  Python wrapper for NCL  Easier than using NCL directly  Interactive operation is not supported by NCARG and PyNGL  Binary is available for only Linux, Solaris and Macintosh. For details: http://www.ncarg.ucar.edu/ http://www.pyngl.ucar.edu/ 42
  • 43. Appendix: Training 1. Setup GrADS, ActivePerl on your PC. 2. Download GPVs (GRIB2) from JMA High-Resolution GSM Data Service. 3. Concatenate data and create control and index file by ‘g2ctl.pl’, ‘gribmap’. 4. Launch GrADS, and visualize data by interactive operation. • Try to customize the images 5. Export the images into PNG by ‘gxyat’. • … and print them out 6. Try to develop GrADS Scripts. 7. (If possible, …) 43
  • 44. 1. Setup GrADS, ActivePerl  Copy installers, scripts from shared PC.  grads-2.0.a5.oga.5-win32_superpack.exe  ActivePerl-5.10.1.1006-MSWin32-x86-291086.msi  Perl Scripts (grib2ctl.pl, g2ctl.pl)  Launch installers and install applications.  GrADS  C:¥OpenGrADS  Perl  C:¥Perl  Copy Perl scripts  C:¥OpenGrADS¥Contents  Edit Environment Valuables  Append following pathes to “PATH”  C:¥OpenGrADS¥Contents¥Cygwin¥Versions¥2.0.a5.oga. 5¥i686  C:¥Perl¥bin 44
  • 45. 2. Download GPVs from JMA High- Resolution GSM Data Service  Access Information  Server: ds.data.jma.go.jp  UserID:  Passwd:  Download GRIB2 data files.  Initial: 00Z 02 Oct. 2009 (200910020000)  Region: Global (gl)  Resolution: 0.25 * 0.25(deg) (0p25)  Level: Surface (surf)  Forecast Time: Any FTs (0000, 0003, …, 0312)  Working Directory  C:¥OpenGrADS¥Contents¥Resources¥SampleDatasets 45
  • 46. 2. Download GPVs (3 ways) 1. Download from website (Firefox)  URL: http://ds.data.jma.go.jp/tl959/members/ 2. FTP access by browser (IE, Firefox)  URL: ftp://[ID]:[PASSWORD]@ds.data.jma.go.jp/ 3. FTP access by command line $ pwd  ‘$ ftp ds.data.jma.go.jp’ /cygdrive/c/OpenGrADS/work $ ftp ds.data.jma.go.jp : Name (XXX XXX XXX XXX:xxxxxxxx): XXXXXXXX : Password: ******** : ftp> cd 200910011200/gl/0p25/surf/0000/ ftp> ls Z__C_RJTD_20091001120000………….gz ftp> bi ftp> prompt ftp> get Z__C_RJTD_20091001120000………….gz : 226 Transfer complete. ftp> quit $ ls Z__C_RJTD_20091001120000………….gz 46 $
  • 47. 3(1). Concatenate data and create control file  Unpack ‘.gz’ file by ‘gzip –d’ command.  Concatenate data by ‘cat’ command.  Execute perl script ‘g2ctl.pl’ and make control file as follows. $ pwd /cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets $ gzip –d ./*.gz $ ls GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0000_grib2.bin GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0003_grib2.bin : GSM_GPV_Rgl_Gll0p25deg_Lsurf_FD0312_grib2.bin $ cat GSM_GPV_*.bin > GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin $ perl ../Contents/g2ctl.pl –verf ./GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin > ./gsm.ctl $ cat ./gsm.ctl dset ^GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin index ^GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin.idx undef 9.999E+20 title GSM_GPV_Rgl_Gll0p25_Lsurf_grib2.bin : : 47 $
  • 48. 3(2). Create index file  Execute ‘gribmap’ and make index file as follows. $ pwd /cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets $ gribmap –i ./gsm.ctl –e $ 48
  • 49. 4. Launch GrADS, Visualize data  Execute GrADS and visualize data as $ pwd follows. /cygdrive/c/OpenGrADS/Contents/Resources/SampleDatasets $ grads -l ga-> open gsm.ctl Scanning description file: gsm.ctl Data file GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin is open as file 1 LON set to 0 360 LAT set to -90 90 LEV set to 1 1 Time values set: 2009:10:2:00 2009:10:2:00 E set to 1 1 ga-> q ctlinfo dset GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin title GSM_GPV_Rgl_Gll0p25deg_Lsurf_grib2.bin undef 9.999e+20 xdef 1440 linear 0 0.25 ydef 721 linear -90 0.25 zdef 1 linear 1 1 tdef 29 linear 00Z02OCT2009 180mn vars 11 apcpsfc 0 0,1,8,1 ** surface Total Precipitation [kg/m^2] : ga-> d prmslmsl / 100 49 Contouring: 950 to 1040 interval 10 ga->
  • 50. 5. Customize data, Export image  Customize image by using GrADS commands for settings/options.  Print and export image to PNG format. ga-> c Your convenient ga-> set lon @@@ @@@ ga-> set lat @@@ @@@ region / time ga-> set time @@@@@@ ga-> set gxout shaded ga-> d apcpsfc ga-> cbarn ga-> set gxout contour ga-> d prmslmsl / 100 ga-> set gxout vector ga-> d skip(ugrd10m, 8, 8);vgrd10m ga-> enable print tmp.gm ga-> print ga-> disable print ga-> !gxyat -o tmp.png tmp.gm ga-> quit 50
  • 51. 6. Scripting with GrADS * GrADS script: function main() ctl_file = "./gsm.ctl"  Edit “sample4.gs” (see out_file = "./time-tmp2m.txt" p.38) and make script which outputs data list say "Surface Temperature (degC)" output = write(out_file, "Surface Temperature (degC)") of Time-series of Surface Temperature 'open 'ctl_file 'set lon 140' at 1 grid point. 'set lat 36' 'set t 1 29' 'set gxout value' T = 1 while(T<=29) 'set t 'T time = subwrd(result, 4) 'd tmp2m - 273.15' temp = subwrd(result, 4) [Output of this script] say time' 'temp Surface Temperature (degC) output = write(out_file, time' 'temp, append) 2009:9:28:12 22.779 2009:9:28:15 21.6382 T = T + 1 2009:9:28:18 20.8 endwhile : : 'quit' 51 2009:10:2:0 22.0815 return
  • 52. 7. (If possible, ) try to draw various images and develop scripts Overlay multiple elements 52 Calculate at fixed Lat. Develop and test GrADS scripts