diff --git a/generate_nature.py b/generate_nature.py index 2a77353348981f14d4fd9270ba6ad8b270af4750..e646b580f4daea0b220c63b2d74663c9ac179e67 100755 --- a/generate_nature.py +++ b/generate_nature.py @@ -206,7 +206,7 @@ id = None id = prepare_wrfinput() # create initial conditions begin = dt.datetime(2008, 7, 30, 6, 0) -end = dt.datetime(2008, 7, 30, 20, 0) +end = dt.datetime(2008, 7, 30, 21, 0) # whole forecast timespan hist_interval = 5 diff --git a/scripts/prepare_wrfinput.py b/scripts/prepare_wrfinput.py index d89a5630374b12ac6036243dd270c26387fa5564..f3cb04f06e6aa98ed0ad0dfefa29d354e4b72efc 100755 --- a/scripts/prepare_wrfinput.py +++ b/scripts/prepare_wrfinput.py @@ -18,7 +18,8 @@ for iens in range(1, exp.n_ens+1): # time not important, but general settings prepare_namelist.run(iens, begin=dt.datetime(2008, 7, 30, 6, 0), - end=dt.datetime(2008, 7, 30, 6, 30)) + end=dt.datetime(2008, 7, 30, 6, 30), + archive=False) symlink(input_prof, rundir+'/input_sounding') print('finished.') diff --git a/scripts/utils.py b/scripts/utils.py index ee07206888c2afeae196564c90385c1cc2f5fc2f..89392b5cb3dbe5fc2d3b57135b8cd0e86220783f 100755 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -36,11 +36,16 @@ def clean_wrfdir(dir): os.remove(f) def symlink(src, dst): + # Create a symbolic link pointing to src named dst. try: os.symlink(src, dst) except FileExistsError: - os.remove(dst) - os.symlink(src, dst) + # print('file exists') + if os.path.realpath(dst) == src: + pass # print('link is correct') + else: + os.remove(dst) + os.symlink(src, dst) except Exception as e: raise e