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
- Gather relevant observation file and DiCast forecast file
- Runs 'GHICubistNames2Config.py
- Converts a cubist 'names' file to a configuration file used by the c++ forecast module
- This doesn't have to be run every time if the model is not changing, though it runs by default.
- Example cmd line. . .
- 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
- Runs c++ forecast module (ghi_fcst)
- Inputs are
- irradiance observation file
- config created from step 2
- dicast forecast file
- model path
- model cdl
- Specifies netCDF output format
- output directory
- Example cmd line. . .
- 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
- Writes netCDF output