Skip to content

Commit

Permalink
Tweaks to inlcude the hash automatically in the readme file. Nice ide…
Browse files Browse the repository at this point in the history
…a George
  • Loading branch information
sanatcumar committed Dec 8, 2023
1 parent d5c01f6 commit 9d60740
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ush/fv3gfs_driver_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,17 @@ fi
# Make the README files with all relevant info to reproduce the outputs
#------------------------------------------------------------------------------------

cd $out_dir
cd $home_dir

commit_string=$(git log -1 --oneline)
commit_num=$(echo $commit_string | cut -c1-7)
cd $out_dir

if [ $gtype = uniform ] || [ $gtype = stretch ]; then

cat <<EOF > $readme_name
The following parameters were used
commit_num=$commit_num
creation date=$(date +%Y-%m-%d)
gtype=$gtype
make_gsl_orog=$make_gsl_orog
Expand All @@ -595,6 +599,7 @@ elif [ $gtype = nest ] || [ $gtype = regional_gfdl ]; then

cat <<EOF > $readme_name
The following parameters were used
commit_num=$commit_num
creation date=$(date +%Y-%m-%d)
gtype=$gtype
vegsoilt_frac=$vegsoilt_frac
Expand Down Expand Up @@ -622,6 +627,7 @@ elif [ $gtype = regional_esg ] ; then

cat <<EOF > $readme_name
The following parameters were used
commit_num=$commit_num
creation date=$(date +%Y-%m-%d)
gtype=$gtype
res=-999 # equivalent resolution is computed
Expand Down

0 comments on commit 9d60740

Please sign in to comment.