Browse Source

WIP: Change corresponding variables input files.

This is seemingly not enough, components' codes have to be changed as well.
Coupling time step seems to be hard coded there.
3-apply-coupling-timestep
Sven Karsten 2 years ago
parent
commit
177952e6bc
  1. 3
      scripts/run/create_work_directory_CCLM.py
  2. 9
      scripts/run/create_work_directory_flux_calculator.py

3
scripts/run/create_work_directory_CCLM.py

@ -57,6 +57,9 @@ def create_work_directory_CCLM(IOW_ESM_ROOT, # root directory of IOW ESM
change_in_namelist.change_in_namelist(filename=full_directory+'/INPUT_ORG',
after='&RUNCTL', before='/END', start_of_line='hstart',
new_value = '='+str(starthours)+', hstop='+str(finalhours)+',')
change_in_namelist.change_in_namelist(filename=full_directory+'/INPUT_OASIS',
after='&OASISCTL', before='/END', start_of_line='dt_cp',
new_value = ' = '+str(coupling_time_step))
# STEP 5: Copy hotstart files if a corresponding folder exists
if (start_date != init_date):

9
scripts/run/create_work_directory_flux_calculator.py

@ -50,7 +50,14 @@ def create_work_directory_flux_calculator(IOW_ESM_ROOT, # root directory
# STEP 4: copy flux_calculator.nml file and change timestep and number of time steps
os.system('cp '+IOW_ESM_ROOT+'/input/flux_calculator.nml '+full_directory+'/flux_calculator.nml')
change_in_namelist.change_in_namelist(filename=full_directory+'/flux_calculator.nml',
after='&input', before='/', start_of_line='timestep',
new_value = '='+str(coupling_time_step))
change_in_namelist.change_in_namelist(filename=full_directory+'/flux_calculator.nml',
after='&input', before='/', start_of_line='num_timesteps',
new_value = '='+str(timesteps))
# STEP 5: Create an empty folder named "mappings" and place exchange grid files and mapping files there
os.makedirs(full_directory+'/mappings')
os.system('cp '+IOW_ESM_ROOT+'/input/CCLM*/mappings/?_grid_exchangegrid.nc '+full_directory+'/mappings')

Loading…
Cancel
Save