CSEP1 Status

From SCECpedia
Jump to navigationJump to search

CSEP Working Group Home Page

Introduction

The CSEP1 system has been in production for over a decade with dozens of models running prospectively during this time period. Currently, we do not have an understanding of the status of the operational system with respect to missing forecasts and their evaluations. This page provides the status of the CSEP1 system and outlines our work toward understanding the status of the CSEP1 operational system.

Data Model

CSEP1 simulation meta data represented as SQL schema. Extraction scripts can be found on GitHub at https://github.com/wsavran/csep_db/.

   CREATE TABLE IF NOT EXISTS ScheduledForecasts (
       scheduled_forecast_id INTEGER PRIMARY KEY,
       date_time TEXT NOT NULL
   );
   CREATE TABLE IF NOT EXISTS ScheduledEvaluations (
       scheduled_evaluation_id INTEGER PRIMARY KEY,
       date_time TEXT NOT NULL
   );
   CREATE TABLE IF NOT EXISTS Dispatchers (
       dispatcher_id INTEGER PRIMARY KEY,
       script_name TEXT NOT NULL,
       config_file_name TEXT NOT NULL
   );
   CREATE TABLE IF NOT EXISTS ForecastGroups (
       forecastgroup_id INTEGER PRIMARY KEY,
       group_name TEXT NOT NULL,
       config_filepath TEXT NOT NULL,
       dispatcher_id INTEGER NOT NULL,
       FOREIGN KEY(dispatcher_id) REFERENCES Dispatchers
   );
   CREATE TABLE IF NOT EXISTS Forecasts (
       forecast_id INTEGER PRIMARY KEY,
       schedule_id INTEGER NOT NULL,
       group_id INTEGER NOT NULL,
       name TEXT NOT NULL,
       filepath TEXT,
       meta_filepath TEXT,
       waiting_period TEXT,
       logfile TEXT,
       status TEXT,
       FOREIGN KEY(schedule_id) REFERENCES ScheduledForecasts,
       FOREIGN KEY(group_id) REFERENCES ForecastGroups
   );
   CREATE TABLE IF NOT EXISTS Evaluations (
       evaluation_id INTEGER PRIMARY KEY,
       scheduled_id INTEGER NOT NULL,
       forecast_id INTEGER NOT NULL,
       compute_datetime TEXT,
       filepath TEXT,
       name TEXT,
       status TEXT,
       FOREIGN KEY(scheduled_id) REFERENCES ScheduledEvaluations,
       FOREIGN KEY(forecast_id) REFERENCES Forecasts
   );

Verifying Database

In this section, we manually verify the integrity of the csep_db contents to ensure that the database is accurately representing the information present on the CSEP operational system. We show the verification results for a single dispatcher script.

Dispatcher Scripts

sqlite> select * from Dispatchers;
1|/usr/local/csep/cronjobs/dispatcher_ANSS1985_one_day.tcsh|31|/usr/local/csep/cronjobs/dispatcher_ANSS1985_one_day.init.xml
2|/usr/local/csep/cronjobs/dispatcher_ANSS1985_M2_95.tcsh|31|/usr/local/csep/cronjobs/dispatcher_ANSS1985_M2_95.init.xml
3|/usr/local/csep/cronjobs/dispatcher_ANSS1932_notFiltered_Md2_one_day.tcsh|31|/usr/local/csep/cronjobs/dispatcher_ANSS1932_notFiltered_Md2_one_day.init.xml

Contents of dispatcher_id=1

cat /usr/local/csep/cronjobs/dispatcher_ANSS1985_one_day.tcsh
#!/bin/tcsh

# dispatcher_ANSS1985.tcsh:
#
# Run daily Dispatcher for one-day and RELM forecasts models generation and evaluation.
# All groups use ANSS catalog with start date of 1985-01-01 and Magnitude>=3.0.
#

source ~/.tcshrc

set year=`date '+%Y'`
# Don't pad integer values with zero's
set month=`date '+%_m'`
set day=`date '+%_d'`

# Pad time values with zero's
set hour=`date '+%H'`
set min=`date '+%M'`
set sec=`date '+%S'`


# Capture all output produced by Dispatcher into the daily log file
set logdir=$CSEP/dispatcher/logs/"$year"_"$month"
mkdir -p "$logdir"

set logfile="$logdir"/dailyANSS1985_"$year-$month-$day-$hour$min$sec"


# Invoke Dispatcher for "today" (with 31 day delay for the testing date):
nohup python3 $CENTERCODE/src/generic/Dispatcher.py --year="$year" --month="$month" --day="$day" --configFile=/usr/local/csep/cronjobs/dispatcher_ANSS1985_one_day.init.xml --waitingPeriod=31 
--enableForecastXMLTemplate --enableForecastCompression --enableForecastMap 
--publishServer=csep-usc@cseppublishing.usc.edu --publishDirectory=/export/cseppublishing/csep/us/results/data/us/usc/california --logFile="$logfile" >& "$logfile" &

Forecast Groups

Here, we verify that the correct forecast groups were parsed from the Dispatcher configuration file, and the forecast group configuration files are properly represented in the database. Forecast groups that have no scheduled evaluation tests are not included in the database.

1. Group names and filepaths

sqlite> select group_name, group_path from ForecastGroups;
one-day-models|/home/csep/operations/SCEC-natural-laboratory/one-day-models
one-day-models-V9.1|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1
one-day-models-V10.10|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10
one-day-models-V12.7|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7
one-day-models-V12.10|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.10
one-day-models-V16.4|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.4
one-day-models-V16.10|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.10
one-day-models-V16.7|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.7
one-day-models-RELMTests-V16.7|/home/csep/operations/SCEC-natural-laboratory/one-day-models-RELMTests-V16.7
one-day-models-Md2-V12.10|/home/csep/operations/SCEC-natural-laboratory/one-day-models-Md2-V12.10

Note: Forecast groups with no evaluations scheduled are not included in this report.

[csep@csep-op ~]$ cat /usr/local/csep/cronjobs/dispatcher_ANSS1985_one_day.init.xml
<?xml version="1.0" encoding="utf-8"?>
<Dispatcher xmlns="http://www.scec.org/xml-ns/csep/0.1">
   <directory>/home/csep/operations/dispatcher/runs</directory>

   <email smtphost="email.usc.edu"
          from="johnyu@usc.edu"
          subjectPrefix="California one-day models evaluation (ANSS: 1985-01-01)">
       fsilva@usc.edu maechlin@usc.edu wsavran@usc.edu
   </email>

   <!-- One day models -->
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7</forecastGroup>   
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.10</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.4</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.10</forecastGroup>
   <forecastGroup>/home/csep/operations/SCEC-natural-laboratory/one-day-models-optimized</forecastGroup>

</Dispatcher>

Note: the one-day-models-optimized group does not contain any evaluations; hence it's not listed in the database.

2. Config Files

sqlite> select rowid, config_filepath from ForecastGroups;
1|/home/csep/operations/SCEC-natural-laboratory/one-day-models/forecast.init.xml
2|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1/forecast.init.xml
3|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10/forecast.init.xml
4|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7/forecast.init.xml
5|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.10/forecast.init.xml
6|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.4/forecast.init.xml
7|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.10/forecast.init.xml
8|/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.7/forecast.init.xml
9|/home/csep/operations/SCEC-natural-laboratory/one-day-models-RELMTests-V16.7/forecast.init.xml
10|/home/csep/operations/SCEC-natural-laboratory/one-day-models-Md2-V12.10/forecast.init.xml

Showing first 3 forecast group configuration files exist on the system.

[csep@csep-op ~]$ ls /home/csep/operations/SCEC-natural-laboratory/one-day-models/forecast.init.xml
/home/csep/operations/SCEC-natural-laboratory/one-day-models/forecast.init.xml
[csep@csep-op ~]$ ls /home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1/forecast.init.xml
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1/forecast.init.xml
[csep@csep-op ~]$ ls /home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10/forecast.init.xml
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10/forecast.init.xml
[csep@csep-op ~]$ ls /home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7/forecast.init.xml
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7/forecast.init.xml

3. Expected Forecasts in each group

select ForecastGroups.group_path, group_concat(distinct Forecasts.name) from ForecastGroups join Forecasts on ForecastGroups.forecastgroup_id=Forecasts.group_id group by ForecastGroups.group_name;
/home/csep/operations/SCEC-natural-laboratory/one-day-models|ETAS
/home/csep/operations/SCEC-natural-laboratory/one-day-models-Md2-V12.10|ETAS_DROneDayMd2,ETAS_DROneDayPPEMd2,JANUSOneDay,SE2OneDay
/home/csep/operations/SCEC-natural-laboratory/one-day-models-RELMTests-V16.7|ETAS_DROneDayMd2.95
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10|STEPJAVA
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.10|ETAS_HWMd3,K3Md3
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V12.7|ETASV1.1
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.10|ETAS_DROneDayMd3,ETAS_DROneDayPPEMd3,ETAS_HW_K3_AVERAGE_Md3,GSF_ANISO,GSF_ISO
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.4|OneDayBayesianBMA,OneDayBayesianSeqBMA
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.7|ETASSYN_DROneDayMd2.95
/home/csep/operations/SCEC-natural-laboratory/one-day-models-V9.1|KJSSOneDayCalifornia

Note: In some cases forecasts are present in multiple forecasts groups, but are archived in the same location. In these cases, the models are associated with the earliest forecast group. Showing results for Groups (1, 3, 7).

cat /home/csep/operations/SCEC-natural-laboratory/one-day-models/forecast.init.xml
<ns0:ForecastGroup xmlns:ns0="http://www.scec.org/xml-ns/csep/0.1" name="One-day models">
  <ns0:forecastDir>forecasts</ns0:forecastDir>
  <ns0:resultDir>results</ns0:resultDir>
  <ns0:catalogDir>observations</ns0:catalogDir>
  <ns0:postProcessing>OneDayModel</ns0:postProcessing>
  <ns0:entryDate>2007-08-01 00:00:00</ns0:entryDate>
  <ns0:models filenameIncludesStartDate="True" files="ETAS_5_5_2018-fromXML.dat.targz">
      ETAS
[csep@csep-op ~]$ cat /home/csep/operations/SCEC-natural-laboratory/one-day-models-V10.10/forecast.init.xml
<ns0:ForecastGroup xmlns:ns0="http://www.scec.org/xml-ns/csep/0.1" name="One-day models introduced in CSEP V10.10.0 due to submission of STEP_Java model by Matt Gerstenberger ">
  <ns0:forecastDir>/home/csep/operations/SCEC-natural-laboratory/one-day-models/forecasts</ns0:forecastDir>
  <ns0:resultDir>results</ns0:resultDir>
  <ns0:catalogDir>/home/csep/operations/SCEC-natural-laboratory/one-day-models/observations</ns0:catalogDir>
  <ns0:postProcessing>OneDayModel</ns0:postProcessing>
  <ns0:entryDate>2010-10-01 00:00:00</ns0:entryDate>
  <ns0:models filenameIncludesStartDate="True" files="ETAS_5_5_2018-fromXML.dat.targz KJSSOneDayCalifornia_5_5_2018-fromXML.dat.targz STEPJAVA_5_5_2018-fromXML.dat.targz">
      ETAS KJSSOneDayCalifornia STEPJAVA
[csep@csep-op ~]$ cat /home/csep/operations/SCEC-natural-laboratory/one-day-models-V16.10/forecast.init.xml
<ns0:ForecastGroup xmlns:ns0="http://www.scec.org/xml-ns/csep/0.1" name="One-day models introduced in CSEP V16.10.0 due to submission of GSF models by Joshua Gordon">
  <ns0:forecastDir>/home/csep/operations/SCEC-natural-laboratory/one-day-models/forecasts</ns0:forecastDir>
  <ns0:resultDir>results</ns0:resultDir>
  <ns0:catalogDir>/home/csep/operations/SCEC-natural-laboratory/one-day-models/observations</ns0:catalogDir>
  <ns0:postProcessing>OneDayModel</ns0:postProcessing>
  <ns0:entryDate>2016-10-01 00:00:00</ns0:entryDate>
  <ns0:models filenameIncludesStartDate="True" files="ETASV1.1_5_5_2018-fromXML.dat.targz ETAS_5_5_2018-fromXML.dat.targz ETAS_DROneDayMd3_5_5_2018-fromXML.dat.targz ETAS_DROneDayPPEMd3_5_5_2018-fromXML.dat.targz ETAS_HWMd3_5_5_2018-fromXML.dat.targz ETAS_HW_K3_AVERAGE_Md3_5_5_2018-fromXML.dat.targz GSF_ANISO_5_5_2018-fromXML.dat.targz GSF_ISO_5_5_2018-fromXML.dat.targz K3Md3_5_5_2018-fromXML.dat.targz KJSSOneDayCalifornia_5_5_2018-fromXML.dat.targz STEPJAVA_5_5_2018-fromXML.dat.targz">
      ETAS KJSSOneDayCalifornia STEPJAVA ETASV1.1 ETAS_HW K3 ETAS_DROneDay GSF_ISO GSF_ANISO
      <ns0:inputs>||||Md=3|Md=3|Md=3||eps=.01</ns0:inputs>
     <ns0:hybridModel name="ETAS_HW_K3_AVERAGE_Md3">
        <ns0:component>
           <ns0:group weights="[0.5, 0.5]">ETAS_HW K3</ns0:group>
         </ns0:component>
      </ns0:hybridModel>

Note: see notes.txt in Repository for issue discovered here.

Forecasts

Evaluations