Simulating BT using ERA5 dataset

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #49357
    Parisa HeidaryParisa Heidary
    Participant

    I’m in the process of delving into RTTOV and its application. My immediate goal is to simulate Brightness Temperature (BT) utilizing the ERA5 dataset, specifically for the TROPICS satellite. Could you assist me with a few inquiries?

    1) when I run RTTOV exe file (i.e., example_Fwd.exe) for TROPICS coefficient, I get this error:

    ” 2024/03/12 17:00:29 fatal error in module ../../src/coef_io/rttov_coef_io_mod.F90:0201
    File of filetype rtcoef does not exist: ~
    2024/03/12 17:00:29 fatal error in module ../../src/coef_io/rttov_read_coefs.F90:0254

    fatal error reading coefficients
    STOP 1″

    2) To prepare my input file for simulating BT using the ERA5 dataset, how can I format it to ensure compatibility with RTTOV?

    I would greatly appreciate any assistance with this matter, as I’m quite new to this and finding it somewhat confusing.

    Best,
    Parisa

    #49359
    James HockingJames Hocking
    Keymaster

    Hi Parisa,

    Depending on what you want to do, you could consider using the NWP SAF Radiance Simulator (RadSim) package, which would allow you to run RTTOV simulations on ERA-5 data without writing any code at all. See:
    https://nwp-saf.eumetsat.int/site/software/radiance-simulator/

    I strongly recommend RadSim as a relatively easy way to run RTTOV simulations.

    If you want to run RTTOV directly, can I suggest you read the rttov-quick-start.pdf guide in the docs/ directory. This describes how the example_fwd.F90 code works and also explains some basic principles about RTTOV. Similarly, section 3 in the RTTOV user guide (just a couple of pages) gives some imporant basics that all users need to know.

    Section 5.3 in the RTTOV user guide describes how to run the example programs. These are set up to be run via the corresponding shell scripts in the rttov_test/ directory. For example_fwd.exe this is run_example_fwd.sh. If you have a look at the headers of that script you will see where you can specify the coefficient file name to be read. You need to ensure the coefficient file is in the relevant directory.

    You can download coefficient files from the RTTOV coefficient download page:
    https://nwp-saf.eumetsat.int/site/software/rttov/download/coefficients/coefficient-download/

    This can be quite confusing to begin with as there are many different files. The TROPICS coefficients are in this tarball:
    https://nwp-saf.eumetsat.int/downloads/rtcoef_rttov13/rttov13pred54L/rtcoef_mw_rttov13pred54L_srf.tar.bz2

    Download and extract this to the rtcoef_rttov13/rttov13pred54L/ directory in your RTTOV distribution. To extract the file:
    $ cd rtcoef_rttov13/rttov13pred54L/
    $ tar xf rtcoef_mw_rttov13pred54L_srf.tar.bz2

    Regarding ingest of ERA-5 data: RTTOV does not have an input “format” as such. In general one must write code read the atmospheric and surface data and store it in the RTTOV profile data structure (as described in the quick start guide, the example_fwd.F90 code, and the user guide). You can edit the example_fwd.F90 code to do this for your ERA-5 data. I cannot offer explicit advice on this, as it is really down to users to manage the reading of the profile data. As stated in the documentation, I do not recommend trying to use the ASCII format for profile data employed by the example_fwd.F90 code as supplied for a real-world application of RTTOV: this is set up as a human-readable example to help users understand the code.

    This is the reason I recommend RadSim, as it takes care of reading the model data for you.

    Again, if you prefer to write code to do this, and if you are more familiar with Python than Fortran, you could also consider running RTTOV using the Python wrapper. This is a bit simpler than running RTTOV in Fortran, and it is likely to be easier to read the ERA-5 data in using Python code rather than Fortran. The wrapper is described in detail in docs/rttov-wrapper.pdf, and there are examples in the wrapper/ directory illustrating use of the wrapper to run RTTOV simulations.

    I hope that helps.

    Best wishes,
    James

    #49360
    Parisa HeidaryParisa Heidary
    Participant

    Hi James,
    First of all, I wanted to say thanks for all your help. Your guidance really got me started with WSL, and I’m making progress.

    I’ve been looking into Radsim documentation, and it seems like the better option for what I need. But I have a question about compiling RTTOV as I need it for Radsim (correct?). Should I compile it with or without HDF5? I managed to compile it without HDF5, but when I tried including HDF5 support, I ran into some errors.

    “”
    make[1]: Entering directory ‘/home/parisah/rttov132/src/hdf’
    cd ../../tmp-gfortran-openmp/hdf && gfortran -I../.././/include -D_RTTOV_HDF -I/home/parisah/miniconda3/envs/rttovgui/lib -fPIC -O3 -fopenmp -ffree-line-length-none -I../.././/mod -c ../../src/hdf/rttov_hdf_mod.F90 -o ../.././/obj/rttov_hdf_mod.o
    ../../src/hdf/rttov_hdf_mod.F90:49:5:

    49 | USE HDF5
    | 1
    Fatal Error: Cannot open module file ‘hdf5.mod’ for reading at (1): No such file or directory
    compilation terminated.
    make[1]: *** [Makefile:119: ../.././/mod/rttov_hdf_mod.mod] Error 1
    make[1]: Leaving directory ‘/home/parisah/rttov132/src/hdf’
    make: *** [Makefile:81: hdf/lib] Error 2

    “”

    I actually want to compile with HDF because it’s recommended, and I might need its GUI for future use too.

    Regarding the previous error that I am still getting for the coefficient, I exactly did the same thing, I unpacked the rtcoef_mw_rttov13pred54L_srf.tar.bz2 file in the same directory.

    And regarding the input files, I guess the quick start document can be really helpful. Thanks.

    Thank you so much again for all your help.

    #49362
    James HockingJames Hocking
    Keymaster

    Hi Parisa,

    It is not mandatory to compile against the HDF5 library, but you would require it for the GUI, and for certain other features of RTTOV.

    I can see that you have edited your RTTOV build/Makefile.local. In your case you should set the HDF5_PREFIX to:

    /home/parisah/miniconda3/envs/rttovgui/

    You should then simply uncomment the relevant FFLAGS_HDF5 and LDFLAGS_HDF5 lines (don’t modify them).

    If you then build with the build/rttov_compile.sh script, it should find the HDF5 library.

    Regarding the coefficient files, when you say you are still getting the same error, do you mean for the example_fwd.F90 example program? Did you run this via the run_example_fwd.sh script after editing the shell script with the location of the TROPICS coefficient file?

    Best wishes,
    James

    #49363
    Parisa HeidaryParisa Heidary
    Participant

    Thank you so much for your assistance. With your help, I was able to successfully compile RTTOV against HDF5. It turns out I had a mistake in my HDF5_PREFIX directory, which I’ve corrected now (from “/home/parisah/miniconda3/envs/rttovgui/lib” to “/home/parisah/miniconda3/envs/rttovgui/”).

    Additionally, I realized that I was mistaken about running the example_fwd script. I’ve adjusted the run_example_fwd.sh script accordingly for my TROPICS coefficient, and it’s now running smoothly.

    Once again, I truly appreciate your invaluable help. I’ll make sure to update my progress for Windows users to keep everyone informed.

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