Changeset 457 for trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
- Timestamp:
- 04/13/11 10:32:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r433 r457 19 19 # Debug Print : 20 20 echo 21 IGCM_debug_Print 1 "IGCM_comp_Initialize :"22 echo 23 24 typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option i j21 IGCM_debug_Print 1 "IGCM_comp_Initialize" 22 echo 23 24 typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option option i j 25 25 for comp in ${config_ListOfComponents[*]} ; do 26 26 # Debug Print … … 34 34 card=${SUBMIT_DIR}/COMP/${compname}.card 35 35 IGCM_card_DefineVariableFromOption ${card} Compatibility libIGCM 36 36 37 eval CompatibilityTag=\${${compname}_Compatibility_libIGCM} > /dev/null 2>&1 37 38 38 if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then 39 39 IGCM_debug_Exit "${compname}.card is not compatible with libIGCM version ${libIGCM_CurrentTag} see libIGCM FAQ http://wiki.ipsl.jussieu.fr/wiki_ipsl/IGCMG/libIGCM/DocUtilisateur/FAQ ." … … 51 51 52 52 # Debug Print : 53 IGCM_debug_Print 1 "Initialize following component library :"54 IGCM_debug_Print 1${SUBMIT_DIR}/COMP/${compname}.driver53 IGCM_debug_Print 2 "Initialize following component library" 54 IGCM_debug_Print 2 ${SUBMIT_DIR}/COMP/${compname}.driver 55 55 IGCM_debug_Print 3 "With tag : ${comptagname}" 56 56 # Source component library … … 79 79 80 80 # Read UserChoices section of component card 81 IGCM_debug_Print 1"DefineArrayFromSection : ${compname}_UserChoices ${card}"81 IGCM_debug_Print 2 "DefineArrayFromSection : ${compname}_UserChoices ${card}" 82 82 IGCM_card_DefineArrayFromSection ${card} UserChoices 83 83 eval first_option=\${${compname}_UserChoices[0]} > /dev/null 2>&1 84 # If section is not empty we define corresponding variables 84 85 if [ X${first_option} != X"Error:" ] ; then 85 eval IGCM_debug_Print 2"${compname}_UserChoices_Options:" \${${compname}_UserChoices[*]}86 eval IGCM_debug_Print 3 "${compname}_UserChoices_Options:" \${${compname}_UserChoices[*]} 86 87 if [ X${card_UserChoices[0]} != X ] ; then 87 88 unset card_UserChoices 88 89 fi 89 90 eval set +A card_UserChoices -- \${${compname}_UserChoices[*]} > /dev/null 2>&1 90 typeset option91 91 for option in ${card_UserChoices[*]} ; do 92 92 IGCM_card_DefineVariableFromOption ${card} UserChoices ${option} … … 96 96 97 97 # Read and Build Output File stuff 98 IGCM_debug_Print 1"DefineArrayFromOption : ${compname}_OutputFiles ${card}"98 IGCM_debug_Print 2 "DefineArrayFromOption : ${compname}_OutputFiles ${card}" 99 99 IGCM_card_DefineArrayFromOption ${card} OutputFiles List 100 100 ListFilesName=${compname}_OutputFiles_List … … 196 196 echo 197 197 done 198 echo "-----"199 echo200 IGCM_debug_Print 1 "DefineArrayFromOption : ListOfComponents"201 IGCM_debug_PrintVariables 3 config_ListOfComponents202 198 203 199 IGCM_debug_PopStack "IGCM_comp_Initialize" … … 225 221 # Debug Print : 226 222 echo 227 IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles :"223 IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles" 228 224 echo 229 225 … … 349 345 # Debug Print : 350 346 echo 351 IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles :"347 IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles" 352 348 echo 353 349 … … 356 352 357 353 for comp in ${config_ListOfComponents[*]} ; do 358 echo "-----"359 354 # Define component 360 355 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 … … 414 409 # Debug Print : 415 410 echo 416 IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles :"411 IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles" 417 412 echo 418 413 … … 426 421 for comp in ${config_ListOfComponents[*]} ; do 427 422 428 echo "-----"429 423 # Define component 430 424 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 … … 500 494 # Debug Print : 501 495 echo 502 IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles :"496 IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles" 503 497 echo 504 498 … … 516 510 # Debug Print : 517 511 echo 518 IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles :"512 IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles" 519 513 echo 520 514 … … 563 557 # Debug Print : 564 558 echo 565 IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles :"559 IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles" 566 560 echo 567 561 … … 731 725 # Debug Print : 732 726 echo 733 IGCM_debug_Print 1 "IGCM_comp_PeriodStart :"727 IGCM_debug_Print 1 "IGCM_comp_PeriodStart" 734 728 echo 735 729 … … 762 756 # Debug Print : 763 757 echo 764 IGCM_debug_Print 1 "IGCM_comp_Update :"758 IGCM_debug_Print 1 "IGCM_comp_Update" 765 759 echo 766 760 … … 794 788 795 789 # Debug Print 796 IGCM_debug_Print 3"Update ${compname} Parameter Files."790 IGCM_debug_Print 1 "Update ${compname} Parameter Files." 797 791 # UPDATE component 798 792 ${comp}_Update … … 810 804 # Debug Print : 811 805 echo 812 IGCM_debug_Print 1 "IGCM_comp_Finalize :"806 IGCM_debug_Print 1 "IGCM_comp_Finalize" 813 807 echo 814 808 … … 1055 1049 1056 1050 unset list_file 1057 set +A list_file -- $( ls ${file_in}* | sort 2>/dev/null ) 1051 #set +A list_file -- $( ls ${file_in}* | sort 2>/dev/null ) 1052 set +A list_file -- $( for i in $(ls ${file_in}* 2>/dev/null | sed "s/${file_in}//" | sort -n) ; do ls ${file_in}$i ; done ) 1058 1053 nlist_file=${#list_file[@]} 1059 1054 if [ ${nlist_file} -gt 1 ] ; then … … 1082 1077 eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_out}" > /dev/null 2>&1 1083 1078 1084 if ( $ ExecutionFail && [ X$( echo ${file_out} | grep "_out" ) != X ]) ; then1085 IGCM_sys_Cp ${file_out} ${SUBMIT_DIR} 1079 if ( ${ExecutionFail} ) ; then 1080 IGCM_sys_Cp ${file_out} ${SUBMIT_DIR}/Debug 1086 1081 fi 1087 1082 else … … 1091 1086 eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file}" > /dev/null 2>&1 1092 1087 done 1093 if ( $ ExecutionFail && [ X$( echo ${file} | grep "_out" ) != X ]) ; then1094 IGCM_sys_Cp ${file} ${SUBMIT_DIR}/ ${PREFIX}_${file}1088 if ( ${ExecutionFail} ) ; then 1089 IGCM_sys_Cp ${file} ${SUBMIT_DIR}/Debug/${PREFIX}_${file} 1095 1090 fi 1096 1091 fi … … 1102 1097 [ $? -eq 0 ] && eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_in}" > /dev/null 2>&1 1103 1098 1104 if ( $ ExecutionFail && [ X$( echo ${file_in} | grep "_out" ) != X ]) ; then1105 IGCM_sys_Cp ${file_in} ${SUBMIT_DIR}/ ${PREFIX}_${file_in}1099 if ( ${ExecutionFail} ) ; then 1100 IGCM_sys_Cp ${file_in} ${SUBMIT_DIR}/Debug/${PREFIX}_${file_in} 1106 1101 fi 1107 1102 fi
Note: See TracChangeset
for help on using the changeset viewer.