next up previous contents
Next: Example 2: DGESV_F90 revisited Up: A.1 Documenting Conventions Previous: Prologue Keywords:

Example 1: ATESS Routine

A simple example of a ProTeX prologue for a routine which is used in ATESS is depicted in Table 6.

 

!-------------------------------------------------------------------------
!         NASA/GSFC, Data Assimilation Office, Code 910.3, GEOS/DAS      !
!-------------------------------------------------------------------------
!BOP
!
! !ROUTINE:  ATESS_RunMeans() --- Update current estimates of O-F grids
! 
! !INTERFACE:
!
      subroutine ATESS_RunMeans ( delgrid_ifname, 
     .                            bias_raob, rtms_raob, nobs_raob,
     .                            bias_tovs, rtms_tovs, nobs_tovs,
     .                            nsyn_raob, nsyn_tovs )

! !USES:

      Use config                            ! System wide configuration
      Use m_inpak                           ! Resource files

! !INPUT PARAMETERS: 
!
      Implicit NONE
      include 'atess_dim.h'                 ! Dimension of grids

      character*(255)   delgrid_ifname      ! Name of the input file 

                                            ! Radiosonde height O-F grids:
      real   bias_raob(idm,jdm,kdm,ldm)     !   Time mean
      real   rtms_raob(idm,jdm,kdm,ldm)     !   Root time mean square
      real   nobs_raob(idm,jdm,kdm,ldm)     !   No. obs per gridbox

                                            ! NESDIS TOVS A/B height O-F Grids
      real   bias_tovs(idm,jdm,kdm,ldm)     !   Time mean
      real   rtms_tovs(idm,jdm,kdm,ldm)     !   Root time mean square
      real   nobs_tovs(idm,jdm,kdm,ldm)     !   No. obs per gridbox

      integer   nsyn_raob                   ! Number of synoptic times
                                            !  in the computation of 
                                            !  radiosonde grids.

      integer   nsyn_tovs                   ! Number of synoptic times used
                                            !  in the computation of 
                                            !  TOVS grids.

! !OUTPUT PARAMETERS:
!
!     The O-F grids  bias_raob, rtms_raob, nobs_raob, bias_tovs, rtms_tovs, 
!  and nobs_tovs are re-written with the updated values.
!
! !DESCRIPTION: This routine reads previous estimates of O-F grids from
!               disk and updates them according to the new estimates
!  given on input, which are generally computed with a much smaller sample
!  (1 or 2 days, say). Denote by $\overline{\delta}_{old}$ the current
!  estimate of the time-mean innovation, and by $\delta$ a small sample
!  estimate (sample size $N_{syn}$). The updated time-mean innovation
!  $\overline{\delta}_{new}$ is given by
!  $$
!       \overline{\delta}_{new} :=  (1-\eta)\overline{\delta}_{old} 
!                                   + \eta \delta
!  $$
!  where $\eta = N_{syn}/N_* $, and $N_*$ is the number of synoptic
!  times in the ``running-mean'' window.
!
! !FILES USED:  
!
!     The O-F grid files on input are opened, read from and closed
!  on return. Routine i90_lua() is used to determine the temporary
!  logical unit numbers.
!
! !REVISION HISTORY: 
!
!  09Nov96  da Silva   Specification and prologue.
!
!EOP
!-------------------------------------------------------------------------
!BOC
      include 'stdio.h'

      write(stderr,*) 'It have NOT been written yet.'

      return
      end
!EOC

 
Table: An example of a ProTeX prologue in a Fortran90 subroutine. The code has been taken from the data assimilation software at the DAO.



Will Sawyer
Fri Mar 6 18:02:18 EST 1998