Commit a6887ba7 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Thu Feb 28 00:33:57 EST 2019

parent 1433b3ea
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; netcdf_to_ascii.ncl
; Carl Schreck (cjschrec@ncsu.edu)
; October 2014
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Read a netcdf grid, average for an area, and write it out
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$CJS_NCL_LIB/lib.array.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/lib.composites.ncl"
begin ; main
print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top
months = (/ 11, 12, 1, 2, 3 /)
waveName = "er"
thresh = -1.5
minLon = 190
maxLon = 190
minLat = 00
maxLat = 10
inPath = "~/data/olr/current/olr.k09.nc"
inFile = addfile( inPath, "r" )
inTime = inFile->time
baseData = dim_standardize_n_Wrap( dim_avg_n_Wrap( \
inFile->$waveName$(month_ind(inTime,months), \
{minLat:maxLat},{minLon:maxLon}), \
(/ 1, 2 /) ), 0, 0 )
printVarSummary(baseData)
compDates := composite_dates( baseData, thresh )
outString = cd_string( compDates, "%Y, %N, %D, " ) + baseData({compDates})
print( outString )
print_clock( "Writing" )
outPath = waveName + "." + lon_string(minLon) + ".csv"
asciiwrite( outPath, outString )
print_clock( "Thank you, come again." )
end; main
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment