miscellaneous scripts, useful tools ----------------------------------- Miscellaneous ============= get_LiNox.py : process log files to print the total Lightning NOx production. redgrid_series.py : return the possible combinations of reduced grid according to model resolution. Find/Search/Replace utilities ============================= find_long_lines.rb : find all lines in the fortran code that are longer than 132 characters (official fortran standard). find_cpp : Find all the C pre-processor flags used in the current TM5 base, projects and branches. Does not look into ".svn", "TM", and "release" (since they are frozen) directories. tm5_etags : Run e/ctags (gnuctags) on selected set of TM5 directories, to create a tag table file. Useful for "Emacs", "vi" and "less". tm5_etags -o TAGFILE -r RCFILE get_tmflist : Print list of files used in a TM5 project, as defined by an RC file. get_tmflist pycasso-tm5.rc # print the list ff=$(get_tmflist pycasso-tm5.rc) # store the list in variable $ff (1) Can be use to search file: find $ff -name PATTERN (2) Can be used to search inside source code: egrep [grep-options] SEARCH-PATTERN $ff Followings are too slow for repetitive calls ============================================ fsrc : Find SouRCe. Find file(s) in a TM5 project, as defined by an RC file. fsrc [-r rcfile] PATTERN gsrc : Grep SouRCe. Grep files, but only those in a project define by a TM5 rc file (hardcoded). All options of egrep can be passed, eg: gsrc -li REGEXP