This page was created by the IDL library routine `mk_html_help2`.

Last modified: Wed Sep 10 18:16:51 2025.

# Directory Listing of Routines

# projects/poes

- POES_CDF2TPLOT
- POES_CONFIG_FILEDIR
- POES_CONTAMINATION_REMOVAL
- POES_INIT
- POES_LOAD_DATA
- POES_OVERVIEW_PLOT
- POES_OVERVIEW_PLOT_WRAPPER
  Generates daily overview plots for POES data - wrapper for poes_overview_plot
- POES_READ_CONFIG
  Reads the POES configuration file
- POES_WRITE_CONFIG
  Writes the poes_config file

# Routine Descriptions

## POES_CDF2TPLOT

[Next Routine] [List of Routines]

      poes_CDF2TPLOT ,files,varformat=varformat

      Note: This file is a fork of the more general cdf2tplot, and is specific to POES CDF files.
            The fork was made so that we can rename the 'time' variable before passing
            the CDF structure to cdf_info_to_tplot

    Keywords:

     VARFORMAT = PATTERN  ; PATTERN should be a string (wildcards accepted) that will match the CDF variable that should be made into tplot variables
     PREFIX = STRING      ; String that will be pre-pended to all tplot variable names.
     SUFFIX = STRING      ; String appended to end of each tplot variable created.
     VARNAMES = named variable ; CDF variable names are returned in this variable
     /GET_SUPPORT_DATA    ; Often required to get support data if the CDF file does not have all the needed depend attributes

     record=record if only one record and not full cdf-file is requested

    load_labels=load_labels ;copy labels from labl_ptr_1 in attributes into dlimits
             resolve labels implemented as keyword to preserve backwards compatibility

    Author: Davin Larson -  20th century
      forked for POES data, Eric Grimes, 9/23/2014

     $LastChangedBy: egrimes $
     $LastChangedDate: 2014-09-23 14:56:22 -0700 (Tue, 23 Sep 2014) $
     $LastChangedRevision: 15845 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_cdf2tplot.pro $

(See projects/poes/poes_cdf2tplot.pro)

## POES_CONFIG_FILEDIR

[Previous Routine] [Next Routine] [List of Routines]

    Function:
        poes_config_filedir.pro

    Purpose:
        Get the directory of the POES configuration file

    $LastChangedBy: egrimes $
    $LastChangedDate: 2014-09-18 13:30:13 -0700 (Thu, 18 Sep 2014) $
    $LastChangedRevision: 15821 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_config_filedir.pro $

(See projects/poes/poes_config_filedir.pro)

## POES_CONTAMINATION_REMOVAL

[Previous Routine] [Next Routine] [List of Routines]

    ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    ; %
    ; % USE: Reads NOAA-POES CDF files from:
    ; %      http://www.ngdc.noaa.gov/stp/satellite/poes/index.html
    ; %
    ; %
    ; -----written by Wen Li based on Drew Turner's matlab code-----
    ; %
    ; % DATE: January 2011
    ; %
    ; % INPUTS: filename  :   CDF file of data available on website above
    ; %
    ; %
    ; % OUTPUT: D         :   Data structure containing file info and Matlab time
    ; %                       array
    ; %
    ; % NOTES: The majority of this script is devoted to correcting for the
    ; %        proton contamination in the electron fluxes.  The method uses that
    ; %        of Lam et al. [2010] and Horne et al. [2009] and is the accepted
    ; %        method used by NOAA and ViRBO.  I have converted it directly from
    ; %        the original Fortran correction codes available at ViRBO.
    ; %
    ; %        Output is converted to appropriate flux units for either integral
    ; %        flux [#/s/sr/cm^2] or differential flux [#/s/sr/cm^2/keV] depending
    ; %        on type of each instrument channel
    ; %        Original data (i.e. raw data from files) units of Counts [#/sec]
    ; %
    ; %
    ; %
    ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    ; % THIS SNIPPET SHOWS HOW TO DECONTAMINATE POES DATA USING THE LAM ET AL. METHOD:
    ; % Correct for contaminated electron channels based on Lam et al. method,
    ; % which is available on ViRBO in Fortran files:
    ; % http://virbo.org/svn/virbo/poes/noaa15+/unpack_sem2.f

    $LastChangedBy: egrimes $
    $LastChangedDate: 2015-04-15 15:06:00 -0700 (Wed, 15 Apr 2015) $
    $LastChangedRevision: 17331 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_contamination_removal.pro $

(See projects/poes/poes_contamination_removal.pro)

## POES_INIT

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:  poes_init
    PURPOSE:    Initializes system variables for POES.

    HISTORY

    $LastChangedBy: egrimes $
    $LastChangedDate: 2017-02-13 08:50:37 -0800 (Mon, 13 Feb 2017) $
    $LastChangedRevision: 22761 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_init.pro $

(See projects/poes/poes_init.pro)

## POES_LOAD_DATA

[Previous Routine] [Next Routine] [List of Routines]

     Procedure: poes_load_data

     Keywords:
                 trange:       time range of interest
                 datatype:     type of POES data to be loaded. Valid data types are:
                        ---- Total Energy Detector (TED) ----
                          ted_ele_flux: TED differential electron flux, both telescopes, energies: 189 eV, 844 eV, 2595 eV, 7980 eV
                          ted_pro_flux: TED differential proton flux, both telescopes, energies: 189 eV, 844 eV, 2595 eV, 7980 eV
                          ted_ele_eflux: TED electron integral energy flux, both telescopes, low (50-1000 eV) and high energy (1-20 keV)
                          ted_pro_eflux: TED proton integral energy flux, both telescopes, low (50-1000 eV) and high energy (1-20 keV)
                          ted_ele_eflux_atmo: TED electron atmospheric integral energy flux, low and high energies (50-1000 eV, 1-20 keV), at 120 km
                          ted_pro_eflux_atmo: TED proton atmospheric integral energy flux, low and high energies (50-1000 eV, 1-20 keV), at 120 km
                          ted_total_eflux_atmo: TED electron and proton total atmospheric integral energy flux at 120 km
                          ted_ele_energy: TED electron characteristic energy channel, both telescopes
                          ted_pro_energy: TED proton characteristic energy channel, both telescopes
                          ted_ele_max_flux: TED electron maximum differential flux, both telescopes
                          ted_pro_max_flux: TED proton maximum differential flux, both telescopes
                          ted_ele_eflux_bg: TED electron background integral energy flux, both telescopes, low (50-1000 eV) and high energy (1-20 keV)
                          ted_pro_eflux_bg: TED proton background integral energy flux, both telescopes, low (50-1000 eV) and high energy (1-20 keV)
                          ted_pitch_angles: TED pitch angles (at satellite and foot of field line)
                          ted_ifc_flag: TED IFC flag (0=off, 1=on)

                        ---- Medium Energy Proton and Electron Detector ----
                          mep_ele_flux: MEPED electron integral flux, in energy for each telescope
                          mep_pro_flux: MEPED proton differential flux, in energy for each telescope
                          mep_pro_flux_p6: MEPED proton integral flux,  >6174 keV, for each telescope
                          mep_omni_flux: MEPED omni-directional proton differential flux
                          mep_pitch_angles: MEPED pitch angles (satellite and foot print)
                          mep_ifc_flag: IFC flag for MEPED, (0=off, 1=on)

                 suffix:        String to append to the end of the loaded tplot variables
                 probes:        Name of the POES spacecraft, i.e., probes=['noaa18','noaa19','metop2']
                 varnames:      Name(s) of variables to load, defaults to all (*)
                 ncei_server:   When set, use NOAA NCEI server instead of SPDF. Some older data is only available on the NOAA server.
                 /downloadonly: Download the file but don't read it

     $LastChangedBy: nikos $
     $LastChangedDate: 2024-09-05 08:04:54 -0700 (Thu, 05 Sep 2024) $
     $LastChangedRevision: 32807 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_load_data.pro $

(See projects/poes/poes_load_data.pro)

## POES_OVERVIEW_PLOT

[Previous Routine] [Next Routine] [List of Routines]

     Procedure:
             poes_overview_plot

     Purpose:
             Generates overview plots for POES data

     Keywords:
             probe: POES probe to create an overview plot for (noaa18, noaa19, etc.)

             date: Start date for the overview plot
             duration: Duration of the overview plot
             error: error state, 0 for no error, 1 for an error
             makepng: generate png files
             gui_overplot: flag, 0 if the overview plot isn't being made in the GUI, 1 if it is
             oplot_calls: pointer to an int for tracking calls to overview plots - for
                 avoiding overwriting tplot data already loaded during this session

     Notes:

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-03-18 12:52:44 -0700 (Fri, 18 Mar 2022) $
     $LastChangedRevision: 30691 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_overview_plot.pro $

(See projects/poes/poes_overview_plot.pro)

## POES_OVERVIEW_PLOT_WRAPPER

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
             poes_overview_plot_wrapper

    PURPOSE:
             Generates daily overview plots for POES data - wrapper for poes_overview_plot

    KEYWORDS:
             probes: array of poes probe numbers, if probe='' then probe=['15','16','17','18','19']
             date_start: begin processing at this date (eg. '2013-12-19')
             date_end: end processing at this date (eg. '2013-12-29')
             base_dir: root dir for output plots (eg. /disks/themisdata/overplots/)
             makepng: generate png files
             server_run: for a cron job this has to be set to '1' to avoid downloading files
             themis_dir: server directory for themis (eg. '/disks/themisdata/')
             poes_dir: server directory for poes (eg. '/disks/data/goes/poes/qa/')
             date_mod: date modification keyword
                     date_mod='daysNNN' produces plots from today to NNN days back (days001 is today only)
                     date_mod='startdateNNN' produces plots from datestart to NNN days after that
                     date_mod='enddateNNN' produces plots from dateend to NNN days before that
                     date_mod='continue' continue from last date of
                               processing (text file: base_dir + 'poeslastdate.txt')
                     reprocess=if set, ignore last date file, so as to
                               avoid issues with the regular cronjob
    OUTPUT:
             png files in base_dir

    EXAMPLE USAGE:
              poes_overview_plot_wrapper, date_end = '2012-03-01', date_mod='enddate002', base_dir='c:\temp\'
              poes_overview_plot_wrapper, date_start = '2012-03-21', date_end = '2012-03-31', probes='18', base_dir='c:\temp\'
              poes_overview_plot_wrapper, date_start = '2012-01-01', date_end = '2013-12-31', base_dir='/disks/themisdata/overplots/', $
                                 server_run = '1', themis_dir ='/disks/themisdata/', poes_dir = '/disks/data/poes/qa/'
              poes_overview_plot_wrapper, date_mod = 'days004', base_dir='/disks/themisdata/overplots/', $
                                 server_run = '1', themis_dir ='/disks/themisdata/', poes_dir = '/disks/data/poes/qa/'

    NOTES:
      Years of operation:
      1998 noaa15
      1999 15
      2000 15
      2001 15,16
      2002 15,16,17
      2003 15,16,17
      2004 15,16,17
      2005 15,16,17,18
      2006 15,16,17,18
      2007 15,16,17,18
      2008 15,16,17,18
      2009 15,16,17,18,19
      2010 15,16,17,18,19
      2011 15,16,17,18,19
      2012 15,16,17,18,19
      2013 15,16,17,18,19
      2014 15,16,18,19
      2015 15,16,18,19
      2021 15,18,19

    HISTORY:
    $LastChangedBy: nikos $
    $LastChangedDate: 2022-03-18 12:52:44 -0700 (Fri, 18 Mar 2022) $
    $LastChangedRevision: 30691 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_overview_plot_wrapper.pro $

(See projects/poes/poes_overview_plot_wrapper.pro)

## POES_READ_CONFIG

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
         poes_read_config
    PURPOSE:
         Reads the POES configuration file
    CALLING SEQUENCE:
         poes_struct = poes_read_config()
    INPUT:
     none, the filename is hardcoded, 'poes_config.txt',and is put in a
     folder given by the routine istp_config_filedir, that uses the IDL
     routine app_user_dir to create/obtain it: my linux example:
     /disks/ice/home/jimm/.idl/themis/poes_config-4-linux
    OUTPUT:
     otp = a structure with the changeable fields of the !poes
               structure
     Copied from thm_read_config and tt2000_read_config lphilpott 20-jun-2012
    $LastChangedBy: nikos $
    $LastChangedDate: 2015-11-18 14:02:09 -0800 (Wed, 18 Nov 2015) $
    $LastChangedRevision: 19410 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_read_config.pro $

(See projects/poes/poes_read_config.pro)

## POES_WRITE_CONFIG

[Previous Routine] [List of Routines]

    NAME:
     poes_write_config
    PURPOSE:
     Writes the poes_config file
    CALLING SEQUENCE:
     poes_write_config, copy=copy
    INPUT:
     none, the filename is hardcoded, 'poes_config.txt',and is  put in a
     folder given by the routine poes_config_filedir, that uses the IDL
     routine app_user_dir to create/obtain it: my linux example:
     /disks/ice/home/jimm/.idl/themis/poes_config-4-linux
    OUTPUT:
     the file is written, and a copy of any old file is generated
    KEYWORD:
     copy = if set, the file is read in and a copy with the !stime
            appended is written out

    $LastChangedBy: egrimes $
    $LastChangedDate: 2014-09-18 13:30:13 -0700 (Thu, 18 Sep 2014) $
    $LastChangedRevision: 15821 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/poes/poes_write_config.pro $

(See projects/poes/poes_write_config.pro)