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

Upgrade Rttov13 + WRF changes #367

Merged
merged 23 commits into from
Aug 2, 2022
Merged

Upgrade Rttov13 + WRF changes #367

merged 23 commits into from
Aug 2, 2022

Conversation

lkugler
Copy link
Contributor

@lkugler lkugler commented Jun 29, 2022

Description:

  • Mostly changes to allow the use of RTTOV13

Edit (@hkershaw-brown) WRF changes moved to https://github.com/NCAR/DART/tree/wrf-thm

  • WRF temperature variable changed from T to THM in WRF's model_mod
  • Allow interpolate to access the uppermost level of the WRF state.

Fixes issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue): Bug: clouds flipped up/down in RTTOV for IR/VIS #365
  • New feature (non-breaking change which adds functionality): RTTOV upgrade
  • Breaking change (fix or feature that would cause existing functionality to not work as expected): RTTOV-SCATT is not tested! Code missing!
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Tests

  • rttov13 changes: comparison to my own script using the python interface of RTTOV
  • WRF allow accessing the top level of the WRF state in interpolate: ./perfect_model_obs gave the expected results
  • cange to THM as type_t variable: ./perfect_model_obs did not crash

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Version tag

Testing Datasets

  • Dataset needed for testing has been provided:
    wrfout state, expected output in netcdf format, obs_seq.in

@lkugler
Copy link
Contributor Author

lkugler commented Jun 29, 2022

Here I have some before-after plots comparing to my script that uses the python interface to RTTOV. I create observations close to every gridpoint of the model, DART computes the radiance from an interpolation of the state. python-RTTOV uses gridpoint values/columns as input, so the left is naturally smoother.

The images indicate that the changes make sense. For WV there is still a visible difference for some gridpoints.

Before-image VIS

Comparison before

After-image VIS

Comparison after VIS

After-image WV

Comparison after WV

@nancycollins
Copy link
Collaborator

by the way, really nice catch on the inverted column(s).

Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Lukas,

This is great work to get the rttov13 interface up and running.

For the obs_def_rttov13_mod.f90, at the moment git is interpreting this as a git mv so
obs_def_rttov_mod.f90 no longer exists in this branch.

Because we have people using rttov 12, for this pull request I'd like to have

obs_def_rttov_mod.f90
obs_def_rttov13_mod.f90

I think this makes clearer if we do depreciate rttov12 in a future release.

The mkmf.template can have a VERSION variable so we do not need two mkmf.template.rttov for each compiler:

e.g.

RTTOV_VERSION = 13

RTLIBS = -lrttov$(RTTOV_VERSION)_wrapper

I can go ahead and make these two changes if you are comfortable with me editing your branch.

Cheers,
Helen

@@ -7402,7 +7402,7 @@ subroutine fill_default_state_table(default_table)
'UPDATE ', &
'999 ' /)
row = row+1
default_table(:,row) = (/ 'T ', &
default_table(:,row) = (/ 'THM ', &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note, T vs THM is a wrf v3 to v4 issue. T is prognostic in v4.

Inside WRF, use_theta_m=0 for T= THM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean THM is prognostic in v4. The WRF userguide says

The prognostic variable for temperature is moist potential temperature by default.

And if you set use_theta_m=0 then THM is the dry potential temperature and happens to be the same as T.
But if you update T by assimilation then this update is not used by the forecast model since only THM is prognostic but not T.

@lkugler
Copy link
Contributor Author

lkugler commented Jun 30, 2022

We can also remove the commit related to the levels (25efb6c) from this PR?! Since its a separate thing.
Following the discussion in #366

hkershaw-brown added a commit that referenced this pull request Aug 1, 2022
THM is prognostic in WRF v4
The prognostic variable for temperature is moist potential temperature by default.

And if you set use_theta_m=0 then THM is the dry potential temperature and happens to be the same as T.
But if you update T by assimilation then this update is not used by the forecast model since only THM is prognostic but not T.
@hkershaw-brown
Copy link
Member

I'm splitting the WRF and RTTOV parts of this pull request.

The WRF changes are on https://github.com/NCAR/DART/tree/wrf-thm

hkershaw-brown added a commit that referenced this pull request Aug 2, 2022
This has rttov which we probably do not want in the default
input.nml for wrf
replaced html references with readthedocs links
Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Splitting the WRF updates to a separate pull request to support wrf3 and wrf4 users.

@hkershaw-brown hkershaw-brown merged commit b6100ce into NCAR:main Aug 2, 2022
@hkershaw-brown hkershaw-brown mentioned this pull request Aug 9, 2022
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

Successfully merging this pull request may close these issues.

3 participants