示例#1
0
    def test_grid_map_cats(self, dump_folder):
        """
        Test a grid map - read and write out
        """

        # triangle grid

        gcm3 = CyGridMap()
        grid_map_file = testdata['GridMap']['BigCombinedwMap']
        gcm3.text_read(grid_map_file)

        topology_file = os.path.join(dump_folder, 'BigCombinedTop.dat')
        gcm3.export_topology(topology_file)
示例#2
0
    def test_grid_map_tri(self, dump_folder):
        """
        Test a grid map - read and write out
        """

        # triangle grid

        gcm2 = CyGridMap()
        grid_map_file = testdata['GridCurrentMover']['curr_tri']
        gcm2.text_read(grid_map_file)

        # topology_file = os.path.join( cur_dir, 'chesbay_top.dat')
        # self.gcm2.export_topology(topology_file)

        netcdf_file = os.path.join(dump_folder, 'ChesBayTop.nc')
        gcm2.save_netcdf(netcdf_file)
示例#3
0
    def test_grid_map_curv(self, dump_folder):
        """
        Test a grid map - read and write out
        """

        # curvilinear grid

        gcm1 = CyGridMap()
        grid_map_file = testdata['GridMap']['curr']
        gcm1.text_read(grid_map_file)

        # topology_file = os.path.join(cur_dir, 'ny_cg_top.dat')
        # self.gcm.export_topology(topology_file)
        # self.gcm.save_netcdf(netcdf_file)

        netcdf_file = os.path.join(dump_folder, 'ny_cg_top.nc')
        gcm1.save_netcdf(netcdf_file)