RTTOV 12.3 Units, Upwelling and dowwelling radiances

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13175
    Daniel SalinasDaniel Salinas
    Participant

    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 RTTOV

    Greetings

    #13176
    James HockingJames Hocking
    Keymaster

    Hi 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,
    James

    #13178
    Daniel SalinasDaniel Salinas
    Participant

    Hello 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 Salinas

    #13180
    James HockingJames Hocking
    Keymaster

    Hi 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,
    James

    #13183
    Daniel SalinasDaniel Salinas
    Participant

    Hi James

    Thank you for your quick response, I am modifying the code and starting the tests.

    regards
    Daniel

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.