Medium case benchmark: Double-gyre NEMO configuration
The medium case benchmark is based on an idealized configuration of the NEMO ocean model: a square and 5000-meter deep flat bottom ocean at mid latitudes (the so called square-box or SQB configuration).
In this square basin (between 25°N and 45°N), a double gyre circulation is created by a constant zonal wind forcing blowing westward in the northern and southern parts of the basin and eastward in the middle part of the basin (with sinusoidal latitude dependence). The western intensification of these two gyres produces western boundary currents that feed an eastward jet in the middle of the square basin (see animation below, showing the model sea surface height). This jet is unstable so that the flow is dominated by chaotic mesoscale dynamics, with largest eddies that are about 100 km wide, and to which correspond velocities of about 1 m/s and dynamic height differences of about 1 meter. All this is very similar in shape and magnitude to what is observed in the Gulf Stream (North Atlantic) or in the Kuroshio (North Pacific).
The time evolution of this chaotic system is computed using the NEMO primitive equation model, with a minimum horizontal resolution of 1/4°×1/4° cos(latitude) and 11 levels in the vertical (see Cosme et al. 2010, for more detail about the model configuration). The model is started from rest with uniform stratification, and the main three physical parameters governing the dominant characteristics of the flow are the stratification, the bottom friction and the horizontal viscosity.
This NEMO configuration can be installed and used as follows:
Download the NEMO model
- Register to the NEMO website http://www.nemo-ocean.eu/: get login and password. After login, you can access to the full NEMO documentation: reference manuals, user's guides, description of the reference configurations,...
- Download NEMO (as also explained in the NEMO Quick Start Guide):
svn --username "my_login" co http://forge.ipsl.jussieu.fr/nemo/svn/tags/nemo_v3_3/NEMOGCMThis creates a directory structure starting from NEMOGCM, with the source code, the reference NEMO configurations and associated tools.
IMPORTANT: I stayed with the version 3.3 of NEMO because it will not change anymore (which is important to run benchmarks) and I still have problems with version 3.4.
Prepare the SQB configuration
- Go to the directory with the NEMO reference configurations:
- See the list of available compilers and platforms:
./makenemo -m helpAnd define the compiler and platform that you want to use
(with option '-j0' to avoid compiling anything at this stage), for instance:
./makenemo -j0 -m ifort_linux
- Copy the GYRE reference configuration to create a new SQB configuration
(without compiling, with option '-j0'):
./makenemo -j0 -r GYRE -n SQB
- Go to the directory with the newly created SQB configuration:
- Modify the precompilation options file "cpp_SQB.fcm", using the following CPP options: cpp_SQB.fcm (appropriate for the SQB configuration). Please refer to the NEMO CPP options guide (this page requires to be logged in) for the meaning of the CPP options. Additional keys are needed to parallelize the computation using domain decomposition (key_mpp_mpi, key_nproci>1 and key_nprocj>1, for instance key_nproci=4 and key_nprocj=4 to use 16 processors).
- Copy the following source directory (specific to SQB):
in the directory:
- Edit the file "par_SQB.h90" to change the model resolution:
set jp_cfg=4 for the 1/4° resolution SQB configuration.
Compile the SQB configuration
- Go to the directory with the compiling options:
- Edit the file corresponding to your compiler and platform, for instance:
vi arch-ifort_linux.fcmto change the directory with the NetCDF library.
IMPORTANT: The same Fortran compiler must have been used to produce the NETCDF library
(so that the format of the 'netcdf.mod' file is appropriate).
- Go to the directory with the NEMO configurations:
- Compile NEMO (current configuration and compiler have already been set above):
Run the SQB configuration
- Go to the directory where to run your first test experiment:
- Replace the namelist file "namelist" (copied above from the GYRE configuration),
by the SQB namelist:
namelist_04_biharm for the 1/4° resolution SQB configuration, with biharmonic horizontal mixing.
Please refer to the NEMO manual for the meaning of the model parameters.
- Run your first one year simulation (opa is the name of the executable):
./opaThe model output includes:
- ocean.output: model control print (text file);
- time.step: current timestep (text file);
- SQB*restart.nc: restart files (NetCDF files);
- SQB*grid*.nc: output files (NetCDF files).
- ocean.output: model control print (text file);
- To continue the model simulation from the final restart file,
the namelist must be edited to modify the initial and finl timesteps.
Here is an example ksh script iterating several years:
run.ksh, together with the skeleton
namelist edited by the script:
namelist_04_harm.skel for the 1/4° resolution SQB configuration, with harmonic horizontal mixing;
namelist_04_biharm.skel for the 1/4° resolution SQB configuration, with biharmonic horizontal mixing.
- This is just a starting point. Please set up your own directory structure to organize your assimilation experiments. The only two things that you need to run the SQB configuration are the executable and the namelist with the parameters.
- Cosme E., Brankart J.-M., Verron J., Brasseur P. and Krysta M. Implementation of a reduced-rank, square-root smoother for high resolution ocean data assimilation. Ocean Modelling, 33, 87-100, 2010.