Skip to content

Commit c01da91

Browse files
Merge pull request #55 from TimMarchok-NOAA/output_u_shear
Add output of u-component of shear. In response to a request, I added the output of the u-component of the 850-200 mb vertical shear. This was easy to do because the vertical shear is already computed in the tracker (including the separate u- and v-components), and so this just required the output of that u-component. Currently, this is only output in the atcf_gen output file that is used for genesis detection & tracking.
2 parents daf41c0 + 22e3214 commit c01da91

1 file changed

Lines changed: 50 additions & 21 deletions

File tree

code/src/tracker/gettrk_subroutines.f

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,14 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
222222
c least disruptive alternative.
223223
c vt850_flag This flag keeps track of the value of the flag for
224224
c the 850 mb Vt check.
225-
c shear real array containing both the magnitude and direction
226-
c of the storm-centered 850-200 mb vertical shear. In
227-
c the 3rd element of the array, index 1 is for shear
228-
c magnitude and index 2 is for shear direction.
225+
c shear real array containing the magnitude and direction
226+
c of the storm-centered 850-200 mb vertical shear, and
227+
c also containing the magnitude of the u- and
228+
c v-components of the shear. In the 3rd element of the
229+
c array, index 1 is for shear magnitude, index 2 is for
230+
c shear direction, index 3 is for the magnitude of the
231+
c u-component of shear, and index 4 is for the magnitude
232+
c of the v-component of shear.
229233
c already_computed_domain_wide_rh character (y/n) indicates if RH
230234
c has already been computed across the whole domain for this
231235
c forecast hour (this keeps us from re-computing it for
@@ -318,7 +322,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
318322
real clat(maxstorm,maxtime,maxtp)
319323
real xmaxwind(maxstorm,maxtime)
320324
real stderr(maxstorm,maxtime),xval(maxtp),cps_vals(3)
321-
real shear(maxstorm,maxtime,2)
325+
real shear(maxstorm,maxtime,4)
322326
real pctile_quad_bin_wind(numquad,num_r34_bins)
323327
real fp_pctile_quad_bin_wind(numquad,num_r34_bins)
324328
real gridpoint_maxmin,dist,distnm,xknots,xmaxspeed
@@ -601,7 +605,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
601605
& ,i999_stmspd,i999_stmdir,x99_pbar,x99_rbar
602606
& ,x99_rmax,cps_vals,c_undef_wcflag
603607
& ,imeanzeta,igridzeta
604-
& ,x999_shrmag,x999_shrdir
608+
& ,x999_shrmag,x999_shrdir,x999_shrmag
605609
& ,x999_divg,x999_moist_divg
606610
& ,x999_rh600_800,x999_rh1000_925
607611
& ,x999_omega500,x999_sst
@@ -2006,7 +2010,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
20062010
& ,i999_stmspd,i999_stmdir,x99_pbar,x99_rbar
20072011
& ,x99_rmax,cps_vals,c_undef_wcflag
20082012
& ,imeanzeta,igridzeta
2009-
& ,x999_shrmag,x999_shrdir
2013+
& ,x999_shrmag,x999_shrdir,x999_shrmag
20102014
& ,x999_divg,x999_moist_divg
20112015
& ,x999_rh600_800,x999_rh1000_925
20122016
& ,x999_omega500,x999_sst
@@ -3741,7 +3745,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
37413745
& ,istmspd,istmdir,plastbar,rlastbar
37423746
& ,rmax,cps_vals,wcore_flag
37433747
& ,imeanzeta,igridzeta
3744-
& ,shear(ist,ifh,1),shear(ist,ifh,2)
3748+
& ,shear(ist,ifh,1),shear(ist,ifh,2),shear(ist,ifh,3)
37453749
& ,divg,moist_divg
37463750
& ,rh_800_600_smooth,rh_1000_925_smooth
37473751
& ,omega500_smooth,sst_smooth
@@ -3947,7 +3951,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
39473951
& ,i999_stmspd,i999_stmdir,x99_pbar,x99_rbar
39483952
& ,x99_rmax,cps_vals,c_undef_wcflag
39493953
& ,imeanzeta,igridzeta
3950-
& ,x999_shrmag,x999_shrdir
3954+
& ,x999_shrmag,x999_shrdir,x999_shrmag
39513955
& ,x999_divg,x999_moist_divg
39523956
& ,x999_rh600_800,x999_rh1000_925
39533957
& ,x999_omega500,x999_sst
@@ -4092,7 +4096,7 @@ subroutine tracker (inp,maxstorm,numtcv,ifhmax,trkrinfo,ncfile
40924096
& ,i999_stmspd,i999_stmdir,x99_pbar,x99_rbar
40934097
& ,x99_rmax,cps_vals,c_undef_wcflag
40944098
& ,imeanzeta,igridzeta
4095-
& ,x999_shrmag,x999_shrdir
4099+
& ,x999_shrmag,x999_shrdir,x999_shrmag
40964100
& ,x999_divg,x999_moist_divg
40974101
& ,x999_rh600_800,x999_rh1000_925
40984102
& ,x999_omega500,x999_sst
@@ -8044,10 +8048,14 @@ subroutine get_shear (imax,jmax,inp,dx,dy
80448048
c if GM-wrapping has been set for this grid.
80458049
c
80468050
c OUTPUT:
8047-
c shear real array containing both the magnitude and direction
8048-
c of the storm-centered 850-200 mb vertical shear. In the
8049-
c 3rd element of the array, index 1 is for shear magnitude
8050-
c and index 2 is for shear direction.
8051+
c shear real array containing the magnitude and direction
8052+
c of the storm-centered 850-200 mb vertical shear, and
8053+
c also containing the magnitude of the u- and
8054+
c v-components of the shear. In the 3rd element of the
8055+
c array, index 1 is for shear magnitude, index 2 is for
8056+
c shear direction, index 3 is for the magnitude of the
8057+
c u-component of shear, and index 4 is for the magnitude
8058+
c of the v-component of shear.
80518059
c igsret return code from this subroutine
80528060
c
80538061
c LOCAL:
@@ -8086,7 +8094,7 @@ subroutine get_shear (imax,jmax,inp,dx,dy
80868094
real fixlon(maxstorm,maxtime),fixlat(maxstorm,maxtime)
80878095
real clon(maxstorm,maxtime,maxtp)
80888096
real clat(maxstorm,maxtime,maxtp)
8089-
real shear(maxstorm,maxtime,2)
8097+
real shear(maxstorm,maxtime,4)
80908098
real rdist(numdist),vr(numazim,numdist,numlev)
80918099
real vt(numazim,numdist,numlev)
80928100
real vt_prime(numazim,numdist,numlev)
@@ -8556,6 +8564,9 @@ subroutine get_shear (imax,jmax,inp,dx,dy
85568564

85578565
shear(ist,ifh,1) = shear_mag
85588566

8567+
shear(ist,ifh,3) = ushear
8568+
shear(ist,ifh,4) = vshear
8569+
85598570
c -----------------------------------------------------------------
85608571
c Now compute the shear direction (i.e., the direction that the
85618572
c shear is coming from). With the methods below, we will initially
@@ -12417,7 +12428,7 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1241712428
& ,ifcsthour,vmaxwind,xminmslp,vradius,maxstorm
1241812429
& ,trkrinfo,istmspd,istmdir,plastbar,rlastbar,rmax
1241912430
& ,cps_vals,wcore_flag,imeanzeta,igridzeta
12420-
& ,shear_mag,shear_dir,divg,moist_divg
12431+
& ,shear_mag,shear_dir,u_shear_mag,divg,moist_divg
1242112432
& ,rh_800_600_smooth,rh_1000_925_smooth
1242212433
& ,omega500_smooth,sst_smooth
1242312434
& ,axisymet_rmw_dist,axisymet_rmw_val,ioaxret)
@@ -12502,6 +12513,8 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1250212513
c shear_mag real magnitude of 850-200 mb vertical shear.
1250312514
c shear_dir real vector direction the 850-200 mb vertical shear
1250412515
c is heading to.
12516+
c u_shear_mag real magnitude of the u-component of the 850-200 mb
12517+
c vertical shear.
1250512518
c sst_smooth real barnes-averaged SST centered on mean fix
1250612519
c axisymet_rmw_dist real distance to axisymmetric RMW
1250712520
c axisymet_rmw_val real value of axisymmetric RMW
@@ -12529,9 +12542,10 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1252912542
real cps_vals(3)
1253012543
real shear_mag,shear_dir,axisymet_rmw_dist,axisymet_rmw_val
1253112544
real divg,moist_divg,rh_800_600_smooth,rh_1000_925_smooth
12532-
real omega500_smooth,sst_smooth
12545+
real omega500_smooth,sst_smooth,u_shear_mag
1253312546
integer intlon,intlat,istmspd,istmdir,iplastbar,irlastbar,irmax
1253412547
integer ivtl,ivtu,iparamb,output_fhr,ishear_mag,ishear_dir
12548+
integer i_u_shear_mag
1253512549
integer vradius(3,4)
1253612550
integer imeanzeta(nlevgrzeta),igridzeta(nlevgrzeta)
1253712551
integer idivg,imoistdivg,irh_800_600,irh_1000_925,iomega500,isst
@@ -12743,6 +12757,17 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1274312757
ishear_dir = -99
1274412758
endif
1274512759

12760+
if (shearflag == 'y' .or. shearflag == 'Y') then
12761+
if (u_shear_mag > -998.0) then
12762+
! Convert the shear from m/s to knots for the output
12763+
i_u_shear_mag = nint((u_shear_mag*1.9427)*10.)
12764+
else
12765+
i_u_shear_mag = -99
12766+
endif
12767+
else
12768+
i_u_shear_mag = -99
12769+
endif
12770+
1274612771
if (axisymet_rmw_dist >= 0.0) then
1274712772
irmw_dist = nint(axisymet_rmw_dist * 0.539638) ! convert from
1274812773
! km to nm
@@ -12881,6 +12906,7 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1288112906
print *,'ivtu= ',ivtu
1288212907
print *,'wcore_flag= ',wcore_flag
1288312908
print *,'ishear_mag= ',ishear_mag,' ishear_dir= ',ishear_dir
12909+
print *,'i_u_shear_mag= ',i_u_shear_mag
1288412910
print *,'isst= ',isst
1288512911
print *,'irmw_dist= ',irmw_dist,' irmw_val= ',irmw_val
1288612912
print *,'idivg= ',idivg,' imoistdivg= ',imoistdivg
@@ -12905,7 +12931,8 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1290512931
& ,iplastbar,irlastbar,irmax,iparamb,ivtl,ivtu,wcore_flag
1290612932
& ,istmdir,istmspd
1290712933
& ,imeanzeta(1),igridzeta(1),imeanzeta(2),igridzeta(2)
12908-
& ,ishear_mag,ishear_dir,isst,irmw_dist,irmw_val
12934+
& ,ishear_mag,ishear_dir,i_u_shear_mag
12935+
& ,isst,irmw_dist,irmw_val
1290912936
& ,idivg,imoistdivg,irh_800_600,irh_1000_925,iomega500
1291012937

1291112938
if (vradius(2,1) > 0 .or. vradius(2,2) > 0 .or.
@@ -12923,7 +12950,8 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1292312950
& ,iplastbar,irlastbar,irmax,iparamb,ivtl,ivtu,wcore_flag
1292412951
& ,istmdir,istmspd
1292512952
& ,imeanzeta(1),igridzeta(1),imeanzeta(2),igridzeta(2)
12926-
& ,ishear_mag,ishear_dir,isst,irmw_dist,irmw_val
12953+
& ,ishear_mag,ishear_dir,i_u_shear_mag
12954+
& ,isst,irmw_dist,irmw_val
1292712955
& ,idivg,imoistdivg,irh_800_600,irh_1000_925,iomega500
1292812956
endif
1292912957

@@ -12942,15 +12970,16 @@ subroutine output_atcf_gen (outlon,outlat,inp,ist
1294212970
& ,iplastbar,irlastbar,irmax,iparamb,ivtl,ivtu,wcore_flag
1294312971
& ,istmdir,istmspd
1294412972
& ,imeanzeta(1),igridzeta(1),imeanzeta(2),igridzeta(2)
12945-
& ,ishear_mag,ishear_dir,isst,irmw_dist,irmw_val
12973+
& ,ishear_mag,ishear_dir,i_u_shear_mag
12974+
& ,isst,irmw_dist,irmw_val
1294612975
& ,idivg,imoistdivg,irh_800_600,irh_1000_925,iomega500
1294712976
endif
1294812977

1294912978
87 format (a2,', ',a4,', ',i10.10,'_F',i3.3,'_',i3.3,a1,'_',i4.4,a1
1295012979
& ,'_',a3,', ',i10.10,', 03, ',a4,', ',i3.3,', ',i3,a1
1295112980
& ,', ',i4,a1,', ',i3,', ',i4,', ',a12,4(', ',i4.4)
1295212981
& ,', ',3(i4,', '),3(i6,', '),a1,2(', ',i4),4(', ',i6)
12953-
& ,', SHR82, ',i4,', ',i3,3(', ',i4),2(', ',i9)
12982+
& ,', SHR82, ',i4,', ',i3,', ',i5,3(', ',i4),2(', ',i9)
1295412983
& ,3(', ',i4))
1295512984

1295612985
c bug fix for IBM: flush the output stream so it actually writes

0 commit comments

Comments
 (0)