Skip to content

Commit

Permalink
Merge branch 'v1.1.2' of github.com:Dongqi-DQ/WRF4PALM into v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dongqi-DQ committed Jul 28, 2023
2 parents f05a66f + f671644 commit a971f9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

*If you wish to use WRF4PALM v1.0, please go to [WRF4PALM v1.0](https://github.com/dongqi-DQ/WRF4PALM/tree/v1.0)*

**Want to create your own static driver? Check out [GEO4PALM](https://github.com/dongqi-DQ/GEO4PALM)!**

## Contents
1. [What's new?](https://github.com/dongqi-DQ/WRF4PALM/tree/v1.1/#whats-new-in-v11)
2. [Instructions](https://github.com/dongqi-DQ/WRF4PALM/tree/v1.1/#instrustions)
Expand Down
11 changes: 8 additions & 3 deletions run_config_wrf4palm.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,18 @@
smois_wrf.isel(soil_layers=izs).data[watermask] = median_smois[izs]
if smois_wrf.isel(soil_layers=izs).mean()== 0.0:
smois_wrf.isel(soil_layers=izs).data[:,:] = msoil_val

# convert soil thickness to depth
zs_palm = np.zeros_like(dz_soil)
zs_palm[0] = dz_soil[0]
for i in range(1,len(dz_soil)):
zs_palm[i] = np.sum(dz_soil[:i+1])

init_tsoil = np.zeros((len(dz_soil), len(y), len(x)))
init_msoil = np.zeros((len(dz_soil), len(y), len(x)))
for iy in tqdm(range(0,len(y)),position=0, leave=True):
for ix in range(0, len(x)):
init_tsoil[:,iy,ix] = np.interp(dz_soil, zs_wrf.data, tslb_wrf[:,iy,ix])
init_msoil[:,iy,ix] = np.interp(dz_soil, zs_wrf.data, smois_wrf[:,iy,ix])
init_tsoil[:,iy,ix] = np.interp(zs_palm, zs_wrf.data, tslb_wrf[:,iy,ix])
init_msoil[:,iy,ix] = np.interp(zs_palm, zs_wrf.data, smois_wrf[:,iy,ix])

#-------------------------------------------------------------------------------
# Vertical interpolation
Expand Down

0 comments on commit a971f9d

Please sign in to comment.