updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / chem / KPP / util / create_inc_files.csh
blob6ce1faf0d3509a353e18a4493630060d2bc91938
1 #!/bin/csh -f
4 if ( $#argv != 1 ) then
5 echo Usage: create_inc_files.csh name_of_mechanism
6 endif
8 set model = $argv[1]
9 set incm_dir = inc/${model}
12 # make directory (if not already there)
13 if ( ! -e inc/${model} ) then
14 mkdir ${incm_dir}
15 endif
18 # if not already there, then put empty .inc files into directory
20 set inc_list = "u l b a ibu ib ia e"
22 foreach inam ( $inc_list )
23 if (! -e ${incm_dir}/kpp_mechd_${inam}_${model}.inc ) then
24 echo ! > ${incm_dir}/kpp_mechd_${inam}_${model}.inc
25 endif
26 end
28 if (! -e ${incm_dir}/extra_args_to_update_rconst_${model}.inc ) then
29 echo ! > ${incm_dir}/extra_args_to_update_rconst_${model}.inc
30 endif
33 if (! -e ${incm_dir}/extra_args_update_rconst_${model}.inc ) then
34 echo ! > ${incm_dir}/extra_args_update_rconst_${model}.inc
35 endif
37 if (! -e ${incm_dir}/extra_decls_update_rconst_${model}.inc ) then
38 echo ! > ${incm_dir}/extra_decls_update_rconst_${model}.inc
39 endif
43 # link .inc files in chem/KPP/$(model)/inc
46 set kincfiles = ( ${incm_dir}/*.inc )
50 foreach kincfile ( $kincfiles )
52 set incf = `echo $kincfile:t`
55 if ( ! -e ${WRFC_ROOT}/inc/${incf} ) then
57 echo ln -s ../chem/${WKC_DIRNAME}/${kincfile} ${WRFC_ROOT}/inc
58 ln -s ../chem/${WKC_DIRNAME}/${kincfile} ${WRFC_ROOT}/inc
60 endif
62 end
66 exit 0