Changeset 2012 in lmdz_wrf
- Timestamp:
- Aug 2, 2018, 3:42:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/obs-sim_Comparison.bash
r2009 r2012 789 789 790 790 # sounding data 791 isnd=1 792 for sndf in ${sndfiles}; do 793 stid=`python $pyHOME/nc_var.py -o grattr -f ${sndf} -S Station_number` 794 sndlon=`ncdump -h ${sndf} | grep Station_longitude | awk '{print $3}'` 795 sndlat=`ncdump -h ${sndf} | grep Station_latitude | awk '{print $3}'` 796 sndheight=`ncdump -h ${sndf} | grep Station_elevation | awk '{print $3}'` 797 798 if test ${isnd} -eq 1; then 799 sndstids=${stid}'@'${sndf} 800 echo "snd,"${stid}","${sndlon}","${sndlat}","${sndheight} > ${wdir}/stations.inf 791 iost=1 792 obstype='sounding' 793 prn='snd' 794 listfiles=${sndfiles} 795 wrfdiags=${wrfsnddiags} 796 simdiagd=${simsnddiagd} 797 for ostf in ${listfiles}; do 798 stid=`python $pyHOME/nc_var.py -o grattr -f ${ostf} -S Station_number` 799 ostlon=`ncdump -h ${ostf} | grep Station_longitude | awk '{print $3}'` 800 ostlat=`ncdump -h ${ostf} | grep Station_latitude | awk '{print $3}'` 801 ostheight=`ncdump -h ${ostf} | grep Station_elevation | awk '{print $3}'` 802 803 if test ${iost} -eq 1; then 804 oststids=${stid}'@'${ostf} 805 echo ${prn}","${stid}","${ostlon}","${ostlat}","${ostheight} > ${wdir}/stations.inf 801 806 else 802 sndstids=${sndstids}':'${stid}'@'${sndf}803 echo "snd,"${stid}","${sndlon}","${sndlat}","${sndheight} >> ${wdir}/stations.inf807 oststids=${oststids}':'${stid}'@'${ostf} 808 echo ${prn}","${stid}","${ostlon}","${ostlat}","${ostheight} >> ${wdir}/stations.inf 804 809 fi 805 810 … … 818 823 awk '{print $3"_"$4}'` 819 824 820 sim sndptf=${odir}'/simout_vars_sndpt_'${stid}'_'${expl}'_'${fdate}'.nc'821 sim snddiagsf=${odir}'/simout_snddiags_'${stid}'_'${expl}'_'${fdate}'.nc'822 823 fvals=${ sndlon}'#'${sndlat}'#'${simf}'#XLONG#XLAT#'${wrfsnddiags}'#'824 fvals=${fvals}${sim snddiagd}825 simostptf=${odir}'/simout_vars_'${prn}'pt_'${stid}'_'${expl}'_'${fdate}'.nc' 826 simostdiagsf=${odir}'/simout_'${prn}'diags_'${stid}'_'${expl}'_'${fdate}'.nc' 827 828 fvals=${ostlon}'#'${ostlat}'#'${simf}'#XLONG#XLAT#'${wrfdiags}'#' 829 fvals=${fvals}${simdiagd} 825 830 get_WRFsounding_data ${fvals} 826 831 … … 829 834 830 835 # Concatenating files 831 ofile=${odir}/simout_ sndvars_${stid}_${expn}.nc836 ofile=${odir}/simout_${prn}vars_${stid}_${expl}.nc 832 837 if ${fscratch}; then rm ${ofile} >& /dev/null; fi 833 838 if test ! -f ${ofile}; then 834 Nconfc=`ls -1 ${odir}/simout_ snddiags_*${stid}*nc | wc -l | awk '{print $1}'`839 Nconfc=`ls -1 ${odir}/simout_${prn}diags_*${stid}*${expl}*.nc | wc -l | awk '{print $1}'` 835 840 if test ${Nconfc} -gt 1; then 836 841 values=${odir}',Time,time' 837 HMT='simout_ snddiags_,'${stid}'_'${expn},'nc'842 HMT='simout_'${prn}'diags_,'${stid}'_'${expn},'nc' 838 843 python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 839 844 -f ${HMT} -v all … … 845 850 exit 846 851 fi 847 echo " * Concatenating sounding data at point: "${sndlon}", "${sndlat} >> ${ofileins}852 echo " * Concatenating "${obstype}" data at point: "${ostlon}", "${ostlat} >> ${ofileins} 848 853 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S \ 849 854 "'"${values}"'" -f ${HMT} -v all >> ${ofileins} … … 851 856 mv netcdf_fold_concatenated_HMT.nc ${ofile} 852 857 else 853 ffilen=`ls -1 ${odir}/simout_ snddiags_*${stid}*nc`858 ffilen=`ls -1 ${odir}/simout_${prn}diags_*${stid}*${expl}*.nc` 854 859 cp ${ffilen} ${ofile} 855 860 fi … … 859 864 done 860 865 861 i snd=`expr ${isnd} + 1`866 iost=`expr ${iost} + 1` 862 867 done 863 868 exit
Note: See TracChangeset
for help on using the changeset viewer.