source: CONFIG/IPSLCM/IPSLCM4_v2/tags/IPSLCM4_v2_4/EXP00/COMP/oasis.driver

Last change on this file was 162, checked in by aclsce, 17 years ago

AC : - Modified to run on ccrt scalar machine platine

  • Modified to run coupled model either in MPI1 or MPI2 context (now a run_file is used to launch the simulation)
  • Added functions to activate/desactivate runnning environnment variables
File size: 1.4 KB
Line 
1#!/bin/ksh
2#-----------------------------------
3CPL_Initialize ()
4{
5
6    IGCM_debug_PushStack "CPL_Initialize"
7 
8    echo INITIALIZE CPL !!!
9
10#D- MPI context used to launch the coupled model
11LIBMPI=$(cat ${SUBMIT_DIR}/../.libmpi)
12echo LIBMPI=${LIBMPI}
13
14    IGCM_sys_build_run_file ${LIBMPI}
15
16    IGCM_debug_PopStack "CPL_Initialize"
17
18}
19
20#-----------------------------------
21CPL_Update ()
22{
23
24    IGCM_debug_PushStack "CPL_Update"
25
26############ Update Time and Counters ##############
27##-- Calcul de la duree du job (en secondes)
28(( D_JOB_SEC = 3600 * 24 * PeriodLengthInDays ))
29
30############ Update Other Parameters  ##############
31
32############ Update Parameter Files   ##############
33sed -e "s/<initial_date>/${PeriodDateBegin}/" \
34    -e "s/<total_time>/${D_JOB_SEC}/" \
35    -e "s/<lib_mpi>/${LIBMPI}/" \
36    -e "s/<nproc_atm>/${NUM_PROC_ATM}/g" \
37        namcouple > namcouple.tmp
38
39    IGCM_sys_Mv namcouple.tmp namcouple
40    # Unused files we want to remove
41    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=trace
42    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=gweights
43    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=mweights
44    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=anaisout
45
46    IGCM_debug_PopStack "CPL_Update"
47}
48
49#-----------------------------------
50CPL_Finalize ()
51{
52
53    IGCM_debug_PushStack "CPL_Finalize"
54
55    echo FINALIZE CPL !!!
56
57    IGCM_debug_PopStack "CPL_Finalize"
58
59}
Note: See TracBrowser for help on using the repository browser.