Skip to content
Snippets Groups Projects
Commit 2796f7b7 authored by lkugler's avatar lkugler
Browse files

THM is DART output variable

parent 4d74d07f
No related branches found
No related tags found
No related merge requests found
...@@ -37,11 +37,7 @@ def update_initials_in_WRF_rundir(time): ...@@ -37,11 +37,7 @@ def update_initials_in_WRF_rundir(time):
with nc.Dataset(filter_out, 'r') as ds_filter: with nc.Dataset(filter_out, 'r') as ds_filter:
with nc.Dataset(ic_file, 'r+') as ds_new: with nc.Dataset(ic_file, 'r+') as ds_new:
# assumes T = THM (dry potential temperature as prognostic variable) ds_new.variables['T'][:] = ds_filter.variables['THM'][:]
if use_wrfrst:
ds_new.variables['THM_2'][:] = ds_filter.variables['T'][:]
else:
ds_new.variables['THM'][:] = ds_filter.variables['T'][:]
# update all other variables # update all other variables
for var in update_vars: for var in update_vars:
...@@ -51,6 +47,7 @@ def update_initials_in_WRF_rundir(time): ...@@ -51,6 +47,7 @@ def update_initials_in_WRF_rundir(time):
var_new = var+'_2' # e.g. U_2, W_2, THM_2 var_new = var+'_2' # e.g. U_2, W_2, THM_2
ds_new.variables[var_new][:] = ds_filter.variables[var][:] ds_new.variables[var_new][:] = ds_filter.variables[var][:]
print('updated', var_new, 'from', var)
print(ic_file, 'created, updated from', filter_out) print(ic_file, 'created, updated from', filter_out)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment