ProjectHomeDir=.. MISSION= DATE= #------------------------------------------------------------------- #Commands ShScripts=$(ProjectHomeDir)/Software/ShScripts RADPROF=$(ShScripts)/rad-prof.sh RENAVI2LL=$(ShScripts)/navicxy2ll.sh HRD=hrdrad-exp #CARTES=radcart-exp CARTES=radcart6 # #Input Files # P3Data=$(ProjectHomeDir)/Data/${MISSION}-${DATE}/p3 RadData=$(P3Data)/radar/${DATE}i-???.rad InsData=$(P3Data)/insitu/${DATE}i.insitu # #Output Files # #all files of a mission are identified by their base name # # insitu -- smoothing of insitu data. # # car -- radcart output # # thresh_geo -- velocity fields(ux0,uy0) + dbz after # geometry-based threshold is applied. # good to see how good is the interpolation. # thresh_geo_vel -- velocity fields(ux0,uy0) + dbz after # geometry-based and velocity threshold are applied. # good to see how many point we have to work with. # radvert -- 3D velocity field generated by radvert after # geometry and velocities thrsholds have been applied. # dbz is also included to provide contest. # mesovel -- mesoscale velocity field: result from mesoscale # smoothing applied to radvert # cdffill -- candis fill. This is required to apply the stokes # theorem. # kine -- kinematic profiles from Doppler analysis base=${MISSION}-${DATE} insitu=${base}-si.dat.gz car=${base}-c.dat.gz thresh_geo=${base}-c-tg.dat.gz thresh_geo_vel=${base}-c-tgv.dat.gz radvert=${base}-c-tgv-w.dat.gz mesovel=${base}-c-tgv-w-m.dat.gz cdffill=${base}-c-tgv-w-m-f.dat.gz kine=${base}-prof.dat #-------------------------------------------------------------------- # L I S T OF T A R G E T S #-------------------------------------------------------------------- TARGET : ${kine} #------------------------------------------------------------------ # P A R A M E T E R S #------------------------------------------------------------------- #Radar time interval MT0= MTF= #Reflectivity DBZ_T= MIN_R=2.5 MIN_H=0.5 #Rain Rate parameters based on values used for convective cores #in the western pacific warmpool #BETA=1.43 ALPHA=139 #The mean values for EPIC2001 #BETA=1.53 ALPHA=153 # # Z = ALPHA * R^BETA ; Z = 10^(dbz/10); R--rain rate Z -- reflectivity factor ALPHA= BETA= #Cartesian grid lon0=-98 lat0=7 GRID=${lon0} 5 670 ${lat0} 5 670 0 1 20 #Mesoscale Interpolation # SR -- radius of influence for the spatial smoothing # GP -- minimun number of good points within the radius of influence SR=30 GP=15 #SR=15 #GP=4 #Insitu data smoothing wavelenght lamnda=100 #Info for thresholding on velocties. #geometrical(eur,evr) and #particule-velocity(eup,evp) eur=1 evr=1 eup=1 evp=1 # Velocity Threshold obtained from the analysis # of histogram after removing gometrical errors VMAX=20 #-------------------------------------------------------------------------- # Building Procedures #-------------------------------------------------------------------------- ${insitu} : cdffilter -l ${lamnda} fwx wx tptime < ${InsData} |\ cdffilter -l ${lamnda} fwy wy tptime |\ cdffilter -l ${lamnda} fwz wz tptime |\ cdfmath "fwx wx = fwy wy = fwz wz = " |\ gzip -c - > ${insitu} #-------------------------------------------------------------------------- ${car} : ${insitu} gunzip -c - < ${insitu} > ${insitu}.aux cat ${RadData} |\ ${HRD} -t -f -b -s ${MT0}:${MTF} -x ${insitu}.aux |\ cdfmath "dbz 1 dbz ? rsgp =" |\ cdfmath "vr 1 vr ? vsgp =" |\ cdfray_ct -c ${MIN_H} -r ${MIN_R} -s |\ cdfraydbz -t ${DBZ_T} -s |\ cdfmath "dbz vr dbz ? vr =" |\ cdfrayrv -u -a |\ ${CARTES} -z ${ALPHA}:${BETA} -- ${GRID} |\ cdfmath "10 dbz 10 / pow ${ALPHA} / 1 ${BETA} / pow rr =" |\ gzip -c - > ${car} rm -f ${insitu}.aux #cdfrayrv -u |\ #cdfraydbz -c 0.5 -r ${MIN_R} -t ${DBZ_T} -s |\ #-------------------------------------------------------------------------- ${thresh_geo} : ${car} gunzip -c - < ${car} |\ cdfthresh "eur < ${eur}" "evr < ${evr}" \ "eup < ${eup}" "evp < ${evp}" |\ gzip -c - > ${thresh_geo} #-------------------------------------------------------------------------- ${thresh_geo_vel} : ${thresh_geo} gunzip -c - < ${thresh_geo} |\ cdfthresh "ux0 < ${VMAX}" "ux0 > -${VMAX}" \ "uy0 < ${VMAX}" "uy0 > -${VMAX}" |\ gzip -c - > ${thresh_geo_vel} #-------------------------------------------------------------------------- ${radvert} : ${thresh_geo_vel} gunzip -c - < ${thresh_geo_vel} |\ radvert4 wp div wi wt u v |\ cdfextr wi u v dbz rsgp |\ cdfextr -rs zs |\ gzip -c - > ${radvert} #-------------------------------------------------------------------------- #dbz is keep to provide context. ${mesovel} : ${radvert} gunzip -c - < ${radvert} |\ radfills -r ${SR} -m ${GP} u v wi dbz |\ gzip -c - > ${mesovel} #-------------------------------------------------------------------------- ${cdffill} : ${mesovel} gunzip -c - < ${mesovel} |\ cdffill x |\ cdffill y |\ gzip -c - > ${cdffill} #-------------------------------------------------------------------------- ${kine} : ${cdffill} gunzip -c - < ${cdffill} |\ $(RADPROF) > ${kine} #-----------------------------------------------------------