1 | #!/bin/ksh |
---|
2 | |
---|
3 | # $Date: 2010/06/25 18:48:26 $ |
---|
4 | # $Author: ssipsl $ |
---|
5 | # $Revision: 1.5 $ |
---|
6 | # IPSL (2006) |
---|
7 | # This software is governed by the CeCILL licence see ORCHIDEE/ORCHIDEE_CeCILL.LIC |
---|
8 | |
---|
9 | #D--------------------------------------------------------------------== |
---|
10 | #D--------------------------------------------------------------------== |
---|
11 | #D- |
---|
12 | #D- Job to launch FLUXNET spinup simulations |
---|
13 | #D- |
---|
14 | #D--------------------------------------------------------------------== |
---|
15 | #D--------------------------------------------------------------------== |
---|
16 | #D- |
---|
17 | # Job inspired from Sönke Zaehle "site_new.def" job |
---|
18 | # ################################################# |
---|
19 | |
---|
20 | if [ $# -lt 1 ] ; then |
---|
21 | echo "" |
---|
22 | echo "ERROR: Bad usage. You must give the name of the card as argument." |
---|
23 | echo "Note that this script is only supposed to be used with fluxnet simulation." |
---|
24 | echo "Do as follow for fluxnet simulation with fluxnet.card:" |
---|
25 | echo " ./Job_Post_FLUXNET fluxnet > out_Job_Post_FLUXNET 2>&1" |
---|
26 | echo "" |
---|
27 | exit |
---|
28 | fi |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | SUBMIT_DIR=$( pwd ) |
---|
33 | MODIPSL=$(cd ${SUBMIT_DIR}'/../../..';pwd;) |
---|
34 | libIGCM=${MODIPSL}/libIGCM |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | # CleanSmallFiles : option to remove small output files before saving |
---|
39 | CleanSmallFiles=yes |
---|
40 | export CleanSmallFiles |
---|
41 | |
---|
42 | # All SubJobs in SPINUP in ONE OR MORE YEARS run (must be used with libIGCM branches/AllPostFred). |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | #D--------------------------------------------------------------------== |
---|
47 | #D- -1. User modification place |
---|
48 | #D--------------------------------------------------------------------== |
---|
49 | |
---|
50 | #D- Increased verbosity (1, 2, 3) |
---|
51 | #Verbosity=3 |
---|
52 | |
---|
53 | #D- |
---|
54 | # -------------------------------------------------------------------- |
---|
55 | #D- ! Optionnal features /!\ Use with care ! |
---|
56 | # -------------------------------------------------------------------- |
---|
57 | |
---|
58 | #D- Low level debug : to bypass lib test checks and stack construction |
---|
59 | #D- Default=true |
---|
60 | DEBUG_debug=false |
---|
61 | |
---|
62 | #D- Set DEBUG_sys to false to disable output calls of function |
---|
63 | #D- Default=true |
---|
64 | #DEBUG_sys=false |
---|
65 | |
---|
66 | #D- Turn in dry run mode ? (0,1,2,3) |
---|
67 | #D- Default=0 |
---|
68 | #DRYRUN=3 |
---|
69 | # YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE ! |
---|
70 | # ------------------------------------------------------------------------------------- |
---|
71 | # | DRYRUN= | Date computations, | sys_Get | Exe | sys_Put_Out; sys_Put_Rest | |
---|
72 | # | | Cp/Exe param files | | Chmod | | |
---|
73 | # | | Qsub | | | | |
---|
74 | # ------------------------------------------------------------------------------------- |
---|
75 | # | 0 | yes | yes | yes | yes | |
---|
76 | # ------------------------------------------------------------------------------------- |
---|
77 | # | 1 | yes | yes | yes | no | |
---|
78 | # ------------------------------------------------------------------------------------- |
---|
79 | # | 2 | yes | yes | no | no | |
---|
80 | # ------------------------------------------------------------------------------------- |
---|
81 | # | 3 | yes | no | no | no | |
---|
82 | # ------------------------------------------------------------------------------------- |
---|
83 | |
---|
84 | |
---|
85 | #D- |
---|
86 | #D--------------------------------------------------------------------== |
---|
87 | #D- 0. System Environment |
---|
88 | #D- - Define variables for Number of processors |
---|
89 | #D- - Define MPI variables |
---|
90 | #D- - Define batch scheduler variables |
---|
91 | #D- - Source IGCM Library |
---|
92 | #D- - Get RESOLution in .resol file (temporary) |
---|
93 | #D--------------------------------------------------------------------== |
---|
94 | |
---|
95 | #D--------------------------------------------------------------------== |
---|
96 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
97 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh |
---|
98 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh |
---|
99 | #------- |
---|
100 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
101 | . ${libIGCM}/libIGCM_config/libIGCM_config.ksh |
---|
102 | . ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh |
---|
103 | . ${libIGCM}/libIGCM_post/libIGCM_post.ksh |
---|
104 | #------- |
---|
105 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
106 | ( ${DEBUG_debug} ) && IGCM_card_Check |
---|
107 | ( ${DEBUG_debug} ) && IGCM_date_Check |
---|
108 | |
---|
109 | #D--------------------------------------------------------------------== |
---|
110 | #D- 0.1 COMMON ENVIRONMENT |
---|
111 | #D- - Read libIGCM compatibility version in config.card |
---|
112 | #D- - Read UserChoices section |
---|
113 | #D- - Read Ensemble section |
---|
114 | #D- - Read Post section |
---|
115 | #D- - Define all netcdf output directories |
---|
116 | #D--------------------------------------------------------------------== |
---|
117 | IGCM_config_CommonConfiguration ${SUBMIT_DIR}/config.card |
---|
118 | |
---|
119 | #D--------------------------------------------------------------------== |
---|
120 | #D- 1. INITIALIZE CONFIGURATION |
---|
121 | #D- - Simulation configuration |
---|
122 | #D- - Simulation parameters |
---|
123 | #D- - Execution parameter |
---|
124 | #D- - Define input files directory |
---|
125 | #D- - Read or initialize CumulPeriod |
---|
126 | #D- - run.card |
---|
127 | #D---------------------------------------------------------------------== |
---|
128 | IGCM_config_Initialize |
---|
129 | |
---|
130 | |
---|
131 | IGCM_sys_Cp -p ensemble.card ref.card |
---|
132 | IGCM_sys_Cp -p $1.card ensemble.card |
---|
133 | |
---|
134 | IGCM_sys_Rm -f ${SUBMIT_DIR}/liste_glost.list |
---|
135 | IGCM_sys_Rm -f ${SUBMIT_DIR}/job_output_ |
---|
136 | |
---|
137 | |
---|
138 | #set -vx |
---|
139 | R_BC=${R_IN}/BC |
---|
140 | |
---|
141 | . ${SUBMIT_DIR}/ensemble.ksh |
---|
142 | |
---|
143 | ENSEMBLE_initialize |
---|
144 | |
---|
145 | # Launch ATLAS syncho : we have to wait for the last job ! |
---|
146 | |
---|
147 | # ATLAS fix parameters : |
---|
148 | # Atlas Name : |
---|
149 | AtlasCfg=${ensemble_SPINUP_AtlasCfg} |
---|
150 | #atlas_FLUXNET.cfg |
---|
151 | |
---|
152 | # observation_file |
---|
153 | observation_file_path=${ensemble_SPINUP_observation_base_path}/'${Site}_${FYEAR}-${LYEAR}.nc' |
---|
154 | |
---|
155 | |
---|
156 | # old history file |
---|
157 | |
---|
158 | reference_base_path=${ensemble_SPINUP_reference_base_path} |
---|
159 | if [ X${reference_base_path} == X"" ] || [ X${reference_base_path} == XNONE ] ; then |
---|
160 | flag_reference=0 |
---|
161 | reference_config="_" |
---|
162 | reference_file_path=NONE |
---|
163 | else |
---|
164 | flag_reference=1 |
---|
165 | reference_config=${ensemble_SPINUP_reference_config} |
---|
166 | reference_file_path=${reference_base_path}/${reference_config}/'${Site}${reference_config}HIST/SRF/Output/MO/${Site}${reference_config}HIST_${FYEAR}0101_${LYEAR}1231_1M_sechiba_history.nc' |
---|
167 | |
---|
168 | fi |
---|
169 | export reference_config |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | # Modulo for SpinUp years |
---|
174 | Modulo=${ensemble_SPINUP_Modulo} |
---|
175 | |
---|
176 | |
---|
177 | |
---|
178 | # Create RUN_DIR |
---|
179 | echo RUN_DIR_PATH=${RUN_DIR_PATH} |
---|
180 | IGCM_sys_MkdirWork ${RUN_DIR_PATH} |
---|
181 | cp *jnl ${RUN_DIR_PATH}/. |
---|
182 | cp *cfg ${RUN_DIR_PATH}/. |
---|
183 | cd ${RUN_DIR_PATH} |
---|
184 | |
---|
185 | |
---|
186 | echo ${ensemble_CONFIG_Groups[*]} |
---|
187 | for group in ${ensemble_CONFIG_Groups[*]} ; do |
---|
188 | isite=1 |
---|
189 | index=0 |
---|
190 | |
---|
191 | eval temp=\${ensemble_CONFIG_${group}[*]} |
---|
192 | set -A group_site -- $temp |
---|
193 | |
---|
194 | # Number of sites : |
---|
195 | NumSites=$(( ${#group_site[*]} / NumInfosBySite )) |
---|
196 | |
---|
197 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_UserChoices_JobName} |
---|
198 | |
---|
199 | IGCM_sys_Rm -Rf ${R_SAVE}/fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
200 | IGCM_sys_Mkdir ${R_SAVE}/fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
201 | |
---|
202 | while [ ${isite} -le ${NumSites} ] ; do |
---|
203 | |
---|
204 | site=${group_site[$index]} |
---|
205 | echo $site |
---|
206 | |
---|
207 | TIME_YEAR=${group_site[ $(( index + ColumnLength )) ]} |
---|
208 | YEAR=${group_site[ $(( index + ColumnYear )) ]} |
---|
209 | |
---|
210 | Site=$site |
---|
211 | echo $YEAR |
---|
212 | DUREE=${TIME_YEAR} |
---|
213 | FYEAR=${YEAR} |
---|
214 | (( LYEAR=FYEAR+DUREE-1 )) |
---|
215 | echo $site |
---|
216 | SpinUpJob=${site}${config_UserChoices_JobName} |
---|
217 | TIME_YEAR=${group_site[ $(( index + ColumnLength )) ]} |
---|
218 | YEAR=${group_site[ $(( index + ColumnYear )) ]} |
---|
219 | |
---|
220 | |
---|
221 | fichier_with_path=$( \ls -rt ${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_UserChoices_JobName}/${SpinUpJob}HIST/SRF/Output/MO/*_sechiba_history.nc ) |
---|
222 | |
---|
223 | |
---|
224 | |
---|
225 | eval observation_file=${observation_file_path} |
---|
226 | eval reference_file=${reference_file_path} |
---|
227 | |
---|
228 | echo "reference_config=" ${reference_config} |
---|
229 | ferret -script taylor_arrow_fluxnet_final_1.jnl GPP GPP/1800 hour ${flag_reference} GPP ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
230 | ferret -script taylor_arrow_fluxnet_final_1.jnl GPP GPP/1800 day ${flag_reference} GPP ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
231 | ferret -script taylor_arrow_fluxnet_final_1.jnl GPP GPP/1800 month ${flag_reference} GPP ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
232 | ferret -script taylor_arrow_fluxnet_final_1.jnl GPP GPP/1800 year ${flag_reference} GPP ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
233 | |
---|
234 | ferret -script taylor_arrow_fluxnet_final_1.jnl \(maint_resp+hetero_resp+growth_resp\) Reco/1800 hour ${flag_reference} TER ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
235 | ferret -script taylor_arrow_fluxnet_final_1.jnl \(maint_resp+hetero_resp+growth_resp\) Reco/1800 day ${flag_reference} TER ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
236 | ferret -script taylor_arrow_fluxnet_final_1.jnl \(maint_resp+hetero_resp+growth_resp\) Reco/1800 month ${flag_reference} TER ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
237 | ferret -script taylor_arrow_fluxnet_final_1.jnl \(maint_resp+hetero_resp+growth_resp\) Reco/1800 year ${flag_reference} TER ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
238 | |
---|
239 | ferret -script taylor_arrow_fluxnet_final_1.jnl NEE NEE/1800 hour ${flag_reference} NEE ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
240 | ferret -script taylor_arrow_fluxnet_final_1.jnl NEE NEE/1800 day ${flag_reference} NEE ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
241 | ferret -script taylor_arrow_fluxnet_final_1.jnl NEE NEE/1800 month ${flag_reference} NEE ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
242 | ferret -script taylor_arrow_fluxnet_final_1.jnl NEE NEE/1800 year ${flag_reference} NEE ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
243 | |
---|
244 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qh H_F hour ${flag_reference} SH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
245 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qh H_F day ${flag_reference} SH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
246 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qh H_F month ${flag_reference} SH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
247 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qh H_F year ${flag_reference} SH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
248 | |
---|
249 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qle LE_F hour ${flag_reference} LH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
250 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qle LE_F day ${flag_reference} LH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
251 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qle LE_F month ${flag_reference} LH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
252 | ferret -script taylor_arrow_fluxnet_final_1.jnl Qle LE_F year ${flag_reference} LH ${config_UserChoices_JobName} ${reference_config} ${group} ${site} ${fichier_with_path} ${observation_file} ${reference_file} |
---|
253 | |
---|
254 | |
---|
255 | # We test if the END step was moved in SpinUp/SPIN/Output directory. |
---|
256 | # Then we are sure the last historical SpinUp step has finished (HIST)... |
---|
257 | |
---|
258 | # Define name of the END SubJob (FIN) in SpinUp |
---|
259 | if [ ${ensemble_SPINUP_duree_final} -gt 0 ] ; then |
---|
260 | BeforeLastJob=${site}${config_UserChoices_JobName}FIN |
---|
261 | else |
---|
262 | echo "We must have an \"duree_final\" non zero to get historical run and post-treatment" |
---|
263 | exit 1 |
---|
264 | fi |
---|
265 | |
---|
266 | TIME_YEAR=${group_site[ $(( index + ColumnLength )) ]} |
---|
267 | YEAR=${group_site[ $(( index + ColumnYear )) ]} |
---|
268 | |
---|
269 | ATLAS_ARGS=${AtlasCfg}\ ${observation_file}\ ${reference_file}\ ${reference_config}\ ${Modulo} |
---|
270 | |
---|
271 | echo "ATLAS_ARGS:" ${ATLAS_ARGS} |
---|
272 | |
---|
273 | |
---|
274 | # Launch post-treatment for SPINUP ! |
---|
275 | echo "****" |
---|
276 | echo "Launch post-treatment for SPINUP for site ${site} !" |
---|
277 | echo "call to post_FLUXNET:" ${MODIPSL} ${group} ${site} ${TIME_YEAR} ${YEAR} ${ATLAS_ARGS} |
---|
278 | # nohup ${SUBMIT_DIR}/post_FLUXNET ${MODIPSL} ${group} ${site} ${TIME_YEAR} ${YEAR} ${ATLAS_ARGS} > ${SUBMIT_DIR}/out_post_${site} 2>&1 & |
---|
279 | echo ${SUBMIT_DIR}/post_FLUXNET ${MODIPSL} ${group} ${site} ${ATLAS_ARGS} \> ${SUBMIT_DIR}/out_post_${site} >> ${SUBMIT_DIR}/liste_glost.list |
---|
280 | echo "****" |
---|
281 | |
---|
282 | (( isite=isite+1 )) |
---|
283 | (( index=index+NumInfosBySite )) |
---|
284 | done |
---|
285 | |
---|
286 | |
---|
287 | |
---|
288 | if [ ${#ensemble_CONFIG_Groups[*]} -ne 1 ] ; then |
---|
289 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_GPP_hour.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_GPP_hour.csv |
---|
290 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_GPP_day.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_GPP_day.csv |
---|
291 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_GPP_month.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_GPP_month.csv |
---|
292 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_GPP_year.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_GPP_year.csv |
---|
293 | |
---|
294 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_TER_hour.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_TER_hour.csv |
---|
295 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_TER_day.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_TER_day.csv |
---|
296 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_TER_month.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_TER_month.csv |
---|
297 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_TER_year.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_TER_year.csv |
---|
298 | |
---|
299 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_NEE_hour.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_NEE_hour.csv |
---|
300 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_NEE_day.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_NEE_day.csv |
---|
301 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_NEE_month.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_NEE_month.csv |
---|
302 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_NEE_year.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_NEE_year.csv |
---|
303 | |
---|
304 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_SH_hour.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_SH_hour.csv |
---|
305 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_SH_day.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_SH_day.csv |
---|
306 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_SH_month.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_SH_month.csv |
---|
307 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_SH_year.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_SH_year.csv |
---|
308 | |
---|
309 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_LH_hour.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_LH_hour.csv |
---|
310 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_LH_day.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_LH_day.csv |
---|
311 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_LH_month.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_LH_month.csv |
---|
312 | cat stat_${config_UserChoices_JobName}_${reference_config}_${group}_LH_year.csv >> stat_${config_UserChoices_JobName}_${reference_config}_ALL_LH_year.csv |
---|
313 | |
---|
314 | fi |
---|
315 | |
---|
316 | |
---|
317 | sed -e "s,\(flag_reference_file=\)\(.*\),\1${flag_reference},g" -e "s,\(group=\)\(.*\),\1\"${group}\",g" -e "s,\(config_eval=\)\(.*\),\1\"${config_UserChoices_JobName}\",g" -e "s,\(config_ref=\)\(.*\),\1\"${reference_config}\",g" atlas_FLUXNET_taylor.cfg > atlas_FLUXNET_taylor_${group}.cfg |
---|
318 | |
---|
319 | atlas -o fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} atlas_FLUXNET_taylor_${group}.cfg toto |
---|
320 | |
---|
321 | # Remove small files before saving |
---|
322 | if [ X$CleanSmallFiles = Xyes ] ; then |
---|
323 | tmpdir=fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
324 | # Remove .info .tex .jnl .stdout .jpg .pdf |
---|
325 | echo "Remove small files before saving : " |
---|
326 | sumfilestoremove=$(( $( find $tmpdir -name "*.info" | wc -l ) + $( find $tmpdir -name "*.jnl" | wc -l ) + $( find $tmpdir -name "*.stdout" | wc -l ) + $( find $tmpdir -name "*.tex" | wc -l ) + $( ls $tmpdir/*.pdf | wc -l ) )) |
---|
327 | echo "Following $sumfilestoremove files listed below will be removed:" |
---|
328 | find ${tmpdir} -name "*.info" |
---|
329 | find ${tmpdir} -name "*.jnl" |
---|
330 | find ${tmpdir} -name "*.stdout" |
---|
331 | find ${tmpdir} -name "*.tex" |
---|
332 | ls ${tmpdir}/*pdf ${tmpdir}/*/*pdf |
---|
333 | |
---|
334 | # Now remove them |
---|
335 | find ${tmpdir} -name "*.info" -print -exec rm -f '{}' \; |
---|
336 | find ${tmpdir} -name "*.jnl" -print -exec rm -f '{}' \; |
---|
337 | find ${tmpdir} -name "*.stdout" -print -exec rm -f '{}' \; |
---|
338 | find ${tmpdir} -name "*.tex" -print -exec rm -f '{}' \; |
---|
339 | # rm -f ${tmpdir}/*/*pdf |
---|
340 | else |
---|
341 | echo "No clean of small files will be done" |
---|
342 | fi |
---|
343 | |
---|
344 | # Save files |
---|
345 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_UserChoices_JobName} |
---|
346 | echo "Before IGCM_sys_Put_Dir : destination= ${R_SAVE}" |
---|
347 | |
---|
348 | IGCM_sys_Put_Dir fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} ${R_SAVE} |
---|
349 | IGCM_sys_Rm -Rf fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
350 | |
---|
351 | |
---|
352 | done |
---|
353 | |
---|
354 | nlignes=`less ${SUBMIT_DIR}/liste_glost.list | wc -l ` |
---|
355 | nproc=`echo "$nlignes/4+1" | bc` |
---|
356 | sed -e "s/#MSUB\ \-n.*/#MSUB\ \-n\ ${nproc}/" ${SUBMIT_DIR}/job_output > ${SUBMIT_DIR}/job_output_ |
---|
357 | echo ccc_mprun ./glost_launch ${SUBMIT_DIR}/liste_glost.list >> ${SUBMIT_DIR}/job_output_ |
---|
358 | ccc_msub ${SUBMIT_DIR}/job_output_ |
---|
359 | |
---|
360 | |
---|
361 | |
---|
362 | if [ ${#ensemble_CONFIG_Groups[*]} -ne 1 ] ; then |
---|
363 | group="ALL" |
---|
364 | IGCM_sys_Rm -Rf ${R_SAVE}/fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
365 | |
---|
366 | sed -e "s,\(flag_reference_file=\)\(.*\),\1${flag_reference},g" -e "s,\(group=\)\(.*\),\1\"${group}\",g" -e "s,\(config_eval=\)\(.*\),\1\"${config_UserChoices_JobName}\",g" -e "s,\(config_ref=\)\(.*\),\1\"${reference_config}\",g" atlas_FLUXNET_taylor.cfg > atlas_FLUXNET_taylor_${group}.cfg |
---|
367 | |
---|
368 | atlas -o fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} atlas_FLUXNET_taylor_${group}.cfg toto |
---|
369 | |
---|
370 | |
---|
371 | # Remove small files before saving |
---|
372 | if [ X$CleanSmallFiles = Xyes ] ; then |
---|
373 | tmpdir=fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
374 | # Remove .info .tex .jnl .stdout .jpg .pdf |
---|
375 | echo "Remove small files before saving : " |
---|
376 | sumfilestoremove=$(( $( find $tmpdir -name "*.info" | wc -l ) + $( find $tmpdir -name "*.jnl" | wc -l ) + $( find $tmpdir -name "*.stdout" | wc -l ) + $( find $tmpdir -name "*.tex" | wc -l ) + $( ls $tmpdir/*.pdf | wc -l ) )) |
---|
377 | echo "Following $sumfilestoremove files listed below will be removed:" |
---|
378 | find ${tmpdir} -name "*.info" |
---|
379 | find ${tmpdir} -name "*.jnl" |
---|
380 | find ${tmpdir} -name "*.stdout" |
---|
381 | # find ${tmpdir} -name "*.jpg" |
---|
382 | find ${tmpdir} -name "*.tex" |
---|
383 | ls ${tmpdir}/*pdf |
---|
384 | |
---|
385 | # Now remove them |
---|
386 | # find ${tmpdir} -name "*.info" -print -exec rm -f '{}' \; |
---|
387 | # find ${tmpdir} -name "*.jnl" -print -exec rm -f '{}' \; |
---|
388 | # find ${tmpdir} -name "*.stdout" -print -exec rm -f '{}' \; |
---|
389 | ## find ${tmpdir} -name "*.jpg" -print -exec rm -f '{}' \; |
---|
390 | # find ${tmpdir} -name "*.tex" -print -exec rm -f '{}' \; |
---|
391 | # rm -f ${tmpdir}/*/*pdf |
---|
392 | else |
---|
393 | echo "No clean of small files will be done" |
---|
394 | fi |
---|
395 | |
---|
396 | # Save files |
---|
397 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_UserChoices_JobName} |
---|
398 | IGCM_sys_Put_Dir fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} ${R_SAVE} |
---|
399 | IGCM_sys_Rm -Rf fluxnet_taylor_diff_${config_UserChoices_JobName}_${reference_config}_${group} |
---|
400 | fi |
---|
401 | |
---|
402 | cd ${SUBMIT_DIR} |
---|
403 | IGCM_sys_Mv ref.card ensemble.card |
---|
404 | IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} |
---|