How can I obtain 3DVar static B files for a regional MPAS-JEDI?

I am currently using MPAS-JEDI to perform 3DVar data assimilation for a regional forecast, but I am unable to find suitable static BE (background error covariance) files for my domain(15km, 1000km radius domain). The tutorial doesn’t seem to provide instructions for generating background error covariance by myself, and my current computing resources cannot support using ensemble forecasting。

I noticed that the NMC method can be used to generate BE files, but I’m curious whether mpasjedi_error_covariance_toolbox.x supports using regional forecast outputs as input. Additionally,I got fatal error without log*.err file when I run BJ’ programs using regional f48-f24 result cutting from global domain. there seems to be an issue with computing stream functions in regional configurations?

I also noticed some researchers use interpolation methods to downscale coarse-resolution BE (e.g., 60km) to their regional domains. I’d like to seek assistance on this approach.

Hi, @CGC.

Thank you for your interest in MPAS-JEDI. We have a limited resource for user support, especially this B training part. However, we are preparing the hands-on practice and some documentation to generate the static background error statistics in upcoming tutorial in June 2025. The materials and test dataset should be available to generic users after the event.

For your question, mpasjedi_error_covariance_toolbox.x can handle the regional forecast outputs as an input. In this case, however, it can only estimate the univariate B (without cross variable covariance).

Or did you first convert the zonal/meridional winds to stream function and velocity potential in the global mesh, then interpolate (or cut) to your regional mesh ? I have not tried this before, but in principal this will work.

Yes, we can interpolate the B statistics into different horizontal mesh (even regional). We may include this part in the tutorial.

Thank you,
BJ

Hi there, How to generate global BE matrix for a variable 60-15-km domain? I used to run all test runs, but now I wanted to create a good BE for my 60-15-km variable mesh. Thanks, Minghua

Hi @Minghua-UCSD ,

As posted above, we will share the scripts and documentation on generating own B statistics after the upcoming tutorial. In principle, the training should work with a variable mesh.

Thank you,
BJ

Thanks so much BJ. Does the tutorial provide online attendance option? If so, do you mind sharing with me the registration information? Thanks for your time!

Does the tutorial provide online attendance option?

From the information page, it doesn’t seem to provide the online attendance option. --BJ

No problem. I look forward to the updates after the tutorial.

Hi, is the tutorial available?

Hi @CGC (and @Minghua-UCSD ) ,

Sorry for the late reply.

You can find the newly added chapter 9 in the latest mpas-jedi tutorial here: https://www2.mmm.ucar.edu/projects/mpas-jedi/tutorial/202506NCAS

and testdata

https://www2.mmm.ucar.edu/projects/mpas-jedi/tutorial/202506NCAS/testdata/

.

FYI: We are also planning a MPAS-Atmosphere and MPAS-JEDI tutorial in September 2025 (see the announcement from MPAS-Atmosphere and MPAS-JEDI Tutorials | Mesoscale & Microscale Meteorology ).

Thank you,

BJ

Hi BJ,

Thanks a lot for your support. I went through tutorial section 9 to create my own static B Matrix, and I finally managed to get it working. The issue appeared when I tried to use it with 3DVAR DA (with MPAS-JEDI).

On my first attempt, I got an error: “wrong size for dimension nl0” in NICAS read. After looking into the code (type_nicas_blk), I found that the problem was with surface_pressure. The code compares the number of levels in the file with geom%nl0 and it stops if different. In the files, there is only 1 level (which I believe is correct, since surface_pressure is 2D), but geom%nl0 is 55 (the total model levels).

So, why doesn’t the code recognize that surface_pressure has only one level? Why does it try to read more than one level for surface_pressure? Should I generate NICAS files by repeating the same level up to 55 so that all variables have the same number of levels? If so, how can this be done?

Here is one example of a local NICAS file:

ds = Dataset(“mpas_nicas_local_000256-000001.nc”, mode=‘r+’)
surface_pressure = ds.groups[“surface_pressure”]
surface_pressure
<class ‘netCDF4._netCDF4.Group’>
group /surface_pressure:
ncmp: 1
dimensions(sizes): nl0(1)
variables(dimensions):
groups: cmp_1

So nl0 is 1.

Do you have any idea how I could solve this?

Thanks again!

Hi @Eder ,

I am glad to hear that you could go through the tutorial section 9 and generated your own static B.

From the tutorial hands-on material, would you take a look at Bflow_global120km/5_SO.bash file ?

Inside that file, there exist an additional yaml part under saber central block.read key, which is…

        grids:
          - model:
              variables:
              - stream_function
              - velocity_potential
              - temperature
              - spechum
          - model:
              variables:
              - surface_pressure

Your yaml file for 3DVAR DA needs to include this section.

There are some differences between the NICAS files of the pre-generated static B (which is used for the hands-on practice) and section 9.

  • In the pre-generated static B, the NICAS files are generated with all variables together. In this case, surface_pressure also has nl0=55, and NICAS will handle those non-physical levels as missing values. In this case, we don’t need to set grids key in the yaml file.
  • In the section 9, the NICAS files are generated for each variables separately, then merged later. In this case, surface_pressure will contain nl0=1, as you investigated. In this case, we need to set a different set of grids as shown above.

Hope this help other users, too and please be careful on the indentation when you add grids to your yaml file. grids section is the same indentation as drivers section under read.

Thank you,

BJ

Hi BJ,

Thank you very much for your reply. I included the grid section in my YAML file as you suggested, and it worked perfectly. I was able to run 3DVAR DA using my own B matrix. Many thanks!

Glad to hear that @Eder! --BJ