1414logger = logging .getLogger ("\t " + __name__ .split ("." )[- 1 ])
1515
1616
17- class MOM6BathyLauncher (VBox ):
17+ class MOM6ForgeLauncher (VBox ):
1818 """A widget to create and launch a new mom6_forge notebook. The widget is enabled when all the
1919 required parameters for mom6_forge are set."""
2020
@@ -139,7 +139,7 @@ def _on_btn_confirm_completion_clicked(self, b):
139139 files are created. If so, it confirms completion of mom6_forge. If not, it displays a
140140 warning message."""
141141
142- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
142+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
143143 if custom_ocn_grid_path is None :
144144 alert_warning (
145145 "No custom_ocn_grid_path found. Cannot confirm completion of mom6_forge"
@@ -162,10 +162,10 @@ def _on_btn_confirm_completion_clicked(self, b):
162162 )
163163
164164 # See if all required files are created:
165- mom6_supergrid_file = MOM6BathyLauncher .supergrid_file_path ()
166- mom6_topog_file = MOM6BathyLauncher .topo_file_path ()
167- esmf_mesh_file = MOM6BathyLauncher .esmf_mesh_file_path ()
168- cice_grid_file = MOM6BathyLauncher .cice_grid_file_path ()
165+ mom6_supergrid_file = MOM6ForgeLauncher .supergrid_file_path ()
166+ mom6_topog_file = MOM6ForgeLauncher .topo_file_path ()
167+ esmf_mesh_file = MOM6ForgeLauncher .esmf_mesh_file_path ()
168+ cice_grid_file = MOM6ForgeLauncher .cice_grid_file_path ()
169169 required_files = [mom6_supergrid_file , mom6_topog_file , esmf_mesh_file ]
170170 if "CICE" in cvars ["COMP_ICE_PHYS" ].value :
171171 required_files .append (cice_grid_file )
@@ -186,9 +186,9 @@ def _on_btn_confirm_completion_clicked(self, b):
186186 def _launch_mom6_forge (self , nb_filepath ):
187187 """Generate a new mom6_forge notebook and open it in a new tab. This method gets called when
188188 the user clicks the "Launch mom6_forge" button."""
189- nb = MOM6BathyLauncher ._create_notebook_object ()
190- MOM6BathyLauncher ._write_notebook (nb , nb_filepath )
191- MOM6BathyLauncher ._open_notebook_in_browser (nb_filepath )
189+ nb = MOM6ForgeLauncher ._create_notebook_object ()
190+ MOM6ForgeLauncher ._write_notebook (nb , nb_filepath )
191+ MOM6ForgeLauncher ._open_notebook_in_browser (nb_filepath )
192192
193193 @staticmethod
194194 def _create_notebook_object ():
@@ -210,7 +210,7 @@ def _create_notebook_object():
210210 attempt_id = cvars ['MB_ATTEMPT_ID' ].value
211211
212212 # if custom_grid_path doesn't exist, create it:
213- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
213+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
214214 os .makedirs (custom_ocn_grid_path , exist_ok = True )
215215
216216 # Create a new notebook:
@@ -314,22 +314,22 @@ def _create_notebook_object():
314314 save_files_cmd = (
315315 "# Do NOT modify this cell!\n \n "
316316 "# MOM6 supergrid file.\n "
317- f'grid.write_supergrid(f"{ MOM6BathyLauncher .supergrid_file_path ()} ")\n \n '
317+ f'grid.write_supergrid(f"{ MOM6ForgeLauncher .supergrid_file_path ()} ")\n \n '
318318 "# Save MOM6 topography file:\n "
319- f'topo.write_topo(f"{ MOM6BathyLauncher .topo_file_path ()} ")\n \n '
319+ f'topo.write_topo(f"{ MOM6ForgeLauncher .topo_file_path ()} ")\n \n '
320320 "# Save MOM6 vertical grid file:\n "
321- f'vgrid.write(f"{ MOM6BathyLauncher .vgrid_file_path ()} ")\n \n '
321+ f'vgrid.write(f"{ MOM6ForgeLauncher .vgrid_file_path ()} ")\n \n '
322322 )
323323
324324 if "CICE" in cvars ["COMP_ICE_PHYS" ].value :
325325 save_files_cmd += (
326326 "# CICE grid file:\n "
327- f'topo.write_cice_grid(f"{ MOM6BathyLauncher .cice_grid_file_path ()} ")\n \n '
327+ f'topo.write_cice_grid(f"{ MOM6ForgeLauncher .cice_grid_file_path ()} ")\n \n '
328328 )
329329
330330 save_files_cmd += (
331331 "# Save ESMF mesh file:\n "
332- f'topo.write_esmf_mesh(f"{ MOM6BathyLauncher .esmf_mesh_file_path ()} ")'
332+ f'topo.write_esmf_mesh(f"{ MOM6ForgeLauncher .esmf_mesh_file_path ()} ")'
333333 )
334334
335335 nb ["cells" ].extend (
@@ -396,30 +396,30 @@ def nc_file_suffix():
396396
397397 @staticmethod
398398 def supergrid_file_path ():
399- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
400- return custom_ocn_grid_path / f"ocean_hgrid_{ MOM6BathyLauncher .nc_file_suffix ()} "
399+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
400+ return custom_ocn_grid_path / f"ocean_hgrid_{ MOM6ForgeLauncher .nc_file_suffix ()} "
401401
402402 @staticmethod
403403 def topo_file_path ():
404- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
405- return custom_ocn_grid_path / f"ocean_topog_{ MOM6BathyLauncher .nc_file_suffix ()} "
404+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
405+ return custom_ocn_grid_path / f"ocean_topog_{ MOM6ForgeLauncher .nc_file_suffix ()} "
406406
407407 @staticmethod
408408 def vgrid_file_path ():
409- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
410- return custom_ocn_grid_path / f"ocean_vgrid_{ MOM6BathyLauncher .nc_file_suffix ()} "
409+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
410+ return custom_ocn_grid_path / f"ocean_vgrid_{ MOM6ForgeLauncher .nc_file_suffix ()} "
411411
412412 @staticmethod
413413 def scrip_grid_file_path ():
414- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
415- return custom_ocn_grid_path / f"scrip_{ MOM6BathyLauncher .nc_file_suffix ()} "
414+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
415+ return custom_ocn_grid_path / f"scrip_{ MOM6ForgeLauncher .nc_file_suffix ()} "
416416
417417 @staticmethod
418418 def esmf_mesh_file_path ():
419- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
420- return custom_ocn_grid_path / f"ESMF_mesh_{ MOM6BathyLauncher .nc_file_suffix ()} "
419+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
420+ return custom_ocn_grid_path / f"ESMF_mesh_{ MOM6ForgeLauncher .nc_file_suffix ()} "
421421
422422 @staticmethod
423423 def cice_grid_file_path ():
424- custom_ocn_grid_path = MOM6BathyLauncher .get_custom_ocn_grid_path ()
425- return custom_ocn_grid_path / f"cice_grid_{ MOM6BathyLauncher .nc_file_suffix ()} "
424+ custom_ocn_grid_path = MOM6ForgeLauncher .get_custom_ocn_grid_path ()
425+ return custom_ocn_grid_path / f"cice_grid_{ MOM6ForgeLauncher .nc_file_suffix ()} "
0 commit comments