Changeset 1989 in lmdz_wrf for trunk/tools
- Timestamp:
- Jul 30, 2018, 8:58:42 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/obs-sim_Comparison.bash
r1984 r1989 167 167 exit 168 168 fi 169 mvWindRose.png ${ofign}169 convert -trim WindRose.png ${ofign} 170 170 echo "* "${ofign} >> ${ofilefigs} 171 171 echo python ${pyHOME}/drawing.py -o draw_WindRose -S "'"${values}"'" -v ua,va -f "'"${filen}"'" >> ${ofilefigs} … … 207 207 exit 208 208 fi 209 mvSkewT.png ${ofign}209 convert -trim SkewT.png ${ofign} 210 210 echo "* "${ofign} >> ${ofilefigs} 211 211 echo python ${pyHOME}/drawing.py -o draw_SkewT -S "'"${values}"'" -v ta,tda,pres -f "'"${filen}"'" >> ${ofilefigs} … … 248 248 exit 249 249 fi 250 mvmulti_SkewT.png ${ofign}250 convert -trim multi_SkewT.png ${ofign} 251 251 echo "* "${ofign} >> ${ofilefigs} 252 252 echo python ${pyHOME}/drawing.py -o draw_multi_SkewT -S ${tatda_evol_values} -f ${tatda_evol_files} >> ${ofilefigs} … … 293 293 exit 294 294 fi 295 mvmulti_SkewT.png ${ofign}295 convert -trim multi_SkewT.png ${ofign} 296 296 echo "* "${ofign} >> ${ofilefigs} 297 297 echo python ${pyHOME}/drawing.py -o draw_multi_SkewT -S ${values} -f ${compfiles} >> ${ofilefigs} … … 343 343 exit 344 344 fi 345 mv2Dshad_obs-sim_comparison_time.png ${ofign}345 convert -trim 2Dshad_obs-sim_comparison_time.png ${ofign} 346 346 echo "* "${ofign} >> ${ofilefigs} 347 347 echo python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc_time -f ${cfiles} -S ${cvalues} >> ${ofilefigs} … … 393 393 exit 394 394 fi 395 mvlines_time.${kfig} ${ofign}395 convert -trim lines_time.${kfig} ${ofign} 396 396 echo "* "${ofign} >> ${ofilefigs} 397 397 echo python ${pyHOME}/drawing.py -o draw_lines_time -f ${files} -S ${values} -v ${sfcv} >> ${ofilefigs} … … 453 453 echo python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc -f ${cfiles} -S ${cvalues} 454 454 fi 455 mv2Dshad_obs-sim_comparison.png ${ofign}455 convert -trim 2Dshad_obs-sim_comparison.png ${ofign} 456 456 echo "* "${ofign} >> ${ofilefigs} 457 457 echo python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc -f ${cfiles} -S ${cvalues} >> ${ofilefigs} … … 658 658 stid=`echo ${stidf} | tr '@' ' ' | awk '{print $1}'` 659 659 sndorigfn=`echo ${stidf} | tr '@' ' ' | awk '{print $2}'` 660 echo ${stid}" ..." 660 661 it=0 661 662 tatda_evol_values='' … … 684 685 timeS3=`date +%Y"-"%b -d"${Dref} ${timev} ${Tu}"` 685 686 timeS4=`date +%Y -d"${Dref} ${timev} ${Tu}"` 686 echo ${it}" "${timev}" "${Dref}" '"${timev}"' "${Tu}" "$(echo ${timeS} | tr '!' ' ')687 echo " "${it}" "${timev}" "${Dref}" '"${timev}"' "${Tu}" "$(echo ${timeS} | tr '!' ' ') 687 688 timefS=`date +%Y%m%d%H%M%S -d"${Dref} ${timev} ${Tu}"` 688 689 689 infile=${snddir}'/sounding_uava_'${stid}'.nc'690 690 # for now... 691 691 sndstn=${stid} 692 692 693 WindRose_plot ${it}'#'${stid}'#'${sndstn}'#'${timeS}'#'${ofigdir}'#'${timefS}'#'${ infile}693 WindRose_plot ${it}'#'${stid}'#'${sndstn}'#'${timeS}'#'${ofigdir}'#'${timefS}'#'${ouavasndf} 694 694 695 695 SkewT_logP_plot ${it}'#'${stid}'#'${sndstn}'#'${timeS}'#'${ofigdir}'#'${timefS}'#'${sndorigfn} … … 725 725 done 726 726 727 vals=${s ndstid}'@'${sndstn}'@'${tatda_evol_labs}'@'${tatda_evol_cols}'@'${tatda_evol_files}'@'${timeS3}'@'${ofigdir}727 vals=${stid}'@'${sndstn}'@'${tatda_evol_labs}'@'${tatda_evol_cols}'@'${tatda_evol_files}'@'${timeS3}'@'${ofigdir} 728 728 multi_soundings_plot ${vals} 729 729 … … 741 741 sndlat=`ncdump -h ${sndorigfn} | grep Station_latitude | awk '{print $3}'` 742 742 sndts=`echo ${sndtimes} | tr ',' ' '` 743 744 # for now... 745 sndstn=${stid} 743 746 744 747 # Time characteristics … … 749 752 Dref=${Dref0:0:4}${Dref0:5:2}${Dref0:8:2} 750 753 754 obsdimt=`python ${pyHOME}/nc_var.py -o itime -S CFtime, -v time -f ${sndorigfn} | \ 755 grep dimt | awk '{print $2-1}'` 756 751 757 # Plotting 752 758 it=0 753 for its in ${sndts}; do754 755 timev=`python $pyHOME/nc_var.py -o varout -S time:${it} -f ${sndorigfn} -v time |\759 while test ${it} -le ${obsdimt}; do 760 761 otimev=`python $pyHOME/nc_var.py -o varout -S time:${it} -f ${sndorigfn} -v time |\ 756 762 grep NC | awk '{printf ("%d", $2)}'` 757 dateS=`date +${figsndTfmt} -d"${Dref} ${ timev} ${Tu}"`758 timeS2=`date +%d"$^{"%H"}$" -d"${Dref} ${ timev} ${Tu}"`759 timeS3=`date +%Y"-"%b -d"${Dref} ${ timev} ${Tu}"`760 timeS4=`date +%Y -d"${Dref} ${ timev} ${Tu}"`761 datefS=`date +%Y%m%d%H%M%S -d"${Dref} ${ timev} ${Tu}"`763 dateS=`date +${figsndTfmt} -d"${Dref} ${otimev} ${Tu}"` 764 timeS2=`date +%d"$^{"%H"}$" -d"${Dref} ${otimev} ${Tu}"` 765 timeS3=`date +%Y"-"%b -d"${Dref} ${otimev} ${Tu}"` 766 timeS4=`date +%Y -d"${Dref} ${otimev} ${Tu}"` 767 datefS=`date +%Y%m%d%H%M%S -d"${Dref} ${otimev} ${Tu}"` 762 768 763 769 iexp=1 … … 771 777 simdiagsf=${odir}'/simout_snddiags_'${expl}'.nc' 772 778 773 gridsnd=`python ${pyHOME}/nc_var.py -o get_point -f ${simjoinselvars} \ 774 -S 'XLONG:XLAT:Time|0' -v ${sndlon}','${sndlat}` 775 xsnd=`echo ${gridsnd} | tr ',' ' ' | awk '{print $1}'` 776 ysnd=`echo ${gridsnd} | tr ',' ' ' | awk '{print $2}'` 777 echo " Equivalent simulated sounding grid point: "${gridsnd} 779 gridsndv=`python ${pyHOME}/nc_var.py -o get_point -f ${simjoinselvars} \ 780 -S 'XLONG:XLAT:Time|0' -v ${sndlon}','${sndlat} | tr ' ' '!'` 781 xsnd=`echo ${gridsndv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' | \ 782 awk '{print $1}'` 783 ysnd=`echo ${gridsndv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' | \ 784 awk '{print $2}'` 785 dsnd=`echo ${gridsndv} | tr '!' ' ' | awk '{print $2}'` 786 if test ${it} -eq 0 && test ${iexp} -eq 1; then 787 echo " Equivalent simulated sounding grid point: "${gridsnd}" distance: "\ 788 ${dsnd} 789 fi 778 790 779 791 # Getting values at the sounding point … … 806 818 807 819 # Time step from simulated file 808 timestep=`python ${pyHOME}/nc_var.py -o get_time -f ${simsndptf} \ 809 -S ${its}';'${tunits} -v time` 820 timestepv=`python ${pyHOME}/nc_var.py -o get_time -f ${simsndptf} \ 821 -S ${otimev}';'${tunits} -v time | tr ' ' '@'` 822 timestep=`echo ${timestepv} | tr '@' ' ' | awk '{print $1}'` 810 823 if test $? -ne 0; then 811 824 echo ${errmsg} 812 825 echo " python failed!!" 813 826 echo python ${pyHOME}/nc_var.py -o get_time -f ${simsndptf} \ 814 -S ${ its}';'${tunits} -v time827 -S ${otimev}';'${tunits} -v time 815 828 exit 816 829 fi 817 830 818 831 if test ${iexp} -eq 1; then 819 echo " "${its}": it="${timestep}" "$(echo ${dateS} | tr '!' ' ')" "${datefS}832 echo " "${it}": it="${timestep}" "$(echo ${dateS} | tr '!' ' ')" "${datefS} 820 833 tacomplabs='$ta^{obs}$,$ta^{'${expn}'}$' 821 834 tdacomplabs='$tda^{obs}$,$tda^{'${expn}'}$' … … 850 863 cbar=`echo ${CFvarvals} | tr ':' ' ' | awk '{print $7}'` 851 864 852 fivals=${s ndstid}'#'${sndstn}'#'${sndv}'#'${ofigdir}'#'${datefS}'#'${fmtTts}865 fivals=${stid}'#'${sndstn}'#'${sndv}'#'${ofigdir}'#'${datefS}'#'${fmtTts} 853 866 fivals=${fivals}'#'${simsndptf}'#'${sndorigfn}'#'${expl}'#'${expn}'#'${cbar} 854 867 … … 867 880 compfiles=${tacompfiles}';'${tdacompfiles} 868 881 869 fivals=${s ndstid}'@'${sndstn}'@'${complabs}'@'${compcols}'@'${compltyp}'@'882 fivals=${stid}'@'${sndstn}'@'${complabs}'@'${compcols}'@'${compltyp}'@' 870 883 fivals=${fivals}${compfiles}'@'${dateS}'@'${ofigdir}'@'${datefS}'@'${ofigdir} 871 884 … … 1018 1031 simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc' 1019 1032 1020 gridsfc=`python ${pyHOME}/nc_var.py -o get_point -f ${simsfcdiagf} \ 1021 -S 'XLONG:XLAT:Time|0' -v ${stl}','${stL}` 1022 xgrid=`echo ${gridsfc} | tr ',' ' ' | awk '{print $1}'` 1023 ygrid=`echo ${gridsfc} | tr ',' ' ' | awk '{print $2}'` 1033 gridsfcv=`python ${pyHOME}/nc_var.py -o get_point -f ${simsfcdiagf} \ 1034 -S 'XLONG:XLAT:Time|0' -v ${stl}','${stL} | tr ' ' '!'` 1035 xgrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' | \ 1036 awk '{print $1}'` 1037 ygrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' | \ 1038 awk '{print $2}'` 1039 distgrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $2}'` 1024 1040 1025 1041 sfcstats=${sti}'@'${stn}'@'${stl}'@'${stL}'@'${gridsfc} … … 1083 1099 1084 1100 # Looking for obs time 1085 oit=`python ${pyHOME}/nc_var.py -o get_time -f ${obssfcfile} \ 1086 -S ${simtstep}';'${tunits} -v ststimes | grep -v differ` 1101 oitv=`python ${pyHOME}/nc_var.py -o get_time -f ${obssfcfile} \ 1102 -S ${simtstep}';'${tunits} -v ststimes | grep -v differ | tr ' ' '@'` 1103 oit=`echo ${oitv} | tr '@' ' ' | awk '{print $1}'` 1087 1104 1088 1105 for sfcnxv in ${sfcs}; do
Note: See TracChangeset
for help on using the changeset viewer.