/*********************************************************
 * parameter definitions for GmgsiNcf2Mdv
 *
 * Sue Dettling, RAP, NCAR, Boulder, CO, USA, 80307-3000
 *
 */

//////////////////////////////////////////////////////////

commentdef {
  p_header = "Param file for GmgsiNcf2Mdv";
}

typedef enum {
  DEBUG_OFF, DEBUG_NORM, DEBUG_VERBOSE
} debug_t;

paramdef enum debug_t {
  p_default = DEBUG_OFF;
  p_descr = "Debug option";
  p_help = "If set, debug messages will be printed appropriately";
} debug;

paramdef string {
  p_default = "Test";
  p_descr = "Program instance for process registration.";
  p_help = "This program registers with procmap. This is the instance used for registration.";
} instance;

typedef enum {
  REALTIME, FILELIST, TIME_INTERVAL
} mode_t;

paramdef enum mode_t {
  p_default = REALTIME;
  p_descr = "Operating mode";
} mode;

commentdef {
  p_header = "INPUT DATA";
};

paramdef string {
  p_descr = "latitude data";
  p_default = "lat";
} lat_var;

paramdef string {
  p_descr = "longitude data";
  p_default = "lon";
} lon_var;

paramdef string {
  p_descr = "Sat data field name";
  p_default = "data";
} sat_data_field;

paramdef string {
  p_descr = "Satellite data units";
  p_default = "K";
} sat_data_units;

paramdef float {
  p_default = -9999.0;
  p_descr = "Min missing or bad data";
} sat_missing_or_bad;

paramdef string {
  p_default = "yc";
  p_descr = "y dimension name";
} y_dim;

paramdef string {
  p_default = "xc";
  p_descr = "x dimension name";
} x_dim;

paramdef string {
  p_descr = "Input directory";
  p_default = "./";
} input_dir;

paramdef int {
  p_default = 15;
  p_descr = "Maximum age of file in minutes";
  p_help =  "Used in REALTIME mode only.";
} max_valid_realtime_age_min;

paramdef boolean {
  p_default = false;
  p_descr = "Latest data info file available";
} ldata_info_avail;

paramdef int {
  p_default = 0;
  p_descr = "Set wait for file to be written to disk before being served";
  p_help =  "Used in REALTIME mode only.";
} file_quiescence_sec;

paramdef int {
  p_default = 5;
  p_descr = "Set wait for file between checks for new data";
  p_help =  "Used in REALTIME mode only.";
} check_input_sec;

paramdef string {
  p_default = "";
  p_descr = "yyyymmddhhMMss";
  p_help = "Set for TIME_INTERVAL mode only.";
} start_time;

paramdef string {
  p_default = "";
  p_descr = "yyyymmddhhMMss";
  p_help = "Set for TIME_INTERVAL mode only.";
} end_time;

typedef enum
{
  PROJ_LATLON,
  PROJ_MERCATOR
} proj_type_t;

typedef struct
{
  proj_type_t proj_type;
  double minx;
  double miny;
  int nx;
  int ny;
  double dx;
  double dy;
  double origin_lat;
  double origin_lon;
} proj_t;
paramdef struct proj_t
{
  p_descr = "Output projection";
  p_default = {PROJ_LATLON,-180,-90,720,360,.5,.5,-90,-180 }; 
  //p_default = {PROJ_MERCATOR,minx,miny,5008,3000,dx,dy,olat,olon };
} output_proj;

commentdef {
  p_header = "OUTPUT DATA";
};


paramdef string {
  p_default = "data";
  p_descr = "Name to assign to output data field";
} output_data_fieldname;

paramdef string {
  p_default = "mdvp:://localhost::$(PROJECT)/mdv/globSat";
  p_descr = "URL for the output MDV files.";
} output_url;

paramdef int {
  p_default = 10;
  p_descr = "Seconds to sleep between data checks";
} sleep_secs;