[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990713: ACARS programs



Steve,

The code uses the NetCDF 3.x API.

You should set the max size to match whatever is defined in your
distribution. This is because when the write_gempak.c routine
passes the data array which is dimmensioned as maxtim*maxprm
in your gemlib.a routines, you don't want to step on that space.
This change is only needed for the decoder. After that, you will
be using your own gemlib.a routines for Nsharp or acprof which
use MMHDRS in the array size definitions which will use your gemprm.OS
file.

I have found that there are occasionally 1800 observations every 10
minutes, which can exceed 10000 observations in an hour. For MMHDRS
less than 10,000 you will have more trouble using hourly files.
uotputting minute files is possible but would be tough to use, so there is
probably a need in dcacars to create 10,20,30 minute binned files like I
have with our lightning decoder. Certainly 30 minute files would work
for me, but if your MMHDRS is less than 5000, then this could really be
painful.

Attatched is my Makeinc.common. Note that NA_OS is defined from my
Gemenviron script as:
hpux, sol, linux, x86, irix, osf, aix, and others...

Makeinc.common includes Makeinc.$NA_OS, so I'll send you a copy
of Makeinc.hpux also. My hpux is 11.0 which has different locations for
X11 and Motif...but it will show you my BRIDGE_DEF defines as well
as the NETCDF defines in common.

Steve CHiswell
Unidata User SUpport


On Wed, 14 Jul 1999, Steven Danz wrote:

> Thanks for the code, now for the questions ;-)
> 
> Do I need a particular version of netCDF?
> If I use less than 10,000 as the ship file size, will I have problems?
> Could you send me a copy of Makeinc.common?
> 
> Thanks again!
> 
> Steven
> 
> Steve Chiswell wrote:
> 
> > Steve,
> >
> > I got your phone message...we had a 4 day weekend and I was
> > off on vacation following that.
> >
> > I have packaged up a tar file with the source of the ACARS programs
> > I put together and nsharp at:
> > http://www.unidata.ucar.edu/packages/gempak/contrib/acars.tar.Z
> >
> > This includes the subdirectories:
> >
> > unidata/ldmbridge/dcacars           The decoder
> > unidata/programs/acprof             A modified version of snprof for
> >                                     use with ship files
> > gempak5.4/tables/pack/acars.pack    packing file for decoder
> >
> > nprogs/nsharp                       Updated for use with ACARS and
> > resource/Nsharp                     bug fixes/platform compatibility
> > icons/Nsharp.xbm
> >
> > In our distribution, I set the maximum number of headers in gemprm.OS
> > to 10,000, so in unidata/ldmbridge/dcacars/write_gempak.c you
> > will find:
> > write_gempak.c:int maxstat=9999,maxtim=9999,iflno;
> >
> > You should change those to 1 less than the max in your distribution-
> > otherwise you will get wierd runtime results from mismatched arrays
> > in the subroutine calls to the gemlib routines.
> >
> > I build everything in the Unidata distribution using Makefiles rather
> > than build scripts due to the number of different platforms I maintain.
> > Dcacars requires that you have the NetCDF include file and library
> > for reading the input data. I can provide you with a binary
> > if desired. There is a sample NetCDF file in the dcacars directory
> > which "make test" decodes into a gempak file.
> >
> > The changes to nsharp include a popup for acars data which let the
> > user select an input file. After the input file is selected, the locations
> > of all the acars reports in the file are plotted on the selection
> > map (color coded to the color bar for height). Typically, a left mouse
> > click on the location you want the sounding for will use all reports in
> > the vicinity of the clicked location. (This is usually more desireable
> > than viewing an ascent or descent for a single plane). A right mouse
> > click on a data point will plot the sounding using only observations from
> > that aircraft. A center mouse click will pop open a window with the
> > data values for the clicked on point. There is some help text on
> > popup as well.
> >
> > I provided a ps output driver rather similar to ntrans rather than
> > the hpgl which was in place previously.
> >
> > acprof is like snprof, however, you can specify area=mkc to
> > plot a sounding using all obs surrounding mkc. Use the mkc++ type
> > of region identifiers to narrow the search area. You can Also plot
> > a sounding for a single aircraft using area=@FSL##### same as
> > snprof. When a sounding is plotted using multiple aircraft, the
> > marker (if marker color is set) will be different for each aircraft.
> > A key as to marker/aircraft will be output. If the symbol list wraps,
> > then the color for marker will be incremented. Busy airports like ORD
> > can have 50+ different aircraft.
> >
> > I haven't made an official announcement of this software yet since I was
> > waiting on a new Garp release to package in with our release- so any
> > feedback would be appreciated. Since your installation is a little
> > different than what I give my sites, let me know if you need
> > clarification on what things need.
> >
> > Steve Chiswell
> > Unidata User SUpport
> 
###################################################################
###################################################################
#
#       Makefile for Nawips 5.2.1
#               Top level
#               Original: Unidata 7/94 P.Bruehl
#               COMET 7/95 D.Himes
#               COMET 9/95 J. Cowie - added NOWRAD variables
#               Unidata 11/95 Chiz - configured for UPC distribution
#
####################################################################
####################################################################
####################################################################
#
#  Gempak.include - UNIDATA Program Center  (7/94 PB)
#  Nawips.include - COMET D.Himes (7/19/95) Copied and modified
#                   from original Gempak.include
#  
#######################################################################
#
#  This file is included in most of the Makefiles for GEMPAK 5.2.
#  (In GEMPAK version 5.1, this file was called Gemmake.incl.) 
#  It defines the paths and filenames for the various libraries and
#  executables.  This file replaces the need to specify the location
#  of the libraries as environment variables.
#
#  You must edit most of this file to match the configuration of your 
#  operating system.  There will be directions at each section below.
#
#   The following shell environment variables *MUST* be defined before
#   invoking this Makefile:
#
#   $NAWIPS  - points to the toplevel of the NAWIPS directory tree.
#   $GEMPAK and $GEMPAKHOME  - points to the toplevel of the gempak part
#              of the NAWIPS tree.  Usually directly under $NAWIPS.
#
#   $OS      - Used in NAWIPS for #ifdef OS statements in code.  Also
#              used by the Makefiles to bring in OS specific sections
#              of the Makefile (ie. like include Makeinclude.$(OS).
#
#   $NA_OS   - Used in $(NAWIPS)/config/Makeinc.common to decide which
#              OS specific Makeinc.* to include.  It also cooresponds
#              to the directories in the NAWIPS tree where the executables
#              and libraries are installed.
#
####################################################################
#
######################################################################
#
# Define the environment variables needed for installation:
#
#  You must configure TOP, LIBDIR and GEMEXE.
#
#  Be sure that LIBDIR and GEMEXE exist on your system!
#
#  You may choose to install the GEMPAK libraries and binaries 
#  in alternate places by defining them here.
#
#
#  Location of the root of the NAWIPS distribution tree.
#
TOP             = $(NAWIPS)

#
#  Location of libraries and .o files that are used to link
#  more than one GEMPAK or NAWIPS program.
#
LIBDIR          = $(TOP)/lib/$(NA_OS)

#
#  Location of UNIDATA Local Data Manager include files and
#  libraries used for building BRIDGE decoder software
#
LDMINC          =
LDMLIB          =
BRIDGE          = $(LIBDIR)/bridge.a
MANDIR          = $(NAWIPS)/man
UNILIB          = $(NAWIPS)/unidata/lib/$(NA_OS)


#
#  Location of executables for "make install" action.
#
GEMEXE          = $(TOP)/bin/$(NA_OS)
SCRIPTS_EXE     = $(TOP)/bin/scripts

#
#  Location of the Gempak include files.
#
INCDIR          = $(GEMPAKHOME)/include

#
#  Location of libraries that are only needed for specific
#  applications and not required to link multiple GEMPAK 
#  programs.
#
GEMOLB          = $(LIBDIR)

#
#  Traditional names of the various gempak and Nawips libraries.
#  
GEMLIB          = $(LIBDIR)/gemlib.a
CGEMLIB         = $(LIBDIR)/cgemlib.a
NXMLIB          = $(LIBDIR)/Nxmlib.a
GPLT            = $(LIBDIR)/gplt.a
APPL            = $(LIBDIR)/appl.a
DEVICE          = $(LIBDIR)/device.a
GPLTDEV         = $(LIBDIR)/gpltdev.a
SYSLIB          = $(LIBDIR)/syslib.a
GN              = $(LIBDIR)/gn.a
GF              = $(LIBDIR)/gf.a
GPS             = $(LIBDIR)/gps.a
PSP             = $(LIBDIR)/psp.a
PS              = $(LIBDIR)/ps.a
PS1             = $(LIBDIR)/ps1.a
PSC             = $(LIBDIR)/psc.a
XW              = $(LIBDIR)/xw.a
FAX             = $(LIBDIR)/fax.a
HP              = $(LIBDIR)/hp.a
NC              = $(LIBDIR)/nc.a
VC              = $(LIBDIR)/vc.a
VT              = $(LIBDIR)/vt.a


#
#  Choose the devices you wish to install.
#
#  The device drivers are XW (XWindow driver),  PS,PS1,PSP,PSC 
#  (greyscale, B&W, portrait mode, and color postscript drivers), 
#  NC (Ntrans CGM driver), HP (HP plotter), VC (vanilla CGM), 
#  and VT (VT100). Also available are GPS (Generic Postscript) and
#  GF (GIF) drivers. 
#

DEVLIST =  xw ps nc vc vt gf hp

#
#  NETCDF Section
#
WANTCDF = NO
#  UNCOMMENT the following line if you to read NetCDF files
# WANTCDF = YES
#
#
#  NetCDF Stubs You must have NetCDF and UdUnits installed on your
#  system if you define WANTCDF=YES. Set appropriate Library and
#  include directories in the next 4 lines
NETCDFINC       = /upc/netcdf/include
UDUNITSINC      = /upc/udunits/include
NETCDF          = /upc/netcdf/lib/libnetcdf.a
UDUNITS         = /upc/udunits/lib/libudunits.a
#
NETCDF_NC       = $(NAWIPS)/unidata/lib/$(NA_OS)/nnet.a
NETCDF_GNET     = $(NAWIPS)/unidata/lib/$(NA_OS)/gnet.a
NETCDF_GEM      = $(NAWIPS)/unidata/lib/$(NA_OS)/gemcdf.a
NETCDFLIBS      = $(NETCDF_GNET) $(NETCDF_NC) $(UDUNITS) $(NETCDF)
#
#  END NetCDF stubs
#

#  General macro's for NAWIPS "N" programs.
#
GEMINCDIR       =  -I$(INCDIR)
GEMINC          =  $(INCDIR)
NAWIPS_INC      =  -I$(NAWIPS)/include
NLIB_INC        =  -I$(NAWIPS)/nprogs/nlib
BIN             =  $(GEMEXE)

#
#######  Package level macros for ntrans
#
NTRANS_TOP      =  $(TOP)/nprogs/ntrans
NTRANS_INC      =  -I$(NTRANS_TOP)/include
NTRANS_BIN      =  $(GEMEXE)


#
#######  Package level macros for nsat
#
NSAT_TOP        =  $(TOP)/nprogs/nsat
NSAT_INC        =  -I$(NSAT_TOP)/include



###############################################################
###############################################################
#
# Generic Compilation and link flags for F77 and CC.
#  (leave these settings as is, make specific definitions in the
#   next section)
#
###############################################################
###############################################################
#

SHELL            = /bin/sh
FC               = f77
CC               = cc
CFLAGS           = -D$(OS)
ANSI_CFLAGS      = -D$(OS)
LD               = ld
AR               = ar
ARFLAGS          = rv
RANLIB           = ranlib
RM               = rm -f
INSTALL          = install -s
LN               = ln -s
STRIP            = strip
FFLAGS           = 
LDFLAGS          = 
XWLIBDIR         = 
XWINCDIR         = 
XWLIBS           = 
NAGRIBLIB        =
NPROGDEFINES     = -DNPROG
CP               = cp
HAVEMOTIF        = YES

#           Do Not Modify Anything Below This Line
#
# Specific compilation and link flags are stored in separate files
# cooresponding to the operating system that NAWIPS is being built 
# on.  
#
# Modify the file $(NAWIPS)/config/Makeinc.{youros} to make changes 
# specific to the target environment.
#
#        hpux 9.x               Makeinc.hpux
#        sunos4 (solaris 1.x)   Makeinc.sunos
#        sunos5 (solaris 2.x)   Makeinc.sol
#        Irix 5.x               Makeinc.irix
#        Ultrix                 Makeinc.ultrix
#        OSF1                   Makeinc.osf
#        AIX                    Makeinc.aix
#
###############################################################
###############################################################
#
#  Garp specific definitions.
#
GARPINCLUDE = -I$(GARPHOME)/include

###############################################################
###############################################################


include $(NAWIPS)/config/Makeinc.$(NA_OS)
###################################################################
###################################################################
#
#       Makefile for Nawips 5.2.1
#               Top level
#               COMET 7/95 D.Himes
#               Original: Unidata 7/94 P.Bruehl
#
####################################################################
####################################################################
####################################################################
#  Makeinc.include - COMET D.Himes (7/19/95) Extracted and modified
#                   from original Gempak.include for making both
#                   NAWIPS and GEMPAK
#
# NOTE:  This file is included by the:
#      $(NAWIPS)/config/Makeinc.common
#
#################################################################
# 
# This file is included by the $(NAWIPS)/config/Makeinc.common
# file (which is directly included by all the Nprogram makefiles
# and indirectly by the Gempak makefiles.
#
# It defines the paths and filenames needed to compile and install 
# Nawips. 
#
# Please configure the settings below to match the configuration
# of your system.
#
#################################################################
##
## HP11.x using Motif2.1 and X11R6
##
#
#  Used to deal with OS specific Makefile differences.

PLATFORM = HP
OPSYS    = HP-UX
OS       = HPUX

#
#  Special definitions for compiling/linking/etc

INSTALL = cp -f
RANLIB  = :

#
#  The ansi-c compiler
## C Options include: -O optimization; -p profiling; -g debugging 
##-Aa ANSI Compiling (NOTE:options only available in unbundled C cmplr)

CC = cc
CC = gcc
COPT = -Aa -D_HPUX_SOURCE -D$(OS) -g #-Aa -D_HPUX_SOURCE -D$(OS) -g
COPT = -D$(OS) # -D_INCLUDE_POSIX_SOURCE #-Aa -D_HPUX_SOURCE -D$(OS) -g

FC     = fort77
FOPT   = +E4 +E6  -g

LDFLAGS = #-O

## Location of MOTIF library and include files (hpux 11.0x)
#
MOTIFLIBS = -lXm
MOTIFINC =
#
## Location of Xpm files for Garp
XPMINCLUDE = 
XPMLIB = 

## Location of X11 library and include files
#
X11LIBS    = -lXt -lX11
XWLIBDIR   = 
X11INC     = 
XWINCDIR   = $(X11INC)

## Unix System or C libraries needed for some applications
#
SYSLIBS =  -lm
NETCDFSYS = -lm


##  Define compile,link,archive, & remove variables 
##  (leave as is)
##
PURIFY    = #purify
CFLAGS    = $(COPT) 
FFLAGS    = $(FOPT)
COMPILE.f = $(FC) $(FFLAGS)  -c
LINK.f    = $(PURIFY) $(FC) $(FFLAGS) $(LDFLAGS) -lm -g
LINK.f    = $(PURIFY) $(CC) $(LDFLAGS) -g -lm -lf
COMPILE.c = $(CC) $(CFLAGS)  -c
LINK.c    = $(PURIFY) $(CC) $(LDFLAGS)
BRIDGE_DEF = -DGEMPAK -D__STDC__ -DNO_TRAILING_UNDERSCORE $(XCFLAGS)