Changeset 2037 in lmdz_wrf for trunk/tools
- Timestamp:
- Aug 7, 2018, 3:54:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/get_data_snd-sfc_validation.bash
r2010 r2037 7 7 infolder='/ccc/scratch/cont003/lmd/fitaborl/estudios/FPS_ALPS/additional/IOP' 8 8 9 # Domain 10 domn='02' 11 9 12 # Output folder 10 13 ofolder='/ccc/scratch/cont003/lmd/fitaborl/estudios/FPS_ALPS/additional/IOP/validation' … … 23 26 24 27 # Surface diagnostics 25 sfcdiags='wds:wss:WRFtdas '28 sfcdiags='wds:wss:WRFtdas:pr' 26 29 27 30 # Surface NON-diag variables 28 31 sfcnondiags='T2' 32 33 # cdx Surface diagnostics 34 cdxdiags='None' 35 36 # cdx Surface NON-diag variables 37 cdxnondiags='PR:PRW:PSL:UAS:VAS:CAPEMAX:CAPEMEAN:CINMAX:CINMEAN:LFCPMAX:LFCPMEAN:LFCZMAX:LFCZMEAN:LIMAX:LIMEAN' 29 38 30 39 ####### ####### … … 42 51 ofold=${ofolder}/${expn} 43 52 44 files=`ls -1 ${infolder}/${expn}/wrfout/wrfout_d02*`45 46 53 mkdir -p ${ofold} 47 54 … … 52 59 sndlat=`echo ${sndvn} | tr ',' ' ' | awk '{print $3}'` 53 60 61 files=`ls -1 ${infolder}/${expn}/wrfout/wrfout_d${domn}*` 62 63 # Sounding values 54 64 ofile=${ofold}/simout_sndvars_${sndid}_${expn}.nc 55 65 if test ${scratch} = 'true'; then rm ${ofile} >& /dev/null; fi … … 57 67 for filen in ${files}; do 58 68 $pyHOME/get_WRFsounding-surface_data.bash ${scratch} ${ofold} ${expn} \ 59 ${sndvn} None ${filen} ${snddiags} ${sfcdiags} ${sfcnondiags}69 ${sndvn} None ${filen} ${snddiags},None,None,None,None 60 70 # end of files 61 71 done … … 80 90 mv netcdf_fold_concatenated_HMT.nc ${ofile} 81 91 fi 82 #exit 83 84 # end of soundings 92 93 files=`ls -1 ${infolder}/${expn}/wrfout/wrfcdx_d${domn}*` 94 95 # cordex values 96 ofile=${ofold}/simcdx_sndvars_${sndid}_${expn}.nc 97 if test ${scratch} = 'true'; then rm ${ofile} >& /dev/null; fi 98 if test ! -f ${ofile}; then 99 for filen in ${files}; do 100 $pyHOME/get_WRFsounding-surface_data.bash ${scratch} ${ofold} ${expn} \ 101 ${sndvn} None ${filen} None,None,None,${cdxdiags},${cdxnondiags} 102 # end of files 103 done 104 105 # Concatenating files 106 values=${ofold}',Time,time' 107 HMT='simcdx_snddiags_,'${sndid},'nc' 108 python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 109 -f ${HMT} -v all 110 if test $? -ne 0; then 111 echo ${errmsg} 112 echo " python failed!!" 113 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values}\ 114 -f ${HMT} -v all 115 exit 116 fi 117 echo " * Concatenating cdx sounding data at point: "${sndlon}", "${sndlat} >> \ 118 ${insoutf} 119 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S "'"${values}"'" \ 120 -f ${HMT} -v all >> ${insoutf} 121 echo " " >> ${insoutf} 122 mv netcdf_fold_concatenated_HMT.nc ${ofile} 123 fi 124 125 # end of sounding stations 85 126 done 86 fi87 127 88 128 if test ! ${sfcstations} = 'None'; then … … 92 132 sfclat=`echo ${sfcvn} | tr ',' ' ' | awk '{print $3}'` 93 133 134 files=`ls -1 ${infolder}/${expn}/wrfout/wrfout_d${domn}*` 135 94 136 ofile=${ofold}/simout_sfcvars_${sfcid}_${expn}.nc 95 137 if test ${scratch} = 'true'; then rm ${ofile} >& /dev/null; fi … … 97 139 for filen in ${files}; do 98 140 $pyHOME/get_WRFsounding-surface_data.bash ${scratch} ${ofold} ${expn} None \ 99 ${sfcvn} ${filen} ${snddiags} ${sfcdiags} ${sfcnondiags}141 ${sfcvn} ${filen} None,${sfcdiags},${sfcnondiags},None,None 100 142 # end of files 101 143 done … … 114 156 fi 115 157 echo " * Concatenating surface data at point: "${sfclon}", "${sfclat} >> ${insoutf} 158 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S "'"${values}"'" \ 159 -f ${HMT} -v all >> ${insoutf} 160 echo " " >> ${insoutf} 161 mv netcdf_fold_concatenated_HMT.nc ${ofile} 162 fi 163 164 files=`ls -1 ${infolder}/${expn}/wrfout/wrfcdx_d${domn}*` 165 166 ofile=${ofold}/simcdx_sfcvars_${sfcid}_${expn}.nc 167 if test ${scratch} = 'true'; then rm ${ofile} >& /dev/null; fi 168 if test ! -f ${ofile}; then 169 for filen in ${files}; do 170 $pyHOME/get_WRFsounding-surface_data.bash ${scratch} ${ofold} ${expn} None \ 171 ${sfcvn} ${filen} None,None,None,${cdxdiags},${cdxnondiags} 172 # end of files 173 done 174 175 # Concatenating files 176 values=${ofold}',Time,time' 177 HMT='simcdx_sfcdiags_,'${sfcid},'nc' 178 python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 179 -f ${HMT} -v all 180 if test $? -ne 0; then 181 echo ${errmsg} 182 echo " python failed!!" 183 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 184 -f ${HMT} -v all 185 exit 186 fi 187 echo " * Concatenating cdx surface data at point: "${sfclon}", "${sfclat} >> ${insoutf} 116 188 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S "'"${values}"'" \ 117 189 -f ${HMT} -v all >> ${insoutf} … … 125 197 fi 126 198 199 # 2D maps 200 okind='out cdx' 201 for ik in ${okind}; do 202 ofile=${ofold}/sim${ik}_sfcmapvars_${expn}.nc 203 if test ${scratch} = 'true'; then rm ${ofile} >& /dev/null; fi 204 if test ! -f ${ofile}; then 205 206 # Concatenating files 207 values=${ofold}',Time,time' 208 HMT='sim'${ik}'_sfcmapdiags_,'${expn},'nc' 209 python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 210 -f ${HMT} -v all 211 if test $? -ne 0; then 212 echo ${errmsg} 213 echo " python failed!!" 214 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S ${values} \ 215 -f ${HMT} -v all 216 exit 217 fi 218 echo " * Concatenating '${ik}' surface map data: " >> ${insoutf} 219 echo python ${pyHOME}/nc_var.py -o netcdf_fold_concatenation_HMT -S "'"${values}"'" \ 220 -f ${HMT} -v all >> ${insoutf} 221 echo " " >> ${insoutf} 222 mv netcdf_fold_concatenated_HMT.nc ${ofile} 223 fi 224 done 225 127 226 # End of experiments 128 227 done
Note: See TracChangeset
for help on using the changeset viewer.