From 04947b5a9bdafeff8df9cf8e2ec2b8ab0e5656f9 Mon Sep 17 00:00:00 2001 From: George McCabe Date: Tue, 6 Jul 2021 16:57:19 -0600 Subject: [PATCH 01/25] started to implement new wrapper --- metplus/util/doc_util.py | 1 + metplus/wrappers/gfdl_tracker_wrapper.py | 97 +++++++++++++++++++ .../GFDLTracker/GFDLTracker_TC.conf | 20 ++++ 3 files changed, 118 insertions(+) create mode 100755 metplus/wrappers/gfdl_tracker_wrapper.py create mode 100644 parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf diff --git a/metplus/util/doc_util.py b/metplus/util/doc_util.py index 4c15036c83..c8351df376 100755 --- a/metplus/util/doc_util.py +++ b/metplus/util/doc_util.py @@ -12,6 +12,7 @@ 'extracttiles': 'ExtractTiles', 'gempaktocf': 'GempakToCF', 'genvxmask': 'GenVxMask', + 'gfdltracker': 'GFDLTracker', 'griddiag': 'GridDiag', 'gridstat': 'GridStat', 'makeplots': 'MakePlots', diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py new file mode 100755 index 0000000000..ee6cbd165b --- /dev/null +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -0,0 +1,97 @@ +""" +Program Name: gfdl_tracker_wrapper.py +Contact(s): George McCabe +Abstract: Builds commands to run GFDL Tracker +History Log: Initial version +Usage: Not meant to be run +Parameters: None +Input Files: None +Output Files: None +Condition codes: 0 for success, 1 for failure +""" + +import os + +from ..util import do_string_sub, ti_calculate, get_lead_sequence +from . import CommandBuilder + +class GFDLTrackerWrapper(CommandBuilder): + """!Wrapper can be used as a base to develop a new wrapper""" + def __init__(self, config, instance=None, config_overrides={}): + self.app_name = 'gfdl_tracker' + super().__init__(config, + instance=instance, + config_overrides=config_overrides) + + def create_c_dict(self): + c_dict = super().create_c_dict() + + # get values from config object and set them to be accessed by wrapper + gfdl_tracker_base = self.config.getdir('GFDL_TRACKER_BASE', '') + if not gfdl_tracker_base: + self.log_error('GFDL_TRACKER_BASE must be set.') + return c_dict + + c_dict['INPUT_GRIB_VERSION'] = self.config.getint('config', + 'GFDL_TRACKER_GRIB_VERSION', + '') + + if c_dict['INPUT_GRIB_VERSION'] == 1: + index_script_name = 'grbindex.exe' + elif c_dict['INPUT_GRIB_VERSION'] == 2: + index_script_name = 'grb2index.exe' + else: + self.log_error("GFDL_TRACKER_GRIB_VERSION " + f"({c_dict['INPUT_GRIB_VERSION']}) " + "must be 1 or 2") + return c_dict + + c_dict['INDEX_SCRIPT'] = os.path.join(gfdl_tracker_base, + 'trk_exec', + index_script_name) + + if not os.path.exists(c_dict['INDEX_SCRIPT']): + self.log_error("GRIB index script does not exist: " + f"{c_dict['INDEX_SCRIPT']}") + + c_dict['INPUT_TEMPLATE'] = self.config.getraw('config', + 'GFDL_TRACKER_INPUT_TEMPLATE', '') + c_dict['INPUT_DIR'] = self.config.getdir('GFDL_TRACKER_INPUT_DIR', '') + + if not c_dict['INPUT_TEMPLATE']: + self.log_error('GFDL_TRACKER_INPUT_TEMPLATE must be set. ') + + return c_dict + + def run_at_time(self, input_dict): + """! Do some processing for the current run time (init or valid) + Args: + @param input_dict dictionary containing time information of current run + generally contains 'now' (current) time and 'init' or 'valid' time + """ + # create index files for each input file + + # replace values in input.nml + + # run tracker passing in input.nml configuration file + + # get forecast leads to loop over + lead_seq = get_lead_sequence(self.config, input_dict) + for lead in lead_seq: + + # set forecast lead time in hours + input_dict['lead'] = lead + + # recalculate time info items + time_info = ti_calculate(input_dict) + + for custom_string in self.c_dict['CUSTOM_LOOP_LIST']: + if custom_string: + self.logger.info(f"Processing custom string: {custom_string}") + + time_info['custom'] = custom_string + input_files = self.find_data(time_info=time_info, + return_list=True) + self.logger.debug(f'Found files: {input_files}') + + return True diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf new file mode 100644 index 0000000000..95e1048560 --- /dev/null +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -0,0 +1,20 @@ +[config] + +PROCESS_LIST = GFDLTracker + +LOOP_BY = INIT + +INIT_TIME_FMT = %Y%m%d%H + +INIT_BEG = 2016090600 +INIT_END = 2016090600 + +LEAD_SEQ = begin_end_incr(0, 2, 1)H +#LEAD_SEQ = * + +GFDL_TRACKER_BASE = /glade/work/biswas/standalone_gfdl-vortextracker_v3.9a + +GFDL_TRACKER_INPUT_DIR = /glade/work/biswas/data_tracker/hwrf_v3.9a +GFDL_TRACKER_INPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H}.f{lead?fmt=%5M} + +GFDL_TRACKER_GRIB_VERSION = 1 \ No newline at end of file From 0964a52cec3cbd9a61230deee4b1cb4f1c925119 Mon Sep 17 00:00:00 2001 From: George McCabe Date: Wed, 7 Jul 2021 17:56:52 -0600 Subject: [PATCH 02/25] simplified command runner logic --- metplus/wrappers/command_builder.py | 15 +-- metplus/wrappers/command_runner.py | 166 +++++++----------------- metplus/wrappers/met_db_load_wrapper.py | 3 - metplus/wrappers/user_script_wrapper.py | 7 - 4 files changed, 54 insertions(+), 137 deletions(-) diff --git a/metplus/wrappers/command_builder.py b/metplus/wrappers/command_builder.py index c6c802ca9b..7f5962e841 100755 --- a/metplus/wrappers/command_builder.py +++ b/metplus/wrappers/command_builder.py @@ -1296,7 +1296,7 @@ def build(self): return self.run_command(cmd) - def run_command(self, cmd): + def run_command(self, cmd, cmd_name=None): """! Run a command with the appropriate environment. Add command to list of all commands run. @@ -1307,21 +1307,14 @@ def run_command(self, cmd): self.all_commands.append((cmd, self.print_all_envs(print_copyable=False))) - if self.instance: - log_name = f"{self.log_name}.{self.instance}" - else: - log_name = self.log_name + log_name = cmd_name if cmd_name else self.log_name - ismetcmd = self.c_dict.get('IS_MET_CMD', True) - run_inshell = self.c_dict.get('RUN_IN_SHELL', False) - log_theoutput = self.c_dict.get('LOG_THE_OUTPUT', False) + if self.instance: + log_name = f"{log_name}.{self.instance}" ret, out_cmd = self.cmdrunner.run_cmd(cmd, env=self.env, - ismetcmd=ismetcmd, log_name=log_name, - run_inshell=run_inshell, - log_theoutput=log_theoutput, copyable_env=self.get_env_copy()) if ret: logfile_path = self.config.getstr('config', 'LOG_METPLUS') diff --git a/metplus/wrappers/command_runner.py b/metplus/wrappers/command_runner.py index 77ba48528e..b449482723 100755 --- a/metplus/wrappers/command_runner.py +++ b/metplus/wrappers/command_runner.py @@ -51,9 +51,8 @@ def __init__(self, config, logger=None, verbose=2, skip_run=False): self.skip_run = skip_run self.log_command_to_met_log = False - def run_cmd(self, cmd, env=None, ismetcmd = True, log_name=None, - run_inshell=False, - log_theoutput=False, copyable_env=None, **kwargs): + def run_cmd(self, cmd, env=None, log_name=None, + copyable_env=None, **kwargs): """!The command cmd is a string which is converted to a produtil exe Runner object and than run. Output of the command may also be redirected to either METplus log, MET log, or TTY. @@ -66,18 +65,8 @@ def run_cmd(self, cmd, env=None, ismetcmd = True, log_name=None, @param cmd: A string, Command used in the produtil exe Runner object. @param env: Default None, environment for run to pass in, uses os.environ if not set. - @param ismetcmd: Default True, Will direct output to METplus log, - Metlog , or TTY. Set to False and use the other keywords as needed. @param log_name: Used only when ismetcmd=True, The name of the exectable being run. - @param run_inshell: Used only when ismetcmd=False, will Create a - runner object with the cmd being run through a shell, exe('sh')['-c', cmd] - This is required by commands, such as ncdump that are redirecting - output to a file, and other commands such as the convert command - when creating animated gifs. - @param log_theoutput: Used only when ismetcmd=False, will redirect - the stderr and stdout to a the METplus log file or tty. - DO Not set to True if the command is redirecting output to a file. @param kwargs Other options sent to the produtil Run constructor """ @@ -90,89 +79,59 @@ def run_cmd(self, cmd, env=None, ismetcmd = True, log_name=None, self.logger.info("COMMAND: %s" % cmd) - if ismetcmd: - - # self.log_name MUST be defined in the subclass' constructor, - # this code block is a safety net in case that was not done. - # self.log_name is used to generate the MET log output name, - # if output is directed there, based on the conf settings. - # - # cmd.split()[0] 'should' be the /path/to/ - if not log_name: - log_name = os.path.basename(cmd.split()[0]) - self.logger.warning('MISSING self.log_name, ' - 'setting name to: %s' % repr(log_name)) - self.logger.warning('Fix the code and edit the following objects' - ' contructor: %s, ' % repr(self)) - - # Determine where to send the output from the MET command. - log_dest = self.cmdlog_destination(cmdlog=log_name+'.log') - - # KEEP This comment as a reference note. - # Run the executable in a new process instead of through a shell. - # FYI. We were originally running the command through a shell - # which also works just fine. IF we go back to running through - # a shell, The string ,cmd, is formatted exactly as is needed. - # By formatted, it is as it would be when typed at the shell prompt. - # This includes, for example, quoting or backslash escaping filenames - # with spaces in them. - - # Run the executable and pass the arguments as a sequence. - # Split the command in to a sequence using shell syntax. - the_exe = shlex.split(cmd)[0] - the_args = shlex.split(cmd)[1:] - if log_dest: - self.logger.debug("log_name is: %s, output sent to: %s" % (log_name, log_dest)) - - self.log_header_info(log_dest, copyable_env, cmd) + # don't run app if DO_NOT_RUN_EXE is set to True + if self.skip_run: + self.logger.info("Not running command (DO_NOT_RUN_EXE = True)") + return 0, cmd - cmd_exe = exe(the_exe)[the_args].env(**env).err2out() >> log_dest - else: - cmd_exe = exe(the_exe)[the_args].env(**env).err2out() + # self.log_name MUST be defined in the subclass' constructor, + # this code block is a safety net in case that was not done. + # self.log_name is used to generate the MET log output name, + # if output is directed there, based on the conf settings. + # + # cmd.split()[0] 'should' be the /path/to/ + if not log_name: + log_name = os.path.basename(cmd.split()[0]) + self.logger.warning('MISSING self.log_name, ' + 'setting name to: %s' % repr(log_name)) + self.logger.warning('Fix the code and edit the following objects' + ' contructor: %s, ' % repr(self)) + + # Determine where to send the output from the MET command. + log_dest = self.cmdlog_destination(cmdlog=log_name+'.log') + + # determine if command must be run in a shell + run_inshell = False + if '*' in cmd or ';' in cmd or '<' in cmd or '>' in cmd: + run_inshell=True + + # KEEP This comment as a reference note. + # Run the executable in a new process instead of through a shell. + # FYI. We were originally running the command through a shell + # which also works just fine. IF we go back to running through + # a shell, The string ,cmd, is formatted exactly as is needed. + # By formatted, it is as it would be when typed at the shell prompt. + # This includes, for example, quoting or backslash escaping filenames + # with spaces in them. + + # Run the executable and pass the arguments as a sequence. + # Split the command in to a sequence using shell syntax. + the_exe = shlex.split(cmd)[0] + the_args = shlex.split(cmd)[1:] + if log_dest: + self.logger.debug("log_name is: %s, output sent to: %s" % (log_name, log_dest)) + + self.log_header_info(log_dest, copyable_env, cmd) + if run_inshell: + cmd_exe = exe('sh')['-c', cmd].env(**env).err2out() >> log_dest + else: + cmd_exe = exe(the_exe)[the_args].env(**env).err2out() >> log_dest else: - # This block is for all the Non-MET commands - # Some commands still need to be run in a shell in order to work. - # - # There are currently 3 cases of non met commnds that need to be handled. - # case 1. Redirecting to a file in cmd string, which must be through a shell - # ie. cmd = ncdump ...series_F006/min.nc > .../min.txt - # cmd = exe('sh')['-c', cmd] - # case 2. Running the executable directly, w/ arguments, NO redirection - # ie. ncap2, cmd = exe(the_exe)[the_args] - # case 3. Runnng the command and logging the output to - # log_dest - if log_theoutput: - log_dest = self.cmdlog_destination(cmdlog=log_name + '.log') - if log_dest: - self.logger.debug( - "log_name is: %s, output sent to: %s" % ( - log_name, log_dest)) - self.log_header_info(log_dest, copyable_env, cmd) - if run_inshell: - # set the_exe to log command has finished running - the_exe = shlex.split(cmd)[0] - - if log_theoutput: - log_dest = self.cmdlog_destination(cmdlog=log_name+'.log') - cmd_exe = exe('sh')['-c', cmd].env(**env).err2out() >> log_dest - else: - cmd_exe = exe('sh')['-c', cmd].env(**env) - + cmd_exe = exe('sh')['-c', cmd].env(**env) else: - the_exe = shlex.split(cmd)[0] - the_args = shlex.split(cmd)[1:] - if log_theoutput: - log_dest = self.cmdlog_destination(cmdlog=log_name+'.log') - cmd_exe = exe(the_exe)[the_args].env(**env).err2out() >> log_dest - else: - cmd_exe = exe(the_exe)[the_args].env(**env) - - # don't run app if DO_NOT_RUN_EXE is set to True - if self.skip_run: - self.logger.info("Not running command (DO_NOT_RUN_EXE = True)") - return 0, cmd + cmd_exe = exe(the_exe)[the_args].env(**env).err2out() # get current time to calculate total time to run command start_cmd_time = datetime.now() @@ -191,31 +150,6 @@ def run_cmd(self, cmd, env=None, ismetcmd = True, log_name=None, return ret, cmd - # TODO: Refactor seriesbylead. - # For now we are back to running through a shell. - # Can not run its cmd string, unless we run through a shell. - - # TODO refactor commands that are redirecting to a file. - # They should be brought in to the produtil framework - # the commands should not be required to run through a shell - # in order to work. we can either capture the output and write - # to a file or pass in the output_file and build the runner - # object usng exe('ncump')['file.nc'].out(output_file,append=False) - - # The non met command where ismetcmd=False and log_theoutput=False block above - # was created specfically for running any command that is capturing its - # output to a file. Such as in series by lead. - # ie. cmd = '/usr/local/bin/ncdump ...series_F006/min.nc > .../min.txt' - # The way those commands,as of 2018Apr20, are being defined, - # the > redirection is in the command. We don't want - # to send the command cmd output to a log file, it will mess up the - # intention. Also, cmd can not be run when decontructed with shlex - # You can't have a redirect symbol as an argument, it gets quoted - # and I'm not sure how to get around that ... - # /usr/local/bin/ncdump ...series_F006/min.nc ">" .../min.txt - # We don't want to use run_cmd since that function may redirect - # output to a log file. - def log_header_info(self, log_dest, copyable_env, cmd): with open(log_dest, 'a+') as log_file_handle: # if logging MET command to its own log file, add command that was run to that log diff --git a/metplus/wrappers/met_db_load_wrapper.py b/metplus/wrappers/met_db_load_wrapper.py index 74e0c909e8..cf5ef77b2d 100755 --- a/metplus/wrappers/met_db_load_wrapper.py +++ b/metplus/wrappers/met_db_load_wrapper.py @@ -95,9 +95,6 @@ def create_c_dict(self): self.log_error(f"Must set MET_DB_LOAD_MV_{name}") c_dict[f'MV_{name}'] = value - c_dict['IS_MET_CMD'] = False - c_dict['LOG_THE_OUTPUT'] = True - return c_dict def get_command(self): diff --git a/metplus/wrappers/user_script_wrapper.py b/metplus/wrappers/user_script_wrapper.py index 9d53a86cbb..4d881514ed 100755 --- a/metplus/wrappers/user_script_wrapper.py +++ b/metplus/wrappers/user_script_wrapper.py @@ -41,9 +41,6 @@ def create_c_dict(self): self.log_error("Must supply a command to run with " "USER_SCRIPT_COMMAND") - c_dict['IS_MET_CMD'] = False - c_dict['LOG_THE_OUTPUT'] = True - return c_dict def get_command(self): @@ -87,10 +84,6 @@ def run_at_time_once(self, time_info): **time_info) ) - # if command contains wildcard character, run in shell - if '*' in self.c_dict['COMMAND']: - self.c_dict['RUN_IN_SHELL'] = True - # run command if not self.build(): success = False From 88e16313e9bf12a8adf3151f6e3a0633a422d644 Mon Sep 17 00:00:00 2001 From: George McCabe Date: Wed, 7 Jul 2021 17:57:27 -0600 Subject: [PATCH 03/25] more progress on implementing GFDL tracker wrapper --- metplus/wrappers/gfdl_tracker_wrapper.py | 225 ++++++++++++++++-- .../GFDLTracker/GFDLTracker_TC.conf | 17 +- .../met_tool_wrapper/GFDLTracker/template.nml | 124 ++++++++++ 3 files changed, 348 insertions(+), 18 deletions(-) create mode 100644 parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index ee6cbd165b..f917b701a8 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -16,7 +16,12 @@ from . import CommandBuilder class GFDLTrackerWrapper(CommandBuilder): - """!Wrapper can be used as a base to develop a new wrapper""" + """!Configures and runs GFDL Tracker""" + + CONFIG_NAMES = { + '': '', + } + def __init__(self, config, instance=None, config_overrides={}): self.app_name = 'gfdl_tracker' super().__init__(config, @@ -46,21 +51,58 @@ def create_c_dict(self): "must be 1 or 2") return c_dict - c_dict['INDEX_SCRIPT'] = os.path.join(gfdl_tracker_base, + c_dict['INDEX_APP'] = os.path.join(gfdl_tracker_base, 'trk_exec', index_script_name) - if not os.path.exists(c_dict['INDEX_SCRIPT']): - self.log_error("GRIB index script does not exist: " - f"{c_dict['INDEX_SCRIPT']}") + if not os.path.exists(c_dict['INDEX_APP']): + self.log_error("GRIB index exe does not exist: " + f"{c_dict['INDEX_APP']}") + + c_dict['TRACKER_APP'] = os.path.join(gfdl_tracker_base, + 'trk_exec', + 'gettrk.exe') + + if not os.path.exists(c_dict['TRACKER_APP']): + self.log_error("GFDL tracker exe does not exist: " + f"{c_dict['TRACKER_APP']}") c_dict['INPUT_TEMPLATE'] = self.config.getraw('config', 'GFDL_TRACKER_INPUT_TEMPLATE', '') c_dict['INPUT_DIR'] = self.config.getdir('GFDL_TRACKER_INPUT_DIR', '') + c_dict['TC_VITALS_INPUT_TEMPLATE'] = ( + self.config.getraw('config', + 'GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE', '') + ) + c_dict['TC_VITALS_INPUT_DIR'] = ( + self.config.getdir('GFDL_TRACKER_TC_VITALS_INPUT_DIR', '') + ) + + c_dict['NML_TEMPLATE_FILE'] = self.config.getraw('config', + 'GFDL_TRACKER_NML_TEMPLATE_FILE') + if not c_dict['NML_TEMPLATE_FILE']: + self.log_error('Must set GFDL_TRACKER_NML_TEMPLATE_FILE') + elif not os.path.exists(c_dict['NML_TEMPLATE_FILE']): + self.log_error("GFDL_TRACKER_NML_TEMPLATE_FILE does not " + f"exist: {c_dict['NML_TEMPLATE_FILE']}") + + c_dict['OUTPUT_TEMPLATE'] = self.config.getraw('config', + 'GFDL_TRACKER_OUTPUT_TEMPLATE', '') + c_dict['OUTPUT_DIR'] = self.config.getdir('GFDL_TRACKER_OUTPUT_DIR', '') + if not c_dict['INPUT_TEMPLATE']: self.log_error('GFDL_TRACKER_INPUT_TEMPLATE must be set. ') + if not c_dict['TC_VITALS_INPUT_TEMPLATE']: + self.log_error('GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE must be set. ') + + if not c_dict['OUTPUT_TEMPLATE']: + self.log_error('GFDL_TRACKER_OUTPUT_TEMPLATE must be set. ') + + if not c_dict['OUTPUT_DIR']: + self.log_error('GFDL_TRACKER_OUTPUT_DIR must be set. ') + return c_dict def run_at_time(self, input_dict): @@ -69,11 +111,71 @@ def run_at_time(self, input_dict): @param input_dict dictionary containing time information of current run generally contains 'now' (current) time and 'init' or 'valid' time """ - # create index files for each input file + for custom_string in self.c_dict['CUSTOM_LOOP_LIST']: + if custom_string: + self.logger.info(f"Processing custom string: {custom_string}") + + input_dict['custom'] = custom_string + self.run_at_time_once(input_dict) + + def run_at_time_once(self, input_dict): + """! Do some processing for the current run time (init or valid) + Args: + @param input_dict dictionary containing time information of current run + generally contains 'now' (current) time and 'init' or 'valid' time + """ + # get all input files + all_input_files, all_lead_minutes = self.get_all_input_files(input_dict) + if not all_input_files: + self.log_error("No input files found") + return False + + # get TCVitals file + tc_vitals_file = self.find_data(time_info=input_dict, + data_type='TC_VITALS') + if not tc_vitals_file: + self.log_error("TCVitals file not found") + return False + + # create output directory if it doesn't exist + output_dir = self.c_dict.get('OUTPUT_DIR') + if not os.path.exists(output_dir): + self.logger.debug(f"Creating output directory: {output_dir}") + os.makedirs(output_dir) + + # create symbolic link to output directory for all files (including tcvit) + all_output_files = self.link_files_to_output_dir(output_dir, + all_input_files, + tc_vitals_file) + if not all_output_files: + self.log_error("Could not create symbolic links in output directory") + return False + + # Run grib index application to generate index files + if not self.run_grib_index(all_output_files): + return False + + # create empty fort.14 file + self.create_fort_14_file(output_dir) + + # create fort.15 file with list of all forecast leads and indices + self.create_fort_15_file(output_dir, all_lead_minutes) + + # substitute values from config into template.nml and write input.nml to output dir + if not self.fill_output_nml_template(output_dir): + return False - # replace values in input.nml + # run tracker application from output directory passing in input.nml + if not self.run_tracker(output_dir): + return False - # run tracker passing in input.nml configuration file + # rename fort.64 output file to output filename template + + return True + + def get_all_input_files(self, input_dict): + all_input_files = [] + all_lead_minutes = [] # get forecast leads to loop over lead_seq = get_lead_sequence(self.config, input_dict) @@ -84,14 +186,107 @@ def run_at_time(self, input_dict): # recalculate time info items time_info = ti_calculate(input_dict) + input_files = self.find_data(time_info=time_info, + return_list=True) + all_input_files.extend(input_files) + + all_lead_minutes.append(time_info.get('lead_minutes')) + + return all_input_files, sorted(all_lead_minutes) + + def link_files_to_output_dir(self, output_dir, all_input_files, tc_vitals_file): + all_output_files = [] + + # create symbolic links for input files + for src_path in all_input_files: + dest_path = self._create_symlink(src_path, output_dir) + all_output_files.append(dest_path) - for custom_string in self.c_dict['CUSTOM_LOOP_LIST']: - if custom_string: - self.logger.info(f"Processing custom string: {custom_string}") + # create symbolic links for TCVitals file + self._create_symlink(tc_vitals_file, output_dir) - time_info['custom'] = custom_string - input_files = self.find_data(time_info=time_info, - return_list=True) - self.logger.debug(f'Found files: {input_files}') + return all_output_files + + def _create_symlink(self, src_path, output_dir): + src_file = os.path.basename(src_path) + dest_path = os.path.join(output_dir, src_file) + + if os.path.islink(dest_path): + self.logger.debug(f"Removing existing symbolic link: {dest_path}") + os.unlink(dest_path) + + self.logger.debug(f"Creating symbolic link in {output_dir} for {src_file}") + os.symlink(src_path, dest_path) + + return dest_path + + def run_grib_index(self, all_output_files): + index_script = self.c_dict.get('INDEX_APP') + cmd_name = os.path.basename(index_script) + for output_file in all_output_files: + index_file = f'{output_file}.ix' + command = f'{index_script} {output_file} {index_file}' + if not self.run_command(command, cmd_name=cmd_name): + return False return True + + def create_fort_14_file(self, output_dir): + fort_14_path = os.path.join(output_dir, 'fort.14') + self.logger.debug(f"Writing fort.14 file: {fort_14_path}") + with open(fort_14_path, 'w') as file_handle: + pass + + def create_fort_15_file(self, output_dir, all_lead_minutes): + # format must match index (starting with 1) taking up 4 characters + # then forecast lead minutes taking up 5 characters - pad with spaces + file_lines = [] + + for index, lead_minutes in enumerate(all_lead_minutes, start=1): + file_lines.append(f"{str(index).rjust(4)} {str(lead_minutes).rjust(5)}") + + write_content = '\n'.join(file_lines) + + fort_15_path = os.path.join(output_dir, 'fort.15') + self.logger.debug(f"Writing fort.15 file: {fort_15_path}") + with open(fort_15_path, 'w') as file_handle: + file_handle.write(write_content) + + def fill_output_nml_template(self, output_dir): + template_file = self.c_dict['NML_TEMPLATE_FILE'] + if not template_file: + return False + + # set up dictionary of text to substitute in XML file +# sub_dict = self.populate_sub_dict(time_info) + + # open template file and replace any values encountered + with open(template_file, 'r') as file_handle: + input_lines = file_handle.read().splitlines() + + output_lines = [] + for input_line in input_lines: + output_line = input_line +# for replace_string, value in sub_dict.items(): +# output_line = output_line.replace(f"${{{replace_string}}}", +# value) + output_lines.append(output_line) + + # write tmp file with XML content with substituted values + out_path = os.path.join(output_dir, + 'input.nml') + self.logger.debug(f"Writing file: {out_path}") + with open(out_path, 'w') as file_handle: + for line in output_lines: + file_handle.write(f'{line}\n') + + return True + + def run_tracker(self, output_dir): + command = (f"cd {output_dir}; " + f"{self.c_dict['TRACKER_APP']} " + f"< input.nml; " + f"ret=$?; " + f"cd -; " + f"if [ $ret != 0 ]; then false; fi") + return self.run_command(command) diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index 95e1048560..f379a03f1d 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -9,12 +9,23 @@ INIT_TIME_FMT = %Y%m%d%H INIT_BEG = 2016090600 INIT_END = 2016090600 -LEAD_SEQ = begin_end_incr(0, 2, 1)H +#LEAD_SEQ = begin_end_incr(0, 9, 1)H, begin_end_incr(12,126,3)H #LEAD_SEQ = * +LEAD_SEQ = begin_end_incr(0, 18, 6)H +# GFDL_TRACKER_BASE should go in user config GFDL_TRACKER_BASE = /glade/work/biswas/standalone_gfdl-vortextracker_v3.9a -GFDL_TRACKER_INPUT_DIR = /glade/work/biswas/data_tracker/hwrf_v3.9a +GFDL_TRACKER_INPUT_DIR = /glade/work/mccabe/GFDL/tc_tracking/data GFDL_TRACKER_INPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H}.f{lead?fmt=%5M} -GFDL_TRACKER_GRIB_VERSION = 1 \ No newline at end of file +GFDL_TRACKER_TC_VITALS_INPUT_DIR = {GFDL_TRACKER_INPUT_DIR} +GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE = tcvit_rsmc_storms.txt + +GFDL_TRACKER_OUTPUT_DIR = {OUTPUT_BASE}/gfdl_tracker +GFDL_TRACKER_OUTPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H} + +GFDL_TRACKER_GRIB_VERSION = 1 + +#GFDL_TRACKER_ +GFDL_TRACKER_NML_TEMPLATE_FILE = {PARM_BASE}/use_cases/met_tool_wrapper/GFDLTracker/template.nml diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml new file mode 100644 index 0000000000..89a10bf6c5 --- /dev/null +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml @@ -0,0 +1,124 @@ +&datein + inp%bcc = 20, + inp%byy = 16, + inp%bmm = 09, + inp%bdd = 06, + inp%bhh = 00, + inp%model = 17, + inp%modtyp = "regional", + inp%lt_units = "hours", + inp%file_seq = "multi", + inp%nesttyp = "moveable", +/ + +&atcfinfo + atcfnum = 81, + atcfname = "HWRF", + atcfymdh = 2016090600, + atcffreq = 100, +/ + +&trackerinfo + trkrinfo%type = "tracker", + trkrinfo%mslpthresh = 0.0015, + trkrinfo%use_backup_mslp_grad_check = "y", + trkrinfo%v850thresh = 1.5, + trkrinfo%use_backup_850_vt_check = "y", + trkrinfo%enable_timing = 1, + trkrinfo%gridtype = "regional", + trkrinfo%contint = 100.0, + trkrinfo%want_oci = T, + trkrinfo%out_vit = "y", + trkrinfo%use_land_mask = "y", + trkrinfo%inp_data_type = "grib", + trkrinfo%gribver = 1, + trkrinfo%g2_jpdtn = 0, + trkrinfo%g2_mslp_parm_id = 192, + trkrinfo%g1_mslp_parm_id = 2, + trkrinfo%g1_sfcwind_lev_typ = 105, + trkrinfo%g1_sfcwind_lev_val = 10, +/ + +&phaseinfo + phaseflag = "y", + phasescheme = "both", + wcore_depth = 1.0, +/ + +&structinfo + structflag = "n", + ikeflag = "n", +/ + +&fnameinfo + gmodname = "hwrf", + rundescr = "25x25", + atcfdescr = "EP152016", +/ + +&waitinfo + use_waitfor = "y", + wait_min_age = 10, + wait_min_size = 100, + wait_max_wait = 3600, + wait_sleeptime = 5, + use_per_fcst_command = "y", + per_fcst_command = "./deliver %[FHOUR] %[FMIN]", +/ + +&netcdflist + netcdfinfo%lat_name = "", + netcdfinfo%lmaskname = "", + netcdfinfo%lon_name = "", + netcdfinfo%mslpname = "", + netcdfinfo%netcdf_filename = "", + netcdfinfo%num_netcdf_vars = 0, + netcdfinfo%rv700name = "", + netcdfinfo%rv850name = "", + netcdfinfo%time_name = "", + netcdfinfo%time_units = "", + netcdfinfo%tmean_300_500_name = "", + netcdfinfo%u500name = "", + netcdfinfo%u700name = "", + netcdfinfo%u850name = "", + netcdfinfo%usfcname = "", + netcdfinfo%v500name = "", + netcdfinfo%v700name = "", + netcdfinfo%v850name = "", + netcdfinfo%vsfcname = "", + netcdfinfo%z200name = "", + netcdfinfo%z300name = "", + netcdfinfo%z350name = "", + netcdfinfo%z400name = "", + netcdfinfo%z450name = "", + netcdfinfo%z500name = "", + netcdfinfo%z550name = "", + netcdfinfo%z600name = "", + netcdfinfo%z650name = "", + netcdfinfo%z700name = "", + netcdfinfo%z750name = "", + netcdfinfo%z800name = "", + netcdfinfo%z850name = "", + netcdfinfo%z900name = "", +/ + +&parmpreflist + user_wants_to_track_zeta700 = "y", + user_wants_to_track_wcirc850 = "y", + user_wants_to_track_wcirc700 = "y", + user_wants_to_track_gph850 = "y", + user_wants_to_track_gph700 = "y", + user_wants_to_track_mslp = "y", + user_wants_to_track_wcircsfc = "y", + user_wants_to_track_zetasfc = "y", + user_wants_to_track_thick500850 = "y", + user_wants_to_track_thick200500 = "n", + user_wants_to_track_thick200850 = "y", + user_wants_to_track_zeta850 = "y", +/ + +&verbose + verb = 3, + verb_g2 = 0, +/ + From d0931048166fe91b9e085ad81b0b20715be27e03 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 8 Jul 2021 11:02:32 -0600 Subject: [PATCH 04/25] started making nml file configurable --- metplus/wrappers/gfdl_tracker_wrapper.py | 4 +- .../GFDLTracker/GFDLTracker_TC.conf | 104 ++++++++++++++++++ .../met_tool_wrapper/GFDLTracker/template.nml | 28 ++--- 3 files changed, 121 insertions(+), 15 deletions(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index f917b701a8..a1bbfbc8de 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -18,8 +18,10 @@ class GFDLTrackerWrapper(CommandBuilder): """!Configures and runs GFDL Tracker""" + + CONFIG_NAMES = { - '': '', + } def __init__(self, config, instance=None, config_overrides={}): diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index f379a03f1d..6d53cc42fb 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -29,3 +29,107 @@ GFDL_TRACKER_GRIB_VERSION = 1 #GFDL_TRACKER_ GFDL_TRACKER_NML_TEMPLATE_FILE = {PARM_BASE}/use_cases/met_tool_wrapper/GFDLTracker/template.nml + +GFDL_TRACKER_DATEIN_INP_BCC = 20 +GFDL_TRACKER_DATEIN_INP_BYY = 16 +GFDL_TRACKER_DATEIN_INP_BMM = 09 +GFDL_TRACKER_DATEIN_INP_BDD = 06 +GFDL_TRACKER_DATEIN_INP_BHH = 00 +GFDL_TRACKER_DATEIN_INP_MODEL = 17 +GFDL_TRACKER_DATEIN_INP_MODTYP = "regional" +GFDL_TRACKER_DATEIN_INP_LT_UNITS = "hours" +GFDL_TRACKER_DATEIN_INP_FILE_SEQ = "multi" +GFDL_TRACKER_DATEIN_INP_NESTTYP = "moveable" + +GFDL_TRACKER_ATCFINFO_ATCFNUM = 81 +GFDL_TRACKER_ATCFINFO_ATCFNAME = "HWRF" +GFDL_TRACKER_ATCFINFO_ATCFYMDH = 2016090600 +GFDL_TRACKER_ATCFINFO_ATCFFREQ = 100 + +GFDL_TRACKER_TRACKERINFO_TYPE = "tracker" +GFDL_TRACKER_TRACKERINFO_MSLPTHRESH = 0.0015 +GFDL_TRACKER_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK = "y" +GFDL_TRACKER_TRACKERINFO_V850THRESH = 1.5 +GFDL_TRACKER_TRACKERINFO_USE_BACKUP_850_VT_CHECK = "y" +GFDL_TRACKER_TRACKERINFO_ENABLE_TIMING = 1 +GFDL_TRACKER_TRACKERINFO_GRIDTYPE = "regional" +GFDL_TRACKER_TRACKERINFO_CONTINT = 100.0 +GFDL_TRACKER_TRACKERINFO_WANT_OCI = T +GFDL_TRACKER_TRACKERINFO_OUT_VIT = "y" +GFDL_TRACKER_TRACKERINFO_USE_LAND_MASK = "y" +GFDL_TRACKER_TRACKERINFO_INP_DATA_TYPE = "grib" +GFDL_TRACKER_TRACKERINFO_GRIBVER = 1 +GFDL_TRACKER_TRACKERINFO_G2_JPDTN = 0 +GFDL_TRACKER_TRACKERINFO_G2_MSLP_PARM_ID = 192 +GFDL_TRACKER_TRACKERINFO_G1_MSLP_PARM_ID = 2 +GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_TYP = 105 +GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_VAL = 10 + +GFDL_TRACKER_PHASEINFO_PHASEFLAG = "y" +GFDL_TRACKER_PHASEINFO_PHASESCHEME = "both" +GFDL_TRACKER_PHASEINFO_WCORE_DEPTH = 1.0 + +GFDL_TRACKER_STRUCTINFO_STRUCTFLAG = "n" +GFDL_TRACKER_STRUCTINFO_IKEFLAG = "n" + +GFDL_TRACKER_FNAMEINFO_GMODNAME = "hwrf" +GFDL_TRACKER_FNAMEINFO_RUNDESCR = "25x25" +GFDL_TRACKER_FNAMEINFO_ATCFDESCR = "EP152016" + +GFDL_TRACKER_WAITINFO_USE_WAITFOR = "y" +GFDL_TRACKER_WAITINFO_WAIT_MIN_AGE = 10 +GFDL_TRACKER_WAITINFO_WAIT_MIN_SIZE = 100 +GFDL_TRACKER_WAITINFO_WAIT_MAX_WAIT = 3600 +GFDL_TRACKER_WAITINFO_WAIT_SLEEPTIME = 5 +GFDL_TRACKER_WAITINFO_USE_PER_FCST_COMMAND = "y" +GFDL_TRACKER_WAITINFO_PER_FCST_COMMAND = "./deliver %[FHOUR] %[FMIN]" + +GFDL_TRACKER_NETCDFINFO_LAT_NAME = "" +GFDL_TRACKER_NETCDFINFO_LMASKNAME = "" +GFDL_TRACKER_NETCDFINFO_LON_NAME = "" +GFDL_TRACKER_NETCDFINFO_MSLPNAME = "" +GFDL_TRACKER_NETCDFINFO_NETCDF_FILENAME = "" +GFDL_TRACKER_NETCDFINFO_NUM_NETCDF_VARS = 0 +GFDL_TRACKER_NETCDFINFO_RV700NAME = "" +GFDL_TRACKER_NETCDFINFO_RV850NAME = "" +GFDL_TRACKER_NETCDFINFO_TIME_NAME = "" +GFDL_TRACKER_NETCDFINFO_TIME_UNITS = "" +GFDL_TRACKER_NETCDFINFO_TMEAN_300_500_NAME = "" +GFDL_TRACKER_NETCDFINFO_U500NAME = "" +GFDL_TRACKER_NETCDFINFO_U700NAME = "" +GFDL_TRACKER_NETCDFINFO_U850NAME = "" +GFDL_TRACKER_NETCDFINFO_USFCNAME = "" +GFDL_TRACKER_NETCDFINFO_V500NAME = "" +GFDL_TRACKER_NETCDFINFO_V700NAME = "" +GFDL_TRACKER_NETCDFINFO_V850NAME = "" +GFDL_TRACKER_NETCDFINFO_VSFCNAME = "" +GFDL_TRACKER_NETCDFINFO_Z200NAME = "" +GFDL_TRACKER_NETCDFINFO_Z300NAME = "" +GFDL_TRACKER_NETCDFINFO_Z350NAME = "" +GFDL_TRACKER_NETCDFINFO_Z400NAME = "" +GFDL_TRACKER_NETCDFINFO_Z450NAME = "" +GFDL_TRACKER_NETCDFINFO_Z500NAME = "" +GFDL_TRACKER_NETCDFINFO_Z550NAME = "" +GFDL_TRACKER_NETCDFINFO_Z600NAME = "" +GFDL_TRACKER_NETCDFINFO_Z650NAME = "" +GFDL_TRACKER_NETCDFINFO_Z700NAME = "" +GFDL_TRACKER_NETCDFINFO_Z750NAME = "" +GFDL_TRACKER_NETCDFINFO_Z800NAME = "" +GFDL_TRACKER_NETCDFINFO_Z850NAME = "" +GFDL_TRACKER_NETCDFINFO_Z900NAME = "" + +GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA700 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC850 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC700 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH850 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH700 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_MSLP = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRCSFC = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETASFC = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK500850 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200500 = "n" +GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200850 = "y" +GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA850 = "y" + +GFDL_TRACKER_VERBOSE_VERB = 3 +GFDL_TRACKER_VERBOSE_VERB_G2 = 0 \ No newline at end of file diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml index 89a10bf6c5..d7207ac201 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml @@ -1,21 +1,21 @@ &datein - inp%bcc = 20, - inp%byy = 16, - inp%bmm = 09, - inp%bdd = 06, - inp%bhh = 00, - inp%model = 17, - inp%modtyp = "regional", - inp%lt_units = "hours", - inp%file_seq = "multi", - inp%nesttyp = "moveable", + inp%bcc = ${METPLUS_DATEIN_INP_BCC}, + inp%byy = ${METPLUS_DATEIN_INP_BYY}, + inp%bmm = ${METPLUS_DATEIN_INP_BMM}, + inp%bdd = ${METPLUS_DATEIN_INP_BDD}, + inp%bhh = ${METPLUS_DATEIN_INP_BHH}, + inp%model = ${METPLUS_DATEIN_INP_MODEL}, + inp%modtyp = ${METPLUS_DATEIN_INP_MODTYP}, + inp%lt_units = ${METPLUS_DATEIN_INP_LT_UNITS}, + inp%file_seq = ${METPLUS_DATEIN_INP_FILE_SEQ}, + inp%nesttyp = ${METPLUS_DATEIN_INP_NESTTYP}, / &atcfinfo - atcfnum = 81, - atcfname = "HWRF", - atcfymdh = 2016090600, - atcffreq = 100, + atcfnum = ${METPLUS_ATCFINFO_ATCFNUM}, + atcfname = ${METPLUS_ATCFINFO_ATCFNAME}, + atcfymdh = ${METPLUS_ATCFINFO_ATCFYMDH}, + atcffreq = ${METPLUS_ATCFINFO_ATCFFREQ}, / &trackerinfo From bd18f4adbae9488de4e3cb99544d9b8c075ebd64 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 12 Jul 2021 14:54:35 -0600 Subject: [PATCH 05/25] implement logic to read config values and replace values in the template nml file, rename fort.64 to output template, code clean up --- metplus/wrappers/gfdl_tracker_wrapper.py | 251 ++++++++++++++---- metplus/wrappers/met_db_load_wrapper.py | 10 +- .../GFDLTracker/GFDLTracker_TC.conf | 1 - .../met_tool_wrapper/GFDLTracker/template.nml | 161 ++++++----- 4 files changed, 289 insertions(+), 134 deletions(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index a1bbfbc8de..f37c772b2d 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -11,6 +11,7 @@ """ import os +import shutil from ..util import do_string_sub, ti_calculate, get_lead_sequence from . import CommandBuilder @@ -18,10 +19,95 @@ class GFDLTrackerWrapper(CommandBuilder): """!Configures and runs GFDL Tracker""" - - CONFIG_NAMES = { - + "DATEIN_INP_MODEL": "int", + "DATEIN_INP_MODTYP": "string", + "DATEIN_INP_LT_UNITS": "string", + "DATEIN_INP_FILE_SEQ": "string", + "DATEIN_INP_NESTTYP": "string", + "ATCFINFO_ATCFNUM": "int", + "ATCFINFO_ATCFNAME": "string", + "ATCFINFO_ATCFFREQ": "int", + "TRACKERINFO_TYPE": "string", + "TRACKERINFO_MSLPTHRESH": "float", + "TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK": "bool", + "TRACKERINFO_V850THRESH": "float", + "TRACKERINFO_USE_BACKUP_850_VT_CHECK": "bool", + "TRACKERINFO_ENABLE_TIMING": "int", + "TRACKERINFO_GRIDTYPE": "string", + "TRACKERINFO_CONTINT": "float", + "TRACKERINFO_WANT_OCI": "string", + "TRACKERINFO_OUT_VIT": "bool", + "TRACKERINFO_USE_LAND_MASK": "bool", + "TRACKERINFO_INP_DATA_TYPE": "string", + "TRACKERINFO_GRIBVER": "int", + "TRACKERINFO_G2_JPDTN": "int", + "TRACKERINFO_G2_MSLP_PARM_ID": "int", + "TRACKERINFO_G1_MSLP_PARM_ID": "int", + "TRACKERINFO_G1_SFCWIND_LEV_TYP": "int", + "TRACKERINFO_G1_SFCWIND_LEV_VAL": "int", + "PHASEINFO_PHASEFLAG": "bool", + "PHASEINFO_PHASESCHEME": "string", + "PHASEINFO_WCORE_DEPTH": "float", + "STRUCTINFO_STRUCTFLAG": "bool", + "STRUCTINFO_IKEFLAG": "bool", + "FNAMEINFO_GMODNAME": "string", + "FNAMEINFO_RUNDESCR": "string", + "FNAMEINFO_ATCFDESCR": "string", + "WAITINFO_USE_WAITFOR": "bool", + "WAITINFO_WAIT_MIN_AGE": "int", + "WAITINFO_WAIT_MIN_SIZE": "int", + "WAITINFO_WAIT_MAX_WAIT": "int", + "WAITINFO_WAIT_SLEEPTIME": "int", + "WAITINFO_USE_PER_FCST_COMMAND": "bool", + "WAITINFO_PER_FCST_COMMAND": "string", + "NETCDFINFO_LAT_NAME": "string", + "NETCDFINFO_LMASKNAME": "string", + "NETCDFINFO_LON_NAME": "string", + "NETCDFINFO_MSLPNAME": "string", + "NETCDFINFO_NETCDF_FILENAME": "string", + "NETCDFINFO_NUM_NETCDF_VARS": "int", + "NETCDFINFO_RV700NAME": "string", + "NETCDFINFO_RV850NAME": "string", + "NETCDFINFO_TIME_NAME": "string", + "NETCDFINFO_TIME_UNITS": "string", + "NETCDFINFO_TMEAN_300_500_NAME": "string", + "NETCDFINFO_U500NAME": "string", + "NETCDFINFO_U700NAME": "string", + "NETCDFINFO_U850NAME": "string", + "NETCDFINFO_USFCNAME": "string", + "NETCDFINFO_V500NAME": "string", + "NETCDFINFO_V700NAME": "string", + "NETCDFINFO_V850NAME": "string", + "NETCDFINFO_VSFCNAME": "string", + "NETCDFINFO_Z200NAME": "string", + "NETCDFINFO_Z300NAME": "string", + "NETCDFINFO_Z350NAME": "string", + "NETCDFINFO_Z400NAME": "string", + "NETCDFINFO_Z450NAME": "string", + "NETCDFINFO_Z500NAME": "string", + "NETCDFINFO_Z550NAME": "string", + "NETCDFINFO_Z600NAME": "string", + "NETCDFINFO_Z650NAME": "string", + "NETCDFINFO_Z700NAME": "string", + "NETCDFINFO_Z750NAME": "string", + "NETCDFINFO_Z800NAME": "string", + "NETCDFINFO_Z850NAME": "string", + "NETCDFINFO_Z900NAME": "string", + "USER_WANTS_TO_TRACK_ZETA700": "bool", + "USER_WANTS_TO_TRACK_WCIRC850": "bool", + "USER_WANTS_TO_TRACK_WCIRC700": "bool", + "USER_WANTS_TO_TRACK_GPH850": "bool", + "USER_WANTS_TO_TRACK_GPH700": "bool", + "USER_WANTS_TO_TRACK_MSLP": "bool", + "USER_WANTS_TO_TRACK_WCIRCSFC": "bool", + "USER_WANTS_TO_TRACK_ZETASFC": "bool", + "USER_WANTS_TO_TRACK_THICK500850": "bool", + "USER_WANTS_TO_TRACK_THICK200500": "bool", + "USER_WANTS_TO_TRACK_THICK200850": "bool", + "USER_WANTS_TO_TRACK_ZETA850": "bool", + "VERBOSE_VERB": "int", + "VERBOSE_VERB_G2": "int", } def __init__(self, config, instance=None, config_overrides={}): @@ -39,9 +125,9 @@ def create_c_dict(self): self.log_error('GFDL_TRACKER_BASE must be set.') return c_dict - c_dict['INPUT_GRIB_VERSION'] = self.config.getint('config', - 'GFDL_TRACKER_GRIB_VERSION', - '') + c_dict['INPUT_GRIB_VERSION'] = ( + self.config.getint('config', 'GFDL_TRACKER_GRIB_VERSION', '') + ) if c_dict['INPUT_GRIB_VERSION'] == 1: index_script_name = 'grbindex.exe' @@ -69,8 +155,9 @@ def create_c_dict(self): self.log_error("GFDL tracker exe does not exist: " f"{c_dict['TRACKER_APP']}") - c_dict['INPUT_TEMPLATE'] = self.config.getraw('config', - 'GFDL_TRACKER_INPUT_TEMPLATE', '') + c_dict['INPUT_TEMPLATE'] = ( + self.config.getraw('config', 'GFDL_TRACKER_INPUT_TEMPLATE', '') + ) c_dict['INPUT_DIR'] = self.config.getdir('GFDL_TRACKER_INPUT_DIR', '') c_dict['TC_VITALS_INPUT_TEMPLATE'] = ( @@ -81,37 +168,53 @@ def create_c_dict(self): self.config.getdir('GFDL_TRACKER_TC_VITALS_INPUT_DIR', '') ) - c_dict['NML_TEMPLATE_FILE'] = self.config.getraw('config', - 'GFDL_TRACKER_NML_TEMPLATE_FILE') + c_dict['NML_TEMPLATE_FILE'] = ( + self.config.getraw('config', 'GFDL_TRACKER_NML_TEMPLATE_FILE', '') + ) if not c_dict['NML_TEMPLATE_FILE']: self.log_error('Must set GFDL_TRACKER_NML_TEMPLATE_FILE') elif not os.path.exists(c_dict['NML_TEMPLATE_FILE']): self.log_error("GFDL_TRACKER_NML_TEMPLATE_FILE does not " f"exist: {c_dict['NML_TEMPLATE_FILE']}") - c_dict['OUTPUT_TEMPLATE'] = self.config.getraw('config', - 'GFDL_TRACKER_OUTPUT_TEMPLATE', '') - c_dict['OUTPUT_DIR'] = self.config.getdir('GFDL_TRACKER_OUTPUT_DIR', '') + c_dict['OUTPUT_TEMPLATE'] = ( + self.config.getraw('config', 'GFDL_TRACKER_OUTPUT_TEMPLATE', '') + ) + c_dict['OUTPUT_DIR'] = self.config.getdir('GFDL_TRACKER_OUTPUT_DIR', + '') + + # read config variables + for name, input_type in self.CONFIG_NAMES.items(): + if input_type == 'int': + get_fct = self.config.getint + elif input_type == 'float': + get_fct = self.config.getfloat + elif input_type == 'bool': + get_fct = self.config.getbool + else: + get_fct = self.config.getraw + + value = get_fct('config', f'GFDL_TRACKER_{name}', '') + c_dict[f'REPLACE_CONF_{name}'] = value if not c_dict['INPUT_TEMPLATE']: - self.log_error('GFDL_TRACKER_INPUT_TEMPLATE must be set. ') + self.log_error('GFDL_TRACKER_INPUT_TEMPLATE must be set') if not c_dict['TC_VITALS_INPUT_TEMPLATE']: - self.log_error('GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE must be set. ') + self.log_error('GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE must be set') if not c_dict['OUTPUT_TEMPLATE']: - self.log_error('GFDL_TRACKER_OUTPUT_TEMPLATE must be set. ') + self.log_error('GFDL_TRACKER_OUTPUT_TEMPLATE must be set') if not c_dict['OUTPUT_DIR']: - self.log_error('GFDL_TRACKER_OUTPUT_DIR must be set. ') + self.log_error('GFDL_TRACKER_OUTPUT_DIR must be set') return c_dict def run_at_time(self, input_dict): """! Do some processing for the current run time (init or valid) - Args: - @param input_dict dictionary containing time information of current run - generally contains 'now' (current) time and 'init' or 'valid' time + + @param input_dict dictionary containing time information of current run """ for custom_string in self.c_dict['CUSTOM_LOOP_LIST']: if custom_string: @@ -122,12 +225,12 @@ def run_at_time(self, input_dict): def run_at_time_once(self, input_dict): """! Do some processing for the current run time (init or valid) - Args: - @param input_dict dictionary containing time information of current run - generally contains 'now' (current) time and 'init' or 'valid' time + + @param input_dict dictionary containing time information of current run + @returns True if everything was successful, False if not """ # get all input files - all_input_files, all_lead_minutes = self.get_all_input_files(input_dict) + all_input_files, lead_minutes = self.get_all_input_files(input_dict) if not all_input_files: self.log_error("No input files found") return False @@ -145,12 +248,12 @@ def run_at_time_once(self, input_dict): self.logger.debug(f"Creating output directory: {output_dir}") os.makedirs(output_dir) - # create symbolic link to output directory for all files (including tcvit) - all_output_files = self.link_files_to_output_dir(output_dir, - all_input_files, + # create sym link to output directory for all files (including tcvit) + all_output_files = self.link_files_to_output_dir(all_input_files, tc_vitals_file) if not all_output_files: - self.log_error("Could not create symbolic links in output directory") + self.log_error("Could not create symbolic links " + "in output directory") return False # Run grib index application to generate index files @@ -158,26 +261,29 @@ def run_at_time_once(self, input_dict): return False # create empty fort.14 file - self.create_fort_14_file(output_dir) + self.create_fort_14_file() # create fort.15 file with list of all forecast leads and indices - self.create_fort_15_file(output_dir, all_lead_minutes) + self.create_fort_15_file(lead_minutes) - # substitute values from config into template.nml and write input.nml to output dir - if not self.fill_output_nml_template(output_dir): + # substitute values from config into template.nml and + # write input.nml to output directory + if not self.fill_output_nml_template(input_dict): return False # run tracker application from output directory passing in input.nml - if not self.run_tracker(output_dir): + if not self.run_tracker(): return False # rename fort.64 output file to output filename template + if not self.rename_fort_64_to_output_path(input_dict): + return False return True def get_all_input_files(self, input_dict): all_input_files = [] - all_lead_minutes = [] + lead_minutes = [] # get forecast leads to loop over lead_seq = get_lead_sequence(self.config, input_dict) @@ -192,12 +298,13 @@ def get_all_input_files(self, input_dict): return_list=True) all_input_files.extend(input_files) - all_lead_minutes.append(time_info.get('lead_minutes')) + lead_minutes.append(time_info.get('lead_minutes')) - return all_input_files, sorted(all_lead_minutes) + return all_input_files, sorted(lead_minutes) - def link_files_to_output_dir(self, output_dir, all_input_files, tc_vitals_file): + def link_files_to_output_dir(self, all_input_files, tc_vitals_file): all_output_files = [] + output_dir = self.c_dict.get('OUTPUT_DIR') # create symbolic links for input files for src_path in all_input_files: @@ -217,7 +324,7 @@ def _create_symlink(self, src_path, output_dir): self.logger.debug(f"Removing existing symbolic link: {dest_path}") os.unlink(dest_path) - self.logger.debug(f"Creating symbolic link in {output_dir} for {src_file}") + self.logger.debug(f"Creating sym link in {output_dir} for {src_file}") os.symlink(src_path, dest_path) return dest_path @@ -233,16 +340,18 @@ def run_grib_index(self, all_output_files): return True - def create_fort_14_file(self, output_dir): + def create_fort_14_file(self): + output_dir = self.c_dict.get('OUTPUT_DIR') fort_14_path = os.path.join(output_dir, 'fort.14') self.logger.debug(f"Writing fort.14 file: {fort_14_path}") with open(fort_14_path, 'w') as file_handle: pass - def create_fort_15_file(self, output_dir, all_lead_minutes): + def create_fort_15_file(self, all_lead_minutes): # format must match index (starting with 1) taking up 4 characters # then forecast lead minutes taking up 5 characters - pad with spaces file_lines = [] + output_dir = self.c_dict.get('OUTPUT_DIR') for index, lead_minutes in enumerate(all_lead_minutes, start=1): file_lines.append(f"{str(index).rjust(4)} {str(lead_minutes).rjust(5)}") @@ -254,13 +363,13 @@ def create_fort_15_file(self, output_dir, all_lead_minutes): with open(fort_15_path, 'w') as file_handle: file_handle.write(write_content) - def fill_output_nml_template(self, output_dir): + def fill_output_nml_template(self, input_dict): template_file = self.c_dict['NML_TEMPLATE_FILE'] if not template_file: return False # set up dictionary of text to substitute in XML file -# sub_dict = self.populate_sub_dict(time_info) + sub_dict = self.populate_sub_dict(input_dict) # open template file and replace any values encountered with open(template_file, 'r') as file_handle: @@ -269,13 +378,13 @@ def fill_output_nml_template(self, output_dir): output_lines = [] for input_line in input_lines: output_line = input_line -# for replace_string, value in sub_dict.items(): -# output_line = output_line.replace(f"${{{replace_string}}}", -# value) + for replace_string, value in sub_dict.items(): + output_line = output_line.replace(f"${{{replace_string}}}", + value) output_lines.append(output_line) # write tmp file with XML content with substituted values - out_path = os.path.join(output_dir, + out_path = os.path.join(self.c_dict.get('OUTPUT_DIR'), 'input.nml') self.logger.debug(f"Writing file: {out_path}") with open(out_path, 'w') as file_handle: @@ -284,7 +393,27 @@ def fill_output_nml_template(self, output_dir): return True - def run_tracker(self, output_dir): + def populate_sub_dict(self, time_info): + sub_dict = {} + + for name, input_type in self.CONFIG_NAMES.items(): + value = self.c_dict.get(f'REPLACE_CONF_{name}') + if input_type == 'bool': + value = '"y"' if value else '"n"' + elif input_type == 'int' or input_type == 'float': + value = str(value) + else: + value = f'"{util.remove_quotes(value)}"' + + value = do_string_sub(value, + **time_info) + + sub_dict[f'METPLUS_{name}'] = value + + return sub_dict + + def run_tracker(self): + output_dir = self.c_dict.get('OUTPUT_DIR') command = (f"cd {output_dir}; " f"{self.c_dict['TRACKER_APP']} " f"< input.nml; " @@ -292,3 +421,31 @@ def run_tracker(self, output_dir): f"cd -; " f"if [ $ret != 0 ]; then false; fi") return self.run_command(command) + + def rename_fort_64_to_output_path(self, time_info): + output_dir = self.c_dict.get('OUTPUT_DIR') + + # check that fort.64 file was created successfully + fort_64_path = os.path.join(output_dir, 'fort.64') + if not os.path.exists(fort_64_path): + self.log_error(f"Could not find output file: {fort_64_path}") + return False + + output_path = os.path.join(output_dir, + self.c_dict.get('OUTPUT_TEMPLATE')) + output_path = do_string_sub(output_path, **time_info) + + # create parent directory of output path if it does not exist + parent_dir = os.path.dirname(output_path) + if not os.path.exists(parent_dir): + self.logger.debug(f"Creating output directory: {parent_dir}") + + # copy fort.64 file to new file name + self.logger.debug(f"Copying fort.64 file to: {output_path}") + try: + shutil.copyfile(fort_64_path, output_path) + except OSError as err: + self.log_error(f"Could not copy file: {err}") + return False + + return True diff --git a/metplus/wrappers/met_db_load_wrapper.py b/metplus/wrappers/met_db_load_wrapper.py index cf5ef77b2d..e1a09e6127 100755 --- a/metplus/wrappers/met_db_load_wrapper.py +++ b/metplus/wrappers/met_db_load_wrapper.py @@ -81,10 +81,10 @@ def create_c_dict(self): ) # read config variables - for name, type in self.CONFIG_NAMES.items(): - if type == 'int': + for name, input_type in self.CONFIG_NAMES.items(): + if input_type == 'int': get_fct = self.config.getint - elif type == 'bool': + elif input_type == 'bool': get_fct = self.config.getbool else: get_fct = self.config.getraw @@ -207,9 +207,9 @@ def populate_sub_dict(self, time_info): formatted_stat_dirs = self.format_stat_dirs(stat_dirs) sub_dict['METPLUS_INPUT_PATHS'] = formatted_stat_dirs - for name, type in self.CONFIG_NAMES.items(): + for name, input_type in self.CONFIG_NAMES.items(): value = str(self.c_dict.get(f'MV_{name}')) - if type == 'bool': + if input_type == 'bool': value = value.lower() value = do_string_sub(value, diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index 6d53cc42fb..52d7aee830 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -27,7 +27,6 @@ GFDL_TRACKER_OUTPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H} GFDL_TRACKER_GRIB_VERSION = 1 -#GFDL_TRACKER_ GFDL_TRACKER_NML_TEMPLATE_FILE = {PARM_BASE}/use_cases/met_tool_wrapper/GFDLTracker/template.nml GFDL_TRACKER_DATEIN_INP_BCC = 20 diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml index d7207ac201..df07971316 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml @@ -19,106 +19,105 @@ / &trackerinfo - trkrinfo%type = "tracker", - trkrinfo%mslpthresh = 0.0015, - trkrinfo%use_backup_mslp_grad_check = "y", - trkrinfo%v850thresh = 1.5, - trkrinfo%use_backup_850_vt_check = "y", - trkrinfo%enable_timing = 1, - trkrinfo%gridtype = "regional", - trkrinfo%contint = 100.0, - trkrinfo%want_oci = T, - trkrinfo%out_vit = "y", - trkrinfo%use_land_mask = "y", - trkrinfo%inp_data_type = "grib", - trkrinfo%gribver = 1, - trkrinfo%g2_jpdtn = 0, - trkrinfo%g2_mslp_parm_id = 192, - trkrinfo%g1_mslp_parm_id = 2, - trkrinfo%g1_sfcwind_lev_typ = 105, - trkrinfo%g1_sfcwind_lev_val = 10, + trkrinfo%type = ${METPLUS_TRACKERINFO_TYPE}, + trkrinfo%mslpthresh = ${METPLUS_TRACKERINFO_MSLPTHRESH}, + trkrinfo%use_backup_mslp_grad_check = ${METPLUS_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK}, + trkrinfo%v850thresh = ${METPLUS_TRACKERINFO_V850THRESH}, + trkrinfo%use_backup_850_vt_check = ${METPLUS_TRACKERINFO_USE_BACKUP_850_VT_CHECK}, + trkrinfo%enable_timing = ${METPLUS_TRACKERINFO_ENABLE_TIMING}, + trkrinfo%gridtype = ${METPLUS_TRACKERINFO_GRIDTYPE}, + trkrinfo%contint = ${METPLUS_TRACKERINFO_CONTINT}, + trkrinfo%want_oci = ${METPLUS_TRACKERINFO_WANT_OCI}, + trkrinfo%out_vit = ${METPLUS_TRACKERINFO_OUT_VIT}, + trkrinfo%use_land_mask = ${METPLUS_TRACKERINFO_USE_LAND_MASK}, + trkrinfo%inp_data_type = ${METPLUS_TRACKERINFO_INP_DATA_TYPE}, + trkrinfo%gribver = ${METPLUS_TRACKERINFO_GRIBVER}, + trkrinfo%g2_jpdtn = ${METPLUS_TRACKERINFO_G2_JPDTN}, + trkrinfo%g2_mslp_parm_id = ${METPLUS_TRACKERINFO_G2_MSLP_PARM_ID}, + trkrinfo%g1_mslp_parm_id = ${METPLUS_TRACKERINFO_G1_MSLP_PARM_ID}, + trkrinfo%g1_sfcwind_lev_typ = ${METPLUS_TRACKERINFO_G1_SFCWIND_LEV_TYP}, + trkrinfo%g1_sfcwind_lev_val = ${METPLUS_TRACKERINFO_G1_SFCWIND_LEV_VAL}, / &phaseinfo - phaseflag = "y", - phasescheme = "both", - wcore_depth = 1.0, + phaseflag = ${METPLUS_PHASEINFO_PHASEFLAG}, + phasescheme = ${METPLUS_PHASEINFO_PHASESCHEME}, + wcore_depth = ${METPLUS_PHASEINFO_WCORE_DEPTH}, / &structinfo - structflag = "n", - ikeflag = "n", + structflag = ${METPLUS_STRUCTINFO_STRUCTFLAG}, + ikeflag = ${METPLUS_STRUCTINFO_IKEFLAG}, / &fnameinfo - gmodname = "hwrf", - rundescr = "25x25", - atcfdescr = "EP152016", + gmodname = ${METPLUS_FNAMEINFO_GMODNAME}, + rundescr = ${METPLUS_FNAMEINFO_RUNDESCR}, + atcfdescr = ${METPLUS_FNAMEINFO_ATCFDESCR}, / &waitinfo - use_waitfor = "y", - wait_min_age = 10, - wait_min_size = 100, - wait_max_wait = 3600, - wait_sleeptime = 5, - use_per_fcst_command = "y", - per_fcst_command = "./deliver %[FHOUR] %[FMIN]", + use_waitfor = ${METPLUS_WAITINFO_USE_WAITFOR}, + wait_min_age = ${METPLUS_WAITINFO_WAIT_MIN_AGE}, + wait_min_size = ${METPLUS_WAITINFO_WAIT_MIN_SIZE}, + wait_max_wait = ${METPLUS_WAITINFO_WAIT_MAX_WAIT}, + wait_sleeptime = ${METPLUS_WAITINFO_WAIT_SLEEPTIME}, + use_per_fcst_command = ${METPLUS_WAITINFO_USE_PER_FCST_COMMAND}, + per_fcst_command = ${METPLUS_WAITINFO_PER_FCST_COMMAND}, / &netcdflist - netcdfinfo%lat_name = "", - netcdfinfo%lmaskname = "", - netcdfinfo%lon_name = "", - netcdfinfo%mslpname = "", - netcdfinfo%netcdf_filename = "", - netcdfinfo%num_netcdf_vars = 0, - netcdfinfo%rv700name = "", - netcdfinfo%rv850name = "", - netcdfinfo%time_name = "", - netcdfinfo%time_units = "", - netcdfinfo%tmean_300_500_name = "", - netcdfinfo%u500name = "", - netcdfinfo%u700name = "", - netcdfinfo%u850name = "", - netcdfinfo%usfcname = "", - netcdfinfo%v500name = "", - netcdfinfo%v700name = "", - netcdfinfo%v850name = "", - netcdfinfo%vsfcname = "", - netcdfinfo%z200name = "", - netcdfinfo%z300name = "", - netcdfinfo%z350name = "", - netcdfinfo%z400name = "", - netcdfinfo%z450name = "", - netcdfinfo%z500name = "", - netcdfinfo%z550name = "", - netcdfinfo%z600name = "", - netcdfinfo%z650name = "", - netcdfinfo%z700name = "", - netcdfinfo%z750name = "", - netcdfinfo%z800name = "", - netcdfinfo%z850name = "", - netcdfinfo%z900name = "", + netcdfinfo%lat_name = ${METPLUS_NETCDFINFO_LAT_NAME}, + netcdfinfo%lmaskname = ${METPLUS_NETCDFINFO_LMASKNAME}, + netcdfinfo%lon_name = ${METPLUS_NETCDFINFO_LON_NAME}, + netcdfinfo%mslpname = ${METPLUS_NETCDFINFO_MSLPNAME}, + netcdfinfo%netcdf_filename = ${METPLUS_NETCDFINFO_NETCDF_FILENAME}, + netcdfinfo%num_netcdf_vars = ${METPLUS_NETCDFINFO_NUM_NETCDF_VARS}, + netcdfinfo%rv700name = ${METPLUS_NETCDFINFO_RV700NAME}, + netcdfinfo%rv850name = ${METPLUS_NETCDFINFO_RV850NAME}, + netcdfinfo%time_name = ${METPLUS_NETCDFINFO_TIME_NAME}, + netcdfinfo%time_units = ${METPLUS_NETCDFINFO_TIME_UNITS}, + netcdfinfo%tmean_300_500_name = ${METPLUS_NETCDFINFO_TMEAN_300_500_NAME}, + netcdfinfo%u500name = ${METPLUS_NETCDFINFO_U500NAME}, + netcdfinfo%u700name = ${METPLUS_NETCDFINFO_U700NAME}, + netcdfinfo%u850name = ${METPLUS_NETCDFINFO_U850NAME}, + netcdfinfo%usfcname = ${METPLUS_NETCDFINFO_USFCNAME}, + netcdfinfo%v500name = ${METPLUS_NETCDFINFO_V500NAME}, + netcdfinfo%v700name = ${METPLUS_NETCDFINFO_V700NAME}, + netcdfinfo%v850name = ${METPLUS_NETCDFINFO_V850NAME}, + netcdfinfo%vsfcname = ${METPLUS_NETCDFINFO_VSFCNAME}, + netcdfinfo%z200name = ${METPLUS_NETCDFINFO_Z200NAME}, + netcdfinfo%z300name = ${METPLUS_NETCDFINFO_Z300NAME}, + netcdfinfo%z350name = ${METPLUS_NETCDFINFO_Z350NAME}, + netcdfinfo%z400name = ${METPLUS_NETCDFINFO_Z400NAME}, + netcdfinfo%z450name = ${METPLUS_NETCDFINFO_Z450NAME}, + netcdfinfo%z500name = ${METPLUS_NETCDFINFO_Z500NAME}, + netcdfinfo%z550name = ${METPLUS_NETCDFINFO_Z550NAME}, + netcdfinfo%z600name = ${METPLUS_NETCDFINFO_Z600NAME}, + netcdfinfo%z650name = ${METPLUS_NETCDFINFO_Z650NAME}, + netcdfinfo%z700name = ${METPLUS_NETCDFINFO_Z700NAME}, + netcdfinfo%z750name = ${METPLUS_NETCDFINFO_Z750NAME}, + netcdfinfo%z800name = ${METPLUS_NETCDFINFO_Z800NAME}, + netcdfinfo%z850name = ${METPLUS_NETCDFINFO_Z850NAME}, + netcdfinfo%z900name = ${METPLUS_NETCDFINFO_Z900NAME}, / &parmpreflist - user_wants_to_track_zeta700 = "y", - user_wants_to_track_wcirc850 = "y", - user_wants_to_track_wcirc700 = "y", - user_wants_to_track_gph850 = "y", - user_wants_to_track_gph700 = "y", - user_wants_to_track_mslp = "y", - user_wants_to_track_wcircsfc = "y", - user_wants_to_track_zetasfc = "y", - user_wants_to_track_thick500850 = "y", - user_wants_to_track_thick200500 = "n", - user_wants_to_track_thick200850 = "y", - user_wants_to_track_zeta850 = "y", + user_wants_to_track_zeta700 = ${METPLUS_USER_WANTS_TO_TRACK_ZETA700}, + user_wants_to_track_wcirc850 = ${METPLUS_USER_WANTS_TO_TRACK_WCIRC850}, + user_wants_to_track_wcirc700 = ${METPLUS_USER_WANTS_TO_TRACK_WCIRC700}, + user_wants_to_track_gph850 = ${METPLUS_USER_WANTS_TO_TRACK_GPH850}, + user_wants_to_track_gph700 = ${METPLUS_USER_WANTS_TO_TRACK_GPH700}, + user_wants_to_track_mslp = ${METPLUS_USER_WANTS_TO_TRACK_MSLP}, + user_wants_to_track_wcircsfc = ${METPLUS_USER_WANTS_TO_TRACK_WCIRCSFC}, + user_wants_to_track_zetasfc = ${METPLUS_USER_WANTS_TO_TRACK_ZETASFC}, + user_wants_to_track_thick500850 = ${METPLUS_USER_WANTS_TO_TRACK_THICK500850}, + user_wants_to_track_thick200500 = ${METPLUS_USER_WANTS_TO_TRACK_THICK200500}, + user_wants_to_track_thick200850 = ${METPLUS_USER_WANTS_TO_TRACK_THICK200850}, + user_wants_to_track_zeta850 = ${METPLUS_USER_WANTS_TO_TRACK_ZETA850}, / &verbose - verb = 3, - verb_g2 = 0, + verb = ${METPLUS_VERBOSE_VERB}, + verb_g2 = ${METPLUS_VERBOSE_VERB_G2}, / - From b128ca333832f8641e170984400ca24fd0691d74 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:01:38 -0600 Subject: [PATCH 06/25] properly handle if value of boolean config variable is "y" or "n" --- metplus/util/config_metplus.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/metplus/util/config_metplus.py b/metplus/util/config_metplus.py index 25a1b19e84..148826dfa7 100644 --- a/metplus/util/config_metplus.py +++ b/metplus/util/config_metplus.py @@ -830,12 +830,20 @@ def getbool(self, sec, name, default=None, badtypeok=False, morevars=None, taskv return default except ValueError: # check if it was an empty string and return default or False if so - if not super().getstr(sec, name): + value_string = super().getstr(sec, name) + if not value_string: if default: return default return False + # check if value is y/Y/n/N and return True/False if so + value_string = util.remove_quotes(value_string) + if value_string.lower() == 'y': + return True + if value_string.lower() == 'n': + return False + # if value is not correct type, log error and return None self.logger.error(f"[{sec}] {name} must be an boolean.") return None From 271b259ff8589d069e2501751b924e93f4cf9163 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:28:47 -0600 Subject: [PATCH 07/25] replace values with time info, fixed call to function that removes quotes --- metplus/wrappers/gfdl_tracker_wrapper.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index f37c772b2d..67706924e1 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -14,6 +14,7 @@ import shutil from ..util import do_string_sub, ti_calculate, get_lead_sequence +from ..util import remove_quotes from . import CommandBuilder class GFDLTrackerWrapper(CommandBuilder): @@ -372,6 +373,7 @@ def fill_output_nml_template(self, input_dict): sub_dict = self.populate_sub_dict(input_dict) # open template file and replace any values encountered + self.logger.debug(f"Reading nml template: {template_file}") with open(template_file, 'r') as file_handle: input_lines = file_handle.read().splitlines() @@ -403,13 +405,22 @@ def populate_sub_dict(self, time_info): elif input_type == 'int' or input_type == 'float': value = str(value) else: - value = f'"{util.remove_quotes(value)}"' + value = f'"{remove_quotes(value)}"' value = do_string_sub(value, **time_info) sub_dict[f'METPLUS_{name}'] = value + # set replacement variables for time information + init_ymdh = time_info['init'].strftime('%Y%m%d%H') + sub_dict['METPLUS_DATEIN_INP_BCC'] = init_ymdh[0:2] + sub_dict['METPLUS_DATEIN_INP_BYY'] = init_ymdh[2:4] + sub_dict['METPLUS_DATEIN_INP_BMM'] = init_ymdh[4:6] + sub_dict['METPLUS_DATEIN_INP_BDD'] = init_ymdh[6:8] + sub_dict['METPLUS_DATEIN_INP_BHH'] = init_ymdh[8:10] + sub_dict['METPLUS_ATCFINFO_ATCFYMDH'] = init_ymdh + return sub_dict def run_tracker(self): From d012c5ecd6e5ae0777d21a0338538ca507604701 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:42:13 -0600 Subject: [PATCH 08/25] handle string variable that does not have quotes around the value --- metplus/wrappers/gfdl_tracker_wrapper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index 67706924e1..083c56b1d0 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -37,7 +37,7 @@ class GFDLTrackerWrapper(CommandBuilder): "TRACKERINFO_ENABLE_TIMING": "int", "TRACKERINFO_GRIDTYPE": "string", "TRACKERINFO_CONTINT": "float", - "TRACKERINFO_WANT_OCI": "string", + "TRACKERINFO_WANT_OCI": "string-no-quotes", "TRACKERINFO_OUT_VIT": "bool", "TRACKERINFO_USE_LAND_MASK": "bool", "TRACKERINFO_INP_DATA_TYPE": "string", @@ -405,7 +405,9 @@ def populate_sub_dict(self, time_info): elif input_type == 'int' or input_type == 'float': value = str(value) else: - value = f'"{remove_quotes(value)}"' + value = remove_quotes(value) + if 'no-quotes' not in input_type: + value = f'"{value}"' value = do_string_sub(value, **time_info) From 8e4ec8d9f1a82849ae6351a0e1c2f8b5d5b6acfc Mon Sep 17 00:00:00 2001 From: George McCabe Date: Mon, 12 Jul 2021 16:38:20 -0600 Subject: [PATCH 09/25] added support for using a wildcard for finding the forecast leads to use --- metplus/util/met_util.py | 4 +++ metplus/wrappers/gfdl_tracker_wrapper.py | 32 +++++++++++++++++-- .../GFDLTracker/GFDLTracker_TC.conf | 7 ++-- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/metplus/util/met_util.py b/metplus/util/met_util.py index 251d596171..e4fba1f83f 100644 --- a/metplus/util/met_util.py +++ b/metplus/util/met_util.py @@ -1058,6 +1058,10 @@ def get_lead_sequence(config, input_dict=None, wildcard_if_empty=False): return None if lead_seq: + # return lead sequence if wildcard characters are used + if lead_seq == ['*']: + return lead_seq + out_leads = handle_lead_seq(config, lead_seq, lead_min, diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index 083c56b1d0..78d9043b18 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -14,7 +14,7 @@ import shutil from ..util import do_string_sub, ti_calculate, get_lead_sequence -from ..util import remove_quotes +from ..util import remove_quotes, parse_template from . import CommandBuilder class GFDLTrackerWrapper(CommandBuilder): @@ -198,6 +198,9 @@ def create_c_dict(self): value = get_fct('config', f'GFDL_TRACKER_{name}', '') c_dict[f'REPLACE_CONF_{name}'] = value + # allow multiple input files + c_dict['ALLOW_MULTIPLE_FILES'] = True + if not c_dict['INPUT_TEMPLATE']: self.log_error('GFDL_TRACKER_INPUT_TEMPLATE must be set') @@ -297,12 +300,35 @@ def get_all_input_files(self, input_dict): time_info = ti_calculate(input_dict) input_files = self.find_data(time_info=time_info, return_list=True) - all_input_files.extend(input_files) - lead_minutes.append(time_info.get('lead_minutes')) + # add input files to list unless they are index files (.ix) + input_files = [input_file for input_file in input_files + if not input_file.endswith('.ix')] + for input_file in input_files: + all_input_files.append(input_file) + + if lead != '*': + lead_minutes.append(time_info.get('lead_minutes')) + continue + + # extract lead time from each file found via wildcard + new_lead_minutes = self._get_leads_from_template(input_files) + lead_minutes.extend(new_lead_minutes) return all_input_files, sorted(lead_minutes) + def _get_leads_from_template(self, input_files): + # extract lead time from each file found via wildcard + lead_minutes_list = [] + template = os.path.join(self.c_dict.get('INPUT_DIR'), + self.c_dict.get('INPUT_TEMPLATE')) + for input_file in input_files: + file_time_info = parse_template(template, input_file) + if file_time_info: + lead_minutes_list.append(file_time_info.get('lead_minutes')) + + return lead_minutes_list + def link_files_to_output_dir(self, all_input_files, tc_vitals_file): all_output_files = [] output_dir = self.c_dict.get('OUTPUT_DIR') diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index 52d7aee830..ea5d973d81 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -10,13 +10,14 @@ INIT_BEG = 2016090600 INIT_END = 2016090600 #LEAD_SEQ = begin_end_incr(0, 9, 1)H, begin_end_incr(12,126,3)H -#LEAD_SEQ = * -LEAD_SEQ = begin_end_incr(0, 18, 6)H +LEAD_SEQ = * +#LEAD_SEQ = begin_end_incr(0, 18, 6)H # GFDL_TRACKER_BASE should go in user config GFDL_TRACKER_BASE = /glade/work/biswas/standalone_gfdl-vortextracker_v3.9a -GFDL_TRACKER_INPUT_DIR = /glade/work/mccabe/GFDL/tc_tracking/data +#GFDL_TRACKER_INPUT_DIR = /glade/work/mccabe/GFDL/tc_tracking/data +GFDL_TRACKER_INPUT_DIR = /glade/work/biswas/data_tracker/hwrf_v3.9a GFDL_TRACKER_INPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H}.f{lead?fmt=%5M} GFDL_TRACKER_TC_VITALS_INPUT_DIR = {GFDL_TRACKER_INPUT_DIR} From f892d636f88a008454a7a58eee6cf909d0dc7e0d Mon Sep 17 00:00:00 2001 From: George McCabe Date: Tue, 13 Jul 2021 09:42:23 -0600 Subject: [PATCH 10/25] remove sym links after running tracker --- metplus/wrappers/gfdl_tracker_wrapper.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index 78d9043b18..da480667bd 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -253,8 +253,9 @@ def run_at_time_once(self, input_dict): os.makedirs(output_dir) # create sym link to output directory for all files (including tcvit) - all_output_files = self.link_files_to_output_dir(all_input_files, - tc_vitals_file) + all_output_files, tc_vitals_out = ( + self.link_files_to_output_dir(all_input_files, tc_vitals_file) + ) if not all_output_files: self.log_error("Could not create symbolic links " "in output directory") @@ -283,6 +284,12 @@ def run_at_time_once(self, input_dict): if not self.rename_fort_64_to_output_path(input_dict): return False + # remove sym links from output directory + for link_path in all_output_files: + self._remove_symlink(link_path) + + self._remove_symlink(tc_vitals_out) + return True def get_all_input_files(self, input_dict): @@ -339,23 +346,26 @@ def link_files_to_output_dir(self, all_input_files, tc_vitals_file): all_output_files.append(dest_path) # create symbolic links for TCVitals file - self._create_symlink(tc_vitals_file, output_dir) + tc_vitals_out = self._create_symlink(tc_vitals_file, output_dir) - return all_output_files + return all_output_files, tc_vitals_out def _create_symlink(self, src_path, output_dir): src_file = os.path.basename(src_path) dest_path = os.path.join(output_dir, src_file) - if os.path.islink(dest_path): - self.logger.debug(f"Removing existing symbolic link: {dest_path}") - os.unlink(dest_path) + self._remove_symlink(dest_path) self.logger.debug(f"Creating sym link in {output_dir} for {src_file}") os.symlink(src_path, dest_path) return dest_path + def _remove_symlink(self, link_path): + if os.path.islink(link_path): + self.logger.debug(f"Removing existing symbolic link: {link_path}") + os.unlink(link_path) + def run_grib_index(self, all_output_files): index_script = self.c_dict.get('INDEX_APP') cmd_name = os.path.basename(index_script) From 005c7000a1960ae323ba4d586f633af2fa7b2846 Mon Sep 17 00:00:00 2001 From: George McCabe Date: Tue, 13 Jul 2021 09:44:34 -0600 Subject: [PATCH 11/25] clean up conf file --- .../GFDLTracker/GFDLTracker_TC.conf | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index ea5d973d81..c04bdce787 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -9,32 +9,23 @@ INIT_TIME_FMT = %Y%m%d%H INIT_BEG = 2016090600 INIT_END = 2016090600 -#LEAD_SEQ = begin_end_incr(0, 9, 1)H, begin_end_incr(12,126,3)H LEAD_SEQ = * #LEAD_SEQ = begin_end_incr(0, 18, 6)H +#LEAD_SEQ = begin_end_incr(0, 9, 1)H, begin_end_incr(12,126,3)H -# GFDL_TRACKER_BASE should go in user config -GFDL_TRACKER_BASE = /glade/work/biswas/standalone_gfdl-vortextracker_v3.9a - -#GFDL_TRACKER_INPUT_DIR = /glade/work/mccabe/GFDL/tc_tracking/data -GFDL_TRACKER_INPUT_DIR = /glade/work/biswas/data_tracker/hwrf_v3.9a +GFDL_TRACKER_INPUT_DIR = {INPUT_BASE}/met_test/gfdl/tc GFDL_TRACKER_INPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H}.f{lead?fmt=%5M} GFDL_TRACKER_TC_VITALS_INPUT_DIR = {GFDL_TRACKER_INPUT_DIR} GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE = tcvit_rsmc_storms.txt -GFDL_TRACKER_OUTPUT_DIR = {OUTPUT_BASE}/gfdl_tracker +GFDL_TRACKER_OUTPUT_DIR = {OUTPUT_BASE}/gfdl_tracker/tc GFDL_TRACKER_OUTPUT_TEMPLATE = hwrf.25x25.EP152016.{init?fmt=%Y%m%d%H} GFDL_TRACKER_GRIB_VERSION = 1 GFDL_TRACKER_NML_TEMPLATE_FILE = {PARM_BASE}/use_cases/met_tool_wrapper/GFDLTracker/template.nml -GFDL_TRACKER_DATEIN_INP_BCC = 20 -GFDL_TRACKER_DATEIN_INP_BYY = 16 -GFDL_TRACKER_DATEIN_INP_BMM = 09 -GFDL_TRACKER_DATEIN_INP_BDD = 06 -GFDL_TRACKER_DATEIN_INP_BHH = 00 GFDL_TRACKER_DATEIN_INP_MODEL = 17 GFDL_TRACKER_DATEIN_INP_MODTYP = "regional" GFDL_TRACKER_DATEIN_INP_LT_UNITS = "hours" @@ -43,7 +34,6 @@ GFDL_TRACKER_DATEIN_INP_NESTTYP = "moveable" GFDL_TRACKER_ATCFINFO_ATCFNUM = 81 GFDL_TRACKER_ATCFINFO_ATCFNAME = "HWRF" -GFDL_TRACKER_ATCFINFO_ATCFYMDH = 2016090600 GFDL_TRACKER_ATCFINFO_ATCFFREQ = 100 GFDL_TRACKER_TRACKERINFO_TYPE = "tracker" From 07a3689bcc974b0b5fc85957596bcca2ba0387b8 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:07:15 -0600 Subject: [PATCH 12/25] changed default env argument to gempak --- .github/actions/run_tests/Dockerfile.run_gempak | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/actions/run_tests/Dockerfile.run_gempak diff --git a/.github/actions/run_tests/Dockerfile.run_gempak b/.github/actions/run_tests/Dockerfile.run_gempak new file mode 100644 index 0000000000..ac649ca382 --- /dev/null +++ b/.github/actions/run_tests/Dockerfile.run_gempak @@ -0,0 +1,11 @@ +ARG METPLUS_ENV_TAG=gempak +ARG METPLUS_IMG_TAG=develop + +FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env + +ARG METPLUS_IMG_TAG=develop +FROM dtcenter/metplus-dev:${METPLUS_IMG_TAG} + +COPY --from=env /usr/lib/jvm/jre /usr/lib/jvm/jre/ +COPY --from=env /usr/share/javazi-1.8/tzdb.dat /usr/share/javazi-1.8/ +COPY --from=env /data/input/GempakToCF.jar /data/input/GempakToCF.jar From e576f2df1933b9b7d740d934e02e7bf5a7e377b3 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:09:51 -0600 Subject: [PATCH 13/25] added gfdl docker file for running use cases and renamed docker files used to run cases to include run in the name --- .github/actions/run_tests/Dockerfile.gempak | 11 ----------- .github/actions/run_tests/Dockerfile.run_gempak | 2 +- .github/actions/run_tests/Dockerfile.run_gfdl | 11 +++++++++++ .github/jobs/setup_and_run_use_cases.py | 9 +++++---- 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 .github/actions/run_tests/Dockerfile.gempak create mode 100644 .github/actions/run_tests/Dockerfile.run_gfdl diff --git a/.github/actions/run_tests/Dockerfile.gempak b/.github/actions/run_tests/Dockerfile.gempak deleted file mode 100644 index 5f9691115c..0000000000 --- a/.github/actions/run_tests/Dockerfile.gempak +++ /dev/null @@ -1,11 +0,0 @@ -ARG METPLUS_ENV_TAG=metplus_base -ARG METPLUS_IMG_TAG=develop - -FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env - -ARG METPLUS_IMG_TAG=develop -FROM dtcenter/metplus-dev:${METPLUS_IMG_TAG} - -COPY --from=env /usr/lib/jvm/jre /usr/lib/jvm/jre/ -COPY --from=env /usr/share/javazi-1.8/tzdb.dat /usr/share/javazi-1.8/ -COPY --from=env /data/input/GempakToCF.jar /data/input/GempakToCF.jar diff --git a/.github/actions/run_tests/Dockerfile.run_gempak b/.github/actions/run_tests/Dockerfile.run_gempak index ac649ca382..5f9691115c 100644 --- a/.github/actions/run_tests/Dockerfile.run_gempak +++ b/.github/actions/run_tests/Dockerfile.run_gempak @@ -1,4 +1,4 @@ -ARG METPLUS_ENV_TAG=gempak +ARG METPLUS_ENV_TAG=metplus_base ARG METPLUS_IMG_TAG=develop FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env diff --git a/.github/actions/run_tests/Dockerfile.run_gfdl b/.github/actions/run_tests/Dockerfile.run_gfdl new file mode 100644 index 0000000000..8876e567e0 --- /dev/null +++ b/.github/actions/run_tests/Dockerfile.run_gfdl @@ -0,0 +1,11 @@ +ARG METPLUS_ENV_TAG=gfdl-tracker +ARG METPLUS_IMG_TAG=develop + +FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env + +ARG METPLUS_IMG_TAG=develop +FROM dtcenter/metplus-dev:${METPLUS_IMG_TAG} + +COPY --from=env /usr/local/lib/libnetcdf.so.19* /usr/local/lib/ +COPY --from=env /usr/local/lib/libnetcdff* /usr/local/lib/ +COPY --from=env /standalone_gfdl-vortextracker_v3.9a_gcc/trk_exec/* /usr/local/bin/ diff --git a/.github/jobs/setup_and_run_use_cases.py b/.github/jobs/setup_and_run_use_cases.py index cc7ee515b7..1a54b84702 100755 --- a/.github/jobs/setup_and_run_use_cases.py +++ b/.github/jobs/setup_and_run_use_cases.py @@ -70,11 +70,12 @@ def main(): else: env_tag = 'metplus_base' - # get Dockerfile to use (gempak if using gempak) + # get Dockerfile to use + dockerfile_name = 'Dockerfile.run' if 'gempak' in str(requirements).lower(): - dockerfile_name = 'Dockerfile.gempak' - else: - dockerfile_name = 'Dockerfile.run' + dockerfile_name = f'{dockerfile_name}_gempak' + elif 'gfdl' in str(requirements).lower(): + dockerfile_name = f'{dockerfile_name}_gfdl' docker_build_cmd = ( f"docker build -t {run_tag} " From acd6b665df00eba9d38e2510141f38e968f96f96 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:10:23 -0600 Subject: [PATCH 14/25] changed default env tag to gempak --- .github/actions/run_tests/Dockerfile.run_gempak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_tests/Dockerfile.run_gempak b/.github/actions/run_tests/Dockerfile.run_gempak index 5f9691115c..ac649ca382 100644 --- a/.github/actions/run_tests/Dockerfile.run_gempak +++ b/.github/actions/run_tests/Dockerfile.run_gempak @@ -1,4 +1,4 @@ -ARG METPLUS_ENV_TAG=metplus_base +ARG METPLUS_ENV_TAG=gempak ARG METPLUS_IMG_TAG=develop FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env From d2352fce2fb08fe5117e710ce488fd34f29fd6eb Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:16:16 -0600 Subject: [PATCH 15/25] added Dockerfile to build GFDL Tracker and added instructions on how to re-build it using Docker --- ci/docker/docker_env/Dockerfile.gfdl-tracker | 35 ++++++++++++++++++++ ci/docker/docker_env/README.md | 17 ++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ci/docker/docker_env/Dockerfile.gfdl-tracker diff --git a/ci/docker/docker_env/Dockerfile.gfdl-tracker b/ci/docker/docker_env/Dockerfile.gfdl-tracker new file mode 100644 index 0000000000..542fe5f5ff --- /dev/null +++ b/ci/docker/docker_env/Dockerfile.gfdl-tracker @@ -0,0 +1,35 @@ +FROM dtcenter/met:10.0.0 + +# Needed to install GFDL Tracker +ENV LIB_Z_PATH /usr/lib64 +ENV LIB_JASPER_PATH /usr/lib64 +ENV LIB_PNG_PATH /usr/lib64 + +# Needed to install NetCDF-Fortran +ENV NCDIR /usr/local + +# Install NetCDF-C 4.8.0 +RUN cd / \ + && curl https://codeload.github.com/Unidata/netcdf-c/tar.gz/refs/tags/v4.8.0 --output v4.8.0.tar.gz \ + && tar zxf v4.8.0.tar.gz \ + && cd netcdf-c-4.8.0 \ + && ./configure --disable-dap \ + && make check install + +# Install NetCDF-Fortran 4.5.3 +RUN cd / \ + && wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.5.3.tar.gz \ + && tar zxf v4.5.3.tar.gz \ + && cd netcdf-fortran-4.5.3 \ + && ./configure \ + && make check install + +RUN cd / \ + && wget https://dtcenter.ucar.edu/dfiles/code/METplus/gfdl_patch/standalone_gfdl-vortextracker_v3.9a_gcc.tar.gz \ + && tar zxf standalone_gfdl-vortextracker_v3.9a_gcc.tar.gz \ + && cd standalone_gfdl-vortextracker_v3.9a_gcc \ + && unset FC && unset CC \ + && ./configure \ + && mv configure.trk-docker-gnu configure.trk \ + && ./compile 2>&1 | tee tracker.log + diff --git a/ci/docker/docker_env/README.md b/ci/docker/docker_env/README.md index 0439b086af..57ed0b3a67 100644 --- a/ci/docker/docker_env/README.md +++ b/ci/docker/docker_env/README.md @@ -196,6 +196,23 @@ GempakToCF.jar file that is required to run use cases that read GEMPAK data. If this environment locally, Java should be available on the system you are running and the JAR file should be downloaded from the DTC website. +## gfdl-tracker (using Dockerfile.gfdl-tracker) + +### Docker + +``` +docker build -t dtcenter/metplus-envs:gfdl-tracker -f ./Dockerfile.gfdl-tracker . +docker push dtcenter/metplus-envs:gfdl-tracker +``` + +### Local + +This environment is not a conda environment. The Dockerfile installs the GFDL +Tracker and specific versions of the NetCDF-C and NetCDF-Fortran libraries +needed to install the tools. It is not recommended to follow these instructions +to install the GFDL Tracker using these steps. Please consult the documentation +for the tool for installation instructions. + ## pytest (from metplus_base) From ec47cc01395f0f50bed84d15d33a6b53cfb817ed Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:17:15 -0600 Subject: [PATCH 16/25] changed logic so that directory containing GFDL tracker executables does not need to be named trk_exec --- metplus/wrappers/gfdl_tracker_wrapper.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/metplus/wrappers/gfdl_tracker_wrapper.py b/metplus/wrappers/gfdl_tracker_wrapper.py index da480667bd..761c8fdf89 100755 --- a/metplus/wrappers/gfdl_tracker_wrapper.py +++ b/metplus/wrappers/gfdl_tracker_wrapper.py @@ -121,9 +121,9 @@ def create_c_dict(self): c_dict = super().create_c_dict() # get values from config object and set them to be accessed by wrapper - gfdl_tracker_base = self.config.getdir('GFDL_TRACKER_BASE', '') - if not gfdl_tracker_base: - self.log_error('GFDL_TRACKER_BASE must be set.') + gfdl_tracker_exec = self.config.getdir('GFDL_TRACKER_EXEC', '') + if not gfdl_tracker_exec: + self.log_error('GFDL_TRACKER_EXEC must be set.') return c_dict c_dict['INPUT_GRIB_VERSION'] = ( @@ -140,17 +140,15 @@ def create_c_dict(self): "must be 1 or 2") return c_dict - c_dict['INDEX_APP'] = os.path.join(gfdl_tracker_base, - 'trk_exec', - index_script_name) + c_dict['INDEX_APP'] = os.path.join(gfdl_tracker_exec, + index_script_name) if not os.path.exists(c_dict['INDEX_APP']): self.log_error("GRIB index exe does not exist: " f"{c_dict['INDEX_APP']}") - c_dict['TRACKER_APP'] = os.path.join(gfdl_tracker_base, - 'trk_exec', - 'gettrk.exe') + c_dict['TRACKER_APP'] = os.path.join(gfdl_tracker_exec, + 'gettrk.exe') if not os.path.exists(c_dict['TRACKER_APP']): self.log_error("GFDL tracker exe does not exist: " From 3618dc72a714aced71dba70c41324110670a8961 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:17:56 -0600 Subject: [PATCH 17/25] added placeholder path for GFDL Tracker exec directory to defaults.conf for reference --- parm/metplus_config/defaults.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parm/metplus_config/defaults.conf b/parm/metplus_config/defaults.conf index ea552326f6..5ae3cc9196 100644 --- a/parm/metplus_config/defaults.conf +++ b/parm/metplus_config/defaults.conf @@ -44,6 +44,8 @@ STAGING_DIR = {OUTPUT_BASE}/stage # in the user's path # # * Set GEMPAKTOCF_JAR to the full path of the jar file if processing # # GEMPAK data # +# * Set GFDL_TRACKER_EXEC to the full path of the directory containing the # +# executables that are run for the GFDL Tracker # ############################################################################### @@ -51,6 +53,7 @@ CONVERT = convert GEMPAKTOCF_JAR = GempakToCF.jar +GFDL_TRACKER_EXEC = /path/to/standalone_gfdl-vortextracker_v3.9a/trk_exec ############################################################################### # Runtime Configuration # From 34156832967db2c52b79300b14284db0699483b5 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:18:27 -0600 Subject: [PATCH 18/25] set config variable used in testing to find GFDL tracker exes --- .github/parm/test_settings.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/parm/test_settings.conf b/.github/parm/test_settings.conf index 9363b2fba6..05e7a5d005 100644 --- a/.github/parm/test_settings.conf +++ b/.github/parm/test_settings.conf @@ -10,4 +10,7 @@ LOG_METPLUS = {LOG_DIR}/metplus.log LOG_TIMESTAMP_TEMPLATE = # also set path to GempakToCF.jar for GEMPAK use cases -GEMPAKTOCF_JAR = /data/input/GempakToCF.jar \ No newline at end of file +GEMPAKTOCF_JAR = /data/input/GempakToCF.jar + +# also set location of GFDL Tracker executables +GFDL_TRACKER_EXEC = /usr/local/bin From 6d6b60cea00dc508ee34ec537c5bee8284f2cf9f Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:18:43 -0600 Subject: [PATCH 19/25] added new use case to automated tests --- .github/parm/use_case_groups.json | 5 +++++ internal_tests/use_cases/all_use_cases.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/parm/use_case_groups.json b/.github/parm/use_case_groups.json index c5c83157a9..7d37922cdb 100644 --- a/.github/parm/use_case_groups.json +++ b/.github/parm/use_case_groups.json @@ -4,6 +4,11 @@ "index_list": "0-54", "new": false }, + { + "category": "met_tool_wrapper", + "index_list": "55", + "new": true + }, { "category": "air_quality_and_comp", "index_list": "0", diff --git a/internal_tests/use_cases/all_use_cases.txt b/internal_tests/use_cases/all_use_cases.txt index 6a8935fb29..cefad4817c 100644 --- a/internal_tests/use_cases/all_use_cases.txt +++ b/internal_tests/use_cases/all_use_cases.txt @@ -54,7 +54,7 @@ Category: met_tool_wrapper 52::met_tool_wrapper/UserScript/UserScript_run_once_per_valid.conf 53::METdbLoad::met_tool_wrapper/METdbLoad/METdbLoad.conf:: metdatadb_env,metviewer 54::ExtractTiles_mtd::met_tool_wrapper/ExtractTiles/ExtractTiles_mtd.conf - +55::GFDLTracker_TC::met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf::gfdl-tracker_env Category: air_quality_and_comp 0::EnsembleStat_fcstICAP_obsMODIS_aod::model_applications/air_quality_and_comp/EnsembleStat_fcstICAP_obsMODIS_aod.conf From cb1a84842d14e1a47f8ca457ee7e97e5f654d781 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 15 Jul 2021 08:46:37 -0600 Subject: [PATCH 20/25] added newline --- parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf index c04bdce787..134828df81 100644 --- a/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf +++ b/parm/use_cases/met_tool_wrapper/GFDLTracker/GFDLTracker_TC.conf @@ -122,4 +122,4 @@ GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200850 = "y" GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA850 = "y" GFDL_TRACKER_VERBOSE_VERB = 3 -GFDL_TRACKER_VERBOSE_VERB_G2 = 0 \ No newline at end of file +GFDL_TRACKER_VERBOSE_VERB_G2 = 0 From c8275bf56036aec21d83f88c0c3541d56f1dc483 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 15 Jul 2021 08:46:47 -0600 Subject: [PATCH 21/25] started adding documentation for new wrapper --- docs/Users_Guide/wrappers.rst | 242 ++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index 98c8a47144..9cc197e03d 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -976,6 +976,248 @@ Configuration | :term:`GEN_VX_MASK_FILE_WINDOW_END` | +.. _gfdl_tracker_wrapper: + +GFDLTracker +=========== + +Description +----------- + +Used to call the GFDL Tracker applications to objectively analyze forecast data +to provide an estimate of the vortex center position (latitude and longitude), +and track the storm for the duration of the forecast. + +METplus Configuration +--------------------- + +| :term:`GFDL_TRACKER_BASE` +| :term:`GFDL_TRACKER_INPUT_DIR` +| :term:`GFDL_TRACKER_INPUT_TEMPLATE` +| :term:`GFDL_TRACKER_TC_VITALS_INPUT_DIR` +| :term:`GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE` +| :term:`GFDL_TRACKER_OUTPUT_DIR` +| :term:`GFDL_TRACKER_OUTPUT_TEMPLATE` +| :term:`GFDL_TRACKER_GRIB_VERSION` +| :term:`GFDL_TRACKER_NML_TEMPLATE_FILE` +| :term:`GFDL_TRACKER_DATEIN_INP_BCC` +| :term:`GFDL_TRACKER_DATEIN_INP_BYY` +| :term:`GFDL_TRACKER_DATEIN_INP_BMM` +| :term:`GFDL_TRACKER_DATEIN_INP_BDD` +| :term:`GFDL_TRACKER_DATEIN_INP_BHH` +| :term:`GFDL_TRACKER_DATEIN_INP_MODEL` +| :term:`GFDL_TRACKER_DATEIN_INP_MODTYP` +| :term:`GFDL_TRACKER_DATEIN_INP_LT_UNITS` +| :term:`GFDL_TRACKER_DATEIN_INP_FILE_SEQ` +| :term:`GFDL_TRACKER_DATEIN_INP_NESTTYP` +| :term:`GFDL_TRACKER_ATCFINFO_ATCFNUM` +| :term:`GFDL_TRACKER_ATCFINFO_ATCFNAME` +| :term:`GFDL_TRACKER_ATCFINFO_ATCFYMDH` +| :term:`GFDL_TRACKER_ATCFINFO_ATCFFREQ` +| :term:`GFDL_TRACKER_TRACKERINFO_TYPE` +| :term:`GFDL_TRACKER_TRACKERINFO_MSLPTHRESH` +| :term:`GFDL_TRACKER_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK` +| :term:`GFDL_TRACKER_TRACKERINFO_V850THRESH` +| :term:`GFDL_TRACKER_TRACKERINFO_USE_BACKUP_850_VT_CHECK` +| :term:`GFDL_TRACKER_TRACKERINFO_ENABLE_TIMING` +| :term:`GFDL_TRACKER_TRACKERINFO_GRIDTYPE` +| :term:`GFDL_TRACKER_TRACKERINFO_CONTINT` +| :term:`GFDL_TRACKER_TRACKERINFO_WANT_OCI` +| :term:`GFDL_TRACKER_TRACKERINFO_OUT_VIT` +| :term:`GFDL_TRACKER_TRACKERINFO_USE_LAND_MASK` +| :term:`GFDL_TRACKER_TRACKERINFO_INP_DATA_TYPE` +| :term:`GFDL_TRACKER_TRACKERINFO_GRIBVER` +| :term:`GFDL_TRACKER_TRACKERINFO_G2_JPDTN` +| :term:`GFDL_TRACKER_TRACKERINFO_G2_MSLP_PARM_ID` +| :term:`GFDL_TRACKER_TRACKERINFO_G1_MSLP_PARM_ID` +| :term:`GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_TYP` +| :term:`GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_VAL` +| :term:`GFDL_TRACKER_PHASEINFO_PHASEFLAG` +| :term:`GFDL_TRACKER_PHASEINFO_PHASESCHEME` +| :term:`GFDL_TRACKER_PHASEINFO_WCORE_DEPTH` +| :term:`GFDL_TRACKER_STRUCTINFO_STRUCTFLAG` +| :term:`GFDL_TRACKER_STRUCTINFO_IKEFLAG` +| :term:`GFDL_TRACKER_FNAMEINFO_GMODNAME` +| :term:`GFDL_TRACKER_FNAMEINFO_RUNDESCR` +| :term:`GFDL_TRACKER_FNAMEINFO_ATCFDESCR` +| :term:`GFDL_TRACKER_WAITINFO_USE_WAITFOR` +| :term:`GFDL_TRACKER_WAITINFO_WAIT_MIN_AGE` +| :term:`GFDL_TRACKER_WAITINFO_WAIT_MIN_SIZE` +| :term:`GFDL_TRACKER_WAITINFO_WAIT_MAX_WAIT` +| :term:`GFDL_TRACKER_WAITINFO_WAIT_SLEEPTIME` +| :term:`GFDL_TRACKER_WAITINFO_USE_PER_FCST_COMMAND` +| :term:`GFDL_TRACKER_WAITINFO_PER_FCST_COMMAND` +| :term:`GFDL_TRACKER_NETCDFINFO_LAT_NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_LMASKNAME` +| :term:`GFDL_TRACKER_NETCDFINFO_LON_NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_MSLPNAME` +| :term:`GFDL_TRACKER_NETCDFINFO_NETCDF_FILENAME` +| :term:`GFDL_TRACKER_NETCDFINFO_NUM_NETCDF_VARS` +| :term:`GFDL_TRACKER_NETCDFINFO_RV700NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_RV850NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_TIME_NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_TIME_UNITS` +| :term:`GFDL_TRACKER_NETCDFINFO_TMEAN_300_500_NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_U500NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_U700NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_U850NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_USFCNAME` +| :term:`GFDL_TRACKER_NETCDFINFO_V500NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_V700NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_V850NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_VSFCNAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z200NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z300NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z350NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z400NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z450NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z500NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z550NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z600NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z650NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z700NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z750NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z800NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z850NAME` +| :term:`GFDL_TRACKER_NETCDFINFO_Z900NAME` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA700` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC850` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC700` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH850` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH700` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_MSLP` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRCSFC` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETASFC` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK500850` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200500` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200850` +| :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA850` +| :term:`GFDL_TRACKER_VERBOSE_VERB` +| :term:`GFDL_TRACKER_VERBOSE_VERB_G2` + +.. _gfdl_tracker-nml-conf: + +NML Configuration +----------------- + +Below is the NML template configuration file used for this wrapper. The wrapper +substitutes values from the METplus configuration file into this configuration +file. While it may appear that environment variables are used in the NML +template file, they are not actually environment variables. The wrapper +searches for these strings and substitutes the values as appropriate. + +.. literalinclude:: ../../parm/use_cases/met_tool_wrapper/GFDLTracker/template.nml + +**${METPLUS_DATEIN_INP_BCC}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &datein: inp%bcc + +**${METPLUS_DATEIN_INP_BYY}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &datein: inp%byy + +**${METPLUS_DATEIN_INP_BMM}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &datein: inp%bmm + +**${METPLUS_DATEIN_INP_BDD}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &datein: inp%bdd + +**${METPLUS_DATEIN_INP_BHH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &datein: inp%bhh + +**${METPLUS_DATEIN_INP_MODEL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_DATEIN_INP_MODEL` + - &datein: inp%model + +**${METPLUS_DATEIN_INP_MODTYP}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_DATEIN_INP_MODTYP` + - &datein: inp%modtyp + +**${METPLUS_DATEIN_INP_LT_UNITS}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_DATEIN_INP_LT_UNITS` + - &datein: inp%lt_units + +**${METPLUS_DATEIN_INP_FILE_SEQ}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_DATEIN_INP_FILE_SEQ` + - &datein: inp%file_seq + +**${METPLUS_DATEIN_INP_NESTTYP}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_DATEIN_INP_NESTTYP` + - &datein: inp%nesttyp + .. _grid_diag_wrapper: GridDiag From f069df33dae9619e6883b889668f0390518e7171 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 21 Jul 2021 10:37:06 -0600 Subject: [PATCH 22/25] moved new use case into another group that is not marked as new --- .github/parm/use_case_groups.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/parm/use_case_groups.json b/.github/parm/use_case_groups.json index 7d37922cdb..0e8420c6bd 100644 --- a/.github/parm/use_case_groups.json +++ b/.github/parm/use_case_groups.json @@ -1,14 +1,9 @@ [ { "category": "met_tool_wrapper", - "index_list": "0-54", + "index_list": "0-55", "new": false }, - { - "category": "met_tool_wrapper", - "index_list": "55", - "new": true - }, { "category": "air_quality_and_comp", "index_list": "0", From 122efd33acb079667f9c61e1aff7d51be4796f7c Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 21 Jul 2021 11:54:26 -0600 Subject: [PATCH 23/25] added glossary entries for new config variables --- docs/Users_Guide/glossary.rst | 599 ++++++++++++++++++++++++++++++++++ 1 file changed, 599 insertions(+) diff --git a/docs/Users_Guide/glossary.rst b/docs/Users_Guide/glossary.rst index db2a6ef64d..e69a9242ea 100644 --- a/docs/Users_Guide/glossary.rst +++ b/docs/Users_Guide/glossary.rst @@ -7221,3 +7221,602 @@ METplus Configuration Glossary LOOP_BY = VALID. | *Used by:* TCPairs + + GFDL_TRACKER_BASE + Path to directory that contains the GFDL Tracker executables such as + grbindex.exe and gettrk.exe. In many installations, this is a directory + named trk_exec. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_INPUT_DIR + Directory containing input data to read into GFDLTracker. This is optional + as the entire path to the data can be set with + :term:`GFDL_TRACKER_INPUT_TEMPLATE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_INPUT_TEMPLATE + Filename template that corresponds to the file naming convention of the + input data read into GFDLTracker. This can be a full path to a file or + a relative path if :term:`GFDL_TRACKER_INPUT_DIR` is set. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TC_VITALS_INPUT_DIR + Directory containing the TCVitals file that is required to run the + GFDLTracker. This is optional as the entire path to the data can be set + with :term:`GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TC_VITALS_INPUT_TEMPLATE + Filename template that corresponds to the file naming convention of the + TCVitals file that is required to run the GFDLTracker. + This can be a full path to a file or + a relative path if :term:`GFDL_TRACKER_TC_VITALS_INPUT_DIR` is set. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_OUTPUT_DIR + Directory to write output data created by GFDLTracker. The tracker + application must be run from the directory containing all of the data and + configuration files used, so the wrapper will call the application from + this directory. Symbolic links for each input file including the TCVitals + file will be created in this directory and removed after a successful run. + The fort.X files required to run the tracker will be generated in + this directory. Also, the input.nml file that is generated from the + template NML file (specified by :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`) + will be found in this directory. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_OUTPUT_TEMPLATE + The fort.64 output file that is generated from running the GFDLTracker + can be renamed using this variable using filename template syntax to + create an output file that contains useful information such as the date. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_GRIB_VERSION + Specifies the GRIB version of the input data. Valid values are 1 or 2. + This determines which application to use to create the index files + (grbindex.exe or grb2index.exe). + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NML_TEMPLATE_FILE + Path to the template NML file that matches the format of the input.nml + file that is used by the GFDL Tracker. This file can contain string + expressions that are substituted by values read from the METplus + configuration variables, so this path likely does not need to be modified. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_DATEIN_INP_MODEL + Sets the value of &datein: inp%model in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_DATEIN_INP_MODTYP + Sets the value of &datein: inp%modtyp in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_DATEIN_INP_LT_UNITS + Sets the value of &datein: inp%lt_units in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_DATEIN_INP_FILE_SEQ + Sets the value of &datein: inp%file_seq in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_DATEIN_INP_NESTTYP + Sets the value of &datein: inp%nesttyp in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_ATCFINFO_ATCFNUM + Sets the value of &atcfinfo: atcfnum in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_ATCFINFO_ATCFNAME + Sets the value of &atcfinfo: atcfname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_ATCFINFO_ATCFFREQ + Sets the value of &atcfinfo: atcffreq in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_TYPE + Sets the value of &trackerinfo: trkrinfo%type in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_MSLPTHRESH + Sets the value of &trackerinfo: trkrinfo%mslpthresh in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK + Sets the value of &trackerinfo: trkrinfo%use_backup_mslp_grad_check in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_V850THRESH + Sets the value of &trackerinfo: trkrinfo%v850thresh in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_USE_BACKUP_850_VT_CHECK + Sets the value of &trackerinfo: trkrinfo%use_backup_850_vt_check in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_ENABLE_TIMING + Sets the value of &trackerinfo: trkrinfo%enable_timing in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_GRIDTYPE + Sets the value of &trackerinfo: trkrinfo%gridtype in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_CONTINT + Sets the value of &trackerinfo: trkrinfo%contint in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_WANT_OCI + Sets the value of &trackerinfo: trkrinfo%want_oci in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_OUT_VIT + Sets the value of &trackerinfo: trkrinfo%out_vit in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_USE_LAND_MASK + Sets the value of &trackerinfo: trkrinfo%use_land_mask in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_INP_DATA_TYPE + Sets the value of &trackerinfo: trkrinfo%inp_data_type in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_GRIBVER + Sets the value of &trackerinfo: trkrinfo%gribver in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_G2_JPDTN + Sets the value of &trackerinfo: trkrinfo%g2_jpdtn in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_G2_MSLP_PARM_ID + Sets the value of &trackerinfo: trkrinfo%g2_mslp_parm_id in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_G1_MSLP_PARM_ID + Sets the value of &trackerinfo: trkrinfo%g1_mslp_parm_id in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_TYP + Sets the value of &trackerinfo: trkrinfo%g1_sfcwind_lev_typ in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_VAL + Sets the value of &trackerinfo: trkrinfo%g1_sfcwind_lev_val in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_PHASEINFO_PHASEFLAG + Sets the value of &phaseinfo: phaseflag in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_PHASEINFO_PHASESCHEME + Sets the value of &phaseinfo: phasescheme in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_PHASEINFO_WCORE_DEPTH + Sets the value of &phaseinfo: wcore_depth in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_STRUCTINFO_STRUCTFLAG + Sets the value of &structinfo: structflag in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_STRUCTINFO_IKEFLAG + Sets the value of &structinfo: ikeflag in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_FNAMEINFO_GMODNAME + Sets the value of &fnameinfo: gmodname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_FNAMEINFO_RUNDESCR + Sets the value of &fnameinfo: rundescr in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_FNAMEINFO_ATCFDESCR + Sets the value of &fnameinfo: atcfdescr in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_USE_WAITFOR + Sets the value of &waitinfo: use_waitfor in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_WAIT_MIN_AGE + Sets the value of &waitinfo: wait_min_age in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_WAIT_MIN_SIZE + Sets the value of &waitinfo: wait_min_size in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_WAIT_MAX_WAIT + Sets the value of &waitinfo: wait_max_wait in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_WAIT_SLEEPTIME + Sets the value of &waitinfo: wait_sleeptime in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_USE_PER_FCST_COMMAND + Sets the value of &waitinfo: use_per_fcst_command in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_WAITINFO_PER_FCST_COMMAND + Sets the value of &waitinfo: per_fcst_command in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_LAT_NAME + Sets the value of &netcdflist: netcdfinfo%lat_name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_LMASKNAME + Sets the value of &netcdflist: netcdfinfo%lmaskname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_LON_NAME + Sets the value of &netcdflist: netcdfinfo%lon_name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_MSLPNAME + Sets the value of &netcdflist: netcdfinfo%mslpname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_NETCDF_FILENAME + Sets the value of &netcdflist: netcdfinfo%netcdf_filename in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_NUM_NETCDF_VARS + Sets the value of &netcdflist: netcdfinfo%num_netcdf_vars in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_RV700NAME + Sets the value of &netcdflist: netcdfinfo%rv700name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_RV850NAME + Sets the value of &netcdflist: netcdfinfo%rv850name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_TIME_NAME + Sets the value of &netcdflist: netcdfinfo%time_name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_TIME_UNITS + Sets the value of &netcdflist: netcdfinfo%time_units in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_TMEAN_300_500_NAME + Sets the value of &netcdflist: netcdfinfo%tmean_300_500_name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_U500NAME + Sets the value of &netcdflist: netcdfinfo%u500name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_U700NAME + Sets the value of &netcdflist: netcdfinfo%u700name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_U850NAME + Sets the value of &netcdflist: netcdfinfo%u850name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_USFCNAME + Sets the value of &netcdflist: netcdfinfo%usfcname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_V500NAME + Sets the value of &netcdflist: netcdfinfo%v500name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_V700NAME + Sets the value of &netcdflist: netcdfinfo%v700name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_V850NAME + Sets the value of &netcdflist: netcdfinfo%v850name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_VSFCNAME + Sets the value of &netcdflist: netcdfinfo%vsfcname in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z200NAME + Sets the value of &netcdflist: netcdfinfo%z200name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z300NAME + Sets the value of &netcdflist: netcdfinfo%z300name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z350NAME + Sets the value of &netcdflist: netcdfinfo%z350name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z400NAME + Sets the value of &netcdflist: netcdfinfo%z400name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z450NAME + Sets the value of &netcdflist: netcdfinfo%z450name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z500NAME + Sets the value of &netcdflist: netcdfinfo%z500name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z550NAME + Sets the value of &netcdflist: netcdfinfo%z550name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z600NAME + Sets the value of &netcdflist: netcdfinfo%z600name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z650NAME + Sets the value of &netcdflist: netcdfinfo%z650name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z700NAME + Sets the value of &netcdflist: netcdfinfo%z700name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z750NAME + Sets the value of &netcdflist: netcdfinfo%z750name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z800NAME + Sets the value of &netcdflist: netcdfinfo%z800name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z850NAME + Sets the value of &netcdflist: netcdfinfo%z850name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_NETCDFINFO_Z900NAME + Sets the value of &netcdflist: netcdfinfo%z900name in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA700 + Sets the value of &parmpreflist: user_wants_to_track_zeta700 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC850 + Sets the value of &parmpreflist: user_wants_to_track_wcirc850 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC700 + Sets the value of &parmpreflist: user_wants_to_track_wcirc700 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH850 + Sets the value of &parmpreflist: user_wants_to_track_gph850 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH700 + Sets the value of &parmpreflist: user_wants_to_track_gph700 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_MSLP + Sets the value of &parmpreflist: user_wants_to_track_mslp in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRCSFC + Sets the value of &parmpreflist: user_wants_to_track_wcircsfc in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETASFC + Sets the value of &parmpreflist: user_wants_to_track_zetasfc in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK500850 + Sets the value of &parmpreflist: user_wants_to_track_thick500850 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200500 + Sets the value of &parmpreflist: user_wants_to_track_thick200500 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200850 + Sets the value of &parmpreflist: user_wants_to_track_thick200850 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA850 + Sets the value of &parmpreflist: user_wants_to_track_zeta850 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_VERBOSE_VERB + Sets the value of &verbose: verb in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker + + GFDL_TRACKER_VERBOSE_VERB_G2 + Sets the value of &verbose: verb_g2 in the template NML file. + See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`. + + | *Used by:* GFDLTracker From c488087df45bd706a3b8826027992024bd90b3bd Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 21 Jul 2021 11:54:47 -0600 Subject: [PATCH 24/25] removed unused variables --- docs/Users_Guide/wrappers.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index 5ca9c8e48f..8fa83adb4f 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -1000,11 +1000,6 @@ METplus Configuration | :term:`GFDL_TRACKER_OUTPUT_TEMPLATE` | :term:`GFDL_TRACKER_GRIB_VERSION` | :term:`GFDL_TRACKER_NML_TEMPLATE_FILE` -| :term:`GFDL_TRACKER_DATEIN_INP_BCC` -| :term:`GFDL_TRACKER_DATEIN_INP_BYY` -| :term:`GFDL_TRACKER_DATEIN_INP_BMM` -| :term:`GFDL_TRACKER_DATEIN_INP_BDD` -| :term:`GFDL_TRACKER_DATEIN_INP_BHH` | :term:`GFDL_TRACKER_DATEIN_INP_MODEL` | :term:`GFDL_TRACKER_DATEIN_INP_MODTYP` | :term:`GFDL_TRACKER_DATEIN_INP_LT_UNITS` @@ -1012,7 +1007,6 @@ METplus Configuration | :term:`GFDL_TRACKER_DATEIN_INP_NESTTYP` | :term:`GFDL_TRACKER_ATCFINFO_ATCFNUM` | :term:`GFDL_TRACKER_ATCFINFO_ATCFNAME` -| :term:`GFDL_TRACKER_ATCFINFO_ATCFYMDH` | :term:`GFDL_TRACKER_ATCFINFO_ATCFFREQ` | :term:`GFDL_TRACKER_TRACKERINFO_TYPE` | :term:`GFDL_TRACKER_TRACKERINFO_MSLPTHRESH` From cbb1496fe954642221bf03ca7d9d8d35f060f8c1 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 21 Jul 2021 12:24:57 -0600 Subject: [PATCH 25/25] added info about how METplus config variables correspond to template NML values --- docs/Users_Guide/wrappers.rst | 925 ++++++++++++++++++++++++++++++++++ 1 file changed, 925 insertions(+) diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index 8fa83adb4f..5a0f70949f 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -1212,6 +1212,931 @@ searches for these strings and substitutes the values as appropriate. * - :term:`GFDL_TRACKER_DATEIN_INP_NESTTYP` - &datein: inp%nesttyp +**${METPLUS_ATCFINFO_ATCFNUM}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_ATCFINFO_ATCFNUM` + - &atcfinfo: atcfnum + +**${METPLUS_ATCFINFO_ATCFNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_ATCFINFO_ATCFNAME` + - &atcfinfo: atcfname + +**${METPLUS_ATCFINFO_ATCFYMDH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`INIT_BEG` + - &atcfinfo: atcfymdh + +**${METPLUS_ATCFINFO_ATCFFREQ}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_ATCFINFO_ATCFFREQ` + - &atcfinfo: atcffreq + +**${METPLUS_TRACKERINFO_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_TYPE` + - &trackerinfo: trkrinfo%type + +**${METPLUS_TRACKERINFO_MSLPTHRESH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_MSLPTHRESH` + - &trackerinfo: trkrinfo%mslpthresh + +**${METPLUS_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_USE_BACKUP_MSLP_GRAD_CHECK` + - &trackerinfo: trkrinfo%use_backup_mslp_grad_check + +**${METPLUS_TRACKERINFO_V850THRESH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_V850THRESH` + - &trackerinfo: trkrinfo%v850thresh + +**${METPLUS_TRACKERINFO_USE_BACKUP_850_VT_CHECK}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_USE_BACKUP_850_VT_CHECK` + - &trackerinfo: trkrinfo%use_backup_850_vt_check + +**${METPLUS_TRACKERINFO_ENABLE_TIMING}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_ENABLE_TIMING` + - &trackerinfo: trkrinfo%enable_timing + +**${METPLUS_TRACKERINFO_GRIDTYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_GRIDTYPE` + - &trackerinfo: trkrinfo%gridtype + +**${METPLUS_TRACKERINFO_CONTINT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_CONTINT` + - &trackerinfo: trkrinfo%contint + +**${METPLUS_TRACKERINFO_WANT_OCI}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_WANT_OCI` + - &trackerinfo: trkrinfo%want_oci + +**${METPLUS_TRACKERINFO_OUT_VIT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_OUT_VIT` + - &trackerinfo: trkrinfo%out_vit + +**${METPLUS_TRACKERINFO_USE_LAND_MASK}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_USE_LAND_MASK` + - &trackerinfo: trkrinfo%use_land_mask + +**${METPLUS_TRACKERINFO_INP_DATA_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_INP_DATA_TYPE` + - &trackerinfo: trkrinfo%inp_data_type + +**${METPLUS_TRACKERINFO_GRIBVER}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_GRIBVER` + - &trackerinfo: trkrinfo%gribver + +**${METPLUS_TRACKERINFO_G2_JPDTN}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_G2_JPDTN` + - &trackerinfo: trkrinfo%g2_jpdtn + +**${METPLUS_TRACKERINFO_G2_MSLP_PARM_ID}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_G2_MSLP_PARM_ID` + - &trackerinfo: trkrinfo%g2_mslp_parm_id + +**${METPLUS_TRACKERINFO_G1_MSLP_PARM_ID}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_G1_MSLP_PARM_ID` + - &trackerinfo: trkrinfo%g1_mslp_parm_id + +**${METPLUS_TRACKERINFO_G1_SFCWIND_LEV_TYP}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_TYP` + - &trackerinfo: trkrinfo%g1_sfcwind_lev_typ + +**${METPLUS_TRACKERINFO_G1_SFCWIND_LEV_VAL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_TRACKERINFO_G1_SFCWIND_LEV_VAL` + - &trackerinfo: trkrinfo%g1_sfcwind_lev_val + +**${METPLUS_PHASEINFO_PHASEFLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_PHASEINFO_PHASEFLAG` + - &phaseinfo: phaseflag + +**${METPLUS_PHASEINFO_PHASESCHEME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_PHASEINFO_PHASESCHEME` + - &phaseinfo: phasescheme + +**${METPLUS_PHASEINFO_WCORE_DEPTH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_PHASEINFO_WCORE_DEPTH` + - &phaseinfo: wcore_depth + +**${METPLUS_STRUCTINFO_STRUCTFLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_STRUCTINFO_STRUCTFLAG` + - &structinfo: structflag + +**${METPLUS_STRUCTINFO_IKEFLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_STRUCTINFO_IKEFLAG` + - &structinfo: ikeflag + +**${METPLUS_FNAMEINFO_GMODNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_FNAMEINFO_GMODNAME` + - &fnameinfo: gmodname + +**${METPLUS_FNAMEINFO_RUNDESCR}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_FNAMEINFO_RUNDESCR` + - &fnameinfo: rundescr + +**${METPLUS_FNAMEINFO_ATCFDESCR}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_FNAMEINFO_ATCFDESCR` + - &fnameinfo: atcfdescr + +**${METPLUS_WAITINFO_USE_WAITFOR}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_USE_WAITFOR` + - &waitinfo: use_waitfor + +**${METPLUS_WAITINFO_WAIT_MIN_AGE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_WAIT_MIN_AGE` + - &waitinfo: wait_min_age + +**${METPLUS_WAITINFO_WAIT_MIN_SIZE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_WAIT_MIN_SIZE` + - &waitinfo: wait_min_size + +**${METPLUS_WAITINFO_WAIT_MAX_WAIT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_WAIT_MAX_WAIT` + - &waitinfo: wait_max_wait + +**${METPLUS_WAITINFO_WAIT_SLEEPTIME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_WAIT_SLEEPTIME` + - &waitinfo: wait_sleeptime + +**${METPLUS_WAITINFO_USE_PER_FCST_COMMAND}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_USE_PER_FCST_COMMAND` + - &waitinfo: use_per_fcst_command + +**${METPLUS_WAITINFO_PER_FCST_COMMAND}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_WAITINFO_PER_FCST_COMMAND` + - &waitinfo: per_fcst_command + +**${METPLUS_NETCDFINFO_LAT_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_LAT_NAME` + - &netcdflist: netcdfinfo%lat_name + +**${METPLUS_NETCDFINFO_LMASKNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_LMASKNAME` + - &netcdflist: netcdfinfo%lmaskname + +**${METPLUS_NETCDFINFO_LON_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_LON_NAME` + - &netcdflist: netcdfinfo%lon_name + +**${METPLUS_NETCDFINFO_MSLPNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_MSLPNAME` + - &netcdflist: netcdfinfo%mslpname + +**${METPLUS_NETCDFINFO_NETCDF_FILENAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_NETCDF_FILENAME` + - &netcdflist: netcdfinfo%netcdf_filename + +**${METPLUS_NETCDFINFO_NUM_NETCDF_VARS}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_NUM_NETCDF_VARS` + - &netcdflist: netcdfinfo%num_netcdf_vars + +**${METPLUS_NETCDFINFO_RV700NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_RV700NAME` + - &netcdflist: netcdfinfo%rv700name + +**${METPLUS_NETCDFINFO_RV850NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_RV850NAME` + - &netcdflist: netcdfinfo%rv850name + +**${METPLUS_NETCDFINFO_TIME_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_TIME_NAME` + - &netcdflist: netcdfinfo%time_name + +**${METPLUS_NETCDFINFO_TIME_UNITS}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_TIME_UNITS` + - &netcdflist: netcdfinfo%time_units + +**${METPLUS_NETCDFINFO_TMEAN_300_500_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_TMEAN_300_500_NAME` + - &netcdflist: netcdfinfo%tmean_300_500_name + +**${METPLUS_NETCDFINFO_U500NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_U500NAME` + - &netcdflist: netcdfinfo%u500name + +**${METPLUS_NETCDFINFO_U700NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_U700NAME` + - &netcdflist: netcdfinfo%u700name + +**${METPLUS_NETCDFINFO_U850NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_U850NAME` + - &netcdflist: netcdfinfo%u850name + +**${METPLUS_NETCDFINFO_USFCNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_USFCNAME` + - &netcdflist: netcdfinfo%usfcname + +**${METPLUS_NETCDFINFO_V500NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_V500NAME` + - &netcdflist: netcdfinfo%v500name + +**${METPLUS_NETCDFINFO_V700NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_V700NAME` + - &netcdflist: netcdfinfo%v700name + +**${METPLUS_NETCDFINFO_V850NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_V850NAME` + - &netcdflist: netcdfinfo%v850name + +**${METPLUS_NETCDFINFO_VSFCNAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_VSFCNAME` + - &netcdflist: netcdfinfo%vsfcname + +**${METPLUS_NETCDFINFO_Z200NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z200NAME` + - &netcdflist: netcdfinfo%z200name + +**${METPLUS_NETCDFINFO_Z300NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z300NAME` + - &netcdflist: netcdfinfo%z300name + +**${METPLUS_NETCDFINFO_Z350NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z350NAME` + - &netcdflist: netcdfinfo%z350name + +**${METPLUS_NETCDFINFO_Z400NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z400NAME` + - &netcdflist: netcdfinfo%z400name + +**${METPLUS_NETCDFINFO_Z450NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z450NAME` + - &netcdflist: netcdfinfo%z450name + +**${METPLUS_NETCDFINFO_Z500NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z500NAME` + - &netcdflist: netcdfinfo%z500name + +**${METPLUS_NETCDFINFO_Z550NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z550NAME` + - &netcdflist: netcdfinfo%z550name + +**${METPLUS_NETCDFINFO_Z600NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z600NAME` + - &netcdflist: netcdfinfo%z600name + +**${METPLUS_NETCDFINFO_Z650NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z650NAME` + - &netcdflist: netcdfinfo%z650name + +**${METPLUS_NETCDFINFO_Z700NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z700NAME` + - &netcdflist: netcdfinfo%z700name + +**${METPLUS_NETCDFINFO_Z750NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z750NAME` + - &netcdflist: netcdfinfo%z750name + +**${METPLUS_NETCDFINFO_Z800NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z800NAME` + - &netcdflist: netcdfinfo%z800name + +**${METPLUS_NETCDFINFO_Z850NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z850NAME` + - &netcdflist: netcdfinfo%z850name + +**${METPLUS_NETCDFINFO_Z900NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_NETCDFINFO_Z900NAME` + - &netcdflist: netcdfinfo%z900name + +**${METPLUS_USER_WANTS_TO_TRACK_ZETA700}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA700` + - &parmpreflist: user_wants_to_track_zeta700 + +**${METPLUS_USER_WANTS_TO_TRACK_WCIRC850}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC850` + - &parmpreflist: user_wants_to_track_wcirc850 + +**${METPLUS_USER_WANTS_TO_TRACK_WCIRC700}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRC700` + - &parmpreflist: user_wants_to_track_wcirc700 + +**${METPLUS_USER_WANTS_TO_TRACK_GPH850}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH850` + - &parmpreflist: user_wants_to_track_gph850 + +**${METPLUS_USER_WANTS_TO_TRACK_GPH700}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_GPH700` + - &parmpreflist: user_wants_to_track_gph700 + +**${METPLUS_USER_WANTS_TO_TRACK_MSLP}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_MSLP` + - &parmpreflist: user_wants_to_track_mslp + +**${METPLUS_USER_WANTS_TO_TRACK_WCIRCSFC}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_WCIRCSFC` + - &parmpreflist: user_wants_to_track_wcircsfc + +**${METPLUS_USER_WANTS_TO_TRACK_ZETASFC}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETASFC` + - &parmpreflist: user_wants_to_track_zetasfc + +**${METPLUS_USER_WANTS_TO_TRACK_THICK500850}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK500850` + - &parmpreflist: user_wants_to_track_thick500850 + +**${METPLUS_USER_WANTS_TO_TRACK_THICK200500}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200500` + - &parmpreflist: user_wants_to_track_thick200500 + +**${METPLUS_USER_WANTS_TO_TRACK_THICK200850}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_THICK200850` + - &parmpreflist: user_wants_to_track_thick200850 + +**${METPLUS_USER_WANTS_TO_TRACK_ZETA850}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_USER_WANTS_TO_TRACK_ZETA850` + - &parmpreflist: user_wants_to_track_zeta850 + +**${METPLUS_VERBOSE_VERB}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_VERBOSE_VERB` + - &verbose: verb + +**${METPLUS_VERBOSE_VERB_G2}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - NML Config File + * - :term:`GFDL_TRACKER_VERBOSE_VERB_G2` + - &verbose: verb_g2 + + .. _grid_diag_wrapper: GridDiag