|
| 1 | +(ocean-merry-go-round)= |
| 2 | + |
| 3 | +# merry-go-round |
| 4 | + |
| 5 | +The `ocean/merry_go_round` test group induces a convective cell in a horizontal |
| 6 | +domain in order to verify tracer advection. |
| 7 | + |
| 8 | +```{image} images/merry_go_round_section.png |
| 9 | +:align: center |
| 10 | +:width: 500 px |
| 11 | +``` |
| 12 | + |
| 13 | +## supported models |
| 14 | + |
| 15 | +These tasks only support MPAS-Ocean. |
| 16 | + |
| 17 | +(ocean-merry-go-round-default)= |
| 18 | + |
| 19 | +## default |
| 20 | + |
| 21 | +### description |
| 22 | + |
| 23 | +For the initial conditions described below, tracer concentration contours match |
| 24 | +the streamlines of the convective cell, such that an accurate tracer advection |
| 25 | +scheme would result in no change in the tracer field in time. |
| 26 | + |
| 27 | +The init step generates the mesh and initial condition for the requested |
| 28 | +resolution. |
| 29 | + |
| 30 | +The forward step runs the model for the requested length of time. Tendencies |
| 31 | +for normal velocity and layer thickness are disabled, such that these fields |
| 32 | +remain fixed at their initial conditions throughout the simulation. |
| 33 | + |
| 34 | +The visualization step produces a plot illustrating the horizontal velocity, |
| 35 | +vertical velocity, simulated `tracer1` concentration, the error in simulated |
| 36 | +tracer concentration at the end of the forward simulation. |
| 37 | +(See above for an example). |
| 38 | + |
| 39 | +### mesh |
| 40 | +The mesh is planar and the resolution is specified by config option |
| 41 | +`merry_go_round_default:resolution`, which defaults to 5 m. The horizontal |
| 42 | +dimensions of the domain are set by config options `merry_go_round:lx` and |
| 43 | +`merry_go_round:ly`, defaulting to 500 m by 5 m. The domain is solid on the |
| 44 | +zonal boundaries and periodic on the meridional boundaries. |
| 45 | + |
| 46 | +### vertical grid |
| 47 | + |
| 48 | +The vertical coordinate is fixed throughout the simulation. |
| 49 | + |
| 50 | +```cfg |
| 51 | +[vertical_grid] |
| 52 | +
|
| 53 | +# the type of vertical grid |
| 54 | +grid_type = uniform |
| 55 | +
|
| 56 | +# Number of vertical levels for base resolution |
| 57 | +vert_levels = 50 |
| 58 | +
|
| 59 | +# Depth of the bottom of the ocean |
| 60 | +bottom_depth = 500.0 |
| 61 | +
|
| 62 | +# The type of vertical coordinate (e.g. z-level, z-star) |
| 63 | +coord_type = z-level |
| 64 | +
|
| 65 | +# Whether to use "partial" or "full", or "None" to not alter the topography |
| 66 | +partial_cell_type = None |
| 67 | +
|
| 68 | +# The minimum fraction of a layer for partial cells |
| 69 | +min_pc_fraction = 0.1 |
| 70 | +``` |
| 71 | + |
| 72 | +### initial conditions |
| 73 | + |
| 74 | +Salinity is constant throughout the domain as specified by |
| 75 | +`merry_go_round:salinity_background`, which defaults to 35 PSU. The initial |
| 76 | +temperature is high on the right side (`merry_go_round:temperature_right`) of |
| 77 | +and low on the left side (`merry_go_round:temperature_left`) of the domain, |
| 78 | +with defaults of 30 degC and 5 degC respectively. This field initiates |
| 79 | +a convective cell in the zonal and vertical dimensions. Debug tracer, `tracer1` |
| 80 | +, is initialized with a high value in the center of domain and gradually |
| 81 | +transitions to a lower value at the edges of the domain. |
| 82 | + |
| 83 | +### forcing |
| 84 | +N/A |
| 85 | + |
| 86 | +### time step and run duration |
| 87 | + |
| 88 | +The time step is determined by the config option `merry_go_round:dt_per_km` |
| 89 | +according to the mesh resolution (i.e. `convergence:base_resolution`). |
| 90 | +The run duration is determined by the config option |
| 91 | +`merry_go_round:run_duration` as measured in hours. |
| 92 | + |
| 93 | +### config options |
| 94 | + |
| 95 | +The following config options are available for this case: |
| 96 | + |
| 97 | +```cfg |
| 98 | +[merry_go_round] |
| 99 | +
|
| 100 | +# the size of the domain in km in the x direction |
| 101 | +lx = 0.5 |
| 102 | +
|
| 103 | +# the size of the domain in km in the y direction |
| 104 | +ly = 0.005 |
| 105 | +
|
| 106 | +# temperature on the right of the domain |
| 107 | +temperature_right = 30. |
| 108 | +
|
| 109 | +# temperature on the left of the domain |
| 110 | +temperature_left = 5. |
| 111 | +
|
| 112 | +# background salinity |
| 113 | +salinity_background = 35. |
| 114 | +
|
| 115 | +# background tracer2 concentration |
| 116 | +tracer2_background = 10. |
| 117 | +
|
| 118 | +# background tracer3 concentration |
| 119 | +tracer3_background = 20. |
| 120 | +
|
| 121 | +# Time step per resolution (s/km), since dt is proportional to resolution |
| 122 | +dt_per_km = 72000.0 |
| 123 | +
|
| 124 | +# Convergence threshold below which the test fails |
| 125 | +conv_thresh = 1.2 |
| 126 | +
|
| 127 | +# Run duration in hours |
| 128 | +run_duration = 6. |
| 129 | +
|
| 130 | +[merry_go_round_default] |
| 131 | +# the mesh resolution (km) at which the default test case is run and |
| 132 | +# the resolution to which refinement_factors are applied if refinement is |
| 133 | +# 'space' or 'both' on a planar mesh |
| 134 | +resolution = 0.005 |
| 135 | +``` |
| 136 | + |
| 137 | +### cores |
| 138 | + |
| 139 | +The number of cores is determined according to the config options |
| 140 | +``max_cells_per_core`` and ``goal_cells_per_core``. |
| 141 | + |
| 142 | +(ocean-merry-go-round-convergence)= |
| 143 | + |
| 144 | +## convergence tasks |
| 145 | + |
| 146 | +There are two versions of the convergence test case: `convergence_space` and |
| 147 | +`convergence_both` corresponding to space and both space and time convergence |
| 148 | +tests. All settings are the same as the |
| 149 | +{ref}`ocean-merry-go-round-default` case, but now the resolution and/or time step |
| 150 | +are refined to asses the order of convergence for tracer advection. Tests |
| 151 | +involving spatial convergence have a horizontal resolution of |
| 152 | +`convergence:base_resolution` times `convergence:refinement_factors_space`. |
| 153 | +Tests invoking both spatial and temporal convergence refine the spatial |
| 154 | +resolution as described above and use a time step set by |
| 155 | +`merry_go_round:dt_per_km` times the refined spatial resolution |
| 156 | +(see {ref}`dev-ocean-convergence` for more details on how to change resolutions |
| 157 | +or time steps tested). |
| 158 | + |
| 159 | +The init and forward steps are analogous to what is described above for |
| 160 | +{ref}`ocean-merry-go-round-default`. |
| 161 | + |
| 162 | +The analysis step computes the `convergence:error_type` of your choosing, |
| 163 | +between the simulated `tracer1` field and the exact solution at the end |
| 164 | +of the simulation. Because tracer concentration contours match the streamlines |
| 165 | +of the convective cell the exact solution is equivalent to the initial |
| 166 | +condition. It also computes the convergence rate with resolution and/or |
| 167 | +time step, producing a plot like: |
| 168 | + |
| 169 | +```{image} images/merry_go_round_convergence.png |
| 170 | +:align: center |
| 171 | +:width: 500 px |
| 172 | +``` |
| 173 | +The visualization step plot the numerical solution, exact solution, and their |
| 174 | +difference for each resolution and/or time step simulated. |
0 commit comments