subroutine rapid_aid ( strmid, ismon, isday, isyr, istime, & ip25, ip30, ip35, ip40, lu ) Cx----------------------------------------------------------------------------- Cx Cx This computes the deterministic RI aid for the 25, 30, 35, 40-kt thresholds Cx Programmers: Sampson and Sisko Cx Cx Input: Cx Cx strmid = storm id (e.g., al012012) Cx ismon = month (integer) Cx isday = day of month (integer) Cx isyr = year within century (integer) Cx istime = synoptic time (integer) Cx ip25 = probability of 25-kt RI (integer) Cx ip30 = probability of 30-kt RI (integer) Cx ip35 = probability of 35-kt RI (integer) Cx ip40 = probability of 40-kt RI (integer) Cx lu = Unit number for writing RI forecasts. If lu=0 a file is opened Cx with the naming convention below. Otherwise the file open step is skipped. Cx Cx Output: A-deck format with RI[25|30|35|40] intensity information out to Cx 24 hours, otherwise if thresholds are not met then the output file length Cx otherwise if thresholds are not met then the output file length is 0 size. Cx Cx Sample calling sequence: Cx Cx output file is: strmid_yyyymmddhh_rapid.dat if lu = 0 Cx Cx For more information, see: cx Cx Sampson, C. R., J. Kaplan, J. A. Knaff, M. DeMaria, C. A. Sisko, 2011: Cx A deterministic rapid intensification aid, Bull. Amer. Meteor. Soc. cx cx Modified May 2013 (MD) to add unit number to argument list for cx NCEP supercomputer processing. cx Cx----------------------------------------------------------------------------- Cx---------------- Cx... Includes ... Cx---------------- include 'dataioparms.inc' include 'dataformats.inc' C----------------------------- C... Variable Declarations ... C----------------------------- Cx... Int Types ... integer result integer nrecs integer int0 integer ip25, ip30, ip35, ip40 Cx... Char Types ... character*8 strmid character*8 prob character*10 dtg character*100 filename Cx... Datastructure Types ... type (BIG_AID_DATA) aData type (AID_DATA) aRcd Cx... Array Types ... integer ltlnwnd(newnumtau,llw) c ++ Common block from main iships.f program, all we want is vmx common /lgestr/ aday,spdx,pslv,per,vmx,pc20,rthresh Cx... Initialize Variables ... do i=1, newnumtau ltlnwnd(i,1) = 0 ltlnwnd(i,2) = 0 ltlnwnd(i,3) = 0 enddo Cx----------------------------------------------------------------------------- Cx START of MAIN ROUTINE Cx----------------------------------------------------------------------------- Cx -- Obtain command line arguments -- cx strmid = ' ' cx call getarg ( 1, strmid ) cx dtg = ' ' cx call getarg ( 2, dtg ) cx infile = ' ' cx call getarg ( 3, infile ) cx rvalfile = ' ' cx call getarg ( 4, rvalfile ) write (dtg, '(a2,4i2.2)') "20", isyr, ismon, isday, istime Cx -- Read RI Values file -- cx open ( 22, file=rvalfile, status='old', iostat=istat, err=300 ) cx read( 22, *) p25, p30, p35, p40 cx close( 22 ) Cx ***************** OUTPUT LINE (DEBUG) ***************** c print *, '...Rapid Intensity Obj Aid...' c print *, 'storm id = ', strmid c print *, 'DTG = ', dtg c print *, 'p25 = ', ip25 c print *, 'p30 = ', ip30 c print *, 'p35 = ', ip35 c print *, 'p40 = ', ip40 Cx ***************** OUTPUT LINE (DEBUG) ***************** Cx -- Read Adeck file file -- cx open ( 23, file=infile, status='old', iostat=istat, err=300 ) cx call getARecord ( 23, "SHIP", aRcd, result ) cx if ( result .eq. 0 ) goto 300 cx close( 23 ) Cx -- Assign values -- Cx ** Vmax at 0 hour (initial time) ** cx int0 = aRcd%aRecord(1)%vmax int0 = nint (vmx) Cx ** obtain posits from all other times ** cx nrecs = aRcd%numrcrds if ( nrecs > 3 ) nrecs = 3 cx do i=1, nrecs cx CCC print *, i, aRcd%aRecord(i)%lat, aRcd%aRecord(i)%lon cx ltlnwnd(i,1) = int( aRcd%aRecord(i)%lat * 10 ) cx ltlnwnd(i,2) = int( aRcd%aRecord(i)%lon * 10 ) cx ltlnwnd(i,3) = 0 cx cx enddo Cx -- Compute RI Determinsitic Aid, write to file -- if (lu .eq. 0) then write (filename, '(a8,a10,a10)') strmid,dtg, "_rapid.dat" lutemp = 24 open (lutemp, file=filename, status='replace', iostat=istat, & err=300) else lutemp = lu endif call RI(strmid, dtg, int0, ltlnwnd, ip25, ip30, ip35, ip40, + lutemp) if (lu .eq. 0) then close(lutemp) endif c goto 400 c 300 stop 'File error occurred...' c 400 stop 'Normal termination...' 300 continue return end Cx ----------------------------------------------------------------------------- Cx END of MAIN ROUTINE Cx ----------------------------------------------------------------------------- Cx ----------------------------------------------------------------------------- Cx SUBROUTINES Cx ----------------------------------------------------------------------------- subroutine RI(strmid, dtg, int0, ltlnwnd,ip25,ip30,ip35,ip40, lu ) include 'dataioparms.inc' Cx Cx This computes the deterministic RI aid for the 25, 30, 35, 40-kt thresholds Cx Programmers: Sampson and Sisko Cx Cx For more information, see: cx Cx Sampson, C. R., J. Kaplan, J. A. Knaff, M. DeMaria, C. A. Sisko, 2011: A deterministic Cx rapid intensification aid, Bull. Amer. Meteor. Soc., in press. Cx Cx Input: cx Cx strmid = storm id (e.g., al012010) Cx dtg = yyyymmddhh Cx int0 = initial intensity (kt) either from CARQ or best track Cx ltlnwnd = array of lats, lons and intensity values for 12, 24, 36, 48, 72 h. Cx all are integers, cx 0-900 (degrees*10) for lats, cx 0-1800 (degrees*10) for lons cx 0-165 (kt) for intensities Cx ip25 = probability of +25 kt in 24 h Cx ip30 = probability of +30 kt in 24 h Cx ip35 = probability of +35 kt in 24 h Cx ip40 = probability of +40 kt in 24 h Cx lu = logical unit of objective aid output (adeck) file Cx assumed to be open for write, at end of file Cx Cx Output: one deterministic RI aid forecast to adeck cx Cx Definitions: cx Cx RI40 =RI aid intensities for 40 kt probability threshold Cx RI35 =RI aid intensities for 35 kt probability threshold Cx RI30 =RI aid intensities for 30 kt probability threshold Cx RI25 =RI aid intensities for 25 kt probability threshold Cx integer RI40(3) integer RI35(3) integer RI30(3) integer RI25(3) integer ip25 integer ip30 integer ip35 integer ip40 integer lu integer ltlnwnd(newnumtau, llw) integer ithresh character*10 dtg character*2 century character*8 cdtg character*8 strmid character*4 techname cx This threshold could be changed/tuned to forecaster desires cx Initially set at 40 percent. ithresh = 40 Cx This bit is required for subroutine writeAid, which has the old 8 char dtg write (cdtg, '(a8)') dtg(3:10) write (century, '(a2)') dtg(1:2) Cx Assign the intensities to the aid Cx This assumes the lat/lon part of lltwnd has been filled Cx with lat*10 and lon*10. The Atlantic should be 0-180, I think! if (ip25 .ge. ithresh .and. ip25 .le. 100) then ltlnwnd(1,3) = int0 ltlnwnd(2,3) = int0 + 13 ltlnwnd(3,3) = int0 + 25 call newWriteAidRcd ( lu, strmid, dtg, 'RI25', ltlnwnd ) endif if (ip30 .ge. ithresh .and. ip30 .le. 100) then ltlnwnd(1,3) = int0 ltlnwnd(2,3) = int0 + 15 ltlnwnd(3,3) = int0 + 30 call newWriteAidRcd ( lu, strmid, dtg, 'RI30', ltlnwnd ) endif if (ip35 .ge. ithresh .and. ip35 .le. 100) then ltlnwnd(1,3) = int0 ltlnwnd(2,3) = int0 + 18 ltlnwnd(3,3) = int0 + 35 call newWriteAidRcd ( lu, strmid, dtg, 'RI35', ltlnwnd ) endif if (ip40 .ge. ithresh .and. ip40 .le. 100 ) then ltlnwnd(1,3) = int0 ltlnwnd(2,3) = int0 + 20 ltlnwnd(3,3) = int0 + 40 call newWriteAidRcd ( lu, strmid, dtg, 'RI40', ltlnwnd ) endif return end