Changeset 661 in lmdz_wrf for trunk


Ignore:
Timestamp:
Dec 9, 2015, 12:43:18 PM (9 years ago)
Author:
lfita
Message:

Adding las improvements in the script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/getting_fields-trajectories.bash

    r622 r661  
    1616# tevol_boxtraj.nc: file with the values following the trajectory
    1717
    18 models='wrf'
     18models='wrf:lwrf'
     19
     20ifold=/media/ExtDiskD/bkup/ciclad/etudes/WL_HyMeX/superstorm
     21ofold=/home/lluis/etudes/WL_HyMeX/superstorm
    1922
    2023#WRFexps='control:mp1:pbl1:pbl2:rad1'
    21 WRFexps='control:pbl2:rad1'
    22 LMDZexps='lmdza:lmdzb:lmdzora:lmdzorb'
     24WRFexps='control:cu1:pblsfc1:rad1:shallow'
     25LMDZexps='lmdza:lmdzb'
    2326LWRFexps='lmdza:lmdzb'
    2427
    25 
    2628# Domain to analyse
    27 dom='2'
    28 
    29 ofold=/homedata/lfita/etudes/WRFdynamicoSENS
    30 HOMEpy=/home/lfita/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools
    31 
    32 use_concatenated=false
     29dom='1'
     30
     31#ofold=/homedata/lfita/etudes/WRFdynamicoSENS
     32#HOMEpy=/home/lfita/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools
     33HOMEpy=/home/lluis/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools
     34
     35use_concatenated=true
    3336
    3437####### ###### ##### #### ### ## #
     
    3740
    3841#WRFvars='all'
    39 WRFvars='Times:XLONG:XLAT:T2,U10,V10,P,PB,PSFC,HGT,T,QVAPOR,RAINC,RAINNC'
     42WRFvars='Times,XLONG,XLAT,T2,U10,V10,P,PB,PSFC,HGT,T,QVAPOR,RAINC,RAINNC'
    4043
    4144#LMDZvars='all'
    42 LMDZars='Time_counter:longitude:latitude:u10m:v10m:t2m,wind10m,slp,precip'
    43 
    44 LWRFvars='Times:XLONG:XLAT:T2,U10,V10,P,PB,PSFC,HGT,T,QVAPOR,RAINC,RAINNC'
     45LMDZars='Time_counter,longitude,latitude,u10m,v10m,t2m,wind10m,slp,precip'
     46
     47LWRFvars='Times,XLONG,XLAT,T2,U10,V10,P,PB,PSFC,HGT,T,QVAPOR,RAINC,RAINNC'
    4548#LWRFvars='LU_INDEX,ZNU,ZNW,ZS,DZS,U,RU_TEND,V,RV_TEND,W,PH,PHB,T,HFX_FORCE,LH_FORCE,'
    4649#LWRFvars=${LWRFvars}'TSK_FORCE,HFX_FORCE_TEND,LH_FORCE_TEND,TSK_FORCE_TEND,MU,MUB,'
     
    117120LMDZtrjvars='time_counter,u10m,v10m,precip,slp,psol'
    118121#LMDZ lon/lat file
    119 if test ! -f lmdz_lonlat.nc; then
    120   python ${HOMEpy}/nc_var.py -o selvar -v t2m -f \
    121     lmdz/run/lmdza/lmdzout/histins.nc -S 'lon@lon,lat@lat'
    122   mv selvar_new.nc lmdz_lonlat.nc
    123 fi
     122#if test ! -f lmdz_lonlat.nc; then
     123#  python ${HOMEpy}/nc_var.py -o selvar -v t2m -f \
     124#    ${ifold}/lmdz/run/lmdza/lmdzout/histins.nc -S 'lon@lon,lat@lat'
     125#  mv selvar_new.nc lmdz_lonlat.nc
     126#fi
    124127
    125128WRFvdims='XLONG,XLAT,ZNU,time'
     
    167170    osim=${ofold}/${exp}
    168171    if test ${mod} = 'wrf' || test ${mod} = 'lwrf'; then
    169       isim=${osim}/wrfout
     172      isim=${ifold}/${mod}/run/${exp}/wrfout
    170173# Trajectory file
    171174##
     
    235238          for file in ${isim}/wrfout_d0${dom}*; do
    236239            fdate=`echo ${file} | tr '_' ' ' | awk '{print $3"_"$4}'`
    237             echo "  "${file}
    238             python ${HOMEpy}/diagnostics.py -f ${osim}/full_concatenated.nc              \
    239               -d 'Time@Times,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' -v ${diags}\
    240               -f ${file}
    241             #exit
    242             if test $? -ne 0; then
    243               echo ${errormsg}
    244               echo "  "${main}": python does not work !!"
    245               echo "  python "${HOMEpy}"/diagnostics.py -f "${osim}"/full_concatenated.nc \
    246                 -d 'Time@Times,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' -v "${diags} \
    247                 "-f "${file}
    248               exit
    249             else
    250               mv diagnostics.nc ${osim}/diagnostics_${fdate}.nc
     240            if test ! ${osim}/diagnostics_${fdate}.nc; then
     241              echo "  "${file}
     242              python ${HOMEpy}/diagnostics.py -f ${osim}/full_concatenated.nc              \
     243                -d 'Time@Times,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' -v ${diags}\
     244                -f ${file}
     245              #exit
     246              if test $? -ne 0; then
     247                echo ${errormsg}
     248                echo "  "${main}": python does not work !!"
     249                echo "  python "${HOMEpy}"/diagnostics.py -f "${osim}"/full_concatenated.nc \
     250                  -d 'Time@Times,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' -v "${diags} \
     251                  "-f "${file}
     252                exit
     253              else
     254                mv diagnostics.nc ${osim}/diagnostics_${fdate}.nc
     255              fi
    251256            fi
    252257          done
     
    292297# Following trajectory values
    293298##
    294     if test ! -f ${osim}/tevol_boxtraj.nc && -f ${osim}/trajectory.dat; then
     299    if test ! -f ${osim}/tevol_boxtraj.nc && test -f ${osim}/trajectory.dat; then
    295300      tfirst=`cat ${osim}/trajectory.dat | grep -v '#' | head -n 1 | awk '{print $1-1}'`
    296301      echo "tfirst: "${tfirst}
Note: See TracChangeset for help on using the changeset viewer.