Difference between revisions of "Migrate experiment projects"

Line 10: Line 10:
  
 
= Tips for other scripts =
 
= Tips for other scripts =
 +
  
  
Line 19: Line 20:
  
 
<samp>files_to_update.txt </samp>will contain a list of files where <samp>w35</samp> appear in at least one line. The command will ignore binary files. It will also exclude netCDF files and you can exclude more files from the search (e.g. figures). Replace <samp><directory_name></samp> with the directory you want to search through.
 
<samp>files_to_update.txt </samp>will contain a list of files where <samp>w35</samp> appear in at least one line. The command will ignore binary files. It will also exclude netCDF files and you can exclude more files from the search (e.g. figures). Replace <samp><directory_name></samp> with the directory you want to search through.
 +
 +
At the opposite, if you only want to search through files with a specific extension, you could use <samp>--include=GLOB</samp>. Replace <samp>GLOB</samp> by the extension you want to search. For example the following command will search for <samp>w35</samp> in all the Python Notebooks and only those:
 +
<pre>grep --include=*.ipynb -irlI w35 <directory_name> > ipynb_to_update.txt</pre>

Revision as of 19:33, 14 November 2021

This page contains information on what to do if you want to change project to work at NCI.

Climate model experiments

WRF does not have a standard experiment setup so we can't give specific instructions for this model.

Tips for other scripts

Find files with the project listed in

To find all the files that contain the mention of w35, you can use the following command:

grep --exclude=*.nc -irlI w35 <directory_name> > files_to_update.txt

files_to_update.txt will contain a list of files where w35 appear in at least one line. The command will ignore binary files. It will also exclude netCDF files and you can exclude more files from the search (e.g. figures). Replace <directory_name> with the directory you want to search through.

At the opposite, if you only want to search through files with a specific extension, you could use --include=GLOB. Replace GLOB by the extension you want to search. For example the following command will search for w35 in all the Python Notebooks and only those:

grep --include=*.ipynb -irlI w35 <directory_name> > ipynb_to_update.txt