@@ -697,22 +697,22 @@ def build_mali_mesh(self, cell_width, x1, y1, geom_points,
697697 logger .info ('writing grid_converted.nc' )
698698 write_netcdf (dsMesh , 'grid_converted.nc' )
699699 levels = section .get ('levels' )
700- args = ['create_landice_grid_from_generic_MPAS_grid.py ' ,
700+ args = ['create_landice_grid_from_generic_mpas_grid ' ,
701701 '-i' , 'grid_converted.nc' ,
702702 '-o' , 'grid_preCull.nc' ,
703703 '-l' , levels , '-v' , 'glimmer' ]
704704
705705 check_call (args , logger = logger )
706706
707- args = ['interpolate_to_mpasli_grid.py ' , '-s' ,
707+ args = ['interpolate_to_mpasli_grid' , '-s' ,
708708 gridded_dataset , '-d' ,
709709 'grid_preCull.nc' , '-m' , 'b' , '-t' ]
710710
711711 check_call (args , logger = logger )
712712
713713 cullDistance = section .get ('cull_distance' )
714714 if float (cullDistance ) > 0. :
715- args = ['define_cullMask.py ' , '-f' ,
715+ args = ['define_landice_cull_mask ' , '-f' ,
716716 'grid_preCull.nc' , '-m' ,
717717 'distance' , '-d' , cullDistance ]
718718
@@ -724,7 +724,7 @@ def build_mali_mesh(self, cell_width, x1, y1, geom_points,
724724 if geojson_file is not None :
725725 # This step is only necessary because the GeoJSON region
726726 # is defined by lat-lon.
727- args = ['set_lat_lon_fields_in_planar_grid.py ' , '-f' ,
727+ args = ['set_lat_lon_fields_in_planar_grid' , '-f' ,
728728 'grid_preCull.nc' , '-p' , projection ]
729729
730730 check_call (args , logger = logger )
@@ -751,7 +751,7 @@ def build_mali_mesh(self, cell_width, x1, y1, geom_points,
751751 write_netcdf (dsMesh , 'culled.nc' )
752752
753753 logger .info ('Marking horns for culling' )
754- args = ['mark_horns_for_culling.py ' , '-f' , 'culled.nc' ]
754+ args = ['mark_horns_for_culling' , '-f' , 'culled.nc' ]
755755
756756 check_call (args , logger = logger )
757757
@@ -762,24 +762,24 @@ def build_mali_mesh(self, cell_width, x1, y1, geom_points,
762762 dsMesh = sort_mesh (dsMesh )
763763 write_netcdf (dsMesh , 'dehorned.nc' )
764764
765- args = ['create_landice_grid_from_generic_MPAS_grid.py ' , '-i' ,
765+ args = ['create_landice_grid_from_generic_mpas_grid ' , '-i' ,
766766 'dehorned.nc' , '-o' ,
767767 mesh_name , '-l' , levels , '-v' , 'glimmer' ,
768768 '--beta' , '--thermal' , '--obs' , '--diri' ]
769769
770770 check_call (args , logger = logger )
771771
772- args = ['interpolate_to_mpasli_grid.py ' , '-s' ,
772+ args = ['interpolate_to_mpasli_grid' , '-s' ,
773773 gridded_dataset , '-d' , mesh_name , '-m' , 'b' ]
774774
775775 check_call (args , logger = logger )
776776
777777 logger .info ('Marking domain boundaries dirichlet' )
778- args = ['mark_domain_boundaries_dirichlet.py ' ,
778+ args = ['mark_domain_boundaries_dirichlet' ,
779779 '-f' , mesh_name ]
780780 check_call (args , logger = logger )
781781
782- args = ['set_lat_lon_fields_in_planar_grid.py ' , '-f' ,
782+ args = ['set_lat_lon_fields_in_planar_grid' , '-f' ,
783783 mesh_name , '-p' , projection ]
784784 check_call (args , logger = logger )
785785
@@ -1016,8 +1016,8 @@ def preprocess_ais_data(self, source_gridded_dataset,
10161016 return preprocessed_gridded_dataset
10171017
10181018
1019- def interp_gridded2mali (self , source_file , mali_scrip , nProcs , dest_file , proj ,
1020- variables = "all" ):
1019+ def interp_gridded2mali (self , source_file , mali_scrip , parallel_executable ,
1020+ nProcs , dest_file , proj , variables = "all" ):
10211021 """
10221022 Interpolate gridded dataset (e.g. MEASURES, BedMachine) onto a MALI mesh
10231023
@@ -1029,6 +1029,9 @@ def interp_gridded2mali(self, source_file, mali_scrip, nProcs, dest_file, proj,
10291029 mali_scrip : str
10301030 name of scrip file corresponding to destination MALI mesh
10311031
1032+ parallel_executable : str
1033+ executable needed to launch a parallel job
1034+
10321035 nProcs : int
10331036 number of processors to use for generating remapping weights
10341037
@@ -1070,7 +1073,7 @@ def __guess_scrip_name(filename):
10701073
10711074 logger .info ('creating scrip file for source dataset' )
10721075 # Note: writing scrip file to workdir
1073- args = ['create_SCRIP_file_from_planar_rectangular_grid.py ' ,
1076+ args = ['create_scrip_file_from_planar_rectangular_grid ' ,
10741077 '-i' , source_file ,
10751078 '-s' , source_scrip ,
10761079 '-p' , proj ,
@@ -1079,7 +1082,7 @@ def __guess_scrip_name(filename):
10791082
10801083 # Generate remapping weights
10811084 logger .info ('generating gridded dataset -> MPAS weights' )
1082- args = ['srun' , '-n' , nProcs , 'ESMF_RegridWeightGen' ,
1085+ args = [parallel_executable , '-n' , nProcs , 'ESMF_RegridWeightGen' ,
10831086 '--source' , source_scrip ,
10841087 '--destination' , mali_scrip ,
10851088 '--weight' , weights_filename ,
@@ -1089,8 +1092,8 @@ def __guess_scrip_name(filename):
10891092 check_call (args , logger = logger )
10901093
10911094 # Perform actual interpolation using the weights
1092- logger .info ('calling interpolate_to_mpasli_grid.py ' )
1093- args = ['interpolate_to_mpasli_grid.py ' ,
1095+ logger .info ('calling interpolate_to_mpasli_grid' )
1096+ args = ['interpolate_to_mpasli_grid' ,
10941097 '-s' , source_file ,
10951098 '-d' , dest_file ,
10961099 '-m' , 'e' ,
0 commit comments