Changeset 8
- Timestamp:
- 05/29/08 21:32:29 (17 years ago)
- Location:
- branches/SmoothFiles
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SmoothFiles/AA_job
r5 r8 242 242 #D- 243 243 # ------------------------------------------------------------------ 244 #D- Get Smooth Files (special files in time LAND COVER CHANGE ...) 245 #D- READ AND USE BY GCM AT SOME EXECUTIONS. 246 # ------------------------------------------------------------------ 247 IGCM_comp_GetInputSmoothFiles 248 249 #D- 250 # ------------------------------------------------------------------ 244 251 #D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...) 245 252 #D- READ AND USE BY GCM AT EACH EXECUTION. -
branches/SmoothFiles/libIGCM_card/IGCM_card_PrintOption.awk
r5 r8 43 43 exit_value=0 44 44 if (nbarg != 4) { 45 print "Usage: $45 print "Usage: IGCM_card_PrintOption [-d] file section option" 46 46 print 47 47 print "Args:" -
branches/SmoothFiles/libIGCM_card/IGCM_card_PrintSection.awk
r5 r8 41 41 exit_value=0 42 42 if (nbarg != 3) { 43 print "Usage: $43 print "Usage: IGCM_card_PrintSection [-d] file section" 44 44 print 45 45 print "Args:" -
branches/SmoothFiles/libIGCM_comp/libIGCM_comp.ksh
r5 r8 94 94 for option in ${card_UserChoices[*]} ; do 95 95 IGCM_card_DefineVariableFromOption ${card} UserChoices ${option} 96 eval IGCM_debug_Print 3 "${compname}_UserChoices_values: ${ card_UserChoices[*]}"96 eval IGCM_debug_Print 3 "${compname}_UserChoices_values: ${option} \${card_UserChoices_${option}}" 97 97 done 98 98 fi … … 198 198 199 199 #======================================================================= 200 # Definition of Smooth modulo function 201 # usage : 202 # IGCM_SmoothModulo StringModulo value 203 # 204 # StringModulo : A string of min max and modulo like definition of Scilab vectors. 205 # [min]:[modulo:][max] 206 # where : 207 # [] value are optionnals; 208 # empty min equal 1 209 # empty max equal infinity 210 # modulo not given or empty equal 1 211 # empty string or just ':' equal always. 212 # 213 # value : the value to test with the definition 214 # 215 # return : true(1)/false(0) 216 function IGCM_SmoothModulo 217 { 218 IGCM_debug_PushStack "IGCM_SmoothModulo" 219 typeset defVector ModValue 220 221 eval set +A defVector -- $( echo "${1}" | \ 222 awk -F ':' '{print ($1 == "" ? 1 : $1) " " (NF==3 ? ($2 == "" ? 1 : $2) : 1) " " (NF==3 ? ($3 == "" ? -1 : $3) : ($2 == "" ? -1 : $2))}' ) 223 224 # Test limits : 225 # ${defVector[0]} <= ${2} <= ${defVector[2]} 226 # or ${defVector[2]} == -1 227 if ( [ ${2} -ge ${defVector[0]} ] && \ 228 ( [ ${2} -le ${defVector[2]} ] || \ 229 [ ${defVector[2]} -lt 0 ] ) ) ; then 230 231 # Test modulo 232 ModValue=$( expr \( ${2} - ${defVector[0]} \) % ${defVector[1]} ) 233 if [ ${ModValue} -eq 0 ] ; then 234 echo true 235 IGCM_debug_PopStack "IGCM_SmoothModulo" 236 return 1 237 else 238 echo false 239 IGCM_debug_PopStack "IGCM_SmoothModulo" 240 return 0 241 fi 242 else 243 echo false 244 IGCM_debug_PopStack "IGCM_SmoothModulo" 245 return 0 246 fi 247 } 248 249 #======================================================================= 250 function IGCM_comp_GetInputSmoothFiles 251 { 252 IGCM_debug_PushStack "IGCM_comp_GetInputSmoothFiles" 253 254 # Debug Print : 255 echo 256 IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles :" 257 echo 258 259 typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ i__ 260 typeset file_in_ file_in file_out_ file_out ret SmoothDef 261 262 for comp in ${config_ListOfComponents[*]} ; do 263 264 echo "-----" 265 # Define component 266 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 267 eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 268 269 # Debug Print : 270 IGCM_debug_Print 3 "Smooth files ${compname}" 271 272 card=${SUBMIT_DIR}/COMP/${compname}.card 273 274 IGCM_card_DefineArrayFromOption ${card} SmoothFiles List 275 ListFilesName=${compname}_SmoothFiles_List 276 eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 277 278 if [ X${FileName0} != X${NULL_STR} ] ; then 279 eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 280 281 (( i=0 )) 282 until [ $i -ge $NbFiles ]; do 283 284 eval file_in_=\${${ListFilesName}[$i]} > /dev/null 2>&1 285 eval file_in=${file_in_} 286 (( i_ = i+1 )) 287 eval file_out_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 288 eval file_out=${file_out_} 289 290 # define CumulPeriod definition for this file 291 (( i__ = i+2 )) 292 eval SmoothDef=\${${ListFilesName}[$i__]} 293 IGCM_debug_Print 3 " ${file_in} ${SmoothDef}" 294 eval ret=$( IGCM_SmoothModulo ${SmoothDef} ${CumulPeriod} ) 295 if [ X${ret} = Xtrue ] ; then 296 IGCM_sys_Get ${file_in} ${file_out} 297 298 IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out} 299 fi 300 (( i=i+3 )) 301 done 302 fi 303 done 304 305 IGCM_debug_PopStack "IGCM_comp_GetInputSmoothFiles" 306 } 307 308 #======================================================================= 200 309 function IGCM_comp_GetInputBoundaryFiles 201 310 { -
branches/SmoothFiles/libIGCM_config/libIGCM_config.ksh
r5 r8 204 204 (( PeriodLengthInDays = 1 )) ;; 205 205 *) 206 IGCM_debug_Exit "IGCM_config_PeriodStart " ${config_UserChoices_PeriodLength} " invalid period length : $206 IGCM_debug_Exit "IGCM_config_PeriodStart " ${config_UserChoices_PeriodLength} " invalid period length : choose in 1Y, 1M, 5D, 1D." 207 207 IGCM_debug_Verif_Exit ;; 208 208 esac -
branches/SmoothFiles/libIGCM_date/libIGCM_date.ksh
r5 r8 218 218 #D-#================================================================== 219 219 #D-function IGCM_date_DaysInMonth 220 #D-* Purpose: $220 #D-* Purpose: Calculate the number of days in a month 221 221 #D-* Usage: IGCM_date_DaysInMonth yyyy mm 222 222 #D- or IGCM_date_DaysInMonth yyyymmdd … … 493 493 #D-#================================================================== 494 494 #D-function IGCM_date_DaysBetweenJulianDate 495 #D-* Purpose: $495 #D-* Purpose: Calculate the days difference between two dates and reports 496 496 #D- the number days as jul1 - jul2 497 497 #D-* Usage: IGCM_date_DaysBetweenJulianDate jul1 jul2 … … 578 578 #D-#================================================================== 579 579 #D-function IGCM_date_DaysBetweenGregorianDate () 580 #D-* Purpose: $580 #D-* Purpose: Calculate the days difference between two dates and reports 581 581 #D- the number days as grg1 - grg2 582 582 #D-* Usage: IGCM_date_DaysBetweenGregorianDate grg1 grg2 -
branches/SmoothFiles/libIGCM_sys/IGCM_add_out.awk
r5 r8 43 43 exit_value=0 44 44 if (nbarg != 2) { 45 print "Usage: $45 print "Usage: IGCM_add_out.awk [-d] file.output" 46 46 print 47 47 print "Args:" -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_calculo.ksh
r5 r8 968 968 #D-#================================================== 969 969 #D-function IGCM_sys_GetDate_FichArchive 970 #D-* Purpose: $970 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 971 971 #D-* Examples: 972 972 #D- -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_claude.ksh
r5 r8 983 983 #D-#================================================== 984 984 #D-function IGCM_sys_GetDate_FichArchive 985 #D-* Purpose: $985 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 986 986 #D-* Examples: 987 987 #D- -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_default.ksh
r5 r8 968 968 #D-#================================================== 969 969 #D-function IGCM_sys_GetDate_FichArchive 970 #D-* Purpose: $970 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 971 971 #D-* Examples: 972 972 #D- -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_mercure.ksh
r5 r8 847 847 #D-#================================================== 848 848 #D-function IGCM_sys_GetDate_FichArchive 849 #D-* Purpose: $849 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 850 850 #D-* Examples: 851 851 #D- -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_mercureTX.ksh
r5 r8 974 974 #D-#================================================== 975 975 #D-function IGCM_sys_GetDate_FichArchive 976 #D-* Purpose: $976 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 977 977 #D-* Examples: 978 978 #D- -
branches/SmoothFiles/libIGCM_sys/libIGCM_sys_rhodes.ksh
r5 r8 943 943 #D-#================================================== 944 944 #D-function IGCM_sys_GetDate_FichArchive 945 #D-* Purpose: $945 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 946 946 #D-* Examples: 947 947 #D-
Note: See TracChangeset
for help on using the changeset viewer.