Changeset 2020 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Aug 3, 2018, 12:12:52 AM (6 years ago)
Author:
lfita
Message:

Starting to try with sfc variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/obs-sim_Comparison.bash

    r2019 r2020  
    14691469      -S ${sfcdir}':OBSnetcdf' -v all
    14701470  fi
     1471  echo " * Joining all surface station files : " >> ${ofileins}
     1472  echo python ${pyHOME}/nc_var.py -o join_singlestation_obsfiles -S                  \
     1473    ${sfcdir}':OBSnetcdf' -v all
     1474  echo " " >> ${ofileins}   
    14711475  mv joined_singlestations.nc ${obssfcfile}
    14721476fi
     
    14891493    for exp in ${exps}; do
    14901494      expl=`echo ${exp} | tr ',' ' ' | awk '{print $2}'`
    1491       simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
    1492    
    1493       fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
    1494         -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
    1495       if test ${iexp} -eq 1; then
    1496         nsfc=`echo ${fstats} | awk '{print $3}'`
    1497       else
    1498         nsfc2=`echo ${fstats} | awk '{print $3}'`
    1499         nsfcf=`echo ${nsfc}" "${nsfc2} | awk '{if ($1 < $2) {print $1;} else {print $2;}}'`
    1500       fi
     1495      for stidf in ${sndids}; do
     1496        stid=`echo ${stidf} | tr '@' ' ' | awk '{print $1}'`
     1497        simsfcdiagf=${odir}'/simout_sfcvars_'${stdi}'_'${expl}'.nc'
     1498        fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
     1499          -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
     1500        if test ${iexp} -eq 1; then
     1501          nsfc=`echo ${fstats} | awk '{print $3}'`
     1502        else
     1503          nsfc2=`echo ${fstats} | awk '{print $3}'`
     1504          nsfcf=`echo ${nsfc}" "${nsfc2} | awk '{if ($1 < $2) {print $1;} else {print $2;}}'`
     1505        fi
     1506        iexp=`expr ${iexp} + 1`
     1507      done
    15011508    done
    15021509  elif test ${nsfc} = 'FROMobssims'; then
     
    15061513    for exp in ${exps}; do
    15071514      expl=`echo ${exp} | tr ',' ' ' | awk '{print $2}'`
    1508       simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
    1509    
    1510       fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
    1511         -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
    1512       nsfc2=`echo ${fstats} | awk '{print $3}'`
    1513       nsfc=`echo ${nsfc}" "${nsfc2} | awk '{if ($1 < $2) {print $1;} else {print $2;}}'`
     1515      for stidf in ${sndids}; do
     1516        stid=`echo ${stidf} | tr '@' ' ' | awk '{print $1}'`
     1517        simsfcdiagf=${odir}'/simout_sfcvars_'${stdi}'_'${expl}'.nc'   
     1518        fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None          \
     1519          -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
     1520        nsfc2=`echo ${fstats} | awk '{print $3}'`
     1521        nsfc=`echo ${nsfc}" "${nsfc2} | awk '{if ($1 < $2) {print $1;} else {print $2;}}'`
     1522      done
    15141523    done
    15151524  fi
     
    15211530    iexp=1
    15221531    for exp in ${exps}; do
    1523       expl=`echo ${exp} | tr ',' ' ' | awk '{print $2}'`
    1524       simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
     1532      expl=`echo ${exp} | tr ',' ' ' | awk '{print $2}'`     
     1533      for stidf in ${sndids}; do
     1534        stid=`echo ${stidf} | tr '@' ' ' | awk '{print $1}'`
     1535        simsfcdiagf=${odir}'/simout_sfcvars_'${stdi}'_'${expl}'.nc'
    15251536   
    1526       fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
    1527         -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
    1528       if test ${iexp} -eq 1; then
    1529         xsfc=`echo ${fstats} | awk '{print $4}'`
    1530       else
    1531         xsfc2=`echo ${fstats} | awk '{print $4}'`
    1532         xsfcf=`echo ${xsfc}" "${xsfc2} | awk '{if ($1 > $2) {print $1;} else {print $2;}}'`
    1533       fi
     1537        fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
     1538          -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
     1539        if test ${iexp} -eq 1; then
     1540          xsfc=`echo ${fstats} | awk '{print $4}'`
     1541        else
     1542          xsfc2=`echo ${fstats} | awk '{print $4}'`
     1543          xsfcf=`echo ${xsfc}" "${xsfc2} | awk '{if ($1 > $2) {print $1;} else {print $2;}}'`
     1544        fi
     1545        iexp=`expr ${iexp} + 1`
     1546      done
    15341547    done
    15351548  elif test ${nsfc} = 'FROMobssims'; then
     
    15401553    for exp in ${exps}; do
    15411554      expl=`echo ${exp} | tr ',' ' ' | awk '{print $2}'`
    1542       simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
     1555      for stidf in ${sndids}; do
     1556        stid=`echo ${stidf} | tr '@' ' ' | awk '{print $1}'`
     1557        simsfcdiagf=${odir}'/simout_sfcvars_'${stdi}'_'${expl}'.nc'
    15431558   
    1544       fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
    1545         -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
    1546       xsfc2=`echo ${fstats} | awk '{print $4}'`
    1547       xsfcf=`echo ${xsfc}" "${xsfc2} | awk '{if ($1 > $2) {print $1;} else {print $2;}}'`
     1559        fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None            \
     1560          -f ${simsfcdiagf} -v ${sfcv} | grep MAT | grep ${sfcv}`
     1561        xsfc2=`echo ${fstats} | awk '{print $4}'`
     1562        xsfcf=`echo ${xsfc}" "${xsfc2} | awk '{if ($1 > $2) {print $1;} else {print $2;}}'`
     1563      done
    15481564    done
    15491565  fi
     
    15911607    expc=`echo ${exp} | tr ',' ' ' | awk '{print $4}'`
    15921608
    1593     simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
    1594 
    1595     gridsfcv=`python ${pyHOME}/nc_var.py -o get_point -f ${simsfcdiagf}              \
    1596       -S 'XLONG:XLAT:Time|0' -v ${stl}','${stL} | tr ' ' '!'`
    1597     xgrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' |           \
    1598       awk '{print $1}'`
    1599     ygrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $1}' | tr ',' ' ' |           \
    1600       awk '{print $2}'`
    1601     distgrid=`echo ${gridsfcv} | tr '!' ' ' | awk '{print $2}'`
     1609    simsfcdiagf=${odir}'/simout_sfcvars_'${stdi}'_'${expl}'.nc'
    16021610
    16031611    sfcstats=${sti}'@'${stn}'@'${stl}'@'${stL}'@'${gridsfc}
    16041612
    1605     sfccompfiles=${sfccompfiles}','${simsfcdiagf}'%time|-1;south_north|'${ygrid}';west_east|'
    1606     sfccompfiles=${sfccompfiles}${xgrid}
     1613    sfccompfiles=${sfccompfiles}','${simsfcdiagf}'%time|-1'
    16071614    sfccomplabs=${sfccomplabs}','${expn}
    16081615    sfccompcols=${sfccompcols}','${expc}
     
    16201627
    16211628    multiple_time_series_plot ${fivals}
     1629    exit
    16221630
    16231631  done
     
    16351643  expc=`echo ${exp} | tr ',' ' ' | awk '{print $4}'`
    16361644
    1637   simsfcdiagf=${odir}'/simout_sfcdiags_'${expl}'.nc'
     1645  simsfcdiagf=${odir}'/simout_sfcmapdiags_'${expl}'.nc'
    16381646
    16391647  # Time information from simulation
Note: See TracChangeset for help on using the changeset viewer.