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.
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
Before you attempt this build, you need to download the ecbuild tool from here:
and add the
ecbuild/bin/ folder to your
In order to build the CRTM using ecbuild, create a build directory and call ecbuild from there:
After the ecbuild configuration has finished, you can build the CRTM with
make and run the ctests:
Hope this helps,
I am trying to install CRTM 2.4.0. I am getting an error while running
make check in
/crtm/src/Build/libsrc/ I am getting the following error.
Based on the error I believe linker files in
/usr/bin/ld are not able to link with
libcrtm.a file. Am I correct? How can I solve this error?
Thanks a lot,
Was the libcrtm.a file created, or perhaps a libcrtm.so file?
Yes, libcrtm.a file is created.
What was the command you used to obtain the CRTM v2.4.0 release? (e.g., git clone https://github.com/JCSDA/crtm ?)
Looks like you’re missing the link to your netCDF library.
Yes, I used
git clone https://github.com/JCSDA/crtm
Could you please guide me on how can I link the netCDF library to solve the error?
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
I have found these .mod files in netCDF folder.
Are they all libcrtm.a need to link?
How can I link them during
Thanks a lot.
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?
I have the following modules. When I run
module load netcdf-f-4.5.3 it is not able to find module files.
module load netcdf-c-4.7.4 works fine.
Can you guide me where I can find .mod files you mentioned previously?
Thanks a lot.
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
message(FATAL_ERROR "netCDF library not found!")
# try either this:
# or this:
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.
No problem, glad it works.
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.
Thanks a lot.
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.
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
v.abi_gr don’t have the same length.
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.
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.
No problem. Regarding your questions:
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
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