I downloaded CRTM 2.4 from github (GitHub - JCSDA/crtm). After installed CRTM successfully, I am trying to run the test under crtm/test. I follow the instructions in readme_crtm_tests.txt. i.e.
cd test_build/
cmake …
and get the following error:
CMake Error at CMakeLists.txt:57 (ecbuild_get_test_multidata):
Unknown CMake command “ecbuild_get_test_multidata”.
Seems it cannot find the ecbuild_get_test_multidata.cmake. So where can I find this file, and what should I do?
these tests are for the new cmake build system only.
If you used the autoconf-based build described in the README.md file, you have to rely on the check_crtm.F90 test in the ${CRTM_ROOT}/src/Build/libsrc/test/ folder.
Before you attempt this build, you need to download the ecbuild tool from here: https://github.com/ecmwf/ecbuild,
and add the ecbuild/bin/ folder to your $PATH.
In order to build the CRTM using ecbuild, create a build directory and call ecbuild from there:
mkdir build
cd build
ecbuild ${CRTM_ROOT}
After the ecbuild configuration has finished, you can build the CRTM with make and run the ctests:
this looks like your netCDF include directory is not set correctly when you compile the CRTM.
Could you check your netCDF folder and make sure that the include directory has all the necessary *.mod files?
you need these files to compile the CRTM, not for the make check step.
It looks like you are on some sort of HPC. Do you have a netcdf module available that your system admin provides and can you load that?
Thank you. Do you have a successful installation of Fortran netCDF in the /home/dhyey/netcdf-fortran folder you showed earlier?
If so, please try adding the following lines to the CMakeLists.txt file in your ${CRTM_ROOT} folder:
find_library(NETCDF_LIBRARIES
NAMES netcdff)
HINTS "/home/dhyey/netcdf-fortran/lib")
if(NOT NETCDF_LIBRARIES)
message(FATAL_ERROR "netCDF library not found!")
endif()
# try either this:
include_directories(${NETCDF_INCLUDES})
# or this:
include_directories("/home/dhyey/netcdf-fortran/fortran")
If this does not help, you may have to contact the support of your cluster on how to correctly link the system netCDF on your machine.
It may also be helpful to write a short Fortran test program beforehand that reads or writes a dummy netCDF file to check if your Fortran netCDF installation is working correctly.
Thanks a lot for your help. I was able to link by finding library files on the server. The test was successful and was able to install CRTM. When I compared that with files I have locally, libnetcdff.la is missing.
Hello, I downloaded CRTM v2.4.0 from github (GitHub - JCSDA/crtm). After installed CRTM successfully, I am trying to run the test according to the userguide, may I ask which folder do I need to enter to execute make test in this step in userguide? Also, I tried going into the corresponding example folder(for example:/home/crtm/test/mains/regression/forward/test_Simple/), and under this folder the make command doesn’t work. It says 【make: *** No targets specified and no makefile found. Stop.】
Also, in this Graduate Student Test · JCSDA/crtm Wiki · GitHub, when execute Action #3: modify check_crtm.F90 (located in the ./crtm_v2.4.0/src/Build/libsrc/test / directory) to add one more sensor: change n_sensors = 3, and append “v.abi_gr” to the sensor list in line 88 and 89 like below:
【 ! Sensor information
INTEGER , PARAMETER :: N_SENSORS = 3
CHARACTER(*), PARAMETER :: SENSOR_ID(N_SENSORS) = (/‘cris399_npp’,'atms_npp ',‘v.abi_gr’/)】
what do I need to change after I change it like this? the make check command reports the following error.
Hello @yunzhiya, welcome to the forum.
Regarding you questions:
You should run the make test command in the same folder where you ran the make command beforehand to successfully build the CRTM.
Your SENSOR_ID error suggests that you need to make the length of all sensor ID CHARACTER elements in the array identical by adding trailing whitespaces. For example, you can see that cris399_npp and v.abi_gr don’t have the same length.
Hi,
About the first question, I used the autoconf-based build described in the README.md file at the beginning, and found that using the make test command would not work under the folder where the make command can be used, probably because I was Using version 2.4, make test is for the previous version.
Then I re-build with ecbuild based on README.JEDI according to your previous reply to Tianhao, and then use ctest to run the examples in the test folder. It works well.
Thank you very much for your help!
And I still have a small question, that is, can I modify the generated xxx.bin file to a certain suffix on the computer and open it directly with some software, or I can only use the CRTM RTSolution ReadFile interface to read it.
Yes, you can only use the CRTM RTSolution interface to read the binary output.
Alternatively you can save the individual data members of the RTSolution type to a different format, such as plain text or netCDF.
Examples can be found in the CRTM tutorial and more details are given in the user guide.
I will also have a look at the make test issue. This is not supposed to happen at this point.
Hi,
Sorry to bother you again. I have some new questions,
When I build and use ctest to test according to this step, I need to enter crtm/build/test_build after I change the example test code in the crtm/test/regression/forward/ (for example test_clearsky.f90) , and use the make -jn command to compile the.f90 file I just modified. At this step, how can I compile the test I modified independently? the make -jn command will compile all test file. Because my load_atm_data.inc file have a lot of profiles, when I compile all the test files, the computer will crash. The UserGuide only indicates that after compilation, ctest -vv -r testname command can be used to run this test separately. I wonder if it is possible to compile only a test that I have modified.
According to the example tests given, it seems that I can only modify the xxx.f90 file to specify source/sensor zenith angle. However, if the angles of each profile in the load_atm_data.inc are different, how to realize batch processing? For example, when processing MODIS data, each different point will have different angles.
You can simply re-build a modified test by running make in the crtm/build/ build folder. There is no need to enter the crtm/build/test_build/ folder and invole make there.
If your load_atm_data.inc file contains a lot of profiles, it might be worthwhile to put them in a netCDF file and load them at runtime.
You can also use the CRTM as a simple Fortran library and write your own application using it.
All you need to do to modify the sensor zenith angle is update the Sensor_Zenith_Angle member (in degrees) of the CRTM Geometry type (see section 4.6.3 of the CRTM User Guide). Afterwards you can call the CRTM_Forward function to re-run the radiative transfer calculations. So you don’t have to specify the sensor zenith angle or any other atmospheric data in the load_atm_data.inc file.