source: CONFIG/trunk/IPSL_ESM_V1/EXP00/COMP/oasis.driver @ 136

Last change on this file since 136 was 136, checked in by mafoipsl, 15 years ago

1) Add 2 variables in config.card used by ins_job : JobClass? and JobNumProcTot?

2) keep NUM_PROCs variables in oasis.driver

File size: 1.5 KB
Line 
1#!/bin/ksh
2
3#-----------------------------------
4CPL_Initialize ()
5{
6
7    IGCM_debug_PushStack "CPL_Initialize"
8 
9    echo INITIALIZE CPL !!!
10
11#D- Default number of processor for lmdz and oasis
12NUM_PROC_ATM=1 ; (( NUM_PROC_OASIS = NUM_PROC_ATM + 2 ))
13#D- Number of processors used for lmdz and oasis coupler computed from PBS variable
14[ -z "${PBS_NUM_PROC_TOT}" ] || { (( NUM_PROC_ATM = PBS_NUM_PROC_TOT - 1 )) ; (( NUM_PROC_OASIS = PBS_NUM_PROC_TOT + 1 )) ; }
15
16echo PBS_NUM_PROC_TOT=${PBS_NUM_PROC_TOT}
17echo NUM_PROC_ATM=${NUM_PROC_ATM}
18echo NUM_PROC_OASIS=${NUM_PROC_OASIS}
19
20    IGCM_debug_PopStack "CPL_Initialize"
21
22
23}
24
25#-----------------------------------
26CPL_Update ()
27{
28
29############ Update Time and Counters ##############
30##-- Calcul de la duree du job (en secondes)
31(( D_JOB_SEC = 3600 * 24 * PeriodLengthInDays ))
32
33############ Update Other Parameters  ##############
34
35############ Update Parameter Files   ##############
36sed -e "s/<initial_date>/${PeriodDateBegin}/" \
37    -e "s/<total_time>/${D_JOB_SEC}/" \
38    -e "s/<nproc_atm>/${NUM_PROC_ATM}/g" \
39        namcouple > namcouple.tmp
40
41    IGCM_sys_Mv namcouple.tmp namcouple
42    # Unused files we want to remove
43    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=trace
44    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=gweights
45    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=mweights
46    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=anaisout
47
48}
49
50#-----------------------------------
51CPL_Finalize ()
52{
53
54    IGCM_debug_PushStack "CPL_Update"
55
56    echo FINALIZE CPL !!!
57
58    IGCM_debug_PopStack "CPL_Update"
59
60}
Note: See TracBrowser for help on using the repository browser.