wiki:schwarz

Version 7 (modified by snguyen, 2 years ago) (diff)

--

updating NEMO and LMDZ sources with Schwarz routines

This page describes how to proceed to update the sources of NEMO and LMDZ with the Schwarz subroutines from the svn cocoa repository.

updating NEMO

Go to your config/IPSLCM6/SOURCES directory.

Get the NEMO Schwarz sources from the repository:

svn co svn+ssh://forge/ipsl/forge/projets/cocoa/svn/SCHWARZ_IPSLCM6VLRNOP/SOURCES/NEMO MY_NEMO

All the needed files to modify NEMO for the Schwarz algorithm are in this directory: MY_NEMO.

The rest of the work consist in checking the subroutines in MY_NEMO vs those in SOURCES/NEMO, NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/MY_SRC or NEMOGCM/NEMO/OPA_SRC.

Review each .f90 in MY_NEMO:

  1. If it is present in SOURCES/NEMO do a vimdiff between the two and make the needed changes to the file in SOURCES/NEMO to include Schwarz modifications.
  2. If it is present in NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/MY_SRC but not in SOURCES/NEMO copy the file to SOURCES/NEMO do a vimdiff with the MY_NEMO file and include Schwarz modifications.
  3. If it is neither in ORCA2_LIM3_PISCES/MY_SRC nor in SOURCES/NEMO copy the file from NEMOGCM/NEMO/OPA_SRC review the changes in MY_NEMO with vimdiff and include them in the SOURCES/NEMO file.

When you have an updated version of every .f90 files from MY_NEMO in SOURCES/NEMO you can recompile NEMO.

Be careful before compiling that you have an additional file that is not present in the original NEMO: schwarz.F90. This file only needs to be copied.

You will still have to modify the NEMO namelist: namelist_ORCA2_cfg.

In your submission directory (where you have config.card and Job_MYEXPERIMENT files), go to PARAM and modify namelist_ORCA2_cfg.

Add mswr, ksout, kall and cplfrq to the &namrun section:

   mswr        =  010   !  number of scwharz iterations
   ksout       =  010   !  Schwarz iteration for output
   kall        =  001   !  first iteration with all physics
   ncplfrq     =  86400 !  coupling frequency in seconds

You should try to run a simulation with mswr=1 ksout=1, kall=1 and ncplfrq=<coupling frequency of your reference simulation> as a test.

It everything is ok it will give you the same result as without Schwarz.

updating LMDZ

Go to the directory modeles/LMDZ/libf.

Get the Schwarz LMDZ subroutines from the repository:

svn co svn+ssh://forge/ipsl/forge/projets/cocoa/svn/SCHWARZ_IPSLCM6VLRNOP/SOURCES/SCHWARZ_IPSLCM6VLRNOP/SOURCES/SWZ_LMDZ SWZ_LMDZ

As for NEMO you have to update the LMDZ/libf files with those from SWZ_LMDZ.

For each file in SWZ_LMDZ you get a directory which is the directory where the file is located in LMDZ/libf. Go there make a copy of the file:

cp my_initial_file.f90 my_initial_file.f90.old

Use vimdiff to review the changes that need to be applied to the file LMDZ/libf from SWZ_LMDZ.

Once this is over copy schwarz.F90 in the proper directory.

Compiling LMDZ should be ok.

As for NEMO you will need to update a configuration file:

Edit COMP/lmdz.car and put this line in ParametersFiles:

(${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_XY}_${LMDZ_Physics}_SWZ, gcm.def), \

to get the proper gcm.def file.

In