source: trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/copy_model @ 2845

Last change on this file since 2845 was 2295, checked in by mlefevre, 5 years ago

MESOSCALE. Architecture for Titan LES model.

  • Property svn:executable set to *
File size: 8.9 KB
Line 
1#! /bin/bash
2
3##########################################################
4laphysiq="mars_lmd" ## default value
5config="" ## default value
6while getopts "p:c:" options; do
7  case $options in
8   p ) laphysiq="${OPTARG}";;     ## choose physics
9   c ) config="${OPTARG}";;     ## choose config
10  esac
11done
12##########################################################
13echo '*** copying physics: '$laphysiq
14##########################################################
15
16echo '*** linking sources from ...'
17WRFSRC=$PWD/SRC/
18if [[ "${config}" == "les" ]]
19then
20  WRFSRC=$PWD/SRC/LES/
21fi
22echo $WRFSRC
23echo '*** to ...'
24HERE=$PWD
25echo $HERE
26
27
28#mkdir WPS
29#cd WPS
30#ln -sf $WRFSRC/WPS/wps_mars .
31#ln -sf $WRFSRC/WPS/switch_WPS_Mars .
32#cd ..
33
34mkdir zeWRFV2
35#ln -sf $WRFSRC/prepare_ini .
36cd zeWRFV2
37
38echo '*** start defining folders and links'
39ln -sf $WRFSRC/WRFV2/clean .
40ln -sf $WRFSRC/WRFV2/compile .
41#ln -sf $WRFSRC/WRFV2/makemeso .
42ln -sf $WRFSRC/WRFV2/configure .
43ln -sf $WRFSRC/WRFV2/Makefile .
44#ln -sf $WRFSRC/WRFV2/mars.sed* .
45ln -sf $WRFSRC/WRFV2/*.h .
46ln -sf $WRFSRC/WRFV2/configure.defaults.* .
47ln -sf $WRFSRC/WRFV2/call_meso_inifis?.inc .
48ln -sf $WRFSRC/WRFV2/call_meso_physiq?.inc .
49
50#\rm meso_dimphys.h
51#cp $WRFSRC/WRFV2/meso_dimphys.h .
52#cp $WRFSRC/WRFV2/call_*.inc .
53#cp $WRFSRC/WRFV2/custom*.inc .
54mkdir Registry
55ln -sf $WRFSRC/WRFV2/Registry/* Registry/
56  ### this is to allow one to change Registry somewhere without it being changed everywhere !
57  rm Registry/Registry.EM
58  cp $WRFSRC/WRFV2/Registry/Registry.EM Registry/
59mkdir arch
60ln -sf $WRFSRC/WRFV2/arch/* arch/
61mkdir dyn_em
62ln -sf $WRFSRC/WRFV2/dyn_em/* dyn_em/
63mkdir dyn_exp
64ln -sf $WRFSRC/WRFV2/dyn_exp/* dyn_exp/
65mkdir dyn_nmm
66ln -sf $WRFSRC/WRFV2/dyn_nmm/* dyn_nmm/
67mkdir frame
68ln -sf $WRFSRC/WRFV2/frame/* frame/
69mkdir inc
70ln -sf $WRFSRC/WRFV2/inc/* inc/
71mkdir main
72ln -sf $WRFSRC/WRFV2/main/* main/
73mkdir phys
74ln -sf $WRFSRC/WRFV2/phys/* phys/
75echo $laphysiq
76ln -sf $WRFSRC/WRFV2/phys/dynphy_wrf_$laphysiq/* phys/
77mkdir run
78ln -sf $WRFSRC/WRFV2/run/* run/
79mkdir share
80ln -sf $WRFSRC/WRFV2/share/* share/
81mkdir tools
82ln -sf $WRFSRC/WRFV2/tools/* tools/
83\rm tools/DOMAIN_TIME_TEST
84\rm tools/CodeBase
85mkdir tools/DOMAIN_TIME_TEST
86ln -sf $WRFSRC/WRFV2/tools/DOMAIN_TIME_TEST/* tools/DOMAIN_TIME_TEST/
87mkdir tools/CodeBase
88ln -sf $WRFSRC/WRFV2/tools/CodeBase/* tools/CodeBase/
89mkdir external
90ln -sf $WRFSRC/WRFV2/external/Makefile external/
91mkdir external/io_int
92ln -sf $WRFSRC/WRFV2/external/io_int/* external/io_int/
93mkdir external/esmf_time_f90
94ln -sf $WRFSRC/WRFV2/external/esmf_time_f90/* external/esmf_time_f90/
95mkdir external/io_netcdf
96ln -sf $WRFSRC/WRFV2/external/io_netcdf/* external/io_netcdf/
97mkdir external/io_grib1
98ln -sf $WRFSRC/WRFV2/external/io_grib1/* external/io_grib1/
99\rm external/io_grib1/MEL_grib1
100\rm external/io_grib1/WGRIB
101\rm external/io_grib1/build
102\rm external/io_grib1/grib1_util
103mkdir external/io_grib1/MEL_grib1
104ln -sf $WRFSRC/WRFV2/external/io_grib1/MEL_grib1/* external/io_grib1/MEL_grib1/
105mkdir external/io_grib1/WGRIB
106ln -sf $WRFSRC/WRFV2/external/io_grib1/WGRIB/* external/io_grib1/WGRIB/
107mkdir external/io_grib1/grib1_util
108ln -sf $WRFSRC/WRFV2/external/io_grib1/grib1_util/* external/io_grib1/grib1_util/
109mkdir external/io_grib1/build
110mkdir external/io_grib_share
111ln -sf $WRFSRC/WRFV2/external/io_grib_share/* external/io_grib_share/
112\rm external/io_grib_share/build
113mkdir external/io_grib_share/build
114ln -sf $WRFSRC/WRFV2/external/io_grib_share/build/* external/io_grib_share/build/
115mkdir external/ioapi_share
116ln -sf $WRFSRC/WRFV2/external/ioapi_share/* external/ioapi_share/
117mkdir external/io_phdf5
118ln -sf $WRFSRC/WRFV2/external/io_phdf5/* external/io_phdf5/
119mkdir external/RSL_LITE
120ln -sf $WRFSRC/WRFV2/external/RSL_LITE/* external/RSL_LITE/
121mkdir external/io_grib2
122ln -sf $WRFSRC/WRFV2/external/io_grib2/* external/io_grib2/
123\rm external/io_grib2/bacio-1.3
124\rm external/io_grib2/g2lib
125mkdir external/io_grib2/bacio-1.3
126ln -sf $WRFSRC/WRFV2/external/io_grib2/bacio-1.3/* external/io_grib2/bacio-1.3/
127mkdir external/io_grib2/g2lib
128ln -sf $WRFSRC/WRFV2/external/io_grib2/g2lib/* external/io_grib2/g2lib/
129mkdir external/io_pnetcdf
130ln -sf $WRFSRC/WRFV2/external/io_pnetcdf/* external/io_pnetcdf/
131mkdir external/RSL
132ln -sf $WRFSRC/WRFV2/external/RSL/* external/RSL/
133\rm external/RSL/RSL
134mkdir external/RSL/RSL
135ln -sf $WRFSRC/WRFV2/external/RSL/RSL/* external/RSL/RSL/
136mkdir external/io_esmf
137ln -sf $WRFSRC/WRFV2/external/io_esmf/* external/io_esmf/
138mkdir external/io_mcel
139ln -sf $WRFSRC/WRFV2/external/io_mcel/* external/io_mcel/
140echo ${laphysiq}
141if [[ "${laphysiq}" == *"void"* ]]
142then
143
144  ## case with no physics
145  rm -f physics.sed
146  touch physics.sed
147
148else
149  ## case with physics
150  echo $laphysiq
151  mkdir $laphysiq
152  mkdir $laphysiq/libf
153  mkdir $laphysiq/libf/grid
154  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/grid/* $laphysiq/libf/grid/
155  mkdir $laphysiq/libf/dyn3d
156  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/dyn3d/* $laphysiq/libf/dyn3d/
157  mkdir $laphysiq/libf/bibio
158  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/bibio/* $laphysiq/libf/bibio/
159  if [[ "${laphysiq}" == *"mars"* ]]
160  then
161    ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
162    ln -sf $WRFSRC/WRFV2/$laphysiq/meso_dimphys.h* $laphysiq/
163    ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
164    #ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
165    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/duplicate* $laphysiq/libf/
166    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/generate* $laphysiq/libf/
167    mkdir $laphysiq/libf/aeronomars
168    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/aeronomars/* $laphysiq/libf/aeronomars/
169    mkdir $laphysiq/libf/phymars
170    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phymars/* $laphysiq/libf/phymars/
171    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phymars/
172    ###
173    \rm $laphysiq/libf/phymars/dimphys.h
174  elif [[ "${laphysiq}" == *"venus"* ]]
175  then
176    ln -sf $WRFSRC/WRFV2/$laphysiq/makelmdz $laphysiq/
177    ln -sf $WRFSRC/WRFV2/$laphysiq/deftank $laphysiq/
178    ln -sf $WRFSRC/WRFV2/$laphysiq/arch* $laphysiq/
179    ln -sf $WRFSRC/WRFV2/$laphysiq/tmp* $laphysiq/
180    ln -sf $WRFSRC/WRFV2/$laphysiq/libf_gcm $laphysiq/
181    ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
182    ln -sf $WRFSRC/WRFV2/$laphysiq/make_dir $laphysiq/
183    ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
184    ln -sf $WRFSRC/WRFV2/$laphysiq/Tools $laphysiq/
185    mkdir $laphysiq/ioipsl
186    ln -sf $WRFSRC/WRFV2/$laphysiq/ioipsl/modipsl/lib/* $laphysiq/ioipsl/
187    mkdir $laphysiq/libf/phyvenus
188    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phyvenus/* $laphysiq/libf/phyvenus/
189    mkdir $laphysiq/libf/phy_common
190    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phy_common/
191    mkdir $laphysiq/libf/misc
192    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/misc/* $laphysiq/libf/misc/
193    mkdir $laphysiq/libf/filtrez
194    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/filtrez/* $laphysiq/libf/filtrez/
195  elif [[ "${laphysiq}" == *"generic"* ]]
196  then
197    ln -sf $WRFSRC/WRFV2/$laphysiq/arch* $laphysiq/
198    ln -sf $WRFSRC/WRFV2/$laphysiq/build_gcm $laphysiq/
199    ln -sf $WRFSRC/WRFV2/$laphysiq/makelmdz* $laphysiq/
200    ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
201    ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
202    mkdir $laphysiq/libf/phystd
203    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phystd/* $laphysiq/libf/phystd/
204    cp -r $WRFSRC/WRFV2/$laphysiq/libf/phystd/bands $laphysiq/libf/phystd/
205    cp -r $WRFSRC/WRFV2/$laphysiq/libf/phystd/scatterers $laphysiq/libf/phystd/
206    mkdir $laphysiq/libf/phy_common
207    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phy_common/
208    mkdir $laphysiq/libf/misc
209    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/misc/* $laphysiq/libf/misc/
210    mkdir $laphysiq/libf/filtrez
211    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/filtrez/* $laphysiq/libf/filtrez/
212  elif [[ "${laphysiq}" == *"titan"* ]]
213  then
214    ln -sf $WRFSRC/WRFV2/$laphysiq/arch* $laphysiq/
215    ln -sf $WRFSRC/WRFV2/$laphysiq/build_gcm $laphysiq/
216    ln -sf $WRFSRC/WRFV2/$laphysiq/makelmdz* $laphysiq/
217    ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
218    mkdir $laphysiq/libf/phytitan
219    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phytitan/* $laphysiq/libf/phytitan/
220    cp -r $WRFSRC/WRFV2/$laphysiq/libf/phytitan/bands $laphysiq/libf/phytitan/
221    cp -r $WRFSRC/WRFV2/$laphysiq/libf/phytitan/scatterers $laphysiq/libf/phytitan/
222    mkdir $laphysiq/libf/chimtitan
223    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/chimtitan/* $laphysiq/libf/chimtitan/
224    mkdir $laphysiq/libf/muphytitan
225    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/muphytitan/* $laphysiq/libf/muphytitan/
226    mkdir $laphysiq/libf/phy_common
227    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phy_common/
228    mkdir $laphysiq/libf/misc
229    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/misc/* $laphysiq/libf/misc/
230    mkdir $laphysiq/libf/filtrez
231    ln -sf $WRFSRC/WRFV2/$laphysiq/libf/filtrez/* $laphysiq/libf/filtrez/
232  fi
233  mkdir $laphysiq/libo
234  #touch $laphysiq/makefile
235
236  sed s+"YORGLYORGL"+"$laphysiq"+g $WRFSRC/WRFV2/physics.sed > physics.sed
237fi
238
239mkdir test
240mkdir test/em_real
241mkdir test/em_quarter_ss
242ln -sf $WRFSRC/WRFV2/test/em_real/* test/em_real/
243
244echo '*** end'
245
246
247
248
Note: See TracBrowser for help on using the repository browser.