Commit 6fd2ba84 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Wed Feb 13 00:00:22 EST 2019

parent f18067ac
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; append_from_monitor.ncl
; Carl Schreck (cjschrec@ncsu.edu)
; February 2018
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Empty file to start NCL scripts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/lib.array.ncl"
begin ; main
print_clock( "Here we go!" )
setfileoption("nc","Format","LargeFile")
; These are some parameters that could be useful to have up top
varName = "chi200"
ioPath = "~/data/cfsr/total/" + varName + ".total.nc"
newPath = "~/data/cfsr/daily/" + varName + ".2018.nc"
print_clock( "Reading old data" )
oldFile = addfile( ioPath, "r" )
oldData = oldFile->$varName$
oldTime = oldFile->time
delete(oldFile)
print_clock( "Reading new data" )
newFile = addfile( newPath, "r" )
newTime = newFile->time
uniqueInd = ind( .not.is_in_common( newTime, oldTime ) )
newData = newFile->$varName$(uniqueInd,:,:)
print_clock("Regrid")
newRegrid = copy_Gridding( oldData, newData )
print_clock("Append")
outData = array_append_record( oldData, newRegrid, 0 )
outTime = array_append_record( oldData&time, newRegrid&time, 0 )
copy_VarAtts( oldData&time, outTime )
add_time_atts( outTime )
copy_VarAtts( oldData, outData )
outData!0 = "time"
outData!1 = "lat"
outData!2 = "lon"
outData&lon = oldData&lon
outData&lat = oldData&lat
outData&time = outTime
print_clock("Writing")
system("rm " + ioPath )
outFile = addfile( ioPath, "c" )
outFile->$varName$ = outData
delete(outFile)
print_clock( "Thank you, come again." )
end; main
......@@ -26,11 +26,12 @@ begin
; These are some parameters that could be useful to have up top
if( .not.isvar("varName") ) then
varName = "skt"
varName = "chi200"
end if
standardizing = False
basePath = "~/data/ncep1/"
basePath = "~/data/cfsr/"
; basePath = "~/data/olr/current/"
; basePath = "/home/carl/data/nclimgrid/beta/merged/"
if( True ) then
pathIn = basePath + "total/" + varName + ".total.nc"
......
......@@ -7,7 +7,7 @@ fi
echo $QUEUE
NCL_SCRIPT=filter_waves
VARNAME="rain"
VARNAME="chi200"
FILTNAME="k09"
NCL_DIR=`pwd`
LOG_DIR=$NCL_DIR/log
......
......@@ -35,18 +35,21 @@ begin
end if
obsPerDay = 1
if( .not.isvar("varName") ) then
varName = "rain"
varName = "olr"
end if
print( varName )
basePath = "~/data/nasa_ymc/fcst_verif/"
basePath = "~/data/cfsr/"
; basePath = "~/data/nasa_ymc/fcst_verif/"
; basePath = "~/data/olr/current/"
; pathIn = basePath + ".std.nc"
; pathOut = basePath + ".waves.std.nc"
pathIn = basePath + varName + ".anom.nc"
pathOut = basePath + varName + "." + filtName + ".nc"
; pathIn = basePath + "anom/" + varName + ".anom.nc"
; pathOut = basePath + "waves/" + varName + ".anom.waves.nc"
; pathIn = basePath + varName + ".anom.nc"
; pathOut = basePath + varName + "." + filtName + ".nc"
pathIn = basePath + "anom/" + varName + ".anom.nc"
pathOut = basePath + "waves/" + varName + ".anom.waves.nc"
calcHigh = True
calcHigh = False
calcLow = True
calcMrg = False
calcMjo = True
......@@ -66,6 +69,7 @@ begin
lat@actual_range = (/ min(lat), max(lat) /)
; Open the output files
setfileoption("nc","Format","LargeFile")
; setfileoption("nc","Format","NetCDF4")
; setfileoption("nc","CompressionLevel",1)
if( makeNewFile ) then
......
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