source: CONFIG/trunk/IPSLCM4_v2/EXP00/COMP/oasis.driver @ 162

Last change on this file since 162 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
RevLine 
[41]1#!/bin/ksh
2#-----------------------------------
3CPL_Initialize ()
4{
5
[132]6    IGCM_debug_PushStack "CPL_Initialize"
7 
8    echo INITIALIZE CPL !!!
[41]9
[162]10#D- MPI context used to launch the coupled model
11LIBMPI=$(cat ${SUBMIT_DIR}/../.libmpi)
12echo LIBMPI=${LIBMPI}
[132]13
[162]14    IGCM_sys_build_run_file ${LIBMPI}
[132]15
16    IGCM_debug_PopStack "CPL_Initialize"
17
[41]18}
19
20#-----------------------------------
21CPL_Update ()
22{
23
[153]24    IGCM_debug_PushStack "CPL_Update"
[41]25
[162]26############ Update Time and Counters ##############
27##-- Calcul de la duree du job (en secondes)
28(( D_JOB_SEC = 3600 * 24 * PeriodLengthInDays ))
[41]29
[162]30############ Update Other Parameters  ##############
[153]31
[162]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" \
[41]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
[153]46    IGCM_debug_PopStack "CPL_Update"
[41]47}
48
49#-----------------------------------
50CPL_Finalize ()
51{
[132]52
[153]53    IGCM_debug_PushStack "CPL_Finalize"
[132]54
55    echo FINALIZE CPL !!!
56
[153]57    IGCM_debug_PopStack "CPL_Finalize"
[132]58
[41]59}
Note: See TracBrowser for help on using the repository browser.