Closed CharlesZheZhang closed 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?
please use develop branch
you need to use hrldas github branch for this PR since the fix is in hrldas driver
Thanks @cenlinhe , pull request created in hrldas repository develop branch: https://github.com/NCAR/hrldas/pull/31
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.