| 1 | import os |
|---|
| 2 | import sys |
|---|
| 3 | |
|---|
| 4 | import configMUSC |
|---|
| 5 | |
|---|
| 6 | nsimus = int(sys.argv[1]) |
|---|
| 7 | name = sys.argv[2] |
|---|
| 8 | case = sys.argv[3] |
|---|
| 9 | subcase = sys.argv[4] |
|---|
| 10 | nwave = sys.argv[5] |
|---|
| 11 | model = sys.argv[6] |
|---|
| 12 | |
|---|
| 13 | rep0 = configMUSC.mainrep |
|---|
| 14 | |
|---|
| 15 | if model == 'ARPCLIMAT': |
|---|
| 16 | config = 'CMIP6' |
|---|
| 17 | cycle = 'arp631' |
|---|
| 18 | MASTER = '/Users/romainroehrig/rootpack/arp603_export.01.MPIGNU640.x/bin/MASTERODB' |
|---|
| 19 | PGD = '/Users/romainroehrig/rootpack/arp603_export.01.MPIGNU640.x/bin/PGD' |
|---|
| 20 | PREP = '/Users/romainroehrig/rootpack/arp603_export.01.MPIGNU640.x/bin/PREP' |
|---|
| 21 | elif model == 'AROME': |
|---|
| 22 | config = 'AROME_OPER' |
|---|
| 23 | cycle = '41t1_op1.11_MUSC' |
|---|
| 24 | MASTER ='/home/honnert/Bureau/MUSC/pack/' + cycle + '/bin/MASTERODB' |
|---|
| 25 | elif model == 'ARPEGE': |
|---|
| 26 | config = 'ARPEGE_OPER' |
|---|
| 27 | cycle = '41t1_op1.11_MUSC' |
|---|
| 28 | MASTER = '/home/honnert/Bureau/MUSC/pack/' + cycle + '/bin/MASTERODB' |
|---|
| 29 | |
|---|
| 30 | repnamelist = os.getcwd() + '/WAVE{0}/namelist'.format(nwave) |
|---|
| 31 | |
|---|
| 32 | for i in range(0,nsimus): |
|---|
| 33 | fout = 'config_{0}_{1}.{2}_{3}-{4:0>3}.py'.format(cycle,config,name,nwave,i+1) |
|---|
| 34 | g = open(fout,'w') |
|---|
| 35 | print >> g, "rep0 = '{0}'\n".format(rep0) |
|---|
| 36 | print >> g, "config = '{0}.{1}_{2}-{3:0>3}'".format(config,name,nwave,i+1) |
|---|
| 37 | print >> g, "cycle = '{0}'".format(cycle) |
|---|
| 38 | print >> g, "MASTER = '{0}'".format(MASTER) |
|---|
| 39 | if model == 'ARPCLIMAT': |
|---|
| 40 | print >> g, "PGD = '{0}'".format(PGD) |
|---|
| 41 | print >> g, "PREP = '{0}'".format(PREP) |
|---|
| 42 | print >> g, "namATMref = '{0}/namref.{1}_{2}-{3:0>3}'".format(repnamelist,name,nwave,i+1) |
|---|
| 43 | if model == 'ARPCLIMAT': |
|---|
| 44 | print >> g, "namSFXref = rep0 + '/main/namelist/SURFEX/nam.sfx.tl127.CMIP6.v631'" |
|---|
| 45 | g.close() |
|---|
| 46 | |
|---|