-
Notifications
You must be signed in to change notification settings - Fork 159
Rewrite of radiance documentation #896
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for the pull request Lukas! Most of the group is on travel this week and most of next week (I think), so we might be a little slow responding to this. Cheers, |
We appreciate this contribution @lkugler. I will have more time to review in the upcoming weeks, but from skimming through it -- these docs are much improved. |
guide/Radiance_support.rst
Outdated
At present, DART supports RTTOV v12.3 and v13. | ||
In version 12.3, RTTOV-direct for visible/infrared/microwave without | ||
scattering as well as RTTOV-scatt for microwave computations with full | ||
scattering are supported. The interface to v13 is limited to RTTOV-direct. |
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.
Do we need a bit more perspective regarding the limitations of only using RTTOV-direct without full scattering? How much does that deprecate results?
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.
Good that you mention it. It's wrong that RTTOV-direct has no scattering.
see 375bc53
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.
@lkugler As written this states that RTTOVv13 includes the ability to simulate microwave radiance --however the DART interface does not support microwave radiance with v13 because its limited to interacting with RTTOV-direct (UV/VIS/IR) and does not use the RTTOV-scatt (microwave) routine. Is that correct ? Seems like an important point. But looking at the RTTOV obs_def_mod for v12 and v13 there doesn't seem to be any checks or error codes to prevent users from using microwave with RTTOVv13 --- although the DART code still allows for namelist options related to microwave radiance. Could you clarify?
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.
I didn't test the microwave operator before in v13, so I didn't want to claim that it works, sorry.
Now I tested the microwave operator (channel 20 of instrument ATMS on satellite NOAA-21) and noticed that for microwave in v13, the input variables were not using the indices lvlidx
which flip the arrays if user chooses to, i.e. when first_lvl_is_sfc=T
. Moreover, in the hydro(nlevels, ncategories)
array, the order of hydrometeor categories was not correct. Currently it is Rain, Snow, Graupel, Cloud Liquid and Cloud Ice, in that order (says the user guide and the table I used (hydrotable_noaa_atms.dat). However, it depends on the hydrotable and thus might change in the future.
see edd2691, 2886faf, cb09fae
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.
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.
Exactly, for models that use first_lvl_is_sfc=.false.
. Are there any models that use this convention? I think ECMWF-IFS and related ones maybe.
I think commit cb09fae is more important because it applies for potential WRF/MPAS microwave users.
Something similar was fixed in 2022 (#365 ). Before that, arrays for VIS/IR were flipped twice. Once when the cloud variables are summed up into totalwater/totalice and once when they were assigned to the RTTOV input array runtime % profiles(imem) % cloud(:,:)
. Obviously arrays need to be flipped only once if first_lvl_is_sfc=T.
To compile DART with RTTOV, perform the following steps: | ||
|
||
|
||
**1. Install RTTOV** |
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.
These edits have removed a separate guide for compiling and installing DART-RTTOV 'Getting started with DART RTTOV' originally created by Tim Hoar. Not sure if there is anything worthwhile to retain in those instructions, or whether new steps are enough. Maybe Helen can add some perspective there.
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.
I think the edits by Lukas are a great improvement. They give specific instructions for the DART part of the process direct the user to external (RTTOV) documentation when needed.
I am happy to to remove the link to https://github.com/NCAR/DART/wiki/Getting-Started-with-DART-RTTOV since this is out of date (quickbuild.csh).
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.
EDIT: I will include Tim's instructions on the page, as I found them helpful now while I was doing a fresh install.
Moreover, I'd point to the quick start beginners guide in case our docs become outdated at some point.
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.
Tim's instructions look good incorporated in the High-Level workflow section -- I will clean up the syntax a bit.
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.
Addressed in f227bc1
guide/Radiance_support.rst
Outdated
* The Deff scheme (`clw_scheme=2`) computes optical properties from an effective particle diameter as input. | ||
By default, DART accesses the model state variable associated with ``QTY_CLOUDWATER_DE`` in the DART namelist. |
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.
Technically the default obs_def_rttov_mod code currently in the DART repository prescribes a fixed effective diameter value -- and does not use the QTY_CLOUDWATER_DE value. Should the opposite be true?
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.
In v13, the code defines a default size. In v12 it doesn't.
I added the default in v12 too now: 4d671f2
Moreover, I added the necessary code such that the particle size can be read from WRF: b0adf4c
However, it might be better NOT to have it as default (to read particle sizes from any model), as I only checked it for WRF and it's likely that you'll run into errors in other models. Also, depending on the configuration, the variable is not in WRF output.
If we don't want to read from file as default, then we only need to comment out the interpolate()
command in obs_def_rttov_mod.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.
I agree that we make the prescribed/reasonable particle size as the default option, but If DART finds the QTY_CLOUDWATER_DE value within the DART state, it assumes the user wants to use the model liquid particle size as input and will perform the interpolate() and overwrite the default values. The ice particle size is determined by the 'use_icede' namelist option false = use prescribed/fixed value, true= use model value from QTY_CLOUD_ICE_DE. If using the modeled particle diameter (from WRF) I think we still need the meter to micron units conversion as well. I will have a go at this.
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.
Addressed in 71e8ef1
guide/Radiance_support.rst
Outdated
A good overview over the most important parameters for the radiative transfer | ||
can be found in the RTTOV user guide section "Simulation of UV, visible and IR cloud-affected radiances". |
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.
I actually couldn't find this section in the RTTOV user guide --- did the sections change with the updated RTTOV version, or did I just miss it?
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.
Ah, that's the v14 guide, which changed a lot. The guide for v12 and v13 is quite hidden now.
Is it ok to add links to the pages where v12/v13 are still available?
5bbbe46
|
||
https://github.com/NCAR/DART/wiki/Getting-Started-with-DART-RTTOV | ||
#. Ice clouds |
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.
Why call out Ice clouds specifically, if there is not specific information given in this doc? Can we provide similar scientific guidance for Ice clouds similar to liquid clouds above?
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.
Yes, there was something missing. See 282ed10
something else
There in the docs, I mentioned another feature that would be great for anyone comparing with real observations:
One should only count 10% of "snow" towards ice. It sounds like a ad-hoc estimate, but it's a good estimate, supposedly.
It would be good if we could add that multiplier to snow (
totalice(:) = totalice(:) + max(clouds % snow(imem,:),0.0_r8) |
If not implemented, then at least it's important to make new users aware of that.
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 seems it would be straightforward to implement this by using the logical 'is_vis' option. If true apply the 0.1 multiplier, if false keep at 1.0.
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.
Addressed in 9aa7dcf
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.
@lkugler Your suggested changes were much needed. Could you take a look at my text changes, and make sure this is consistent with your understanding. Also -- could you take a look at my specific questions, where I am looking for more scientific feedback.
Co-authored-by: Helen Kershaw <[email protected]>
Co-authored-by: Helen Kershaw <[email protected]>
Co-authored-by: Helen Kershaw <[email protected]>
I think the guide is in a good condition now. Please have a look. |
…n hydro array corrected (microwave)
do ilvl=1,nlevels | ||
lvlidx(ilvl) = nlevels - ilvl + 1 | ||
end do | ||
else | ||
do ilvl=nlevels,1,-1 | ||
! do nothing, as the input data is ordered from TOA to surface | ||
do ilvl=1,nlevels |
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.
Before, we had indices n, n-1, n-2, ... in both if clauses. But actually we want 1,2,3,.. here.
do ilvl=1,nlevels | ||
lvlidx(ilvl) = nlevels - ilvl + 1 | ||
end do | ||
else | ||
do ilvl=nlevels,1,-1 | ||
! do nothing, as the input data is ordered from TOA to surface | ||
do ilvl=1,nlevels |
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.
Before, we had indices n, n-1, n-2, ... in both IF clauses. But actually we want 1,2,3,.. here.
! TODO: specify cfrac (scalar?!) | ||
! runtime % cld_profiles(imem) % cfrac = ? not implemented | ||
! Custom cfrac = vertical maximum of the cloud fraction | ||
runtime % cld_profiles(imem) % cfrac = max(min(maxval(clouds % cfrac(imem,lvlidx)), 1.0_r8), 0.0_r8) |
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.
Before, this was not specified. Now I set this microwave-related (scalar) cloudfraction to the vertical maximum cloud fraction in a column. I'm not sure if this is correct.
runtime % cld_profiles(imem) % hydro_frac(:,:) = 1.0_jprb | ||
! runtime % cld_profiles(imem) % hydro_frac(:,:) = clouds % cfrac(imem,lvlidx) |
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.
@lkugler This seems incorrect. If the cfrac is defined then hydro_frac is assumed to equal cfrac. Can you confirm?
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.
By the user guide, hydro_frac(nlevels, nhydro_frac)
describes cloud fraction (0-1) on nlevels
for nhydro_frac
many hydrometeor categories.
If we assume nhydro_frac=1
, then we can set hydro_frac(:,1) = cfrac(:)
since we don't have any other information on the spatial extent of rain/snow/graupel/hail within a grid box.
So I think that we can have
runtime % cld_profiles(imem) % hydro_frac(:,1) = clouds % cfrac(imem,lvlidx)
, right?
Description:
I think the radiance documentation needed some rewriting.
Please feel free to suggest additional changes / what's missing.
I think it shouldn't be a duplicate of the RTTOV user guide, but give an overview over capabilities, list advice, and give references to further material.
Fixes issue
None
Types of changes
Documentation changes needed?
Tests
You can view the docs at readthedocs:
Radiance_support
obs-def-rttov-mod
Checklist for merging
Checklist for release
Testing Datasets