@@ -280,7 +280,8 @@ def read_machine_xml(machineName, xmlFile):
280280 if machineName .lower () == xmlmachine .get ('name' ).lower ():
281281
282282 found = True
283- # get the timeseries pes first
283+
284+ # get the timeseries pes
284285 tseries_pes = xmlmachine .find ('timeseries_pes' )
285286 machine ['timeseries_pes' ] = tseries_pes .text
286287 machine ['timeseries_queue' ] = ''
@@ -295,7 +296,6 @@ def read_machine_xml(machineName, xmlFile):
295296 if 'memory' in tseries_pes .attrib :
296297 machine ['timeseries_memory' ] = tseries_pes .get ('memory' )
297298
298-
299299 # get the conform pes
300300 xconform_pes = xmlmachine .find ('xconform_pes' )
301301 machine ['xconform_pes' ] = xconform_pes .text
@@ -311,6 +311,21 @@ def read_machine_xml(machineName, xmlFile):
311311 if 'memory' in xconform_pes .attrib :
312312 machine ['conform_memory' ] = xconform_pes .get ('memory' )
313313
314+ # get the ocn_remap pes
315+ ocn_remap_pes = xmlmachine .find ('ocn_remap_pes' )
316+ machine ['ocn_remap_pes' ] = ocn_remap_pes .text
317+ machine ['ocn_remap_queue' ] = ''
318+ if 'queue' in ocn_remap_pes .attrib :
319+ machine ['ocn_remap_queue' ] = ocn_remap_pes .get ('queue' ).lower ()
320+ machine ['ocn_remap_ppn' ] = ocn_remap_pes .get ('pes_per_node' ).lower ()
321+ machine ['ocn_remap_wallclock' ] = ocn_remap_pes .get ('wallclock' ).lower ()
322+ machine ['ocn_remap_nodes' ] = ''
323+ if 'nodes' in ocn_remap_pes .attrib :
324+ machine ['ocn_remap_nodes' ] = ocn_remap_pes .get ('nodes' ).lower ()
325+ machine ['ocn_remap_memory' ] = ''
326+ if 'memory' in ocn_remap_pes .attrib :
327+ machine ['ocn_remap_memory' ] = ocn_remap_pes .get ('memory' )
328+
314329 # get the mpi run command
315330 machine ['mpi_command' ] = xmlmachine .find ('mpi_command' ).text
316331
@@ -685,6 +700,13 @@ def main(options):
685700 create_env_file (envDict = envDict , configFile = config_file , tmplFile = tmpl_file ,
686701 envFile = env_file , obs_root = '' , comp = '' , standalone = standalone )
687702
703+ # generate the env_ocn_remap.xml file
704+ config_file = '{0}/diagnostics/diagnostics/ocn/Config/config_ocn_remap.xml' .format (envDict ['POSTPROCESS_PATH' ])
705+ env_file = '{0}/env_ocn_remap.xml' .format (envDict ['PP_CASE_PATH' ])
706+ tmpl_file = 'env_postprocess.tmpl'
707+ create_env_file (envDict = envDict , configFile = config_file , tmplFile = tmpl_file ,
708+ envFile = env_file , obs_root = '' , comp = '' , standalone = standalone )
709+
688710 # generate the env_diags_[component].xml files
689711 for comp in itertools .chain (compList , imbList ):
690712 dir_name = comp
@@ -769,6 +791,30 @@ def main(options):
769791 memory = machine ['conform_memory' ],
770792 options = options , standalone = standalone )
771793
794+ # generate the ocn_remap batch submit script from template files
795+ postProcessCmd = 'ocn_remap_generator.py'
796+ processName = 'ocn_remap'
797+ outFile = '{0}/{1}' .format (envDict ['PP_CASE_PATH' ],processName )
798+ ocn_remap_tmpl = 'postprocess.tmpl'
799+ create_batch (ppDir = envDict ['POSTPROCESS_PATH' ],
800+ pes = machine ['ocn_remap_pes' ],
801+ batchTmpl = batch_tmpl , runTmpl = ocn_remap_tmpl ,
802+ postProcessCmd = postProcessCmd ,
803+ mpiCmd = machine ['mpi_command' ], outFile = outFile ,
804+ processName = processName ,
805+ project = envDict ['PROJECT' ],
806+ pythonpath = machine ['pythonpath' ],
807+ caseRoot = envDict ['PP_CASE_PATH' ],
808+ reset_modules = machine ['reset_modules' ],
809+ modules = machine ['modules' ],
810+ queue = machine ['ocn_remap_queue' ],
811+ ppn = machine ['ocn_remap_ppn' ],
812+ nodes = machine ['ocn_remap_nodes' ],
813+ wallclock = machine ['ocn_remap_wallclock' ],
814+ memory = machine ['ocn_remap_memory' ],
815+ options = options , standalone = standalone )
816+
817+
772818 # generate the diagnostics batch submit scripts from template files
773819 for comp in compList :
774820 # generate the averages batch submit script
@@ -980,6 +1026,28 @@ def main(options):
9801026 memory = machine ['conform_memory' ],
9811027 options = options , standalone = standalone )
9821028
1029+ # generate the ocn_remap batch submit script from template files
1030+ postProcessCmd = 'ocn_remap_generator.py'
1031+ processName = 'ocn_remap_dav'
1032+ outFile = '{0}/{1}' .format (envDict ['PP_CASE_PATH' ],processName )
1033+ create_batch (ppDir = pp_dav ,
1034+ pes = machine ['ocn_remap_pes' ],
1035+ batchTmpl = batch_tmpl , runTmpl = run_tmpl ,
1036+ postProcessCmd = postProcessCmd ,
1037+ mpiCmd = machine ['mpi_command' ], outFile = outFile ,
1038+ processName = processName ,
1039+ project = envDict ['PROJECT' ],
1040+ pythonpath = machine ['pythonpath' ],
1041+ caseRoot = envDict ['PP_CASE_PATH' ],
1042+ reset_modules = machine ['reset_modules' ],
1043+ modules = machine ['modules' ],
1044+ queue = machine ['ocn_remap_queue' ],
1045+ ppn = machine ['ocn_remap_ppn' ],
1046+ nodes = machine ['ocn_remap_nodes' ],
1047+ wallclock = machine ['ocn_remap_wallclock' ],
1048+ memory = machine ['ocn_remap_memory' ],
1049+ options = options , standalone = standalone )
1050+
9831051 # generate the diagnostics batch submit scripts from template files
9841052 for comp in compList :
9851053 # generate the averages batch submit script
0 commit comments