Direkt zum Inhalt | Direkt zur Navigation

Personal tools

Sektionen
You are here: Home » Users » Tutorials » Tutorial of OASIS3 » Compiling and running «tutorial » component models with OASIS3

Compiling and running «tutorial » component models with OASIS3

1.     To compile OASIS3 and its PSMILe library:

  • Go into directory oasis3/util/make_dir
  • Adapt the “make.inc” file which includes your platform header makefile (here “make.inc” includes “make.pgi_cerfacs”).
  • Type “make clean –f TopMakefileOasis3; make  oasis3_psmile –f  TopMakefileOasis3”
    • The executable “oasis3.MPI1.x” is available in directory $ARCHDIR/bin ($ARCHDIR is defined in your platform header file)
    • The libraries that need to be linked to the models are available in directory $ARCHDIR/lib

2.     To compile the tutorial models:

  • Go into directory oasis3/examples/tutorial
  • Type “make clean” and “make”
  • The executables “toyocn” and “toyatm” are available in the current directory
  • A local link is made to the executable “oasis3.MPI1.x” in directory $ARCHDIR/bin

3.     To run the two tutorial component models:

  • Adapt to your platform and execute the script run_tutorial: "./run_tutorial"
    • The results of the tutorial1 coupled model are now in subdirectory /work_tutorial
    • In their current form, model1.F90 and model2.F90 are not interfaced with the OASIS3 PSMILe and do not perform any exchanges. They just run for 6 timesteps of 1 hour each without doing anything specific.

4.     To interface model1.F90 and model2.F90 with the OASIS3 PSMILe librairy and run the tutorial coupled model:

  • Modify model1.F90 and model2.F90 so that the models first receive their input coupling fields and then, at the end of the timestep, send their output coupling field, as detailed above. The lines where to introduce the OASIS3 PSMILe specific calls are marked with "!! TO COMPLETE ...". Most of the variables that will be used in the Psmile routines calls are already defined at the beginning of the programs.
  • The OASIS3 configuration file “namcouple” (in directory oasis3/examples/tutorial/data_oasis3) is written to perform these exchanges every 7200 sec, i.e. every two timesteps. The interpolations specified to transform FSENDOCN into FRECVATM and FSENDATM into FRECVOCN are BILINEAR.
  • Compile the toy coupled model. A step-by-step approach is recommended, i.e. validate one-by-one each call implemented.
  • Run the toy coupled model. To run the toy coupled model, adapt the script run_tutorial so to start also the coupler (currently, the script starts only the models).
  • In this configuration, where both models call their prism_get_proto before their prism_put_proto, a deadlock will occur in the coupled toy model. Find which modifications are needed in the toy to remove this deadlock without changing the order of the prism_get_proto and prism_put_proto (see section 4.8.1 of the User Guide for more details).
  • The results of the tutorial coupled model are now in subdirectory ${HOME}/oasis3/examples/tutorial/work_tutorial

  • You can visualize the results with ferret and the scripts script_ferret_*_box.jnl. Type “ferret” and then “go xxx.jnl” where xxx.jnl is the name of the ferret script you want to run.
  • Explain why the first instance of FSENDATM in the file FSENDATM_out.2000-01-01T00:00:00.nc does not fit the first instance of FRECVOCN in the file FRECVOCN_out.2000-01-01T00:00:00.nc
  • Keep your results by renaming /work_tutorial into /work_tutorial_A


In this configuration, model1, model2 run with one process each. This is indicated in the “namcouple” configuration file (see lines below $CHANNEL keyword) and in the launching script “run_tutorial” (see “nproc_exe1” and “nproc_exe2”).

© Copyright ENES Portal 2011