Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

gen be for ensemble-based perturbations

satjemkes

Member
Hi,

The user guide indicates that gen_be can be used to generate background covariance matrix from forecast differences (nmc method) or ensemble-based perturbations. However the guide only provides information how to setup gen_be to run for the forecast difference method.
Has anybody in the community ran gen_be for the ensemble_based perturbations and if yes, is it possible to share some experience.
many thanks
stpehen
 
Hi,
I have the same question with you.I want to generate perturbations, which have to remove ensemble mean first, but I could not find the code and I tried to use the gen_be_ep2.exe, but it seems to be something wrong there.
If you have solved this problem, may I ask for your help? Thanks a lot.
Li Ma
 
Hi Li Ma,
I was using the 3rd version of the gen_be code. I have not checked if this is distributed also with the latest version of WRF, it is not an 'official' part of the code, but it is distributed through the main distribution.
Version 1 of genbe takes too long and the Version 2 (which is distributed separately) i had problems reading the perturbations in the code. Version 2 is nice because it generates also netcdf formatted output.

To run the 3rd version of genbe is pretty simple. if you want i can try to find the scripts i was using. I need to look at the scripts to explain to you how to set it up. (I have a general setup i my mind, but before i say something stupid, i prefer to double check the scripts.)

let me know if this would be helpful.

From my experience what seemed critical is the spread of the ensemble. I experimented a little with it. As i have only a small compute system, i could not test it to my like. I played with various perturbation options of WRF, but none of these generated enough spread. So i settled to have different initial conditions.

stephen
 
Dear Li Ma

I just checked the latest version of wrf (4.6.1) and the version 3 of the gen_be is in the var directory. (not sure which version of wrf you are using).
 
Dear stephen,

Sorry,I just saw your reply. It's been bothering me for a long time, and I haven't solved it yet. So if it's convenient for you, can you help me? How can we communicate more conveniently?
The version of wrf I am using is WRF4.4.There are 12 members ,and when I am using gen_be_ep2.exe to generate perturbations, it's supposed to generate 12 temporary files, right?But there are only two files, tmp.e001 and e002.And there were no errors, but it didn't run anymore.
It would be great if you could help me. I would appreciate it.
My email address is ma_li@fudan.edu.cn
Looking forward to your email~
 
Dear Stephen and Li Ma
i’m currently encountering the same problem and would greatly appreciate your assistance. Hoping you could share your expertise to the relevant solution. Any help or guidance would be highly appreciated.

Thank you !
 
Dear LilyLisa (interesting name)

It is possible to run gen_be for an ensemble of n-members, There is however, some confusion as there are different gen_be versions around. There is a standard gen_be as part of the wrf distribution, which is (extremely) slow. then there is a genbe_2 which is NOT part of the distribution as it is a separate distribution. It is much faster, and it generates netcdf formatted files, which might be handy. And then there is a genbe_v3, which is NOT an official part of the wrf distribution, yet it is distributed as part of the distribution. I am using this version. It is relatively fast but it is not generating a netcdf formatted file.

I can send my script which i used (which is tailored to my situation), and my namelist file used for genbe (which is generated for v3 of genbe).

stephen
 
I am trying to generate my own be.dat file while running the gen_be_wrapper.ksh I am encountering this error
---------------------------------------------------------------
Run Stage 0: Calculate ensemble perturbations from model forecasts.
---------------------------------------------------------------
Beginning CPU time: Mon Jun 30 16:41:25 CDT 2025
gen_be_stage0_wrf: Calculating standard perturbation fields valid at time 2024100706
mv: cannot stat 'pert.2024100706*': No such file or directory
2024100606 /work/uharis1/ARW/WPS/WRF5/run/2024100606/wrfout_d01_2024-10-07_06:00:00 /work/uharis1/ARW/WPS/WRF5/run/2024100618/wrfout_d01_2024-10-07_06:00:00
Ending CPU time: Mon Jun 30 16:41:25 CDT 2025
---------------------------------------------------------------
Run Stage 1: Read standard fields, and remove time/ensemble/area mean.
---------------------------------------------------------------
Beginning CPU time: Mon Jun 30 16:41:25 CDT 2025
Stage 1 failed with error 127


can someone help me with this
 
There could be different reasons for this. IF (capitals) the pert file is generated it might be in a different location than the script think it is. So check IF the file exists and if it does then ensure that all paths are correct. If the pert file is NOT generated, then it could be that one of the settings in the namelist file is creating a confusion, OR one of the wrfout file is corrupted. There is a simple check (ask Google how to check if a netcdf file is corrupted). In that case you simply have to regenerate the wrfout file(s). For some odd reason WRF does generate corrupted netcdf files ones in a while.
The structure of the namelist file is a bit obscure. It took me some time to get the hang of it.
(I assume you are trying to generate the bgerr file from a set of forecasts for different times (e.g.6 hour apart), the socalled nmc method, and not from an ensemble of forecasts for the same validity time.
Which version of bgerr are you using?
 
I am trying to generate my own be.dat file while running the gen_be_wrapper.ksh I am encountering this error
---------------------------------------------------------------
Run Stage 0: Calculate ensemble perturbations from model forecasts.
---------------------------------------------------------------
Beginning CPU time: Mon Jun 30 16:41:25 CDT 2025
gen_be_stage0_wrf: Calculating standard perturbation fields valid at time 2024100706
mv: cannot stat 'pert.2024100706*': No such file or directory
2024100606 /work/uharis1/ARW/WPS/WRF5/run/2024100606/wrfout_d01_2024-10-07_06:00:00 /work/uharis1/ARW/WPS/WRF5/run/2024100618/wrfout_d01_2024-10-07_06:00:00
Ending CPU time: Mon Jun 30 16:41:25 CDT 2025
---------------------------------------------------------------
Run Stage 1: Read standard fields, and remove time/ensemble/area mean.
---------------------------------------------------------------
Beginning CPU time: Mon Jun 30 16:41:25 CDT 2025
Stage 1 failed with error 127


can someone help me with this
There could be different reasons for this. IF (capitals) the pert file is generated it might be in a different location than the script think it is. So check IF the file exists and if it does then ensure that all paths are correct. If the pert file is NOT generated, then it could be that one of the settings in the namelist file is creating a confusion, OR one of the wrfout file is corrupted. There is a simple check (ask Google how to check if a netcdf file is corrupted). In that case you simply have to regenerate the wrfout file(s). For some odd reason WRF does generate corrupted netcdf files ones in a while.
The structure of the namelist file is a bit obscure. It took me some time to get the hang of it.
(I assume you are trying to generate the bgerr file from a set of forecasts for different times (e.g.6 hour apart), the socalled nmc method, and not from an ensemble of forecasts for the same validity time.
Which version of bgerr are you using?
 
Dear Stephen and Li Ma
i’m currently encountering the same problem and would greatly appreciate your assistance. Hoping you could share your expertise to the relevant solution. Any help or guidance would be highly appreciated.

Thank you !
Dear LilyLisa (interesting name)

It is possible to run gen_be for an ensemble of n-members, There is however, some confusion as there are different gen_be versions around. There is a standard gen_be as part of the wrf distribution, which is (extremely) slow. then there is a genbe_2 which is NOT part of the distribution as it is a separate distribution. It is much faster, and it generates netcdf formatted files, which might be handy. And then there is a genbe_v3, which is NOT an official part of the wrf distribution, yet it is distributed as part of the distribution. I am using this version. It is relatively fast but it is not generating a netcdf formatted file.

I can send my script which i used (which is tailored to my situation), and my namelist file used for genbe (which is generated for v3 of genbe).

stephen
 
Top