Warning, /verification/global_ocean.90x40x15/README is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit b6859e51 on 2018-02-26 17:08:29 UTC
304d907934 Patr*0001 ============================================
19ec7ca2f5 Mart*0002 Example: "4x4 Global Simulation with Seasonal Forcing"
55395d2232 Jean*0003 ============================================
0004 (see also similar set-up in: verification/tutorial_global_oce_latlon/)
0005
0006 From verification/global_ocean.90x40x15 dir:
19ec7ca2f5 Mart*0007
0008 Configure and compile the code:
55395d2232 Jean*0009 cd build
d6a28d3589 Jean*0010 ../../../tools/genmake2 -mods ../code [-of my_platform_optionFile]
55395d2232 Jean*0011 [make Clean]
19ec7ca2f5 Mart*0012 make depend
0013 make
55395d2232 Jean*0014 cd ..
d6a28d3589 Jean*0015
0016 To run:
0017 cd run
0018 ln -s ../input/* .
0019 ../input/prepare_run
0020 ln -s ../build/mitgcmuv .
0021 ./mitgcmuv > output.txt
55395d2232 Jean*0022 cd ..
19ec7ca2f5 Mart*0023
d6a28d3589 Jean*0024 There is comparison output in the directory:
0025 results/output.txt
0026
19ec7ca2f5 Mart*0027 There is comparison output in directory:
b6859e5149 Andr*0028 (verification/global_ocean.90x40x15/) results
19ec7ca2f5 Mart*0029
0030 Comments:
0031 o The input data is real*4.
0032 o The surface fluxes are derived from monthly means of the NCEP climatology;
55395d2232 Jean*0033 - a matlab script is provided that created the surface flux data files from
19ec7ca2f5 Mart*0034 the original NCEP data: ncep2global_ocean.m in the diags_matlab directory,
0035 needs editing to adjust search paths.
0036 o matlab scripts that make a simple diagnostic (barotropic stream function,
0037 overturning stream functions, averaged hydrography etc.) is provided in
55395d2232 Jean*0038 verification/tutorial_global_oce_latlon/diags_matlab:
19ec7ca2f5 Mart*0039 - mit_loadglobal is the toplevel script that run all other scripts
0040 - mit_globalmovie animates theta, salinity, and 3D-velocity field for
0041 a layer "iz", if "meanfields=0"
0042
55395d2232 Jean*0043 --------------------------------------------
0044 Additional example:
0045 similar set-up, with the same executable, and using pkg/dwnslp:
0046 to run this 2nd example:
0047 cd input.dwnslp
0048 ln -s ../input/* .
0049 ../input/prepare_run
0050 ../build/mitgcmuv > output.dwnslp.txt
0051 cd ..
0052
304d907934 Patr*0053
0054 ============================================
0055 Use of "blank tiles" in conjunction with exch2 package:
0056 ============================================
0057
0058 This verification experiment also demonstrate the omission of tiles
0059 (or processors) for tiles that are fully land cover and don't need computation.
0060 The relevant config. files to be manipulated are:
0061 * at compile time, in dir. code/: packages.conf, SIZE.h
0062 * at run time, in dir. input/: data.exch2
0063
0064 To enable this feature requires package "exch2"
0065 (see Section 6.2.4 "exch2: Extended Cubed Sphere Topology" of online manual),
0066 i.e. in code/packages.conf add "exch2"
0067
0068 The basic layout of the experiment is Nx*Ny = 90x40.
0069 In a single-processor config. with very small tile sizes (sNx*sNy=10*10)
0070 this can be represented, e.g. via
0071 & sNx = 10,
0072 & sNy = 10,
0073 & OLx = 3,
0074 & OLy = 3,
0075 & nSx = 9,
0076 & nSy = 4,
0077 & nPx = 1,
0078 & nPy = 1,
0079 i.e. we use nSx*nSy=9*4=36 virtual processors.
0080
0081 An equivalent parallel setup using 9 virtual and 4 real processors
0082 would look like:
0083 & sNx = 10,
0084 & sNy = 10,
0085 & OLx = 3,
0086 & OLy = 3,
0087 & nSx = 9,
0088 & nSy = 1,
0089 & nPx = 1,
0090 & nPy = 4,
0091
0092 In this layout it turns out that tile number 30 is "empty", i.e. fully land covered.
0093 We wish to remove this tile from our calculation. How to proceed?
0094
0095 1. Find out which tiles to eliminate via a config. that uses all tiles
0096 ---
0097 1.1. At compile time:
0098 * add line "exch2" to packages.conf
0099 * configure SIZE.h using your desired individual tile size, e.g. sNx*sNy=10*10, as follows:
0100 & sNx = 10,
0101 & sNy = 10,
0102 & OLx = 3,
0103 & OLy = 3,
0104 & nSx = 9,
0105 & nSy = 1,
0106 & nPx = 1,
0107 & nPy = 4,
0108 As described above you are using 4 real processors with 9 virtual tiles per processor.
0109 * compile (don't forget to compile via -mpi or similar)
0110
0111 1.2 At runtime:
0112 * need to reflect your basic layout in data.exch2
0113 This is simple: since you are not using any non-trivial topology with
0114 multiple facets (such as cubed-sphere),
0115 you only need to specify one basic facet (Nx,Ny)=(90,40) layout via following line:
0116 dimsFacets = 90, 40,
0117 Then run the moodel, e.g. via:
0118 mpirun -np 4 ./mitgcmuv
0119
0120 1.3 Diagnose which tile numbers are empty:
0121 * from STDOUT.000[0-3] you can infer which tiles are empty using following grep:
0122 grep "Empty tile" STDOUT.* | awk '{print " " $6 ","}' > empty_tiles.txt
0123 * In this example there's only one empty tile, and it is #30.
0124
0125 2. Configuring with empty tiles removed
0126 ---
0127 2.1 At compile time:
0128 We've determined that 1 out of nSx*nPx*nSy*nPy=36 tiles is empty and can be removed,
0129 leaving 36-1=35 non-empty tiles. We are free to re-order nSx,nPx,nSy,nPy in any way,
0130 as long as nSx*nPx*nSy*nPy=35. Here's how it's chosen in the verif. experiment
0131 (see file SIZE.h_mpi)
0132 & sNx = 10,
0133 & sNy = 10,
0134 & OLx = 3,
0135 & OLy = 3,
0136 & nSx = 7,
0137 & nSy = 1,
0138 & nPx = 1,
0139 & nPy = 5,
0140 and for which, as required nSx*nPx*nSy*nPy=35
0141
0142 2.2 At runtime:
0143 We now need to specify in data.exch2 the number of the empty tile to be removed.
0144 This is done as follows (see file data.exch2.mpi):
0145 blankList = 30,
0146 If there were more empty tiles, this would be a more extensive index array, e.g.
0147 blankList = tile1, tile2, tile3, ...
0148 Now run the model (note that we've selected nPy=5, so in this example we actually
0149 *increase* the number of "real" processors used, despite reducing the number of
0150 total, i.e. "real" plus virtual tiles from 36 to 35):
0151 mpirun -np 5 ./mitgcmuv
0152
0153
55395d2232 Jean*0154 ============================================
0155 Adjoint set-up example:
304d907934 Patr*0156 ============================================
55395d2232 Jean*0157
0158 Configure and compile the code:
0159 cd build
0160 ../../../tools/genmake2 -mods='../code_ad'
0161 [make Clean]
0162 make depend
0163 make adall
0164 cd ..
0165 To run the code:
0166 cd input_ad
0167 ./prepare_run
0168 ../build/mitgcmuv_ad > output_adm.txt
0169 cd ..