Changeset 1202
- Timestamp:
- 06/02/15 16:58:03 (9 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_metrics_LMDZ
r1201 r1202 133 133 IGCM_sys_MkdirWork ${RUN_DIR} 134 134 IGCM_sys_Cd ${RUN_DIR} 135 IGCM_sys_MkdirWork METRICS 135 IGCM_sys_MkdirWork METRICS/SE_${YEARS} 136 136 137 137 #================================== … … 146 146 147 147 #================================== 148 # Appropriate configuration 149 #================================== 150 IGCM_sys_Cp ${PCMDI_MP}/work_install_v2.11/PCMDI_METRICS/doc/parameter_files/input_parameters_LMDZ_PCMDI_template.py template.py 151 152 #================================== 153 # Configure template 154 #================================== 155 IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\' 156 IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\' 157 IGCM_comp_modifyFile template.py attributes_provided \'IPSL_Extended\' 158 IGCM_comp_modifyFile template.py Login \'${LOGIN}\' 159 IGCM_comp_modifyFile template.py model_versions \'\[${config_UserChoices_TagName}\]\' 160 IGCM_comp_modifyFile template.py experiment \'${config_UserChoices_ExperimentName}\' 161 IGCM_comp_modifyFile template.py realization \'${config_UserChoices_JobName}\' 162 IGCM_comp_modifyFile template.py project_id \'IPSL\-${config_UserChoices_SpaceName}\' 163 IGCM_comp_modifyFile template.py ModelFreeSpace \'${config_UserChoices_LongName}\' 164 IGCM_comp_modifyFile template.py case_id \'SE_${YEARS}\' 165 IGCM_comp_modifyFile template.py obs_data_path \'${PCMDI_MP}/references-for-metrics/obs\' 166 IGCM_comp_modifyFile template.py metrics_output_path \'${RUN_DIR}/METRICS\' 167 IGCM_comp_modifyFile template.py model_clims_interpolated_output \'${RUN_DIR}\' 168 169 #================================== 170 # Compute metrics 171 #================================== 172 python ${PCMDI_MP}/work_install_v2.11/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py 173 174 #================================== 175 # Export metrics to prodiguer system 176 #================================== 177 IGCM_debug_sendAMQP_Metrics METRICS/SE_${YEARS} 148 # Group of metrics we will compute 149 #================================== 150 #GroupsOfMetrics='LMDZ_PCMDI LMDZ_JetLat' 151 GroupsOfMetrics='LMDZ_PCMDI' 152 153 for metricsGroupName in ${GroupsOfMetrics} ; do 154 155 #================================== 156 # Appropriate configuration 157 #================================== 158 IGCM_sys_Cp ${PCMDI_MP}/work_install_v2.11/PCMDI_METRICS/doc/parameter_files/input_parameters_${metricsGroupName}_template.py template.py 159 160 #================================== 161 # Configure template 162 #================================== 163 IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\' 164 IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\' 165 IGCM_comp_modifyFile template.py attributes_provided \'IPSL_Extended\' 166 IGCM_comp_modifyFile template.py Login \'${LOGIN}\' 167 IGCM_comp_modifyFile template.py model_versions \[\'${config_UserChoices_TagName}\'\] 168 IGCM_comp_modifyFile template.py experiment \'${config_UserChoices_ExperimentName}\' 169 IGCM_comp_modifyFile template.py realization \'${config_UserChoices_JobName}\' 170 IGCM_comp_modifyFile template.py project_id \'IPSL\-${config_UserChoices_SpaceName}\' 171 IGCM_comp_modifyFile template.py ModelFreeSpace \'${config_UserChoices_LongName}\' 172 IGCM_comp_modifyFile template.py case_id \'${metricsGroupName}\' 173 IGCM_comp_modifyFile template.py obs_data_path \'${PCMDI_MP}/references-for-metrics/obs\' 174 IGCM_comp_modifyFile template.py metrics_output_path \'${RUN_DIR}/SE_${YEARS}\' 175 IGCM_comp_modifyFile template.py model_clims_interpolated_output \'${RUN_DIR}\' 176 177 #================================== 178 # Compute metrics 179 #================================== 180 python ${PCMDI_MP}/work_install_v2.11/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py 181 182 #================================== 183 # Export metrics to mongoDB system 184 #================================== 185 IGCM_debug_sendAMQP_Metrics METRICS/SE_${YEARS}/${metricsGroupName} ${metricsGroupName} 186 187 done 178 188 179 189 #================================== -
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1201 r1202 184 184 #D-function IGCM_debug_sendAMQP_Metrics 185 185 #D- * Purpose: Take over AMQP C client using mail as a message recipient 186 #D- * One argument : Directory where metrics.json files can be found 186 #D- * Two arguments : - Directory where metrics.json files can be found 187 #D- * - Metrics Group Name. metrics will be added to this group 187 188 #D- * Attach encoded metrics.json files. 188 189 … … 195 196 code=7100 196 197 # Usual AMQP message to route messages on server side 197 encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"m sgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" | base64 -w 0 )198 encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"metricsGroupName\":\"${2}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" | base64 -w 0 ) 198 199 # send mail 199 200 attachmentsOptions="" … … 596 597 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"activity\":\"IPSL\",\"name\":\"${config_UserChoices_JobName}\",\"cumulPeriod\":\"${CumulPeriod}\",\"experiment\":\"${config_UserChoices_ExperimentName}\",\"space\":\"${config_UserChoices_SpaceName}\",\"model\":\"${config_UserChoices_TagName}\",\"startDate\":\"${config_UserChoices_DateBegin}\",\"endDate\":\"${config_UserChoices_DateEnd}\",\"login\":\"${LOGIN}\",\"centre\":\"${CENTER}\",\"machine\":\"${MASTER}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 597 598 # RabbitMQ message body with specific fields associated message codes treated here 598 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\" msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )599 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 599 600 # Fill the rabbitMQ queue (the config.card in use will be sent) 600 601 IGCM_debug_sendAMQP activate … … 627 628 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 628 629 # RabbitMQ message body with specific fields associated message codes treated here 629 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\" msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )630 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 630 631 # Fill the rabbitMQ queue 631 632 IGCM_debug_sendAMQP
Note: See TracChangeset
for help on using the changeset viewer.