wiki:forced_lmdz

preparing a forced LMDZ configuration with Schwarz for further developments

The following was done for a LMDZOR_v6.1.5 version but should work with newer versions.

The forced LMDZOR_v6.1.5 configuration

Install modipsl in a directory named for you new configuration. For instance:

mkdir SWZ_LMDZORV6
cd SWZ_LMDZORV6
svn_ano

If your environment on irene is set properly you should have the alias svn_ano defined for downloading modipsl.

You can review the available LMDZOR versions by going to modipsl/util and running:

./model -h

In our case the installed model was LMDZOR_v6.1.5:

./model LMDZOR_v6.1.5

Once the model is installed go to the general Makefile directory in config/LMDZOR_v6.

You need to edit the Makefile.

It contains a LMD9695-L39noORCH that you will call but orchidee is not removed from the lmdz compiling section.

Edit lmdz compiling section from Makefile this way:

lmdz: ../../modeles/LMDZ
#   (cd ../../modeles/LMDZ; ./makelmdz_fcm -d $(RESOL_LMDZ) -prod -arch $(FCM_ARCH) -j 8 ce0l ; mv bin/ce0l_$(RESOL_LMDZ)_phylmd_seq.e ../../bin/create_etat0_limit.e ; )
    (cd ../../modeles/LMDZ; ./makelmdz_fcm -d $(RESOL_LMDZ) -debug -mem -cosp true -v false -parallel mpi_omp -arch $(FCM_ARCH) -j 8 -io xios -rrtm true gcm ; mv bin/gcm_$(RESOL_LMDZ)_phylmd_para_mem.e ../../bin/gcm.e ; )

It will remove the compilation of the code that creates limit states that will bug under this configuration, switch orchidee to false and give the proper name of the executable to move to the bin directory.

Now you can compile using:

gmake LMD9695-L39noORCH

setting the config files for running a forced LMDZ

config.card

In config.card add an ORCA_version variable in the [UserChoices] section:

#============================
ORCA_version=ORCA2.3
#============================
#-- 1Y, 1M, 5D, 1D Period Length for one execution
PeriodLength=5D

It will be needed by lmdz.card for retrieving the proper files.

Edit the [Executable] section to set a single OpenMP thread (Schwarz implementation breaks OpenMP support):

[Executable]
#D- For each component: Real name of executable, Name of executable in the run directory 
#D- Here is set 47MPI*8OMP which is suitable for resolution 144x142x79
#D- Change to 31MPI*4OMP for resolution 96x95x39
ATM= (gcm.e, lmdz.x, 31MPI, 1OMP)
IOS= (xios_server.exe, xios.x, 1MPI)

You can set the restart to none:

[Restarts]
#D- by default: config.card describes no restart for all components 
#D-             ie start from Levitus or limit files
#D- If you want to restart all components from the same simulation,
#D-      put OveRule flag to 'y' and set the next 3 parameters
OverRule=n

and

[ATM]
WriteFrequency="1M 1D HF"
# If config_Restarts_OverRule == 'n' next 4 params are read
Restart= n

lmdz.card

Go to COMP and edit lmdz.card.

The Schwarz method was implemented with the old Physics set this:

LMDZ_Physics=AP

Set read_climoz:

read_climoz=2

You can deactivate COSP:

LMDZ_COSP_OK=n

Use this initial state (this is why you need ORCA_version):

[InitialStateFiles]
List= (${R_IN}/ATM/IPSLCM6/${config_UserChoices_ORCA_version}xLMD${RESOL_ATM_XY}/start_${config_UserChoices_ORCA_version}xLMD${RESOL_ATM_3D}_o2a_v3.nc   , start.nc       ), \
      (${R_IN}/ATM/IPSLCM6/${config_UserChoices_ORCA_version}xLMD${RESOL_ATM_XY}/startphy_${config_UserChoices_ORCA_version}xLMD${RESOL_ATM_3D}_o2a_v3.nc, startphy.nc    )

Use these boundary files:

[BoundaryFiles]
List=()
#
# With CMIP6 aerosols version 1
# With 3D ozone
ListNonDel= (${R_IN}/ATM/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_1855_v5.nc, aerosols.nat.nc),\
            (${R_IN}/ATM/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_1995_v5.nc, aerosols1980.nc),\
            (${R_IN}/ATM/${RESOL_ATM}/AR5/HISTORIQUE/climoz_LMDZ_1995_v2.nc, climoz_LMDZ.nc),\
            (${R_IN}/ATM/LIMIT/AMIP.v20170419/interpol/${RESOL_ATM_XY}_ORCA2.3_365d/limit_1979_2008_clim.nc, limit.nc),\
            (${R_IN}/ATM/SOLAR/CMIP6/v3.1corr/Control/solarforcing_v3.1_pdControl_ave_6bands_365days.nc, solarforcing.nc)

set gcm.def_96x95_AP

Add these lines and set the Schwarz parameters for your simulation:

## Schwarz coupling parameters from config.card
## number of schwarz iterations
mswr= 5
## write output at schwarz iteration number ksout
ksout= 5
## first all physics iteration
kall= 1
## frequency of coupling in seconds 
ncplfrq= 86400

The parameter ncplfrq is used to set the Schwarz window length as for our implementation of Schwarz it is always equal to the coupling frequency.

insert the modifications from the svn repository into the sources

Next follow the procedure to insert Schwarz modifications and subroutines to your sources see updating LMDZ beginning.

Last modified 2 years ago Last modified on 07/29/19 17:02:31