CrocoDash.rm6.tests package

Contents

CrocoDash.rm6.tests package#

Submodules#

CrocoDash.rm6.tests.conftest module#

CrocoDash.rm6.tests.conftest.dummy_bathymetry_data()#
CrocoDash.rm6.tests.conftest.generate_silly_coords(longitude_extent, latitude_extent, resolution, depth, number_vertical_layers)#
CrocoDash.rm6.tests.conftest.generate_silly_ic_dataset()#
CrocoDash.rm6.tests.conftest.generate_silly_vt_dataset()#
CrocoDash.rm6.tests.conftest.generate_temperature_arrays(nx, ny, number_vertical_layers)#
CrocoDash.rm6.tests.conftest.get_curvilinear_hgrid()#
CrocoDash.rm6.tests.conftest.get_rectilinear_hgrid()#
CrocoDash.rm6.tests.conftest.get_temperature_dataarrays(longitude_extent, latitude_extent, resolution, number_vertical_layers, depth)#
CrocoDash.rm6.tests.conftest.number_of_gridpoints(longitude_extent, latitude_extent, resolution)#

CrocoDash.rm6.tests.test_config_class module#

CrocoDash.rm6.tests.test_config_class.create_expt(tmp_path)#
CrocoDash.rm6.tests.test_config_class.test_read_config(create_expt, tmp_path)#
CrocoDash.rm6.tests.test_config_class.test_str_dump(create_expt)#
CrocoDash.rm6.tests.test_config_class.test_write_config(create_expt, tmp_path)#
CrocoDash.rm6.tests.test_config_class.test_write_config_fail(create_expt)#

CrocoDash.rm6.tests.test_expt_class module#

CrocoDash.rm6.tests.test_expt_class.test_ocean_forcing(longitude_extent, latitude_extent, date_range, resolution, number_vertical_layers, layer_thickness_ratio, depth, fre_tools_dir, hgrid_type, temp_dataarray_initial_condition, tmp_path, generate_silly_ic_dataset)#
CrocoDash.rm6.tests.test_expt_class.test_rectangular_boundaries(longitude_extent, latitude_extent, date_range, resolution, number_vertical_layers, layer_thickness_ratio, depth, fre_tools_dir, hgrid_type, tmp_path)#
CrocoDash.rm6.tests.test_expt_class.test_setup_bathymetry(longitude_extent, latitude_extent, date_range, resolution, number_vertical_layers, layer_thickness_ratio, depth, fre_tools_dir, hgrid_type, tmp_path)#

CrocoDash.rm6.tests.test_grid_generation module#

CrocoDash.rm6.tests.test_grid_generation.test_hyperbolictan_thickness_profile_equispaced(nlayers, total_depth)#
CrocoDash.rm6.tests.test_grid_generation.test_hyperbolictan_thickness_profile_symmetric(nlayers, ratio, total_depth)#
CrocoDash.rm6.tests.test_grid_generation.test_latlon_to_cartesian(lat, lon, true_xyz)#
CrocoDash.rm6.tests.test_grid_generation.test_longitude_slicer()#
CrocoDash.rm6.tests.test_grid_generation.test_quadrilateral_area(v1, v2, v3, v4, true_area)#
CrocoDash.rm6.tests.test_grid_generation.test_quadrilateral_area_exception()#
CrocoDash.rm6.tests.test_grid_generation.test_quadrilateral_areas(lat, lon, true_area)#
CrocoDash.rm6.tests.test_grid_generation.test_rectangular_hgrid(lat, lon)#

CrocoDash.rm6.tests.test_parameter module#

CrocoDash.rm6.tests.test_parameter.test_change_MOM_parameter(tmp_path)#

Test the change MOM parameter function, as well as read_MOM_file and write_MOM_file under the hood.

CrocoDash.rm6.tests.test_regridding module#

CrocoDash.rm6.tests.test_regridding.test_add_or_update_time_dim(generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_add_secondary_dimension(get_curvilinear_hgrid, generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_fill_missing_data(generate_silly_vt_dataset)#

Only testing forward fill for now

CrocoDash.rm6.tests.test_regridding.test_generate_dz(generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_generate_encoding(generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_generate_layer_thickness(generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_get_boundary_mask(get_curvilinear_hgrid)#
CrocoDash.rm6.tests.test_regridding.test_mask_dataset(get_curvilinear_hgrid)#
CrocoDash.rm6.tests.test_regridding.test_smoke_untested_funcs(get_curvilinear_hgrid, generate_silly_vt_dataset)#
CrocoDash.rm6.tests.test_regridding.test_vertical_coordinate_encoding(generate_silly_vt_dataset)#

CrocoDash.rm6.tests.test_rotation module#

CrocoDash.rm6.tests.test_rotation.test_expanded_hgrid_generation(get_curvilinear_hgrid)#
CrocoDash.rm6.tests.test_rotation.test_get_curvilinear_hgrid_fixture(get_curvilinear_hgrid)#
CrocoDash.rm6.tests.test_rotation.test_get_rotation_angle(get_curvilinear_hgrid, get_rectilinear_hgrid)#

Generate a curvilinear grid and test the grid rotation angle at t_points based on what we pass to generate to generate_curvilinear_grid

CrocoDash.rm6.tests.test_rotation.test_initialize_grid_rotation_angle(get_curvilinear_hgrid)#

Generate a curvilinear grid and test the grid rotation angle at t_points based on what we pass to generate_curvilinear_grid

CrocoDash.rm6.tests.test_rotation.test_initialize_grid_rotation_angle_using_expanded_hgrid(get_curvilinear_hgrid)#

Generate a curvilinear grid and test the grid rotation angle at t_points based on what we pass to generate_curvilinear_grid

CrocoDash.rm6.tests.test_rotation.test_modulo_around_point()#

Test the modulo_around_point function

CrocoDash.rm6.tests.test_rotation.test_mom6_angle_calculation_method(get_curvilinear_hgrid)#
CrocoDash.rm6.tests.test_rotation.test_mom6_angle_calculation_method_simple_square_grids(angle)#

Create a square of length 2 (square_size). Rotate it by an angle and then compute the angle using rot.mom6_angle_calculation_method to ensure it gets the angle right.

CrocoDash.rm6.tests.test_tides module#

CrocoDash.rm6.tests.test_tides.dummy_tidal_data()#
CrocoDash.rm6.tests.test_tides.test_tides(dummy_tidal_data, tmp_path)#

Test setup_boundary_tides function.

CrocoDash.rm6.tests.test_utils module#

CrocoDash.rm6.tests.test_utils.test_angle_between(v1, v2, v3, true_angle)#
CrocoDash.rm6.tests.test_utils.test_get_edge(get_rectilinear_hgrid)#
CrocoDash.rm6.tests.test_utils.test_vecdot(v1, v2, true_v1dotv2)#

Module contents#