NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

Update WRF coupler to recent MPP_LAND_INIT changes #602

Closed rcabell closed 2 years ago

rcabell commented 2 years ago

TYPE: bug fix

KEYWORDS: coupled, MPP

SOURCE: Ryan @ NCAR

DESCRIPTION OF CHANGES:

Updates WRF_cpl/module_wrf_HYDRO.F to use the new MPP_LAND_INIT(global_nx, global_ny) initializer in mpp_land.F so that coupled model can run without crashing. Also copies the WRF-supplied MPI_COMM_WORLD to HYDRO_COMM_WORLD, since MPP assumes that MPI has already been initialized and skips this step.

TESTS CONDUCTED:

Ran WRF-Hydro Front Range Coupled Test Case and output was reasonable (no regression test for this case)

NOTES:

The code compiled originally due to the in_global_nx and in_global_ny arguments being marked as optional, but then caused a crash by being assigned to module variables at runtime. If the parameters can be optional, additional code should be added to handle the not-present case.