Commit 5df0f108 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Sat Mar 16 00:00:22 EDT 2019

parent 52198773
......@@ -16,71 +16,48 @@ load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
load "$CJS_NCL_LIB/lib.months.ncl"
load "$CJS_NCL_LIB/lib.ibtracs.ncl"
load "/home/carl/lib/lib.tc_clim.ncl"
load "$CJS_NCL_LIB/lib.ibtracs4.ncl"
load "/home/carl/lib/lib.tc_clim4.ncl"
begin ; main
print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top
targetBasin = 0
targetBasin = "GL"
thresh = 35
minYear = 2017
maxYear = 2017
minYear = 1996
maxYear = 1996
print_clock( "Reading" )
; inPath = "/home/carl/data/ibtracs/v03r07/Allstorms.ibtracs_wmo.v03r07.nc"
inPath = "~/data/state_of_climate/tcvitals.nc"
inFile = addfile( inPath, "r" )
stormSn = chartostring( inFile->storm_sn )
stormBasin = inFile->basin
stormNature = inFile->nature_wmo
stormType = inFile->track_type
stormTime = inFile->time_wmo
if( getfilevartypes( inFile, "lat_wmo" ).eq."short" ) then
stormLat = short2flt(inFile->lat_wmo)
stormLon = short2flt(inFile->lon_wmo)
stormWind = short2flt(inFile->wind_wmo)
else
stormLat = inFile->lat_wmo
stormLon = inFile->lon_wmo
stormWind = inFile->wind_wmo
end if
ibtData = ibt_read_genesis( "", thresh, targetBasin, "" )
print_clock( "Finding genesis" )
firstLat = find_first_data( thresh, stormWind, stormNature, stormType, \
stormLat )
firstLon = find_first_data( thresh, stormWind, stormNature, stormType, \
stormLon )
firstWind = find_first_data( thresh, stormWind, stormNature, stormType, \
stormWind )
firstBasin = find_first_data( thresh, stormWind, stormNature, stormType, \
stormBasin )
firstTime = find_first_data( thresh, stormWind, stormNature, stormType, \
stormTime )
isInBasin = check_basin( targetBasin, firstBasin, firstLat, firstLon )
keepStorm = isInBasin(:,0).and.(.not.ismissing(firstTime(:,0)) )
keepInd = ind(keepStorm)
firstLat = ibtData@lat
firstLon = ibtData@lon
firstWind = ibtData@wind
firstBasin = ibtData@basin
firstTime = ibtData
stormSid = ibtData@sid
stormName = ibtData@name
print_clock( "Making strings" )
firstMonth = toint( cd_string( firstTime(:,0), "%n" ) )
firstYear = toint( cd_string( firstTime(:,0), "%Y" ) )
firstString = cd_string( firstTime(:,0), "" )
firstMonth = toint( cd_string( firstTime, "%n" ) )
firstYear = toint( cd_string( firstTime, "%Y" ) )
firstString = cd_string( firstTime, "%N/%D/%Y %H:%M" )
; Print the storms in each month
do m = 1, 12
print( ibt_basin_name( targetBasin, False ) + ": " + \
month_names( m, "", True ) + ": " + minYear + "-" + maxYear )
print( "---------------------------------------------" )
; print( targetBasin + ": " + \
; month_names( m, "", True ) + ": " + minYear + "-" + maxYear )
; print( "---------------------------------------------" )
monthInd := ind( ( firstMonth.eq.m ) \
.and.( firstYear.ge.minYear ).and.( firstYear.le.maxYear ) )
if( .not.all( ismissing(monthInd) ) ) then
print( stormSn(monthInd) + " " + firstString(monthInd) \
+ " " + firstLon(monthInd,0) + " " + firstLat(monthInd,0) )
print( "," + stormSid(monthInd) + ", " + firstBasin(monthInd) \
+ ", " + stormName(monthInd) + ", " + firstString(monthInd) )
end if
print("")
; print("")
end do
print_clock( "Thank you, come again." )
......
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