Satellite Application Facility for Numerical Weather Prediction › Forums › RTTOV › Older Versions › RTTOV v12 › RTTOV v12 General Discussion › RTTOV 12.3 Units, Upwelling and dowwelling radiances
- This topic has 4 replies, 2 voices, and was last updated 4 years, 10 months ago by Daniel Salinas.
-
AuthorPosts
-
January 31, 2020 at 12:16 pm #13175Daniel SalinasParticipant
Hi,
I am performing direct simulations by modifying the sample code fwd_example.f90, but I have a doubt when calling rttov_radiance2, to obtain the upwelling and downwelling, it results in values in (mW / m2 / sr / cm-1) , but I need it in radiations, I checked it manually using:
((total radiance (rttov) x wavenumber) / wavelength)) / 1000, to obtain the radiance values in radiations, how can I modify the code to obtain the upwelling and downwelling in radiance values and not in the units of RTTOVGreetings
January 31, 2020 at 2:24 pm #13176James HockingKeymasterHi Daniel,
If I understand correctly, you want to convert L_wvn_cm, the RTTOV radiance in units of [mW / m^2 / sr / cm^-1] (i.e. spectral radiance with respect to wavenumber in inverse centimetres) to L_wvl_m, the equivalent radiance in units of [mW / m^2 / sr / m] (i.e. spectral radiance with respect to wavelength in metres).
The short answer is: L_wvl_m = L_wvn_cm * 100 * wvn_cm**2
where wvn_cm is the wavenumber in cm^-1 which you can obtain from the filter function section of the RTTOV rtcoef coefficient file or, equivalently, from the coefs%coef%ff_cwn(:) array in your code.
If you want the result in units of [W / m^2 / sr / *] (Watts instead of milli-Watts) then multiply the corresponding radiance by 10^-3.
Let me know if I misunderstood your question.
Best wishes,
JamesFebruary 4, 2020 at 10:08 am #13178Daniel SalinasParticipantHello James,
Thank you for your quick response, in principle I have clear the conversion of units, the problem is in the fortran code,
that is, I get an output of radiations in [mW / m ^ 2 / sr / cm ^ -1], but in the fortran code where I modify it to make the change of units (I’m quite new in fortran), my other option it would be, once I get the original radiance output, read it with python, select the radiance values, make the change of units and generate a new output, but this would be to do two steps.Greetings,
Daniel SalinasFebruary 4, 2020 at 11:33 am #13180James HockingKeymasterHi Daniel,
If you are more comfortable with Python, you could call RTTOV directly from Python using the Python wrapper. You can access all radiance outputs through the wrapper.
However, if you prefer to modify the example_fwd.F90 code you can do the following:
After you have called rttov_direct, the radiance structure (and optionally also radiance2) are populated with the various radiance values calculated by RTTOV. Each member array (e.g. radiance%total, radiance2%up) has length nchanprof which is the total number of channels being simulated over all input profiles, which is (nchannels * nprofiles) if you simulated the same channels for every input profile.
The channel wavemumbers in cm^-1 are available in the coefs%coef%ff_cwn(:) array. This has size equal to nchannels, the number of channels read from the optical depth (rtcoef) coefficient file.
To convert the radiance units as I described previously you can do something like this after the call to rttov_direct:
do j = 1, nchanprof jch = chanprof(j)%chan rad(j) = radiance%total(j) * coefs%coef%ff_cwn(jch)**2 * 100. enddo
This converts the radiance%total values from spectral radiance wrt wavenumber in cm^-1 to spectral radiance wrt wavelength in m (as I described in my previous post) and stores them in a new array rad(1:nchanprof) which you will have to declare at the top of the code and allocate.
If you want to convert a different radiance quantity then simply replace radiance%total by, for example, radiance2%up.
Best wishes,
JamesFebruary 4, 2020 at 12:53 pm #13183Daniel SalinasParticipantHi James
Thank you for your quick response, I am modifying the code and starting the tests.
regards
Daniel -
AuthorPosts
- You must be logged in to reply to this topic.