source: models/AROME/prep_config_tunning.py @ 8

Last change on this file since 8 was 8, checked in by htune, 8 years ago
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1import os
2import sys
3
4import configMUSC
5
6nsimus = int(sys.argv[1])
7name = sys.argv[2]
8case = sys.argv[3]
9subcase = sys.argv[4]
10nwave = sys.argv[5]
11model = sys.argv[6]
12
13rep0 = configMUSC.mainrep
14
15if 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'
21elif model == 'AROME':
22  config = 'AROME_OPER'
23  cycle = '41t1_op1.11_MUSC'
24  MASTER ='/home/honnert/Bureau/MUSC/pack/' + cycle + '/bin/MASTERODB'
25elif model == 'ARPEGE':
26  config = 'ARPEGE_OPER'
27  cycle = '41t1_op1.11_MUSC'
28  MASTER = '/home/honnert/Bureau/MUSC/pack/' + cycle + '/bin/MASTERODB'
29
30repnamelist = os.getcwd() + '/WAVE{0}/namelist'.format(nwave) 
31
32for 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
Note: See TracBrowser for help on using the repository browser.