[Dart-dev] DART/branches Revision: 12970
dart at ucar.edu
dart at ucar.edu
Tue Feb 5 11:42:22 MST 2019
hendric at ucar.edu
2019-02-05 11:42:22 -0700 (Tue, 05 Feb 2019)
191
reading profile data from a file and replicating results from the example
rttov122/rttov_test/run_example_fwd.sh
currently the code is running and seems to be giving the correct results.
Modified: DART/branches/radiance/observations/forward_operators/obs_def_rttov_mod.f90
===================================================================
--- DART/branches/radiance/observations/forward_operators/obs_def_rttov_mod.f90 2019-02-05 18:38:13 UTC (rev 12969)
+++ DART/branches/radiance/observations/forward_operators/obs_def_rttov_mod.f90 2019-02-05 18:42:22 UTC (rev 12970)
@@ -79,6 +79,8 @@
dart_rttov_do_forward_model, &
dart_rttov_takedown ! unused at present?
+use parkind1, only : jpim, jprb, jplm
+
implicit none
private
@@ -142,11 +144,28 @@
! JPH, namelist for which channels to use and how many model levels there are
! see GPS module
-integer :: model_levels
-integer :: channel_list(1) = 1
+INTEGER(KIND=jpim), PARAMETER :: maxchannels = 3
-namelist / obs_def_rttov_nml/ channel_list, model_levels
+ ! variables for input
+ !====================
+CHARACTER(LEN=256) :: coef_filename = 'rtcoef_eos_2_amsua.dat'
+CHARACTER(LEN=256) :: prof_filename = 'prof.dat'
+INTEGER(KIND=jpim) :: nprof = 1
+INTEGER(KIND=jpim) :: dosolar = 0
+INTEGER(KIND=jpim) :: nlevels = 51
+INTEGER(KIND=jpim) :: nchannels = 3
+INTEGER(KIND=jpim) :: channel_list(maxchannels)
+INTEGER(KIND=jpim) :: nthreads = 1
+namelist / obs_def_rttov_nml/ coef_filename, &
+ prof_filename, &
+ nprof, &
+ nlevels, &
+ dosolar, &
+ nchannels, &
+ channel_list, &
+ nthreads
+
contains
@@ -155,7 +174,10 @@
subroutine initialize_module
integer :: istatus
+integer :: ios
+print*, 'initialize_module'
+
call register_module(source, revision, revdate)
module_initialized = .true.
@@ -184,11 +206,24 @@
if (do_nml_file()) write(nmlfileunit, nml=obs_def_rttov_nml)
if (do_nml_term()) write( * , nml=obs_def_rttov_nml)
-print*, 'dart_rttov_setup'
-call dart_rttov_setup(nprofiles=2, nchannels=1, channel_list=channel_list, &
- nlevels=model_levels, level_list=1, error_status=istatus)
-!call exit(0)
+print*, 'coef_filename - ', trim(coef_filename)
+print*, 'prof_filename - ', trim(prof_filename)
+print*, 'nprof - ', nprof
+print*, 'nlevels - ', nlevels
+print*, 'dosolar - ', dosolar
+print*, 'nchannels - ', nchannels
+print*, 'nthreads - ', nthreads
+print*, ' '
+print*, 'initialize_module::dart_rttov_setup'
+call dart_rttov_setup(coef_file=coef_filename, &
+ prof_file=prof_filename, &
+ nprofs=nprof, &
+ nlevs=nlevels, &
+ nchans=nchannels, &
+ chan_list=channel_list(1:nchannels), &
+ error_status=istatus)
+
end subroutine initialize_module
!----------------------------------------------------------------------
@@ -301,6 +336,7 @@
! The oldkey is thrown away.
+print*, 'set_rttov_metadata', key, sat_az, sat_ze, sun_az, sun_ze, platform, sat_id, sensor, channel
! Store the metadata in module storage. The new key is returned.
call set_rttov_metadata(key, sat_az, sat_ze, sun_az, sun_ze, platform, sat_id, sensor, channel)
@@ -331,10 +367,10 @@
is_asciifile = ascii_file_format(fform)
if (is_asciifile) then
- write(*, *) 'rttovSTRING', trim(rttovSTRING)
- write(*, *) 'sat_az, sat_ze, sun_az, sun_ze', sat_az, sat_ze, sun_az, sun_ze
- write(*, *) 'platform, sat_id, sensor, channel', platform, sat_id, sensor, channel
- write(*, *) 'key', key
More information about the Dart-dev
mailing list