Closed claresinger closed 1 year ago
@claresinger the diagnostic is commented out, because precipitation_rate is currently not calculated with blk_2m microphysics. It would be great if you were willing to fix this. Like you said, the implementation will be very similar to blk_1m (so similar it might be better to create one common base class, but that can be left for later). In addition to the parts of code you mentioned, you will also need to define the precipitation_rate variable
to reserve memory for it by increasing by 1 the third argument of alloc_tmp_sclr
and to make the precipitation_rate variable reference this memory:
Thanks @pdziekan! I have started a branch here to do this. There's some problem going on right now because everything becomes NaN as soon as the spin-up ends. I think I know how to fix it, so as soon as it's not giving NaN I'll open a PR :)
@pdziekan is there a reason that this diagnostic is commented out with a TODO? What needs to be done to make it work? Would love to have this output for a simulation I'm running. I can open a PR with changes mirroring the blk1m code if that sounds good to you. Thanks!
https://github.com/igfuw/UWLCM/blob/ba14a1fc657bde8af3bfe54d3804e3517bf06824/src/solvers/blk_2m/slvr_blk_2m_common.hpp#L42-L43
Looking to the blk1m code as an example it seems like it should be initialized: https://github.com/igfuw/UWLCM/blob/0fc77ec68053936e36eea4b49f11b3dd2cb1a827/src/solvers/blk_1m/update_rhs_blk_1m_common.hpp#L17-L19 And then some lines in the
update_rhs
needs to be modified to calculate it: https://github.com/igfuw/UWLCM/blob/0fc77ec68053936e36eea4b49f11b3dd2cb1a827/src/solvers/slvr_blk_1m.hpp#L43-L53