[Dart-dev] DART/branches Revision: 12836

dart at ucar.edu dart at ucar.edu
Thu Sep 20 10:58:28 MDT 2018


nancy at ucar.edu
2018-09-20 10:58:28 -0600 (Thu, 20 Sep 2018)
112
temporarily add the example code from the rttov
distribution, and a sample data table that's used
by the code.




Added: DART/branches/radiance/observations/forward_operators/radiance_fwd_example.F90
===================================================================
--- DART/branches/radiance/observations/forward_operators/radiance_fwd_example.F90	                        (rev 0)
+++ DART/branches/radiance/observations/forward_operators/radiance_fwd_example.F90	2018-09-20 16:58:28 UTC (rev 12836)
@@ -0,0 +1,561 @@
+! example call to the forward operator for radiances.
+! needs rttov libs, include files.
+! needs to be preprocessed.
+
+! Description:
+!> @file
+!!   Example calling direct model clear-sky simulation.
+!
+!> @brief
+!!   Example calling direct model clear-sky simulation.
+!!
+!! @details
+!!   This example is most easily run using the run_example_fwd.sh
+!!   script (see the user guide).
+!!
+!!   This program requires the following files:
+!!     the file containing input profiles (e.g. prof.dat)
+!!     the RTTOV optical depth coefficient file
+!!
+!!   The output is written to a file called example_fwd_output.dat
+!!
+!!   This program demonstrates the most simple kind of RTTOV simulation.
+!!
+!!   You may wish to base your own code on this example in which case you
+!!   should edit in particular the sections of code marked as follows:
+!!       !================================
+!!       !======Read =====start===========
+!!            code to be modified
+!!       !======Read ===== end ===========
+!!       !================================
+!!
+!
+! Copyright:
+!    This software was developed within the context of
+!    the EUMETSAT Satellite Application Facility on
+!    Numerical Weather Prediction (NWP SAF), under the
+!    Cooperation Agreement dated 25 November 1998, between
+!    EUMETSAT and the Met Office, UK, by one or more partners
+!    within the NWP SAF. The partners in the NWP SAF are
+!    the Met Office, ECMWF, KNMI and MeteoFrance.
+!
+!    Copyright 2017, EUMETSAT, All Rights Reserved.
+!
+PROGRAM example_fwd
+
+  ! rttov_const contains useful RTTOV constants
+  USE rttov_const, ONLY :     &
+         errorstatus_success, &
+         errorstatus_fatal,   &
+         platform_name,       &
+         inst_name
+
+  ! rttov_types contains definitions of all RTTOV data types
+  USE rttov_types, ONLY :     &
+         rttov_options,       &
+         rttov_coefs,         &
+         rttov_profile,       &
+         rttov_transmission,  &
+         rttov_radiance,      &
+         rttov_chanprof,      &
+         rttov_emissivity,    &
+         rttov_reflectance
+
+  ! jpim, jprb and jplm are the RTTOV integer, real and logical KINDs
+  USE parkind1, ONLY : jpim, jprb, jplm
+
+  USE rttov_unix_env, ONLY : rttov_exit
+
+  IMPLICIT NONE
+
+#include "rttov_direct.interface"
+#include "rttov_parallel_direct.interface"
+#include "rttov_read_coefs.interface"
+#include "rttov_dealloc_coefs.interface"
+#include "rttov_alloc_direct.interface"
+#include "rttov_user_options_checkinput.interface"
+#include "rttov_print_opts.interface"
+#include "rttov_print_profile.interface"
+#include "rttov_skipcommentline.interface"
+
+  !--------------------------
+  !
+  INTEGER(KIND=jpim), PARAMETER :: iup   = 20   ! unit for input profile file
+  INTEGER(KIND=jpim), PARAMETER :: ioout = 21   ! unit for output
+
+  ! RTTOV variables/structures
+  !====================
+  TYPE(rttov_options)              :: opts                     ! Options structure
+  TYPE(rttov_coefs)                :: coefs                    ! Coefficients structure
+  TYPE(rttov_chanprof),    POINTER :: chanprof(:)    => NULL() ! Input channel/profile list
+  LOGICAL(KIND=jplm),      POINTER :: calcemis(:)    => NULL() ! Flag to indicate calculation of emissivity within RTTOV
+  TYPE(rttov_emissivity),  POINTER :: emissivity(:)  => NULL() ! Input/output surface emissivity
+  LOGICAL(KIND=jplm),      POINTER :: calcrefl(:)    => NULL() ! Flag to indicate calculation of BRDF within RTTOV
+  TYPE(rttov_reflectance), POINTER :: reflectance(:) => NULL() ! Input/output surface BRDF
+  TYPE(rttov_profile),     POINTER :: profiles(:)    => NULL() ! Input profiles
+  TYPE(rttov_transmission)         :: transmission             ! Output transmittances


More information about the Dart-dev mailing list