mom6 module

Generic class and utility funtions for handling MOM6 grids.

class gridtools.grids.mom6.MOM6

Bases: object

approximate_MOM6_grid_metrics()

Fill in missing MOM6 supergrid metrics by computing best guess values.

This function is based on code from [IAH20].

convert_ROMS_to_MOM6(roms_grid, **kwargs)

Convert the ROMS grid data into a skeleton MOM6 grid, mainly by merging the four sets of point locations from the ROMS grid into a single supergrid for MOM6.

This function is based on code from [IAH20].

getGrid()

Returns the converted grid as an xarray data structure.

This function is based on code from [IAH20].

setup_MOM6_grid(**kwargs)

Create an empty MOM6 data structure.

This function is based on code from [IAH20].

Keyword arguments:

  • tileName (string) – name to assign to the solo tile. Default: “tile1”

  • inputDirectory (string) – absolute or relative path to write model input files. Default: “INPUT”

  • relativeToINPUTDir (string) – absolute or relative path for mosaic files to the INPUT directory. Default: “./” which refers to the “INPUT” directory.

  • supergridName (string) – name to assign to the supergrid filename. Default: “ocean_hgrid.nc”

  • topographyFilename (string) – filename used to write topographic grid. Default: “ocean_topog.nc”

  • mosaicFilename (string) – filename for mosaic file. Default: “ocean_mosaic.nc”

  • landmaskFilename (string) – filename used to write the land mask. Default: “land_mask.nc”

  • oceanmaskFilename (string) – filename used to write the ocean mask. Default: “ocean_mask.nc”

Returns

none

Return type

none

write_MOM6_coupler_mosaic_file(grd, **kwargs)

Write the compler mosaic file, which references all the rest. Based on ‘make_quick_mosaic’ tool in version 5 of MOM (http://www.mom-ocean.org/).

This function is based on code from [IAH20].

write_MOM6_exchange_grid_files(grd, **kwargs)

Write three exchange grid files. Based on ‘make_quick_mosaic’ tool in version 5 of MOM (http://www.mom-ocean.org/).

This function is based on code from [IAH20].

write_MOM6_land_mask_file(grd, **kwargs)

Write the land mask file. Based on ‘make_quick_mosaic’ tool in version 5 of MOM (http://www.mom-ocean.org/).

This function is based on code from [IAH20].

write_MOM6_ocean_mask_file(grd, **kwargs)

Write the ocean mask file. Based on ‘make_quick_mosaic’ tool in version 5 of MOM (http://www.mom-ocean.org/).

This function is based on code from [IAH20].

write_MOM6_solo_mosaic_file(grd, **kwargs)
Write the “solo mosaic” file, which describes to the FMS infrastructure

where to find the grid file(s). Based on tools in version 5 of MOM (http://www.mom-ocean.org/).

Keyword arguments:

  • intType (str) – The default type to be written out to for the FMS coupler tile files. Default: int32

This function is based on code from [IAH20].

write_MOM6_topography_file(grd, **kwargs)

Save the MOM6 ocean topography grid in a separate file.

This function is based on code from [IAH20].