Commit 93005601 authored by SemjonSchimanke's avatar SemjonSchimanke
Browse files

Create all directories if needed. Improved README.

parent 2138a0ff
#!/usr/bin/env python
#SBATCH -n 1
#SBATCH -t 1-0
#SBATCH -t 3-0
#SBATCH -J NEMO_forcing__precise
#SBATCH --qos=risk
#SBATCH --requeue
......@@ -8,10 +8,10 @@
#########################################
### Configure section
#########################################
YYYY1=2018 # first year
YYYY1=2017 # first year
MM1 =1 # first month
YYYY2=2018 # last year
MM2 =8 # last month
YYYY2=2017 # last year
MM2 =12 # last month
# workdir: a directory where the processing takes place and
# intermediate data is stored.
......@@ -57,17 +57,20 @@ else:
if not os.path.isdir(finaldir):
os.makedirs(finaldir)
print ("Final directory %s created." % finaldir)
# Create subdirectories without additional tests!
if not os.path.exists(finaldir+'Humidity'):
os.makedirs(finaldir+'Humidity')
if not os.path.exists(finaldir+'MSLP'):
os.makedirs(finaldir+'MSLP')
if not os.path.exists(finaldir+'Precip'):
os.makedirs(finaldir+'Precip')
if not os.path.exists(finaldir+'Radiation'):
os.makedirs(finaldir+'Radiation')
if not os.path.exists(finaldir+'Snow'):
os.makedirs(finaldir+'Snow')
if not os.path.exists(finaldir+'T2m'):
os.makedirs(finaldir+'T2m')
if not os.path.exists(finaldir+'Wind'):
os.makedirs(finaldir+'Wind')
else:
print ("Final directory %s exists already." % finaldir)
if not os.path.isdir(workdir):
os.makedirs(workdir)
print ("Work directory %s created." % workdir)
......@@ -87,15 +90,16 @@ Get_UERRA_data.retrieve_uerra_precip(YYYY1, MM1, YYYY2, MM2, download_dir)
sys.stdout.flush()
#########################################
### Prepare the data for NEMO-Nordic
#########################################
Convert_for_NEMO.precipitation (YYYY1, MM1, YYYY2, MM2, workdir, download_dir, finaldir)
sys.stdout.flush()
Convert_for_NEMO.param_with_analysis (YYYY1, MM1, YYYY2, MM2, workdir, download_dir, finaldir)
sys.stdout.flush()
Convert_for_NEMO.radiation (YYYY1, MM1, YYYY2, MM2, workdir, download_dir, finaldir)
sys.stdout.flush()
Convert_for_NEMO.param_with_analysis (YYYY1, MM1, YYYY2, MM2, workdir, download_dir, finaldir)
sys.stdout.flush()
Convert_for_NEMO.humidity (YYYY1, MM1, YYYY2, MM2, workdir, download_dir, finaldir)
sys.stdout.flush()
......
......@@ -18,9 +18,16 @@ main script - Create_NEMO_forcing_from_UERRA.py
Then, all you have to do is to run the main script...
Create_NEMO_forcing_from_UERRA.py
Good to know
------------
The scripts need some time to run. Especially the downloading of data
from the MARS archive takes time. Here, we are talking about days if
you want to produce forcing data for longer periods (several years).
A rough estimate is about six hours for each year. However, this depends
on your system as well as the load on MARS.
You will need some disk space. For each year you will need around 50GB
space.
Technical details
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment