Changeset 2068 in lmdz_wrf
- Timestamp:
- Aug 10, 2018, 4:13:18 PM (7 years ago)
- Location:
- trunk/tools
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/get_data_snd-sfc_validation.bash
r2067 r2068 2 2 ### Script to get sounding and surface points for validation purposes 3 3 4 scratch='false' 5 6 # Input folder 7 infolder='/ccc/scratch/cont003/lmd/fitaborl/estudios/FPS_ALPS/additional/IOP' 8 9 # Domain 10 domn='02' 11 12 # Output folder 13 ofolder='/ccc/scratch/cont003/lmd/fitaborl/estudios/FPS_ALPS/additional/IOP/validation' 14 15 # Labels of the experiments 16 experiments='120lev:80lev:50lev:50lev_assigned:38lev:NOaerosol' 17 18 # Sounding stations [sndid],[sndlon],[sndlat]:[sndid2],[sndlon2],[sndlat2]:... 19 sndstations='10868,11.55,48.25:16080,9.28,45.43:16144,11.61,44.65:16546,8.85,39.35' 20 21 # Surface stations [sfcid],[sfclon],[sfclat]:[sfcid2],[sfclon2],[sfclat2]:... 22 sfcstations='None' 23 24 # Sounding diagnostics 25 snddiags='WRFt:WRFtda:WRFp:WRFua:WRFva:ws:WRFwd' 26 27 # Surface diagnostics 28 sfcdiags='wds:wss:WRFtdas:pr' 29 30 # Surface NON-diag variables 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' 4 # soundings: different lon,lat locations of soundings stations 5 # surface: different lon,lat locations of surface stations 6 # simulations: multiple outputs from different models and runs 7 # outputs: multiple different type of file outputs from model runs 8 # 9 10 # Name of the file with the configuration 11 if test $1 = '-h'; then 12 echo "******************************************" 13 echo "*** Script to get WRF data at ***" 14 echo "*** sounding and surface observations ***" 15 echo "*** from multiple simulations ***" 16 echo "*****************************************" 17 echo "get_data_snd-sfc_validation [ConfFile](configuration file)" 18 else 19 rootsh=`pwd` 20 21 configfname=$1 22 23 ####### ###### ##### #### ### ## # 24 25 function uploadvars() { 26 # Function to upload variables to the system from an ASCII file as: 27 # [varname] = [value] 28 fileval=$1 29 errormsg='ERROR -- error -- ERROR -- error' 30 31 if test ! -f ${fileval}; then 32 echo ${errormsg} 33 echo " "${fname}": file '"${fileval}"' does not exist!!" 34 exit 35 fi 36 37 Nlin=`wc -l ${fileval} | awk '{print $1}'` 38 39 ilin=1 40 while test ${ilin} -le ${Nlin}; do 41 line=`head -n ${ilin} ${fileval} | tail -n 1` 42 varname=`echo ${line} | tr '=' ' ' | awk '{print $1}'` 43 value=`echo ${line} | tr '=' ' ' | awk '{print $2}'` 44 Lvarname=`expr length ${varname}'0'` 45 46 if test ${Lvarname} -gt 1 && test ! ${varname:0:1} = '#'; then 47 export ${varname}=${value} 48 fi 49 ilin=`expr ${ilin} + 1` 50 done 51 } 38 52 39 53 ####### ####### 40 54 ## MAIN 41 55 ####### 56 uploadvars ${configfname} 57 echo "END upload -- end UPLOAD -- END upload -- end UPLOAD" 58 42 59 errmsg='ERROR -- error -- ERROR -- error' 43 60 61 # from scratch 62 if test ${scratch} = 'true'; then scratch=true 63 else scratch=false; fi 64 65 # Modules 66 if test ! ${LOADmods} = 'None'; then 67 lmods=`echo ${LOADmods} | tr ':' ' '` 68 for lmod in ${lmods}; do 69 module load ${lmod} 70 done 71 fi 72 44 73 insoutf='allins_functions.inf' 45 module load python/2.7.1446 74 47 75 exps=`echo ${experiments} | tr ':' ' '`
Note: See TracChangeset
for help on using the changeset viewer.