Re: Software Request

Hi Waylon,

You can do this easily with the software FERRET ( http://ferret.wrc.noaa.gov/Ferret/ )

I've attached a FERRET script which computes the number of strikes for a given area. You can run it from the UNIX/LINUX command line, e.g. ferret -nojnl -script count_strikes.jnl 20060320_0500.nc testout.txt 30 30.1 -180 180

Best regards, Ingo


Waylon.Collins wrote:

Dear members,

Has anyone written software that will perform the following?

1. Will input netCDF-formatted files containing point (instead of gridded) data. The data in my case is lightning. Attached is an example of the netCDF file.

2. Will perform either of the following:

(a) Allow me to input a location in latitude/longitude space and determine whether or not any of the lightning strikes (from data contained within the netCDF file) are within X km of the input location.

(b) Allow me to use latitude/longitude values to define a box in horizontal space, then determines whether or not any of the lightning strikes (from data contained within the netCDF file) are within the box.

The software needs to be of command-line type (no GUIs) that operates in a Linux environment.

Sincerely,

Waylon


! DESCRIPTION: counts strikes in a given area 

\cancel mode verify

! process input arguments 
define symbol infile=$1
define symbol outfile=$2
define symbol latmin=$3
define symbol latmax=$4
define symbol lonmin=$5
define symbol lonmax=$6

! open input file
use ($infile) 

! count strikes 
let mask=if (lon ge ($lonmin) and lon le ($lonmax) \
  and lat ge ($latmin) and lat le ($latmax)) then 1 else 0 
let /title="Number of strikes in ($latmin)N to ($latmax)N and ($lonmin)E to 
($lonmax)E" \
  nstrikes=mask[x=@sum]

! write result to display
list nstrikes

! write result to file 
list /clobber /nohead /file=($outfile) nstrikes