-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the Multigrid Beta Filter (MGBF) for ensemble localization (#699) #700
Add the Multigrid Beta Filter (MGBF) for ensemble localization (#699) #700
Conversation
@ShunLiu-NOAA Thank you for managing this PR. Could you additionally request review from @MiodragRancic-NOAA? This PR is mainly based on his code. |
@ShunLiu-NOAA Sorry, this unassignment was my mistake... Could you assign me again? |
@shoyokota As we discussed off-line, now I have two suggestions: 1) re-organize to let the mgbf lib as a separate lib. The availability of such a form is one of the benefit for such a oops-style standing alone mgbf lib. 2), I suggest to add log information about authors/major coding histories in the codes especially for the mgbf lib part. Such a mgbf lib with enough information about its' authors and major developing progresses could also be used for JEDI's mgbf component. I hope the major mgbf developers at EMC like @MiodragRancic-NOAA @JimPurser-NOAA and @ManuelPondeca-NOAA could help with this. |
eeadfd6
to
1c2b7e6
Compare
1c2b7e6
to
997a53e
Compare
@TingLei-NOAA Thank you for the suggestions. |
@ManuelPondeca-NOAA, @guoqing-noaa and @TingLei-NOAA Could you please review this PR? MGBF might be implemented in RTMA in operation. Given Sho's return to JMA at the end of the next month, it is better that we can address the isusses before Sho departs EMC. |
Parameters for localization and background error will be need to be held separately. Application to background error will use six grid generations (probably) because of very large correlation lengths of stream function. In addition, aspect tensors and scale weights will all be depended of model level and variable. Also, the filter will be applied to 2D variable, not only to 3D variables as in the case of filtering. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to order subroutines as they are ordered in the case select statement.
997a53e
to
e296508
Compare
@MiodragRancic-NOAA Thank you for reviewing the code.
Thank you for clarifying what is additionally required for MGBF-based static background error. Yes, what you are suggesting should be implemented in another PR to apply MGBF-based static background error. With the MGBF library added in this PR, we can input two independent parameter files for localization and static background error by separately calling mg_initialize even without adding another MGBF library. So, I expect that MGBF-based static background error also will be implemented based on this MGBF library with some modifications.
I modified the order in "select case" in mg_filtering.f90. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be also good to add comments in mg_paramater and the namelist from which flag mg_filt gets values that clarify its meaning
e296508
to
6aea0f0
Compare
Ting,
Are you referring to application of vertical beta filter?
Thanks
Misha
Miodrag Rancic
Lynker at NOAA/NWS/NCEP/EMC
5830 University Research Ct, Rm 2786
College Park, MD 20740
301-683-3732
…On Fri, Mar 1, 2024 at 10:58 AM TingLei-NOAA ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/gsi/hybrid_ensemble_isotropic.F90
<#700 (comment)>:
> real(r_kind),allocatable,dimension(:):: a_en_work
ipnt=1
! Apply vertical smoother on each ensemble member
+ if(regional.and.l_mgbf_loc.and.ig==1) then
+ allocate(hwork_mgbf(obj_mgbf(1)%km_a_all,obj_mgbf(1)%nm,obj_mgbf(1)%mm))
@shoyokota <https://github.com/shoyokota> is the size of hwork_mgbf the
same as (lon2, lat2, :) or (lon1,lat1,:)?
Second, to avoid confusion, I suggest to use work_mgbf /work_tmp rather
than hwork_mgbf/hwork_tmp, because, in gsi,
hwork is used for arrays of (nlat, nlon, :) (namely,pieces on the whole
the horizontal domain).
—
Reply to this email directly, view it on GitHub
<#700 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJHP7FVHMI3BECCI6JJWMADYWCQRXAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMJRGQ3TSMRVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Misha,
Here, I meant the whole mgbf process. I am wondering how halo points are
treated, by codes in GSI or delegated to mgbf functions.
Regards,
Ting
…______________________________
Ting Lei
Physical Scientist, Contractor with Lynker in support of
EMC/NCEP/NWS/NOAA
5830 University Research Ct., Cubicle 2765
College Park, MD 20740
***@***.***
301-683-3624
On Fri, Mar 1, 2024 at 11:39 AM MiodragRancic-NOAA ***@***.***>
wrote:
Ting,
Are you referring to application of vertical beta filter?
Thanks
Misha
Miodrag Rancic
Lynker at NOAA/NWS/NCEP/EMC
5830 University Research Ct, Rm 2786
College Park, MD 20740
301-683-3732
On Fri, Mar 1, 2024 at 10:58 AM TingLei-NOAA ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In src/gsi/hybrid_ensemble_isotropic.F90
> <#700 (comment)>:
>
> > real(r_kind),allocatable,dimension(:):: a_en_work
>
> ipnt=1
>
> ! Apply vertical smoother on each ensemble member
> + if(regional.and.l_mgbf_loc.and.ig==1) then
> +
allocate(hwork_mgbf(obj_mgbf(1)%km_a_all,obj_mgbf(1)%nm,obj_mgbf(1)%mm))
>
> @shoyokota <https://github.com/shoyokota> is the size of hwork_mgbf the
> same as (lon2, lat2, :) or (lon1,lat1,:)?
> Second, to avoid confusion, I suggest to use work_mgbf /work_tmp rather
> than hwork_mgbf/hwork_tmp, because, in gsi,
> hwork is used for arrays of (nlat, nlon, :) (namely,pieces on the whole
> the horizontal domain).
>
> —
> Reply to this email directly, view it on GitHub
> <#700 (review)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AJHP7FVHMI3BECCI6JJWMADYWCQRXAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMJRGQ3TSMRVGE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#700 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APEFS7GADSI2DPSKULUAHDTYWCVLPAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTGUYTEOBUHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ting,
What you mean by ‘halo’ points?
I have developed all message passing code relevant to MGBF. Replacing that
would be too risky, time consuming and unnecessary!
Misha
Miodrag Rancic
Lynker at NOAA/NWS/NCEP/EMC
5830 University Research Ct, Rm 2786
College Park, MD 20740
301-683-3732
On Fri, Mar 1, 2024 at 1:14 PM TingLei-NOAA ***@***.***>
wrote:
… Misha,
Here, I meant the whole mgbf process. I am wondering how halo points are
treated, by codes in GSI or delegated to mgbf functions.
Regards,
Ting
______________________________
Ting Lei
Physical Scientist, Contractor with Lynker in support of
EMC/NCEP/NWS/NOAA
5830 University Research Ct
<https://www.google.com/maps/search/5830+University+Research+Ct?entry=gmail&source=g>.,
Cubicle 2765
College Park, MD 20740
***@***.***
301-683-3624
On Fri, Mar 1, 2024 at 11:39 AM MiodragRancic-NOAA ***@***.***>
wrote:
> Ting,
>
> Are you referring to application of vertical beta filter?
>
> Thanks
>
> Misha
>
> Miodrag Rancic
> Lynker at NOAA/NWS/NCEP/EMC
> 5830 University Research Ct, Rm 2786
<https://www.google.com/maps/search/5830+University+Research+Ct,+Rm+2786%0D%0A+%0D%0A+College+Park,+MD+20740?entry=gmail&source=g>
<https://www.google.com/maps/search/5830+University+Research+Ct,+Rm+2786%0D%0A+%0D%0A+College+Park,+MD+20740?entry=gmail&source=g>>
College Park, MD 20740
<https://www.google.com/maps/search/5830+University+Research+Ct,+Rm+2786%0D%0A+%0D%0A+College+Park,+MD+20740?entry=gmail&source=g>
> 301-683-3732
>
>
> On Fri, Mar 1, 2024 at 10:58 AM TingLei-NOAA ***@***.***>
> wrote:
>
> > ***@***.**** commented on this pull request.
> > ------------------------------
> >
> > In src/gsi/hybrid_ensemble_isotropic.F90
> > <#700 (comment)>:
> >
> > > real(r_kind),allocatable,dimension(:):: a_en_work
> >
> > ipnt=1
> >
> > ! Apply vertical smoother on each ensemble member
> > + if(regional.and.l_mgbf_loc.and.ig==1) then
> > +
> allocate(hwork_mgbf(obj_mgbf(1)%km_a_all,obj_mgbf(1)%nm,obj_mgbf(1)%mm))
> >
> > @shoyokota <https://github.com/shoyokota> is the size of hwork_mgbf
the
> > same as (lon2, lat2, :) or (lon1,lat1,:)?
> > Second, to avoid confusion, I suggest to use work_mgbf /work_tmp
rather
> > than hwork_mgbf/hwork_tmp, because, in gsi,
> > hwork is used for arrays of (nlat, nlon, :) (namely,pieces on the
whole
> > the horizontal domain).
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <#700 (review)>,
>
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AJHP7FVHMI3BECCI6JJWMADYWCQRXAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMJRGQ3TSMRVGE>
>
> > .
> > You are receiving this because you were mentioned.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <#700 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/APEFS7GADSI2DPSKULUAHDTYWCVLPAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTGUYTEOBUHA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#700 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJHP7FX244OORTZBBQ54ZDDYWDAPLAVCNFSM6AAAAABDMRRGTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTGY4DIMJSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
c7d5585
to
ce2f96b
Compare
@shoyokota and @GangZhao-NOAA On wcoss2, when gsi was built with debug mode, for rrfs regression test , the first rrfs_3denvar_glbens_loproc_updat failed for
I am trying to see what the problem is. |
@TingLei-NOAA @shoyokota Hi Ting and Sho, Then after the compilations, to run the regression test, is there any specific option for running? For example, in the command line, "ctest -R rrfs_3denvar_glbens", do I need to add any option to it, like "-debug"? Sho mentioned the configuration file "regression_namelist_db.txt", is this the file used for debug mode. Then how should I let the ctest to use it, instead of regular "regression_namelist.txt"? Thank you! -Gang |
@GangZhao-NOAA In my understanding, all we have to do to run ctest in the debug-mode is to re-compile GSI with BUILD_TYPE="Debug" both for control and updated codes. In running ctests, we don't need to add any options, and regression_namelist_db.txt is automatically applied. @TingLei-NOAA Is my understanding correct? I also will run the debug-mode ctests on Orion. |
@GangZhao-NOAA Yes. As @shoyokota , just re-compile gsi using the debug mode and run the ctests. Regression tests with debug mode GSI are not required. But I feel that will be very helpful to verify the codes. |
@GangZhao-NOAA I had finished debug mode GSI 's regression tests on wcoss2. I will give an update below. I think you don't have to do them again on other machines. But if you could run a rtma operational case with this PR, that will be great while I would run a rrfs operational case with this PR. |
@TingLei-NOAA @shoyokota Hi, Ting and Sho,
netcdf_fv3_regional and rrfs_3denvar_glbens passed, rtma almost passed (just one test took too much time which is beyond the limit and count towards failure); two hafs tests crashed very quickly; two global tests failed due to running time beyond the wall clock limits. As you mentioned to run a rtma operational case with this PR, the GSI code of the current (2D)RTMA is somehow fairly different to the current EMC/GSI code. We tested it one month ago, it could run but with an issue related to analysis of the obs of total cloud amount. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR passed a test using a modified rrfs operational case (while miter=2) in which it produced identical results compared with the head of EMC GSI.
Approval is pending upon the suggested changes
@GangZhao-NOAA Thanks. I think your tests a alongside with the test using rrfs-like real case areported re enough, at least for this reviewing , to verify this PR! |
ce2f96b
to
a1e875d
Compare
a1e875d
to
61652b6
Compare
61652b6
to
e333a07
Compare
e333a07
to
b1b5a96
Compare
I just merged the latest GSI develop branch in the last push. |
@shoyokota Thanks for clarification! |
I confirmed all regression tests with the latest code were passed on Orion. (For global_4denvar and global_enkf, the 2022110900 case was tested.)
For rrfs_3denvar_glbens, I confirmed that the debug-mode run was also passed. (The debug-mode failures except for rrfs_3denvar_glbens should not be related to this PR.) |
@shoyokota @ShunLiu-NOAA @TingLei-NOAA
On Hera (Rocky-8):
|
@GangZhao-NOAA thank you for regression test! |
DUE DATE for merger of this PR into
develop
is 3/29/2024 (six weeks after PR creation).Description
Resolves #699
This PR is to add the option to apply Multigrid Beta Filter (MGBF; Purser et al. 2022) for ensemble localization instead of Recursive Filter (RF). This work includes to add an initial version of the MGBF as a subdirectory in GSI.
To apply the MGBF, set "l_mgbf_loc=true" in the namelist and additionally input "mgbf_loc01.nml". (In Scale/Variable-Dependent Localization, input also "mgbf_locXX.nml" (XX=02,03,...) with the same number of grid points.)
How to set MGBF parameters in mgbf_locXX.nml
An example of mgbf_locXX.nml is as follows:
Here, to make the result of MGBF-based localization similar to RF-based one, we can set the beta filter length ( mg_ampl0[12] ) from the recursive filter length in the GSI namelist ( s_ens_[vh] ) as:
Please note there are some limitations for the other MGBF parameters such as:
How to run RRFS regression tests with MGBF-based localization
Change settings in regression/ as follows, and run Test#3 (rrfs_3denvar_glbens)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
EnVar for NA-domain RRFS was tested with "mgbf_locXX.nml" (XX=01) shown above on Orion. The resulting analysis increment was similar to the original and the computation time for localization became short.
Checklist