source: models/ARPCLIMAT/prep_config_tunning.py @ 243

Last change on this file since 243 was 43, checked in by htune, 8 years ago

Update for ARPCLIMAT model, so that it can work with the latest version of EMS

File size: 928 bytes
Line 
1import os
2import sys
3
4nsimus = int(sys.argv[1])
5name = sys.argv[2]
6case = sys.argv[3]
7subcase = sys.argv[4]
8nwave = sys.argv[5]
9model = sys.argv[6]
10
11config = sys.argv[7]
12cycle = sys.argv[8]
13MASTER = sys.argv[9]
14PGD = sys.argv[10]
15PREP = sys.argv[11]
16namsfx = sys.argv[12]
17
18repnamelist = os.getcwd() + '/WAVE{0}/namelist'.format(nwave) 
19
20for i in range(0,nsimus):
21  fout = 'config_{0}_{1}.{2}_{3}-{4:0>3}.py'.format(cycle,config,name,nwave,i+1)
22  g = open(fout,'w')
23  print >> g, "config = '{0}.{1}_{2}-{3:0>3}'".format(config,name,nwave,i+1)
24  print >> g, "cycle = '{0}'".format(cycle)
25  print >> g, "MASTER = '{0}'".format(MASTER)
26  if model == 'ARPCLIMAT':
27    print >> g, "PGD = '{0}'".format(PGD)
28    print >> g, "PREP = '{0}'".format(PREP)
29  print >> g, "namATMref = '{0}/namref.{1}_{2}-{3:0>3}'".format(repnamelist,name,nwave,i+1)
30  if model == 'ARPCLIMAT':
31    print >> g, "namSFXref = '{0}'".format(namsfx)
32  g.close()
33
Note: See TracBrowser for help on using the repository browser.