Skip to content
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

the 0 U/V increment in 3DEnVar case #148

Open
Junjun-NOAA opened this issue Sep 5, 2024 · 43 comments
Open

the 0 U/V increment in 3DEnVar case #148

Junjun-NOAA opened this issue Sep 5, 2024 · 43 comments

Comments

@Junjun-NOAA
Copy link
Collaborator

It looks like the U/V increment is 0 at all vertical levels in 3DEnVar case.
Using the static B interpolated from BJ's global static B, the single-obs (temperature) 3DVAR, 3DEnVar and Hybrid DA experiments have been conducted. Below is temperature and U increment at level = 20. The U and V increment at all vertical levels are 0.

Screenshot 2024-09-05 at 9 11 11 AM Screenshot 2024-09-05 at 9 11 24 AM
@SamuelDegelia-NOAA
Copy link
Contributor

Hi @Junjun-NOAA, I can look into this. Are you using rrfs_mpasjedi_2024052700_Ens3Dvar.yaml (recently renamed from sonde_singeob_airTemperature_mpasjedi.yaml) to run 3DEnVar?

@Junjun-NOAA
Copy link
Collaborator Author

Hi @SamuelDegelia-NOAA Thanks for your help. I was using sonde_singeob_airTemperature_mpasjedi.yaml, and the run directory is /scratch1/BMC/wrfruc/jjhu/rundir/RDASApp/expr/mpas_2024052700, you can take a look at the details. Thanks

@TingLei-NOAA
Copy link
Contributor

@Junjun-NOAA @SamuelDegelia-NOAA I found this issue also exists for the old mpas-jedi case which I missed.
Some thorough investigation is needed!

@SamuelDegelia-NOAA
Copy link
Contributor

SamuelDegelia-NOAA commented Sep 5, 2024

@Junjun-NOAA @TingLei-NOAA I wonder if this has to do with there being no 3D wind data in the background (and ensemble) restart files except for:

        float u(Time, nEdges, nVertLevels) ;
                u:units = "m s^{-1}" ;
                u:long_name = "Horizontal normal velocity at edges" ;
        float w(Time, nCells, nVertLevelsP1) ;
                w:units = "m s^{-1}" ;
                w:long_name = "Vertical velocity at vertical cell faces" ;

It is hard to track these u, w variables since their names are so short and common. But should they be used to compute uReconstructZonal and uReconstructMeridional somewhere that isn't getting applied in our yaml?

@TingLei-NOAA
Copy link
Contributor

@SamuelDegelia-NOAA In my case, the ensemble members are the same as my background files (as you described, only that normal wind exists). I guess there should be some internal conversion for those winds.
But, it deserve a verification if the ensemble spread of zeros caused that issue. I am trying to test this by hard coded ensemble perturbations.

@SamuelDegelia-NOAA
Copy link
Contributor

Sorry @TingLei-NOAA, I edited my comment a little bit. I shouldn't say that it is specifically a zero spread issue or just us missing something to do the internal conversion from the normal winds into u, v. For example, I see in rrfs_mpasjedi_2024052700_Ens3Dvar.yaml that the background state variables include u whereas it is not included in the ensemble member state variables.

@TingLei-NOAA
Copy link
Contributor

@SamuelDegelia-NOAA Thanks for your clarification. But I think we can first try if we could rule out if that is a zero spread issue.

@TingLei-NOAA
Copy link
Contributor

@delippi reported an issue with wind analysis. It is maybe related to the current issue
#41 (comment)

@TingLei-NOAA
Copy link
Contributor

An update: when the ensemble perturbation was enforced to be 1 by hardwiring in the code. The wind increment in the increment output were as expected. so, now, my guess is that , for the wind related variable conversion issue, the uReconstructZonal, uReconstructMeridional in the ensembles are zeroes and caused 0 wind increment.

@guoqing-noaa
Copy link
Collaborator

@Junjun-NOAA @TingLei-NOAA I wonder if this has to do with there being no 3D wind data in the background (and ensemble) restart files except for:

        float u(Time, nEdges, nVertLevels) ;
                u:units = "m s^{-1}" ;
                u:long_name = "Horizontal normal velocity at edges" ;
        float w(Time, nCells, nVertLevelsP1) ;
                w:units = "m s^{-1}" ;
                w:long_name = "Vertical velocity at vertical cell faces" ;

It is hard to track these u, w variables since their names are so short and common. But should they be used to compute uReconstructZonal and uReconstructMeridional somewhere that isn't getting applied in our yaml?

@SamuelDegelia-NOAA Do you mean we only have U and W, no V?

@delippi
Copy link
Collaborator

delippi commented Sep 6, 2024

@TingLei-NOAA, thanks for pointing me to this issue. This is indeed the same issue I'm having. When trying to only assimilate winds I get the following warnings in my log file:

WARNING: Variable uReconstructZonal not in input file.
WARNING: Variable uReconstructMeridional not in input file.

I'm thinking the variable just needs to be added to the backgrounds. Or, if that isn't possible and as @SamuelDegelia-NOAA stated, a recipe that converts the horizonal normal velocity at edges u variable to uReconstructZonal and uReconstructMeridional.

@guoqing-noaa
Copy link
Collaborator

Thank @Junjun-NOAA @TingLei-NOAA @delippi @SamuelDegelia-NOAA for great detective work!

It seems we have to update the restart files. @chunhuazhou , could you help with this?

We can try to modify the restart stream in streams.atmosphere as follows:

<immutable_stream name="restart"
                  type="input;output"
                  filename_template="restart.$Y-$M-$D_$h.$m.$s.nc"
                  io_type="pnetcdf,cdf5"
                  input_interval="initial_only" 
                  clobber_mode="replace_files"
                  output_interval="1:00:00" />

        <stream name="output" />
        <var name="pressure" />
        <var name="uReconstructZonal" />
        <var name="uReconstructMeridional" />
</stream>

There is a related PR here: https://github.com/JCSDA-internal/mpas-jedi/pull/1012

@guoqing-noaa
Copy link
Collaborator

@Junjun-NOAA Could you also try in your test cases? Thanks!

@TingLei-NOAA
Copy link
Contributor

TingLei-NOAA commented Sep 6, 2024

@guoqing-noaa Yes. I think there should be some setup in those stream files to make the current use of uReconstructMeridional,uReconstructZonal. We could dig more and might have further discussion with mpasjedi core team to decide what analysis variable should be used for RRFS.
For being now, by using "u" (changes made in the yaml) rather than uReconstructMeridional,uReconstructZonal, the ens3dvar created the increment for u.
@Junjun-NOAA That will be interesting to see if this workaround is also working for your case .
My changed yaml is test-ens3dvar.yaml in hera: /scratch2/NCEPDEV/fv3-cam/Ting.Lei/dr-mpas-bundle/rdas-mpas-tests/CONUS_15km_da_oneob_test.

@Junjun-NOAA
Copy link
Collaborator Author

@guoqing-noaa @TingLei-NOAA Thanks for digging into this issue. I will try your suggestions and see what we will get.

@delippi
Copy link
Collaborator

delippi commented Sep 6, 2024

@TingLei-NOAA, it looks like your yaml only assimilates a single temperature ob.

@TingLei-NOAA
Copy link
Contributor

@TingLei-NOAA, it looks like your yaml only assimilates a single temperature ob.

Yes. that is the current setup of Junjun 's case ,which show no cross-covariance worked as expected (0 increment in wind).
That will be interesting to see what quick work around is available in your case. That will be great if you could point to your run dir and we can see if there are some setup to help.

@chunhuazhou
Copy link
Collaborator

Thank @Junjun-NOAA @TingLei-NOAA @delippi @SamuelDegelia-NOAA for great detective work!

It seems we have to update the restart files. @chunhuazhou , could you help with this?

We can try to modify the restart stream in streams.atmosphere as follows:

<immutable_stream name="restart"
                  type="input;output"
                  filename_template="restart.$Y-$M-$D_$h.$m.$s.nc"
                  io_type="pnetcdf,cdf5"
                  input_interval="initial_only" 
                  clobber_mode="replace_files"
                  output_interval="1:00:00" />

        <stream name="output" />
        <var name="pressure" />
        <var name="uReconstructZonal" />
        <var name="uReconstructMeridional" />
</stream>

There is a related PR here: https://github.com/JCSDA-internal/mpas-jedi/pull/1012

I will update the test data and let you know when they are available. Thanks!

@SamuelDegelia-NOAA
Copy link
Contributor

SamuelDegelia-NOAA commented Sep 6, 2024

Great work all. Just to confirm, do we know if uReconstructZonal and uReconstructMeridional are prognostic variables, or do we also need to add uas an analysis variable?

Edit: This link states that u is the only prognostic wind variable, so it sounds like we also need it as an analysis variable. But we can update uReconstructZonal and uReconstructMeridional for post-processing purposes.

@guoqing-noaa
Copy link
Collaborator

@SamuelDegelia-NOAA @TingLei-NOAA
It is interesting to see what the differences will be between using edgeU vs using reconstructed u/v.
The NCAR group uses the reconstructed u/v and has not tried edgeU

@guoqing-noaa
Copy link
Collaborator

I will update the test data and let you know when they are available. Thanks!

Thanks, @chunhuazhou

@Junjun-NOAA
Copy link
Collaborator Author

@TingLei-NOAA Update from using u as an analysis variable, the increment of uReconstructMeridional and uReconstructZonal are generated. Thanks

@TingLei-NOAA
Copy link
Contributor

@Junjun-NOAA Great! we could dig more on related topics. Thanks for identifying this problem and initiate this discussion.

@guoqing-noaa
Copy link
Collaborator

@chunhuazhou
Junjun has done a few tests and the previous method of adding reconstructed wind only works for non-restart files and does NOT work for restart files.

Junjun and I are now testing the mpasout files. This task has become a top priority now as quite a few tasks depend on this.

@HuiLiu-NOAA
Copy link
Collaborator

I checked the mpas-jedi tutorial case, and the BG file does have the uReconstructZonal and uReconstructMeridional variables; but the BG files in both the old and new mpas case do NOT have the 2 variables. I guess this issue is just due to the missing of these two variables in the BG and restart files (and so there is no way to compute the analysis increments). Adding these variables to the BG and restart files should resolve this issue, hopefully.

@HuiLiu-NOAA
Copy link
Collaborator

I guess the BG file in the old MPAS case was also generated from the restart files.

@HuiLiu-NOAA
Copy link
Collaborator

Consult with the mpas-jedi team about how to generate the BG files with the 2 variables would be helpful, I guess.

@guoqing-noaa
Copy link
Collaborator

@HuiLiu-NOAA @TingLei-NOAA @delippi @Junjun-NOAA

I generated a new case yesterday where we have reconstructed winds. If you want to give it a try, I can share the path. The only part is that the ensemble spread is small and the analysis increment max is about 0.46 K.

@chunhuazhou
Copy link
Collaborator

@chunhuazhou Junjun has done a few tests and the previous method of adding reconstructed wind only works for non-restart files and does NOT work for restart files.

Junjun and I are now testing the mpasout files. This task has become a top priority now as quite a few tasks depend on this.

Thanks for telling me this. I didn't get the restart files to have uReconstructZonal and uReconstructMeridional but did add them to the mpasout files. My forecast jobs (with mpasout) are in the queue. I will update it here when they are ready.

@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Sep 9, 2024 via email

@guoqing-noaa
Copy link
Collaborator

I'm working on generating another case (using 36h GEFS forecasts for ensemble BEC) using the rrfs-workflow, but this may take some time.

@chunhuazhou
Copy link
Collaborator

@HuiLiu-NOAA @TingLei-NOAA @delippi @Junjun-NOAA

I generated a new case yesterday where we have reconstructed winds. If you want to give it a try, I can share the path. The only part is that the ensemble spread is small and the analysis increment max is about 0.46 K.

@guoqing-noaa Guess my message came cross yours - did you already generated the ensemble mpasout files?

@guoqing-noaa
Copy link
Collaborator

@HuiLiu-NOAA @TingLei-NOAA @delippi @Junjun-NOAA
I generated a new case yesterday where we have reconstructed winds. If you want to give it a try, I can share the path. The only part is that the ensemble spread is small and the analysis increment max is about 0.46 K.

@guoqing-noaa Guess my message came cross yours - did you already generated the ensemble mpasout files?

:) Not yet. If you have those mpasout, I can use them. Thank you, @chunhuazhou

@guoqing-noaa
Copy link
Collaborator

@HuiLiu-NOAA
If you want to give it a try now, here is my run directory for the mpasjedi2024052700 case:
/scratch1/BMC/wrfruc/gge/RDASApp/expr/mpas_2024052700

@TingLei-NOAA
Copy link
Contributor

TingLei-NOAA commented Sep 9, 2024

I checked the mpas-jedi tutorial case, and the BG file does have the uReconstructZonal and uReconstructMeridional variables; but the BG files in both the old and new mpas case do NOT have the 2 variables. I guess this issue is just due to the missing of these two variables in the BG and restart files (and so there is no way to compute the analysis increments). Adding these variables to the BG and restart files should resolve this issue, hopefully.

By BG file, did you mean nicas parameter files like bumploc_200km6km_nicas_local_000036-000034.nc?
In my understanding, when they are generated using the current setup as i bumploc_connus15km.yaml, there won't variables information in those files. The "common" group will be used for every variables and the cross-covariance would be realized by the "multivariate strategy : duplicated".

@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Sep 9, 2024 via email

@chunhuazhou
Copy link
Collaborator

chunhuazhou commented Sep 9, 2024

@HuiLiu-NOAA @TingLei-NOAA @delippi @Junjun-NOAA
I generated a new case yesterday where we have reconstructed winds. If you want to give it a try, I can share the path. The only part is that the ensemble spread is small and the analysis increment max is about 0.46 K.

@guoqing-noaa Guess my message came cross yours - did you already generated the ensemble mpasout files?

:) Not yet. If you have those mpasout, I can use them. Thank you, @chunhuazhou

They are almost ready on Jet:

  • deterministic forecast (ready) /lfs5/BMC/wrfruc/Chunhua.Zhou/w4/nco/stmp/conus12km/1.0.1/rrfs.20240526/23/fcst/ctl/mpasout.2024-05-27_00.00.00.nc
  • ensemble forecast files (initialized from GEFS 35-hour forecast, some are still in the queue) /lfs5/BMC/wrfruc/Chunhua.Zhou/w4/nco/stmp/conus12km/1.0.1/rrfs.20240526/23/fcst/mem*/mpasout.2024-05-27_00.00.00.nc

@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Sep 9, 2024 via email

@TingLei-NOAA
Copy link
Contributor

I looked at the bg.2022-05-26_19.00.00.nc in the run directory.

On Mon, Sep 9, 2024 at 2:39 PM TingLei-NOAA @.> wrote: I checked the mpas-jedi tutorial case, and the BG file does have the uReconstructZonal and uReconstructMeridional variables; but the BG files in both the old and new mpas case do NOT have the 2 variables. I guess this issue is just due to the missing of these two variables in the BG and restart files (and so there is no way to compute the analysis increments). Adding these variables to the BG and restart files should resolve this issue, hopefully. By BG file, did you mean nicas parameter files like bumploc_200km6km_nicas_local_000036-000034.nc? In my understanding, when they are generated using the current setup as i bumploc_connus15km.yaml, there won't variables information in those files. The "common" group will be used for every variables and the cross-covariable would be done by the "multivariate strategy : duplicated". — Reply to this email directly, view it on GitHub <#148 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOF252BYVALVCAFDHTMDGVDZVYBN7AVCNFSM6AAAAABNWS54ASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGA2DIMBSGU . You are receiving this because you were mentioned.Message ID: @.>

OK, the background files. Got it! Thanks. I think as @guoqing-noaa is doing, adding those missing variables to background files and ensembles would make it work. The issue I want to find out is that the reconstruced wind should be converted from the edge-u through mpas-jedi's variable change and it seems working for analysis variable (otherwise it should report "error" or the app doesn't have the check and just let them 0s? )but, it seems not working for ensemble components. Those are what I hope to sort out.

@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Sep 9, 2024

Thanks @TingLei-NOAA for the clarification.
Maybe checking the MPAS (not mpas-jedi) code for the analysis variable changes might be helpful? I think this transform of edge-u to the reconstruced is not done in the mpas-jedi VariableChange class, may be in MPAS-solo codes.

Agree! I think mpas lib should be invoked from mpas-jedi to those "complicated" conversion if such conversion is available in the latter.

@chunhuazhou
Copy link
Collaborator

@HuiLiu-NOAA @TingLei-NOAA @delippi @Junjun-NOAA
I generated a new case yesterday where we have reconstructed winds. If you want to give it a try, I can share the path. The only part is that the ensemble spread is small and the analysis increment max is about 0.46 K.

@guoqing-noaa Guess my message came cross yours - did you already generated the ensemble mpasout files?

:) Not yet. If you have those mpasout, I can use them. Thank you, @chunhuazhou

They are almost ready on Jet:

  • deterministic forecast (ready) /lfs5/BMC/wrfruc/Chunhua.Zhou/w4/nco/stmp/conus12km/1.0.1/rrfs.20240526/23/fcst/ctl/mpasout.2024-05-27_00.00.00.nc
  • ensemble forecast files (initialized from GEFS 35-hour forecast, some are still in the queue) /lfs5/BMC/wrfruc/Chunhua.Zhou/w4/nco/stmp/conus12km/1.0.1/rrfs.20240526/23/fcst/mem*/mpasout.2024-05-27_00.00.00.nc

The mpasout files are ready on Jet.

@guoqing-noaa
Copy link
Collaborator

Thanks, @chunhuazhou!

@HuiLiu-NOAA
Copy link
Collaborator

@guoqing-noaa : I just tested your newest case and got reasonable wind analysis increments. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants