Warning, /utils/exch2/matlab-topology-generator/README is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
006cfe01c7 Jean*0001 ---- Oct 13, 2010 (after checkpoint62l)
0002 matlab-topology-generator is no longer supported and does not work anymore
0003 since latest additions to pkg/exch2 (for OBCS) have not been incorporated into
0004 the matlab scripts.
0005 example of "data.exch2" file to use are provided in MITgcm/utils/exch2/input/
0006
ed07a0ef61 Jean*0007 ---- May 12, 2009 (after checkpoint61n)
0008 fortran code to set-up topology is now part of pkg/exch2, with new parameter
0009 file "data.exch2". For now, keep a compatile version of matlab-topology-generator
006cfe01c7 Jean*0010 (writing files "W2_EXCH2_SIZE.h" and "w2_e2setup.F") as back-up solution
ed07a0ef61 Jean*0011 until new code is extensively tested.
0012 ------------------
0013
b190d42f57 Andr*0014 Matlab code to generate topology description for MITgcm cs6 conventions.
0015
0016 o To run start matlab and execute script driver.m
0017 o To set sizes edit lines in driver.m
006cfe01c7 Jean*0018 - Settings nr, ng, nb are index space sizes for cube grid.
8598158690 Jean*0019 They are (nr,ng) the two dimensions (in x and y) or the 1rst face
0020 followed by (nb) the 1rst dimension (in x) of the 2nd face.
0021 Note - nr, ng and nb do not have to equal, however the
b190d42f57 Andr*0022 current physical grid generation software assumes they
0023 are equal.
006cfe01c7 Jean*0024 - Settings tnx and tny are the tile sizes ( these correspond to
b190d42f57 Andr*0025 snx and sny in SIZE.h ). tnx and tny must subdivide nr, ng and nb
0026 exactly.
006cfe01c7 Jean*0027 The product nsx*npx from SIZE.h needs to equal the number of
b190d42f57 Andr*0028 tiles created by driver.m
7ab060ea19 Jean*0029 - Setting mapIO select option for global-IO mapping.
0030 3 options are implemented:
0031 mapIO=-1 : old format: put domains 1 after the other in the X direction.
0032 can waste disk space if cube dimensions (nr,ng,nb) are not equal.
0033 mapIO= 1 : compact format, 1 domain after the other (mostly in Y direction)
0034 but needs to fold some domains (face) that are too large.
0035 mapIO= 0 : compact format (= 1 long line), one domain after the other.
0036 This format is not yet supported by pkg/mdsio.
b190d42f57 Andr*0037
0038 The key output from this code is a Fortran header file W2_EXCH2_TOPOLOGY.h
0039 and one or more Fotran files called e2setup*.F. These are written
0040 by exch2_setup_cs6_print.m. The header file contains the declarations
0041 of the arrays used to describe the index space topology of the cube domain.
006cfe01c7 Jean*0042 The e2setp*.F files contain the code to initialize these arrays.
0043 Two output options ( variable outmode ) are available in
0044 exch2_setup_cs6_print.m. One produces a single file e2setup.F with a driver
0045 routine that calls a setup routine for each tile. For large numbers of tiles
0046 this file can be huge and can cause some Fortran compilers (g77 certainly) to
0047 allocate ridiculous amounts of memory to parse this file. An alternate output
0048 mode produces one file for each tile initialization routine and one file
0049 "e2setup.F" for the driver. This mode is kinder to the compiler but creates a
b190d42f57 Andr*0050 visually annoying large number of source files (one for each tile).
0051
0052
0053 File list
0054 driver.m :: Controls the topology generation
7ab060ea19 Jean*0055 exch2_divider.m :: Calculate the larger divider of input list
b190d42f57 Andr*0056 exch2_setup_cs6_domains.m :: Defines the cube faces (aka domains)
0057 exch2_setup_cs6_get_external_neighbor_index_ranges.m :: Figures out the index remapping operators
0058 :: and index ranges for halo's between cube faces.
0059 exch2_setup_cs6_get_external_neighbor_tiles.m :: Figures out neighbor between domains for each tile.
0060 exch2_setup_cs6_get_internal_neighbor_index_ranges.m :: Figures out the index remapping operators
0061 :: and index ranges for halo's within a cube face.
0062 exch2_setup_cs6_get_internal_neighbor_tiles.m :: Figures out neighbors with a domain for each tile.
0063 exch2_setup_cs6_get_neighbor_domains.m :: Defines connectivity between domains.
0064 exch2_setup_cs6_plot.m :: Plots the tiles using the conventional cube
0065 :: domain layout.
006cfe01c7 Jean*0066 exch2_setup_cs6_print.m :: Writes the Fortran code that defines the topology
b190d42f57 Andr*0067 :: and that is linked with the model run.
0068 exch2_setup_cs6_tiles.m :: Builds lists of each tile and its location within
0069 :: a domain and within the global index space.
503a931bd8 Dimi*0070
0071 generate_blanklist.m :: generate blanklist.example.txt