Skip to content

Change horizontal domain

nick-klingaman edited this page Nov 24, 2020 · 1 revision

Changing the horizontal domain

You will need to add a new horizontal MC-KPP horizontal domain if you want to:

  • Reduce or enlarge the horizontal domain over which the model runs, keeping the horizontal resolution the same.
  • Run at a new horizontal resolution

Note that you do not necessarily need to change the horizontal domain if you are changing the coupling region, because MC-KPP can run over a domain that is larger than the domain over which it is coupled to the atmosphere. Changing the horizontal domain can be cumbersome, so it is not recommended unless you need to do it.

Until MC-KPP supports MPI-based parallelism, we cannot support near-global coupling at resolutions beyond N216 due to HPC memory limitations. Thus, for resolutions beyond N216, reducing the MC-KPP horizontal domain to the minimum required for the desired coupling region is an effective way to reduce memory requirements and ensure the model can run efficiently.

Creating a new MC-KPP parameter.inc file

The MC-KPP horizontal domain is defined at compile time. Thus, modifying it requires modifying the source code, particularly the parameter.inc file. You will need to:

  • Check out the MC-KPP source code from puma (see documentation). Checking out the code from GitHub will not work unless your Rose suite can pull the MC-KPP source code from GitHub or from your local working copy.
  • Copy one of the existing parameter.inc.* files to a new file that describes your domain. The typical pattern is parameter.inc.[resolution]_[domain], for example parameter.inc.n512e_tropics.
  • Edit this new file to modify the following parameters:
    • NX is the number of gridpoints in the MC-KPP domain in the x direction
    • NY is the number of gridpoints in the MC-KPP domain in the y direction
    • NX_GLOBE is the number of gridpoints globally in the x direction (i.e., the MetUM global longitude grid)
    • NY_GLOBE is the number of gridpoints globally in the y direction (i.e., the MetUM global latitude grid)
  • Add your new file to the repository with svn add [file] and commit your changes to the puma repository.

Modifying the MetUM-GOML Rose suite

Starting from one of the standard MetUM-GOML Rose suites, you will need to

  1. In rose_suite.conf
    a. Change KPP_DOMAIN in to the name you gave your [domain] in the step above. The name must match so that FCM can find the correct parameter.inc file when compiling MC-KPP.
    b. Ensure that KPP_RESOLUTION is set to the [resolution] you used in the step above. Normally, this is the same as the MetUM atmospheric resolution. If you use the GUI Rose suite editor, your KPP_DOMAIN (and possibly KPP_RESOLUTION) will not be available as choices in suite conf --> Build and run. You can add these as choices by editing meta/rose-meta.conf.

  2. Under coupled -> namelist -> KPP Namelist -> Horizontal and Vertical Domain (or in the NAME_DOMAIN section of app/coupled/rose-app.conf):
    a. Change alat and alon to the first (southernmost) latitude and first longitude (from east to west) of the domain over which you want to run KPP. Recall that this is not necessarily the same domain as the region in which you want to couple MC-KPP to the atmosphere.
    b. Ensure that delta_lat and delta_lon are correct for your horizontal resolution. If you are not changing the MC-KPP horizontal resolution from the resolution already configured in the suite, you do not need to change these settings.

  3. Under coupled -> namelist -> KPP Namelist -> Coupling Controls (or in the NAME_COUPLE section of app/coupled/rose-app.conf):
    a. Change ifirst and ilast to the indices of the first (smallest longitude in degrees east) and last (largest longitude in degrees east) coupled gridpoints on the atmospheric grid. Note that MC-KPP is written in Fortran, so these indices are 1-based. Note that these are the indices on the atmospheric grid, not the indices on your MC-KPP domain.
    b. Similarly, change jfirst and jlast to the indices of the first (southernmost) and last (northernmost) coupled gridpoints on the atmospheric grid.

  4. Ensure that all of the MC-KPP ancillary files you need to use include data for all points within your domain. The ancillary files can include data outside your domain; MC-KPP will slice out your domain accordingly.

Once you have completed the above steps, you should be ready to run a MetUM-GOML simulation with your new KPP horizontal domain.