NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
189 stars 142 forks source link

bug: obs_def_rttov13_mod.f90 does not have public get_channel #532

Closed hkershaw-brown closed 11 months ago

hkershaw-brown commented 1 year ago

Describe the bug

  1. List the steps someone needs to take to reproduce the bug.

try and compile radiance_obs_seq_to_netcdf rttov13

cd DART/wrf/work
input.nml &prerpocess add 
   obs_type_files       =  ../../../observations/forward_operators/obs_def_rttov13_mod.f90
   quantity_files       = '../../../assimilation_code/modules/observations/default_quantities_mod.f90'

module load mkl
mkmf.template: RTTOV = /glade/p/cisl/dares/rttov13_ifort
                           RTTOV_VERSION = 13

./quickbuild.sh radiance_obs_seq_to_netcdf
  1. What was the expected outcome? successful compile

  2. What actually happened?
    did not compile

Error Message

/glade/scratch/hkershaw/DART/Bugs/rttov/DART/assimilation_code/programs/radiance_obs_seq_to_netcdf/radiance_obs_seq_to_netcdf.f90(35): error #6580: Name in only-list does not exist or is not accessible.   [GET_CHANNEL]
use obs_def_rttov_mod, only : get_channel
------------------------------^
/glade/scratch/hkershaw/DART/Bugs/rttov/DART/assimilation_code/programs/radiance_obs_seq_to_netcdf/radiance_obs_seq_to_netcdf.f90(506): error #6404: This name does not have a type, and must have an explicit type.   [GET_CHANNEL]
         my_channel  = get_channel(flavor,obs_key)
-----------------------^
compilation aborted for /glade/scratch/hkershaw/DART/Bugs/rttov/DART/assimilation_code/programs/radiance_obs_seq_to_netcdf/radiance_obs_seq_to_netcdf.f90 (code 1)
Makefile:12: recipe for target 'radiance_obs_seq_to_netcdf.o' failed
make: *** [radiance_obs_seq_to_netcdf.o] Error 1

Which model(s) are you working with?

WRF

Version of DART

v10.8.3

Have you modified the DART code?

No

Build information

Please describe:

  1. Cheyenne
  2. intel

Fix:

@@ -397,7 +397,8 @@ public ::         set_visir_metadata, &
                 write_rttov_metadata, &
           interactive_rttov_metadata, &
                get_expected_radiance, &
-            get_rttov_option_logical
+            get_rttov_option_logical, &
+                         get_channel

wider fix: add radiance_to_obs_seq_netcdf to build tests.

hkershaw-brown commented 1 year ago

You'll need to compile dart with the rttov library:

Use mkmf.template.rttov.intel as your mkmf template

cp mkmf.template.rttov.intel mkmf.template

Edit mkmf.template:

Cheyenne: Set RTTOV=/glade/p/cisl/dares/rttov13_ifort RTTOV_VERSION = 13

If you run on Derecho, the rttov library location is: /glade/campaign/cisl/dares/libraries/rttov132_intel

You'll need to edit the LIBS variable in mkmf.template to match the newer version of the HDF5 library: change -lhdf5hl_fortran to -lhdf5_hl_fortran