NCAR / noahmp

Noah-MP Community Repository
Other
71 stars 81 forks source link

missing values in SMCWTD in the outermost grids after GROUNDWATER_INIT #66

Closed CharlesZheZhang closed 1 year ago

CharlesZheZhang commented 1 year ago

Hello Cenlin, I think I found the issue for water balance issue for offline hrldas with mmf. In the groundwater_init subroutine, the code is trying to initialize groundwater fields, especially SMCWTD. The reference line shows the end of i,j loop and it excludes the outermost grids (ide-1), (jde-1). So after running groundwater_init, the SMCWTD has the missing values (9.9E36) at the outermost grids.

https://github.com/NCAR/noahmp/blob/7ee673e88cc7a4351be329d92809a0c1ce027053/drivers/wrf/module_sf_noahmpdrv.F#L2516

I did a quick fix (just use ide, instead of ide-1), and the model can run without water balance issue. This fix seems to work for offline hrldas, though I am not sure if it will cause problems in WRF code.

CharlesZheZhang commented 1 year ago

Hello Cenlin, I created a new branch and a new commit to fix this (+1) when calling groundwater_init in hrldas driver. Just wondering to which branch in hrldas should I create a pull request and merge it?

cenlinhe commented 1 year ago

please use develop branch

cenlinhe commented 1 year ago

you need to use hrldas github branch for this PR since the fix is in hrldas driver

CharlesZheZhang commented 1 year ago

Thanks @cenlinhe , pull request created in hrldas repository develop branch: https://github.com/NCAR/hrldas/pull/31