Closed jswhit closed 1 year ago
@aerorahul, @dtkleist have either of you used this option recently?
@jswhit
I have not used this option for quite some time. Last was sometime in 2015-16, when trying to generate the ensemble with EVIL
. I know it was broken then too.
@jswhit I'm in the same boat as @aerorahul here. I recall using this option very early in the EnVar development when we needed something to test the plumbing and provide a sanity check. Dave Parrish had done that work. In fact, most of the emails I can find about the use of this are from back in 2012/2013 or so. In addition to the EVIL work, I know that Xuguang had also been wanting to use this option at one point to write out perturbations from B. I do not think that anyone ever followed through and got all of this working. Given that the lagged forecast pairs seemed to more effective for additive inflation, we sort of lost track of this internal option.
I'd really like to get this working to finish up the hybrid gain study we've been working on. The idea is to see if blending 3DVar and EnKF analysis increments is any different than simply adding random samples of the 3DVar covariance to the EnKF background ensemble. It looks like the updates to general_sub2grid require some changes to ckgcov, but I've spent a couple of days on this and haven't been able to figure it out. Is there anyone (besides Dave) who understands the general_subg2grid implementation who could potentially help?
I think you are probably stuck with either myself or @aerorahul. I can also ping on Xuguang to see if someone from her group had ever gotten it to work.
May be @WanshuWu-NOAA knows general_sub2grid
better. She recently must have used it for her regional implementation of FV3.
general_sub2grid works fine. Please find out whether s2g_raf is defined with an ini call.
I think I may have a solution - testing now. If it works, I'll create a PR
@dtkleist - what are the units for specific humidity in the 3dvar static B? I see perturbations that are O(1), so if it's specific humidity perhaps it's g/kg? Or is is relative humidity?
Control variable for static B is either pseudo RH (qoption 1) or normalized pseudo RH (qoption 2).
so for qoption=1 multiplying by ges_qsat will convert to specific humidity?
Indeed, that should work. Alternatively, there is a routine "normal_rh_to_q" that should be able to get "q" regardless of qoption.
Thanks for the tip @dtkleist - I've incorporated that into the PR.
I noticed that normal_rh_to_q doesn't work currently if qoption=1. This is because compute_qvar3d is only called in prewgt if qoption=2 - and this is where the array dqdrh is defined. I went ahead and changed prewgt so that compute_qvar3d is always called, regardless of qoption. This seems to fix the issue, but there may be other unintended consequences.
This is used to generate an internal ensemble from randomly sampling the static B.
! generate_ens - if true, then generate internal ensemble based on existing background error
It was originally added to test the ensemble Var solver, but I would like to add the capability to write out a random sample of the static B to use as additive inflation in the EnKF. Apparently it hasn't been used in a while, and changes to general_sub2grid and/or ckgcov have broken this option. The traceback is below.