Identifier

run_ghi_fcst.py

Purpose

Applies static data mining models developed for each farm to forecast irradiance using recent irradiance observations along with time info and DiCast forecast variables.

Command Usage

Usage: run_ghi_fcst.py [options] fcst_zone_str model_base_name

Options:
-h, --help show this help message and exit
-d DATE, --date=DATE run ghi_fcst one time using the specified date and time of dicast file in the form yyyymmddHHMM
-e END_INTERVAL, --end_interval=END_INTERVAL run ghi_fcst for all dicast files in interval [start_interval, end_interval] where start_interval and end interval have the format yyyymmdd
-g DEBUG_LEVEL_STR, --debug=DEBUG_LEVEL_STR debug level for ghi_fcst application
-s START_INTERVAL, --start_interval=START_INTERVAL run ghi_fcst for all dicast files in interval [start_interval, end_interval] where start_interval and end_interval have the format yyyymmdd
-l LOG, --log=LOG base name of log file for this script
-v, --derived_vars run ghi_fcst with model containing derived variables

Sample Command Invocation

run_ghi_fcst.py -l /d2/dicast/nt/log/ghi_fcst.SMUD00067.STATCAST_SMUD00067 -g 3 -v SMUD00067 STATCAST_SMUD00067

Breakdown

  • run_ghi_fcst.py: python script name
  • -l /d2/dicast/nt/log/ghi_fcst.SMUD00067.STATCAST_SMUD00067: log file path
  • -g 3: Debug level string
  • -v: Use derived vars (Set this so that the code knows to use previous 45, 30 and 15 minute irradiance values)
  • SMUD00067: fcst zone string (Used by code to determine which site to get irradiance observations from, also used to get name/path of model to call)
  • STATCAST_SMUD00067 : model_base_name (Also used by code to know which model to call

Command Frequency

  • Run once per hour right after DiCast forecast file is generated

Processing Steps

  1. Gather relevant observation file and DiCast forecast file
  2. Runs 'GHICubistNames2Config.py
    1. Converts a cubist 'names' file to a configuration file used by the c++ forecast module
    2. This doesn't have to be run every time if the model is not changing, though it runs by default.
    3. Example cmd line. . . 
      1. GHICubistNames2Config.py -d /d2/dicast/nt/nowcast/StatCast_cubist/static/model/cubist_STATCAST_SMUD00067_SMUD00067.conf SMUD00067 /d2/dicast/nt/nowcast/StatCast_cubist/static/model/SMUD00067/STATCAST_SMUD00067.names /d2/dicast/nt/nowcast/StatCast_cubist/static/config/ghi_fcst.STATCAST_SMUD00067.SMUD00067.cfg
  3. Runs c++ forecast module (ghi_fcst)
    1. Inputs are
      1. irradiance observation file
      2. config created from step 2
      3. dicast forecast file
      4. model path
      5. model cdl
        1. Specifies netCDF output format
      6. output directory
    2. Example cmd line. . .
      1. ghi_fcst  -l /d2/dicast/nt/nowcast/StatCast_cubist/log/ghi_fcst.SMUD00067.STATCAST_SMUD00067  -d 3  -o /d2/ldm/data/solar_obs/smud_67_74/15min_avg/netcdf/20160303/smud_67_74.20160303.0100.nc /d2/dicast/nt/nowcast/StatCast_cubist/static/config/ghi_fcst.STATCAST_SMUD00067.SMUD00067.cfg /var/autofs/mnt/final_fcst/20160303/final_fcst.20160303.0111.nc /d2/dicast/nt/nowcast/StatCast_cubist/static/model/SMUD00067/STATCAST_SMUD00067 /d2/dicast/nt/nowcast/StatCast_cubist/static/cdl/ghi_fcst_SMUD00067.cdl /d2/dicast/nt/nowcast/StatCast_cubist/ghi_fcst/SMUD00067/STATCAST_SMUD00067/netcdf/20160303
    3. Writes netCDF output
  • No labels