> /ws3/menut/chimere/chimdev/WRFV3_cpl /ws3/menut/chimere/chimdev/WRFV3_cpl371
>                                                 
>=================================================================================
>  frame/module_cpl.F
>=================================================================================
MODULE module_cpl											MODULE module_cpl

   USE module_domain          , ONLY : domain, get_ijk_from_grid					   USE module_domain          , ONLY : domain, get_ijk_from_grid
   USE module_configure       , ONLY : grid_config_rec_type						   USE module_configure       , ONLY : grid_config_rec_type
   USE module_model_constants , ONLY : stbolt								   USE module_model_constants , ONLY : stbolt
   USE module_driver_constants, ONLY : max_domains, max_cplfld, max_extdomains				   USE module_driver_constants, ONLY : max_domains, max_cplfld, max_extdomains
   USE module_cpl_oasis3 										   USE module_cpl_oasis3 

   IMPLICIT NONE											   IMPLICIT NONE
   PRIVATE												   PRIVATE

   PUBLIC cpl_init											   PUBLIC cpl_init
   PUBLIC cpl_set_dm_communicator									   PUBLIC cpl_set_dm_communicator
   PUBLIC cpl_defdomain											   PUBLIC cpl_defdomain
   PUBLIC cpl_settime											   PUBLIC cpl_settime
   PUBLIC cpl_snd											   PUBLIC cpl_snd
   PUBLIC cpl_rcv											   PUBLIC cpl_rcv
   PUBLIC cpl_rcv2											   PUBLIC cpl_rcv2
   PUBLIC cpl_store_input										   PUBLIC cpl_store_input
   PUBLIC cpl_finalize											   PUBLIC cpl_finalize
   PUBLIC cpl_abort											   PUBLIC cpl_abort

#ifdef key_cpp_oasis3											#ifdef key_cpp_oasis3
   LOGICAL     , PARAMETER, PUBLIC :: coupler_on = .TRUE.						   LOGICAL     , PARAMETER, PUBLIC :: coupler_on = .TRUE.
   CHARACTER(5), PARAMETER         :: coupler_name = 'oasis'						   CHARACTER(5), PARAMETER         :: coupler_name = 'oasis'
#else													#else
   LOGICAL     , PARAMETER, PUBLIC :: coupler_on = .FALSE.						   LOGICAL     , PARAMETER, PUBLIC :: coupler_on = .FALSE.
   CHARACTER(4), PARAMETER         :: coupler_name = 'none'						   CHARACTER(4), PARAMETER         :: coupler_name = 'none'
#endif													#endif
#ifdef cpl_wrf_nemo											#ifdef cpl_wrf_nemo
   LOGICAL     , PARAMETER, PUBLIC :: wrf_nemo = .TRUE.							   LOGICAL     , PARAMETER, PUBLIC :: wrf_nemo = .TRUE.
#else													#else
   LOGICAL     , PARAMETER, PUBLIC :: wrf_nemo = .FALSE.						   LOGICAL     , PARAMETER, PUBLIC :: wrf_nemo = .FALSE.
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
   LOGICAL     , PARAMETER, PUBLIC :: wrf_chimere = .TRUE.						   LOGICAL     , PARAMETER, PUBLIC :: wrf_chimere = .TRUE.
#else													#else
   LOGICAL     , PARAMETER, PUBLIC :: wrf_chimere = .FALSE.						   LOGICAL     , PARAMETER, PUBLIC :: wrf_chimere = .FALSE.
#endif													#endif
   INTEGER :: nsecrun             ! current time in seconds since simulation restart			   INTEGER :: nsecrun             ! current time in seconds since simulation restart
   INTEGER, PARAMETER :: charlen = 64									   INTEGER, PARAMETER :: charlen = 64
   CHARACTER(charlen), DIMENSION(max_domains,max_extdomains,max_cplfld) :: rcvname, sndname   !    |	   ! coupling fields names for each nest
												   >	   CHARACTER(charlen), DIMENSION(max_domains,max_extdomains,max_cplfld) :: rcvname, sndname   

   CHARACTER(256) :: cltxt        ! messages or debug string						   CHARACTER(256) :: cltxt        ! messages or debug string
   INTEGER :: nlevdbg  = 1        ! verbosity level							   INTEGER :: nlevdbg  = 1        ! verbosity level
   INTEGER :: nlevdbg2 = 10       ! verbosity level							   INTEGER :: nlevdbg2 = 10       ! verbosity level

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
   INCLUDE 'mpif.h'               ! only for MPI_COMM_NULL						   INCLUDE 'mpif.h'               ! only for MPI_COMM_NULL
#else													#else
   INTEGER :: MPI_COMM_NULL = -1  ! define a fake (and not used) MPI_COMM_NULL, so it is compili	   INTEGER :: MPI_COMM_NULL = -1  ! define a fake (and not used) MPI_COMM_NULL, so it is compili
#endif													#endif

   ! Structure containing all necesary namcouple info.							   ! Structure containing all necesary namcouple info.
   TYPE(NAMCOUPLE_TYPE)  :: namcouple_info								   TYPE(NAMCOUPLE_TYPE)  :: namcouple_info

   CHARACTER(len=256)    :: namcouple_file   ! Path to the namcouple file				   CHARACTER(len=256)    :: namcouple_file   ! Path to the namcouple file
   INTEGER               :: crank, ierr, ifield								   INTEGER               :: crank, ierr, ifield

CONTAINS												CONTAINS

   SUBROUTINE cpl_init( kl_comm ) 									   SUBROUTINE cpl_init( kl_comm ) 
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  ROUTINE cpl_init  ***								      !!             ***  ROUTINE cpl_init  ***
      !!												      !!
      !! ** Purpose :   initialise coupling field names and WRF-coupler MPI communications		      !! ** Purpose :   initialise coupling field names and WRF-coupler MPI communications
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER, INTENT(OUT) :: kl_comm       ! local MPI communicator of the model			      INTEGER, INTENT(OUT) :: kl_comm       ! local MPI communicator of the model
      !													      !
      INTEGER       :: jwrf,jext,jfld       ! local loop indicees					      INTEGER       :: jwrf,jext,jfld       ! local loop indicees
      CHARACTER( 3) :: clwrfdom, clextdom   ! d<domain>							      CHARACTER( 3) :: clwrfdom, clextdom   ! d<domain>
      CHARACTER(16) :: clprefix             ! 'WRF_d??_EXT_d??_'					      CHARACTER(16) :: clprefix             ! 'WRF_d??_EXT_d??_'
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      ! coupling field name default definition								      ! coupling field name default definition
      rcvname(:,:,:) = 'not defined'									      rcvname(:,:,:) = 'not defined'
      sndname(:,:,:) = 'not defined'									      sndname(:,:,:) = 'not defined'
      													      
      IF (wrf_nemo) THEN										      IF (wrf_nemo) THEN
         ! we could imagine to define rcvname and sndname through the namelist...			         ! we could imagine to define rcvname and sndname through the namelist...
         ! define all possible coupling names with _d<domain> of WRF and the external model(s)		         ! define all possible coupling names with _d<domain> of WRF and the external model(s)
         DO jext = 1, max_extdomains									         DO jext = 1, max_extdomains
            												            
            WRITE(clextdom, fmt="('d',i2.2)") jext							            WRITE(clextdom, fmt="('d',i2.2)") jext
            												            
            DO jwrf = 1, max_domains									            DO jwrf = 1, max_domains
               												               
               WRITE(clwrfdom, fmt="('d',i2.2)") jwrf          						               WRITE(clwrfdom, fmt="('d',i2.2)") jwrf          
               ! do not change following syntaxe as it is used in routines bellow 			               ! do not change following syntaxe as it is used in routines bellow 
               clprefix = 'WRF_'//clwrfdom//'_EXT_'//clextdom//'_' 					               clprefix = 'WRF_'//clwrfdom//'_EXT_'//clextdom//'_' 
               												               
               ! Variables that can be received by WRF							               ! Variables that can be received by WRF
               rcvname(jwrf,jext,1) = clprefix//'SST' ! receive Sea surface temperature			               rcvname(jwrf,jext,1) = clprefix//'SST' ! receive Sea surface temperature
               rcvname(jwrf,jext,2) = clprefix//'UOCE' ! receive ocean zonal surface current 		               rcvname(jwrf,jext,2) = clprefix//'UOCE' ! receive ocean zonal surface current 
               rcvname(jwrf,jext,3) = clprefix//'VOCE' ! receive ocean meridional surface curren	               rcvname(jwrf,jext,3) = clprefix//'VOCE' ! receive ocean meridional surface curren
               												               
               ! Variables that can be sent by WRF							               ! Variables that can be sent by WRF
               sndname(jwrf,jext,1) = clprefix//'EVAP-PRECIP' ! send net fresh water budget: eva   |	               sndname(jwrf,jext,1) = clprefix//'EVAP-PRECIP' ! send net fresh water budget: eva
               sndname(jwrf,jext,2) = clprefix//'SURF_NET_SOLAR' ! send net short wave flux at g	               sndname(jwrf,jext,2) = clprefix//'SURF_NET_SOLAR' ! send net short wave flux at g
               sndname(jwrf,jext,3) = clprefix//'SURF_NET_NON-SOLAR' ! send net non-solar heat f	               sndname(jwrf,jext,3) = clprefix//'SURF_NET_NON-SOLAR' ! send net non-solar heat f
               sndname(jwrf,jext,4) = clprefix//'TAUX' ! send zonal wind tress at atmosphere-oce	               sndname(jwrf,jext,4) = clprefix//'TAUX' ! send zonal wind tress at atmosphere-oce
               sndname(jwrf,jext,5) = clprefix//'TAUY' ! send meridional wind tress at atmospher	               sndname(jwrf,jext,5) = clprefix//'TAUY' ! send meridional wind tress at atmospher
               sndname(jwrf,jext,6) = clprefix//'TAUMOD' ! send the wind tress module at atmosph	               sndname(jwrf,jext,6) = clprefix//'TAUMOD' ! send the wind tress module at atmosph
               												               
            END DO											            END DO
         END DO												         END DO
      END IF												      END IF

      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_init( kl_comm ) 					      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_init( kl_comm ) 

      IF (wrf_chimere) THEN										      IF (wrf_chimere) THEN
         CALL mpi_comm_rank(kl_comm,crank,ierr)								         CALL mpi_comm_rank(kl_comm,crank,ierr)

         IF (crank == 0) THEN										         IF (crank == 0) THEN
            ! Read namcouple file									            ! Read namcouple file
            CALL cpl_oasis_read_namcouple(namcouple_info)						            CALL cpl_oasis_read_namcouple(namcouple_info)
         END IF												         END IF

         ! Allocate and broadcast parameters to other processors.					         ! Allocate and broadcast parameters to other processors.
         CALL mpi_bcast(namcouple_info%nfields,1,MPI_INTEGER,0,kl_comm,ierr)				         CALL mpi_bcast(namcouple_info%nfields,1,MPI_INTEGER,0,kl_comm,ierr)

         IF (.NOT. ALLOCATED(namcouple_info%source_grid)) ALLOCATE(namcouple_info%source_grid(na	         IF (.NOT. ALLOCATED(namcouple_info%source_grid)) ALLOCATE(namcouple_info%source_grid(na
         CALL mpi_bcast(namcouple_info%source_grid,namcouple_info%nfields*4,MPI_CHARACTER,0,kl_c	         CALL mpi_bcast(namcouple_info%source_grid,namcouple_info%nfields*4,MPI_CHARACTER,0,kl_c

         IF (.NOT. ALLOCATED(namcouple_info%target_grid)) ALLOCATE(namcouple_info%target_grid(na	         IF (.NOT. ALLOCATED(namcouple_info%target_grid)) ALLOCATE(namcouple_info%target_grid(na
         CALL mpi_bcast(namcouple_info%target_grid,namcouple_info%nfields*4,MPI_CHARACTER,0,kl_c	         CALL mpi_bcast(namcouple_info%target_grid,namcouple_info%nfields*4,MPI_CHARACTER,0,kl_c

         IF (.NOT. ALLOCATED(namcouple_info%send_variables)) ALLOCATE(namcouple_info%send_variab	         IF (.NOT. ALLOCATED(namcouple_info%send_variables)) ALLOCATE(namcouple_info%send_variab
         CALL mpi_bcast(namcouple_info%send_variables,namcouple_info%nfields*128,MPI_CHARACTER,0	         CALL mpi_bcast(namcouple_info%send_variables,namcouple_info%nfields*128,MPI_CHARACTER,0

         IF (.NOT. ALLOCATED(namcouple_info%recv_variables)) ALLOCATE(namcouple_info%recv_variab	         IF (.NOT. ALLOCATED(namcouple_info%recv_variables)) ALLOCATE(namcouple_info%recv_variab
         CALL mpi_bcast(namcouple_info%recv_variables,namcouple_info%nfields*128,MPI_CHARACTER,0	         CALL mpi_bcast(namcouple_info%recv_variables,namcouple_info%nfields*128,MPI_CHARACTER,0

         IF (.NOT. ALLOCATED(namcouple_info%coupling_freq)) ALLOCATE(namcouple_info%coupling_fre	         IF (.NOT. ALLOCATED(namcouple_info%coupling_freq)) ALLOCATE(namcouple_info%coupling_fre
         CALL mpi_bcast(namcouple_info%coupling_freq,namcouple_info%nfields,MPI_INTEGER,0,kl_com	         CALL mpi_bcast(namcouple_info%coupling_freq,namcouple_info%nfields,MPI_INTEGER,0,kl_com

         ! Define coupling names with _d<domain> of WRF and the external model(s)			         ! Define coupling names with _d<domain> of WRF and the external model(s)
         DO ifield=1,namcouple_info%nfields								         DO ifield=1,namcouple_info%nfields
            ! Variables that are sent by WRF.								            ! Variables that are sent by WRF.
            IF (namcouple_info%source_grid(ifield)(1:3) == 'wrf') THEN					            IF (namcouple_info%source_grid(ifield)(1:3) == 'wrf') THEN
               sndname(1,1,ifield) = TRIM(namcouple_info%send_variables(ifield))			               sndname(1,1,ifield) = TRIM(namcouple_info%send_variables(ifield))
            END IF											            END IF

            ! Variables that are received by WRF.							            ! Variables that are received by WRF.
            IF (namcouple_info%target_grid(ifield)(1:3) == 'wrf') THEN					            IF (namcouple_info%target_grid(ifield)(1:3) == 'wrf') THEN
               rcvname(1,1,ifield) = TRIM(namcouple_info%recv_variables(ifield))			               rcvname(1,1,ifield) = TRIM(namcouple_info%recv_variables(ifield))
            END IF											            END IF
         END DO												         END DO
      END IF												      END IF
      													      
   END SUBROUTINE cpl_init										   END SUBROUTINE cpl_init
   													   

   SUBROUTINE cpl_set_dm_communicator( kdm_comm )							   SUBROUTINE cpl_set_dm_communicator( kdm_comm )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_initquilt  ***							      !!             ***  SUBROUTINE cpl_initquilt  ***
      !!												      !!
      !! ** Purpose : provide the computing nodes communicator to the coupler				      !! ** Purpose : provide the computing nodes communicator to the coupler
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER, INTENT(IN) :: kdm_comm       ! MPI communicator between the computing nodes		      INTEGER, INTENT(IN) :: kdm_comm       ! MPI communicator between the computing nodes
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      IF ( coupler_name == 'oasis' ) THEN 								      IF ( coupler_name == 'oasis' ) THEN 
         IF ( kdm_comm == MPI_COMM_NULL ) THEN								         IF ( kdm_comm == MPI_COMM_NULL ) THEN
            CALL cpl_oasis_define( sndname, rcvname, namcouple_info )   ! define io_quilting to 	            CALL cpl_oasis_define( sndname, rcvname, namcouple_info )   ! define io_quilting to 
         ELSE												         ELSE
            CALL cpl_oasis_def_dmcomm( kdm_comm )       ! send the computing nodes communicator 	            CALL cpl_oasis_def_dmcomm( kdm_comm )       ! send the computing nodes communicator 
         END IF												         END IF
      END IF												      END IF

   END SUBROUTINE cpl_set_dm_communicator								   END SUBROUTINE cpl_set_dm_communicator


   SUBROUTINE cpl_defdomain( grid, nbin )								   SUBROUTINE cpl_defdomain( grid, nbin )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_defdomain  ***							      !!             ***  SUBROUTINE cpl_defdomain  ***
      !!												      !!
      !! ** Purpose : define each variable involved in the coupling and the grid partitioning		      !! ** Purpose : define each variable involved in the coupling and the grid partitioning
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      TYPE(domain), INTENT(IN), POINTER ::   grid							      TYPE(domain), INTENT(IN), POINTER ::   grid
      INTEGER, INTENT(IN), OPTIONAL     ::   nbin							      INTEGER, INTENT(IN), OPTIONAL     ::   nbin
      !													      !
      INTEGER :: jwrf,jext,jfld          ! local loop indicees						      INTEGER :: jwrf,jext,jfld          ! local loop indicees
      REAL    :: zmin,zmax               ! min/max of grid*cplmask					      REAL    :: zmin,zmax               ! min/max of grid*cplmask
      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor				      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor
      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 			      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 
      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension						      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
#if (EM_CORE == 1)											#if (EM_CORE == 1)

      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &					      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &
         &                          ims, ime, jms, jme, kms, kme, &					         &                          ims, ime, jms, jme, kms, kme, &
         &                          ips, ipe, jps, jpe, kps, kpe  )					         &                          ips, ipe, jps, jpe, kps, kpe  )

      ! first do some checks and prints. note that this could not be done in cpl_init			      ! first do some checks and prints. note that this could not be done in cpl_init
      ! which is called too early in the code								      ! which is called too early in the code

      ! some control prints on potential sent/received fields...					      ! some control prints on potential sent/received fields...
      CALL wrf_debug(nlevdbg, 'cpl_init: defined variables to be potentially received' )		      CALL wrf_debug(nlevdbg, 'cpl_init: defined variables to be potentially received' )
      DO jfld = 1, max_cplfld										      DO jfld = 1, max_cplfld
         DO jext = 1, grid%num_ext_model_couple_dom							         DO jext = 1, grid%num_ext_model_couple_dom
            DO jwrf = 1, grid%max_dom									            DO jwrf = 1, grid%max_dom
               IF( TRIM(sndname(jwrf,jext,jfld)) /= 'not defined' ) THEN				               IF( TRIM(sndname(jwrf,jext,jfld)) /= 'not defined' ) THEN
                  WRITE(cltxt,*) '   jwrf, jext, jfld: ', jwrf, jext, jfld ,' name: ', TRIM(sndn	                  WRITE(cltxt,*) '   jwrf, jext, jfld: ', jwrf, jext, jfld ,' name: ', TRIM(sndn
                  CALL wrf_debug(nlevdbg2, cltxt)							                  CALL wrf_debug(nlevdbg2, cltxt)
               END IF											               END IF
            END DO											            END DO
         END DO												         END DO
      END DO												      END DO
      CALL wrf_debug(nlevdbg, 'cpl_init: defined variables to be potentially sent' )			      CALL wrf_debug(nlevdbg, 'cpl_init: defined variables to be potentially sent' )
      DO jfld = 1, max_cplfld										      DO jfld = 1, max_cplfld
         DO jext = 1, grid%num_ext_model_couple_dom							         DO jext = 1, grid%num_ext_model_couple_dom
            DO jwrf = 1, grid%max_dom									            DO jwrf = 1, grid%max_dom
               IF( TRIM(rcvname(jwrf,jext,jfld)) /= 'not defined' ) THEN				               IF( TRIM(rcvname(jwrf,jext,jfld)) /= 'not defined' ) THEN
                  WRITE(cltxt,*) '   jwrf, jext, jfld: ', jwrf, jext, jfld ,' name: ', TRIM(rcvn	                  WRITE(cltxt,*) '   jwrf, jext, jfld: ', jwrf, jext, jfld ,' name: ', TRIM(rcvn
                  CALL wrf_debug(nlevdbg2, cltxt)							                  CALL wrf_debug(nlevdbg2, cltxt)
               END IF											               END IF
            END DO											            END DO
         END DO												         END DO
      END DO												      END DO
      													      
      ! some checks on grid%cplmask...									      ! some checks on grid%cplmask...
      DO jext = 1, grid%num_ext_model_couple_dom							      DO jext = 1, grid%num_ext_model_couple_dom

         WRITE(cltxt,*) 'checks on cplmask of external model domain: ', jext               ;   C	         WRITE(cltxt,*) 'checks on cplmask of external model domain: ', jext               ;   C

         zmin = MINVAL(grid%cplmask(ips:ipe,jext,jps:jpe))						         zmin = MINVAL(grid%cplmask(ips:ipe,jext,jps:jpe))
         IF( zmin < 0. ) THEN										         IF( zmin < 0. ) THEN
            WRITE(cltxt,*) 'min of external model domain cplmask: ',jext,' < 0. : ',zmin   ;   C	            WRITE(cltxt,*) 'min of external model domain cplmask: ',jext,' < 0. : ',zmin   ;   C
         END IF												         END IF
         WRITE(cltxt,*) '   minval(grid%cplmask(ips:ipe,jext,jps:jpe)): ', zmin            ;   C	         WRITE(cltxt,*) '   minval(grid%cplmask(ips:ipe,jext,jps:jpe)): ', zmin            ;   C

         zmax = MAXVAL(grid%cplmask(ips:ipe,jext,jps:jpe))						         zmax = MAXVAL(grid%cplmask(ips:ipe,jext,jps:jpe))
         IF( zmax > 1. ) THEN										         IF( zmax > 1. ) THEN
            WRITE(cltxt,*) 'max of external model domain cplmask: ',jext,' > 1. : ',zmax   ;   C	            WRITE(cltxt,*) 'max of external model domain cplmask: ',jext,' > 1. : ',zmax   ;   C
         END IF												         END IF
         IF( zmax == 0. ) THEN										         IF( zmax == 0. ) THEN
            WRITE(cltxt,*) 'max of external model domain cplmask: ',jext,' = 0 '           ;   C	            WRITE(cltxt,*) 'max of external model domain cplmask: ',jext,' = 0 '           ;   C
            WRITE(cltxt,*) '  => no coupling between this external model domain and this WRF pat	            WRITE(cltxt,*) '  => no coupling between this external model domain and this WRF pat
         END IF												         END IF
         WRITE(cltxt,*) '   maxval(grid%cplmask(ips:ipe,jext,jps:jpe)): ', zmax            ;   C	         WRITE(cltxt,*) '   maxval(grid%cplmask(ips:ipe,jext,jps:jpe)): ', zmax            ;   C

      END DO												      END DO
#endif       												#endif       
     													     
#ifdef cpl_wrf_chimere 											#ifdef cpl_wrf_chimere 
      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_define( sndname, rcvname, namcouple_info, gr	      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_define( sndname, rcvname, namcouple_info, gr
#else													#else
      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_define( sndname, rcvname, namcouple_info, gr	      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_define( sndname, rcvname, namcouple_info, gr
#endif													#endif

   END SUBROUTINE cpl_defdomain										   END SUBROUTINE cpl_defdomain


   SUBROUTINE cpl_settime( psec )									   SUBROUTINE cpl_settime( psec )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_settime  ***							      !!             ***  SUBROUTINE cpl_settime  ***
      !!												      !!
      !! ** Purpose :   update and store the number of second since the beginning of the job.  		      !! ** Purpose :   update and store the number of second since the beginning of the job.  
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      REAL, INTENT(in) :: psec										      REAL, INTENT(in) :: psec
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      nsecrun = NINT( psec )										      nsecrun = NINT( psec )
      WRITE(cltxt,*) 'store number of second since the beginning of the job: ', nsecrun   ;   CA	      WRITE(cltxt,*) 'store number of second since the beginning of the job: ', nsecrun   ;   CA

   END SUBROUTINE cpl_settime										   END SUBROUTINE cpl_settime


   FUNCTION cpl_toreceive( kdomwrf, kdomext, kfldid )							   FUNCTION cpl_toreceive( kdomwrf, kdomext, kfldid )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  FUNCTION cpl_toreceive  ***							      !!             ***  FUNCTION cpl_toreceive  ***
      !!												      !!
      !! ** Purpose :   send back a logical to tell if a variable must be received or not		      !! ** Purpose :   send back a logical to tell if a variable must be received or not
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER, INTENT(IN) :: kdomwrf   ! wrf domain index						      INTEGER, INTENT(IN) :: kdomwrf   ! wrf domain index
      INTEGER, INTENT(IN) :: kdomext   ! external model domain index					      INTEGER, INTENT(IN) :: kdomext   ! external model domain index
      INTEGER, INTENT(IN) :: kfldid    ! field index							      INTEGER, INTENT(IN) :: kfldid    ! field index
      !													      !
      LOGICAL :: cpl_toreceive										      LOGICAL :: cpl_toreceive
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      IF ( coupler_name == 'oasis' ) cpl_toreceive = cpl_oasis_toreceive( kdomwrf, kdomext, kfld	      IF ( coupler_name == 'oasis' ) cpl_toreceive = cpl_oasis_toreceive( kdomwrf, kdomext, kfld

   END FUNCTION cpl_toreceive										   END FUNCTION cpl_toreceive


   FUNCTION cpl_tosend( kdomwrf, kfldid, max_edom )							   FUNCTION cpl_tosend( kdomwrf, kfldid, max_edom )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  FUNCTION cpl_tosend  ***							      !!             ***  FUNCTION cpl_tosend  ***
      !!												      !!
      !! ** Purpose :   send back a logical array to tell if a variable must be				      !! ** Purpose :   send back a logical array to tell if a variable must be
      !!                sent or not to each of the external model domains				      !!                sent or not to each of the external model domains
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER, INTENT(IN) :: kdomwrf   ! wrf domain index						      INTEGER, INTENT(IN) :: kdomwrf   ! wrf domain index
      INTEGER, INTENT(IN) :: kfldid    ! variable index							      INTEGER, INTENT(IN) :: kfldid    ! variable index
      INTEGER, INTENT(IN) :: max_edom  ! max number of external model domains				      INTEGER, INTENT(IN) :: max_edom  ! max number of external model domains
      !													      !
      LOGICAL,DIMENSION(max_edom) :: cpl_tosend								      LOGICAL,DIMENSION(max_edom) :: cpl_tosend
      INTEGER                     :: jext          ! local loop indicees				      INTEGER                     :: jext          ! local loop indicees
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      DO jext = 1, max_edom										      DO jext = 1, max_edom
         IF ( coupler_name == 'oasis' )   cpl_tosend(jext) = cpl_oasis_tosend( kdomwrf, jext, kf	         IF ( coupler_name == 'oasis' )   cpl_tosend(jext) = cpl_oasis_tosend( kdomwrf, jext, kf
      END DO												      END DO
      													      
   END FUNCTION cpl_tosend										   END FUNCTION cpl_tosend


   FUNCTION cpl_get_fldid( cdsuffix )									   FUNCTION cpl_get_fldid( cdsuffix )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_get_fldid  ***							      !!             ***  SUBROUTINE cpl_get_fldid  ***
      !!												      !!
      !! ** Purpose : send back the field id corresponding to the suffix of a coupling variable 	      !! ** Purpose : send back the field id corresponding to the suffix of a coupling variable 
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      CHARACTER(*), INTENT(IN) :: cdsuffix   ! field name suffix					      CHARACTER(*), INTENT(IN) :: cdsuffix   ! field name suffix
      !													      !
      INTEGER       :: cpl_get_fldid     ! field index							      INTEGER       :: cpl_get_fldid     ! field index
      INTEGER       :: jfld              ! local loop indicees						      INTEGER       :: jfld              ! local loop indicees
      CHARACTER(16) :: clprefix          ! 'WRF_d01_EXT_d01_'						      CHARACTER(16) :: clprefix          ! 'WRF_d01_EXT_d01_'
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      cpl_get_fldid = -1   ! default value								      cpl_get_fldid = -1   ! default value
         												         
      clprefix = 'WRF_d01_EXT_d01_' 									      clprefix = 'WRF_d01_EXT_d01_' 
      DO jfld = 1, max_cplfld										      DO jfld = 1, max_cplfld
         IF(wrf_nemo) THEN										         IF(wrf_nemo) THEN
            IF( clprefix//TRIM(cdsuffix) == TRIM(sndname(1,1,jfld)) )   cpl_get_fldid = jfld		            IF( clprefix//TRIM(cdsuffix) == TRIM(sndname(1,1,jfld)) )   cpl_get_fldid = jfld
            IF( clprefix//TRIM(cdsuffix) == TRIM(rcvname(1,1,jfld)) )   cpl_get_fldid = jfld		            IF( clprefix//TRIM(cdsuffix) == TRIM(rcvname(1,1,jfld)) )   cpl_get_fldid = jfld
         ELSE IF(wrf_chimere) THEN									         ELSE IF(wrf_chimere) THEN
            IF( TRIM(cdsuffix) == TRIM(sndname(1,1,jfld)) )   cpl_get_fldid = jfld			            IF( TRIM(cdsuffix) == TRIM(sndname(1,1,jfld)) )   cpl_get_fldid = jfld
            IF( TRIM(cdsuffix) == TRIM(rcvname(1,1,jfld)) )   cpl_get_fldid = jfld			            IF( TRIM(cdsuffix) == TRIM(rcvname(1,1,jfld)) )   cpl_get_fldid = jfld
         END IF												         END IF
      END DO												      END DO
          												          
      IF( cpl_get_fldid == -1 )   CALL cpl_abort( 'cpl_get_fldid', 'variable suffix not found '/	      IF( cpl_get_fldid == -1 )   CALL cpl_abort( 'cpl_get_fldid', 'variable suffix not found '/
      WRITE(cltxt,*) 'The id of variable'//TRIM(cdsuffix)//' is: ', cpl_get_fldid   ;   CALL wrf	      WRITE(cltxt,*) 'The id of variable'//TRIM(cdsuffix)//' is: ', cpl_get_fldid   ;   CALL wrf

   END FUNCTION cpl_get_fldid										   END FUNCTION cpl_get_fldid

   													   
   SUBROUTINE cpl_snd( grid )										   SUBROUTINE cpl_snd( grid )
         !!-------------------------------------------------------------------				         !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_snd  ***							      !!             ***  SUBROUTINE cpl_snd  ***
      !!												      !!
      !! ** Purpose : compute coupling data to be sent and call cpl_sndfield				      !! ** Purpose : compute coupling data to be sent and call cpl_sndfield
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      TYPE(domain), INTENT(IN), POINTER :: grid								      TYPE(domain), INTENT(IN), POINTER :: grid
      !													      !
      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor				      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor
      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 			      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 
      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension						      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &					      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &
         &                          ims, ime, jms, jme, kms, kme, &					         &                          ims, ime, jms, jme, kms, kme, &
         &                          ips, ipe, jps, jpe, kps, kpe  )					         &                          ips, ipe, jps, jpe, kps, kpe  )

#if (EM_CORE == 1)											#if (EM_CORE == 1)
      CALL cpl_snd2( grid, grid%num_ext_model_couple_dom,   &						      CALL cpl_snd2( grid, grid%num_ext_model_couple_dom,   &
         &                 ids, ide, jds, jde, kds, kde,    &						         &                 ids, ide, jds, jde, kds, kde,    &
         &                 ims, ime, jms, jme, kms, kme,    &						         &                 ims, ime, jms, jme, kms, kme,    &
         &                 ips, ipe, jps, jpe, kps, kpe )						         &                 ips, ipe, jps, jpe, kps, kpe )
#endif													#endif

   END SUBROUTINE cpl_snd										   END SUBROUTINE cpl_snd

   SUBROUTINE cpl_rcv2(grid,id,config_flags           &							   SUBROUTINE cpl_rcv2(grid,id,config_flags           &
      &                    ,ids,ide,jds,jde,kds,kde   &							      &                    ,ids,ide,jds,jde,kds,kde   &
      &                    ,ims,ime,jms,jme,kms,kme   &							      &                    ,ims,ime,jms,jme,kms,kme   &
      &                    ,ips,ipe,jps,jpe,kps,kpe )							      &                    ,ips,ipe,jps,jpe,kps,kpe )
     !!-------------------------------------------------------------------				     !!-------------------------------------------------------------------
     !!             ***  SUBROUTINE cpl_rcv2  ***							     !!             ***  SUBROUTINE cpl_rcv2  ***
     !!													     !!
     !! ** Purpose : receiving data from CHIMERE							     !! ** Purpose : receiving data from CHIMERE
     !!--------------------------------------------------------------------				     !!--------------------------------------------------------------------
     TYPE(domain), INTENT(INOUT),    POINTER    :: grid							     TYPE(domain), INTENT(INOUT),    POINTER    :: grid
     TYPE (grid_config_rec_type), INTENT(IN) :: config_flags						     TYPE (grid_config_rec_type), INTENT(IN) :: config_flags
     INTEGER,                     INTENT(IN) :: id ! wrf domain index					     INTEGER,                     INTENT(IN) :: id ! wrf domain index
     INTEGER,                     INTENT(IN) :: ids,ide,jds,jde,kds,kde					     INTEGER,                     INTENT(IN) :: ids,ide,jds,jde,kds,kde
     INTEGER,                     INTENT(IN) :: ims,ime,jms,jme,kms,kme					     INTEGER,                     INTENT(IN) :: ims,ime,jms,jme,kms,kme
     INTEGER,                     INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe					     INTEGER,                     INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
     ! Local												     ! Local
     INTEGER :: jf											     INTEGER :: jf
     INTEGER :: ine,jne,kne										     INTEGER :: ine,jne,kne

     IF ( config_flags%direct_feed_chimere == 0 .AND. &							     IF ( config_flags%direct_feed_chimere == 0 .AND. &
          config_flags%indirect_feed_chimere == 0) return						          config_flags%indirect_feed_chimere == 0) return

     ine = ipe												     ine = ipe
     if (ine.ge.ide) ine = ine-1									     if (ine.ge.ide) ine = ine-1
     jne = jpe												     jne = jpe
     if (jne.ge.jde) jne = jne-1									     if (jne.ge.jde) jne = jne-1
     kne = kpe-1											     kne = kpe-1

     DO jf = 1,namcouple_info%nfields									     DO jf = 1,namcouple_info%nfields
        ! Cycle if it is not time to receive variables.							        ! Cycle if it is not time to receive variables.
        IF (mod(nsecrun,namcouple_info%coupling_freq(jf)) /= 0) cycle					        IF (mod(nsecrun,namcouple_info%coupling_freq(jf)) /= 0) cycle

        IF( config_flags%direct_feed_chimere == 1) THEN 						        IF( config_flags%direct_feed_chimere == 1) THEN 
           IF( namcouple_info%recv_variables(jf) == 'RCV_AOD_300nm' ) THEN				           IF( namcouple_info%recv_variables(jf) == 'RCV_AOD_300nm' ) THEN
                  CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &				                  CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &
                      &              ids, ide, jds, jde, kds, kde,       &				                      &              ids, ide, jds, jde, kds, kde,       &
                      &              ims, ime, jms, jme, kms, kme,       &				                      &              ims, ime, jms, jme, kms, kme,       &
                      &              ips, ine, jps, jne, kps, kne,       &				                      &              ips, ine, jps, jne, kps, kne,       &
                      &                1, grid%cplmask, grid%aod_300 ) 					                      &                1, grid%cplmask, grid%aod_300 ) 
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_400nm' ) THEN 				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_400nm' ) THEN 
                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &				                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_400 )					                       &                1, grid%cplmask, grid%aod_400 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_999nm' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_999nm' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &             ids, ide, jds, jde, kds, kde,        &				                       &             ids, ide, jds, jde, kds, kde,        &
                       &             ims, ime, jms, jme, kms, kme,        &				                       &             ims, ime, jms, jme, kms, kme,        &
                       &             ips, ine, jps, jne, kps, kne,        &				                       &             ips, ine, jps, jne, kps, kne,        &
                       &               1, grid%cplmask, grid%aod_999)					                       &               1, grid%cplmask, grid%aod_999)
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_albedo_400nm' ) THEN			           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_albedo_400nm' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                      &             ids, ide, jds, jde, kds, kde,        &				                      &             ids, ide, jds, jde, kds, kde,        &
                      &             ims, ime, jms, jme, kms, kme,        &				                      &             ims, ime, jms, jme, kms, kme,        &
                      &             ips, ine, jps, jne, kps, kne,        &				                      &             ips, ine, jps, jne, kps, kne,        &
                      &                1, grid%cplmask, grid%ssa_400 )					                      &                1, grid%cplmask, grid%ssa_400 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_albedo_600nm' ) THEN			           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_albedo_600nm' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%ssa_600 )					                       &                1, grid%cplmask, grid%ssa_600 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_asymmetry_factor_400nm' ) THEN		           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_asymmetry_factor_400nm' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &             ids, ide, jds, jde, kds, kde,        &				                       &             ids, ide, jds, jde, kds, kde,        &
                       &             ims, ime, jms, jme, kms, kme,        &				                       &             ims, ime, jms, jme, kms, kme,        &
                       &             ips, ine, jps, jne, kps, kne,        &				                       &             ips, ine, jps, jne, kps, kne,        &
                       &                1, grid%cplmask, grid%g_400 )					                       &                1, grid%cplmask, grid%g_400 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_asymmetry_factor_600nm' ) THEN		           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_asymmetry_factor_600nm' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%g_600 )					                       &                1, grid%cplmask, grid%g_600 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW1' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW1' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw1 ) 				                       &                1, grid%cplmask, grid%aod_lw1 ) 
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW2' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW2' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw2 )					                       &                1, grid%cplmask, grid%aod_lw2 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW3' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW3' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw3 )					                       &                1, grid%cplmask, grid%aod_lw3 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW4' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW4' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw4 )					                       &                1, grid%cplmask, grid%aod_lw4 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW5' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW5' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw5 )					                       &                1, grid%cplmask, grid%aod_lw5 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW6' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW6' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw6 )					                       &                1, grid%cplmask, grid%aod_lw6 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW7' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW7' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw7 )					                       &                1, grid%cplmask, grid%aod_lw7 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW8' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW8' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw8 )					                       &                1, grid%cplmask, grid%aod_lw8 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW9' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW9' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw9 )					                       &                1, grid%cplmask, grid%aod_lw9 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW10' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW10' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw10 )				                       &                1, grid%cplmask, grid%aod_lw10 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW11' )THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW11' )THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw11 )				                       &                1, grid%cplmask, grid%aod_lw11 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW12' )THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW12' )THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw12 )				                       &                1, grid%cplmask, grid%aod_lw12 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW13' )THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW13' )THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw13 )				                       &                1, grid%cplmask, grid%aod_lw13 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW14' )THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW14' )THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw14 )				                       &                1, grid%cplmask, grid%aod_lw14 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW15' )THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW15' )THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw15 )				                       &                1, grid%cplmask, grid%aod_lw15 )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW16' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_AOD_LW16' ) THEN
                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &				                   CALL cpl_rcv( id, namcouple_info%recv_variables(jf),   &
                       &              ids, ide, jds, jde, kds, kde,       &				                       &              ids, ide, jds, jde, kds, kde,       &
                       &              ims, ime, jms, jme, kms, kme,       &				                       &              ims, ime, jms, jme, kms, kme,       &
                       &              ips, ine, jps, jne, kps, kne,       &				                       &              ips, ine, jps, jne, kps, kne,       &
                       &                1, grid%cplmask, grid%aod_lw16 )				                       &                1, grid%cplmask, grid%aod_lw16 )
           ENDIF											           ENDIF
        ENDIF												        ENDIF

        IF( config_flags%indirect_feed_chimere == 1) THEN						        IF( config_flags%indirect_feed_chimere == 1) THEN
           IF    ( namcouple_info%recv_variables(jf) == 'RCV_NUM_AER' ) THEN				           IF    ( namcouple_info%recv_variables(jf) == 'RCV_NUM_AER' ) THEN
                   CALL cpl_rcv_4D( id,namcouple_info%recv_variables(jf),&				                   CALL cpl_rcv_4D( id,namcouple_info%recv_variables(jf),&
                      &             config_flags%n_bin,                  &				                      &             config_flags%n_bin,                  &
                      &             ids, ide, jds, jde, kds, kde,        &				                      &             ids, ide, jds, jde, kds, kde,        &
                      &             ims, ime, jms, jme, kms, kme,        &				                      &             ims, ime, jms, jme, kms, kme,        &
                      &             ips, ine, jps, jne, kps, kne,        &				                      &             ips, ine, jps, jne, kps, kne,        &
                      &               1, grid%chm_size_dist             )				                      &               1, grid%chm_size_dist             )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_NUM_HYGRO_AER' ) THEN			           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_NUM_HYGRO_AER' ) THEN
                   CALL cpl_rcv_4D( id,namcouple_info%recv_variables(jf),&				                   CALL cpl_rcv_4D( id,namcouple_info%recv_variables(jf),&
                      &             config_flags%n_bin,                  &				                      &             config_flags%n_bin,                  &
                      &             ids, ide, jds, jde, kds, kde,        &				                      &             ids, ide, jds, jde, kds, kde,        &
                      &             ims, ime, jms, jme, kms, kme,        &				                      &             ims, ime, jms, jme, kms, kme,        &
                      &             ips, ine, jps, jne, kps, kne,        &				                      &             ips, ine, jps, jne, kps, kne,        &
                      &               1, grid%chm_hygro_size_dist           )				                      &               1, grid%chm_hygro_size_dist           )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_ICE_NUCL' )  THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_ICE_NUCL' )  THEN
                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &				                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &
                      &              ids, ide, jds, jde, kds, kde,        &				                      &              ids, ide, jds, jde, kds, kde,        &
                      &              ims, ime, jms, jme, kms, kme,        &				                      &              ims, ime, jms, jme, kms, kme,        &
                      &              ips, ine, jps, jne, kps, kne,        &				                      &              ips, ine, jps, jne, kps, kne,        &
                      &                1, grid%cplmask, grid%chm_ice_nucl  )				                      &                1, grid%cplmask, grid%chm_ice_nucl  )
           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_HYGRO_AER' ) THEN				           ELSEIF( namcouple_info%recv_variables(jf) == 'RCV_HYGRO_AER' ) THEN
                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &				                   CALL cpl_rcv( id,  namcouple_info%recv_variables(jf),  &
                      &              ids, ide, jds, jde, kds, kde,        &				                      &              ids, ide, jds, jde, kds, kde,        &
                      &              ims, ime, jms, jme, kms, kme,        &				                      &              ims, ime, jms, jme, kms, kme,        &
                      &              ips, ine, jps, jne, kps, kne,        &				                      &              ips, ine, jps, jne, kps, kne,        &
                      &                1, grid%cplmask, grid%hygro_aer  )				                      &                1, grid%cplmask, grid%hygro_aer  )
           ENDIF											           ENDIF
        ENDIF												        ENDIF

     ENDDO												     ENDDO
     													     
   END SUBROUTINE cpl_rcv2										   END SUBROUTINE cpl_rcv2

   SUBROUTINE cpl_snd2( grid, max_edom                &							   SUBROUTINE cpl_snd2( grid, max_edom                &
      &                     , ids,ide,jds,jde,kds,kde &							      &                     , ids,ide,jds,jde,kds,kde &
      &                     , ims,ime,jms,jme,kms,kme &							      &                     , ims,ime,jms,jme,kms,kme &
      &                     , ips,ipe,jps,jpe,kps,kpe )							      &                     , ips,ipe,jps,jpe,kps,kpe )
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      USE module_state_description , ONLY : p_qv,p_qc,p_qi,p_qr,p_qs 					      USE module_state_description , ONLY : p_qv,p_qc,p_qi,p_qr,p_qs 
#endif													#endif
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_snd2  ***							      !!             ***  SUBROUTINE cpl_snd2  ***
      !!												      !!
      !! ** Purpose : compute coupling data to be sent and call cpl_sndfield				      !! ** Purpose : compute coupling data to be sent and call cpl_sndfield
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      TYPE(domain), INTENT(IN), POINTER :: grid								      TYPE(domain), INTENT(IN), POINTER :: grid
      INTEGER,      INTENT(IN)          :: max_edom    ! max number of external model domains		      INTEGER,      INTENT(IN)          :: max_edom    ! max number of external model domains
      INTEGER,      INTENT(IN)          :: ids,ide,jds,jde,kds,kde					      INTEGER,      INTENT(IN)          :: ids,ide,jds,jde,kds,kde
      INTEGER,      INTENT(IN)          :: ims,ime,jms,jme,kms,kme					      INTEGER,      INTENT(IN)          :: ims,ime,jms,jme,kms,kme
      INTEGER,      INTENT(IN)          :: ips,ipe,jps,jpe,kps,kpe					      INTEGER,      INTENT(IN)          :: ips,ipe,jps,jpe,kps,kpe
      !													      !
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      INTEGER :: Npts											      INTEGER :: Npts
      INTEGER :: i,j,k,l,jf										      INTEGER :: i,j,k,l,jf
      INTEGER :: ins,ine,jns,jne,kns,kne								      INTEGER :: ins,ine,jns,jne,kns,kne
      REAL, DIMENSION( : ), ALLOCATABLE :: cplsnd							      REAL, DIMENSION( : ), ALLOCATABLE :: cplsnd
#else													#else
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: cplsnd							      REAL, DIMENSION( ips:ipe, jps:jpe ) :: cplsnd
#endif													#endif
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: u_uo							      REAL, DIMENSION( ips:ipe, jps:jpe ) :: u_uo
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: v_vo							      REAL, DIMENSION( ips:ipe, jps:jpe ) :: v_vo
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: wspd							      REAL, DIMENSION( ips:ipe, jps:jpe ) :: wspd
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: taut							      REAL, DIMENSION( ips:ipe, jps:jpe ) :: taut
      INTEGER :: icnt											      INTEGER :: icnt
      INTEGER :: ifldid											      INTEGER :: ifldid
      LOGICAL,DIMENSION(max_edom) :: lltosend								      LOGICAL,DIMENSION(max_edom) :: lltosend
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

#if (EM_CORE == 1)											#if (EM_CORE == 1)

#ifdef cpl_wrf_nemo											#ifdef cpl_wrf_nemo
      ! we use ipe and not min(ipe, ide-1) the variable we are using are coming from grid and ar	      ! we use ipe and not min(ipe, ide-1) the variable we are using are coming from grid and ar
      													      
      ifldid      = cpl_get_fldid( 'EVAP-PRECIP' )							      ifldid      = cpl_get_fldid( 'EVAP-PRECIP' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         cplsnd(ips:ipe,jps:jpe) = grid%QFX(ips:ipe,jps:jpe) &						         cplsnd(ips:ipe,jps:jpe) = grid%QFX(ips:ipe,jps:jpe) &
            &                  - ( grid%RAINCV(ips:ipe,jps:jpe)+grid%RAINNCV(ips:ipe,jps:jpe) ) 	            &                  - ( grid%RAINCV(ips:ipe,jps:jpe)+grid%RAINNCV(ips:ipe,jps:jpe) ) 
         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )						         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )
      END IF												      END IF
      													      
      ifldid      = cpl_get_fldid( 'SURF_NET_SOLAR' )							      ifldid      = cpl_get_fldid( 'SURF_NET_SOLAR' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         CALL cpl_sndfield( grid%id, lltosend, ifldid, grid%GSW(ips:ipe,jps:jpe) )			         CALL cpl_sndfield( grid%id, lltosend, ifldid, grid%GSW(ips:ipe,jps:jpe) )
      END IF												      END IF
      													      
      ifldid      = cpl_get_fldid( 'SURF_NET_NON-SOLAR' )						      ifldid      = cpl_get_fldid( 'SURF_NET_NON-SOLAR' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         cplsnd(ips:ipe,jps:jpe) = grid%GLW(ips:ipe,jps:jpe) &						         cplsnd(ips:ipe,jps:jpe) = grid%GLW(ips:ipe,jps:jpe) &
            &                      - STBOLT * grid%EMISS(ips:ipe,jps:jpe) * grid%SST(ips:ipe,jps	            &                      - STBOLT * grid%EMISS(ips:ipe,jps:jpe) * grid%SST(ips:ipe,jps
            &                      - grid%LH(ips:ipe,jps:jpe) - grid%HFX(ips:ipe,jps:jpe) 		            &                      - grid%LH(ips:ipe,jps:jpe) - grid%HFX(ips:ipe,jps:jpe) 
         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )						         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )
      END IF												      END IF
      													      
      ! test if we need to compute the module of the wind speed and stres				      ! test if we need to compute the module of the wind speed and stres
      icnt   =        COUNT( cpl_tosend( grid%id, cpl_get_fldid( 'TAUMOD' ), max_edom ) )		      icnt   =        COUNT( cpl_tosend( grid%id, cpl_get_fldid( 'TAUMOD' ), max_edom ) )
      icnt   = icnt + COUNT( cpl_tosend( grid%id, cpl_get_fldid( 'TAUX'   ), max_edom ) )		      icnt   = icnt + COUNT( cpl_tosend( grid%id, cpl_get_fldid( 'TAUX'   ), max_edom ) )
      icnt   = icnt + count( cpl_tosend( grid%id, cpl_get_fldid( 'TAUY'   ), max_edom ) )		      icnt   = icnt + count( cpl_tosend( grid%id, cpl_get_fldid( 'TAUY'   ), max_edom ) )
      IF ( icnt > 0 ) THEN 										      IF ( icnt > 0 ) THEN 
         u_uo(ips:ipe,jps:jpe) = grid%u_phy(ips:ipe,kps,jps:jpe) - grid%uoce(ips:ipe,jps:jpe)		         u_uo(ips:ipe,jps:jpe) = grid%u_phy(ips:ipe,kps,jps:jpe) - grid%uoce(ips:ipe,jps:jpe)
         v_vo(ips:ipe,jps:jpe) = grid%v_phy(ips:ipe,kps,jps:jpe) - grid%voce(ips:ipe,jps:jpe)		         v_vo(ips:ipe,jps:jpe) = grid%v_phy(ips:ipe,kps,jps:jpe) - grid%voce(ips:ipe,jps:jpe)
         wspd(ips:ipe,jps:jpe) = MAX( SQRT( u_uo(ips:ipe,jps:jpe)**2 + v_vo(ips:ipe,jps:jpe)**2 	         wspd(ips:ipe,jps:jpe) = MAX( SQRT( u_uo(ips:ipe,jps:jpe)**2 + v_vo(ips:ipe,jps:jpe)**2 
         taut(ips:ipe,jps:jpe) = grid%rho(ips:ipe,kps,jps:jpe) * grid%ust(ips:ipe,jps:jpe)**2		         taut(ips:ipe,jps:jpe) = grid%rho(ips:ipe,kps,jps:jpe) * grid%ust(ips:ipe,jps:jpe)**2
      END IF												      END IF
      													      
      ifldid      = cpl_get_fldid( 'TAUX' )								      ifldid      = cpl_get_fldid( 'TAUX' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         cplsnd(ips:ipe,jps:jpe) = taut(ips:ipe,jps:jpe) * u_uo(ips:ipe,jps:jpe) / wspd(ips:ipe,	         cplsnd(ips:ipe,jps:jpe) = taut(ips:ipe,jps:jpe) * u_uo(ips:ipe,jps:jpe) / wspd(ips:ipe,
         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )						         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )
      END IF												      END IF
      													      
      ifldid      = cpl_get_fldid( 'TAUY' )								      ifldid      = cpl_get_fldid( 'TAUY' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         cplsnd(ips:ipe,jps:jpe) = taut(ips:ipe,jps:jpe) * v_vo(ips:ipe,jps:jpe) / wspd(ips:ipe,	         cplsnd(ips:ipe,jps:jpe) = taut(ips:ipe,jps:jpe) * v_vo(ips:ipe,jps:jpe) / wspd(ips:ipe,
         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )						         CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )
      END IF												      END IF
      													      
      ifldid      = cpl_get_fldid( 'TAUMOD' )								      ifldid      = cpl_get_fldid( 'TAUMOD' )
      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						      lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
      IF ( COUNT(lltosend) > 0 ) THEN 									      IF ( COUNT(lltosend) > 0 ) THEN 
         CALL cpl_sndfield( grid%id, lltosend, ifldid, taut )						         CALL cpl_sndfield( grid%id, lltosend, ifldid, taut )
      END IF												      END IF
#endif													#endif

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      DO jf = 1, namcouple_info%nfields									      DO jf = 1, namcouple_info%nfields
         IF (mod(nsecrun,namcouple_info%coupling_freq(jf)) /= 0) cycle					         IF (mod(nsecrun,namcouple_info%coupling_freq(jf)) /= 0) cycle
         IF (namcouple_info%source_grid(jf)(1:3) /= "wrf") cycle					         IF (namcouple_info%source_grid(jf)(1:3) /= "wrf") cycle
         ifldid      = cpl_get_fldid( namcouple_info%send_variables(jf) )				         ifldid      = cpl_get_fldid( namcouple_info%send_variables(jf) )
         lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )						         lltosend(:) = cpl_tosend( grid%id, ifldid, max_edom )
         IF ( COUNT(lltosend) > 0 ) THEN								         IF ( COUNT(lltosend) > 0 ) THEN

            ins = ips											            ins = ips
            jns = jps											            jns = jps
            kns = kps											            kns = kps
            ine = ipe											            ine = ipe
            jne = jpe											            jne = jpe
            l = 1											            l = 1

            ! Allocate cplsnd and compute indexes.							            ! Allocate cplsnd and compute indexes.
            IF (namcouple_info%source_grid(jf) == 'wrf1') THEN						            IF (namcouple_info%source_grid(jf) == 'wrf1') THEN
               if (ine.ge.ide) ine = ine-1								               if (ine.ge.ide) ine = ine-1
               if (jne.ge.jde) jne = jne-1								               if (jne.ge.jde) jne = jne-1
               kne = kpe-1										               kne = kpe-1
               Npts = (ine-ins+1)*(jne-jns+1)								               Npts = (ine-ins+1)*(jne-jns+1)
            ELSE IF (namcouple_info%source_grid(jf) == 'wrf2') THEN					            ELSE IF (namcouple_info%source_grid(jf) == 'wrf2') THEN
               if (ine.ge.ide) ine = ine-1								               if (ine.ge.ide) ine = ine-1
               if (jne.ge.jde) jne = jne-1								               if (jne.ge.jde) jne = jne-1
               kne = kpe-1										               kne = kpe-1
               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)						               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)
            ELSE IF (namcouple_info%source_grid(jf) == 'wrf3') THEN					            ELSE IF (namcouple_info%source_grid(jf) == 'wrf3') THEN
               if (ine.ge.ide) ine = ine-1								               if (ine.ge.ide) ine = ine-1
               if (jne.ge.jde) jne = jne-1								               if (jne.ge.jde) jne = jne-1
               kne = kpe										               kne = kpe
               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)						               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)
            ELSE IF (namcouple_info%source_grid(jf) == 'wrf4') THEN					            ELSE IF (namcouple_info%source_grid(jf) == 'wrf4') THEN
               if (jne.ge.jde) jne = jne-1								               if (jne.ge.jde) jne = jne-1
               kne = kpe-1										               kne = kpe-1
               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)						               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)
            ELSE IF (namcouple_info%source_grid(jf) == 'wrf5') THEN					            ELSE IF (namcouple_info%source_grid(jf) == 'wrf5') THEN
               if (ine.ge.ide) ine = ine-1								               if (ine.ge.ide) ine = ine-1
               kne = kpe-1										               kne = kpe-1
               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)						               Npts = (ine-ins+1)*(jne-jns+1)*(kne-kns+1)
            END IF											            END IF
            ALLOCATE(cplsnd(Npts))									            ALLOCATE(cplsnd(Npts))

            ! Reshape of sending variable.								            ! Reshape of sending variable.
            IF (namcouple_info%source_grid(jf) == 'wrf1') THEN						            IF (namcouple_info%source_grid(jf) == 'wrf1') THEN
               do j = jns,jne										               do j = jns,jne
                  do i = ins,ine									                  do i = ins,ine
                     ! Surface Pressure									                     ! Surface Pressure
                     IF( namcouple_info%send_variables(jf) == 'SND_PSFC' ) THEN				                     IF( namcouple_info%send_variables(jf) == 'SND_PSFC' ) THEN
                        cplsnd(l) = grid%PSFC(i,j)							                        cplsnd(l) = grid%PSFC(i,j)

                        ! Surface SW Radiation								                        ! Surface SW Radiation
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SWDOWN' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SWDOWN' ) THEN
                        cplsnd(l) = grid%SWDOWN(i,j)							                        cplsnd(l) = grid%SWDOWN(i,j)

                        ! Surface LW Radiation								                        ! Surface LW Radiation
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_GLW' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_GLW' ) THEN
                        cplsnd(l) = grid%GLW(i,j)							                        cplsnd(l) = grid%GLW(i,j)

                        ! 2m Water Vapor								                        ! 2m Water Vapor
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_Q2' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_Q2' ) THEN
                        cplsnd(l) = grid%Q2(i,j)							                        cplsnd(l) = grid%Q2(i,j)

                        ! Convective Rain								                        ! Convective Rain
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_RAINC' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_RAINC' ) THEN
                        cplsnd(l) = grid%RAINC(i,j)							                        cplsnd(l) = grid%RAINC(i,j)

                        ! Grid Resolved Rain								                        ! Grid Resolved Rain
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_RAINNC' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_RAINNC' ) THEN
                        cplsnd(l) = grid%RAINNC(i,j)							                        cplsnd(l) = grid%RAINNC(i,j)

                        ! Surface Sensible Heat Flux							                        ! Surface Sensible Heat Flux
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_HFX' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_HFX' ) THEN
                        cplsnd(l) = grid%HFX(i,j)							                        cplsnd(l) = grid%HFX(i,j)

                        ! Surface Latent Heat Flux							                        ! Surface Latent Heat Flux
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_LH' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_LH' ) THEN
                        cplsnd(l) = grid%LH(i,j)							                        cplsnd(l) = grid%LH(i,j)

                        ! Friction Velocity 								                        ! Friction Velocity 
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_UST' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_UST' ) THEN
                        cplsnd(l) = grid%UST(i,j)							                        cplsnd(l) = grid%UST(i,j)

                        ! 2m Temperature								                        ! 2m Temperature
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_T2' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_T2' ) THEN
                        cplsnd(l) = grid%T2(i,j)							                        cplsnd(l) = grid%T2(i,j)

                        ! PBLH										                        ! PBLH
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_PBLH' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_PBLH' ) THEN
                        cplsnd(l) = grid%PBLH(i,j)							                        cplsnd(l) = grid%PBLH(i,j)

                        ! Equi. Acc. Snow Depth								                        ! Equi. Acc. Snow Depth
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SNOW' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SNOW' ) THEN
                        cplsnd(l) = grid%SNOW(i,j)							                        cplsnd(l) = grid%SNOW(i,j)

                        ! Snow Depth									                        ! Snow Depth
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SNOWH' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SNOWH' ) THEN
                        cplsnd(l) = grid%SNOWH(i,j)							                        cplsnd(l) = grid%SNOWH(i,j)

                        ! U10										                        ! U10
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_U10' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_U10' ) THEN
                        cplsnd(l) = grid%U10(i,j)							                        cplsnd(l) = grid%U10(i,j)

                        ! V10										                        ! V10
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_V10' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_V10' ) THEN
                        cplsnd(l) = grid%V10(i,j)							                        cplsnd(l) = grid%V10(i,j)

                        ! Soil Moisture									                        ! Soil Moisture
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SMOIS' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SMOIS' ) THEN
                        cplsnd(l) = grid%SMOIS(i,1,j)							                        cplsnd(l) = grid%SMOIS(i,1,j)

                        ! Sea Ice									                        ! Sea Ice
                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SEAICE' ) THEN			                     ELSE IF( namcouple_info%send_variables(jf) == 'SND_SEAICE' ) THEN
                        cplsnd(l) = grid%XICE(i,j)							                        cplsnd(l) = grid%XICE(i,j)
                     END IF										                     END IF
                     l = l+1										                     l = l+1
                  enddo											                  enddo
               enddo											               enddo
            ELSE											            ELSE
               do k = kns,kne										               do k = kns,kne
                  do j = jns,jne									                  do j = jns,jne
                     do i = ins,ine									                     do i = ins,ine
                        ! Base State Pressure 								                        ! Base State Pressure 
                        IF( namcouple_info%send_variables(jf) == 'SND_PB' ) THEN			                        IF( namcouple_info%send_variables(jf) == 'SND_PB' ) THEN
                           cplsnd(l) = grid%PB(i,k,j)							                           cplsnd(l) = grid%PB(i,k,j)

                           ! Perturbation to the Base State Pressure 					                           ! Perturbation to the Base State Pressure 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_P' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_P' ) THEN
                           cplsnd(l) = grid%P(i,k,j)							                           cplsnd(l) = grid%P(i,k,j)

                           ! vertical velocity								                           ! vertical velocity
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_W' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_W' ) THEN
                           cplsnd(l) = grid%W_2(i,k,j)							                           cplsnd(l) = grid%W_2(i,k,j)

                           ! cloud fraction								                           ! cloud fraction
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_CLDFRA' ) THEN		                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_CLDFRA' ) THEN
                           cplsnd(l) = grid%CLDFRA(i,k,j)						                           cplsnd(l) = grid%CLDFRA(i,k,j)

                           ! Hydrostatic Pressure 							                           ! Hydrostatic Pressure 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PHYD' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PHYD' ) THEN
                           cplsnd(l) = grid%P_HYD(i,k,j)						                           cplsnd(l) = grid%P_HYD(i,k,j)

                           ! Perturbation to the Base Potential Temperature 				                           ! Perturbation to the Base Potential Temperature 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_T' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_T' ) THEN
                           cplsnd(l) = grid%T_1(i,k,j)							                           cplsnd(l) = grid%T_1(i,k,j)

                           ! Cloud Water mixing ratio 							                           ! Cloud Water mixing ratio 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QCLOUD' ) THEN		                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QCLOUD' ) THEN
                           cplsnd(l) = grid%MOIST(i,k,j,p_qc)+grid%QC_CU(i,k,j)			   |	                           cplsnd(l) = grid%MOIST(i,k,j,p_qc)   !+grid%QC_CU(i,k,j)
                           										                           

                           ! Rain Water mixing ratio 							                           ! Rain Water mixing ratio 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QRAIN' ) THEN		                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QRAIN' ) THEN
                           cplsnd(l) = grid%MOIST(i,k,j,p_qr)						                           cplsnd(l) = grid%MOIST(i,k,j,p_qr)

                           ! Snow mixing ratio 								                           ! Snow mixing ratio 
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QSNOW' ) THEN		                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QSNOW' ) THEN
                           cplsnd(l) = grid%MOIST(i,k,j,p_qs)						                           cplsnd(l) = grid%MOIST(i,k,j,p_qs)

                           ! Water Vapor mixing ratio							                           ! Water Vapor mixing ratio
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QVAPOR' ) THEN		                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QVAPOR' ) THEN
                           cplsnd(l) = grid%MOIST(i,k,j,p_qv)						                           cplsnd(l) = grid%MOIST(i,k,j,p_qv)

                           ! Ice Water mixing ratio							                           ! Ice Water mixing ratio
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QICE' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_QICE' ) THEN
                          cplsnd(l) = grid%MOIST(i,k,j,p_qi)+grid%QI_CU(i,k,j)			   |	                          cplsnd(l) = grid%MOIST(i,k,j,p_qi)   !+grid%QI_CU(i,k,j)

                           ! Perturbation geopotential							                           ! Perturbation geopotential
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PH' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PH' ) THEN
                           cplsnd(l) = grid%PH_2(i,k,j)							                           cplsnd(l) = grid%PH_2(i,k,j)

                           ! Base-state geopotential							                           ! Base-state geopotential
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PHB' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_PHB' ) THEN
                           cplsnd(l) = grid%PHB(i,k,j)							                           cplsnd(l) = grid%PHB(i,k,j)

                           ! U (stag lon)								                           ! U (stag lon)
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_U' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_U' ) THEN
                           cplsnd(l) = grid%U_2(i,k,j)							                           cplsnd(l) = grid%U_2(i,k,j)

                           ! V (stag lat)								                           ! V (stag lat)
                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_V' ) THEN			                        ELSE IF( namcouple_info%send_variables(jf) == 'SND_V' ) THEN
                           cplsnd(l) = grid%V_2(i,k,j)							                           cplsnd(l) = grid%V_2(i,k,j)
                        										                        
                        END IF										                        END IF
                        l = l+1										                        l = l+1
                     enddo										                     enddo
                  enddo											                  enddo
               enddo											               enddo
            END IF											            END IF

            CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )					            CALL cpl_sndfield( grid%id, lltosend, ifldid, cplsnd )
         END IF												         END IF
         IF (ALLOCATED(cplsnd)) DEALLOCATE (cplsnd)							         IF (ALLOCATED(cplsnd)) DEALLOCATE (cplsnd)
      ENDDO												      ENDDO
#endif													#endif

#endif													#endif
       													       
   END SUBROUTINE cpl_snd2										   END SUBROUTINE cpl_snd2


   SUBROUTINE cpl_sndfield( kdomwrf, ldtosend, kfldid, pdata )						   SUBROUTINE cpl_sndfield( kdomwrf, ldtosend, kfldid, pdata )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_rcv  ***							      !!             ***  SUBROUTINE cpl_rcv  ***
      !!												      !!
      !! ** Purpose :   send coupling data								      !! ** Purpose :   send coupling data
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER,              INTENT(IN) :: kdomwrf   ! wrf domain index					      INTEGER,              INTENT(IN) :: kdomwrf   ! wrf domain index
      LOGICAL,DIMENSION(:), INTENT(IN) :: ldtosend							      LOGICAL,DIMENSION(:), INTENT(IN) :: ldtosend
      INTEGER,              INTENT(IN) :: kfldid    ! field index					      INTEGER,              INTENT(IN) :: kfldid    ! field index
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      REAL, DIMENSION(:),   INTENT(IN) :: pdata     ! data to be sent					      REAL, DIMENSION(:),   INTENT(IN) :: pdata     ! data to be sent
#else													#else
      REAL, DIMENSION(:,:), INTENT(IN) :: pdata     ! data to be sent					      REAL, DIMENSION(:,:), INTENT(IN) :: pdata     ! data to be sent
#endif													#endif
      !													      !
      INTEGER :: jext          ! local loop indicees							      INTEGER :: jext          ! local loop indicees
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      DO jext = 1, SIZE(ldtosend)									      DO jext = 1, SIZE(ldtosend)
         IF( ldtosend(jext) ) THEN									         IF( ldtosend(jext) ) THEN
            IF ( coupler_name == 'oasis' ) CALL cpl_oasis_snd( kdomwrf, jext, kfldid, nsecrun, p	            IF ( coupler_name == 'oasis' ) CALL cpl_oasis_snd( kdomwrf, jext, kfldid, nsecrun, p
         END IF												         END IF
      END DO												      END DO

   END SUBROUTINE cpl_sndfield										   END SUBROUTINE cpl_sndfield


   SUBROUTINE cpl_rcv( kdomwrf, cdsuffix,            &							   SUBROUTINE cpl_rcv( kdomwrf, cdsuffix,            &
      &                ids, ide, jds, jde, kds, kde, &							      &                ids, ide, jds, jde, kds, kde, &
      &                ims, ime, jms, jme, kms, kme, &							      &                ims, ime, jms, jme, kms, kme, &
      &                ips, ipe, jps, jpe, kps, kpe, &							      &                ips, ipe, jps, jpe, kps, kpe, &
      &                max_edom, pcplmask, pdatacpl, pdataobs )						      &                max_edom, pcplmask, pdatacpl, pdataobs )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_rcv  ***							      !!             ***  SUBROUTINE cpl_rcv  ***
      !!												      !!
      !! ** Purpose :   receive coupling data								      !! ** Purpose :   receive coupling data
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER,                                                   INTENT(IN   ) :: kdomwrf     ! 	      INTEGER,                                                   INTENT(IN   ) :: kdomwrf     ! 
      CHARACTER(*),                                              INTENT(IN   ) :: cdsuffix    ! 	      CHARACTER(*),                                              INTENT(IN   ) :: cdsuffix    ! 
      INTEGER,                                                   INTENT(IN   ) :: ids,ide,jds,jd	      INTEGER,                                                   INTENT(IN   ) :: ids,ide,jds,jd
      INTEGER,                                                   INTENT(IN   ) :: ims,ime,jms,jm	      INTEGER,                                                   INTENT(IN   ) :: ims,ime,jms,jm
      INTEGER,                                                   INTENT(IN   ) :: ips,ipe,jps,jp	      INTEGER,                                                   INTENT(IN   ) :: ips,ipe,jps,jp
      INTEGER,                                                   INTENT(IN   ) :: max_edom    ! 	      INTEGER,                                                   INTENT(IN   ) :: max_edom    ! 
      REAL, DIMENSION( ims:ime, 1:max_edom, jms:jme ),           INTENT(IN   ) :: pcplmask    ! 	      REAL, DIMENSION( ims:ime, 1:max_edom, jms:jme ),           INTENT(IN   ) :: pcplmask    ! 
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      REAL, DIMENSION( ims:ime, kms:kme,    jms:jme ),           INTENT(  OUT) :: pdatacpl    ! 	      REAL, DIMENSION( ims:ime, kms:kme,    jms:jme ),           INTENT(  OUT) :: pdatacpl    ! 
#else													#else
      REAL, DIMENSION( ims:ime,             jms:jme ),           INTENT(  OUT) :: pdatacpl    ! 	      REAL, DIMENSION( ims:ime,             jms:jme ),           INTENT(  OUT) :: pdatacpl    ! 
#endif													#endif
      REAL, DIMENSION( ims:ime,             jms:jme ), OPTIONAL, INTENT(IN   ) :: pdataobs    ! 	      REAL, DIMENSION( ims:ime,             jms:jme ), OPTIONAL, INTENT(IN   ) :: pdataobs    ! 
      !													      !
      INTEGER :: jext                                ! external domain index				      INTEGER :: jext                                ! external domain index
      INTEGER :: ifldid                              ! field index					      INTEGER :: ifldid                              ! field index
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      REAL, DIMENSION( (ipe-ips+1)*(jpe-jps+1)*(kpe-kps+1) )   :: zdata ! data received from the	      REAL, DIMENSION( (ipe-ips+1)*(jpe-jps+1)*(kpe-kps+1) )   :: zdata ! data received from the
      INTEGER :: i,j,k,l										      INTEGER :: i,j,k,l
#endif													#endif
#ifdef cpl_wrf_nemo											#ifdef cpl_wrf_nemo
      REAL, DIMENSION( ips:ipe, jps:jpe ) :: zdata                       ! data received from th	      REAL, DIMENSION( ips:ipe, jps:jpe ) :: zdata                       ! data received from th
#endif													#endif
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

!! Get data from NEMO											!! Get data from NEMO
#ifdef cpl_wrf_nemo											#ifdef cpl_wrf_nemo
         ifldid = cpl_get_fldid( cdsuffix )								         ifldid = cpl_get_fldid( cdsuffix )

         IF( PRESENT(pdataobs) ) THEN									         IF( PRESENT(pdataobs) ) THEN
            pdatacpl(ips:ipe,jps:jpe) = pdataobs(ips:ipe,jps:jpe) * ( 1.0 - SUM( pcplmask(ips:ip	            pdatacpl(ips:ipe,jps:jpe) = pdataobs(ips:ipe,jps:jpe) * ( 1.0 - SUM( pcplmask(ips:ip
         ELSE 												         ELSE 
            pdatacpl(ips:ipe,jps:jpe) = 0.0								            pdatacpl(ips:ipe,jps:jpe) = 0.0
         END IF												         END IF

         DO jext = 1, max_edom										         DO jext = 1, max_edom
            IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN						            IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN
               IF( coupler_name == 'oasis' )   CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecru	               IF( coupler_name == 'oasis' )   CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecru
               pdatacpl(ips:ipe,jps:jpe) = pdatacpl(ips:ipe,jps:jpe) + zdata(ips:ipe,jps:jpe) * 	               pdatacpl(ips:ipe,jps:jpe) = pdatacpl(ips:ipe,jps:jpe) + zdata(ips:ipe,jps:jpe) * 
            END IF											            END IF
         END DO												         END DO
#endif													#endif

!! Get data from CHIMERE										!! Get data from CHIMERE
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
         ifldid = cpl_get_fldid( cdsuffix )								         ifldid = cpl_get_fldid( cdsuffix )
        												        
          DO jext = 1, max_edom										          DO jext = 1, max_edom
             IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN						             IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN
               IF( coupler_name == 'oasis' ) THEN							               IF( coupler_name == 'oasis' ) THEN
                 CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecrun, zdata )				                 CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecrun, zdata )
                 l = 1											                 l = 1
                 DO k = kps,kpe										                 DO k = kps,kpe
                    DO j = jps,jpe									                    DO j = jps,jpe
                       DO i = ips,ipe									                       DO i = ips,ipe
                           pdatacpl(i,k,j) = zdata(l)							                           pdatacpl(i,k,j) = zdata(l)
                           l = l+1									                           l = l+1
                       ENDDO										                       ENDDO
                    ENDDO										                    ENDDO
                 ENDDO											                 ENDDO
               END IF											               END IF
             END IF											             END IF
          END DO											          END DO
#endif													#endif
   END SUBROUTINE cpl_rcv										   END SUBROUTINE cpl_rcv

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   SUBROUTINE cpl_rcv_4D( kdomwrf, cdsuffix, dim4,      &						   SUBROUTINE cpl_rcv_4D( kdomwrf, cdsuffix, dim4,      &
      &                   ids, ide, jds, jde, kds, kde, &						      &                   ids, ide, jds, jde, kds, kde, &
      &                   ims, ime, jms, jme, kms, kme, &						      &                   ims, ime, jms, jme, kms, kme, &
      &                   ips, ipe, jps, jpe, kps, kpe, &						      &                   ips, ipe, jps, jpe, kps, kpe, &
      &                   max_edom, pdatacpl)								      &                   max_edom, pdatacpl)
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_rcv_4D  ***							      !!             ***  SUBROUTINE cpl_rcv_4D  ***
      !!												      !!
      !! ** Purpose :   receive coupling 4D data from CHIMERE						      !! ** Purpose :   receive coupling 4D data from CHIMERE
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      INTEGER, INTENT(IN   )      :: kdomwrf     ! wrf domain index					      INTEGER, INTENT(IN   )      :: kdomwrf     ! wrf domain index
      CHARACTER(*), INTENT(IN   ) :: cdsuffix    ! field name suffix					      CHARACTER(*), INTENT(IN   ) :: cdsuffix    ! field name suffix
      INTEGER, INTENT(IN   )      :: dim4        ! dimension of the fourth dimension			      INTEGER, INTENT(IN   )      :: dim4        ! dimension of the fourth dimension
      INTEGER, INTENT(IN   )      :: ids,ide,jds,jde,kds,kde						      INTEGER, INTENT(IN   )      :: ids,ide,jds,jde,kds,kde
      INTEGER, INTENT(IN   )      :: ims,ime,jms,jme,kms,kme						      INTEGER, INTENT(IN   )      :: ims,ime,jms,jme,kms,kme
      INTEGER, INTENT(IN   )      :: ips,ipe,jps,jpe,kps,kpe						      INTEGER, INTENT(IN   )      :: ips,ipe,jps,jpe,kps,kpe
      INTEGER, INTENT(IN   )      :: max_edom    ! max number of external model domains			      INTEGER, INTENT(IN   )      :: max_edom    ! max number of external model domains
      REAL, DIMENSION( ims:ime, kms:kme, jms:jme, dim4 ), INTENT(  OUT) :: pdatacpl    ! couplin	      REAL, DIMENSION( ims:ime, kms:kme, jms:jme, dim4 ), INTENT(  OUT) :: pdatacpl    ! couplin
      !													      !
      INTEGER :: jext                                ! external domain index				      INTEGER :: jext                                ! external domain index
      INTEGER :: ifldid                              ! field index					      INTEGER :: ifldid                              ! field index
      REAL, DIMENSION( (ipe-ips+1)*(jpe-jps+1)*(kpe-kps+1)*dim4 )   :: zdata ! data received fro	      REAL, DIMENSION( (ipe-ips+1)*(jpe-jps+1)*(kpe-kps+1)*dim4 )   :: zdata ! data received fro
      INTEGER :: i,j,k,l,m										      INTEGER :: i,j,k,l,m

      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere

      ifldid = cpl_get_fldid( cdsuffix )								      ifldid = cpl_get_fldid( cdsuffix )

      DO jext = 1, max_edom										      DO jext = 1, max_edom
         IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN						         IF( cpl_toreceive( kdomwrf, jext, ifldid ) ) THEN
           IF( coupler_name == 'oasis' ) THEN								           IF( coupler_name == 'oasis' ) THEN
              CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecrun, zdata )				              CALL cpl_oasis_rcv( kdomwrf, jext, ifldid, nsecrun, zdata )
              l = 1											              l = 1
              DO m = 1,dim4										              DO m = 1,dim4
                DO k = kps,kpe										                DO k = kps,kpe
                  DO j = jps,jpe									                  DO j = jps,jpe
                     DO i = ips,ipe									                     DO i = ips,ipe
                         pdatacpl(i,k,j,m) = zdata(l)							                         pdatacpl(i,k,j,m) = zdata(l)
                         l = l+1									                         l = l+1
                     ENDDO										                     ENDDO
                  ENDDO											                  ENDDO
                ENDDO											                ENDDO
              ENDDO											              ENDDO
           ENDIF											           ENDIF
         ENDIF												         ENDIF
      ENDDO												      ENDDO

#endif													#endif
   END SUBROUTINE cpl_rcv_4D										   END SUBROUTINE cpl_rcv_4D
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

   SUBROUTINE cpl_store_input( grid, config_flags )							   SUBROUTINE cpl_store_input( grid, config_flags )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_store_input  ***						      !!             ***  SUBROUTINE cpl_store_input  ***
      !!												      !!
      !! ** Purpose : Store input data that will be merged later with data received from the cou	      !! ** Purpose : Store input data that will be merged later with data received from the cou
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      TYPE(domain)                , INTENT(INOUT) :: grid						      TYPE(domain)                , INTENT(INOUT) :: grid
      TYPE (grid_config_rec_type) , INTENT(IN   ) :: config_flags					      TYPE (grid_config_rec_type) , INTENT(IN   ) :: config_flags
      !													      !
      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor				      INTEGER :: ips,ipe,jps,jpe,kps,kpe ! domain dimension on 1 processor
      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 			      INTEGER :: ims,ime,jms,jme,kms,kme ! memory domain dimension on 1 processor 
      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension						      INTEGER :: ids,ide,jds,jde,kds,kde ! domain dimension
      LOGICAL :: llmust_store										      LOGICAL :: llmust_store
      INTEGER :: jext          ! local loop indicees     						      INTEGER :: jext          ! local loop indicees     
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

#if (EM_CORE == 1)											#if (EM_CORE == 1)
      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &					      CALL get_ijk_from_grid( grid, ids, ide, jds, jde, kds, kde, &
         &                          ims, ime, jms, jme, kms, kme, &					         &                          ims, ime, jms, jme, kms, kme, &
         &                          ips, ipe, jps, jpe, kps, kpe  )					         &                          ips, ipe, jps, jpe, kps, kpe  )
      													      
      ! take care of variables read in AUXINPUT4... 							      ! take care of variables read in AUXINPUT4... 
      ! AUXINPUT4 was just read if:									      ! AUXINPUT4 was just read if:
      ! 1) We asked (legally) for an AUXINPUT4 input AND this is the first time step AFTER an au	      ! 1) We asked (legally) for an AUXINPUT4 input AND this is the first time step AFTER an au
      ! OR												      ! OR
      ! 2) This is the first time step									      ! 2) This is the first time step
      IF( ( config_flags%auxinput4_interval .NE. 0 .AND. config_flags%io_form_auxinput4 .NE. 0 .	      IF( ( config_flags%auxinput4_interval .NE. 0 .AND. config_flags%io_form_auxinput4 .NE. 0 .
         .OR. grid%itimestep .EQ. 1 ) THEN								         .OR. grid%itimestep .EQ. 1 ) THEN
         												         
         ! if we receive the SST, we need to store it in SST_INPUT					         ! if we receive the SST, we need to store it in SST_INPUT
         llmust_store = .FALSE.										         llmust_store = .FALSE.
         DO jext = 1, grid%num_ext_model_couple_dom							         DO jext = 1, grid%num_ext_model_couple_dom
            llmust_store = llmust_store .OR. cpl_toreceive( grid%id, jext, cpl_get_fldid( 'SST' 	            llmust_store = llmust_store .OR. cpl_toreceive( grid%id, jext, cpl_get_fldid( 'SST' 
         END DO												         END DO
         IF( llmust_store )   grid%sst_input(ips:ipe,jps:jpe) = grid%sst(ips:ipe,jps:jpe)   ! st	         IF( llmust_store )   grid%sst_input(ips:ipe,jps:jpe) = grid%sst(ips:ipe,jps:jpe)   ! st
         												         
         grid%just_read_auxinput4 = .FALSE.  ! the work as been done and not me done again until	         grid%just_read_auxinput4 = .FALSE.  ! the work as been done and not me done again until
      													      
      END IF												      END IF
#endif      												#endif      
 													 
   END SUBROUTINE cpl_store_input									   END SUBROUTINE cpl_store_input


   SUBROUTINE cpl_finalize()										   SUBROUTINE cpl_finalize()
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_finalize  ***							      !!             ***  SUBROUTINE cpl_finalize  ***
      !!												      !!
      !! ** Purpose :   cpl_finalize MPI communications with the coupler				      !! ** Purpose :   cpl_finalize MPI communications with the coupler
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_finalize()						      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_finalize()

   END SUBROUTINE cpl_finalize										   END SUBROUTINE cpl_finalize


   SUBROUTINE cpl_abort( cdroutine, cdtxt )								   SUBROUTINE cpl_abort( cdroutine, cdtxt )
      !!-------------------------------------------------------------------				      !!-------------------------------------------------------------------
      !!             ***  SUBROUTINE cpl_abort  ***							      !!             ***  SUBROUTINE cpl_abort  ***
      !!												      !!
      !! ** Purpose :   abort coupling simulation							      !! ** Purpose :   abort coupling simulation
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------
      CHARACTER(*), INTENT(IN) :: cdroutine   ! name of the subroutine calling cpl_oasis_abort		      CHARACTER(*), INTENT(IN) :: cdroutine   ! name of the subroutine calling cpl_oasis_abort
      CHARACTER(*), INTENT(IN) :: cdtxt       ! aborting text						      CHARACTER(*), INTENT(IN) :: cdtxt       ! aborting text
      !!--------------------------------------------------------------------				      !!--------------------------------------------------------------------

      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_abort( cdroutine, cdtxt )				      IF ( coupler_name == 'oasis' ) CALL cpl_oasis_abort( cdroutine, cdtxt )

   END SUBROUTINE cpl_abort										   END SUBROUTINE cpl_abort


END MODULE module_cpl											END MODULE module_cpl
>                                                 
>=================================================================================
>  frame/module_dm.F
>=================================================================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!							!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!                  W A R N I N G									!!                  W A R N I N G
!!													!!
!!  This is a temporary version of module_dm.F								!!  This is a temporary version of module_dm.F
!!  It has been compied from somewhere else								!!  It has been compied from somewhere else
!!  (If not DM_PARALLEL then this is module_dm_stubs.F;							!!  (If not DM_PARALLEL then this is module_dm_stubs.F;
!!  otherwise, it is from one of the external package							!!  otherwise, it is from one of the external package
!!  directories.)											!!  directories.)
!!													!!
!!                B E   A D V I S E D									!!                B E   A D V I S E D
!!													!!
!!  Changes to this file are liable to be LOST.								!!  Changes to this file are liable to be LOST.
!!													!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!							!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! sed -e "s/grid%mu/gridmu/g" -e "s/grid%Mu/gridMu/g" module_dm.F | cpp -DDM_PARALLEL=1 -DHYBRID   <
#if ( HYBRID_COORD==1 )										   <
#  define gridmu_2(...) (ngrid%c1h(k)*XXPC2HXX(__VA_ARGS__))					   <
#  define XXPC2HXX(...) grid%mu_2(__VA_ARGS__)							   <
												   <
#  define gridmub(...) (ngrid%c1h(k)*XXPCBHXX(__VA_ARGS__)+ngrid%c2h(k))			   <
#  define XXPCBHXX(...) grid%mub(__VA_ARGS__)							   <
												   <
#  define gridMu_2(...) (ngrid%c1f(k)*XXPC2FXX(__VA_ARGS__))					   <
#  define XXPC2FXX(...) grid%Mu_2(__VA_ARGS__)							   <
												   <
#  define gridMub(...) (ngrid%c1f(k)*XXPCBFXX(__VA_ARGS__)+ngrid%c2f(k))			   <
#  define XXPCBFXX(...) grid%Mub(__VA_ARGS__)							   <
#endif												   <
												   <
#if NMM_CORE==1												#if NMM_CORE==1
#define copy_fcnm UpNear										#define copy_fcnm UpNear
#define copy_fcn UpCopy											#define copy_fcn UpCopy
#define interp_fcn DownCopy										#define interp_fcn DownCopy
#define copy_fcni UpINear										#define copy_fcni UpINear
#endif													#endif

#define NEST_FULL_INFLUENCE(A,B) A=B									#define NEST_FULL_INFLUENCE(A,B) A=B
MODULE module_dm											MODULE module_dm

   USE module_machine											   USE module_machine
   USE module_wrf_error											   USE module_wrf_error
   USE module_driver_constants										   USE module_driver_constants
!   USE module_comm_dm											!   USE module_comm_dm
#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
   USE module_cpl, ONLY : coupler_on, cpl_init								   USE module_cpl, ONLY : coupler_on, cpl_init
#endif													#endif

   IMPLICIT NONE											   IMPLICIT NONE
#ifndef STUBMPI											   <
   INCLUDE 'mpif.h'										   <
#else												   <
   INTEGER, PARAMETER :: MPI_UNDEFINED = -1							   <
#endif												   <

#if ( NMM_CORE == 1 ) || ( WRF_CHEM == 1 ) 								#if ( NMM_CORE == 1 ) || ( WRF_CHEM == 1 ) 
   INTEGER, PARAMETER :: max_halo_width = 6								   INTEGER, PARAMETER :: max_halo_width = 6
#else													#else
   INTEGER, PARAMETER :: max_halo_width = 6 ! 5								   INTEGER, PARAMETER :: max_halo_width = 6 ! 5
#endif													#endif

   INTEGER :: ips_save, ipe_save, jps_save, jpe_save, itrace						   INTEGER :: ips_save, ipe_save, jps_save, jpe_save, itrace
   INTEGER :: lats_to_mic, minx, miny									   INTEGER :: lats_to_mic, minx, miny

   INTEGER :: communicator_stack_cursor = 0							   <
   INTEGER :: current_id  = 1									   <
   INTEGER, DIMENSION(max_domains) ::  ntasks_stack, ntasks_y_stack          &			   <
                                     , ntasks_x_stack, mytask_stack          &			   <
                                     , mytask_x_stack, mytask_y_stack        &			   <
                                     , id_stack                            			   <
   INTEGER, DIMENSION(max_domains) ::  ntasks_store, ntasks_y_store          &			   <
                                     , ntasks_x_store, mytask_store          &			   <
                                     , mytask_x_store, mytask_y_store      			   <
   INTEGER ntasks, ntasks_y, ntasks_x, mytask, mytask_x, mytask_y					   INTEGER ntasks, ntasks_y, ntasks_x, mytask, mytask_x, mytask_y
												   |	   INTEGER local_communicator, local_communicator_periodic, local_iocommunicator
   INTEGER, DIMENSION(max_domains) :: local_communicator_stack, local_communicator_periodic_stac   |	   INTEGER local_communicator_x, local_communicator_y ! subcommunicators for rows and cols of me
                                     ,local_iocommunicator_stack                                   <
                                     ,local_communicator_x_stack, local_communicator_y_stack	   <
   INTEGER, DIMENSION(max_domains) :: local_communicator_store, local_communicator_periodic_stor   <
                                     ,local_iocommunicator_store                                   <
                                     ,local_communicator_x_store, local_communicator_y_store	   <
												   <
   INTEGER :: mpi_comm_allcompute         = MPI_UNDEFINED					   <
   INTEGER :: local_communicator          = MPI_UNDEFINED					   <
   INTEGER :: local_communicator_periodic = MPI_UNDEFINED					   <
   INTEGER :: local_iocommunicator        = MPI_UNDEFINED					   <
   INTEGER :: local_communicator_x        = MPI_UNDEFINED					   <
   INTEGER :: local_communicator_y        = MPI_UNDEFINED ! subcommunicators for rows and cols o   <
   INTEGER :: local_quilt_comm            = MPI_UNDEFINED ! added 20151212 jm			   <
   LOGICAL :: dm_debug_flag = .FALSE.									   LOGICAL :: dm_debug_flag = .FALSE.
! for parallel nesting, 201408, jm								   <
   INTEGER intercomm_to_mom( max_domains ), intercomm_to_kid( max_nests, max_domains )		   <
   INTEGER mpi_comm_to_mom( max_domains ), mpi_comm_to_kid( max_nests, max_domains )		   <
   INTEGER which_kid(max_domains), nkids(max_domains)						   <
   INTEGER nest_task_offsets(max_domains)							   <
   LOGICAL intercomm_active( max_domains )							   <
   LOGICAL domain_active_this_task( max_domains )						   <
! see comments below (search for "Communicator definition")					   <
   INTEGER tasks_per_split									   <
   INTEGER comm_start(max_domains)   ! set in dm_task_split					   <
!   INTEGER comm_pes  (max_domains)   ! either this may be set in dm_task_split			   <
!   INTEGER comm_pes_x(max_domains)   ! or these may be set in dm_task_split			   <
!   INTEGER comm_pes_y(max_domains)   ! "    "   may be set in dm_task_split			   <
!   INTEGER comm_domain(max_domains)  ! set in dm_task_split					   <
   INTEGER nest_pes_x(max_domains)   ! set in dm_task_split					   <
   INTEGER nest_pes_y(max_domains)   ! set in dm_task_split					   <
   INTEGER comms_i_am_in (max_domains)  ! list of local communicators this task is a member of	   <
   INTEGER loc_comm(max_domains)								   <
   LOGICAL poll_servers										   <
   INTEGER nio_tasks_per_group(max_domains), nio_groups, num_io_tasks				   <
   NAMELIST /dm_task_split/ tasks_per_split, comm_start, nest_pes_x, nest_pes_y			   <
   NAMELIST /namelist_quilt/ nio_tasks_per_group, nio_groups, poll_servers			   <
												   <

#if (DA_CORE == 1)											#if (DA_CORE == 1)
   integer :: c_ipsy, c_ipey, c_kpsy, c_kpey, c_kpsx, c_kpex, c_ipex, c_ipsx, c_jpex, c_jpsx, c_	   integer :: c_ipsy, c_ipey, c_kpsy, c_kpey, c_kpsx, c_kpex, c_ipex, c_ipsx, c_jpex, c_jpsx, c_
   integer :: c_imsy, c_imey, c_kmsy, c_kmey, c_kmsx, c_kmex, c_imex, c_imsx, c_jmex, c_jmsx, c_	   integer :: c_imsy, c_imey, c_kmsy, c_kmey, c_kmsx, c_kmex, c_imex, c_imsx, c_jmex, c_jmsx, c_
   integer :: k 											   integer :: k 
#endif													#endif

   INTERFACE wrf_dm_maxval										   INTERFACE wrf_dm_maxval
#if ( defined(PROMOTE_FLOAT) || ( RWORDSIZE == DWORDSIZE ) )						#if ( defined(PROMOTE_FLOAT) || ( RWORDSIZE == DWORDSIZE ) )
     MODULE PROCEDURE wrf_dm_maxval_real , wrf_dm_maxval_integer					     MODULE PROCEDURE wrf_dm_maxval_real , wrf_dm_maxval_integer
#else													#else
     MODULE PROCEDURE wrf_dm_maxval_real , wrf_dm_maxval_integer, wrf_dm_maxval_doubleprecision		     MODULE PROCEDURE wrf_dm_maxval_real , wrf_dm_maxval_integer, wrf_dm_maxval_doubleprecision
#endif													#endif
   END INTERFACE											   END INTERFACE

   INTERFACE wrf_dm_minval                       ! gopal's doing					   INTERFACE wrf_dm_minval                       ! gopal's doing
#if ( defined(PROMOTE_FLOAT) || ( RWORDSIZE == DWORDSIZE ) )						#if ( defined(PROMOTE_FLOAT) || ( RWORDSIZE == DWORDSIZE ) )
     MODULE PROCEDURE wrf_dm_minval_real , wrf_dm_minval_integer					     MODULE PROCEDURE wrf_dm_minval_real , wrf_dm_minval_integer
#else													#else
     MODULE PROCEDURE wrf_dm_minval_real , wrf_dm_minval_integer, wrf_dm_minval_doubleprecision		     MODULE PROCEDURE wrf_dm_minval_real , wrf_dm_minval_integer, wrf_dm_minval_doubleprecision
#endif													#endif
   END INTERFACE											   END INTERFACE

CONTAINS												CONTAINS

   SUBROUTINE MPASPECT( P, MINM, MINN, PROCMIN_M, PROCMIN_N )
      IMPLICIT NONE											   SUBROUTINE MPASPECT( P, MINM, MINN, PROCMIN_M, PROCMIN_N )
      INTEGER P, M, N, MINI, MINM, MINN, PROCMIN_M, PROCMIN_N						      IMPLICIT NONE
      MINI = 2*P											      INTEGER P, M, N, MINI, MINM, MINN, PROCMIN_M, PROCMIN_N
      MINM = 1												      MINI = 2*P
      MINN = P												      MINM = 1
      DO M = 1, P											      MINN = P
        IF ( MOD( P, M ) .EQ. 0 ) THEN									      DO M = 1, P
          N = P / M											        IF ( MOD( P, M ) .EQ. 0 ) THEN
          IF ( ABS(M-N) .LT. MINI                &							          N = P / M
               .AND. M .GE. PROCMIN_M            &							          IF ( ABS(M-N) .LT. MINI                &
               .AND. N .GE. PROCMIN_N            &							               .AND. M .GE. PROCMIN_M            &
             ) THEN											               .AND. N .GE. PROCMIN_N            &
            MINI = ABS(M-N)										             ) THEN
            MINM = M											            MINI = ABS(M-N)
            MINN = N											            MINM = M
          END IF											            MINN = N
        END IF												          ENDIF
      END DO												        ENDIF
      IF ( MINM .LT. PROCMIN_M .OR. MINN .LT. PROCMIN_N ) THEN						      ENDDO
        WRITE( wrf_err_message , * )'MPASPECT: UNABLE TO GENERATE PROCESSOR MESH.  STOPPING.'		      IF ( MINM .LT. PROCMIN_M .OR. MINN .LT. PROCMIN_N ) THEN
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )'MPASPECT: UNABLE TO GENERATE PROCESSOR MESH.  STOPPING.'
        WRITE( wrf_err_message , * )' PROCMIN_M ', PROCMIN_M						        CALL wrf_message ( TRIM ( wrf_err_message ) )
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )' PROCMIN_M ', PROCMIN_M
        WRITE( wrf_err_message , * )' PROCMIN_N ', PROCMIN_N						        CALL wrf_message ( TRIM ( wrf_err_message ) )
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )' PROCMIN_N ', PROCMIN_N
        WRITE( wrf_err_message , * )' P         ', P							        CALL wrf_message ( TRIM ( wrf_err_message ) )
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )' P         ', P
        WRITE( wrf_err_message , * )' MINM      ', MINM							        CALL wrf_message ( TRIM ( wrf_err_message ) )
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )' MINM      ', MINM
        WRITE( wrf_err_message , * )' MINN      ', MINN							        CALL wrf_message ( TRIM ( wrf_err_message ) )
        CALL wrf_message ( TRIM ( wrf_err_message ) )							        WRITE( wrf_err_message , * )' MINN      ', MINN
        CALL wrf_error_fatal ( 'module_dm: mpaspect' )							        CALL wrf_message ( TRIM ( wrf_err_message ) )
      END IF												        CALL wrf_error_fatal ( 'module_dm: mpaspect' )
   RETURN												      ENDIF
   END SUBROUTINE MPASPECT										   RETURN
													   END SUBROUTINE MPASPECT
   SUBROUTINE compute_mesh( ntasks , ntasks_x, ntasks_y )
     IMPLICIT NONE											   SUBROUTINE compute_mesh( ntasks , ntasks_x, ntasks_y )
     INTEGER, INTENT(IN)  :: ntasks									     IMPLICIT NONE
     INTEGER, INTENT(OUT) :: ntasks_x, ntasks_y								     INTEGER, INTENT(IN)  :: ntasks
     INTEGER lats_to_mic										     INTEGER, INTENT(OUT) :: ntasks_x, ntasks_y
     CALL nl_get_nproc_x ( 1, ntasks_x )								     INTEGER lats_to_mic
     CALL nl_get_nproc_y ( 1, ntasks_y )								     CALL nl_get_nproc_x ( 1, ntasks_x )
#ifndef NMM_CORE											     CALL nl_get_nproc_y ( 1, ntasks_y )
     CALL nl_get_lats_to_mic ( 1, lats_to_mic )								#ifndef NMM_CORE
#endif													     CALL nl_get_lats_to_mic ( 1, lats_to_mic )
! check if user has specified in the namelist								#endif
     IF ( ntasks_x .GT. 0 .OR. ntasks_y .GT. 0 ) THEN							! check if user has specified in the namelist
       ! if only ntasks_x is specified then make it 1-d decomp in i					     IF ( ntasks_x .GT. 0 .OR. ntasks_y .GT. 0 ) THEN
       IF      ( ntasks_x .GT. 0 .AND. ntasks_y .EQ. -1 ) THEN						       ! if only ntasks_x is specified then make it 1-d decomp in i
         ntasks_y = ntasks / ntasks_x									       IF      ( ntasks_x .GT. 0 .AND. ntasks_y .EQ. -1 ) THEN
       ! if only ntasks_y is specified then make it 1-d decomp in j					         ntasks_y = ntasks / ntasks_x
       ELSE IF ( ntasks_x .EQ. -1 .AND. ntasks_y .GT. 0 ) THEN						       ! if only ntasks_y is specified then make it 1-d decomp in j
         ntasks_x = ntasks / ntasks_y									       ELSE IF ( ntasks_x .EQ. -1 .AND. ntasks_y .GT. 0 ) THEN
       END IF												         ntasks_x = ntasks / ntasks_y
       ! make sure user knows what they're doing							       ENDIF
       IF ( ntasks_x * ntasks_y .NE. ntasks ) THEN							       ! make sure user knows what they're doing
         WRITE( wrf_err_message , * )'WRF_DM_INITIALIZE (RSL_LITE): nproc_x * nproc_y in namelis	       IF ( ntasks_x * ntasks_y .NE. ntasks ) THEN
         CALL wrf_error_fatal ( wrf_err_message )							         WRITE( wrf_err_message , * )'WRF_DM_INITIALIZE (RSL_LITE): nproc_x * nproc_y in namelis
       END IF												         CALL wrf_error_fatal ( wrf_err_message )
#ifndef NMM_CORE											       ENDIF
     ELSE IF ( lats_to_mic .GT. 0 ) THEN								#ifndef NMM_CORE
       ntasks_x = ntasks / 2										     ELSE IF ( lats_to_mic .GT. 0 ) THEN
       ntasks_y = 2											       ntasks_x = ntasks / 2
       IF ( ntasks_x * ntasks_y .NE. ntasks ) THEN							       ntasks_y = 2
         WRITE( wrf_err_message , * )&									       IF ( ntasks_x * ntasks_y .NE. ntasks ) THEN
           'WRF_DM_INITIALIZE (lats_to_mic > 0) nproc_x (',ntasks_x,')* nproc_y (',ntasks_y,&		         WRITE( wrf_err_message , * )&
           ') in namelist ne ',ntasks									           'WRF_DM_INITIALIZE (lats_to_mic > 0) nproc_x (',ntasks_x,')* nproc_y (',ntasks_y,&
         CALL wrf_error_fatal ( wrf_err_message )							           ') in namelist ne ',ntasks
       END IF												         CALL wrf_error_fatal ( wrf_err_message )
#endif													       ENDIF
     ELSE												#endif
       ! When neither is specified, work out mesh with MPASPECT						     ELSE
       ! Pass nproc_ln and nproc_nt so that number of procs in						       ! When neither is specified, work out mesh with MPASPECT
       ! i-dim (nproc_ln) is equal or lesser.								       ! Pass nproc_ln and nproc_nt so that number of procs in
       CALL mpaspect ( ntasks, ntasks_x, ntasks_y, 1, 1 )						       ! i-dim (nproc_ln) is equal or lesser.
     END IF												       CALL mpaspect ( ntasks, ntasks_x, ntasks_y, 1, 1 )
												   )	     ENDIF
     ntasks_store(1) = ntasks									   <
     ntasks_x_store(1) = ntasks_x								   <
     ntasks_y_store(1) = ntasks_y								   <
   END SUBROUTINE compute_mesh										   END SUBROUTINE compute_mesh

   SUBROUTINE wrf_dm_initialize										   SUBROUTINE wrf_dm_initialize
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
      INTEGER :: local_comm_per, local_comm_x, local_comm_y, local_comm2, new_local_comm, group,   |	      INCLUDE 'mpif.h'
												   >	      INTEGER :: local_comm, local_comm2, new_local_comm, group, newgroup, p, p1, ierr
      INTEGER, ALLOCATABLE, DIMENSION(:) :: ranks							      INTEGER, ALLOCATABLE, DIMENSION(:) :: ranks
      INTEGER comdup											      INTEGER comdup
      INTEGER, DIMENSION(2) :: dims, coords								      INTEGER, DIMENSION(2) :: dims, coords
      LOGICAL, DIMENSION(2) :: isperiodic								      LOGICAL, DIMENSION(2) :: isperiodic
      LOGICAL :: reorder_mesh										      LOGICAL :: reorder_mesh

      CALL instate_communicators_for_domain(1)							   |	      CALL wrf_get_dm_communicator ( local_comm )
												   >	      CALL mpi_comm_size( local_comm, ntasks, ierr )
												   >	      CALL nl_get_reorder_mesh( 1, reorder_mesh )
												   >	      CALL compute_mesh( ntasks, ntasks_x, ntasks_y )
												   >	      WRITE( wrf_err_message , * )'Ntasks in X ',ntasks_x,', ntasks in Y ',ntasks_y
												   >	      CALL wrf_message( wrf_err_message )

      CALL wrf_get_dm_communicator ( new_local_comm )						   |	      CALL mpi_comm_rank( local_comm, mytask, ierr )
      dims(1) = nest_pes_y(1)  ! rows								   |	! extra code to reorder the communicator 20051212jm
      dims(2) = nest_pes_x(1)  ! columns							   |	      IF ( reorder_mesh ) THEN
												   >	        ALLOCATE (ranks(ntasks))
												   >	        CALL mpi_comm_dup ( local_comm , local_comm2, ierr )
												   >	        CALL mpi_comm_group ( local_comm2, group, ierr )
												   >	        DO p1=1,ntasks
												   >	          p = p1 - 1
												   >	          ranks(p1) = mod( p , ntasks_x ) * ntasks_y + p / ntasks_x  
												   >	        ENDDO
												   >	        CALL mpi_group_incl( group, ntasks, ranks, newgroup, ierr )
												   >	        DEALLOCATE (ranks)
												   >	        CALL mpi_comm_create( local_comm2, newgroup, new_local_comm , ierr )
												   >	      ELSE
												   >	        new_local_comm = local_comm
												   >	      ENDIF
												   >	! end extra code to reorder the communicator 20051212jm
												   >	      dims(1) = ntasks_y  ! rows
												   >	      dims(2) = ntasks_x  ! columns
												   >	      isperiodic(1) = .false.
												   >	      isperiodic(2) = .false.
												   >	      CALL mpi_cart_create( new_local_comm, 2, dims, isperiodic, .false., local_communicator, ie
												   >	      dims(1) = ntasks_y  ! rows
												   >	      dims(2) = ntasks_x  ! columns
      isperiodic(1) = .true.										      isperiodic(1) = .true.
      isperiodic(2) = .true.										      isperiodic(2) = .true.
      CALL mpi_cart_create( new_local_comm, 2, dims, isperiodic, .false., local_comm_per, ierr )   |	      CALL mpi_cart_create( new_local_comm, 2, dims, isperiodic, .false., local_communicator_per
      local_communicator_periodic_store(1) = local_comm_per					   |	! debug
! set all the domains' periodic communicators to this one <- kludge, 20151223, splitting domains   |	      CALL mpi_comm_rank( local_communicator_periodic, mytask, ierr )
      local_communicator_periodic_store = local_comm_per					   |	      CALL mpi_cart_coords( local_communicator_periodic, mytask, 2, coords, ierr )
      local_communicator_periodic = local_comm_per						   |	!        write(0,*)'periodic coords ',mytask, coords
												   >
												   >	      CALL mpi_comm_rank( local_communicator, mytask, ierr )
												   >	      CALL mpi_cart_coords( local_communicator, mytask, 2, coords, ierr )
												   >	!        write(0,*)'non periodic coords ',mytask, coords
												   >	      mytask_x = coords(2)   ! col task (x)
												   >	      mytask_y = coords(1)   ! row task (y)
												   >	      CALL nl_set_nproc_x ( 1, ntasks_x )
												   >	      CALL nl_set_nproc_y ( 1, ntasks_y )

												   >	! 20061228 set up subcommunicators for processors in X, Y coords of mesh
												   >	! note that local_comm_x has all the processors in a row (X=0:nproc_x-1);
												   >	! in other words, local_comm_x has all the processes with the same rank in Y
												   >	      CALL MPI_Comm_dup( new_local_comm, comdup, ierr )
												   >	      IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_dup fails in 20061228 mod')
												   >	      CALL MPI_Comm_split(comdup,mytask_y,mytask,local_communicator_x,ierr)
												   >	      IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_split fails for x in 20061228 mod')
												   >	      CALL MPI_Comm_split(comdup,mytask_x,mytask,local_communicator_y,ierr)
												   >	      IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_split fails for y in 20061228 mod')
												   >	! end 20061228
												   >	      CALL wrf_set_dm_communicator ( local_communicator )
#else													#else
      ntasks = 1											      ntasks = 1
      ntasks_x = 1											      ntasks_x = 1
      ntasks_y = 1											      ntasks_y = 1
      mytask = 0											      mytask = 0
      mytask_x = 0											      mytask_x = 0
      mytask_y = 0											      mytask_y = 0
      nest_pes_x = 1										   <
      nest_pes_y = 1										   <
      intercomm_active = .TRUE.									   <
      domain_active_this_task = .TRUE.								   <
#endif													#endif
      CALL nl_set_nproc_x ( 1, ntasks_x )							   |
      CALL nl_set_nproc_y ( 1, ntasks_y )							   <
      WRITE( wrf_err_message , * )'Ntasks in X ',ntasks_x,', ntasks in Y ',ntasks_y		   <
      CALL wrf_message( wrf_err_message )							   <
      RETURN												      RETURN
   END SUBROUTINE wrf_dm_initialize									   END SUBROUTINE wrf_dm_initialize

   SUBROUTINE get_dm_max_halo_width( id, width )							   SUBROUTINE get_dm_max_halo_width( id, width )
     IMPLICIT NONE											     IMPLICIT NONE
     INTEGER, INTENT(IN) :: id										     INTEGER, INTENT(IN) :: id
     INTEGER, INTENT(OUT) :: width									     INTEGER, INTENT(OUT) :: width
     IF ( id .EQ. 1 ) THEN   ! this is coarse domain							     IF ( id .EQ. 1 ) THEN   ! this is coarse domain
       width = max_halo_width										       width = max_halo_width
     ELSE												     ELSE
       width = max_halo_width + 3									       width = max_halo_width + 3
     END IF												     ENDIF
     RETURN												     RETURN
   END SUBROUTINE get_dm_max_halo_width									   END SUBROUTINE get_dm_max_halo_width

   SUBROUTINE patch_domain_rsl_lite( id  , parent, parent_id, &						   SUBROUTINE patch_domain_rsl_lite( id  , parent, parent_id, &
                                sd1 , ed1 , sp1 , ep1 , sm1 , em1 ,        &				                                sd1 , ed1 , sp1 , ep1 , sm1 , em1 ,        &
                                sd2 , ed2 , sp2 , ep2 , sm2 , em2 ,        &				                                sd2 , ed2 , sp2 , ep2 , sm2 , em2 ,        &
                                sd3 , ed3 , sp3 , ep3 , sm3 , em3 ,        &				                                sd3 , ed3 , sp3 , ep3 , sm3 , em3 ,        &
                                      sp1x , ep1x , sm1x , em1x , &					                                      sp1x , ep1x , sm1x , em1x , &
                                      sp2x , ep2x , sm2x , em2x , &					                                      sp2x , ep2x , sm2x , em2x , &
                                      sp3x , ep3x , sm3x , em3x , &					                                      sp3x , ep3x , sm3x , em3x , &
                                      sp1y , ep1y , sm1y , em1y , &					                                      sp1y , ep1y , sm1y , em1y , &
                                      sp2y , ep2y , sm2y , em2y , &					                                      sp2y , ep2y , sm2y , em2y , &
                                      sp3y , ep3y , sm3y , em3y , &					                                      sp3y , ep3y , sm3y , em3y , &
                                bdx , bdy )								                                bdx , bdy )

#if ( ( defined(SGIALTIX) || defined(FUJITSU_FX10) || defined(KEEP_INT_AROUND) ) && (! defined(M   |	#if ( defined(SGIALTIX) && (! defined(MOVE_NESTS) ) ) || ( defined(FUJITSU_FX10) && (! defined(M
      USE module_domain, ONLY : domain, head_grid, find_grid_by_id, alloc_space_field			      USE module_domain, ONLY : domain, head_grid, find_grid_by_id, alloc_space_field
#else													#else
      USE module_domain, ONLY : domain, head_grid, find_grid_by_id					      USE module_domain, ONLY : domain, head_grid, find_grid_by_id
#endif													#endif

      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER, INTENT(IN)   :: sd1 , ed1 , sd2 , ed2 , sd3 , ed3 , bdx , bdy				      INTEGER, INTENT(IN)   :: sd1 , ed1 , sd2 , ed2 , sd3 , ed3 , bdx , bdy
      INTEGER, INTENT(OUT)  :: sp1 , ep1 , sp2 , ep2 , sp3 , ep3 , &					      INTEGER, INTENT(OUT)  :: sp1 , ep1 , sp2 , ep2 , sp3 , ep3 , &
                               sm1 , em1 , sm2 , em2 , sm3 , em3					                               sm1 , em1 , sm2 , em2 , sm3 , em3
      INTEGER, INTENT(OUT)  :: sp1x , ep1x , sp2x , ep2x , sp3x , ep3x , &				      INTEGER, INTENT(OUT)  :: sp1x , ep1x , sp2x , ep2x , sp3x , ep3x , &
                               sm1x , em1x , sm2x , em2x , sm3x , em3x					                               sm1x , em1x , sm2x , em2x , sm3x , em3x
      INTEGER, INTENT(OUT)  :: sp1y , ep1y , sp2y , ep2y , sp3y , ep3y , &				      INTEGER, INTENT(OUT)  :: sp1y , ep1y , sp2y , ep2y , sp3y , ep3y , &
                               sm1y , em1y , sm2y , em2y , sm3y , em3y					                               sm1y , em1y , sm2y , em2y , sm3y , em3y
      INTEGER, INTENT(IN)   :: id, parent_id								      INTEGER, INTENT(IN)   :: id, parent_id
      TYPE(domain),POINTER  :: parent									      TYPE(domain),POINTER  :: parent

! Local variables											! Local variables
      INTEGER               :: ids, ide, jds, jde, kds, kde						      INTEGER               :: ids, ide, jds, jde, kds, kde
      INTEGER               :: ims, ime, jms, jme, kms, kme						      INTEGER               :: ims, ime, jms, jme, kms, kme
      INTEGER               :: ips, ipe, jps, jpe, kps, kpe						      INTEGER               :: ips, ipe, jps, jpe, kps, kpe
      INTEGER               :: imsx, imex, jmsx, jmex, kmsx, kmex					      INTEGER               :: imsx, imex, jmsx, jmex, kmsx, kmex
      INTEGER               :: ipsx, ipex, jpsx, jpex, kpsx, kpex					      INTEGER               :: ipsx, ipex, jpsx, jpex, kpsx, kpex
      INTEGER               :: imsy, imey, jmsy, jmey, kmsy, kmey					      INTEGER               :: imsy, imey, jmsy, jmey, kmsy, kmey
      INTEGER               :: ipsy, ipey, jpsy, jpey, kpsy, kpey					      INTEGER               :: ipsy, ipey, jpsy, jpey, kpsy, kpey

      INTEGER               :: c_sd1 , c_ed1 , c_sd2 , c_ed2 , c_sd3 , c_ed3				      INTEGER               :: c_sd1 , c_ed1 , c_sd2 , c_ed2 , c_sd3 , c_ed3
      INTEGER               :: c_sp1 , c_ep1 , c_sp2 , c_ep2 , c_sp3 , c_ep3 , &			      INTEGER               :: c_sp1 , c_ep1 , c_sp2 , c_ep2 , c_sp3 , c_ep3 , &
                               c_sm1 , c_em1 , c_sm2 , c_em2 , c_sm3 , c_em3				                               c_sm1 , c_em1 , c_sm2 , c_em2 , c_sm3 , c_em3
      INTEGER               :: c_sp1x , c_ep1x , c_sp2x , c_ep2x , c_sp3x , c_ep3x , &			      INTEGER               :: c_sp1x , c_ep1x , c_sp2x , c_ep2x , c_sp3x , c_ep3x , &
                               c_sm1x , c_em1x , c_sm2x , c_em2x , c_sm3x , c_em3x			                               c_sm1x , c_em1x , c_sm2x , c_em2x , c_sm3x , c_em3x
      INTEGER               :: c_sp1y , c_ep1y , c_sp2y , c_ep2y , c_sp3y , c_ep3y , &			      INTEGER               :: c_sp1y , c_ep1y , c_sp2y , c_ep2y , c_sp3y , c_ep3y , &
                               c_sm1y , c_em1y , c_sm2y , c_em2y , c_sm3y , c_em3y			                               c_sm1y , c_em1y , c_sm2y , c_em2y , c_sm3y , c_em3y

      INTEGER               :: c_ids, c_ide, c_jds, c_jde, c_kds, c_kde					      INTEGER               :: c_ids, c_ide, c_jds, c_jde, c_kds, c_kde
      INTEGER               :: c_ims, c_ime, c_jms, c_jme, c_kms, c_kme					      INTEGER               :: c_ims, c_ime, c_jms, c_jme, c_kms, c_kme
      INTEGER               :: c_ips, c_ipe, c_jps, c_jpe, c_kps, c_kpe					      INTEGER               :: c_ips, c_ipe, c_jps, c_jpe, c_kps, c_kpe

      INTEGER               :: idim , jdim , kdim , rem , a, b						      INTEGER               :: idim , jdim , kdim , rem , a, b
      INTEGER               :: i, j, ni, nj, Px, Py, P							      INTEGER               :: i, j, ni, nj, Px, Py, P

      INTEGER               :: parent_grid_ratio, i_parent_start, j_parent_start			      INTEGER               :: parent_grid_ratio, i_parent_start, j_parent_start
      INTEGER               :: shw									      INTEGER               :: shw
      INTEGER               :: idim_cd, jdim_cd, ierr							      INTEGER               :: idim_cd, jdim_cd, ierr
      INTEGER               :: max_dom									      INTEGER               :: max_dom

#if (DA_CORE == 1)											#if (DA_CORE == 1)
      INTEGER               :: e_we, e_sn 								      INTEGER               :: e_we, e_sn 
#endif													#endif

      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER  :: nest_grid								      TYPE(domain), POINTER  :: nest_grid
      CHARACTER*256   :: mess										      CHARACTER*256   :: mess

      INTEGER parent_max_halo_width									      INTEGER parent_max_halo_width
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width
      INTEGER lats_to_mic										      INTEGER lats_to_mic

     lats_to_mic=0											     lats_to_mic=0
#ifndef NMM_CORE											#ifndef NMM_CORE
     CALL nl_get_lats_to_mic( 1, lats_to_mic )								     CALL nl_get_lats_to_mic( 1, lats_to_mic )
#endif													#endif
      IF ( lats_to_mic .GT. 0 ) THEN									      IF ( lats_to_mic .GT. 0 ) THEN
        minx = -99  ! code to task_for_point to do split decomposition over MIC and host		        minx = -99  ! code to task_for_point to do split decomposition over MIC and host
        miny = lats_to_mic  ! number of latitudes that should be assigned to MIC			        miny = lats_to_mic  ! number of latitudes that should be assigned to MIC
      ELSE												      ELSE
        minx = 1   ! normal										        minx = 1   ! normal
        miny = 1   ! normal										        miny = 1   ! normal
      END IF												      ENDIF



      SELECT CASE ( model_data_order )									      SELECT CASE ( model_data_order )
         ! need to finish other cases									         ! need to finish other cases
         CASE ( DATA_ORDER_ZXY )									         CASE ( DATA_ORDER_ZXY )
            ids = sd2 ; ide = ed2 									            ids = sd2 ; ide = ed2 
            jds = sd3 ; jde = ed3 									            jds = sd3 ; jde = ed3 
            kds = sd1 ; kde = ed1 									            kds = sd1 ; kde = ed1 
         CASE ( DATA_ORDER_XYZ )									         CASE ( DATA_ORDER_XYZ )
            ids = sd1 ; ide = ed1 									            ids = sd1 ; ide = ed1 
            jds = sd2 ; jde = ed2 									            jds = sd2 ; jde = ed2 
            kds = sd3 ; kde = ed3 									            kds = sd3 ; kde = ed3 
         CASE ( DATA_ORDER_XZY )									         CASE ( DATA_ORDER_XZY )
            ids = sd1 ; ide = ed1 									            ids = sd1 ; ide = ed1 
            jds = sd3 ; jde = ed3 									            jds = sd3 ; jde = ed3 
            kds = sd2 ; kde = ed2 									            kds = sd2 ; kde = ed2 
         CASE ( DATA_ORDER_YXZ)										         CASE ( DATA_ORDER_YXZ)
            ids = sd2 ; ide = ed2 									            ids = sd2 ; ide = ed2 
            jds = sd1 ; jde = ed1 									            jds = sd1 ; jde = ed1 
            kds = sd3 ; kde = ed3 									            kds = sd3 ; kde = ed3 
      END SELECT											      END SELECT

      CALL nl_get_max_dom( 1 , max_dom )								      CALL nl_get_max_dom( 1 , max_dom )

      CALL get_dm_max_halo_width( id , thisdomain_max_halo_width )					      CALL get_dm_max_halo_width( id , thisdomain_max_halo_width )
      IF ( id .GT. 1 ) THEN										      IF ( id .GT. 1 ) THEN
        CALL get_dm_max_halo_width( parent%id , parent_max_halo_width )					        CALL get_dm_max_halo_width( parent%id , parent_max_halo_width )
      END IF												      ENDIF

      CALL compute_memory_dims_rsl_lite ( id, thisdomain_max_halo_width, 0 , bdx, bdy,   &		      CALL compute_memory_dims_rsl_lite ( id, thisdomain_max_halo_width, 0 , bdx, bdy,   &
                   ids,  ide,  jds,  jde,  kds,  kde, &							                   ids,  ide,  jds,  jde,  kds,  kde, &
                   ims,  ime,  jms,  jme,  kms,  kme, &							                   ims,  ime,  jms,  jme,  kms,  kme, &
                   imsx, imex, jmsx, jmex, kmsx, kmex, &						                   imsx, imex, jmsx, jmex, kmsx, kmex, &
                   imsy, imey, jmsy, jmey, kmsy, kmey, &						                   imsy, imey, jmsy, jmey, kmsy, kmey, &
                   ips,  ipe,  jps,  jpe,  kps,  kpe, &							                   ips,  ipe,  jps,  jpe,  kps,  kpe, &
                   ipsx, ipex, jpsx, jpex, kpsx, kpex, &						                   ipsx, ipex, jpsx, jpex, kpsx, kpex, &
                   ipsy, ipey, jpsy, jpey, kpsy, kpey )							                   ipsy, ipey, jpsy, jpey, kpsy, kpey )

     ! ensure that the every parent domain point has a full set of nested points under it		     ! ensure that the every parent domain point has a full set of nested points under it
     ! even at the borders. Do this by making sure the number of nest points is a multiple of		     ! even at the borders. Do this by making sure the number of nest points is a multiple of
     ! the nesting ratio. Note that this is important mostly to the intermediate domain, which		     ! the nesting ratio. Note that this is important mostly to the intermediate domain, which
     ! is the subject of the scatter gather comms with the parent					     ! is the subject of the scatter gather comms with the parent

      IF ( id .GT. 1 ) THEN										      IF ( id .GT. 1 ) THEN
         CALL nl_get_parent_grid_ratio( id, parent_grid_ratio )						         CALL nl_get_parent_grid_ratio( id, parent_grid_ratio )
         if ( mod(ime,parent_grid_ratio) .NE. 0 ) ime = ime + parent_grid_ratio - mod(ime,parent	         if ( mod(ime,parent_grid_ratio) .NE. 0 ) ime = ime + parent_grid_ratio - mod(ime,parent
         if ( mod(jme,parent_grid_ratio) .NE. 0 ) jme = jme + parent_grid_ratio - mod(jme,parent	         if ( mod(jme,parent_grid_ratio) .NE. 0 ) jme = jme + parent_grid_ratio - mod(jme,parent
      END IF												      ENDIF

      SELECT CASE ( model_data_order )									      SELECT CASE ( model_data_order )
         CASE ( DATA_ORDER_ZXY )									         CASE ( DATA_ORDER_ZXY )
            sp2 = ips ; ep2 = ipe ; sm2 = ims ; em2 = ime						            sp2 = ips ; ep2 = ipe ; sm2 = ims ; em2 = ime
            sp3 = jps ; ep3 = jpe ; sm3 = jms ; em3 = jme						            sp3 = jps ; ep3 = jpe ; sm3 = jms ; em3 = jme
            sp1 = kps ; ep1 = kpe ; sm1 = kms ; em1 = kme						            sp1 = kps ; ep1 = kpe ; sm1 = kms ; em1 = kme
            sp2x = ipsx ; ep2x = ipex ; sm2x = imsx ; em2x = imex					            sp2x = ipsx ; ep2x = ipex ; sm2x = imsx ; em2x = imex
            sp3x = jpsx ; ep3x = jpex ; sm3x = jmsx ; em3x = jmex					            sp3x = jpsx ; ep3x = jpex ; sm3x = jmsx ; em3x = jmex
            sp1x = kpsx ; ep1x = kpex ; sm1x = kmsx ; em1x = kmex					            sp1x = kpsx ; ep1x = kpex ; sm1x = kmsx ; em1x = kmex
            sp2y = ipsy ; ep2y = ipey ; sm2y = imsy ; em2y = imey					            sp2y = ipsy ; ep2y = ipey ; sm2y = imsy ; em2y = imey
            sp3y = jpsy ; ep3y = jpey ; sm3y = jmsy ; em3y = jmey					            sp3y = jpsy ; ep3y = jpey ; sm3y = jmsy ; em3y = jmey
            sp1y = kpsy ; ep1y = kpey ; sm1y = kmsy ; em1y = kmey					            sp1y = kpsy ; ep1y = kpey ; sm1y = kmsy ; em1y = kmey
         CASE ( DATA_ORDER_ZYX )									         CASE ( DATA_ORDER_ZYX )
            sp3 = ips ; ep3 = ipe ; sm3 = ims ; em3 = ime						            sp3 = ips ; ep3 = ipe ; sm3 = ims ; em3 = ime
            sp2 = jps ; ep2 = jpe ; sm2 = jms ; em2 = jme						            sp2 = jps ; ep2 = jpe ; sm2 = jms ; em2 = jme
            sp1 = kps ; ep1 = kpe ; sm1 = kms ; em1 = kme						            sp1 = kps ; ep1 = kpe ; sm1 = kms ; em1 = kme
            sp3x = ipsx ; ep3x = ipex ; sm3x = imsx ; em3x = imex					            sp3x = ipsx ; ep3x = ipex ; sm3x = imsx ; em3x = imex
            sp2x = jpsx ; ep2x = jpex ; sm2x = jmsx ; em2x = jmex					            sp2x = jpsx ; ep2x = jpex ; sm2x = jmsx ; em2x = jmex
            sp1x = kpsx ; ep1x = kpex ; sm1x = kmsx ; em1x = kmex					            sp1x = kpsx ; ep1x = kpex ; sm1x = kmsx ; em1x = kmex
            sp3y = ipsy ; ep3y = ipey ; sm3y = imsy ; em3y = imey					            sp3y = ipsy ; ep3y = ipey ; sm3y = imsy ; em3y = imey
            sp2y = jpsy ; ep2y = jpey ; sm2y = jmsy ; em2y = jmey					            sp2y = jpsy ; ep2y = jpey ; sm2y = jmsy ; em2y = jmey
            sp1y = kpsy ; ep1y = kpey ; sm1y = kmsy ; em1y = kmey					            sp1y = kpsy ; ep1y = kpey ; sm1y = kmsy ; em1y = kmey
         CASE ( DATA_ORDER_XYZ )									         CASE ( DATA_ORDER_XYZ )
            sp1 = ips ; ep1 = ipe ; sm1 = ims ; em1 = ime						            sp1 = ips ; ep1 = ipe ; sm1 = ims ; em1 = ime
            sp2 = jps ; ep2 = jpe ; sm2 = jms ; em2 = jme						            sp2 = jps ; ep2 = jpe ; sm2 = jms ; em2 = jme
            sp3 = kps ; ep3 = kpe ; sm3 = kms ; em3 = kme						            sp3 = kps ; ep3 = kpe ; sm3 = kms ; em3 = kme
            sp1x = ipsx ; ep1x = ipex ; sm1x = imsx ; em1x = imex					            sp1x = ipsx ; ep1x = ipex ; sm1x = imsx ; em1x = imex
            sp2x = jpsx ; ep2x = jpex ; sm2x = jmsx ; em2x = jmex					            sp2x = jpsx ; ep2x = jpex ; sm2x = jmsx ; em2x = jmex
            sp3x = kpsx ; ep3x = kpex ; sm3x = kmsx ; em3x = kmex					            sp3x = kpsx ; ep3x = kpex ; sm3x = kmsx ; em3x = kmex
            sp1y = ipsy ; ep1y = ipey ; sm1y = imsy ; em1y = imey					            sp1y = ipsy ; ep1y = ipey ; sm1y = imsy ; em1y = imey
            sp2y = jpsy ; ep2y = jpey ; sm2y = jmsy ; em2y = jmey					            sp2y = jpsy ; ep2y = jpey ; sm2y = jmsy ; em2y = jmey
            sp3y = kpsy ; ep3y = kpey ; sm3y = kmsy ; em3y = kmey					            sp3y = kpsy ; ep3y = kpey ; sm3y = kmsy ; em3y = kmey
         CASE ( DATA_ORDER_YXZ)										         CASE ( DATA_ORDER_YXZ)
            sp2 = ips ; ep2 = ipe ; sm2 = ims ; em2 = ime						            sp2 = ips ; ep2 = ipe ; sm2 = ims ; em2 = ime
            sp1 = jps ; ep1 = jpe ; sm1 = jms ; em1 = jme						            sp1 = jps ; ep1 = jpe ; sm1 = jms ; em1 = jme
            sp3 = kps ; ep3 = kpe ; sm3 = kms ; em3 = kme						            sp3 = kps ; ep3 = kpe ; sm3 = kms ; em3 = kme
            sp2x = ipsx ; ep2x = ipex ; sm2x = imsx ; em2x = imex					            sp2x = ipsx ; ep2x = ipex ; sm2x = imsx ; em2x = imex
            sp1x = jpsx ; ep1x = jpex ; sm1x = jmsx ; em1x = jmex					            sp1x = jpsx ; ep1x = jpex ; sm1x = jmsx ; em1x = jmex
            sp3x = kpsx ; ep3x = kpex ; sm3x = kmsx ; em3x = kmex					            sp3x = kpsx ; ep3x = kpex ; sm3x = kmsx ; em3x = kmex
            sp2y = ipsy ; ep2y = ipey ; sm2y = imsy ; em2y = imey					            sp2y = ipsy ; ep2y = ipey ; sm2y = imsy ; em2y = imey
            sp1y = jpsy ; ep1y = jpey ; sm1y = jmsy ; em1y = jmey					            sp1y = jpsy ; ep1y = jpey ; sm1y = jmsy ; em1y = jmey
            sp3y = kpsy ; ep3y = kpey ; sm3y = kmsy ; em3y = kmey					            sp3y = kpsy ; ep3y = kpey ; sm3y = kmsy ; em3y = kmey
         CASE ( DATA_ORDER_XZY )									         CASE ( DATA_ORDER_XZY )
            sp1 = ips ; ep1 = ipe ; sm1 = ims ; em1 = ime						            sp1 = ips ; ep1 = ipe ; sm1 = ims ; em1 = ime
            sp3 = jps ; ep3 = jpe ; sm3 = jms ; em3 = jme						            sp3 = jps ; ep3 = jpe ; sm3 = jms ; em3 = jme
            sp2 = kps ; ep2 = kpe ; sm2 = kms ; em2 = kme						            sp2 = kps ; ep2 = kpe ; sm2 = kms ; em2 = kme
            sp1x = ipsx ; ep1x = ipex ; sm1x = imsx ; em1x = imex					            sp1x = ipsx ; ep1x = ipex ; sm1x = imsx ; em1x = imex
            sp3x = jpsx ; ep3x = jpex ; sm3x = jmsx ; em3x = jmex					            sp3x = jpsx ; ep3x = jpex ; sm3x = jmsx ; em3x = jmex
            sp2x = kpsx ; ep2x = kpex ; sm2x = kmsx ; em2x = kmex					            sp2x = kpsx ; ep2x = kpex ; sm2x = kmsx ; em2x = kmex
            sp1y = ipsy ; ep1y = ipey ; sm1y = imsy ; em1y = imey					            sp1y = ipsy ; ep1y = ipey ; sm1y = imsy ; em1y = imey
            sp3y = jpsy ; ep3y = jpey ; sm3y = jmsy ; em3y = jmey					            sp3y = jpsy ; ep3y = jpey ; sm3y = jmsy ; em3y = jmey
            sp2y = kpsy ; ep2y = kpey ; sm2y = kmsy ; em2y = kmey					            sp2y = kpsy ; ep2y = kpey ; sm2y = kmsy ; em2y = kmey
         CASE ( DATA_ORDER_YZX )									         CASE ( DATA_ORDER_YZX )
            sp3 = ips ; ep3 = ipe ; sm3 = ims ; em3 = ime						            sp3 = ips ; ep3 = ipe ; sm3 = ims ; em3 = ime
            sp1 = jps ; ep1 = jpe ; sm1 = jms ; em1 = jme						            sp1 = jps ; ep1 = jpe ; sm1 = jms ; em1 = jme
            sp2 = kps ; ep2 = kpe ; sm2 = kms ; em2 = kme						            sp2 = kps ; ep2 = kpe ; sm2 = kms ; em2 = kme
            sp3x = ipsx ; ep3x = ipex ; sm3x = imsx ; em3x = imex					            sp3x = ipsx ; ep3x = ipex ; sm3x = imsx ; em3x = imex
            sp1x = jpsx ; ep1x = jpex ; sm1x = jmsx ; em1x = jmex					            sp1x = jpsx ; ep1x = jpex ; sm1x = jmsx ; em1x = jmex
            sp2x = kpsx ; ep2x = kpex ; sm2x = kmsx ; em2x = kmex					            sp2x = kpsx ; ep2x = kpex ; sm2x = kmsx ; em2x = kmex
            sp3y = ipsy ; ep3y = ipey ; sm3y = imsy ; em3y = imey					            sp3y = ipsy ; ep3y = ipey ; sm3y = imsy ; em3y = imey
            sp1y = jpsy ; ep1y = jpey ; sm1y = jmsy ; em1y = jmey					            sp1y = jpsy ; ep1y = jpey ; sm1y = jmsy ; em1y = jmey
            sp2y = kpsy ; ep2y = kpey ; sm2y = kmsy ; em2y = kmey					            sp2y = kpsy ; ep2y = kpey ; sm2y = kmsy ; em2y = kmey
      END SELECT											      END SELECT

      IF ( id.EQ.1 ) THEN										      IF ( id.EQ.1 ) THEN
         WRITE(wrf_err_message,*)'*************************************'				         WRITE(wrf_err_message,*)'*************************************'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'Parent domain'							         WRITE(wrf_err_message,*)'Parent domain'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',ids,ide,jds,jde					         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',ids,ide,jds,jde
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',ims,ime,jms,jme					         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',ims,ime,jms,jme
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',ips,ipe,jps,jpe					         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',ips,ipe,jps,jpe
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'*************************************'				         WRITE(wrf_err_message,*)'*************************************'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
      END IF												      ENDIF

      IF ( id .GT. 1 ) THEN										      IF ( id .GT. 1 ) THEN

         CALL nl_get_shw( id, shw )									         CALL nl_get_shw( id, shw )
         CALL nl_get_i_parent_start( id , i_parent_start )						         CALL nl_get_i_parent_start( id , i_parent_start )
         CALL nl_get_j_parent_start( id , j_parent_start )						         CALL nl_get_j_parent_start( id , j_parent_start )
         CALL nl_get_parent_grid_ratio( id, parent_grid_ratio )						         CALL nl_get_parent_grid_ratio( id, parent_grid_ratio )

         SELECT CASE ( model_data_order )								         SELECT CASE ( model_data_order )
            CASE ( DATA_ORDER_ZXY )									            CASE ( DATA_ORDER_ZXY )
               idim = ed2-sd2+1										               idim = ed2-sd2+1
               jdim = ed3-sd3+1										               jdim = ed3-sd3+1
               kdim = ed1-sd1+1										               kdim = ed1-sd1+1
               c_kds = sd1                ; c_kde = ed1							               c_kds = sd1                ; c_kde = ed1
            CASE ( DATA_ORDER_ZYX )									            CASE ( DATA_ORDER_ZYX )
               idim = ed3-sd3+1										               idim = ed3-sd3+1
               jdim = ed2-sd2+1										               jdim = ed2-sd2+1
               kdim = ed1-sd1+1										               kdim = ed1-sd1+1
               c_kds = sd1                ; c_kde = ed1							               c_kds = sd1                ; c_kde = ed1
            CASE ( DATA_ORDER_XYZ )									            CASE ( DATA_ORDER_XYZ )
               idim = ed1-sd1+1										               idim = ed1-sd1+1
               jdim = ed2-sd2+1										               jdim = ed2-sd2+1
               kdim = ed3-sd3+1										               kdim = ed3-sd3+1
               c_kds = sd3                ; c_kde = ed3							               c_kds = sd3                ; c_kde = ed3
            CASE ( DATA_ORDER_YXZ)									            CASE ( DATA_ORDER_YXZ)
               idim = ed2-sd2+1										               idim = ed2-sd2+1
               jdim = ed1-sd1+1										               jdim = ed1-sd1+1
               kdim = ed3-sd3+1										               kdim = ed3-sd3+1
               c_kds = sd3                ; c_kde = ed3							               c_kds = sd3                ; c_kde = ed3
            CASE ( DATA_ORDER_XZY )									            CASE ( DATA_ORDER_XZY )
               idim = ed1-sd1+1										               idim = ed1-sd1+1
               jdim = ed3-sd3+1										               jdim = ed3-sd3+1
               kdim = ed2-sd2+1										               kdim = ed2-sd2+1
               c_kds = sd2                ; c_kde = ed2							               c_kds = sd2                ; c_kde = ed2
            CASE ( DATA_ORDER_YZX )									            CASE ( DATA_ORDER_YZX )
               idim = ed3-sd3+1										               idim = ed3-sd3+1
               jdim = ed1-sd1+1										               jdim = ed1-sd1+1
               kdim = ed2-sd2+1										               kdim = ed2-sd2+1
               c_kds = sd2                ; c_kde = ed2							               c_kds = sd2                ; c_kde = ed2
         END SELECT											         END SELECT

         idim_cd = idim / parent_grid_ratio + 1 + 2*shw + 1						         idim_cd = idim / parent_grid_ratio + 1 + 2*shw + 1
         jdim_cd = jdim / parent_grid_ratio + 1 + 2*shw + 1						         jdim_cd = jdim / parent_grid_ratio + 1 + 2*shw + 1

         c_ids = i_parent_start-shw ; c_ide = c_ids + idim_cd - 1					         c_ids = i_parent_start-shw ; c_ide = c_ids + idim_cd - 1
         c_jds = j_parent_start-shw ; c_jde = c_jds + jdim_cd - 1					         c_jds = j_parent_start-shw ; c_jde = c_jds + jdim_cd - 1

#if (DA_CORE == 1)											#if (DA_CORE == 1)
          call nl_get_e_we( id -1, e_we )								          call nl_get_e_we( id -1, e_we )
          call nl_get_e_sn( id -1, e_sn )								          call nl_get_e_sn( id -1, e_sn )

         if ( c_ids .le. 0   ) c_ids = 1								         if ( c_ids .le. 0   ) c_ids = 1
         if ( c_ide .gt. e_we) c_ide = e_we								         if ( c_ide .gt. e_we) c_ide = e_we
         if ( c_jds .le. 0   ) c_jds = 1								         if ( c_jds .le. 0   ) c_jds = 1
         if ( c_jde .gt. e_sn) c_jde = e_sn								         if ( c_jde .gt. e_sn) c_jde = e_sn
#endif													#endif
         ! we want the intermediate domain to be decomposed the						         ! we want the intermediate domain to be decomposed the
         ! the same as the underlying nest. So try this:						         ! the same as the underlying nest. So try this:

         c_ips = -1											         c_ips = -1
         nj = ( c_jds - j_parent_start ) * parent_grid_ratio + 1 + 1 ;					         nj = ( c_jds - j_parent_start ) * parent_grid_ratio + 1 + 1 ;
         ierr = 0 											         ierr = 0 
         DO i = c_ids, c_ide										         DO i = c_ids, c_ide
            ni = ( i - i_parent_start ) * parent_grid_ratio + 1 + 1 ;					            ni = ( i - i_parent_start ) * parent_grid_ratio + 1 + 1 ;
!jm            CALL task_for_point ( ni, nj, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &	   |	            CALL task_for_point ( ni, nj, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &
            CALL task_for_point ( ni, nj, ids, ide, jds, jde, nest_pes_x(id), nest_pes_y(id),Px,   <
                                  minx, miny,  ierr )							                                  minx, miny,  ierr )
            IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in mo	            IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in mo
            IF ( Px .EQ. mytask_x ) THEN								            IF ( Px .EQ. mytask_x ) THEN
               c_ipe = i										               c_ipe = i
               IF ( c_ips .EQ. -1 ) c_ips = i								               IF ( c_ips .EQ. -1 ) c_ips = i
            END IF											            ENDIF
         END DO												         ENDDO
         IF ( ierr .NE. 0 ) THEN									         IF ( ierr .NE. 0 ) THEN
            CALL tfp_message(__FILE__,__LINE__)								            CALL tfp_message(__FILE__,__LINE__)
         END IF												         ENDIF
         IF (c_ips .EQ. -1 ) THEN									         IF (c_ips .EQ. -1 ) THEN
            c_ipe = -1											            c_ipe = -1
            c_ips = 0											            c_ips = 0
         END IF												         ENDIF

         c_jps = -1											         c_jps = -1
         ni = ( c_ids - i_parent_start ) * parent_grid_ratio + 1 + 1 ;					         ni = ( c_ids - i_parent_start ) * parent_grid_ratio + 1 + 1 ;
         ierr = 0 											         ierr = 0 
         DO j = c_jds, c_jde										         DO j = c_jds, c_jde
            nj = ( j - j_parent_start ) * parent_grid_ratio + 1 + 1 ;					            nj = ( j - j_parent_start ) * parent_grid_ratio + 1 + 1 ;
!            CALL task_for_point ( ni, nj, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &	   |	            CALL task_for_point ( ni, nj, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &
            CALL task_for_point ( ni, nj, ids, ide, jds, jde, nest_pes_x(id), nest_pes_y(id), Px   <
                                  minx, miny, ierr )							                                  minx, miny, ierr )
            IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in mo	            IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in mo


            IF ( Py .EQ. mytask_y ) THEN								            IF ( Py .EQ. mytask_y ) THEN
               c_jpe = j										               c_jpe = j
               IF ( c_jps .EQ. -1 ) c_jps = j								               IF ( c_jps .EQ. -1 ) c_jps = j
            END IF											            ENDIF
         END DO												         ENDDO
         IF ( ierr .NE. 0 ) THEN									         IF ( ierr .NE. 0 ) THEN
            CALL tfp_message(__FILE__,__LINE__)								            CALL tfp_message(__FILE__,__LINE__)
         END IF												         ENDIF
         IF (c_jps .EQ. -1 ) THEN									         IF (c_jps .EQ. -1 ) THEN
            c_jpe = -1											            c_jpe = -1
            c_jps = 0											            c_jps = 0
         END IF												         ENDIF

#if (DA_CORE == 1)											#if (DA_CORE == 1)
         IF (c_ipe .EQ. -1 .or. c_jpe .EQ. -1) THEN							         IF (c_ipe .EQ. -1 .or. c_jpe .EQ. -1) THEN
            c_ipe = -1											            c_ipe = -1
            c_ips = 0											            c_ips = 0
            c_jpe = -1											            c_jpe = -1
            c_jps = 0											            c_jps = 0
         END IF												         ENDIF


          c_kpsx = -1											          c_kpsx = -1
          nj = ( c_jds - j_parent_start ) * parent_grid_ratio + 1 + 1 ;					          nj = ( c_jds - j_parent_start ) * parent_grid_ratio + 1 + 1 ;
          ierr = 0											          ierr = 0
          DO k = c_kds, c_kde										          DO k = c_kds, c_kde
!             CALL task_for_point ( k, nj, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &	   |	             CALL task_for_point ( k, nj, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &
             CALL task_for_point ( k, nj, kds, kde, jds, jde, nest_pes_x(id), nest_pes_y(id), Px   <
                                   1, 1, ierr )								                                   1, 1, ierr )
             IF ( Px .EQ. mytask_x ) THEN								             IF ( Px .EQ. mytask_x ) THEN
                c_kpex = k										                c_kpex = k
                IF ( c_kpsx .EQ. -1 ) c_kpsx = k							                IF ( c_kpsx .EQ. -1 ) c_kpsx = k
             END IF											             ENDIF
          END DO											          ENDDO
          IF ( ierr .NE. 0 ) THEN									          IF ( ierr .NE. 0 ) THEN
             CALL tfp_message(__FILE__,__LINE__)							             CALL tfp_message(__FILE__,__LINE__)
          END IF											          ENDIF
          IF (c_kpsx .EQ. -1 ) THEN									          IF (c_kpsx .EQ. -1 ) THEN
             c_kpex = -1										             c_kpex = -1
             c_kpsx = 0											             c_kpsx = 0
          END IF											          ENDIF

          c_jpsx = -1											          c_jpsx = -1
          k = c_kds ;											          k = c_kds ;
          ierr = 0											          ierr = 0
          DO j = c_jds, c_jde										          DO j = c_jds, c_jde
             nj = ( j - j_parent_start ) * parent_grid_ratio + 1 + 1 ;					             nj = ( j - j_parent_start ) * parent_grid_ratio + 1 + 1 ;
!             CALL task_for_point ( k, nj, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &	   |	             CALL task_for_point ( k, nj, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &
             CALL task_for_point ( k, nj, kds, kde, jds, jde, nest_pes_x(id), nest_pes_y(id), Px   <
                                   1, 1, ierr )								                                   1, 1, ierr )
             IF ( Py .EQ. mytask_y ) THEN								             IF ( Py .EQ. mytask_y ) THEN
                c_jpex = j										                c_jpex = j
                IF ( c_jpsx .EQ. -1 ) c_jpsx = j							                IF ( c_jpsx .EQ. -1 ) c_jpsx = j
             END IF											             ENDIF
          END DO											          ENDDO
          IF ( ierr .NE. 0 ) THEN									          IF ( ierr .NE. 0 ) THEN
             CALL tfp_message(__FILE__,__LINE__)							             CALL tfp_message(__FILE__,__LINE__)
          END IF											          ENDIF
          IF (c_jpsx .EQ. -1 ) THEN									          IF (c_jpsx .EQ. -1 ) THEN
             c_jpex = -1										             c_jpex = -1
             c_jpsx = 0											             c_jpsx = 0
          END IF											          ENDIF

          IF (c_ipex .EQ. -1 .or. c_jpex .EQ. -1) THEN							          IF (c_ipex .EQ. -1 .or. c_jpex .EQ. -1) THEN
             c_ipex = -1										             c_ipex = -1
             c_ipsx = 0											             c_ipsx = 0
             c_jpex = -1										             c_jpex = -1
             c_jpsx = 0											             c_jpsx = 0
          END IF											          ENDIF

          c_kpsy = c_kpsx   ! same as above								          c_kpsy = c_kpsx   ! same as above
          c_kpey = c_kpex   ! same as above								          c_kpey = c_kpex   ! same as above

          c_ipsy = -1											          c_ipsy = -1
          k = c_kds ;											          k = c_kds ;
          ierr = 0											          ierr = 0
          DO i = c_ids, c_ide										          DO i = c_ids, c_ide
             ni = ( i - i_parent_start ) * parent_grid_ratio + 1 + 1 ;					             ni = ( i - i_parent_start ) * parent_grid_ratio + 1 + 1 ;
!             CALL task_for_point ( ni, k, ids, ide, kds, kde, ntasks_y, ntasks_x, Py, Px, &	   |	             CALL task_for_point ( ni, k, ids, ide, kds, kde, ntasks_y, ntasks_x, Py, Px, &
             CALL task_for_point ( ni, k, ids, ide, kds, kde, nest_pes_y(id), nest_pes_x(id), Py   <
                                   1, 1, ierr ) ! x and y for proc mesh reversed			                                   1, 1, ierr ) ! x and y for proc mesh reversed
             IF ( Py .EQ. mytask_y ) THEN								             IF ( Py .EQ. mytask_y ) THEN
                c_ipey = i										                c_ipey = i
                IF ( c_ipsy .EQ. -1 ) c_ipsy = i							                IF ( c_ipsy .EQ. -1 ) c_ipsy = i
             END IF											             ENDIF
          END DO											          ENDDO
          IF ( ierr .NE. 0 ) THEN									          IF ( ierr .NE. 0 ) THEN
             CALL tfp_message(__FILE__,__LINE__)							             CALL tfp_message(__FILE__,__LINE__)
          END IF											          ENDIF
          IF (c_ipsy .EQ. -1 ) THEN									          IF (c_ipsy .EQ. -1 ) THEN
             c_ipey = -1										             c_ipey = -1
             c_ipsy = 0											             c_ipsy = 0
          END IF											          ENDIF
#endif													#endif


         IF ( c_ips <= c_ipe ) THEN									         IF ( c_ips <= c_ipe ) THEN
! extend the patch dimensions out shw along edges of domain						! extend the patch dimensions out shw along edges of domain
           IF ( mytask_x .EQ. 0 ) THEN									           IF ( mytask_x .EQ. 0 ) THEN
             c_ips = c_ips - shw									             c_ips = c_ips - shw
#if (DA_CORE == 1)											#if (DA_CORE == 1)
             c_ipsy = c_ipsy - shw  									             c_ipsy = c_ipsy - shw  
#endif													#endif
           END IF											           ENDIF
!           IF ( mytask_x .EQ. ntasks_x-1 ) THEN						   |	           IF ( mytask_x .EQ. ntasks_x-1 ) THEN
           IF ( mytask_x .EQ. nest_pes_x(id)-1 ) THEN						   <
             c_ipe = c_ipe + shw									             c_ipe = c_ipe + shw
#if (DA_CORE == 1)											#if (DA_CORE == 1)
             c_ipey = c_ipey + shw  									             c_ipey = c_ipey + shw  
#endif													#endif
           END IF											           ENDIF
           c_ims = max( c_ips - max(shw,thisdomain_max_halo_width), c_ids - bdx ) - 1			           c_ims = max( c_ips - max(shw,thisdomain_max_halo_width), c_ids - bdx ) - 1
           c_ime = min( c_ipe + max(shw,thisdomain_max_halo_width), c_ide + bdx ) + 1			           c_ime = min( c_ipe + max(shw,thisdomain_max_halo_width), c_ide + bdx ) + 1
         ELSE												         ELSE
           c_ims = 0											           c_ims = 0
           c_ime = 0											           c_ime = 0
         END IF												         ENDIF


! handle j dims												! handle j dims
         IF ( c_jps <= c_jpe ) THEN									         IF ( c_jps <= c_jpe ) THEN
! extend the patch dimensions out shw along edges of domain						! extend the patch dimensions out shw along edges of domain
           IF ( mytask_y .EQ. 0 ) THEN									           IF ( mytask_y .EQ. 0 ) THEN
              c_jps = c_jps - shw									              c_jps = c_jps - shw
#if (DA_CORE == 1)											#if (DA_CORE == 1)
              c_jpsx = c_jpsx - shw  									              c_jpsx = c_jpsx - shw  
#endif													#endif
           END IF											           ENDIF
!           IF ( mytask_y .EQ. ntasks_y-1 ) THEN						   |	           IF ( mytask_y .EQ. ntasks_y-1 ) THEN
           IF ( mytask_y .EQ. nest_pes_y(id)-1 ) THEN						   <
              c_jpe = c_jpe + shw									              c_jpe = c_jpe + shw
#if (DA_CORE == 1)											#if (DA_CORE == 1)
              c_jpex = c_jpex + shw  									              c_jpex = c_jpex + shw  
#endif													#endif
           END IF											           ENDIF
           c_jms = max( c_jps - max(shw,thisdomain_max_halo_width), c_jds - bdx ) - 1			           c_jms = max( c_jps - max(shw,thisdomain_max_halo_width), c_jds - bdx ) - 1
           c_jme = min( c_jpe + max(shw,thisdomain_max_halo_width), c_jde + bdx ) + 1			           c_jme = min( c_jpe + max(shw,thisdomain_max_halo_width), c_jde + bdx ) + 1
! handle k dims												! handle k dims
         ELSE												         ELSE
           c_jms = 0											           c_jms = 0
           c_jme = 0											           c_jme = 0
         END IF												         ENDIF
         c_kps = 1											         c_kps = 1
         c_kpe = c_kde											         c_kpe = c_kde
         c_kms = 1											         c_kms = 1
         c_kme = c_kde											         c_kme = c_kde

! Default initializations										! Default initializations
         c_sm1x = 1 ; c_em1x = 1 ; c_sm2x = 1 ; c_em2x = 1 ; c_sm3x = 1 ; c_em3x = 1			         c_sm1x = 1 ; c_em1x = 1 ; c_sm2x = 1 ; c_em2x = 1 ; c_sm3x = 1 ; c_em3x = 1
         c_sm1y = 1 ; c_em1y = 1 ; c_sm2y = 1 ; c_em2y = 1 ; c_sm3y = 1 ; c_em3y = 1			         c_sm1y = 1 ; c_em1y = 1 ; c_sm2y = 1 ; c_em2y = 1 ; c_sm3y = 1 ; c_em3y = 1

#if (DA_CORE == 1)											#if (DA_CORE == 1)
         c_kmsx = c_kpsx 										         c_kmsx = c_kpsx 
         c_kmex = c_kpex 										         c_kmex = c_kpex 
         c_kmsy = c_kpsy 										         c_kmsy = c_kpsy 
         c_kmey = c_kpey 										         c_kmey = c_kpey 

         IF ( c_kpsx .EQ. 0 .AND. c_kpex .EQ. -1 ) THEN  						         IF ( c_kpsx .EQ. 0 .AND. c_kpex .EQ. -1 ) THEN  
            c_kmsx = 0											            c_kmsx = 0
            c_kmex = 0											            c_kmex = 0
         END IF												         ENDIF
         IF ( c_kpsy .EQ. 0 .AND. c_kpey .EQ. -1 ) THEN							         IF ( c_kpsy .EQ. 0 .AND. c_kpey .EQ. -1 ) THEN
            c_kmsy = 0											            c_kmsy = 0
            c_kmey = 0											            c_kmey = 0
         END IF												         ENDIF
         c_imsx = c_ids											         c_imsx = c_ids
         c_imex = c_ide											         c_imex = c_ide
         c_ipsx = c_imsx										         c_ipsx = c_imsx
         c_ipex = c_imex										         c_ipex = c_imex

         IF ( c_ipsy .EQ. 0 .AND. c_ipey .EQ. -1 ) THEN							         IF ( c_ipsy .EQ. 0 .AND. c_ipey .EQ. -1 ) THEN
            c_imsy = 0											            c_imsy = 0
            c_imey = 0											            c_imey = 0
         ELSE												         ELSE
            c_imsy = c_ipsy										            c_imsy = c_ipsy
            c_imey = c_ipey										            c_imey = c_ipey
         END IF												         ENDIF

         c_jmsx = c_jpsx										         c_jmsx = c_jpsx
         c_jmex = c_jpex										         c_jmex = c_jpex
         c_jmsy = c_jds											         c_jmsy = c_jds
         c_jmey = c_jde											         c_jmey = c_jde

         IF ( c_jpsx .EQ. 0 .AND. c_jpex .EQ. -1 ) THEN							         IF ( c_jpsx .EQ. 0 .AND. c_jpex .EQ. -1 ) THEN
            c_jmsx = 0											            c_jmsx = 0
            c_jmex = 0											            c_jmex = 0
         ELSE												         ELSE
            c_jpsy = c_jmsy										            c_jpsy = c_jmsy
            c_jpey = c_jmey										            c_jpey = c_jmey
         END IF												         ENDIF

         c_sm1x = c_imsx										         c_sm1x = c_imsx
         c_em1x = c_imex										         c_em1x = c_imex
         c_sm2x = c_jmsx										         c_sm2x = c_jmsx
         c_em2x = c_jmex										         c_em2x = c_jmex
         c_sm3x = c_kmsx										         c_sm3x = c_kmsx
         c_em3x = c_kmex										         c_em3x = c_kmex

         c_sm1y = c_imsy										         c_sm1y = c_imsy
         c_em1y = c_imey										         c_em1y = c_imey
         c_sm2y = c_jmsy										         c_sm2y = c_jmsy
         c_em2y = c_jmey										         c_em2y = c_jmey
         c_sm3y = c_kmsy										         c_sm3y = c_kmsy
         c_em3y = c_kmey										         c_em3y = c_kmey

         c_sp1x = c_ipsx										         c_sp1x = c_ipsx
         c_ep1x = c_ipex										         c_ep1x = c_ipex
         c_sp2x = c_jpsx										         c_sp2x = c_jpsx
         c_ep2x = c_jpex										         c_ep2x = c_jpex
         c_sp3x = c_kpsx										         c_sp3x = c_kpsx
         c_ep3x = c_kpex										         c_ep3x = c_kpex

         c_sp1y = c_ipsy										         c_sp1y = c_ipsy
         c_ep1y = c_ipey										         c_ep1y = c_ipey
         c_sp2y = c_jpsy										         c_sp2y = c_jpsy
         c_ep2y = c_jpey										         c_ep2y = c_jpey
         c_sp3y = c_kpsy										         c_sp3y = c_kpsy
         c_ep3y = c_kpey										         c_ep3y = c_kpey
#endif													#endif

         WRITE(wrf_err_message,*)'*************************************'				         WRITE(wrf_err_message,*)'*************************************'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'Nesting domain'							         WRITE(wrf_err_message,*)'Nesting domain'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',ids,ide,jds,jde					         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',ids,ide,jds,jde
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',ims,ime,jms,jme					         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',ims,ime,jms,jme
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',ips,ipe,jps,jpe					         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',ips,ipe,jps,jpe
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'INTERMEDIATE domain'							         WRITE(wrf_err_message,*)'INTERMEDIATE domain'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',c_ids,c_ide,c_jds,c_jde				         WRITE(wrf_err_message,*)'ids,ide,jds,jde ',c_ids,c_ide,c_jds,c_jde
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',c_ims,c_ime,c_jms,c_jme				         WRITE(wrf_err_message,*)'ims,ime,jms,jme ',c_ims,c_ime,c_jms,c_jme
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',c_ips,c_ipe,c_jps,c_jpe				         WRITE(wrf_err_message,*)'ips,ipe,jps,jpe ',c_ips,c_ipe,c_jps,c_jpe
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )
         WRITE(wrf_err_message,*)'*************************************'				         WRITE(wrf_err_message,*)'*************************************'
         CALL wrf_message( TRIM(wrf_err_message) )							         CALL wrf_message( TRIM(wrf_err_message) )

         SELECT CASE ( model_data_order )								         SELECT CASE ( model_data_order )
            CASE ( DATA_ORDER_ZXY )									            CASE ( DATA_ORDER_ZXY )
               c_sd2 = c_ids ; c_ed2 = c_ide ; c_sp2 = c_ips ; c_ep2 = c_ipe ; c_sm2 = c_ims ; c	               c_sd2 = c_ids ; c_ed2 = c_ide ; c_sp2 = c_ips ; c_ep2 = c_ipe ; c_sm2 = c_ims ; c
               c_sd3 = c_jds ; c_ed3 = c_jde ; c_sp3 = c_jps ; c_ep3 = c_jpe ; c_sm3 = c_jms ; c	               c_sd3 = c_jds ; c_ed3 = c_jde ; c_sp3 = c_jps ; c_ep3 = c_jpe ; c_sm3 = c_jms ; c
               c_sd1 = c_kds ; c_ed1 = c_kde ; c_sp1 = c_kps ; c_ep1 = c_kpe ; c_sm1 = c_kms ; c	               c_sd1 = c_kds ; c_ed1 = c_kde ; c_sp1 = c_kps ; c_ep1 = c_kpe ; c_sm1 = c_kms ; c
            CASE ( DATA_ORDER_ZYX )									            CASE ( DATA_ORDER_ZYX )
               c_sd3 = c_ids ; c_ed3 = c_ide ; c_sp3 = c_ips ; c_ep3 = c_ipe ; c_sm3 = c_ims ; c	               c_sd3 = c_ids ; c_ed3 = c_ide ; c_sp3 = c_ips ; c_ep3 = c_ipe ; c_sm3 = c_ims ; c
               c_sd2 = c_jds ; c_ed2 = c_jde ; c_sp2 = c_jps ; c_ep2 = c_jpe ; c_sm2 = c_jms ; c	               c_sd2 = c_jds ; c_ed2 = c_jde ; c_sp2 = c_jps ; c_ep2 = c_jpe ; c_sm2 = c_jms ; c
               c_sd1 = c_kds ; c_ed1 = c_kde ; c_sp1 = c_kps ; c_ep1 = c_kpe ; c_sm1 = c_kms ; c	               c_sd1 = c_kds ; c_ed1 = c_kde ; c_sp1 = c_kps ; c_ep1 = c_kpe ; c_sm1 = c_kms ; c
            CASE ( DATA_ORDER_XYZ )									            CASE ( DATA_ORDER_XYZ )
               c_sd1 = c_ids ; c_ed1 = c_ide ; c_sp1 = c_ips ; c_ep1 = c_ipe ; c_sm1 = c_ims ; c	               c_sd1 = c_ids ; c_ed1 = c_ide ; c_sp1 = c_ips ; c_ep1 = c_ipe ; c_sm1 = c_ims ; c
               c_sd2 = c_jds ; c_ed2 = c_jde ; c_sp2 = c_jps ; c_ep2 = c_jpe ; c_sm2 = c_jms ; c	               c_sd2 = c_jds ; c_ed2 = c_jde ; c_sp2 = c_jps ; c_ep2 = c_jpe ; c_sm2 = c_jms ; c
               c_sd3 = c_kds ; c_ed3 = c_kde ; c_sp3 = c_kps ; c_ep3 = c_kpe ; c_sm3 = c_kms ; c	               c_sd3 = c_kds ; c_ed3 = c_kde ; c_sp3 = c_kps ; c_ep3 = c_kpe ; c_sm3 = c_kms ; c
            CASE ( DATA_ORDER_YXZ)									            CASE ( DATA_ORDER_YXZ)
               c_sd2 = c_ids ; c_ed2 = c_ide ; c_sp2 = c_ips ; c_ep2 = c_ipe ; c_sm2 = c_ims ; c	               c_sd2 = c_ids ; c_ed2 = c_ide ; c_sp2 = c_ips ; c_ep2 = c_ipe ; c_sm2 = c_ims ; c
               c_sd1 = c_jds ; c_ed1 = c_jde ; c_sp1 = c_jps ; c_ep1 = c_jpe ; c_sm1 = c_jms ; c	               c_sd1 = c_jds ; c_ed1 = c_jde ; c_sp1 = c_jps ; c_ep1 = c_jpe ; c_sm1 = c_jms ; c
               c_sd3 = c_kds ; c_ed3 = c_kde ; c_sp3 = c_kps ; c_ep3 = c_kpe ; c_sm3 = c_kms ; c	               c_sd3 = c_kds ; c_ed3 = c_kde ; c_sp3 = c_kps ; c_ep3 = c_kpe ; c_sm3 = c_kms ; c
            CASE ( DATA_ORDER_XZY )									            CASE ( DATA_ORDER_XZY )
               c_sd1 = c_ids ; c_ed1 = c_ide ; c_sp1 = c_ips ; c_ep1 = c_ipe ; c_sm1 = c_ims ; c	               c_sd1 = c_ids ; c_ed1 = c_ide ; c_sp1 = c_ips ; c_ep1 = c_ipe ; c_sm1 = c_ims ; c
               c_sd3 = c_jds ; c_ed3 = c_jde ; c_sp3 = c_jps ; c_ep3 = c_jpe ; c_sm3 = c_jms ; c	               c_sd3 = c_jds ; c_ed3 = c_jde ; c_sp3 = c_jps ; c_ep3 = c_jpe ; c_sm3 = c_jms ; c
               c_sd2 = c_kds ; c_ed2 = c_kde ; c_sp2 = c_kps ; c_ep2 = c_kpe ; c_sm2 = c_kms ; c	               c_sd2 = c_kds ; c_ed2 = c_kde ; c_sp2 = c_kps ; c_ep2 = c_kpe ; c_sm2 = c_kms ; c
            CASE ( DATA_ORDER_YZX )									            CASE ( DATA_ORDER_YZX )
               c_sd3 = c_ids ; c_ed3 = c_ide ; c_sp3 = c_ips ; c_ep3 = c_ipe ; c_sm3 = c_ims ; c	               c_sd3 = c_ids ; c_ed3 = c_ide ; c_sp3 = c_ips ; c_ep3 = c_ipe ; c_sm3 = c_ims ; c
               c_sd1 = c_jds ; c_ed1 = c_jde ; c_sp1 = c_jps ; c_ep1 = c_jpe ; c_sm1 = c_jms ; c	               c_sd1 = c_jds ; c_ed1 = c_jde ; c_sp1 = c_jps ; c_ep1 = c_jpe ; c_sm1 = c_jms ; c
               c_sd2 = c_kds ; c_ed2 = c_kde ; c_sp2 = c_kps ; c_ep2 = c_kpe ; c_sm2 = c_kms ; c	               c_sd2 = c_kds ; c_ed2 = c_kde ; c_sp2 = c_kps ; c_ep2 = c_kpe ; c_sm2 = c_kms ; c
         END SELECT											         END SELECT

         ALLOCATE ( intermediate_grid )									         ALLOCATE ( intermediate_grid )
         ALLOCATE ( intermediate_grid%parents( max_parents ) )						         ALLOCATE ( intermediate_grid%parents( max_parents ) )
         ALLOCATE ( intermediate_grid%nests( max_nests ) )						         ALLOCATE ( intermediate_grid%nests( max_nests ) )
         intermediate_grid%allocated=.false.								         intermediate_grid%allocated=.false.
         NULLIFY( intermediate_grid%sibling )								         NULLIFY( intermediate_grid%sibling )
         DO i = 1, max_nests										         DO i = 1, max_nests
            NULLIFY( intermediate_grid%nests(i)%ptr )							            NULLIFY( intermediate_grid%nests(i)%ptr )
         END DO												         ENDDO
         NULLIFY  (intermediate_grid%next)								         NULLIFY  (intermediate_grid%next)
         NULLIFY  (intermediate_grid%same_level)							         NULLIFY  (intermediate_grid%same_level)
         NULLIFY  (intermediate_grid%i_start)								         NULLIFY  (intermediate_grid%i_start)
         NULLIFY  (intermediate_grid%j_start)								         NULLIFY  (intermediate_grid%j_start)
         NULLIFY  (intermediate_grid%i_end)								         NULLIFY  (intermediate_grid%i_end)
         NULLIFY  (intermediate_grid%j_end)								         NULLIFY  (intermediate_grid%j_end)
         intermediate_grid%id = id   ! these must be the same. Other parts of code depend on it 	         intermediate_grid%id = id   ! these must be the same. Other parts of code depend on it 
         intermediate_grid%num_nests = 0								         intermediate_grid%num_nests = 0
         intermediate_grid%num_siblings = 0								         intermediate_grid%num_siblings = 0
         intermediate_grid%num_parents = 1								         intermediate_grid%num_parents = 1
         intermediate_grid%max_tiles   = 0								         intermediate_grid%max_tiles   = 0
         intermediate_grid%num_tiles_spec   = 0								         intermediate_grid%num_tiles_spec   = 0
#if ( EM_CORE == 1 && DA_CORE != 1 )								   <
         intermediate_grid%active_this_task = .true.						   <
#endif												   <
         CALL find_grid_by_id ( id, head_grid, nest_grid )						         CALL find_grid_by_id ( id, head_grid, nest_grid )

         nest_grid%intermediate_grid => intermediate_grid  ! nest grid now has a pointer to this	         nest_grid%intermediate_grid => intermediate_grid  ! nest grid now has a pointer to this
         intermediate_grid%parents(1)%ptr => nest_grid     ! the intermediate grid considers nes	         intermediate_grid%parents(1)%ptr => nest_grid     ! the intermediate grid considers nes
         intermediate_grid%num_parents = 1								         intermediate_grid%num_parents = 1

         intermediate_grid%is_intermediate = .TRUE.							         intermediate_grid%is_intermediate = .TRUE.
         SELECT CASE ( model_data_order )								         SELECT CASE ( model_data_order )
            CASE ( DATA_ORDER_ZXY )									            CASE ( DATA_ORDER_ZXY )
               intermediate_grid%nids = nest_grid%sd32 ; intermediate_grid%njds = nest_grid%sd33	               intermediate_grid%nids = nest_grid%sd32 ; intermediate_grid%njds = nest_grid%sd33
               intermediate_grid%nide = nest_grid%ed32 ; intermediate_grid%njde = nest_grid%sd33	               intermediate_grid%nide = nest_grid%ed32 ; intermediate_grid%njde = nest_grid%sd33
            CASE ( DATA_ORDER_ZYX )									            CASE ( DATA_ORDER_ZYX )
               intermediate_grid%nids = nest_grid%sd33 ; intermediate_grid%njds = nest_grid%sd32	               intermediate_grid%nids = nest_grid%sd33 ; intermediate_grid%njds = nest_grid%sd32
               intermediate_grid%nide = nest_grid%ed33 ; intermediate_grid%njde = nest_grid%sd32	               intermediate_grid%nide = nest_grid%ed33 ; intermediate_grid%njde = nest_grid%sd32
            CASE ( DATA_ORDER_XYZ )									            CASE ( DATA_ORDER_XYZ )
               intermediate_grid%nids = nest_grid%sd31 ; intermediate_grid%njds = nest_grid%sd32	               intermediate_grid%nids = nest_grid%sd31 ; intermediate_grid%njds = nest_grid%sd32
               intermediate_grid%nide = nest_grid%ed31 ; intermediate_grid%njde = nest_grid%sd32	               intermediate_grid%nide = nest_grid%ed31 ; intermediate_grid%njde = nest_grid%sd32
            CASE ( DATA_ORDER_YXZ)									            CASE ( DATA_ORDER_YXZ)
               intermediate_grid%nids = nest_grid%sd32 ; intermediate_grid%njds = nest_grid%sd31	               intermediate_grid%nids = nest_grid%sd32 ; intermediate_grid%njds = nest_grid%sd31
               intermediate_grid%nide = nest_grid%ed32 ; intermediate_grid%njde = nest_grid%sd31	               intermediate_grid%nide = nest_grid%ed32 ; intermediate_grid%njde = nest_grid%sd31
            CASE ( DATA_ORDER_XZY )									            CASE ( DATA_ORDER_XZY )
               intermediate_grid%nids = nest_grid%sd31 ; intermediate_grid%njds = nest_grid%sd33	               intermediate_grid%nids = nest_grid%sd31 ; intermediate_grid%njds = nest_grid%sd33
               intermediate_grid%nide = nest_grid%ed31 ; intermediate_grid%njde = nest_grid%sd33	               intermediate_grid%nide = nest_grid%ed31 ; intermediate_grid%njde = nest_grid%sd33
            CASE ( DATA_ORDER_YZX )									            CASE ( DATA_ORDER_YZX )
               intermediate_grid%nids = nest_grid%sd33 ; intermediate_grid%njds = nest_grid%sd31	               intermediate_grid%nids = nest_grid%sd33 ; intermediate_grid%njds = nest_grid%sd31
               intermediate_grid%nide = nest_grid%ed33 ; intermediate_grid%njde = nest_grid%sd31	               intermediate_grid%nide = nest_grid%ed33 ; intermediate_grid%njde = nest_grid%sd31
         END SELECT											         END SELECT
         intermediate_grid%nids = ids									         intermediate_grid%nids = ids
         intermediate_grid%nide = ide									         intermediate_grid%nide = ide
         intermediate_grid%njds = jds									         intermediate_grid%njds = jds
         intermediate_grid%njde = jde									         intermediate_grid%njde = jde

         intermediate_grid%sm31x                           = c_sm1x					         intermediate_grid%sm31x                           = c_sm1x
         intermediate_grid%em31x                           = c_em1x					         intermediate_grid%em31x                           = c_em1x
         intermediate_grid%sm32x                           = c_sm2x					         intermediate_grid%sm32x                           = c_sm2x
         intermediate_grid%em32x                           = c_em2x					         intermediate_grid%em32x                           = c_em2x
         intermediate_grid%sm33x                           = c_sm3x					         intermediate_grid%sm33x                           = c_sm3x
         intermediate_grid%em33x                           = c_em3x					         intermediate_grid%em33x                           = c_em3x
         intermediate_grid%sm31y                           = c_sm1y					         intermediate_grid%sm31y                           = c_sm1y
         intermediate_grid%em31y                           = c_em1y					         intermediate_grid%em31y                           = c_em1y
         intermediate_grid%sm32y                           = c_sm2y					         intermediate_grid%sm32y                           = c_sm2y
         intermediate_grid%em32y                           = c_em2y					         intermediate_grid%em32y                           = c_em2y
         intermediate_grid%sm33y                           = c_sm3y					         intermediate_grid%sm33y                           = c_sm3y
         intermediate_grid%em33y                           = c_em3y					         intermediate_grid%em33y                           = c_em3y

#if (DA_CORE == 1)											#if (DA_CORE == 1)
         intermediate_grid%sp31x                           = c_sp1x					         intermediate_grid%sp31x                           = c_sp1x
         intermediate_grid%ep31x                           = c_ep1x					         intermediate_grid%ep31x                           = c_ep1x
         intermediate_grid%sp32x                           = c_sp2x					         intermediate_grid%sp32x                           = c_sp2x
         intermediate_grid%ep32x                           = c_ep2x					         intermediate_grid%ep32x                           = c_ep2x
         intermediate_grid%sp33x                           = c_sp3x					         intermediate_grid%sp33x                           = c_sp3x
         intermediate_grid%ep33x                           = c_ep3x					         intermediate_grid%ep33x                           = c_ep3x
         intermediate_grid%sp31y                           = c_sp1y					         intermediate_grid%sp31y                           = c_sp1y
         intermediate_grid%ep31y                           = c_ep1y					         intermediate_grid%ep31y                           = c_ep1y
         intermediate_grid%sp32y                           = c_sp2y					         intermediate_grid%sp32y                           = c_sp2y
         intermediate_grid%ep32y                           = c_ep2y					         intermediate_grid%ep32y                           = c_ep2y
         intermediate_grid%sp33y                           = c_sp3y					         intermediate_grid%sp33y                           = c_sp3y
         intermediate_grid%ep33y                           = c_ep3y					         intermediate_grid%ep33y                           = c_ep3y
#endif													#endif

#if ( ( defined(SGIALTIX) || defined(FUJITSU_FX10) || defined(KEEP_INT_AROUND) ) && (! defined(M   |	#if ( defined(SGIALTIX) && (! defined(MOVE_NESTS) ) ) || ( defined(FUJITSU_FX10) && (! defined(M
         ! allocate space for the intermediate domain							         ! allocate space for the intermediate domain
!         CALL alloc_space_field ( intermediate_grid, intermediate_grid%id , 1, 2 , .TRUE., inte   |	         CALL alloc_space_field ( intermediate_grid, intermediate_grid%id , 1, 2 , .TRUE., &   !
         CALL alloc_space_field ( intermediate_grid, intermediate_grid%id , 1, 2 , .TRUE., nest_   <
                               c_sd1, c_ed1, c_sd2, c_ed2, c_sd3, c_ed3,       &			                               c_sd1, c_ed1, c_sd2, c_ed2, c_sd3, c_ed3,       &
                               c_sm1,  c_em1,  c_sm2,  c_em2,  c_sm3,  c_em3,  &			                               c_sm1,  c_em1,  c_sm2,  c_em2,  c_sm3,  c_em3,  &
                               c_sp1,  c_ep1,  c_sp2,  c_ep2,  c_sp3,  c_ep3,  &			                               c_sp1,  c_ep1,  c_sp2,  c_ep2,  c_sp3,  c_ep3,  &
                               c_sm1x, c_em1x, c_sm2x, c_em2x, c_sm3x, c_em3x, &			                               c_sm1x, c_em1x, c_sm2x, c_em2x, c_sm3x, c_em3x, &
                               c_sm1y, c_em1y, c_sm2y, c_em2y, c_sm3y, c_em3y, &			                               c_sm1y, c_em1y, c_sm2y, c_em2y, c_sm3y, c_em3y, &
                               c_sm1x, c_em1x, c_sm2x, c_em2x, c_sm3x, c_em3x, &   ! x-xpose		                               c_sm1x, c_em1x, c_sm2x, c_em2x, c_sm3x, c_em3x, &   ! x-xpose
                               c_sm1y, c_em1y, c_sm2y, c_em2y, c_sm3y, c_em3y  )   ! y-xpose		                               c_sm1y, c_em1y, c_sm2y, c_em2y, c_sm3y, c_em3y  )   ! y-xpose
#endif													#endif
         intermediate_grid%sd31                            =   c_sd1					         intermediate_grid%sd31                            =   c_sd1
         intermediate_grid%ed31                            =   c_ed1					         intermediate_grid%ed31                            =   c_ed1
         intermediate_grid%sp31                            = c_sp1					         intermediate_grid%sp31                            = c_sp1
         intermediate_grid%ep31                            = c_ep1					         intermediate_grid%ep31                            = c_ep1
         intermediate_grid%sm31                            = c_sm1					         intermediate_grid%sm31                            = c_sm1
         intermediate_grid%em31                            = c_em1					         intermediate_grid%em31                            = c_em1
         intermediate_grid%sd32                            =   c_sd2					         intermediate_grid%sd32                            =   c_sd2
         intermediate_grid%ed32                            =   c_ed2					         intermediate_grid%ed32                            =   c_ed2
         intermediate_grid%sp32                            = c_sp2					         intermediate_grid%sp32                            = c_sp2
         intermediate_grid%ep32                            = c_ep2					         intermediate_grid%ep32                            = c_ep2
         intermediate_grid%sm32                            = c_sm2					         intermediate_grid%sm32                            = c_sm2
         intermediate_grid%em32                            = c_em2					         intermediate_grid%em32                            = c_em2
         intermediate_grid%sd33                            =   c_sd3					         intermediate_grid%sd33                            =   c_sd3
         intermediate_grid%ed33                            =   c_ed3					         intermediate_grid%ed33                            =   c_ed3
         intermediate_grid%sp33                            = c_sp3					         intermediate_grid%sp33                            = c_sp3
         intermediate_grid%ep33                            = c_ep3					         intermediate_grid%ep33                            = c_ep3
         intermediate_grid%sm33                            = c_sm3					         intermediate_grid%sm33                            = c_sm3
         intermediate_grid%em33                            = c_em3					         intermediate_grid%em33                            = c_em3

         CALL med_add_config_info_to_grid ( intermediate_grid )						         CALL med_add_config_info_to_grid ( intermediate_grid )

         intermediate_grid%dx = parent%dx								         intermediate_grid%dx = parent%dx
         intermediate_grid%dy = parent%dy								         intermediate_grid%dy = parent%dy
         intermediate_grid%dt = parent%dt								         intermediate_grid%dt = parent%dt
      END IF												      ENDIF

      RETURN												      RETURN
  END SUBROUTINE patch_domain_rsl_lite									  END SUBROUTINE patch_domain_rsl_lite

  SUBROUTINE compute_memory_dims_rsl_lite  (      &							  SUBROUTINE compute_memory_dims_rsl_lite  (      &
                   id , maxhalowidth ,            &							                   id , maxhalowidth ,            &
                   shw , bdx,  bdy ,              &							                   shw , bdx,  bdy ,              &
                   ids,  ide,  jds,  jde,  kds,  kde, &							                   ids,  ide,  jds,  jde,  kds,  kde, &
                   ims,  ime,  jms,  jme,  kms,  kme, &							                   ims,  ime,  jms,  jme,  kms,  kme, &
                   imsx, imex, jmsx, jmex, kmsx, kmex, &						                   imsx, imex, jmsx, jmex, kmsx, kmex, &
                   imsy, imey, jmsy, jmey, kmsy, kmey, &						                   imsy, imey, jmsy, jmey, kmsy, kmey, &
                   ips,  ipe,  jps,  jpe,  kps,  kpe, &							                   ips,  ipe,  jps,  jpe,  kps,  kpe, &
                   ipsx, ipex, jpsx, jpex, kpsx, kpex, &						                   ipsx, ipex, jpsx, jpex, kpsx, kpex, &
                   ipsy, ipey, jpsy, jpey, kpsy, kpey )							                   ipsy, ipey, jpsy, jpey, kpsy, kpey )

    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER, INTENT(IN)               ::  id , maxhalowidth						    INTEGER, INTENT(IN)               ::  id , maxhalowidth
    INTEGER, INTENT(IN)               ::  shw, bdx, bdy							    INTEGER, INTENT(IN)               ::  shw, bdx, bdy
    INTEGER, INTENT(IN)     ::  ids, ide, jds, jde, kds, kde						    INTEGER, INTENT(IN)     ::  ids, ide, jds, jde, kds, kde
    INTEGER, INTENT(OUT)    ::  ims, ime, jms, jme, kms, kme						    INTEGER, INTENT(OUT)    ::  ims, ime, jms, jme, kms, kme
    INTEGER, INTENT(OUT)    ::  imsx, imex, jmsx, jmex, kmsx, kmex					    INTEGER, INTENT(OUT)    ::  imsx, imex, jmsx, jmex, kmsx, kmex
    INTEGER, INTENT(OUT)    ::  imsy, imey, jmsy, jmey, kmsy, kmey					    INTEGER, INTENT(OUT)    ::  imsy, imey, jmsy, jmey, kmsy, kmey
    INTEGER, INTENT(OUT)    ::  ips, ipe, jps, jpe, kps, kpe						    INTEGER, INTENT(OUT)    ::  ips, ipe, jps, jpe, kps, kpe
    INTEGER, INTENT(OUT)    ::  ipsx, ipex, jpsx, jpex, kpsx, kpex					    INTEGER, INTENT(OUT)    ::  ipsx, ipex, jpsx, jpex, kpsx, kpex
    INTEGER, INTENT(OUT)    ::  ipsy, ipey, jpsy, jpey, kpsy, kpey					    INTEGER, INTENT(OUT)    ::  ipsy, ipey, jpsy, jpey, kpsy, kpey

    INTEGER Px, Py, P, i, j, k, ierr									    INTEGER Px, Py, P, i, j, k, ierr

#if ( ! NMM_CORE == 1 )											#if ( ! NMM_CORE == 1 )

! xy decomposition											! xy decomposition

    ips = -1												    ips = -1
    j = jds												    j = jds
    ierr = 0												    ierr = 0
    DO i = ids, ide											    DO i = ids, ide
!       CALL task_for_point ( i, j, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &		   |	       CALL task_for_point ( i, j, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( i, j, ids, ide, jds, jde, nest_pes_x(id), nest_pes_y(id), Px, Py, &   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_	       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_
       IF ( Px .EQ. mytask_x ) THEN									       IF ( Px .EQ. mytask_x ) THEN
          ipe = i											          ipe = i
          IF ( ips .EQ. -1 ) ips = i									          IF ( ips .EQ. -1 ) ips = i
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF												    ENDIF
    ! handle setting the memory dimensions where there are no X elements assigned to this proc		    ! handle setting the memory dimensions where there are no X elements assigned to this proc
    IF (ips .EQ. -1 ) THEN										    IF (ips .EQ. -1 ) THEN
       ipe = -1												       ipe = -1
       ips = 0												       ips = 0
    END IF												    ENDIF
													    jps = -1
    jps = -1												    i = ids
    i = ids												    ierr = 0
    ierr = 0												    DO j = jds, jde
    DO j = jds, jde										   (
!       CALL task_for_point ( i, j, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &		   |	       CALL task_for_point ( i, j, ids, ide, jds, jde, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( i, j, ids, ide, jds, jde, nest_pes_x(id), nest_pes_y(id), Px, Py, &   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_	       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_
       IF ( Py .EQ. mytask_y ) THEN									       IF ( Py .EQ. mytask_y ) THEN
          jpe = j											          jpe = j
          IF ( jps .EQ. -1 ) jps = j									          IF ( jps .EQ. -1 ) jps = j
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF												    ENDIF
    ! handle setting the memory dimensions where there are no Y elements assigned to this proc		    ! handle setting the memory dimensions where there are no Y elements assigned to this proc
    IF (jps .EQ. -1 ) THEN										    IF (jps .EQ. -1 ) THEN
       jpe = -1												       jpe = -1
       jps = 0												       jps = 0
    END IF												    ENDIF

!begin: wig; 12-Mar-2008										!begin: wig; 12-Mar-2008
! This appears redundant with the conditionals above, but we get cases with only			! This appears redundant with the conditionals above, but we get cases with only
! one of the directions being set to "missing" when turning off extra processors.			! one of the directions being set to "missing" when turning off extra processors.
! This may break the handling of setting only one of nproc_x or nproc_y via the namelist.		! This may break the handling of setting only one of nproc_x or nproc_y via the namelist.
    IF (ipe .EQ. -1 .or. jpe .EQ. -1) THEN								    IF (ipe .EQ. -1 .or. jpe .EQ. -1) THEN
       ipe = -1												       ipe = -1
       ips = 0												       ips = 0
       jpe = -1												       jpe = -1
       jps = 0												       jps = 0
    END IF												    ENDIF
!end: wig; 12-Mar-2008											!end: wig; 12-Mar-2008

! 													! 
! description of transpose decomposition strategy for RSL LITE. 20061231jm				! description of transpose decomposition strategy for RSL LITE. 20061231jm
!													!
! Here is the tranpose scheme that is implemented for RSL_LITE. Upper-case				! Here is the tranpose scheme that is implemented for RSL_LITE. Upper-case
! XY corresponds to the dimension of the processor mesh, lower-case xyz					! XY corresponds to the dimension of the processor mesh, lower-case xyz
! corresponds to grid dimension.									! corresponds to grid dimension.
! 													! 
!      xy        zy        zx										!      xy        zy        zx
! 													! 
!     XxYy <--> XzYy <--> XzYx <- note x decomposed over Y procs					!     XxYy <--> XzYy <--> XzYx <- note x decomposed over Y procs
!       ^                  ^										!       ^                  ^
!       |                  |										!       |                  |
!       +------------------+  <- this edge is costly; see below						!       +------------------+  <- this edge is costly; see below
! 													! 
! The aim is to avoid all-to-all communication over whole						! The aim is to avoid all-to-all communication over whole
! communicator. Instead, when possible, use a transpose scheme that requires				! communicator. Instead, when possible, use a transpose scheme that requires
! all-to-all within dimensional communicators; that is, communicators					! all-to-all within dimensional communicators; that is, communicators
! defined for the processes in a rank or column of the processor mesh. Note,				! defined for the processes in a rank or column of the processor mesh. Note,
! however, it is not possible to create a ring of transposes between					! however, it is not possible to create a ring of transposes between
! xy-yz-xz decompositions without at least one of the edges in the ring					! xy-yz-xz decompositions without at least one of the edges in the ring
! being fully all-to-all (in other words, one of the tranpose edges must				! being fully all-to-all (in other words, one of the tranpose edges must
! rotate and not just transpose a plane of the model grid within the					! rotate and not just transpose a plane of the model grid within the
! processor mesh). The issue is then, where should we put this costly edge				! processor mesh). The issue is then, where should we put this costly edge
! in the tranpose scheme we chose? To avoid being completely arbitrary, 				! in the tranpose scheme we chose? To avoid being completely arbitrary, 
! we chose a scheme most natural for models that use parallel spectral					! we chose a scheme most natural for models that use parallel spectral
! transforms, where the costly edge is the one that goes from the xz to					! transforms, where the costly edge is the one that goes from the xz to
! the xy decomposition.  (May be implemented as just a two step transpose				! the xy decomposition.  (May be implemented as just a two step transpose
! back through yz).											! back through yz).
!													!
! Additional notational convention, below. The 'x' or 'y' appended to the				! Additional notational convention, below. The 'x' or 'y' appended to the
! dimension start or end variable refers to which grid dimension is all					! dimension start or end variable refers to which grid dimension is all
! on-processor in the given decomposition. That is ipsx and ipex are the				! on-processor in the given decomposition. That is ipsx and ipex are the
! start and end for the i-dimension in the zy decomposition where x is					! start and end for the i-dimension in the zy decomposition where x is
! on-processor. ('z' is assumed for xy decomposition and not appended to				! on-processor. ('z' is assumed for xy decomposition and not appended to
! the ips, ipe, etc. variable names).									! the ips, ipe, etc. variable names).
! 													! 

! XzYy decomposition											! XzYy decomposition

    kpsx = -1												    kpsx = -1
    j = jds ;												    j = jds ;
    ierr = 0												    ierr = 0
    DO k = kds, kde											    DO k = kds, kde
!       CALL task_for_point ( k, j, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &		   |	       CALL task_for_point ( k, j, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( k, j, kds, kde, jds, jde, nest_pes_x(id), nest_pes_y(id), Px, Py, &   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_	       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_
       IF ( Px .EQ. mytask_x ) THEN									       IF ( Px .EQ. mytask_x ) THEN
          kpex = k											          kpex = k
          IF ( kpsx .EQ. -1 ) kpsx = k									          IF ( kpsx .EQ. -1 ) kpsx = k
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF 												    ENDIF 
    													    
! handle case where no levels are assigned to this process						! handle case where no levels are assigned to this process
! no iterations.  Do same for I and J. Need to handle memory alloc below.				! no iterations.  Do same for I and J. Need to handle memory alloc below.
    IF (kpsx .EQ. -1 ) THEN										    IF (kpsx .EQ. -1 ) THEN
       kpex = -1											       kpex = -1
       kpsx = 0												       kpsx = 0
    END IF												    ENDIF

    jpsx = -1												    jpsx = -1
    k = kds ;												    k = kds ;
    ierr = 0												    ierr = 0
    DO j = jds, jde											    DO j = jds, jde
!       CALL task_for_point ( k, j, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &		   |	       CALL task_for_point ( k, j, kds, kde, jds, jde, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( k, j, kds, kde, jds, jde, nest_pes_x(id), nest_pes_y(id), Px, Py, &   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_	       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_
       IF ( Py .EQ. mytask_y ) THEN									       IF ( Py .EQ. mytask_y ) THEN
          jpex = j											          jpex = j
          IF ( jpsx .EQ. -1 ) jpsx = j									          IF ( jpsx .EQ. -1 ) jpsx = j
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF 												    ENDIF 
    IF (jpsx .EQ. -1 ) THEN										    IF (jpsx .EQ. -1 ) THEN
       jpex = -1											       jpex = -1
       jpsx = 0												       jpsx = 0
    END IF												    ENDIF

!begin: wig; 12-Mar-2008										!begin: wig; 12-Mar-2008
! This appears redundant with the conditionals above, but we get cases with only			! This appears redundant with the conditionals above, but we get cases with only
! one of the directions being set to "missing" when turning off extra processors.			! one of the directions being set to "missing" when turning off extra processors.
! This may break the handling of setting only one of nproc_x or nproc_y via the namelist.		! This may break the handling of setting only one of nproc_x or nproc_y via the namelist.
    IF (jpex .EQ. -1) THEN									   |	    IF (ipex .EQ. -1 .or. jpex .EQ. -1) THEN
       ipex = -1											       ipex = -1
       ipsx = 0												       ipsx = 0
       jpex = -1											       jpex = -1
       jpsx = 0												       jpsx = 0
    END IF												    ENDIF
!end: wig; 12-Mar-2008											!end: wig; 12-Mar-2008

! XzYx decomposition  (note, x grid dim is decomposed over Y processor dim)				! XzYx decomposition  (note, x grid dim is decomposed over Y processor dim)

    kpsy = kpsx   ! same as above									    kpsy = kpsx   ! same as above
    kpey = kpex   ! same as above									    kpey = kpex   ! same as above

    ipsy = -1												    ipsy = -1
    k = kds ;												    k = kds ;
    ierr = 0												    ierr = 0
    DO i = ids, ide											    DO i = ids, ide
!       CALL task_for_point ( i, k, ids, ide, kds, kde, ntasks_y, ntasks_x, Py, Px, &		   |	       CALL task_for_point ( i, k, ids, ide, kds, kde, ntasks_y, ntasks_x, Py, Px, &
       CALL task_for_point ( i, k, ids, ide, kds, kde, nest_pes_y(id), nest_pes_x(id), Py, Px, &   <
                             miny, minx, ierr )								                             miny, minx, ierr )
       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_	       IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in module_
       IF ( Py .EQ. mytask_y ) THEN									       IF ( Py .EQ. mytask_y ) THEN
          ipey = i											          ipey = i
          IF ( ipsy .EQ. -1 ) ipsy = i									          IF ( ipsy .EQ. -1 ) ipsy = i
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF 												    ENDIF 
    IF (ipsy .EQ. -1 ) THEN										    IF (ipsy .EQ. -1 ) THEN
       ipey = -1											       ipey = -1
       ipsy = 0												       ipsy = 0
    END IF												    ENDIF


#else													#else

! In case of NMM CORE, the domain only ever runs from ids..ide-1 and jds..jde-1 so			! In case of NMM CORE, the domain only ever runs from ids..ide-1 and jds..jde-1 so
! adjust decomposition to reflect.  20051020 JM								! adjust decomposition to reflect.  20051020 JM
    ips = -1												    ips = -1
    j = jds												    j = jds
    ierr = 0												    ierr = 0
    DO i = ids, ide-1											    DO i = ids, ide-1
!jm       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, ntasks_x, ntasks_y, Px, Py, &	   |	       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, nest_pes_x(id), nest_pes_y(id), Px, P   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( Px .EQ. mytask_x ) THEN									       IF ( Px .EQ. mytask_x ) THEN
          ipe = i											          ipe = i
!          IF ( Px .EQ. ntasks_x-1 ) ipe = ipe + 1						   |	          IF ( Px .EQ. ntasks_x-1 ) ipe = ipe + 1
          IF ( Px .EQ. nest_pes_x(id)-1 ) ipe = ipe + 1						   <
          IF ( ips .EQ. -1 ) ips = i									          IF ( ips .EQ. -1 ) ips = i
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF 												    ENDIF 
    jps = -1												    jps = -1
    i = ids ;												    i = ids ;
    ierr = 0												    ierr = 0
    DO j = jds, jde-1											    DO j = jds, jde-1
!jm       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, ntasks_x, ntasks_y, Px, Py, &	   |	       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, ntasks_x, ntasks_y, Px, Py, &
       CALL task_for_point ( i, j, ids, ide-1, jds, jde-1, nest_pes_x(id), nest_pes_y(id), Px, P   <
                             minx, miny, ierr )								                             minx, miny, ierr )
       IF ( Py .EQ. mytask_y ) THEN									       IF ( Py .EQ. mytask_y ) THEN
          jpe = j											          jpe = j
!          IF ( Py .EQ. ntasks_y-1 ) jpe = jpe + 1						   |	          IF ( Py .EQ. ntasks_y-1 ) jpe = jpe + 1
          IF ( Py .EQ. nest_pes_y(id)-1 ) jpe = jpe + 1						   <
          IF ( jps .EQ. -1 ) jps = j									          IF ( jps .EQ. -1 ) jps = j
       END IF												       ENDIF
    END DO												    ENDDO
    IF ( ierr .NE. 0 ) THEN										    IF ( ierr .NE. 0 ) THEN
       CALL tfp_message(__FILE__,__LINE__)								       CALL tfp_message(__FILE__,__LINE__)
    END IF 												    ENDIF 
#endif													#endif

! extend the patch dimensions out shw along edges of domain						! extend the patch dimensions out shw along edges of domain
    IF ( ips < ipe .and. jps < jpe ) THEN           !wig; 11-Mar-2008					    IF ( ips < ipe .and. jps < jpe ) THEN           !wig; 11-Mar-2008
       IF ( mytask_x .EQ. 0 ) THEN									       IF ( mytask_x .EQ. 0 ) THEN
          ips = ips - shw										          ips = ips - shw
          ipsy = ipsy - shw										          ipsy = ipsy - shw
       END IF												       ENDIF
!       IF ( mytask_x .EQ. ntasks_x-1 ) THEN							   |	       IF ( mytask_x .EQ. ntasks_x-1 ) THEN
       IF ( mytask_x .EQ. nest_pes_x(id)-1 ) THEN						   <
          ipe = ipe + shw										          ipe = ipe + shw
          ipey = ipey + shw										          ipey = ipey + shw
       END IF												       ENDIF
       IF ( mytask_y .EQ. 0 ) THEN									       IF ( mytask_y .EQ. 0 ) THEN
          jps = jps - shw										          jps = jps - shw
          jpsx = jpsx - shw										          jpsx = jpsx - shw
       END IF												       ENDIF
!       IF ( mytask_y .EQ. ntasks_y-1 ) THEN							   |	       IF ( mytask_y .EQ. ntasks_y-1 ) THEN
       IF ( mytask_y .EQ. nest_pes_y(id)-1 ) THEN						   <
          jpe = jpe + shw										          jpe = jpe + shw
          jpex = jpex + shw										          jpex = jpex + shw
       END IF												       ENDIF
    END IF                                           !wig; 11-Mar-2008					    ENDIF                                           !wig; 11-Mar-2008

    kps = 1												    kps = 1
    kpe = kde-kds+1											    kpe = kde-kds+1

    kms = 1												    kms = 1
    kme = kpe												    kme = kpe
    kmsx = kpsx												    kmsx = kpsx
    kmex = kpex												    kmex = kpex
    kmsy = kpsy												    kmsy = kpsy
    kmey = kpey												    kmey = kpey

    ! handle setting the memory dimensions where there are no levels assigned to this proc		    ! handle setting the memory dimensions where there are no levels assigned to this proc
    IF ( kpsx .EQ. 0 .AND. kpex .EQ. -1 ) THEN								    IF ( kpsx .EQ. 0 .AND. kpex .EQ. -1 ) THEN
      kmsx = 0												      kmsx = 0
      kmex = 0												      kmex = 0
    END IF												    ENDIF
    IF ( kpsy .EQ. 0 .AND. kpey .EQ. -1 ) THEN								    IF ( kpsy .EQ. 0 .AND. kpey .EQ. -1 ) THEN
      kmsy = 0												      kmsy = 0
      kmey = 0												      kmey = 0
    END IF												    ENDIF

    IF ( (jps .EQ. 0 .AND. jpe .EQ. -1) .OR. (ips .EQ. 0 .AND. ipe .EQ. -1) ) THEN			    IF ( (jps .EQ. 0 .AND. jpe .EQ. -1) .OR. (ips .EQ. 0 .AND. ipe .EQ. -1) ) THEN
      ims = 0												      ims = 0
      ime = 0												      ime = 0
    ELSE												    ELSE
      ims = max( ips - max(shw,maxhalowidth), ids - bdx ) - 1						      ims = max( ips - max(shw,maxhalowidth), ids - bdx ) - 1
      ime = min( ipe + max(shw,maxhalowidth), ide + bdx ) + 1						      ime = min( ipe + max(shw,maxhalowidth), ide + bdx ) + 1
#ifdef INTEL_ALIGN64											#ifdef INTEL_ALIGN64
! align on 64 byte boundaries if -align array64byte							! align on 64 byte boundaries if -align array64byte
      ims = ips-CHUNK											      ims = ips-CHUNK
      ime = ime + (CHUNK-mod(ime-ims+1,CHUNK))								      ime = ime + (CHUNK-mod(ime-ims+1,CHUNK))
#endif													#endif
    END IF												    ENDIF
    imsx = ids												    imsx = ids
    imex = ide												    imex = ide
    ipsx = imsx												    ipsx = imsx
    ipex = imex												    ipex = imex
    ! handle setting the memory dimensions where there are no Y elements assigned to this proc		    ! handle setting the memory dimensions where there are no Y elements assigned to this proc
    IF ( ipsy .EQ. 0 .AND. ipey .EQ. -1 ) THEN								    IF ( ipsy .EQ. 0 .AND. ipey .EQ. -1 ) THEN
      imsy = 0												      imsy = 0
      imey = 0												      imey = 0
    ELSE												    ELSE
      imsy = ipsy											      imsy = ipsy
      imey = ipey											      imey = ipey
    END IF												    ENDIF

    IF ( (jps .EQ. 0 .AND. jpe .EQ. -1) .OR. (ips .EQ. 0 .AND. ipe .EQ. -1) ) THEN			    IF ( (jps .EQ. 0 .AND. jpe .EQ. -1) .OR. (ips .EQ. 0 .AND. ipe .EQ. -1) ) THEN
      jms = 0												      jms = 0
      jme = 0												      jme = 0
    ELSE												    ELSE
      jms = max( jps - max(shw,maxhalowidth), jds - bdy ) - 1						      jms = max( jps - max(shw,maxhalowidth), jds - bdy ) - 1
      jme = min( jpe + max(shw,maxhalowidth), jde + bdy ) + 1						      jme = min( jpe + max(shw,maxhalowidth), jde + bdy ) + 1
    END IF												    ENDIF
    jmsx = jpsx												    jmsx = jpsx
    jmex = jpex												    jmex = jpex
    jmsy = jds												    jmsy = jds
    jmey = jde												    jmey = jde
    ! handle setting the memory dimensions where there are no X elements assigned to this proc		    ! handle setting the memory dimensions where there are no X elements assigned to this proc
    IF ( jpsx .EQ. 0 .AND. jpex .EQ. -1 ) THEN								    IF ( jpsx .EQ. 0 .AND. jpex .EQ. -1 ) THEN
      jmsx = 0												      jmsx = 0
      jmex = 0												      jmex = 0
      jpsy = 0											   <
      jpey = -1											   <
    ELSE												    ELSE
      jpsy = jmsy											      jpsy = jmsy
      jpey = jmey											      jpey = jmey
    END IF												    ENDIF

  END SUBROUTINE compute_memory_dims_rsl_lite								  END SUBROUTINE compute_memory_dims_rsl_lite

! internal, used below for switching the argument to MPI calls						! internal, used below for switching the argument to MPI calls
! if reals are being autopromoted to doubles in the build of WRF					! if reals are being autopromoted to doubles in the build of WRF
   INTEGER function getrealmpitype()									   INTEGER function getrealmpitype()
#ifndef STUBMPI												#ifndef STUBMPI
      IMPLICIT NONE											      IMPLICIT NONE
												   >	      INCLUDE 'mpif.h'
      INTEGER rtypesize, dtypesize, ierr								      INTEGER rtypesize, dtypesize, ierr
      CALL mpi_type_size ( MPI_REAL, rtypesize, ierr )							      CALL mpi_type_size ( MPI_REAL, rtypesize, ierr )
      CALL mpi_type_size ( MPI_DOUBLE_PRECISION, dtypesize, ierr )					      CALL mpi_type_size ( MPI_DOUBLE_PRECISION, dtypesize, ierr )
      IF ( RWORDSIZE .EQ. rtypesize ) THEN								      IF ( RWORDSIZE .EQ. rtypesize ) THEN
        getrealmpitype = MPI_REAL									        getrealmpitype = MPI_REAL
      ELSE IF ( RWORDSIZE .EQ. dtypesize ) THEN								      ELSE IF ( RWORDSIZE .EQ. dtypesize ) THEN
        getrealmpitype = MPI_DOUBLE_PRECISION								        getrealmpitype = MPI_DOUBLE_PRECISION
      ELSE												      ELSE
        CALL wrf_error_fatal ( 'RWORDSIZE or DWORDSIZE does not match any MPI type' )			        CALL wrf_error_fatal ( 'RWORDSIZE or DWORDSIZE does not match any MPI type' )
      END IF												      ENDIF
#else													#else
! required dummy initialization for function that is never called					! required dummy initialization for function that is never called
      getrealmpitype = 1										      getrealmpitype = 1
#endif													#endif
      RETURN												      RETURN
   END FUNCTION getrealmpitype										   END FUNCTION getrealmpitype

   REAL FUNCTION wrf_dm_max_int ( inval )							   <
      IMPLICIT NONE										   <
#ifndef STUBMPI											   <
      INCLUDE 'mpif.h'										   <
      INTEGER, intent(in) :: inval								   <
      INTEGER :: ierr, retval									   <
      CALL mpi_allreduce ( inval, retval , 1, MPI_INT, MPI_MAX, local_communicator, ierr )	   <
      wrf_dm_max_int = retval									   <
#else												   <
      INTEGER, intent(in) :: inval								   <
      wrf_dm_max_int = inval									   <
#endif												   <
   END FUNCTION wrf_dm_max_int									   <
												   <
   REAL FUNCTION wrf_dm_max_real ( inval )								   REAL FUNCTION wrf_dm_max_real ( inval )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL inval, retval										      REAL inval, retval
      INTEGER comm,ierr										   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_MAX, local_communicator, ier
      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_MAX, comm, ierr )		   <
      wrf_dm_max_real = retval										      wrf_dm_max_real = retval
#else													#else
      REAL inval											      REAL inval
      wrf_dm_max_real = inval										      wrf_dm_max_real = inval
#endif													#endif
   END FUNCTION wrf_dm_max_real										   END FUNCTION wrf_dm_max_real

   REAL FUNCTION wrf_dm_min_real ( inval )								   REAL FUNCTION wrf_dm_min_real ( inval )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL inval, retval										      REAL inval, retval
      INTEGER comm,ierr										   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_MIN, local_communicator, ier
      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_MIN, comm, ierr )		   <
      wrf_dm_min_real = retval										      wrf_dm_min_real = retval
#else													#else
      REAL inval											      REAL inval
      wrf_dm_min_real = inval										      wrf_dm_min_real = inval
#endif													#endif
   END FUNCTION wrf_dm_min_real										   END FUNCTION wrf_dm_min_real

   SUBROUTINE wrf_dm_min_reals ( inval, retval, n )							   SUBROUTINE wrf_dm_min_reals ( inval, retval, n )
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER n												      INTEGER n
      REAL inval(*)											      REAL inval(*)
      REAL retval(*)											      REAL retval(*)
#ifndef STUBMPI												#ifndef STUBMPI
      INTEGER comm,ierr										   |	      INCLUDE 'mpif.h'
      CALL wrf_get_dm_communicator(comm)							   |	      INTEGER ierr
      CALL mpi_allreduce ( inval, retval , n, getrealmpitype(), MPI_MIN, comm, ierr )		   |	      CALL mpi_allreduce ( inval, retval , n, getrealmpitype(), MPI_MIN, local_communicator, ier
#else													#else
      retval(1:n) = inval(1:n)										      retval(1:n) = inval(1:n)
#endif													#endif
   END SUBROUTINE wrf_dm_min_reals									   END SUBROUTINE wrf_dm_min_reals

   FUNCTION wrf_dm_sum_real8 ( inval )									   FUNCTION wrf_dm_sum_real8 ( inval )
     ! Forced eight byte real sum needed for calculating an accurate					     ! Forced eight byte real sum needed for calculating an accurate
     ! mean motion in HWRF moduel_tracker.								     ! mean motion in HWRF moduel_tracker.
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL*8 inval, retval, wrf_dm_sum_real8								      REAL*8 inval, retval, wrf_dm_sum_real8
      INTEGER comm,ierr										   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, MPI_REAL8, MPI_SUM, local_communicator, ierr )
      CALL mpi_allreduce ( inval, retval , 1, MPI_REAL8, MPI_SUM, comm, ierr )			   <
      wrf_dm_sum_real8 = retval										      wrf_dm_sum_real8 = retval
#else													#else
      REAL*8 wrf_dm_sum_real8,inval									      REAL*8 wrf_dm_sum_real8,inval
      wrf_dm_sum_real8 = inval										      wrf_dm_sum_real8 = inval
#endif													#endif
   END FUNCTION wrf_dm_sum_real8									   END FUNCTION wrf_dm_sum_real8

   REAL FUNCTION wrf_dm_sum_real ( inval )								   REAL FUNCTION wrf_dm_sum_real ( inval )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL inval, retval										      REAL inval, retval
      INTEGER comm,ierr										   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_SUM, local_communicator, ier
      CALL mpi_allreduce ( inval, retval , 1, getrealmpitype(), MPI_SUM, comm, ierr )		   <
      wrf_dm_sum_real = retval										      wrf_dm_sum_real = retval
#else													#else
      REAL inval											      REAL inval
      wrf_dm_sum_real = inval										      wrf_dm_sum_real = inval
#endif													#endif
   END FUNCTION wrf_dm_sum_real										   END FUNCTION wrf_dm_sum_real

   SUBROUTINE wrf_dm_sum_reals (inval, retval)								   SUBROUTINE wrf_dm_sum_reals (inval, retval)
      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN)  :: inval(:)									      REAL, INTENT(IN)  :: inval(:)
      REAL, INTENT(OUT) :: retval(:)									      REAL, INTENT(OUT) :: retval(:)
#ifndef STUBMPI												#ifndef STUBMPI
      INTEGER comm,ierr										   |	      INCLUDE 'mpif.h'
      CALL wrf_get_dm_communicator(comm)							   |	      INTEGER ierr
      CALL mpi_allreduce ( inval, retval, SIZE(inval), getrealmpitype(), MPI_SUM, comm, ierr )	   |	      CALL mpi_allreduce ( inval, retval, SIZE(inval), getrealmpitype(), MPI_SUM, local_communic
#else													#else
      retval = inval											      retval = inval
#endif													#endif
   END SUBROUTINE wrf_dm_sum_reals									   END SUBROUTINE wrf_dm_sum_reals

   INTEGER FUNCTION wrf_dm_sum_integer ( inval )							   INTEGER FUNCTION wrf_dm_sum_integer ( inval )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      INTEGER inval, retval										      INTEGER inval, retval
      INTEGER comm,ierr										   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, MPI_INTEGER, MPI_SUM, local_communicator, ierr )
      CALL mpi_allreduce ( inval, retval , 1, MPI_INTEGER, MPI_SUM, comm, ierr )		   <
      wrf_dm_sum_integer = retval									      wrf_dm_sum_integer = retval
#else													#else
      INTEGER inval											      INTEGER inval
      wrf_dm_sum_integer = inval									      wrf_dm_sum_integer = inval
#endif													#endif
   END FUNCTION wrf_dm_sum_integer									   END FUNCTION wrf_dm_sum_integer

   SUBROUTINE wrf_dm_sum_integers (inval, retval)							   SUBROUTINE wrf_dm_sum_integers (inval, retval)
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER, INTENT(IN)  :: inval(:)									      INTEGER, INTENT(IN)  :: inval(:)
      INTEGER, INTENT(OUT) :: retval(:)									      INTEGER, INTENT(OUT) :: retval(:)
#ifndef STUBMPI												#ifndef STUBMPI
      INTEGER comm,ierr										   |	      INCLUDE 'mpif.h'
      CALL wrf_get_dm_communicator(comm)							   |	      INTEGER ierr
      CALL mpi_allreduce ( inval, retval, SIZE(inval), MPI_INTEGER, MPI_SUM, comm, ierr )	   |	      CALL mpi_allreduce ( inval, retval, SIZE(inval), MPI_INTEGER, MPI_SUM, local_communicator,
#else													#else
      retval = inval											      retval = inval
#endif													#endif
   END SUBROUTINE wrf_dm_sum_integers									   END SUBROUTINE wrf_dm_sum_integers

#if ( HWRF == 1 )										   |	#ifdef HWRF
   SUBROUTINE wrf_dm_minloc_real ( val, lat, lon, z, idex, jdex )					   SUBROUTINE wrf_dm_minloc_real ( val, lat, lon, z, idex, jdex )
#ifndef STUBMPI											   <
      use mpi											   <
      IMPLICIT NONE											      IMPLICIT NONE
												   >	#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL val, lat, lon, z										      REAL val, lat, lon, z
      INTEGER idex, jdex, ierr, mrank, comm							   |	      INTEGER idex, jdex, ierr
      REAL inreduce(2), outreduce(2), bcast(5)							   |	      INTEGER dex(2)
												   |	      REAL vll(4)
      inreduce=(/ val, real(mytask) /)								   |	      INTEGER dex_all (2,ntasks)
      CALL wrf_get_dm_communicator(comm)							   |	      REAL vll_all(4,ntasks)
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2REAL,MPI_MINLOC,&				   |	      INTEGER i
           comm,ierr)										   |
      val=outreduce(1)										   |	      vll= (/ val, lat, lon, z /)
      mrank=outreduce(2)									   |
      bcast=(/ lat,lon,z,real(idex),real(jdex) /)						   |	      dex(1) = idex ; dex(2) = jdex
      call MPI_Bcast(bcast,5,MPI_REAL,mrank,comm,ierr)						   |	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, local_communicator, ie
      lat=bcast(1)										   |	      CALL mpi_allgather ( vll, 4, getrealmpitype(), vll_all , 4, getrealmpitype(), local_commun
      lon=bcast(2)										   |	      val = vll_all(1,1) ; lat = vll_all(2,1)
      z=bcast(3)										   |	      lon = vll_all(3,1) ; z = vll_all(4,1)
      idex=bcast(4)										   |	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
      jdex=bcast(5)										   |	      DO i = 2, ntasks
												   >	        IF ( vll_all(1,i) .LT. val ) THEN
												   >	           val = vll_all(1,i)
												   >	           lat = vll_all(2,i)
												   >	           lon = vll_all(3,i)
												   >	           z = vll_all(4,i)
												   >	           idex = dex_all(1,i)
												   >	           jdex = dex_all(2,i)
												   >	        ENDIF
												   >	      ENDDO
#else													#else
      IMPLICIT NONE										   <
      REAL val,lat,lon,z										      REAL val,lat,lon,z
      INTEGER idex, jdex									   |	      INTEGER idex, jdex, ierr
#endif													#endif
   END SUBROUTINE wrf_dm_minloc_real									   END SUBROUTINE wrf_dm_minloc_real
   SUBROUTINE wrf_dm_maxloc_real ( val, lat, lon, z, idex, jdex )					   SUBROUTINE wrf_dm_maxloc_real ( val, lat, lon, z, idex, jdex )
#ifndef STUBMPI											   <
      use mpi											   <
      IMPLICIT NONE											      IMPLICIT NONE
												   >	#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      REAL val, lat, lon, z										      REAL val, lat, lon, z
      INTEGER idex, jdex, ierr, mrank, comm							   |	      INTEGER idex, jdex, ierr
      REAL inreduce(2), outreduce(2), bcast(5)							   |	      INTEGER dex(2)
												   |	      REAL vll(4)
      inreduce=(/ val, real(mytask) /)								   |	      INTEGER dex_all (2,ntasks)
      CALL wrf_get_dm_communicator(comm)							   |	      REAL vll_all(4,ntasks)
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2REAL,MPI_MAXLOC,&				   |	      INTEGER i
           comm,ierr)										   |
      val=outreduce(1)										   |	      vll= (/ val, lat, lon, z /)
      mrank=outreduce(2)									   |
      bcast=(/ lat,lon,z,real(idex),real(jdex) /)						   |	      dex(1) = idex ; dex(2) = jdex
      call MPI_Bcast(bcast,5,MPI_REAL,mrank,comm,ierr)						   |	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, local_communicator, ie
      lat=bcast(1)										   |	      CALL mpi_allgather ( vll, 4, getrealmpitype(), vll_all , 4, getrealmpitype(), local_commun
      lon=bcast(2)										   |	      val = vll_all(1,1) ; lat = vll_all(2,1)
      z=bcast(3)										   |	      lon = vll_all(3,1) ; z = vll_all(4,1)
      idex=bcast(4)										   |	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
      jdex=bcast(5)										   |	      DO i = 2, ntasks
												   >	        IF ( vll_all(1,i) .GT. val ) THEN
												   >	           val = vll_all(1,i)
												   >	           lat = vll_all(2,i)
												   >	           lon = vll_all(3,i)
												   >	           z = vll_all(4,i)
												   >	           idex = dex_all(1,i)
												   >	           jdex = dex_all(2,i)
												   >	        ENDIF
												   >	      ENDDO
#else													#else
      IMPLICIT NONE										   <
      REAL val,lat,lon,z										      REAL val,lat,lon,z
      INTEGER idex, jdex									   |	      INTEGER idex, jdex, ierr
#endif													#endif
   END SUBROUTINE wrf_dm_maxloc_real									   END SUBROUTINE wrf_dm_maxloc_real
#endif													#endif

   INTEGER FUNCTION wrf_dm_bxor_integer ( inval )							   INTEGER FUNCTION wrf_dm_bxor_integer ( inval )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
      INTEGER inval, retval										      INTEGER inval, retval
      INTEGER comm, ierr									   |	      INTEGER ierr
      CALL wrf_get_dm_communicator(comm)							   |	      CALL mpi_allreduce ( inval, retval , 1, MPI_INTEGER, MPI_BXOR, local_communicator, ierr )
      CALL mpi_allreduce ( inval, retval , 1, MPI_INTEGER, MPI_BXOR, comm, ierr )		   <
      wrf_dm_bxor_integer = retval									      wrf_dm_bxor_integer = retval
#else													#else
      INTEGER inval											      INTEGER inval
      wrf_dm_bxor_integer = inval									      wrf_dm_bxor_integer = inval
#endif													#endif
   END FUNCTION wrf_dm_bxor_integer									   END FUNCTION wrf_dm_bxor_integer

												   |	   SUBROUTINE wrf_dm_maxval_real ( val, idex, jdex )
LOGICAL FUNCTION wrf_dm_lor_logical ( inval )							   <
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
      LOGICAL inval, retval									   |	      INCLUDE 'mpif.h'
      INTEGER comm, ierr									   |	      REAL val, val_all( ntasks )
      CALL wrf_get_dm_communicator(comm)							   |	      INTEGER idex, jdex, ierr
      CALL mpi_allreduce ( inval, retval , 1, MPI_LOGICAL, MPI_LOR, comm, ierr )		   |	      INTEGER dex(2)
      wrf_dm_lor_logical = retval								   |	      INTEGER dex_all (2,ntasks)
												   >	      INTEGER i
												   >
												   >	      dex(1) = idex ; dex(2) = jdex
												   >	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, local_communicator, ie
												   >	      CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), local_commun
												   >	      val = val_all(1)
												   >	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
												   >	      DO i = 2, ntasks
												   >	        IF ( val_all(i) .GT. val ) THEN
												   >	           val = val_all(i)
												   >	           idex = dex_all(1,i)
												   >	           jdex = dex_all(2,i)
												   >	        ENDIF
												   >	      ENDDO
#else													#else
      LOGICAL inval										   |	      REAL val
      wrf_dm_lor_logical = inval								   |	      INTEGER idex, jdex, ierr
#endif													#endif
   END FUNCTION wrf_dm_lor_logical								   |	   END SUBROUTINE wrf_dm_maxval_real
												   <

LOGICAL FUNCTION wrf_dm_land_logical ( inval )							   |	#ifndef PROMOTE_FLOAT
												   >	   SUBROUTINE wrf_dm_maxval_doubleprecision ( val, idex, jdex )
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												# ifndef STUBMPI
      LOGICAL inval, retval									   |	      INCLUDE 'mpif.h'
      INTEGER comm, ierr									   |	      DOUBLE PRECISION val, val_all( ntasks )
      CALL wrf_get_dm_communicator(comm)							   |	      INTEGER idex, jdex, ierr
      CALL mpi_allreduce ( inval, retval , 1, MPI_LOGICAL, MPI_LAND, comm, ierr )		   |	      INTEGER dex(2)
      wrf_dm_land_logical = retval								   |	      INTEGER dex_all (2,ntasks)
												   >	      INTEGER i
												   >
												   >	      dex(1) = idex ; dex(2) = jdex
												   >	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, local_communicator, ie
												   >	      CALL mpi_allgather ( val, 1, MPI_DOUBLE_PRECISION, val_all , 1, MPI_DOUBLE_PRECISION, loca
												   >	      val = val_all(1)
												   >	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
												   >	      DO i = 2, ntasks
												   >	        IF ( val_all(i) .GT. val ) THEN
												   >	           val = val_all(i)
												   >	           idex = dex_all(1,i)
												   >	           jdex = dex_all(2,i)
												   >	        ENDIF
												   >	      ENDDO
#else													# else
      LOGICAL inval										   |	      DOUBLE PRECISION val
      wrf_dm_land_logical = inval								   |	      INTEGER idex, jdex, ierr
												   >	# endif
												   >	   END SUBROUTINE wrf_dm_maxval_doubleprecision
#endif													#endif
   END FUNCTION wrf_dm_land_logical								   <
												   <
												   <
   SUBROUTINE wrf_dm_maxval_real ( val, idex, jdex )						   <
# ifndef STUBMPI										   <
      use mpi											   <
      IMPLICIT NONE										   <
      REAL val											   <
      INTEGER :: idex, jdex, i, comm								   <
      INTEGER :: bcast(2),mrank									   <
      REAL :: inreduce(2),outreduce(2)								   <

      inreduce=(/ val, real(mytask) /)								   |	   SUBROUTINE wrf_dm_maxval_integer ( val, idex, jdex )
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)							   <
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2REAL,&					   <
                         MPI_MAXLOC,comm,i)							   <
      mrank=outreduce(2)									   <
      val=outreduce(1)										   <
      call MPI_Bcast(bcast,2,MPI_REAL,mrank,comm,i)						   <
      idex=bcast(1)										   <
      jdex=bcast(2)										   <
# else												   <
      IMPLICIT NONE											      IMPLICIT NONE
      REAL val											   |	#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'
												   >	      INTEGER val, val_all( ntasks )
      INTEGER idex, jdex, ierr										      INTEGER idex, jdex, ierr
												   >	      INTEGER dex(2)
												   >	      INTEGER dex_all (2,ntasks)
												   >	      INTEGER i
												   >
												   >	      dex(1) = idex ; dex(2) = jdex
												   >	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, local_communicator, ie
												   >	      CALL mpi_allgather ( val, 1, MPI_INTEGER, val_all , 1, MPI_INTEGER, local_communicator, ie
												   >	      val = val_all(1)
												   >	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
												   >	      DO i = 2, ntasks
												   >	        IF ( val_all(i) .GT. val ) THEN
												   >	           val = val_all(i)
												   >	           idex = dex_all(1,i)
												   >	           jdex = dex_all(2,i)
												   >	        ENDIF
												   >	      ENDDO
												   >	#else
												   >	      INTEGER val
												   >	      INTEGER idex, jdex
# endif													#endif
    END SUBROUTINE wrf_dm_maxval_real								   |	   END SUBROUTINE wrf_dm_maxval_integer
												   >
												   >	!  For HWRF some additional computation is required. This is gopal's doing

   SUBROUTINE wrf_dm_minval_real ( val, idex, jdex )							   SUBROUTINE wrf_dm_minval_real ( val, idex, jdex )
# ifndef STUBMPI										   <
      use mpi											   <
      IMPLICIT NONE											      IMPLICIT NONE
      REAL val											   |	      REAL val, val_all( ntasks )
      INTEGER :: idex, jdex, i, comm								   |	      INTEGER idex, jdex, ierr
      INTEGER :: bcast(2),mrank									   |	      INTEGER dex(2)
      REAL :: inreduce(2),outreduce(2)								   |	      INTEGER dex_all (2,ntasks)
												   >	! <DESCRIPTION>
												   >	! Collective operation. Each processor calls passing a local value and its index; on return
												   >	! all processors are passed back the maximum of all values passed and its index.
												   >	!
												   >	! </DESCRIPTION>
												   >	      INTEGER i, comm
												   >	#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'

      inreduce=(/ val, real(mytask) /)								   <
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)								      CALL wrf_get_dm_communicator ( comm )
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2REAL,&					   |	      dex(1) = idex ; dex(2) = jdex
                         MPI_MINLOC,comm,i)							   |	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, comm, ierr )
      mrank=outreduce(2)									   |	      CALL mpi_allgather ( val, 1, MPI_REAL, val_all , 1, MPI_REAL, comm, ierr )
      val=outreduce(1)										   |	      val = val_all(1)
      call MPI_Bcast(bcast,2,MPI_REAL,mrank,comm,i)						   |	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
      idex=bcast(1)										   |	      DO i = 2, ntasks
      jdex=bcast(2)										   |	        IF ( val_all(i) .LT. val ) THEN
# else												   |	           val = val_all(i)
      IMPLICIT NONE										   |	           idex = dex_all(1,i)
      REAL val											   |	           jdex = dex_all(2,i)
      INTEGER idex, jdex									   |	        ENDIF
												   >	      ENDDO
# endif													#endif
    END SUBROUTINE wrf_dm_minval_real									   END SUBROUTINE wrf_dm_minval_real

#ifndef PROMOTE_FLOAT											#ifndef PROMOTE_FLOAT
   SUBROUTINE wrf_dm_maxval_doubleprecision ( val, idex, jdex )					   |	   SUBROUTINE wrf_dm_minval_doubleprecision ( val, idex, jdex )
# ifndef STUBMPI										   <
      use mpi											   <
      IMPLICIT NONE										   <
      DOUBLE PRECISION val									   <
      INTEGER :: idex, jdex, i, comm								   <
      INTEGER :: bcast(2),mrank									   <
      DOUBLE PRECISION :: inreduce(2),outreduce(2)						   <
												   <
      inreduce=(/ val, dble(mytask) /)								   <
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)							   <
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2DOUBLE_PRECISION,&				   <
                         MPI_MAXLOC,comm,i)							   <
      mrank=outreduce(2)									   <
      val=outreduce(1)										   <
      call MPI_Bcast(bcast,2,MPI_DOUBLE_PRECISION,mrank,comm,i)					   <
      idex=bcast(1)										   <
      jdex=bcast(2)										   <
# else												   <
      IMPLICIT NONE											      IMPLICIT NONE
      DOUBLE PRECISION val									   |	      DOUBLE PRECISION val, val_all( ntasks )
      INTEGER idex, jdex, ierr										      INTEGER idex, jdex, ierr
# endif												   |	      INTEGER dex(2)
   END SUBROUTINE wrf_dm_maxval_doubleprecision							   |	      INTEGER dex_all (2,ntasks)
												   |	! <DESCRIPTION>
   SUBROUTINE wrf_dm_minval_doubleprecision ( val, idex, jdex )					   |	! Collective operation. Each processor calls passing a local value and its index; on return
												   >	! all processors are passed back the maximum of all values passed and its index.
												   >	!
												   >	! </DESCRIPTION>
												   >	      INTEGER i, comm
# ifndef STUBMPI											#ifndef STUBMPI
      use mpi											   |	      INCLUDE 'mpif.h'
      IMPLICIT NONE										   <
      DOUBLE PRECISION val									   <
      INTEGER :: idex, jdex, i, comm								   <
      INTEGER :: bcast(2),mrank									   <
      DOUBLE PRECISION :: inreduce(2),outreduce(2)						   <

      inreduce=(/ val, dble(mytask) /)								   <
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)								      CALL wrf_get_dm_communicator ( comm )
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2DOUBLE_PRECISION,&				   |	      dex(1) = idex ; dex(2) = jdex
                         MPI_MINLOC,comm,i)							   |	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, comm, ierr )
      mrank=outreduce(2)									   |	      CALL mpi_allgather ( val, 1, MPI_DOUBLE_PRECISION, val_all , 1, MPI_DOUBLE_PRECISION, comm
      val=outreduce(1)										   |	      val = val_all(1)
      call MPI_Bcast(bcast,2,MPI_DOUBLE_PRECISION,mrank,comm,i)					   |	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
      idex=bcast(1)										   |	      DO i = 2, ntasks
      jdex=bcast(2)										   |	        IF ( val_all(i) .LT. val ) THEN
# else												   |	           val = val_all(i)
      IMPLICIT NONE										   |	           idex = dex_all(1,i)
      DOUBLE PRECISION val									   |	           jdex = dex_all(2,i)
      INTEGER idex, jdex, ierr									   |	        ENDIF
												   >	      ENDDO
# endif													#endif
   END SUBROUTINE wrf_dm_minval_doubleprecision								   END SUBROUTINE wrf_dm_minval_doubleprecision
#endif													#endif

   SUBROUTINE wrf_dm_maxval_integer ( val, idex, jdex )						   |	   SUBROUTINE wrf_dm_minval_integer ( val, idex, jdex )
# ifndef STUBMPI										   <
      use mpi											   <
      IMPLICIT NONE										   <
      INTEGER val										   <
      INTEGER :: idex, jdex, i, comm								   <
      INTEGER :: bcast(2),mrank									   <
      INTEGER :: inreduce(2),outreduce(2)							   <
												   <
      inreduce=(/ val, mytask /)								   <
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)							   <
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2INTEGER,&					   <
                         MPI_MAXLOC,comm,i)							   <
      mrank=outreduce(2)									   <
      val=outreduce(1)										   <
      call MPI_Bcast(bcast,2,MPI_INTEGER,mrank,comm,i)						   <
      idex=bcast(1)										   <
      jdex=bcast(2)										   <
# else												   <
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER val										   |	      INTEGER val, val_all( ntasks )
      INTEGER idex, jdex, ierr										      INTEGER idex, jdex, ierr
# endif												   |	      INTEGER dex(2)
    END SUBROUTINE wrf_dm_maxval_integer							   |	      INTEGER dex_all (2,ntasks)
												   |	! <DESCRIPTION>
   SUBROUTINE wrf_dm_minval_integer ( val, idex, jdex )						   |	! Collective operation. Each processor calls passing a local value and its index; on return
												   >	! all processors are passed back the maximum of all values passed and its index.
												   >	!
												   >	! </DESCRIPTION>
												   >	      INTEGER i, comm
# ifndef STUBMPI											#ifndef STUBMPI
      use mpi											   |	      INCLUDE 'mpif.h'
      IMPLICIT NONE										   <
      INTEGER val										   <
      INTEGER :: idex, jdex, i, comm								   <
      INTEGER :: bcast(2),mrank									   <
      INTEGER :: inreduce(2),outreduce(2)							   <

      inreduce=(/ val, mytask /)								   <
      bcast=(/ idex,jdex /)									   <
      CALL wrf_get_dm_communicator(comm)								      CALL wrf_get_dm_communicator ( comm )
      call MPI_Allreduce(inreduce,outreduce,1,MPI_2INTEGER,&					   |	      dex(1) = idex ; dex(2) = jdex
                         MPI_MINLOC,comm,i)							   |	      CALL mpi_allgather ( dex, 2, MPI_INTEGER, dex_all , 2, MPI_INTEGER, comm, ierr )
      mrank=outreduce(2)									   |	      CALL mpi_allgather ( val, 1, MPI_INTEGER, val_all , 1, MPI_INTEGER, comm, ierr )
      val=outreduce(1)										   |	      val = val_all(1)
      call MPI_Bcast(bcast,2,MPI_INTEGER,mrank,comm,i)						   |	      idex = dex_all(1,1) ; jdex = dex_all(2,1)
      idex=bcast(1)										   |	      DO i = 2, ntasks
      jdex=bcast(2)										   |	        IF ( val_all(i) .LT. val ) THEN
# else												   |	           val = val_all(i)
      IMPLICIT NONE										   |	           idex = dex_all(1,i)
      INTEGER val										   |	           jdex = dex_all(2,i)
      INTEGER idex, jdex, ierr									   <
# endif												   <
    END SUBROUTINE wrf_dm_minval_integer							   <
												   <
   SUBROUTINE hwrf_coupler_init									   <
#if ( HWRF == 1 )										   <
# ifndef STUBMPI										   <
      IMPLICIT NONE										   <
      LOGICAL mpi_inited									   <
      INTEGER mpi_comm_here,ierr								   <
      CALL MPI_INITIALIZED( mpi_inited, ierr )							   <
      IF ( .NOT. mpi_inited ) THEN								   <
        IF ( coupler_on ) THEN									   <
           CALL cpl_init( mpi_comm_here )							   <
        ELSE											   <
           CALL mpi_init ( ierr )								   <
           mpi_comm_here = MPI_COMM_WORLD							   <
        END IF											   <
        CALL atm_cmp_start( mpi_comm_here )							   <
        CALL wrf_set_dm_communicator( mpi_comm_here )						   <
        CALL wrf_termio_dup( mpi_comm_here )							   <
      END IF												        ENDIF
      RETURN											   |	      ENDDO
# endif												   <
#endif													#endif
   END SUBROUTINE hwrf_coupler_init								   |	   END SUBROUTINE wrf_dm_minval_integer     ! End of gopal's doing

   SUBROUTINE split_communicator									   SUBROUTINE split_communicator
#ifndef STUBMPI												#ifndef STUBMPI
      IMPLICIT NONE											      IMPLICIT NONE
												   >	      INCLUDE 'mpif.h'
      LOGICAL mpi_inited										      LOGICAL mpi_inited
!      INTEGER mpi_comm_here, mpi_comm_local, comdup, comdup2, origmytask,  mytask, ntasks, ierr   |	      INTEGER mpi_comm_here, mpi_comm_local, comdup,  mytask, ntasks, ierr, io_status
      INTEGER mpi_comm_here, mpi_comm_local, comdup, comdup2, origmytask,  ierr, io_status	   <
      INTEGER mpi_comm_me_and_mom								   <
      INTEGER coords(3)										   <
      INTEGER mytask_local,ntasks_local,num_compute_tasks					   <
#  if defined(_OPENMP) && defined(MPI2_THREAD_SUPPORT)							#  if defined(_OPENMP) && defined(MPI2_THREAD_SUPPORT)
      INTEGER thread_support_provided, thread_support_requested						      INTEGER thread_support_provided, thread_support_requested
#  endif												#endif
      INTEGER i, j, k, x, y, n_x, n_y								   |	      INTEGER i, j
      INTEGER iii										   |	      INTEGER, ALLOCATABLE :: icolor(:)
      INTEGER, ALLOCATABLE :: icolor(:),icolor2(:),idomain(:)					   |	      INTEGER tasks_per_split
      INTEGER comm_id										   |	      NAMELIST /namelist_split/ tasks_per_split
! 												   <
! Communicator definition                       Domains						   <
!                                                       					   <
!  6 pe Example Comm   PEs                        (1)						   <
!        COMM_WORLD  0 1 2 3 4 5                  / \						   <
!               1    0 1 2 3 4 5                (2) (3)						   <
!               2    0 1                         |						   <
!               3        0 1 2 3                (4)						   <
!               4    0 1									   <
!												   <
!    Notes: 1. No requirement that any communicator be all tasks				   <
!           2. A task may be a member of an arbitrary number 					   <
!              of local communicators (But you may not want to do this)				   <
!												   <
!												   <
!  Namelist Split Settings (for 3 comms, 4 domains)						   <
!  Revised namelist semantics -- no need for binding nests to separately defined communicators	   <
!												   <
!   (domain_id)     1    2    3    4								   <
!   parent_id       -    1    1    2								   <
!   comm_start      0    0    2    0								   <
!   nest_pes_x      2    1    2    1								   <
!   nest_pes_y      3    2    2    2								   <
!   												   <
!! superceded											   <
!!  Namelist Split Settings (for 3 comms, 4 domains)						   <
!!   (comm_id)       1    2    3    ...								   <
!!   comm_start      0    0    2								   <
!!   comm_pes_x      2    1    2								   <
!!   comm_pes_y      3    2    2								   <
!!												   <
!!  Domain definitions										   <
!!   (domain_id)     1    2    3    4								   <
!!   parent_id       -    1    1    2								   <
!!   comm_domain     1    2    3    2								   <
!! * nest_pes_x      2    1    2    1								   <
!! * nest_pes_y      3    2    2    2								   <
!!												   <
!!   [* nest_pes_x is comm_pes_x(comm_domain(domain_id))]					   <
!												   <
												   <
      INTEGER dims(3)										   <
! for parallel nesting, 201408, jm								   <
      INTEGER :: id										   <
      INTEGER :: intercomm 									   <
      INTEGER :: domain_id,par_id,nest_id,kid_id						   <
      INTEGER :: mytask_me_and_mom, ntasks_me_and_mom, remote_leader				   <
      LOGICAL :: inthisone									   <
      LOGICAL :: mytask_is_nest, mytask_is_par,isperiodic(3)					   <
! for new quilting										   <
      LOGICAL :: quilting_is_turned_off								   <
												   <
!!!!! needed to sneak-peek the registry to get parent_id 					   <
! define as temporaries										   <
#include "namelist_defines.inc"									   <
												   <
! Statements that specify the namelists								   <
#include "namelist_statements.inc"								   <

      CALL MPI_INITIALIZED( mpi_inited, ierr )								      CALL MPI_INITIALIZED( mpi_inited, ierr )
      IF ( .NOT. mpi_inited ) THEN									      IF ( .NOT. mpi_inited ) THEN
#  if defined(_OPENMP) && defined(MPI2_THREAD_SUPPORT)							#  if defined(_OPENMP) && defined(MPI2_THREAD_SUPPORT)
        thread_support_requested = MPI_THREAD_FUNNELED							        thread_support_requested = MPI_THREAD_FUNNELED
        CALL mpi_init_thread ( thread_support_requested, thread_support_provided, ierr )		        CALL mpi_init_thread ( thread_support_requested, thread_support_provided, ierr )
        IF ( thread_support_provided .lt. thread_support_requested ) THEN				        IF ( thread_support_provided .lt. thread_support_requested ) THEN
           CALL WRF_ERROR_FATAL( "failed to initialize MPI thread support")				           CALL WRF_ERROR_FATAL( "failed to initialize MPI thread support")
        END IF												        ENDIF
        mpi_comm_here = MPI_COMM_WORLD									        mpi_comm_here = MPI_COMM_WORLD
#  else													#  else
#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
        IF ( coupler_on ) THEN										        IF ( coupler_on ) THEN
           CALL cpl_init( mpi_comm_here )								           CALL cpl_init( mpi_comm_here )
        ELSE												        ELSE
#endif													#endif
           CALL mpi_init ( ierr )									           CALL mpi_init ( ierr )
           mpi_comm_here = MPI_COMM_WORLD								           mpi_comm_here = MPI_COMM_WORLD
#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
        END IF												        ENDIF
#endif													#endif
#  endif												#  endif
#if ( HWRF == 1 )										   |	#ifdef HWRF
!!!!! jm 20150807 note that for HWRF, this will not be called here because of the call to hwrf_c   |	        CALL atm_cmp_start( mpi_comm_here )   ! atmospheric side of HWRF coupler will split MPI_
!!!!        CALL atm_cmp_start( mpi_comm_here )   ! atmospheric side of HWRF coupler will split    <
#endif													#endif
        CALL wrf_set_dm_communicator( mpi_comm_here )							        CALL wrf_set_dm_communicator( mpi_comm_here )
        CALL wrf_termio_dup( mpi_comm_here )							   <
      END IF												      ENDIF
! this should have been reset by init_module_wrf_quilt to be just the compute tasks		   <
      CALL wrf_get_dm_communicator( mpi_comm_here )							      CALL wrf_get_dm_communicator( mpi_comm_here )
												   >	      CALL wrf_termio_dup( mpi_comm_here )

      CALL MPI_Comm_rank ( mpi_comm_here, mytask_local, ierr ) ;				   |	      CALL MPI_Comm_rank ( mpi_comm_here, mytask, ierr ) ;
      CALL MPI_Comm_size ( mpi_comm_here, ntasks_local, ierr ) ;				   |	      CALL mpi_comm_size ( mpi_comm_here, ntasks, ierr ) ;
      mpi_comm_allcompute = mpi_comm_here							   <

      IF ( mytask_local .EQ. 0 ) THEN								   |	      IF ( mytask .EQ. 0 ) THEN
        max_dom = 1										   <
        OPEN ( unit=27, file="namelist.input", form="formatted", status="old" )				        OPEN ( unit=27, file="namelist.input", form="formatted", status="old" )
        READ ( UNIT = 27 , NML = domains , IOSTAT=io_status )					   |	        tasks_per_split = ntasks
        REWIND(27)										   |	        READ ( 27 , NML = namelist_split, IOSTAT=io_status )
        nio_groups = 1										   <
        nio_tasks_per_group  = 0								   <
        poll_servers = .false.									   <
        READ ( 27 , NML = namelist_quilt, IOSTAT=io_status )					   <
        CLOSE(27)										   <
      END IF											   <
      CALL mpi_bcast( nio_tasks_per_group  , max_domains , MPI_INTEGER , 0 , mpi_comm_here, ierr   <
      CALL mpi_bcast( nio_groups , 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )			   <
      CALL mpi_bcast( max_dom, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )			   <
      CALL mpi_bcast( parent_id, max_domains , MPI_INTEGER , 0 , mpi_comm_here, ierr )		   <
#if ( HWRF == 1 )										   <
! check to make sure that if nio_tasks_per_group is non-zero for any domain it has to be non-zer   <
      i = MAXVAL(nio_tasks_per_group(1:max_dom))						   <
      IF ( i .GT. 0 .AND. nio_groups .GT. 0 ) THEN						   <
        DO id = 1, max_dom									   <
          IF ( nio_tasks_per_group(id) .LE. 0 ) THEN						   <
             CALL wrf_error_fatal( &								   <
'If nio_tasks_per_group in namelist.input is non-zero for any domain, every active domain must h   <
          END IF										   <
        END DO											   <
      END IF											   <
												   <
      num_io_tasks = 0										   <
      DO id = 1, max_dom									   <
        num_io_tasks = num_io_tasks + nio_tasks_per_group(id)*nio_groups			   <
      END DO											   <
#else												   <
      CALL quilting_disabled( quilting_is_turned_off )						   <
      IF ( quilting_is_turned_off ) THEN							   <
        num_io_tasks = 0									   <
        nio_tasks_per_group  = 0								   <
        nio_groups = 1										   <
      ELSE											   <
        num_io_tasks = nio_tasks_per_group(1)*nio_groups					   <
      END IF											   <
#endif												   <
      CALL nl_set_max_dom(1,max_dom)  ! quilting wants to see this too				   <
												   <
      IF ( mytask_local .EQ. 0 ) THEN								   <
        OPEN ( unit=27, file="namelist.input", form="formatted", status="old" )			   <
! get a sneak peek an nproc_x and nproc_y							   <
        nproc_x = -1										   <
        nproc_y = -1										   <
        READ ( 27 , NML = domains, IOSTAT=io_status )						   <
        CLOSE ( 27 )										   <
        OPEN ( unit=27, file="namelist.input", form="formatted", status="old" )			   <
        tasks_per_split = ntasks_local								   <
! we need to sneak-peek the parent_id namelist setting, ,which is in the "domains" section	   <
! of the namelist.  That namelist is registry generated, so the registry-generated information	   <
! is #included above.										   <
        nest_pes_x = 0    ! dimensions of communicator in X and y				   <
        nest_pes_y = 0										   <
        IF ( nproc_x .EQ. -1 .OR. nproc_y .EQ. -1 ) THEN					   <
#if ( HWRF == 1 )										   <
          CALL compute_mesh( ntasks_local, n_x, n_y )						   <
#else												   <
          CALL compute_mesh( ntasks_local-num_io_tasks, n_x, n_y )				   <
#endif												   <
        ELSE											   <
          n_x = nproc_x										   <
          n_y = nproc_y										   <
        END IF 											   <
        comm_start = 0   ! make it so everyone will use same communicator if the dm_task_split n   <
        nest_pes_x(1:max_dom) = n_x								   <
        nest_pes_y(1:max_dom) = n_y								   <
        READ ( 27 , NML = dm_task_split, IOSTAT=io_status )					   <
        CLOSE ( 27 )											        CLOSE ( 27 )
      END IF												      ENDIF
      CALL mpi_bcast( io_status, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )				      CALL mpi_bcast( io_status, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )
      IF ( io_status .NE. 0 ) THEN									      IF ( io_status .NE. 0 ) THEN
! or if  dm_task_split was read but was emptly, do nothing: dm_task_split not specified, everyon   |	          RETURN ! just ignore and return
      END IF												      ENDIF
      CALL mpi_bcast( tasks_per_split, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )			      CALL mpi_bcast( tasks_per_split, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )
      CALL mpi_bcast( nproc_x, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )			   |	      IF ( tasks_per_split .GT. ntasks .OR. tasks_per_split .LE. 0 ) RETURN
      CALL mpi_bcast( nproc_y, 1 , MPI_INTEGER , 0 , mpi_comm_here, ierr )			   |	      IF ( mod( ntasks, tasks_per_split ) .NE. 0 ) THEN
      CALL mpi_bcast( comm_start, max_domains , MPI_INTEGER , 0 , mpi_comm_here, ierr )		   <
      CALL mpi_bcast( nest_pes_x, max_domains , MPI_INTEGER , 0 , mpi_comm_here, ierr )		   <
      CALL mpi_bcast( nest_pes_y, max_domains , MPI_INTEGER , 0 , mpi_comm_here, ierr )		   <
												   <
      nkids = 1											   <
      which_kid = 0										   <
      DO i = 2, max_dom										   <
        IF ( 1 .le. parent_id(i) .AND. parent_id(i) .LE. max_domains ) THEN			   <
          which_kid(i) = nkids(parent_id(i))							   <
          nkids(parent_id(i)) = nkids(parent_id(i)) + 1						   <
        ELSE											   <
          WRITE(wrf_err_message,*)'invalid parent id for domain ',i				   <
          CALL wrf_error_fatal(TRIM(wrf_err_message))						   <
        END IF 											   <
      END DO											   <
												   <
      num_compute_tasks = -99									   <
      DO nest_id = 1,max_dom									   <
        IF ( nest_id .EQ. 1 ) THEN								   <
          nest_task_offsets(nest_id) = comm_start(nest_id)					   <
        ELSE											   <
          IF ( comm_start(nest_id) .LT. comm_start(parent_id(nest_id)) ) THEN			   <
            WRITE(wrf_err_message,&								   <
        "('nest domain ',i3,'comm_start (',i3,') lt parent ',i3,' comm_start (',i3,')')") &	   <
                   nest_id,comm_start,parent_id(nest_id),comm_start(parent_id(nest_id))		   <
            CALL wrf_error_fatal(TRIM(wrf_err_message))						   <
          ELSE IF ( comm_start(nest_id) .LT. &							   <
                    comm_start(parent_id(nest_id)) &						   <
                   +nest_pes_x(parent_id(nest_id))*nest_pes_y(parent_id(nest_id))) THEN		   <
            nest_task_offsets(nest_id) = comm_start(nest_id)-comm_start(parent_id(nest_id))	   <
          ELSE											   <
            nest_task_offsets(nest_id) = nest_pes_x(parent_id(nest_id))*nest_pes_y(parent_id(nes   <
          END IF										   <
        END IF											   <
        IF ((comm_start(nest_id)+nest_pes_x(nest_id)*nest_pes_y(nest_id)) .GT. num_compute_tasks   <
          num_compute_tasks = (comm_start(nest_id)+nest_pes_x(nest_id)*nest_pes_y(nest_id))	   <
        END IF											   <
      END DO											   <
												   <
      IF ( .TRUE. ) THEN									   <
!jm Additional code here to set up communicator for this domain and tables			   <
!jm mapping individual domain task IDs to the original local communicator			   <
!jm that is unsplit over nest domains.  from now on what we are calling				   <
!jm local_communicator will be the communicator that is used by the local			   <
!jm nests. The communicator that spans all the nests will be renamed to				   <
!jm intercomm_communicator.  									   <
!jm Design note: exploring the idea of using MPI intercommunicators.  They 			   <
!jm only work in pairs so we'd have a lot of intercommunicators to set up 			   <
!jm and keep around. We'd also have to have additional communicator arguments 			   <
!jm to all the nesting routines in and around the RSL nesting parts.				   <
        CALL MPI_Comm_rank ( mpi_comm_here, mytask_local, ierr ) ;				   <
        CALL MPI_Comm_rank ( mpi_comm_here, origmytask, ierr ) ;				   <
        CALL mpi_comm_size ( mpi_comm_here, ntasks_local, ierr ) ;				   <
        ALLOCATE( icolor(ntasks_local) )							   <
        ALLOCATE( icolor2(ntasks_local) )							   <
        ALLOCATE( idomain(ntasks_local) )							   <
        k = 0											   <
! split off the separate local communicators							   <
												   <
! construct list of local communicators my task is in						   <
        comms_i_am_in = MPI_UNDEFINED								   <
        DO i = 1, max_dom									   <
          inthisone = .FALSE.									   <
          icolor = 0										   <
          DO j = comm_start(i), comm_start(i)+nest_pes_x(i)*nest_pes_y(i)-1			   <
            IF ( j+1 .GT. ntasks_local ) THEN							   <
              WRITE(wrf_err_message,*)"check comm_start, nest_pes_x, nest_pes_y settings in name   <
              CALL wrf_error_fatal(wrf_err_message)						   <
            END IF										   <
            icolor(j+1) = 1									   <
          END DO										   <
          IF ( icolor(mytask_local+1) .EQ. 1 ) inthisone = .TRUE.				   <
          CALL MPI_Comm_dup(mpi_comm_here,comdup,ierr)						   <
          CALL MPI_Comm_split(comdup,icolor(mytask_local+1),mytask_local,mpi_comm_local,ierr)	   <
          IF ( inthisone ) THEN									   <
            dims(1) = nest_pes_y(i) ! rows							   <
            dims(2) = nest_pes_x(i)  ! columns							   <
            isperiodic(1) = .false.								   <
            isperiodic(2) = .false.								   <
            CALL mpi_cart_create( mpi_comm_local, 2, dims, isperiodic, .false., comms_i_am_in(i)   <
          END IF										   <
        END DO											   <
												   <
! assign domains to communicators								   <
        local_communicator = MPI_UNDEFINED							   <
#if ( HWRF != 1 )										   <
        CALL wrf_set_dm_quilt_comm( mpi_comm_here )   ! used by module_io_quilt_old.F		   <
#endif												   <
        DO i = 1, max_dom									   <
          local_communicator_store(i) = comms_i_am_in(i)					   <
          domain_active_this_task(i) = ( local_communicator_store(i) .NE. MPI_UNDEFINED )	   <
          IF ( local_communicator_store(i) .NE. MPI_UNDEFINED ) THEN				   <
             CALL MPI_Comm_size( local_communicator_store(i), ntasks_store(i), ierr )		   <
             CALL MPI_Comm_rank( local_communicator_store(i), mytask_store(i), ierr )		   <
             CALL mpi_cart_coords( local_communicator_store(i), mytask_store(i), 2, coords, ierr   <
             IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_cart_coords fails ')			   <
             mytask_y_store(i) = coords(1)   ! col task (1)					   <
             mytask_x_store(i) = coords(2)   ! col task (x)					   <
             CALL MPI_Comm_dup( local_communicator_store(i), comdup2, ierr )			   <
             IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_dup fails ')			   <
												   <
             CALL MPI_Comm_split(comdup2,mytask_y_store(i),mytask_store(i),local_communicator_x_   <
             IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_split fails for y ')		   <
												   <
             CALL MPI_Comm_split(comdup2,mytask_x_store(i),mytask_store(i),local_communicator_y_   <
             IF ( ierr .NE. 0 ) CALL wrf_error_fatal('MPI_Comm_split fails for x ')		   <
												   <
             CALL MPI_Comm_size( local_communicator_x_store(i), ntasks_x_store(i), ierr )	   <
             CALL MPI_Comm_rank( local_communicator_x_store(i), mytask_x_store(i), ierr )	   <
             CALL MPI_Comm_size( local_communicator_y_store(i), ntasks_y_store(i), ierr )	   <
             CALL MPI_Comm_rank( local_communicator_y_store(i), mytask_y_store(i), ierr )	   <
          END IF										   <
        END DO											   <
												   <
        intercomm_active  = .FALSE.								   <
        ! iterate over parent-nest pairs							   <
        ! split off a new communicator from the big one that includes the tasks from the parent    <
        ! starting with the parent tasks followed by the nest tasks				   <
        ! if a task is in both (ie. the communicators overlap) set the offset at the start of th   <
        ! in this way, we will handle cases where the parent and nest are decomposed over the sa   <
        ! (in that case, the offset would be the first task of the parent-nest communicator and    <
												   <
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!								   <
        ntasks_local = num_compute_tasks							   <
        DO nest_id = 2, max_dom									   <
           par_id  = parent_id(nest_id)								   <
           icolor2 = 0										   <
           DO j = 1,ntasks_local !iterate over all the tasks in the "big" communicator		   <
             IF ( local_communicator_store( par_id ) .NE. MPI_UNDEFINED .OR. local_communicator_   <
           END DO										   <
        ! set mpi_comm_me_and_mom to be a communicator that has my parents tasks and mine	   <
           icolor2 = 0										   <
           mytask_is_nest = .FALSE.								   <
           mytask_is_par = .FALSE.								   <
           DO j = 1,ntasks_local								   <
												   <
             IF ( comm_start(nest_id) .LE. j-1 .AND. j-1 .LT. comm_start(nest_id) + nest_pes_x(n   <
               icolor2(j)=1									   <
               if ( j-1 .EQ. mytask_local ) mytask_is_nest=.TRUE.				   <
             END IF										   <
             IF ( comm_start(par_id ) .LE. j-1 .AND. j-1 .LT. comm_start(par_id ) + nest_pes_x(p   <
               icolor2(j)=1									   <
               if ( j-1 .EQ. mytask_local ) mytask_is_par=.TRUE.				   <
             END IF										   <
           END DO										   <
												   <
           i = icolor2(mytask_local+1)								   <
           CALL MPI_Comm_dup(mpi_comm_here,comdup,ierr)						   <
           CALL MPI_Comm_split(comdup,i,origmytask,mpi_comm_me_and_mom,ierr)			   <
												   <
           IF ( mytask_is_nest  ) THEN								   <
              intercomm_active(nest_id)  = .TRUE.						   <
              mpi_comm_to_mom(nest_id)   =  mpi_comm_me_and_mom					   <
           END IF										   <
           IF ( mytask_is_par ) THEN								   <
              intercomm_active(par_id)              = .TRUE.					   <
              mpi_comm_to_kid(which_kid(nest_id),par_id)  =  mpi_comm_me_and_mom		   <
           END IF										   <
        END DO											   <
        DEALLOCATE( icolor )									   <
        DEALLOCATE( icolor2 )									   <
        DEALLOCATE( idomain )									   <
												   <
      ELSE IF ( ( tasks_per_split .LE. ntasks_local .AND. tasks_per_split .LE. 0 ) ) THEN	   <
        domain_active_this_task(1) = .TRUE.							   <
        IF ( mod( ntasks_local, tasks_per_split ) .NE. 0 ) THEN					   <
          CALL wrf_message( 'WARNING: tasks_per_split does not evenly divide ntasks. Some tasks 	        CALL wrf_message( 'WARNING: tasks_per_split does not evenly divide ntasks. Some tasks wi
        END IF												      ENDIF

        ALLOCATE( icolor(ntasks_local) )							   |	      ALLOCATE( icolor(ntasks) )
        j = 0												      j = 0
        DO WHILE ( j .LT. ntasks_local / tasks_per_split ) 					   |	      DO WHILE ( j .LT. ntasks / tasks_per_split ) 
          DO i = 1, tasks_per_split									        DO i = 1, tasks_per_split
            icolor( i + j * tasks_per_split ) = j 							          icolor( i + j * tasks_per_split ) = j 
          END DO											        ENDDO
          j = j + 1											        j = j + 1
        END DO												      ENDDO

        CALL MPI_Comm_dup(mpi_comm_here,comdup,ierr)							      CALL MPI_Comm_dup(mpi_comm_here,comdup,ierr)
        CALL MPI_Comm_split(comdup,icolor(mytask_local+1),mytask_local,mpi_comm_local,ierr)	   |	      CALL MPI_Comm_split(comdup,icolor(mytask+1),mytask,mpi_comm_local,ierr)
        CALL wrf_set_dm_communicator( mpi_comm_local )							      CALL wrf_set_dm_communicator( mpi_comm_local )
        CALL store_communicators_for_domain(1)							   <
        DEALLOCATE( icolor )									   <
      ELSE											   <
        domain_active_this_task(1) = .TRUE.							   <
        mpi_comm_local = mpi_comm_here								   <
        CALL wrf_set_dm_communicator( mpi_comm_local )						   <
        CALL store_communicators_for_domain(1)							   <
      END IF											   <
												   <
      CALL instate_communicators_for_domain(1)							   <
												   <
#else												   <
! for serial (non-MPI) builds									   <
      IMPLICIT NONE										   <
#  if defined(_OPENMP) && defined(MPI2_THREAD_SUPPORT)						   <
      INTEGER thread_support_provided, thread_support_requested					   <
#  endif											   <
      INTEGER i, j, k, x, y, n_x, n_y								   <
      INTEGER iii										   <
      INTEGER dims(3)										   <
! for parallel nesting, 201408, jm								   <
      INTEGER :: id										   <
      INTEGER :: io_status									   <
      INTEGER :: domain_id,par_id,nest_id,kid_id						   <
												   <
!!!!! needed to sneak-peek the registry to get parent_id 					   <
! define as temporaries										   <
#include "namelist_defines.inc"									   <

! Statements that specify the namelists								   |	      DEALLOCATE( icolor )
#include "namelist_statements.inc"								   <
												   <
      max_dom = 1										   <
      OPEN ( unit=27, file="namelist.input", form="formatted", status="old" )			   <
      READ ( UNIT = 27 , NML = domains , IOSTAT=io_status )					   <
      CLOSE(27)											   <
												   <
      nkids = 1											   <
      which_kid = 0										   <
      DO i = 2, max_dom										   <
        IF ( 1 .le. parent_id(i) .AND. parent_id(i) .LE. max_domains ) THEN			   <
          which_kid(i) = nkids(parent_id(i))							   <
          nkids(parent_id(i)) = nkids(parent_id(i)) + 1						   <
        ELSE											   <
          WRITE(wrf_err_message,*)'invalid parent id for domain ',i				   <
          CALL wrf_error_fatal(TRIM(wrf_err_message))						   <
        END IF											   <
      END DO											   <
												   <
      intercomm_active = .TRUE.									   <
      domain_active_this_task = .TRUE.								   <
      ntasks_stack = 1										   <
      ntasks_y_stack = 1									   <
      ntasks_x_stack = 1									   <
      mytask_stack = 0										   <
      mytask_x_stack = 0									   <
      mytask_y_stack = 0									   <
      ntasks_store = 1										   <
      ntasks_y_store = 1									   <
      ntasks_x_store = 1									   <
      mytask_store = 0										   <
      mytask_x_store = 0									   <
      mytask_y_store = 0									   <
      ntasks = 1										   <
      ntasks_y = 1										   <
      ntasks_x = 1										   <
      mytask = 0										   <
      mytask_x = 0										   <
      mytask_y = 0										   <
      nest_pes_x = 1										   <
      nest_pes_y = 1										   <
      CALL instate_communicators_for_domain(1)							   <
#endif													#endif
   END SUBROUTINE split_communicator									   END SUBROUTINE split_communicator

   SUBROUTINE init_module_dm										   SUBROUTINE init_module_dm
#ifndef STUBMPI												#ifndef STUBMPI
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER mpi_comm_local, mpi_comm_here, ierr, mytask, nproc					      INTEGER mpi_comm_local, mpi_comm_here, ierr, mytask, nproc
												   >	      INCLUDE 'mpif.h'
      LOGICAL mpi_inited										      LOGICAL mpi_inited
      CALL mpi_initialized( mpi_inited, ierr )								      CALL mpi_initialized( mpi_inited, ierr )
      IF ( .NOT. mpi_inited ) THEN									      IF ( .NOT. mpi_inited ) THEN
        ! If MPI has not been initialized then initialize it and					        ! If MPI has not been initialized then initialize it and
        ! make comm_world the communicator								        ! make comm_world the communicator
        ! Otherwise, something else (e.g. split_communicator) has already				        ! Otherwise, something else (e.g. split_communicator) has already
        ! initialized MPI, so just grab the communicator that						        ! initialized MPI, so just grab the communicator that
        ! should already be stored and use that.							        ! should already be stored and use that.
        CALL mpi_init ( ierr )										        CALL mpi_init ( ierr )
        mpi_comm_here = MPI_COMM_WORLD									        mpi_comm_here = MPI_COMM_WORLD
        CALL wrf_set_dm_communicator ( mpi_comm_here )							        CALL wrf_set_dm_communicator ( mpi_comm_here )
      END IF												      ENDIF
      CALL wrf_get_dm_communicator( mpi_comm_local )							      CALL wrf_get_dm_communicator( mpi_comm_local )
												   >	      CALL wrf_termio_dup( mpi_comm_local )
#endif													#endif
   END SUBROUTINE init_module_dm									   END SUBROUTINE init_module_dm

! stub													! stub
   SUBROUTINE wrf_dm_move_nest ( parent, nest, dx, dy )							   SUBROUTINE wrf_dm_move_nest ( parent, nest, dx, dy )
      USE module_domain, ONLY : domain									      USE module_domain, ONLY : domain
      IMPLICIT NONE											      IMPLICIT NONE
      TYPE (domain), INTENT(INOUT) :: parent, nest							      TYPE (domain), INTENT(INOUT) :: parent, nest
      INTEGER, INTENT(IN)          :: dx,dy								      INTEGER, INTENT(IN)          :: dx,dy
      RETURN												      RETURN
   END SUBROUTINE wrf_dm_move_nest									   END SUBROUTINE wrf_dm_move_nest

!------------------------------------------------------------------------------				!------------------------------------------------------------------------------
   SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf,          &					   SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf,          &
                                   mp_local_uobmask,            &					                                   mp_local_uobmask,            &
                                   mp_local_vobmask,            &					                                   mp_local_vobmask,            &
                                   mp_local_cobmask, errf )						                                   mp_local_cobmask, errf )
      													      
!------------------------------------------------------------------------------				!------------------------------------------------------------------------------
!  PURPOSE: Do MPI allgatherv operation across processors to get the					!  PURPOSE: Do MPI allgatherv operation across processors to get the
!           errors at each observation point on all processors. 					!           errors at each observation point on all processors. 
!       												!       
!------------------------------------------------------------------------------				!------------------------------------------------------------------------------
        												        
    INTEGER, INTENT(IN)   :: nsta                ! Observation index.					    INTEGER, INTENT(IN)   :: nsta                ! Observation index.
    INTEGER, INTENT(IN)   :: nerrf               ! Number of error fields.				    INTEGER, INTENT(IN)   :: nerrf               ! Number of error fields.
    INTEGER, INTENT(IN)   :: niobf               ! Number of observations.				    INTEGER, INTENT(IN)   :: niobf               ! Number of observations.
    LOGICAL, INTENT(IN)   :: MP_LOCAL_UOBMASK(NIOBF)							    LOGICAL, INTENT(IN)   :: MP_LOCAL_UOBMASK(NIOBF)
    LOGICAL, INTENT(IN)   :: MP_LOCAL_VOBMASK(NIOBF)							    LOGICAL, INTENT(IN)   :: MP_LOCAL_VOBMASK(NIOBF)
    LOGICAL, INTENT(IN)   :: MP_LOCAL_COBMASK(NIOBF)							    LOGICAL, INTENT(IN)   :: MP_LOCAL_COBMASK(NIOBF)
    REAL, INTENT(INOUT)   :: errf(nerrf, niobf)								    REAL, INTENT(INOUT)   :: errf(nerrf, niobf)

#ifndef STUBMPI												#ifndef STUBMPI
												   >	    INCLUDE 'mpif.h'
        												        
! Local declarations											! Local declarations
    integer i, n, nlocal_dot, nlocal_crs								    integer i, n, nlocal_dot, nlocal_crs
    REAL UVT_BUFFER(NIOBF)    ! Buffer for holding U, V, or T						    REAL UVT_BUFFER(NIOBF)    ! Buffer for holding U, V, or T
    REAL QRK_BUFFER(NIOBF)    ! Buffer for holding Q or RKO						    REAL QRK_BUFFER(NIOBF)    ! Buffer for holding Q or RKO
    REAL SFP_BUFFER(NIOBF)    ! Buffer for holding Surface pressure					    REAL SFP_BUFFER(NIOBF)    ! Buffer for holding Surface pressure
    REAL PBL_BUFFER(NIOBF)    ! Buffer for holding (real) KPBL index					    REAL PBL_BUFFER(NIOBF)    ! Buffer for holding (real) KPBL index
    REAL QATOB_BUFFER(NIOBF)  ! Buffer for holding QV at the ob location				    REAL QATOB_BUFFER(NIOBF)  ! Buffer for holding QV at the ob location
    INTEGER N_BUFFER(NIOBF)										    INTEGER N_BUFFER(NIOBF)
    REAL FULL_BUFFER(NIOBF)										    REAL FULL_BUFFER(NIOBF)
    INTEGER IFULL_BUFFER(NIOBF)										    INTEGER IFULL_BUFFER(NIOBF)
    INTEGER IDISPLACEMENT(1024)   ! HARD CODED MAX NUMBER OF PROCESSORS					    INTEGER IDISPLACEMENT(1024)   ! HARD CODED MAX NUMBER OF PROCESSORS
    INTEGER ICOUNT(1024)          ! HARD CODED MAX NUMBER OF PROCESSORS					    INTEGER ICOUNT(1024)          ! HARD CODED MAX NUMBER OF PROCESSORS

    INTEGER :: MPI_COMM_COMP      ! MPI group communicator						    INTEGER :: MPI_COMM_COMP      ! MPI group communicator
    INTEGER :: NPROCS             ! Number of processors						    INTEGER :: NPROCS             ! Number of processors
    INTEGER :: IERR               ! Error code from MPI routines					    INTEGER :: IERR               ! Error code from MPI routines

! Get communicator for MPI operations.									! Get communicator for MPI operations.
    CALL WRF_GET_DM_COMMUNICATOR(MPI_COMM_COMP)								    CALL WRF_GET_DM_COMMUNICATOR(MPI_COMM_COMP)

! Get rank of monitor processor and broadcast to others.						! Get rank of monitor processor and broadcast to others.
    CALL MPI_COMM_SIZE( MPI_COMM_COMP, NPROCS, IERR )							    CALL MPI_COMM_SIZE( MPI_COMM_COMP, NPROCS, IERR )

! DO THE U FIELD											! DO THE U FIELD
   NLOCAL_DOT = 0											   NLOCAL_DOT = 0
   DO N = 1, NSTA											   DO N = 1, NSTA
     IF ( MP_LOCAL_UOBMASK(N) ) THEN      ! USE U-POINT MASK						     IF ( MP_LOCAL_UOBMASK(N) ) THEN      ! USE U-POINT MASK
       NLOCAL_DOT = NLOCAL_DOT + 1									       NLOCAL_DOT = NLOCAL_DOT + 1
       UVT_BUFFER(NLOCAL_DOT) = ERRF(1,N)        ! U WIND COMPONENT					       UVT_BUFFER(NLOCAL_DOT) = ERRF(1,N)        ! U WIND COMPONENT
       SFP_BUFFER(NLOCAL_DOT) = ERRF(7,N)        ! SURFACE PRESSURE					       SFP_BUFFER(NLOCAL_DOT) = ERRF(7,N)        ! SURFACE PRESSURE
       QRK_BUFFER(NLOCAL_DOT) = ERRF(9,N)        ! RKO							       QRK_BUFFER(NLOCAL_DOT) = ERRF(9,N)        ! RKO
       N_BUFFER(NLOCAL_DOT) = N										       N_BUFFER(NLOCAL_DOT) = N
     END IF												     ENDIF
   END DO												   ENDDO
   CALL MPI_ALLGATHER(NLOCAL_DOT,1,MPI_INTEGER, &							   CALL MPI_ALLGATHER(NLOCAL_DOT,1,MPI_INTEGER, &
                      ICOUNT,1,MPI_INTEGER,     &							                      ICOUNT,1,MPI_INTEGER,     &
                      MPI_COMM_COMP,IERR)								                      MPI_COMM_COMP,IERR)
   I = 1												   I = 1

   IDISPLACEMENT(1) = 0											   IDISPLACEMENT(1) = 0
   DO I = 2, NPROCS											   DO I = 2, NPROCS
     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)						     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)
   END DO												   ENDDO
   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_DOT, MPI_INTEGER,    &						   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_DOT, MPI_INTEGER,    &
                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &						                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &
                        MPI_INTEGER, MPI_COMM_COMP, IERR)						                        MPI_INTEGER, MPI_COMM_COMP, IERR)
! U													! U
   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_DOT, MPI_REAL,     &						   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_DOT, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(1,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(1,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! SURF PRESS AT U-POINTS										! SURF PRESS AT U-POINTS
   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_DOT, MPI_REAL,     &						   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_DOT, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(7,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(7,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! RKO													! RKO
   CALL MPI_ALLGATHERV( QRK_BUFFER, NLOCAL_DOT, MPI_REAL,     &						   CALL MPI_ALLGATHERV( QRK_BUFFER, NLOCAL_DOT, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(9,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(9,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO

! DO THE V FIELD											! DO THE V FIELD
   NLOCAL_DOT = 0											   NLOCAL_DOT = 0
   DO N = 1, NSTA											   DO N = 1, NSTA
     IF ( MP_LOCAL_VOBMASK(N) ) THEN         ! USE V-POINT MASK						     IF ( MP_LOCAL_VOBMASK(N) ) THEN         ! USE V-POINT MASK
       NLOCAL_DOT = NLOCAL_DOT + 1									       NLOCAL_DOT = NLOCAL_DOT + 1
       UVT_BUFFER(NLOCAL_DOT) = ERRF(2,N)    ! V WIND COMPONENT						       UVT_BUFFER(NLOCAL_DOT) = ERRF(2,N)    ! V WIND COMPONENT
       SFP_BUFFER(NLOCAL_DOT) = ERRF(8,N)    ! SURFACE PRESSURE						       SFP_BUFFER(NLOCAL_DOT) = ERRF(8,N)    ! SURFACE PRESSURE
       N_BUFFER(NLOCAL_DOT) = N										       N_BUFFER(NLOCAL_DOT) = N
     END IF												     ENDIF
   END DO												   ENDDO
   CALL MPI_ALLGATHER(NLOCAL_DOT,1,MPI_INTEGER, &							   CALL MPI_ALLGATHER(NLOCAL_DOT,1,MPI_INTEGER, &
                      ICOUNT,1,MPI_INTEGER,     &							                      ICOUNT,1,MPI_INTEGER,     &
                      MPI_COMM_COMP,IERR)								                      MPI_COMM_COMP,IERR)
   I = 1												   I = 1

   IDISPLACEMENT(1) = 0											   IDISPLACEMENT(1) = 0
   DO I = 2, NPROCS											   DO I = 2, NPROCS
     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)						     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)
   END DO												   ENDDO
   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_DOT, MPI_INTEGER,    &						   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_DOT, MPI_INTEGER,    &
                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &						                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &
                        MPI_INTEGER, MPI_COMM_COMP, IERR)						                        MPI_INTEGER, MPI_COMM_COMP, IERR)
! V													! V
   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_DOT, MPI_REAL,     &						   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_DOT, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(2,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(2,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! SURF PRESS AT V-POINTS										! SURF PRESS AT V-POINTS
   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_DOT, MPI_REAL,     &						   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_DOT, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(8,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(8,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO

! DO THE CROSS FIELDS, T AND Q										! DO THE CROSS FIELDS, T AND Q
   NLOCAL_CRS = 0											   NLOCAL_CRS = 0
   DO N = 1, NSTA											   DO N = 1, NSTA
     IF ( MP_LOCAL_COBMASK(N) ) THEN       ! USE MASS-POINT MASK					     IF ( MP_LOCAL_COBMASK(N) ) THEN       ! USE MASS-POINT MASK
       NLOCAL_CRS = NLOCAL_CRS + 1									       NLOCAL_CRS = NLOCAL_CRS + 1
       UVT_BUFFER(NLOCAL_CRS) = ERRF(3,N)     ! TEMPERATURE						       UVT_BUFFER(NLOCAL_CRS) = ERRF(3,N)     ! TEMPERATURE
       QRK_BUFFER(NLOCAL_CRS) = ERRF(4,N)     ! MOISTURE						       QRK_BUFFER(NLOCAL_CRS) = ERRF(4,N)     ! MOISTURE
       PBL_BUFFER(NLOCAL_CRS) = ERRF(5,N)     ! KPBL							       PBL_BUFFER(NLOCAL_CRS) = ERRF(5,N)     ! KPBL
       SFP_BUFFER(NLOCAL_CRS) = ERRF(6,N)     ! SURFACE PRESSURE					       SFP_BUFFER(NLOCAL_CRS) = ERRF(6,N)     ! SURFACE PRESSURE
       QATOB_BUFFER(NLOCAL_CRS) = ERRF(10,N)     ! Model Mixing ratio itself (NOT ERROR)		       QATOB_BUFFER(NLOCAL_CRS) = ERRF(10,N)     ! Model Mixing ratio itself (NOT ERROR)
       N_BUFFER(NLOCAL_CRS) = N										       N_BUFFER(NLOCAL_CRS) = N
     END IF												     ENDIF
   END DO												   ENDDO
   CALL MPI_ALLGATHER(NLOCAL_CRS,1,MPI_INTEGER, &							   CALL MPI_ALLGATHER(NLOCAL_CRS,1,MPI_INTEGER, &
                      ICOUNT,1,MPI_INTEGER,     &							                      ICOUNT,1,MPI_INTEGER,     &
                      MPI_COMM_COMP,IERR)								                      MPI_COMM_COMP,IERR)
   IDISPLACEMENT(1) = 0											   IDISPLACEMENT(1) = 0
   DO I = 2, NPROCS											   DO I = 2, NPROCS
     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)						     IDISPLACEMENT(I) = IDISPLACEMENT(I-1) + ICOUNT(I-1)
   END DO												   ENDDO
   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_CRS, MPI_INTEGER,    &						   CALL MPI_ALLGATHERV( N_BUFFER, NLOCAL_CRS, MPI_INTEGER,    &
                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &						                        IFULL_BUFFER, ICOUNT, IDISPLACEMENT,  &
                        MPI_INTEGER, MPI_COMM_COMP, IERR)						                        MPI_INTEGER, MPI_COMM_COMP, IERR)
! T													! T
   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_CRS, MPI_REAL,     &						   CALL MPI_ALLGATHERV( UVT_BUFFER, NLOCAL_CRS, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)

   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(3,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(3,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! Q													! Q
   CALL MPI_ALLGATHERV( QRK_BUFFER, NLOCAL_CRS, MPI_REAL,     &						   CALL MPI_ALLGATHERV( QRK_BUFFER, NLOCAL_CRS, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(4,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(4,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! KPBL													! KPBL
   CALL MPI_ALLGATHERV( PBL_BUFFER, NLOCAL_CRS, MPI_REAL,     &						   CALL MPI_ALLGATHERV( PBL_BUFFER, NLOCAL_CRS, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(5,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(5,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO
! SURF PRESS AT MASS POINTS										! SURF PRESS AT MASS POINTS
   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_CRS, MPI_REAL,     &						   CALL MPI_ALLGATHERV( SFP_BUFFER, NLOCAL_CRS, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(6,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(6,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO

! Water vapor mixing ratio at the mass points (NOT THE ERROR)						! Water vapor mixing ratio at the mass points (NOT THE ERROR)
   CALL MPI_ALLGATHERV( QATOB_BUFFER, NLOCAL_CRS, MPI_REAL,     &					   CALL MPI_ALLGATHERV( QATOB_BUFFER, NLOCAL_CRS, MPI_REAL,     &
                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &						                        FULL_BUFFER, ICOUNT, IDISPLACEMENT,   &
                        MPI_REAL, MPI_COMM_COMP, IERR)							                        MPI_REAL, MPI_COMM_COMP, IERR)
   DO N = 1, NSTA											   DO N = 1, NSTA
     ERRF(10,IFULL_BUFFER(N)) = FULL_BUFFER(N)								     ERRF(10,IFULL_BUFFER(N)) = FULL_BUFFER(N)
   END DO												   ENDDO

#endif													#endif
   END SUBROUTINE get_full_obs_vector									   END SUBROUTINE get_full_obs_vector



   SUBROUTINE wrf_dm_maxtile_real ( val , tile)								   SUBROUTINE wrf_dm_maxtile_real ( val , tile)
      IMPLICIT NONE											      IMPLICIT NONE
      REAL val, val_all( ntasks )									      REAL val, val_all( ntasks )
      INTEGER tile											      INTEGER tile
      INTEGER ierr											      INTEGER ierr

! <DESCRIPTION>												! <DESCRIPTION>
! Collective operation. Each processor calls passing a local value and its index; on return		! Collective operation. Each processor calls passing a local value and its index; on return
! all processors are passed back the maximum of all values passed and its tile number.			! all processors are passed back the maximum of all values passed and its tile number.
!													!
! </DESCRIPTION>											! </DESCRIPTION>
      INTEGER i, comm											      INTEGER i, comm
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'

      CALL wrf_get_dm_communicator ( comm )								      CALL wrf_get_dm_communicator ( comm )
      CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr )	      CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr )
      val = val_all(1)											      val = val_all(1)
      tile = 1												      tile = 1
      DO i = 2, ntasks											      DO i = 2, ntasks
        IF ( val_all(i) .GT. val ) THEN									        IF ( val_all(i) .GT. val ) THEN
           tile = i											           tile = i
           val = val_all(i)										           val = val_all(i)
        END IF												        ENDIF
      END DO												      ENDDO
#endif													#endif
   END SUBROUTINE wrf_dm_maxtile_real									   END SUBROUTINE wrf_dm_maxtile_real


   SUBROUTINE wrf_dm_mintile_real ( val , tile)								   SUBROUTINE wrf_dm_mintile_real ( val , tile)
      IMPLICIT NONE											      IMPLICIT NONE
      REAL val, val_all( ntasks )									      REAL val, val_all( ntasks )
      INTEGER tile											      INTEGER tile
      INTEGER ierr											      INTEGER ierr

! <DESCRIPTION>												! <DESCRIPTION>
! Collective operation. Each processor calls passing a local value and its index; on return		! Collective operation. Each processor calls passing a local value and its index; on return
! all processors are passed back the minimum of all values passed and its tile number.			! all processors are passed back the minimum of all values passed and its tile number.
!													!
! </DESCRIPTION>											! </DESCRIPTION>
      INTEGER i, comm											      INTEGER i, comm
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'

      CALL wrf_get_dm_communicator ( comm )								      CALL wrf_get_dm_communicator ( comm )
      CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr )	      CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr )
      val = val_all(1)											      val = val_all(1)
      tile = 1												      tile = 1
      DO i = 2, ntasks											      DO i = 2, ntasks
        IF ( val_all(i) .LT. val ) THEN									        IF ( val_all(i) .LT. val ) THEN
           tile = i											           tile = i
           val = val_all(i)										           val = val_all(i)
        END IF												        ENDIF
      END DO												      ENDDO
#endif													#endif
   END SUBROUTINE wrf_dm_mintile_real									   END SUBROUTINE wrf_dm_mintile_real


   SUBROUTINE wrf_dm_mintile_double ( val , tile)							   SUBROUTINE wrf_dm_mintile_double ( val , tile)
      IMPLICIT NONE											      IMPLICIT NONE
      DOUBLE PRECISION val, val_all( ntasks )								      DOUBLE PRECISION val, val_all( ntasks )
      INTEGER tile											      INTEGER tile
      INTEGER ierr											      INTEGER ierr

! <DESCRIPTION>												! <DESCRIPTION>
! Collective operation. Each processor calls passing a local value and its index; on return		! Collective operation. Each processor calls passing a local value and its index; on return
! all processors are passed back the minimum of all values passed and its tile number.			! all processors are passed back the minimum of all values passed and its tile number.
!													!
! </DESCRIPTION>											! </DESCRIPTION>
      INTEGER i, comm											      INTEGER i, comm
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'

      CALL wrf_get_dm_communicator ( comm )								      CALL wrf_get_dm_communicator ( comm )
      CALL mpi_allgather ( val, 1, MPI_DOUBLE_PRECISION, val_all , 1, MPI_DOUBLE_PRECISION, comm	      CALL mpi_allgather ( val, 1, MPI_DOUBLE_PRECISION, val_all , 1, MPI_DOUBLE_PRECISION, comm
      val = val_all(1)											      val = val_all(1)
      tile = 1												      tile = 1
      DO i = 2, ntasks											      DO i = 2, ntasks
        IF ( val_all(i) .LT. val ) THEN									        IF ( val_all(i) .LT. val ) THEN
           tile = i											           tile = i
           val = val_all(i)										           val = val_all(i)
        END IF												        ENDIF
      END DO												      ENDDO
#endif													#endif
   END SUBROUTINE wrf_dm_mintile_double									   END SUBROUTINE wrf_dm_mintile_double


   SUBROUTINE wrf_dm_tile_val_int ( val , tile)								   SUBROUTINE wrf_dm_tile_val_int ( val , tile)
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER val, val_all( ntasks )									      INTEGER val, val_all( ntasks )
      INTEGER tile											      INTEGER tile
      INTEGER ierr											      INTEGER ierr

! <DESCRIPTION>												! <DESCRIPTION>
! Collective operation. Get value from input tile.							! Collective operation. Get value from input tile.
!													!
! </DESCRIPTION>											! </DESCRIPTION>
      INTEGER i, comm											      INTEGER i, comm
#ifndef STUBMPI												#ifndef STUBMPI
												   >	      INCLUDE 'mpif.h'

      CALL wrf_get_dm_communicator ( comm )								      CALL wrf_get_dm_communicator ( comm )
      CALL mpi_allgather ( val, 1, MPI_INTEGER, val_all , 1, MPI_INTEGER, comm, ierr )			      CALL mpi_allgather ( val, 1, MPI_INTEGER, val_all , 1, MPI_INTEGER, comm, ierr )
      val = val_all(tile)										      val = val_all(tile)
#endif													#endif
   END SUBROUTINE wrf_dm_tile_val_int									   END SUBROUTINE wrf_dm_tile_val_int

   SUBROUTINE wrf_get_hostname  ( str )									   SUBROUTINE wrf_get_hostname  ( str )
      CHARACTER*(*) str											      CHARACTER*(*) str
      CHARACTER tmp(512)										      CHARACTER tmp(512)
      INTEGER i , n, cs											      INTEGER i , n, cs
      CALL rsl_lite_get_hostname( tmp, 512, n, cs )							      CALL rsl_lite_get_hostname( tmp, 512, n, cs )
      DO i = 1, n 											      DO i = 1, n 
        str(i:i) = tmp(i)										        str(i:i) = tmp(i)
      END DO												      ENDDO
      RETURN												      RETURN
   END SUBROUTINE wrf_get_hostname 									   END SUBROUTINE wrf_get_hostname 

   SUBROUTINE wrf_get_hostid  ( hostid )								   SUBROUTINE wrf_get_hostid  ( hostid )
      INTEGER hostid											      INTEGER hostid
      CHARACTER tmp(512)										      CHARACTER tmp(512)
      INTEGER i, sz, n, cs										      INTEGER i, sz, n, cs
      CALL rsl_lite_get_hostname( tmp, 512, n, cs )							      CALL rsl_lite_get_hostname( tmp, 512, n, cs )
      hostid = cs											      hostid = cs
      RETURN												      RETURN
   END SUBROUTINE wrf_get_hostid									   END SUBROUTINE wrf_get_hostid

END MODULE module_dm											END MODULE module_dm

												   <
   SUBROUTINE push_communicators_for_domain( id )						   <
      USE module_dm										   <
      INTEGER, INTENT(IN) :: id   ! if specified also does an instate for grid id		   <
      IF ( communicator_stack_cursor .GE. max_domains ) CALL wrf_error_fatal("push_communicators   <
      communicator_stack_cursor = communicator_stack_cursor + 1					   <
												   <
      id_stack(communicator_stack_cursor) = current_id						   <
      local_communicator_stack( communicator_stack_cursor )    =    local_communicator		   <
      local_communicator_periodic_stack( communicator_stack_cursor )  =    local_communicator_pe   <
      local_iocommunicator_stack( communicator_stack_cursor )  =    local_iocommunicator	   <
      local_communicator_x_stack( communicator_stack_cursor )  =    local_communicator_x	   <
      local_communicator_y_stack( communicator_stack_cursor )  =    local_communicator_y	   <
      ntasks_stack( communicator_stack_cursor )        =    ntasks				   <
      ntasks_y_stack( communicator_stack_cursor )      =    ntasks_y				   <
      ntasks_x_stack( communicator_stack_cursor )      =    ntasks_x				   <
      mytask_stack( communicator_stack_cursor )        =    mytask				   <
      mytask_x_stack( communicator_stack_cursor )       =    mytask_x				   <
      mytask_y_stack( communicator_stack_cursor )       =    mytask_y				   <
												   <
      CALL instate_communicators_for_domain( id )						   <
   END SUBROUTINE push_communicators_for_domain							   <
   SUBROUTINE pop_communicators_for_domain							   <
      USE module_dm										   <
      IMPLICIT NONE										   <
      IF ( communicator_stack_cursor .LT. 1 ) CALL wrf_error_fatal("pop_communicators_for_domain   <
      current_id = id_stack(communicator_stack_cursor)						   <
      local_communicator = local_communicator_stack( communicator_stack_cursor )		   <
      local_communicator_periodic = local_communicator_periodic_stack( communicator_stack_cursor   <
      local_iocommunicator = local_iocommunicator_stack( communicator_stack_cursor )		   <
      local_communicator_x = local_communicator_x_stack( communicator_stack_cursor )		   <
      local_communicator_y = local_communicator_y_stack( communicator_stack_cursor )		   <
      ntasks = ntasks_stack( communicator_stack_cursor )					   <
      ntasks_y = ntasks_y_stack( communicator_stack_cursor )					   <
      ntasks_x = ntasks_x_stack( communicator_stack_cursor )					   <
      mytask = mytask_stack( communicator_stack_cursor )					   <
      mytask_x = mytask_x_stack( communicator_stack_cursor )					   <
      mytask_y = mytask_y_stack( communicator_stack_cursor )					   <
      communicator_stack_cursor = communicator_stack_cursor - 1					   <
   END SUBROUTINE pop_communicators_for_domain							   <
   SUBROUTINE instate_communicators_for_domain( id )						   <
      USE module_dm										   <
      IMPLICIT NONE										   <
      INTEGER, INTENT(IN) :: id									   <
      INTEGER ierr										   <
      current_id = id 										   <
      local_communicator          = local_communicator_store( id )				   <
      local_communicator_periodic = local_communicator_periodic_store( id )			   <
      local_iocommunicator        = local_iocommunicator_store( id )				   <
      local_communicator_x        = local_communicator_x_store( id )				   <
      local_communicator_y        = local_communicator_y_store( id )				   <
      ntasks         = ntasks_store( id )							   <
      mytask         = mytask_store( id )							   <
      ntasks_x       = ntasks_x_store( id )							   <
      ntasks_y       = ntasks_y_store( id )							   <
      mytask_x       = mytask_x_store( id )							   <
      mytask_y       = mytask_y_store( id )							   <
   END SUBROUTINE instate_communicators_for_domain						   <
   SUBROUTINE store_communicators_for_domain( id )						   <
      USE module_dm										   <
      IMPLICIT NONE										   <
      INTEGER, INTENT(IN) :: id									   <
      local_communicator_store( id )    =    local_communicator					   <
      local_communicator_periodic_store( id )  =    local_communicator_periodic			   <
      local_iocommunicator_store( id )  =    local_iocommunicator				   <
      local_communicator_x_store( id )  =    local_communicator_x				   <
      local_communicator_y_store( id )  =    local_communicator_y				   <
      ntasks_store( id )        =    ntasks							   <
      ntasks_x_store( id )      =    ntasks_x							   <
      ntasks_y_store( id )      =    ntasks_y							   <
      mytask_store( id )        =    mytask							   <
      mytask_x_store( id )      =    mytask_x							   <
      mytask_y_store( id )      =    mytask_y							   <
   END SUBROUTINE store_communicators_for_domain						   <
												   <
!=========================================================================				!=========================================================================
! wrf_dm_patch_domain has to be outside the module because it is called					! wrf_dm_patch_domain has to be outside the module because it is called
! by a routine in module_domain but depends on module domain						! by a routine in module_domain but depends on module domain

SUBROUTINE wrf_dm_patch_domain ( id  , domdesc , parent_id , parent_domdesc , &				SUBROUTINE wrf_dm_patch_domain ( id  , domdesc , parent_id , parent_domdesc , &
                          sd1 , ed1 , sp1 , ep1 , sm1 , em1 , &						                          sd1 , ed1 , sp1 , ep1 , sm1 , em1 , &
                          sd2 , ed2 , sp2 , ep2 , sm2 , em2 , &						                          sd2 , ed2 , sp2 , ep2 , sm2 , em2 , &
                          sd3 , ed3 , sp3 , ep3 , sm3 , em3 , &						                          sd3 , ed3 , sp3 , ep3 , sm3 , em3 , &
                                      sp1x , ep1x , sm1x , em1x , &					                                      sp1x , ep1x , sm1x , em1x , &
                                      sp2x , ep2x , sm2x , em2x , &					                                      sp2x , ep2x , sm2x , em2x , &
                                      sp3x , ep3x , sm3x , em3x , &					                                      sp3x , ep3x , sm3x , em3x , &
                                      sp1y , ep1y , sm1y , em1y , &					                                      sp1y , ep1y , sm1y , em1y , &
                                      sp2y , ep2y , sm2y , em2y , &					                                      sp2y , ep2y , sm2y , em2y , &
                                      sp3y , ep3y , sm3y , em3y , &					                                      sp3y , ep3y , sm3y , em3y , &
                          bdx , bdy )									                          bdx , bdy )
   USE module_domain, ONLY : domain, head_grid, find_grid_by_id						   USE module_domain, ONLY : domain, head_grid, find_grid_by_id
   USE module_dm, ONLY : patch_domain_rsl_lite  !, push_communicators_for_domain, pop_communicat   |	   USE module_dm, ONLY : patch_domain_rsl_lite
   IMPLICIT NONE											   IMPLICIT NONE

   INTEGER, INTENT(IN)   :: sd1 , ed1 , sd2 , ed2 , sd3 , ed3 , bdx , bdy				   INTEGER, INTENT(IN)   :: sd1 , ed1 , sd2 , ed2 , sd3 , ed3 , bdx , bdy
   INTEGER, INTENT(OUT)  :: sp1 , ep1 , sp2 , ep2 , sp3 , ep3 , &					   INTEGER, INTENT(OUT)  :: sp1 , ep1 , sp2 , ep2 , sp3 , ep3 , &
                            sm1 , em1 , sm2 , em2 , sm3 , em3						                            sm1 , em1 , sm2 , em2 , sm3 , em3
   INTEGER               :: sp1x , ep1x , sp2x , ep2x , sp3x , ep3x , &					   INTEGER               :: sp1x , ep1x , sp2x , ep2x , sp3x , ep3x , &
                            sm1x , em1x , sm2x , em2x , sm3x , em3x					                            sm1x , em1x , sm2x , em2x , sm3x , em3x
   INTEGER               :: sp1y , ep1y , sp2y , ep2y , sp3y , ep3y , &					   INTEGER               :: sp1y , ep1y , sp2y , ep2y , sp3y , ep3y , &
                            sm1y , em1y , sm2y , em2y , sm3y , em3y					                            sm1y , em1y , sm2y , em2y , sm3y , em3y
   INTEGER, INTENT(INOUT):: id  , domdesc , parent_id , parent_domdesc					   INTEGER, INTENT(INOUT):: id  , domdesc , parent_id , parent_domdesc

   TYPE(domain), POINTER :: parent									   TYPE(domain), POINTER :: parent
   TYPE(domain), POINTER :: grid_ptr									   TYPE(domain), POINTER :: grid_ptr

   ! this is necessary because we cannot pass parent directly into 					   ! this is necessary because we cannot pass parent directly into 
   ! wrf_dm_patch_domain because creating the correct interface definitions				   ! wrf_dm_patch_domain because creating the correct interface definitions
   ! would generate a circular USE reference between module_domain and module_dm			   ! would generate a circular USE reference between module_domain and module_dm
   ! see comment this date in module_domain for more information. JM 20020416				   ! see comment this date in module_domain for more information. JM 20020416

   NULLIFY( parent )											   NULLIFY( parent )
   grid_ptr => head_grid										   grid_ptr => head_grid
   CALL find_grid_by_id( parent_id , grid_ptr , parent )						   CALL find_grid_by_id( parent_id , grid_ptr , parent )

   CALL push_communicators_for_domain(id)							   <
												   <
   CALL patch_domain_rsl_lite ( id  , parent, parent_id , &						   CALL patch_domain_rsl_lite ( id  , parent, parent_id , &
                           sd1 , ed1 , sp1 , ep1 , sm1 , em1 , & 					                           sd1 , ed1 , sp1 , ep1 , sm1 , em1 , & 
                           sd2 , ed2 , sp2 , ep2 , sm2 , em2 , &					                           sd2 , ed2 , sp2 , ep2 , sm2 , em2 , &
                           sd3 , ed3 , sp3 , ep3 , sm3 , em3 , &					                           sd3 , ed3 , sp3 , ep3 , sm3 , em3 , &
                                      sp1x , ep1x , sm1x , em1x , &					                                      sp1x , ep1x , sm1x , em1x , &
                                      sp2x , ep2x , sm2x , em2x , &					                                      sp2x , ep2x , sm2x , em2x , &
                                      sp3x , ep3x , sm3x , em3x , &					                                      sp3x , ep3x , sm3x , em3x , &
                                      sp1y , ep1y , sm1y , em1y , &					                                      sp1y , ep1y , sm1y , em1y , &
                                      sp2y , ep2y , sm2y , em2y , &					                                      sp2y , ep2y , sm2y , em2y , &
                                      sp3y , ep3y , sm3y , em3y , &					                                      sp3y , ep3y , sm3y , em3y , &
                           bdx , bdy )									                           bdx , bdy )

   CALL pop_communicators_for_domain								   <
												   <
   RETURN												   RETURN
END SUBROUTINE wrf_dm_patch_domain									END SUBROUTINE wrf_dm_patch_domain

SUBROUTINE wrf_termio_dup( comm )									SUBROUTINE wrf_termio_dup( comm )
  IMPLICIT NONE												  IMPLICIT NONE
  INTEGER, INTENT(IN) :: comm										  INTEGER, INTENT(IN) :: comm
  INTEGER mytask, ntasks										  INTEGER mytask, ntasks
#ifndef STUBMPI												#ifndef STUBMPI
  INTEGER ierr												  INTEGER ierr
  INCLUDE 'mpif.h'											  INCLUDE 'mpif.h'
  CALL mpi_comm_size(comm, ntasks, ierr )								  CALL mpi_comm_size(comm, ntasks, ierr )
  CALL mpi_comm_rank(comm, mytask, ierr )								  CALL mpi_comm_rank(comm, mytask, ierr )
  write(0,*)'starting wrf task ',mytask,' of ',ntasks							  write(0,*)'starting wrf task ',mytask,' of ',ntasks
  CALL rsl_error_dup1( mytask )										  CALL rsl_error_dup1( mytask )
#else													#else
  mytask = 0												  mytask = 0
  ntasks = 1												  ntasks = 1
#endif													#endif
END SUBROUTINE wrf_termio_dup										END SUBROUTINE wrf_termio_dup

SUBROUTINE wrf_get_myproc( myproc )									SUBROUTINE wrf_get_myproc( myproc )
  USE module_dm , ONLY : mytask										  USE module_dm , ONLY : mytask
  IMPLICIT NONE												  IMPLICIT NONE
  INTEGER myproc											  INTEGER myproc
  myproc = mytask											  myproc = mytask
  RETURN												  RETURN
END SUBROUTINE wrf_get_myproc										END SUBROUTINE wrf_get_myproc

SUBROUTINE wrf_get_nproc( nproc )									SUBROUTINE wrf_get_nproc( nproc )
  USE module_dm , ONLY : ntasks										  USE module_dm , ONLY : ntasks
  IMPLICIT NONE												  IMPLICIT NONE
  INTEGER nproc												  INTEGER nproc
  nproc = ntasks											  nproc = ntasks
  RETURN												  RETURN
END SUBROUTINE wrf_get_nproc										END SUBROUTINE wrf_get_nproc

SUBROUTINE wrf_get_nprocx( nprocx )									SUBROUTINE wrf_get_nprocx( nprocx )
  USE module_dm , ONLY : ntasks_x									  USE module_dm , ONLY : ntasks_x
  IMPLICIT NONE												  IMPLICIT NONE
  INTEGER nprocx											  INTEGER nprocx
  nprocx = ntasks_x											  nprocx = ntasks_x
  RETURN												  RETURN
END SUBROUTINE wrf_get_nprocx										END SUBROUTINE wrf_get_nprocx

SUBROUTINE wrf_get_nprocy( nprocy )									SUBROUTINE wrf_get_nprocy( nprocy )
  USE module_dm , ONLY : ntasks_y									  USE module_dm , ONLY : ntasks_y
  IMPLICIT NONE												  IMPLICIT NONE
  INTEGER nprocy											  INTEGER nprocy
  nprocy = ntasks_y											  nprocy = ntasks_y
  RETURN												  RETURN
END SUBROUTINE wrf_get_nprocy										END SUBROUTINE wrf_get_nprocy

SUBROUTINE wrf_dm_bcast_bytes ( buf , size )								SUBROUTINE wrf_dm_bcast_bytes ( buf , size )
   USE module_dm , ONLY : local_communicator								   USE module_dm , ONLY : local_communicator
   IMPLICIT NONE											   IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'
#endif													#endif
   INTEGER size												   INTEGER size
#ifndef NEC												#ifndef NEC
   INTEGER*1 BUF(size)											   INTEGER*1 BUF(size)
#else													#else
   CHARACTER*1 BUF(size)										   CHARACTER*1 BUF(size)
#endif													#endif
#ifndef STUBMPI												#ifndef STUBMPI
   CALL BYTE_BCAST ( buf , size, local_communicator )							   CALL BYTE_BCAST ( buf , size, local_communicator )
#endif													#endif
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_bytes									END SUBROUTINE wrf_dm_bcast_bytes

SUBROUTINE wrf_dm_bcast_string( BUF, N1 )								SUBROUTINE wrf_dm_bcast_string( BUF, N1 )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER n1												   INTEGER n1
! <DESCRIPTION>												! <DESCRIPTION>
! Collective operation. Given a string and a size in characters on task zero, broadcast and retu	! Collective operation. Given a string and a size in characters on task zero, broadcast and retu
!													!
! </DESCRIPTION>											! </DESCRIPTION>
   CHARACTER*(*) buf											   CHARACTER*(*) buf
#ifndef STUBMPI												#ifndef STUBMPI
   INTEGER ibuf(256),i,n										   INTEGER ibuf(256),i,n
   CHARACTER*256 tstr											   CHARACTER*256 tstr
   n = n1												   n = n1
   ! Root task is required to have the correct value of N1, other tasks 				   ! Root task is required to have the correct value of N1, other tasks 
   ! might not have the correct value.  								   ! might not have the correct value.  
   CALL wrf_dm_bcast_integer( n , 1 )									   CALL wrf_dm_bcast_integer( n , 1 )
   IF (n .GT. 256) n = 256										   IF (n .GT. 256) n = 256
   IF (n .GT. 0 ) then											   IF (n .GT. 0 ) then
     DO i = 1, n											     DO i = 1, n
       ibuf(I) = ichar(buf(I:I))									       ibuf(I) = ichar(buf(I:I))
     END DO												     ENDDO
     CALL wrf_dm_bcast_integer( ibuf, n )								     CALL wrf_dm_bcast_integer( ibuf, n )
     buf = ''												     buf = ''
     DO i = 1, n											     DO i = 1, n
       buf(i:i) = char(ibuf(i))										       buf(i:i) = char(ibuf(i))
     END DO												     ENDDO
   END IF												   ENDIF
#endif													#endif
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_string									END SUBROUTINE wrf_dm_bcast_string

SUBROUTINE wrf_dm_bcast_string_comm( BUF, N1, COMM )						   <
   IMPLICIT NONE										   <
   INTEGER n1											   <
   INTEGER COMM											   <
! <DESCRIPTION>											   <
! Collective operation. Given a string and a size in characters on task zero, broadcast and retu   <
!												   <
! </DESCRIPTION>										   <
   CHARACTER*(*) buf										   <
#ifndef STUBMPI											   <
   INTEGER ibuf(256),i,n									   <
   CHARACTER*256 tstr										   <
   n = n1											   <
   ! Root task is required to have the correct value of N1, other tasks				   <
   ! might not have the correct value.								   <
   CALL BYTE_BCAST( n, IWORDSIZE, COMM )							   <
   IF (n .GT. 256) n = 256									   <
   IF (n .GT. 0 ) then										   <
     DO i = 1, n										   <
       ibuf(I) = ichar(buf(I:I))								   <
     END DO											   <
     CALL BYTE_BCAST( ibuf, N*IWORDSIZE, COMM )							   <
     buf = ''											   <
     DO i = 1, n										   <
       buf(i:i) = char(ibuf(i))									   <
     END DO											   <
   END IF											   <
#endif												   <
   RETURN											   <
END SUBROUTINE wrf_dm_bcast_string_comm								   <
												   <
SUBROUTINE wrf_dm_bcast_integer( BUF, N1 )								SUBROUTINE wrf_dm_bcast_integer( BUF, N1 )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER n1												   INTEGER n1
   INTEGER  buf(*)											   INTEGER  buf(*)
   CALL wrf_dm_bcast_bytes ( BUF , N1 * IWORDSIZE )							   CALL wrf_dm_bcast_bytes ( BUF , N1 * IWORDSIZE )
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_integer									END SUBROUTINE wrf_dm_bcast_integer

SUBROUTINE wrf_dm_bcast_double( BUF, N1 )								SUBROUTINE wrf_dm_bcast_double( BUF, N1 )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER n1												   INTEGER n1
! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted			! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted
! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason		! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason
! for having this separate routine is so we pass the correct MPI type to mpi_scatterv			! for having this separate routine is so we pass the correct MPI type to mpi_scatterv
! since we were not indexing the globbuf and Field arrays it does not matter				! since we were not indexing the globbuf and Field arrays it does not matter
   REAL  buf(*)												   REAL  buf(*)
   CALL wrf_dm_bcast_bytes ( BUF , N1 * DWORDSIZE )							   CALL wrf_dm_bcast_bytes ( BUF , N1 * DWORDSIZE )
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_double									END SUBROUTINE wrf_dm_bcast_double

SUBROUTINE wrf_dm_bcast_real( BUF, N1 )									SUBROUTINE wrf_dm_bcast_real( BUF, N1 )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER n1												   INTEGER n1
   REAL  buf(*)												   REAL  buf(*)
   CALL wrf_dm_bcast_bytes ( BUF , N1 * RWORDSIZE )							   CALL wrf_dm_bcast_bytes ( BUF , N1 * RWORDSIZE )
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_real									END SUBROUTINE wrf_dm_bcast_real

SUBROUTINE wrf_dm_bcast_logical( BUF, N1 )								SUBROUTINE wrf_dm_bcast_logical( BUF, N1 )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER n1												   INTEGER n1
   LOGICAL  buf(*)											   LOGICAL  buf(*)
   CALL wrf_dm_bcast_bytes ( BUF , N1 * LWORDSIZE )							   CALL wrf_dm_bcast_bytes ( BUF , N1 * LWORDSIZE )
   RETURN												   RETURN
END SUBROUTINE wrf_dm_bcast_logical									END SUBROUTINE wrf_dm_bcast_logical

SUBROUTINE write_68( grid, v , s , &									SUBROUTINE write_68( grid, v , s , &
                   ids, ide, jds, jde, kds, kde, &							                   ids, ide, jds, jde, kds, kde, &
                   ims, ime, jms, jme, kms, kme, &							                   ims, ime, jms, jme, kms, kme, &
                   its, ite, jts, jte, kts, kte )							                   its, ite, jts, jte, kts, kte )
  USE module_domain, ONLY : domain									  USE module_domain, ONLY : domain
  IMPLICIT NONE												  IMPLICIT NONE
  TYPE(domain) , INTENT (INOUT) :: grid 								  TYPE(domain) , INTENT (INOUT) :: grid 
  CHARACTER *(*) s											  CHARACTER *(*) s
  INTEGER ids, ide, jds, jde, kds, kde, &								  INTEGER ids, ide, jds, jde, kds, kde, &
          ims, ime, jms, jme, kms, kme, &								          ims, ime, jms, jme, kms, kme, &
          its, ite, jts, jte, kts, kte									          its, ite, jts, jte, kts, kte
  REAL, DIMENSION( ims:ime , kms:kme, jms:jme ) :: v							  REAL, DIMENSION( ims:ime , kms:kme, jms:jme ) :: v

  INTEGER i,j,k,ierr											  INTEGER i,j,k,ierr

  logical, external :: wrf_dm_on_monitor								  logical, external :: wrf_dm_on_monitor
  real globbuf( ids:ide, kds:kde, jds:jde )								  real globbuf( ids:ide, kds:kde, jds:jde )
  character*3 ord, stag											  character*3 ord, stag

  if ( kds == kde ) then										  if ( kds == kde ) then
    ord = 'xy'												    ord = 'xy'
    stag = 'xy'												    stag = 'xy'
  CALL wrf_patch_to_global_real ( v, globbuf, grid%domdesc, stag, ord, &				  CALL wrf_patch_to_global_real ( v, globbuf, grid%domdesc, stag, ord, &
                     ids, ide, jds, jde, kds, kde, &							                     ids, ide, jds, jde, kds, kde, &
                     ims, ime, jms, jme, kms, kme, &							                     ims, ime, jms, jme, kms, kme, &
                     its, ite, jts, jte, kts, kte )							                     its, ite, jts, jte, kts, kte )
  else													  else

    stag = 'xyz' 											    stag = 'xyz' 
    ord = 'xzy'												    ord = 'xzy'
  CALL wrf_patch_to_global_real ( v, globbuf, grid%domdesc, stag, ord, &				  CALL wrf_patch_to_global_real ( v, globbuf, grid%domdesc, stag, ord, &
                     ids, ide, kds, kde, jds, jde, &							                     ids, ide, kds, kde, jds, jde, &
                     ims, ime, kms, kme, jms, jme, &							                     ims, ime, kms, kme, jms, jme, &
                     its, ite, kts, kte, jts, jte )							                     its, ite, kts, kte, jts, jte )
  endif													  endif


  if ( wrf_dm_on_monitor() ) THEN									  if ( wrf_dm_on_monitor() ) THEN
    WRITE(68,*) ide-ids+1, jde-jds+1 , s								    WRITE(68,*) ide-ids+1, jde-jds+1 , s
    DO j = jds, jde											    DO j = jds, jde
    DO i = ids, ide											    DO i = ids, ide
       WRITE(68,*) globbuf(i,1,j)									       WRITE(68,*) globbuf(i,1,j)
    END DO												    ENDDO
    END DO												    ENDDO
  endif													  endif

  RETURN												  RETURN
END													END

   SUBROUTINE wrf_abort											   SUBROUTINE wrf_abort

#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
      USE module_cpl, ONLY : coupler_on, cpl_abort							      USE module_cpl, ONLY : coupler_on, cpl_abort
#endif													#endif

      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
      INCLUDE 'mpif.h'											      INCLUDE 'mpif.h'
      INTEGER ierr											      INTEGER ierr
#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
      IF ( coupler_on ) THEN										      IF ( coupler_on ) THEN
         CALL cpl_abort( 'wrf_abort', 'look for abort message in rsl* files' )				         CALL cpl_abort( 'wrf_abort', 'look for abort message in rsl* files' )
      ELSE												      ELSE
#endif													#endif
         CALL mpi_abort(MPI_COMM_WORLD,1,ierr)								         CALL mpi_abort(MPI_COMM_WORLD,1,ierr)
#if ( DA_CORE != 1 )											#if ( DA_CORE != 1 )
      END IF												      END IF
#endif													#endif
#else													#else
      STOP												      STOP
#endif													#endif
   END SUBROUTINE wrf_abort										   END SUBROUTINE wrf_abort

   SUBROUTINE wrf_dm_shutdown										   SUBROUTINE wrf_dm_shutdown
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
      INTEGER ierr											      INTEGER ierr
      CALL MPI_FINALIZE( ierr )										      CALL MPI_FINALIZE( ierr )
#endif													#endif
      RETURN												      RETURN
   END SUBROUTINE wrf_dm_shutdown									   END SUBROUTINE wrf_dm_shutdown

   LOGICAL FUNCTION wrf_dm_on_monitor()									   LOGICAL FUNCTION wrf_dm_on_monitor()
      IMPLICIT NONE											      IMPLICIT NONE
#ifndef STUBMPI												#ifndef STUBMPI
      INCLUDE 'mpif.h'											      INCLUDE 'mpif.h'
      INTEGER tsk, ierr, mpi_comm_local									      INTEGER tsk, ierr, mpi_comm_local
      CALL wrf_get_dm_communicator( mpi_comm_local )							      CALL wrf_get_dm_communicator( mpi_comm_local )
      IF ( mpi_comm_local .NE. MPI_UNDEFINED ) THEN						   <
        CALL mpi_comm_rank ( mpi_comm_local, tsk , ierr )						      CALL mpi_comm_rank ( mpi_comm_local, tsk , ierr )
        wrf_dm_on_monitor = tsk .EQ. 0									      wrf_dm_on_monitor = tsk .EQ. 0
      ELSE											   <
        wrf_dm_on_monitor = .FALSE.								   <
      END IF											   <
#else													#else
      wrf_dm_on_monitor = .TRUE.									      wrf_dm_on_monitor = .TRUE.
#endif													#endif
      RETURN												      RETURN
   END FUNCTION wrf_dm_on_monitor									   END FUNCTION wrf_dm_on_monitor

   SUBROUTINE rsl_comm_iter_init(shw,ps,pe)								   SUBROUTINE rsl_comm_iter_init(shw,ps,pe)
      INTEGER shw, ps, pe										      INTEGER shw, ps, pe
      INTEGER iter, plus_send_start, plus_recv_start, &							      INTEGER iter, plus_send_start, plus_recv_start, &
                    minus_send_start, minus_recv_start 							                    minus_send_start, minus_recv_start 
      COMMON /rcii/ iter, plus_send_start, plus_recv_start, &						      COMMON /rcii/ iter, plus_send_start, plus_recv_start, &
                          minus_send_start, minus_recv_start						                          minus_send_start, minus_recv_start
      iter = 0 												      iter = 0 
      minus_send_start = ps										      minus_send_start = ps
      minus_recv_start = ps-1										      minus_recv_start = ps-1
      plus_send_start = pe										      plus_send_start = pe
      plus_recv_start = pe+1										      plus_recv_start = pe+1
   END SUBROUTINE rsl_comm_iter_init									   END SUBROUTINE rsl_comm_iter_init

   LOGICAL FUNCTION rsl_comm_iter ( id , is_intermediate,                     &				   LOGICAL FUNCTION rsl_comm_iter ( id , is_intermediate,                     &
                                    shw ,  xy , ds, de_in, ps, pe, nds,nde, & 				                                    shw ,  xy , ds, de_in, ps, pe, nds,nde, & 
                                    sendbeg_m, sendw_m, sendbeg_p, sendw_p,   &				                                    sendbeg_m, sendw_m, sendbeg_p, sendw_p,   &
                                    recvbeg_m, recvw_m, recvbeg_p, recvw_p    )				                                    recvbeg_m, recvw_m, recvbeg_p, recvw_p    )
      USE module_dm, ONLY : ntasks_x, ntasks_y, mytask_x, mytask_y, minx, miny, &		   |	      USE module_dm, ONLY : ntasks_x, ntasks_y, mytask_x, mytask_y, minx, miny
                            nest_pes_x, nest_pes_y						   <
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER, INTENT(IN)  :: id,shw,xy,ds,de_in,ps,pe,nds,nde						      INTEGER, INTENT(IN)  :: id,shw,xy,ds,de_in,ps,pe,nds,nde
      LOGICAL, INTENT(IN)  :: is_intermediate  ! treated differently, coarse but with same decom	      LOGICAL, INTENT(IN)  :: is_intermediate  ! treated differently, coarse but with same decom
      INTEGER, INTENT(OUT) :: sendbeg_m, sendw_m, sendbeg_p, sendw_p					      INTEGER, INTENT(OUT) :: sendbeg_m, sendw_m, sendbeg_p, sendw_p
      INTEGER, INTENT(OUT) :: recvbeg_m, recvw_m, recvbeg_p, recvw_p					      INTEGER, INTENT(OUT) :: recvbeg_m, recvw_m, recvbeg_p, recvw_p
      INTEGER k, kn, ni, nj, de, Px, Py, nt, ntx, nty, me, lb, ub, ierr 				      INTEGER k, kn, ni, nj, de, Px, Py, nt, ntx, nty, me, lb, ub, ierr 
      INTEGER dum											      INTEGER dum
      LOGICAL went											      LOGICAL went
      INTEGER iter, plus_send_start, plus_recv_start, &							      INTEGER iter, plus_send_start, plus_recv_start, &
                    minus_send_start, minus_recv_start 							                    minus_send_start, minus_recv_start 
      INTEGER parent_grid_ratio, parent_start								      INTEGER parent_grid_ratio, parent_start
      COMMON /rcii/ iter, plus_send_start, plus_recv_start, &						      COMMON /rcii/ iter, plus_send_start, plus_recv_start, &
                          minus_send_start, minus_recv_start						                          minus_send_start, minus_recv_start

#if (NMM_CORE == 1 )											#if (NMM_CORE == 1 )
! In case of NMM CORE, the domain only ever runs from ids..ide-1 and jds..jde-1 so			! In case of NMM CORE, the domain only ever runs from ids..ide-1 and jds..jde-1 so
! adjust decomposition to reflect.  20081206 JM								! adjust decomposition to reflect.  20081206 JM
      de = de_in - 1											      de = de_in - 1
#else													#else
      de = de_in											      de = de_in
#endif													#endif
      ntx = nest_pes_x(id)									   |	      ntx = ntasks_x 
      nty = nest_pes_y(id)									   |	      nty = ntasks_y 
      IF ( xy .EQ. 1 ) THEN  ! X/I axis									      IF ( xy .EQ. 1 ) THEN  ! X/I axis
        nt = ntasks_x											        nt = ntasks_x
        me = mytask_x											        me = mytask_x
        dum = 2 * nty  ! dummy dimension length for tfp to decompose without getting div 0		        dum = 2 * nty  ! dummy dimension length for tfp to decompose without getting div 0
        IF ( is_intermediate ) THEN									        IF ( is_intermediate ) THEN
           CALL nl_get_i_parent_start(id,parent_start)							           CALL nl_get_i_parent_start(id,parent_start)
           CALL nl_get_parent_grid_ratio(id,parent_grid_ratio)						           CALL nl_get_parent_grid_ratio(id,parent_grid_ratio)
        END IF												        ENDIF
      ELSE												      ELSE
        nt = ntasks_y											        nt = ntasks_y
        me = mytask_y											        me = mytask_y
        dum = 2 * ntx  ! dummy dimension length for tfp to decompose without getting div 0		        dum = 2 * ntx  ! dummy dimension length for tfp to decompose without getting div 0
        IF ( is_intermediate ) THEN									        IF ( is_intermediate ) THEN
           CALL nl_get_j_parent_start(id,parent_start)							           CALL nl_get_j_parent_start(id,parent_start)
           CALL nl_get_parent_grid_ratio(id,parent_grid_ratio)						           CALL nl_get_parent_grid_ratio(id,parent_grid_ratio)
        END IF												        ENDIF
      END IF												      ENDIF
      iter = iter + 1											      iter = iter + 1

#if (DA_CORE == 0)											#if (DA_CORE == 0)
      went = .FALSE.											      went = .FALSE.
      ! send to minus 											      ! send to minus 
      sendw_m = 0 											      sendw_m = 0 
      sendbeg_m = 1											      sendbeg_m = 1
      IF ( me .GT. 0 ) THEN										      IF ( me .GT. 0 ) THEN
        lb = minus_send_start										        lb = minus_send_start
        sendbeg_m = lb-ps+1										        sendbeg_m = lb-ps+1
        DO k = lb,ps+shw-1										        DO k = lb,ps+shw-1
          went = .TRUE.											          went = .TRUE.
          IF ( xy .eq. 1 ) THEN										          IF ( xy .eq. 1 ) THEN
            IF ( is_intermediate ) THEN									          IF ( is_intermediate ) THEN
              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            ELSE											          ELSE
              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            END IF											          ENDIF
            IF ( Px .NE. me+(iter-1) ) THEN								          IF ( Px .NE. me+(iter-1) ) THEN
              exit											            exit
            END IF											          ENDIF
          ELSE												          ELSE
            IF ( is_intermediate ) THEN									            IF ( is_intermediate ) THEN
              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            ELSE											            ELSE
              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            END IF											            ENDIF
            IF ( Py .NE. me+(iter-1) ) THEN								            IF ( Py .NE. me+(iter-1) ) THEN
              exit											              exit
            END IF											            ENDIF
          END IF											          ENDIF
          minus_send_start = minus_send_start+1								          minus_send_start = minus_send_start+1
          sendw_m = sendw_m + 1										          sendw_m = sendw_m + 1
        END DO												        ENDDO
      END IF												      ENDIF
      ! recv from minus 										      ! recv from minus 
      recvw_m = 0 											      recvw_m = 0 
      recvbeg_m = 1											      recvbeg_m = 1
      IF ( me .GT. 0 ) THEN										      IF ( me .GT. 0 ) THEN
        ub = minus_recv_start										        ub = minus_recv_start
        recvbeg_m = ps - ub										        recvbeg_m = ps - ub
        DO k = minus_recv_start,ps-shw,-1								        DO k = minus_recv_start,ps-shw,-1
          went = .TRUE.											          went = .TRUE.
          IF ( xy .eq. 1 ) THEN										          IF ( xy .eq. 1 ) THEN
          IF ( is_intermediate ) THEN									          IF ( is_intermediate ) THEN
            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          ELSE												          ELSE
              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          END IF											          ENDIF
          IF ( Px .NE. me-iter ) THEN									          IF ( Px .NE. me-iter ) THEN
            exit											            exit
          END IF											          ENDIF
          ELSE												          ELSE
            IF ( is_intermediate ) THEN									            IF ( is_intermediate ) THEN
              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            ELSE											            ELSE
              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            END IF											            ENDIF
            IF ( Py .NE. me-iter ) THEN									            IF ( Py .NE. me-iter ) THEN
              exit											              exit
            END IF											            ENDIF
          END IF											          ENDIF
          minus_recv_start = minus_recv_start-1								          minus_recv_start = minus_recv_start-1
          recvw_m = recvw_m + 1										          recvw_m = recvw_m + 1
        END DO												        ENDDO
      END IF												      ENDIF

      ! send to plus											      ! send to plus
      sendw_p = 0 											      sendw_p = 0 
      sendbeg_p = 1											      sendbeg_p = 1
      IF ( ( xy .eq. 1 .and. me .LT. ntx-1 ) .OR. ( xy .eq. 0 .and. me .LT. nty-1 ) ) THEN		      IF ( ( xy .eq. 1 .and. me .LT. ntx-1 ) .OR. ( xy .eq. 0 .and. me .LT. nty-1 ) ) THEN
        ub = plus_send_start										        ub = plus_send_start
        sendbeg_p = pe - ub + 1 									        sendbeg_p = pe - ub + 1 
        DO k = ub,pe-shw+1,-1										        DO k = ub,pe-shw+1,-1
          went = .TRUE.											          went = .TRUE.
          IF ( xy .eq. 1 ) THEN										          IF ( xy .eq. 1 ) THEN
          IF ( is_intermediate ) THEN									          IF ( is_intermediate ) THEN
            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          ELSE												          ELSE
              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          END IF											          ENDIF
          IF ( Px .NE. me-(iter-1) ) THEN								          IF ( Px .NE. me-(iter-1) ) THEN
            exit											            exit
          END IF											          ENDIF
          ELSE												          ELSE
            IF ( is_intermediate ) THEN									            IF ( is_intermediate ) THEN
              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            ELSE											            ELSE
              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            END IF											            ENDIF
            IF ( Py .NE. me-(iter-1) ) THEN								            IF ( Py .NE. me-(iter-1) ) THEN
              exit											              exit
            END IF											            ENDIF
          END IF											          ENDIF
          plus_send_start = plus_send_start - 1								          plus_send_start = plus_send_start - 1
          sendw_p = sendw_p + 1										          sendw_p = sendw_p + 1
        END DO												        ENDDO
      END IF												      ENDIF
      ! recv from plus											      ! recv from plus
      recvw_p = 0 											      recvw_p = 0 
      recvbeg_p = 1											      recvbeg_p = 1
      IF ( ( xy .eq. 1 .and. me .LT. ntx-1 ) .OR. ( xy .eq. 0 .and. me .LT. nty-1 ) ) THEN		      IF ( ( xy .eq. 1 .and. me .LT. ntx-1 ) .OR. ( xy .eq. 0 .and. me .LT. nty-1 ) ) THEN
        lb = plus_recv_start										        lb = plus_recv_start
        recvbeg_p = lb - pe										        recvbeg_p = lb - pe
        DO k = lb,pe+shw										        DO k = lb,pe+shw
          went = .TRUE.											          went = .TRUE.
          IF ( xy .eq. 1 ) THEN										          IF ( xy .eq. 1 ) THEN
          IF ( is_intermediate ) THEN									          IF ( is_intermediate ) THEN
            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					            kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (kn,1,nds,nde,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          ELSE												          ELSE

              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (k,1,ds,de,1,dum,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t

              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
          END IF											          ENDIF
          IF ( Px .NE. me+iter ) THEN									          IF ( Px .NE. me+iter ) THEN
            exit											            exit
          END IF											          ENDIF
          ELSE												          ELSE
            IF ( is_intermediate ) THEN									            IF ( is_intermediate ) THEN
              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;					              kn =  ( k - parent_start ) * parent_grid_ratio + 1 + 1 ;
              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t	              CALL task_for_point (1,kn,1,dum,nds,nde,ntx,nty,Px,Py,minx,miny,ierr) ! modified t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            ELSE											            ELSE
              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t	              CALL task_for_point (1,k,1,dum,ds,de,ntx,nty,Px,Py,minx,miny,ierr) ! modified to t
              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 	              IF ( ierr .NE. 0 ) CALL wrf_error_fatal('error code returned by task_for_point in 
            END IF											            ENDIF
            IF ( Py .NE. me+iter ) THEN									            IF ( Py .NE. me+iter ) THEN
              exit											              exit
            END IF											            ENDIF
          END IF											          ENDIF
          plus_recv_start = plus_recv_start + 1								          plus_recv_start = plus_recv_start + 1
          recvw_p = recvw_p + 1										          recvw_p = recvw_p + 1
        END DO												        ENDDO
      END IF												      ENDIF
#else													#else
      if ( iter .eq. 1 ) then										      if ( iter .eq. 1 ) then
        went = .true.											        went = .true.
      else 												      else 
        went = .false.											        went = .false.
      endif												      endif
      sendw_m = 0 ; sendw_p = 0 ; recvw_m = 0 ; recvw_p = 0 						      sendw_m = 0 ; sendw_p = 0 ; recvw_m = 0 ; recvw_p = 0 
      sendbeg_m = 1 ; if ( me .GT. 0 ) sendw_m = shw ; 							      sendbeg_m = 1 ; if ( me .GT. 0 ) sendw_m = shw ; 
      sendbeg_p = 1 ; if ( me .LT. nt-1 ) sendw_p = shw 						      sendbeg_p = 1 ; if ( me .LT. nt-1 ) sendw_p = shw 
      recvbeg_m = 1 ; if ( me .GT. 0 ) recvw_m = shw ; 							      recvbeg_m = 1 ; if ( me .GT. 0 ) recvw_m = shw ; 
      recvbeg_p = 1 ; if ( me .LT. nt-1 ) recvw_p = shw ;						      recvbeg_p = 1 ; if ( me .LT. nt-1 ) recvw_p = shw ;

      ! write(0,*)'shw  ', shw , ' xy ',xy								      ! write(0,*)'shw  ', shw , ' xy ',xy
      ! write(0,*)' ds, de, ps, pe, nds,nde ',ds, de, ps, pe, nds,nde					      ! write(0,*)' ds, de, ps, pe, nds,nde ',ds, de, ps, pe, nds,nde
      ! write(0,*)'sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_	      ! write(0,*)'sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_
      ! write(0,*)sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_p	      ! write(0,*)sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_p
#endif													#endif
      !if ( went ) then											      !if ( went ) then
      !  write(0,*)'shw  ', shw , ' xy ',xy,' plus_send_start ',plus_send_start,' minus_send_sta	      !  write(0,*)'shw  ', shw , ' xy ',xy,' plus_send_start ',plus_send_start,' minus_send_sta
      !  write(0,*)' ds, de, ps, pe, nds,nde ',ds, de, ps, pe, nds,nde					      !  write(0,*)' ds, de, ps, pe, nds,nde ',ds, de, ps, pe, nds,nde
      !  write(0,*)'sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw	      !  write(0,*)'sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw
      !  write(0,*)sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_	      !  write(0,*)sendbeg_m, sendw_m, sendbeg_p, sendw_p, recvbeg_m, recvw_m, recvbeg_p, recvw_
      !endif												      !endif
      rsl_comm_iter = went										      rsl_comm_iter = went
   END FUNCTION rsl_comm_iter										   END FUNCTION rsl_comm_iter

   INTEGER FUNCTION wrf_dm_monitor_rank()								   INTEGER FUNCTION wrf_dm_monitor_rank()
      IMPLICIT NONE											      IMPLICIT NONE
      wrf_dm_monitor_rank = 0										      wrf_dm_monitor_rank = 0
      RETURN												      RETURN
   END FUNCTION wrf_dm_monitor_rank									   END FUNCTION wrf_dm_monitor_rank

! return the global communicator if id <= 0							   <
   SUBROUTINE wrf_get_dm_communicator_for_id ( id, communicator )				   <
      USE module_dm , ONLY : local_communicator_store, mpi_comm_allcompute			   <
      IMPLICIT NONE										   <
      INTEGER , INTENT(IN) :: id								   <
      INTEGER , INTENT(OUT) :: communicator							   <
      IF ( id .le. 0 ) THEN									   <
        communicator = mpi_comm_allcompute							   <
      ELSE											   <
        communicator = local_communicator_store(id)						   <
      END IF											   <
      RETURN											   <
   END SUBROUTINE wrf_get_dm_communicator_for_id						   <
												   <
   SUBROUTINE wrf_get_dm_communicator ( communicator )							   SUBROUTINE wrf_get_dm_communicator ( communicator )
      USE module_dm , ONLY : local_communicator								      USE module_dm , ONLY : local_communicator
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: communicator								      INTEGER , INTENT(OUT) :: communicator
      communicator = local_communicator									      communicator = local_communicator
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_communicator								   END SUBROUTINE wrf_get_dm_communicator

   SUBROUTINE wrf_get_dm_communicator_x ( communicator )						   SUBROUTINE wrf_get_dm_communicator_x ( communicator )
      USE module_dm , ONLY : local_communicator_x							      USE module_dm , ONLY : local_communicator_x
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: communicator								      INTEGER , INTENT(OUT) :: communicator
      communicator = local_communicator_x								      communicator = local_communicator_x
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_communicator_x								   END SUBROUTINE wrf_get_dm_communicator_x

   SUBROUTINE wrf_get_dm_communicator_y ( communicator )						   SUBROUTINE wrf_get_dm_communicator_y ( communicator )
      USE module_dm , ONLY : local_communicator_y							      USE module_dm , ONLY : local_communicator_y
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: communicator								      INTEGER , INTENT(OUT) :: communicator
      communicator = local_communicator_y								      communicator = local_communicator_y
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_communicator_y								   END SUBROUTINE wrf_get_dm_communicator_y

   SUBROUTINE wrf_get_dm_iocommunicator ( iocommunicator )						   SUBROUTINE wrf_get_dm_iocommunicator ( iocommunicator )
      USE module_dm , ONLY : local_iocommunicator							      USE module_dm , ONLY : local_iocommunicator
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: iocommunicator								      INTEGER , INTENT(OUT) :: iocommunicator
      iocommunicator = local_iocommunicator								      iocommunicator = local_iocommunicator
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_iocommunicator								   END SUBROUTINE wrf_get_dm_iocommunicator

   SUBROUTINE wrf_set_dm_communicator ( communicator )							   SUBROUTINE wrf_set_dm_communicator ( communicator )
      USE module_dm , ONLY : local_communicator								      USE module_dm , ONLY : local_communicator
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(IN) :: communicator								      INTEGER , INTENT(IN) :: communicator
      local_communicator = communicator									      local_communicator = communicator
      RETURN												      RETURN
   END SUBROUTINE wrf_set_dm_communicator								   END SUBROUTINE wrf_set_dm_communicator

   SUBROUTINE wrf_set_dm_iocommunicator ( iocommunicator )						   SUBROUTINE wrf_set_dm_iocommunicator ( iocommunicator )
      USE module_dm , ONLY : local_iocommunicator							      USE module_dm , ONLY : local_iocommunicator
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(IN) :: iocommunicator								      INTEGER , INTENT(IN) :: iocommunicator
      local_iocommunicator = iocommunicator								      local_iocommunicator = iocommunicator
      RETURN												      RETURN
   END SUBROUTINE wrf_set_dm_iocommunicator								   END SUBROUTINE wrf_set_dm_iocommunicator

   SUBROUTINE wrf_get_dm_ntasks_x ( retval )								   SUBROUTINE wrf_get_dm_ntasks_x ( retval )
      USE module_dm , ONLY : ntasks_x									      USE module_dm , ONLY : ntasks_x
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: retval									      INTEGER , INTENT(OUT) :: retval
      retval = ntasks_x											      retval = ntasks_x
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_ntasks_x									   END SUBROUTINE wrf_get_dm_ntasks_x

   SUBROUTINE wrf_get_dm_ntasks_y ( retval )								   SUBROUTINE wrf_get_dm_ntasks_y ( retval )
      USE module_dm , ONLY : ntasks_y									      USE module_dm , ONLY : ntasks_y
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER , INTENT(OUT) :: retval									      INTEGER , INTENT(OUT) :: retval
      retval = ntasks_y											      retval = ntasks_y
      RETURN												      RETURN
   END SUBROUTINE wrf_get_dm_ntasks_y									   END SUBROUTINE wrf_get_dm_ntasks_y

! added 20151212										   <
   SUBROUTINE wrf_set_dm_quilt_comm ( communicator )						   <
      USE module_dm , ONLY : local_quilt_comm							   <
      IMPLICIT NONE										   <
      INTEGER , INTENT(IN) :: communicator							   <
      local_quilt_comm = communicator								   <
      RETURN											   <
   END SUBROUTINE wrf_set_dm_quilt_comm								   <
												   <
   SUBROUTINE wrf_get_dm_quilt_comm ( communicator )						   <
      USE module_dm , ONLY : local_quilt_comm							   <
      IMPLICIT NONE										   <
      INTEGER , INTENT(OUT) :: communicator							   <
      communicator = local_quilt_comm								   <
      RETURN											   <
   END SUBROUTINE wrf_get_dm_quilt_comm								   <
												   <

!!!!!!!!!!!!!!!!!!!!!!! PATCH TO GLOBAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!				!!!!!!!!!!!!!!!!!!!!!!! PATCH TO GLOBAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

   SUBROUTINE wrf_patch_to_global_real (buf,globbuf,domdesc,stagger,ordering,&				   SUBROUTINE wrf_patch_to_global_real (buf,globbuf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)

       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,RWORDSIZE,&		       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,RWORDSIZE,&
                                         DS1,DE1,DS2,DE2,DS3,DE3,&					                                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                         MS1,ME1,MS2,ME2,MS3,ME3,&					                                         MS1,ME1,MS2,ME2,MS3,ME3,&
                                         PS1,PE1,PS2,PE2,PS3,PE3 )					                                         PS1,PE1,PS2,PE2,PS3,PE3 )

       RETURN												       RETURN
   END SUBROUTINE wrf_patch_to_global_real 								   END SUBROUTINE wrf_patch_to_global_real 

   SUBROUTINE wrf_patch_to_global_double (buf,globbuf,domdesc,stagger,ordering,&			   SUBROUTINE wrf_patch_to_global_double (buf,globbuf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted			! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted
! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason		! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason
! for having this separate routine is so we pass the correct MPI type to mpi_scatterv			! for having this separate routine is so we pass the correct MPI type to mpi_scatterv
! since we were not indexing the globbuf and Field arrays it does not matter				! since we were not indexing the globbuf and Field arrays it does not matter
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)

       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,DWORDSIZE,&		       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,DWORDSIZE,&
                                         DS1,DE1,DS2,DE2,DS3,DE3,&					                                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                         MS1,ME1,MS2,ME2,MS3,ME3,&					                                         MS1,ME1,MS2,ME2,MS3,ME3,&
                                         PS1,PE1,PS2,PE2,PS3,PE3 )					                                         PS1,PE1,PS2,PE2,PS3,PE3 )

       RETURN												       RETURN
   END SUBROUTINE wrf_patch_to_global_double								   END SUBROUTINE wrf_patch_to_global_double


   SUBROUTINE wrf_patch_to_global_integer (buf,globbuf,domdesc,stagger,ordering,&			   SUBROUTINE wrf_patch_to_global_integer (buf,globbuf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       INTEGER globbuf(*)										       INTEGER globbuf(*)
       INTEGER buf(*)											       INTEGER buf(*)

       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,IWORDSIZE,&		       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,IWORDSIZE,&
                                         DS1,DE1,DS2,DE2,DS3,DE3,&					                                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                         MS1,ME1,MS2,ME2,MS3,ME3,&					                                         MS1,ME1,MS2,ME2,MS3,ME3,&
                                         PS1,PE1,PS2,PE2,PS3,PE3 )					                                         PS1,PE1,PS2,PE2,PS3,PE3 )

       RETURN												       RETURN
   END SUBROUTINE wrf_patch_to_global_integer 								   END SUBROUTINE wrf_patch_to_global_integer 


   SUBROUTINE wrf_patch_to_global_logical (buf,globbuf,domdesc,stagger,ordering,&			   SUBROUTINE wrf_patch_to_global_logical (buf,globbuf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       LOGICAL globbuf(*)										       LOGICAL globbuf(*)
       LOGICAL buf(*)											       LOGICAL buf(*)

       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,LWORDSIZE,&		       CALL wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,LWORDSIZE,&
                                         DS1,DE1,DS2,DE2,DS3,DE3,&					                                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                         MS1,ME1,MS2,ME2,MS3,ME3,&					                                         MS1,ME1,MS2,ME2,MS3,ME3,&
                                         PS1,PE1,PS2,PE2,PS3,PE3 )					                                         PS1,PE1,PS2,PE2,PS3,PE3 )

       RETURN												       RETURN
   END SUBROUTINE wrf_patch_to_global_logical								   END SUBROUTINE wrf_patch_to_global_logical

#ifdef DEREF_KLUDGE											#ifdef DEREF_KLUDGE
#  define FRSTELEM (1)											#  define FRSTELEM (1)
#else													#else
#  define FRSTELEM											#  define FRSTELEM
#endif													#endif

   SUBROUTINE wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,typesize,&		   SUBROUTINE wrf_patch_to_global_generic (buf,globbuf,domdesc,stagger,ordering,typesize,&
                                       DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&					                                       DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&
                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&					                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&
                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3a )					                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3a )
       USE module_driver_constants									       USE module_driver_constants
       USE module_timing										       USE module_timing
       USE module_wrf_error, ONLY : wrf_at_debug_level							       USE module_wrf_error, ONLY : wrf_at_debug_level
       USE module_dm, ONLY : local_communicator, ntasks							       USE module_dm, ONLY : local_communicator, ntasks

       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&					       INTEGER                         DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&
                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&					                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&
                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3A 					                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3A 
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER domdesc,typesize,ierr									       INTEGER domdesc,typesize,ierr
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)
#ifndef STUBMPI												#ifndef STUBMPI
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       INTEGER                         ids,ide,jds,jde,kds,kde,&					       INTEGER                         ids,ide,jds,jde,kds,kde,&
                                       ims,ime,jms,jme,kms,kme,&					                                       ims,ime,jms,jme,kms,kme,&
                                       ips,ipe,jps,jpe,kps,kpe						                                       ips,ipe,jps,jpe,kps,kpe
       LOGICAL, EXTERNAL :: wrf_dm_on_monitor, has_char							       LOGICAL, EXTERNAL :: wrf_dm_on_monitor, has_char

       INTEGER i, j, k,  ndim										       INTEGER i, j, k,  ndim
       INTEGER  Patch(3,2), Gpatch(3,2,ntasks)								       INTEGER  Patch(3,2), Gpatch(3,2,ntasks)
    ! allocated further down, after the D indices are potentially recalculated for staggering		    ! allocated further down, after the D indices are potentially recalculated for staggering
       REAL, ALLOCATABLE :: tmpbuf( : )									       REAL, ALLOCATABLE :: tmpbuf( : )
       REAL locbuf( (PE1a-PS1a+1)*(PE2a-PS2a+1)*(PE3a-PS3a+1)/RWORDSIZE*typesize+32 )			       REAL locbuf( (PE1a-PS1a+1)*(PE2a-PS2a+1)*(PE3a-PS3a+1)/RWORDSIZE*typesize+32 )

       DS1 = DS1a ; DE1 = DE1a ; DS2=DS2a ; DE2 = DE2a ; DS3 = DS3a ; DE3 = DE3a			       DS1 = DS1a ; DE1 = DE1a ; DS2=DS2a ; DE2 = DE2a ; DS3 = DS3a ; DE3 = DE3a
       MS1 = MS1a ; ME1 = ME1a ; MS2=MS2a ; ME2 = ME2a ; MS3 = MS3a ; ME3 = ME3a			       MS1 = MS1a ; ME1 = ME1a ; MS2=MS2a ; ME2 = ME2a ; MS3 = MS3a ; ME3 = ME3a
       PS1 = PS1a ; PE1 = PE1a ; PS2=PS2a ; PE2 = PE2a ; PS3 = PS3a ; PE3 = PE3a			       PS1 = PS1a ; PE1 = PE1a ; PS2=PS2a ; PE2 = PE2a ; PS3 = PS3a ; PE3 = PE3a

       SELECT CASE ( TRIM(ordering) )									       SELECT CASE ( TRIM(ordering) )
         CASE ( 'xy', 'yx' )										         CASE ( 'xy', 'yx' )
           ndim = 2											           ndim = 2
         CASE DEFAULT											         CASE DEFAULT
           ndim = 3   ! where appropriate								           ndim = 3   ! where appropriate
       END SELECT											       END SELECT

       SELECT CASE ( TRIM(ordering) )									       SELECT CASE ( TRIM(ordering) )
         CASE ( 'xyz','xy' )										         CASE ( 'xyz','xy' )
            ! the non-staggered variables come in at one-less than					            ! the non-staggered variables come in at one-less than
            ! domain dimensions, but code wants full domain spec, so					            ! domain dimensions, but code wants full domain spec, so
            ! adjust if not staggered									            ! adjust if not staggered
           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE2 = DE2+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1
         CASE ( 'yxz','yx' )										         CASE ( 'yxz','yx' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE1 = DE1+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1
         CASE ( 'zxy' )											         CASE ( 'zxy' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE1 = DE1+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE1 = DE1+1
         CASE ( 'xzy' )											         CASE ( 'xzy' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE2 = DE2+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE2 = DE2+1
         CASE DEFAULT											         CASE DEFAULT
       END SELECT											       END SELECT

     ! moved to here to be after the potential recalculations of D dims					     ! moved to here to be after the potential recalculations of D dims
       IF ( wrf_dm_on_monitor() ) THEN									       IF ( wrf_dm_on_monitor() ) THEN
         ALLOCATE ( tmpbuf ( (DE1-DS1+1)*(DE2-DS2+1)*(DE3-DS3+1)/RWORDSIZE*typesize+32 ), STAT=i	         ALLOCATE ( tmpbuf ( (DE1-DS1+1)*(DE2-DS2+1)*(DE3-DS3+1)/RWORDSIZE*typesize+32 ), STAT=i
       ELSE												       ELSE
         ALLOCATE ( tmpbuf ( 1 ), STAT=ierr )								         ALLOCATE ( tmpbuf ( 1 ), STAT=ierr )
       END IF												       ENDIF
       IF ( ierr .ne. 0 ) CALL wrf_error_fatal ('allocating tmpbuf in wrf_patch_to_global_generi	       IF ( ierr .ne. 0 ) CALL wrf_error_fatal ('allocating tmpbuf in wrf_patch_to_global_generi
 													 
       Patch(1,1) = ps1 ; Patch(1,2) = pe1    ! use patch dims						       Patch(1,1) = ps1 ; Patch(1,2) = pe1    ! use patch dims
       Patch(2,1) = ps2 ; Patch(2,2) = pe2								       Patch(2,1) = ps2 ; Patch(2,2) = pe2
       Patch(3,1) = ps3 ; Patch(3,2) = pe3								       Patch(3,1) = ps3 ; Patch(3,2) = pe3

       IF      ( typesize .EQ. RWORDSIZE ) THEN								       IF      ( typesize .EQ. RWORDSIZE ) THEN
         CALL just_patch_r ( buf , locbuf , size(locbuf)*RWORDSIZE/typesize, &			   |	         CALL just_patch_r ( buf , locbuf , size(locbuf), &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       ELSE IF ( typesize .EQ. IWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. IWORDSIZE ) THEN
         CALL just_patch_i ( buf , locbuf , size(locbuf)*RWORDSIZE/typesize, &			   |	         CALL just_patch_i ( buf , locbuf , size(locbuf), &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       ELSE IF ( typesize .EQ. DWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. DWORDSIZE ) THEN
         CALL just_patch_d ( buf , locbuf , size(locbuf)*RWORDSIZE/typesize, &			   |	         CALL just_patch_d ( buf , locbuf , size(locbuf), &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       ELSE IF ( typesize .EQ. LWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. LWORDSIZE ) THEN
         CALL just_patch_l ( buf , locbuf , size(locbuf)*RWORDSIZE/typesize, &			   |	         CALL just_patch_l ( buf , locbuf , size(locbuf), &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       END IF												       ENDIF

! defined in external/io_quilt										! defined in external/io_quilt
       CALL collect_on_comm0 (  local_communicator , IWORDSIZE ,  &					       CALL collect_on_comm0 (  local_communicator , IWORDSIZE ,  &
                                Patch , 6 ,                       &					                                Patch , 6 ,                       &
                                GPatch , 6*ntasks                 )					                                GPatch , 6*ntasks                 )

       CALL collect_on_comm0 (  local_communicator , typesize ,  &					       CALL collect_on_comm0 (  local_communicator , typesize ,  &
                                locbuf , (pe1-ps1+1)*(pe2-ps2+1)*(pe3-ps3+1),   &			                                locbuf , (pe1-ps1+1)*(pe2-ps2+1)*(pe3-ps3+1),   &
                                tmpbuf FRSTELEM , (de1-ds1+1)*(de2-ds2+1)*(de3-ds3+1) )			                                tmpbuf FRSTELEM , (de1-ds1+1)*(de2-ds2+1)*(de3-ds3+1) )

       ndim = len(TRIM(ordering))									       ndim = len(TRIM(ordering))

       IF ( wrf_at_debug_level(500) ) THEN								       IF ( wrf_at_debug_level(500) ) THEN
         CALL start_timing										         CALL start_timing
       END IF												       ENDIF

       IF ( ndim .GE. 2 .AND. wrf_dm_on_monitor() ) THEN						       IF ( ndim .GE. 2 .AND. wrf_dm_on_monitor() ) THEN

         IF      ( typesize .EQ. RWORDSIZE ) THEN							         IF      ( typesize .EQ. RWORDSIZE ) THEN
           CALL patch_2_outbuf_r ( tmpbuf FRSTELEM , globbuf ,             &					   CALL patch_2_outbuf_r ( tmpbuf FRSTELEM , globbuf ,             &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &									   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )									   GPATCH                         )
         ELSE IF ( typesize .EQ. IWORDSIZE ) THEN								 ELSE IF ( typesize .EQ. IWORDSIZE ) THEN
           CALL patch_2_outbuf_i ( tmpbuf FRSTELEM , globbuf ,             &					   CALL patch_2_outbuf_i ( tmpbuf FRSTELEM , globbuf ,             &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &									   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )									   GPATCH                         )
         ELSE IF ( typesize .EQ. DWORDSIZE ) THEN								 ELSE IF ( typesize .EQ. DWORDSIZE ) THEN
           CALL patch_2_outbuf_d ( tmpbuf FRSTELEM , globbuf ,             &					   CALL patch_2_outbuf_d ( tmpbuf FRSTELEM , globbuf ,             &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &									   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )									   GPATCH                         )
         ELSE IF ( typesize .EQ. LWORDSIZE ) THEN								 ELSE IF ( typesize .EQ. LWORDSIZE ) THEN
           CALL patch_2_outbuf_l ( tmpbuf FRSTELEM , globbuf ,             &					   CALL patch_2_outbuf_l ( tmpbuf FRSTELEM , globbuf ,             &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &									   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )									   GPATCH                         )
         END IF													 ENDIF

       END IF												       ENDIF

       IF ( wrf_at_debug_level(500) ) THEN								       IF ( wrf_at_debug_level(500) ) THEN
         CALL end_timing('wrf_patch_to_global_generic')							         CALL end_timing('wrf_patch_to_global_generic')
       END IF												       ENDIF
       DEALLOCATE( tmpbuf )										       DEALLOCATE( tmpbuf )
#endif													#endif
       RETURN												       RETURN
    END SUBROUTINE wrf_patch_to_global_generic								    END SUBROUTINE wrf_patch_to_global_generic

  SUBROUTINE just_patch_i ( inbuf , outbuf, noutbuf,     &						  SUBROUTINE just_patch_i ( inbuf , outbuf, noutbuf,     &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER                         , INTENT(IN)  :: noutbuf						    INTEGER                         , INTENT(IN)  :: noutbuf
    INTEGER    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf						    INTEGER    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    INTEGER    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(IN) :: inbuf				    INTEGER    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(IN) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2											        DO j = PS2, PE2
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( icurs )  = inbuf( i, j, k )								            outbuf( icurs )  = inbuf( i, j, k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE just_patch_i										  END SUBROUTINE just_patch_i

  SUBROUTINE just_patch_r ( inbuf , outbuf, noutbuf,     &						  SUBROUTINE just_patch_r ( inbuf , outbuf, noutbuf,     &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER                      , INTENT(IN)  :: noutbuf						    INTEGER                      , INTENT(IN)  :: noutbuf
    REAL    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf						    REAL    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    REAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf				    REAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k   ,  icurs								    INTEGER               :: i,j,k   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2 										        DO j = PS2, PE2 
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( icurs )  = inbuf( i, j, k )								            outbuf( icurs )  = inbuf( i, j, k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE just_patch_r										  END SUBROUTINE just_patch_r

  SUBROUTINE just_patch_d ( inbuf , outbuf, noutbuf,     &						  SUBROUTINE just_patch_d ( inbuf , outbuf, noutbuf,     &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER                                  , INTENT(IN)  :: noutbuf					    INTEGER                                  , INTENT(IN)  :: noutbuf
    DOUBLE PRECISION    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf					    DOUBLE PRECISION    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    DOUBLE PRECISION    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf			    DOUBLE PRECISION    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2 										        DO j = PS2, PE2 
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( icurs )  = inbuf( i, j, k )								            outbuf( icurs )  = inbuf( i, j, k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE just_patch_d										  END SUBROUTINE just_patch_d

  SUBROUTINE just_patch_l ( inbuf , outbuf, noutbuf,     &						  SUBROUTINE just_patch_l ( inbuf , outbuf, noutbuf,     &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER                         , INTENT(IN)  :: noutbuf						    INTEGER                         , INTENT(IN)  :: noutbuf
    LOGICAL    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf						    LOGICAL    , DIMENSION(noutbuf) , INTENT(OUT) :: outbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    LOGICAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf				    LOGICAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(in) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2 										        DO j = PS2, PE2 
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( icurs )  = inbuf( i, j, k )								            outbuf( icurs )  = inbuf( i, j, k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE just_patch_l										  END SUBROUTINE just_patch_l


  SUBROUTINE patch_2_outbuf_r( inbuf, outbuf,            &						  SUBROUTINE patch_2_outbuf_r( inbuf, outbuf,            &
                               DS1,DE1,DS2,DE2,DS3,DE3,  &						                               DS1,DE1,DS2,DE2,DS3,DE3,  &
                               GPATCH ) 								                               GPATCH ) 
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    REAL    , DIMENSION(*) , INTENT(IN) :: inbuf							    REAL    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    REAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf				    REAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( i, j, k ) = inbuf( icurs )								            outbuf( i, j, k ) = inbuf( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO												  ENDDO
        END DO													ENDDO
      END DO												      ENDDO
    END DO												    ENDDO

    RETURN												    RETURN
  END SUBROUTINE patch_2_outbuf_r									  END SUBROUTINE patch_2_outbuf_r

  SUBROUTINE patch_2_outbuf_i( inbuf, outbuf,         &							  SUBROUTINE patch_2_outbuf_i( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER    , DIMENSION(*) , INTENT(IN) :: inbuf							    INTEGER    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    INTEGER    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf				    INTEGER    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( i, j, k ) = inbuf( icurs )								            outbuf( i, j, k ) = inbuf( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE patch_2_outbuf_i									  END SUBROUTINE patch_2_outbuf_i

  SUBROUTINE patch_2_outbuf_d( inbuf, outbuf,         &							  SUBROUTINE patch_2_outbuf_d( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    DOUBLE PRECISION    , DIMENSION(*) , INTENT(IN) :: inbuf						    DOUBLE PRECISION    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    DOUBLE PRECISION    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf			    DOUBLE PRECISION    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( i, j, k ) = inbuf( icurs )								            outbuf( i, j, k ) = inbuf( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE patch_2_outbuf_d									  END SUBROUTINE patch_2_outbuf_d

  SUBROUTINE patch_2_outbuf_l( inbuf, outbuf,         &							  SUBROUTINE patch_2_outbuf_l( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    LOGICAL    , DIMENSION(*) , INTENT(IN) :: inbuf							    LOGICAL    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    LOGICAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf				    LOGICAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(out) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( i, j, k ) = inbuf( icurs )								            outbuf( i, j, k ) = inbuf( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE patch_2_outbuf_l									  END SUBROUTINE patch_2_outbuf_l

!!!!!!!!!!!!!!!!!!!!!!! GLOBAL TO PATCH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!				!!!!!!!!!!!!!!!!!!!!!!! GLOBAL TO PATCH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    SUBROUTINE wrf_global_to_patch_real (globbuf,buf,domdesc,stagger,ordering,&				    SUBROUTINE wrf_global_to_patch_real (globbuf,buf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)

       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,RWORDSIZE,&		       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,RWORDSIZE,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       RETURN												       RETURN
    END SUBROUTINE wrf_global_to_patch_real								    END SUBROUTINE wrf_global_to_patch_real

    SUBROUTINE wrf_global_to_patch_double (globbuf,buf,domdesc,stagger,ordering,&			    SUBROUTINE wrf_global_to_patch_double (globbuf,buf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted			! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted
! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason		! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason
! for having this separate routine is so we pass the correct MPI type to mpi_scatterv			! for having this separate routine is so we pass the correct MPI type to mpi_scatterv
! since we were not indexing the globbuf and Field arrays it does not matter				! since we were not indexing the globbuf and Field arrays it does not matter
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)

       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,DWORDSIZE,&		       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,DWORDSIZE,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       RETURN												       RETURN
    END SUBROUTINE wrf_global_to_patch_double								    END SUBROUTINE wrf_global_to_patch_double


    SUBROUTINE wrf_global_to_patch_integer (globbuf,buf,domdesc,stagger,ordering,&			    SUBROUTINE wrf_global_to_patch_integer (globbuf,buf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       INTEGER globbuf(*)										       INTEGER globbuf(*)
       INTEGER buf(*)											       INTEGER buf(*)

       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,IWORDSIZE,&		       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,IWORDSIZE,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       RETURN												       RETURN
    END SUBROUTINE wrf_global_to_patch_integer								    END SUBROUTINE wrf_global_to_patch_integer

    SUBROUTINE wrf_global_to_patch_logical (globbuf,buf,domdesc,stagger,ordering,&			    SUBROUTINE wrf_global_to_patch_logical (globbuf,buf,domdesc,stagger,ordering,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER fid,domdesc										       INTEGER fid,domdesc
       LOGICAL globbuf(*)										       LOGICAL globbuf(*)
       LOGICAL buf(*)											       LOGICAL buf(*)

       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,LWORDSIZE,&		       CALL wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,LWORDSIZE,&
                                       DS1,DE1,DS2,DE2,DS3,DE3,&					                                       DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3 )					                                       PS1,PE1,PS2,PE2,PS3,PE3 )
       RETURN												       RETURN
    END SUBROUTINE wrf_global_to_patch_logical								    END SUBROUTINE wrf_global_to_patch_logical

    SUBROUTINE wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,typesize,&		    SUBROUTINE wrf_global_to_patch_generic (globbuf,buf,domdesc,stagger,ordering,typesize,&
                                       DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&					                                       DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&
                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&					                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&
                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3a )					                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3a )
       USE module_dm, ONLY : local_communicator, ntasks							       USE module_dm, ONLY : local_communicator, ntasks
       USE module_driver_constants									       USE module_driver_constants
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER                         DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&					       INTEGER                         DS1a,DE1a,DS2a,DE2a,DS3a,DE3a,&
                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&					                                       MS1a,ME1a,MS2a,ME2a,MS3a,ME3a,&
                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3A 					                                       PS1a,PE1a,PS2a,PE2a,PS3a,PE3A 
       CHARACTER *(*) stagger,ordering									       CHARACTER *(*) stagger,ordering
       INTEGER domdesc,typesize,ierr									       INTEGER domdesc,typesize,ierr
       REAL globbuf(*)											       REAL globbuf(*)
       REAL buf(*)											       REAL buf(*)
#ifndef STUBMPI												#ifndef STUBMPI
       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&					       INTEGER                         DS1,DE1,DS2,DE2,DS3,DE3,&
                                       MS1,ME1,MS2,ME2,MS3,ME3,&					                                       MS1,ME1,MS2,ME2,MS3,ME3,&
                                       PS1,PE1,PS2,PE2,PS3,PE3						                                       PS1,PE1,PS2,PE2,PS3,PE3
       LOGICAL, EXTERNAL :: wrf_dm_on_monitor, has_char							       LOGICAL, EXTERNAL :: wrf_dm_on_monitor, has_char

       INTEGER i,j,k,ord,ord2d,ndim									       INTEGER i,j,k,ord,ord2d,ndim
       INTEGER  Patch(3,2), Gpatch(3,2,ntasks)								       INTEGER  Patch(3,2), Gpatch(3,2,ntasks)
       REAL, ALLOCATABLE :: tmpbuf( : )									       REAL, ALLOCATABLE :: tmpbuf( : )
       REAL locbuf( (PE1a-PS1a+1)*(PE2a-PS2a+1)*(PE3a-PS3a+1)/RWORDSIZE*typesize+32 )			       REAL locbuf( (PE1a-PS1a+1)*(PE2a-PS2a+1)*(PE3a-PS3a+1)/RWORDSIZE*typesize+32 )

       DS1 = DS1a ; DE1 = DE1a ; DS2=DS2a ; DE2 = DE2a ; DS3 = DS3a ; DE3 = DE3a			       DS1 = DS1a ; DE1 = DE1a ; DS2=DS2a ; DE2 = DE2a ; DS3 = DS3a ; DE3 = DE3a
       MS1 = MS1a ; ME1 = ME1a ; MS2=MS2a ; ME2 = ME2a ; MS3 = MS3a ; ME3 = ME3a			       MS1 = MS1a ; ME1 = ME1a ; MS2=MS2a ; ME2 = ME2a ; MS3 = MS3a ; ME3 = ME3a
       PS1 = PS1a ; PE1 = PE1a ; PS2=PS2a ; PE2 = PE2a ; PS3 = PS3a ; PE3 = PE3a			       PS1 = PS1a ; PE1 = PE1a ; PS2=PS2a ; PE2 = PE2a ; PS3 = PS3a ; PE3 = PE3a

       SELECT CASE ( TRIM(ordering) )									       SELECT CASE ( TRIM(ordering) )
         CASE ( 'xy', 'yx' )										         CASE ( 'xy', 'yx' )
           ndim = 2											           ndim = 2
         CASE DEFAULT											         CASE DEFAULT
           ndim = 3   ! where appropriate								           ndim = 3   ! where appropriate
       END SELECT											       END SELECT

       SELECT CASE ( TRIM(ordering) )									       SELECT CASE ( TRIM(ordering) )
         CASE ( 'xyz','xy' )										         CASE ( 'xyz','xy' )
            ! the non-staggered variables come in at one-less than					            ! the non-staggered variables come in at one-less than
            ! domain dimensions, but code wants full domain spec, so					            ! domain dimensions, but code wants full domain spec, so
            ! adjust if not staggered									            ! adjust if not staggered
           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE2 = DE2+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1
         CASE ( 'yxz','yx' )										         CASE ( 'yxz','yx' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE1 = DE1+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE3 = DE3+1
         CASE ( 'zxy' )											         CASE ( 'zxy' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE2 = DE2+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE1 = DE1+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE1 = DE1+1
         CASE ( 'xzy' )											         CASE ( 'xzy' )
           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1						           IF ( .NOT. has_char( stagger, 'x' ) ) DE1 = DE1+1
           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1						           IF ( .NOT. has_char( stagger, 'y' ) ) DE3 = DE3+1
           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE2 = DE2+1				           IF ( ndim .EQ. 3 .AND. .NOT. has_char( stagger, 'z' ) ) DE2 = DE2+1
         CASE DEFAULT											         CASE DEFAULT
       END SELECT											       END SELECT

     ! moved to here to be after the potential recalculations of D dims					     ! moved to here to be after the potential recalculations of D dims
       IF ( wrf_dm_on_monitor() ) THEN									       IF ( wrf_dm_on_monitor() ) THEN
         ALLOCATE ( tmpbuf ( (DE1-DS1+1)*(DE2-DS2+1)*(DE3-DS3+1)/RWORDSIZE*typesize+32 ), STAT=i	         ALLOCATE ( tmpbuf ( (DE1-DS1+1)*(DE2-DS2+1)*(DE3-DS3+1)/RWORDSIZE*typesize+32 ), STAT=i
       ELSE												       ELSE
         ALLOCATE ( tmpbuf ( 1 ), STAT=ierr )								         ALLOCATE ( tmpbuf ( 1 ), STAT=ierr )
       END IF												       ENDIF
       IF ( ierr .ne. 0 ) CALL wrf_error_fatal ('allocating tmpbuf in wrf_global_to_patch_generi	       IF ( ierr .ne. 0 ) CALL wrf_error_fatal ('allocating tmpbuf in wrf_global_to_patch_generi

       Patch(1,1) = ps1 ; Patch(1,2) = pe1    ! use patch dims						       Patch(1,1) = ps1 ; Patch(1,2) = pe1    ! use patch dims
       Patch(2,1) = ps2 ; Patch(2,2) = pe2								       Patch(2,1) = ps2 ; Patch(2,2) = pe2
       Patch(3,1) = ps3 ; Patch(3,2) = pe3								       Patch(3,1) = ps3 ; Patch(3,2) = pe3

! defined in external/io_quilt										! defined in external/io_quilt
       CALL collect_on_comm0 (  local_communicator , IWORDSIZE ,  &					       CALL collect_on_comm0 (  local_communicator , IWORDSIZE ,  &
                                Patch , 6 ,                       &					                                Patch , 6 ,                       &
                                GPatch , 6*ntasks                 )					                                GPatch , 6*ntasks                 )
       ndim = len(TRIM(ordering))									       ndim = len(TRIM(ordering))

       IF ( wrf_dm_on_monitor() .AND. ndim .GE. 2 ) THEN						       IF ( wrf_dm_on_monitor() .AND. ndim .GE. 2 ) THEN
         IF      ( typesize .EQ. RWORDSIZE ) THEN							         IF      ( typesize .EQ. RWORDSIZE ) THEN
           CALL outbuf_2_patch_r ( globbuf , tmpbuf FRSTELEM ,    &					           CALL outbuf_2_patch_r ( globbuf , tmpbuf FRSTELEM ,    &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &					                                   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3 , &					                                   MS1, ME1, MS2, ME2, MS3, ME3 , &
                                   GPATCH                         )					                                   GPATCH                         )
         ELSE IF ( typesize .EQ. IWORDSIZE ) THEN							         ELSE IF ( typesize .EQ. IWORDSIZE ) THEN
           CALL outbuf_2_patch_i ( globbuf , tmpbuf FRSTELEM ,    &					           CALL outbuf_2_patch_i ( globbuf , tmpbuf FRSTELEM ,    &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &					                                   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )					                                   GPATCH                         )
         ELSE IF ( typesize .EQ. DWORDSIZE ) THEN							         ELSE IF ( typesize .EQ. DWORDSIZE ) THEN
           CALL outbuf_2_patch_d ( globbuf , tmpbuf FRSTELEM ,    &					           CALL outbuf_2_patch_d ( globbuf , tmpbuf FRSTELEM ,    &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &					                                   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )					                                   GPATCH                         )
         ELSE IF ( typesize .EQ. LWORDSIZE ) THEN							         ELSE IF ( typesize .EQ. LWORDSIZE ) THEN
           CALL outbuf_2_patch_l ( globbuf , tmpbuf FRSTELEM ,    &					           CALL outbuf_2_patch_l ( globbuf , tmpbuf FRSTELEM ,    &
                                   DS1, DE1, DS2, DE2, DS3, DE3 , &					                                   DS1, DE1, DS2, DE2, DS3, DE3 , &
                                   GPATCH                         )					                                   GPATCH                         )
         END IF												         ENDIF
       END IF												       ENDIF

       CALL dist_on_comm0 (  local_communicator , typesize ,  &						       CALL dist_on_comm0 (  local_communicator , typesize ,  &
                             tmpbuf FRSTELEM , (de1-ds1+1)*(de2-ds2+1)*(de3-ds3+1) , &			                             tmpbuf FRSTELEM , (de1-ds1+1)*(de2-ds2+1)*(de3-ds3+1) , &
                             locbuf    , (pe1-ps1+1)*(pe2-ps2+1)*(pe3-ps3+1) )				                             locbuf    , (pe1-ps1+1)*(pe2-ps2+1)*(pe3-ps3+1) )

       IF      ( typesize .EQ. RWORDSIZE ) THEN								       IF      ( typesize .EQ. RWORDSIZE ) THEN
         CALL all_sub_r ( locbuf , buf ,             &							         CALL all_sub_r ( locbuf , buf ,             &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )

       ELSE IF ( typesize .EQ. IWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. IWORDSIZE ) THEN
         CALL all_sub_i ( locbuf , buf ,             &							         CALL all_sub_i ( locbuf , buf ,             &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       ELSE IF ( typesize .EQ. DWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. DWORDSIZE ) THEN
         CALL all_sub_d ( locbuf , buf ,             &							         CALL all_sub_d ( locbuf , buf ,             &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       ELSE IF ( typesize .EQ. LWORDSIZE ) THEN								       ELSE IF ( typesize .EQ. LWORDSIZE ) THEN
         CALL all_sub_l ( locbuf , buf ,             &							         CALL all_sub_l ( locbuf , buf ,             &
                                   PS1, PE1, PS2, PE2, PS3, PE3 , &					                                   PS1, PE1, PS2, PE2, PS3, PE3 , &
                                   MS1, ME1, MS2, ME2, MS3, ME3   )					                                   MS1, ME1, MS2, ME2, MS3, ME3   )
       END IF												       ENDIF


       DEALLOCATE ( tmpbuf )										       DEALLOCATE ( tmpbuf )
#endif													#endif
       RETURN												       RETURN
    END SUBROUTINE wrf_global_to_patch_generic								    END SUBROUTINE wrf_global_to_patch_generic

  SUBROUTINE all_sub_i ( inbuf , outbuf,              &							  SUBROUTINE all_sub_i ( inbuf , outbuf,              &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER    , DIMENSION(*) , INTENT(IN) :: inbuf							    INTEGER    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    INTEGER    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf				    INTEGER    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2											        DO j = PS2, PE2
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( i, j, k )  = inbuf ( icurs )							            outbuf( i, j, k )  = inbuf ( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE all_sub_i										  END SUBROUTINE all_sub_i

  SUBROUTINE all_sub_r ( inbuf , outbuf,              &							  SUBROUTINE all_sub_r ( inbuf , outbuf,              &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    REAL       , DIMENSION(*) , INTENT(IN) :: inbuf							    REAL       , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    REAL       , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf				    REAL       , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2											        DO j = PS2, PE2
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( i, j, k )  = inbuf ( icurs )							            outbuf( i, j, k )  = inbuf ( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO

    RETURN												    RETURN
  END SUBROUTINE all_sub_r										  END SUBROUTINE all_sub_r

  SUBROUTINE all_sub_d ( inbuf , outbuf,              &							  SUBROUTINE all_sub_d ( inbuf , outbuf,              &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    DOUBLE PRECISION    , DIMENSION(*) , INTENT(IN) :: inbuf						    DOUBLE PRECISION    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    DOUBLE PRECISION    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf			    DOUBLE PRECISION    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2											        DO j = PS2, PE2
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( i, j, k )  = inbuf ( icurs )							            outbuf( i, j, k )  = inbuf ( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE all_sub_d										  END SUBROUTINE all_sub_d

  SUBROUTINE all_sub_l ( inbuf , outbuf,              &							  SUBROUTINE all_sub_l ( inbuf , outbuf,              &
                               PS1,PE1,PS2,PE2,PS3,PE3,  &						                               PS1,PE1,PS2,PE2,PS3,PE3,  &
                               MS1,ME1,MS2,ME2,MS3,ME3   )						                               MS1,ME1,MS2,ME2,MS3,ME3   )
    IMPLICIT NONE											    IMPLICIT NONE
    LOGICAL    , DIMENSION(*) , INTENT(IN) :: inbuf							    LOGICAL    , DIMENSION(*) , INTENT(IN) :: inbuf
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3									    INTEGER   PS1,PE1,PS2,PE2,PS3,PE3
    LOGICAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf				    LOGICAL    , DIMENSION( MS1:ME1,MS2:ME2,MS3:ME3 ) , INTENT(OUT) :: outbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
      DO k = PS3, PE3											      DO k = PS3, PE3
        DO j = PS2, PE2											        DO j = PS2, PE2
          DO i = PS1, PE1										          DO i = PS1, PE1
            outbuf( i, j, k )  = inbuf ( icurs )							            outbuf( i, j, k )  = inbuf ( icurs )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    RETURN												    RETURN
  END SUBROUTINE all_sub_l										  END SUBROUTINE all_sub_l

  SUBROUTINE outbuf_2_patch_r( inbuf, outbuf,         &							  SUBROUTINE outbuf_2_patch_r( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3, &						                               DS1,DE1,DS2,DE2,DS3,DE3, &
                               MS1, ME1, MS2, ME2, MS3, ME3 , &						                               MS1, ME1, MS2, ME2, MS3, ME3 , &
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    REAL    , DIMENSION(*) , INTENT(OUT) :: outbuf							    REAL    , DIMENSION(*) , INTENT(OUT) :: outbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3									    INTEGER   MS1,ME1,MS2,ME2,MS3,ME3
    REAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf				    REAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs

    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( icurs ) = inbuf( i,j,k )								            outbuf( icurs ) = inbuf( i,j,k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE outbuf_2_patch_r									  END SUBROUTINE outbuf_2_patch_r

  SUBROUTINE outbuf_2_patch_i( inbuf, outbuf,         &							  SUBROUTINE outbuf_2_patch_i( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    INTEGER    , DIMENSION(*) , INTENT(OUT) :: outbuf							    INTEGER    , DIMENSION(*) , INTENT(OUT) :: outbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    INTEGER    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf				    INTEGER    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( icurs ) = inbuf( i,j,k )								            outbuf( icurs ) = inbuf( i,j,k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE outbuf_2_patch_i									  END SUBROUTINE outbuf_2_patch_i

  SUBROUTINE outbuf_2_patch_d( inbuf, outbuf,         &							  SUBROUTINE outbuf_2_patch_d( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    DOUBLE PRECISION    , DIMENSION(*) , INTENT(OUT) :: outbuf						    DOUBLE PRECISION    , DIMENSION(*) , INTENT(OUT) :: outbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    DOUBLE PRECISION    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf			    DOUBLE PRECISION    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( icurs ) = inbuf( i,j,k )								            outbuf( icurs ) = inbuf( i,j,k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE outbuf_2_patch_d									  END SUBROUTINE outbuf_2_patch_d

  SUBROUTINE outbuf_2_patch_l( inbuf, outbuf,         &							  SUBROUTINE outbuf_2_patch_l( inbuf, outbuf,         &
                               DS1,DE1,DS2,DE2,DS3,DE3,&						                               DS1,DE1,DS2,DE2,DS3,DE3,&
                               GPATCH )									                               GPATCH )
    USE module_dm, ONLY : ntasks									    USE module_dm, ONLY : ntasks
    IMPLICIT NONE											    IMPLICIT NONE
    LOGICAL    , DIMENSION(*) , INTENT(OUT) :: outbuf							    LOGICAL    , DIMENSION(*) , INTENT(OUT) :: outbuf
    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)						    INTEGER   DS1,DE1,DS2,DE2,DS3,DE3,GPATCH(3,2,ntasks)
    LOGICAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf				    LOGICAL    , DIMENSION( DS1:DE1,DS2:DE2,DS3:DE3 ) , INTENT(IN) :: inbuf
! Local													! Local
    INTEGER               :: i,j,k,n   ,  icurs								    INTEGER               :: i,j,k,n   ,  icurs
    icurs = 1												    icurs = 1
    DO n = 1, ntasks											    DO n = 1, ntasks
      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )								      DO k = GPATCH( 3,1,n ), GPATCH( 3,2,n )
        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )								        DO j = GPATCH( 2,1,n ), GPATCH( 2,2,n )
          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )							          DO i = GPATCH( 1,1,n ), GPATCH( 1,2,n )
            outbuf( icurs ) = inbuf( i,j,k )								            outbuf( icurs ) = inbuf( i,j,k )
            icurs = icurs + 1										            icurs = icurs + 1
          END DO											          ENDDO
        END DO												        ENDDO
      END DO												      ENDDO
    END DO												    ENDDO
    RETURN												    RETURN
  END SUBROUTINE outbuf_2_patch_l									  END SUBROUTINE outbuf_2_patch_l


  SUBROUTINE wrf_dm_nestexchange_init								   <
      CALL rsl_lite_nesting_reset								   <
  END SUBROUTINE wrf_dm_nestexchange_init							   <
												   <

!------------------------------------------------------------------					!------------------------------------------------------------------

#if ( EM_CORE == 1 && DA_CORE != 1 )									#if ( EM_CORE == 1 && DA_CORE != 1 )

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE force_domain_em_part2 ( grid, ngrid, pgrid, config_flags    &				   SUBROUTINE force_domain_em_part2 ( grid, ngrid, pgrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, local_communicator, mytask, &		   |	      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, local_communicator, mytask
                            nest_pes_x, nest_pes_y ! ,                                 &	   <
                            !push_communicators_for_domain,pop_communicators_for_domain		   <
      USE module_comm_nesting_dm, ONLY : halo_force_down_sub						      USE module_comm_nesting_dm, ONLY : halo_force_down_sub
      USE module_model_constants								   <
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
      TYPE(domain), POINTER :: pgrid         !KAL added for vertical nesting				      TYPE(domain), POINTER :: pgrid         !KAL added for vertical nesting
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k,kk						   |	      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe
      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7,itrace						      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7,itrace
      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye							      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye

      !KAL variables for vertical nesting								      !KAL variables for vertical nesting
      REAL :: p_top_m  , p_surf_m , mu_m , hsca_m , pre_c ,pre_n					      REAL :: p_top_m  , p_surf_m , mu_m , hsca_m , pre_c ,pre_n
      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert) :: alt_w_c						      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert) :: alt_w_c
      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert+1) :: alt_u_c						      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert+1) :: alt_u_c
      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert) :: alt_w_n						      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert) :: alt_w_n
      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert+1) :: alt_u_n      					      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert+1) :: alt_u_n      
      
      REAL, DIMENSION(:,:,:), ALLOCATABLE :: p, al						   <
      REAL :: pfu, pfd, phm, temp, qvf, qvf1, qvf2    						   <
												   <
      !KAL change this for vertical nesting								      !KAL change this for vertical nesting
      ! force_domain_em_part1 packs up the interpolation onto the coarse (vertical) grid		      ! force_domain_em_part1 packs up the interpolation onto the coarse (vertical) grid
      ! therefore the message size is based on the coarse grid number of levels				      ! therefore the message size is based on the coarse grid number of levels
      ! here it is unpacked onto the intermediate grid							      ! here it is unpacked onto the intermediate grid
      CALL get_ijk_from_grid (  pgrid ,                   &						      CALL get_ijk_from_grid (  pgrid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
                                									      				
      !KAL this is the original WRF code                                				      !KAL this is the original WRF code				
      !CALL get_ijk_from_grid (  grid ,                   &						      !CALL get_ijk_from_grid (  grid ,                   &
      !                          cids, cide, cjds, cjde, ckds, ckde,    &				      !                          cids, cide, cjds, cjde, ckds, ckde,    &
      !                          cims, cime, cjms, cjme, ckms, ckme,    &				      !                          cims, cime, cjms, cjme, ckms, ckme,    &
      !                          cips, cipe, cjps, cjpe, ckps, ckpe    )				      !                          cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

#include "nest_interpdown_unpack.inc"									#include "nest_interpdown_unpack.inc"

if (ngrid%vert_refine_method .NE. 0) then								if (ngrid%vert_refine_method .NE. 0) then

      !KAL calculating the vertical coordinate for parent and nest grid (code from ndown)		      !KAL calculating the vertical coordinate for parent and nest grid (code from ndown)
      ! assume that the parent and nest have the same p_top value (as in ndown) 			      ! assume that the parent and nest have the same p_top value (as in ndown)	
      													      
!KAL ckde is equal to e_vert of the coarse grid. There are e_vert-1 u points.  The coarse 1D gri	!KAL ckde is equal to e_vert of the coarse grid. There are e_vert-1 u points.  The coarse 1D gri
!    so it is the e_vert-1 points from the coarse grid, plus a surface point plus a top point.  	!    so it is the e_vert-1 points from the coarse grid, plus a surface point plus a top point.  
!    are used to get the surface and top points to fill out the pro_u_c 1D array of u values fro	!    are used to get the surface and top points to fill out the pro_u_c 1D array of u values fro
                											  		
      hsca_m = 6.7 !KAL scale height of the atmosphere							      hsca_m = 6.7 !KAL scale height of the atmosphere
      p_top_m = ngrid%p_top										      p_top_m = ngrid%p_top
      p_surf_m = 1.e5											      p_surf_m = 1.e5
      mu_m = p_surf_m - p_top_m										      mu_m = p_surf_m - p_top_m
!    parent												!    parent
      do  k = 1,ckde											      do  k = 1,ckde
#if  !( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%znw(k) + p_top_m								      pre_c = mu_m * pgrid%znw(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%c3f(k) + p_top_m + pgrid%c4f(k)					   <
#endif												   <
      alt_w_c(k) =  -hsca_m * alog(pre_c/p_surf_m)							      alt_w_c(k) =  -hsca_m * alog(pre_c/p_surf_m)
      enddo   												      enddo   
      do  k = 1,ckde-1											      do  k = 1,ckde-1
#if  !( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%znu(k) + p_top_m								      pre_c = mu_m * pgrid%znu(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%c3h(k) + p_top_m + pgrid%c4h(k)					   <
#endif												   <
      alt_u_c(k+1) =  -hsca_m * alog(pre_c/p_surf_m)							      alt_u_c(k+1) =  -hsca_m * alog(pre_c/p_surf_m)
      enddo												      enddo
      alt_u_c(1) =  alt_w_c(1) 										      alt_u_c(1) =  alt_w_c(1) 
      alt_u_c(ckde+1) =  alt_w_c(ckde)       								      alt_u_c(ckde+1) =  alt_w_c(ckde)       
!    nest												!    nest
      do  k = 1,nkde											      do  k = 1,nkde
#if  !( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%znw(k) + p_top_m								      pre_n = mu_m * ngrid%znw(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%c3f(k) + p_top_m + ngrid%c4f(k)					   <
#endif												   <
      alt_w_n(k) =  -hsca_m * alog(pre_n/p_surf_m)							      alt_w_n(k) =  -hsca_m * alog(pre_n/p_surf_m)
      enddo												      enddo
      do  k = 1,nkde-1											      do  k = 1,nkde-1
#if  !( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%znu(k) + p_top_m								      pre_n = mu_m * ngrid%znu(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%c3h(k) + p_top_m + ngrid%c4h(k)					   <
#endif												   <
      alt_u_n(k+1) =  -hsca_m * alog(pre_n/p_surf_m)							      alt_u_n(k+1) =  -hsca_m * alog(pre_n/p_surf_m)
      enddo												      enddo
      alt_u_n(1) =  alt_w_n(1)										      alt_u_n(1) =  alt_w_n(1)
      alt_u_n(nkde+1) =  alt_w_n(nkde)									      alt_u_n(nkde+1) =  alt_w_n(nkde)
        												        
endif   												endif   

      !KAL added this call for vertical nesting (return coarse grid dimensions to intended value	      !KAL added this call for vertical nesting (return coarse grid dimensions to intended value
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
                                                      										 			      
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

      !  Vertical refinement is turned on.							   <
												   <
      IF (ngrid%vert_refine_method .NE. 0) THEN								if (ngrid%vert_refine_method .NE. 0) then
      													      
												   >	!KAL added this code (the include file) for the vertical nesting
#include "nest_forcedown_interp_vert.inc"								#include "nest_forcedown_interp_vert.inc"

         IF ( ngrid%this_is_an_ideal_run ) THEN 						   <
            IF ( SIZE( grid%t_init, 1 ) * SIZE( grid%t_init, 3 ) .GT. 1 ) THEN 			   <
               CALL vert_interp_vert_nesting( grid%t_init, & !CD field				   <
                                              ids, ide, kds, kde, jds, jde, & !CD dims		   <
                                              ims, ime, kms, kme, jms, jme, & !CD dims		   <
                                              ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe, & !C   <
                                              pgrid%s_vert, pgrid%e_vert, & !vertical dimension    <
                                              pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%   <
                                              alt_u_c, alt_u_n ) !coordinates for parent and nes   <
            END IF  ! Check t_init is a fully allocated 3d array.				   <
         END IF ! only for ideal runs								   <
												   <
												   <
         !  Rebalance the grid on the intermediate grid.  The intermediate grid has the horizont   <
         !  resolution of the parent grid, but at this point has been interpolated in the vertic   <
         !  to the resolution of the nest.  The base state (phb, pb, etc) from the parent grid i   <
         !  unpacked onto the intermediate grid every time this subroutine is called.  We need t   <
         !  base state of the nest, so it is recalculated here.  				   <
												   <
         !  Additionally, we do not need to vertically interpolate the entire intermediate grid    <
         !  above, just the points that contribute to the boundary forcing.			   <
												   <
         !  Base state potential temperature and inverse density (alpha = 1/rho) from		   <
         !  the half eta levels and the base-profile surface pressure.  Compute 1/rho		   <
         !  from equation of state.  The potential temperature is a perturbation from t0.	   <
      												   <
         !  Uncouple the variables moist and t_2 that are used to calculate ph_2		   <
												   <
         DO j = MAX(jds,jps),MIN(jde-1,jpe)							   <
            DO i = MAX(ids,ips),MIN(ide-1,ipe)							   <
               DO k=kds,kde-1									   <
                  grid%t_2(i,k,j) = grid%t_2(i,k,j)/(grid%mub(i,j) + grid%mu_2(i,j))		   <
                  moist(i,k,j,P_QV) = moist(i,k,j,P_QV)/(grid%mub(i,j) + grid%mu_2(i,j))	   <
               END DO										   <
            END DO										   <
         END DO											   <
    												   <
         DO j = MAX(jds,jps),MIN(jde-1,jpe)							   <
            DO i = MAX(ids,ips),MIN(ide-1,ipe)							   <
												   <
               DO k = 1, kpe-1									   <
#if  !( HYBRID_COORD==1 )									   <
                  grid%pb(i,k,j) = ngrid%znu(k)*grid%mub(i,j)+ngrid%p_top			   <
#elif ( HYBRID_COORD==1 )									   <
                  grid%pb(i,k,j) = ngrid%c3h(k)*grid%mub(i,j) + ngrid%c4h(k) + ngrid%p_top	   <
#endif												   <
             											   <
                  !  If this is a real run, recalc t_init.					   <
   												   <
                  IF ( .NOT. ngrid%this_is_an_ideal_run ) THEN					   <
                     temp = MAX ( ngrid%tiso, ngrid%t00 + ngrid%tlp*LOG(grid%pb(i,k,j)/ngrid%p00   <
                     IF ( grid%pb(i,k,j) .LT. ngrid%p_strat ) THEN				   <
                        temp = ngrid%tiso + ngrid%tlp_strat * LOG ( grid%pb(i,k,j)/ngrid%p_strat   <
                     END IF									   <
                     grid%t_init(i,k,j) = temp*(ngrid%p00/grid%pb(i,k,j))**(r_d/cp) - t0	   <
                  END IF									   <
                  grid%alb(i,k,j) = (r_d/p1000mb)*(grid%t_init(i,k,j)+t0)*(grid%pb(i,k,j)/p1000m   <
               END DO										   <
   												   <
               !  Integrate base geopotential, starting at terrain elevation.  This assures that   <
               !  the base state is in exact hydrostatic balance with respect to the model equat   <
               !  This field is on full levels.							   <
   												   <
               grid%phb(i,1,j) = grid%ht(i,j) * g						   <
               IF (grid%hypsometric_opt == 1) THEN						   <
                  DO kk = 2,kpe									   <
                     k = kk - 1									   <
                     grid%phb(i,kk,j) = grid%phb(i,k,j) - ngrid%dnw(k)*grid%mub(i,j)*grid%alb(i,   <
                  END DO									   <
               ELSE IF (grid%hypsometric_opt == 2) THEN						   <
                  DO k = 2,kpe									   <
#if  !( HYBRID_COORD==1 )									   <
                     pfu = grid%mub(i,j)*ngrid%znw(k)   + ngrid%p_top				   <
                     pfd = grid%mub(i,j)*ngrid%znw(k-1) + ngrid%p_top				   <
                     phm = grid%mub(i,j)*ngrid%znu(k-1) + ngrid%p_top				   <
#elif ( HYBRID_COORD==1 )									   <
                     pfu = ngrid%c3f(k  )*grid%MUB(i,j) + ngrid%c4f(k  ) + ngrid%p_top		   <
                     pfd = ngrid%c3f(k-1)*grid%MUB(i,j) + ngrid%c4f(k-1) + ngrid%p_top		   <
                     phm = ngrid%c3h(k-1)*grid%MUB(i,j) + ngrid%c4h(k-1) + ngrid%p_top		   <
#endif												   <
                     grid%phb(i,k,j) = grid%phb(i,k-1,j) + grid%alb(i,k-1,j)*phm*LOG(pfd/pfu)	   <
                  END DO									   <
               ELSE										   <
                  CALL wrf_error_fatal( 'module_dm: hypsometric_opt should be 1 or 2' )		   <
               END IF  ! which hypsometric option						   <
            END DO  ! i loop									   <
         END DO  ! j loop									   <
												   <
         !  Perturbation fields									   <
												   <
         ALLOCATE( p (ips:ipe, kps:kpe, jps:jpe) )						   <
         ALLOCATE( al(ips:ipe, kps:kpe, jps:jpe) )						   <
												   <
         DO j = MAX(jds,jps),MIN(jde-1,jpe)							   <
            DO i = MAX(ids,ips),MIN(ide-1,ipe)							   <
												   <
               !  Integrate the hydrostatic equation (from the RHS of the bigstep vertical momen   <
               !  equation) down from the top to get the pressure perturbation.  First get the p   <
               !  perturbation, moisture, and inverse density (total and perturbation) at the to   <
      												   <
               kk = kpe-1									   <
               k = kk+1										   <
      												   <
               qvf1 = 0.5*(moist(i,kk,j,P_QV)+moist(i,kk,j,P_QV))				   <
               qvf2 = 1./(1.+qvf1)								   <
               qvf1 = qvf1*qvf2									   <
      												   <
               p(i,kk,j) = - 0.5*(grid%Mu_2(i,j)+qvf1*grid%Mub(i,j))/ngrid%rdnw(kk)/qvf2	   <
               qvf = 1. + rvovrd*moist(i,kk,j,P_QV)						   <
               al(i,kk,j) = (r_d/p1000mb)*(grid%t_2(i,kk,j)+t0)*qvf* &				   <
                           (((p(i,kk,j)+grid%pb(i,kk,j))/p1000mb)**cvpm) - grid%alb(i,kk,j)	   <
      												   <
               !  Now, integrate down the column to compute the pressure perturbation, and diagn   <
               !  inverse density fields (total and perturbation).				   <
      												   <
               DO kk=kpe-2,1,-1									   <
                  k = kk + 1									   <
                  qvf1 = 0.5*(moist(i,kk,j,P_QV)+moist(i,kk+1,j,P_QV))				   <
                  qvf2 = 1./(1.+qvf1)								   <
                  qvf1 = qvf1*qvf2								   <
                  p(i,kk,j) = p(i,kk+1,j) - (grid%Mu_2(i,j) + qvf1*grid%Mub(i,j))/qvf2/ngrid%rdn   <
                  qvf = 1. + rvovrd*moist(i,kk,j,P_QV)						   <
                  al(i,kk,j) = (r_d/p1000mb)*(grid%t_2(i,kk,j)+t0)*qvf* &			   <
                              (((p(i,kk,j)+grid%pb(i,kk,j))/p1000mb)**cvpm) - grid%alb(i,kk,j)	   <
               END DO										   <
      												   <
               !  This is the hydrostatic equation used in the model after the small timesteps.    <
               !  the model, grid%al (inverse density) is computed from the geopotential.	   <
      												   <
               IF (grid%hypsometric_opt == 1) THEN						   <
                  DO kk = 2,kpe									   <
                     k = kk - 1									   <
                     grid%ph_2(i,kk,j) = grid%ph_2(i,kk-1,j) - &				   <
                                        ngrid%dnw(kk-1) * ( (grid%mub(i,j)+grid%mu_2(i,j))*al(i,   <
                                        + grid%mu_2(i,j)*grid%alb(i,kk-1,j) )			   <
                  END DO									   <
      												   <
               ! Alternative hydrostatic eq.: dZ = -al*p*dLOG(p), where p is dry pressure.	   <
               ! Note that al*p approximates Rd*T and dLOG(p) does z.				   <
               ! Here T varies mostly linear with z, the first-order integration produces better   <
      												   <
               ELSE IF (grid%hypsometric_opt == 2) THEN						   <
      												   <
                  grid%ph_2(i,1,j) = grid%phb(i,1,j)						   <
                  DO k = 2,kpe									   <
#if  !( HYBRID_COORD==1 )									   <
                     pfu = ( grid%mub(i,j)+grid%mu_2(i,j))*ngrid%znw(k)   + ngrid%p_top		   <
                     pfd = ( grid%mub(i,j)+grid%mu_2(i,j))*ngrid%znw(k-1) + ngrid%p_top		   <
                     phm = ( grid%mub(i,j)+grid%mu_2(i,j))*ngrid%znu(k-1) + ngrid%p_top		   <
#elif ( HYBRID_COORD==1 )									   <
                     pfu = ngrid%c3f(k  )*( grid%MUB(i,j)+grid%MU_2(i,j) ) + ngrid%c4f(k  ) + ng   <
                     pfd = ngrid%c3f(k-1)*( grid%MUB(i,j)+grid%MU_2(i,j) ) + ngrid%c4f(k-1) + ng   <
                     phm = ngrid%c3h(k-1)*( grid%MUB(i,j)+grid%MU_2(i,j) ) + ngrid%c4h(k-1) + ng   <
#endif												   <
                     grid%ph_2(i,k,j) = grid%ph_2(i,k-1,j) + (grid%alb(i,k-1,j)+al(i,k-1,j))*phm   <
                  END DO									   <
      												   <
                  DO k = 1,kpe									   <
                     grid%ph_2(i,k,j) = grid%ph_2(i,k,j) - grid%phb(i,k,j)			   <
                  END DO									   <
      												   <
               END IF										   <
												   <
            END DO ! i loop									   <
         END DO ! j loop									   <
												   <
         DEALLOCATE(p)										   <
         DEALLOCATE(al)										   <
      												   <
         ! Couple the variables moist and t_2, and the newly calculated ph_2			   <
         DO j = MAX(jds,jps),MIN(jde-1,jpe)							   <
            DO i = MAX(ids,ips),MIN(ide-1,ipe)							   <
               DO k=kps,kpe									   <
               grid%ph_2(i,k,j) = grid%ph_2(i,k,j)*(grid%Mub(i,j) + grid%Mu_2(i,j))		   <
               END DO										   <
            END DO										   <
         END DO											   <
         DO j = MAX(jds,jps),MIN(jde-1,jpe)							   <
            DO i = MAX(ids,ips),MIN(ide-1,ipe)							   <
               DO k=kps,kpe-1									   <
               grid%t_2(i,k,j) = grid%t_2(i,k,j)*(grid%mub(i,j) + grid%mu_2(i,j))		   <
               moist(i,k,j,P_QV) = moist(i,k,j,P_QV)*(grid%mub(i,j) + grid%mu_2(i,j))		   <
               END DO										   <
            END DO										   <
         END DO											   <
												   <
												   <
      END IF												endif
                               													       

#include "HALO_FORCE_DOWN.inc"										#include "HALO_FORCE_DOWN.inc"

      ! code here to interpolate the data into the nested domain					      ! code here to interpolate the data into the nested domain
#  include "nest_forcedown_interp.inc"									#  include "nest_forcedown_interp.inc"

      RETURN												      RETURN
   END SUBROUTINE force_domain_em_part2									   END SUBROUTINE force_domain_em_part2

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE interp_domain_em_part1 ( grid, intermediate_grid, ngrid, config_flags    &		   SUBROUTINE interp_domain_em_part1 ( grid, intermediate_grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &			      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &
                            nest_task_offsets, nest_pes_x, nest_pes_y, which_kid,   &		   <
                            intercomm_active, mpi_comm_to_kid, mpi_comm_to_mom,     &		   <
                            mytask, get_dm_max_halo_width						                            mytask, get_dm_max_halo_width
      USE module_timing											      USE module_timing
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      INTEGER iparstrt,jparstrt,sw									      INTEGER iparstrt,jparstrt,sw
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &				      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe					                                iips, iipe, ijps, ijpe, ikps, ikpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr 							      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr 
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width
      INTEGER local_comm, myproc, nproc									      INTEGER local_comm, myproc, nproc
      INTEGER ioffset, ierr									   <

      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )

      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  intermediate_grid ,              &					      CALL get_ijk_from_grid (  intermediate_grid ,              &
                                iids, iide, ijds, ijde, ikds, ikde,    &				                                iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe    )					                                iips, iipe, ijps, ijpe, ikps, ikpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )							      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )
      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt - sw										      icoord =    iparstrt - sw
      jcoord =    jparstrt - sw										      jcoord =    jparstrt - sw
      idim_cd = iide - iids + 1										      idim_cd = iide - iids + 1
      jdim_cd = ijde - ijds + 1										      jdim_cd = ijde - ijds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      ! get max_halo_width for parent. It may be smaller if it is moad					      ! get max_halo_width for parent. It may be smaller if it is moad
      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )

      IF ( grid%active_this_task ) THEN								   <
#include "nest_interpdown_pack.inc"									#include "nest_interpdown_pack.inc"
      END IF 											   <

      ! determine which communicator and offset to use 						   |	      CALL rsl_lite_bcast_msgs( myproc, nproc, local_comm )
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   <
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id ) 				   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest 				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
      IF ( grid%active_this_task .OR. ngrid%active_this_task ) THEN				   <
#ifndef STUBMPI											   <
        CALL mpi_comm_rank(local_comm,myproc,ierr)						   <
        CALL mpi_comm_size(local_comm,nproc,ierr)						   <
#endif												   <
        CALL rsl_lite_bcast_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   <
                                          nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       & 	   <
                                          ioffset, local_comm )					   <
      END IF											   <

      RETURN												      RETURN
   END SUBROUTINE interp_domain_em_part1								   END SUBROUTINE interp_domain_em_part1

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE interp_domain_em_part2 ( grid, ngrid, pgrid, config_flags    &				   SUBROUTINE interp_domain_em_part2 ( grid, ngrid, pgrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &			      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &
                            mytask, get_dm_max_halo_width, which_kid				   |	                            mytask, get_dm_max_halo_width
                            ! push_communicators_for_domain,pop_communicators_for_domain	   <
      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
      TYPE(domain), POINTER :: pgrid         !KAL added for vertical nesting				      TYPE(domain), POINTER :: pgrid         !KAL added for vertical nesting
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER myproc											      INTEGER myproc
      INTEGER ierr											      INTEGER ierr
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width

      !KAL variables for vertical nesting								      !KAL variables for vertical nesting
      REAL :: p_top_m  , p_surf_m , mu_m , hsca_m , pre_c ,pre_n					      REAL :: p_top_m  , p_surf_m , mu_m , hsca_m , pre_c ,pre_n
      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert) :: alt_w_c						      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert) :: alt_w_c
      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert+1) :: alt_u_c						      REAL, DIMENSION(pgrid%s_vert:pgrid%e_vert+1) :: alt_u_c
      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert) :: alt_w_n						      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert) :: alt_w_n
      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert+1) :: alt_u_n 						      REAL, DIMENSION(ngrid%s_vert:ngrid%e_vert+1) :: alt_u_n 


      !KAL change this for vertical nesting								      !KAL change this for vertical nesting
      ! interp_domain_em_part1 packs up the interpolation onto the coarse (vertical) grid		      ! interp_domain_em_part1 packs up the interpolation onto the coarse (vertical) grid
      ! therefore the message size is based on the coarse grid number of levels				      ! therefore the message size is based on the coarse grid number of levels
      ! here it is unpacked onto the intermediate grid							      ! here it is unpacked onto the intermediate grid
       CALL get_ijk_from_grid ( pgrid ,                   &						       CALL get_ijk_from_grid ( pgrid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      !KAL this is the original WRF code								      !KAL this is the original WRF code
      !CALL get_ijk_from_grid (  grid ,                   &						      !CALL get_ijk_from_grid (  grid ,                   &
      !                          cids, cide, cjds, cjde, ckds, ckde,    &				      !                          cids, cide, cjds, cjde, ckds, ckde,    &
      !                          cims, cime, cjms, cjme, ckms, ckme,    &				      !                          cims, cime, cjms, cjme, ckms, ckme,    &
      !                          cips, cipe, cjps, cjpe, ckps, ckpe    )				      !                          cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      nlev  = ckde - ckds + 1 										      nlev  = ckde - ckds + 1 

      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )

#include "nest_interpdown_unpack.inc"									#include "nest_interpdown_unpack.inc"


if (ngrid%vert_refine_method .NE. 0) then								if (ngrid%vert_refine_method .NE. 0) then

      !KAL calculating the vertical coordinate for parent and nest grid (code from ndown)		      !KAL calculating the vertical coordinate for parent and nest grid (code from ndown)
      ! assume that the parent and nest have the same p_top value (as in ndown) 			      ! assume that the parent and nest have the same p_top value (as in ndown)	
      													      
!KAL ckde is equal to e_vert of the coarse grid. There are e_vert-1 u points.  The coarse 1D gri	!KAL ckde is equal to e_vert of the coarse grid. There are e_vert-1 u points.  The coarse 1D gri
!    so it is the e_vert-1 points from the coarse grid, plus a surface point plus a top point.  	!    so it is the e_vert-1 points from the coarse grid, plus a surface point plus a top point.  
!    are used to get the surface and top points to fill out the pro_u_c 1D array of u values fro	!    are used to get the surface and top points to fill out the pro_u_c 1D array of u values fro
                											  		
      hsca_m = 6.7 !KAL scale height of the atmosphere							      hsca_m = 6.7 !KAL scale height of the atmosphere
      p_top_m = ngrid%p_top										      p_top_m = ngrid%p_top
      p_surf_m = 1.e5											      p_surf_m = 1.e5
      mu_m = p_surf_m - p_top_m										      mu_m = p_surf_m - p_top_m
!    parent												!    parent
      do  k = 1,ckde											      do  k = 1,ckde
#if  !( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%znw(k) + p_top_m								      pre_c = mu_m * pgrid%znw(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%c3f(k) + p_top_m + pgrid%c4f(k)					   <
#endif												   <
      alt_w_c(k) =  -hsca_m * alog(pre_c/p_surf_m)							      alt_w_c(k) =  -hsca_m * alog(pre_c/p_surf_m)
      enddo   												      enddo   
      do  k = 1,ckde-1											      do  k = 1,ckde-1
#if  !( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%znu(k) + p_top_m								      pre_c = mu_m * pgrid%znu(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_c = mu_m * pgrid%c3h(k) + p_top_m + pgrid%c4h(k)					   <
#endif												   <
      alt_u_c(k+1) =  -hsca_m * alog(pre_c/p_surf_m)							      alt_u_c(k+1) =  -hsca_m * alog(pre_c/p_surf_m)
      enddo												      enddo
      alt_u_c(1) =  alt_w_c(1) 										      alt_u_c(1) =  alt_w_c(1) 
      alt_u_c(ckde+1) =  alt_w_c(ckde)       								      alt_u_c(ckde+1) =  alt_w_c(ckde)       
!    nest												!    nest
      do  k = 1,nkde											      do  k = 1,nkde
#if  !( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%znw(k) + p_top_m								      pre_n = mu_m * ngrid%znw(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%c3f(k) + p_top_m + ngrid%c4f(k)					   <
#endif												   <
      alt_w_n(k) =  -hsca_m * alog(pre_n/p_surf_m)							      alt_w_n(k) =  -hsca_m * alog(pre_n/p_surf_m)
      enddo												      enddo
      do  k = 1,nkde-1											      do  k = 1,nkde-1
#if  !( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%znu(k) + p_top_m								      pre_n = mu_m * ngrid%znu(k) + p_top_m
#elif ( HYBRID_COORD==1 )									   <
      pre_n = mu_m * ngrid%c3h(k) + p_top_m + ngrid%c4h(k)					   <
#endif												   <
      alt_u_n(k+1) =  -hsca_m * alog(pre_n/p_surf_m)							      alt_u_n(k+1) =  -hsca_m * alog(pre_n/p_surf_m)
      enddo												      enddo
      alt_u_n(1) =  alt_w_n(1)										      alt_u_n(1) =  alt_w_n(1)
      alt_u_n(nkde+1) =  alt_w_n(nkde)									      alt_u_n(nkde+1) =  alt_w_n(nkde)
endif   												endif   



      !KAL added this call for vertical nesting (return coarse grid dimensions to intended value	      !KAL added this call for vertical nesting (return coarse grid dimensions to intended value
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )

      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )


if (ngrid%vert_refine_method .NE. 0) then								if (ngrid%vert_refine_method .NE. 0) then
      													      
!KAL added this code (the include file) for the vertical nesting					!KAL added this code (the include file) for the vertical nesting
#include "nest_interpdown_interp_vert.inc"								#include "nest_interpdown_interp_vert.inc"


      !KAL finish off the 1-D variables (t_base, u_base, v_base, qv_base, and z_base) (move this	      !KAL finish off the 1-D variables (t_base, u_base, v_base, qv_base, and z_base) (move this
      CALL vert_interp_vert_nesting_1d ( &         							      CALL vert_interp_vert_nesting_1d ( &	   
                                        ngrid%t_base,                                           						ngrid%t_base,					
                                        ids, ide, kds, kde, jds, jde,                           						ids, ide, kds, kde, jds, jde,			
                                        ims, ime, kms, kme, jms, jme,                           						ims, ime, kms, kme, jms, jme,			
                                        ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,           						ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,	
                                        pgrid%s_vert, pgrid%e_vert,                             						pgrid%s_vert, pgrid%e_vert,			
                                        pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 						pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 
                                        alt_u_c, alt_u_n)                                       						alt_u_c, alt_u_n)				
      CALL vert_interp_vert_nesting_1d ( &         							      CALL vert_interp_vert_nesting_1d ( &	   
                                        ngrid%u_base,                                           						ngrid%u_base,					
                                        ids, ide, kds, kde, jds, jde,                           						ids, ide, kds, kde, jds, jde,			
                                        ims, ime, kms, kme, jms, jme,                           						ims, ime, kms, kme, jms, jme,			
                                        ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,           						ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,	
                                        pgrid%s_vert, pgrid%e_vert,                             						pgrid%s_vert, pgrid%e_vert,			
                                        pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 						pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 
                                        alt_u_c, alt_u_n)                                       						alt_u_c, alt_u_n)				
      CALL vert_interp_vert_nesting_1d ( &         							      CALL vert_interp_vert_nesting_1d ( &	   
                                        ngrid%v_base,                                           						ngrid%v_base,					
                                        ids, ide, kds, kde, jds, jde,                           						ids, ide, kds, kde, jds, jde,			
                                        ims, ime, kms, kme, jms, jme,                           						ims, ime, kms, kme, jms, jme,			
                                        ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,           						ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,	
                                        pgrid%s_vert, pgrid%e_vert,                             						pgrid%s_vert, pgrid%e_vert,			
                                        pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 						pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 
                                        alt_u_c, alt_u_n)                                       						alt_u_c, alt_u_n)				
      CALL vert_interp_vert_nesting_1d ( &         							      CALL vert_interp_vert_nesting_1d ( &	   
                                        ngrid%qv_base,                                          						ngrid%qv_base,  				
                                        ids, ide, kds, kde, jds, jde,                           						ids, ide, kds, kde, jds, jde,			
                                        ims, ime, kms, kme, jms, jme,                           						ims, ime, kms, kme, jms, jme,			
                                        ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,           						ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,	
                                        pgrid%s_vert, pgrid%e_vert,                             						pgrid%s_vert, pgrid%e_vert,			
                                        pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 						pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 
                                        alt_u_c, alt_u_n)                                       						alt_u_c, alt_u_n)				
      CALL vert_interp_vert_nesting_1d ( &         							      CALL vert_interp_vert_nesting_1d ( &	   
                                        ngrid%z_base,                                           						ngrid%z_base,					
                                        ids, ide, kds, kde, jds, jde,                           						ids, ide, kds, kde, jds, jde,			
                                        ims, ime, kms, kme, jms, jme,                           						ims, ime, kms, kme, jms, jme,			
                                        ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,           						ips, ipe, kps, MIN( (kde-1), kpe ), jps, jpe,	
                                        pgrid%s_vert, pgrid%e_vert,                             						pgrid%s_vert, pgrid%e_vert,			
                                        pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 						pgrid%cf1, pgrid%cf2, pgrid%cf3, pgrid%cfn, pgrid%cfn1, 
                                        alt_u_c, alt_u_n)                                       						alt_u_c, alt_u_n)				

endif													endif
        													
        CALL push_communicators_for_domain( grid%id )						   <

#include "HALO_INTERP_DOWN.inc"										#include "HALO_INTERP_DOWN.inc"

        CALL pop_communicators_for_domain							   <
												   <
#  include "nest_interpdown_interp.inc"									#  include "nest_interpdown_interp.inc"

      RETURN												      RETURN
   END SUBROUTINE interp_domain_em_part2								   END SUBROUTINE interp_domain_em_part2

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE interp_domain_em_small_part1 ( grid, intermediate_grid, ngrid, config_flags    &		   SUBROUTINE interp_domain_em_small_part1 ( grid, intermediate_grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_comm_dm, ONLY: halo_em_horiz_interp_sub						      USE module_comm_dm, ONLY: halo_em_horiz_interp_sub
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &			      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &
                            mytask, get_dm_max_halo_width,                          &		   |	                            mytask, get_dm_max_halo_width
                            nest_task_offsets, mpi_comm_to_kid, mpi_comm_to_mom,    &		   <
                            which_kid, nest_pes_x, nest_pes_y, intercomm_active			   <
      USE module_timing											      USE module_timing
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      INTEGER iparstrt,jparstrt,sw									      INTEGER iparstrt,jparstrt,sw
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::           ids,  ide,  jds,  jde,  kds,  kde,    &				      INTEGER       ::           ids,  ide,  jds,  jde,  kds,  kde,    &
                                 ims,  ime,  jms,  jme,  kms,  kme,    &				                                 ims,  ime,  jms,  jme,  kms,  kme,    &
                                 ips,  ipe,  jps,  jpe,  kps,  kpe					                                 ips,  ipe,  jps,  jpe,  kps,  kpe

      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &				      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe					                                iips, iipe, ijps, ijpe, ikps, ikpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr 							      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr 
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width
      INTEGER local_comm, myproc, nproc									      INTEGER local_comm, myproc, nproc
      INTEGER ioffset										   <

      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )

      CALL get_ijk_from_grid (  grid ,                           &					      CALL get_ijk_from_grid (  grid ,                           &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe     )					                                ips, ipe, jps, jpe, kps, kpe     )
#ifdef DM_PARALLEL											#ifdef DM_PARALLEL
#  include "HALO_EM_HORIZ_INTERP.inc"									#  include "HALO_EM_HORIZ_INTERP.inc"
#endif													#endif

      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  intermediate_grid ,              &					      CALL get_ijk_from_grid (  intermediate_grid ,              &
                                iids, iide, ijds, ijde, ikds, ikde,    &				                                iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe    )					                                iips, iipe, ijps, ijpe, ikps, ikpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )							      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )
      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt - sw										      icoord =    iparstrt - sw
      jcoord =    jparstrt - sw										      jcoord =    jparstrt - sw
      idim_cd = iide - iids + 1										      idim_cd = iide - iids + 1
      jdim_cd = ijde - ijds + 1										      jdim_cd = ijde - ijds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      ! get max_halo_width for parent. It may be smaller if it is moad					      ! get max_halo_width for parent. It may be smaller if it is moad
      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )

      !  How many 3d arrays, so far just 3d theta-300 and geopotential perturbation,			      !  How many 3d arrays, so far just 3d theta-300 and geopotential perturbation,
      !  and the 2d topo elevation, three max press/temp/height fields, and three			      !  and the 2d topo elevation, three max press/temp/height fields, and three
      !  min press/temp/height fields.									      !  min press/temp/height fields.
   													   
      msize = ( 2 )* nlev + 7										      msize = ( 2 )* nlev + 7
   													   
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_to_child')				!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_to_child')
      CALL rsl_lite_to_child_info( local_communicator, msize*RWORDSIZE     &				      CALL rsl_lite_to_child_info( local_communicator, msize*RWORDSIZE     &
                              ,cips,cipe,cjps,cjpe                         &				                              ,cips,cipe,cjps,cjpe                         &
                              ,iids,iide,ijds,ijde                         &				                              ,iids,iide,ijds,ijde                         &
                              ,nids,nide,njds,njde                         &				                              ,nids,nide,njds,njde                         &
                              ,pgr , sw                                    &				                              ,pgr , sw                                    &
                              ,ntasks_x,ntasks_y                           &				                              ,ntasks_x,ntasks_y                           &
                              ,thisdomain_max_halo_width                   &				                              ,thisdomain_max_halo_width                   &
                              ,icoord,jcoord                               &				                              ,icoord,jcoord                               &
                              ,idim_cd,jdim_cd                             &				                              ,idim_cd,jdim_cd                             &
                              ,pig,pjg,retval )								                              ,pig,pjg,retval )
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_to_child')			!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_to_child')
      DO while ( retval .eq. 1 )									      DO while ( retval .eq. 1 )
         IF ( SIZE(grid%ph_2) .GT. 1 ) THEN								         IF ( SIZE(grid%ph_2) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ph_2')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ph_2')
            DO k = ckds,ckde										            DO k = ckds,ckde
               xv(k)= grid%ph_2(pig,k,pjg)								               xv(k)= grid%ph_2(pig,k,pjg)
            END DO											            ENDDO
            CALL rsl_lite_to_child_msg(((ckde)-(ckds)+1)*RWORDSIZE,xv)					            CALL rsl_lite_to_child_msg(((ckde)-(ckds)+1)*RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_2) .GT. 1 ) THEN								         IF ( SIZE(grid%t_2) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_2')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_2')
            DO k = ckds,(ckde-1)									            DO k = ckds,(ckde-1)
               xv(k)= grid%t_2(pig,k,pjg)								               xv(k)= grid%t_2(pig,k,pjg)
            END DO											            ENDDO
            CALL rsl_lite_to_child_msg((((ckde-1))-(ckds)+1)*RWORDSIZE,xv)				            CALL rsl_lite_to_child_msg((((ckde-1))-(ckds)+1)*RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ht) .GT. 1 ) THEN								         IF ( SIZE(grid%ht) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ht')							!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ht')
            xv(1)= grid%ht(pig,pjg)									            xv(1)= grid%ht(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_max_p) .GT. 1 ) THEN								         IF ( SIZE(grid%t_max_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_max_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_max_p')
            xv(1)= grid%t_max_p(pig,pjg)								            xv(1)= grid%t_max_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ght_max_p) .GT. 1 ) THEN							         IF ( SIZE(grid%ght_max_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ght_max_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ght_max_p')
            xv(1)= grid%ght_max_p(pig,pjg)								            xv(1)= grid%ght_max_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%max_p) .GT. 1 ) THEN								         IF ( SIZE(grid%max_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, max_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, max_p')
            xv(1)= grid%max_p(pig,pjg)									            xv(1)= grid%max_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_min_p) .GT. 1 ) THEN								         IF ( SIZE(grid%t_min_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_min_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, t_min_p')
            xv(1)= grid%t_min_p(pig,pjg)								            xv(1)= grid%t_min_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ght_min_p) .GT. 1 ) THEN							         IF ( SIZE(grid%ght_min_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ght_min_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, ght_min_p')
            xv(1)= grid%ght_min_p(pig,pjg)								            xv(1)= grid%ght_min_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%min_p) .GT. 1 ) THEN								         IF ( SIZE(grid%min_p) .GT. 1 ) THEN
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, min_p')						!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, min_p')
            xv(1)= grid%min_p(pig,pjg)									            xv(1)= grid%min_p(pig,pjg)
            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)							            CALL rsl_lite_to_child_msg(RWORDSIZE,xv)
         END IF												         ENDIF
   													   
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_to_child_info')			!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_to_child_info')
         CALL rsl_lite_to_child_info( local_communicator, msize*RWORDSIZE  &				         CALL rsl_lite_to_child_info( local_communicator, msize*RWORDSIZE  &
                                     ,cips,cipe,cjps,cjpe                  &				                                     ,cips,cipe,cjps,cjpe                  &
                                     ,iids,iide,ijds,ijde                  &				                                     ,iids,iide,ijds,ijde                  &
                                     ,nids,nide,njds,njde                  &				                                     ,nids,nide,njds,njde                  &
                                     ,pgr , sw                             &				                                     ,pgr , sw                             &
                                     ,ntasks_x,ntasks_y                    &				                                     ,ntasks_x,ntasks_y                    &
                                     ,thisdomain_max_halo_width            &				                                     ,thisdomain_max_halo_width            &
                                     ,icoord,jcoord                        &				                                     ,icoord,jcoord                        &
                                     ,idim_cd,jdim_cd                      &				                                     ,idim_cd,jdim_cd                      &
                                     ,pig,pjg,retval )							                                     ,pig,pjg,retval )
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_to_child_info')			!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_to_child_info')
      END DO												      ENDDO

      ! determine which communicator and offset to use						   <
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   <
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id )				   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_bcast')				!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, calling rsl_lite_bcast')
      CALL rsl_lite_bcast_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   |	      CALL rsl_lite_bcast_msgs( myproc, nproc, local_comm )
                                        nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       & 	   <
                                        ioffset, local_comm )					   <
!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_bcast')				!call wrf_debug(0,'/external/RSL_LITE/module_dm.F, back from rsl_lite_bcast')

      RETURN												      RETURN
   END SUBROUTINE interp_domain_em_small_part1								   END SUBROUTINE interp_domain_em_small_part1

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE interp_domain_em_small_part2 ( grid, ngrid, config_flags    &				   SUBROUTINE interp_domain_em_small_part2 ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &			      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, &
                            mytask, get_dm_max_halo_width						                            mytask, get_dm_max_halo_width
      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER myproc											      INTEGER myproc
      INTEGER ierr											      INTEGER ierr
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width

      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      nlev  = ckde - ckds + 1 										      nlev  = ckde - ckds + 1 

      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )

      CALL rsl_lite_from_parent_info(pig,pjg,retval)							      CALL rsl_lite_from_parent_info(pig,pjg,retval)
      													      
      DO while ( retval .eq. 1 )									      DO while ( retval .eq. 1 )
      													      
         IF ( SIZE(grid%ph_2) .GT. 1 ) THEN								         IF ( SIZE(grid%ph_2) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(((ckde)-(ckds)+1)*RWORDSIZE,xv)				            CALL rsl_lite_from_parent_msg(((ckde)-(ckds)+1)*RWORDSIZE,xv)
            DO k = ckds,ckde										            DO k = ckds,ckde
               grid%ph_2(pig,k,pjg) = xv(k)								               grid%ph_2(pig,k,pjg) = xv(k)
            END DO											            ENDDO
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_2) .GT. 1 ) THEN								         IF ( SIZE(grid%t_2) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg((((ckde-1))-(ckds)+1)*RWORDSIZE,xv)				            CALL rsl_lite_from_parent_msg((((ckde-1))-(ckds)+1)*RWORDSIZE,xv)
            DO k = ckds,(ckde-1)									            DO k = ckds,(ckde-1)
               grid%t_2(pig,k,pjg) = xv(k)								               grid%t_2(pig,k,pjg) = xv(k)
            END DO											            ENDDO
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ht) .GT. 1 ) THEN								         IF ( SIZE(grid%ht) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%ht(pig,pjg) = xv(1)									            grid%ht(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_max_p) .GT. 1 ) THEN								         IF ( SIZE(grid%t_max_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%t_max_p(pig,pjg) = xv(1)								            grid%t_max_p(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ght_max_p) .GT. 1 ) THEN							         IF ( SIZE(grid%ght_max_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%ght_max_p(pig,pjg) = xv(1)								            grid%ght_max_p(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%max_p) .GT. 1 ) THEN								         IF ( SIZE(grid%max_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%max_p(pig,pjg) = xv(1)									            grid%max_p(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%t_min_p) .GT. 1 ) THEN								         IF ( SIZE(grid%t_min_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%t_min_p(pig,pjg) = xv(1)								            grid%t_min_p(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%ght_min_p) .GT. 1 ) THEN							         IF ( SIZE(grid%ght_min_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%ght_min_p(pig,pjg) = xv(1)								            grid%ght_min_p(pig,pjg) = xv(1)
         END IF												         ENDIF
   													   
         IF ( SIZE(grid%min_p) .GT. 1 ) THEN								         IF ( SIZE(grid%min_p) .GT. 1 ) THEN
            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)							            CALL rsl_lite_from_parent_msg(RWORDSIZE,xv)
            grid%min_p(pig,pjg) = xv(1)									            grid%min_p(pig,pjg) = xv(1)
         END IF												         ENDIF
      													      
         CALL rsl_lite_from_parent_info(pig,pjg,retval)							         CALL rsl_lite_from_parent_info(pig,pjg,retval)
         												         
      END DO												      ENDDO

      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

#include "HALO_INTERP_DOWN.inc"										#include "HALO_INTERP_DOWN.inc"

      CALL interp_fcn_bl ( grid%ph_2,                                           &       		      CALL interp_fcn_bl ( grid%ph_2,                                           &       
                           cids, cide, ckds, ckde, cjds, cjde,                  &         		                           cids, cide, ckds, ckde, cjds, cjde,                  &         
                           cims, cime, ckms, ckme, cjms, cjme,                  &         		                           cims, cime, ckms, ckme, cjms, cjme,                  &         
                           cips, cipe, ckps, MIN( ckde, ckpe ), cjps, cjpe,     &         		                           cips, cipe, ckps, MIN( ckde, ckpe ), cjps, cjpe,     &         
                           ngrid%ph_2,                                          &   			                           ngrid%ph_2,                                          &   
                           nids, nide, nkds, nkde, njds, njde,                  &         		                           nids, nide, nkds, nkde, njds, njde,                  &         
                           nims, nime, nkms, nkme, njms, njme,                  &         		                           nims, nime, nkms, nkme, njms, njme,                  &         
                           nips, nipe, nkps, MIN( nkde, nkpe ), njps, njpe,     &         		                           nips, nipe, nkps, MIN( nkde, nkpe ), njps, njpe,     &         
                           config_flags%shw, ngrid%imask_nostag,                &         		                           config_flags%shw, ngrid%imask_nostag,                &         
                           .FALSE., .FALSE.,                                    &         		                           .FALSE., .FALSE.,                                    &         
                           ngrid%i_parent_start, ngrid%j_parent_start,          &			                           ngrid%i_parent_start, ngrid%j_parent_start,          &
                           ngrid%parent_grid_ratio, ngrid%parent_grid_ratio,    &			                           ngrid%parent_grid_ratio, ngrid%parent_grid_ratio,    &
                           grid%ht, ngrid%ht,                                   &			                           grid%ht, ngrid%ht,                                   &
                           grid%t_max_p, ngrid%t_max_p,                         &			                           grid%t_max_p, ngrid%t_max_p,                         &
                           grid%ght_max_p, ngrid%ght_max_p,                     &			                           grid%ght_max_p, ngrid%ght_max_p,                     &
                           grid%max_p, ngrid%max_p,                             &			                           grid%max_p, ngrid%max_p,                             &
                           grid%t_min_p, ngrid%t_min_p,                         &			                           grid%t_min_p, ngrid%t_min_p,                         &
                           grid%ght_min_p, ngrid%ght_min_p,                     &			                           grid%ght_min_p, ngrid%ght_min_p,                     &
                           grid%min_p, ngrid%min_p,                             &			                           grid%min_p, ngrid%min_p,                             &
                           ngrid%znw, ngrid%p_top                               )			                           ngrid%znw, ngrid%p_top                               )
      													      
      CALL interp_fcn_bl ( grid%t_2,                                            &       		      CALL interp_fcn_bl ( grid%t_2,                                            &       
                           cids, cide, ckds, ckde, cjds, cjde,                  &         		                           cids, cide, ckds, ckde, cjds, cjde,                  &         
                           cims, cime, ckms, ckme, cjms, cjme,                  &         		                           cims, cime, ckms, ckme, cjms, cjme,                  &         
                           cips, cipe, ckps, MIN( (ckde-1), ckpe ), cjps, cjpe, &         		                           cips, cipe, ckps, MIN( (ckde-1), ckpe ), cjps, cjpe, &         
                           ngrid%t_2,                                           &   			                           ngrid%t_2,                                           &   
                           nids, nide, nkds, nkde, njds, njde,                  &         		                           nids, nide, nkds, nkde, njds, njde,                  &         
                           nims, nime, nkms, nkme, njms, njme,                  &         		                           nims, nime, nkms, nkme, njms, njme,                  &         
                           nips, nipe, nkps, MIN( (nkde-1), nkpe ), njps, njpe, &         		                           nips, nipe, nkps, MIN( (nkde-1), nkpe ), njps, njpe, &         
                           config_flags%shw, ngrid%imask_nostag,                &         		                           config_flags%shw, ngrid%imask_nostag,                &         
                           .FALSE., .FALSE.,                                    &         		                           .FALSE., .FALSE.,                                    &         
                           ngrid%i_parent_start, ngrid%j_parent_start,          &			                           ngrid%i_parent_start, ngrid%j_parent_start,          &
                           ngrid%parent_grid_ratio, ngrid%parent_grid_ratio,    & 			                           ngrid%parent_grid_ratio, ngrid%parent_grid_ratio,    & 
                           grid%ht, ngrid%ht,                                   &			                           grid%ht, ngrid%ht,                                   &
                           grid%t_max_p, ngrid%t_max_p,                         &			                           grid%t_max_p, ngrid%t_max_p,                         &
                           grid%ght_max_p, ngrid%ght_max_p,                     &			                           grid%ght_max_p, ngrid%ght_max_p,                     &
                           grid%max_p, ngrid%max_p,                             &			                           grid%max_p, ngrid%max_p,                             &
                           grid%t_min_p, ngrid%t_min_p,                         &			                           grid%t_min_p, ngrid%t_min_p,                         &
                           grid%ght_min_p, ngrid%ght_min_p,                     &			                           grid%ght_min_p, ngrid%ght_min_p,                     &
                           grid%min_p, ngrid%min_p,                             &			                           grid%min_p, ngrid%min_p,                             &
                           ngrid%znu, ngrid%p_top                               )			                           ngrid%znu, ngrid%p_top                               )

      RETURN												      RETURN
   END SUBROUTINE interp_domain_em_small_part2								   END SUBROUTINE interp_domain_em_small_part2

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE feedback_nest_prep ( grid, config_flags    &						   SUBROUTINE feedback_nest_prep ( grid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
)													)
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask !, &	   |	      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask
                             !push_communicators_for_domain, pop_communicators_for_domain	   <
      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), TARGET :: grid          ! name of the grid being dereferenced (must be "grid	      TYPE(domain), TARGET :: grid          ! name of the grid being dereferenced (must be "grid
      TYPE (grid_config_rec_type) :: config_flags ! configureation flags, has vertical dim of 		      TYPE (grid_config_rec_type) :: config_flags ! configureation flags, has vertical dim of 
                                                  ! soil temp, moisture, etc., has vertical dim		                                                  ! soil temp, moisture, etc., has vertical dim
                                                  ! of soil categories					                                                  ! of soil categories
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>

      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER       :: idum1, idum2									      INTEGER       :: idum1, idum2


      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

    IF ( grid%active_this_task ) THEN								   <
      CALL push_communicators_for_domain( grid%id )						   <
												   <
#ifdef DM_PARALLEL											#ifdef DM_PARALLEL
#include "HALO_INTERP_UP.inc"										#include "HALO_INTERP_UP.inc"
#endif													#endif

      CALL pop_communicators_for_domain								   <
    END IF											   <
												   <
   END SUBROUTINE feedback_nest_prep									   END SUBROUTINE feedback_nest_prep

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE feedback_domain_em_part1 ( grid, ngrid, config_flags    &					   SUBROUTINE feedback_domain_em_part1 ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_	      USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save,                         &	   |	                            ipe_save, jpe_save, ips_save, jps_save
                            nest_pes_x, nest_pes_y						   <
 													 
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE(domain), POINTER :: xgrid									      TYPE(domain), POINTER :: xgrid
      TYPE (grid_config_rec_type)            :: config_flags, nconfig_flags				      TYPE (grid_config_rec_type)            :: config_flags, nconfig_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER local_comm, myproc, nproc, idum1, idum2							      INTEGER local_comm, myproc, nproc, idum1, idum2
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width

!cyl: add variables for trajectory									!cyl: add variables for trajectory
      integer tjk											      integer tjk

      INTERFACE												      INTERFACE
          SUBROUTINE feedback_nest_prep ( grid, config_flags    &					          SUBROUTINE feedback_nest_prep ( grid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
)													)
             USE module_state_description								             USE module_state_description
             USE module_domain, ONLY : domain								             USE module_domain, ONLY : domain
             USE module_configure, ONLY : grid_config_rec_type						             USE module_configure, ONLY : grid_config_rec_type
!													!
             TYPE (grid_config_rec_type)            :: config_flags					             TYPE (grid_config_rec_type)            :: config_flags
             TYPE(domain), TARGET                   :: grid						             TYPE(domain), TARGET                   :: grid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
          END SUBROUTINE feedback_nest_prep								          END SUBROUTINE feedback_nest_prep
      END INTERFACE											      END INTERFACE
!													!

      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )

!													!
! intermediate grid											! intermediate grid
      CALL get_ijk_from_grid (  grid ,                                 &				      CALL get_ijk_from_grid (  grid ,                                 &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
! nest grid												! nest grid
      CALL get_ijk_from_grid (  ngrid ,                                &				      CALL get_ijk_from_grid (  ngrid ,                                &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      ips_save = ngrid%i_parent_start   ! used in feedback_domain_em_part2 below			      ips_save = ngrid%i_parent_start   ! used in feedback_domain_em_part2 below
      jps_save = ngrid%j_parent_start									      jps_save = ngrid%j_parent_start
      ipe_save = ngrid%i_parent_start + (nide-nids+1) / ngrid%parent_grid_ratio - 1			      ipe_save = ngrid%i_parent_start + (nide-nids+1) / ngrid%parent_grid_ratio - 1
      jpe_save = ngrid%j_parent_start + (njde-njds+1) / ngrid%parent_grid_ratio - 1			      jpe_save = ngrid%j_parent_start + (njde-njds+1) / ngrid%parent_grid_ratio - 1

! feedback_nest_prep invokes a halo exchange on the ngrid. It is done this way				! feedback_nest_prep invokes a halo exchange on the ngrid. It is done this way
! in a separate routine because the HALOs need the data to be dereference from the			! in a separate routine because the HALOs need the data to be dereference from the
! grid data structure and, in this routine, the dereferenced fields are related to			! grid data structure and, in this routine, the dereferenced fields are related to
! the intermediate domain, not the nest itself. Save the current grid pointer to intermediate		! the intermediate domain, not the nest itself. Save the current grid pointer to intermediate
! domain, switch grid to point to ngrid, invoke feedback_nest_prep,  then restore grid			! domain, switch grid to point to ngrid, invoke feedback_nest_prep,  then restore grid
! to point to intermediate domain.									! to point to intermediate domain.

      CALL model_to_grid_config_rec ( ngrid%id , model_config_rec , nconfig_flags )			      CALL model_to_grid_config_rec ( ngrid%id , model_config_rec , nconfig_flags )
      CALL set_scalar_indices_from_config ( ngrid%id , idum1 , idum2 )					      CALL set_scalar_indices_from_config ( ngrid%id , idum1 , idum2 )
      xgrid => grid											      xgrid => grid
      grid => ngrid											      grid => ngrid

      CALL feedback_nest_prep ( grid, nconfig_flags    &						      CALL feedback_nest_prep ( grid, nconfig_flags    &
!													!
#include "actual_new_args.inc"										#include "actual_new_args.inc"
!													!
)													)

! put things back so grid is intermediate grid								! put things back so grid is intermediate grid

      grid => xgrid											      grid => xgrid
      CALL set_scalar_indices_from_config ( grid%id , idum1 , idum2 )					      CALL set_scalar_indices_from_config ( grid%id , idum1 , idum2 )

! "interp" (basically copy) ngrid onto intermediate grid						! "interp" (basically copy) ngrid onto intermediate grid

#include "nest_feedbackup_interp.inc"									#include "nest_feedbackup_interp.inc"

      RETURN												      RETURN
   END SUBROUTINE feedback_domain_em_part1								   END SUBROUTINE feedback_domain_em_part1

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE feedback_domain_em_part2 ( grid, intermediate_grid, ngrid , config_flags    &		   SUBROUTINE feedback_domain_em_part2 ( grid, intermediate_grid, ngrid , config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, domain_clock_get, get_ijk_from_grid				      USE module_domain, ONLY : domain, domain_clock_get, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type, model_config_rec				      USE module_configure, ONLY : grid_config_rec_type, model_config_rec
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y,                                         &	   <
                            intercomm_active, nest_task_offsets,                    &		   <
                            mpi_comm_to_mom, mpi_comm_to_kid, which_kid !,            &		   <
                             !push_communicators_for_domain, pop_communicators_for_domain	   <
												   <
      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub
      USE module_utility										      USE module_utility
      IMPLICIT NONE											      IMPLICIT NONE

!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
      TYPE(domain), POINTER :: parent_grid							   <

#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          xids, xide, xjds, xjde, xkds, xkde,    &			   <
                                xims, xime, xjms, xjme, xkms, xkme,    &			   <
                                xips, xipe, xjps, xjpe, xkps, xkpe				   <
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER icoord, jcoord, idim_cd, jdim_cd								      INTEGER icoord, jcoord, idim_cd, jdim_cd
      INTEGER local_comm, myproc, nproc, ioffset						   |	      INTEGER local_comm, myproc, nproc
      INTEGER iparstrt, jparstrt, sw, thisdomain_max_halo_width						      INTEGER iparstrt, jparstrt, sw, thisdomain_max_halo_width
      REAL    nest_influence										      REAL    nest_influence

      character*256 :: timestr										      character*256 :: timestr
      integer ierr											      integer ierr

      LOGICAL, EXTERNAL  :: cd_feedback_mask								      LOGICAL, EXTERNAL  :: cd_feedback_mask

!cyl: add variables for trajectory									!cyl: add variables for trajectory
      integer tjk											      integer tjk

! On entry to this routine, 										! On entry to this routine, 
!  "grid" refers to the parent domain									!  "grid" refers to the parent domain
!  "intermediate_grid" refers to local copy of parent domain that overlies this patch of nest		!  "intermediate_grid" refers to local copy of parent domain that overlies this patch of nest
!  "ngrid" refers to the nest, which is only needed for smoothing on the parent because 		!  "ngrid" refers to the nest, which is only needed for smoothing on the parent because 
!          the nest feedback data has already been transferred during em_nest_feedbackup_interp		!          the nest feedback data has already been transferred during em_nest_feedbackup_interp
!          in part1, above.										!          in part1, above.
! The way these settings c and n dimensions are set, below, looks backwards but from the point 		! The way these settings c and n dimensions are set, below, looks backwards but from the point 
! of view of the RSL routine rsl_lite_to_parent_info(), call to which is included by 			! of view of the RSL routine rsl_lite_to_parent_info(), call to which is included by 
! em_nest_feedbackup_pack, the "n" domain represents the parent domain and the "c" domain		! em_nest_feedbackup_pack, the "n" domain represents the parent domain and the "c" domain
! represents the intermediate domain. The backwards lookingness should be fixed in the gen_comms	! represents the intermediate domain. The backwards lookingness should be fixed in the gen_comms
! registry routine that accompanies RSL_LITE but, just as it's sometimes easier to put up a road	! registry routine that accompanies RSL_LITE but, just as it's sometimes easier to put up a road
! sign that says "DIP" than fix the dip,  at this point it was easier just to write this comment	! sign that says "DIP" than fix the dip,  at this point it was easier just to write this comment
!													!
      nest_influence = 1.										      nest_influence = 1.

      CALL domain_clock_get( grid, current_timestr=timestr )						      CALL domain_clock_get( grid, current_timestr=timestr )

      CALL get_ijk_from_grid (  intermediate_grid ,                   &					      CALL get_ijk_from_grid (  intermediate_grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )
      CALL get_ijk_from_grid (  ngrid ,              &						   <
                                xids, xide, xjds, xjde, xkds, xkde,    &			   <
                                xims, xime, xjms, xjme, xkms, xkme,    &			   <
                                xips, xipe, xjps, xjpe, xkps, xkpe    )				   <
												   <
      ips_save = ngrid%i_parent_start   ! used in feedback_domain_em_part2 below		   <
      jps_save = ngrid%j_parent_start								   <
      ipe_save = ngrid%i_parent_start + (xide-xids+1) / ngrid%parent_grid_ratio - 1		   <
      jpe_save = ngrid%j_parent_start + (xjde-xjds+1) / ngrid%parent_grid_ratio - 1		   <
												   <
												   <
												   <

IF ( ngrid%active_this_task ) THEN								   <
!cyl add this for trajectory										!cyl add this for trajectory
    CALL push_communicators_for_domain( ngrid%id )						   <

    do tjk = 1,config_flags%num_traj									    do tjk = 1,config_flags%num_traj
     if (ngrid%traj_long(tjk) .eq. -9999.0) then							     if (ngrid%traj_long(tjk) .eq. -9999.0) then
!       print*,'n=-9999',tjk										!       print*,'n=-9999',tjk
        ngrid%traj_long(tjk)=grid%traj_long(tjk)							        ngrid%traj_long(tjk)=grid%traj_long(tjk)
        ngrid%traj_k(tjk)=grid%traj_k(tjk)								        ngrid%traj_k(tjk)=grid%traj_k(tjk)
     else												     else
!       print*,'p!=-9999',tjk										!       print*,'p!=-9999',tjk
        grid%traj_long(tjk)=ngrid%traj_long(tjk)							        grid%traj_long(tjk)=ngrid%traj_long(tjk)
        grid%traj_k(tjk)=ngrid%traj_k(tjk)								        grid%traj_k(tjk)=ngrid%traj_k(tjk)
     endif												     endif
     if (ngrid%traj_lat(tjk) .eq. -9999.0) then								     if (ngrid%traj_lat(tjk) .eq. -9999.0) then
         ngrid%traj_lat(tjk)=grid%traj_lat(tjk)								         ngrid%traj_lat(tjk)=grid%traj_lat(tjk)
         ngrid%traj_k(tjk)=grid%traj_k(tjk)								         ngrid%traj_k(tjk)=grid%traj_k(tjk)
     else												     else
         grid%traj_lat(tjk)=ngrid%traj_lat(tjk)								         grid%traj_lat(tjk)=ngrid%traj_lat(tjk)
         grid%traj_k(tjk)=ngrid%traj_k(tjk)								         grid%traj_k(tjk)=ngrid%traj_k(tjk)
     endif												     endif
    enddo												    enddo
!endcyl													!endcyl

      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt - sw										      icoord =    iparstrt - sw
      jcoord =    jparstrt - sw										      jcoord =    jparstrt - sw
      idim_cd = cide - cids + 1										      idim_cd = cide - cids + 1
      jdim_cd = cjde - cjds + 1										      jdim_cd = cjde - cjds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( grid%id , thisdomain_max_halo_width )

      parent_grid => grid									   <
      grid => ngrid										   <
#include "nest_feedbackup_pack.inc"									#include "nest_feedbackup_pack.inc"
      grid => parent_grid									   <
    CALL pop_communicators_for_domain								   <
												   <
END IF												   <
												   <
!      CALL wrf_get_dm_communicator ( local_comm )						   <
!      CALL wrf_get_myproc( myproc )								   <
!      CALL wrf_get_nproc( nproc )								   <

      ! determine which communicator and offset to use						   |	      CALL wrf_get_dm_communicator ( local_comm )
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   |	      CALL wrf_get_myproc( myproc )
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id )				   |	      CALL wrf_get_nproc( nproc )
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
      IF ( grid%active_this_task .OR. ngrid%active_this_task ) THEN				   <
#ifndef STUBMPI											   <
        CALL mpi_comm_rank(local_comm,myproc,ierr)						   <
        CALL mpi_comm_size(local_comm,nproc,ierr)						   <
#endif												   <
!call tracebackqq()										   <
        CALL rsl_lite_merge_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   <
                                          nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       & 	   <
                                          ioffset, local_comm )					   <
      END IF											   <
												   <
IF ( grid%active_this_task ) THEN								   <
    CALL push_communicators_for_domain( grid%id )						   <

												   >	      CALL rsl_lite_merge_msgs( myproc, nproc, local_comm )

#define NEST_INFLUENCE(A,B) A = B									#define NEST_INFLUENCE(A,B) A = B
#include "nest_feedbackup_unpack.inc"									#include "nest_feedbackup_unpack.inc"

      ! smooth coarse grid										      ! smooth coarse grid
      CALL get_ijk_from_grid (  ngrid,                           &					      CALL get_ijk_from_grid (  ngrid,                           &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

#include "HALO_INTERP_UP.inc"										#include "HALO_INTERP_UP.inc"

      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )

#include "nest_feedbackup_smooth.inc"									#include "nest_feedbackup_smooth.inc"

    CALL pop_communicators_for_domain								   <
END IF												   <
												   <
      RETURN												      RETURN
   END SUBROUTINE feedback_domain_em_part2								   END SUBROUTINE feedback_domain_em_part2
#endif													#endif

#if ( NMM_CORE == 1 && NMM_NEST == 1 )									#if ( NMM_CORE == 1 && NMM_NEST == 1 )
!==============================================================================				!==============================================================================
! NMM nesting infrastructure extended from EM core. This is gopal's doing.				! NMM nesting infrastructure extended from EM core. This is gopal's doing.
!==============================================================================				!==============================================================================

   SUBROUTINE before_interp_halos_nmm(grid,config_flags &						   SUBROUTINE before_interp_halos_nmm(grid,config_flags &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
      )													      )
     ! This is called before interp_domain_nmm_part1 to do						     ! This is called before interp_domain_nmm_part1 to do
     ! pre-interpolation halo communication on the nest.						     ! pre-interpolation halo communication on the nest.
     ! Author: Sam Trahan, February 2011								     ! Author: Sam Trahan, February 2011
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y !,                                         &	   <
                             !push_communicators_for_domain, pop_communicators_for_domain	   <
      USE module_comm_dm, ONLY : HALO_NMM_WEIGHTS_sub							      USE module_comm_dm, ONLY : HALO_NMM_WEIGHTS_sub
													      IMPLICIT NONE
      IMPLICIT NONE											!
!													      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE (grid_config_rec_type)            :: config_flags
      TYPE (grid_config_rec_type)            :: config_flags					   (
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
     INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, &								     INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, &
                IMS,IME,JMS,JME,KMS,KME, &								                IMS,IME,JMS,JME,KMS,KME, &
                IPS,IPE,JPS,JPE,KPS,KPE									                IPS,IPE,JPS,JPE,KPS,KPE

!#ifdef DEREF_KLUDGE											!#ifdef DEREF_KLUDGE
!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm						!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33						!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x						!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y						!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
!#endif													!#endif
#include "deref_kludge.h"										#include "deref_kludge.h"

!#define COPY_IN											!#define COPY_IN
												   >	!#include <scalar_derefs.inc>

     ! FIXME: Don't initialize these to -1; it is a waste.						     ! FIXME: Don't initialize these to -1; it is a waste.
     ! Initialization is only for debugging purposes.							     ! Initialization is only for debugging purposes.
      IDS=-1; IDE=-1; JDS=-1; JDE=-1; KDS=-1; KDE=-1							      IDS=-1; IDE=-1; JDS=-1; JDE=-1; KDS=-1; KDE=-1
      IMS=-1; IME=-1; JMS=-1; JME=-1; KMS=-1; KME=-1							      IMS=-1; IME=-1; JMS=-1; JME=-1; KMS=-1; KME=-1
      IPS=-1; IPE=-1; JPS=-1; JPE=-1; KPS=-1; KPE=-1							      IPS=-1; IPE=-1; JPS=-1; JPE=-1; KPS=-1; KPE=-1
      CALL GET_IJK_FROM_GRID(GRID                                       &				      CALL GET_IJK_FROM_GRID(GRID                                       &
     &                      ,IDS,IDE,JDS,JDE,KDS,KDE                    &				     &                      ,IDS,IDE,JDS,JDE,KDS,KDE                    &
     &                      ,IMS,IME,JMS,JME,KMS,KME                    &				     &                      ,IMS,IME,JMS,JME,KMS,KME                    &
     &                      ,IPS,IPE,JPS,JPE,KPS,KPE )							     &                      ,IPS,IPE,JPS,JPE,KPS,KPE )

     CALL push_communicators_for_domain(grid%id)						   <
#include "HALO_NMM_WEIGHTS.inc"										#include "HALO_NMM_WEIGHTS.inc"
     CALL pop_communicators_for_domain								   <
												   <
   END SUBROUTINE before_interp_halos_nmm								   END SUBROUTINE before_interp_halos_nmm

   SUBROUTINE interp_domain_nmm_part1 ( grid, intermediate_grid, ngrid, config_flags    &		   SUBROUTINE interp_domain_nmm_part1 ( grid, intermediate_grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y						   <
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, local_communicator, mytask, &		   <
                            nest_pes_x, nest_pes_y,                                 &		   <
                            intercomm_active, nest_task_offsets,                    &		   <
                            mpi_comm_to_mom, mpi_comm_to_kid, which_kid !,            &		   <
                             !push_communicators_for_domain,pop_communicators_for_domain	   <
												   <
      USE module_timing											      USE module_timing
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      INTEGER iparstrt,jparstrt,sw									      INTEGER iparstrt,jparstrt,sw
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &				      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe					                                iips, iipe, ijps, ijpe, ikps, ikpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v
      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr							      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr
      INTEGER local_comm, ioffset, myproc, nproc, ierr						   |	      INTEGER local_comm, myproc, nproc
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width

      LOGICAL interp_mp											      LOGICAL interp_mp
      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp

      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )

												   >	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>
												   >
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  intermediate_grid ,              &					      CALL get_ijk_from_grid (  intermediate_grid ,              &
                                iids, iide, ijds, ijde, ikds, ikde,    &				                                iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe    )					                                iips, iipe, ijps, ijpe, ikps, ikpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )							      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )
      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt - sw										      icoord =    iparstrt - sw
      jcoord =    jparstrt - sw										      jcoord =    jparstrt - sw
      idim_cd = iide - iids + 1										      idim_cd = iide - iids + 1
      jdim_cd = ijde - ijds + 1										      jdim_cd = ijde - ijds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      ! get max_halo_width for parent. It may be smaller if it is moad				   <
      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )
												   <
      IF ( grid%active_this_task ) THEN								   <
#include "nest_interpdown_pack.inc"									#include "nest_interpdown_pack.inc"
      END IF											   <

      ! determine which communicator and offset to use						   |	      CALL rsl_lite_bcast_msgs( myproc, nproc, local_comm )
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   <
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id )				   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
      IF ( grid%active_this_task .OR. ngrid%active_this_task ) THEN				   <
#ifndef STUBMPI											   <
        CALL mpi_comm_rank(local_comm,myproc,ierr)						   <
        CALL mpi_comm_size(local_comm,nproc,ierr)						   <
#endif												   <
!CALL tracebackqq()										   <
        CALL rsl_lite_bcast_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   <
                                        nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       & 	   <
                                        ioffset, local_comm )					   <
      END IF											   <

												   >	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>
      RETURN												      RETURN
   END SUBROUTINE interp_domain_nmm_part1								   END SUBROUTINE interp_domain_nmm_part1

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE interp_domain_nmm_part2 ( grid, ngrid, config_flags    &					   SUBROUTINE interp_domain_nmm_part2 ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width ,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_task_offsets							   <
                             !push_communicators_for_domain,pop_communicators_for_domain,     &	   <
      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_down_sub
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v
      INTEGER myproc											      INTEGER myproc
      INTEGER ierr											      INTEGER ierr

      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm			      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm
												   >	!#ifdef DEREF_KLUDGE
												   >	!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
												   >	!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
												   >	!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
												   >	!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
												   >	!#endif
      LOGICAL interp_mp											      LOGICAL interp_mp
#include "deref_kludge.h"										#include "deref_kludge.h"
												   <
! interp_mp is set unconditionally in alloc_and_configure_domain (module_domain.F), 		   <
! regardless of active_this_task								   <
      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp

      IF ( ngrid%active_this_task ) THEN							   |	!#define COPY_IN
												   |	!#include <scalar_derefs.inc>
        CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                  cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                  cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                  cips, cipe, cjps, cjpe, ckps, ckpe    )				                                cips, cipe, cjps, cjpe, ckps, ckpe    )
        CALL get_ijk_from_grid (  ngrid ,              &						      CALL get_ijk_from_grid (  ngrid ,              &
                                  nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                  nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                  nips, nipe, njps, njpe, nkps, nkpe    )				                                nips, nipe, njps, njpe, nkps, nkpe    )

													      nlev  = ckde - ckds + 1 
        nlev  = ckde - ckds + 1 
													#include "nest_interpdown_unpack.inc"
#include "nest_interpdown_unpack.inc"
													      CALL get_ijk_from_grid (  grid ,              &
        CALL get_ijk_from_grid (  grid ,              &							                                ids, ide, jds, jde, kds, kde,    &
                                  ids, ide, jds, jde, kds, kde,    &					                                ims, ime, jms, jme, kms, kme,    &
                                  ims, ime, jms, jme, kms, kme,    &					                                ips, ipe, jps, jpe, kps, kpe    )
                                  ips, ipe, jps, jpe, kps, kpe    )
												   (
        CALL push_communicators_for_domain( grid%id )						   <
#include "HALO_INTERP_DOWN.inc"										#include "HALO_INTERP_DOWN.inc"

      ! Generate interpolation information and interpolate Q, T and					      ! Generate interpolation information and interpolate Q, T and
      ! possibly PD while we're at it:									      ! possibly PD while we're at it:

! Grid is set to ngrid%intermediate_grid in the call from med_interp_domain			   <
! (share/mediation_interp_domain.F) so if one is active_this_task, so is the other		   <
        call store_interp_info(ngrid,grid)								      call store_interp_info(ngrid,grid)
        call ext_c2n_fulldom(ngrid%IIH,ngrid%JJH,ngrid%HBWGT1, &					      call ext_c2n_fulldom(ngrid%IIH,ngrid%JJH,ngrid%HBWGT1, &
             ngrid%HBWGT2,ngrid%HBWGT3,ngrid%HBWGT4,         &						           ngrid%HBWGT2,ngrid%HBWGT3,ngrid%HBWGT4,         &
             ngrid%deta1,ngrid%deta2,ngrid%eta1,             &						           ngrid%deta1,ngrid%deta2,ngrid%eta1,             &
             ngrid%eta2,ngrid%pt,ngrid%pdtop,                &						           ngrid%eta2,ngrid%pt,ngrid%pdtop,                &
             grid%pint,grid%t,grid%pd,grid%q,       &							           grid%pint,grid%t,grid%pd,grid%q,       &
             cims, cime, cjms, cjme, ckms, ckme,             &						           cims, cime, cjms, cjme, ckms, ckme,             &
             ngrid%pint,ngrid%t,ngrid%pd,ngrid%q,&							           ngrid%pint,ngrid%t,ngrid%pd,ngrid%q,&
             ngrid%iinfo,ngrid%winfo,ngrid%imask_nostag, &						           ngrid%iinfo,ngrid%winfo,ngrid%imask_nostag, &
             nids, nide, njds, njde, nkds, nkde,             &						           nids, nide, njds, njde, nkds, nkde,             &
             nims, nime, njms, njme, nkms, nkme,             &						           nims, nime, njms, njme, nkms, nkme,             &
             nips, nipe, njps, njpe, nkps, nkpe)							           nips, nipe, njps, njpe, nkps, nkpe)

#include "nest_interpdown_interp.inc"									#include "nest_interpdown_interp.inc"

												   |	!#define COPY_OUT
        CALL pop_communicators_for_domain							   |	!#include <scalar_derefs.inc>
												   <
      END IF											   <

      RETURN												      RETURN
   END SUBROUTINE interp_domain_nmm_part2								   END SUBROUTINE interp_domain_nmm_part2

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE force_domain_nmm_part1 ( grid, intermediate_grid, ngrid, config_flags    &		   SUBROUTINE force_domain_nmm_part1 ( grid, intermediate_grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y,                                 &		   <
                            intercomm_active, nest_task_offsets,                    &		   <
                            mpi_comm_to_mom, mpi_comm_to_kid, which_kid !,            &		   <
                            !push_communicators_for_domain,pop_communicators_for_domain		   <
												   <
      USE module_timing											      USE module_timing
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      INTEGER iparstrt,jparstrt,sw									      INTEGER iparstrt,jparstrt,sw
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &				      INTEGER       ::          iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe					                                iips, iipe, ijps, ijpe, ikps, ikpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v
      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr							      INTEGER icoord, jcoord, idim_cd, jdim_cd, pgr
      INTEGER local_comm, ioffset, myproc, nproc, ierr						   |	      INTEGER local_comm, myproc, nproc
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width
      LOGICAL interp_mp											      LOGICAL interp_mp
													      interp_mp=grid%interp_mp .or. ngrid%interp_mp
      interp_mp=grid%interp_mp .or. ngrid%interp_mp
													      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_myproc( myproc )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_nproc( nproc )
      CALL wrf_get_nproc( nproc )
												   (
												   >	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>
												   >
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  intermediate_grid ,              &					      CALL get_ijk_from_grid (  intermediate_grid ,              &
                                iids, iide, ijds, ijde, ikds, ikde,    &				                                iids, iide, ijds, ijde, ikds, ikde,    &
                                iims, iime, ijms, ijme, ikms, ikme,    &				                                iims, iime, ijms, ijme, ikms, ikme,    &
                                iips, iipe, ijps, ijpe, ikps, ikpe    )					                                iips, iipe, ijps, ijpe, ikps, ikpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )							      CALL nl_get_parent_grid_ratio ( ngrid%id, pgr )
      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt - sw										      icoord =    iparstrt - sw
      jcoord =    jparstrt - sw										      jcoord =    jparstrt - sw
      idim_cd = iide - iids + 1										      idim_cd = iide - iids + 1
      jdim_cd = ijde - ijds + 1										      jdim_cd = ijde - ijds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )
												   <
      IF ( grid%active_this_task ) THEN								   <
#include "nest_forcedown_pack.inc"									#include "nest_forcedown_pack.inc"
      END IF											   <

      ! determine which communicator and offset to use						   |	      CALL rsl_lite_bcast_msgs( myproc, nproc, local_comm )
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   <
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id )				   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
      IF ( grid%active_this_task .OR. ngrid%active_this_task ) THEN				   <
#ifndef STUBMPI											   <
        CALL mpi_comm_rank(local_comm,myproc,ierr)						   <
        CALL mpi_comm_size(local_comm,nproc,ierr)						   <
#endif												   <
        CALL rsl_lite_bcast_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   <
                                        nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       & 	   <
                                        ioffset, local_comm )					   <
      END IF											   <

												   >	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>
      RETURN												      RETURN
      END SUBROUTINE force_domain_nmm_part1								      END SUBROUTINE force_domain_nmm_part1

!==============================================================================================		!==============================================================================================

   SUBROUTINE force_domain_nmm_part2 ( grid, ngrid, config_flags    &					   SUBROUTINE force_domain_nmm_part2 ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y !,                                         &	   <
                             !push_communicators_for_domain,pop_communicators_for_domain	   <
												   <
#if (NMM_NEST == 1)											#if (NMM_NEST == 1)
      USE module_comm_nesting_dm, ONLY : halo_force_down_sub						      USE module_comm_nesting_dm, ONLY : halo_force_down_sub
      use module_comm_dm, only: HALO_NMM_INTERP_INFO_sub						      use module_comm_dm, only: HALO_NMM_INTERP_INFO_sub
# if ( HWRF == 1 )										   |	#ifdef HWRF
      use module_comm_dm, only: HALO_NMM_FORCE_DOWN_SST_sub						      use module_comm_dm, only: HALO_NMM_FORCE_DOWN_SST_sub
# endif													#endif
#endif													#endif
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid,cgrid								      TYPE(domain), POINTER :: ngrid,cgrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye							      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v

												   >	integer myproc
												   >
      LOGICAL interp_mp											      LOGICAL interp_mp
      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm			      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm

												   >	!#ifdef DEREF_KLUDGE
												   >	!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
												   >	!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
												   >	!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
												   >	!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
												   >	!#endif
#include "deref_kludge.h"										#include "deref_kludge.h"
      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp

IF ( ngrid%active_this_task ) THEN								   |	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>
												   >
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

!jm as far as I can tell, grid is ngrid%intermediate_domain, so they 				   <
!jm should both have the same id, both be active_this_task (if one is)				   <
!jm and use the same communicator.  But just to be safe, some extra				   <
!jm pushes and pops of domain communicators littered here.					   <
												   <
      cgrid=>grid											      cgrid=>grid
      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

#include "nest_forcedown_unpack.inc"									#include "nest_forcedown_unpack.inc"

      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

      CALL push_communicators_for_domain( grid%id )						   |	#ifdef HWRF
												   <
#if ( HWRF == 1 )										   <
        IF(ngrid%force_sst(1) == 1) then								      IF(ngrid%force_sst(1) == 1) then
# include "HALO_NMM_FORCE_DOWN_SST.inc"									#include "HALO_NMM_FORCE_DOWN_SST.inc"
        END IF												      ENDIF
#endif													#endif

#include "HALO_FORCE_DOWN.inc"										#include "HALO_FORCE_DOWN.inc"
      CALL pop_communicators_for_domain								   <

      call store_interp_info(ngrid,grid)								      call store_interp_info(ngrid,grid)
													      call ext_c2b_fulldom(ngrid%IIH,ngrid%JJH,ngrid%HBWGT1, &
													           ngrid%HBWGT2,ngrid%HBWGT3,ngrid%HBWGT4,         &
      call ext_c2b_fulldom(ngrid%IIH,ngrid%JJH,ngrid%HBWGT1, &						           ngrid%deta1,ngrid%deta2,ngrid%eta1,             &
           ngrid%HBWGT2,ngrid%HBWGT3,ngrid%HBWGT4,         &						           ngrid%eta2,ngrid%pt,ngrid%pdtop,                &
           ngrid%deta1,ngrid%deta2,ngrid%eta1,             &						           grid%pint,grid%t,grid%pd,grid%q,                &
           ngrid%eta2,ngrid%pt,ngrid%pdtop,                &						           cims, cime, cjms, cjme, ckms, ckme,             &
           grid%pint,grid%t,grid%pd,grid%q,                &						           nids, nide, njds, njde, nkds, nkde,             &
           cims, cime, cjms, cjme, ckms, ckme,             &						           nims, nime, njms, njme, nkms, nkme,             &
           nids, nide, njds, njde, nkds, nkde,             &						           nips, nipe, njps, njpe, nkps, nkpe,             &
           nims, nime, njms, njme, nkms, nkme,             &						           ngrid%iinfo_bxs, ngrid%iinfo_bxe,               &
           nips, nipe, njps, njpe, nkps, nkpe,             &						           ngrid%iinfo_bys, ngrid%iinfo_bye,               &
           ngrid%iinfo_bxs, ngrid%iinfo_bxe,               &						           ngrid%winfo_bxs, ngrid%winfo_bxe,               &
           ngrid%iinfo_bys, ngrid%iinfo_bye,               &						           ngrid%winfo_bys, ngrid%winfo_bye,               &
           ngrid%winfo_bxs, ngrid%winfo_bxe,               &						           ngrid%pd_bxs, ngrid%pd_bxe,             &
           ngrid%winfo_bys, ngrid%winfo_bye,               &						           ngrid%pd_bys, ngrid%pd_bye,             &
           ngrid%pd_bxs, ngrid%pd_bxe,             &							           ngrid%t_bxs, ngrid%t_bxe,               &
           ngrid%pd_bys, ngrid%pd_bye,             &							           ngrid%t_bys, ngrid%t_bye,               &
           ngrid%t_bxs, ngrid%t_bxe,               &							           ngrid%q_bxs, ngrid%q_bxe,               &
           ngrid%t_bys, ngrid%t_bye,               &							           ngrid%q_bys, ngrid%q_bye)
           ngrid%q_bxs, ngrid%q_bxe,               &
           ngrid%q_bys, ngrid%q_bye)									      ! Need a halo for interpolation information due to how V grid
													      ! interpolation works:
      ! Need a halo for interpolation information due to how V grid					grid=>ngrid
      ! interpolation works:										      CALL get_ijk_from_grid (  grid ,              &
      grid=>ngrid											                                ids, ide, jds, jde, kds, kde,    &
      CALL get_ijk_from_grid (  grid ,              &							                                ims, ime, jms, jme, kms, kme,    &
                                ids, ide, jds, jde, kds, kde,    &					                                ips, ipe, jps, jpe, kps, kpe    )
                                ims, ime, jms, jme, kms, kme,    &				   (
                                ips, ipe, jps, jpe, kps, kpe    )				   (
      CALL push_communicators_for_domain( grid%id )						   <
#include "HALO_NMM_INTERP_INFO.inc"									#include "HALO_NMM_INTERP_INFO.inc"
      CALL pop_communicators_for_domain								   <

      grid=>cgrid											grid=>cgrid
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )


      ! code here to interpolate the data into the nested domain					      ! code here to interpolate the data into the nested domain
      CALL push_communicators_for_domain( grid%id )						   <
#include "nest_forcedown_interp.inc"									#include "nest_forcedown_interp.inc"
      CALL pop_communicators_for_domain								   <

END IF												   |	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>

      RETURN												      RETURN
   END SUBROUTINE force_domain_nmm_part2								   END SUBROUTINE force_domain_nmm_part2

!================================================================================			!================================================================================
!													!
! This routine exists only to call a halo on a domain (the nest)					! This routine exists only to call a halo on a domain (the nest)
! gets called from feedback_domain_em_part1, below.  This is needed					! gets called from feedback_domain_em_part1, below.  This is needed
! because the halo code expects the fields being exchanged to have					! because the halo code expects the fields being exchanged to have
! been dereferenced from the grid data structure, but in feedback_domain_em_part1			! been dereferenced from the grid data structure, but in feedback_domain_em_part1
! the grid data structure points to the coarse domain, not the nest.					! the grid data structure points to the coarse domain, not the nest.
! And we want the halo exchange on the nest, so that the code in					! And we want the halo exchange on the nest, so that the code in
! em_nest_feedbackup_interp.inc will work correctly on multi-p. JM 20040308				! em_nest_feedbackup_interp.inc will work correctly on multi-p. JM 20040308
!													!

   SUBROUTINE feedback_nest_prep_nmm ( grid, config_flags    &						   SUBROUTINE feedback_nest_prep_nmm ( grid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
)													)
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y						   <
                            !push_communicators_for_domain, pop_communicators_for_domain,    &	   <
      USE module_comm_dm, ONLY : HALO_NMM_WEIGHTS_sub							      USE module_comm_dm, ONLY : HALO_NMM_WEIGHTS_sub
      USE module_comm_nesting_dm, ONLY : HALO_INTERP_UP_sub						      USE module_comm_nesting_dm, ONLY : HALO_INTERP_UP_sub

      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), TARGET :: grid          ! name of the grid being dereferenced (must be "grid	      TYPE(domain), TARGET :: grid          ! name of the grid being dereferenced (must be "grid
      TYPE (grid_config_rec_type) :: config_flags ! configureation flags, has vertical dim of		      TYPE (grid_config_rec_type) :: config_flags ! configureation flags, has vertical dim of
                                                  ! soil temp, moisture, etc., has vertical dim		                                                  ! soil temp, moisture, etc., has vertical dim
                                                  ! of soil categories					                                                  ! of soil categories
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>

      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER       :: idum1, idum2									      INTEGER       :: idum1, idum2
      LOGICAL :: interp_mp										      LOGICAL :: interp_mp
      interp_mp=.true.											      interp_mp=.true.

												   >	!#ifdef DEREF_KLUDGE
												   >	!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
												   >	!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
												   >	!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
												   >	!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
												   >	!#endif
#include "deref_kludge.h"										#include "deref_kludge.h"

												   >	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>
												   >
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )
    IF ( grid%active_this_task ) THEN								   |
      CALL push_communicators_for_domain( grid%id )						   <
#ifdef DM_PARALLEL											#ifdef DM_PARALLEL
#include "HALO_INTERP_UP.inc"										#include "HALO_INTERP_UP.inc"
#include "HALO_NMM_WEIGHTS.inc"										#include "HALO_NMM_WEIGHTS.inc"
#endif													#endif
      CALL pop_communicators_for_domain								   |
    END IF											   |	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>

   END SUBROUTINE feedback_nest_prep_nmm								   END SUBROUTINE feedback_nest_prep_nmm

!------------------------------------------------------------------					!------------------------------------------------------------------


!==============================================================================================		!==============================================================================================

   SUBROUTINE force_intermediate_nmm ( grid, ngrid, config_flags    &					   SUBROUTINE force_intermediate_nmm ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width		                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
#if ( NMM_NEST == 1 )											#if ( NMM_NEST == 1 )
      USE module_comm_nesting_dm, ONLY : halo_force_down_sub						      USE module_comm_nesting_dm, ONLY : halo_force_down_sub
#endif													#endif
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: cgrid									      TYPE(domain), POINTER :: cgrid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye							      REAL  dummy_xs, dummy_xe, dummy_ys, dummy_ye
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v

integer myproc												integer myproc
      LOGICAL interp_mp											      LOGICAL interp_mp

!#ifdef DEREF_KLUDGE											!#ifdef DEREF_KLUDGE
!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm						!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33						!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x						!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y						!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
!#endif													!#endif
#include "deref_kludge.h"										#include "deref_kludge.h"

      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp

!#define COPY_IN											!#define COPY_IN
												   >	!#include <scalar_derefs.inc>
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  ngrid ,              &							      CALL get_ijk_from_grid (  ngrid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      cgrid=>grid											      cgrid=>grid
      nlev  = ckde - ckds + 1 										      nlev  = ckde - ckds + 1 

#include "nest_interpdown_unpack.inc"									#include "nest_interpdown_unpack.inc"

      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

#include "HALO_FORCE_DOWN.inc"										#include "HALO_FORCE_DOWN.inc"

      RETURN												      RETURN
    END SUBROUTINE force_intermediate_nmm								    END SUBROUTINE force_intermediate_nmm

! ----------------------------------------------------------------------				! ----------------------------------------------------------------------

   SUBROUTINE feedback_domain_nmm_part1 ( grid, ngrid, config_flags    &				   SUBROUTINE feedback_domain_nmm_part1 ( grid, ngrid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, get_ijk_from_grid						      USE module_domain, ONLY : domain, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_	      USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_
      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &		      USE module_dm, ONLY : ntasks, ntasks_x, ntasks_y, itrace, local_communicator, mytask, &
                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width,  &	   |	                            ipe_save, jpe_save, ips_save, jps_save, get_dm_max_halo_width
                            nest_pes_x, nest_pes_y						   <
      IMPLICIT NONE											      IMPLICIT NONE
!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize, i_parent_start, j_parent_start						      INTEGER nlev, msize, i_parent_start, j_parent_start
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE(domain), POINTER :: xgrid									      TYPE(domain), POINTER :: xgrid
      TYPE (grid_config_rec_type)            :: config_flags, nconfig_flags				      TYPE (grid_config_rec_type)            :: config_flags, nconfig_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER local_comm, myproc, nproc, idum1, idum2							      INTEGER local_comm, myproc, nproc, idum1, idum2

      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm			      integer, parameter :: EConst=0, ECopy=1, EExtrap=2 ! MUST match module_interp_nmm

      LOGICAL interp_mp											      LOGICAL interp_mp
												   >	!#ifdef DEREF_KLUDGE
												   >	!!  see http://www.mmm.ucar.edu/wrf/WG2/topics/deref_kludge.htm
												   >	!   INTEGER     :: sm31 , em31 , sm32 , em32 , sm33 , em33
												   >	!   INTEGER     :: sm31x, em31x, sm32x, em32x, sm33x, em33x
												   >	!   INTEGER     :: sm31y, em31y, sm32y, em32y, sm33y, em33y
												   >	!#endif

      INTERFACE												      INTERFACE
          SUBROUTINE feedback_nest_prep_nmm ( grid, config_flags    &					          SUBROUTINE feedback_nest_prep_nmm ( grid, config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
)													)
             USE module_state_description								             USE module_state_description
             USE module_domain, ONLY : domain								             USE module_domain, ONLY : domain
             USE module_configure, ONLY : grid_config_rec_type						             USE module_configure, ONLY : grid_config_rec_type
!													!
             TYPE (grid_config_rec_type)            :: config_flags					             TYPE (grid_config_rec_type)            :: config_flags
             TYPE(domain), TARGET                   :: grid						             TYPE(domain), TARGET                   :: grid
#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
          END SUBROUTINE feedback_nest_prep_nmm								          END SUBROUTINE feedback_nest_prep_nmm
      END INTERFACE											      END INTERFACE
!													!
												   >	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>

      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp
      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )


!													!
! intermediate grid											! intermediate grid
      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
! nest grid												! nest grid
      CALL get_ijk_from_grid (  ngrid ,                  &						      CALL get_ijk_from_grid (  ngrid ,                  &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      ips_save = ngrid%i_parent_start  ! +1 not used in ipe_save & jpe_save				      ips_save = ngrid%i_parent_start  ! +1 not used in ipe_save & jpe_save
      jps_save = ngrid%j_parent_start  !  because of one extra namelist point				      jps_save = ngrid%j_parent_start  !  because of one extra namelist point
      ipe_save = ngrid%i_parent_start + (nide-nids) / ngrid%parent_grid_ratio - 1			      ipe_save = ngrid%i_parent_start + (nide-nids) / ngrid%parent_grid_ratio - 1
      jpe_save = ngrid%j_parent_start + (njde-njds) / ngrid%parent_grid_ratio - 1			      jpe_save = ngrid%j_parent_start + (njde-njds) / ngrid%parent_grid_ratio - 1

! feedback_nest_prep invokes a halo exchange on the ngrid. It is done this way				! feedback_nest_prep invokes a halo exchange on the ngrid. It is done this way
! in a separate routine because the HALOs need the data to be dereference from the			! in a separate routine because the HALOs need the data to be dereference from the
! grid data structure and, in this routine, the dereferenced fields are related to			! grid data structure and, in this routine, the dereferenced fields are related to
! the intermediate domain, not the nest itself. Save the current grid pointer to intermediate		! the intermediate domain, not the nest itself. Save the current grid pointer to intermediate
! domain, switch grid to point to ngrid, invoke feedback_nest_prep,  then restore grid			! domain, switch grid to point to ngrid, invoke feedback_nest_prep,  then restore grid
! to point to intermediate domain.									! to point to intermediate domain.

      CALL model_to_grid_config_rec ( ngrid%id , model_config_rec , nconfig_flags )			      CALL model_to_grid_config_rec ( ngrid%id , model_config_rec , nconfig_flags )
      CALL set_scalar_indices_from_config ( ngrid%id , idum1 , idum2 )					      CALL set_scalar_indices_from_config ( ngrid%id , idum1 , idum2 )
      xgrid => grid											      xgrid => grid
      grid => ngrid											      grid => ngrid
#include "deref_kludge.h"										#include "deref_kludge.h"
      CALL feedback_nest_prep_nmm ( grid, config_flags    &						      CALL feedback_nest_prep_nmm ( grid, config_flags    &
!													!
#include "actual_new_args.inc"										#include "actual_new_args.inc"
!													!
)													)

! put things back so grid is intermediate grid								! put things back so grid is intermediate grid

      grid => xgrid											      grid => xgrid
      CALL set_scalar_indices_from_config ( grid%id , idum1 , idum2 )					      CALL set_scalar_indices_from_config ( grid%id , idum1 , idum2 )

! "interp" (basically copy) ngrid onto intermediate grid						! "interp" (basically copy) ngrid onto intermediate grid

      ! Generate interpolation information and interpolate Q, T and					      ! Generate interpolation information and interpolate Q, T and
      ! possibly PD while we're at it:									      ! possibly PD while we're at it:
 													 
      call store_interp_info(ngrid,grid)								      call store_interp_info(ngrid,grid)
      call ext_n2c_fulldom(&										      call ext_n2c_fulldom(&
           ngrid%deta1,ngrid%deta2,ngrid%eta1,             &						           ngrid%deta1,ngrid%deta2,ngrid%eta1,             &
           ngrid%eta2,ngrid%pt,ngrid%pdtop,                &						           ngrid%eta2,ngrid%pt,ngrid%pdtop,                &
           grid%pint,grid%t,grid%pd,grid%q,                &						           grid%pint,grid%t,grid%pd,grid%q,                &
           cids, cide, cjds, cjde, ckds, ckde,             &						           cids, cide, cjds, cjde, ckds, ckde,             &
           cims, cime, cjms, cjme, ckms, ckme,             &						           cims, cime, cjms, cjme, ckms, ckme,             &
           cips, cipe, cjps, cjpe, ckps, ckpe,             &						           cips, cipe, cjps, cjpe, ckps, ckpe,             &
           ngrid%pint,ngrid%t,                             &						           ngrid%pint,ngrid%t,                             &
           ngrid%pd,ngrid%q,                               &						           ngrid%pd,ngrid%q,                               &
           ngrid%i_parent_start, ngrid%j_parent_start,     &						           ngrid%i_parent_start, ngrid%j_parent_start,     &
           grid%iinfo,grid%winfo,                          &						           grid%iinfo,grid%winfo,                          &
           nids, nide, njds, njde, nkds, nkde,             &						           nids, nide, njds, njde, nkds, nkde,             &
           nims, nime, njms, njme, nkms, nkme,             &						           nims, nime, njms, njme, nkms, nkme,             &
           nips, nipe, njps, njpe, nkps, nkpe)								           nips, nipe, njps, njpe, nkps, nkpe)


      ! "interp" ngrid onto intermediate grid								      ! "interp" ngrid onto intermediate grid
#include "nest_feedbackup_interp.inc"									#include "nest_feedbackup_interp.inc"

												   >	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>
      RETURN												      RETURN
   END SUBROUTINE feedback_domain_nmm_part1								   END SUBROUTINE feedback_domain_nmm_part1

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE feedback_domain_nmm_part2 ( grid, intermediate_grid, ngrid , config_flags    &		   SUBROUTINE feedback_domain_nmm_part2 ( grid, intermediate_grid, ngrid , config_flags    &
!													!
#include "dummy_new_args.inc"										#include "dummy_new_args.inc"
!													!
                 )											                 )
      USE module_state_description									      USE module_state_description
      USE module_domain, ONLY : domain, domain_clock_get, get_ijk_from_grid				      USE module_domain, ONLY : domain, domain_clock_get, get_ijk_from_grid
      USE module_configure, ONLY : grid_config_rec_type							      USE module_configure, ONLY : grid_config_rec_type
      USE module_dm, ONLY : get_dm_max_halo_width, ips_save, ipe_save,              &			      USE module_dm, ONLY : get_dm_max_halo_width, ips_save, ipe_save, &
                            jps_save, jpe_save, ntasks, mytask, ntasks_x, ntasks_y, &			                            jps_save, jpe_save, ntasks, mytask, ntasks_x, ntasks_y, &
                            local_communicator, itrace,                             &		   |	                            local_communicator, itrace
                            nest_pes_x, nest_pes_y,                                 &		   <
                            intercomm_active, nest_task_offsets,                    &		   <
                            mpi_comm_to_mom, mpi_comm_to_kid, which_kid !  ,            &	   <
                            ! push_communicators_for_domain, pop_communicators_for_domain	   <
												   <
      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub						      USE module_comm_nesting_dm, ONLY : halo_interp_up_sub
      USE module_utility										      USE module_utility
      IMPLICIT NONE											      IMPLICIT NONE

!													!
      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri	      TYPE(domain), POINTER :: grid          ! name of the grid being dereferenced (must be "gri
      TYPE(domain), POINTER :: intermediate_grid							      TYPE(domain), POINTER :: intermediate_grid
      TYPE(domain), POINTER :: ngrid									      TYPE(domain), POINTER :: ngrid
      TYPE(domain), POINTER :: parent_grid							   <

#include "dummy_new_decl.inc"									   |	#include <dummy_new_decl.inc>
      INTEGER nlev, msize										      INTEGER nlev, msize
      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k							      INTEGER i,j,pig,pjg,cm,cn,nig,njg,retval,k
      TYPE (grid_config_rec_type)            :: config_flags						      TYPE (grid_config_rec_type)            :: config_flags
      REAL xv(2000)											      REAL xv(2000)
      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &				      INTEGER       ::          cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe					                                cips, cipe, cjps, cjpe, ckps, ckpe
      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &				      INTEGER       ::          nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe					                                nips, nipe, njps, njpe, nkps, nkpe
      INTEGER       ::          xids, xide, xjds, xjde, xkds, xkde,    &			   <
                                xims, xime, xjms, xjme, xkms, xkme,    &			   <
                                xips, xipe, xjps, xjpe, xkps, xkpe				   <
      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &					      INTEGER       ::          ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe						                                ips, ipe, jps, jpe, kps, kpe

      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7							      INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7

      INTEGER icoord, jcoord, idim_cd, jdim_cd								      INTEGER icoord, jcoord, idim_cd, jdim_cd
      INTEGER local_comm, myproc, nproc									      INTEGER local_comm, myproc, nproc
      INTEGER iparstrt, jparstrt, sw									      INTEGER iparstrt, jparstrt, sw
      INTEGER thisdomain_max_halo_width									      INTEGER thisdomain_max_halo_width

      character*256 :: timestr										      character*256 :: timestr
      integer ioffset, ierr									   |	      integer ierr

      REAL    nest_influence										      REAL    nest_influence
      LOGICAL feedback_flag, feedback_flag_v								      LOGICAL feedback_flag, feedback_flag_v
      LOGICAL, EXTERNAL  :: cd_feedback_mask								      LOGICAL, EXTERNAL  :: cd_feedback_mask
      LOGICAL, EXTERNAL  :: cd_feedback_mask_v								      LOGICAL, EXTERNAL  :: cd_feedback_mask_v

      LOGICAL interp_mp											      LOGICAL interp_mp
												   >	!#define COPY_IN
												   >	!#include <scalar_derefs.inc>

! On entry to this routine,										! On entry to this routine,
!  "grid" refers to the parent domain									!  "grid" refers to the parent domain
!  "intermediate_grid" refers to local copy of parent domain that overlies this patch of nest		!  "intermediate_grid" refers to local copy of parent domain that overlies this patch of nest
!  "ngrid" refers to the nest, which is only needed for smoothing on the parent because			!  "ngrid" refers to the nest, which is only needed for smoothing on the parent because
!          the nest feedback data has already been transferred during em_nest_feedbackup_interp		!          the nest feedback data has already been transferred during em_nest_feedbackup_interp
!          in part1, above.										!          in part1, above.
! The way these settings c and n dimensions are set, below, looks backwards but from the point		! The way these settings c and n dimensions are set, below, looks backwards but from the point
! of view of the RSL routine rsl_lite_to_parent_info(), call to which is included by			! of view of the RSL routine rsl_lite_to_parent_info(), call to which is included by
! em_nest_feedbackup_pack, the "n" domain represents the parent domain and the "c" domain		! em_nest_feedbackup_pack, the "n" domain represents the parent domain and the "c" domain
! represents the intermediate domain. The backwards lookingness should be fixed in the gen_comms	! represents the intermediate domain. The backwards lookingness should be fixed in the gen_comms
! registry routine that accompanies RSL_LITE but, just as it's sometimes easier to put up a road	! registry routine that accompanies RSL_LITE but, just as it's sometimes easier to put up a road
! sign that says "DIP" than fix the dip,  at this point it was easier just to write this comment	! sign that says "DIP" than fix the dip,  at this point it was easier just to write this comment
!													!

      interp_mp=grid%interp_mp .or. ngrid%interp_mp							      interp_mp=grid%interp_mp .or. ngrid%interp_mp
      nest_influence = 0.5										      nest_influence = 0.5
#define NEST_INFLUENCE(A,B) A = nest_influence*(B) + (1.0-nest_influence)*(A)				#define NEST_INFLUENCE(A,B) A = nest_influence*(B) + (1.0-nest_influence)*(A)


      CALL domain_clock_get( grid, current_timestr=timestr )						      CALL domain_clock_get( grid, current_timestr=timestr )

      CALL get_ijk_from_grid (  intermediate_grid ,                   &					      CALL get_ijk_from_grid (  intermediate_grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe    )					                                nips, nipe, njps, njpe, nkps, nkpe    )
      CALL get_ijk_from_grid (  ngrid ,              &						   <
                                xids, xide, xjds, xjde, xkds, xkde,    &			   <
                                xims, xime, xjms, xjme, xkms, xkme,    &			   <
                                xips, xipe, xjps, xjpe, xkps, xkpe    )				   <
												   <
      ips_save = ngrid%i_parent_start								   <
      jps_save = ngrid%j_parent_start								   <
      ipe_save = ngrid%i_parent_start + (xide-xids) / ngrid%parent_grid_ratio - 1		   <
      jpe_save = ngrid%j_parent_start + (xjde-xjds) / ngrid%parent_grid_ratio - 1		   <
												   <

      nide = nide - 1   !dusan										      nide = nide - 1   !dusan
      njde = njde - 1   !dusan										      njde = njde - 1   !dusan

IF ( ngrid%active_this_task ) THEN								   <
    CALL push_communicators_for_domain( ngrid%id )						   <
      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )					      CALL nl_get_i_parent_start ( intermediate_grid%id, iparstrt )
      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )					      CALL nl_get_j_parent_start ( intermediate_grid%id, jparstrt )
      CALL nl_get_shw            ( intermediate_grid%id, sw )						      CALL nl_get_shw            ( intermediate_grid%id, sw )
      icoord =    iparstrt  - sw									      icoord =    iparstrt  - sw
      jcoord =    jparstrt  - sw									      jcoord =    jparstrt  - sw
      idim_cd = cide - cids + 1										      idim_cd = cide - cids + 1
      jdim_cd = cjde - cjds + 1										      jdim_cd = cjde - cjds + 1

      nlev  = ckde - ckds + 1										      nlev  = ckde - ckds + 1

      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )				      CALL get_dm_max_halo_width ( ngrid%id , thisdomain_max_halo_width )
      parent_grid => grid									   <
      grid => ngrid										   <
#include "nest_feedbackup_pack.inc"									#include "nest_feedbackup_pack.inc"
      grid => parent_grid									   <
    CALL pop_communicators_for_domain								   <
END IF												   <

!      CALL wrf_get_dm_communicator ( local_comm )						   |	      CALL wrf_get_dm_communicator ( local_comm )
!      CALL wrf_get_myproc( myproc )								   |	      CALL wrf_get_myproc( myproc )
!      CALL wrf_get_nproc( nproc )								   |	      CALL wrf_get_nproc( nproc )
												   <
      ! determine which communicator and offset to use						   <
      IF ( intercomm_active( grid%id ) ) THEN        ! I am parent				   <
        local_comm = mpi_comm_to_kid( which_kid(ngrid%id), grid%id )				   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      ELSE IF ( intercomm_active( ngrid%id ) ) THEN  ! I am nest				   <
        local_comm = mpi_comm_to_mom( ngrid%id )						   <
        ioffset = nest_task_offsets(ngrid%id)							   <
      END IF											   <
												   <
      IF ( grid%active_this_task .OR. ngrid%active_this_task ) THEN				   <
#ifndef STUBMPI											   <
        CALL mpi_comm_rank(local_comm,myproc,ierr)						   <
        CALL mpi_comm_size(local_comm,nproc,ierr)						   <
#endif												   <
        CALL rsl_lite_merge_msgs( myproc, nest_pes_x(grid%id)*nest_pes_y(grid%id),         &	   <
                                          nest_pes_x(ngrid%id)*nest_pes_y(ngrid%id),       &	   <
                                          ioffset, local_comm )					   <
      END IF											   <

IF ( grid%active_this_task ) THEN								   |	      CALL rsl_lite_merge_msgs( myproc, nproc, local_comm )
    CALL push_communicators_for_domain( grid%id )						   <

#include "nest_feedbackup_unpack.inc"									#include "nest_feedbackup_unpack.inc"


      ! smooth coarse grid										      ! smooth coarse grid

      CALL get_ijk_from_grid (  ngrid,                                 &				      CALL get_ijk_from_grid (  ngrid,                                 &
                                nids, nide, njds, njde, nkds, nkde,    &				                                nids, nide, njds, njde, nkds, nkde,    &
                                nims, nime, njms, njme, nkms, nkme,    &				                                nims, nime, njms, njme, nkms, nkme,    &
                                nips, nipe, njps, njpe, nkps, nkpe     )				                                nips, nipe, njps, njpe, nkps, nkpe     )
      CALL get_ijk_from_grid (  grid ,              &							      CALL get_ijk_from_grid (  grid ,              &
                                ids, ide, jds, jde, kds, kde,    &					                                ids, ide, jds, jde, kds, kde,    &
                                ims, ime, jms, jme, kms, kme,    &					                                ims, ime, jms, jme, kms, kme,    &
                                ips, ipe, jps, jpe, kps, kpe    )					                                ips, ipe, jps, jpe, kps, kpe    )

     before_smooth_halo: if(config_flags%smooth_option/=0) then					   <
#include "HALO_INTERP_UP.inc"										#include "HALO_INTERP_UP.inc"
     endif before_smooth_halo									   <

      CALL get_ijk_from_grid (  grid ,                   &						      CALL get_ijk_from_grid (  grid ,                   &
                                cids, cide, cjds, cjde, ckds, ckde,    &				                                cids, cide, cjds, cjde, ckds, ckde,    &
                                cims, cime, cjms, cjme, ckms, ckme,    &				                                cims, cime, cjms, cjme, ckms, ckme,    &
                                cips, cipe, cjps, cjpe, ckps, ckpe    )					                                cips, cipe, cjps, cjpe, ckps, ckpe    )

     smoother: if(config_flags%smooth_option/=0) then						   <
#include "nest_feedbackup_smooth.inc"									#include "nest_feedbackup_smooth.inc"
     endif smoother										   <
												   <
    CALL pop_communicators_for_domain								   <
END IF												   <
												   <

												   >	!#define COPY_OUT
												   >	!#include <scalar_derefs.inc>
      RETURN												      RETURN
   END SUBROUTINE feedback_domain_nmm_part2								   END SUBROUTINE feedback_domain_nmm_part2

!=================================================================================			!=================================================================================
!   End of gopal's doing										!   End of gopal's doing
!=================================================================================			!=================================================================================
#endif													#endif

!------------------------------------------------------------------					!------------------------------------------------------------------

   SUBROUTINE wrf_gatherv_real (Field, field_ofst,            &						   SUBROUTINE wrf_gatherv_real (Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
   USE module_dm, ONLY : getrealmpitype									   USE module_dm, ONLY : getrealmpitype
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
   REAL, DIMENSION(*) :: Field, globbuf									   REAL, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'

           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf					           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            getrealmpitype() ,               &    ! sendtype				                            getrealmpitype() ,               &    ! sendtype
                            globbuf( glob_ofst ) ,                 &    ! recvbuf			                            globbuf( glob_ofst ) ,                 &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            getrealmpitype()               , &    ! recvtype				                            getrealmpitype()               , &    ! recvtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_gatherv_real									   END SUBROUTINE wrf_gatherv_real

   SUBROUTINE wrf_gatherv_double (Field, field_ofst,            &					   SUBROUTINE wrf_gatherv_double (Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
!   USE module_dm											!   USE module_dm
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted			! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted
! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason		! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason
! for having this separate routine is so we pass the correct MPI type to mpi_scatterv			! for having this separate routine is so we pass the correct MPI type to mpi_scatterv
! if we were not indexing the globbuf and Field arrays it would not even matter				! if we were not indexing the globbuf and Field arrays it would not even matter
   REAL, DIMENSION(*) :: Field, globbuf									   REAL, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'

           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf					           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            MPI_DOUBLE_PRECISION         ,               &    ! sendtype		                            MPI_DOUBLE_PRECISION         ,               &    ! sendtype
                            globbuf( glob_ofst ) ,                 &    ! recvbuf			                            globbuf( glob_ofst ) ,                 &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            MPI_DOUBLE_PRECISION                       , &    ! recvtype		                            MPI_DOUBLE_PRECISION                       , &    ! recvtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_gatherv_double									   END SUBROUTINE wrf_gatherv_double

   SUBROUTINE wrf_gatherv_integer (Field, field_ofst,            &					   SUBROUTINE wrf_gatherv_integer (Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
   INTEGER, DIMENSION(*) :: Field, globbuf								   INTEGER, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'

           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf					           CALL mpi_gatherv( Field( field_ofst ),      &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            MPI_INTEGER         ,               &    ! sendtype				                            MPI_INTEGER         ,               &    ! sendtype
                            globbuf( glob_ofst ) ,                 &    ! recvbuf			                            globbuf( glob_ofst ) ,                 &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            MPI_INTEGER                       , &    ! recvtype				                            MPI_INTEGER                       , &    ! recvtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_gatherv_integer									   END SUBROUTINE wrf_gatherv_integer

!new stuff 20070124											!new stuff 20070124
   SUBROUTINE wrf_scatterv_real (                             &						   SUBROUTINE wrf_scatterv_real (                             &
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                Field, field_ofst,            &						                                Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
   USE module_dm, ONLY : getrealmpitype									   USE module_dm, ONLY : getrealmpitype
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
   REAL, DIMENSION(*) :: Field, globbuf									   REAL, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'

           CALL mpi_scatterv(                                &						           CALL mpi_scatterv(                                &
                            globbuf( glob_ofst ) ,           &    ! recvbuf				                            globbuf( glob_ofst ) ,           &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            getrealmpitype()               , &    ! recvtype				                            getrealmpitype()               , &    ! recvtype
                            Field( field_ofst ),             &    ! sendbuf				                            Field( field_ofst ),             &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            getrealmpitype() ,               &    ! sendtype				                            getrealmpitype() ,               &    ! sendtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_scatterv_real									   END SUBROUTINE wrf_scatterv_real

   SUBROUTINE wrf_scatterv_double (                           &						   SUBROUTINE wrf_scatterv_double (                           &
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                Field, field_ofst,            &						                                Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
   REAL, DIMENSION(*) :: Field, globbuf									   REAL, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'
! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted			! this next declaration is REAL, not DOUBLE PRECISION because it will be autopromoted
! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason		! to double precision by the compiler when WRF is compiled for 8 byte reals. Only reason
! for having this separate routine is so we pass the correct MPI type to mpi_scatterv			! for having this separate routine is so we pass the correct MPI type to mpi_scatterv
! if we were not indexing the globbuf and Field arrays it would not even matter				! if we were not indexing the globbuf and Field arrays it would not even matter

           CALL mpi_scatterv(                                &						           CALL mpi_scatterv(                                &
                            globbuf( glob_ofst ) ,           &    ! recvbuf				                            globbuf( glob_ofst ) ,           &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            MPI_DOUBLE_PRECISION           , &    ! recvtype				                            MPI_DOUBLE_PRECISION           , &    ! recvtype
                            Field( field_ofst ),             &    ! sendbuf				                            Field( field_ofst ),             &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            MPI_DOUBLE_PRECISION         ,   &    ! sendtype				                            MPI_DOUBLE_PRECISION         ,   &    ! sendtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_scatterv_double									   END SUBROUTINE wrf_scatterv_double

   SUBROUTINE wrf_scatterv_integer (                          &						   SUBROUTINE wrf_scatterv_integer (                          &
                                globbuf, glob_ofst ,          &    ! recvbuf				                                globbuf, glob_ofst ,          &    ! recvbuf
                                counts                      , &    ! recvcounts				                                counts                      , &    ! recvcounts
                                Field, field_ofst,            &						                                Field, field_ofst,            &
                                my_count ,                    &    ! sendcount				                                my_count ,                    &    ! sendcount
                                displs                      , &    ! displs				                                displs                      , &    ! displs
                                root                        , &    ! root				                                root                        , &    ! root
                                communicator                , &    ! communicator			                                communicator                , &    ! communicator
                                ierr )									                                ierr )
   IMPLICIT NONE											   IMPLICIT NONE
   INTEGER field_ofst, glob_ofst									   INTEGER field_ofst, glob_ofst
   INTEGER my_count, communicator, root, ierr								   INTEGER my_count, communicator, root, ierr
   INTEGER , DIMENSION(*) :: counts, displs								   INTEGER , DIMENSION(*) :: counts, displs
   INTEGER, DIMENSION(*) :: Field, globbuf								   INTEGER, DIMENSION(*) :: Field, globbuf
#ifndef STUBMPI												#ifndef STUBMPI
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'

           CALL mpi_scatterv(                                &						           CALL mpi_scatterv(                                &
                            globbuf( glob_ofst ) ,           &    ! recvbuf				                            globbuf( glob_ofst ) ,           &    ! recvbuf
                            counts                         , &    ! recvcounts				                            counts                         , &    ! recvcounts
                            displs                         , &    ! displs				                            displs                         , &    ! displs
                            MPI_INTEGER                    , &    ! recvtype				                            MPI_INTEGER                    , &    ! recvtype
                            Field( field_ofst ),             &    ! sendbuf				                            Field( field_ofst ),             &    ! sendbuf
                            my_count ,                       &    ! sendcount				                            my_count ,                       &    ! sendcount
                            MPI_INTEGER         ,            &    ! sendtype				                            MPI_INTEGER         ,            &    ! sendtype
                            root                           , &    ! root				                            root                           , &    ! root
                            communicator                   , &    ! communicator			                            communicator                   , &    ! communicator
                            ierr )									                            ierr )
#endif													#endif

   END SUBROUTINE wrf_scatterv_integer									   END SUBROUTINE wrf_scatterv_integer
! end new stuff 20070124										! end new stuff 20070124

     SUBROUTINE wrf_dm_gatherv ( v, elemsize , km_s, km_e, wordsz )					     SUBROUTINE wrf_dm_gatherv ( v, elemsize , km_s, km_e, wordsz )
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER  elemsize, km_s, km_e, wordsz								      INTEGER  elemsize, km_s, km_e, wordsz
      REAL v(*)												      REAL v(*)
      IF ( wordsz .EQ. DWORDSIZE ) THEN									      IF ( wordsz .EQ. DWORDSIZE ) THEN
         CALL wrf_dm_gatherv_double(v, elemsize , km_s, km_e)						         CALL wrf_dm_gatherv_double(v, elemsize , km_s, km_e)
      ELSE												      ELSE
         CALL wrf_dm_gatherv_single(v, elemsize , km_s, km_e)						         CALL wrf_dm_gatherv_single(v, elemsize , km_s, km_e)
      END IF												      ENDIF
     END SUBROUTINE wrf_dm_gatherv									     END SUBROUTINE wrf_dm_gatherv

     SUBROUTINE wrf_dm_gatherv_double ( v, elemsize , km_s, km_e )					     SUBROUTINE wrf_dm_gatherv_double ( v, elemsize , km_s, km_e )
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER  elemsize, km_s, km_e									      INTEGER  elemsize, km_s, km_e
      REAL*8 v(0:*)											      REAL*8 v(0:*)
#ifndef STUBMPI												#ifndef STUBMPI
# ifndef USE_MPI_IN_PLACE										# ifndef USE_MPI_IN_PLACE
      REAL*8 v_local((km_e-km_s+1)*elemsize)								      REAL*8 v_local((km_e-km_s+1)*elemsize)
# endif													# endif
      INTEGER, DIMENSION(:), ALLOCATABLE :: recvcounts, displs						      INTEGER, DIMENSION(:), ALLOCATABLE :: recvcounts, displs
      INTEGER send_type, myproc, nproc, local_comm, ierr, i						      INTEGER send_type, myproc, nproc, local_comm, ierr, i
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'
      send_type = MPI_DOUBLE_PRECISION									      send_type = MPI_DOUBLE_PRECISION
      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      ALLOCATE( recvcounts(nproc), displs(nproc) )							      ALLOCATE( recvcounts(nproc), displs(nproc) )
      i = (km_e-km_s+1)*elemsize									      i = (km_e-km_s+1)*elemsize
      CALL mpi_allgather( i,1,MPI_INTEGER,recvcounts,1,MPI_INTEGER,local_comm,ierr) ;			      CALL mpi_allgather( i,1,MPI_INTEGER,recvcounts,1,MPI_INTEGER,local_comm,ierr) ;
      i = (km_s)*elemsize										      i = (km_s)*elemsize
      CALL mpi_allgather( i,1,MPI_INTEGER,displs,1,MPI_INTEGER,local_comm,ierr) ;			      CALL mpi_allgather( i,1,MPI_INTEGER,displs,1,MPI_INTEGER,local_comm,ierr) ;
#  ifdef USE_MPI_IN_PLACE										#  ifdef USE_MPI_IN_PLACE
      CALL mpi_allgatherv( MPI_IN_PLACE,                                  &				      CALL mpi_allgatherv( MPI_IN_PLACE,                                  &
#  else													#  else
      DO i = 1,elemsize*(km_e-km_s+1)									      DO i = 1,elemsize*(km_e-km_s+1)
        v_local(i) = v(i+elemsize*km_s-1)								        v_local(i) = v(i+elemsize*km_s-1)
      END DO												      ENDDO
      CALL mpi_allgatherv( v_local,                                       &				      CALL mpi_allgatherv( v_local,                                       &
#  endif												#  endif
                           (km_e-km_s+1)*elemsize,                        &				                           (km_e-km_s+1)*elemsize,                        &
                           send_type,                                     &				                           send_type,                                     &
                           v,                                             &				                           v,                                             &
                           recvcounts,                                    &				                           recvcounts,                                    &
                           displs,                                        &				                           displs,                                        &
                           send_type,                                     &				                           send_type,                                     &
                           local_comm,                                    &				                           local_comm,                                    &
                           ierr )									                           ierr )
      DEALLOCATE(recvcounts)										      DEALLOCATE(recvcounts)
      DEALLOCATE(displs)										      DEALLOCATE(displs)
#endif													#endif
      return												      return
     END SUBROUTINE wrf_dm_gatherv_double								     END SUBROUTINE wrf_dm_gatherv_double

     SUBROUTINE wrf_dm_gatherv_single ( v, elemsize , km_s, km_e )					     SUBROUTINE wrf_dm_gatherv_single ( v, elemsize , km_s, km_e )
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER  elemsize, km_s, km_e									      INTEGER  elemsize, km_s, km_e
      REAL*4 v(0:*)											      REAL*4 v(0:*)
#ifndef STUBMPI												#ifndef STUBMPI
# ifndef USE_MPI_IN_PLACE										# ifndef USE_MPI_IN_PLACE
      REAL*4 v_local((km_e-km_s+1)*elemsize)								      REAL*4 v_local((km_e-km_s+1)*elemsize)
# endif													# endif
      INTEGER, DIMENSION(:), ALLOCATABLE :: recvcounts, displs						      INTEGER, DIMENSION(:), ALLOCATABLE :: recvcounts, displs
      INTEGER send_type, myproc, nproc, local_comm, ierr, i						      INTEGER send_type, myproc, nproc, local_comm, ierr, i
   INCLUDE 'mpif.h'											   INCLUDE 'mpif.h'
      send_type = MPI_REAL										      send_type = MPI_REAL
      CALL wrf_get_dm_communicator ( local_comm )							      CALL wrf_get_dm_communicator ( local_comm )
      CALL wrf_get_nproc( nproc )									      CALL wrf_get_nproc( nproc )
      CALL wrf_get_myproc( myproc )									      CALL wrf_get_myproc( myproc )
      ALLOCATE( recvcounts(nproc), displs(nproc) )							      ALLOCATE( recvcounts(nproc), displs(nproc) )
      i = (km_e-km_s+1)*elemsize									      i = (km_e-km_s+1)*elemsize
      CALL mpi_allgather( i,1,MPI_INTEGER,recvcounts,1,MPI_INTEGER,local_comm,ierr) ;			      CALL mpi_allgather( i,1,MPI_INTEGER,recvcounts,1,MPI_INTEGER,local_comm,ierr) ;
      i = (km_s)*elemsize										      i = (km_s)*elemsize
      CALL mpi_allgather( i,1,MPI_INTEGER,displs,1,MPI_INTEGER,local_comm,ierr) ;			      CALL mpi_allgather( i,1,MPI_INTEGER,displs,1,MPI_INTEGER,local_comm,ierr) ;
#  ifdef USE_MPI_IN_PLACE										#  ifdef USE_MPI_IN_PLACE
      CALL mpi_allgatherv( MPI_IN_PLACE,                                  &				      CALL mpi_allgatherv( MPI_IN_PLACE,                                  &
#  else													#  else
      DO i = 1,elemsize*(km_e-km_s+1)									      DO i = 1,elemsize*(km_e-km_s+1)
        v_local(i) = v(i+elemsize*km_s-1)								        v_local(i) = v(i+elemsize*km_s-1)
      END DO												      ENDDO
      CALL mpi_allgatherv( v_local,                                       &				      CALL mpi_allgatherv( v_local,                                       &
#  endif												#  endif
                           (km_e-km_s+1)*elemsize,                        &				                           (km_e-km_s+1)*elemsize,                        &
                           send_type,                                     &				                           send_type,                                     &
                           v,                                             &				                           v,                                             &
                           recvcounts,                                    &				                           recvcounts,                                    &
                           displs,                                        &				                           displs,                                        &
                           send_type,                                     &				                           send_type,                                     &
                           local_comm,                                    &				                           local_comm,                                    &
                           ierr )									                           ierr )
      DEALLOCATE(recvcounts)										      DEALLOCATE(recvcounts)
      DEALLOCATE(displs)										      DEALLOCATE(displs)
#endif													#endif
      return												      return
     END SUBROUTINE wrf_dm_gatherv_single								     END SUBROUTINE wrf_dm_gatherv_single

      SUBROUTINE wrf_dm_decomp1d( nt, km_s, km_e )							      SUBROUTINE wrf_dm_decomp1d( nt, km_s, km_e )
       IMPLICIT NONE											       IMPLICIT NONE
       INTEGER, INTENT(IN)  :: nt									       INTEGER, INTENT(IN)  :: nt
       INTEGER, INTENT(OUT) :: km_s, km_e								       INTEGER, INTENT(OUT) :: km_s, km_e
     ! local												     ! local
       INTEGER nn, nnp,  na, nb										       INTEGER nn, nnp,  na, nb
       INTEGER myproc, nproc										       INTEGER myproc, nproc

       CALL wrf_get_myproc(myproc)									       CALL wrf_get_myproc(myproc)
       CALL wrf_get_nproc(nproc)									       CALL wrf_get_nproc(nproc)
       nn = nt / nproc           ! min number done by this task						       nn = nt / nproc           ! min number done by this task
       nnp = nn												       nnp = nn
       if ( myproc .lt. mod( nt, nproc ) )   nnp = nnp + 1 ! distribute remainder			       if ( myproc .lt. mod( nt, nproc ) )   nnp = nnp + 1 ! distribute remainder

       na = min( myproc, mod(nt,nproc) ) ! Number of blocks with remainder that precede this one	       na = min( myproc, mod(nt,nproc) ) ! Number of blocks with remainder that precede this one
       nb = max( 0, myproc - na )        ! number of blocks without a remainder that precede thi	       nb = max( 0, myproc - na )        ! number of blocks without a remainder that precede thi
       km_s = na * ( nn+1) + nb * nn     ! starting iteration for this task				       km_s = na * ( nn+1) + nb * nn     ! starting iteration for this task
       km_e = km_s + nnp - 1             ! ending iteration for this task				       km_e = km_s + nnp - 1             ! ending iteration for this task
      END SUBROUTINE wrf_dm_decomp1d									      END SUBROUTINE wrf_dm_decomp1d


SUBROUTINE wrf_dm_define_comms ( grid )									SUBROUTINE wrf_dm_define_comms ( grid )
   USE module_domain, ONLY : domain									   USE module_domain, ONLY : domain
   IMPLICIT NONE											   IMPLICIT NONE
   TYPE(domain) , INTENT (INOUT) :: grid								   TYPE(domain) , INTENT (INOUT) :: grid
   RETURN												   RETURN
END SUBROUTINE wrf_dm_define_comms									END SUBROUTINE wrf_dm_define_comms

SUBROUTINE tfp_message( fname, lno )									SUBROUTINE tfp_message( fname, lno )
   CHARACTER*(*) fname											   CHARACTER*(*) fname
   INTEGER lno												   INTEGER lno
   CHARACTER*1024 mess											   CHARACTER*1024 mess
#ifndef STUBMPI												#ifndef STUBMPI
   WRITE(mess,*)'tfp_message: ',trim(fname),lno								   WRITE(mess,*)'tfp_message: ',trim(fname),lno
   CALL wrf_message(mess)										   CALL wrf_message(mess)
# ifdef ALLOW_OVERDECOMP										# ifdef ALLOW_OVERDECOMP
     CALL task_for_point_message  ! defined in RSL_LITE/task_for_point.c				     CALL task_for_point_message  ! defined in RSL_LITE/task_for_point.c
# else													# else
     CALL wrf_error_fatal(mess)										     CALL wrf_error_fatal(mess)
# endif													# endif
#endif 													#endif 
END SUBROUTINE tfp_message										END SUBROUTINE tfp_message

   SUBROUTINE set_dm_debug 										   SUBROUTINE set_dm_debug 
    USE module_dm, ONLY : dm_debug_flag									    USE module_dm, ONLY : dm_debug_flag
    IMPLICIT NONE											    IMPLICIT NONE
    dm_debug_flag = .TRUE.										    dm_debug_flag = .TRUE.
   END SUBROUTINE set_dm_debug										   END SUBROUTINE set_dm_debug
   SUBROUTINE reset_dm_debug 										   SUBROUTINE reset_dm_debug 
    USE module_dm, ONLY : dm_debug_flag									    USE module_dm, ONLY : dm_debug_flag
    IMPLICIT NONE											    IMPLICIT NONE
    dm_debug_flag = .FALSE.										    dm_debug_flag = .FALSE.
   END SUBROUTINE reset_dm_debug									   END SUBROUTINE reset_dm_debug
   SUBROUTINE get_dm_debug ( arg )									   SUBROUTINE get_dm_debug ( arg )
    USE module_dm, ONLY : dm_debug_flag									    USE module_dm, ONLY : dm_debug_flag
    IMPLICIT NONE											    IMPLICIT NONE
    LOGICAL arg												    LOGICAL arg
    arg = dm_debug_flag											    arg = dm_debug_flag
   END SUBROUTINE get_dm_debug										   END SUBROUTINE get_dm_debug

>                                                 
>=================================================================================
>  frame/module_state_description.F
>=================================================================================
!STARTOFREGISTRYGENERATEDINCLUDE 'frame/module_state_description.F'					!STARTOFREGISTRYGENERATEDINCLUDE 'frame/module_state_description.F'
!													!
! WARNING This file is generated automatically by use_registry						! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.							! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.							! Do not edit.  Your changes to this file will be lost.
!													!
MODULE module_state_description										MODULE module_state_description
  ! package constants											  ! package constants
  INTEGER, PARAMETER :: passiveqv = 0									  INTEGER, PARAMETER :: passiveqv = 0
  INTEGER, PARAMETER :: kesslerscheme = 1								  INTEGER, PARAMETER :: kesslerscheme = 1
  INTEGER, PARAMETER :: linscheme = 2									  INTEGER, PARAMETER :: linscheme = 2
  INTEGER, PARAMETER :: wsm3scheme = 3									  INTEGER, PARAMETER :: wsm3scheme = 3
  INTEGER, PARAMETER :: wsm5scheme = 4									  INTEGER, PARAMETER :: wsm5scheme = 4
  INTEGER, PARAMETER :: fer_mp_hires = 5							   |	  INTEGER, PARAMETER :: etamp_hr = 5
  INTEGER, PARAMETER :: fer_mp_hires_advect = 15						   <
  INTEGER, PARAMETER :: wsm6scheme = 6									  INTEGER, PARAMETER :: wsm6scheme = 6
  INTEGER, PARAMETER :: gsfcgcescheme = 7								  INTEGER, PARAMETER :: gsfcgcescheme = 7
  INTEGER, PARAMETER :: thompson = 8									  INTEGER, PARAMETER :: thompson = 8
  INTEGER, PARAMETER :: milbrandt2mom = 9								  INTEGER, PARAMETER :: milbrandt2mom = 9
  INTEGER, PARAMETER :: morr_two_moment = 10								  INTEGER, PARAMETER :: morr_two_moment = 10
  INTEGER, PARAMETER :: cammgmpscheme = 11								  INTEGER, PARAMETER :: cammgmpscheme = 11
  INTEGER, PARAMETER :: sbu_ylinscheme = 13								  INTEGER, PARAMETER :: sbu_ylinscheme = 13
  INTEGER, PARAMETER :: wdm5scheme = 14									  INTEGER, PARAMETER :: wdm5scheme = 14
  INTEGER, PARAMETER :: wdm6scheme = 16									  INTEGER, PARAMETER :: wdm6scheme = 16
  INTEGER, PARAMETER :: nssl_2mom = 17									  INTEGER, PARAMETER :: nssl_2mom = 17
  INTEGER, PARAMETER :: nssl_2momccn = 18								  INTEGER, PARAMETER :: nssl_2momccn = 18
  INTEGER, PARAMETER :: nssl_1mom = 19									  INTEGER, PARAMETER :: nssl_1mom = 19
  INTEGER, PARAMETER :: nssl_1momlfo = 21								  INTEGER, PARAMETER :: nssl_1momlfo = 21
  INTEGER, PARAMETER :: nssl_2momg = 22									  INTEGER, PARAMETER :: nssl_2momg = 22
  INTEGER, PARAMETER :: thompsonaero = 28								  INTEGER, PARAMETER :: thompsonaero = 28
  INTEGER, PARAMETER :: p3_1category = 50							   <
  INTEGER, PARAMETER :: p3_1category_nc = 51							   <
  INTEGER, PARAMETER :: etampnew = 95									  INTEGER, PARAMETER :: etampnew = 95
  INTEGER, PARAMETER :: radar_refl = 1									  INTEGER, PARAMETER :: radar_refl = 1
  INTEGER, PARAMETER :: nodfimoist = -1									  INTEGER, PARAMETER :: nodfimoist = -1
  INTEGER, PARAMETER :: passiveqv_dfi = 0								  INTEGER, PARAMETER :: passiveqv_dfi = 0
  INTEGER, PARAMETER :: kesslerscheme_dfi = 1								  INTEGER, PARAMETER :: kesslerscheme_dfi = 1
  INTEGER, PARAMETER :: linscheme_dfi = 2								  INTEGER, PARAMETER :: linscheme_dfi = 2
  INTEGER, PARAMETER :: wsm3scheme_dfi = 3								  INTEGER, PARAMETER :: wsm3scheme_dfi = 3
  INTEGER, PARAMETER :: wsm5scheme_dfi = 4								  INTEGER, PARAMETER :: wsm5scheme_dfi = 4
  INTEGER, PARAMETER :: fer_mp_hires_dfi = 5							   |	  INTEGER, PARAMETER :: etamp_hr_dfi = 5
  INTEGER, PARAMETER :: wsm6scheme_dfi = 6								  INTEGER, PARAMETER :: wsm6scheme_dfi = 6
  INTEGER, PARAMETER :: gsfcgcescheme_dfi = 7								  INTEGER, PARAMETER :: gsfcgcescheme_dfi = 7
  INTEGER, PARAMETER :: thompson_dfi = 8								  INTEGER, PARAMETER :: thompson_dfi = 8
  INTEGER, PARAMETER :: milbrandt2mom_dfi = 9								  INTEGER, PARAMETER :: milbrandt2mom_dfi = 9
  INTEGER, PARAMETER :: morr_two_moment_dfi = 10							  INTEGER, PARAMETER :: morr_two_moment_dfi = 10
  INTEGER, PARAMETER :: wdm5scheme_dfi = 14								  INTEGER, PARAMETER :: wdm5scheme_dfi = 14
  INTEGER, PARAMETER :: wdm6scheme_dfi = 16								  INTEGER, PARAMETER :: wdm6scheme_dfi = 16
  INTEGER, PARAMETER :: nssl_2mom_dfi = 17								  INTEGER, PARAMETER :: nssl_2mom_dfi = 17
  INTEGER, PARAMETER :: nssl_2mom_dficcn = 18								  INTEGER, PARAMETER :: nssl_2mom_dficcn = 18
  INTEGER, PARAMETER :: nssl_1mom_dfi = 19								  INTEGER, PARAMETER :: nssl_1mom_dfi = 19
  INTEGER, PARAMETER :: nssl_1momlfo_dfi = 21								  INTEGER, PARAMETER :: nssl_1momlfo_dfi = 21
  INTEGER, PARAMETER :: thompsonaero_dfi = 28								  INTEGER, PARAMETER :: thompsonaero_dfi = 28
  INTEGER, PARAMETER :: p3_1category_dfi = 50							   <
  INTEGER, PARAMETER :: p3_1category_nc_dfi = 51						   <
  INTEGER, PARAMETER :: etampnew_dfi = 95								  INTEGER, PARAMETER :: etampnew_dfi = 95
  INTEGER, PARAMETER :: noprogn = 0									  INTEGER, PARAMETER :: noprogn = 0
  INTEGER, PARAMETER :: progndrop = 1									  INTEGER, PARAMETER :: progndrop = 1
  INTEGER, PARAMETER :: noqndrop = 0									  INTEGER, PARAMETER :: noqndrop = 0
  INTEGER, PARAMETER :: qndrop = 1									  INTEGER, PARAMETER :: qndrop = 1
  INTEGER, PARAMETER :: noprognchm = 0									  INTEGER, PARAMETER :: noprognchm = 0
  INTEGER, PARAMETER :: prognchm = 1									  INTEGER, PARAMETER :: prognchm = 1
  INTEGER, PARAMETER :: rrtmscheme = 1									  INTEGER, PARAMETER :: rrtmscheme = 1
  INTEGER, PARAMETER :: camlwscheme = 3									  INTEGER, PARAMETER :: camlwscheme = 3
  INTEGER, PARAMETER :: rrtmg_lwscheme = 4								  INTEGER, PARAMETER :: rrtmg_lwscheme = 4
  INTEGER, PARAMETER :: rrtmg_lwscheme_fast = 24							  INTEGER, PARAMETER :: rrtmg_lwscheme_fast = 24
  INTEGER, PARAMETER :: goddardlwscheme = 5								  INTEGER, PARAMETER :: goddardlwscheme = 5
  INTEGER, PARAMETER :: flglwscheme = 7									  INTEGER, PARAMETER :: flglwscheme = 7
  INTEGER, PARAMETER :: heldsuarez = 31									  INTEGER, PARAMETER :: heldsuarez = 31
  INTEGER, PARAMETER :: gfdllwscheme = 99								  INTEGER, PARAMETER :: gfdllwscheme = 99
  INTEGER, PARAMETER :: swradscheme = 1									  INTEGER, PARAMETER :: swradscheme = 1
  INTEGER, PARAMETER :: gsfcswscheme = 2								  INTEGER, PARAMETER :: gsfcswscheme = 2
  INTEGER, PARAMETER :: camswscheme = 3									  INTEGER, PARAMETER :: camswscheme = 3
  INTEGER, PARAMETER :: rrtmg_swscheme = 4								  INTEGER, PARAMETER :: rrtmg_swscheme = 4
  INTEGER, PARAMETER :: rrtmg_swscheme_fast = 24							  INTEGER, PARAMETER :: rrtmg_swscheme_fast = 24
  INTEGER, PARAMETER :: goddardswscheme = 5								  INTEGER, PARAMETER :: goddardswscheme = 5
  INTEGER, PARAMETER :: flgswscheme = 7									  INTEGER, PARAMETER :: flgswscheme = 7
  INTEGER, PARAMETER :: gfdlswscheme = 99								  INTEGER, PARAMETER :: gfdlswscheme = 99
  INTEGER, PARAMETER :: sfclayrevscheme = 1								  INTEGER, PARAMETER :: sfclayrevscheme = 1
  INTEGER, PARAMETER :: myjsfcscheme = 2								  INTEGER, PARAMETER :: myjsfcscheme = 2
  INTEGER, PARAMETER :: gfssfcscheme = 3								  INTEGER, PARAMETER :: gfssfcscheme = 3
  INTEGER, PARAMETER :: qnsesfcscheme = 4								  INTEGER, PARAMETER :: qnsesfcscheme = 4
  INTEGER, PARAMETER :: mynnsfcscheme = 5								  INTEGER, PARAMETER :: mynnsfcscheme = 5
  INTEGER, PARAMETER :: pxsfcscheme = 7									  INTEGER, PARAMETER :: pxsfcscheme = 7
  INTEGER, PARAMETER :: temfsfcscheme = 10								  INTEGER, PARAMETER :: temfsfcscheme = 10
  INTEGER, PARAMETER :: idealscmsfcscheme = 89								  INTEGER, PARAMETER :: idealscmsfcscheme = 89
  INTEGER, PARAMETER :: sfclayscheme = 91								  INTEGER, PARAMETER :: sfclayscheme = 91
  INTEGER, PARAMETER :: noahucmscheme = 1								  INTEGER, PARAMETER :: noahucmscheme = 1
  INTEGER, PARAMETER :: bepscheme = 2									  INTEGER, PARAMETER :: bepscheme = 2
  INTEGER, PARAMETER :: bep_bemscheme = 3								  INTEGER, PARAMETER :: bep_bemscheme = 3
  INTEGER, PARAMETER :: slabscheme = 1									  INTEGER, PARAMETER :: slabscheme = 1
  INTEGER, PARAMETER :: lsmscheme = 2									  INTEGER, PARAMETER :: lsmscheme = 2
  INTEGER, PARAMETER :: ruclsmscheme = 3								  INTEGER, PARAMETER :: ruclsmscheme = 3
  INTEGER, PARAMETER :: noahmpscheme = 4								  INTEGER, PARAMETER :: noahmpscheme = 4
  INTEGER, PARAMETER :: clmscheme = 5									  INTEGER, PARAMETER :: clmscheme = 5
  INTEGER, PARAMETER :: pxlsmscheme = 7									  INTEGER, PARAMETER :: pxlsmscheme = 7
  INTEGER, PARAMETER :: ssibscheme = 8									  INTEGER, PARAMETER :: ssibscheme = 8
  INTEGER, PARAMETER :: noahmosaicscheme = 1								  INTEGER, PARAMETER :: noahmosaicscheme = 1
  INTEGER, PARAMETER :: ysuscheme = 1									  INTEGER, PARAMETER :: ysuscheme = 1
  INTEGER, PARAMETER :: myjpblscheme = 2								  INTEGER, PARAMETER :: myjpblscheme = 2
  INTEGER, PARAMETER :: gfsscheme = 3									  INTEGER, PARAMETER :: gfsscheme = 3
  INTEGER, PARAMETER :: qnsepblscheme = 4								  INTEGER, PARAMETER :: qnsepblscheme = 4
  INTEGER, PARAMETER :: mynnpblscheme2 = 5								  INTEGER, PARAMETER :: mynnpblscheme2 = 5
  INTEGER, PARAMETER :: mynnpblscheme3 = 6								  INTEGER, PARAMETER :: mynnpblscheme3 = 6
  INTEGER, PARAMETER :: acmpblscheme = 7								  INTEGER, PARAMETER :: acmpblscheme = 7
  INTEGER, PARAMETER :: boulacscheme = 8								  INTEGER, PARAMETER :: boulacscheme = 8
  INTEGER, PARAMETER :: camuwpblscheme = 9								  INTEGER, PARAMETER :: camuwpblscheme = 9
  INTEGER, PARAMETER :: temfpblscheme = 10								  INTEGER, PARAMETER :: temfpblscheme = 10
  INTEGER, PARAMETER :: shinhongscheme = 11								  INTEGER, PARAMETER :: shinhongscheme = 11
  INTEGER, PARAMETER :: gbmpblscheme = 12								  INTEGER, PARAMETER :: gbmpblscheme = 12
  INTEGER, PARAMETER :: mrfscheme = 99									  INTEGER, PARAMETER :: mrfscheme = 99
  INTEGER, PARAMETER :: mynn_tkebudget = 1								  INTEGER, PARAMETER :: mynn_tkebudget = 1
  INTEGER, PARAMETER :: mynn_stem_edmf = 1							   <
  INTEGER, PARAMETER :: mynn_temf_edmf = 2							   <
  INTEGER, PARAMETER :: pbl_cloud = 1								   <
  INTEGER, PARAMETER :: mynnpblscheme2_dfi = 5							   <
  INTEGER, PARAMETER :: mynnpblscheme3_dfi = 6							   <
  INTEGER, PARAMETER :: nocuscheme = 0									  INTEGER, PARAMETER :: nocuscheme = 0
  INTEGER, PARAMETER :: kfetascheme = 1									  INTEGER, PARAMETER :: kfetascheme = 1
  INTEGER, PARAMETER :: bmjscheme = 2									  INTEGER, PARAMETER :: bmjscheme = 2
  INTEGER, PARAMETER :: gfscheme = 3									  INTEGER, PARAMETER :: gfscheme = 3
  INTEGER, PARAMETER :: scalesasscheme = 4							   |	  INTEGER, PARAMETER :: osasscheme = 4
  INTEGER, PARAMETER :: g3scheme = 5									  INTEGER, PARAMETER :: g3scheme = 5
  INTEGER, PARAMETER :: tiedtkescheme = 6								  INTEGER, PARAMETER :: tiedtkescheme = 6
  INTEGER, PARAMETER :: camzmscheme = 7									  INTEGER, PARAMETER :: camzmscheme = 7
  INTEGER, PARAMETER :: kfcupscheme = 10								  INTEGER, PARAMETER :: kfcupscheme = 10
  INTEGER, PARAMETER :: mskfscheme = 11									  INTEGER, PARAMETER :: mskfscheme = 11
  INTEGER, PARAMETER :: nsasscheme = 14									  INTEGER, PARAMETER :: nsasscheme = 14
  INTEGER, PARAMETER :: ntiedtkescheme = 16								  INTEGER, PARAMETER :: ntiedtkescheme = 16
  INTEGER, PARAMETER :: gdscheme = 93									  INTEGER, PARAMETER :: gdscheme = 93
  INTEGER, PARAMETER :: sasscheme = 94								   |	  INTEGER, PARAMETER :: sasscheme = 84
  INTEGER, PARAMETER :: osasscheme = 95								   |	  INTEGER, PARAMETER :: meso_sas = 85
  INTEGER, PARAMETER :: kfscheme = 99									  INTEGER, PARAMETER :: kfscheme = 99
  INTEGER, PARAMETER :: g3tave = 1									  INTEGER, PARAMETER :: g3tave = 1
  INTEGER, PARAMETER :: kfedrates = 1								   <
  INTEGER, PARAMETER :: no_cu_used = 0									  INTEGER, PARAMETER :: no_cu_used = 0
  INTEGER, PARAMETER :: any_cu_used = 1									  INTEGER, PARAMETER :: any_cu_used = 1
  INTEGER, PARAMETER :: no_cam_used = 0									  INTEGER, PARAMETER :: no_cam_used = 0
  INTEGER, PARAMETER :: any_cam_used = 1								  INTEGER, PARAMETER :: any_cam_used = 1
  INTEGER, PARAMETER :: noshcuscheme = 0								  INTEGER, PARAMETER :: noshcuscheme = 0
  INTEGER, PARAMETER :: g3shcuscheme = 1								  INTEGER, PARAMETER :: g3shcuscheme = 1
  INTEGER, PARAMETER :: camuwshcuscheme = 2								  INTEGER, PARAMETER :: camuwshcuscheme = 2
  INTEGER, PARAMETER :: grimsshcuscheme = 3								  INTEGER, PARAMETER :: grimsshcuscheme = 3
  INTEGER, PARAMETER :: no_shcu_used = 0								  INTEGER, PARAMETER :: no_shcu_used = 0
  INTEGER, PARAMETER :: any_shcu_used = 1								  INTEGER, PARAMETER :: any_shcu_used = 1
  INTEGER, PARAMETER :: fogsettling0 = 0								  INTEGER, PARAMETER :: fogsettling0 = 0
  INTEGER, PARAMETER :: fogsettling1 = 1								  INTEGER, PARAMETER :: fogsettling1 = 1
  INTEGER, PARAMETER :: fogsettling2 = 2								  INTEGER, PARAMETER :: fogsettling2 = 2
  INTEGER, PARAMETER :: psufddagd = 1									  INTEGER, PARAMETER :: psufddagd = 1
  INTEGER, PARAMETER :: spnudging = 2									  INTEGER, PARAMETER :: spnudging = 2
  INTEGER, PARAMETER :: psusfddagd = 1									  INTEGER, PARAMETER :: psusfddagd = 1
  INTEGER, PARAMETER :: obsnudging = 1									  INTEGER, PARAMETER :: obsnudging = 1
  INTEGER, PARAMETER :: fasdas = 2								   <
  INTEGER, PARAMETER :: aeropt1 = 1									  INTEGER, PARAMETER :: aeropt1 = 1
  INTEGER, PARAMETER :: aeropt2 = 2									  INTEGER, PARAMETER :: aeropt2 = 2
  INTEGER, PARAMETER :: slopeopt = 1									  INTEGER, PARAMETER :: slopeopt = 1
  INTEGER, PARAMETER :: gwdopt = 1									  INTEGER, PARAMETER :: gwdopt = 1
  INTEGER, PARAMETER :: omlscheme = 1									  INTEGER, PARAMETER :: omlscheme = 1
  INTEGER, PARAMETER :: pwp3dscheme = 2									  INTEGER, PARAMETER :: pwp3dscheme = 2
  INTEGER, PARAMETER :: scmopt = 1									  INTEGER, PARAMETER :: scmopt = 1
  INTEGER, PARAMETER :: prec_acc = 1									  INTEGER, PARAMETER :: prec_acc = 1
  INTEGER, PARAMETER :: bucketropt = 1									  INTEGER, PARAMETER :: bucketropt = 1
  INTEGER, PARAMETER :: bucketfopt = 1								   |	  INTEGER, PARAMETER :: restofwrf = 0
  INTEGER, PARAMETER :: original_mom = 1								  INTEGER, PARAMETER :: original_mom = 1
  INTEGER, PARAMETER :: weno_mom = 3									  INTEGER, PARAMETER :: weno_mom = 3
  INTEGER, PARAMETER :: original = 0									  INTEGER, PARAMETER :: original = 0
  INTEGER, PARAMETER :: positivedef = 1									  INTEGER, PARAMETER :: positivedef = 1
  INTEGER, PARAMETER :: monotonic = 2									  INTEGER, PARAMETER :: monotonic = 2
  INTEGER, PARAMETER :: weno_scalar = 3									  INTEGER, PARAMETER :: weno_scalar = 3
  INTEGER, PARAMETER :: wenopd_scalar = 4								  INTEGER, PARAMETER :: wenopd_scalar = 4
  INTEGER, PARAMETER :: maxmin_output = 1								  INTEGER, PARAMETER :: maxmin_output = 1
  INTEGER, PARAMETER :: nwp_output = 1									  INTEGER, PARAMETER :: nwp_output = 1
  INTEGER, PARAMETER :: dfi_setup = 0									  INTEGER, PARAMETER :: dfi_setup = 0
  INTEGER, PARAMETER :: dfi_bck = 1									  INTEGER, PARAMETER :: dfi_bck = 1
  INTEGER, PARAMETER :: dfi_fwd = 2									  INTEGER, PARAMETER :: dfi_fwd = 2
  INTEGER, PARAMETER :: dfi_fst = 3									  INTEGER, PARAMETER :: dfi_fst = 3
  INTEGER, PARAMETER :: dfi_startfwd = 4								  INTEGER, PARAMETER :: dfi_startfwd = 4
  INTEGER, PARAMETER :: dfi_startbck = 5								  INTEGER, PARAMETER :: dfi_startbck = 5
  INTEGER, PARAMETER :: dfi_nodfi = 0									  INTEGER, PARAMETER :: dfi_nodfi = 0
  INTEGER, PARAMETER :: dfi_dfl = 1									  INTEGER, PARAMETER :: dfi_dfl = 1
  INTEGER, PARAMETER :: dfi_ddfi = 2									  INTEGER, PARAMETER :: dfi_ddfi = 2
  INTEGER, PARAMETER :: dfi_tdfi = 3									  INTEGER, PARAMETER :: dfi_tdfi = 3
												   >	  INTEGER, PARAMETER :: realonly = 1
												   >	  INTEGER, PARAMETER :: tconly = 2
  INTEGER, PARAMETER :: reg_interp = 0									  INTEGER, PARAMETER :: reg_interp = 0
  INTEGER, PARAMETER :: flat_p_interp = 1								  INTEGER, PARAMETER :: flat_p_interp = 1
  INTEGER, PARAMETER :: notenddiag = 0									  INTEGER, PARAMETER :: notenddiag = 0
  INTEGER, PARAMETER :: usetenddiag = 1									  INTEGER, PARAMETER :: usetenddiag = 1
  INTEGER, PARAMETER :: no_trajectory = 0								  INTEGER, PARAMETER :: no_trajectory = 0
  INTEGER, PARAMETER :: um_trajectory = 1								  INTEGER, PARAMETER :: um_trajectory = 1
  INTEGER, PARAMETER :: albsi_zero = 0									  INTEGER, PARAMETER :: albsi_zero = 0
  INTEGER, PARAMETER :: albsi_one = 1									  INTEGER, PARAMETER :: albsi_one = 1
  INTEGER, PARAMETER :: albsi_two = 2									  INTEGER, PARAMETER :: albsi_two = 2
  INTEGER, PARAMETER :: snowsi_zero = 0									  INTEGER, PARAMETER :: snowsi_zero = 0
  INTEGER, PARAMETER :: snowsi_one = 1									  INTEGER, PARAMETER :: snowsi_one = 1
  INTEGER, PARAMETER :: icedepth_zero = 0								  INTEGER, PARAMETER :: icedepth_zero = 0
  INTEGER, PARAMETER :: icedepth_one = 1								  INTEGER, PARAMETER :: icedepth_one = 1
  INTEGER, PARAMETER :: notseries = 0									  INTEGER, PARAMETER :: notseries = 0
  INTEGER, PARAMETER :: tseries = 1									  INTEGER, PARAMETER :: tseries = 1
  INTEGER, PARAMETER :: hailcast = 1								   <
  INTEGER, PARAMETER :: ltng_none = 0									  INTEGER, PARAMETER :: ltng_none = 0
  INTEGER, PARAMETER :: ltng_crm_pr92w = 1								  INTEGER, PARAMETER :: ltng_crm_pr92w = 1
  INTEGER, PARAMETER :: ltng_crm_pr92z = 2								  INTEGER, PARAMETER :: ltng_crm_pr92z = 2
  INTEGER, PARAMETER :: ltng_cpm_pr92z = 11								  INTEGER, PARAMETER :: ltng_cpm_pr92z = 11
  INTEGER, PARAMETER :: ltng_lpi = 3									  INTEGER, PARAMETER :: ltng_lpi = 3
  INTEGER, PARAMETER :: io_intio = 1									  INTEGER, PARAMETER :: io_intio = 1
  INTEGER, PARAMETER :: io_netcdf = 2									  INTEGER, PARAMETER :: io_netcdf = 2
  INTEGER, PARAMETER :: io_hdf = 3									  INTEGER, PARAMETER :: io_hdf = 3
  INTEGER, PARAMETER :: io_phdf5 = 4									  INTEGER, PARAMETER :: io_phdf5 = 4
  INTEGER, PARAMETER :: io_grib1 = 5									  INTEGER, PARAMETER :: io_grib1 = 5
  INTEGER, PARAMETER :: io_mcel = 6									  INTEGER, PARAMETER :: io_mcel = 6
  INTEGER, PARAMETER :: io_esmf = 7									  INTEGER, PARAMETER :: io_esmf = 7
  INTEGER, PARAMETER :: io_yyy = 8									  INTEGER, PARAMETER :: io_yyy = 8
  INTEGER, PARAMETER :: io_zzz = 9									  INTEGER, PARAMETER :: io_zzz = 9
  INTEGER, PARAMETER :: io_grib2 = 10									  INTEGER, PARAMETER :: io_grib2 = 10
  INTEGER, PARAMETER :: io_pnetcdf = 11									  INTEGER, PARAMETER :: io_pnetcdf = 11
  INTEGER, PARAMETER :: io_pio = 12									  INTEGER, PARAMETER :: io_pio = 12
  INTEGER, PARAMETER :: no_wrfhydro = 0									  INTEGER, PARAMETER :: no_wrfhydro = 0
  INTEGER, PARAMETER :: wrfhydro = 1									  INTEGER, PARAMETER :: wrfhydro = 1
  INTEGER, PARAMETER :: no_windfarm = 0									  INTEGER, PARAMETER :: no_windfarm = 0
  INTEGER, PARAMETER :: fitchscheme = 1									  INTEGER, PARAMETER :: fitchscheme = 1
  INTEGER, PARAMETER :: no_fft_used = 0									  INTEGER, PARAMETER :: no_fft_used = 0
  INTEGER, PARAMETER :: any_fft_used = 1								  INTEGER, PARAMETER :: any_fft_used = 1
  INTEGER, PARAMETER :: fire_sfire = 2									  INTEGER, PARAMETER :: fire_sfire = 2
  INTEGER, PARAMETER :: noavgflxem = 0									  INTEGER, PARAMETER :: noavgflxem = 0
  INTEGER, PARAMETER :: avgflxem = 1									  INTEGER, PARAMETER :: avgflxem = 1
  INTEGER, PARAMETER :: noavgflxcugd = 0								  INTEGER, PARAMETER :: noavgflxcugd = 0
  INTEGER, PARAMETER :: avgflxcugd = 1									  INTEGER, PARAMETER :: avgflxcugd = 1
  INTEGER, PARAMETER :: sppt_perturb = 1								  INTEGER, PARAMETER :: sppt_perturb = 1
  INTEGER, PARAMETER :: skebs_perturb = 1							   <
  INTEGER, PARAMETER :: random_perturb = 1								  INTEGER, PARAMETER :: random_perturb = 1
  INTEGER, PARAMETER :: stoch_param_perturb = 1							   |	  INTEGER, PARAMETER :: skebs_perturb = 1
  INTEGER, PARAMETER :: nosfs = 0									  INTEGER, PARAMETER :: nosfs = 0
  INTEGER, PARAMETER :: nba1 = 1									  INTEGER, PARAMETER :: nba1 = 1
  INTEGER, PARAMETER :: nba2 = 2									  INTEGER, PARAMETER :: nba2 = 2
  INTEGER, PARAMETER :: mout = 1									  INTEGER, PARAMETER :: mout = 1
  INTEGER, PARAMETER :: nolake = 0									  INTEGER, PARAMETER :: nolake = 0
  INTEGER, PARAMETER :: simple_lake = 1									  INTEGER, PARAMETER :: simple_lake = 1
  INTEGER, PARAMETER :: skip_press_diags = 0								  INTEGER, PARAMETER :: skip_press_diags = 0
  INTEGER, PARAMETER :: press_diags = 1									  INTEGER, PARAMETER :: press_diags = 1
  INTEGER, PARAMETER :: skip_z_diags = 0								  INTEGER, PARAMETER :: skip_z_diags = 0
  INTEGER, PARAMETER :: z_diags = 1									  INTEGER, PARAMETER :: z_diags = 1
  INTEGER, PARAMETER :: afwa_diag = 1									  INTEGER, PARAMETER :: afwa_diag = 1
  INTEGER, PARAMETER :: afwa_ptype = 1									  INTEGER, PARAMETER :: afwa_ptype = 1
  INTEGER, PARAMETER :: afwa_vil = 1									  INTEGER, PARAMETER :: afwa_vil = 1
  INTEGER, PARAMETER :: afwa_radar = 1									  INTEGER, PARAMETER :: afwa_radar = 1
  INTEGER, PARAMETER :: afwa_severe = 1									  INTEGER, PARAMETER :: afwa_severe = 1
  INTEGER, PARAMETER :: afwa_icing = 1									  INTEGER, PARAMETER :: afwa_icing = 1
  INTEGER, PARAMETER :: afwa_cloud = 1									  INTEGER, PARAMETER :: afwa_cloud = 1
  INTEGER, PARAMETER :: afwa_vis = 1									  INTEGER, PARAMETER :: afwa_vis = 1
  INTEGER, PARAMETER :: afwa_therm = 1									  INTEGER, PARAMETER :: afwa_therm = 1
  INTEGER, PARAMETER :: afwa_turb = 1									  INTEGER, PARAMETER :: afwa_turb = 1
  INTEGER, PARAMETER :: afwa_buoy = 1									  INTEGER, PARAMETER :: afwa_buoy = 1
												   >	  INTEGER, PARAMETER :: afwa_hailcast = 1
  INTEGER, PARAMETER :: fast_khain_lynn = 30								  INTEGER, PARAMETER :: fast_khain_lynn = 30
  INTEGER, PARAMETER :: full_khain_lynn = 32								  INTEGER, PARAMETER :: full_khain_lynn = 32
  INTEGER, PARAMETER :: no_perturb_bdy = 0								  INTEGER, PARAMETER :: no_perturb_bdy = 0
  INTEGER, PARAMETER :: perturb_bdy_with_skebs = 1							  INTEGER, PARAMETER :: perturb_bdy_with_skebs = 1
  INTEGER, PARAMETER :: perturb_bdy_user_patrn = 2							  INTEGER, PARAMETER :: perturb_bdy_user_patrn = 2
  INTEGER, PARAMETER :: perturb_chem_bdy_with_rand = 1							  INTEGER, PARAMETER :: perturb_chem_bdy_with_rand = 1
  INTEGER, PARAMETER :: tracer_test1 = 2								  INTEGER, PARAMETER :: tracer_test1 = 2
  INTEGER, PARAMETER :: restofwrf = 0								   <
  INTEGER, PARAMETER :: realonly = 1								   <
  INTEGER, PARAMETER :: tconly = 2								   <
  ! 4D array constants											  ! 4D array constants
  INTEGER, PARAMETER :: PARAM_qv = 1									  INTEGER, PARAMETER :: PARAM_qv = 1
  INTEGER            ::     P_qv = 1									  INTEGER            ::     P_qv = 1
  LOGICAL            ::     F_qv = .FALSE.								  LOGICAL            ::     F_qv = .FALSE.
  INTEGER, PARAMETER :: PARAM_qc = 2									  INTEGER, PARAMETER :: PARAM_qc = 2
  INTEGER            ::     P_qc = 1									  INTEGER            ::     P_qc = 1
  LOGICAL            ::     F_qc = .FALSE.								  LOGICAL            ::     F_qc = .FALSE.
  INTEGER, PARAMETER :: PARAM_qr = 3									  INTEGER, PARAMETER :: PARAM_qr = 3
  INTEGER            ::     P_qr = 1									  INTEGER            ::     P_qr = 1
  LOGICAL            ::     F_qr = .FALSE.								  LOGICAL            ::     F_qr = .FALSE.
  INTEGER, PARAMETER :: PARAM_qi = 4									  INTEGER, PARAMETER :: PARAM_qi = 4
  INTEGER            ::     P_qi = 1									  INTEGER            ::     P_qi = 1
  LOGICAL            ::     F_qi = .FALSE.								  LOGICAL            ::     F_qi = .FALSE.
  INTEGER, PARAMETER :: PARAM_qs = 5									  INTEGER, PARAMETER :: PARAM_qs = 5
  INTEGER            ::     P_qs = 1									  INTEGER            ::     P_qs = 1
  LOGICAL            ::     F_qs = .FALSE.								  LOGICAL            ::     F_qs = .FALSE.
  INTEGER, PARAMETER :: PARAM_qg = 6									  INTEGER, PARAMETER :: PARAM_qg = 6
  INTEGER            ::     P_qg = 1									  INTEGER            ::     P_qg = 1
  LOGICAL            ::     F_qg = .FALSE.								  LOGICAL            ::     F_qg = .FALSE.
  INTEGER, PARAMETER :: PARAM_qh = 7									  INTEGER, PARAMETER :: PARAM_qh = 7
  INTEGER            ::     P_qh = 1									  INTEGER            ::     P_qh = 1
  LOGICAL            ::     F_qh = .FALSE.								  LOGICAL            ::     F_qh = .FALSE.
  INTEGER, PARAMETER :: PARAM_qip = 8									  INTEGER, PARAMETER :: PARAM_qip = 8
  INTEGER            ::     P_qip = 1									  INTEGER            ::     P_qip = 1
  LOGICAL            ::     F_qip = .FALSE.								  LOGICAL            ::     F_qip = .FALSE.
  INTEGER, PARAMETER :: PARAM_qic = 9									  INTEGER, PARAMETER :: PARAM_qic = 9
  INTEGER            ::     P_qic = 1									  INTEGER            ::     P_qic = 1
  LOGICAL            ::     F_qic = .FALSE.								  LOGICAL            ::     F_qic = .FALSE.
  INTEGER, PARAMETER :: PARAM_qid = 10									  INTEGER, PARAMETER :: PARAM_qid = 10
  INTEGER            ::     P_qid = 1									  INTEGER            ::     P_qid = 1
  LOGICAL            ::     F_qid = .FALSE.								  LOGICAL            ::     F_qid = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_moist = 11								  INTEGER, PARAMETER :: PARAM_NUM_moist = 11
  INTEGER            ::       NUM_moist = 1								  INTEGER            ::       NUM_moist = 1
  INTEGER, PARAMETER :: PARAM_dfi_qv = 1								  INTEGER, PARAMETER :: PARAM_dfi_qv = 1
  INTEGER            ::     P_dfi_qv = 1								  INTEGER            ::     P_dfi_qv = 1
  LOGICAL            ::     F_dfi_qv = .FALSE.								  LOGICAL            ::     F_dfi_qv = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qc = 2								  INTEGER, PARAMETER :: PARAM_dfi_qc = 2
  INTEGER            ::     P_dfi_qc = 1								  INTEGER            ::     P_dfi_qc = 1
  LOGICAL            ::     F_dfi_qc = .FALSE.								  LOGICAL            ::     F_dfi_qc = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qr = 3								  INTEGER, PARAMETER :: PARAM_dfi_qr = 3
  INTEGER            ::     P_dfi_qr = 1								  INTEGER            ::     P_dfi_qr = 1
  LOGICAL            ::     F_dfi_qr = .FALSE.								  LOGICAL            ::     F_dfi_qr = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qi = 4								  INTEGER, PARAMETER :: PARAM_dfi_qi = 4
  INTEGER            ::     P_dfi_qi = 1								  INTEGER            ::     P_dfi_qi = 1
  LOGICAL            ::     F_dfi_qi = .FALSE.								  LOGICAL            ::     F_dfi_qi = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qs = 5								  INTEGER, PARAMETER :: PARAM_dfi_qs = 5
  INTEGER            ::     P_dfi_qs = 1								  INTEGER            ::     P_dfi_qs = 1
  LOGICAL            ::     F_dfi_qs = .FALSE.								  LOGICAL            ::     F_dfi_qs = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qg = 6								  INTEGER, PARAMETER :: PARAM_dfi_qg = 6
  INTEGER            ::     P_dfi_qg = 1								  INTEGER            ::     P_dfi_qg = 1
  LOGICAL            ::     F_dfi_qg = .FALSE.								  LOGICAL            ::     F_dfi_qg = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qh = 7								  INTEGER, PARAMETER :: PARAM_dfi_qh = 7
  INTEGER            ::     P_dfi_qh = 1								  INTEGER            ::     P_dfi_qh = 1
  LOGICAL            ::     F_dfi_qh = .FALSE.								  LOGICAL            ::     F_dfi_qh = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_dfi_moist = 8								  INTEGER, PARAMETER :: PARAM_NUM_dfi_moist = 8
  INTEGER            ::       NUM_dfi_moist = 1								  INTEGER            ::       NUM_dfi_moist = 1
  INTEGER, PARAMETER :: PARAM_qndrop = 1								  INTEGER, PARAMETER :: PARAM_qndrop = 1
  INTEGER            ::     P_qndrop = 1								  INTEGER            ::     P_qndrop = 1
  LOGICAL            ::     F_qndrop = .FALSE.								  LOGICAL            ::     F_qndrop = .FALSE.
  INTEGER, PARAMETER :: PARAM_qni = 2									  INTEGER, PARAMETER :: PARAM_qni = 2
  INTEGER            ::     P_qni = 1									  INTEGER            ::     P_qni = 1
  LOGICAL            ::     F_qni = .FALSE.								  LOGICAL            ::     F_qni = .FALSE.
  INTEGER, PARAMETER :: PARAM_qt = 3									  INTEGER, PARAMETER :: PARAM_qt = 3
  INTEGER            ::     P_qt = 1									  INTEGER            ::     P_qt = 1
  LOGICAL            ::     F_qt = .FALSE.								  LOGICAL            ::     F_qt = .FALSE.
  INTEGER, PARAMETER :: PARAM_qns = 4									  INTEGER, PARAMETER :: PARAM_qns = 4
  INTEGER            ::     P_qns = 1									  INTEGER            ::     P_qns = 1
  LOGICAL            ::     F_qns = .FALSE.								  LOGICAL            ::     F_qns = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnr = 5									  INTEGER, PARAMETER :: PARAM_qnr = 5
  INTEGER            ::     P_qnr = 1									  INTEGER            ::     P_qnr = 1
  LOGICAL            ::     F_qnr = .FALSE.								  LOGICAL            ::     F_qnr = .FALSE.
  INTEGER, PARAMETER :: PARAM_qng = 6									  INTEGER, PARAMETER :: PARAM_qng = 6
  INTEGER            ::     P_qng = 1									  INTEGER            ::     P_qng = 1
  LOGICAL            ::     F_qng = .FALSE.								  LOGICAL            ::     F_qng = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnh = 7									  INTEGER, PARAMETER :: PARAM_qnh = 7
  INTEGER            ::     P_qnh = 1									  INTEGER            ::     P_qnh = 1
  LOGICAL            ::     F_qnh = .FALSE.								  LOGICAL            ::     F_qnh = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnn = 8									  INTEGER, PARAMETER :: PARAM_qnn = 8
  INTEGER            ::     P_qnn = 1									  INTEGER            ::     P_qnn = 1
  LOGICAL            ::     F_qnn = .FALSE.								  LOGICAL            ::     F_qnn = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnc = 9									  INTEGER, PARAMETER :: PARAM_qnc = 9
  INTEGER            ::     P_qnc = 1									  INTEGER            ::     P_qnc = 1
  LOGICAL            ::     F_qnc = .FALSE.								  LOGICAL            ::     F_qnc = .FALSE.
  INTEGER, PARAMETER :: PARAM_qvolg = 10							   |	  INTEGER, PARAMETER :: PARAM_qnwfa = 10
												   >	  INTEGER            ::     P_qnwfa = 1
												   >	  LOGICAL            ::     F_qnwfa = .FALSE.
												   >	  INTEGER, PARAMETER :: PARAM_qnifa = 11
												   >	  INTEGER            ::     P_qnifa = 1
												   >	  LOGICAL            ::     F_qnifa = .FALSE.
												   >	  INTEGER, PARAMETER :: PARAM_qvolg = 12
  INTEGER            ::     P_qvolg = 1									  INTEGER            ::     P_qvolg = 1
  LOGICAL            ::     F_qvolg = .FALSE.								  LOGICAL            ::     F_qvolg = .FALSE.
  INTEGER, PARAMETER :: PARAM_qvolh = 11							   |	  INTEGER, PARAMETER :: PARAM_qvolh = 13
  INTEGER            ::     P_qvolh = 1									  INTEGER            ::     P_qvolh = 1
  LOGICAL            ::     F_qvolh = .FALSE.								  LOGICAL            ::     F_qvolh = .FALSE.
  INTEGER, PARAMETER :: PARAM_qrimef = 12							   |	  INTEGER, PARAMETER :: PARAM_qke_adv = 14
  INTEGER            ::     P_qrimef = 1							   <
  LOGICAL            ::     F_qrimef = .FALSE.							   <
  INTEGER, PARAMETER :: PARAM_qir = 13								   <
  INTEGER            ::     P_qir = 1								   <
  LOGICAL            ::     F_qir = .FALSE.							   <
  INTEGER, PARAMETER :: PARAM_qib = 14								   <
  INTEGER            ::     P_qib = 1								   <
  LOGICAL            ::     F_qib = .FALSE.							   <
  INTEGER, PARAMETER :: PARAM_qke_adv = 15							   <
  INTEGER            ::     P_qke_adv = 1								  INTEGER            ::     P_qke_adv = 1
  LOGICAL            ::     F_qke_adv = .FALSE.								  LOGICAL            ::     F_qke_adv = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i01 = 16							   |	  INTEGER, PARAMETER :: PARAM_ff1i01 = 15
  INTEGER            ::     P_ff1i01 = 1								  INTEGER            ::     P_ff1i01 = 1
  LOGICAL            ::     F_ff1i01 = .FALSE.								  LOGICAL            ::     F_ff1i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i02 = 17							   |	  INTEGER, PARAMETER :: PARAM_ff1i02 = 16
  INTEGER            ::     P_ff1i02 = 1								  INTEGER            ::     P_ff1i02 = 1
  LOGICAL            ::     F_ff1i02 = .FALSE.								  LOGICAL            ::     F_ff1i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i03 = 18							   |	  INTEGER, PARAMETER :: PARAM_ff1i03 = 17
  INTEGER            ::     P_ff1i03 = 1								  INTEGER            ::     P_ff1i03 = 1
  LOGICAL            ::     F_ff1i03 = .FALSE.								  LOGICAL            ::     F_ff1i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i04 = 19							   |	  INTEGER, PARAMETER :: PARAM_ff1i04 = 18
  INTEGER            ::     P_ff1i04 = 1								  INTEGER            ::     P_ff1i04 = 1
  LOGICAL            ::     F_ff1i04 = .FALSE.								  LOGICAL            ::     F_ff1i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i05 = 20							   |	  INTEGER, PARAMETER :: PARAM_ff1i05 = 19
  INTEGER            ::     P_ff1i05 = 1								  INTEGER            ::     P_ff1i05 = 1
  LOGICAL            ::     F_ff1i05 = .FALSE.								  LOGICAL            ::     F_ff1i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i06 = 21							   |	  INTEGER, PARAMETER :: PARAM_ff1i06 = 20
  INTEGER            ::     P_ff1i06 = 1								  INTEGER            ::     P_ff1i06 = 1
  LOGICAL            ::     F_ff1i06 = .FALSE.								  LOGICAL            ::     F_ff1i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i07 = 22							   |	  INTEGER, PARAMETER :: PARAM_ff1i07 = 21
  INTEGER            ::     P_ff1i07 = 1								  INTEGER            ::     P_ff1i07 = 1
  LOGICAL            ::     F_ff1i07 = .FALSE.								  LOGICAL            ::     F_ff1i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i08 = 23							   |	  INTEGER, PARAMETER :: PARAM_ff1i08 = 22
  INTEGER            ::     P_ff1i08 = 1								  INTEGER            ::     P_ff1i08 = 1
  LOGICAL            ::     F_ff1i08 = .FALSE.								  LOGICAL            ::     F_ff1i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i09 = 24							   |	  INTEGER, PARAMETER :: PARAM_ff1i09 = 23
  INTEGER            ::     P_ff1i09 = 1								  INTEGER            ::     P_ff1i09 = 1
  LOGICAL            ::     F_ff1i09 = .FALSE.								  LOGICAL            ::     F_ff1i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i10 = 25							   |	  INTEGER, PARAMETER :: PARAM_ff1i10 = 24
  INTEGER            ::     P_ff1i10 = 1								  INTEGER            ::     P_ff1i10 = 1
  LOGICAL            ::     F_ff1i10 = .FALSE.								  LOGICAL            ::     F_ff1i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i11 = 26							   |	  INTEGER, PARAMETER :: PARAM_ff1i11 = 25
  INTEGER            ::     P_ff1i11 = 1								  INTEGER            ::     P_ff1i11 = 1
  LOGICAL            ::     F_ff1i11 = .FALSE.								  LOGICAL            ::     F_ff1i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i12 = 27							   |	  INTEGER, PARAMETER :: PARAM_ff1i12 = 26
  INTEGER            ::     P_ff1i12 = 1								  INTEGER            ::     P_ff1i12 = 1
  LOGICAL            ::     F_ff1i12 = .FALSE.								  LOGICAL            ::     F_ff1i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i13 = 28							   |	  INTEGER, PARAMETER :: PARAM_ff1i13 = 27
  INTEGER            ::     P_ff1i13 = 1								  INTEGER            ::     P_ff1i13 = 1
  LOGICAL            ::     F_ff1i13 = .FALSE.								  LOGICAL            ::     F_ff1i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i14 = 29							   |	  INTEGER, PARAMETER :: PARAM_ff1i14 = 28
  INTEGER            ::     P_ff1i14 = 1								  INTEGER            ::     P_ff1i14 = 1
  LOGICAL            ::     F_ff1i14 = .FALSE.								  LOGICAL            ::     F_ff1i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i15 = 30							   |	  INTEGER, PARAMETER :: PARAM_ff1i15 = 29
  INTEGER            ::     P_ff1i15 = 1								  INTEGER            ::     P_ff1i15 = 1
  LOGICAL            ::     F_ff1i15 = .FALSE.								  LOGICAL            ::     F_ff1i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i16 = 31							   |	  INTEGER, PARAMETER :: PARAM_ff1i16 = 30
  INTEGER            ::     P_ff1i16 = 1								  INTEGER            ::     P_ff1i16 = 1
  LOGICAL            ::     F_ff1i16 = .FALSE.								  LOGICAL            ::     F_ff1i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i17 = 32							   |	  INTEGER, PARAMETER :: PARAM_ff1i17 = 31
  INTEGER            ::     P_ff1i17 = 1								  INTEGER            ::     P_ff1i17 = 1
  LOGICAL            ::     F_ff1i17 = .FALSE.								  LOGICAL            ::     F_ff1i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i18 = 33							   |	  INTEGER, PARAMETER :: PARAM_ff1i18 = 32
  INTEGER            ::     P_ff1i18 = 1								  INTEGER            ::     P_ff1i18 = 1
  LOGICAL            ::     F_ff1i18 = .FALSE.								  LOGICAL            ::     F_ff1i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i19 = 34							   |	  INTEGER, PARAMETER :: PARAM_ff1i19 = 33
  INTEGER            ::     P_ff1i19 = 1								  INTEGER            ::     P_ff1i19 = 1
  LOGICAL            ::     F_ff1i19 = .FALSE.								  LOGICAL            ::     F_ff1i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i20 = 35							   |	  INTEGER, PARAMETER :: PARAM_ff1i20 = 34
  INTEGER            ::     P_ff1i20 = 1								  INTEGER            ::     P_ff1i20 = 1
  LOGICAL            ::     F_ff1i20 = .FALSE.								  LOGICAL            ::     F_ff1i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i21 = 36							   |	  INTEGER, PARAMETER :: PARAM_ff1i21 = 35
  INTEGER            ::     P_ff1i21 = 1								  INTEGER            ::     P_ff1i21 = 1
  LOGICAL            ::     F_ff1i21 = .FALSE.								  LOGICAL            ::     F_ff1i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i22 = 37							   |	  INTEGER, PARAMETER :: PARAM_ff1i22 = 36
  INTEGER            ::     P_ff1i22 = 1								  INTEGER            ::     P_ff1i22 = 1
  LOGICAL            ::     F_ff1i22 = .FALSE.								  LOGICAL            ::     F_ff1i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i23 = 38							   |	  INTEGER, PARAMETER :: PARAM_ff1i23 = 37
  INTEGER            ::     P_ff1i23 = 1								  INTEGER            ::     P_ff1i23 = 1
  LOGICAL            ::     F_ff1i23 = .FALSE.								  LOGICAL            ::     F_ff1i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i24 = 39							   |	  INTEGER, PARAMETER :: PARAM_ff1i24 = 38
  INTEGER            ::     P_ff1i24 = 1								  INTEGER            ::     P_ff1i24 = 1
  LOGICAL            ::     F_ff1i24 = .FALSE.								  LOGICAL            ::     F_ff1i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i25 = 40							   |	  INTEGER, PARAMETER :: PARAM_ff1i25 = 39
  INTEGER            ::     P_ff1i25 = 1								  INTEGER            ::     P_ff1i25 = 1
  LOGICAL            ::     F_ff1i25 = .FALSE.								  LOGICAL            ::     F_ff1i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i26 = 41							   |	  INTEGER, PARAMETER :: PARAM_ff1i26 = 40
  INTEGER            ::     P_ff1i26 = 1								  INTEGER            ::     P_ff1i26 = 1
  LOGICAL            ::     F_ff1i26 = .FALSE.								  LOGICAL            ::     F_ff1i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i27 = 42							   |	  INTEGER, PARAMETER :: PARAM_ff1i27 = 41
  INTEGER            ::     P_ff1i27 = 1								  INTEGER            ::     P_ff1i27 = 1
  LOGICAL            ::     F_ff1i27 = .FALSE.								  LOGICAL            ::     F_ff1i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i28 = 43							   |	  INTEGER, PARAMETER :: PARAM_ff1i28 = 42
  INTEGER            ::     P_ff1i28 = 1								  INTEGER            ::     P_ff1i28 = 1
  LOGICAL            ::     F_ff1i28 = .FALSE.								  LOGICAL            ::     F_ff1i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i29 = 44							   |	  INTEGER, PARAMETER :: PARAM_ff1i29 = 43
  INTEGER            ::     P_ff1i29 = 1								  INTEGER            ::     P_ff1i29 = 1
  LOGICAL            ::     F_ff1i29 = .FALSE.								  LOGICAL            ::     F_ff1i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i30 = 45							   |	  INTEGER, PARAMETER :: PARAM_ff1i30 = 44
  INTEGER            ::     P_ff1i30 = 1								  INTEGER            ::     P_ff1i30 = 1
  LOGICAL            ::     F_ff1i30 = .FALSE.								  LOGICAL            ::     F_ff1i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i31 = 46							   |	  INTEGER, PARAMETER :: PARAM_ff1i31 = 45
  INTEGER            ::     P_ff1i31 = 1								  INTEGER            ::     P_ff1i31 = 1
  LOGICAL            ::     F_ff1i31 = .FALSE.								  LOGICAL            ::     F_ff1i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i32 = 47							   |	  INTEGER, PARAMETER :: PARAM_ff1i32 = 46
  INTEGER            ::     P_ff1i32 = 1								  INTEGER            ::     P_ff1i32 = 1
  LOGICAL            ::     F_ff1i32 = .FALSE.								  LOGICAL            ::     F_ff1i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff1i33 = 48							   |	  INTEGER, PARAMETER :: PARAM_ff1i33 = 47
  INTEGER            ::     P_ff1i33 = 1								  INTEGER            ::     P_ff1i33 = 1
  LOGICAL            ::     F_ff1i33 = .FALSE.								  LOGICAL            ::     F_ff1i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i01 = 49							   |	  INTEGER, PARAMETER :: PARAM_ff5i01 = 48
  INTEGER            ::     P_ff5i01 = 1								  INTEGER            ::     P_ff5i01 = 1
  LOGICAL            ::     F_ff5i01 = .FALSE.								  LOGICAL            ::     F_ff5i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i02 = 50							   |	  INTEGER, PARAMETER :: PARAM_ff5i02 = 49
  INTEGER            ::     P_ff5i02 = 1								  INTEGER            ::     P_ff5i02 = 1
  LOGICAL            ::     F_ff5i02 = .FALSE.								  LOGICAL            ::     F_ff5i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i03 = 51							   |	  INTEGER, PARAMETER :: PARAM_ff5i03 = 50
  INTEGER            ::     P_ff5i03 = 1								  INTEGER            ::     P_ff5i03 = 1
  LOGICAL            ::     F_ff5i03 = .FALSE.								  LOGICAL            ::     F_ff5i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i04 = 52							   |	  INTEGER, PARAMETER :: PARAM_ff5i04 = 51
  INTEGER            ::     P_ff5i04 = 1								  INTEGER            ::     P_ff5i04 = 1
  LOGICAL            ::     F_ff5i04 = .FALSE.								  LOGICAL            ::     F_ff5i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i05 = 53							   |	  INTEGER, PARAMETER :: PARAM_ff5i05 = 52
  INTEGER            ::     P_ff5i05 = 1								  INTEGER            ::     P_ff5i05 = 1
  LOGICAL            ::     F_ff5i05 = .FALSE.								  LOGICAL            ::     F_ff5i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i06 = 54							   |	  INTEGER, PARAMETER :: PARAM_ff5i06 = 53
  INTEGER            ::     P_ff5i06 = 1								  INTEGER            ::     P_ff5i06 = 1
  LOGICAL            ::     F_ff5i06 = .FALSE.								  LOGICAL            ::     F_ff5i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i07 = 55							   |	  INTEGER, PARAMETER :: PARAM_ff5i07 = 54
  INTEGER            ::     P_ff5i07 = 1								  INTEGER            ::     P_ff5i07 = 1
  LOGICAL            ::     F_ff5i07 = .FALSE.								  LOGICAL            ::     F_ff5i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i08 = 56							   |	  INTEGER, PARAMETER :: PARAM_ff5i08 = 55
  INTEGER            ::     P_ff5i08 = 1								  INTEGER            ::     P_ff5i08 = 1
  LOGICAL            ::     F_ff5i08 = .FALSE.								  LOGICAL            ::     F_ff5i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i09 = 57							   |	  INTEGER, PARAMETER :: PARAM_ff5i09 = 56
  INTEGER            ::     P_ff5i09 = 1								  INTEGER            ::     P_ff5i09 = 1
  LOGICAL            ::     F_ff5i09 = .FALSE.								  LOGICAL            ::     F_ff5i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i10 = 58							   |	  INTEGER, PARAMETER :: PARAM_ff5i10 = 57
  INTEGER            ::     P_ff5i10 = 1								  INTEGER            ::     P_ff5i10 = 1
  LOGICAL            ::     F_ff5i10 = .FALSE.								  LOGICAL            ::     F_ff5i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i11 = 59							   |	  INTEGER, PARAMETER :: PARAM_ff5i11 = 58
  INTEGER            ::     P_ff5i11 = 1								  INTEGER            ::     P_ff5i11 = 1
  LOGICAL            ::     F_ff5i11 = .FALSE.								  LOGICAL            ::     F_ff5i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i12 = 60							   |	  INTEGER, PARAMETER :: PARAM_ff5i12 = 59
  INTEGER            ::     P_ff5i12 = 1								  INTEGER            ::     P_ff5i12 = 1
  LOGICAL            ::     F_ff5i12 = .FALSE.								  LOGICAL            ::     F_ff5i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i13 = 61							   |	  INTEGER, PARAMETER :: PARAM_ff5i13 = 60
  INTEGER            ::     P_ff5i13 = 1								  INTEGER            ::     P_ff5i13 = 1
  LOGICAL            ::     F_ff5i13 = .FALSE.								  LOGICAL            ::     F_ff5i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i14 = 62							   |	  INTEGER, PARAMETER :: PARAM_ff5i14 = 61
  INTEGER            ::     P_ff5i14 = 1								  INTEGER            ::     P_ff5i14 = 1
  LOGICAL            ::     F_ff5i14 = .FALSE.								  LOGICAL            ::     F_ff5i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i15 = 63							   |	  INTEGER, PARAMETER :: PARAM_ff5i15 = 62
  INTEGER            ::     P_ff5i15 = 1								  INTEGER            ::     P_ff5i15 = 1
  LOGICAL            ::     F_ff5i15 = .FALSE.								  LOGICAL            ::     F_ff5i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i16 = 64							   |	  INTEGER, PARAMETER :: PARAM_ff5i16 = 63
  INTEGER            ::     P_ff5i16 = 1								  INTEGER            ::     P_ff5i16 = 1
  LOGICAL            ::     F_ff5i16 = .FALSE.								  LOGICAL            ::     F_ff5i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i17 = 65							   |	  INTEGER, PARAMETER :: PARAM_ff5i17 = 64
  INTEGER            ::     P_ff5i17 = 1								  INTEGER            ::     P_ff5i17 = 1
  LOGICAL            ::     F_ff5i17 = .FALSE.								  LOGICAL            ::     F_ff5i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i18 = 66							   |	  INTEGER, PARAMETER :: PARAM_ff5i18 = 65
  INTEGER            ::     P_ff5i18 = 1								  INTEGER            ::     P_ff5i18 = 1
  LOGICAL            ::     F_ff5i18 = .FALSE.								  LOGICAL            ::     F_ff5i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i19 = 67							   |	  INTEGER, PARAMETER :: PARAM_ff5i19 = 66
  INTEGER            ::     P_ff5i19 = 1								  INTEGER            ::     P_ff5i19 = 1
  LOGICAL            ::     F_ff5i19 = .FALSE.								  LOGICAL            ::     F_ff5i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i20 = 68							   |	  INTEGER, PARAMETER :: PARAM_ff5i20 = 67
  INTEGER            ::     P_ff5i20 = 1								  INTEGER            ::     P_ff5i20 = 1
  LOGICAL            ::     F_ff5i20 = .FALSE.								  LOGICAL            ::     F_ff5i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i21 = 69							   |	  INTEGER, PARAMETER :: PARAM_ff5i21 = 68
  INTEGER            ::     P_ff5i21 = 1								  INTEGER            ::     P_ff5i21 = 1
  LOGICAL            ::     F_ff5i21 = .FALSE.								  LOGICAL            ::     F_ff5i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i22 = 70							   |	  INTEGER, PARAMETER :: PARAM_ff5i22 = 69
  INTEGER            ::     P_ff5i22 = 1								  INTEGER            ::     P_ff5i22 = 1
  LOGICAL            ::     F_ff5i22 = .FALSE.								  LOGICAL            ::     F_ff5i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i23 = 71							   |	  INTEGER, PARAMETER :: PARAM_ff5i23 = 70
  INTEGER            ::     P_ff5i23 = 1								  INTEGER            ::     P_ff5i23 = 1
  LOGICAL            ::     F_ff5i23 = .FALSE.								  LOGICAL            ::     F_ff5i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i24 = 72							   |	  INTEGER, PARAMETER :: PARAM_ff5i24 = 71
  INTEGER            ::     P_ff5i24 = 1								  INTEGER            ::     P_ff5i24 = 1
  LOGICAL            ::     F_ff5i24 = .FALSE.								  LOGICAL            ::     F_ff5i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i25 = 73							   |	  INTEGER, PARAMETER :: PARAM_ff5i25 = 72
  INTEGER            ::     P_ff5i25 = 1								  INTEGER            ::     P_ff5i25 = 1
  LOGICAL            ::     F_ff5i25 = .FALSE.								  LOGICAL            ::     F_ff5i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i26 = 74							   |	  INTEGER, PARAMETER :: PARAM_ff5i26 = 73
  INTEGER            ::     P_ff5i26 = 1								  INTEGER            ::     P_ff5i26 = 1
  LOGICAL            ::     F_ff5i26 = .FALSE.								  LOGICAL            ::     F_ff5i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i27 = 75							   |	  INTEGER, PARAMETER :: PARAM_ff5i27 = 74
  INTEGER            ::     P_ff5i27 = 1								  INTEGER            ::     P_ff5i27 = 1
  LOGICAL            ::     F_ff5i27 = .FALSE.								  LOGICAL            ::     F_ff5i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i28 = 76							   |	  INTEGER, PARAMETER :: PARAM_ff5i28 = 75
  INTEGER            ::     P_ff5i28 = 1								  INTEGER            ::     P_ff5i28 = 1
  LOGICAL            ::     F_ff5i28 = .FALSE.								  LOGICAL            ::     F_ff5i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i29 = 77							   |	  INTEGER, PARAMETER :: PARAM_ff5i29 = 76
  INTEGER            ::     P_ff5i29 = 1								  INTEGER            ::     P_ff5i29 = 1
  LOGICAL            ::     F_ff5i29 = .FALSE.								  LOGICAL            ::     F_ff5i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i30 = 78							   |	  INTEGER, PARAMETER :: PARAM_ff5i30 = 77
  INTEGER            ::     P_ff5i30 = 1								  INTEGER            ::     P_ff5i30 = 1
  LOGICAL            ::     F_ff5i30 = .FALSE.								  LOGICAL            ::     F_ff5i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i31 = 79							   |	  INTEGER, PARAMETER :: PARAM_ff5i31 = 78
  INTEGER            ::     P_ff5i31 = 1								  INTEGER            ::     P_ff5i31 = 1
  LOGICAL            ::     F_ff5i31 = .FALSE.								  LOGICAL            ::     F_ff5i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i32 = 80							   |	  INTEGER, PARAMETER :: PARAM_ff5i32 = 79
  INTEGER            ::     P_ff5i32 = 1								  INTEGER            ::     P_ff5i32 = 1
  LOGICAL            ::     F_ff5i32 = .FALSE.								  LOGICAL            ::     F_ff5i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff5i33 = 81							   |	  INTEGER, PARAMETER :: PARAM_ff5i33 = 80
  INTEGER            ::     P_ff5i33 = 1								  INTEGER            ::     P_ff5i33 = 1
  LOGICAL            ::     F_ff5i33 = .FALSE.								  LOGICAL            ::     F_ff5i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i01 = 82							   |	  INTEGER, PARAMETER :: PARAM_ff6i01 = 81
  INTEGER            ::     P_ff6i01 = 1								  INTEGER            ::     P_ff6i01 = 1
  LOGICAL            ::     F_ff6i01 = .FALSE.								  LOGICAL            ::     F_ff6i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i02 = 83							   |	  INTEGER, PARAMETER :: PARAM_ff6i02 = 82
  INTEGER            ::     P_ff6i02 = 1								  INTEGER            ::     P_ff6i02 = 1
  LOGICAL            ::     F_ff6i02 = .FALSE.								  LOGICAL            ::     F_ff6i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i03 = 84							   |	  INTEGER, PARAMETER :: PARAM_ff6i03 = 83
  INTEGER            ::     P_ff6i03 = 1								  INTEGER            ::     P_ff6i03 = 1
  LOGICAL            ::     F_ff6i03 = .FALSE.								  LOGICAL            ::     F_ff6i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i04 = 85							   |	  INTEGER, PARAMETER :: PARAM_ff6i04 = 84
  INTEGER            ::     P_ff6i04 = 1								  INTEGER            ::     P_ff6i04 = 1
  LOGICAL            ::     F_ff6i04 = .FALSE.								  LOGICAL            ::     F_ff6i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i05 = 86							   |	  INTEGER, PARAMETER :: PARAM_ff6i05 = 85
  INTEGER            ::     P_ff6i05 = 1								  INTEGER            ::     P_ff6i05 = 1
  LOGICAL            ::     F_ff6i05 = .FALSE.								  LOGICAL            ::     F_ff6i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i06 = 87							   |	  INTEGER, PARAMETER :: PARAM_ff6i06 = 86
  INTEGER            ::     P_ff6i06 = 1								  INTEGER            ::     P_ff6i06 = 1
  LOGICAL            ::     F_ff6i06 = .FALSE.								  LOGICAL            ::     F_ff6i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i07 = 88							   |	  INTEGER, PARAMETER :: PARAM_ff6i07 = 87
  INTEGER            ::     P_ff6i07 = 1								  INTEGER            ::     P_ff6i07 = 1
  LOGICAL            ::     F_ff6i07 = .FALSE.								  LOGICAL            ::     F_ff6i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i08 = 89							   |	  INTEGER, PARAMETER :: PARAM_ff6i08 = 88
  INTEGER            ::     P_ff6i08 = 1								  INTEGER            ::     P_ff6i08 = 1
  LOGICAL            ::     F_ff6i08 = .FALSE.								  LOGICAL            ::     F_ff6i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i09 = 90							   |	  INTEGER, PARAMETER :: PARAM_ff6i09 = 89
  INTEGER            ::     P_ff6i09 = 1								  INTEGER            ::     P_ff6i09 = 1
  LOGICAL            ::     F_ff6i09 = .FALSE.								  LOGICAL            ::     F_ff6i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i10 = 91							   |	  INTEGER, PARAMETER :: PARAM_ff6i10 = 90
  INTEGER            ::     P_ff6i10 = 1								  INTEGER            ::     P_ff6i10 = 1
  LOGICAL            ::     F_ff6i10 = .FALSE.								  LOGICAL            ::     F_ff6i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i11 = 92							   |	  INTEGER, PARAMETER :: PARAM_ff6i11 = 91
  INTEGER            ::     P_ff6i11 = 1								  INTEGER            ::     P_ff6i11 = 1
  LOGICAL            ::     F_ff6i11 = .FALSE.								  LOGICAL            ::     F_ff6i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i12 = 93							   |	  INTEGER, PARAMETER :: PARAM_ff6i12 = 92
  INTEGER            ::     P_ff6i12 = 1								  INTEGER            ::     P_ff6i12 = 1
  LOGICAL            ::     F_ff6i12 = .FALSE.								  LOGICAL            ::     F_ff6i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i13 = 94							   |	  INTEGER, PARAMETER :: PARAM_ff6i13 = 93
  INTEGER            ::     P_ff6i13 = 1								  INTEGER            ::     P_ff6i13 = 1
  LOGICAL            ::     F_ff6i13 = .FALSE.								  LOGICAL            ::     F_ff6i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i14 = 95							   |	  INTEGER, PARAMETER :: PARAM_ff6i14 = 94
  INTEGER            ::     P_ff6i14 = 1								  INTEGER            ::     P_ff6i14 = 1
  LOGICAL            ::     F_ff6i14 = .FALSE.								  LOGICAL            ::     F_ff6i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i15 = 96							   |	  INTEGER, PARAMETER :: PARAM_ff6i15 = 95
  INTEGER            ::     P_ff6i15 = 1								  INTEGER            ::     P_ff6i15 = 1
  LOGICAL            ::     F_ff6i15 = .FALSE.								  LOGICAL            ::     F_ff6i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i16 = 97							   |	  INTEGER, PARAMETER :: PARAM_ff6i16 = 96
  INTEGER            ::     P_ff6i16 = 1								  INTEGER            ::     P_ff6i16 = 1
  LOGICAL            ::     F_ff6i16 = .FALSE.								  LOGICAL            ::     F_ff6i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i17 = 98							   |	  INTEGER, PARAMETER :: PARAM_ff6i17 = 97
  INTEGER            ::     P_ff6i17 = 1								  INTEGER            ::     P_ff6i17 = 1
  LOGICAL            ::     F_ff6i17 = .FALSE.								  LOGICAL            ::     F_ff6i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i18 = 99							   |	  INTEGER, PARAMETER :: PARAM_ff6i18 = 98
  INTEGER            ::     P_ff6i18 = 1								  INTEGER            ::     P_ff6i18 = 1
  LOGICAL            ::     F_ff6i18 = .FALSE.								  LOGICAL            ::     F_ff6i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i19 = 100							   |	  INTEGER, PARAMETER :: PARAM_ff6i19 = 99
  INTEGER            ::     P_ff6i19 = 1								  INTEGER            ::     P_ff6i19 = 1
  LOGICAL            ::     F_ff6i19 = .FALSE.								  LOGICAL            ::     F_ff6i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i20 = 101							   |	  INTEGER, PARAMETER :: PARAM_ff6i20 = 100
  INTEGER            ::     P_ff6i20 = 1								  INTEGER            ::     P_ff6i20 = 1
  LOGICAL            ::     F_ff6i20 = .FALSE.								  LOGICAL            ::     F_ff6i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i21 = 102							   |	  INTEGER, PARAMETER :: PARAM_ff6i21 = 101
  INTEGER            ::     P_ff6i21 = 1								  INTEGER            ::     P_ff6i21 = 1
  LOGICAL            ::     F_ff6i21 = .FALSE.								  LOGICAL            ::     F_ff6i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i22 = 103							   |	  INTEGER, PARAMETER :: PARAM_ff6i22 = 102
  INTEGER            ::     P_ff6i22 = 1								  INTEGER            ::     P_ff6i22 = 1
  LOGICAL            ::     F_ff6i22 = .FALSE.								  LOGICAL            ::     F_ff6i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i23 = 104							   |	  INTEGER, PARAMETER :: PARAM_ff6i23 = 103
  INTEGER            ::     P_ff6i23 = 1								  INTEGER            ::     P_ff6i23 = 1
  LOGICAL            ::     F_ff6i23 = .FALSE.								  LOGICAL            ::     F_ff6i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i24 = 105							   |	  INTEGER, PARAMETER :: PARAM_ff6i24 = 104
  INTEGER            ::     P_ff6i24 = 1								  INTEGER            ::     P_ff6i24 = 1
  LOGICAL            ::     F_ff6i24 = .FALSE.								  LOGICAL            ::     F_ff6i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i25 = 106							   |	  INTEGER, PARAMETER :: PARAM_ff6i25 = 105
  INTEGER            ::     P_ff6i25 = 1								  INTEGER            ::     P_ff6i25 = 1
  LOGICAL            ::     F_ff6i25 = .FALSE.								  LOGICAL            ::     F_ff6i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i26 = 107							   |	  INTEGER, PARAMETER :: PARAM_ff6i26 = 106
  INTEGER            ::     P_ff6i26 = 1								  INTEGER            ::     P_ff6i26 = 1
  LOGICAL            ::     F_ff6i26 = .FALSE.								  LOGICAL            ::     F_ff6i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i27 = 108							   |	  INTEGER, PARAMETER :: PARAM_ff6i27 = 107
  INTEGER            ::     P_ff6i27 = 1								  INTEGER            ::     P_ff6i27 = 1
  LOGICAL            ::     F_ff6i27 = .FALSE.								  LOGICAL            ::     F_ff6i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i28 = 109							   |	  INTEGER, PARAMETER :: PARAM_ff6i28 = 108
  INTEGER            ::     P_ff6i28 = 1								  INTEGER            ::     P_ff6i28 = 1
  LOGICAL            ::     F_ff6i28 = .FALSE.								  LOGICAL            ::     F_ff6i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i29 = 110							   |	  INTEGER, PARAMETER :: PARAM_ff6i29 = 109
  INTEGER            ::     P_ff6i29 = 1								  INTEGER            ::     P_ff6i29 = 1
  LOGICAL            ::     F_ff6i29 = .FALSE.								  LOGICAL            ::     F_ff6i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i30 = 111							   |	  INTEGER, PARAMETER :: PARAM_ff6i30 = 110
  INTEGER            ::     P_ff6i30 = 1								  INTEGER            ::     P_ff6i30 = 1
  LOGICAL            ::     F_ff6i30 = .FALSE.								  LOGICAL            ::     F_ff6i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i31 = 112							   |	  INTEGER, PARAMETER :: PARAM_ff6i31 = 111
  INTEGER            ::     P_ff6i31 = 1								  INTEGER            ::     P_ff6i31 = 1
  LOGICAL            ::     F_ff6i31 = .FALSE.								  LOGICAL            ::     F_ff6i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i32 = 113							   |	  INTEGER, PARAMETER :: PARAM_ff6i32 = 112
  INTEGER            ::     P_ff6i32 = 1								  INTEGER            ::     P_ff6i32 = 1
  LOGICAL            ::     F_ff6i32 = .FALSE.								  LOGICAL            ::     F_ff6i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff6i33 = 114							   |	  INTEGER, PARAMETER :: PARAM_ff6i33 = 113
  INTEGER            ::     P_ff6i33 = 1								  INTEGER            ::     P_ff6i33 = 1
  LOGICAL            ::     F_ff6i33 = .FALSE.								  LOGICAL            ::     F_ff6i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i01 = 115							   |	  INTEGER, PARAMETER :: PARAM_ff8i01 = 114
  INTEGER            ::     P_ff8i01 = 1								  INTEGER            ::     P_ff8i01 = 1
  LOGICAL            ::     F_ff8i01 = .FALSE.								  LOGICAL            ::     F_ff8i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i02 = 116							   |	  INTEGER, PARAMETER :: PARAM_ff8i02 = 115
  INTEGER            ::     P_ff8i02 = 1								  INTEGER            ::     P_ff8i02 = 1
  LOGICAL            ::     F_ff8i02 = .FALSE.								  LOGICAL            ::     F_ff8i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i03 = 117							   |	  INTEGER, PARAMETER :: PARAM_ff8i03 = 116
  INTEGER            ::     P_ff8i03 = 1								  INTEGER            ::     P_ff8i03 = 1
  LOGICAL            ::     F_ff8i03 = .FALSE.								  LOGICAL            ::     F_ff8i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i04 = 118							   |	  INTEGER, PARAMETER :: PARAM_ff8i04 = 117
  INTEGER            ::     P_ff8i04 = 1								  INTEGER            ::     P_ff8i04 = 1
  LOGICAL            ::     F_ff8i04 = .FALSE.								  LOGICAL            ::     F_ff8i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i05 = 119							   |	  INTEGER, PARAMETER :: PARAM_ff8i05 = 118
  INTEGER            ::     P_ff8i05 = 1								  INTEGER            ::     P_ff8i05 = 1
  LOGICAL            ::     F_ff8i05 = .FALSE.								  LOGICAL            ::     F_ff8i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i06 = 120							   |	  INTEGER, PARAMETER :: PARAM_ff8i06 = 119
  INTEGER            ::     P_ff8i06 = 1								  INTEGER            ::     P_ff8i06 = 1
  LOGICAL            ::     F_ff8i06 = .FALSE.								  LOGICAL            ::     F_ff8i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i07 = 121							   |	  INTEGER, PARAMETER :: PARAM_ff8i07 = 120
  INTEGER            ::     P_ff8i07 = 1								  INTEGER            ::     P_ff8i07 = 1
  LOGICAL            ::     F_ff8i07 = .FALSE.								  LOGICAL            ::     F_ff8i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i08 = 122							   |	  INTEGER, PARAMETER :: PARAM_ff8i08 = 121
  INTEGER            ::     P_ff8i08 = 1								  INTEGER            ::     P_ff8i08 = 1
  LOGICAL            ::     F_ff8i08 = .FALSE.								  LOGICAL            ::     F_ff8i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i09 = 123							   |	  INTEGER, PARAMETER :: PARAM_ff8i09 = 122
  INTEGER            ::     P_ff8i09 = 1								  INTEGER            ::     P_ff8i09 = 1
  LOGICAL            ::     F_ff8i09 = .FALSE.								  LOGICAL            ::     F_ff8i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i10 = 124							   |	  INTEGER, PARAMETER :: PARAM_ff8i10 = 123
  INTEGER            ::     P_ff8i10 = 1								  INTEGER            ::     P_ff8i10 = 1
  LOGICAL            ::     F_ff8i10 = .FALSE.								  LOGICAL            ::     F_ff8i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i11 = 125							   |	  INTEGER, PARAMETER :: PARAM_ff8i11 = 124
  INTEGER            ::     P_ff8i11 = 1								  INTEGER            ::     P_ff8i11 = 1
  LOGICAL            ::     F_ff8i11 = .FALSE.								  LOGICAL            ::     F_ff8i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i12 = 126							   |	  INTEGER, PARAMETER :: PARAM_ff8i12 = 125
  INTEGER            ::     P_ff8i12 = 1								  INTEGER            ::     P_ff8i12 = 1
  LOGICAL            ::     F_ff8i12 = .FALSE.								  LOGICAL            ::     F_ff8i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i13 = 127							   |	  INTEGER, PARAMETER :: PARAM_ff8i13 = 126
  INTEGER            ::     P_ff8i13 = 1								  INTEGER            ::     P_ff8i13 = 1
  LOGICAL            ::     F_ff8i13 = .FALSE.								  LOGICAL            ::     F_ff8i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i14 = 128							   |	  INTEGER, PARAMETER :: PARAM_ff8i14 = 127
  INTEGER            ::     P_ff8i14 = 1								  INTEGER            ::     P_ff8i14 = 1
  LOGICAL            ::     F_ff8i14 = .FALSE.								  LOGICAL            ::     F_ff8i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i15 = 129							   |	  INTEGER, PARAMETER :: PARAM_ff8i15 = 128
  INTEGER            ::     P_ff8i15 = 1								  INTEGER            ::     P_ff8i15 = 1
  LOGICAL            ::     F_ff8i15 = .FALSE.								  LOGICAL            ::     F_ff8i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i16 = 130							   |	  INTEGER, PARAMETER :: PARAM_ff8i16 = 129
  INTEGER            ::     P_ff8i16 = 1								  INTEGER            ::     P_ff8i16 = 1
  LOGICAL            ::     F_ff8i16 = .FALSE.								  LOGICAL            ::     F_ff8i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i17 = 131							   |	  INTEGER, PARAMETER :: PARAM_ff8i17 = 130
  INTEGER            ::     P_ff8i17 = 1								  INTEGER            ::     P_ff8i17 = 1
  LOGICAL            ::     F_ff8i17 = .FALSE.								  LOGICAL            ::     F_ff8i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i18 = 132							   |	  INTEGER, PARAMETER :: PARAM_ff8i18 = 131
  INTEGER            ::     P_ff8i18 = 1								  INTEGER            ::     P_ff8i18 = 1
  LOGICAL            ::     F_ff8i18 = .FALSE.								  LOGICAL            ::     F_ff8i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i19 = 133							   |	  INTEGER, PARAMETER :: PARAM_ff8i19 = 132
  INTEGER            ::     P_ff8i19 = 1								  INTEGER            ::     P_ff8i19 = 1
  LOGICAL            ::     F_ff8i19 = .FALSE.								  LOGICAL            ::     F_ff8i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i20 = 134							   |	  INTEGER, PARAMETER :: PARAM_ff8i20 = 133
  INTEGER            ::     P_ff8i20 = 1								  INTEGER            ::     P_ff8i20 = 1
  LOGICAL            ::     F_ff8i20 = .FALSE.								  LOGICAL            ::     F_ff8i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i21 = 135							   |	  INTEGER, PARAMETER :: PARAM_ff8i21 = 134
  INTEGER            ::     P_ff8i21 = 1								  INTEGER            ::     P_ff8i21 = 1
  LOGICAL            ::     F_ff8i21 = .FALSE.								  LOGICAL            ::     F_ff8i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i22 = 136							   |	  INTEGER, PARAMETER :: PARAM_ff8i22 = 135
  INTEGER            ::     P_ff8i22 = 1								  INTEGER            ::     P_ff8i22 = 1
  LOGICAL            ::     F_ff8i22 = .FALSE.								  LOGICAL            ::     F_ff8i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i23 = 137							   |	  INTEGER, PARAMETER :: PARAM_ff8i23 = 136
  INTEGER            ::     P_ff8i23 = 1								  INTEGER            ::     P_ff8i23 = 1
  LOGICAL            ::     F_ff8i23 = .FALSE.								  LOGICAL            ::     F_ff8i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i24 = 138							   |	  INTEGER, PARAMETER :: PARAM_ff8i24 = 137
  INTEGER            ::     P_ff8i24 = 1								  INTEGER            ::     P_ff8i24 = 1
  LOGICAL            ::     F_ff8i24 = .FALSE.								  LOGICAL            ::     F_ff8i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i25 = 139							   |	  INTEGER, PARAMETER :: PARAM_ff8i25 = 138
  INTEGER            ::     P_ff8i25 = 1								  INTEGER            ::     P_ff8i25 = 1
  LOGICAL            ::     F_ff8i25 = .FALSE.								  LOGICAL            ::     F_ff8i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i26 = 140							   |	  INTEGER, PARAMETER :: PARAM_ff8i26 = 139
  INTEGER            ::     P_ff8i26 = 1								  INTEGER            ::     P_ff8i26 = 1
  LOGICAL            ::     F_ff8i26 = .FALSE.								  LOGICAL            ::     F_ff8i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i27 = 141							   |	  INTEGER, PARAMETER :: PARAM_ff8i27 = 140
  INTEGER            ::     P_ff8i27 = 1								  INTEGER            ::     P_ff8i27 = 1
  LOGICAL            ::     F_ff8i27 = .FALSE.								  LOGICAL            ::     F_ff8i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i28 = 142							   |	  INTEGER, PARAMETER :: PARAM_ff8i28 = 141
  INTEGER            ::     P_ff8i28 = 1								  INTEGER            ::     P_ff8i28 = 1
  LOGICAL            ::     F_ff8i28 = .FALSE.								  LOGICAL            ::     F_ff8i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i29 = 143							   |	  INTEGER, PARAMETER :: PARAM_ff8i29 = 142
  INTEGER            ::     P_ff8i29 = 1								  INTEGER            ::     P_ff8i29 = 1
  LOGICAL            ::     F_ff8i29 = .FALSE.								  LOGICAL            ::     F_ff8i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i30 = 144							   |	  INTEGER, PARAMETER :: PARAM_ff8i30 = 143
  INTEGER            ::     P_ff8i30 = 1								  INTEGER            ::     P_ff8i30 = 1
  LOGICAL            ::     F_ff8i30 = .FALSE.								  LOGICAL            ::     F_ff8i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i31 = 145							   |	  INTEGER, PARAMETER :: PARAM_ff8i31 = 144
  INTEGER            ::     P_ff8i31 = 1								  INTEGER            ::     P_ff8i31 = 1
  LOGICAL            ::     F_ff8i31 = .FALSE.								  LOGICAL            ::     F_ff8i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i32 = 146							   |	  INTEGER, PARAMETER :: PARAM_ff8i32 = 145
  INTEGER            ::     P_ff8i32 = 1								  INTEGER            ::     P_ff8i32 = 1
  LOGICAL            ::     F_ff8i32 = .FALSE.								  LOGICAL            ::     F_ff8i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff8i33 = 147							   |	  INTEGER, PARAMETER :: PARAM_ff8i33 = 146
  INTEGER            ::     P_ff8i33 = 1								  INTEGER            ::     P_ff8i33 = 1
  LOGICAL            ::     F_ff8i33 = .FALSE.								  LOGICAL            ::     F_ff8i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i01 = 148							   |	  INTEGER, PARAMETER :: PARAM_ff2i01 = 147
  INTEGER            ::     P_ff2i01 = 1								  INTEGER            ::     P_ff2i01 = 1
  LOGICAL            ::     F_ff2i01 = .FALSE.								  LOGICAL            ::     F_ff2i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i02 = 149							   |	  INTEGER, PARAMETER :: PARAM_ff2i02 = 148
  INTEGER            ::     P_ff2i02 = 1								  INTEGER            ::     P_ff2i02 = 1
  LOGICAL            ::     F_ff2i02 = .FALSE.								  LOGICAL            ::     F_ff2i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i03 = 150							   |	  INTEGER, PARAMETER :: PARAM_ff2i03 = 149
  INTEGER            ::     P_ff2i03 = 1								  INTEGER            ::     P_ff2i03 = 1
  LOGICAL            ::     F_ff2i03 = .FALSE.								  LOGICAL            ::     F_ff2i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i04 = 151							   |	  INTEGER, PARAMETER :: PARAM_ff2i04 = 150
  INTEGER            ::     P_ff2i04 = 1								  INTEGER            ::     P_ff2i04 = 1
  LOGICAL            ::     F_ff2i04 = .FALSE.								  LOGICAL            ::     F_ff2i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i05 = 152							   |	  INTEGER, PARAMETER :: PARAM_ff2i05 = 151
  INTEGER            ::     P_ff2i05 = 1								  INTEGER            ::     P_ff2i05 = 1
  LOGICAL            ::     F_ff2i05 = .FALSE.								  LOGICAL            ::     F_ff2i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i06 = 153							   |	  INTEGER, PARAMETER :: PARAM_ff2i06 = 152
  INTEGER            ::     P_ff2i06 = 1								  INTEGER            ::     P_ff2i06 = 1
  LOGICAL            ::     F_ff2i06 = .FALSE.								  LOGICAL            ::     F_ff2i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i07 = 154							   |	  INTEGER, PARAMETER :: PARAM_ff2i07 = 153
  INTEGER            ::     P_ff2i07 = 1								  INTEGER            ::     P_ff2i07 = 1
  LOGICAL            ::     F_ff2i07 = .FALSE.								  LOGICAL            ::     F_ff2i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i08 = 155							   |	  INTEGER, PARAMETER :: PARAM_ff2i08 = 154
  INTEGER            ::     P_ff2i08 = 1								  INTEGER            ::     P_ff2i08 = 1
  LOGICAL            ::     F_ff2i08 = .FALSE.								  LOGICAL            ::     F_ff2i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i09 = 156							   |	  INTEGER, PARAMETER :: PARAM_ff2i09 = 155
  INTEGER            ::     P_ff2i09 = 1								  INTEGER            ::     P_ff2i09 = 1
  LOGICAL            ::     F_ff2i09 = .FALSE.								  LOGICAL            ::     F_ff2i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i10 = 157							   |	  INTEGER, PARAMETER :: PARAM_ff2i10 = 156
  INTEGER            ::     P_ff2i10 = 1								  INTEGER            ::     P_ff2i10 = 1
  LOGICAL            ::     F_ff2i10 = .FALSE.								  LOGICAL            ::     F_ff2i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i11 = 158							   |	  INTEGER, PARAMETER :: PARAM_ff2i11 = 157
  INTEGER            ::     P_ff2i11 = 1								  INTEGER            ::     P_ff2i11 = 1
  LOGICAL            ::     F_ff2i11 = .FALSE.								  LOGICAL            ::     F_ff2i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i12 = 159							   |	  INTEGER, PARAMETER :: PARAM_ff2i12 = 158
  INTEGER            ::     P_ff2i12 = 1								  INTEGER            ::     P_ff2i12 = 1
  LOGICAL            ::     F_ff2i12 = .FALSE.								  LOGICAL            ::     F_ff2i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i13 = 160							   |	  INTEGER, PARAMETER :: PARAM_ff2i13 = 159
  INTEGER            ::     P_ff2i13 = 1								  INTEGER            ::     P_ff2i13 = 1
  LOGICAL            ::     F_ff2i13 = .FALSE.								  LOGICAL            ::     F_ff2i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i14 = 161							   |	  INTEGER, PARAMETER :: PARAM_ff2i14 = 160
  INTEGER            ::     P_ff2i14 = 1								  INTEGER            ::     P_ff2i14 = 1
  LOGICAL            ::     F_ff2i14 = .FALSE.								  LOGICAL            ::     F_ff2i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i15 = 162							   |	  INTEGER, PARAMETER :: PARAM_ff2i15 = 161
  INTEGER            ::     P_ff2i15 = 1								  INTEGER            ::     P_ff2i15 = 1
  LOGICAL            ::     F_ff2i15 = .FALSE.								  LOGICAL            ::     F_ff2i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i16 = 163							   |	  INTEGER, PARAMETER :: PARAM_ff2i16 = 162
  INTEGER            ::     P_ff2i16 = 1								  INTEGER            ::     P_ff2i16 = 1
  LOGICAL            ::     F_ff2i16 = .FALSE.								  LOGICAL            ::     F_ff2i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i17 = 164							   |	  INTEGER, PARAMETER :: PARAM_ff2i17 = 163
  INTEGER            ::     P_ff2i17 = 1								  INTEGER            ::     P_ff2i17 = 1
  LOGICAL            ::     F_ff2i17 = .FALSE.								  LOGICAL            ::     F_ff2i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i18 = 165							   |	  INTEGER, PARAMETER :: PARAM_ff2i18 = 164
  INTEGER            ::     P_ff2i18 = 1								  INTEGER            ::     P_ff2i18 = 1
  LOGICAL            ::     F_ff2i18 = .FALSE.								  LOGICAL            ::     F_ff2i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i19 = 166							   |	  INTEGER, PARAMETER :: PARAM_ff2i19 = 165
  INTEGER            ::     P_ff2i19 = 1								  INTEGER            ::     P_ff2i19 = 1
  LOGICAL            ::     F_ff2i19 = .FALSE.								  LOGICAL            ::     F_ff2i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i20 = 167							   |	  INTEGER, PARAMETER :: PARAM_ff2i20 = 166
  INTEGER            ::     P_ff2i20 = 1								  INTEGER            ::     P_ff2i20 = 1
  LOGICAL            ::     F_ff2i20 = .FALSE.								  LOGICAL            ::     F_ff2i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i21 = 168							   |	  INTEGER, PARAMETER :: PARAM_ff2i21 = 167
  INTEGER            ::     P_ff2i21 = 1								  INTEGER            ::     P_ff2i21 = 1
  LOGICAL            ::     F_ff2i21 = .FALSE.								  LOGICAL            ::     F_ff2i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i22 = 169							   |	  INTEGER, PARAMETER :: PARAM_ff2i22 = 168
  INTEGER            ::     P_ff2i22 = 1								  INTEGER            ::     P_ff2i22 = 1
  LOGICAL            ::     F_ff2i22 = .FALSE.								  LOGICAL            ::     F_ff2i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i23 = 170							   |	  INTEGER, PARAMETER :: PARAM_ff2i23 = 169
  INTEGER            ::     P_ff2i23 = 1								  INTEGER            ::     P_ff2i23 = 1
  LOGICAL            ::     F_ff2i23 = .FALSE.								  LOGICAL            ::     F_ff2i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i24 = 171							   |	  INTEGER, PARAMETER :: PARAM_ff2i24 = 170
  INTEGER            ::     P_ff2i24 = 1								  INTEGER            ::     P_ff2i24 = 1
  LOGICAL            ::     F_ff2i24 = .FALSE.								  LOGICAL            ::     F_ff2i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i25 = 172							   |	  INTEGER, PARAMETER :: PARAM_ff2i25 = 171
  INTEGER            ::     P_ff2i25 = 1								  INTEGER            ::     P_ff2i25 = 1
  LOGICAL            ::     F_ff2i25 = .FALSE.								  LOGICAL            ::     F_ff2i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i26 = 173							   |	  INTEGER, PARAMETER :: PARAM_ff2i26 = 172
  INTEGER            ::     P_ff2i26 = 1								  INTEGER            ::     P_ff2i26 = 1
  LOGICAL            ::     F_ff2i26 = .FALSE.								  LOGICAL            ::     F_ff2i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i27 = 174							   |	  INTEGER, PARAMETER :: PARAM_ff2i27 = 173
  INTEGER            ::     P_ff2i27 = 1								  INTEGER            ::     P_ff2i27 = 1
  LOGICAL            ::     F_ff2i27 = .FALSE.								  LOGICAL            ::     F_ff2i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i28 = 175							   |	  INTEGER, PARAMETER :: PARAM_ff2i28 = 174
  INTEGER            ::     P_ff2i28 = 1								  INTEGER            ::     P_ff2i28 = 1
  LOGICAL            ::     F_ff2i28 = .FALSE.								  LOGICAL            ::     F_ff2i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i29 = 176							   |	  INTEGER, PARAMETER :: PARAM_ff2i29 = 175
  INTEGER            ::     P_ff2i29 = 1								  INTEGER            ::     P_ff2i29 = 1
  LOGICAL            ::     F_ff2i29 = .FALSE.								  LOGICAL            ::     F_ff2i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i30 = 177							   |	  INTEGER, PARAMETER :: PARAM_ff2i30 = 176
  INTEGER            ::     P_ff2i30 = 1								  INTEGER            ::     P_ff2i30 = 1
  LOGICAL            ::     F_ff2i30 = .FALSE.								  LOGICAL            ::     F_ff2i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i31 = 178							   |	  INTEGER, PARAMETER :: PARAM_ff2i31 = 177
  INTEGER            ::     P_ff2i31 = 1								  INTEGER            ::     P_ff2i31 = 1
  LOGICAL            ::     F_ff2i31 = .FALSE.								  LOGICAL            ::     F_ff2i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i32 = 179							   |	  INTEGER, PARAMETER :: PARAM_ff2i32 = 178
  INTEGER            ::     P_ff2i32 = 1								  INTEGER            ::     P_ff2i32 = 1
  LOGICAL            ::     F_ff2i32 = .FALSE.								  LOGICAL            ::     F_ff2i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff2i33 = 180							   |	  INTEGER, PARAMETER :: PARAM_ff2i33 = 179
  INTEGER            ::     P_ff2i33 = 1								  INTEGER            ::     P_ff2i33 = 1
  LOGICAL            ::     F_ff2i33 = .FALSE.								  LOGICAL            ::     F_ff2i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i01 = 181							   |	  INTEGER, PARAMETER :: PARAM_ff3i01 = 180
  INTEGER            ::     P_ff3i01 = 1								  INTEGER            ::     P_ff3i01 = 1
  LOGICAL            ::     F_ff3i01 = .FALSE.								  LOGICAL            ::     F_ff3i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i02 = 182							   |	  INTEGER, PARAMETER :: PARAM_ff3i02 = 181
  INTEGER            ::     P_ff3i02 = 1								  INTEGER            ::     P_ff3i02 = 1
  LOGICAL            ::     F_ff3i02 = .FALSE.								  LOGICAL            ::     F_ff3i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i03 = 183							   |	  INTEGER, PARAMETER :: PARAM_ff3i03 = 182
  INTEGER            ::     P_ff3i03 = 1								  INTEGER            ::     P_ff3i03 = 1
  LOGICAL            ::     F_ff3i03 = .FALSE.								  LOGICAL            ::     F_ff3i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i04 = 184							   |	  INTEGER, PARAMETER :: PARAM_ff3i04 = 183
  INTEGER            ::     P_ff3i04 = 1								  INTEGER            ::     P_ff3i04 = 1
  LOGICAL            ::     F_ff3i04 = .FALSE.								  LOGICAL            ::     F_ff3i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i05 = 185							   |	  INTEGER, PARAMETER :: PARAM_ff3i05 = 184
  INTEGER            ::     P_ff3i05 = 1								  INTEGER            ::     P_ff3i05 = 1
  LOGICAL            ::     F_ff3i05 = .FALSE.								  LOGICAL            ::     F_ff3i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i06 = 186							   |	  INTEGER, PARAMETER :: PARAM_ff3i06 = 185
  INTEGER            ::     P_ff3i06 = 1								  INTEGER            ::     P_ff3i06 = 1
  LOGICAL            ::     F_ff3i06 = .FALSE.								  LOGICAL            ::     F_ff3i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i07 = 187							   |	  INTEGER, PARAMETER :: PARAM_ff3i07 = 186
  INTEGER            ::     P_ff3i07 = 1								  INTEGER            ::     P_ff3i07 = 1
  LOGICAL            ::     F_ff3i07 = .FALSE.								  LOGICAL            ::     F_ff3i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i08 = 188							   |	  INTEGER, PARAMETER :: PARAM_ff3i08 = 187
  INTEGER            ::     P_ff3i08 = 1								  INTEGER            ::     P_ff3i08 = 1
  LOGICAL            ::     F_ff3i08 = .FALSE.								  LOGICAL            ::     F_ff3i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i09 = 189							   |	  INTEGER, PARAMETER :: PARAM_ff3i09 = 188
  INTEGER            ::     P_ff3i09 = 1								  INTEGER            ::     P_ff3i09 = 1
  LOGICAL            ::     F_ff3i09 = .FALSE.								  LOGICAL            ::     F_ff3i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i10 = 190							   |	  INTEGER, PARAMETER :: PARAM_ff3i10 = 189
  INTEGER            ::     P_ff3i10 = 1								  INTEGER            ::     P_ff3i10 = 1
  LOGICAL            ::     F_ff3i10 = .FALSE.								  LOGICAL            ::     F_ff3i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i11 = 191							   |	  INTEGER, PARAMETER :: PARAM_ff3i11 = 190
  INTEGER            ::     P_ff3i11 = 1								  INTEGER            ::     P_ff3i11 = 1
  LOGICAL            ::     F_ff3i11 = .FALSE.								  LOGICAL            ::     F_ff3i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i12 = 192							   |	  INTEGER, PARAMETER :: PARAM_ff3i12 = 191
  INTEGER            ::     P_ff3i12 = 1								  INTEGER            ::     P_ff3i12 = 1
  LOGICAL            ::     F_ff3i12 = .FALSE.								  LOGICAL            ::     F_ff3i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i13 = 193							   |	  INTEGER, PARAMETER :: PARAM_ff3i13 = 192
  INTEGER            ::     P_ff3i13 = 1								  INTEGER            ::     P_ff3i13 = 1
  LOGICAL            ::     F_ff3i13 = .FALSE.								  LOGICAL            ::     F_ff3i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i14 = 194							   |	  INTEGER, PARAMETER :: PARAM_ff3i14 = 193
  INTEGER            ::     P_ff3i14 = 1								  INTEGER            ::     P_ff3i14 = 1
  LOGICAL            ::     F_ff3i14 = .FALSE.								  LOGICAL            ::     F_ff3i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i15 = 195							   |	  INTEGER, PARAMETER :: PARAM_ff3i15 = 194
  INTEGER            ::     P_ff3i15 = 1								  INTEGER            ::     P_ff3i15 = 1
  LOGICAL            ::     F_ff3i15 = .FALSE.								  LOGICAL            ::     F_ff3i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i16 = 196							   |	  INTEGER, PARAMETER :: PARAM_ff3i16 = 195
  INTEGER            ::     P_ff3i16 = 1								  INTEGER            ::     P_ff3i16 = 1
  LOGICAL            ::     F_ff3i16 = .FALSE.								  LOGICAL            ::     F_ff3i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i17 = 197							   |	  INTEGER, PARAMETER :: PARAM_ff3i17 = 196
  INTEGER            ::     P_ff3i17 = 1								  INTEGER            ::     P_ff3i17 = 1
  LOGICAL            ::     F_ff3i17 = .FALSE.								  LOGICAL            ::     F_ff3i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i18 = 198							   |	  INTEGER, PARAMETER :: PARAM_ff3i18 = 197
  INTEGER            ::     P_ff3i18 = 1								  INTEGER            ::     P_ff3i18 = 1
  LOGICAL            ::     F_ff3i18 = .FALSE.								  LOGICAL            ::     F_ff3i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i19 = 199							   |	  INTEGER, PARAMETER :: PARAM_ff3i19 = 198
  INTEGER            ::     P_ff3i19 = 1								  INTEGER            ::     P_ff3i19 = 1
  LOGICAL            ::     F_ff3i19 = .FALSE.								  LOGICAL            ::     F_ff3i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i20 = 200							   |	  INTEGER, PARAMETER :: PARAM_ff3i20 = 199
  INTEGER            ::     P_ff3i20 = 1								  INTEGER            ::     P_ff3i20 = 1
  LOGICAL            ::     F_ff3i20 = .FALSE.								  LOGICAL            ::     F_ff3i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i21 = 201							   |	  INTEGER, PARAMETER :: PARAM_ff3i21 = 200
  INTEGER            ::     P_ff3i21 = 1								  INTEGER            ::     P_ff3i21 = 1
  LOGICAL            ::     F_ff3i21 = .FALSE.								  LOGICAL            ::     F_ff3i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i22 = 202							   |	  INTEGER, PARAMETER :: PARAM_ff3i22 = 201
  INTEGER            ::     P_ff3i22 = 1								  INTEGER            ::     P_ff3i22 = 1
  LOGICAL            ::     F_ff3i22 = .FALSE.								  LOGICAL            ::     F_ff3i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i23 = 203							   |	  INTEGER, PARAMETER :: PARAM_ff3i23 = 202
  INTEGER            ::     P_ff3i23 = 1								  INTEGER            ::     P_ff3i23 = 1
  LOGICAL            ::     F_ff3i23 = .FALSE.								  LOGICAL            ::     F_ff3i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i24 = 204							   |	  INTEGER, PARAMETER :: PARAM_ff3i24 = 203
  INTEGER            ::     P_ff3i24 = 1								  INTEGER            ::     P_ff3i24 = 1
  LOGICAL            ::     F_ff3i24 = .FALSE.								  LOGICAL            ::     F_ff3i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i25 = 205							   |	  INTEGER, PARAMETER :: PARAM_ff3i25 = 204
  INTEGER            ::     P_ff3i25 = 1								  INTEGER            ::     P_ff3i25 = 1
  LOGICAL            ::     F_ff3i25 = .FALSE.								  LOGICAL            ::     F_ff3i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i26 = 206							   |	  INTEGER, PARAMETER :: PARAM_ff3i26 = 205
  INTEGER            ::     P_ff3i26 = 1								  INTEGER            ::     P_ff3i26 = 1
  LOGICAL            ::     F_ff3i26 = .FALSE.								  LOGICAL            ::     F_ff3i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i27 = 207							   |	  INTEGER, PARAMETER :: PARAM_ff3i27 = 206
  INTEGER            ::     P_ff3i27 = 1								  INTEGER            ::     P_ff3i27 = 1
  LOGICAL            ::     F_ff3i27 = .FALSE.								  LOGICAL            ::     F_ff3i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i28 = 208							   |	  INTEGER, PARAMETER :: PARAM_ff3i28 = 207
  INTEGER            ::     P_ff3i28 = 1								  INTEGER            ::     P_ff3i28 = 1
  LOGICAL            ::     F_ff3i28 = .FALSE.								  LOGICAL            ::     F_ff3i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i29 = 209							   |	  INTEGER, PARAMETER :: PARAM_ff3i29 = 208
  INTEGER            ::     P_ff3i29 = 1								  INTEGER            ::     P_ff3i29 = 1
  LOGICAL            ::     F_ff3i29 = .FALSE.								  LOGICAL            ::     F_ff3i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i30 = 210							   |	  INTEGER, PARAMETER :: PARAM_ff3i30 = 209
  INTEGER            ::     P_ff3i30 = 1								  INTEGER            ::     P_ff3i30 = 1
  LOGICAL            ::     F_ff3i30 = .FALSE.								  LOGICAL            ::     F_ff3i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i31 = 211							   |	  INTEGER, PARAMETER :: PARAM_ff3i31 = 210
  INTEGER            ::     P_ff3i31 = 1								  INTEGER            ::     P_ff3i31 = 1
  LOGICAL            ::     F_ff3i31 = .FALSE.								  LOGICAL            ::     F_ff3i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i32 = 212							   |	  INTEGER, PARAMETER :: PARAM_ff3i32 = 211
  INTEGER            ::     P_ff3i32 = 1								  INTEGER            ::     P_ff3i32 = 1
  LOGICAL            ::     F_ff3i32 = .FALSE.								  LOGICAL            ::     F_ff3i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff3i33 = 213							   |	  INTEGER, PARAMETER :: PARAM_ff3i33 = 212
  INTEGER            ::     P_ff3i33 = 1								  INTEGER            ::     P_ff3i33 = 1
  LOGICAL            ::     F_ff3i33 = .FALSE.								  LOGICAL            ::     F_ff3i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i01 = 214							   |	  INTEGER, PARAMETER :: PARAM_ff4i01 = 213
  INTEGER            ::     P_ff4i01 = 1								  INTEGER            ::     P_ff4i01 = 1
  LOGICAL            ::     F_ff4i01 = .FALSE.								  LOGICAL            ::     F_ff4i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i02 = 215							   |	  INTEGER, PARAMETER :: PARAM_ff4i02 = 214
  INTEGER            ::     P_ff4i02 = 1								  INTEGER            ::     P_ff4i02 = 1
  LOGICAL            ::     F_ff4i02 = .FALSE.								  LOGICAL            ::     F_ff4i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i03 = 216							   |	  INTEGER, PARAMETER :: PARAM_ff4i03 = 215
  INTEGER            ::     P_ff4i03 = 1								  INTEGER            ::     P_ff4i03 = 1
  LOGICAL            ::     F_ff4i03 = .FALSE.								  LOGICAL            ::     F_ff4i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i04 = 217							   |	  INTEGER, PARAMETER :: PARAM_ff4i04 = 216
  INTEGER            ::     P_ff4i04 = 1								  INTEGER            ::     P_ff4i04 = 1
  LOGICAL            ::     F_ff4i04 = .FALSE.								  LOGICAL            ::     F_ff4i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i05 = 218							   |	  INTEGER, PARAMETER :: PARAM_ff4i05 = 217
  INTEGER            ::     P_ff4i05 = 1								  INTEGER            ::     P_ff4i05 = 1
  LOGICAL            ::     F_ff4i05 = .FALSE.								  LOGICAL            ::     F_ff4i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i06 = 219							   |	  INTEGER, PARAMETER :: PARAM_ff4i06 = 218
  INTEGER            ::     P_ff4i06 = 1								  INTEGER            ::     P_ff4i06 = 1
  LOGICAL            ::     F_ff4i06 = .FALSE.								  LOGICAL            ::     F_ff4i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i07 = 220							   |	  INTEGER, PARAMETER :: PARAM_ff4i07 = 219
  INTEGER            ::     P_ff4i07 = 1								  INTEGER            ::     P_ff4i07 = 1
  LOGICAL            ::     F_ff4i07 = .FALSE.								  LOGICAL            ::     F_ff4i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i08 = 221							   |	  INTEGER, PARAMETER :: PARAM_ff4i08 = 220
  INTEGER            ::     P_ff4i08 = 1								  INTEGER            ::     P_ff4i08 = 1
  LOGICAL            ::     F_ff4i08 = .FALSE.								  LOGICAL            ::     F_ff4i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i09 = 222							   |	  INTEGER, PARAMETER :: PARAM_ff4i09 = 221
  INTEGER            ::     P_ff4i09 = 1								  INTEGER            ::     P_ff4i09 = 1
  LOGICAL            ::     F_ff4i09 = .FALSE.								  LOGICAL            ::     F_ff4i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i10 = 223							   |	  INTEGER, PARAMETER :: PARAM_ff4i10 = 222
  INTEGER            ::     P_ff4i10 = 1								  INTEGER            ::     P_ff4i10 = 1
  LOGICAL            ::     F_ff4i10 = .FALSE.								  LOGICAL            ::     F_ff4i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i11 = 224							   |	  INTEGER, PARAMETER :: PARAM_ff4i11 = 223
  INTEGER            ::     P_ff4i11 = 1								  INTEGER            ::     P_ff4i11 = 1
  LOGICAL            ::     F_ff4i11 = .FALSE.								  LOGICAL            ::     F_ff4i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i12 = 225							   |	  INTEGER, PARAMETER :: PARAM_ff4i12 = 224
  INTEGER            ::     P_ff4i12 = 1								  INTEGER            ::     P_ff4i12 = 1
  LOGICAL            ::     F_ff4i12 = .FALSE.								  LOGICAL            ::     F_ff4i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i13 = 226							   |	  INTEGER, PARAMETER :: PARAM_ff4i13 = 225
  INTEGER            ::     P_ff4i13 = 1								  INTEGER            ::     P_ff4i13 = 1
  LOGICAL            ::     F_ff4i13 = .FALSE.								  LOGICAL            ::     F_ff4i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i14 = 227							   |	  INTEGER, PARAMETER :: PARAM_ff4i14 = 226
  INTEGER            ::     P_ff4i14 = 1								  INTEGER            ::     P_ff4i14 = 1
  LOGICAL            ::     F_ff4i14 = .FALSE.								  LOGICAL            ::     F_ff4i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i15 = 228							   |	  INTEGER, PARAMETER :: PARAM_ff4i15 = 227
  INTEGER            ::     P_ff4i15 = 1								  INTEGER            ::     P_ff4i15 = 1
  LOGICAL            ::     F_ff4i15 = .FALSE.								  LOGICAL            ::     F_ff4i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i16 = 229							   |	  INTEGER, PARAMETER :: PARAM_ff4i16 = 228
  INTEGER            ::     P_ff4i16 = 1								  INTEGER            ::     P_ff4i16 = 1
  LOGICAL            ::     F_ff4i16 = .FALSE.								  LOGICAL            ::     F_ff4i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i17 = 230							   |	  INTEGER, PARAMETER :: PARAM_ff4i17 = 229
  INTEGER            ::     P_ff4i17 = 1								  INTEGER            ::     P_ff4i17 = 1
  LOGICAL            ::     F_ff4i17 = .FALSE.								  LOGICAL            ::     F_ff4i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i18 = 231							   |	  INTEGER, PARAMETER :: PARAM_ff4i18 = 230
  INTEGER            ::     P_ff4i18 = 1								  INTEGER            ::     P_ff4i18 = 1
  LOGICAL            ::     F_ff4i18 = .FALSE.								  LOGICAL            ::     F_ff4i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i19 = 232							   |	  INTEGER, PARAMETER :: PARAM_ff4i19 = 231
  INTEGER            ::     P_ff4i19 = 1								  INTEGER            ::     P_ff4i19 = 1
  LOGICAL            ::     F_ff4i19 = .FALSE.								  LOGICAL            ::     F_ff4i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i20 = 233							   |	  INTEGER, PARAMETER :: PARAM_ff4i20 = 232
  INTEGER            ::     P_ff4i20 = 1								  INTEGER            ::     P_ff4i20 = 1
  LOGICAL            ::     F_ff4i20 = .FALSE.								  LOGICAL            ::     F_ff4i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i21 = 234							   |	  INTEGER, PARAMETER :: PARAM_ff4i21 = 233
  INTEGER            ::     P_ff4i21 = 1								  INTEGER            ::     P_ff4i21 = 1
  LOGICAL            ::     F_ff4i21 = .FALSE.								  LOGICAL            ::     F_ff4i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i22 = 235							   |	  INTEGER, PARAMETER :: PARAM_ff4i22 = 234
  INTEGER            ::     P_ff4i22 = 1								  INTEGER            ::     P_ff4i22 = 1
  LOGICAL            ::     F_ff4i22 = .FALSE.								  LOGICAL            ::     F_ff4i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i23 = 236							   |	  INTEGER, PARAMETER :: PARAM_ff4i23 = 235
  INTEGER            ::     P_ff4i23 = 1								  INTEGER            ::     P_ff4i23 = 1
  LOGICAL            ::     F_ff4i23 = .FALSE.								  LOGICAL            ::     F_ff4i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i24 = 237							   |	  INTEGER, PARAMETER :: PARAM_ff4i24 = 236
  INTEGER            ::     P_ff4i24 = 1								  INTEGER            ::     P_ff4i24 = 1
  LOGICAL            ::     F_ff4i24 = .FALSE.								  LOGICAL            ::     F_ff4i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i25 = 238							   |	  INTEGER, PARAMETER :: PARAM_ff4i25 = 237
  INTEGER            ::     P_ff4i25 = 1								  INTEGER            ::     P_ff4i25 = 1
  LOGICAL            ::     F_ff4i25 = .FALSE.								  LOGICAL            ::     F_ff4i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i26 = 239							   |	  INTEGER, PARAMETER :: PARAM_ff4i26 = 238
  INTEGER            ::     P_ff4i26 = 1								  INTEGER            ::     P_ff4i26 = 1
  LOGICAL            ::     F_ff4i26 = .FALSE.								  LOGICAL            ::     F_ff4i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i27 = 240							   |	  INTEGER, PARAMETER :: PARAM_ff4i27 = 239
  INTEGER            ::     P_ff4i27 = 1								  INTEGER            ::     P_ff4i27 = 1
  LOGICAL            ::     F_ff4i27 = .FALSE.								  LOGICAL            ::     F_ff4i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i28 = 241							   |	  INTEGER, PARAMETER :: PARAM_ff4i28 = 240
  INTEGER            ::     P_ff4i28 = 1								  INTEGER            ::     P_ff4i28 = 1
  LOGICAL            ::     F_ff4i28 = .FALSE.								  LOGICAL            ::     F_ff4i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i29 = 242							   |	  INTEGER, PARAMETER :: PARAM_ff4i29 = 241
  INTEGER            ::     P_ff4i29 = 1								  INTEGER            ::     P_ff4i29 = 1
  LOGICAL            ::     F_ff4i29 = .FALSE.								  LOGICAL            ::     F_ff4i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i30 = 243							   |	  INTEGER, PARAMETER :: PARAM_ff4i30 = 242
  INTEGER            ::     P_ff4i30 = 1								  INTEGER            ::     P_ff4i30 = 1
  LOGICAL            ::     F_ff4i30 = .FALSE.								  LOGICAL            ::     F_ff4i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i31 = 244							   |	  INTEGER, PARAMETER :: PARAM_ff4i31 = 243
  INTEGER            ::     P_ff4i31 = 1								  INTEGER            ::     P_ff4i31 = 1
  LOGICAL            ::     F_ff4i31 = .FALSE.								  LOGICAL            ::     F_ff4i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i32 = 245							   |	  INTEGER, PARAMETER :: PARAM_ff4i32 = 244
  INTEGER            ::     P_ff4i32 = 1								  INTEGER            ::     P_ff4i32 = 1
  LOGICAL            ::     F_ff4i32 = .FALSE.								  LOGICAL            ::     F_ff4i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff4i33 = 246							   |	  INTEGER, PARAMETER :: PARAM_ff4i33 = 245
  INTEGER            ::     P_ff4i33 = 1								  INTEGER            ::     P_ff4i33 = 1
  LOGICAL            ::     F_ff4i33 = .FALSE.								  LOGICAL            ::     F_ff4i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i01 = 247							   |	  INTEGER, PARAMETER :: PARAM_ff7i01 = 246
  INTEGER            ::     P_ff7i01 = 1								  INTEGER            ::     P_ff7i01 = 1
  LOGICAL            ::     F_ff7i01 = .FALSE.								  LOGICAL            ::     F_ff7i01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i02 = 248							   |	  INTEGER, PARAMETER :: PARAM_ff7i02 = 247
  INTEGER            ::     P_ff7i02 = 1								  INTEGER            ::     P_ff7i02 = 1
  LOGICAL            ::     F_ff7i02 = .FALSE.								  LOGICAL            ::     F_ff7i02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i03 = 249							   |	  INTEGER, PARAMETER :: PARAM_ff7i03 = 248
  INTEGER            ::     P_ff7i03 = 1								  INTEGER            ::     P_ff7i03 = 1
  LOGICAL            ::     F_ff7i03 = .FALSE.								  LOGICAL            ::     F_ff7i03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i04 = 250							   |	  INTEGER, PARAMETER :: PARAM_ff7i04 = 249
  INTEGER            ::     P_ff7i04 = 1								  INTEGER            ::     P_ff7i04 = 1
  LOGICAL            ::     F_ff7i04 = .FALSE.								  LOGICAL            ::     F_ff7i04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i05 = 251							   |	  INTEGER, PARAMETER :: PARAM_ff7i05 = 250
  INTEGER            ::     P_ff7i05 = 1								  INTEGER            ::     P_ff7i05 = 1
  LOGICAL            ::     F_ff7i05 = .FALSE.								  LOGICAL            ::     F_ff7i05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i06 = 252							   |	  INTEGER, PARAMETER :: PARAM_ff7i06 = 251
  INTEGER            ::     P_ff7i06 = 1								  INTEGER            ::     P_ff7i06 = 1
  LOGICAL            ::     F_ff7i06 = .FALSE.								  LOGICAL            ::     F_ff7i06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i07 = 253							   |	  INTEGER, PARAMETER :: PARAM_ff7i07 = 252
  INTEGER            ::     P_ff7i07 = 1								  INTEGER            ::     P_ff7i07 = 1
  LOGICAL            ::     F_ff7i07 = .FALSE.								  LOGICAL            ::     F_ff7i07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i08 = 254							   |	  INTEGER, PARAMETER :: PARAM_ff7i08 = 253
  INTEGER            ::     P_ff7i08 = 1								  INTEGER            ::     P_ff7i08 = 1
  LOGICAL            ::     F_ff7i08 = .FALSE.								  LOGICAL            ::     F_ff7i08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i09 = 255							   |	  INTEGER, PARAMETER :: PARAM_ff7i09 = 254
  INTEGER            ::     P_ff7i09 = 1								  INTEGER            ::     P_ff7i09 = 1
  LOGICAL            ::     F_ff7i09 = .FALSE.								  LOGICAL            ::     F_ff7i09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i10 = 256							   |	  INTEGER, PARAMETER :: PARAM_ff7i10 = 255
  INTEGER            ::     P_ff7i10 = 1								  INTEGER            ::     P_ff7i10 = 1
  LOGICAL            ::     F_ff7i10 = .FALSE.								  LOGICAL            ::     F_ff7i10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i11 = 257							   |	  INTEGER, PARAMETER :: PARAM_ff7i11 = 256
  INTEGER            ::     P_ff7i11 = 1								  INTEGER            ::     P_ff7i11 = 1
  LOGICAL            ::     F_ff7i11 = .FALSE.								  LOGICAL            ::     F_ff7i11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i12 = 258							   |	  INTEGER, PARAMETER :: PARAM_ff7i12 = 257
  INTEGER            ::     P_ff7i12 = 1								  INTEGER            ::     P_ff7i12 = 1
  LOGICAL            ::     F_ff7i12 = .FALSE.								  LOGICAL            ::     F_ff7i12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i13 = 259							   |	  INTEGER, PARAMETER :: PARAM_ff7i13 = 258
  INTEGER            ::     P_ff7i13 = 1								  INTEGER            ::     P_ff7i13 = 1
  LOGICAL            ::     F_ff7i13 = .FALSE.								  LOGICAL            ::     F_ff7i13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i14 = 260							   |	  INTEGER, PARAMETER :: PARAM_ff7i14 = 259
  INTEGER            ::     P_ff7i14 = 1								  INTEGER            ::     P_ff7i14 = 1
  LOGICAL            ::     F_ff7i14 = .FALSE.								  LOGICAL            ::     F_ff7i14 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i15 = 261							   |	  INTEGER, PARAMETER :: PARAM_ff7i15 = 260
  INTEGER            ::     P_ff7i15 = 1								  INTEGER            ::     P_ff7i15 = 1
  LOGICAL            ::     F_ff7i15 = .FALSE.								  LOGICAL            ::     F_ff7i15 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i16 = 262							   |	  INTEGER, PARAMETER :: PARAM_ff7i16 = 261
  INTEGER            ::     P_ff7i16 = 1								  INTEGER            ::     P_ff7i16 = 1
  LOGICAL            ::     F_ff7i16 = .FALSE.								  LOGICAL            ::     F_ff7i16 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i17 = 263							   |	  INTEGER, PARAMETER :: PARAM_ff7i17 = 262
  INTEGER            ::     P_ff7i17 = 1								  INTEGER            ::     P_ff7i17 = 1
  LOGICAL            ::     F_ff7i17 = .FALSE.								  LOGICAL            ::     F_ff7i17 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i18 = 264							   |	  INTEGER, PARAMETER :: PARAM_ff7i18 = 263
  INTEGER            ::     P_ff7i18 = 1								  INTEGER            ::     P_ff7i18 = 1
  LOGICAL            ::     F_ff7i18 = .FALSE.								  LOGICAL            ::     F_ff7i18 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i19 = 265							   |	  INTEGER, PARAMETER :: PARAM_ff7i19 = 264
  INTEGER            ::     P_ff7i19 = 1								  INTEGER            ::     P_ff7i19 = 1
  LOGICAL            ::     F_ff7i19 = .FALSE.								  LOGICAL            ::     F_ff7i19 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i20 = 266							   |	  INTEGER, PARAMETER :: PARAM_ff7i20 = 265
  INTEGER            ::     P_ff7i20 = 1								  INTEGER            ::     P_ff7i20 = 1
  LOGICAL            ::     F_ff7i20 = .FALSE.								  LOGICAL            ::     F_ff7i20 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i21 = 267							   |	  INTEGER, PARAMETER :: PARAM_ff7i21 = 266
  INTEGER            ::     P_ff7i21 = 1								  INTEGER            ::     P_ff7i21 = 1
  LOGICAL            ::     F_ff7i21 = .FALSE.								  LOGICAL            ::     F_ff7i21 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i22 = 268							   |	  INTEGER, PARAMETER :: PARAM_ff7i22 = 267
  INTEGER            ::     P_ff7i22 = 1								  INTEGER            ::     P_ff7i22 = 1
  LOGICAL            ::     F_ff7i22 = .FALSE.								  LOGICAL            ::     F_ff7i22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i23 = 269							   |	  INTEGER, PARAMETER :: PARAM_ff7i23 = 268
  INTEGER            ::     P_ff7i23 = 1								  INTEGER            ::     P_ff7i23 = 1
  LOGICAL            ::     F_ff7i23 = .FALSE.								  LOGICAL            ::     F_ff7i23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i24 = 270							   |	  INTEGER, PARAMETER :: PARAM_ff7i24 = 269
  INTEGER            ::     P_ff7i24 = 1								  INTEGER            ::     P_ff7i24 = 1
  LOGICAL            ::     F_ff7i24 = .FALSE.								  LOGICAL            ::     F_ff7i24 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i25 = 271							   |	  INTEGER, PARAMETER :: PARAM_ff7i25 = 270
  INTEGER            ::     P_ff7i25 = 1								  INTEGER            ::     P_ff7i25 = 1
  LOGICAL            ::     F_ff7i25 = .FALSE.								  LOGICAL            ::     F_ff7i25 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i26 = 272							   |	  INTEGER, PARAMETER :: PARAM_ff7i26 = 271
  INTEGER            ::     P_ff7i26 = 1								  INTEGER            ::     P_ff7i26 = 1
  LOGICAL            ::     F_ff7i26 = .FALSE.								  LOGICAL            ::     F_ff7i26 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i27 = 273							   |	  INTEGER, PARAMETER :: PARAM_ff7i27 = 272
  INTEGER            ::     P_ff7i27 = 1								  INTEGER            ::     P_ff7i27 = 1
  LOGICAL            ::     F_ff7i27 = .FALSE.								  LOGICAL            ::     F_ff7i27 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i28 = 274							   |	  INTEGER, PARAMETER :: PARAM_ff7i28 = 273
  INTEGER            ::     P_ff7i28 = 1								  INTEGER            ::     P_ff7i28 = 1
  LOGICAL            ::     F_ff7i28 = .FALSE.								  LOGICAL            ::     F_ff7i28 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i29 = 275							   |	  INTEGER, PARAMETER :: PARAM_ff7i29 = 274
  INTEGER            ::     P_ff7i29 = 1								  INTEGER            ::     P_ff7i29 = 1
  LOGICAL            ::     F_ff7i29 = .FALSE.								  LOGICAL            ::     F_ff7i29 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i30 = 276							   |	  INTEGER, PARAMETER :: PARAM_ff7i30 = 275
  INTEGER            ::     P_ff7i30 = 1								  INTEGER            ::     P_ff7i30 = 1
  LOGICAL            ::     F_ff7i30 = .FALSE.								  LOGICAL            ::     F_ff7i30 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i31 = 277							   |	  INTEGER, PARAMETER :: PARAM_ff7i31 = 276
  INTEGER            ::     P_ff7i31 = 1								  INTEGER            ::     P_ff7i31 = 1
  LOGICAL            ::     F_ff7i31 = .FALSE.								  LOGICAL            ::     F_ff7i31 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i32 = 278							   |	  INTEGER, PARAMETER :: PARAM_ff7i32 = 277
  INTEGER            ::     P_ff7i32 = 1								  INTEGER            ::     P_ff7i32 = 1
  LOGICAL            ::     F_ff7i32 = .FALSE.								  LOGICAL            ::     F_ff7i32 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ff7i33 = 279							   |	  INTEGER, PARAMETER :: PARAM_ff7i33 = 278
  INTEGER            ::     P_ff7i33 = 1								  INTEGER            ::     P_ff7i33 = 1
  LOGICAL            ::     F_ff7i33 = .FALSE.								  LOGICAL            ::     F_ff7i33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnip = 280							   |	  INTEGER, PARAMETER :: PARAM_qnip = 279
  INTEGER            ::     P_qnip = 1									  INTEGER            ::     P_qnip = 1
  LOGICAL            ::     F_qnip = .FALSE.								  LOGICAL            ::     F_qnip = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnic = 281							   |	  INTEGER, PARAMETER :: PARAM_qnic = 280
  INTEGER            ::     P_qnic = 1									  INTEGER            ::     P_qnic = 1
  LOGICAL            ::     F_qnic = .FALSE.								  LOGICAL            ::     F_qnic = .FALSE.
  INTEGER, PARAMETER :: PARAM_qnid = 282							   |	  INTEGER, PARAMETER :: PARAM_qnid = 281
  INTEGER            ::     P_qnid = 1									  INTEGER            ::     P_qnid = 1
  LOGICAL            ::     F_qnid = .FALSE.								  LOGICAL            ::     F_qnid = .FALSE.
  INTEGER, PARAMETER :: PARAM_effr = 283							   |	  INTEGER, PARAMETER :: PARAM_effr = 282
  INTEGER            ::     P_effr = 1									  INTEGER            ::     P_effr = 1
  LOGICAL            ::     F_effr = .FALSE.								  LOGICAL            ::     F_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_ice_effr = 284							   |	  INTEGER, PARAMETER :: PARAM_ice_effr = 283
  INTEGER            ::     P_ice_effr = 1								  INTEGER            ::     P_ice_effr = 1
  LOGICAL            ::     F_ice_effr = .FALSE.							  LOGICAL            ::     F_ice_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_tot_effr = 285							   |	  INTEGER, PARAMETER :: PARAM_tot_effr = 284
  INTEGER            ::     P_tot_effr = 1								  INTEGER            ::     P_tot_effr = 1
  LOGICAL            ::     F_tot_effr = .FALSE.							  LOGICAL            ::     F_tot_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_qic_effr = 286							   |	  INTEGER, PARAMETER :: PARAM_qic_effr = 285
  INTEGER            ::     P_qic_effr = 1								  INTEGER            ::     P_qic_effr = 1
  LOGICAL            ::     F_qic_effr = .FALSE.							  LOGICAL            ::     F_qic_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_qip_effr = 287							   |	  INTEGER, PARAMETER :: PARAM_qip_effr = 286
  INTEGER            ::     P_qip_effr = 1								  INTEGER            ::     P_qip_effr = 1
  LOGICAL            ::     F_qip_effr = .FALSE.							  LOGICAL            ::     F_qip_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_qid_effr = 288							   |	  INTEGER, PARAMETER :: PARAM_qid_effr = 287
  INTEGER            ::     P_qid_effr = 1								  INTEGER            ::     P_qid_effr = 1
  LOGICAL            ::     F_qid_effr = .FALSE.							  LOGICAL            ::     F_qid_effr = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_scalar = 289							   |	  INTEGER, PARAMETER :: PARAM_NUM_scalar = 288
  INTEGER            ::       NUM_scalar = 1								  INTEGER            ::       NUM_scalar = 1
  INTEGER, PARAMETER :: PARAM_dfi_qndrop = 1								  INTEGER, PARAMETER :: PARAM_dfi_qndrop = 1
  INTEGER            ::     P_dfi_qndrop = 1								  INTEGER            ::     P_dfi_qndrop = 1
  LOGICAL            ::     F_dfi_qndrop = .FALSE.							  LOGICAL            ::     F_dfi_qndrop = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qni = 2								  INTEGER, PARAMETER :: PARAM_dfi_qni = 2
  INTEGER            ::     P_dfi_qni = 1								  INTEGER            ::     P_dfi_qni = 1
  LOGICAL            ::     F_dfi_qni = .FALSE.								  LOGICAL            ::     F_dfi_qni = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qt = 3								  INTEGER, PARAMETER :: PARAM_dfi_qt = 3
  INTEGER            ::     P_dfi_qt = 1								  INTEGER            ::     P_dfi_qt = 1
  LOGICAL            ::     F_dfi_qt = .FALSE.								  LOGICAL            ::     F_dfi_qt = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qns = 4								  INTEGER, PARAMETER :: PARAM_dfi_qns = 4
  INTEGER            ::     P_dfi_qns = 1								  INTEGER            ::     P_dfi_qns = 1
  LOGICAL            ::     F_dfi_qns = .FALSE.								  LOGICAL            ::     F_dfi_qns = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qnr = 5								  INTEGER, PARAMETER :: PARAM_dfi_qnr = 5
  INTEGER            ::     P_dfi_qnr = 1								  INTEGER            ::     P_dfi_qnr = 1
  LOGICAL            ::     F_dfi_qnr = .FALSE.								  LOGICAL            ::     F_dfi_qnr = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qng = 6								  INTEGER, PARAMETER :: PARAM_dfi_qng = 6
  INTEGER            ::     P_dfi_qng = 1								  INTEGER            ::     P_dfi_qng = 1
  LOGICAL            ::     F_dfi_qng = .FALSE.								  LOGICAL            ::     F_dfi_qng = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qnh = 7								  INTEGER, PARAMETER :: PARAM_dfi_qnh = 7
  INTEGER            ::     P_dfi_qnh = 1								  INTEGER            ::     P_dfi_qnh = 1
  LOGICAL            ::     F_dfi_qnh = .FALSE.								  LOGICAL            ::     F_dfi_qnh = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qnn = 8								  INTEGER, PARAMETER :: PARAM_dfi_qnn = 8
  INTEGER            ::     P_dfi_qnn = 1								  INTEGER            ::     P_dfi_qnn = 1
  LOGICAL            ::     F_dfi_qnn = .FALSE.								  LOGICAL            ::     F_dfi_qnn = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qnc = 9								  INTEGER, PARAMETER :: PARAM_dfi_qnc = 9
  INTEGER            ::     P_dfi_qnc = 1								  INTEGER            ::     P_dfi_qnc = 1
  LOGICAL            ::     F_dfi_qnc = .FALSE.								  LOGICAL            ::     F_dfi_qnc = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qvolg = 10							   |	  INTEGER, PARAMETER :: PARAM_dfi_qnwfa = 10
												   >	  INTEGER            ::     P_dfi_qnwfa = 1
												   >	  LOGICAL            ::     F_dfi_qnwfa = .FALSE.
												   >	  INTEGER, PARAMETER :: PARAM_dfi_qnifa = 11
												   >	  INTEGER            ::     P_dfi_qnifa = 1
												   >	  LOGICAL            ::     F_dfi_qnifa = .FALSE.
												   >	  INTEGER, PARAMETER :: PARAM_dfi_qvolg = 12
  INTEGER            ::     P_dfi_qvolg = 1								  INTEGER            ::     P_dfi_qvolg = 1
  LOGICAL            ::     F_dfi_qvolg = .FALSE.							  LOGICAL            ::     F_dfi_qvolg = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qvolh = 11							   |	  INTEGER, PARAMETER :: PARAM_dfi_qvolh = 13
  INTEGER            ::     P_dfi_qvolh = 1								  INTEGER            ::     P_dfi_qvolh = 1
  LOGICAL            ::     F_dfi_qvolh = .FALSE.							  LOGICAL            ::     F_dfi_qvolh = .FALSE.
  INTEGER, PARAMETER :: PARAM_dfi_qir = 12							   |	  INTEGER, PARAMETER :: PARAM_NUM_dfi_scalar = 14
  INTEGER            ::     P_dfi_qir = 1							   <
  LOGICAL            ::     F_dfi_qir = .FALSE.							   <
  INTEGER, PARAMETER :: PARAM_dfi_qib = 13							   <
  INTEGER            ::     P_dfi_qib = 1							   <
  LOGICAL            ::     F_dfi_qib = .FALSE.							   <
  INTEGER, PARAMETER :: PARAM_dfi_qke_adv = 14							   <
  INTEGER            ::     P_dfi_qke_adv = 1							   <
  LOGICAL            ::     F_dfi_qke_adv = .FALSE.						   <
  INTEGER, PARAMETER :: PARAM_NUM_dfi_scalar = 15						   <
  INTEGER            ::       NUM_dfi_scalar = 1							  INTEGER            ::       NUM_dfi_scalar = 1
  INTEGER, PARAMETER :: PARAM_ocarbon = 1								  INTEGER, PARAMETER :: PARAM_ocarbon = 1
  INTEGER            ::     P_ocarbon = 1								  INTEGER            ::     P_ocarbon = 1
  LOGICAL            ::     F_ocarbon = .FALSE.								  LOGICAL            ::     F_ocarbon = .FALSE.
  INTEGER, PARAMETER :: PARAM_seasalt = 2								  INTEGER, PARAMETER :: PARAM_seasalt = 2
  INTEGER            ::     P_seasalt = 1								  INTEGER            ::     P_seasalt = 1
  LOGICAL            ::     F_seasalt = .FALSE.								  LOGICAL            ::     F_seasalt = .FALSE.
  INTEGER, PARAMETER :: PARAM_dust = 3									  INTEGER, PARAMETER :: PARAM_dust = 3
  INTEGER            ::     P_dust = 1									  INTEGER            ::     P_dust = 1
  LOGICAL            ::     F_dust = .FALSE.								  LOGICAL            ::     F_dust = .FALSE.
  INTEGER, PARAMETER :: PARAM_bcarbon = 4								  INTEGER, PARAMETER :: PARAM_bcarbon = 4
  INTEGER            ::     P_bcarbon = 1								  INTEGER            ::     P_bcarbon = 1
  LOGICAL            ::     F_bcarbon = .FALSE.								  LOGICAL            ::     F_bcarbon = .FALSE.
  INTEGER, PARAMETER :: PARAM_sulfate = 5								  INTEGER, PARAMETER :: PARAM_sulfate = 5
  INTEGER            ::     P_sulfate = 1								  INTEGER            ::     P_sulfate = 1
  LOGICAL            ::     F_sulfate = .FALSE.								  LOGICAL            ::     F_sulfate = .FALSE.
  INTEGER, PARAMETER :: PARAM_upperaer = 6								  INTEGER, PARAMETER :: PARAM_upperaer = 6
  INTEGER            ::     P_upperaer = 1								  INTEGER            ::     P_upperaer = 1
  LOGICAL            ::     F_upperaer = .FALSE.							  LOGICAL            ::     F_upperaer = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_aerod = 7								  INTEGER, PARAMETER :: PARAM_NUM_aerod = 7
  INTEGER            ::       NUM_aerod = 1								  INTEGER            ::       NUM_aerod = 1
  INTEGER, PARAMETER :: PARAM_mth01 = 1									  INTEGER, PARAMETER :: PARAM_mth01 = 1
  INTEGER            ::     P_mth01 = 1									  INTEGER            ::     P_mth01 = 1
  LOGICAL            ::     F_mth01 = .FALSE.								  LOGICAL            ::     F_mth01 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth02 = 2									  INTEGER, PARAMETER :: PARAM_mth02 = 2
  INTEGER            ::     P_mth02 = 1									  INTEGER            ::     P_mth02 = 1
  LOGICAL            ::     F_mth02 = .FALSE.								  LOGICAL            ::     F_mth02 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth03 = 3									  INTEGER, PARAMETER :: PARAM_mth03 = 3
  INTEGER            ::     P_mth03 = 1									  INTEGER            ::     P_mth03 = 1
  LOGICAL            ::     F_mth03 = .FALSE.								  LOGICAL            ::     F_mth03 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth04 = 4									  INTEGER, PARAMETER :: PARAM_mth04 = 4
  INTEGER            ::     P_mth04 = 1									  INTEGER            ::     P_mth04 = 1
  LOGICAL            ::     F_mth04 = .FALSE.								  LOGICAL            ::     F_mth04 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth05 = 5									  INTEGER, PARAMETER :: PARAM_mth05 = 5
  INTEGER            ::     P_mth05 = 1									  INTEGER            ::     P_mth05 = 1
  LOGICAL            ::     F_mth05 = .FALSE.								  LOGICAL            ::     F_mth05 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth06 = 6									  INTEGER, PARAMETER :: PARAM_mth06 = 6
  INTEGER            ::     P_mth06 = 1									  INTEGER            ::     P_mth06 = 1
  LOGICAL            ::     F_mth06 = .FALSE.								  LOGICAL            ::     F_mth06 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth07 = 7									  INTEGER, PARAMETER :: PARAM_mth07 = 7
  INTEGER            ::     P_mth07 = 1									  INTEGER            ::     P_mth07 = 1
  LOGICAL            ::     F_mth07 = .FALSE.								  LOGICAL            ::     F_mth07 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth08 = 8									  INTEGER, PARAMETER :: PARAM_mth08 = 8
  INTEGER            ::     P_mth08 = 1									  INTEGER            ::     P_mth08 = 1
  LOGICAL            ::     F_mth08 = .FALSE.								  LOGICAL            ::     F_mth08 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth09 = 9									  INTEGER, PARAMETER :: PARAM_mth09 = 9
  INTEGER            ::     P_mth09 = 1									  INTEGER            ::     P_mth09 = 1
  LOGICAL            ::     F_mth09 = .FALSE.								  LOGICAL            ::     F_mth09 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth10 = 10								  INTEGER, PARAMETER :: PARAM_mth10 = 10
  INTEGER            ::     P_mth10 = 1									  INTEGER            ::     P_mth10 = 1
  LOGICAL            ::     F_mth10 = .FALSE.								  LOGICAL            ::     F_mth10 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth11 = 11								  INTEGER, PARAMETER :: PARAM_mth11 = 11
  INTEGER            ::     P_mth11 = 1									  INTEGER            ::     P_mth11 = 1
  LOGICAL            ::     F_mth11 = .FALSE.								  LOGICAL            ::     F_mth11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_mth12 = 12								  INTEGER, PARAMETER :: PARAM_mth12 = 12
  INTEGER            ::     P_mth12 = 1									  INTEGER            ::     P_mth12 = 1
  LOGICAL            ::     F_mth12 = .FALSE.								  LOGICAL            ::     F_mth12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_ozmixm = 13								  INTEGER, PARAMETER :: PARAM_NUM_ozmixm = 13
  INTEGER            ::       NUM_ozmixm = 1								  INTEGER            ::       NUM_ozmixm = 1
  INTEGER, PARAMETER :: PARAM_sul = 1									  INTEGER, PARAMETER :: PARAM_sul = 1
  INTEGER            ::     P_sul = 1									  INTEGER            ::     P_sul = 1
  LOGICAL            ::     F_sul = .FALSE.								  LOGICAL            ::     F_sul = .FALSE.
  INTEGER, PARAMETER :: PARAM_sslt = 2									  INTEGER, PARAMETER :: PARAM_sslt = 2
  INTEGER            ::     P_sslt = 1									  INTEGER            ::     P_sslt = 1
  LOGICAL            ::     F_sslt = .FALSE.								  LOGICAL            ::     F_sslt = .FALSE.
  INTEGER, PARAMETER :: PARAM_dust1 = 3									  INTEGER, PARAMETER :: PARAM_dust1 = 3
  INTEGER            ::     P_dust1 = 1									  INTEGER            ::     P_dust1 = 1
  LOGICAL            ::     F_dust1 = .FALSE.								  LOGICAL            ::     F_dust1 = .FALSE.
  INTEGER, PARAMETER :: PARAM_dust2 = 4									  INTEGER, PARAMETER :: PARAM_dust2 = 4
  INTEGER            ::     P_dust2 = 1									  INTEGER            ::     P_dust2 = 1
  LOGICAL            ::     F_dust2 = .FALSE.								  LOGICAL            ::     F_dust2 = .FALSE.
  INTEGER, PARAMETER :: PARAM_dust3 = 5									  INTEGER, PARAMETER :: PARAM_dust3 = 5
  INTEGER            ::     P_dust3 = 1									  INTEGER            ::     P_dust3 = 1
  LOGICAL            ::     F_dust3 = .FALSE.								  LOGICAL            ::     F_dust3 = .FALSE.
  INTEGER, PARAMETER :: PARAM_dust4 = 6									  INTEGER, PARAMETER :: PARAM_dust4 = 6
  INTEGER            ::     P_dust4 = 1									  INTEGER            ::     P_dust4 = 1
  LOGICAL            ::     F_dust4 = .FALSE.								  LOGICAL            ::     F_dust4 = .FALSE.
  INTEGER, PARAMETER :: PARAM_ocpho = 7									  INTEGER, PARAMETER :: PARAM_ocpho = 7
  INTEGER            ::     P_ocpho = 1									  INTEGER            ::     P_ocpho = 1
  LOGICAL            ::     F_ocpho = .FALSE.								  LOGICAL            ::     F_ocpho = .FALSE.
  INTEGER, PARAMETER :: PARAM_bcpho = 8									  INTEGER, PARAMETER :: PARAM_bcpho = 8
  INTEGER            ::     P_bcpho = 1									  INTEGER            ::     P_bcpho = 1
  LOGICAL            ::     F_bcpho = .FALSE.								  LOGICAL            ::     F_bcpho = .FALSE.
  INTEGER, PARAMETER :: PARAM_ocphi = 9									  INTEGER, PARAMETER :: PARAM_ocphi = 9
  INTEGER            ::     P_ocphi = 1									  INTEGER            ::     P_ocphi = 1
  LOGICAL            ::     F_ocphi = .FALSE.								  LOGICAL            ::     F_ocphi = .FALSE.
  INTEGER, PARAMETER :: PARAM_bcphi = 10								  INTEGER, PARAMETER :: PARAM_bcphi = 10
  INTEGER            ::     P_bcphi = 1									  INTEGER            ::     P_bcphi = 1
  LOGICAL            ::     F_bcphi = .FALSE.								  LOGICAL            ::     F_bcphi = .FALSE.
  INTEGER, PARAMETER :: PARAM_bg = 11									  INTEGER, PARAMETER :: PARAM_bg = 11
  INTEGER            ::     P_bg = 1									  INTEGER            ::     P_bg = 1
  LOGICAL            ::     F_bg = .FALSE.								  LOGICAL            ::     F_bg = .FALSE.
  INTEGER, PARAMETER :: PARAM_volc = 12									  INTEGER, PARAMETER :: PARAM_volc = 12
  INTEGER            ::     P_volc = 1									  INTEGER            ::     P_volc = 1
  LOGICAL            ::     F_volc = .FALSE.								  LOGICAL            ::     F_volc = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_aerosolc = 13								  INTEGER, PARAMETER :: PARAM_NUM_aerosolc = 13
  INTEGER            ::       NUM_aerosolc = 1								  INTEGER            ::       NUM_aerosolc = 1
  INTEGER, PARAMETER :: PARAM_u_ndg_new = 1								  INTEGER, PARAMETER :: PARAM_u_ndg_new = 1
  INTEGER            ::     P_u_ndg_new = 1								  INTEGER            ::     P_u_ndg_new = 1
  LOGICAL            ::     F_u_ndg_new = .FALSE.							  LOGICAL            ::     F_u_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_v_ndg_new = 2								  INTEGER, PARAMETER :: PARAM_v_ndg_new = 2
  INTEGER            ::     P_v_ndg_new = 1								  INTEGER            ::     P_v_ndg_new = 1
  LOGICAL            ::     F_v_ndg_new = .FALSE.							  LOGICAL            ::     F_v_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_t_ndg_new = 3								  INTEGER, PARAMETER :: PARAM_t_ndg_new = 3
  INTEGER            ::     P_t_ndg_new = 1								  INTEGER            ::     P_t_ndg_new = 1
  LOGICAL            ::     F_t_ndg_new = .FALSE.							  LOGICAL            ::     F_t_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_q_ndg_new = 4								  INTEGER, PARAMETER :: PARAM_q_ndg_new = 4
  INTEGER            ::     P_q_ndg_new = 1								  INTEGER            ::     P_q_ndg_new = 1
  LOGICAL            ::     F_q_ndg_new = .FALSE.							  LOGICAL            ::     F_q_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_ph_ndg_new = 5								  INTEGER, PARAMETER :: PARAM_ph_ndg_new = 5
  INTEGER            ::     P_ph_ndg_new = 1								  INTEGER            ::     P_ph_ndg_new = 1
  LOGICAL            ::     F_ph_ndg_new = .FALSE.							  LOGICAL            ::     F_ph_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_u_ndg_old = 6								  INTEGER, PARAMETER :: PARAM_u_ndg_old = 6
  INTEGER            ::     P_u_ndg_old = 1								  INTEGER            ::     P_u_ndg_old = 1
  LOGICAL            ::     F_u_ndg_old = .FALSE.							  LOGICAL            ::     F_u_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_v_ndg_old = 7								  INTEGER, PARAMETER :: PARAM_v_ndg_old = 7
  INTEGER            ::     P_v_ndg_old = 1								  INTEGER            ::     P_v_ndg_old = 1
  LOGICAL            ::     F_v_ndg_old = .FALSE.							  LOGICAL            ::     F_v_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_t_ndg_old = 8								  INTEGER, PARAMETER :: PARAM_t_ndg_old = 8
  INTEGER            ::     P_t_ndg_old = 1								  INTEGER            ::     P_t_ndg_old = 1
  LOGICAL            ::     F_t_ndg_old = .FALSE.							  LOGICAL            ::     F_t_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_q_ndg_old = 9								  INTEGER, PARAMETER :: PARAM_q_ndg_old = 9
  INTEGER            ::     P_q_ndg_old = 1								  INTEGER            ::     P_q_ndg_old = 1
  LOGICAL            ::     F_q_ndg_old = .FALSE.							  LOGICAL            ::     F_q_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_ph_ndg_old = 10								  INTEGER, PARAMETER :: PARAM_ph_ndg_old = 10
  INTEGER            ::     P_ph_ndg_old = 1								  INTEGER            ::     P_ph_ndg_old = 1
  LOGICAL            ::     F_ph_ndg_old = .FALSE.							  LOGICAL            ::     F_ph_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_fdda3d = 11								  INTEGER, PARAMETER :: PARAM_NUM_fdda3d = 11
  INTEGER            ::       NUM_fdda3d = 1								  INTEGER            ::       NUM_fdda3d = 1
  INTEGER, PARAMETER :: PARAM_mu_ndg_new = 1								  INTEGER, PARAMETER :: PARAM_mu_ndg_new = 1
  INTEGER            ::     P_mu_ndg_new = 1								  INTEGER            ::     P_mu_ndg_new = 1
  LOGICAL            ::     F_mu_ndg_new = .FALSE.							  LOGICAL            ::     F_mu_ndg_new = .FALSE.
  INTEGER, PARAMETER :: PARAM_mu_ndg_old = 2								  INTEGER, PARAMETER :: PARAM_mu_ndg_old = 2
  INTEGER            ::     P_mu_ndg_old = 1								  INTEGER            ::     P_mu_ndg_old = 1
  LOGICAL            ::     F_mu_ndg_old = .FALSE.							  LOGICAL            ::     F_mu_ndg_old = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_fdda2d = 3								  INTEGER, PARAMETER :: PARAM_NUM_fdda2d = 3
  INTEGER            ::       NUM_fdda2d = 1								  INTEGER            ::       NUM_fdda2d = 1
  INTEGER, PARAMETER :: PARAM_advh_qv = 1								  INTEGER, PARAMETER :: PARAM_advh_qv = 1
  INTEGER            ::     P_advh_qv = 1								  INTEGER            ::     P_advh_qv = 1
  LOGICAL            ::     F_advh_qv = .FALSE.								  LOGICAL            ::     F_advh_qv = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_advh_t = 2								  INTEGER, PARAMETER :: PARAM_NUM_advh_t = 2
  INTEGER            ::       NUM_advh_t = 1								  INTEGER            ::       NUM_advh_t = 1
  INTEGER, PARAMETER :: PARAM_advz_qv = 1								  INTEGER, PARAMETER :: PARAM_advz_qv = 1
  INTEGER            ::     P_advz_qv = 1								  INTEGER            ::     P_advz_qv = 1
  LOGICAL            ::     F_advz_qv = .FALSE.								  LOGICAL            ::     F_advz_qv = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_advz_t = 2								  INTEGER, PARAMETER :: PARAM_NUM_advz_t = 2
  INTEGER            ::       NUM_advz_t = 1								  INTEGER            ::       NUM_advz_t = 1
  INTEGER, PARAMETER :: PARAM_m11 = 1									  INTEGER, PARAMETER :: PARAM_m11 = 1
  INTEGER            ::     P_m11 = 1									  INTEGER            ::     P_m11 = 1
  LOGICAL            ::     F_m11 = .FALSE.								  LOGICAL            ::     F_m11 = .FALSE.
  INTEGER, PARAMETER :: PARAM_m22 = 2									  INTEGER, PARAMETER :: PARAM_m22 = 2
  INTEGER            ::     P_m22 = 1									  INTEGER            ::     P_m22 = 1
  LOGICAL            ::     F_m22 = .FALSE.								  LOGICAL            ::     F_m22 = .FALSE.
  INTEGER, PARAMETER :: PARAM_m33 = 3									  INTEGER, PARAMETER :: PARAM_m33 = 3
  INTEGER            ::     P_m33 = 1									  INTEGER            ::     P_m33 = 1
  LOGICAL            ::     F_m33 = .FALSE.								  LOGICAL            ::     F_m33 = .FALSE.
  INTEGER, PARAMETER :: PARAM_m12 = 4									  INTEGER, PARAMETER :: PARAM_m12 = 4
  INTEGER            ::     P_m12 = 1									  INTEGER            ::     P_m12 = 1
  LOGICAL            ::     F_m12 = .FALSE.								  LOGICAL            ::     F_m12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_m13 = 5									  INTEGER, PARAMETER :: PARAM_m13 = 5
  INTEGER            ::     P_m13 = 1									  INTEGER            ::     P_m13 = 1
  LOGICAL            ::     F_m13 = .FALSE.								  LOGICAL            ::     F_m13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_m23 = 6									  INTEGER, PARAMETER :: PARAM_m23 = 6
  INTEGER            ::     P_m23 = 1									  INTEGER            ::     P_m23 = 1
  LOGICAL            ::     F_m23 = .FALSE.								  LOGICAL            ::     F_m23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_nba_mij = 7								  INTEGER, PARAMETER :: PARAM_NUM_nba_mij = 7
  INTEGER            ::       NUM_nba_mij = 1								  INTEGER            ::       NUM_nba_mij = 1
  INTEGER, PARAMETER :: PARAM_r12 = 1									  INTEGER, PARAMETER :: PARAM_r12 = 1
  INTEGER            ::     P_r12 = 1									  INTEGER            ::     P_r12 = 1
  LOGICAL            ::     F_r12 = .FALSE.								  LOGICAL            ::     F_r12 = .FALSE.
  INTEGER, PARAMETER :: PARAM_r13 = 2									  INTEGER, PARAMETER :: PARAM_r13 = 2
  INTEGER            ::     P_r13 = 1									  INTEGER            ::     P_r13 = 1
  LOGICAL            ::     F_r13 = .FALSE.								  LOGICAL            ::     F_r13 = .FALSE.
  INTEGER, PARAMETER :: PARAM_r23 = 3									  INTEGER, PARAMETER :: PARAM_r23 = 3
  INTEGER            ::     P_r23 = 1									  INTEGER            ::     P_r23 = 1
  LOGICAL            ::     F_r23 = .FALSE.								  LOGICAL            ::     F_r23 = .FALSE.
  INTEGER, PARAMETER :: PARAM_smnsmn = 4								  INTEGER, PARAMETER :: PARAM_smnsmn = 4
  INTEGER            ::     P_smnsmn = 1								  INTEGER            ::     P_smnsmn = 1
  LOGICAL            ::     F_smnsmn = .FALSE.								  LOGICAL            ::     F_smnsmn = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_nba_rij = 5								  INTEGER, PARAMETER :: PARAM_NUM_nba_rij = 5
  INTEGER            ::       NUM_nba_rij = 1								  INTEGER            ::       NUM_nba_rij = 1
  INTEGER, PARAMETER :: PARAM_NUM_chem = 1								  INTEGER, PARAMETER :: PARAM_NUM_chem = 1
  INTEGER            ::       NUM_chem = 1								  INTEGER            ::       NUM_chem = 1
  INTEGER, PARAMETER :: PARAM_tr17_1 = 1								  INTEGER, PARAMETER :: PARAM_tr17_1 = 1
  INTEGER            ::     P_tr17_1 = 1								  INTEGER            ::     P_tr17_1 = 1
  LOGICAL            ::     F_tr17_1 = .FALSE.								  LOGICAL            ::     F_tr17_1 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_2 = 2								  INTEGER, PARAMETER :: PARAM_tr17_2 = 2
  INTEGER            ::     P_tr17_2 = 1								  INTEGER            ::     P_tr17_2 = 1
  LOGICAL            ::     F_tr17_2 = .FALSE.								  LOGICAL            ::     F_tr17_2 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_3 = 3								  INTEGER, PARAMETER :: PARAM_tr17_3 = 3
  INTEGER            ::     P_tr17_3 = 1								  INTEGER            ::     P_tr17_3 = 1
  LOGICAL            ::     F_tr17_3 = .FALSE.								  LOGICAL            ::     F_tr17_3 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_4 = 4								  INTEGER, PARAMETER :: PARAM_tr17_4 = 4
  INTEGER            ::     P_tr17_4 = 1								  INTEGER            ::     P_tr17_4 = 1
  LOGICAL            ::     F_tr17_4 = .FALSE.								  LOGICAL            ::     F_tr17_4 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_5 = 5								  INTEGER, PARAMETER :: PARAM_tr17_5 = 5
  INTEGER            ::     P_tr17_5 = 1								  INTEGER            ::     P_tr17_5 = 1
  LOGICAL            ::     F_tr17_5 = .FALSE.								  LOGICAL            ::     F_tr17_5 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_6 = 6								  INTEGER, PARAMETER :: PARAM_tr17_6 = 6
  INTEGER            ::     P_tr17_6 = 1								  INTEGER            ::     P_tr17_6 = 1
  LOGICAL            ::     F_tr17_6 = .FALSE.								  LOGICAL            ::     F_tr17_6 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_7 = 7								  INTEGER, PARAMETER :: PARAM_tr17_7 = 7
  INTEGER            ::     P_tr17_7 = 1								  INTEGER            ::     P_tr17_7 = 1
  LOGICAL            ::     F_tr17_7 = .FALSE.								  LOGICAL            ::     F_tr17_7 = .FALSE.
  INTEGER, PARAMETER :: PARAM_tr17_8 = 8								  INTEGER, PARAMETER :: PARAM_tr17_8 = 8
  INTEGER            ::     P_tr17_8 = 1								  INTEGER            ::     P_tr17_8 = 1
  LOGICAL            ::     F_tr17_8 = .FALSE.								  LOGICAL            ::     F_tr17_8 = .FALSE.
  INTEGER, PARAMETER :: PARAM_NUM_tracer = 9								  INTEGER, PARAMETER :: PARAM_NUM_tracer = 9
  INTEGER            ::       NUM_tracer = 1								  INTEGER            ::       NUM_tracer = 1
  INTEGER, PARAMETER :: P_XSB                          = 1						  INTEGER, PARAMETER :: P_XSB                          = 1
  INTEGER, PARAMETER :: P_XEB                          = 2						  INTEGER, PARAMETER :: P_XEB                          = 2
  INTEGER, PARAMETER :: P_YSB                          = 3						  INTEGER, PARAMETER :: P_YSB                          = 3
  INTEGER, PARAMETER :: P_YEB                          = 4						  INTEGER, PARAMETER :: P_YEB                          = 4
  INTEGER, PARAMETER :: NUM_TIME_LEVELS = 2								  INTEGER, PARAMETER :: NUM_TIME_LEVELS = 2
  INTEGER , PARAMETER :: PARAM_FIRST_SCALAR = 2								  INTEGER , PARAMETER :: PARAM_FIRST_SCALAR = 2
CONTAINS												CONTAINS
SUBROUTINE init_module_state_description								SUBROUTINE init_module_state_description
END SUBROUTINE init_module_state_description								END SUBROUTINE init_module_state_description
END MODULE module_state_description									END MODULE module_state_description
!ENDOFREGISTRYGENERATEDINCLUDE										!ENDOFREGISTRYGENERATEDINCLUDE
>                                                 
>=================================================================================
>  inc/namelist_defaults.inc
>=================================================================================
!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defaults.inc'						!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defaults.inc'
!													!
! WARNING This file is generated automatically by use_registry						! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.							! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.							! Do not edit.  Your changes to this file will be lost.
!													!
run_days = 0												run_days = 0
run_hours = 0												run_hours = 0
run_minutes = 0												run_minutes = 0
run_seconds = 0												run_seconds = 0
start_year = 1993											start_year = 1993
start_month = 03											start_month = 03
start_day = 13												start_day = 13
start_hour = 12												start_hour = 12
start_minute = 00											start_minute = 00
start_second = 00											start_second = 00
end_year = 1993												end_year = 1993
end_month = 03												end_month = 03
end_day = 14												end_day = 14
end_hour = 12												end_hour = 12
end_minute = 00												end_minute = 00
end_second = 00												end_second = 00
interval_seconds = 10800									   |	interval_seconds = 43200
input_from_file = .false.										input_from_file = .false.
fine_input_stream = 0											fine_input_stream = 0
input_from_hires = .false.										input_from_hires = .false.
rsmas_data_path = "."											rsmas_data_path = "."
all_ic_times = .false.											all_ic_times = .false.
julyr = 0												julyr = 0
julday = 1												julday = 1
gmt = 0.												gmt = 0.
input_inname = "wrfinput_d<domain>"									input_inname = "wrfinput_d<domain>"
input_outname = "wrfinput_d<domain>"									input_outname = "wrfinput_d<domain>"
bdy_inname = "wrfbdy_d<domain>"										bdy_inname = "wrfbdy_d<domain>"
bdy_outname = "wrfbdy_d<domain>"									bdy_outname = "wrfbdy_d<domain>"
rst_inname = "wrfrst_d<domain>_<date>"									rst_inname = "wrfrst_d<domain>_<date>"
rst_outname = "wrfrst_d<domain>_<date>"									rst_outname = "wrfrst_d<domain>_<date>"
write_input = .false.											write_input = .false.
write_restart_at_0h = .false.										write_restart_at_0h = .false.
write_hist_at_0h_rst = .false.										write_hist_at_0h_rst = .false.
adjust_output_times = .false.										adjust_output_times = .false.
adjust_input_times = .false.										adjust_input_times = .false.
diag_print = 0												diag_print = 0
nocolons = .false.											nocolons = .false.
cycling = .false.											cycling = .false.
output_diagnostics = 0											output_diagnostics = 0
nwp_diagnostics = 0											nwp_diagnostics = 0
output_ready_flag = .false.										output_ready_flag = .false.
usepio = .false.											usepio = .false.
pioprocs = 0												pioprocs = 0
piostart = 1												piostart = 1
piostride = 1												piostride = 1
pioshift = 1												pioshift = 1
dfi_opt = 0												dfi_opt = 0
dfi_savehydmeteors = 0											dfi_savehydmeteors = 0
dfi_nfilter = 7												dfi_nfilter = 7
dfi_write_filtered_input = .true.									dfi_write_filtered_input = .true.
dfi_write_dfi_history = .false.										dfi_write_dfi_history = .false.
dfi_cutoff_seconds = 3600										dfi_cutoff_seconds = 3600
dfi_time_dim = 1000											dfi_time_dim = 1000
dfi_fwdstop_year = 2004											dfi_fwdstop_year = 2004
dfi_fwdstop_month = 03											dfi_fwdstop_month = 03
dfi_fwdstop_day = 13											dfi_fwdstop_day = 13
dfi_fwdstop_hour = 12											dfi_fwdstop_hour = 12
dfi_fwdstop_minute = 00											dfi_fwdstop_minute = 00
dfi_fwdstop_second = 00											dfi_fwdstop_second = 00
dfi_bckstop_year = 2004											dfi_bckstop_year = 2004
dfi_bckstop_month = 03											dfi_bckstop_month = 03
dfi_bckstop_day = 14											dfi_bckstop_day = 14
dfi_bckstop_hour = 12											dfi_bckstop_hour = 12
dfi_bckstop_minute = 00											dfi_bckstop_minute = 00
dfi_bckstop_second = 00											dfi_bckstop_second = 00
time_step = -1											   <
time_step_fract_num = 0											time_step_fract_num = 0
time_step_fract_den = 1											time_step_fract_den = 1
time_step_dfi = -1										   <
min_time_step = -1											min_time_step = -1
min_time_step_den = 0											min_time_step_den = 0
max_time_step = -1											max_time_step = -1
max_time_step_den = 0											max_time_step_den = 0
target_cfl = 1.2											target_cfl = 1.2
target_hcfl = 0.84											target_hcfl = 0.84
max_step_increase_pct = 5										max_step_increase_pct = 5
starting_time_step = -1											starting_time_step = -1
starting_time_step_den = 0										starting_time_step_den = 0
step_to_output_time = .true.										step_to_output_time = .true.
adaptation_domain = 1											adaptation_domain = 1
use_adaptive_time_step = .false.									use_adaptive_time_step = .false.
use_adaptive_time_step_dfi = .false.									use_adaptive_time_step_dfi = .false.
max_dom = 1												max_dom = 1
lats_to_mic = 0												lats_to_mic = 0
s_we = 1												s_we = 1
e_we = 32												e_we = 32
s_sn = 1												s_sn = 1
e_sn = 32												e_sn = 32
s_vert = 1												s_vert = 1
e_vert = 31												e_vert = 31
num_metgrid_levels = 27											num_metgrid_levels = 27
num_metgrid_soil_levels = 4										num_metgrid_soil_levels = 4
p_top_requested = 5000											p_top_requested = 5000
interp_theta = .false.											interp_theta = .false.
interp_type = 2												interp_type = 2
rebalance = 0											   <
vert_refine_method = 0											vert_refine_method = 0
vert_refine_fact = 1											vert_refine_fact = 1
extrap_type = 2												extrap_type = 2
t_extrap_type = 2											t_extrap_type = 2
hypsometric_opt = 2											hypsometric_opt = 2
lowest_lev_from_sfc = .false.										lowest_lev_from_sfc = .false.
use_levels_below_ground = .true.									use_levels_below_ground = .true.
use_tavg_for_tsk = .false.										use_tavg_for_tsk = .false.
use_surface = .true.											use_surface = .true.
lagrange_order = 2											lagrange_order = 2
force_sfc_in_vinterp = 1										force_sfc_in_vinterp = 1
zap_close_levels = 500											zap_close_levels = 500
maxw_horiz_pres_diff = 5000										maxw_horiz_pres_diff = 5000
trop_horiz_pres_diff = 5000										trop_horiz_pres_diff = 5000
maxw_above_this_level = 30000										maxw_above_this_level = 30000
use_maxw_level = 0											use_maxw_level = 0
use_trop_level = 0											use_trop_level = 0
sfcp_to_sfcp = .false.											sfcp_to_sfcp = .false.
adjust_heights = .false.										adjust_heights = .false.
smooth_cg_topo = .false.										smooth_cg_topo = .false.
nest_interp_coord = 0											nest_interp_coord = 0
interp_method_type = 2											interp_method_type = 2
aggregate_lu = .false.											aggregate_lu = .false.
rh2qv_wrt_liquid = .true.										rh2qv_wrt_liquid = .true.
rh2qv_method = 1											rh2qv_method = 1
qv_max_p_safe = 10000											qv_max_p_safe = 10000
qv_max_flag = 1.e-5											qv_max_flag = 1.e-5
qv_max_value = 3.e-6											qv_max_value = 3.e-6
qv_min_p_safe = 110000											qv_min_p_safe = 110000
qv_min_flag = 1.e-6											qv_min_flag = 1.e-6
qv_min_value = 1.e-6											qv_min_value = 1.e-6
ideal_init_method = 1										   <
dx = 200												dx = 200
dy = 200												dy = 200
grid_id = 1												grid_id = 1
grid_allowed = .true.											grid_allowed = .true.
parent_id = 0												parent_id = 0
i_parent_start = 1											i_parent_start = 1
j_parent_start = 1											j_parent_start = 1
parent_grid_ratio = 1											parent_grid_ratio = 1
parent_time_step_ratio = 1										parent_time_step_ratio = 1
feedback = 1												feedback = 1
smooth_option = 2											smooth_option = 2
blend_width = 5												blend_width = 5
ztop = 15000.												ztop = 15000.
moad_grid_ratio = 1											moad_grid_ratio = 1
moad_time_step_ratio = 1										moad_time_step_ratio = 1
shw = 2													shw = 2
tile_sz_x = 0												tile_sz_x = 0
tile_sz_y = 0												tile_sz_y = 0
numtiles = 1												numtiles = 1
numtiles_inc = 0											numtiles_inc = 0
numtiles_x = 0												numtiles_x = 0
numtiles_y = 0												numtiles_y = 0
tile_strategy = 0											tile_strategy = 0
nproc_x = -1												nproc_x = -1
nproc_y = -1												nproc_y = -1
irand = 0												irand = 0
dt = 2.													dt = 2.
fft_used = 0												fft_used = 0
cu_used = 0												cu_used = 0
shcu_used = 0												shcu_used = 0
cam_used = 0												cam_used = 0
alloc_qndropsource = 0											alloc_qndropsource = 0
num_moves = 0												num_moves = 0
ts_buf_size = 200											ts_buf_size = 200
max_ts_locs = 5												max_ts_locs = 5
vortex_interval = 15											vortex_interval = 15
max_vortex_speed = 40											max_vortex_speed = 40
corral_dist = 8												corral_dist = 8
track_level = 50000											track_level = 50000
time_to_move = 0.											time_to_move = 0.
move_id = 0												move_id = 0
move_interval = 999999999										move_interval = 999999999
move_cd_x = 0												move_cd_x = 0
move_cd_y = 0												move_cd_y = 0
swap_x = .false.											swap_x = .false.
swap_y = .false.											swap_y = .false.
cycle_x = .false.											cycle_x = .false.
cycle_y = .false.											cycle_y = .false.
reorder_mesh = .false.											reorder_mesh = .false.
perturb_input = .false.											perturb_input = .false.
eta_levels = -1.											eta_levels = -1.
max_dz = 1000.												max_dz = 1000.
ocean_levels = 30											ocean_levels = 30
ocean_z = -1												ocean_z = -1
ocean_t = -1												ocean_t = -1
ocean_s = -1												ocean_s = -1
num_traj = 1000											   |	num_traj = 25
chm_sections = -1.											chm_sections = -1.
max_ts_level = 15											max_ts_level = 15
track_loc_in = 0											track_loc_in = 0
num_ext_model_couple_dom = 1										num_ext_model_couple_dom = 1
insert_bogus_storm = .false.										insert_bogus_storm = .false.
remove_storm = .false.											remove_storm = .false.
num_storm = 1												num_storm = 1
latc_loc = -999.											latc_loc = -999.
lonc_loc = -999.											lonc_loc = -999.
vmax_meters_per_second = -999.										vmax_meters_per_second = -999.
rmax = -999.												rmax = -999.
vmax_ratio = -999.											vmax_ratio = -999.
rankine_lid = -999.											rankine_lid = -999.
physics_suite = "none"										   <
force_read_thompson = .false.										force_read_thompson = .false.
write_thompson_tables = .true.										write_thompson_tables = .true.
mp_physics = -1											   |	mp_physics = 0
nssl_cccn = 0.5e9											nssl_cccn = 0.5e9
nssl_alphah = 0												nssl_alphah = 0
nssl_alphahl = 1											nssl_alphahl = 1
nssl_cnoh = 4.e5											nssl_cnoh = 4.e5
nssl_cnohl = 4.e4											nssl_cnohl = 4.e4
nssl_cnor = 8.e5											nssl_cnor = 8.e5
nssl_cnos = 3.e6											nssl_cnos = 3.e6
nssl_rho_qh = 500.											nssl_rho_qh = 500.
nssl_rho_qhl = 900.											nssl_rho_qhl = 900.
nssl_rho_qs = 100.											nssl_rho_qs = 100.
nudge_lightning = 0										   <
nudge_light_times = 0										   <
nudge_light_timee = 7200									   <
nudge_light_int = 600										   <
path_to_files = "~/WRFV3/"									   <
gsfcgce_hail = 0											gsfcgce_hail = 0
gsfcgce_2ice = 0											gsfcgce_2ice = 0
progn = 0												progn = 0
accum_mode = 1000.0e6											accum_mode = 1000.0e6
aitken_mode = 300.0e6											aitken_mode = 300.0e6
coarse_mode = 0.2e6											coarse_mode = 0.2e6
do_radar_ref = 0											do_radar_ref = 0
compute_radar_ref = 0											compute_radar_ref = 0
ra_lw_physics = -1										   |	ra_lw_physics = 0
ra_sw_physics = -1										   |	ra_sw_physics = 0
radt = 0												radt = 0
naer = 1e9												naer = 1e9
sf_sfclay_physics = -1										   |	sf_sfclay_physics = 0
sf_surface_physics = -1										   |	sf_surface_physics = 0
bl_pbl_physics = -1										   |	bl_pbl_physics = 0
bl_mynn_tkebudget = 0											bl_mynn_tkebudget = 0
ysu_topdown_pblmix = 0											ysu_topdown_pblmix = 0
shinhong_tke_diag = 0											shinhong_tke_diag = 0
bl_mynn_tkeadvect = .false.										bl_mynn_tkeadvect = .false.
bl_mynn_cloudpdf = 2										   |	bl_mynn_cloudpdf = 0
bl_mynn_mixlength = 1										   <
bl_mynn_edmf = 0										   <
bl_mynn_edmf_mom = 1										   <
bl_mynn_edmf_tke = 0										   <
bl_mynn_edmf_part = 0										   <
bl_mynn_cloudmix = 1										   <
bl_mynn_mixqt = 0										   <
icloud_bl = 1											   <
mfshconv = 1												mfshconv = 1
sf_urban_physics = 0											sf_urban_physics = 0
bldt = 0												bldt = 0
cu_physics = -1											   |	cu_physics = 0
shcu_physics = 0											shcu_physics = 0
cu_diag = 0												cu_diag = 0
kf_edrates = 0											   <
kfeta_trigger = 1											kfeta_trigger = 1
nsas_dx_factor = 0											nsas_dx_factor = 0
cudt = 0												cudt = 0
gsmdt = 0												gsmdt = 0
isfflx = 1												isfflx = 1
ifsnow = 1												ifsnow = 1
icloud = 1												icloud = 1
ideal_xland = 1												ideal_xland = 1
swrad_scat = 1												swrad_scat = 1
surface_input_source = 3									   |	surface_input_source = 1
num_soil_layers = 5											num_soil_layers = 5
maxpatch = 10												maxpatch = 10
num_snow_layers = 3											num_snow_layers = 3
num_snso_layers = 7											num_snso_layers = 7
num_urban_layers = 400											num_urban_layers = 400
num_urban_hi = 15											num_urban_hi = 15
num_months = 12												num_months = 12
sf_surface_mosaic = 0											sf_surface_mosaic = 0
mosaic_cat = 3												mosaic_cat = 3
mosaic_cat_soil = 12											mosaic_cat_soil = 12
mosaic_lu = 0												mosaic_lu = 0
mosaic_soil = 0												mosaic_soil = 0
maxiens = 1												maxiens = 1
maxens = 3												maxens = 3
maxens2 = 3												maxens2 = 3
maxens3 = 16												maxens3 = 16
ensdim = 144												ensdim = 144
cugd_avedx = 1												cugd_avedx = 1
clos_choice = 0												clos_choice = 0
imomentum = 0												imomentum = 0
ishallow = 0												ishallow = 0
convtrans_avglen_m = 30											convtrans_avglen_m = 30
num_land_cat = 21										   |	num_land_cat = 24
num_soil_cat = 16											num_soil_cat = 16
mp_zero_out = 0												mp_zero_out = 0
mp_zero_out_thresh = 1.e-8										mp_zero_out_thresh = 1.e-8
seaice_threshold = 100											seaice_threshold = 100
sst_update = 0												sst_update = 0
sst_skin = 0												sst_skin = 0
tmn_update = 0												tmn_update = 0
usemonalb = .false.											usemonalb = .false.
rdmaxalb = .true.											rdmaxalb = .true.
rdlai2d = .false.											rdlai2d = .false.
ua_phys = .false.											ua_phys = .false.
opt_thcnd = 1											   <
co2tf = 1												co2tf = 1
ra_call_offset = 0											ra_call_offset = 0
cam_abs_freq_s = 21600.											cam_abs_freq_s = 21600.
levsiz = 1												levsiz = 1
paerlev = 1												paerlev = 1
cam_abs_dim1 = 1											cam_abs_dim1 = 1
cam_abs_dim2 = 1											cam_abs_dim2 = 1
lagday = 150											   |	lagday = 1
no_src_types = 1											no_src_types = 1
alevsiz = 1												alevsiz = 1
o3input = 2												o3input = 2
aer_opt = 0												aer_opt = 0
swint_opt = 0												swint_opt = 0
aer_type = 1												aer_type = 1
aer_aod550_opt = 1											aer_aod550_opt = 1
aer_angexp_opt = 1											aer_angexp_opt = 1
aer_ssa_opt = 1												aer_ssa_opt = 1
aer_asy_opt = 1												aer_asy_opt = 1
aer_aod550_val = 0.12											aer_aod550_val = 0.12
aer_angexp_val = 1.3											aer_angexp_val = 1.3
aer_ssa_val = 0.85											aer_ssa_val = 0.85
aer_asy_val = 0.90											aer_asy_val = 0.90
cu_rad_feedback = .false.										cu_rad_feedback = .false.
shallowcu_forced_ra = .false.									   |	shallowcu_forced_ra = .true.
numbins = 1												numbins = 1
thbinsize = 1												thbinsize = 1
rbinsize = 1												rbinsize = 1
mindeepfreq = 1												mindeepfreq = 1
minshallowfreq = 1											minshallowfreq = 1
shcu_aerosols_opt = 0											shcu_aerosols_opt = 0
icloud_cu = 0												icloud_cu = 0
pxlsm_smois_init = 1											pxlsm_smois_init = 1
omlcall = 0												omlcall = 0
sf_ocean_physics = 0											sf_ocean_physics = 0
traj_opt = 0												traj_opt = 0
dm_has_traj = .false.										   <
tracercall = 0												tracercall = 0
omdt = 1												omdt = 1
oml_hml0 = 50												oml_hml0 = 50
oml_gamma = 0.14											oml_gamma = 0.14
oml_relaxation_time = 0.									   <
isftcflx = 0												isftcflx = 0
iz0tlnd = 0												iz0tlnd = 0
shadlen = 25000.											shadlen = 25000.
slope_rad = 0												slope_rad = 0
topo_shading = 0											topo_shading = 0
topo_wind = 0												topo_wind = 0
no_mp_heating = 0											no_mp_heating = 0
fractional_seaice = 0											fractional_seaice = 0
seaice_snowdepth_opt = 0										seaice_snowdepth_opt = 0
seaice_snowdepth_max = 1.e10										seaice_snowdepth_max = 1.e10
seaice_snowdepth_min = 0.001										seaice_snowdepth_min = 0.001
seaice_albedo_opt = 0											seaice_albedo_opt = 0
seaice_albedo_default = 0.65										seaice_albedo_default = 0.65
seaice_thickness_opt = 0										seaice_thickness_opt = 0
seaice_thickness_default = 3.0										seaice_thickness_default = 3.0
tice2tsk_if2cold = .false.										tice2tsk_if2cold = .false.
bucket_mm = -1.												bucket_mm = -1.
bucket_j = -1.												bucket_j = -1.
mp_tend_lim = 10.											mp_tend_lim = 10.
prec_acc_dt = 0.											prec_acc_dt = 0.
prec_acc_opt = 0											prec_acc_opt = 0
bucketr_opt = 0												bucketr_opt = 0
bucketf_opt = 0											   <
process_time_series = 0											process_time_series = 0
grav_settling = 0											grav_settling = 0
sas_pgcon = 0.55											sas_pgcon = 0.55
scalar_pblmix = 0											scalar_pblmix = 0
tracer_pblmix = 1											tracer_pblmix = 1
use_aero_icbc = .false.											use_aero_icbc = .false.
use_rap_aero_icbc = .false.										use_rap_aero_icbc = .false.
use_mp_re = 1											   <
direct_feed_chimere = 0											direct_feed_chimere = 0
indirect_feed_chimere = 0										indirect_feed_chimere = 0
n_bin = 0												n_bin = 0
ccn_conc = 1.0e8											ccn_conc = 1.0e8
hail_opt = 0												hail_opt = 0
dveg = 4												dveg = 4
opt_crs = 1												opt_crs = 1
opt_btr = 1												opt_btr = 1
opt_run = 3											   |	opt_run = 1
opt_sfc = 1												opt_sfc = 1
opt_frz = 1												opt_frz = 1
opt_inf = 1												opt_inf = 1
opt_rad = 3												opt_rad = 3
opt_alb = 2												opt_alb = 2
opt_snf = 1												opt_snf = 1
opt_tbot = 2												opt_tbot = 2
opt_stc = 1												opt_stc = 1
opt_gla = 1											   <
opt_rsf = 1											   <
wtddt = 30.												wtddt = 30.
wrf_hydro = 0												wrf_hydro = 0
fgdt = 0												fgdt = 0
fgdtzero = 0												fgdtzero = 0
grid_fdda = 0												grid_fdda = 0
grid_sfdda = 0												grid_sfdda = 0
if_no_pbl_nudging_uv = 0										if_no_pbl_nudging_uv = 0
if_no_pbl_nudging_t = 0											if_no_pbl_nudging_t = 0
if_no_pbl_nudging_ph = 0										if_no_pbl_nudging_ph = 0
if_no_pbl_nudging_q = 0											if_no_pbl_nudging_q = 0
if_zfac_uv = 0												if_zfac_uv = 0
k_zfac_uv = 0												k_zfac_uv = 0
if_zfac_t = 0												if_zfac_t = 0
k_zfac_t = 0												k_zfac_t = 0
if_zfac_ph = 0												if_zfac_ph = 0
k_zfac_ph = 0												k_zfac_ph = 0
if_zfac_q = 0												if_zfac_q = 0
k_zfac_q = 0												k_zfac_q = 0
dk_zfac_uv = 1												dk_zfac_uv = 1
dk_zfac_t = 1												dk_zfac_t = 1
dk_zfac_ph = 1												dk_zfac_ph = 1
guv = 0													guv = 0
guv_sfc = 0												guv_sfc = 0
gt = 0													gt = 0
gt_sfc = 0												gt_sfc = 0
gq = 0													gq = 0
gq_sfc = 0												gq_sfc = 0
gph = 0													gph = 0
dtramp_min = 0												dtramp_min = 0
if_ramping = 0												if_ramping = 0
rinblw = 0												rinblw = 0
xwavenum = 0												xwavenum = 0
ywavenum = 0												ywavenum = 0
pxlsm_soil_nudge = 0											pxlsm_soil_nudge = 0
fasdas = 0											   <
obs_nudge_opt = 0											obs_nudge_opt = 0
max_obs = 0												max_obs = 0
fdda_start = 0												fdda_start = 0
fdda_end = 0												fdda_end = 0
obs_nudge_wind = 0											obs_nudge_wind = 0
obs_coef_wind = 0											obs_coef_wind = 0
obs_nudge_temp = 0											obs_nudge_temp = 0
obs_coef_temp = 0											obs_coef_temp = 0
obs_nudge_mois = 0											obs_nudge_mois = 0
obs_coef_mois = 0											obs_coef_mois = 0
obs_nudge_pstr = 0											obs_nudge_pstr = 0
obs_coef_pstr = 0											obs_coef_pstr = 0
obs_no_pbl_nudge_uv = 0											obs_no_pbl_nudge_uv = 0
obs_no_pbl_nudge_t = 0											obs_no_pbl_nudge_t = 0
obs_no_pbl_nudge_q = 0											obs_no_pbl_nudge_q = 0
obs_sfc_scheme_horiz = 0										obs_sfc_scheme_horiz = 0
obs_sfc_scheme_vert = 0											obs_sfc_scheme_vert = 0
obs_max_sndng_gap = 20											obs_max_sndng_gap = 20
obs_nudgezfullr1_uv = 50										obs_nudgezfullr1_uv = 50
obs_nudgezrampr1_uv = 50										obs_nudgezrampr1_uv = 50
obs_nudgezfullr2_uv = 50										obs_nudgezfullr2_uv = 50
obs_nudgezrampr2_uv = 50										obs_nudgezrampr2_uv = 50
obs_nudgezfullr4_uv = -5000										obs_nudgezfullr4_uv = -5000
obs_nudgezrampr4_uv = 50										obs_nudgezrampr4_uv = 50
obs_nudgezfullr1_t = 50											obs_nudgezfullr1_t = 50
obs_nudgezrampr1_t = 50											obs_nudgezrampr1_t = 50
obs_nudgezfullr2_t = 50											obs_nudgezfullr2_t = 50
obs_nudgezrampr2_t = 50											obs_nudgezrampr2_t = 50
obs_nudgezfullr4_t = -5000										obs_nudgezfullr4_t = -5000
obs_nudgezrampr4_t = 50											obs_nudgezrampr4_t = 50
obs_nudgezfullr1_q = 50											obs_nudgezfullr1_q = 50
obs_nudgezrampr1_q = 50											obs_nudgezrampr1_q = 50
obs_nudgezfullr2_q = 50											obs_nudgezfullr2_q = 50
obs_nudgezrampr2_q = 50											obs_nudgezrampr2_q = 50
obs_nudgezfullr4_q = -5000										obs_nudgezfullr4_q = -5000
obs_nudgezrampr4_q = 50											obs_nudgezrampr4_q = 50
obs_nudgezfullmin = 50											obs_nudgezfullmin = 50
obs_nudgezrampmin = 50											obs_nudgezrampmin = 50
obs_nudgezmax = 3000											obs_nudgezmax = 3000
obs_sfcfact = 1.0											obs_sfcfact = 1.0
obs_sfcfacr = 1.0											obs_sfcfacr = 1.0
obs_dpsmx = 7.5												obs_dpsmx = 7.5
obs_rinxy = 0												obs_rinxy = 0
obs_rinsig = 0												obs_rinsig = 0
obs_twindo = 0												obs_twindo = 0
obs_npfi = 0												obs_npfi = 0
obs_ionf = 1												obs_ionf = 1
obs_idynin = 0												obs_idynin = 0
obs_dtramp = 0												obs_dtramp = 0
obs_prt_max = 1000											obs_prt_max = 1000
obs_prt_freq = 1000											obs_prt_freq = 1000
obs_ipf_in4dob = .false.										obs_ipf_in4dob = .false.
obs_ipf_errob = .false.											obs_ipf_errob = .false.
obs_ipf_nudob = .false.											obs_ipf_nudob = .false.
obs_ipf_init = .true.											obs_ipf_init = .true.
obs_scl_neg_qv_innov = 0										obs_scl_neg_qv_innov = 0
scm_force = 0												scm_force = 0
scm_force_dx = 4000.											scm_force_dx = 4000.
num_force_layers = 8											num_force_layers = 8
scm_lu_index = 2											scm_lu_index = 2
scm_isltyp = 4												scm_isltyp = 4
scm_vegfra = 0.5											scm_vegfra = 0.5
scm_canwat = 0.0											scm_canwat = 0.0
scm_lat = 36.605											scm_lat = 36.605
scm_lon = -97.485											scm_lon = -97.485
scm_th_t_tend = .true.											scm_th_t_tend = .true.
scm_qv_t_tend = .true.											scm_qv_t_tend = .true.
scm_th_adv = .true.											scm_th_adv = .true.
scm_wind_adv = .true.											scm_wind_adv = .true.
scm_qv_adv = .true.											scm_qv_adv = .true.
scm_ql_adv = .false.											scm_ql_adv = .false.
scm_vert_adv = .true.											scm_vert_adv = .true.
num_force_soil_layers = 5										num_force_soil_layers = 5
scm_soilt_force = .false.										scm_soilt_force = .false.
scm_soilq_force = .false.										scm_soilq_force = .false.
scm_force_th_largescale = .false.									scm_force_th_largescale = .false.
scm_force_qv_largescale = .false.									scm_force_qv_largescale = .false.
scm_force_ql_largescale = .false.									scm_force_ql_largescale = .false.
scm_force_wind_largescale = .false.									scm_force_wind_largescale = .false.
scm_force_skintemp = 0											scm_force_skintemp = 0
scm_force_flux = 0											scm_force_flux = 0
dyn_opt = 2												dyn_opt = 2
rk_ord = 3												rk_ord = 3
w_damping = 0												w_damping = 0
diff_opt = -1												diff_opt = -1
diff_opt_dfi = 0											diff_opt_dfi = 0
km_opt = -1												km_opt = -1
km_opt_dfi = 1												km_opt_dfi = 1
damp_opt = 0												damp_opt = 0
rad_nudge = 0												rad_nudge = 0
gwd_opt = 0												gwd_opt = 0
max_rot_angle_gwd = 22.5									   <
zdamp = 5000.												zdamp = 5000.
dampcoef = 0.												dampcoef = 0.
khdif = 0												khdif = 0
kvdif = 0												kvdif = 0
diff_6th_factor = 0.12											diff_6th_factor = 0.12
diff_6th_opt = 0											diff_6th_opt = 0
use_theta_m = 0												use_theta_m = 0
use_q_diabatic = 0											use_q_diabatic = 0
c_s = 0.25												c_s = 0.25
c_k = 0.15												c_k = 0.15
smdiv = 0.1												smdiv = 0.1
emdiv = 0.01												emdiv = 0.01
epssm = .1												epssm = .1
non_hydrostatic = .true.										non_hydrostatic = .true.
use_input_w = .false.											use_input_w = .false.
time_step_sound = 0											time_step_sound = 0
h_mom_adv_order = 5											h_mom_adv_order = 5
v_mom_adv_order = 3											v_mom_adv_order = 3
h_sca_adv_order = 5											h_sca_adv_order = 5
v_sca_adv_order = 3											v_sca_adv_order = 3
momentum_adv_opt = 1											momentum_adv_opt = 1
moist_adv_opt = 1											moist_adv_opt = 1
moist_adv_dfi_opt = 0											moist_adv_dfi_opt = 0
chem_adv_opt = 1											chem_adv_opt = 1
tracer_adv_opt = 1											tracer_adv_opt = 1
scalar_adv_opt = 1											scalar_adv_opt = 1
tke_adv_opt = 1												tke_adv_opt = 1
top_radiation = .false.											top_radiation = .false.
mix_isotropic = 0											mix_isotropic = 0
mix_upper_bound = 0.1											mix_upper_bound = 0.1
top_lid = .false.											top_lid = .false.
tke_upper_bound = 1000.											tke_upper_bound = 1000.
tke_drag_coefficient = 0.										tke_drag_coefficient = 0.
tke_heat_flux = 0.											tke_heat_flux = 0.
pert_coriolis = .false.											pert_coriolis = .false.
coriolis2d = .false.											coriolis2d = .false.
mix_full_fields = .false.										mix_full_fields = .false.
base_pres = 100000.											base_pres = 100000.
base_temp = 290.											base_temp = 290.
base_lapse = 50.											base_lapse = 50.
iso_temp = 200.00											iso_temp = 200.00
base_pres_strat = 0.											base_pres_strat = 0.
base_lapse_strat = -11.											base_lapse_strat = -11.
use_baseparam_fr_nml = .false.										use_baseparam_fr_nml = .false.
fft_filter_lat = 91.											fft_filter_lat = 91.
coupled_filtering = .true.										coupled_filtering = .true.
pos_def = .false.											pos_def = .false.
swap_pole_with_next_j = .false.										swap_pole_with_next_j = .false.
actual_distance_average = .false.									actual_distance_average = .false.
rotated_pole = .false.											rotated_pole = .false.
do_coriolis = .true.											do_coriolis = .true.
do_curvature = .true.											do_curvature = .true.
do_gradp = .true.											do_gradp = .true.
tracer_opt = 0												tracer_opt = 0
tenddiag = 0												tenddiag = 0
spec_bdy_width = 5											spec_bdy_width = 5
spec_zone = 1												spec_zone = 1
relax_zone = 4												relax_zone = 4
specified = .false.											specified = .false.
constant_bc = .false.											constant_bc = .false.
periodic_x = .false.											periodic_x = .false.
symmetric_xs = .false.											symmetric_xs = .false.
symmetric_xe = .false.											symmetric_xe = .false.
open_xs = .false.											open_xs = .false.
open_xe = .false.											open_xe = .false.
periodic_y = .false.											periodic_y = .false.
symmetric_ys = .false.											symmetric_ys = .false.
symmetric_ye = .false.											symmetric_ye = .false.
open_ys = .false.											open_ys = .false.
open_ye = .false.											open_ye = .false.
polar = .false.												polar = .false.
nested = .false.											nested = .false.
spec_exp = 0.												spec_exp = 0.
spec_bdy_final_mu = 1										   |	spec_bdy_final_mu = 0
real_data_init_type = 1											real_data_init_type = 1
have_bcs_moist = .false.										have_bcs_moist = .false.
have_bcs_scalar = .false.										have_bcs_scalar = .false.
background_proc_id = 255										background_proc_id = 255
forecast_proc_id = 255											forecast_proc_id = 255
production_status = 255											production_status = 255
compression = 40											compression = 40
nobs_ndg_vars = 6											nobs_ndg_vars = 6
nobs_err_flds = 10											nobs_err_flds = 10
cen_lat = 0												cen_lat = 0
cen_lon = 0												cen_lon = 0
truelat1 = 0												truelat1 = 0
truelat2 = 0												truelat2 = 0
moad_cen_lat = 0											moad_cen_lat = 0
stand_lon = 0												stand_lon = 0
pole_lat = 0												pole_lat = 0
pole_lon = 0												pole_lon = 0
flag_metgrid = 0											flag_metgrid = 0
flag_snow = 0												flag_snow = 0
flag_psfc = 0												flag_psfc = 0
flag_sm000010 = 0											flag_sm000010 = 0
flag_sm010040 = 0											flag_sm010040 = 0
flag_sm040100 = 0											flag_sm040100 = 0
flag_sm100200 = 0											flag_sm100200 = 0
flag_st000010 = 0											flag_st000010 = 0
flag_st010040 = 0											flag_st010040 = 0
flag_st040100 = 0											flag_st040100 = 0
flag_st100200 = 0											flag_st100200 = 0
flag_soil_layers = 0											flag_soil_layers = 0
flag_slp = 0												flag_slp = 0
flag_soilhgt = 0											flag_soilhgt = 0
flag_mf_xy = 0												flag_mf_xy = 0
flag_um_soil = 0											flag_um_soil = 0
bdyfrq = 0												bdyfrq = 0
mminlu = " "												mminlu = " "
iswater = 0												iswater = 0
islake = 0												islake = 0
isice = 0												isice = 0
isurban = 0												isurban = 0
isoilwater = 0												isoilwater = 0
map_proj = 0												map_proj = 0
use_wps_input = 0											use_wps_input = 0
dfi_stage = 3												dfi_stage = 3
mp_physics_dfi = -1											mp_physics_dfi = -1
bl_pbl_physics_dfi = -1										   <
windfarm_opt = 0											windfarm_opt = 0
windfarm_ij = 0												windfarm_ij = 0
hailcast_opt = 0										   <
lightning_option = 0											lightning_option = 0
lightning_dt = 0.											lightning_dt = 0.
lightning_start_seconds = 0.										lightning_start_seconds = 0.
flashrate_factor = 1.0											flashrate_factor = 1.0
iccg_method = 0												iccg_method = 0
iccg_prescribed_num = 0.0										iccg_prescribed_num = 0.0
iccg_prescribed_den = 1.0										iccg_prescribed_den = 1.0
cellcount_method = 0											cellcount_method = 0
cldtop_adjustment = 0.											cldtop_adjustment = 0.
sf_lake_physics = 0											sf_lake_physics = 0
auxinput1_inname = "met_em.d<domain>.<date>"								auxinput1_inname = "met_em.d<domain>.<date>"
io_form_auxinput1 = 2											io_form_auxinput1 = 2
override_restart_timers = .false.									override_restart_timers = .false.
auxhist1_inname = "auxhist1_d<domain>_<date>"								auxhist1_inname = "auxhist1_d<domain>_<date>"
auxhist1_outname = "auxhist1_d<domain>_<date>"								auxhist1_outname = "auxhist1_d<domain>_<date>"
auxhist1_interval_y = 0											auxhist1_interval_y = 0
auxhist1_interval_d = 0											auxhist1_interval_d = 0
auxhist1_interval_h = 0											auxhist1_interval_h = 0
auxhist1_interval_m = 0											auxhist1_interval_m = 0
auxhist1_interval_s = 0											auxhist1_interval_s = 0
auxhist1_interval = 0											auxhist1_interval = 0
auxhist1_begin_y = 0											auxhist1_begin_y = 0
auxhist1_begin_d = 0											auxhist1_begin_d = 0
auxhist1_begin_h = 0											auxhist1_begin_h = 0
auxhist1_begin_m = 0											auxhist1_begin_m = 0
auxhist1_begin_s = 0											auxhist1_begin_s = 0
auxhist1_begin = 0											auxhist1_begin = 0
auxhist1_end_y = 0											auxhist1_end_y = 0
auxhist1_end_d = 0											auxhist1_end_d = 0
auxhist1_end_h = 0											auxhist1_end_h = 0
auxhist1_end_m = 0											auxhist1_end_m = 0
auxhist1_end_s = 0											auxhist1_end_s = 0
auxhist1_end = 0											auxhist1_end = 0
io_form_auxhist1 = 0											io_form_auxhist1 = 0
frames_per_auxhist1 = 999999										frames_per_auxhist1 = 999999
auxhist2_inname = "auxhist2_d<domain>_<date>"								auxhist2_inname = "auxhist2_d<domain>_<date>"
auxhist2_outname = "auxhist2_d<domain>_<date>"								auxhist2_outname = "auxhist2_d<domain>_<date>"
auxhist2_interval_y = 0											auxhist2_interval_y = 0
auxhist2_interval_d = 0											auxhist2_interval_d = 0
auxhist2_interval_h = 0											auxhist2_interval_h = 0
auxhist2_interval_m = 0											auxhist2_interval_m = 0
auxhist2_interval_s = 0											auxhist2_interval_s = 0
auxhist2_interval = 0											auxhist2_interval = 0
auxhist2_begin_y = 0											auxhist2_begin_y = 0
auxhist2_begin_d = 0											auxhist2_begin_d = 0
auxhist2_begin_h = 0											auxhist2_begin_h = 0
auxhist2_begin_m = 0											auxhist2_begin_m = 0
auxhist2_begin_s = 0											auxhist2_begin_s = 0
auxhist2_begin = 0											auxhist2_begin = 0
auxhist2_end_y = 0											auxhist2_end_y = 0
auxhist2_end_d = 0											auxhist2_end_d = 0
auxhist2_end_h = 0											auxhist2_end_h = 0
auxhist2_end_m = 0											auxhist2_end_m = 0
auxhist2_end_s = 0											auxhist2_end_s = 0
auxhist2_end = 0											auxhist2_end = 0
io_form_auxhist2 = 0											io_form_auxhist2 = 0
frames_per_auxhist2 = 999999										frames_per_auxhist2 = 999999
auxhist3_inname = "auxhist3_d<domain>_<date>"								auxhist3_inname = "auxhist3_d<domain>_<date>"
auxhist3_outname = "auxhist3_d<domain>_<date>"								auxhist3_outname = "auxhist3_d<domain>_<date>"
auxhist3_interval_y = 0											auxhist3_interval_y = 0
auxhist3_interval_d = 0											auxhist3_interval_d = 0
auxhist3_interval_h = 0											auxhist3_interval_h = 0
auxhist3_interval_m = 0											auxhist3_interval_m = 0
auxhist3_interval_s = 0											auxhist3_interval_s = 0
auxhist3_interval = 0											auxhist3_interval = 0
auxhist3_begin_y = 0											auxhist3_begin_y = 0
auxhist3_begin_d = 0											auxhist3_begin_d = 0
auxhist3_begin_h = 0											auxhist3_begin_h = 0
auxhist3_begin_m = 0											auxhist3_begin_m = 0
auxhist3_begin_s = 0											auxhist3_begin_s = 0
auxhist3_begin = 0											auxhist3_begin = 0
auxhist3_end_y = 0											auxhist3_end_y = 0
auxhist3_end_d = 0											auxhist3_end_d = 0
auxhist3_end_h = 0											auxhist3_end_h = 0
auxhist3_end_m = 0											auxhist3_end_m = 0
auxhist3_end_s = 0											auxhist3_end_s = 0
auxhist3_end = 0											auxhist3_end = 0
io_form_auxhist3 = 0											io_form_auxhist3 = 0
frames_per_auxhist3 = 999999										frames_per_auxhist3 = 999999
auxhist4_inname = "auxhist4_d<domain>_<date>"								auxhist4_inname = "auxhist4_d<domain>_<date>"
auxhist4_outname = "auxhist4_d<domain>_<date>"								auxhist4_outname = "auxhist4_d<domain>_<date>"
auxhist4_interval_y = 0											auxhist4_interval_y = 0
auxhist4_interval_d = 0											auxhist4_interval_d = 0
auxhist4_interval_h = 0											auxhist4_interval_h = 0
auxhist4_interval_m = 0											auxhist4_interval_m = 0
auxhist4_interval_s = 0											auxhist4_interval_s = 0
auxhist4_interval = 0											auxhist4_interval = 0
auxhist4_begin_y = 0											auxhist4_begin_y = 0
auxhist4_begin_d = 0											auxhist4_begin_d = 0
auxhist4_begin_h = 0											auxhist4_begin_h = 0
auxhist4_begin_m = 0											auxhist4_begin_m = 0
auxhist4_begin_s = 0											auxhist4_begin_s = 0
auxhist4_begin = 0											auxhist4_begin = 0
auxhist4_end_y = 0											auxhist4_end_y = 0
auxhist4_end_d = 0											auxhist4_end_d = 0
auxhist4_end_h = 0											auxhist4_end_h = 0
auxhist4_end_m = 0											auxhist4_end_m = 0
auxhist4_end_s = 0											auxhist4_end_s = 0
auxhist4_end = 0											auxhist4_end = 0
io_form_auxhist4 = 0											io_form_auxhist4 = 0
frames_per_auxhist4 = 999999										frames_per_auxhist4 = 999999
auxhist5_inname = "auxhist5_d<domain>_<date>"								auxhist5_inname = "auxhist5_d<domain>_<date>"
auxhist5_outname = "auxhist5_d<domain>_<date>"								auxhist5_outname = "auxhist5_d<domain>_<date>"
auxhist5_interval_y = 0											auxhist5_interval_y = 0
auxhist5_interval_d = 0											auxhist5_interval_d = 0
auxhist5_interval_h = 0											auxhist5_interval_h = 0
auxhist5_interval_m = 0											auxhist5_interval_m = 0
auxhist5_interval_s = 0											auxhist5_interval_s = 0
auxhist5_interval = 0											auxhist5_interval = 0
auxhist5_begin_y = 0											auxhist5_begin_y = 0
auxhist5_begin_d = 0											auxhist5_begin_d = 0
auxhist5_begin_h = 0											auxhist5_begin_h = 0
auxhist5_begin_m = 0											auxhist5_begin_m = 0
auxhist5_begin_s = 0											auxhist5_begin_s = 0
auxhist5_begin = 0											auxhist5_begin = 0
auxhist5_end_y = 0											auxhist5_end_y = 0
auxhist5_end_d = 0											auxhist5_end_d = 0
auxhist5_end_h = 0											auxhist5_end_h = 0
auxhist5_end_m = 0											auxhist5_end_m = 0
auxhist5_end_s = 0											auxhist5_end_s = 0
auxhist5_end = 0											auxhist5_end = 0
io_form_auxhist5 = 0											io_form_auxhist5 = 0
frames_per_auxhist5 = 999999										frames_per_auxhist5 = 999999
auxhist6_inname = "auxhist6_d<domain>_<date>"								auxhist6_inname = "auxhist6_d<domain>_<date>"
auxhist6_outname = "auxhist6_d<domain>_<date>"								auxhist6_outname = "auxhist6_d<domain>_<date>"
auxhist6_interval_y = 0											auxhist6_interval_y = 0
auxhist6_interval_d = 0											auxhist6_interval_d = 0
auxhist6_interval_h = 0											auxhist6_interval_h = 0
auxhist6_interval_m = 0											auxhist6_interval_m = 0
auxhist6_interval_s = 0											auxhist6_interval_s = 0
auxhist6_interval = 0											auxhist6_interval = 0
auxhist6_begin_y = 0											auxhist6_begin_y = 0
auxhist6_begin_d = 0											auxhist6_begin_d = 0
auxhist6_begin_h = 0											auxhist6_begin_h = 0
auxhist6_begin_m = 0											auxhist6_begin_m = 0
auxhist6_begin_s = 0											auxhist6_begin_s = 0
auxhist6_begin = 0											auxhist6_begin = 0
auxhist6_end_y = 0											auxhist6_end_y = 0
auxhist6_end_d = 0											auxhist6_end_d = 0
auxhist6_end_h = 0											auxhist6_end_h = 0
auxhist6_end_m = 0											auxhist6_end_m = 0
auxhist6_end_s = 0											auxhist6_end_s = 0
auxhist6_end = 0											auxhist6_end = 0
io_form_auxhist6 = 0											io_form_auxhist6 = 0
frames_per_auxhist6 = 999999										frames_per_auxhist6 = 999999
auxhist7_inname = "auxhist7_d<domain>_<date>"								auxhist7_inname = "auxhist7_d<domain>_<date>"
auxhist7_outname = "auxhist7_d<domain>_<date>"								auxhist7_outname = "auxhist7_d<domain>_<date>"
auxhist7_interval_y = 0											auxhist7_interval_y = 0
auxhist7_interval_d = 0											auxhist7_interval_d = 0
auxhist7_interval_h = 0											auxhist7_interval_h = 0
auxhist7_interval_m = 0											auxhist7_interval_m = 0
auxhist7_interval_s = 0											auxhist7_interval_s = 0
auxhist7_interval = 0											auxhist7_interval = 0
auxhist7_begin_y = 0											auxhist7_begin_y = 0
auxhist7_begin_d = 0											auxhist7_begin_d = 0
auxhist7_begin_h = 0											auxhist7_begin_h = 0
auxhist7_begin_m = 0											auxhist7_begin_m = 0
auxhist7_begin_s = 0											auxhist7_begin_s = 0
auxhist7_begin = 0											auxhist7_begin = 0
auxhist7_end_y = 0											auxhist7_end_y = 0
auxhist7_end_d = 0											auxhist7_end_d = 0
auxhist7_end_h = 0											auxhist7_end_h = 0
auxhist7_end_m = 0											auxhist7_end_m = 0
auxhist7_end_s = 0											auxhist7_end_s = 0
auxhist7_end = 0											auxhist7_end = 0
io_form_auxhist7 = 0											io_form_auxhist7 = 0
frames_per_auxhist7 = 999999										frames_per_auxhist7 = 999999
auxhist8_inname = "auxhist8_d<domain>_<date>"								auxhist8_inname = "auxhist8_d<domain>_<date>"
auxhist8_outname = "auxhist8_d<domain>_<date>"								auxhist8_outname = "auxhist8_d<domain>_<date>"
auxhist8_interval_y = 0											auxhist8_interval_y = 0
auxhist8_interval_d = 0											auxhist8_interval_d = 0
auxhist8_interval_h = 0											auxhist8_interval_h = 0
auxhist8_interval_m = 0											auxhist8_interval_m = 0
auxhist8_interval_s = 0											auxhist8_interval_s = 0
auxhist8_interval = 0											auxhist8_interval = 0
auxhist8_begin_y = 0											auxhist8_begin_y = 0
auxhist8_begin_d = 0											auxhist8_begin_d = 0
auxhist8_begin_h = 0											auxhist8_begin_h = 0
auxhist8_begin_m = 0											auxhist8_begin_m = 0
auxhist8_begin_s = 0											auxhist8_begin_s = 0
auxhist8_begin = 0											auxhist8_begin = 0
auxhist8_end_y = 0											auxhist8_end_y = 0
auxhist8_end_d = 0											auxhist8_end_d = 0
auxhist8_end_h = 0											auxhist8_end_h = 0
auxhist8_end_m = 0											auxhist8_end_m = 0
auxhist8_end_s = 0											auxhist8_end_s = 0
auxhist8_end = 0											auxhist8_end = 0
io_form_auxhist8 = 0											io_form_auxhist8 = 0
frames_per_auxhist8 = 999999										frames_per_auxhist8 = 999999
auxhist9_inname = "auxhist9_d<domain>_<date>"								auxhist9_inname = "auxhist9_d<domain>_<date>"
auxhist9_outname = "auxhist9_d<domain>_<date>"								auxhist9_outname = "auxhist9_d<domain>_<date>"
auxhist9_interval_y = 0											auxhist9_interval_y = 0
auxhist9_interval_d = 0											auxhist9_interval_d = 0
auxhist9_interval_h = 0											auxhist9_interval_h = 0
auxhist9_interval_m = 0											auxhist9_interval_m = 0
auxhist9_interval_s = 0											auxhist9_interval_s = 0
auxhist9_interval = 0											auxhist9_interval = 0
auxhist9_begin_y = 0											auxhist9_begin_y = 0
auxhist9_begin_d = 0											auxhist9_begin_d = 0
auxhist9_begin_h = 0											auxhist9_begin_h = 0
auxhist9_begin_m = 0											auxhist9_begin_m = 0
auxhist9_begin_s = 0											auxhist9_begin_s = 0
auxhist9_begin = 0											auxhist9_begin = 0
auxhist9_end_y = 0											auxhist9_end_y = 0
auxhist9_end_d = 0											auxhist9_end_d = 0
auxhist9_end_h = 0											auxhist9_end_h = 0
auxhist9_end_m = 0											auxhist9_end_m = 0
auxhist9_end_s = 0											auxhist9_end_s = 0
auxhist9_end = 0											auxhist9_end = 0
io_form_auxhist9 = 0											io_form_auxhist9 = 0
frames_per_auxhist9 = 999999										frames_per_auxhist9 = 999999
auxhist10_inname = "auxhist10_d<domain>_<date>"								auxhist10_inname = "auxhist10_d<domain>_<date>"
auxhist10_outname = "auxhist10_d<domain>_<date>"							auxhist10_outname = "auxhist10_d<domain>_<date>"
auxhist10_interval_y = 0										auxhist10_interval_y = 0
auxhist10_interval_d = 0										auxhist10_interval_d = 0
auxhist10_interval_h = 0										auxhist10_interval_h = 0
auxhist10_interval_m = 0										auxhist10_interval_m = 0
auxhist10_interval_s = 0										auxhist10_interval_s = 0
auxhist10_interval = 0											auxhist10_interval = 0
auxhist10_begin_y = 0											auxhist10_begin_y = 0
auxhist10_begin_d = 0											auxhist10_begin_d = 0
auxhist10_begin_h = 0											auxhist10_begin_h = 0
auxhist10_begin_m = 0											auxhist10_begin_m = 0
auxhist10_begin_s = 0											auxhist10_begin_s = 0
auxhist10_begin = 0											auxhist10_begin = 0
auxhist10_end_y = 0											auxhist10_end_y = 0
auxhist10_end_d = 0											auxhist10_end_d = 0
auxhist10_end_h = 0											auxhist10_end_h = 0
auxhist10_end_m = 0											auxhist10_end_m = 0
auxhist10_end_s = 0											auxhist10_end_s = 0
auxhist10_end = 0											auxhist10_end = 0
io_form_auxhist10 = 0											io_form_auxhist10 = 0
frames_per_auxhist10 = 999999										frames_per_auxhist10 = 999999
auxhist11_inname = "auxhist11_d<domain>_<date>"								auxhist11_inname = "auxhist11_d<domain>_<date>"
auxhist11_outname = "auxhist11_d<domain>_<date>"							auxhist11_outname = "auxhist11_d<domain>_<date>"
auxhist11_interval_y = 0										auxhist11_interval_y = 0
auxhist11_interval_d = 0										auxhist11_interval_d = 0
auxhist11_interval_h = 0										auxhist11_interval_h = 0
auxhist11_interval_m = 0										auxhist11_interval_m = 0
auxhist11_interval_s = 0										auxhist11_interval_s = 0
auxhist11_interval = 0											auxhist11_interval = 0
auxhist11_begin_y = 0											auxhist11_begin_y = 0
auxhist11_begin_d = 0											auxhist11_begin_d = 0
auxhist11_begin_h = 0											auxhist11_begin_h = 0
auxhist11_begin_m = 0											auxhist11_begin_m = 0
auxhist11_begin_s = 0											auxhist11_begin_s = 0
auxhist11_begin = 0											auxhist11_begin = 0
auxhist11_end_y = 0											auxhist11_end_y = 0
auxhist11_end_d = 0											auxhist11_end_d = 0
auxhist11_end_h = 0											auxhist11_end_h = 0
auxhist11_end_m = 0											auxhist11_end_m = 0
auxhist11_end_s = 0											auxhist11_end_s = 0
auxhist11_end = 0											auxhist11_end = 0
io_form_auxhist11 = 0											io_form_auxhist11 = 0
frames_per_auxhist11 = 999999										frames_per_auxhist11 = 999999
auxhist12_inname = "auxhist12_d<domain>_<date>"								auxhist12_inname = "auxhist12_d<domain>_<date>"
auxhist12_outname = "auxhist12_d<domain>_<date>"							auxhist12_outname = "auxhist12_d<domain>_<date>"
auxhist12_interval_y = 0										auxhist12_interval_y = 0
auxhist12_interval_d = 0										auxhist12_interval_d = 0
auxhist12_interval_h = 0										auxhist12_interval_h = 0
auxhist12_interval_m = 0										auxhist12_interval_m = 0
auxhist12_interval_s = 0										auxhist12_interval_s = 0
auxhist12_interval = 0											auxhist12_interval = 0
auxhist12_begin_y = 0											auxhist12_begin_y = 0
auxhist12_begin_d = 0											auxhist12_begin_d = 0
auxhist12_begin_h = 0											auxhist12_begin_h = 0
auxhist12_begin_m = 0											auxhist12_begin_m = 0
auxhist12_begin_s = 0											auxhist12_begin_s = 0
auxhist12_begin = 0											auxhist12_begin = 0
auxhist12_end_y = 0											auxhist12_end_y = 0
auxhist12_end_d = 0											auxhist12_end_d = 0
auxhist12_end_h = 0											auxhist12_end_h = 0
auxhist12_end_m = 0											auxhist12_end_m = 0
auxhist12_end_s = 0											auxhist12_end_s = 0
auxhist12_end = 0											auxhist12_end = 0
io_form_auxhist12 = 0											io_form_auxhist12 = 0
frames_per_auxhist12 = 999999										frames_per_auxhist12 = 999999
auxhist13_inname = "auxhist13_d<domain>_<date>"								auxhist13_inname = "auxhist13_d<domain>_<date>"
auxhist13_outname = "auxhist13_d<domain>_<date>"							auxhist13_outname = "auxhist13_d<domain>_<date>"
auxhist13_interval_y = 0										auxhist13_interval_y = 0
auxhist13_interval_d = 0										auxhist13_interval_d = 0
auxhist13_interval_h = 0										auxhist13_interval_h = 0
auxhist13_interval_m = 0										auxhist13_interval_m = 0
auxhist13_interval_s = 0										auxhist13_interval_s = 0
auxhist13_interval = 0											auxhist13_interval = 0
auxhist13_begin_y = 0											auxhist13_begin_y = 0
auxhist13_begin_d = 0											auxhist13_begin_d = 0
auxhist13_begin_h = 0											auxhist13_begin_h = 0
auxhist13_begin_m = 0											auxhist13_begin_m = 0
auxhist13_begin_s = 0											auxhist13_begin_s = 0
auxhist13_begin = 0											auxhist13_begin = 0
auxhist13_end_y = 0											auxhist13_end_y = 0
auxhist13_end_d = 0											auxhist13_end_d = 0
auxhist13_end_h = 0											auxhist13_end_h = 0
auxhist13_end_m = 0											auxhist13_end_m = 0
auxhist13_end_s = 0											auxhist13_end_s = 0
auxhist13_end = 0											auxhist13_end = 0
io_form_auxhist13 = 0											io_form_auxhist13 = 0
frames_per_auxhist13 = 999999										frames_per_auxhist13 = 999999
auxhist14_inname = "auxhist14_d<domain>_<date>"								auxhist14_inname = "auxhist14_d<domain>_<date>"
auxhist14_outname = "auxhist14_d<domain>_<date>"							auxhist14_outname = "auxhist14_d<domain>_<date>"
auxhist14_interval_y = 0										auxhist14_interval_y = 0
auxhist14_interval_d = 0										auxhist14_interval_d = 0
auxhist14_interval_h = 0										auxhist14_interval_h = 0
auxhist14_interval_m = 0										auxhist14_interval_m = 0
auxhist14_interval_s = 0										auxhist14_interval_s = 0
auxhist14_interval = 0											auxhist14_interval = 0
auxhist14_begin_y = 0											auxhist14_begin_y = 0
auxhist14_begin_d = 0											auxhist14_begin_d = 0
auxhist14_begin_h = 0											auxhist14_begin_h = 0
auxhist14_begin_m = 0											auxhist14_begin_m = 0
auxhist14_begin_s = 0											auxhist14_begin_s = 0
auxhist14_begin = 0											auxhist14_begin = 0
auxhist14_end_y = 0											auxhist14_end_y = 0
auxhist14_end_d = 0											auxhist14_end_d = 0
auxhist14_end_h = 0											auxhist14_end_h = 0
auxhist14_end_m = 0											auxhist14_end_m = 0
auxhist14_end_s = 0											auxhist14_end_s = 0
auxhist14_end = 0											auxhist14_end = 0
io_form_auxhist14 = 0											io_form_auxhist14 = 0
frames_per_auxhist14 = 999999										frames_per_auxhist14 = 999999
auxhist15_inname = "auxhist15_d<domain>_<date>"								auxhist15_inname = "auxhist15_d<domain>_<date>"
auxhist15_outname = "auxhist15_d<domain>_<date>"							auxhist15_outname = "auxhist15_d<domain>_<date>"
auxhist15_interval_y = 0										auxhist15_interval_y = 0
auxhist15_interval_d = 0										auxhist15_interval_d = 0
auxhist15_interval_h = 0										auxhist15_interval_h = 0
auxhist15_interval_m = 0										auxhist15_interval_m = 0
auxhist15_interval_s = 0										auxhist15_interval_s = 0
auxhist15_interval = 0											auxhist15_interval = 0
auxhist15_begin_y = 0											auxhist15_begin_y = 0
auxhist15_begin_d = 0											auxhist15_begin_d = 0
auxhist15_begin_h = 0											auxhist15_begin_h = 0
auxhist15_begin_m = 0											auxhist15_begin_m = 0
auxhist15_begin_s = 0											auxhist15_begin_s = 0
auxhist15_begin = 0											auxhist15_begin = 0
auxhist15_end_y = 0											auxhist15_end_y = 0
auxhist15_end_d = 0											auxhist15_end_d = 0
auxhist15_end_h = 0											auxhist15_end_h = 0
auxhist15_end_m = 0											auxhist15_end_m = 0
auxhist15_end_s = 0											auxhist15_end_s = 0
auxhist15_end = 0											auxhist15_end = 0
io_form_auxhist15 = 0											io_form_auxhist15 = 0
frames_per_auxhist15 = 999999										frames_per_auxhist15 = 999999
auxhist16_inname = "auxhist16_d<domain>_<date>"								auxhist16_inname = "auxhist16_d<domain>_<date>"
auxhist16_outname = "auxhist16_d<domain>_<date>"							auxhist16_outname = "auxhist16_d<domain>_<date>"
auxhist16_interval_y = 0										auxhist16_interval_y = 0
auxhist16_interval_d = 0										auxhist16_interval_d = 0
auxhist16_interval_h = 0										auxhist16_interval_h = 0
auxhist16_interval_m = 0										auxhist16_interval_m = 0
auxhist16_interval_s = 0										auxhist16_interval_s = 0
auxhist16_interval = 0											auxhist16_interval = 0
auxhist16_begin_y = 0											auxhist16_begin_y = 0
auxhist16_begin_d = 0											auxhist16_begin_d = 0
auxhist16_begin_h = 0											auxhist16_begin_h = 0
auxhist16_begin_m = 0											auxhist16_begin_m = 0
auxhist16_begin_s = 0											auxhist16_begin_s = 0
auxhist16_begin = 0											auxhist16_begin = 0
auxhist16_end_y = 0											auxhist16_end_y = 0
auxhist16_end_d = 0											auxhist16_end_d = 0
auxhist16_end_h = 0											auxhist16_end_h = 0
auxhist16_end_m = 0											auxhist16_end_m = 0
auxhist16_end_s = 0											auxhist16_end_s = 0
auxhist16_end = 0											auxhist16_end = 0
io_form_auxhist16 = 0											io_form_auxhist16 = 0
frames_per_auxhist16 = 999999										frames_per_auxhist16 = 999999
auxhist17_inname = "auxhist17_d<domain>_<date>"								auxhist17_inname = "auxhist17_d<domain>_<date>"
auxhist17_outname = "auxhist17_d<domain>_<date>"							auxhist17_outname = "auxhist17_d<domain>_<date>"
auxhist17_interval_y = 0										auxhist17_interval_y = 0
auxhist17_interval_d = 0										auxhist17_interval_d = 0
auxhist17_interval_h = 0										auxhist17_interval_h = 0
auxhist17_interval_m = 0										auxhist17_interval_m = 0
auxhist17_interval_s = 0										auxhist17_interval_s = 0
auxhist17_interval = 0											auxhist17_interval = 0
auxhist17_begin_y = 0											auxhist17_begin_y = 0
auxhist17_begin_d = 0											auxhist17_begin_d = 0
auxhist17_begin_h = 0											auxhist17_begin_h = 0
auxhist17_begin_m = 0											auxhist17_begin_m = 0
auxhist17_begin_s = 0											auxhist17_begin_s = 0
auxhist17_begin = 0											auxhist17_begin = 0
auxhist17_end_y = 0											auxhist17_end_y = 0
auxhist17_end_d = 0											auxhist17_end_d = 0
auxhist17_end_h = 0											auxhist17_end_h = 0
auxhist17_end_m = 0											auxhist17_end_m = 0
auxhist17_end_s = 0											auxhist17_end_s = 0
auxhist17_end = 0											auxhist17_end = 0
io_form_auxhist17 = 0											io_form_auxhist17 = 0
frames_per_auxhist17 = 999999										frames_per_auxhist17 = 999999
auxhist18_inname = "auxhist18_d<domain>_<date>"								auxhist18_inname = "auxhist18_d<domain>_<date>"
auxhist18_outname = "auxhist18_d<domain>_<date>"							auxhist18_outname = "auxhist18_d<domain>_<date>"
auxhist18_interval_y = 0										auxhist18_interval_y = 0
auxhist18_interval_d = 0										auxhist18_interval_d = 0
auxhist18_interval_h = 0										auxhist18_interval_h = 0
auxhist18_interval_m = 0										auxhist18_interval_m = 0
auxhist18_interval_s = 0										auxhist18_interval_s = 0
auxhist18_interval = 0											auxhist18_interval = 0
auxhist18_begin_y = 0											auxhist18_begin_y = 0
auxhist18_begin_d = 0											auxhist18_begin_d = 0
auxhist18_begin_h = 0											auxhist18_begin_h = 0
auxhist18_begin_m = 0											auxhist18_begin_m = 0
auxhist18_begin_s = 0											auxhist18_begin_s = 0
auxhist18_begin = 0											auxhist18_begin = 0
auxhist18_end_y = 0											auxhist18_end_y = 0
auxhist18_end_d = 0											auxhist18_end_d = 0
auxhist18_end_h = 0											auxhist18_end_h = 0
auxhist18_end_m = 0											auxhist18_end_m = 0
auxhist18_end_s = 0											auxhist18_end_s = 0
auxhist18_end = 0											auxhist18_end = 0
io_form_auxhist18 = 0											io_form_auxhist18 = 0
frames_per_auxhist18 = 999999										frames_per_auxhist18 = 999999
auxhist19_inname = "auxhist19_d<domain>_<date>"								auxhist19_inname = "auxhist19_d<domain>_<date>"
auxhist19_outname = "auxhist19_d<domain>_<date>"							auxhist19_outname = "auxhist19_d<domain>_<date>"
auxhist19_interval_y = 0										auxhist19_interval_y = 0
auxhist19_interval_d = 0										auxhist19_interval_d = 0
auxhist19_interval_h = 0										auxhist19_interval_h = 0
auxhist19_interval_m = 0										auxhist19_interval_m = 0
auxhist19_interval_s = 0										auxhist19_interval_s = 0
auxhist19_interval = 0											auxhist19_interval = 0
auxhist19_begin_y = 0											auxhist19_begin_y = 0
auxhist19_begin_d = 0											auxhist19_begin_d = 0
auxhist19_begin_h = 0											auxhist19_begin_h = 0
auxhist19_begin_m = 0											auxhist19_begin_m = 0
auxhist19_begin_s = 0											auxhist19_begin_s = 0
auxhist19_begin = 0											auxhist19_begin = 0
auxhist19_end_y = 0											auxhist19_end_y = 0
auxhist19_end_d = 0											auxhist19_end_d = 0
auxhist19_end_h = 0											auxhist19_end_h = 0
auxhist19_end_m = 0											auxhist19_end_m = 0
auxhist19_end_s = 0											auxhist19_end_s = 0
auxhist19_end = 0											auxhist19_end = 0
io_form_auxhist19 = 0											io_form_auxhist19 = 0
frames_per_auxhist19 = 999999										frames_per_auxhist19 = 999999
auxhist20_inname = "auxhist20_d<domain>_<date>"								auxhist20_inname = "auxhist20_d<domain>_<date>"
auxhist20_outname = "auxhist20_d<domain>_<date>"							auxhist20_outname = "auxhist20_d<domain>_<date>"
auxhist20_interval_y = 0										auxhist20_interval_y = 0
auxhist20_interval_d = 0										auxhist20_interval_d = 0
auxhist20_interval_h = 0										auxhist20_interval_h = 0
auxhist20_interval_m = 0										auxhist20_interval_m = 0
auxhist20_interval_s = 0										auxhist20_interval_s = 0
auxhist20_interval = 0											auxhist20_interval = 0
auxhist20_begin_y = 0											auxhist20_begin_y = 0
auxhist20_begin_d = 0											auxhist20_begin_d = 0
auxhist20_begin_h = 0											auxhist20_begin_h = 0
auxhist20_begin_m = 0											auxhist20_begin_m = 0
auxhist20_begin_s = 0											auxhist20_begin_s = 0
auxhist20_begin = 0											auxhist20_begin = 0
auxhist20_end_y = 0											auxhist20_end_y = 0
auxhist20_end_d = 0											auxhist20_end_d = 0
auxhist20_end_h = 0											auxhist20_end_h = 0
auxhist20_end_m = 0											auxhist20_end_m = 0
auxhist20_end_s = 0											auxhist20_end_s = 0
auxhist20_end = 0											auxhist20_end = 0
io_form_auxhist20 = 0											io_form_auxhist20 = 0
frames_per_auxhist20 = 999999										frames_per_auxhist20 = 999999
auxhist21_inname = "auxhist21_d<domain>_<date>"								auxhist21_inname = "auxhist21_d<domain>_<date>"
auxhist21_outname = "auxhist21_d<domain>_<date>"							auxhist21_outname = "auxhist21_d<domain>_<date>"
auxhist21_interval_y = 0										auxhist21_interval_y = 0
auxhist21_interval_d = 0										auxhist21_interval_d = 0
auxhist21_interval_h = 0										auxhist21_interval_h = 0
auxhist21_interval_m = 0										auxhist21_interval_m = 0
auxhist21_interval_s = 0										auxhist21_interval_s = 0
auxhist21_interval = 0											auxhist21_interval = 0
auxhist21_begin_y = 0											auxhist21_begin_y = 0
auxhist21_begin_d = 0											auxhist21_begin_d = 0
auxhist21_begin_h = 0											auxhist21_begin_h = 0
auxhist21_begin_m = 0											auxhist21_begin_m = 0
auxhist21_begin_s = 0											auxhist21_begin_s = 0
auxhist21_begin = 0											auxhist21_begin = 0
auxhist21_end_y = 0											auxhist21_end_y = 0
auxhist21_end_d = 0											auxhist21_end_d = 0
auxhist21_end_h = 0											auxhist21_end_h = 0
auxhist21_end_m = 0											auxhist21_end_m = 0
auxhist21_end_s = 0											auxhist21_end_s = 0
auxhist21_end = 0											auxhist21_end = 0
io_form_auxhist21 = 0											io_form_auxhist21 = 0
frames_per_auxhist21 = 999999										frames_per_auxhist21 = 999999
auxhist22_inname = "auxhist22_d<domain>_<date>"								auxhist22_inname = "auxhist22_d<domain>_<date>"
auxhist22_outname = "auxhist22_d<domain>_<date>"							auxhist22_outname = "auxhist22_d<domain>_<date>"
auxhist22_interval_y = 0										auxhist22_interval_y = 0
auxhist22_interval_d = 0										auxhist22_interval_d = 0
auxhist22_interval_h = 0										auxhist22_interval_h = 0
auxhist22_interval_m = 0										auxhist22_interval_m = 0
auxhist22_interval_s = 0										auxhist22_interval_s = 0
auxhist22_interval = 0											auxhist22_interval = 0
auxhist22_begin_y = 0											auxhist22_begin_y = 0
auxhist22_begin_d = 0											auxhist22_begin_d = 0
auxhist22_begin_h = 0											auxhist22_begin_h = 0
auxhist22_begin_m = 0											auxhist22_begin_m = 0
auxhist22_begin_s = 0											auxhist22_begin_s = 0
auxhist22_begin = 0											auxhist22_begin = 0
auxhist22_end_y = 0											auxhist22_end_y = 0
auxhist22_end_d = 0											auxhist22_end_d = 0
auxhist22_end_h = 0											auxhist22_end_h = 0
auxhist22_end_m = 0											auxhist22_end_m = 0
auxhist22_end_s = 0											auxhist22_end_s = 0
auxhist22_end = 0											auxhist22_end = 0
io_form_auxhist22 = 0											io_form_auxhist22 = 0
frames_per_auxhist22 = 999999										frames_per_auxhist22 = 999999
auxhist23_inname = "auxhist23_d<domain>_<date>"								auxhist23_inname = "auxhist23_d<domain>_<date>"
auxhist23_outname = "auxhist23_d<domain>_<date>"							auxhist23_outname = "auxhist23_d<domain>_<date>"
auxhist23_interval_y = 0										auxhist23_interval_y = 0
auxhist23_interval_d = 0										auxhist23_interval_d = 0
auxhist23_interval_h = 0										auxhist23_interval_h = 0
auxhist23_interval_m = 0										auxhist23_interval_m = 0
auxhist23_interval_s = 0										auxhist23_interval_s = 0
auxhist23_interval = 0											auxhist23_interval = 0
auxhist23_begin_y = 0											auxhist23_begin_y = 0
auxhist23_begin_d = 0											auxhist23_begin_d = 0
auxhist23_begin_h = 0											auxhist23_begin_h = 0
auxhist23_begin_m = 0											auxhist23_begin_m = 0
auxhist23_begin_s = 0											auxhist23_begin_s = 0
auxhist23_begin = 0											auxhist23_begin = 0
auxhist23_end_y = 0											auxhist23_end_y = 0
auxhist23_end_d = 0											auxhist23_end_d = 0
auxhist23_end_h = 0											auxhist23_end_h = 0
auxhist23_end_m = 0											auxhist23_end_m = 0
auxhist23_end_s = 0											auxhist23_end_s = 0
auxhist23_end = 0											auxhist23_end = 0
io_form_auxhist23 = 0											io_form_auxhist23 = 0
frames_per_auxhist23 = 999999										frames_per_auxhist23 = 999999
auxhist24_inname = "auxhist24_d<domain>_<date>"								auxhist24_inname = "auxhist24_d<domain>_<date>"
auxhist24_outname = "auxhist24_d<domain>_<date>"							auxhist24_outname = "auxhist24_d<domain>_<date>"
auxhist24_interval_y = 0										auxhist24_interval_y = 0
auxhist24_interval_d = 0										auxhist24_interval_d = 0
auxhist24_interval_h = 0										auxhist24_interval_h = 0
auxhist24_interval_m = 0										auxhist24_interval_m = 0
auxhist24_interval_s = 0										auxhist24_interval_s = 0
auxhist24_interval = 0											auxhist24_interval = 0
auxhist24_begin_y = 0											auxhist24_begin_y = 0
auxhist24_begin_d = 0											auxhist24_begin_d = 0
auxhist24_begin_h = 0											auxhist24_begin_h = 0
auxhist24_begin_m = 0											auxhist24_begin_m = 0
auxhist24_begin_s = 0											auxhist24_begin_s = 0
auxhist24_begin = 0											auxhist24_begin = 0
auxhist24_end_y = 0											auxhist24_end_y = 0
auxhist24_end_d = 0											auxhist24_end_d = 0
auxhist24_end_h = 0											auxhist24_end_h = 0
auxhist24_end_m = 0											auxhist24_end_m = 0
auxhist24_end_s = 0											auxhist24_end_s = 0
auxhist24_end = 0											auxhist24_end = 0
io_form_auxhist24 = 0											io_form_auxhist24 = 0
frames_per_auxhist24 = 999999										frames_per_auxhist24 = 999999
auxinput1_outname = "auxinput1_d<domain>_<date>"							auxinput1_outname = "auxinput1_d<domain>_<date>"
auxinput1_interval_y = 0										auxinput1_interval_y = 0
auxinput1_interval_d = 0										auxinput1_interval_d = 0
auxinput1_interval_h = 0										auxinput1_interval_h = 0
auxinput1_interval_m = 0										auxinput1_interval_m = 0
auxinput1_interval_s = 0										auxinput1_interval_s = 0
auxinput1_interval = 0											auxinput1_interval = 0
auxinput1_begin_y = 0											auxinput1_begin_y = 0
auxinput1_begin_d = 0											auxinput1_begin_d = 0
auxinput1_begin_h = 0											auxinput1_begin_h = 0
auxinput1_begin_m = 0											auxinput1_begin_m = 0
auxinput1_begin_s = 0											auxinput1_begin_s = 0
auxinput1_begin = 0											auxinput1_begin = 0
auxinput1_end_y = 0											auxinput1_end_y = 0
auxinput1_end_d = 0											auxinput1_end_d = 0
auxinput1_end_h = 0											auxinput1_end_h = 0
auxinput1_end_m = 0											auxinput1_end_m = 0
auxinput1_end_s = 0											auxinput1_end_s = 0
auxinput1_end = 0											auxinput1_end = 0
frames_per_auxinput1 = 999999										frames_per_auxinput1 = 999999
auxinput2_inname = "auxinput2_d<domain>_<date>"								auxinput2_inname = "auxinput2_d<domain>_<date>"
auxinput2_outname = "auxinput2_d<domain>_<date>"							auxinput2_outname = "auxinput2_d<domain>_<date>"
auxinput2_interval_y = 0										auxinput2_interval_y = 0
auxinput2_interval_d = 0										auxinput2_interval_d = 0
auxinput2_interval_h = 0										auxinput2_interval_h = 0
auxinput2_interval_m = 0										auxinput2_interval_m = 0
auxinput2_interval_s = 0										auxinput2_interval_s = 0
auxinput2_interval = 0											auxinput2_interval = 0
auxinput2_begin_y = 0											auxinput2_begin_y = 0
auxinput2_begin_d = 0											auxinput2_begin_d = 0
auxinput2_begin_h = 0											auxinput2_begin_h = 0
auxinput2_begin_m = 0											auxinput2_begin_m = 0
auxinput2_begin_s = 0											auxinput2_begin_s = 0
auxinput2_begin = 0											auxinput2_begin = 0
auxinput2_end_y = 0											auxinput2_end_y = 0
auxinput2_end_d = 0											auxinput2_end_d = 0
auxinput2_end_h = 0											auxinput2_end_h = 0
auxinput2_end_m = 0											auxinput2_end_m = 0
auxinput2_end_s = 0											auxinput2_end_s = 0
auxinput2_end = 0											auxinput2_end = 0
io_form_auxinput2 = 0											io_form_auxinput2 = 0
frames_per_auxinput2 = 999999										frames_per_auxinput2 = 999999
auxinput3_inname = "auxinput3_d<domain>_<date>"								auxinput3_inname = "auxinput3_d<domain>_<date>"
auxinput3_outname = "auxinput3_d<domain>_<date>"							auxinput3_outname = "auxinput3_d<domain>_<date>"
auxinput3_interval_y = 0										auxinput3_interval_y = 0
auxinput3_interval_d = 0										auxinput3_interval_d = 0
auxinput3_interval_h = 0										auxinput3_interval_h = 0
auxinput3_interval_m = 0										auxinput3_interval_m = 0
auxinput3_interval_s = 0										auxinput3_interval_s = 0
auxinput3_interval = 0											auxinput3_interval = 0
auxinput3_begin_y = 0											auxinput3_begin_y = 0
auxinput3_begin_d = 0											auxinput3_begin_d = 0
auxinput3_begin_h = 0											auxinput3_begin_h = 0
auxinput3_begin_m = 0											auxinput3_begin_m = 0
auxinput3_begin_s = 0											auxinput3_begin_s = 0
auxinput3_begin = 0											auxinput3_begin = 0
auxinput3_end_y = 0											auxinput3_end_y = 0
auxinput3_end_d = 0											auxinput3_end_d = 0
auxinput3_end_h = 0											auxinput3_end_h = 0
auxinput3_end_m = 0											auxinput3_end_m = 0
auxinput3_end_s = 0											auxinput3_end_s = 0
auxinput3_end = 0											auxinput3_end = 0
io_form_auxinput3 = 0											io_form_auxinput3 = 0
frames_per_auxinput3 = 999999										frames_per_auxinput3 = 999999
auxinput4_inname = "auxinput4_d<domain>_<date>"								auxinput4_inname = "auxinput4_d<domain>_<date>"
auxinput4_outname = "auxinput4_d<domain>_<date>"							auxinput4_outname = "auxinput4_d<domain>_<date>"
auxinput4_interval_y = 0										auxinput4_interval_y = 0
auxinput4_interval_d = 0										auxinput4_interval_d = 0
auxinput4_interval_h = 0										auxinput4_interval_h = 0
auxinput4_interval_m = 0										auxinput4_interval_m = 0
auxinput4_interval_s = 0										auxinput4_interval_s = 0
auxinput4_interval = 0											auxinput4_interval = 0
auxinput4_begin_y = 0											auxinput4_begin_y = 0
auxinput4_begin_d = 0											auxinput4_begin_d = 0
auxinput4_begin_h = 0											auxinput4_begin_h = 0
auxinput4_begin_m = 0											auxinput4_begin_m = 0
auxinput4_begin_s = 0											auxinput4_begin_s = 0
auxinput4_begin = 0											auxinput4_begin = 0
auxinput4_end_y = 0											auxinput4_end_y = 0
auxinput4_end_d = 0											auxinput4_end_d = 0
auxinput4_end_h = 0											auxinput4_end_h = 0
auxinput4_end_m = 0											auxinput4_end_m = 0
auxinput4_end_s = 0											auxinput4_end_s = 0
auxinput4_end = 0											auxinput4_end = 0
io_form_auxinput4 = 0											io_form_auxinput4 = 0
frames_per_auxinput4 = 999999										frames_per_auxinput4 = 999999
auxinput5_inname = "auxinput5_d<domain>_<date>"								auxinput5_inname = "auxinput5_d<domain>_<date>"
auxinput5_outname = "auxinput5_d<domain>_<date>"							auxinput5_outname = "auxinput5_d<domain>_<date>"
auxinput5_interval_y = 0										auxinput5_interval_y = 0
auxinput5_interval_d = 0										auxinput5_interval_d = 0
auxinput5_interval_h = 0										auxinput5_interval_h = 0
auxinput5_interval_m = 0										auxinput5_interval_m = 0
auxinput5_interval_s = 0										auxinput5_interval_s = 0
auxinput5_interval = 0											auxinput5_interval = 0
auxinput5_begin_y = 0											auxinput5_begin_y = 0
auxinput5_begin_d = 0											auxinput5_begin_d = 0
auxinput5_begin_h = 0											auxinput5_begin_h = 0
auxinput5_begin_m = 0											auxinput5_begin_m = 0
auxinput5_begin_s = 0											auxinput5_begin_s = 0
auxinput5_begin = 0											auxinput5_begin = 0
auxinput5_end_y = 0											auxinput5_end_y = 0
auxinput5_end_d = 0											auxinput5_end_d = 0
auxinput5_end_h = 0											auxinput5_end_h = 0
auxinput5_end_m = 0											auxinput5_end_m = 0
auxinput5_end_s = 0											auxinput5_end_s = 0
auxinput5_end = 0											auxinput5_end = 0
io_form_auxinput5 = 0											io_form_auxinput5 = 0
frames_per_auxinput5 = 999999										frames_per_auxinput5 = 999999
auxinput6_inname = "auxinput6_d<domain>_<date>"								auxinput6_inname = "auxinput6_d<domain>_<date>"
auxinput6_outname = "auxinput6_d<domain>_<date>"							auxinput6_outname = "auxinput6_d<domain>_<date>"
auxinput6_interval_y = 0										auxinput6_interval_y = 0
auxinput6_interval_d = 0										auxinput6_interval_d = 0
auxinput6_interval_h = 0										auxinput6_interval_h = 0
auxinput6_interval_m = 0										auxinput6_interval_m = 0
auxinput6_interval_s = 0										auxinput6_interval_s = 0
auxinput6_interval = 0											auxinput6_interval = 0
auxinput6_begin_y = 0											auxinput6_begin_y = 0
auxinput6_begin_d = 0											auxinput6_begin_d = 0
auxinput6_begin_h = 0											auxinput6_begin_h = 0
auxinput6_begin_m = 0											auxinput6_begin_m = 0
auxinput6_begin_s = 0											auxinput6_begin_s = 0
auxinput6_begin = 0											auxinput6_begin = 0
auxinput6_end_y = 0											auxinput6_end_y = 0
auxinput6_end_d = 0											auxinput6_end_d = 0
auxinput6_end_h = 0											auxinput6_end_h = 0
auxinput6_end_m = 0											auxinput6_end_m = 0
auxinput6_end_s = 0											auxinput6_end_s = 0
auxinput6_end = 0											auxinput6_end = 0
io_form_auxinput6 = 0											io_form_auxinput6 = 0
frames_per_auxinput6 = 999999										frames_per_auxinput6 = 999999
auxinput7_inname = "auxinput7_d<domain>_<date>"								auxinput7_inname = "auxinput7_d<domain>_<date>"
auxinput7_outname = "auxinput7_d<domain>_<date>"							auxinput7_outname = "auxinput7_d<domain>_<date>"
auxinput7_interval_y = 0										auxinput7_interval_y = 0
auxinput7_interval_d = 0										auxinput7_interval_d = 0
auxinput7_interval_h = 0										auxinput7_interval_h = 0
auxinput7_interval_m = 0										auxinput7_interval_m = 0
auxinput7_interval_s = 0										auxinput7_interval_s = 0
auxinput7_interval = 0											auxinput7_interval = 0
auxinput7_begin_y = 0											auxinput7_begin_y = 0
auxinput7_begin_d = 0											auxinput7_begin_d = 0
auxinput7_begin_h = 0											auxinput7_begin_h = 0
auxinput7_begin_m = 0											auxinput7_begin_m = 0
auxinput7_begin_s = 0											auxinput7_begin_s = 0
auxinput7_begin = 0											auxinput7_begin = 0
auxinput7_end_y = 0											auxinput7_end_y = 0
auxinput7_end_d = 0											auxinput7_end_d = 0
auxinput7_end_h = 0											auxinput7_end_h = 0
auxinput7_end_m = 0											auxinput7_end_m = 0
auxinput7_end_s = 0											auxinput7_end_s = 0
auxinput7_end = 0											auxinput7_end = 0
io_form_auxinput7 = 0											io_form_auxinput7 = 0
frames_per_auxinput7 = 999999										frames_per_auxinput7 = 999999
auxinput8_inname = "auxinput8_d<domain>_<date>"								auxinput8_inname = "auxinput8_d<domain>_<date>"
auxinput8_outname = "auxinput8_d<domain>_<date>"							auxinput8_outname = "auxinput8_d<domain>_<date>"
auxinput8_interval_y = 0										auxinput8_interval_y = 0
auxinput8_interval_d = 0										auxinput8_interval_d = 0
auxinput8_interval_h = 0										auxinput8_interval_h = 0
auxinput8_interval_m = 0										auxinput8_interval_m = 0
auxinput8_interval_s = 0										auxinput8_interval_s = 0
auxinput8_interval = 0											auxinput8_interval = 0
auxinput8_begin_y = 0											auxinput8_begin_y = 0
auxinput8_begin_d = 0											auxinput8_begin_d = 0
auxinput8_begin_h = 0											auxinput8_begin_h = 0
auxinput8_begin_m = 0											auxinput8_begin_m = 0
auxinput8_begin_s = 0											auxinput8_begin_s = 0
auxinput8_begin = 0											auxinput8_begin = 0
auxinput8_end_y = 0											auxinput8_end_y = 0
auxinput8_end_d = 0											auxinput8_end_d = 0
auxinput8_end_h = 0											auxinput8_end_h = 0
auxinput8_end_m = 0											auxinput8_end_m = 0
auxinput8_end_s = 0											auxinput8_end_s = 0
auxinput8_end = 0											auxinput8_end = 0
io_form_auxinput8 = 0											io_form_auxinput8 = 0
frames_per_auxinput8 = 999999										frames_per_auxinput8 = 999999
auxinput9_inname = "auxinput9_d<domain>_<date>"								auxinput9_inname = "auxinput9_d<domain>_<date>"
auxinput9_outname = "auxinput9_d<domain>_<date>"							auxinput9_outname = "auxinput9_d<domain>_<date>"
auxinput9_interval_y = 0										auxinput9_interval_y = 0
auxinput9_interval_d = 0										auxinput9_interval_d = 0
auxinput9_interval_h = 0										auxinput9_interval_h = 0
auxinput9_interval_m = 0										auxinput9_interval_m = 0
auxinput9_interval_s = 0										auxinput9_interval_s = 0
auxinput9_interval = 0											auxinput9_interval = 0
auxinput9_begin_y = 0											auxinput9_begin_y = 0
auxinput9_begin_d = 0											auxinput9_begin_d = 0
auxinput9_begin_h = 0											auxinput9_begin_h = 0
auxinput9_begin_m = 0											auxinput9_begin_m = 0
auxinput9_begin_s = 0											auxinput9_begin_s = 0
auxinput9_begin = 0											auxinput9_begin = 0
auxinput9_end_y = 0											auxinput9_end_y = 0
auxinput9_end_d = 0											auxinput9_end_d = 0
auxinput9_end_h = 0											auxinput9_end_h = 0
auxinput9_end_m = 0											auxinput9_end_m = 0
auxinput9_end_s = 0											auxinput9_end_s = 0
auxinput9_end = 0											auxinput9_end = 0
io_form_auxinput9 = 0											io_form_auxinput9 = 0
frames_per_auxinput9 = 999999										frames_per_auxinput9 = 999999
auxinput10_inname = "auxinput10_d<domain>_<date>"							auxinput10_inname = "auxinput10_d<domain>_<date>"
auxinput10_outname = "auxinput10_d<domain>_<date>"							auxinput10_outname = "auxinput10_d<domain>_<date>"
auxinput10_interval_y = 0										auxinput10_interval_y = 0
auxinput10_interval_d = 0										auxinput10_interval_d = 0
auxinput10_interval_h = 0										auxinput10_interval_h = 0
auxinput10_interval_m = 0										auxinput10_interval_m = 0
auxinput10_interval_s = 0										auxinput10_interval_s = 0
auxinput10_interval = 0											auxinput10_interval = 0
auxinput10_begin_y = 0											auxinput10_begin_y = 0
auxinput10_begin_d = 0											auxinput10_begin_d = 0
auxinput10_begin_h = 0											auxinput10_begin_h = 0
auxinput10_begin_m = 0											auxinput10_begin_m = 0
auxinput10_begin_s = 0											auxinput10_begin_s = 0
auxinput10_begin = 0											auxinput10_begin = 0
auxinput10_end_y = 0											auxinput10_end_y = 0
auxinput10_end_d = 0											auxinput10_end_d = 0
auxinput10_end_h = 0											auxinput10_end_h = 0
auxinput10_end_m = 0											auxinput10_end_m = 0
auxinput10_end_s = 0											auxinput10_end_s = 0
auxinput10_end = 0											auxinput10_end = 0
io_form_auxinput10 = 0											io_form_auxinput10 = 0
frames_per_auxinput10 = 999999										frames_per_auxinput10 = 999999
auxinput11_inname = "auxinput11_d<domain>_<date>"							auxinput11_inname = "auxinput11_d<domain>_<date>"
auxinput11_outname = "auxinput11_d<domain>_<date>"							auxinput11_outname = "auxinput11_d<domain>_<date>"
auxinput11_interval_y = 0										auxinput11_interval_y = 0
auxinput11_interval_d = 0										auxinput11_interval_d = 0
auxinput11_interval_h = 0										auxinput11_interval_h = 0
auxinput11_interval_m = 0										auxinput11_interval_m = 0
auxinput11_interval_s = 0										auxinput11_interval_s = 0
auxinput11_interval = 0											auxinput11_interval = 0
auxinput11_begin_y = 0											auxinput11_begin_y = 0
auxinput11_begin_d = 0											auxinput11_begin_d = 0
auxinput11_begin_h = 0											auxinput11_begin_h = 0
auxinput11_begin_m = 0											auxinput11_begin_m = 0
auxinput11_begin_s = 0											auxinput11_begin_s = 0
auxinput11_begin = 0											auxinput11_begin = 0
auxinput11_end_y = 0											auxinput11_end_y = 0
auxinput11_end_d = 0											auxinput11_end_d = 0
auxinput11_end_h = 0											auxinput11_end_h = 0
auxinput11_end_m = 0											auxinput11_end_m = 0
auxinput11_end_s = 0											auxinput11_end_s = 0
auxinput11_end = 0											auxinput11_end = 0
io_form_auxinput11 = 0											io_form_auxinput11 = 0
frames_per_auxinput11 = 999999										frames_per_auxinput11 = 999999
auxinput12_inname = "auxinput12_d<domain>_<date>"							auxinput12_inname = "auxinput12_d<domain>_<date>"
auxinput12_outname = "auxinput12_d<domain>_<date>"							auxinput12_outname = "auxinput12_d<domain>_<date>"
auxinput12_interval_y = 0										auxinput12_interval_y = 0
auxinput12_interval_d = 0										auxinput12_interval_d = 0
auxinput12_interval_h = 0										auxinput12_interval_h = 0
auxinput12_interval_m = 0										auxinput12_interval_m = 0
auxinput12_interval_s = 0										auxinput12_interval_s = 0
auxinput12_interval = 0											auxinput12_interval = 0
auxinput12_begin_y = 0											auxinput12_begin_y = 0
auxinput12_begin_d = 0											auxinput12_begin_d = 0
auxinput12_begin_h = 0											auxinput12_begin_h = 0
auxinput12_begin_m = 0											auxinput12_begin_m = 0
auxinput12_begin_s = 0											auxinput12_begin_s = 0
auxinput12_begin = 0											auxinput12_begin = 0
auxinput12_end_y = 0											auxinput12_end_y = 0
auxinput12_end_d = 0											auxinput12_end_d = 0
auxinput12_end_h = 0											auxinput12_end_h = 0
auxinput12_end_m = 0											auxinput12_end_m = 0
auxinput12_end_s = 0											auxinput12_end_s = 0
auxinput12_end = 0											auxinput12_end = 0
io_form_auxinput12 = 0											io_form_auxinput12 = 0
frames_per_auxinput12 = 999999										frames_per_auxinput12 = 999999
auxinput13_inname = "auxinput13_d<domain>_<date>"							auxinput13_inname = "auxinput13_d<domain>_<date>"
auxinput13_outname = "auxinput13_d<domain>_<date>"							auxinput13_outname = "auxinput13_d<domain>_<date>"
auxinput13_interval_y = 0										auxinput13_interval_y = 0
auxinput13_interval_d = 0										auxinput13_interval_d = 0
auxinput13_interval_h = 0										auxinput13_interval_h = 0
auxinput13_interval_m = 0										auxinput13_interval_m = 0
auxinput13_interval_s = 0										auxinput13_interval_s = 0
auxinput13_interval = 0											auxinput13_interval = 0
auxinput13_begin_y = 0											auxinput13_begin_y = 0
auxinput13_begin_d = 0											auxinput13_begin_d = 0
auxinput13_begin_h = 0											auxinput13_begin_h = 0
auxinput13_begin_m = 0											auxinput13_begin_m = 0
auxinput13_begin_s = 0											auxinput13_begin_s = 0
auxinput13_begin = 0											auxinput13_begin = 0
auxinput13_end_y = 0											auxinput13_end_y = 0
auxinput13_end_d = 0											auxinput13_end_d = 0
auxinput13_end_h = 0											auxinput13_end_h = 0
auxinput13_end_m = 0											auxinput13_end_m = 0
auxinput13_end_s = 0											auxinput13_end_s = 0
auxinput13_end = 0											auxinput13_end = 0
io_form_auxinput13 = 0											io_form_auxinput13 = 0
frames_per_auxinput13 = 999999										frames_per_auxinput13 = 999999
auxinput14_inname = "auxinput14_d<domain>_<date>"							auxinput14_inname = "auxinput14_d<domain>_<date>"
auxinput14_outname = "auxinput14_d<domain>_<date>"							auxinput14_outname = "auxinput14_d<domain>_<date>"
auxinput14_interval_y = 0										auxinput14_interval_y = 0
auxinput14_interval_d = 0										auxinput14_interval_d = 0
auxinput14_interval_h = 0										auxinput14_interval_h = 0
auxinput14_interval_m = 0										auxinput14_interval_m = 0
auxinput14_interval_s = 0										auxinput14_interval_s = 0
auxinput14_interval = 0											auxinput14_interval = 0
auxinput14_begin_y = 0											auxinput14_begin_y = 0
auxinput14_begin_d = 0											auxinput14_begin_d = 0
auxinput14_begin_h = 0											auxinput14_begin_h = 0
auxinput14_begin_m = 0											auxinput14_begin_m = 0
auxinput14_begin_s = 0											auxinput14_begin_s = 0
auxinput14_begin = 0											auxinput14_begin = 0
auxinput14_end_y = 0											auxinput14_end_y = 0
auxinput14_end_d = 0											auxinput14_end_d = 0
auxinput14_end_h = 0											auxinput14_end_h = 0
auxinput14_end_m = 0											auxinput14_end_m = 0
auxinput14_end_s = 0											auxinput14_end_s = 0
auxinput14_end = 0											auxinput14_end = 0
io_form_auxinput14 = 0											io_form_auxinput14 = 0
frames_per_auxinput14 = 999999										frames_per_auxinput14 = 999999
auxinput15_inname = "auxinput15_d<domain>_<date>"							auxinput15_inname = "auxinput15_d<domain>_<date>"
auxinput15_outname = "auxinput15_d<domain>_<date>"							auxinput15_outname = "auxinput15_d<domain>_<date>"
auxinput15_interval_y = 0										auxinput15_interval_y = 0
auxinput15_interval_d = 0										auxinput15_interval_d = 0
auxinput15_interval_h = 0										auxinput15_interval_h = 0
auxinput15_interval_m = 0										auxinput15_interval_m = 0
auxinput15_interval_s = 0										auxinput15_interval_s = 0
auxinput15_interval = 0											auxinput15_interval = 0
auxinput15_begin_y = 0											auxinput15_begin_y = 0
auxinput15_begin_d = 0											auxinput15_begin_d = 0
auxinput15_begin_h = 0											auxinput15_begin_h = 0
auxinput15_begin_m = 0											auxinput15_begin_m = 0
auxinput15_begin_s = 0											auxinput15_begin_s = 0
auxinput15_begin = 0											auxinput15_begin = 0
auxinput15_end_y = 0											auxinput15_end_y = 0
auxinput15_end_d = 0											auxinput15_end_d = 0
auxinput15_end_h = 0											auxinput15_end_h = 0
auxinput15_end_m = 0											auxinput15_end_m = 0
auxinput15_end_s = 0											auxinput15_end_s = 0
auxinput15_end = 0											auxinput15_end = 0
io_form_auxinput15 = 0											io_form_auxinput15 = 0
frames_per_auxinput15 = 999999										frames_per_auxinput15 = 999999
auxinput16_inname = "auxinput16_d<domain>_<date>"							auxinput16_inname = "auxinput16_d<domain>_<date>"
auxinput16_outname = "auxinput16_d<domain>_<date>"							auxinput16_outname = "auxinput16_d<domain>_<date>"
auxinput16_interval_y = 0										auxinput16_interval_y = 0
auxinput16_interval_d = 0										auxinput16_interval_d = 0
auxinput16_interval_h = 0										auxinput16_interval_h = 0
auxinput16_interval_m = 0										auxinput16_interval_m = 0
auxinput16_interval_s = 0										auxinput16_interval_s = 0
auxinput16_interval = 0											auxinput16_interval = 0
auxinput16_begin_y = 0											auxinput16_begin_y = 0
auxinput16_begin_d = 0											auxinput16_begin_d = 0
auxinput16_begin_h = 0											auxinput16_begin_h = 0
auxinput16_begin_m = 0											auxinput16_begin_m = 0
auxinput16_begin_s = 0											auxinput16_begin_s = 0
auxinput16_begin = 0											auxinput16_begin = 0
auxinput16_end_y = 0											auxinput16_end_y = 0
auxinput16_end_d = 0											auxinput16_end_d = 0
auxinput16_end_h = 0											auxinput16_end_h = 0
auxinput16_end_m = 0											auxinput16_end_m = 0
auxinput16_end_s = 0											auxinput16_end_s = 0
auxinput16_end = 0											auxinput16_end = 0
io_form_auxinput16 = 0											io_form_auxinput16 = 0
frames_per_auxinput16 = 999999										frames_per_auxinput16 = 999999
auxinput17_inname = "auxinput17_d<domain>_<date>"							auxinput17_inname = "auxinput17_d<domain>_<date>"
auxinput17_outname = "auxinput17_d<domain>_<date>"							auxinput17_outname = "auxinput17_d<domain>_<date>"
auxinput17_interval_y = 0										auxinput17_interval_y = 0
auxinput17_interval_d = 0										auxinput17_interval_d = 0
auxinput17_interval_h = 0										auxinput17_interval_h = 0
auxinput17_interval_m = 0										auxinput17_interval_m = 0
auxinput17_interval_s = 0										auxinput17_interval_s = 0
auxinput17_interval = 0											auxinput17_interval = 0
auxinput17_begin_y = 0											auxinput17_begin_y = 0
auxinput17_begin_d = 0											auxinput17_begin_d = 0
auxinput17_begin_h = 0											auxinput17_begin_h = 0
auxinput17_begin_m = 0											auxinput17_begin_m = 0
auxinput17_begin_s = 0											auxinput17_begin_s = 0
auxinput17_begin = 0											auxinput17_begin = 0
auxinput17_end_y = 0											auxinput17_end_y = 0
auxinput17_end_d = 0											auxinput17_end_d = 0
auxinput17_end_h = 0											auxinput17_end_h = 0
auxinput17_end_m = 0											auxinput17_end_m = 0
auxinput17_end_s = 0											auxinput17_end_s = 0
auxinput17_end = 0											auxinput17_end = 0
io_form_auxinput17 = 0											io_form_auxinput17 = 0
frames_per_auxinput17 = 999999										frames_per_auxinput17 = 999999
auxinput18_inname = "auxinput18_d<domain>_<date>"							auxinput18_inname = "auxinput18_d<domain>_<date>"
auxinput18_outname = "auxinput18_d<domain>_<date>"							auxinput18_outname = "auxinput18_d<domain>_<date>"
auxinput18_interval_y = 0										auxinput18_interval_y = 0
auxinput18_interval_d = 0										auxinput18_interval_d = 0
auxinput18_interval_h = 0										auxinput18_interval_h = 0
auxinput18_interval_m = 0										auxinput18_interval_m = 0
auxinput18_interval_s = 0										auxinput18_interval_s = 0
auxinput18_interval = 0											auxinput18_interval = 0
auxinput18_begin_y = 0											auxinput18_begin_y = 0
auxinput18_begin_d = 0											auxinput18_begin_d = 0
auxinput18_begin_h = 0											auxinput18_begin_h = 0
auxinput18_begin_m = 0											auxinput18_begin_m = 0
auxinput18_begin_s = 0											auxinput18_begin_s = 0
auxinput18_begin = 0											auxinput18_begin = 0
auxinput18_end_y = 0											auxinput18_end_y = 0
auxinput18_end_d = 0											auxinput18_end_d = 0
auxinput18_end_h = 0											auxinput18_end_h = 0
auxinput18_end_m = 0											auxinput18_end_m = 0
auxinput18_end_s = 0											auxinput18_end_s = 0
auxinput18_end = 0											auxinput18_end = 0
io_form_auxinput18 = 0											io_form_auxinput18 = 0
frames_per_auxinput18 = 999999										frames_per_auxinput18 = 999999
auxinput19_inname = "auxinput19_d<domain>_<date>"							auxinput19_inname = "auxinput19_d<domain>_<date>"
auxinput19_outname = "auxinput19_d<domain>_<date>"							auxinput19_outname = "auxinput19_d<domain>_<date>"
auxinput19_interval_y = 0										auxinput19_interval_y = 0
auxinput19_interval_d = 0										auxinput19_interval_d = 0
auxinput19_interval_h = 0										auxinput19_interval_h = 0
auxinput19_interval_m = 0										auxinput19_interval_m = 0
auxinput19_interval_s = 0										auxinput19_interval_s = 0
auxinput19_interval = 0											auxinput19_interval = 0
auxinput19_begin_y = 0											auxinput19_begin_y = 0
auxinput19_begin_d = 0											auxinput19_begin_d = 0
auxinput19_begin_h = 0											auxinput19_begin_h = 0
auxinput19_begin_m = 0											auxinput19_begin_m = 0
auxinput19_begin_s = 0											auxinput19_begin_s = 0
auxinput19_begin = 0											auxinput19_begin = 0
auxinput19_end_y = 0											auxinput19_end_y = 0
auxinput19_end_d = 0											auxinput19_end_d = 0
auxinput19_end_h = 0											auxinput19_end_h = 0
auxinput19_end_m = 0											auxinput19_end_m = 0
auxinput19_end_s = 0											auxinput19_end_s = 0
auxinput19_end = 0											auxinput19_end = 0
io_form_auxinput19 = 0											io_form_auxinput19 = 0
frames_per_auxinput19 = 999999										frames_per_auxinput19 = 999999
auxinput20_inname = "auxinput20_d<domain>_<date>"							auxinput20_inname = "auxinput20_d<domain>_<date>"
auxinput20_outname = "auxinput20_d<domain>_<date>"							auxinput20_outname = "auxinput20_d<domain>_<date>"
auxinput20_interval_y = 0										auxinput20_interval_y = 0
auxinput20_interval_d = 0										auxinput20_interval_d = 0
auxinput20_interval_h = 0										auxinput20_interval_h = 0
auxinput20_interval_m = 0										auxinput20_interval_m = 0
auxinput20_interval_s = 0										auxinput20_interval_s = 0
auxinput20_interval = 0											auxinput20_interval = 0
auxinput20_begin_y = 0											auxinput20_begin_y = 0
auxinput20_begin_d = 0											auxinput20_begin_d = 0
auxinput20_begin_h = 0											auxinput20_begin_h = 0
auxinput20_begin_m = 0											auxinput20_begin_m = 0
auxinput20_begin_s = 0											auxinput20_begin_s = 0
auxinput20_begin = 0											auxinput20_begin = 0
auxinput20_end_y = 0											auxinput20_end_y = 0
auxinput20_end_d = 0											auxinput20_end_d = 0
auxinput20_end_h = 0											auxinput20_end_h = 0
auxinput20_end_m = 0											auxinput20_end_m = 0
auxinput20_end_s = 0											auxinput20_end_s = 0
auxinput20_end = 0											auxinput20_end = 0
io_form_auxinput20 = 0											io_form_auxinput20 = 0
frames_per_auxinput20 = 999999										frames_per_auxinput20 = 999999
auxinput21_inname = "auxinput21_d<domain>_<date>"							auxinput21_inname = "auxinput21_d<domain>_<date>"
auxinput21_outname = "auxinput21_d<domain>_<date>"							auxinput21_outname = "auxinput21_d<domain>_<date>"
auxinput21_interval_y = 0										auxinput21_interval_y = 0
auxinput21_interval_d = 0										auxinput21_interval_d = 0
auxinput21_interval_h = 0										auxinput21_interval_h = 0
auxinput21_interval_m = 0										auxinput21_interval_m = 0
auxinput21_interval_s = 0										auxinput21_interval_s = 0
auxinput21_interval = 0											auxinput21_interval = 0
auxinput21_begin_y = 0											auxinput21_begin_y = 0
auxinput21_begin_d = 0											auxinput21_begin_d = 0
auxinput21_begin_h = 0											auxinput21_begin_h = 0
auxinput21_begin_m = 0											auxinput21_begin_m = 0
auxinput21_begin_s = 0											auxinput21_begin_s = 0
auxinput21_begin = 0											auxinput21_begin = 0
auxinput21_end_y = 0											auxinput21_end_y = 0
auxinput21_end_d = 0											auxinput21_end_d = 0
auxinput21_end_h = 0											auxinput21_end_h = 0
auxinput21_end_m = 0											auxinput21_end_m = 0
auxinput21_end_s = 0											auxinput21_end_s = 0
auxinput21_end = 0											auxinput21_end = 0
io_form_auxinput21 = 0											io_form_auxinput21 = 0
frames_per_auxinput21 = 999999										frames_per_auxinput21 = 999999
auxinput22_inname = "auxinput22_d<domain>_<date>"							auxinput22_inname = "auxinput22_d<domain>_<date>"
auxinput22_outname = "auxinput22_d<domain>_<date>"							auxinput22_outname = "auxinput22_d<domain>_<date>"
auxinput22_interval_y = 0										auxinput22_interval_y = 0
auxinput22_interval_d = 0										auxinput22_interval_d = 0
auxinput22_interval_h = 0										auxinput22_interval_h = 0
auxinput22_interval_m = 0										auxinput22_interval_m = 0
auxinput22_interval_s = 0										auxinput22_interval_s = 0
auxinput22_interval = 0											auxinput22_interval = 0
auxinput22_begin_y = 0											auxinput22_begin_y = 0
auxinput22_begin_d = 0											auxinput22_begin_d = 0
auxinput22_begin_h = 0											auxinput22_begin_h = 0
auxinput22_begin_m = 0											auxinput22_begin_m = 0
auxinput22_begin_s = 0											auxinput22_begin_s = 0
auxinput22_begin = 0											auxinput22_begin = 0
auxinput22_end_y = 0											auxinput22_end_y = 0
auxinput22_end_d = 0											auxinput22_end_d = 0
auxinput22_end_h = 0											auxinput22_end_h = 0
auxinput22_end_m = 0											auxinput22_end_m = 0
auxinput22_end_s = 0											auxinput22_end_s = 0
auxinput22_end = 0											auxinput22_end = 0
io_form_auxinput22 = 0											io_form_auxinput22 = 0
frames_per_auxinput22 = 999999										frames_per_auxinput22 = 999999
auxinput23_inname = "auxinput23_d<domain>_<date>"							auxinput23_inname = "auxinput23_d<domain>_<date>"
auxinput23_outname = "auxinput23_d<domain>_<date>"							auxinput23_outname = "auxinput23_d<domain>_<date>"
auxinput23_interval_y = 0										auxinput23_interval_y = 0
auxinput23_interval_d = 0										auxinput23_interval_d = 0
auxinput23_interval_h = 0										auxinput23_interval_h = 0
auxinput23_interval_m = 0										auxinput23_interval_m = 0
auxinput23_interval_s = 0										auxinput23_interval_s = 0
auxinput23_interval = 0											auxinput23_interval = 0
auxinput23_begin_y = 0											auxinput23_begin_y = 0
auxinput23_begin_d = 0											auxinput23_begin_d = 0
auxinput23_begin_h = 0											auxinput23_begin_h = 0
auxinput23_begin_m = 0											auxinput23_begin_m = 0
auxinput23_begin_s = 0											auxinput23_begin_s = 0
auxinput23_begin = 0											auxinput23_begin = 0
auxinput23_end_y = 0											auxinput23_end_y = 0
auxinput23_end_d = 0											auxinput23_end_d = 0
auxinput23_end_h = 0											auxinput23_end_h = 0
auxinput23_end_m = 0											auxinput23_end_m = 0
auxinput23_end_s = 0											auxinput23_end_s = 0
auxinput23_end = 0											auxinput23_end = 0
io_form_auxinput23 = 0											io_form_auxinput23 = 0
frames_per_auxinput23 = 999999										frames_per_auxinput23 = 999999
auxinput24_inname = "auxinput24_d<domain>_<date>"							auxinput24_inname = "auxinput24_d<domain>_<date>"
auxinput24_outname = "auxinput24_d<domain>_<date>"							auxinput24_outname = "auxinput24_d<domain>_<date>"
auxinput24_interval_y = 0										auxinput24_interval_y = 0
auxinput24_interval_d = 0										auxinput24_interval_d = 0
auxinput24_interval_h = 0										auxinput24_interval_h = 0
auxinput24_interval_m = 0										auxinput24_interval_m = 0
auxinput24_interval_s = 0										auxinput24_interval_s = 0
auxinput24_interval = 0											auxinput24_interval = 0
auxinput24_begin_y = 0											auxinput24_begin_y = 0
auxinput24_begin_d = 0											auxinput24_begin_d = 0
auxinput24_begin_h = 0											auxinput24_begin_h = 0
auxinput24_begin_m = 0											auxinput24_begin_m = 0
auxinput24_begin_s = 0											auxinput24_begin_s = 0
auxinput24_begin = 0											auxinput24_begin = 0
auxinput24_end_y = 0											auxinput24_end_y = 0
auxinput24_end_d = 0											auxinput24_end_d = 0
auxinput24_end_h = 0											auxinput24_end_h = 0
auxinput24_end_m = 0											auxinput24_end_m = 0
auxinput24_end_s = 0											auxinput24_end_s = 0
auxinput24_end = 0											auxinput24_end = 0
io_form_auxinput24 = 0											io_form_auxinput24 = 0
frames_per_auxinput24 = 999999										frames_per_auxinput24 = 999999
history_interval = 0											history_interval = 0
frames_per_outfile = 10											frames_per_outfile = 10
restart = .false.											restart = .false.
restart_interval = 0											restart_interval = 0
io_form_input = 2											io_form_input = 2
io_form_history = 2											io_form_history = 2
io_form_restart = 2											io_form_restart = 2
io_form_boundary = 2											io_form_boundary = 2
debug_level = 0												debug_level = 0
self_test_domain = .false.										self_test_domain = .false.
history_outname = "wrfout_d<domain>_<date>"								history_outname = "wrfout_d<domain>_<date>"
history_inname = "wrfhist_d<domain>_<date>"								history_inname = "wrfhist_d<domain>_<date>"
use_netcdf_classic = .false.										use_netcdf_classic = .false.
history_interval_d = 0											history_interval_d = 0
history_interval_h = 0											history_interval_h = 0
history_interval_m = 0											history_interval_m = 0
history_interval_s = 0											history_interval_s = 0
inputout_interval_d = 0											inputout_interval_d = 0
inputout_interval_h = 0											inputout_interval_h = 0
inputout_interval_m = 0											inputout_interval_m = 0
inputout_interval_s = 0											inputout_interval_s = 0
inputout_interval = 0											inputout_interval = 0
restart_interval_d = 0											restart_interval_d = 0
restart_interval_h = 0											restart_interval_h = 0
restart_interval_m = 0											restart_interval_m = 0
restart_interval_s = 0											restart_interval_s = 0
history_begin_y = 0											history_begin_y = 0
history_begin_d = 0											history_begin_d = 0
history_begin_h = 0											history_begin_h = 0
history_begin_m = 0											history_begin_m = 0
history_begin_s = 0											history_begin_s = 0
history_begin = 0											history_begin = 0
inputout_begin_y = 0											inputout_begin_y = 0
inputout_begin_d = 0											inputout_begin_d = 0
inputout_begin_h = 0											inputout_begin_h = 0
inputout_begin_m = 0											inputout_begin_m = 0
inputout_begin_s = 0											inputout_begin_s = 0
restart_begin_y = 0											restart_begin_y = 0
restart_begin_d = 0											restart_begin_d = 0
restart_begin_h = 0											restart_begin_h = 0
restart_begin_m = 0											restart_begin_m = 0
restart_begin_s = 0											restart_begin_s = 0
restart_begin = 0											restart_begin = 0
history_end_y = 0											history_end_y = 0
history_end_d = 0											history_end_d = 0
history_end_h = 0											history_end_h = 0
history_end_m = 0											history_end_m = 0
history_end_s = 0											history_end_s = 0
history_end = 0												history_end = 0
inputout_end_y = 0											inputout_end_y = 0
inputout_end_d = 0											inputout_end_d = 0
inputout_end_h = 0											inputout_end_h = 0
inputout_end_m = 0											inputout_end_m = 0
inputout_end_s = 0											inputout_end_s = 0
simulation_start_year = 0										simulation_start_year = 0
simulation_start_month = 0										simulation_start_month = 0
simulation_start_day = 0										simulation_start_day = 0
simulation_start_hour = 0										simulation_start_hour = 0
simulation_start_minute = 0										simulation_start_minute = 0
simulation_start_second = 0										simulation_start_second = 0
reset_simulation_start = .false.									reset_simulation_start = .false.
sr_x = 0												sr_x = 0
sr_y = 0												sr_y = 0
sgfdda_inname = "sgfdda_d<domain>"									sgfdda_inname = "sgfdda_d<domain>"
gfdda_inname = "gfdda_d<domain>"									gfdda_inname = "gfdda_d<domain>"
sgfdda_interval_d = 0											sgfdda_interval_d = 0
sgfdda_interval_h = 0											sgfdda_interval_h = 0
sgfdda_interval_m = 0											sgfdda_interval_m = 0
sgfdda_interval_s = 0											sgfdda_interval_s = 0
sgfdda_interval_y = 0											sgfdda_interval_y = 0
sgfdda_interval = 0											sgfdda_interval = 0
gfdda_interval_d = 0											gfdda_interval_d = 0
gfdda_interval_h = 0											gfdda_interval_h = 0
gfdda_interval_m = 0											gfdda_interval_m = 0
gfdda_interval_s = 0											gfdda_interval_s = 0
gfdda_interval_y = 0											gfdda_interval_y = 0
gfdda_interval = 0											gfdda_interval = 0
sgfdda_begin_y = 0											sgfdda_begin_y = 0
sgfdda_begin_d = 0											sgfdda_begin_d = 0
sgfdda_begin_h = 0											sgfdda_begin_h = 0
sgfdda_begin_m = 0											sgfdda_begin_m = 0
sgfdda_begin_s = 0											sgfdda_begin_s = 0
gfdda_begin_y = 0											gfdda_begin_y = 0
gfdda_begin_d = 0											gfdda_begin_d = 0
gfdda_begin_h = 0											gfdda_begin_h = 0
gfdda_begin_m = 0											gfdda_begin_m = 0
gfdda_begin_s = 0											gfdda_begin_s = 0
sgfdda_end_y = 0											sgfdda_end_y = 0
sgfdda_end_d = 0											sgfdda_end_d = 0
sgfdda_end_h = 0											sgfdda_end_h = 0
sgfdda_end_m = 0											sgfdda_end_m = 0
sgfdda_end_s = 0											sgfdda_end_s = 0
gfdda_end_y = 0												gfdda_end_y = 0
gfdda_end_d = 0												gfdda_end_d = 0
gfdda_end_h = 0												gfdda_end_h = 0
gfdda_end_m = 0												gfdda_end_m = 0
gfdda_end_s = 0												gfdda_end_s = 0
io_form_sgfdda = 2											io_form_sgfdda = 2
io_form_gfdda = 2											io_form_gfdda = 2
iofields_filename = "NONE_SPECIFIED"									iofields_filename = "NONE_SPECIFIED"
ignore_iofields_warning = .true.									ignore_iofields_warning = .true.
ncd_nofill = .true.											ncd_nofill = .true.
ifire = 0												ifire = 0
fire_boundary_guard = 2											fire_boundary_guard = 2
fire_num_ignitions = 0										   |	fire_num_ignitions = 0.
fire_ignition_ros1 = 0.01										fire_ignition_ros1 = 0.01
fire_ignition_start_lon1 = 0.										fire_ignition_start_lon1 = 0.
fire_ignition_start_lat1 = 0.										fire_ignition_start_lat1 = 0.
fire_ignition_end_lon1 = 0.										fire_ignition_end_lon1 = 0.
fire_ignition_end_lat1 = 0.										fire_ignition_end_lat1 = 0.
fire_ignition_radius1 = 0.										fire_ignition_radius1 = 0.
fire_ignition_start_time1 = 0.										fire_ignition_start_time1 = 0.
fire_ignition_end_time1 = 0.										fire_ignition_end_time1 = 0.
fire_ignition_ros2 = 0.01										fire_ignition_ros2 = 0.01
fire_ignition_start_lon2 = 0.										fire_ignition_start_lon2 = 0.
fire_ignition_start_lat2 = 0.										fire_ignition_start_lat2 = 0.
fire_ignition_end_lon2 = 0.										fire_ignition_end_lon2 = 0.
fire_ignition_end_lat2 = 0.										fire_ignition_end_lat2 = 0.
fire_ignition_radius2 = 0.										fire_ignition_radius2 = 0.
fire_ignition_start_time2 = 0.										fire_ignition_start_time2 = 0.
fire_ignition_end_time2 = 0.										fire_ignition_end_time2 = 0.
fire_ignition_ros3 = 0.01										fire_ignition_ros3 = 0.01
fire_ignition_start_lon3 = 0.										fire_ignition_start_lon3 = 0.
fire_ignition_start_lat3 = 0.										fire_ignition_start_lat3 = 0.
fire_ignition_end_lon3 = 0.										fire_ignition_end_lon3 = 0.
fire_ignition_end_lat3 = 0.										fire_ignition_end_lat3 = 0.
fire_ignition_radius3 = 0.										fire_ignition_radius3 = 0.
fire_ignition_start_time3 = 0.										fire_ignition_start_time3 = 0.
fire_ignition_end_time3 = 0.										fire_ignition_end_time3 = 0.
fire_ignition_ros4 = 0.01										fire_ignition_ros4 = 0.01
fire_ignition_start_lon4 = 0.										fire_ignition_start_lon4 = 0.
fire_ignition_start_lat4 = 0.										fire_ignition_start_lat4 = 0.
fire_ignition_end_lon4 = 0.										fire_ignition_end_lon4 = 0.
fire_ignition_end_lat4 = 0.										fire_ignition_end_lat4 = 0.
fire_ignition_radius4 = 0.										fire_ignition_radius4 = 0.
fire_ignition_start_time4 = 0.										fire_ignition_start_time4 = 0.
fire_ignition_end_time4 = 0.										fire_ignition_end_time4 = 0.
fire_ignition_ros5 = 0.01										fire_ignition_ros5 = 0.01
fire_ignition_start_lon5 = 0.										fire_ignition_start_lon5 = 0.
fire_ignition_start_lat5 = 0.										fire_ignition_start_lat5 = 0.
fire_ignition_end_lon5 = 0.										fire_ignition_end_lon5 = 0.
fire_ignition_end_lat5 = 0.										fire_ignition_end_lat5 = 0.
fire_ignition_radius5 = 0.										fire_ignition_radius5 = 0.
fire_ignition_start_time5 = 0.										fire_ignition_start_time5 = 0.
fire_ignition_end_time5 = 0.										fire_ignition_end_time5 = 0.
fire_ignition_start_x1 = 0.										fire_ignition_start_x1 = 0.
fire_ignition_start_y1 = 0.										fire_ignition_start_y1 = 0.
fire_ignition_end_x1 = 0.										fire_ignition_end_x1 = 0.
fire_ignition_end_y1 = 0.										fire_ignition_end_y1 = 0.
fire_ignition_start_x2 = 0.										fire_ignition_start_x2 = 0.
fire_ignition_start_y2 = 0.										fire_ignition_start_y2 = 0.
fire_ignition_end_x2 = 0.										fire_ignition_end_x2 = 0.
fire_ignition_end_y2 = 0.										fire_ignition_end_y2 = 0.
fire_ignition_start_x3 = 0.										fire_ignition_start_x3 = 0.
fire_ignition_start_y3 = 0.										fire_ignition_start_y3 = 0.
fire_ignition_end_x3 = 0.										fire_ignition_end_x3 = 0.
fire_ignition_end_y3 = 0.										fire_ignition_end_y3 = 0.
fire_ignition_start_x4 = 0.										fire_ignition_start_x4 = 0.
fire_ignition_start_y4 = 0.										fire_ignition_start_y4 = 0.
fire_ignition_end_x4 = 0.										fire_ignition_end_x4 = 0.
fire_ignition_end_y4 = 0.										fire_ignition_end_y4 = 0.
fire_ignition_start_x5 = 0.										fire_ignition_start_x5 = 0.
fire_ignition_start_y5 = 0.										fire_ignition_start_y5 = 0.
fire_ignition_end_x5 = 0.										fire_ignition_end_x5 = 0.
fire_ignition_end_y5 = 0.										fire_ignition_end_y5 = 0.
fire_lat_init = 0.											fire_lat_init = 0.
fire_lon_init = 0.											fire_lon_init = 0.
fire_ign_time = 0.											fire_ign_time = 0.
fire_shape = 0												fire_shape = 0
fire_sprd_mdl = 1											fire_sprd_mdl = 1
fire_crwn_hgt = 15.											fire_crwn_hgt = 15.
fire_ext_grnd = 50.											fire_ext_grnd = 50.
fire_ext_crwn = 50.											fire_ext_crwn = 50.
fire_wind_height = 6.096										fire_wind_height = 6.096
fire_fuel_read = -1											fire_fuel_read = -1
fire_fuel_cat = 1											fire_fuel_cat = 1
fire_print_msg = 0											fire_print_msg = 0
fire_print_file = 0											fire_print_file = 0
fire_fuel_left_method = 1										fire_fuel_left_method = 1
fire_fuel_left_irl = 2											fire_fuel_left_irl = 2
fire_fuel_left_jrl = 2											fire_fuel_left_jrl = 2
fire_back_weight = 0.5											fire_back_weight = 0.5
fire_grows_only = 1											fire_grows_only = 1
fire_upwinding = 3											fire_upwinding = 3
fire_upwind_split = 0											fire_upwind_split = 0
fire_viscosity = 0.4											fire_viscosity = 0.4
fire_lfn_ext_up = 1.0											fire_lfn_ext_up = 1.0
fire_topo_from_atm = 1											fire_topo_from_atm = 1
fire_advection = 1											fire_advection = 1
fire_test_steps = 0											fire_test_steps = 0
fire_const_time = -1.											fire_const_time = -1.
fire_const_grnhfx = 0.											fire_const_grnhfx = 0.
fire_const_grnqfx = 0.											fire_const_grnqfx = 0.
fire_atm_feedback = 1.											fire_atm_feedback = 1.
fire_mountain_type = 0											fire_mountain_type = 0
fire_mountain_height = 500.										fire_mountain_height = 500.
fire_mountain_start_x = 100.										fire_mountain_start_x = 100.
fire_mountain_start_y = 100.										fire_mountain_start_y = 100.
fire_mountain_end_x = 100.										fire_mountain_end_x = 100.
fire_mountain_end_y = 100.										fire_mountain_end_y = 100.
delt_perturbation = 0.											delt_perturbation = 0.
xrad_perturbation = 0.											xrad_perturbation = 0.
yrad_perturbation = 0.											yrad_perturbation = 0.
zrad_perturbation = 0.											zrad_perturbation = 0.
hght_perturbation = 0.											hght_perturbation = 0.
stretch_grd = .true.											stretch_grd = .true.
stretch_hyp = .false.											stretch_hyp = .false.
z_grd_scale = 0.40											z_grd_scale = 0.40
sfc_full_init = .false.											sfc_full_init = .false.
sfc_lu_index = 28											sfc_lu_index = 28
sfc_tsk = 285.0												sfc_tsk = 285.0
sfc_tmn = 285.0												sfc_tmn = 285.0
fire_read_lu = .false.											fire_read_lu = .false.
fire_read_tsk = .false.											fire_read_tsk = .false.
fire_read_tmn = .false.											fire_read_tmn = .false.
fire_read_atm_ht = .false.										fire_read_atm_ht = .false.
fire_read_fire_ht = .false.										fire_read_fire_ht = .false.
fire_read_atm_grad = .false.										fire_read_atm_grad = .false.
fire_read_fire_grad = .false.										fire_read_fire_grad = .false.
sfc_vegfra = 0.5											sfc_vegfra = 0.5
sfc_canwat = 0												sfc_canwat = 0
sfc_ivgtyp = 18												sfc_ivgtyp = 18
sfc_isltyp = 7												sfc_isltyp = 7
do_avgflx_em = 0											do_avgflx_em = 0
do_avgflx_cugd = 0											do_avgflx_cugd = 0
nens = 1												nens = 1
skebs = 0												skebs = 0
stoch_force_opt = 0											stoch_force_opt = 0
skebs_vertstruc = 0											skebs_vertstruc = 0
stoch_vertstruc_opt = 0											stoch_vertstruc_opt = 0
tot_backscat_psi = 1.0e-05										tot_backscat_psi = 1.0e-05
tot_backscat_t = 1.0e-06										tot_backscat_t = 1.0e-06
ztau_psi = 10800.0											ztau_psi = 10800.0
ztau_t = 10800.0											ztau_t = 10800.0
rexponent_psi = -1.83											rexponent_psi = -1.83
rexponent_t = -1.83											rexponent_t = -1.83
zsigma2_eps = 0.0833											zsigma2_eps = 0.0833
zsigma2_eta = 0.0833											zsigma2_eta = 0.0833
kminforc = 1												kminforc = 1
lminforc = 1												lminforc = 1
kminforct = 1												kminforct = 1
lminforct = 1												lminforct = 1
kmaxforc = 1000000											kmaxforc = 1000000
lmaxforc = 1000000											lmaxforc = 1000000
kmaxforct = 1000000											kmaxforct = 1000000
lmaxforct = 1000000											lmaxforct = 1000000
iseed_skebs = 811											iseed_skebs = 811
kmaxforch = 0												kmaxforch = 0
lmaxforch = 0												lmaxforch = 0
kmaxforcth = 0												kmaxforcth = 0
lmaxforcth = 0												lmaxforcth = 0
sppt = 0												sppt = 0
gridpt_stddev_sppt = 0.5										gridpt_stddev_sppt = 0.5
stddev_cutoff_sppt = 2.0										stddev_cutoff_sppt = 2.0
lengthscale_sppt = 150000.0										lengthscale_sppt = 150000.0
timescale_sppt = 21600.0										timescale_sppt = 21600.0
sppt_vertstruc = 0											sppt_vertstruc = 0
iseed_sppt = 53												iseed_sppt = 53
rand_perturb = 0											rand_perturb = 0
gridpt_stddev_rand_pert = 0.03										gridpt_stddev_rand_pert = 0.03
stddev_cutoff_rand_pert = 3.0										stddev_cutoff_rand_pert = 3.0
lengthscale_rand_pert = 500000.0									lengthscale_rand_pert = 500000.0
timescale_rand_pert = 21600.0										timescale_rand_pert = 21600.0
rand_pert_vertstruc = 0											rand_pert_vertstruc = 0
iseed_rand_pert = 17											iseed_rand_pert = 17
spp = 0												   <
hrrr_cycling = .false.										   <
spp_conv = 0											   <
gridpt_stddev_spp_conv = 0.3									   <
stddev_cutoff_spp_conv = 3.0									   <
lengthscale_spp_conv = 150000.0									   <
timescale_spp_conv = 21600.0									   <
vertstruc_spp_conv = 0										   <
iseed_spp_conv = 171										   <
spp_pbl = 0											   <
gridpt_stddev_spp_pbl = 0.15									   <
stddev_cutoff_spp_pbl = 2.0									   <
lengthscale_spp_pbl = 700000.0									   <
timescale_spp_pbl = 21600.0									   <
vertstruc_spp_pbl = 0										   <
iseed_spp_pbl = 217										   <
spp_lsm = 0											   <
gridpt_stddev_spp_lsm = 0.3									   <
stddev_cutoff_spp_lsm = 3.0									   <
lengthscale_spp_lsm = 50000.0									   <
timescale_spp_lsm = 86400.0									   <
vertstruc_spp_lsm = 0										   <
iseed_spp_lsm = 317										   <
skebs_on = 0												skebs_on = 0
sppt_on = 0												sppt_on = 0
spp_on = 0											   <
rand_perturb_on = 0											rand_perturb_on = 0
num_stoch_levels = 1											num_stoch_levels = 1
sfs_opt = 0												sfs_opt = 0
m_opt = 0												m_opt = 0
lakedepth_default = 50											lakedepth_default = 50
lake_min_elev = 5											lake_min_elev = 5
use_lakedepth = 1											use_lakedepth = 1
p_lev_diags = 0												p_lev_diags = 0
p_lev_diags_dfi = 0											p_lev_diags_dfi = 0
num_press_levels = 0											num_press_levels = 0
press_levels = 0											press_levels = 0
use_tot_or_hyd_p = 2											use_tot_or_hyd_p = 2
extrap_below_grnd = 1											extrap_below_grnd = 1
p_lev_missing = -999											p_lev_missing = -999
p_lev_interval = 0											p_lev_interval = 0
z_lev_diags = 0												z_lev_diags = 0
z_lev_diags_dfi = 0											z_lev_diags_dfi = 0
num_z_levels = 0											num_z_levels = 0
z_levels = 0												z_levels = 0
z_lev_missing = -999											z_lev_missing = -999
z_lev_interval = 0											z_lev_interval = 0
afwa_diag_opt = 0											afwa_diag_opt = 0
afwa_ptype_opt = 0											afwa_ptype_opt = 0
afwa_vil_opt = 0											afwa_vil_opt = 0
afwa_radar_opt = 0											afwa_radar_opt = 0
afwa_severe_opt = 0											afwa_severe_opt = 0
afwa_icing_opt = 0											afwa_icing_opt = 0
afwa_vis_opt = 0											afwa_vis_opt = 0
afwa_cloud_opt = 0											afwa_cloud_opt = 0
afwa_therm_opt = 0											afwa_therm_opt = 0
afwa_turb_opt = 0											afwa_turb_opt = 0
afwa_buoy_opt = 0											afwa_buoy_opt = 0
												   >	afwa_hailcast_opt = 0
afwa_ptype_ccn_tmp = 264.15										afwa_ptype_ccn_tmp = 264.15
afwa_ptype_tot_melt = 50.0										afwa_ptype_tot_melt = 50.0
afwa_bad_data_check = 0											afwa_bad_data_check = 0
perturb_bdy = 0												perturb_bdy = 0
perturb_chem_bdy = 0											perturb_chem_bdy = 0
chem_opt = 0												chem_opt = 0
!ENDOFREGISTRYGENERATEDINCLUDE										!ENDOFREGISTRYGENERATEDINCLUDE
>                                                 
>=================================================================================
>  inc/namelist_defines2.inc
>=================================================================================
!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defines2.inc'						!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defines2.inc'
!													!
! WARNING This file is generated automatically by use_registry						! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.							! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.							! Do not edit.  Your changes to this file will be lost.
!													!
integer    :: first_item_in_struct									integer    :: first_item_in_struct
integer :: run_days											integer :: run_days
integer :: run_hours											integer :: run_hours
integer :: run_minutes											integer :: run_minutes
integer :: run_seconds											integer :: run_seconds
integer :: start_year											integer :: start_year
integer :: start_month											integer :: start_month
integer :: start_day											integer :: start_day
integer :: start_hour											integer :: start_hour
integer :: start_minute											integer :: start_minute
integer :: start_second											integer :: start_second
integer :: end_year											integer :: end_year
integer :: end_month											integer :: end_month
integer :: end_day											integer :: end_day
integer :: end_hour											integer :: end_hour
integer :: end_minute											integer :: end_minute
integer :: end_second											integer :: end_second
integer :: interval_seconds										integer :: interval_seconds
logical :: input_from_file										logical :: input_from_file
integer :: fine_input_stream										integer :: fine_input_stream
logical :: input_from_hires										logical :: input_from_hires
character*256 :: rsmas_data_path									character*256 :: rsmas_data_path
logical :: all_ic_times											logical :: all_ic_times
integer :: julyr											integer :: julyr
integer :: julday											integer :: julday
real :: gmt												real :: gmt
character*256 :: input_inname										character*256 :: input_inname
character*256 :: input_outname										character*256 :: input_outname
character*256 :: bdy_inname										character*256 :: bdy_inname
character*256 :: bdy_outname										character*256 :: bdy_outname
character*256 :: rst_inname										character*256 :: rst_inname
character*256 :: rst_outname										character*256 :: rst_outname
logical :: write_input											logical :: write_input
logical :: write_restart_at_0h										logical :: write_restart_at_0h
logical :: write_hist_at_0h_rst										logical :: write_hist_at_0h_rst
logical :: adjust_output_times										logical :: adjust_output_times
logical :: adjust_input_times										logical :: adjust_input_times
integer :: diag_print											integer :: diag_print
logical :: nocolons											logical :: nocolons
logical :: cycling											logical :: cycling
integer :: output_diagnostics										integer :: output_diagnostics
integer :: nwp_diagnostics										integer :: nwp_diagnostics
logical :: output_ready_flag										logical :: output_ready_flag
logical :: usepio											logical :: usepio
integer :: pioprocs											integer :: pioprocs
integer :: piostart											integer :: piostart
integer :: piostride											integer :: piostride
integer :: pioshift											integer :: pioshift
integer :: dfi_opt											integer :: dfi_opt
integer :: dfi_savehydmeteors										integer :: dfi_savehydmeteors
integer :: dfi_nfilter											integer :: dfi_nfilter
logical :: dfi_write_filtered_input									logical :: dfi_write_filtered_input
logical :: dfi_write_dfi_history									logical :: dfi_write_dfi_history
integer :: dfi_cutoff_seconds										integer :: dfi_cutoff_seconds
integer :: dfi_time_dim											integer :: dfi_time_dim
integer :: dfi_fwdstop_year										integer :: dfi_fwdstop_year
integer :: dfi_fwdstop_month										integer :: dfi_fwdstop_month
integer :: dfi_fwdstop_day										integer :: dfi_fwdstop_day
integer :: dfi_fwdstop_hour										integer :: dfi_fwdstop_hour
integer :: dfi_fwdstop_minute										integer :: dfi_fwdstop_minute
integer :: dfi_fwdstop_second										integer :: dfi_fwdstop_second
integer :: dfi_bckstop_year										integer :: dfi_bckstop_year
integer :: dfi_bckstop_month										integer :: dfi_bckstop_month
integer :: dfi_bckstop_day										integer :: dfi_bckstop_day
integer :: dfi_bckstop_hour										integer :: dfi_bckstop_hour
integer :: dfi_bckstop_minute										integer :: dfi_bckstop_minute
integer :: dfi_bckstop_second										integer :: dfi_bckstop_second
integer :: time_step											integer :: time_step
integer :: time_step_fract_num										integer :: time_step_fract_num
integer :: time_step_fract_den										integer :: time_step_fract_den
integer :: time_step_dfi										integer :: time_step_dfi
integer :: min_time_step										integer :: min_time_step
integer :: min_time_step_den										integer :: min_time_step_den
integer :: max_time_step										integer :: max_time_step
integer :: max_time_step_den										integer :: max_time_step_den
real :: target_cfl											real :: target_cfl
real :: target_hcfl											real :: target_hcfl
integer :: max_step_increase_pct									integer :: max_step_increase_pct
integer :: starting_time_step										integer :: starting_time_step
integer :: starting_time_step_den									integer :: starting_time_step_den
logical :: step_to_output_time										logical :: step_to_output_time
integer :: adaptation_domain										integer :: adaptation_domain
logical :: use_adaptive_time_step									logical :: use_adaptive_time_step
logical :: use_adaptive_time_step_dfi									logical :: use_adaptive_time_step_dfi
integer :: max_dom											integer :: max_dom
integer :: lats_to_mic											integer :: lats_to_mic
integer :: s_we												integer :: s_we
integer :: e_we												integer :: e_we
integer :: s_sn												integer :: s_sn
integer :: e_sn												integer :: e_sn
integer :: s_vert											integer :: s_vert
integer :: e_vert											integer :: e_vert
integer :: num_metgrid_levels										integer :: num_metgrid_levels
integer :: num_metgrid_soil_levels									integer :: num_metgrid_soil_levels
real :: p_top_requested											real :: p_top_requested
logical :: interp_theta											logical :: interp_theta
integer :: interp_type											integer :: interp_type
integer :: rebalance										   <
integer :: vert_refine_method										integer :: vert_refine_method
integer :: vert_refine_fact										integer :: vert_refine_fact
integer :: extrap_type											integer :: extrap_type
integer :: t_extrap_type										integer :: t_extrap_type
integer :: hypsometric_opt										integer :: hypsometric_opt
logical :: lowest_lev_from_sfc										logical :: lowest_lev_from_sfc
logical :: use_levels_below_ground									logical :: use_levels_below_ground
logical :: use_tavg_for_tsk										logical :: use_tavg_for_tsk
logical :: use_surface											logical :: use_surface
integer :: lagrange_order										integer :: lagrange_order
integer :: force_sfc_in_vinterp										integer :: force_sfc_in_vinterp
real :: zap_close_levels										real :: zap_close_levels
real :: maxw_horiz_pres_diff										real :: maxw_horiz_pres_diff
real :: trop_horiz_pres_diff										real :: trop_horiz_pres_diff
real :: maxw_above_this_level										real :: maxw_above_this_level
integer :: use_maxw_level										integer :: use_maxw_level
integer :: use_trop_level										integer :: use_trop_level
logical :: sfcp_to_sfcp											logical :: sfcp_to_sfcp
logical :: adjust_heights										logical :: adjust_heights
logical :: smooth_cg_topo										logical :: smooth_cg_topo
integer :: nest_interp_coord										integer :: nest_interp_coord
integer :: interp_method_type										integer :: interp_method_type
logical :: aggregate_lu											logical :: aggregate_lu
logical :: rh2qv_wrt_liquid										logical :: rh2qv_wrt_liquid
integer :: rh2qv_method											integer :: rh2qv_method
real :: qv_max_p_safe											real :: qv_max_p_safe
real :: qv_max_flag											real :: qv_max_flag
real :: qv_max_value											real :: qv_max_value
real :: qv_min_p_safe											real :: qv_min_p_safe
real :: qv_min_flag											real :: qv_min_flag
real :: qv_min_value											real :: qv_min_value
integer :: ideal_init_method									   <
real :: dx												real :: dx
real :: dy												real :: dy
integer :: grid_id											integer :: grid_id
logical :: grid_allowed											logical :: grid_allowed
integer :: parent_id											integer :: parent_id
integer :: i_parent_start										integer :: i_parent_start
integer :: j_parent_start										integer :: j_parent_start
integer :: parent_grid_ratio										integer :: parent_grid_ratio
integer :: parent_time_step_ratio									integer :: parent_time_step_ratio
integer :: feedback											integer :: feedback
integer :: smooth_option										integer :: smooth_option
integer :: blend_width											integer :: blend_width
real :: ztop												real :: ztop
integer :: moad_grid_ratio										integer :: moad_grid_ratio
integer :: moad_time_step_ratio										integer :: moad_time_step_ratio
integer :: shw												integer :: shw
integer :: tile_sz_x											integer :: tile_sz_x
integer :: tile_sz_y											integer :: tile_sz_y
integer :: numtiles											integer :: numtiles
integer :: numtiles_inc											integer :: numtiles_inc
integer :: numtiles_x											integer :: numtiles_x
integer :: numtiles_y											integer :: numtiles_y
integer :: tile_strategy										integer :: tile_strategy
integer :: nproc_x											integer :: nproc_x
integer :: nproc_y											integer :: nproc_y
integer :: irand											integer :: irand
real :: dt												real :: dt
integer :: fft_used											integer :: fft_used
integer :: cu_used											integer :: cu_used
integer :: shcu_used											integer :: shcu_used
integer :: cam_used											integer :: cam_used
integer :: alloc_qndropsource										integer :: alloc_qndropsource
integer :: num_moves											integer :: num_moves
integer :: ts_buf_size											integer :: ts_buf_size
integer :: max_ts_locs											integer :: max_ts_locs
integer :: vortex_interval										integer :: vortex_interval
integer :: max_vortex_speed										integer :: max_vortex_speed
integer :: corral_dist											integer :: corral_dist
integer :: track_level											integer :: track_level
real :: time_to_move											real :: time_to_move
integer :: move_id											integer :: move_id
integer :: move_interval										integer :: move_interval
integer :: move_cd_x											integer :: move_cd_x
integer :: move_cd_y											integer :: move_cd_y
logical :: swap_x											logical :: swap_x
logical :: swap_y											logical :: swap_y
logical :: cycle_x											logical :: cycle_x
logical :: cycle_y											logical :: cycle_y
logical :: reorder_mesh											logical :: reorder_mesh
logical :: perturb_input										logical :: perturb_input
real :: eta_levels											real :: eta_levels
real :: max_dz												real :: max_dz
integer :: ocean_levels											integer :: ocean_levels
real :: ocean_z												real :: ocean_z
real :: ocean_t												real :: ocean_t
real :: ocean_s												real :: ocean_s
integer :: num_traj											integer :: num_traj
real :: chm_sections											real :: chm_sections
integer :: max_ts_level											integer :: max_ts_level
integer :: track_loc_in											integer :: track_loc_in
integer :: num_ext_model_couple_dom									integer :: num_ext_model_couple_dom
logical :: insert_bogus_storm										logical :: insert_bogus_storm
logical :: remove_storm											logical :: remove_storm
integer :: num_storm											integer :: num_storm
real :: latc_loc											real :: latc_loc
real :: lonc_loc											real :: lonc_loc
real :: vmax_meters_per_second										real :: vmax_meters_per_second
real :: rmax												real :: rmax
real :: vmax_ratio											real :: vmax_ratio
real :: rankine_lid											real :: rankine_lid
character*256 :: physics_suite									   <
logical :: force_read_thompson										logical :: force_read_thompson
logical :: write_thompson_tables									logical :: write_thompson_tables
integer :: mp_physics											integer :: mp_physics
real :: nssl_cccn											real :: nssl_cccn
real :: nssl_alphah											real :: nssl_alphah
real :: nssl_alphahl											real :: nssl_alphahl
real :: nssl_cnoh											real :: nssl_cnoh
real :: nssl_cnohl											real :: nssl_cnohl
real :: nssl_cnor											real :: nssl_cnor
real :: nssl_cnos											real :: nssl_cnos
real :: nssl_rho_qh											real :: nssl_rho_qh
real :: nssl_rho_qhl											real :: nssl_rho_qhl
real :: nssl_rho_qs											real :: nssl_rho_qs
integer :: nudge_lightning									   <
integer :: nudge_light_times									   <
integer :: nudge_light_timee									   <
integer :: nudge_light_int									   <
character*256 :: path_to_files									   <
integer :: gsfcgce_hail											integer :: gsfcgce_hail
integer :: gsfcgce_2ice											integer :: gsfcgce_2ice
integer :: progn											integer :: progn
real :: accum_mode											real :: accum_mode
real :: aitken_mode											real :: aitken_mode
real :: coarse_mode											real :: coarse_mode
integer :: do_radar_ref											integer :: do_radar_ref
integer :: compute_radar_ref										integer :: compute_radar_ref
integer :: ra_lw_physics										integer :: ra_lw_physics
integer :: ra_sw_physics										integer :: ra_sw_physics
real :: radt												real :: radt
real :: naer												real :: naer
integer :: sf_sfclay_physics										integer :: sf_sfclay_physics
integer :: sf_surface_physics										integer :: sf_surface_physics
integer :: bl_pbl_physics										integer :: bl_pbl_physics
integer :: bl_mynn_tkebudget										integer :: bl_mynn_tkebudget
integer :: ysu_topdown_pblmix										integer :: ysu_topdown_pblmix
integer :: shinhong_tke_diag										integer :: shinhong_tke_diag
logical :: bl_mynn_tkeadvect										logical :: bl_mynn_tkeadvect
integer :: bl_mynn_cloudpdf										integer :: bl_mynn_cloudpdf
integer :: bl_mynn_mixlength									   <
integer :: bl_mynn_edmf										   <
integer :: bl_mynn_edmf_mom									   <
integer :: bl_mynn_edmf_tke									   <
integer :: bl_mynn_edmf_part									   <
integer :: bl_mynn_cloudmix									   <
integer :: bl_mynn_mixqt									   <
integer :: icloud_bl										   <
integer :: mfshconv											integer :: mfshconv
integer :: sf_urban_physics										integer :: sf_urban_physics
real :: bldt												real :: bldt
integer :: cu_physics											integer :: cu_physics
integer :: shcu_physics											integer :: shcu_physics
integer :: cu_diag											integer :: cu_diag
integer :: kf_edrates										   <
integer :: kfeta_trigger										integer :: kfeta_trigger
integer :: nsas_dx_factor										integer :: nsas_dx_factor
real :: cudt												real :: cudt
real :: gsmdt												real :: gsmdt
integer :: isfflx											integer :: isfflx
integer :: ifsnow											integer :: ifsnow
integer :: icloud											integer :: icloud
integer :: ideal_xland											integer :: ideal_xland
real :: swrad_scat											real :: swrad_scat
integer :: surface_input_source										integer :: surface_input_source
integer :: num_soil_layers										integer :: num_soil_layers
integer :: maxpatch											integer :: maxpatch
integer :: num_snow_layers										integer :: num_snow_layers
integer :: num_snso_layers										integer :: num_snso_layers
integer :: num_urban_layers										integer :: num_urban_layers
integer :: num_urban_hi											integer :: num_urban_hi
integer :: num_months											integer :: num_months
integer :: sf_surface_mosaic										integer :: sf_surface_mosaic
integer :: mosaic_cat											integer :: mosaic_cat
integer :: mosaic_cat_soil										integer :: mosaic_cat_soil
integer :: mosaic_lu											integer :: mosaic_lu
integer :: mosaic_soil											integer :: mosaic_soil
integer :: maxiens											integer :: maxiens
integer :: maxens											integer :: maxens
integer :: maxens2											integer :: maxens2
integer :: maxens3											integer :: maxens3
integer :: ensdim											integer :: ensdim
integer :: cugd_avedx											integer :: cugd_avedx
integer :: clos_choice											integer :: clos_choice
integer :: imomentum											integer :: imomentum
integer :: ishallow											integer :: ishallow
real :: convtrans_avglen_m										real :: convtrans_avglen_m
integer :: num_land_cat											integer :: num_land_cat
integer :: num_soil_cat											integer :: num_soil_cat
integer :: mp_zero_out											integer :: mp_zero_out
real :: mp_zero_out_thresh										real :: mp_zero_out_thresh
real :: seaice_threshold										real :: seaice_threshold
integer :: sst_update											integer :: sst_update
integer :: sst_skin											integer :: sst_skin
integer :: tmn_update											integer :: tmn_update
logical :: usemonalb											logical :: usemonalb
logical :: rdmaxalb											logical :: rdmaxalb
logical :: rdlai2d											logical :: rdlai2d
logical :: ua_phys											logical :: ua_phys
integer :: opt_thcnd										   <
integer :: co2tf											integer :: co2tf
integer :: ra_call_offset										integer :: ra_call_offset
real :: cam_abs_freq_s											real :: cam_abs_freq_s
integer :: levsiz											integer :: levsiz
integer :: paerlev											integer :: paerlev
integer :: cam_abs_dim1											integer :: cam_abs_dim1
integer :: cam_abs_dim2											integer :: cam_abs_dim2
integer :: lagday											integer :: lagday
integer :: no_src_types											integer :: no_src_types
integer :: alevsiz											integer :: alevsiz
integer :: o3input											integer :: o3input
integer :: aer_opt											integer :: aer_opt
integer :: swint_opt											integer :: swint_opt
integer :: aer_type											integer :: aer_type
integer :: aer_aod550_opt										integer :: aer_aod550_opt
integer :: aer_angexp_opt										integer :: aer_angexp_opt
integer :: aer_ssa_opt											integer :: aer_ssa_opt
integer :: aer_asy_opt											integer :: aer_asy_opt
real :: aer_aod550_val											real :: aer_aod550_val
real :: aer_angexp_val											real :: aer_angexp_val
real :: aer_ssa_val											real :: aer_ssa_val
real :: aer_asy_val											real :: aer_asy_val
logical :: cu_rad_feedback										logical :: cu_rad_feedback
logical :: shallowcu_forced_ra										logical :: shallowcu_forced_ra
integer :: numbins											integer :: numbins
real :: thbinsize											real :: thbinsize
real :: rbinsize											real :: rbinsize
real :: mindeepfreq											real :: mindeepfreq
real :: minshallowfreq											real :: minshallowfreq
integer :: shcu_aerosols_opt										integer :: shcu_aerosols_opt
integer :: icloud_cu											integer :: icloud_cu
integer :: pxlsm_smois_init										integer :: pxlsm_smois_init
integer :: omlcall											integer :: omlcall
integer :: sf_ocean_physics										integer :: sf_ocean_physics
integer :: traj_opt											integer :: traj_opt
logical :: dm_has_traj										   <
integer :: tracercall											integer :: tracercall
real :: omdt												real :: omdt
real :: oml_hml0											real :: oml_hml0
real :: oml_gamma											real :: oml_gamma
real :: oml_relaxation_time									   <
integer :: isftcflx											integer :: isftcflx
integer :: iz0tlnd											integer :: iz0tlnd
real :: shadlen												real :: shadlen
integer :: slope_rad											integer :: slope_rad
integer :: topo_shading											integer :: topo_shading
integer :: topo_wind											integer :: topo_wind
integer :: no_mp_heating										integer :: no_mp_heating
integer :: fractional_seaice										integer :: fractional_seaice
integer :: seaice_snowdepth_opt										integer :: seaice_snowdepth_opt
real :: seaice_snowdepth_max										real :: seaice_snowdepth_max
real :: seaice_snowdepth_min										real :: seaice_snowdepth_min
integer :: seaice_albedo_opt										integer :: seaice_albedo_opt
real :: seaice_albedo_default										real :: seaice_albedo_default
integer :: seaice_thickness_opt										integer :: seaice_thickness_opt
real :: seaice_thickness_default									real :: seaice_thickness_default
logical :: tice2tsk_if2cold										logical :: tice2tsk_if2cold
real :: bucket_mm											real :: bucket_mm
real :: bucket_j											real :: bucket_j
real :: mp_tend_lim											real :: mp_tend_lim
real :: prec_acc_dt											real :: prec_acc_dt
integer :: prec_acc_opt											integer :: prec_acc_opt
integer :: bucketr_opt											integer :: bucketr_opt
integer :: bucketf_opt										   <
integer :: process_time_series										integer :: process_time_series
integer :: grav_settling										integer :: grav_settling
real :: sas_pgcon											real :: sas_pgcon
integer :: scalar_pblmix										integer :: scalar_pblmix
integer :: tracer_pblmix										integer :: tracer_pblmix
logical :: use_aero_icbc										logical :: use_aero_icbc
logical :: use_rap_aero_icbc										logical :: use_rap_aero_icbc
integer :: use_mp_re										   <
integer :: direct_feed_chimere										integer :: direct_feed_chimere
integer :: indirect_feed_chimere									integer :: indirect_feed_chimere
integer :: n_bin											integer :: n_bin
real :: ccn_conc											real :: ccn_conc
integer :: hail_opt											integer :: hail_opt
integer :: dveg												integer :: dveg
integer :: opt_crs											integer :: opt_crs
integer :: opt_btr											integer :: opt_btr
integer :: opt_run											integer :: opt_run
integer :: opt_sfc											integer :: opt_sfc
integer :: opt_frz											integer :: opt_frz
integer :: opt_inf											integer :: opt_inf
integer :: opt_rad											integer :: opt_rad
integer :: opt_alb											integer :: opt_alb
integer :: opt_snf											integer :: opt_snf
integer :: opt_tbot											integer :: opt_tbot
integer :: opt_stc											integer :: opt_stc
integer :: opt_gla										   <
integer :: opt_rsf										   <
real :: wtddt												real :: wtddt
integer :: wrf_hydro											integer :: wrf_hydro
real :: fgdt												real :: fgdt
integer :: fgdtzero											integer :: fgdtzero
integer :: grid_fdda											integer :: grid_fdda
integer :: grid_sfdda											integer :: grid_sfdda
integer :: if_no_pbl_nudging_uv										integer :: if_no_pbl_nudging_uv
integer :: if_no_pbl_nudging_t										integer :: if_no_pbl_nudging_t
integer :: if_no_pbl_nudging_ph										integer :: if_no_pbl_nudging_ph
integer :: if_no_pbl_nudging_q										integer :: if_no_pbl_nudging_q
integer :: if_zfac_uv											integer :: if_zfac_uv
integer :: k_zfac_uv											integer :: k_zfac_uv
integer :: if_zfac_t											integer :: if_zfac_t
integer :: k_zfac_t											integer :: k_zfac_t
integer :: if_zfac_ph											integer :: if_zfac_ph
integer :: k_zfac_ph											integer :: k_zfac_ph
integer :: if_zfac_q											integer :: if_zfac_q
integer :: k_zfac_q											integer :: k_zfac_q
integer :: dk_zfac_uv											integer :: dk_zfac_uv
integer :: dk_zfac_t											integer :: dk_zfac_t
integer :: dk_zfac_ph											integer :: dk_zfac_ph
real :: guv												real :: guv
real :: guv_sfc												real :: guv_sfc
real :: gt												real :: gt
real :: gt_sfc												real :: gt_sfc
real :: gq												real :: gq
real :: gq_sfc												real :: gq_sfc
real :: gph												real :: gph
real :: dtramp_min											real :: dtramp_min
integer :: if_ramping											integer :: if_ramping
real :: rinblw												real :: rinblw
integer :: xwavenum											integer :: xwavenum
integer :: ywavenum											integer :: ywavenum
integer :: pxlsm_soil_nudge										integer :: pxlsm_soil_nudge
integer :: fasdas										   <
integer :: obs_nudge_opt										integer :: obs_nudge_opt
integer :: max_obs											integer :: max_obs
real :: fdda_start											real :: fdda_start
real :: fdda_end											real :: fdda_end
integer :: obs_nudge_wind										integer :: obs_nudge_wind
real :: obs_coef_wind											real :: obs_coef_wind
integer :: obs_nudge_temp										integer :: obs_nudge_temp
real :: obs_coef_temp											real :: obs_coef_temp
integer :: obs_nudge_mois										integer :: obs_nudge_mois
real :: obs_coef_mois											real :: obs_coef_mois
integer :: obs_nudge_pstr										integer :: obs_nudge_pstr
real :: obs_coef_pstr											real :: obs_coef_pstr
integer :: obs_no_pbl_nudge_uv										integer :: obs_no_pbl_nudge_uv
integer :: obs_no_pbl_nudge_t										integer :: obs_no_pbl_nudge_t
integer :: obs_no_pbl_nudge_q										integer :: obs_no_pbl_nudge_q
integer :: obs_sfc_scheme_horiz										integer :: obs_sfc_scheme_horiz
integer :: obs_sfc_scheme_vert										integer :: obs_sfc_scheme_vert
real :: obs_max_sndng_gap										real :: obs_max_sndng_gap
real :: obs_nudgezfullr1_uv										real :: obs_nudgezfullr1_uv
real :: obs_nudgezrampr1_uv										real :: obs_nudgezrampr1_uv
real :: obs_nudgezfullr2_uv										real :: obs_nudgezfullr2_uv
real :: obs_nudgezrampr2_uv										real :: obs_nudgezrampr2_uv
real :: obs_nudgezfullr4_uv										real :: obs_nudgezfullr4_uv
real :: obs_nudgezrampr4_uv										real :: obs_nudgezrampr4_uv
real :: obs_nudgezfullr1_t										real :: obs_nudgezfullr1_t
real :: obs_nudgezrampr1_t										real :: obs_nudgezrampr1_t
real :: obs_nudgezfullr2_t										real :: obs_nudgezfullr2_t
real :: obs_nudgezrampr2_t										real :: obs_nudgezrampr2_t
real :: obs_nudgezfullr4_t										real :: obs_nudgezfullr4_t
real :: obs_nudgezrampr4_t										real :: obs_nudgezrampr4_t
real :: obs_nudgezfullr1_q										real :: obs_nudgezfullr1_q
real :: obs_nudgezrampr1_q										real :: obs_nudgezrampr1_q
real :: obs_nudgezfullr2_q										real :: obs_nudgezfullr2_q
real :: obs_nudgezrampr2_q										real :: obs_nudgezrampr2_q
real :: obs_nudgezfullr4_q										real :: obs_nudgezfullr4_q
real :: obs_nudgezrampr4_q										real :: obs_nudgezrampr4_q
real :: obs_nudgezfullmin										real :: obs_nudgezfullmin
real :: obs_nudgezrampmin										real :: obs_nudgezrampmin
real :: obs_nudgezmax											real :: obs_nudgezmax
real :: obs_sfcfact											real :: obs_sfcfact
real :: obs_sfcfacr											real :: obs_sfcfacr
real :: obs_dpsmx											real :: obs_dpsmx
real :: obs_rinxy											real :: obs_rinxy
real :: obs_rinsig											real :: obs_rinsig
real :: obs_twindo											real :: obs_twindo
integer :: obs_npfi											integer :: obs_npfi
integer :: obs_ionf											integer :: obs_ionf
integer :: obs_idynin											integer :: obs_idynin
real :: obs_dtramp											real :: obs_dtramp
integer :: obs_prt_max											integer :: obs_prt_max
integer :: obs_prt_freq											integer :: obs_prt_freq
logical :: obs_ipf_in4dob										logical :: obs_ipf_in4dob
logical :: obs_ipf_errob										logical :: obs_ipf_errob
logical :: obs_ipf_nudob										logical :: obs_ipf_nudob
logical :: obs_ipf_init											logical :: obs_ipf_init
integer :: obs_scl_neg_qv_innov										integer :: obs_scl_neg_qv_innov
integer :: scm_force											integer :: scm_force
real :: scm_force_dx											real :: scm_force_dx
integer :: num_force_layers										integer :: num_force_layers
integer :: scm_lu_index											integer :: scm_lu_index
integer :: scm_isltyp											integer :: scm_isltyp
real :: scm_vegfra											real :: scm_vegfra
real :: scm_canwat										   |	integer :: scm_canwat
real :: scm_lat												real :: scm_lat
real :: scm_lon												real :: scm_lon
logical :: scm_th_t_tend										logical :: scm_th_t_tend
logical :: scm_qv_t_tend										logical :: scm_qv_t_tend
logical :: scm_th_adv											logical :: scm_th_adv
logical :: scm_wind_adv											logical :: scm_wind_adv
logical :: scm_qv_adv											logical :: scm_qv_adv
logical :: scm_ql_adv											logical :: scm_ql_adv
logical :: scm_vert_adv											logical :: scm_vert_adv
integer :: num_force_soil_layers									integer :: num_force_soil_layers
logical :: scm_soilt_force										logical :: scm_soilt_force
logical :: scm_soilq_force										logical :: scm_soilq_force
logical :: scm_force_th_largescale									logical :: scm_force_th_largescale
logical :: scm_force_qv_largescale									logical :: scm_force_qv_largescale
logical :: scm_force_ql_largescale									logical :: scm_force_ql_largescale
logical :: scm_force_wind_largescale									logical :: scm_force_wind_largescale
integer :: scm_force_skintemp										integer :: scm_force_skintemp
integer :: scm_force_flux										integer :: scm_force_flux
integer :: dyn_opt											integer :: dyn_opt
integer :: rk_ord											integer :: rk_ord
integer :: w_damping											integer :: w_damping
integer :: diff_opt											integer :: diff_opt
integer :: diff_opt_dfi											integer :: diff_opt_dfi
integer :: km_opt											integer :: km_opt
integer :: km_opt_dfi											integer :: km_opt_dfi
integer :: damp_opt											integer :: damp_opt
integer :: rad_nudge											integer :: rad_nudge
integer :: gwd_opt											integer :: gwd_opt
real :: max_rot_angle_gwd									   <
real :: zdamp												real :: zdamp
real :: dampcoef											real :: dampcoef
real :: khdif												real :: khdif
real :: kvdif												real :: kvdif
real :: diff_6th_factor											real :: diff_6th_factor
integer :: diff_6th_opt											integer :: diff_6th_opt
integer :: use_theta_m											integer :: use_theta_m
integer :: use_q_diabatic										integer :: use_q_diabatic
real :: c_s												real :: c_s
real :: c_k												real :: c_k
real :: smdiv												real :: smdiv
real :: emdiv												real :: emdiv
real :: epssm												real :: epssm
logical :: non_hydrostatic										logical :: non_hydrostatic
logical :: use_input_w											logical :: use_input_w
integer :: time_step_sound										integer :: time_step_sound
integer :: h_mom_adv_order										integer :: h_mom_adv_order
integer :: v_mom_adv_order										integer :: v_mom_adv_order
integer :: h_sca_adv_order										integer :: h_sca_adv_order
integer :: v_sca_adv_order										integer :: v_sca_adv_order
integer :: momentum_adv_opt										integer :: momentum_adv_opt
integer :: moist_adv_opt										integer :: moist_adv_opt
integer :: moist_adv_dfi_opt										integer :: moist_adv_dfi_opt
integer :: chem_adv_opt											integer :: chem_adv_opt
integer :: tracer_adv_opt										integer :: tracer_adv_opt
integer :: scalar_adv_opt										integer :: scalar_adv_opt
integer :: tke_adv_opt											integer :: tke_adv_opt
logical :: top_radiation										logical :: top_radiation
integer :: mix_isotropic										integer :: mix_isotropic
real :: mix_upper_bound											real :: mix_upper_bound
logical :: top_lid											logical :: top_lid
real :: tke_upper_bound											real :: tke_upper_bound
real :: tke_drag_coefficient										real :: tke_drag_coefficient
real :: tke_heat_flux											real :: tke_heat_flux
logical :: pert_coriolis										logical :: pert_coriolis
logical :: coriolis2d											logical :: coriolis2d
logical :: mix_full_fields										logical :: mix_full_fields
real :: base_pres											real :: base_pres
real :: base_temp											real :: base_temp
real :: base_lapse											real :: base_lapse
real :: iso_temp											real :: iso_temp
real :: base_pres_strat											real :: base_pres_strat
real :: base_lapse_strat										real :: base_lapse_strat
logical :: use_baseparam_fr_nml										logical :: use_baseparam_fr_nml
real :: fft_filter_lat											real :: fft_filter_lat
logical :: coupled_filtering										logical :: coupled_filtering
logical :: pos_def											logical :: pos_def
logical :: swap_pole_with_next_j									logical :: swap_pole_with_next_j
logical :: actual_distance_average									logical :: actual_distance_average
logical :: rotated_pole											logical :: rotated_pole
logical :: do_coriolis											logical :: do_coriolis
logical :: do_curvature											logical :: do_curvature
logical :: do_gradp											logical :: do_gradp
integer :: tracer_opt											integer :: tracer_opt
integer :: tenddiag											integer :: tenddiag
integer :: spec_bdy_width										integer :: spec_bdy_width
integer :: spec_zone											integer :: spec_zone
integer :: relax_zone											integer :: relax_zone
logical :: specified											logical :: specified
logical :: constant_bc											logical :: constant_bc
logical :: periodic_x											logical :: periodic_x
logical :: symmetric_xs											logical :: symmetric_xs
logical :: symmetric_xe											logical :: symmetric_xe
logical :: open_xs											logical :: open_xs
logical :: open_xe											logical :: open_xe
logical :: periodic_y											logical :: periodic_y
logical :: symmetric_ys											logical :: symmetric_ys
logical :: symmetric_ye											logical :: symmetric_ye
logical :: open_ys											logical :: open_ys
logical :: open_ye											logical :: open_ye
logical :: polar											logical :: polar
logical :: nested											logical :: nested
real :: spec_exp											real :: spec_exp
integer :: spec_bdy_final_mu										integer :: spec_bdy_final_mu
integer :: real_data_init_type										integer :: real_data_init_type
logical :: have_bcs_moist										logical :: have_bcs_moist
logical :: have_bcs_scalar										logical :: have_bcs_scalar
integer :: background_proc_id										integer :: background_proc_id
integer :: forecast_proc_id										integer :: forecast_proc_id
integer :: production_status										integer :: production_status
integer :: compression											integer :: compression
integer :: nobs_ndg_vars										integer :: nobs_ndg_vars
integer :: nobs_err_flds										integer :: nobs_err_flds
real :: cen_lat												real :: cen_lat
real :: cen_lon												real :: cen_lon
real :: truelat1											real :: truelat1
real :: truelat2											real :: truelat2
real :: moad_cen_lat											real :: moad_cen_lat
real :: stand_lon											real :: stand_lon
real :: pole_lat											real :: pole_lat
real :: pole_lon											real :: pole_lon
integer :: flag_metgrid											integer :: flag_metgrid
integer :: flag_snow											integer :: flag_snow
integer :: flag_psfc											integer :: flag_psfc
integer :: flag_sm000010										integer :: flag_sm000010
integer :: flag_sm010040										integer :: flag_sm010040
integer :: flag_sm040100										integer :: flag_sm040100
integer :: flag_sm100200										integer :: flag_sm100200
integer :: flag_st000010										integer :: flag_st000010
integer :: flag_st010040										integer :: flag_st010040
integer :: flag_st040100										integer :: flag_st040100
integer :: flag_st100200										integer :: flag_st100200
integer :: flag_soil_layers										integer :: flag_soil_layers
integer :: flag_slp											integer :: flag_slp
integer :: flag_soilhgt											integer :: flag_soilhgt
integer :: flag_mf_xy											integer :: flag_mf_xy
integer :: flag_um_soil											integer :: flag_um_soil
real :: bdyfrq												real :: bdyfrq
character*256 :: mminlu											character*256 :: mminlu
integer :: iswater											integer :: iswater
integer :: islake											integer :: islake
integer :: isice											integer :: isice
integer :: isurban											integer :: isurban
integer :: isoilwater											integer :: isoilwater
integer :: map_proj											integer :: map_proj
integer :: use_wps_input										integer :: use_wps_input
integer :: dfi_stage											integer :: dfi_stage
integer :: mp_physics_dfi										integer :: mp_physics_dfi
integer :: bl_pbl_physics_dfi									   <
integer :: windfarm_opt											integer :: windfarm_opt
integer :: windfarm_ij											integer :: windfarm_ij
integer :: hailcast_opt										   <
integer :: lightning_option										integer :: lightning_option
real :: lightning_dt											real :: lightning_dt
real :: lightning_start_seconds										real :: lightning_start_seconds
real :: flashrate_factor										real :: flashrate_factor
integer :: iccg_method											integer :: iccg_method
real :: iccg_prescribed_num										real :: iccg_prescribed_num
real :: iccg_prescribed_den										real :: iccg_prescribed_den
integer :: cellcount_method										integer :: cellcount_method
real :: cldtop_adjustment										real :: cldtop_adjustment
integer :: sf_lake_physics										integer :: sf_lake_physics
character*256 :: auxinput1_inname									character*256 :: auxinput1_inname
integer :: io_form_auxinput1										integer :: io_form_auxinput1
logical :: override_restart_timers									logical :: override_restart_timers
character*256 :: auxhist1_inname									character*256 :: auxhist1_inname
character*256 :: auxhist1_outname									character*256 :: auxhist1_outname
integer :: auxhist1_interval_y										integer :: auxhist1_interval_y
integer :: auxhist1_interval_d										integer :: auxhist1_interval_d
integer :: auxhist1_interval_h										integer :: auxhist1_interval_h
integer :: auxhist1_interval_m										integer :: auxhist1_interval_m
integer :: auxhist1_interval_s										integer :: auxhist1_interval_s
integer :: auxhist1_interval										integer :: auxhist1_interval
integer :: auxhist1_begin_y										integer :: auxhist1_begin_y
integer :: auxhist1_begin_d										integer :: auxhist1_begin_d
integer :: auxhist1_begin_h										integer :: auxhist1_begin_h
integer :: auxhist1_begin_m										integer :: auxhist1_begin_m
integer :: auxhist1_begin_s										integer :: auxhist1_begin_s
integer :: auxhist1_begin										integer :: auxhist1_begin
integer :: auxhist1_end_y										integer :: auxhist1_end_y
integer :: auxhist1_end_d										integer :: auxhist1_end_d
integer :: auxhist1_end_h										integer :: auxhist1_end_h
integer :: auxhist1_end_m										integer :: auxhist1_end_m
integer :: auxhist1_end_s										integer :: auxhist1_end_s
integer :: auxhist1_end											integer :: auxhist1_end
integer :: io_form_auxhist1										integer :: io_form_auxhist1
integer :: frames_per_auxhist1										integer :: frames_per_auxhist1
character*256 :: auxhist2_inname									character*256 :: auxhist2_inname
character*256 :: auxhist2_outname									character*256 :: auxhist2_outname
integer :: auxhist2_interval_y										integer :: auxhist2_interval_y
integer :: auxhist2_interval_d										integer :: auxhist2_interval_d
integer :: auxhist2_interval_h										integer :: auxhist2_interval_h
integer :: auxhist2_interval_m										integer :: auxhist2_interval_m
integer :: auxhist2_interval_s										integer :: auxhist2_interval_s
integer :: auxhist2_interval										integer :: auxhist2_interval
integer :: auxhist2_begin_y										integer :: auxhist2_begin_y
integer :: auxhist2_begin_d										integer :: auxhist2_begin_d
integer :: auxhist2_begin_h										integer :: auxhist2_begin_h
integer :: auxhist2_begin_m										integer :: auxhist2_begin_m
integer :: auxhist2_begin_s										integer :: auxhist2_begin_s
integer :: auxhist2_begin										integer :: auxhist2_begin
integer :: auxhist2_end_y										integer :: auxhist2_end_y
integer :: auxhist2_end_d										integer :: auxhist2_end_d
integer :: auxhist2_end_h										integer :: auxhist2_end_h
integer :: auxhist2_end_m										integer :: auxhist2_end_m
integer :: auxhist2_end_s										integer :: auxhist2_end_s
integer :: auxhist2_end											integer :: auxhist2_end
integer :: io_form_auxhist2										integer :: io_form_auxhist2
integer :: frames_per_auxhist2										integer :: frames_per_auxhist2
character*256 :: auxhist3_inname									character*256 :: auxhist3_inname
character*256 :: auxhist3_outname									character*256 :: auxhist3_outname
integer :: auxhist3_interval_y										integer :: auxhist3_interval_y
integer :: auxhist3_interval_d										integer :: auxhist3_interval_d
integer :: auxhist3_interval_h										integer :: auxhist3_interval_h
integer :: auxhist3_interval_m										integer :: auxhist3_interval_m
integer :: auxhist3_interval_s										integer :: auxhist3_interval_s
integer :: auxhist3_interval										integer :: auxhist3_interval
integer :: auxhist3_begin_y										integer :: auxhist3_begin_y
integer :: auxhist3_begin_d										integer :: auxhist3_begin_d
integer :: auxhist3_begin_h										integer :: auxhist3_begin_h
integer :: auxhist3_begin_m										integer :: auxhist3_begin_m
integer :: auxhist3_begin_s										integer :: auxhist3_begin_s
integer :: auxhist3_begin										integer :: auxhist3_begin
integer :: auxhist3_end_y										integer :: auxhist3_end_y
integer :: auxhist3_end_d										integer :: auxhist3_end_d
integer :: auxhist3_end_h										integer :: auxhist3_end_h
integer :: auxhist3_end_m										integer :: auxhist3_end_m
integer :: auxhist3_end_s										integer :: auxhist3_end_s
integer :: auxhist3_end											integer :: auxhist3_end
integer :: io_form_auxhist3										integer :: io_form_auxhist3
integer :: frames_per_auxhist3										integer :: frames_per_auxhist3
character*256 :: auxhist4_inname									character*256 :: auxhist4_inname
character*256 :: auxhist4_outname									character*256 :: auxhist4_outname
integer :: auxhist4_interval_y										integer :: auxhist4_interval_y
integer :: auxhist4_interval_d										integer :: auxhist4_interval_d
integer :: auxhist4_interval_h										integer :: auxhist4_interval_h
integer :: auxhist4_interval_m										integer :: auxhist4_interval_m
integer :: auxhist4_interval_s										integer :: auxhist4_interval_s
integer :: auxhist4_interval										integer :: auxhist4_interval
integer :: auxhist4_begin_y										integer :: auxhist4_begin_y
integer :: auxhist4_begin_d										integer :: auxhist4_begin_d
integer :: auxhist4_begin_h										integer :: auxhist4_begin_h
integer :: auxhist4_begin_m										integer :: auxhist4_begin_m
integer :: auxhist4_begin_s										integer :: auxhist4_begin_s
integer :: auxhist4_begin										integer :: auxhist4_begin
integer :: auxhist4_end_y										integer :: auxhist4_end_y
integer :: auxhist4_end_d										integer :: auxhist4_end_d
integer :: auxhist4_end_h										integer :: auxhist4_end_h
integer :: auxhist4_end_m										integer :: auxhist4_end_m
integer :: auxhist4_end_s										integer :: auxhist4_end_s
integer :: auxhist4_end											integer :: auxhist4_end
integer :: io_form_auxhist4										integer :: io_form_auxhist4
integer :: frames_per_auxhist4										integer :: frames_per_auxhist4
character*256 :: auxhist5_inname									character*256 :: auxhist5_inname
character*256 :: auxhist5_outname									character*256 :: auxhist5_outname
integer :: auxhist5_interval_y										integer :: auxhist5_interval_y
integer :: auxhist5_interval_d										integer :: auxhist5_interval_d
integer :: auxhist5_interval_h										integer :: auxhist5_interval_h
integer :: auxhist5_interval_m										integer :: auxhist5_interval_m
integer :: auxhist5_interval_s										integer :: auxhist5_interval_s
integer :: auxhist5_interval										integer :: auxhist5_interval
integer :: auxhist5_begin_y										integer :: auxhist5_begin_y
integer :: auxhist5_begin_d										integer :: auxhist5_begin_d
integer :: auxhist5_begin_h										integer :: auxhist5_begin_h
integer :: auxhist5_begin_m										integer :: auxhist5_begin_m
integer :: auxhist5_begin_s										integer :: auxhist5_begin_s
integer :: auxhist5_begin										integer :: auxhist5_begin
integer :: auxhist5_end_y										integer :: auxhist5_end_y
integer :: auxhist5_end_d										integer :: auxhist5_end_d
integer :: auxhist5_end_h										integer :: auxhist5_end_h
integer :: auxhist5_end_m										integer :: auxhist5_end_m
integer :: auxhist5_end_s										integer :: auxhist5_end_s
integer :: auxhist5_end											integer :: auxhist5_end
integer :: io_form_auxhist5										integer :: io_form_auxhist5
integer :: frames_per_auxhist5										integer :: frames_per_auxhist5
character*256 :: auxhist6_inname									character*256 :: auxhist6_inname
character*256 :: auxhist6_outname									character*256 :: auxhist6_outname
integer :: auxhist6_interval_y										integer :: auxhist6_interval_y
integer :: auxhist6_interval_d										integer :: auxhist6_interval_d
integer :: auxhist6_interval_h										integer :: auxhist6_interval_h
integer :: auxhist6_interval_m										integer :: auxhist6_interval_m
integer :: auxhist6_interval_s										integer :: auxhist6_interval_s
integer :: auxhist6_interval										integer :: auxhist6_interval
integer :: auxhist6_begin_y										integer :: auxhist6_begin_y
integer :: auxhist6_begin_d										integer :: auxhist6_begin_d
integer :: auxhist6_begin_h										integer :: auxhist6_begin_h
integer :: auxhist6_begin_m										integer :: auxhist6_begin_m
integer :: auxhist6_begin_s										integer :: auxhist6_begin_s
integer :: auxhist6_begin										integer :: auxhist6_begin
integer :: auxhist6_end_y										integer :: auxhist6_end_y
integer :: auxhist6_end_d										integer :: auxhist6_end_d
integer :: auxhist6_end_h										integer :: auxhist6_end_h
integer :: auxhist6_end_m										integer :: auxhist6_end_m
integer :: auxhist6_end_s										integer :: auxhist6_end_s
integer :: auxhist6_end											integer :: auxhist6_end
integer :: io_form_auxhist6										integer :: io_form_auxhist6
integer :: frames_per_auxhist6										integer :: frames_per_auxhist6
character*256 :: auxhist7_inname									character*256 :: auxhist7_inname
character*256 :: auxhist7_outname									character*256 :: auxhist7_outname
integer :: auxhist7_interval_y										integer :: auxhist7_interval_y
integer :: auxhist7_interval_d										integer :: auxhist7_interval_d
integer :: auxhist7_interval_h										integer :: auxhist7_interval_h
integer :: auxhist7_interval_m										integer :: auxhist7_interval_m
integer :: auxhist7_interval_s										integer :: auxhist7_interval_s
integer :: auxhist7_interval										integer :: auxhist7_interval
integer :: auxhist7_begin_y										integer :: auxhist7_begin_y
integer :: auxhist7_begin_d										integer :: auxhist7_begin_d
integer :: auxhist7_begin_h										integer :: auxhist7_begin_h
integer :: auxhist7_begin_m										integer :: auxhist7_begin_m
integer :: auxhist7_begin_s										integer :: auxhist7_begin_s
integer :: auxhist7_begin										integer :: auxhist7_begin
integer :: auxhist7_end_y										integer :: auxhist7_end_y
integer :: auxhist7_end_d										integer :: auxhist7_end_d
integer :: auxhist7_end_h										integer :: auxhist7_end_h
integer :: auxhist7_end_m										integer :: auxhist7_end_m
integer :: auxhist7_end_s										integer :: auxhist7_end_s
integer :: auxhist7_end											integer :: auxhist7_end
integer :: io_form_auxhist7										integer :: io_form_auxhist7
integer :: frames_per_auxhist7										integer :: frames_per_auxhist7
character*256 :: auxhist8_inname									character*256 :: auxhist8_inname
character*256 :: auxhist8_outname									character*256 :: auxhist8_outname
integer :: auxhist8_interval_y										integer :: auxhist8_interval_y
integer :: auxhist8_interval_d										integer :: auxhist8_interval_d
integer :: auxhist8_interval_h										integer :: auxhist8_interval_h
integer :: auxhist8_interval_m										integer :: auxhist8_interval_m
integer :: auxhist8_interval_s										integer :: auxhist8_interval_s
integer :: auxhist8_interval										integer :: auxhist8_interval
integer :: auxhist8_begin_y										integer :: auxhist8_begin_y
integer :: auxhist8_begin_d										integer :: auxhist8_begin_d
integer :: auxhist8_begin_h										integer :: auxhist8_begin_h
integer :: auxhist8_begin_m										integer :: auxhist8_begin_m
integer :: auxhist8_begin_s										integer :: auxhist8_begin_s
integer :: auxhist8_begin										integer :: auxhist8_begin
integer :: auxhist8_end_y										integer :: auxhist8_end_y
integer :: auxhist8_end_d										integer :: auxhist8_end_d
integer :: auxhist8_end_h										integer :: auxhist8_end_h
integer :: auxhist8_end_m										integer :: auxhist8_end_m
integer :: auxhist8_end_s										integer :: auxhist8_end_s
integer :: auxhist8_end											integer :: auxhist8_end
integer :: io_form_auxhist8										integer :: io_form_auxhist8
integer :: frames_per_auxhist8										integer :: frames_per_auxhist8
character*256 :: auxhist9_inname									character*256 :: auxhist9_inname
character*256 :: auxhist9_outname									character*256 :: auxhist9_outname
integer :: auxhist9_interval_y										integer :: auxhist9_interval_y
integer :: auxhist9_interval_d										integer :: auxhist9_interval_d
integer :: auxhist9_interval_h										integer :: auxhist9_interval_h
integer :: auxhist9_interval_m										integer :: auxhist9_interval_m
integer :: auxhist9_interval_s										integer :: auxhist9_interval_s
integer :: auxhist9_interval										integer :: auxhist9_interval
integer :: auxhist9_begin_y										integer :: auxhist9_begin_y
integer :: auxhist9_begin_d										integer :: auxhist9_begin_d
integer :: auxhist9_begin_h										integer :: auxhist9_begin_h
integer :: auxhist9_begin_m										integer :: auxhist9_begin_m
integer :: auxhist9_begin_s										integer :: auxhist9_begin_s
integer :: auxhist9_begin										integer :: auxhist9_begin
integer :: auxhist9_end_y										integer :: auxhist9_end_y
integer :: auxhist9_end_d										integer :: auxhist9_end_d
integer :: auxhist9_end_h										integer :: auxhist9_end_h
integer :: auxhist9_end_m										integer :: auxhist9_end_m
integer :: auxhist9_end_s										integer :: auxhist9_end_s
integer :: auxhist9_end											integer :: auxhist9_end
integer :: io_form_auxhist9										integer :: io_form_auxhist9
integer :: frames_per_auxhist9										integer :: frames_per_auxhist9
character*256 :: auxhist10_inname									character*256 :: auxhist10_inname
character*256 :: auxhist10_outname									character*256 :: auxhist10_outname
integer :: auxhist10_interval_y										integer :: auxhist10_interval_y
integer :: auxhist10_interval_d										integer :: auxhist10_interval_d
integer :: auxhist10_interval_h										integer :: auxhist10_interval_h
integer :: auxhist10_interval_m										integer :: auxhist10_interval_m
integer :: auxhist10_interval_s										integer :: auxhist10_interval_s
integer :: auxhist10_interval										integer :: auxhist10_interval
integer :: auxhist10_begin_y										integer :: auxhist10_begin_y
integer :: auxhist10_begin_d										integer :: auxhist10_begin_d
integer :: auxhist10_begin_h										integer :: auxhist10_begin_h
integer :: auxhist10_begin_m										integer :: auxhist10_begin_m
integer :: auxhist10_begin_s										integer :: auxhist10_begin_s
integer :: auxhist10_begin										integer :: auxhist10_begin
integer :: auxhist10_end_y										integer :: auxhist10_end_y
integer :: auxhist10_end_d										integer :: auxhist10_end_d
integer :: auxhist10_end_h										integer :: auxhist10_end_h
integer :: auxhist10_end_m										integer :: auxhist10_end_m
integer :: auxhist10_end_s										integer :: auxhist10_end_s
integer :: auxhist10_end										integer :: auxhist10_end
integer :: io_form_auxhist10										integer :: io_form_auxhist10
integer :: frames_per_auxhist10										integer :: frames_per_auxhist10
character*256 :: auxhist11_inname									character*256 :: auxhist11_inname
character*256 :: auxhist11_outname									character*256 :: auxhist11_outname
integer :: auxhist11_interval_y										integer :: auxhist11_interval_y
integer :: auxhist11_interval_d										integer :: auxhist11_interval_d
integer :: auxhist11_interval_h										integer :: auxhist11_interval_h
integer :: auxhist11_interval_m										integer :: auxhist11_interval_m
integer :: auxhist11_interval_s										integer :: auxhist11_interval_s
integer :: auxhist11_interval										integer :: auxhist11_interval
integer :: auxhist11_begin_y										integer :: auxhist11_begin_y
integer :: auxhist11_begin_d										integer :: auxhist11_begin_d
integer :: auxhist11_begin_h										integer :: auxhist11_begin_h
integer :: auxhist11_begin_m										integer :: auxhist11_begin_m
integer :: auxhist11_begin_s										integer :: auxhist11_begin_s
integer :: auxhist11_begin										integer :: auxhist11_begin
integer :: auxhist11_end_y										integer :: auxhist11_end_y
integer :: auxhist11_end_d										integer :: auxhist11_end_d
integer :: auxhist11_end_h										integer :: auxhist11_end_h
integer :: auxhist11_end_m										integer :: auxhist11_end_m
integer :: auxhist11_end_s										integer :: auxhist11_end_s
integer :: auxhist11_end										integer :: auxhist11_end
integer :: io_form_auxhist11										integer :: io_form_auxhist11
integer :: frames_per_auxhist11										integer :: frames_per_auxhist11
character*256 :: auxhist12_inname									character*256 :: auxhist12_inname
character*256 :: auxhist12_outname									character*256 :: auxhist12_outname
integer :: auxhist12_interval_y										integer :: auxhist12_interval_y
integer :: auxhist12_interval_d										integer :: auxhist12_interval_d
integer :: auxhist12_interval_h										integer :: auxhist12_interval_h
integer :: auxhist12_interval_m										integer :: auxhist12_interval_m
integer :: auxhist12_interval_s										integer :: auxhist12_interval_s
integer :: auxhist12_interval										integer :: auxhist12_interval
integer :: auxhist12_begin_y										integer :: auxhist12_begin_y
integer :: auxhist12_begin_d										integer :: auxhist12_begin_d
integer :: auxhist12_begin_h										integer :: auxhist12_begin_h
integer :: auxhist12_begin_m										integer :: auxhist12_begin_m
integer :: auxhist12_begin_s										integer :: auxhist12_begin_s
integer :: auxhist12_begin										integer :: auxhist12_begin
integer :: auxhist12_end_y										integer :: auxhist12_end_y
integer :: auxhist12_end_d										integer :: auxhist12_end_d
integer :: auxhist12_end_h										integer :: auxhist12_end_h
integer :: auxhist12_end_m										integer :: auxhist12_end_m
integer :: auxhist12_end_s										integer :: auxhist12_end_s
integer :: auxhist12_end										integer :: auxhist12_end
integer :: io_form_auxhist12										integer :: io_form_auxhist12
integer :: frames_per_auxhist12										integer :: frames_per_auxhist12
character*256 :: auxhist13_inname									character*256 :: auxhist13_inname
character*256 :: auxhist13_outname									character*256 :: auxhist13_outname
integer :: auxhist13_interval_y										integer :: auxhist13_interval_y
integer :: auxhist13_interval_d										integer :: auxhist13_interval_d
integer :: auxhist13_interval_h										integer :: auxhist13_interval_h
integer :: auxhist13_interval_m										integer :: auxhist13_interval_m
integer :: auxhist13_interval_s										integer :: auxhist13_interval_s
integer :: auxhist13_interval										integer :: auxhist13_interval
integer :: auxhist13_begin_y										integer :: auxhist13_begin_y
integer :: auxhist13_begin_d										integer :: auxhist13_begin_d
integer :: auxhist13_begin_h										integer :: auxhist13_begin_h
integer :: auxhist13_begin_m										integer :: auxhist13_begin_m
integer :: auxhist13_begin_s										integer :: auxhist13_begin_s
integer :: auxhist13_begin										integer :: auxhist13_begin
integer :: auxhist13_end_y										integer :: auxhist13_end_y
integer :: auxhist13_end_d										integer :: auxhist13_end_d
integer :: auxhist13_end_h										integer :: auxhist13_end_h
integer :: auxhist13_end_m										integer :: auxhist13_end_m
integer :: auxhist13_end_s										integer :: auxhist13_end_s
integer :: auxhist13_end										integer :: auxhist13_end
integer :: io_form_auxhist13										integer :: io_form_auxhist13
integer :: frames_per_auxhist13										integer :: frames_per_auxhist13
character*256 :: auxhist14_inname									character*256 :: auxhist14_inname
character*256 :: auxhist14_outname									character*256 :: auxhist14_outname
integer :: auxhist14_interval_y										integer :: auxhist14_interval_y
integer :: auxhist14_interval_d										integer :: auxhist14_interval_d
integer :: auxhist14_interval_h										integer :: auxhist14_interval_h
integer :: auxhist14_interval_m										integer :: auxhist14_interval_m
integer :: auxhist14_interval_s										integer :: auxhist14_interval_s
integer :: auxhist14_interval										integer :: auxhist14_interval
integer :: auxhist14_begin_y										integer :: auxhist14_begin_y
integer :: auxhist14_begin_d										integer :: auxhist14_begin_d
integer :: auxhist14_begin_h										integer :: auxhist14_begin_h
integer :: auxhist14_begin_m										integer :: auxhist14_begin_m
integer :: auxhist14_begin_s										integer :: auxhist14_begin_s
integer :: auxhist14_begin										integer :: auxhist14_begin
integer :: auxhist14_end_y										integer :: auxhist14_end_y
integer :: auxhist14_end_d										integer :: auxhist14_end_d
integer :: auxhist14_end_h										integer :: auxhist14_end_h
integer :: auxhist14_end_m										integer :: auxhist14_end_m
integer :: auxhist14_end_s										integer :: auxhist14_end_s
integer :: auxhist14_end										integer :: auxhist14_end
integer :: io_form_auxhist14										integer :: io_form_auxhist14
integer :: frames_per_auxhist14										integer :: frames_per_auxhist14
character*256 :: auxhist15_inname									character*256 :: auxhist15_inname
character*256 :: auxhist15_outname									character*256 :: auxhist15_outname
integer :: auxhist15_interval_y										integer :: auxhist15_interval_y
integer :: auxhist15_interval_d										integer :: auxhist15_interval_d
integer :: auxhist15_interval_h										integer :: auxhist15_interval_h
integer :: auxhist15_interval_m										integer :: auxhist15_interval_m
integer :: auxhist15_interval_s										integer :: auxhist15_interval_s
integer :: auxhist15_interval										integer :: auxhist15_interval
integer :: auxhist15_begin_y										integer :: auxhist15_begin_y
integer :: auxhist15_begin_d										integer :: auxhist15_begin_d
integer :: auxhist15_begin_h										integer :: auxhist15_begin_h
integer :: auxhist15_begin_m										integer :: auxhist15_begin_m
integer :: auxhist15_begin_s										integer :: auxhist15_begin_s
integer :: auxhist15_begin										integer :: auxhist15_begin
integer :: auxhist15_end_y										integer :: auxhist15_end_y
integer :: auxhist15_end_d										integer :: auxhist15_end_d
integer :: auxhist15_end_h										integer :: auxhist15_end_h
integer :: auxhist15_end_m										integer :: auxhist15_end_m
integer :: auxhist15_end_s										integer :: auxhist15_end_s
integer :: auxhist15_end										integer :: auxhist15_end
integer :: io_form_auxhist15										integer :: io_form_auxhist15
integer :: frames_per_auxhist15										integer :: frames_per_auxhist15
character*256 :: auxhist16_inname									character*256 :: auxhist16_inname
character*256 :: auxhist16_outname									character*256 :: auxhist16_outname
integer :: auxhist16_interval_y										integer :: auxhist16_interval_y
integer :: auxhist16_interval_d										integer :: auxhist16_interval_d
integer :: auxhist16_interval_h										integer :: auxhist16_interval_h
integer :: auxhist16_interval_m										integer :: auxhist16_interval_m
integer :: auxhist16_interval_s										integer :: auxhist16_interval_s
integer :: auxhist16_interval										integer :: auxhist16_interval
integer :: auxhist16_begin_y										integer :: auxhist16_begin_y
integer :: auxhist16_begin_d										integer :: auxhist16_begin_d
integer :: auxhist16_begin_h										integer :: auxhist16_begin_h
integer :: auxhist16_begin_m										integer :: auxhist16_begin_m
integer :: auxhist16_begin_s										integer :: auxhist16_begin_s
integer :: auxhist16_begin										integer :: auxhist16_begin
integer :: auxhist16_end_y										integer :: auxhist16_end_y
integer :: auxhist16_end_d										integer :: auxhist16_end_d
integer :: auxhist16_end_h										integer :: auxhist16_end_h
integer :: auxhist16_end_m										integer :: auxhist16_end_m
integer :: auxhist16_end_s										integer :: auxhist16_end_s
integer :: auxhist16_end										integer :: auxhist16_end
integer :: io_form_auxhist16										integer :: io_form_auxhist16
integer :: frames_per_auxhist16										integer :: frames_per_auxhist16
character*256 :: auxhist17_inname									character*256 :: auxhist17_inname
character*256 :: auxhist17_outname									character*256 :: auxhist17_outname
integer :: auxhist17_interval_y										integer :: auxhist17_interval_y
integer :: auxhist17_interval_d										integer :: auxhist17_interval_d
integer :: auxhist17_interval_h										integer :: auxhist17_interval_h
integer :: auxhist17_interval_m										integer :: auxhist17_interval_m
integer :: auxhist17_interval_s										integer :: auxhist17_interval_s
integer :: auxhist17_interval										integer :: auxhist17_interval
integer :: auxhist17_begin_y										integer :: auxhist17_begin_y
integer :: auxhist17_begin_d										integer :: auxhist17_begin_d
integer :: auxhist17_begin_h										integer :: auxhist17_begin_h
integer :: auxhist17_begin_m										integer :: auxhist17_begin_m
integer :: auxhist17_begin_s										integer :: auxhist17_begin_s
integer :: auxhist17_begin										integer :: auxhist17_begin
integer :: auxhist17_end_y										integer :: auxhist17_end_y
integer :: auxhist17_end_d										integer :: auxhist17_end_d
integer :: auxhist17_end_h										integer :: auxhist17_end_h
integer :: auxhist17_end_m										integer :: auxhist17_end_m
integer :: auxhist17_end_s										integer :: auxhist17_end_s
integer :: auxhist17_end										integer :: auxhist17_end
integer :: io_form_auxhist17										integer :: io_form_auxhist17
integer :: frames_per_auxhist17										integer :: frames_per_auxhist17
character*256 :: auxhist18_inname									character*256 :: auxhist18_inname
character*256 :: auxhist18_outname									character*256 :: auxhist18_outname
integer :: auxhist18_interval_y										integer :: auxhist18_interval_y
integer :: auxhist18_interval_d										integer :: auxhist18_interval_d
integer :: auxhist18_interval_h										integer :: auxhist18_interval_h
integer :: auxhist18_interval_m										integer :: auxhist18_interval_m
integer :: auxhist18_interval_s										integer :: auxhist18_interval_s
integer :: auxhist18_interval										integer :: auxhist18_interval
integer :: auxhist18_begin_y										integer :: auxhist18_begin_y
integer :: auxhist18_begin_d										integer :: auxhist18_begin_d
integer :: auxhist18_begin_h										integer :: auxhist18_begin_h
integer :: auxhist18_begin_m										integer :: auxhist18_begin_m
integer :: auxhist18_begin_s										integer :: auxhist18_begin_s
integer :: auxhist18_begin										integer :: auxhist18_begin
integer :: auxhist18_end_y										integer :: auxhist18_end_y
integer :: auxhist18_end_d										integer :: auxhist18_end_d
integer :: auxhist18_end_h										integer :: auxhist18_end_h
integer :: auxhist18_end_m										integer :: auxhist18_end_m
integer :: auxhist18_end_s										integer :: auxhist18_end_s
integer :: auxhist18_end										integer :: auxhist18_end
integer :: io_form_auxhist18										integer :: io_form_auxhist18
integer :: frames_per_auxhist18										integer :: frames_per_auxhist18
character*256 :: auxhist19_inname									character*256 :: auxhist19_inname
character*256 :: auxhist19_outname									character*256 :: auxhist19_outname
integer :: auxhist19_interval_y										integer :: auxhist19_interval_y
integer :: auxhist19_interval_d										integer :: auxhist19_interval_d
integer :: auxhist19_interval_h										integer :: auxhist19_interval_h
integer :: auxhist19_interval_m										integer :: auxhist19_interval_m
integer :: auxhist19_interval_s										integer :: auxhist19_interval_s
integer :: auxhist19_interval										integer :: auxhist19_interval
integer :: auxhist19_begin_y										integer :: auxhist19_begin_y
integer :: auxhist19_begin_d										integer :: auxhist19_begin_d
integer :: auxhist19_begin_h										integer :: auxhist19_begin_h
integer :: auxhist19_begin_m										integer :: auxhist19_begin_m
integer :: auxhist19_begin_s										integer :: auxhist19_begin_s
integer :: auxhist19_begin										integer :: auxhist19_begin
integer :: auxhist19_end_y										integer :: auxhist19_end_y
integer :: auxhist19_end_d										integer :: auxhist19_end_d
integer :: auxhist19_end_h										integer :: auxhist19_end_h
integer :: auxhist19_end_m										integer :: auxhist19_end_m
integer :: auxhist19_end_s										integer :: auxhist19_end_s
integer :: auxhist19_end										integer :: auxhist19_end
integer :: io_form_auxhist19										integer :: io_form_auxhist19
integer :: frames_per_auxhist19										integer :: frames_per_auxhist19
character*256 :: auxhist20_inname									character*256 :: auxhist20_inname
character*256 :: auxhist20_outname									character*256 :: auxhist20_outname
integer :: auxhist20_interval_y										integer :: auxhist20_interval_y
integer :: auxhist20_interval_d										integer :: auxhist20_interval_d
integer :: auxhist20_interval_h										integer :: auxhist20_interval_h
integer :: auxhist20_interval_m										integer :: auxhist20_interval_m
integer :: auxhist20_interval_s										integer :: auxhist20_interval_s
integer :: auxhist20_interval										integer :: auxhist20_interval
integer :: auxhist20_begin_y										integer :: auxhist20_begin_y
integer :: auxhist20_begin_d										integer :: auxhist20_begin_d
integer :: auxhist20_begin_h										integer :: auxhist20_begin_h
integer :: auxhist20_begin_m										integer :: auxhist20_begin_m
integer :: auxhist20_begin_s										integer :: auxhist20_begin_s
integer :: auxhist20_begin										integer :: auxhist20_begin
integer :: auxhist20_end_y										integer :: auxhist20_end_y
integer :: auxhist20_end_d										integer :: auxhist20_end_d
integer :: auxhist20_end_h										integer :: auxhist20_end_h
integer :: auxhist20_end_m										integer :: auxhist20_end_m
integer :: auxhist20_end_s										integer :: auxhist20_end_s
integer :: auxhist20_end										integer :: auxhist20_end
integer :: io_form_auxhist20										integer :: io_form_auxhist20
integer :: frames_per_auxhist20										integer :: frames_per_auxhist20
character*256 :: auxhist21_inname									character*256 :: auxhist21_inname
character*256 :: auxhist21_outname									character*256 :: auxhist21_outname
integer :: auxhist21_interval_y										integer :: auxhist21_interval_y
integer :: auxhist21_interval_d										integer :: auxhist21_interval_d
integer :: auxhist21_interval_h										integer :: auxhist21_interval_h
integer :: auxhist21_interval_m										integer :: auxhist21_interval_m
integer :: auxhist21_interval_s										integer :: auxhist21_interval_s
integer :: auxhist21_interval										integer :: auxhist21_interval
integer :: auxhist21_begin_y										integer :: auxhist21_begin_y
integer :: auxhist21_begin_d										integer :: auxhist21_begin_d
integer :: auxhist21_begin_h										integer :: auxhist21_begin_h
integer :: auxhist21_begin_m										integer :: auxhist21_begin_m
integer :: auxhist21_begin_s										integer :: auxhist21_begin_s
integer :: auxhist21_begin										integer :: auxhist21_begin
integer :: auxhist21_end_y										integer :: auxhist21_end_y
integer :: auxhist21_end_d										integer :: auxhist21_end_d
integer :: auxhist21_end_h										integer :: auxhist21_end_h
integer :: auxhist21_end_m										integer :: auxhist21_end_m
integer :: auxhist21_end_s										integer :: auxhist21_end_s
integer :: auxhist21_end										integer :: auxhist21_end
integer :: io_form_auxhist21										integer :: io_form_auxhist21
integer :: frames_per_auxhist21										integer :: frames_per_auxhist21
character*256 :: auxhist22_inname									character*256 :: auxhist22_inname
character*256 :: auxhist22_outname									character*256 :: auxhist22_outname
integer :: auxhist22_interval_y										integer :: auxhist22_interval_y
integer :: auxhist22_interval_d										integer :: auxhist22_interval_d
integer :: auxhist22_interval_h										integer :: auxhist22_interval_h
integer :: auxhist22_interval_m										integer :: auxhist22_interval_m
integer :: auxhist22_interval_s										integer :: auxhist22_interval_s
integer :: auxhist22_interval										integer :: auxhist22_interval
integer :: auxhist22_begin_y										integer :: auxhist22_begin_y
integer :: auxhist22_begin_d										integer :: auxhist22_begin_d
integer :: auxhist22_begin_h										integer :: auxhist22_begin_h
integer :: auxhist22_begin_m										integer :: auxhist22_begin_m
integer :: auxhist22_begin_s										integer :: auxhist22_begin_s
integer :: auxhist22_begin										integer :: auxhist22_begin
integer :: auxhist22_end_y										integer :: auxhist22_end_y
integer :: auxhist22_end_d										integer :: auxhist22_end_d
integer :: auxhist22_end_h										integer :: auxhist22_end_h
integer :: auxhist22_end_m										integer :: auxhist22_end_m
integer :: auxhist22_end_s										integer :: auxhist22_end_s
integer :: auxhist22_end										integer :: auxhist22_end
integer :: io_form_auxhist22										integer :: io_form_auxhist22
integer :: frames_per_auxhist22										integer :: frames_per_auxhist22
character*256 :: auxhist23_inname									character*256 :: auxhist23_inname
character*256 :: auxhist23_outname									character*256 :: auxhist23_outname
integer :: auxhist23_interval_y										integer :: auxhist23_interval_y
integer :: auxhist23_interval_d										integer :: auxhist23_interval_d
integer :: auxhist23_interval_h										integer :: auxhist23_interval_h
integer :: auxhist23_interval_m										integer :: auxhist23_interval_m
integer :: auxhist23_interval_s										integer :: auxhist23_interval_s
integer :: auxhist23_interval										integer :: auxhist23_interval
integer :: auxhist23_begin_y										integer :: auxhist23_begin_y
integer :: auxhist23_begin_d										integer :: auxhist23_begin_d
integer :: auxhist23_begin_h										integer :: auxhist23_begin_h
integer :: auxhist23_begin_m										integer :: auxhist23_begin_m
integer :: auxhist23_begin_s										integer :: auxhist23_begin_s
integer :: auxhist23_begin										integer :: auxhist23_begin
integer :: auxhist23_end_y										integer :: auxhist23_end_y
integer :: auxhist23_end_d										integer :: auxhist23_end_d
integer :: auxhist23_end_h										integer :: auxhist23_end_h
integer :: auxhist23_end_m										integer :: auxhist23_end_m
integer :: auxhist23_end_s										integer :: auxhist23_end_s
integer :: auxhist23_end										integer :: auxhist23_end
integer :: io_form_auxhist23										integer :: io_form_auxhist23
integer :: frames_per_auxhist23										integer :: frames_per_auxhist23
character*256 :: auxhist24_inname									character*256 :: auxhist24_inname
character*256 :: auxhist24_outname									character*256 :: auxhist24_outname
integer :: auxhist24_interval_y										integer :: auxhist24_interval_y
integer :: auxhist24_interval_d										integer :: auxhist24_interval_d
integer :: auxhist24_interval_h										integer :: auxhist24_interval_h
integer :: auxhist24_interval_m										integer :: auxhist24_interval_m
integer :: auxhist24_interval_s										integer :: auxhist24_interval_s
integer :: auxhist24_interval										integer :: auxhist24_interval
integer :: auxhist24_begin_y										integer :: auxhist24_begin_y
integer :: auxhist24_begin_d										integer :: auxhist24_begin_d
integer :: auxhist24_begin_h										integer :: auxhist24_begin_h
integer :: auxhist24_begin_m										integer :: auxhist24_begin_m
integer :: auxhist24_begin_s										integer :: auxhist24_begin_s
integer :: auxhist24_begin										integer :: auxhist24_begin
integer :: auxhist24_end_y										integer :: auxhist24_end_y
integer :: auxhist24_end_d										integer :: auxhist24_end_d
integer :: auxhist24_end_h										integer :: auxhist24_end_h
integer :: auxhist24_end_m										integer :: auxhist24_end_m
integer :: auxhist24_end_s										integer :: auxhist24_end_s
integer :: auxhist24_end										integer :: auxhist24_end
integer :: io_form_auxhist24										integer :: io_form_auxhist24
integer :: frames_per_auxhist24										integer :: frames_per_auxhist24
character*256 :: auxinput1_outname									character*256 :: auxinput1_outname
integer :: auxinput1_interval_y										integer :: auxinput1_interval_y
integer :: auxinput1_interval_d										integer :: auxinput1_interval_d
integer :: auxinput1_interval_h										integer :: auxinput1_interval_h
integer :: auxinput1_interval_m										integer :: auxinput1_interval_m
integer :: auxinput1_interval_s										integer :: auxinput1_interval_s
integer :: auxinput1_interval										integer :: auxinput1_interval
integer :: auxinput1_begin_y										integer :: auxinput1_begin_y
integer :: auxinput1_begin_d										integer :: auxinput1_begin_d
integer :: auxinput1_begin_h										integer :: auxinput1_begin_h
integer :: auxinput1_begin_m										integer :: auxinput1_begin_m
integer :: auxinput1_begin_s										integer :: auxinput1_begin_s
integer :: auxinput1_begin										integer :: auxinput1_begin
integer :: auxinput1_end_y										integer :: auxinput1_end_y
integer :: auxinput1_end_d										integer :: auxinput1_end_d
integer :: auxinput1_end_h										integer :: auxinput1_end_h
integer :: auxinput1_end_m										integer :: auxinput1_end_m
integer :: auxinput1_end_s										integer :: auxinput1_end_s
integer :: auxinput1_end										integer :: auxinput1_end
integer :: frames_per_auxinput1										integer :: frames_per_auxinput1
character*256 :: auxinput2_inname									character*256 :: auxinput2_inname
character*256 :: auxinput2_outname									character*256 :: auxinput2_outname
integer :: auxinput2_interval_y										integer :: auxinput2_interval_y
integer :: auxinput2_interval_d										integer :: auxinput2_interval_d
integer :: auxinput2_interval_h										integer :: auxinput2_interval_h
integer :: auxinput2_interval_m										integer :: auxinput2_interval_m
integer :: auxinput2_interval_s										integer :: auxinput2_interval_s
integer :: auxinput2_interval										integer :: auxinput2_interval
integer :: auxinput2_begin_y										integer :: auxinput2_begin_y
integer :: auxinput2_begin_d										integer :: auxinput2_begin_d
integer :: auxinput2_begin_h										integer :: auxinput2_begin_h
integer :: auxinput2_begin_m										integer :: auxinput2_begin_m
integer :: auxinput2_begin_s										integer :: auxinput2_begin_s
integer :: auxinput2_begin										integer :: auxinput2_begin
integer :: auxinput2_end_y										integer :: auxinput2_end_y
integer :: auxinput2_end_d										integer :: auxinput2_end_d
integer :: auxinput2_end_h										integer :: auxinput2_end_h
integer :: auxinput2_end_m										integer :: auxinput2_end_m
integer :: auxinput2_end_s										integer :: auxinput2_end_s
integer :: auxinput2_end										integer :: auxinput2_end
integer :: io_form_auxinput2										integer :: io_form_auxinput2
integer :: frames_per_auxinput2										integer :: frames_per_auxinput2
character*256 :: auxinput3_inname									character*256 :: auxinput3_inname
character*256 :: auxinput3_outname									character*256 :: auxinput3_outname
integer :: auxinput3_interval_y										integer :: auxinput3_interval_y
integer :: auxinput3_interval_d										integer :: auxinput3_interval_d
integer :: auxinput3_interval_h										integer :: auxinput3_interval_h
integer :: auxinput3_interval_m										integer :: auxinput3_interval_m
integer :: auxinput3_interval_s										integer :: auxinput3_interval_s
integer :: auxinput3_interval										integer :: auxinput3_interval
integer :: auxinput3_begin_y										integer :: auxinput3_begin_y
integer :: auxinput3_begin_d										integer :: auxinput3_begin_d
integer :: auxinput3_begin_h										integer :: auxinput3_begin_h
integer :: auxinput3_begin_m										integer :: auxinput3_begin_m
integer :: auxinput3_begin_s										integer :: auxinput3_begin_s
integer :: auxinput3_begin										integer :: auxinput3_begin
integer :: auxinput3_end_y										integer :: auxinput3_end_y
integer :: auxinput3_end_d										integer :: auxinput3_end_d
integer :: auxinput3_end_h										integer :: auxinput3_end_h
integer :: auxinput3_end_m										integer :: auxinput3_end_m
integer :: auxinput3_end_s										integer :: auxinput3_end_s
integer :: auxinput3_end										integer :: auxinput3_end
integer :: io_form_auxinput3										integer :: io_form_auxinput3
integer :: frames_per_auxinput3										integer :: frames_per_auxinput3
character*256 :: auxinput4_inname									character*256 :: auxinput4_inname
character*256 :: auxinput4_outname									character*256 :: auxinput4_outname
integer :: auxinput4_interval_y										integer :: auxinput4_interval_y
integer :: auxinput4_interval_d										integer :: auxinput4_interval_d
integer :: auxinput4_interval_h										integer :: auxinput4_interval_h
integer :: auxinput4_interval_m										integer :: auxinput4_interval_m
integer :: auxinput4_interval_s										integer :: auxinput4_interval_s
integer :: auxinput4_interval										integer :: auxinput4_interval
integer :: auxinput4_begin_y										integer :: auxinput4_begin_y
integer :: auxinput4_begin_d										integer :: auxinput4_begin_d
integer :: auxinput4_begin_h										integer :: auxinput4_begin_h
integer :: auxinput4_begin_m										integer :: auxinput4_begin_m
integer :: auxinput4_begin_s										integer :: auxinput4_begin_s
integer :: auxinput4_begin										integer :: auxinput4_begin
integer :: auxinput4_end_y										integer :: auxinput4_end_y
integer :: auxinput4_end_d										integer :: auxinput4_end_d
integer :: auxinput4_end_h										integer :: auxinput4_end_h
integer :: auxinput4_end_m										integer :: auxinput4_end_m
integer :: auxinput4_end_s										integer :: auxinput4_end_s
integer :: auxinput4_end										integer :: auxinput4_end
integer :: io_form_auxinput4										integer :: io_form_auxinput4
integer :: frames_per_auxinput4										integer :: frames_per_auxinput4
character*256 :: auxinput5_inname									character*256 :: auxinput5_inname
character*256 :: auxinput5_outname									character*256 :: auxinput5_outname
integer :: auxinput5_interval_y										integer :: auxinput5_interval_y
integer :: auxinput5_interval_d										integer :: auxinput5_interval_d
integer :: auxinput5_interval_h										integer :: auxinput5_interval_h
integer :: auxinput5_interval_m										integer :: auxinput5_interval_m
integer :: auxinput5_interval_s										integer :: auxinput5_interval_s
integer :: auxinput5_interval										integer :: auxinput5_interval
integer :: auxinput5_begin_y										integer :: auxinput5_begin_y
integer :: auxinput5_begin_d										integer :: auxinput5_begin_d
integer :: auxinput5_begin_h										integer :: auxinput5_begin_h
integer :: auxinput5_begin_m										integer :: auxinput5_begin_m
integer :: auxinput5_begin_s										integer :: auxinput5_begin_s
integer :: auxinput5_begin										integer :: auxinput5_begin
integer :: auxinput5_end_y										integer :: auxinput5_end_y
integer :: auxinput5_end_d										integer :: auxinput5_end_d
integer :: auxinput5_end_h										integer :: auxinput5_end_h
integer :: auxinput5_end_m										integer :: auxinput5_end_m
integer :: auxinput5_end_s										integer :: auxinput5_end_s
integer :: auxinput5_end										integer :: auxinput5_end
integer :: io_form_auxinput5										integer :: io_form_auxinput5
integer :: frames_per_auxinput5										integer :: frames_per_auxinput5
character*256 :: auxinput6_inname									character*256 :: auxinput6_inname
character*256 :: auxinput6_outname									character*256 :: auxinput6_outname
integer :: auxinput6_interval_y										integer :: auxinput6_interval_y
integer :: auxinput6_interval_d										integer :: auxinput6_interval_d
integer :: auxinput6_interval_h										integer :: auxinput6_interval_h
integer :: auxinput6_interval_m										integer :: auxinput6_interval_m
integer :: auxinput6_interval_s										integer :: auxinput6_interval_s
integer :: auxinput6_interval										integer :: auxinput6_interval
integer :: auxinput6_begin_y										integer :: auxinput6_begin_y
integer :: auxinput6_begin_d										integer :: auxinput6_begin_d
integer :: auxinput6_begin_h										integer :: auxinput6_begin_h
integer :: auxinput6_begin_m										integer :: auxinput6_begin_m
integer :: auxinput6_begin_s										integer :: auxinput6_begin_s
integer :: auxinput6_begin										integer :: auxinput6_begin
integer :: auxinput6_end_y										integer :: auxinput6_end_y
integer :: auxinput6_end_d										integer :: auxinput6_end_d
integer :: auxinput6_end_h										integer :: auxinput6_end_h
integer :: auxinput6_end_m										integer :: auxinput6_end_m
integer :: auxinput6_end_s										integer :: auxinput6_end_s
integer :: auxinput6_end										integer :: auxinput6_end
integer :: io_form_auxinput6										integer :: io_form_auxinput6
integer :: frames_per_auxinput6										integer :: frames_per_auxinput6
character*256 :: auxinput7_inname									character*256 :: auxinput7_inname
character*256 :: auxinput7_outname									character*256 :: auxinput7_outname
integer :: auxinput7_interval_y										integer :: auxinput7_interval_y
integer :: auxinput7_interval_d										integer :: auxinput7_interval_d
integer :: auxinput7_interval_h										integer :: auxinput7_interval_h
integer :: auxinput7_interval_m										integer :: auxinput7_interval_m
integer :: auxinput7_interval_s										integer :: auxinput7_interval_s
integer :: auxinput7_interval										integer :: auxinput7_interval
integer :: auxinput7_begin_y										integer :: auxinput7_begin_y
integer :: auxinput7_begin_d										integer :: auxinput7_begin_d
integer :: auxinput7_begin_h										integer :: auxinput7_begin_h
integer :: auxinput7_begin_m										integer :: auxinput7_begin_m
integer :: auxinput7_begin_s										integer :: auxinput7_begin_s
integer :: auxinput7_begin										integer :: auxinput7_begin
integer :: auxinput7_end_y										integer :: auxinput7_end_y
integer :: auxinput7_end_d										integer :: auxinput7_end_d
integer :: auxinput7_end_h										integer :: auxinput7_end_h
integer :: auxinput7_end_m										integer :: auxinput7_end_m
integer :: auxinput7_end_s										integer :: auxinput7_end_s
integer :: auxinput7_end										integer :: auxinput7_end
integer :: io_form_auxinput7										integer :: io_form_auxinput7
integer :: frames_per_auxinput7										integer :: frames_per_auxinput7
character*256 :: auxinput8_inname									character*256 :: auxinput8_inname
character*256 :: auxinput8_outname									character*256 :: auxinput8_outname
integer :: auxinput8_interval_y										integer :: auxinput8_interval_y
integer :: auxinput8_interval_d										integer :: auxinput8_interval_d
integer :: auxinput8_interval_h										integer :: auxinput8_interval_h
integer :: auxinput8_interval_m										integer :: auxinput8_interval_m
integer :: auxinput8_interval_s										integer :: auxinput8_interval_s
integer :: auxinput8_interval										integer :: auxinput8_interval
integer :: auxinput8_begin_y										integer :: auxinput8_begin_y
integer :: auxinput8_begin_d										integer :: auxinput8_begin_d
integer :: auxinput8_begin_h										integer :: auxinput8_begin_h
integer :: auxinput8_begin_m										integer :: auxinput8_begin_m
integer :: auxinput8_begin_s										integer :: auxinput8_begin_s
integer :: auxinput8_begin										integer :: auxinput8_begin
integer :: auxinput8_end_y										integer :: auxinput8_end_y
integer :: auxinput8_end_d										integer :: auxinput8_end_d
integer :: auxinput8_end_h										integer :: auxinput8_end_h
integer :: auxinput8_end_m										integer :: auxinput8_end_m
integer :: auxinput8_end_s										integer :: auxinput8_end_s
integer :: auxinput8_end										integer :: auxinput8_end
integer :: io_form_auxinput8										integer :: io_form_auxinput8
integer :: frames_per_auxinput8										integer :: frames_per_auxinput8
character*256 :: auxinput9_inname									character*256 :: auxinput9_inname
character*256 :: auxinput9_outname									character*256 :: auxinput9_outname
integer :: auxinput9_interval_y										integer :: auxinput9_interval_y
integer :: auxinput9_interval_d										integer :: auxinput9_interval_d
integer :: auxinput9_interval_h										integer :: auxinput9_interval_h
integer :: auxinput9_interval_m										integer :: auxinput9_interval_m
integer :: auxinput9_interval_s										integer :: auxinput9_interval_s
integer :: auxinput9_interval										integer :: auxinput9_interval
integer :: auxinput9_begin_y										integer :: auxinput9_begin_y
integer :: auxinput9_begin_d										integer :: auxinput9_begin_d
integer :: auxinput9_begin_h										integer :: auxinput9_begin_h
integer :: auxinput9_begin_m										integer :: auxinput9_begin_m
integer :: auxinput9_begin_s										integer :: auxinput9_begin_s
integer :: auxinput9_begin										integer :: auxinput9_begin
integer :: auxinput9_end_y										integer :: auxinput9_end_y
integer :: auxinput9_end_d										integer :: auxinput9_end_d
integer :: auxinput9_end_h										integer :: auxinput9_end_h
integer :: auxinput9_end_m										integer :: auxinput9_end_m
integer :: auxinput9_end_s										integer :: auxinput9_end_s
integer :: auxinput9_end										integer :: auxinput9_end
integer :: io_form_auxinput9										integer :: io_form_auxinput9
integer :: frames_per_auxinput9										integer :: frames_per_auxinput9
character*256 :: auxinput10_inname									character*256 :: auxinput10_inname
character*256 :: auxinput10_outname									character*256 :: auxinput10_outname
integer :: auxinput10_interval_y									integer :: auxinput10_interval_y
integer :: auxinput10_interval_d									integer :: auxinput10_interval_d
integer :: auxinput10_interval_h									integer :: auxinput10_interval_h
integer :: auxinput10_interval_m									integer :: auxinput10_interval_m
integer :: auxinput10_interval_s									integer :: auxinput10_interval_s
integer :: auxinput10_interval										integer :: auxinput10_interval
integer :: auxinput10_begin_y										integer :: auxinput10_begin_y
integer :: auxinput10_begin_d										integer :: auxinput10_begin_d
integer :: auxinput10_begin_h										integer :: auxinput10_begin_h
integer :: auxinput10_begin_m										integer :: auxinput10_begin_m
integer :: auxinput10_begin_s										integer :: auxinput10_begin_s
integer :: auxinput10_begin										integer :: auxinput10_begin
integer :: auxinput10_end_y										integer :: auxinput10_end_y
integer :: auxinput10_end_d										integer :: auxinput10_end_d
integer :: auxinput10_end_h										integer :: auxinput10_end_h
integer :: auxinput10_end_m										integer :: auxinput10_end_m
integer :: auxinput10_end_s										integer :: auxinput10_end_s
integer :: auxinput10_end										integer :: auxinput10_end
integer :: io_form_auxinput10										integer :: io_form_auxinput10
integer :: frames_per_auxinput10									integer :: frames_per_auxinput10
character*256 :: auxinput11_inname									character*256 :: auxinput11_inname
character*256 :: auxinput11_outname									character*256 :: auxinput11_outname
integer :: auxinput11_interval_y									integer :: auxinput11_interval_y
integer :: auxinput11_interval_d									integer :: auxinput11_interval_d
integer :: auxinput11_interval_h									integer :: auxinput11_interval_h
integer :: auxinput11_interval_m									integer :: auxinput11_interval_m
integer :: auxinput11_interval_s									integer :: auxinput11_interval_s
integer :: auxinput11_interval										integer :: auxinput11_interval
integer :: auxinput11_begin_y										integer :: auxinput11_begin_y
integer :: auxinput11_begin_d										integer :: auxinput11_begin_d
integer :: auxinput11_begin_h										integer :: auxinput11_begin_h
integer :: auxinput11_begin_m										integer :: auxinput11_begin_m
integer :: auxinput11_begin_s										integer :: auxinput11_begin_s
integer :: auxinput11_begin										integer :: auxinput11_begin
integer :: auxinput11_end_y										integer :: auxinput11_end_y
integer :: auxinput11_end_d										integer :: auxinput11_end_d
integer :: auxinput11_end_h										integer :: auxinput11_end_h
integer :: auxinput11_end_m										integer :: auxinput11_end_m
integer :: auxinput11_end_s										integer :: auxinput11_end_s
integer :: auxinput11_end										integer :: auxinput11_end
integer :: io_form_auxinput11										integer :: io_form_auxinput11
integer :: frames_per_auxinput11									integer :: frames_per_auxinput11
character*256 :: auxinput12_inname									character*256 :: auxinput12_inname
character*256 :: auxinput12_outname									character*256 :: auxinput12_outname
integer :: auxinput12_interval_y									integer :: auxinput12_interval_y
integer :: auxinput12_interval_d									integer :: auxinput12_interval_d
integer :: auxinput12_interval_h									integer :: auxinput12_interval_h
integer :: auxinput12_interval_m									integer :: auxinput12_interval_m
integer :: auxinput12_interval_s									integer :: auxinput12_interval_s
integer :: auxinput12_interval										integer :: auxinput12_interval
integer :: auxinput12_begin_y										integer :: auxinput12_begin_y
integer :: auxinput12_begin_d										integer :: auxinput12_begin_d
integer :: auxinput12_begin_h										integer :: auxinput12_begin_h
integer :: auxinput12_begin_m										integer :: auxinput12_begin_m
integer :: auxinput12_begin_s										integer :: auxinput12_begin_s
integer :: auxinput12_begin										integer :: auxinput12_begin
integer :: auxinput12_end_y										integer :: auxinput12_end_y
integer :: auxinput12_end_d										integer :: auxinput12_end_d
integer :: auxinput12_end_h										integer :: auxinput12_end_h
integer :: auxinput12_end_m										integer :: auxinput12_end_m
integer :: auxinput12_end_s										integer :: auxinput12_end_s
integer :: auxinput12_end										integer :: auxinput12_end
integer :: io_form_auxinput12										integer :: io_form_auxinput12
integer :: frames_per_auxinput12									integer :: frames_per_auxinput12
character*256 :: auxinput13_inname									character*256 :: auxinput13_inname
character*256 :: auxinput13_outname									character*256 :: auxinput13_outname
integer :: auxinput13_interval_y									integer :: auxinput13_interval_y
integer :: auxinput13_interval_d									integer :: auxinput13_interval_d
integer :: auxinput13_interval_h									integer :: auxinput13_interval_h
integer :: auxinput13_interval_m									integer :: auxinput13_interval_m
integer :: auxinput13_interval_s									integer :: auxinput13_interval_s
integer :: auxinput13_interval										integer :: auxinput13_interval
integer :: auxinput13_begin_y										integer :: auxinput13_begin_y
integer :: auxinput13_begin_d										integer :: auxinput13_begin_d
integer :: auxinput13_begin_h										integer :: auxinput13_begin_h
integer :: auxinput13_begin_m										integer :: auxinput13_begin_m
integer :: auxinput13_begin_s										integer :: auxinput13_begin_s
integer :: auxinput13_begin										integer :: auxinput13_begin
integer :: auxinput13_end_y										integer :: auxinput13_end_y
integer :: auxinput13_end_d										integer :: auxinput13_end_d
integer :: auxinput13_end_h										integer :: auxinput13_end_h
integer :: auxinput13_end_m										integer :: auxinput13_end_m
integer :: auxinput13_end_s										integer :: auxinput13_end_s
integer :: auxinput13_end										integer :: auxinput13_end
integer :: io_form_auxinput13										integer :: io_form_auxinput13
integer :: frames_per_auxinput13									integer :: frames_per_auxinput13
character*256 :: auxinput14_inname									character*256 :: auxinput14_inname
character*256 :: auxinput14_outname									character*256 :: auxinput14_outname
integer :: auxinput14_interval_y									integer :: auxinput14_interval_y
integer :: auxinput14_interval_d									integer :: auxinput14_interval_d
integer :: auxinput14_interval_h									integer :: auxinput14_interval_h
integer :: auxinput14_interval_m									integer :: auxinput14_interval_m
integer :: auxinput14_interval_s									integer :: auxinput14_interval_s
integer :: auxinput14_interval										integer :: auxinput14_interval
integer :: auxinput14_begin_y										integer :: auxinput14_begin_y
integer :: auxinput14_begin_d										integer :: auxinput14_begin_d
integer :: auxinput14_begin_h										integer :: auxinput14_begin_h
integer :: auxinput14_begin_m										integer :: auxinput14_begin_m
integer :: auxinput14_begin_s										integer :: auxinput14_begin_s
integer :: auxinput14_begin										integer :: auxinput14_begin
integer :: auxinput14_end_y										integer :: auxinput14_end_y
integer :: auxinput14_end_d										integer :: auxinput14_end_d
integer :: auxinput14_end_h										integer :: auxinput14_end_h
integer :: auxinput14_end_m										integer :: auxinput14_end_m
integer :: auxinput14_end_s										integer :: auxinput14_end_s
integer :: auxinput14_end										integer :: auxinput14_end
integer :: io_form_auxinput14										integer :: io_form_auxinput14
integer :: frames_per_auxinput14									integer :: frames_per_auxinput14
character*256 :: auxinput15_inname									character*256 :: auxinput15_inname
character*256 :: auxinput15_outname									character*256 :: auxinput15_outname
integer :: auxinput15_interval_y									integer :: auxinput15_interval_y
integer :: auxinput15_interval_d									integer :: auxinput15_interval_d
integer :: auxinput15_interval_h									integer :: auxinput15_interval_h
integer :: auxinput15_interval_m									integer :: auxinput15_interval_m
integer :: auxinput15_interval_s									integer :: auxinput15_interval_s
integer :: auxinput15_interval										integer :: auxinput15_interval
integer :: auxinput15_begin_y										integer :: auxinput15_begin_y
integer :: auxinput15_begin_d										integer :: auxinput15_begin_d
integer :: auxinput15_begin_h										integer :: auxinput15_begin_h
integer :: auxinput15_begin_m										integer :: auxinput15_begin_m
integer :: auxinput15_begin_s										integer :: auxinput15_begin_s
integer :: auxinput15_begin										integer :: auxinput15_begin
integer :: auxinput15_end_y										integer :: auxinput15_end_y
integer :: auxinput15_end_d										integer :: auxinput15_end_d
integer :: auxinput15_end_h										integer :: auxinput15_end_h
integer :: auxinput15_end_m										integer :: auxinput15_end_m
integer :: auxinput15_end_s										integer :: auxinput15_end_s
integer :: auxinput15_end										integer :: auxinput15_end
integer :: io_form_auxinput15										integer :: io_form_auxinput15
integer :: frames_per_auxinput15									integer :: frames_per_auxinput15
character*256 :: auxinput16_inname									character*256 :: auxinput16_inname
character*256 :: auxinput16_outname									character*256 :: auxinput16_outname
integer :: auxinput16_interval_y									integer :: auxinput16_interval_y
integer :: auxinput16_interval_d									integer :: auxinput16_interval_d
integer :: auxinput16_interval_h									integer :: auxinput16_interval_h
integer :: auxinput16_interval_m									integer :: auxinput16_interval_m
integer :: auxinput16_interval_s									integer :: auxinput16_interval_s
integer :: auxinput16_interval										integer :: auxinput16_interval
integer :: auxinput16_begin_y										integer :: auxinput16_begin_y
integer :: auxinput16_begin_d										integer :: auxinput16_begin_d
integer :: auxinput16_begin_h										integer :: auxinput16_begin_h
integer :: auxinput16_begin_m										integer :: auxinput16_begin_m
integer :: auxinput16_begin_s										integer :: auxinput16_begin_s
integer :: auxinput16_begin										integer :: auxinput16_begin
integer :: auxinput16_end_y										integer :: auxinput16_end_y
integer :: auxinput16_end_d										integer :: auxinput16_end_d
integer :: auxinput16_end_h										integer :: auxinput16_end_h
integer :: auxinput16_end_m										integer :: auxinput16_end_m
integer :: auxinput16_end_s										integer :: auxinput16_end_s
integer :: auxinput16_end										integer :: auxinput16_end
integer :: io_form_auxinput16										integer :: io_form_auxinput16
integer :: frames_per_auxinput16									integer :: frames_per_auxinput16
character*256 :: auxinput17_inname									character*256 :: auxinput17_inname
character*256 :: auxinput17_outname									character*256 :: auxinput17_outname
integer :: auxinput17_interval_y									integer :: auxinput17_interval_y
integer :: auxinput17_interval_d									integer :: auxinput17_interval_d
integer :: auxinput17_interval_h									integer :: auxinput17_interval_h
integer :: auxinput17_interval_m									integer :: auxinput17_interval_m
integer :: auxinput17_interval_s									integer :: auxinput17_interval_s
integer :: auxinput17_interval										integer :: auxinput17_interval
integer :: auxinput17_begin_y										integer :: auxinput17_begin_y
integer :: auxinput17_begin_d										integer :: auxinput17_begin_d
integer :: auxinput17_begin_h										integer :: auxinput17_begin_h
integer :: auxinput17_begin_m										integer :: auxinput17_begin_m
integer :: auxinput17_begin_s										integer :: auxinput17_begin_s
integer :: auxinput17_begin										integer :: auxinput17_begin
integer :: auxinput17_end_y										integer :: auxinput17_end_y
integer :: auxinput17_end_d										integer :: auxinput17_end_d
integer :: auxinput17_end_h										integer :: auxinput17_end_h
integer :: auxinput17_end_m										integer :: auxinput17_end_m
integer :: auxinput17_end_s										integer :: auxinput17_end_s
integer :: auxinput17_end										integer :: auxinput17_end
integer :: io_form_auxinput17										integer :: io_form_auxinput17
integer :: frames_per_auxinput17									integer :: frames_per_auxinput17
character*256 :: auxinput18_inname									character*256 :: auxinput18_inname
character*256 :: auxinput18_outname									character*256 :: auxinput18_outname
integer :: auxinput18_interval_y									integer :: auxinput18_interval_y
integer :: auxinput18_interval_d									integer :: auxinput18_interval_d
integer :: auxinput18_interval_h									integer :: auxinput18_interval_h
integer :: auxinput18_interval_m									integer :: auxinput18_interval_m
integer :: auxinput18_interval_s									integer :: auxinput18_interval_s
integer :: auxinput18_interval										integer :: auxinput18_interval
integer :: auxinput18_begin_y										integer :: auxinput18_begin_y
integer :: auxinput18_begin_d										integer :: auxinput18_begin_d
integer :: auxinput18_begin_h										integer :: auxinput18_begin_h
integer :: auxinput18_begin_m										integer :: auxinput18_begin_m
integer :: auxinput18_begin_s										integer :: auxinput18_begin_s
integer :: auxinput18_begin										integer :: auxinput18_begin
integer :: auxinput18_end_y										integer :: auxinput18_end_y
integer :: auxinput18_end_d										integer :: auxinput18_end_d
integer :: auxinput18_end_h										integer :: auxinput18_end_h
integer :: auxinput18_end_m										integer :: auxinput18_end_m
integer :: auxinput18_end_s										integer :: auxinput18_end_s
integer :: auxinput18_end										integer :: auxinput18_end
integer :: io_form_auxinput18										integer :: io_form_auxinput18
integer :: frames_per_auxinput18									integer :: frames_per_auxinput18
character*256 :: auxinput19_inname									character*256 :: auxinput19_inname
character*256 :: auxinput19_outname									character*256 :: auxinput19_outname
integer :: auxinput19_interval_y									integer :: auxinput19_interval_y
integer :: auxinput19_interval_d									integer :: auxinput19_interval_d
integer :: auxinput19_interval_h									integer :: auxinput19_interval_h
integer :: auxinput19_interval_m									integer :: auxinput19_interval_m
integer :: auxinput19_interval_s									integer :: auxinput19_interval_s
integer :: auxinput19_interval										integer :: auxinput19_interval
integer :: auxinput19_begin_y										integer :: auxinput19_begin_y
integer :: auxinput19_begin_d										integer :: auxinput19_begin_d
integer :: auxinput19_begin_h										integer :: auxinput19_begin_h
integer :: auxinput19_begin_m										integer :: auxinput19_begin_m
integer :: auxinput19_begin_s										integer :: auxinput19_begin_s
integer :: auxinput19_begin										integer :: auxinput19_begin
integer :: auxinput19_end_y										integer :: auxinput19_end_y
integer :: auxinput19_end_d										integer :: auxinput19_end_d
integer :: auxinput19_end_h										integer :: auxinput19_end_h
integer :: auxinput19_end_m										integer :: auxinput19_end_m
integer :: auxinput19_end_s										integer :: auxinput19_end_s
integer :: auxinput19_end										integer :: auxinput19_end
integer :: io_form_auxinput19										integer :: io_form_auxinput19
integer :: frames_per_auxinput19									integer :: frames_per_auxinput19
character*256 :: auxinput20_inname									character*256 :: auxinput20_inname
character*256 :: auxinput20_outname									character*256 :: auxinput20_outname
integer :: auxinput20_interval_y									integer :: auxinput20_interval_y
integer :: auxinput20_interval_d									integer :: auxinput20_interval_d
integer :: auxinput20_interval_h									integer :: auxinput20_interval_h
integer :: auxinput20_interval_m									integer :: auxinput20_interval_m
integer :: auxinput20_interval_s									integer :: auxinput20_interval_s
integer :: auxinput20_interval										integer :: auxinput20_interval
integer :: auxinput20_begin_y										integer :: auxinput20_begin_y
integer :: auxinput20_begin_d										integer :: auxinput20_begin_d
integer :: auxinput20_begin_h										integer :: auxinput20_begin_h
integer :: auxinput20_begin_m										integer :: auxinput20_begin_m
integer :: auxinput20_begin_s										integer :: auxinput20_begin_s
integer :: auxinput20_begin										integer :: auxinput20_begin
integer :: auxinput20_end_y										integer :: auxinput20_end_y
integer :: auxinput20_end_d										integer :: auxinput20_end_d
integer :: auxinput20_end_h										integer :: auxinput20_end_h
integer :: auxinput20_end_m										integer :: auxinput20_end_m
integer :: auxinput20_end_s										integer :: auxinput20_end_s
integer :: auxinput20_end										integer :: auxinput20_end
integer :: io_form_auxinput20										integer :: io_form_auxinput20
integer :: frames_per_auxinput20									integer :: frames_per_auxinput20
character*256 :: auxinput21_inname									character*256 :: auxinput21_inname
character*256 :: auxinput21_outname									character*256 :: auxinput21_outname
integer :: auxinput21_interval_y									integer :: auxinput21_interval_y
integer :: auxinput21_interval_d									integer :: auxinput21_interval_d
integer :: auxinput21_interval_h									integer :: auxinput21_interval_h
integer :: auxinput21_interval_m									integer :: auxinput21_interval_m
integer :: auxinput21_interval_s									integer :: auxinput21_interval_s
integer :: auxinput21_interval										integer :: auxinput21_interval
integer :: auxinput21_begin_y										integer :: auxinput21_begin_y
integer :: auxinput21_begin_d										integer :: auxinput21_begin_d
integer :: auxinput21_begin_h										integer :: auxinput21_begin_h
integer :: auxinput21_begin_m										integer :: auxinput21_begin_m
integer :: auxinput21_begin_s										integer :: auxinput21_begin_s
integer :: auxinput21_begin										integer :: auxinput21_begin
integer :: auxinput21_end_y										integer :: auxinput21_end_y
integer :: auxinput21_end_d										integer :: auxinput21_end_d
integer :: auxinput21_end_h										integer :: auxinput21_end_h
integer :: auxinput21_end_m										integer :: auxinput21_end_m
integer :: auxinput21_end_s										integer :: auxinput21_end_s
integer :: auxinput21_end										integer :: auxinput21_end
integer :: io_form_auxinput21										integer :: io_form_auxinput21
integer :: frames_per_auxinput21									integer :: frames_per_auxinput21
character*256 :: auxinput22_inname									character*256 :: auxinput22_inname
character*256 :: auxinput22_outname									character*256 :: auxinput22_outname
integer :: auxinput22_interval_y									integer :: auxinput22_interval_y
integer :: auxinput22_interval_d									integer :: auxinput22_interval_d
integer :: auxinput22_interval_h									integer :: auxinput22_interval_h
integer :: auxinput22_interval_m									integer :: auxinput22_interval_m
integer :: auxinput22_interval_s									integer :: auxinput22_interval_s
integer :: auxinput22_interval										integer :: auxinput22_interval
integer :: auxinput22_begin_y										integer :: auxinput22_begin_y
integer :: auxinput22_begin_d										integer :: auxinput22_begin_d
integer :: auxinput22_begin_h										integer :: auxinput22_begin_h
integer :: auxinput22_begin_m										integer :: auxinput22_begin_m
integer :: auxinput22_begin_s										integer :: auxinput22_begin_s
integer :: auxinput22_begin										integer :: auxinput22_begin
integer :: auxinput22_end_y										integer :: auxinput22_end_y
integer :: auxinput22_end_d										integer :: auxinput22_end_d
integer :: auxinput22_end_h										integer :: auxinput22_end_h
integer :: auxinput22_end_m										integer :: auxinput22_end_m
integer :: auxinput22_end_s										integer :: auxinput22_end_s
integer :: auxinput22_end										integer :: auxinput22_end
integer :: io_form_auxinput22										integer :: io_form_auxinput22
integer :: frames_per_auxinput22									integer :: frames_per_auxinput22
character*256 :: auxinput23_inname									character*256 :: auxinput23_inname
character*256 :: auxinput23_outname									character*256 :: auxinput23_outname
integer :: auxinput23_interval_y									integer :: auxinput23_interval_y
integer :: auxinput23_interval_d									integer :: auxinput23_interval_d
integer :: auxinput23_interval_h									integer :: auxinput23_interval_h
integer :: auxinput23_interval_m									integer :: auxinput23_interval_m
integer :: auxinput23_interval_s									integer :: auxinput23_interval_s
integer :: auxinput23_interval										integer :: auxinput23_interval
integer :: auxinput23_begin_y										integer :: auxinput23_begin_y
integer :: auxinput23_begin_d										integer :: auxinput23_begin_d
integer :: auxinput23_begin_h										integer :: auxinput23_begin_h
integer :: auxinput23_begin_m										integer :: auxinput23_begin_m
integer :: auxinput23_begin_s										integer :: auxinput23_begin_s
integer :: auxinput23_begin										integer :: auxinput23_begin
integer :: auxinput23_end_y										integer :: auxinput23_end_y
integer :: auxinput23_end_d										integer :: auxinput23_end_d
integer :: auxinput23_end_h										integer :: auxinput23_end_h
integer :: auxinput23_end_m										integer :: auxinput23_end_m
integer :: auxinput23_end_s										integer :: auxinput23_end_s
integer :: auxinput23_end										integer :: auxinput23_end
integer :: io_form_auxinput23										integer :: io_form_auxinput23
integer :: frames_per_auxinput23									integer :: frames_per_auxinput23
character*256 :: auxinput24_inname									character*256 :: auxinput24_inname
character*256 :: auxinput24_outname									character*256 :: auxinput24_outname
integer :: auxinput24_interval_y									integer :: auxinput24_interval_y
integer :: auxinput24_interval_d									integer :: auxinput24_interval_d
integer :: auxinput24_interval_h									integer :: auxinput24_interval_h
integer :: auxinput24_interval_m									integer :: auxinput24_interval_m
integer :: auxinput24_interval_s									integer :: auxinput24_interval_s
integer :: auxinput24_interval										integer :: auxinput24_interval
integer :: auxinput24_begin_y										integer :: auxinput24_begin_y
integer :: auxinput24_begin_d										integer :: auxinput24_begin_d
integer :: auxinput24_begin_h										integer :: auxinput24_begin_h
integer :: auxinput24_begin_m										integer :: auxinput24_begin_m
integer :: auxinput24_begin_s										integer :: auxinput24_begin_s
integer :: auxinput24_begin										integer :: auxinput24_begin
integer :: auxinput24_end_y										integer :: auxinput24_end_y
integer :: auxinput24_end_d										integer :: auxinput24_end_d
integer :: auxinput24_end_h										integer :: auxinput24_end_h
integer :: auxinput24_end_m										integer :: auxinput24_end_m
integer :: auxinput24_end_s										integer :: auxinput24_end_s
integer :: auxinput24_end										integer :: auxinput24_end
integer :: io_form_auxinput24										integer :: io_form_auxinput24
integer :: frames_per_auxinput24									integer :: frames_per_auxinput24
integer :: history_interval										integer :: history_interval
integer :: frames_per_outfile										integer :: frames_per_outfile
logical :: restart											logical :: restart
integer :: restart_interval										integer :: restart_interval
integer :: io_form_input										integer :: io_form_input
integer :: io_form_history										integer :: io_form_history
integer :: io_form_restart										integer :: io_form_restart
integer :: io_form_boundary										integer :: io_form_boundary
integer :: debug_level											integer :: debug_level
logical :: self_test_domain										logical :: self_test_domain
character*256 :: history_outname									character*256 :: history_outname
character*256 :: history_inname										character*256 :: history_inname
logical :: use_netcdf_classic										logical :: use_netcdf_classic
integer :: history_interval_d										integer :: history_interval_d
integer :: history_interval_h										integer :: history_interval_h
integer :: history_interval_m										integer :: history_interval_m
integer :: history_interval_s										integer :: history_interval_s
integer :: inputout_interval_d										integer :: inputout_interval_d
integer :: inputout_interval_h										integer :: inputout_interval_h
integer :: inputout_interval_m										integer :: inputout_interval_m
integer :: inputout_interval_s										integer :: inputout_interval_s
integer :: inputout_interval										integer :: inputout_interval
integer :: restart_interval_d										integer :: restart_interval_d
integer :: restart_interval_h										integer :: restart_interval_h
integer :: restart_interval_m										integer :: restart_interval_m
integer :: restart_interval_s										integer :: restart_interval_s
integer :: history_begin_y										integer :: history_begin_y
integer :: history_begin_d										integer :: history_begin_d
integer :: history_begin_h										integer :: history_begin_h
integer :: history_begin_m										integer :: history_begin_m
integer :: history_begin_s										integer :: history_begin_s
integer :: history_begin										integer :: history_begin
integer :: inputout_begin_y										integer :: inputout_begin_y
integer :: inputout_begin_d										integer :: inputout_begin_d
integer :: inputout_begin_h										integer :: inputout_begin_h
integer :: inputout_begin_m										integer :: inputout_begin_m
integer :: inputout_begin_s										integer :: inputout_begin_s
integer :: restart_begin_y										integer :: restart_begin_y
integer :: restart_begin_d										integer :: restart_begin_d
integer :: restart_begin_h										integer :: restart_begin_h
integer :: restart_begin_m										integer :: restart_begin_m
integer :: restart_begin_s										integer :: restart_begin_s
integer :: restart_begin										integer :: restart_begin
integer :: history_end_y										integer :: history_end_y
integer :: history_end_d										integer :: history_end_d
integer :: history_end_h										integer :: history_end_h
integer :: history_end_m										integer :: history_end_m
integer :: history_end_s										integer :: history_end_s
integer :: history_end											integer :: history_end
integer :: inputout_end_y										integer :: inputout_end_y
integer :: inputout_end_d										integer :: inputout_end_d
integer :: inputout_end_h										integer :: inputout_end_h
integer :: inputout_end_m										integer :: inputout_end_m
integer :: inputout_end_s										integer :: inputout_end_s
integer :: simulation_start_year									integer :: simulation_start_year
integer :: simulation_start_month									integer :: simulation_start_month
integer :: simulation_start_day										integer :: simulation_start_day
integer :: simulation_start_hour									integer :: simulation_start_hour
integer :: simulation_start_minute									integer :: simulation_start_minute
integer :: simulation_start_second									integer :: simulation_start_second
logical :: reset_simulation_start									logical :: reset_simulation_start
integer :: sr_x												integer :: sr_x
integer :: sr_y												integer :: sr_y
character*256 :: sgfdda_inname										character*256 :: sgfdda_inname
character*256 :: gfdda_inname										character*256 :: gfdda_inname
integer :: sgfdda_interval_d										integer :: sgfdda_interval_d
integer :: sgfdda_interval_h										integer :: sgfdda_interval_h
integer :: sgfdda_interval_m										integer :: sgfdda_interval_m
integer :: sgfdda_interval_s										integer :: sgfdda_interval_s
integer :: sgfdda_interval_y										integer :: sgfdda_interval_y
integer :: sgfdda_interval										integer :: sgfdda_interval
integer :: gfdda_interval_d										integer :: gfdda_interval_d
integer :: gfdda_interval_h										integer :: gfdda_interval_h
integer :: gfdda_interval_m										integer :: gfdda_interval_m
integer :: gfdda_interval_s										integer :: gfdda_interval_s
integer :: gfdda_interval_y										integer :: gfdda_interval_y
integer :: gfdda_interval										integer :: gfdda_interval
integer :: sgfdda_begin_y										integer :: sgfdda_begin_y
integer :: sgfdda_begin_d										integer :: sgfdda_begin_d
integer :: sgfdda_begin_h										integer :: sgfdda_begin_h
integer :: sgfdda_begin_m										integer :: sgfdda_begin_m
integer :: sgfdda_begin_s										integer :: sgfdda_begin_s
integer :: gfdda_begin_y										integer :: gfdda_begin_y
integer :: gfdda_begin_d										integer :: gfdda_begin_d
integer :: gfdda_begin_h										integer :: gfdda_begin_h
integer :: gfdda_begin_m										integer :: gfdda_begin_m
integer :: gfdda_begin_s										integer :: gfdda_begin_s
integer :: sgfdda_end_y											integer :: sgfdda_end_y
integer :: sgfdda_end_d											integer :: sgfdda_end_d
integer :: sgfdda_end_h											integer :: sgfdda_end_h
integer :: sgfdda_end_m											integer :: sgfdda_end_m
integer :: sgfdda_end_s											integer :: sgfdda_end_s
integer :: gfdda_end_y											integer :: gfdda_end_y
integer :: gfdda_end_d											integer :: gfdda_end_d
integer :: gfdda_end_h											integer :: gfdda_end_h
integer :: gfdda_end_m											integer :: gfdda_end_m
integer :: gfdda_end_s											integer :: gfdda_end_s
integer :: io_form_sgfdda										integer :: io_form_sgfdda
integer :: io_form_gfdda										integer :: io_form_gfdda
character*256 :: iofields_filename									character*256 :: iofields_filename
logical :: ignore_iofields_warning									logical :: ignore_iofields_warning
logical :: ncd_nofill											logical :: ncd_nofill
integer :: ifire											integer :: ifire
integer :: fire_boundary_guard										integer :: fire_boundary_guard
integer :: fire_num_ignitions										integer :: fire_num_ignitions
real :: fire_ignition_ros1										real :: fire_ignition_ros1
real :: fire_ignition_start_lon1									real :: fire_ignition_start_lon1
real :: fire_ignition_start_lat1									real :: fire_ignition_start_lat1
real :: fire_ignition_end_lon1										real :: fire_ignition_end_lon1
real :: fire_ignition_end_lat1										real :: fire_ignition_end_lat1
real :: fire_ignition_radius1										real :: fire_ignition_radius1
real :: fire_ignition_start_time1									real :: fire_ignition_start_time1
real :: fire_ignition_end_time1										real :: fire_ignition_end_time1
real :: fire_ignition_ros2										real :: fire_ignition_ros2
real :: fire_ignition_start_lon2									real :: fire_ignition_start_lon2
real :: fire_ignition_start_lat2									real :: fire_ignition_start_lat2
real :: fire_ignition_end_lon2										real :: fire_ignition_end_lon2
real :: fire_ignition_end_lat2										real :: fire_ignition_end_lat2
real :: fire_ignition_radius2										real :: fire_ignition_radius2
real :: fire_ignition_start_time2									real :: fire_ignition_start_time2
real :: fire_ignition_end_time2										real :: fire_ignition_end_time2
real :: fire_ignition_ros3										real :: fire_ignition_ros3
real :: fire_ignition_start_lon3									real :: fire_ignition_start_lon3
real :: fire_ignition_start_lat3									real :: fire_ignition_start_lat3
real :: fire_ignition_end_lon3										real :: fire_ignition_end_lon3
real :: fire_ignition_end_lat3										real :: fire_ignition_end_lat3
real :: fire_ignition_radius3										real :: fire_ignition_radius3
real :: fire_ignition_start_time3									real :: fire_ignition_start_time3
real :: fire_ignition_end_time3										real :: fire_ignition_end_time3
real :: fire_ignition_ros4										real :: fire_ignition_ros4
real :: fire_ignition_start_lon4									real :: fire_ignition_start_lon4
real :: fire_ignition_start_lat4									real :: fire_ignition_start_lat4
real :: fire_ignition_end_lon4										real :: fire_ignition_end_lon4
real :: fire_ignition_end_lat4										real :: fire_ignition_end_lat4
real :: fire_ignition_radius4										real :: fire_ignition_radius4
real :: fire_ignition_start_time4									real :: fire_ignition_start_time4
real :: fire_ignition_end_time4										real :: fire_ignition_end_time4
real :: fire_ignition_ros5										real :: fire_ignition_ros5
real :: fire_ignition_start_lon5									real :: fire_ignition_start_lon5
real :: fire_ignition_start_lat5									real :: fire_ignition_start_lat5
real :: fire_ignition_end_lon5										real :: fire_ignition_end_lon5
real :: fire_ignition_end_lat5										real :: fire_ignition_end_lat5
real :: fire_ignition_radius5										real :: fire_ignition_radius5
real :: fire_ignition_start_time5									real :: fire_ignition_start_time5
real :: fire_ignition_end_time5										real :: fire_ignition_end_time5
real :: fire_ignition_start_x1										real :: fire_ignition_start_x1
real :: fire_ignition_start_y1										real :: fire_ignition_start_y1
real :: fire_ignition_end_x1										real :: fire_ignition_end_x1
real :: fire_ignition_end_y1										real :: fire_ignition_end_y1
real :: fire_ignition_start_x2										real :: fire_ignition_start_x2
real :: fire_ignition_start_y2										real :: fire_ignition_start_y2
real :: fire_ignition_end_x2										real :: fire_ignition_end_x2
real :: fire_ignition_end_y2										real :: fire_ignition_end_y2
real :: fire_ignition_start_x3										real :: fire_ignition_start_x3
real :: fire_ignition_start_y3										real :: fire_ignition_start_y3
real :: fire_ignition_end_x3										real :: fire_ignition_end_x3
real :: fire_ignition_end_y3										real :: fire_ignition_end_y3
real :: fire_ignition_start_x4										real :: fire_ignition_start_x4
real :: fire_ignition_start_y4										real :: fire_ignition_start_y4
real :: fire_ignition_end_x4										real :: fire_ignition_end_x4
real :: fire_ignition_end_y4										real :: fire_ignition_end_y4
real :: fire_ignition_start_x5										real :: fire_ignition_start_x5
real :: fire_ignition_start_y5										real :: fire_ignition_start_y5
real :: fire_ignition_end_x5										real :: fire_ignition_end_x5
real :: fire_ignition_end_y5										real :: fire_ignition_end_y5
real :: fire_lat_init											real :: fire_lat_init
real :: fire_lon_init											real :: fire_lon_init
real :: fire_ign_time											real :: fire_ign_time
integer :: fire_shape											integer :: fire_shape
integer :: fire_sprd_mdl										integer :: fire_sprd_mdl
real :: fire_crwn_hgt											real :: fire_crwn_hgt
real :: fire_ext_grnd											real :: fire_ext_grnd
real :: fire_ext_crwn											real :: fire_ext_crwn
real :: fire_wind_height										real :: fire_wind_height
integer :: fire_fuel_read										integer :: fire_fuel_read
integer :: fire_fuel_cat										integer :: fire_fuel_cat
integer :: fire_print_msg										integer :: fire_print_msg
integer :: fire_print_file										integer :: fire_print_file
integer :: fire_fuel_left_method									integer :: fire_fuel_left_method
integer :: fire_fuel_left_irl										integer :: fire_fuel_left_irl
integer :: fire_fuel_left_jrl										integer :: fire_fuel_left_jrl
real :: fire_back_weight										real :: fire_back_weight
integer :: fire_grows_only										integer :: fire_grows_only
integer :: fire_upwinding										integer :: fire_upwinding
integer :: fire_upwind_split										integer :: fire_upwind_split
real :: fire_viscosity											real :: fire_viscosity
real :: fire_lfn_ext_up											real :: fire_lfn_ext_up
integer :: fire_topo_from_atm										integer :: fire_topo_from_atm
integer :: fire_advection										integer :: fire_advection
integer :: fire_test_steps										integer :: fire_test_steps
real :: fire_const_time											real :: fire_const_time
real :: fire_const_grnhfx										real :: fire_const_grnhfx
real :: fire_const_grnqfx										real :: fire_const_grnqfx
real :: fire_atm_feedback										real :: fire_atm_feedback
integer :: fire_mountain_type										integer :: fire_mountain_type
real :: fire_mountain_height										real :: fire_mountain_height
real :: fire_mountain_start_x										real :: fire_mountain_start_x
real :: fire_mountain_start_y										real :: fire_mountain_start_y
real :: fire_mountain_end_x										real :: fire_mountain_end_x
real :: fire_mountain_end_y										real :: fire_mountain_end_y
real :: delt_perturbation										real :: delt_perturbation
real :: xrad_perturbation										real :: xrad_perturbation
real :: yrad_perturbation										real :: yrad_perturbation
real :: zrad_perturbation										real :: zrad_perturbation
real :: hght_perturbation										real :: hght_perturbation
logical :: stretch_grd											logical :: stretch_grd
logical :: stretch_hyp											logical :: stretch_hyp
real :: z_grd_scale											real :: z_grd_scale
logical :: sfc_full_init										logical :: sfc_full_init
integer :: sfc_lu_index											integer :: sfc_lu_index
real :: sfc_tsk												real :: sfc_tsk
real :: sfc_tmn												real :: sfc_tmn
logical :: fire_read_lu											logical :: fire_read_lu
logical :: fire_read_tsk										logical :: fire_read_tsk
logical :: fire_read_tmn										logical :: fire_read_tmn
logical :: fire_read_atm_ht										logical :: fire_read_atm_ht
logical :: fire_read_fire_ht										logical :: fire_read_fire_ht
logical :: fire_read_atm_grad										logical :: fire_read_atm_grad
logical :: fire_read_fire_grad										logical :: fire_read_fire_grad
real :: sfc_vegfra											real :: sfc_vegfra
real :: sfc_canwat											real :: sfc_canwat
integer :: sfc_ivgtyp											integer :: sfc_ivgtyp
integer :: sfc_isltyp											integer :: sfc_isltyp
integer :: do_avgflx_em											integer :: do_avgflx_em
integer :: do_avgflx_cugd										integer :: do_avgflx_cugd
integer :: nens												integer :: nens
integer :: skebs											integer :: skebs
integer :: stoch_force_opt										integer :: stoch_force_opt
integer :: skebs_vertstruc										integer :: skebs_vertstruc
integer :: stoch_vertstruc_opt										integer :: stoch_vertstruc_opt
real :: tot_backscat_psi										real :: tot_backscat_psi
real :: tot_backscat_t											real :: tot_backscat_t
real :: ztau_psi											real :: ztau_psi
real :: ztau_t												real :: ztau_t
real :: rexponent_psi											real :: rexponent_psi
real :: rexponent_t											real :: rexponent_t
real :: zsigma2_eps											real :: zsigma2_eps
real :: zsigma2_eta											real :: zsigma2_eta
integer :: kminforc											integer :: kminforc
integer :: lminforc											integer :: lminforc
integer :: kminforct											integer :: kminforct
integer :: lminforct											integer :: lminforct
integer :: kmaxforc											integer :: kmaxforc
integer :: lmaxforc											integer :: lmaxforc
integer :: kmaxforct											integer :: kmaxforct
integer :: lmaxforct											integer :: lmaxforct
integer :: iseed_skebs											integer :: iseed_skebs
integer :: kmaxforch											integer :: kmaxforch
integer :: lmaxforch											integer :: lmaxforch
integer :: kmaxforcth											integer :: kmaxforcth
integer :: lmaxforcth											integer :: lmaxforcth
integer :: sppt												integer :: sppt
real :: gridpt_stddev_sppt										real :: gridpt_stddev_sppt
real :: stddev_cutoff_sppt										real :: stddev_cutoff_sppt
real :: lengthscale_sppt										real :: lengthscale_sppt
real :: timescale_sppt											real :: timescale_sppt
integer :: sppt_vertstruc										integer :: sppt_vertstruc
integer :: iseed_sppt											integer :: iseed_sppt
integer :: rand_perturb											integer :: rand_perturb
real :: gridpt_stddev_rand_pert										real :: gridpt_stddev_rand_pert
real :: stddev_cutoff_rand_pert										real :: stddev_cutoff_rand_pert
real :: lengthscale_rand_pert										real :: lengthscale_rand_pert
real :: timescale_rand_pert										real :: timescale_rand_pert
integer :: rand_pert_vertstruc										integer :: rand_pert_vertstruc
integer :: iseed_rand_pert										integer :: iseed_rand_pert
integer :: spp											   <
logical :: hrrr_cycling										   <
integer :: spp_conv										   <
real :: gridpt_stddev_spp_conv									   <
real :: stddev_cutoff_spp_conv									   <
real :: lengthscale_spp_conv									   <
real :: timescale_spp_conv									   <
integer :: vertstruc_spp_conv									   <
integer :: iseed_spp_conv									   <
integer :: spp_pbl										   <
real :: gridpt_stddev_spp_pbl									   <
real :: stddev_cutoff_spp_pbl									   <
real :: lengthscale_spp_pbl									   <
real :: timescale_spp_pbl									   <
integer :: vertstruc_spp_pbl									   <
integer :: iseed_spp_pbl									   <
integer :: spp_lsm										   <
real :: gridpt_stddev_spp_lsm									   <
real :: stddev_cutoff_spp_lsm									   <
real :: lengthscale_spp_lsm									   <
real :: timescale_spp_lsm									   <
integer :: vertstruc_spp_lsm									   <
integer :: iseed_spp_lsm									   <
integer :: skebs_on											integer :: skebs_on
integer :: sppt_on											integer :: sppt_on
integer :: spp_on										   <
integer :: rand_perturb_on										integer :: rand_perturb_on
integer :: num_stoch_levels										integer :: num_stoch_levels
integer :: sfs_opt											integer :: sfs_opt
integer :: m_opt											integer :: m_opt
real :: lakedepth_default										real :: lakedepth_default
real :: lake_min_elev											real :: lake_min_elev
integer :: use_lakedepth										integer :: use_lakedepth
integer :: p_lev_diags											integer :: p_lev_diags
integer :: p_lev_diags_dfi										integer :: p_lev_diags_dfi
integer :: num_press_levels										integer :: num_press_levels
real :: press_levels											real :: press_levels
integer :: use_tot_or_hyd_p										integer :: use_tot_or_hyd_p
integer :: extrap_below_grnd										integer :: extrap_below_grnd
real :: p_lev_missing											real :: p_lev_missing
real :: p_lev_interval											real :: p_lev_interval
integer :: z_lev_diags											integer :: z_lev_diags
integer :: z_lev_diags_dfi										integer :: z_lev_diags_dfi
integer :: num_z_levels											integer :: num_z_levels
real :: z_levels											real :: z_levels
real :: z_lev_missing											real :: z_lev_missing
real :: z_lev_interval											real :: z_lev_interval
integer :: afwa_diag_opt										integer :: afwa_diag_opt
integer :: afwa_ptype_opt										integer :: afwa_ptype_opt
integer :: afwa_vil_opt											integer :: afwa_vil_opt
integer :: afwa_radar_opt										integer :: afwa_radar_opt
integer :: afwa_severe_opt										integer :: afwa_severe_opt
integer :: afwa_icing_opt										integer :: afwa_icing_opt
integer :: afwa_vis_opt											integer :: afwa_vis_opt
integer :: afwa_cloud_opt										integer :: afwa_cloud_opt
integer :: afwa_therm_opt										integer :: afwa_therm_opt
integer :: afwa_turb_opt										integer :: afwa_turb_opt
integer :: afwa_buoy_opt										integer :: afwa_buoy_opt
												   >	integer :: afwa_hailcast_opt
real :: afwa_ptype_ccn_tmp										real :: afwa_ptype_ccn_tmp
real :: afwa_ptype_tot_melt										real :: afwa_ptype_tot_melt
integer :: afwa_bad_data_check										integer :: afwa_bad_data_check
integer :: perturb_bdy											integer :: perturb_bdy
integer :: perturb_chem_bdy										integer :: perturb_chem_bdy
integer :: chem_opt											integer :: chem_opt
integer    :: last_item_in_struct									integer    :: last_item_in_struct
!ENDOFREGISTRYGENERATEDINCLUDE										!ENDOFREGISTRYGENERATEDINCLUDE
>                                                 
>=================================================================================
>  inc/namelist_defines.inc
>=================================================================================
!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defines.inc'						!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_defines.inc'
!													!
! WARNING This file is generated automatically by use_registry						! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.							! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.							! Do not edit.  Your changes to this file will be lost.
!													!
integer    :: first_item_in_struct									integer    :: first_item_in_struct
integer :: run_days											integer :: run_days
integer :: run_hours											integer :: run_hours
integer :: run_minutes											integer :: run_minutes
integer :: run_seconds											integer :: run_seconds
integer , DIMENSION(max_domains) :: start_year								integer , DIMENSION(max_domains) :: start_year
integer , DIMENSION(max_domains) :: start_month								integer , DIMENSION(max_domains) :: start_month
integer , DIMENSION(max_domains) :: start_day								integer , DIMENSION(max_domains) :: start_day
integer , DIMENSION(max_domains) :: start_hour								integer , DIMENSION(max_domains) :: start_hour
integer , DIMENSION(max_domains) :: start_minute							integer , DIMENSION(max_domains) :: start_minute
integer , DIMENSION(max_domains) :: start_second							integer , DIMENSION(max_domains) :: start_second
integer , DIMENSION(max_domains) :: end_year								integer , DIMENSION(max_domains) :: end_year
integer , DIMENSION(max_domains) :: end_month								integer , DIMENSION(max_domains) :: end_month
integer , DIMENSION(max_domains) :: end_day								integer , DIMENSION(max_domains) :: end_day
integer , DIMENSION(max_domains) :: end_hour								integer , DIMENSION(max_domains) :: end_hour
integer , DIMENSION(max_domains) :: end_minute								integer , DIMENSION(max_domains) :: end_minute
integer , DIMENSION(max_domains) :: end_second								integer , DIMENSION(max_domains) :: end_second
integer :: interval_seconds										integer :: interval_seconds
logical , DIMENSION(max_domains) :: input_from_file							logical , DIMENSION(max_domains) :: input_from_file
integer , DIMENSION(max_domains) :: fine_input_stream							integer , DIMENSION(max_domains) :: fine_input_stream
logical , DIMENSION(max_domains) :: input_from_hires							logical , DIMENSION(max_domains) :: input_from_hires
character*256 :: rsmas_data_path									character*256 :: rsmas_data_path
logical :: all_ic_times											logical :: all_ic_times
integer , DIMENSION(max_domains) :: julyr								integer , DIMENSION(max_domains) :: julyr
integer , DIMENSION(max_domains) :: julday								integer , DIMENSION(max_domains) :: julday
real , DIMENSION(max_domains) :: gmt									real , DIMENSION(max_domains) :: gmt
character*256 :: input_inname										character*256 :: input_inname
character*256 :: input_outname										character*256 :: input_outname
character*256 :: bdy_inname										character*256 :: bdy_inname
character*256 :: bdy_outname										character*256 :: bdy_outname
character*256 :: rst_inname										character*256 :: rst_inname
character*256 :: rst_outname										character*256 :: rst_outname
logical :: write_input											logical :: write_input
logical :: write_restart_at_0h										logical :: write_restart_at_0h
logical :: write_hist_at_0h_rst										logical :: write_hist_at_0h_rst
logical :: adjust_output_times										logical :: adjust_output_times
logical :: adjust_input_times										logical :: adjust_input_times
integer :: diag_print											integer :: diag_print
logical :: nocolons											logical :: nocolons
logical :: cycling											logical :: cycling
integer :: output_diagnostics										integer :: output_diagnostics
integer :: nwp_diagnostics										integer :: nwp_diagnostics
logical :: output_ready_flag										logical :: output_ready_flag
logical :: usepio											logical :: usepio
integer :: pioprocs											integer :: pioprocs
integer :: piostart											integer :: piostart
integer :: piostride											integer :: piostride
integer :: pioshift											integer :: pioshift
integer :: dfi_opt											integer :: dfi_opt
integer :: dfi_savehydmeteors										integer :: dfi_savehydmeteors
integer :: dfi_nfilter											integer :: dfi_nfilter
logical :: dfi_write_filtered_input									logical :: dfi_write_filtered_input
logical :: dfi_write_dfi_history									logical :: dfi_write_dfi_history
integer :: dfi_cutoff_seconds										integer :: dfi_cutoff_seconds
integer :: dfi_time_dim											integer :: dfi_time_dim
integer :: dfi_fwdstop_year										integer :: dfi_fwdstop_year
integer :: dfi_fwdstop_month										integer :: dfi_fwdstop_month
integer :: dfi_fwdstop_day										integer :: dfi_fwdstop_day
integer :: dfi_fwdstop_hour										integer :: dfi_fwdstop_hour
integer :: dfi_fwdstop_minute										integer :: dfi_fwdstop_minute
integer :: dfi_fwdstop_second										integer :: dfi_fwdstop_second
integer :: dfi_bckstop_year										integer :: dfi_bckstop_year
integer :: dfi_bckstop_month										integer :: dfi_bckstop_month
integer :: dfi_bckstop_day										integer :: dfi_bckstop_day
integer :: dfi_bckstop_hour										integer :: dfi_bckstop_hour
integer :: dfi_bckstop_minute										integer :: dfi_bckstop_minute
integer :: dfi_bckstop_second										integer :: dfi_bckstop_second
integer :: time_step											integer :: time_step
integer :: time_step_fract_num										integer :: time_step_fract_num
integer :: time_step_fract_den										integer :: time_step_fract_den
integer :: time_step_dfi										integer :: time_step_dfi
integer , DIMENSION(max_domains) :: min_time_step							integer , DIMENSION(max_domains) :: min_time_step
integer , DIMENSION(max_domains) :: min_time_step_den							integer , DIMENSION(max_domains) :: min_time_step_den
integer , DIMENSION(max_domains) :: max_time_step							integer , DIMENSION(max_domains) :: max_time_step
integer , DIMENSION(max_domains) :: max_time_step_den							integer , DIMENSION(max_domains) :: max_time_step_den
real , DIMENSION(max_domains) :: target_cfl								real , DIMENSION(max_domains) :: target_cfl
real , DIMENSION(max_domains) :: target_hcfl								real , DIMENSION(max_domains) :: target_hcfl
integer , DIMENSION(max_domains) :: max_step_increase_pct						integer , DIMENSION(max_domains) :: max_step_increase_pct
integer , DIMENSION(max_domains) :: starting_time_step							integer , DIMENSION(max_domains) :: starting_time_step
integer , DIMENSION(max_domains) :: starting_time_step_den						integer , DIMENSION(max_domains) :: starting_time_step_den
logical :: step_to_output_time										logical :: step_to_output_time
integer :: adaptation_domain										integer :: adaptation_domain
logical :: use_adaptive_time_step									logical :: use_adaptive_time_step
logical :: use_adaptive_time_step_dfi									logical :: use_adaptive_time_step_dfi
integer :: max_dom											integer :: max_dom
integer :: lats_to_mic											integer :: lats_to_mic
integer , DIMENSION(max_domains) :: s_we								integer , DIMENSION(max_domains) :: s_we
integer , DIMENSION(max_domains) :: e_we								integer , DIMENSION(max_domains) :: e_we
integer , DIMENSION(max_domains) :: s_sn								integer , DIMENSION(max_domains) :: s_sn
integer , DIMENSION(max_domains) :: e_sn								integer , DIMENSION(max_domains) :: e_sn
integer , DIMENSION(max_domains) :: s_vert								integer , DIMENSION(max_domains) :: s_vert
integer , DIMENSION(max_domains) :: e_vert								integer , DIMENSION(max_domains) :: e_vert
integer :: num_metgrid_levels										integer :: num_metgrid_levels
integer :: num_metgrid_soil_levels									integer :: num_metgrid_soil_levels
real :: p_top_requested											real :: p_top_requested
logical :: interp_theta											logical :: interp_theta
integer :: interp_type											integer :: interp_type
integer :: rebalance										   <
integer , DIMENSION(max_domains) :: vert_refine_method							integer , DIMENSION(max_domains) :: vert_refine_method
integer :: vert_refine_fact										integer :: vert_refine_fact
integer :: extrap_type											integer :: extrap_type
integer :: t_extrap_type										integer :: t_extrap_type
integer :: hypsometric_opt										integer :: hypsometric_opt
logical :: lowest_lev_from_sfc										logical :: lowest_lev_from_sfc
logical :: use_levels_below_ground									logical :: use_levels_below_ground
logical :: use_tavg_for_tsk										logical :: use_tavg_for_tsk
logical :: use_surface											logical :: use_surface
integer :: lagrange_order										integer :: lagrange_order
integer :: force_sfc_in_vinterp										integer :: force_sfc_in_vinterp
real :: zap_close_levels										real :: zap_close_levels
real :: maxw_horiz_pres_diff										real :: maxw_horiz_pres_diff
real :: trop_horiz_pres_diff										real :: trop_horiz_pres_diff
real :: maxw_above_this_level										real :: maxw_above_this_level
integer :: use_maxw_level										integer :: use_maxw_level
integer :: use_trop_level										integer :: use_trop_level
logical :: sfcp_to_sfcp											logical :: sfcp_to_sfcp
logical :: adjust_heights										logical :: adjust_heights
logical :: smooth_cg_topo										logical :: smooth_cg_topo
integer :: nest_interp_coord										integer :: nest_interp_coord
integer :: interp_method_type										integer :: interp_method_type
logical :: aggregate_lu											logical :: aggregate_lu
logical :: rh2qv_wrt_liquid										logical :: rh2qv_wrt_liquid
integer :: rh2qv_method											integer :: rh2qv_method
real :: qv_max_p_safe											real :: qv_max_p_safe
real :: qv_max_flag											real :: qv_max_flag
real :: qv_max_value											real :: qv_max_value
real :: qv_min_p_safe											real :: qv_min_p_safe
real :: qv_min_flag											real :: qv_min_flag
real :: qv_min_value											real :: qv_min_value
integer :: ideal_init_method									   <
real , DIMENSION(max_domains) :: dx									real , DIMENSION(max_domains) :: dx
real , DIMENSION(max_domains) :: dy									real , DIMENSION(max_domains) :: dy
integer , DIMENSION(max_domains) :: grid_id								integer , DIMENSION(max_domains) :: grid_id
logical , DIMENSION(max_domains) :: grid_allowed							logical , DIMENSION(max_domains) :: grid_allowed
integer , DIMENSION(max_domains) :: parent_id								integer , DIMENSION(max_domains) :: parent_id
integer , DIMENSION(max_domains) :: i_parent_start							integer , DIMENSION(max_domains) :: i_parent_start
integer , DIMENSION(max_domains) :: j_parent_start							integer , DIMENSION(max_domains) :: j_parent_start
integer , DIMENSION(max_domains) :: parent_grid_ratio							integer , DIMENSION(max_domains) :: parent_grid_ratio
integer , DIMENSION(max_domains) :: parent_time_step_ratio						integer , DIMENSION(max_domains) :: parent_time_step_ratio
integer :: feedback											integer :: feedback
integer :: smooth_option										integer :: smooth_option
integer :: blend_width											integer :: blend_width
real , DIMENSION(max_domains) :: ztop									real , DIMENSION(max_domains) :: ztop
integer , DIMENSION(max_domains) :: moad_grid_ratio							integer , DIMENSION(max_domains) :: moad_grid_ratio
integer , DIMENSION(max_domains) :: moad_time_step_ratio						integer , DIMENSION(max_domains) :: moad_time_step_ratio
integer , DIMENSION(max_domains) :: shw									integer , DIMENSION(max_domains) :: shw
integer :: tile_sz_x											integer :: tile_sz_x
integer :: tile_sz_y											integer :: tile_sz_y
integer :: numtiles											integer :: numtiles
integer :: numtiles_inc											integer :: numtiles_inc
integer :: numtiles_x											integer :: numtiles_x
integer :: numtiles_y											integer :: numtiles_y
integer :: tile_strategy										integer :: tile_strategy
integer :: nproc_x											integer :: nproc_x
integer :: nproc_y											integer :: nproc_y
integer :: irand											integer :: irand
real , DIMENSION(max_domains) :: dt									real , DIMENSION(max_domains) :: dt
integer :: fft_used											integer :: fft_used
integer :: cu_used											integer :: cu_used
integer :: shcu_used											integer :: shcu_used
integer :: cam_used											integer :: cam_used
integer :: alloc_qndropsource										integer :: alloc_qndropsource
integer :: num_moves											integer :: num_moves
integer :: ts_buf_size											integer :: ts_buf_size
integer :: max_ts_locs											integer :: max_ts_locs
integer , DIMENSION(max_domains) :: vortex_interval							integer , DIMENSION(max_domains) :: vortex_interval
integer , DIMENSION(max_domains) :: max_vortex_speed							integer , DIMENSION(max_domains) :: max_vortex_speed
integer , DIMENSION(max_domains) :: corral_dist								integer , DIMENSION(max_domains) :: corral_dist
integer :: track_level											integer :: track_level
real , DIMENSION(max_domains) :: time_to_move								real , DIMENSION(max_domains) :: time_to_move
integer , DIMENSION(max_moves) :: move_id								integer , DIMENSION(max_moves) :: move_id
integer , DIMENSION(max_moves) :: move_interval								integer , DIMENSION(max_moves) :: move_interval
integer , DIMENSION(max_moves) :: move_cd_x								integer , DIMENSION(max_moves) :: move_cd_x
integer , DIMENSION(max_moves) :: move_cd_y								integer , DIMENSION(max_moves) :: move_cd_y
logical , DIMENSION(max_domains) :: swap_x								logical , DIMENSION(max_domains) :: swap_x
logical , DIMENSION(max_domains) :: swap_y								logical , DIMENSION(max_domains) :: swap_y
logical , DIMENSION(max_domains) :: cycle_x								logical , DIMENSION(max_domains) :: cycle_x
logical , DIMENSION(max_domains) :: cycle_y								logical , DIMENSION(max_domains) :: cycle_y
logical :: reorder_mesh											logical :: reorder_mesh
logical :: perturb_input										logical :: perturb_input
real , DIMENSION(max_eta) :: eta_levels									real , DIMENSION(max_eta) :: eta_levels
real :: max_dz												real :: max_dz
integer :: ocean_levels											integer :: ocean_levels
real , DIMENSION(max_ocean) :: ocean_z									real , DIMENSION(max_ocean) :: ocean_z
real , DIMENSION(max_ocean) :: ocean_t									real , DIMENSION(max_ocean) :: ocean_t
real , DIMENSION(max_ocean) :: ocean_s									real , DIMENSION(max_ocean) :: ocean_s
integer :: num_traj											integer :: num_traj
real , DIMENSION(max_eta) :: chm_sections								real , DIMENSION(max_eta) :: chm_sections
integer :: max_ts_level											integer :: max_ts_level
integer :: track_loc_in											integer :: track_loc_in
integer :: num_ext_model_couple_dom									integer :: num_ext_model_couple_dom
logical :: insert_bogus_storm										logical :: insert_bogus_storm
logical :: remove_storm											logical :: remove_storm
integer :: num_storm											integer :: num_storm
real , DIMENSION(max_bogus) :: latc_loc									real , DIMENSION(max_bogus) :: latc_loc
real , DIMENSION(max_bogus) :: lonc_loc									real , DIMENSION(max_bogus) :: lonc_loc
real , DIMENSION(max_bogus) :: vmax_meters_per_second							real , DIMENSION(max_bogus) :: vmax_meters_per_second
real , DIMENSION(max_bogus) :: rmax									real , DIMENSION(max_bogus) :: rmax
real , DIMENSION(max_bogus) :: vmax_ratio								real , DIMENSION(max_bogus) :: vmax_ratio
real :: rankine_lid											real :: rankine_lid
character*256 :: physics_suite									   <
logical :: force_read_thompson										logical :: force_read_thompson
logical :: write_thompson_tables									logical :: write_thompson_tables
integer , DIMENSION(max_domains) :: mp_physics								integer , DIMENSION(max_domains) :: mp_physics
real , DIMENSION(max_domains) :: nssl_cccn								real , DIMENSION(max_domains) :: nssl_cccn
real , DIMENSION(max_domains) :: nssl_alphah								real , DIMENSION(max_domains) :: nssl_alphah
real , DIMENSION(max_domains) :: nssl_alphahl								real , DIMENSION(max_domains) :: nssl_alphahl
real , DIMENSION(max_domains) :: nssl_cnoh								real , DIMENSION(max_domains) :: nssl_cnoh
real , DIMENSION(max_domains) :: nssl_cnohl								real , DIMENSION(max_domains) :: nssl_cnohl
real , DIMENSION(max_domains) :: nssl_cnor								real , DIMENSION(max_domains) :: nssl_cnor
real , DIMENSION(max_domains) :: nssl_cnos								real , DIMENSION(max_domains) :: nssl_cnos
real , DIMENSION(max_domains) :: nssl_rho_qh								real , DIMENSION(max_domains) :: nssl_rho_qh
real , DIMENSION(max_domains) :: nssl_rho_qhl								real , DIMENSION(max_domains) :: nssl_rho_qhl
real , DIMENSION(max_domains) :: nssl_rho_qs								real , DIMENSION(max_domains) :: nssl_rho_qs
integer , DIMENSION(max_domains) :: nudge_lightning						   <
integer , DIMENSION(max_domains) :: nudge_light_times						   <
integer , DIMENSION(max_domains) :: nudge_light_timee						   <
integer , DIMENSION(max_domains) :: nudge_light_int						   <
character*256 :: path_to_files									   <
integer :: gsfcgce_hail											integer :: gsfcgce_hail
integer :: gsfcgce_2ice											integer :: gsfcgce_2ice
integer , DIMENSION(max_domains) :: progn								integer , DIMENSION(max_domains) :: progn
real :: accum_mode											real :: accum_mode
real :: aitken_mode											real :: aitken_mode
real :: coarse_mode											real :: coarse_mode
integer :: do_radar_ref											integer :: do_radar_ref
integer :: compute_radar_ref										integer :: compute_radar_ref
integer , DIMENSION(max_domains) :: ra_lw_physics							integer , DIMENSION(max_domains) :: ra_lw_physics
integer , DIMENSION(max_domains) :: ra_sw_physics							integer , DIMENSION(max_domains) :: ra_sw_physics
real , DIMENSION(max_domains) :: radt									real , DIMENSION(max_domains) :: radt
real , DIMENSION(max_domains) :: naer									real , DIMENSION(max_domains) :: naer
integer , DIMENSION(max_domains) :: sf_sfclay_physics							integer , DIMENSION(max_domains) :: sf_sfclay_physics
integer , DIMENSION(max_domains) :: sf_surface_physics							integer , DIMENSION(max_domains) :: sf_surface_physics
integer , DIMENSION(max_domains) :: bl_pbl_physics							integer , DIMENSION(max_domains) :: bl_pbl_physics
integer , DIMENSION(max_domains) :: bl_mynn_tkebudget							integer , DIMENSION(max_domains) :: bl_mynn_tkebudget
integer :: ysu_topdown_pblmix										integer :: ysu_topdown_pblmix
integer , DIMENSION(max_domains) :: shinhong_tke_diag							integer , DIMENSION(max_domains) :: shinhong_tke_diag
logical , DIMENSION(max_domains) :: bl_mynn_tkeadvect							logical , DIMENSION(max_domains) :: bl_mynn_tkeadvect
integer :: bl_mynn_cloudpdf										integer :: bl_mynn_cloudpdf
integer :: bl_mynn_mixlength									   <
integer , DIMENSION(max_domains) :: bl_mynn_edmf						   <
integer , DIMENSION(max_domains) :: bl_mynn_edmf_mom						   <
integer , DIMENSION(max_domains) :: bl_mynn_edmf_tke						   <
integer , DIMENSION(max_domains) :: bl_mynn_edmf_part						   <
integer , DIMENSION(max_domains) :: bl_mynn_cloudmix						   <
integer , DIMENSION(max_domains) :: bl_mynn_mixqt						   <
integer :: icloud_bl										   <
integer , DIMENSION(max_domains) :: mfshconv								integer , DIMENSION(max_domains) :: mfshconv
integer , DIMENSION(max_domains) :: sf_urban_physics							integer , DIMENSION(max_domains) :: sf_urban_physics
real , DIMENSION(max_domains) :: bldt									real , DIMENSION(max_domains) :: bldt
integer , DIMENSION(max_domains) :: cu_physics								integer , DIMENSION(max_domains) :: cu_physics
integer , DIMENSION(max_domains) :: shcu_physics							integer , DIMENSION(max_domains) :: shcu_physics
integer , DIMENSION(max_domains) :: cu_diag								integer , DIMENSION(max_domains) :: cu_diag
integer , DIMENSION(max_domains) :: kf_edrates							   <
integer :: kfeta_trigger										integer :: kfeta_trigger
integer :: nsas_dx_factor										integer :: nsas_dx_factor
real , DIMENSION(max_domains) :: cudt									real , DIMENSION(max_domains) :: cudt
real , DIMENSION(max_domains) :: gsmdt									real , DIMENSION(max_domains) :: gsmdt
integer :: isfflx											integer :: isfflx
integer :: ifsnow											integer :: ifsnow
integer :: icloud											integer :: icloud
integer :: ideal_xland											integer :: ideal_xland
real :: swrad_scat											real :: swrad_scat
integer :: surface_input_source										integer :: surface_input_source
integer :: num_soil_layers										integer :: num_soil_layers
integer :: maxpatch											integer :: maxpatch
integer :: num_snow_layers										integer :: num_snow_layers
integer :: num_snso_layers										integer :: num_snso_layers
integer :: num_urban_layers										integer :: num_urban_layers
integer :: num_urban_hi											integer :: num_urban_hi
integer :: num_months											integer :: num_months
integer :: sf_surface_mosaic										integer :: sf_surface_mosaic
integer :: mosaic_cat											integer :: mosaic_cat
integer :: mosaic_cat_soil										integer :: mosaic_cat_soil
integer :: mosaic_lu											integer :: mosaic_lu
integer :: mosaic_soil											integer :: mosaic_soil
integer :: maxiens											integer :: maxiens
integer :: maxens											integer :: maxens
integer :: maxens2											integer :: maxens2
integer :: maxens3											integer :: maxens3
integer :: ensdim											integer :: ensdim
integer :: cugd_avedx											integer :: cugd_avedx
integer :: clos_choice											integer :: clos_choice
integer :: imomentum											integer :: imomentum
integer :: ishallow											integer :: ishallow
real :: convtrans_avglen_m										real :: convtrans_avglen_m
integer :: num_land_cat											integer :: num_land_cat
integer :: num_soil_cat											integer :: num_soil_cat
integer :: mp_zero_out											integer :: mp_zero_out
real :: mp_zero_out_thresh										real :: mp_zero_out_thresh
real :: seaice_threshold										real :: seaice_threshold
integer :: sst_update											integer :: sst_update
integer :: sst_skin											integer :: sst_skin
integer :: tmn_update											integer :: tmn_update
logical :: usemonalb											logical :: usemonalb
logical :: rdmaxalb											logical :: rdmaxalb
logical :: rdlai2d											logical :: rdlai2d
logical :: ua_phys											logical :: ua_phys
integer :: opt_thcnd										   <
integer :: co2tf											integer :: co2tf
integer :: ra_call_offset										integer :: ra_call_offset
real :: cam_abs_freq_s											real :: cam_abs_freq_s
integer :: levsiz											integer :: levsiz
integer :: paerlev											integer :: paerlev
integer :: cam_abs_dim1											integer :: cam_abs_dim1
integer :: cam_abs_dim2											integer :: cam_abs_dim2
integer :: lagday											integer :: lagday
integer :: no_src_types											integer :: no_src_types
integer :: alevsiz											integer :: alevsiz
integer :: o3input											integer :: o3input
integer :: aer_opt											integer :: aer_opt
integer :: swint_opt											integer :: swint_opt
integer , DIMENSION(max_domains) :: aer_type								integer , DIMENSION(max_domains) :: aer_type
integer , DIMENSION(max_domains) :: aer_aod550_opt							integer , DIMENSION(max_domains) :: aer_aod550_opt
integer , DIMENSION(max_domains) :: aer_angexp_opt							integer , DIMENSION(max_domains) :: aer_angexp_opt
integer , DIMENSION(max_domains) :: aer_ssa_opt								integer , DIMENSION(max_domains) :: aer_ssa_opt
integer , DIMENSION(max_domains) :: aer_asy_opt								integer , DIMENSION(max_domains) :: aer_asy_opt
real , DIMENSION(max_domains) :: aer_aod550_val								real , DIMENSION(max_domains) :: aer_aod550_val
real , DIMENSION(max_domains) :: aer_angexp_val								real , DIMENSION(max_domains) :: aer_angexp_val
real , DIMENSION(max_domains) :: aer_ssa_val								real , DIMENSION(max_domains) :: aer_ssa_val
real , DIMENSION(max_domains) :: aer_asy_val								real , DIMENSION(max_domains) :: aer_asy_val
logical , DIMENSION(max_domains) :: cu_rad_feedback							logical , DIMENSION(max_domains) :: cu_rad_feedback
logical , DIMENSION(max_domains) :: shallowcu_forced_ra							logical , DIMENSION(max_domains) :: shallowcu_forced_ra
integer , DIMENSION(max_domains) :: numbins								integer , DIMENSION(max_domains) :: numbins
real , DIMENSION(max_domains) :: thbinsize								real , DIMENSION(max_domains) :: thbinsize
real , DIMENSION(max_domains) :: rbinsize								real , DIMENSION(max_domains) :: rbinsize
real , DIMENSION(max_domains) :: mindeepfreq								real , DIMENSION(max_domains) :: mindeepfreq
real , DIMENSION(max_domains) :: minshallowfreq								real , DIMENSION(max_domains) :: minshallowfreq
integer , DIMENSION(max_domains) :: shcu_aerosols_opt							integer , DIMENSION(max_domains) :: shcu_aerosols_opt
integer , DIMENSION(max_domains) :: icloud_cu							   |	integer :: icloud_cu
integer , DIMENSION(max_domains) :: pxlsm_smois_init							integer , DIMENSION(max_domains) :: pxlsm_smois_init
integer :: omlcall											integer :: omlcall
integer :: sf_ocean_physics										integer :: sf_ocean_physics
integer :: traj_opt											integer :: traj_opt
logical , DIMENSION(max_domains) :: dm_has_traj							   <
integer :: tracercall											integer :: tracercall
real :: omdt												real :: omdt
real :: oml_hml0											real :: oml_hml0
real :: oml_gamma											real :: oml_gamma
real :: oml_relaxation_time									   <
integer :: isftcflx											integer :: isftcflx
integer :: iz0tlnd											integer :: iz0tlnd
real :: shadlen												real :: shadlen
integer , DIMENSION(max_domains) :: slope_rad								integer , DIMENSION(max_domains) :: slope_rad
integer , DIMENSION(max_domains) :: topo_shading							integer , DIMENSION(max_domains) :: topo_shading
integer , DIMENSION(max_domains) :: topo_wind								integer , DIMENSION(max_domains) :: topo_wind
integer :: no_mp_heating										integer :: no_mp_heating
integer :: fractional_seaice										integer :: fractional_seaice
integer :: seaice_snowdepth_opt										integer :: seaice_snowdepth_opt
real :: seaice_snowdepth_max										real :: seaice_snowdepth_max
real :: seaice_snowdepth_min										real :: seaice_snowdepth_min
integer :: seaice_albedo_opt										integer :: seaice_albedo_opt
real :: seaice_albedo_default										real :: seaice_albedo_default
integer :: seaice_thickness_opt										integer :: seaice_thickness_opt
real :: seaice_thickness_default									real :: seaice_thickness_default
logical :: tice2tsk_if2cold										logical :: tice2tsk_if2cold
real :: bucket_mm											real :: bucket_mm
real :: bucket_j											real :: bucket_j
real :: mp_tend_lim											real :: mp_tend_lim
real , DIMENSION(max_domains) :: prec_acc_dt								real , DIMENSION(max_domains) :: prec_acc_dt
integer :: prec_acc_opt											integer :: prec_acc_opt
integer :: bucketr_opt											integer :: bucketr_opt
integer :: bucketf_opt										   <
integer :: process_time_series										integer :: process_time_series
integer , DIMENSION(max_domains) :: grav_settling							integer , DIMENSION(max_domains) :: grav_settling
real , DIMENSION(max_domains) :: sas_pgcon								real , DIMENSION(max_domains) :: sas_pgcon
integer , DIMENSION(max_domains) :: scalar_pblmix							integer , DIMENSION(max_domains) :: scalar_pblmix
integer , DIMENSION(max_domains) :: tracer_pblmix							integer , DIMENSION(max_domains) :: tracer_pblmix
logical :: use_aero_icbc										logical :: use_aero_icbc
logical :: use_rap_aero_icbc										logical :: use_rap_aero_icbc
integer :: use_mp_re										   <
integer :: direct_feed_chimere										integer :: direct_feed_chimere
integer :: indirect_feed_chimere									integer :: indirect_feed_chimere
integer :: n_bin											integer :: n_bin
real :: ccn_conc											real :: ccn_conc
integer :: hail_opt											integer :: hail_opt
integer :: dveg												integer :: dveg
integer :: opt_crs											integer :: opt_crs
integer :: opt_btr											integer :: opt_btr
integer :: opt_run											integer :: opt_run
integer :: opt_sfc											integer :: opt_sfc
integer :: opt_frz											integer :: opt_frz
integer :: opt_inf											integer :: opt_inf
integer :: opt_rad											integer :: opt_rad
integer :: opt_alb											integer :: opt_alb
integer :: opt_snf											integer :: opt_snf
integer :: opt_tbot											integer :: opt_tbot
integer :: opt_stc											integer :: opt_stc
integer :: opt_gla										   <
integer :: opt_rsf										   <
real , DIMENSION(max_domains) :: wtddt									real , DIMENSION(max_domains) :: wtddt
integer :: wrf_hydro											integer :: wrf_hydro
real , DIMENSION(max_domains) :: fgdt									real , DIMENSION(max_domains) :: fgdt
integer , DIMENSION(max_domains) :: fgdtzero								integer , DIMENSION(max_domains) :: fgdtzero
integer , DIMENSION(max_domains) :: grid_fdda								integer , DIMENSION(max_domains) :: grid_fdda
integer , DIMENSION(max_domains) :: grid_sfdda								integer , DIMENSION(max_domains) :: grid_sfdda
integer , DIMENSION(max_domains) :: if_no_pbl_nudging_uv						integer , DIMENSION(max_domains) :: if_no_pbl_nudging_uv
integer , DIMENSION(max_domains) :: if_no_pbl_nudging_t							integer , DIMENSION(max_domains) :: if_no_pbl_nudging_t
integer , DIMENSION(max_domains) :: if_no_pbl_nudging_ph						integer , DIMENSION(max_domains) :: if_no_pbl_nudging_ph
integer , DIMENSION(max_domains) :: if_no_pbl_nudging_q							integer , DIMENSION(max_domains) :: if_no_pbl_nudging_q
integer , DIMENSION(max_domains) :: if_zfac_uv								integer , DIMENSION(max_domains) :: if_zfac_uv
integer , DIMENSION(max_domains) :: k_zfac_uv								integer , DIMENSION(max_domains) :: k_zfac_uv
integer , DIMENSION(max_domains) :: if_zfac_t								integer , DIMENSION(max_domains) :: if_zfac_t
integer , DIMENSION(max_domains) :: k_zfac_t								integer , DIMENSION(max_domains) :: k_zfac_t
integer , DIMENSION(max_domains) :: if_zfac_ph								integer , DIMENSION(max_domains) :: if_zfac_ph
integer , DIMENSION(max_domains) :: k_zfac_ph								integer , DIMENSION(max_domains) :: k_zfac_ph
integer , DIMENSION(max_domains) :: if_zfac_q								integer , DIMENSION(max_domains) :: if_zfac_q
integer , DIMENSION(max_domains) :: k_zfac_q								integer , DIMENSION(max_domains) :: k_zfac_q
integer , DIMENSION(max_domains) :: dk_zfac_uv								integer , DIMENSION(max_domains) :: dk_zfac_uv
integer , DIMENSION(max_domains) :: dk_zfac_t								integer , DIMENSION(max_domains) :: dk_zfac_t
integer , DIMENSION(max_domains) :: dk_zfac_ph								integer , DIMENSION(max_domains) :: dk_zfac_ph
real , DIMENSION(max_domains) :: guv									real , DIMENSION(max_domains) :: guv
real , DIMENSION(max_domains) :: guv_sfc								real , DIMENSION(max_domains) :: guv_sfc
real , DIMENSION(max_domains) :: gt									real , DIMENSION(max_domains) :: gt
real , DIMENSION(max_domains) :: gt_sfc									real , DIMENSION(max_domains) :: gt_sfc
real , DIMENSION(max_domains) :: gq									real , DIMENSION(max_domains) :: gq
real , DIMENSION(max_domains) :: gq_sfc									real , DIMENSION(max_domains) :: gq_sfc
real , DIMENSION(max_domains) :: gph									real , DIMENSION(max_domains) :: gph
real :: dtramp_min											real :: dtramp_min
integer :: if_ramping											integer :: if_ramping
real , DIMENSION(max_domains) :: rinblw								   |	real :: rinblw
integer , DIMENSION(max_domains) :: xwavenum								integer , DIMENSION(max_domains) :: xwavenum
integer , DIMENSION(max_domains) :: ywavenum								integer , DIMENSION(max_domains) :: ywavenum
integer , DIMENSION(max_domains) :: pxlsm_soil_nudge							integer , DIMENSION(max_domains) :: pxlsm_soil_nudge
integer , DIMENSION(max_domains) :: fasdas							   <
integer , DIMENSION(max_domains) :: obs_nudge_opt							integer , DIMENSION(max_domains) :: obs_nudge_opt
integer :: max_obs											integer :: max_obs
real , DIMENSION(max_domains) :: fdda_start								real , DIMENSION(max_domains) :: fdda_start
real , DIMENSION(max_domains) :: fdda_end								real , DIMENSION(max_domains) :: fdda_end
integer , DIMENSION(max_domains) :: obs_nudge_wind							integer , DIMENSION(max_domains) :: obs_nudge_wind
real , DIMENSION(max_domains) :: obs_coef_wind								real , DIMENSION(max_domains) :: obs_coef_wind
integer , DIMENSION(max_domains) :: obs_nudge_temp							integer , DIMENSION(max_domains) :: obs_nudge_temp
real , DIMENSION(max_domains) :: obs_coef_temp								real , DIMENSION(max_domains) :: obs_coef_temp
integer , DIMENSION(max_domains) :: obs_nudge_mois							integer , DIMENSION(max_domains) :: obs_nudge_mois
real , DIMENSION(max_domains) :: obs_coef_mois								real , DIMENSION(max_domains) :: obs_coef_mois
integer , DIMENSION(max_domains) :: obs_nudge_pstr							integer , DIMENSION(max_domains) :: obs_nudge_pstr
real , DIMENSION(max_domains) :: obs_coef_pstr								real , DIMENSION(max_domains) :: obs_coef_pstr
integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_uv							integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_uv
integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_t							integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_t
integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_q							integer , DIMENSION(max_domains) :: obs_no_pbl_nudge_q
integer :: obs_sfc_scheme_horiz										integer :: obs_sfc_scheme_horiz
integer :: obs_sfc_scheme_vert										integer :: obs_sfc_scheme_vert
real :: obs_max_sndng_gap										real :: obs_max_sndng_gap
real :: obs_nudgezfullr1_uv										real :: obs_nudgezfullr1_uv
real :: obs_nudgezrampr1_uv										real :: obs_nudgezrampr1_uv
real :: obs_nudgezfullr2_uv										real :: obs_nudgezfullr2_uv
real :: obs_nudgezrampr2_uv										real :: obs_nudgezrampr2_uv
real :: obs_nudgezfullr4_uv										real :: obs_nudgezfullr4_uv
real :: obs_nudgezrampr4_uv										real :: obs_nudgezrampr4_uv
real :: obs_nudgezfullr1_t										real :: obs_nudgezfullr1_t
real :: obs_nudgezrampr1_t										real :: obs_nudgezrampr1_t
real :: obs_nudgezfullr2_t										real :: obs_nudgezfullr2_t
real :: obs_nudgezrampr2_t										real :: obs_nudgezrampr2_t
real :: obs_nudgezfullr4_t										real :: obs_nudgezfullr4_t
real :: obs_nudgezrampr4_t										real :: obs_nudgezrampr4_t
real :: obs_nudgezfullr1_q										real :: obs_nudgezfullr1_q
real :: obs_nudgezrampr1_q										real :: obs_nudgezrampr1_q
real :: obs_nudgezfullr2_q										real :: obs_nudgezfullr2_q
real :: obs_nudgezrampr2_q										real :: obs_nudgezrampr2_q
real :: obs_nudgezfullr4_q										real :: obs_nudgezfullr4_q
real :: obs_nudgezrampr4_q										real :: obs_nudgezrampr4_q
real :: obs_nudgezfullmin										real :: obs_nudgezfullmin
real :: obs_nudgezrampmin										real :: obs_nudgezrampmin
real :: obs_nudgezmax											real :: obs_nudgezmax
real :: obs_sfcfact											real :: obs_sfcfact
real :: obs_sfcfacr											real :: obs_sfcfacr
real :: obs_dpsmx											real :: obs_dpsmx
real , DIMENSION(max_domains) :: obs_rinxy								real , DIMENSION(max_domains) :: obs_rinxy
real :: obs_rinsig											real :: obs_rinsig
real , DIMENSION(max_domains) :: obs_twindo								real , DIMENSION(max_domains) :: obs_twindo
integer :: obs_npfi											integer :: obs_npfi
integer , DIMENSION(max_domains) :: obs_ionf								integer , DIMENSION(max_domains) :: obs_ionf
integer :: obs_idynin											integer :: obs_idynin
real :: obs_dtramp											real :: obs_dtramp
integer :: obs_prt_max											integer :: obs_prt_max
integer , DIMENSION(max_domains) :: obs_prt_freq							integer , DIMENSION(max_domains) :: obs_prt_freq
logical :: obs_ipf_in4dob										logical :: obs_ipf_in4dob
logical :: obs_ipf_errob										logical :: obs_ipf_errob
logical :: obs_ipf_nudob										logical :: obs_ipf_nudob
logical :: obs_ipf_init											logical :: obs_ipf_init
integer :: obs_scl_neg_qv_innov										integer :: obs_scl_neg_qv_innov
integer :: scm_force											integer :: scm_force
real :: scm_force_dx											real :: scm_force_dx
integer :: num_force_layers										integer :: num_force_layers
integer :: scm_lu_index											integer :: scm_lu_index
integer :: scm_isltyp											integer :: scm_isltyp
real :: scm_vegfra											real :: scm_vegfra
real :: scm_canwat										   |	integer :: scm_canwat
real :: scm_lat												real :: scm_lat
real :: scm_lon												real :: scm_lon
logical :: scm_th_t_tend										logical :: scm_th_t_tend
logical :: scm_qv_t_tend										logical :: scm_qv_t_tend
logical :: scm_th_adv											logical :: scm_th_adv
logical :: scm_wind_adv											logical :: scm_wind_adv
logical :: scm_qv_adv											logical :: scm_qv_adv
logical :: scm_ql_adv											logical :: scm_ql_adv
logical :: scm_vert_adv											logical :: scm_vert_adv
integer :: num_force_soil_layers									integer :: num_force_soil_layers
logical :: scm_soilt_force										logical :: scm_soilt_force
logical :: scm_soilq_force										logical :: scm_soilq_force
logical :: scm_force_th_largescale									logical :: scm_force_th_largescale
logical :: scm_force_qv_largescale									logical :: scm_force_qv_largescale
logical :: scm_force_ql_largescale									logical :: scm_force_ql_largescale
logical :: scm_force_wind_largescale									logical :: scm_force_wind_largescale
integer :: scm_force_skintemp										integer :: scm_force_skintemp
integer :: scm_force_flux										integer :: scm_force_flux
integer :: dyn_opt											integer :: dyn_opt
integer :: rk_ord											integer :: rk_ord
integer :: w_damping											integer :: w_damping
integer , DIMENSION(max_domains) :: diff_opt								integer , DIMENSION(max_domains) :: diff_opt
integer , DIMENSION(max_domains) :: diff_opt_dfi							integer , DIMENSION(max_domains) :: diff_opt_dfi
integer , DIMENSION(max_domains) :: km_opt								integer , DIMENSION(max_domains) :: km_opt
integer , DIMENSION(max_domains) :: km_opt_dfi								integer , DIMENSION(max_domains) :: km_opt_dfi
integer :: damp_opt											integer :: damp_opt
integer :: rad_nudge											integer :: rad_nudge
integer :: gwd_opt											integer :: gwd_opt
real :: max_rot_angle_gwd									   <
real , DIMENSION(max_domains) :: zdamp									real , DIMENSION(max_domains) :: zdamp
real , DIMENSION(max_domains) :: dampcoef								real , DIMENSION(max_domains) :: dampcoef
real , DIMENSION(max_domains) :: khdif									real , DIMENSION(max_domains) :: khdif
real , DIMENSION(max_domains) :: kvdif									real , DIMENSION(max_domains) :: kvdif
real , DIMENSION(max_domains) :: diff_6th_factor							real , DIMENSION(max_domains) :: diff_6th_factor
integer , DIMENSION(max_domains) :: diff_6th_opt							integer , DIMENSION(max_domains) :: diff_6th_opt
integer :: use_theta_m											integer :: use_theta_m
integer :: use_q_diabatic										integer :: use_q_diabatic
real , DIMENSION(max_domains) :: c_s									real , DIMENSION(max_domains) :: c_s
real , DIMENSION(max_domains) :: c_k									real , DIMENSION(max_domains) :: c_k
real , DIMENSION(max_domains) :: smdiv									real , DIMENSION(max_domains) :: smdiv
real , DIMENSION(max_domains) :: emdiv									real , DIMENSION(max_domains) :: emdiv
real , DIMENSION(max_domains) :: epssm									real , DIMENSION(max_domains) :: epssm
logical , DIMENSION(max_domains) :: non_hydrostatic							logical , DIMENSION(max_domains) :: non_hydrostatic
logical :: use_input_w											logical :: use_input_w
integer , DIMENSION(max_domains) :: time_step_sound							integer , DIMENSION(max_domains) :: time_step_sound
integer , DIMENSION(max_domains) :: h_mom_adv_order							integer , DIMENSION(max_domains) :: h_mom_adv_order
integer , DIMENSION(max_domains) :: v_mom_adv_order							integer , DIMENSION(max_domains) :: v_mom_adv_order
integer , DIMENSION(max_domains) :: h_sca_adv_order							integer , DIMENSION(max_domains) :: h_sca_adv_order
integer , DIMENSION(max_domains) :: v_sca_adv_order							integer , DIMENSION(max_domains) :: v_sca_adv_order
integer , DIMENSION(max_domains) :: momentum_adv_opt							integer , DIMENSION(max_domains) :: momentum_adv_opt
integer , DIMENSION(max_domains) :: moist_adv_opt							integer , DIMENSION(max_domains) :: moist_adv_opt
integer , DIMENSION(max_domains) :: moist_adv_dfi_opt							integer , DIMENSION(max_domains) :: moist_adv_dfi_opt
integer , DIMENSION(max_domains) :: chem_adv_opt							integer , DIMENSION(max_domains) :: chem_adv_opt
integer , DIMENSION(max_domains) :: tracer_adv_opt							integer , DIMENSION(max_domains) :: tracer_adv_opt
integer , DIMENSION(max_domains) :: scalar_adv_opt							integer , DIMENSION(max_domains) :: scalar_adv_opt
integer , DIMENSION(max_domains) :: tke_adv_opt								integer , DIMENSION(max_domains) :: tke_adv_opt
logical , DIMENSION(max_domains) :: top_radiation							logical , DIMENSION(max_domains) :: top_radiation
integer , DIMENSION(max_domains) :: mix_isotropic							integer , DIMENSION(max_domains) :: mix_isotropic
real , DIMENSION(max_domains) :: mix_upper_bound							real , DIMENSION(max_domains) :: mix_upper_bound
logical , DIMENSION(max_domains) :: top_lid								logical , DIMENSION(max_domains) :: top_lid
real , DIMENSION(max_domains) :: tke_upper_bound							real , DIMENSION(max_domains) :: tke_upper_bound
real , DIMENSION(max_domains) :: tke_drag_coefficient							real , DIMENSION(max_domains) :: tke_drag_coefficient
real , DIMENSION(max_domains) :: tke_heat_flux								real , DIMENSION(max_domains) :: tke_heat_flux
logical , DIMENSION(max_domains) :: pert_coriolis							logical , DIMENSION(max_domains) :: pert_coriolis
logical , DIMENSION(max_domains) :: coriolis2d								logical , DIMENSION(max_domains) :: coriolis2d
logical , DIMENSION(max_domains) :: mix_full_fields							logical , DIMENSION(max_domains) :: mix_full_fields
real :: base_pres											real :: base_pres
real :: base_temp											real :: base_temp
real :: base_lapse											real :: base_lapse
real :: iso_temp											real :: iso_temp
real :: base_pres_strat											real :: base_pres_strat
real :: base_lapse_strat										real :: base_lapse_strat
logical :: use_baseparam_fr_nml										logical :: use_baseparam_fr_nml
real :: fft_filter_lat											real :: fft_filter_lat
logical :: coupled_filtering										logical :: coupled_filtering
logical :: pos_def											logical :: pos_def
logical :: swap_pole_with_next_j									logical :: swap_pole_with_next_j
logical :: actual_distance_average									logical :: actual_distance_average
logical :: rotated_pole											logical :: rotated_pole
logical , DIMENSION(max_domains) :: do_coriolis								logical , DIMENSION(max_domains) :: do_coriolis
logical , DIMENSION(max_domains) :: do_curvature							logical , DIMENSION(max_domains) :: do_curvature
logical , DIMENSION(max_domains) :: do_gradp								logical , DIMENSION(max_domains) :: do_gradp
integer , DIMENSION(max_domains) :: tracer_opt								integer , DIMENSION(max_domains) :: tracer_opt
integer , DIMENSION(max_domains) :: tenddiag								integer , DIMENSION(max_domains) :: tenddiag
integer :: spec_bdy_width										integer :: spec_bdy_width
integer :: spec_zone											integer :: spec_zone
integer :: relax_zone											integer :: relax_zone
logical , DIMENSION(max_domains) :: specified								logical , DIMENSION(max_domains) :: specified
logical :: constant_bc											logical :: constant_bc
logical , DIMENSION(max_domains) :: periodic_x								logical , DIMENSION(max_domains) :: periodic_x
logical , DIMENSION(max_domains) :: symmetric_xs							logical , DIMENSION(max_domains) :: symmetric_xs
logical , DIMENSION(max_domains) :: symmetric_xe							logical , DIMENSION(max_domains) :: symmetric_xe
logical , DIMENSION(max_domains) :: open_xs								logical , DIMENSION(max_domains) :: open_xs
logical , DIMENSION(max_domains) :: open_xe								logical , DIMENSION(max_domains) :: open_xe
logical , DIMENSION(max_domains) :: periodic_y								logical , DIMENSION(max_domains) :: periodic_y
logical , DIMENSION(max_domains) :: symmetric_ys							logical , DIMENSION(max_domains) :: symmetric_ys
logical , DIMENSION(max_domains) :: symmetric_ye							logical , DIMENSION(max_domains) :: symmetric_ye
logical , DIMENSION(max_domains) :: open_ys								logical , DIMENSION(max_domains) :: open_ys
logical , DIMENSION(max_domains) :: open_ye								logical , DIMENSION(max_domains) :: open_ye
logical , DIMENSION(max_domains) :: polar								logical , DIMENSION(max_domains) :: polar
logical , DIMENSION(max_domains) :: nested								logical , DIMENSION(max_domains) :: nested
real :: spec_exp											real :: spec_exp
integer :: spec_bdy_final_mu										integer :: spec_bdy_final_mu
integer :: real_data_init_type										integer :: real_data_init_type
logical , DIMENSION(max_domains) :: have_bcs_moist							logical , DIMENSION(max_domains) :: have_bcs_moist
logical , DIMENSION(max_domains) :: have_bcs_scalar							logical , DIMENSION(max_domains) :: have_bcs_scalar
integer :: background_proc_id										integer :: background_proc_id
integer :: forecast_proc_id										integer :: forecast_proc_id
integer :: production_status										integer :: production_status
integer :: compression											integer :: compression
integer :: nobs_ndg_vars										integer :: nobs_ndg_vars
integer :: nobs_err_flds										integer :: nobs_err_flds
real , DIMENSION(max_domains) :: cen_lat								real , DIMENSION(max_domains) :: cen_lat
real , DIMENSION(max_domains) :: cen_lon								real , DIMENSION(max_domains) :: cen_lon
real , DIMENSION(max_domains) :: truelat1								real , DIMENSION(max_domains) :: truelat1
real , DIMENSION(max_domains) :: truelat2								real , DIMENSION(max_domains) :: truelat2
real , DIMENSION(max_domains) :: moad_cen_lat								real , DIMENSION(max_domains) :: moad_cen_lat
real , DIMENSION(max_domains) :: stand_lon								real , DIMENSION(max_domains) :: stand_lon
real , DIMENSION(max_domains) :: pole_lat								real , DIMENSION(max_domains) :: pole_lat
real , DIMENSION(max_domains) :: pole_lon								real , DIMENSION(max_domains) :: pole_lon
integer :: flag_metgrid											integer :: flag_metgrid
integer :: flag_snow											integer :: flag_snow
integer :: flag_psfc											integer :: flag_psfc
integer :: flag_sm000010										integer :: flag_sm000010
integer :: flag_sm010040										integer :: flag_sm010040
integer :: flag_sm040100										integer :: flag_sm040100
integer :: flag_sm100200										integer :: flag_sm100200
integer :: flag_st000010										integer :: flag_st000010
integer :: flag_st010040										integer :: flag_st010040
integer :: flag_st040100										integer :: flag_st040100
integer :: flag_st100200										integer :: flag_st100200
integer :: flag_soil_layers										integer :: flag_soil_layers
integer :: flag_slp											integer :: flag_slp
integer :: flag_soilhgt											integer :: flag_soilhgt
integer :: flag_mf_xy											integer :: flag_mf_xy
integer :: flag_um_soil											integer :: flag_um_soil
real , DIMENSION(max_domains) :: bdyfrq									real , DIMENSION(max_domains) :: bdyfrq
character*256 , DIMENSION(max_domains) :: mminlu							character*256 , DIMENSION(max_domains) :: mminlu
integer , DIMENSION(max_domains) :: iswater								integer , DIMENSION(max_domains) :: iswater
integer , DIMENSION(max_domains) :: islake								integer , DIMENSION(max_domains) :: islake
integer , DIMENSION(max_domains) :: isice								integer , DIMENSION(max_domains) :: isice
integer , DIMENSION(max_domains) :: isurban								integer , DIMENSION(max_domains) :: isurban
integer , DIMENSION(max_domains) :: isoilwater								integer , DIMENSION(max_domains) :: isoilwater
integer , DIMENSION(max_domains) :: map_proj								integer , DIMENSION(max_domains) :: map_proj
integer :: use_wps_input										integer :: use_wps_input
integer , DIMENSION(max_domains) :: dfi_stage								integer , DIMENSION(max_domains) :: dfi_stage
integer , DIMENSION(max_domains) :: mp_physics_dfi							integer , DIMENSION(max_domains) :: mp_physics_dfi
integer , DIMENSION(max_domains) :: bl_pbl_physics_dfi						   <
integer , DIMENSION(max_domains) :: windfarm_opt							integer , DIMENSION(max_domains) :: windfarm_opt
integer :: windfarm_ij											integer :: windfarm_ij
integer , DIMENSION(max_domains) :: hailcast_opt						   <
integer , DIMENSION(max_domains) :: lightning_option							integer , DIMENSION(max_domains) :: lightning_option
real , DIMENSION(max_domains) :: lightning_dt								real , DIMENSION(max_domains) :: lightning_dt
real , DIMENSION(max_domains) :: lightning_start_seconds						real , DIMENSION(max_domains) :: lightning_start_seconds
real , DIMENSION(max_domains) :: flashrate_factor							real , DIMENSION(max_domains) :: flashrate_factor
integer , DIMENSION(max_domains) :: iccg_method								integer , DIMENSION(max_domains) :: iccg_method
real , DIMENSION(max_domains) :: iccg_prescribed_num							real , DIMENSION(max_domains) :: iccg_prescribed_num
real , DIMENSION(max_domains) :: iccg_prescribed_den							real , DIMENSION(max_domains) :: iccg_prescribed_den
integer , DIMENSION(max_domains) :: cellcount_method							integer , DIMENSION(max_domains) :: cellcount_method
real , DIMENSION(max_domains) :: cldtop_adjustment							real , DIMENSION(max_domains) :: cldtop_adjustment
integer , DIMENSION(max_domains) :: sf_lake_physics							integer , DIMENSION(max_domains) :: sf_lake_physics
character*256 :: auxinput1_inname									character*256 :: auxinput1_inname
integer :: io_form_auxinput1										integer :: io_form_auxinput1
logical :: override_restart_timers									logical :: override_restart_timers
character*256 :: auxhist1_inname									character*256 :: auxhist1_inname
character*256 :: auxhist1_outname									character*256 :: auxhist1_outname
integer , DIMENSION(max_domains) :: auxhist1_interval_y							integer , DIMENSION(max_domains) :: auxhist1_interval_y
integer , DIMENSION(max_domains) :: auxhist1_interval_d							integer , DIMENSION(max_domains) :: auxhist1_interval_d
integer , DIMENSION(max_domains) :: auxhist1_interval_h							integer , DIMENSION(max_domains) :: auxhist1_interval_h
integer , DIMENSION(max_domains) :: auxhist1_interval_m							integer , DIMENSION(max_domains) :: auxhist1_interval_m
integer , DIMENSION(max_domains) :: auxhist1_interval_s							integer , DIMENSION(max_domains) :: auxhist1_interval_s
integer , DIMENSION(max_domains) :: auxhist1_interval							integer , DIMENSION(max_domains) :: auxhist1_interval
integer , DIMENSION(max_domains) :: auxhist1_begin_y							integer , DIMENSION(max_domains) :: auxhist1_begin_y
integer , DIMENSION(max_domains) :: auxhist1_begin_d							integer , DIMENSION(max_domains) :: auxhist1_begin_d
integer , DIMENSION(max_domains) :: auxhist1_begin_h							integer , DIMENSION(max_domains) :: auxhist1_begin_h
integer , DIMENSION(max_domains) :: auxhist1_begin_m							integer , DIMENSION(max_domains) :: auxhist1_begin_m
integer , DIMENSION(max_domains) :: auxhist1_begin_s							integer , DIMENSION(max_domains) :: auxhist1_begin_s
integer , DIMENSION(max_domains) :: auxhist1_begin							integer , DIMENSION(max_domains) :: auxhist1_begin
integer , DIMENSION(max_domains) :: auxhist1_end_y							integer , DIMENSION(max_domains) :: auxhist1_end_y
integer , DIMENSION(max_domains) :: auxhist1_end_d							integer , DIMENSION(max_domains) :: auxhist1_end_d
integer , DIMENSION(max_domains) :: auxhist1_end_h							integer , DIMENSION(max_domains) :: auxhist1_end_h
integer , DIMENSION(max_domains) :: auxhist1_end_m							integer , DIMENSION(max_domains) :: auxhist1_end_m
integer , DIMENSION(max_domains) :: auxhist1_end_s							integer , DIMENSION(max_domains) :: auxhist1_end_s
integer , DIMENSION(max_domains) :: auxhist1_end							integer , DIMENSION(max_domains) :: auxhist1_end
integer :: io_form_auxhist1										integer :: io_form_auxhist1
integer , DIMENSION(max_domains) :: frames_per_auxhist1							integer , DIMENSION(max_domains) :: frames_per_auxhist1
character*256 :: auxhist2_inname									character*256 :: auxhist2_inname
character*256 :: auxhist2_outname									character*256 :: auxhist2_outname
integer , DIMENSION(max_domains) :: auxhist2_interval_y							integer , DIMENSION(max_domains) :: auxhist2_interval_y
integer , DIMENSION(max_domains) :: auxhist2_interval_d							integer , DIMENSION(max_domains) :: auxhist2_interval_d
integer , DIMENSION(max_domains) :: auxhist2_interval_h							integer , DIMENSION(max_domains) :: auxhist2_interval_h
integer , DIMENSION(max_domains) :: auxhist2_interval_m							integer , DIMENSION(max_domains) :: auxhist2_interval_m
integer , DIMENSION(max_domains) :: auxhist2_interval_s							integer , DIMENSION(max_domains) :: auxhist2_interval_s
integer , DIMENSION(max_domains) :: auxhist2_interval							integer , DIMENSION(max_domains) :: auxhist2_interval
integer , DIMENSION(max_domains) :: auxhist2_begin_y							integer , DIMENSION(max_domains) :: auxhist2_begin_y
integer , DIMENSION(max_domains) :: auxhist2_begin_d							integer , DIMENSION(max_domains) :: auxhist2_begin_d
integer , DIMENSION(max_domains) :: auxhist2_begin_h							integer , DIMENSION(max_domains) :: auxhist2_begin_h
integer , DIMENSION(max_domains) :: auxhist2_begin_m							integer , DIMENSION(max_domains) :: auxhist2_begin_m
integer , DIMENSION(max_domains) :: auxhist2_begin_s							integer , DIMENSION(max_domains) :: auxhist2_begin_s
integer , DIMENSION(max_domains) :: auxhist2_begin							integer , DIMENSION(max_domains) :: auxhist2_begin
integer , DIMENSION(max_domains) :: auxhist2_end_y							integer , DIMENSION(max_domains) :: auxhist2_end_y
integer , DIMENSION(max_domains) :: auxhist2_end_d							integer , DIMENSION(max_domains) :: auxhist2_end_d
integer , DIMENSION(max_domains) :: auxhist2_end_h							integer , DIMENSION(max_domains) :: auxhist2_end_h
integer , DIMENSION(max_domains) :: auxhist2_end_m							integer , DIMENSION(max_domains) :: auxhist2_end_m
integer , DIMENSION(max_domains) :: auxhist2_end_s							integer , DIMENSION(max_domains) :: auxhist2_end_s
integer , DIMENSION(max_domains) :: auxhist2_end							integer , DIMENSION(max_domains) :: auxhist2_end
integer :: io_form_auxhist2										integer :: io_form_auxhist2
integer , DIMENSION(max_domains) :: frames_per_auxhist2							integer , DIMENSION(max_domains) :: frames_per_auxhist2
character*256 :: auxhist3_inname									character*256 :: auxhist3_inname
character*256 :: auxhist3_outname									character*256 :: auxhist3_outname
integer , DIMENSION(max_domains) :: auxhist3_interval_y							integer , DIMENSION(max_domains) :: auxhist3_interval_y
integer , DIMENSION(max_domains) :: auxhist3_interval_d							integer , DIMENSION(max_domains) :: auxhist3_interval_d
integer , DIMENSION(max_domains) :: auxhist3_interval_h							integer , DIMENSION(max_domains) :: auxhist3_interval_h
integer , DIMENSION(max_domains) :: auxhist3_interval_m							integer , DIMENSION(max_domains) :: auxhist3_interval_m
integer , DIMENSION(max_domains) :: auxhist3_interval_s							integer , DIMENSION(max_domains) :: auxhist3_interval_s
integer , DIMENSION(max_domains) :: auxhist3_interval							integer , DIMENSION(max_domains) :: auxhist3_interval
integer , DIMENSION(max_domains) :: auxhist3_begin_y							integer , DIMENSION(max_domains) :: auxhist3_begin_y
integer , DIMENSION(max_domains) :: auxhist3_begin_d							integer , DIMENSION(max_domains) :: auxhist3_begin_d
integer , DIMENSION(max_domains) :: auxhist3_begin_h							integer , DIMENSION(max_domains) :: auxhist3_begin_h
integer , DIMENSION(max_domains) :: auxhist3_begin_m							integer , DIMENSION(max_domains) :: auxhist3_begin_m
integer , DIMENSION(max_domains) :: auxhist3_begin_s							integer , DIMENSION(max_domains) :: auxhist3_begin_s
integer , DIMENSION(max_domains) :: auxhist3_begin							integer , DIMENSION(max_domains) :: auxhist3_begin
integer , DIMENSION(max_domains) :: auxhist3_end_y							integer , DIMENSION(max_domains) :: auxhist3_end_y
integer , DIMENSION(max_domains) :: auxhist3_end_d							integer , DIMENSION(max_domains) :: auxhist3_end_d
integer , DIMENSION(max_domains) :: auxhist3_end_h							integer , DIMENSION(max_domains) :: auxhist3_end_h
integer , DIMENSION(max_domains) :: auxhist3_end_m							integer , DIMENSION(max_domains) :: auxhist3_end_m
integer , DIMENSION(max_domains) :: auxhist3_end_s							integer , DIMENSION(max_domains) :: auxhist3_end_s
integer , DIMENSION(max_domains) :: auxhist3_end							integer , DIMENSION(max_domains) :: auxhist3_end
integer :: io_form_auxhist3										integer :: io_form_auxhist3
integer , DIMENSION(max_domains) :: frames_per_auxhist3							integer , DIMENSION(max_domains) :: frames_per_auxhist3
character*256 :: auxhist4_inname									character*256 :: auxhist4_inname
character*256 :: auxhist4_outname									character*256 :: auxhist4_outname
integer , DIMENSION(max_domains) :: auxhist4_interval_y							integer , DIMENSION(max_domains) :: auxhist4_interval_y
integer , DIMENSION(max_domains) :: auxhist4_interval_d							integer , DIMENSION(max_domains) :: auxhist4_interval_d
integer , DIMENSION(max_domains) :: auxhist4_interval_h							integer , DIMENSION(max_domains) :: auxhist4_interval_h
integer , DIMENSION(max_domains) :: auxhist4_interval_m							integer , DIMENSION(max_domains) :: auxhist4_interval_m
integer , DIMENSION(max_domains) :: auxhist4_interval_s							integer , DIMENSION(max_domains) :: auxhist4_interval_s
integer , DIMENSION(max_domains) :: auxhist4_interval							integer , DIMENSION(max_domains) :: auxhist4_interval
integer , DIMENSION(max_domains) :: auxhist4_begin_y							integer , DIMENSION(max_domains) :: auxhist4_begin_y
integer , DIMENSION(max_domains) :: auxhist4_begin_d							integer , DIMENSION(max_domains) :: auxhist4_begin_d
integer , DIMENSION(max_domains) :: auxhist4_begin_h							integer , DIMENSION(max_domains) :: auxhist4_begin_h
integer , DIMENSION(max_domains) :: auxhist4_begin_m							integer , DIMENSION(max_domains) :: auxhist4_begin_m
integer , DIMENSION(max_domains) :: auxhist4_begin_s							integer , DIMENSION(max_domains) :: auxhist4_begin_s
integer , DIMENSION(max_domains) :: auxhist4_begin							integer , DIMENSION(max_domains) :: auxhist4_begin
integer , DIMENSION(max_domains) :: auxhist4_end_y							integer , DIMENSION(max_domains) :: auxhist4_end_y
integer , DIMENSION(max_domains) :: auxhist4_end_d							integer , DIMENSION(max_domains) :: auxhist4_end_d
integer , DIMENSION(max_domains) :: auxhist4_end_h							integer , DIMENSION(max_domains) :: auxhist4_end_h
integer , DIMENSION(max_domains) :: auxhist4_end_m							integer , DIMENSION(max_domains) :: auxhist4_end_m
integer , DIMENSION(max_domains) :: auxhist4_end_s							integer , DIMENSION(max_domains) :: auxhist4_end_s
integer , DIMENSION(max_domains) :: auxhist4_end							integer , DIMENSION(max_domains) :: auxhist4_end
integer :: io_form_auxhist4										integer :: io_form_auxhist4
integer , DIMENSION(max_domains) :: frames_per_auxhist4							integer , DIMENSION(max_domains) :: frames_per_auxhist4
character*256 :: auxhist5_inname									character*256 :: auxhist5_inname
character*256 :: auxhist5_outname									character*256 :: auxhist5_outname
integer , DIMENSION(max_domains) :: auxhist5_interval_y							integer , DIMENSION(max_domains) :: auxhist5_interval_y
integer , DIMENSION(max_domains) :: auxhist5_interval_d							integer , DIMENSION(max_domains) :: auxhist5_interval_d
integer , DIMENSION(max_domains) :: auxhist5_interval_h							integer , DIMENSION(max_domains) :: auxhist5_interval_h
integer , DIMENSION(max_domains) :: auxhist5_interval_m							integer , DIMENSION(max_domains) :: auxhist5_interval_m
integer , DIMENSION(max_domains) :: auxhist5_interval_s							integer , DIMENSION(max_domains) :: auxhist5_interval_s
integer , DIMENSION(max_domains) :: auxhist5_interval							integer , DIMENSION(max_domains) :: auxhist5_interval
integer , DIMENSION(max_domains) :: auxhist5_begin_y							integer , DIMENSION(max_domains) :: auxhist5_begin_y
integer , DIMENSION(max_domains) :: auxhist5_begin_d							integer , DIMENSION(max_domains) :: auxhist5_begin_d
integer , DIMENSION(max_domains) :: auxhist5_begin_h							integer , DIMENSION(max_domains) :: auxhist5_begin_h
integer , DIMENSION(max_domains) :: auxhist5_begin_m							integer , DIMENSION(max_domains) :: auxhist5_begin_m
integer , DIMENSION(max_domains) :: auxhist5_begin_s							integer , DIMENSION(max_domains) :: auxhist5_begin_s
integer , DIMENSION(max_domains) :: auxhist5_begin							integer , DIMENSION(max_domains) :: auxhist5_begin
integer , DIMENSION(max_domains) :: auxhist5_end_y							integer , DIMENSION(max_domains) :: auxhist5_end_y
integer , DIMENSION(max_domains) :: auxhist5_end_d							integer , DIMENSION(max_domains) :: auxhist5_end_d
integer , DIMENSION(max_domains) :: auxhist5_end_h							integer , DIMENSION(max_domains) :: auxhist5_end_h
integer , DIMENSION(max_domains) :: auxhist5_end_m							integer , DIMENSION(max_domains) :: auxhist5_end_m
integer , DIMENSION(max_domains) :: auxhist5_end_s							integer , DIMENSION(max_domains) :: auxhist5_end_s
integer , DIMENSION(max_domains) :: auxhist5_end							integer , DIMENSION(max_domains) :: auxhist5_end
integer :: io_form_auxhist5										integer :: io_form_auxhist5
integer , DIMENSION(max_domains) :: frames_per_auxhist5							integer , DIMENSION(max_domains) :: frames_per_auxhist5
character*256 :: auxhist6_inname									character*256 :: auxhist6_inname
character*256 :: auxhist6_outname									character*256 :: auxhist6_outname
integer , DIMENSION(max_domains) :: auxhist6_interval_y							integer , DIMENSION(max_domains) :: auxhist6_interval_y
integer , DIMENSION(max_domains) :: auxhist6_interval_d							integer , DIMENSION(max_domains) :: auxhist6_interval_d
integer , DIMENSION(max_domains) :: auxhist6_interval_h							integer , DIMENSION(max_domains) :: auxhist6_interval_h
integer , DIMENSION(max_domains) :: auxhist6_interval_m							integer , DIMENSION(max_domains) :: auxhist6_interval_m
integer , DIMENSION(max_domains) :: auxhist6_interval_s							integer , DIMENSION(max_domains) :: auxhist6_interval_s
integer , DIMENSION(max_domains) :: auxhist6_interval							integer , DIMENSION(max_domains) :: auxhist6_interval
integer , DIMENSION(max_domains) :: auxhist6_begin_y							integer , DIMENSION(max_domains) :: auxhist6_begin_y
integer , DIMENSION(max_domains) :: auxhist6_begin_d							integer , DIMENSION(max_domains) :: auxhist6_begin_d
integer , DIMENSION(max_domains) :: auxhist6_begin_h							integer , DIMENSION(max_domains) :: auxhist6_begin_h
integer , DIMENSION(max_domains) :: auxhist6_begin_m							integer , DIMENSION(max_domains) :: auxhist6_begin_m
integer , DIMENSION(max_domains) :: auxhist6_begin_s							integer , DIMENSION(max_domains) :: auxhist6_begin_s
integer , DIMENSION(max_domains) :: auxhist6_begin							integer , DIMENSION(max_domains) :: auxhist6_begin
integer , DIMENSION(max_domains) :: auxhist6_end_y							integer , DIMENSION(max_domains) :: auxhist6_end_y
integer , DIMENSION(max_domains) :: auxhist6_end_d							integer , DIMENSION(max_domains) :: auxhist6_end_d
integer , DIMENSION(max_domains) :: auxhist6_end_h							integer , DIMENSION(max_domains) :: auxhist6_end_h
integer , DIMENSION(max_domains) :: auxhist6_end_m							integer , DIMENSION(max_domains) :: auxhist6_end_m
integer , DIMENSION(max_domains) :: auxhist6_end_s							integer , DIMENSION(max_domains) :: auxhist6_end_s
integer , DIMENSION(max_domains) :: auxhist6_end							integer , DIMENSION(max_domains) :: auxhist6_end
integer :: io_form_auxhist6										integer :: io_form_auxhist6
integer , DIMENSION(max_domains) :: frames_per_auxhist6							integer , DIMENSION(max_domains) :: frames_per_auxhist6
character*256 :: auxhist7_inname									character*256 :: auxhist7_inname
character*256 :: auxhist7_outname									character*256 :: auxhist7_outname
integer , DIMENSION(max_domains) :: auxhist7_interval_y							integer , DIMENSION(max_domains) :: auxhist7_interval_y
integer , DIMENSION(max_domains) :: auxhist7_interval_d							integer , DIMENSION(max_domains) :: auxhist7_interval_d
integer , DIMENSION(max_domains) :: auxhist7_interval_h							integer , DIMENSION(max_domains) :: auxhist7_interval_h
integer , DIMENSION(max_domains) :: auxhist7_interval_m							integer , DIMENSION(max_domains) :: auxhist7_interval_m
integer , DIMENSION(max_domains) :: auxhist7_interval_s							integer , DIMENSION(max_domains) :: auxhist7_interval_s
integer , DIMENSION(max_domains) :: auxhist7_interval							integer , DIMENSION(max_domains) :: auxhist7_interval
integer , DIMENSION(max_domains) :: auxhist7_begin_y							integer , DIMENSION(max_domains) :: auxhist7_begin_y
integer , DIMENSION(max_domains) :: auxhist7_begin_d							integer , DIMENSION(max_domains) :: auxhist7_begin_d
integer , DIMENSION(max_domains) :: auxhist7_begin_h							integer , DIMENSION(max_domains) :: auxhist7_begin_h
integer , DIMENSION(max_domains) :: auxhist7_begin_m							integer , DIMENSION(max_domains) :: auxhist7_begin_m
integer , DIMENSION(max_domains) :: auxhist7_begin_s							integer , DIMENSION(max_domains) :: auxhist7_begin_s
integer , DIMENSION(max_domains) :: auxhist7_begin							integer , DIMENSION(max_domains) :: auxhist7_begin
integer , DIMENSION(max_domains) :: auxhist7_end_y							integer , DIMENSION(max_domains) :: auxhist7_end_y
integer , DIMENSION(max_domains) :: auxhist7_end_d							integer , DIMENSION(max_domains) :: auxhist7_end_d
integer , DIMENSION(max_domains) :: auxhist7_end_h							integer , DIMENSION(max_domains) :: auxhist7_end_h
integer , DIMENSION(max_domains) :: auxhist7_end_m							integer , DIMENSION(max_domains) :: auxhist7_end_m
integer , DIMENSION(max_domains) :: auxhist7_end_s							integer , DIMENSION(max_domains) :: auxhist7_end_s
integer , DIMENSION(max_domains) :: auxhist7_end							integer , DIMENSION(max_domains) :: auxhist7_end
integer :: io_form_auxhist7										integer :: io_form_auxhist7
integer , DIMENSION(max_domains) :: frames_per_auxhist7							integer , DIMENSION(max_domains) :: frames_per_auxhist7
character*256 :: auxhist8_inname									character*256 :: auxhist8_inname
character*256 :: auxhist8_outname									character*256 :: auxhist8_outname
integer , DIMENSION(max_domains) :: auxhist8_interval_y							integer , DIMENSION(max_domains) :: auxhist8_interval_y
integer , DIMENSION(max_domains) :: auxhist8_interval_d							integer , DIMENSION(max_domains) :: auxhist8_interval_d
integer , DIMENSION(max_domains) :: auxhist8_interval_h							integer , DIMENSION(max_domains) :: auxhist8_interval_h
integer , DIMENSION(max_domains) :: auxhist8_interval_m							integer , DIMENSION(max_domains) :: auxhist8_interval_m
integer , DIMENSION(max_domains) :: auxhist8_interval_s							integer , DIMENSION(max_domains) :: auxhist8_interval_s
integer , DIMENSION(max_domains) :: auxhist8_interval							integer , DIMENSION(max_domains) :: auxhist8_interval
integer , DIMENSION(max_domains) :: auxhist8_begin_y							integer , DIMENSION(max_domains) :: auxhist8_begin_y
integer , DIMENSION(max_domains) :: auxhist8_begin_d							integer , DIMENSION(max_domains) :: auxhist8_begin_d
integer , DIMENSION(max_domains) :: auxhist8_begin_h							integer , DIMENSION(max_domains) :: auxhist8_begin_h
integer , DIMENSION(max_domains) :: auxhist8_begin_m							integer , DIMENSION(max_domains) :: auxhist8_begin_m
integer , DIMENSION(max_domains) :: auxhist8_begin_s							integer , DIMENSION(max_domains) :: auxhist8_begin_s
integer , DIMENSION(max_domains) :: auxhist8_begin							integer , DIMENSION(max_domains) :: auxhist8_begin
integer , DIMENSION(max_domains) :: auxhist8_end_y							integer , DIMENSION(max_domains) :: auxhist8_end_y
integer , DIMENSION(max_domains) :: auxhist8_end_d							integer , DIMENSION(max_domains) :: auxhist8_end_d
integer , DIMENSION(max_domains) :: auxhist8_end_h							integer , DIMENSION(max_domains) :: auxhist8_end_h
integer , DIMENSION(max_domains) :: auxhist8_end_m							integer , DIMENSION(max_domains) :: auxhist8_end_m
integer , DIMENSION(max_domains) :: auxhist8_end_s							integer , DIMENSION(max_domains) :: auxhist8_end_s
integer , DIMENSION(max_domains) :: auxhist8_end							integer , DIMENSION(max_domains) :: auxhist8_end
integer :: io_form_auxhist8										integer :: io_form_auxhist8
integer , DIMENSION(max_domains) :: frames_per_auxhist8							integer , DIMENSION(max_domains) :: frames_per_auxhist8
character*256 :: auxhist9_inname									character*256 :: auxhist9_inname
character*256 :: auxhist9_outname									character*256 :: auxhist9_outname
integer , DIMENSION(max_domains) :: auxhist9_interval_y							integer , DIMENSION(max_domains) :: auxhist9_interval_y
integer , DIMENSION(max_domains) :: auxhist9_interval_d							integer , DIMENSION(max_domains) :: auxhist9_interval_d
integer , DIMENSION(max_domains) :: auxhist9_interval_h							integer , DIMENSION(max_domains) :: auxhist9_interval_h
integer , DIMENSION(max_domains) :: auxhist9_interval_m							integer , DIMENSION(max_domains) :: auxhist9_interval_m
integer , DIMENSION(max_domains) :: auxhist9_interval_s							integer , DIMENSION(max_domains) :: auxhist9_interval_s
integer , DIMENSION(max_domains) :: auxhist9_interval							integer , DIMENSION(max_domains) :: auxhist9_interval
integer , DIMENSION(max_domains) :: auxhist9_begin_y							integer , DIMENSION(max_domains) :: auxhist9_begin_y
integer , DIMENSION(max_domains) :: auxhist9_begin_d							integer , DIMENSION(max_domains) :: auxhist9_begin_d
integer , DIMENSION(max_domains) :: auxhist9_begin_h							integer , DIMENSION(max_domains) :: auxhist9_begin_h
integer , DIMENSION(max_domains) :: auxhist9_begin_m							integer , DIMENSION(max_domains) :: auxhist9_begin_m
integer , DIMENSION(max_domains) :: auxhist9_begin_s							integer , DIMENSION(max_domains) :: auxhist9_begin_s
integer , DIMENSION(max_domains) :: auxhist9_begin							integer , DIMENSION(max_domains) :: auxhist9_begin
integer , DIMENSION(max_domains) :: auxhist9_end_y							integer , DIMENSION(max_domains) :: auxhist9_end_y
integer , DIMENSION(max_domains) :: auxhist9_end_d							integer , DIMENSION(max_domains) :: auxhist9_end_d
integer , DIMENSION(max_domains) :: auxhist9_end_h							integer , DIMENSION(max_domains) :: auxhist9_end_h
integer , DIMENSION(max_domains) :: auxhist9_end_m							integer , DIMENSION(max_domains) :: auxhist9_end_m
integer , DIMENSION(max_domains) :: auxhist9_end_s							integer , DIMENSION(max_domains) :: auxhist9_end_s
integer , DIMENSION(max_domains) :: auxhist9_end							integer , DIMENSION(max_domains) :: auxhist9_end
integer :: io_form_auxhist9										integer :: io_form_auxhist9
integer , DIMENSION(max_domains) :: frames_per_auxhist9							integer , DIMENSION(max_domains) :: frames_per_auxhist9
character*256 :: auxhist10_inname									character*256 :: auxhist10_inname
character*256 :: auxhist10_outname									character*256 :: auxhist10_outname
integer , DIMENSION(max_domains) :: auxhist10_interval_y						integer , DIMENSION(max_domains) :: auxhist10_interval_y
integer , DIMENSION(max_domains) :: auxhist10_interval_d						integer , DIMENSION(max_domains) :: auxhist10_interval_d
integer , DIMENSION(max_domains) :: auxhist10_interval_h						integer , DIMENSION(max_domains) :: auxhist10_interval_h
integer , DIMENSION(max_domains) :: auxhist10_interval_m						integer , DIMENSION(max_domains) :: auxhist10_interval_m
integer , DIMENSION(max_domains) :: auxhist10_interval_s						integer , DIMENSION(max_domains) :: auxhist10_interval_s
integer , DIMENSION(max_domains) :: auxhist10_interval							integer , DIMENSION(max_domains) :: auxhist10_interval
integer , DIMENSION(max_domains) :: auxhist10_begin_y							integer , DIMENSION(max_domains) :: auxhist10_begin_y
integer , DIMENSION(max_domains) :: auxhist10_begin_d							integer , DIMENSION(max_domains) :: auxhist10_begin_d
integer , DIMENSION(max_domains) :: auxhist10_begin_h							integer , DIMENSION(max_domains) :: auxhist10_begin_h
integer , DIMENSION(max_domains) :: auxhist10_begin_m							integer , DIMENSION(max_domains) :: auxhist10_begin_m
integer , DIMENSION(max_domains) :: auxhist10_begin_s							integer , DIMENSION(max_domains) :: auxhist10_begin_s
integer , DIMENSION(max_domains) :: auxhist10_begin							integer , DIMENSION(max_domains) :: auxhist10_begin
integer , DIMENSION(max_domains) :: auxhist10_end_y							integer , DIMENSION(max_domains) :: auxhist10_end_y
integer , DIMENSION(max_domains) :: auxhist10_end_d							integer , DIMENSION(max_domains) :: auxhist10_end_d
integer , DIMENSION(max_domains) :: auxhist10_end_h							integer , DIMENSION(max_domains) :: auxhist10_end_h
integer , DIMENSION(max_domains) :: auxhist10_end_m							integer , DIMENSION(max_domains) :: auxhist10_end_m
integer , DIMENSION(max_domains) :: auxhist10_end_s							integer , DIMENSION(max_domains) :: auxhist10_end_s
integer , DIMENSION(max_domains) :: auxhist10_end							integer , DIMENSION(max_domains) :: auxhist10_end
integer :: io_form_auxhist10										integer :: io_form_auxhist10
integer , DIMENSION(max_domains) :: frames_per_auxhist10						integer , DIMENSION(max_domains) :: frames_per_auxhist10
character*256 :: auxhist11_inname									character*256 :: auxhist11_inname
character*256 :: auxhist11_outname									character*256 :: auxhist11_outname
integer , DIMENSION(max_domains) :: auxhist11_interval_y						integer , DIMENSION(max_domains) :: auxhist11_interval_y
integer , DIMENSION(max_domains) :: auxhist11_interval_d						integer , DIMENSION(max_domains) :: auxhist11_interval_d
integer , DIMENSION(max_domains) :: auxhist11_interval_h						integer , DIMENSION(max_domains) :: auxhist11_interval_h
integer , DIMENSION(max_domains) :: auxhist11_interval_m						integer , DIMENSION(max_domains) :: auxhist11_interval_m
integer , DIMENSION(max_domains) :: auxhist11_interval_s						integer , DIMENSION(max_domains) :: auxhist11_interval_s
integer , DIMENSION(max_domains) :: auxhist11_interval							integer , DIMENSION(max_domains) :: auxhist11_interval
integer , DIMENSION(max_domains) :: auxhist11_begin_y							integer , DIMENSION(max_domains) :: auxhist11_begin_y
integer , DIMENSION(max_domains) :: auxhist11_begin_d							integer , DIMENSION(max_domains) :: auxhist11_begin_d
integer , DIMENSION(max_domains) :: auxhist11_begin_h							integer , DIMENSION(max_domains) :: auxhist11_begin_h
integer , DIMENSION(max_domains) :: auxhist11_begin_m							integer , DIMENSION(max_domains) :: auxhist11_begin_m
integer , DIMENSION(max_domains) :: auxhist11_begin_s							integer , DIMENSION(max_domains) :: auxhist11_begin_s
integer , DIMENSION(max_domains) :: auxhist11_begin							integer , DIMENSION(max_domains) :: auxhist11_begin
integer , DIMENSION(max_domains) :: auxhist11_end_y							integer , DIMENSION(max_domains) :: auxhist11_end_y
integer , DIMENSION(max_domains) :: auxhist11_end_d							integer , DIMENSION(max_domains) :: auxhist11_end_d
integer , DIMENSION(max_domains) :: auxhist11_end_h							integer , DIMENSION(max_domains) :: auxhist11_end_h
integer , DIMENSION(max_domains) :: auxhist11_end_m							integer , DIMENSION(max_domains) :: auxhist11_end_m
integer , DIMENSION(max_domains) :: auxhist11_end_s							integer , DIMENSION(max_domains) :: auxhist11_end_s
integer , DIMENSION(max_domains) :: auxhist11_end							integer , DIMENSION(max_domains) :: auxhist11_end
integer :: io_form_auxhist11										integer :: io_form_auxhist11
integer , DIMENSION(max_domains) :: frames_per_auxhist11						integer , DIMENSION(max_domains) :: frames_per_auxhist11
character*256 :: auxhist12_inname									character*256 :: auxhist12_inname
character*256 :: auxhist12_outname									character*256 :: auxhist12_outname
integer , DIMENSION(max_domains) :: auxhist12_interval_y						integer , DIMENSION(max_domains) :: auxhist12_interval_y
integer , DIMENSION(max_domains) :: auxhist12_interval_d						integer , DIMENSION(max_domains) :: auxhist12_interval_d
integer , DIMENSION(max_domains) :: auxhist12_interval_h						integer , DIMENSION(max_domains) :: auxhist12_interval_h
integer , DIMENSION(max_domains) :: auxhist12_interval_m						integer , DIMENSION(max_domains) :: auxhist12_interval_m
integer , DIMENSION(max_domains) :: auxhist12_interval_s						integer , DIMENSION(max_domains) :: auxhist12_interval_s
integer , DIMENSION(max_domains) :: auxhist12_interval							integer , DIMENSION(max_domains) :: auxhist12_interval
integer , DIMENSION(max_domains) :: auxhist12_begin_y							integer , DIMENSION(max_domains) :: auxhist12_begin_y
integer , DIMENSION(max_domains) :: auxhist12_begin_d							integer , DIMENSION(max_domains) :: auxhist12_begin_d
integer , DIMENSION(max_domains) :: auxhist12_begin_h							integer , DIMENSION(max_domains) :: auxhist12_begin_h
integer , DIMENSION(max_domains) :: auxhist12_begin_m							integer , DIMENSION(max_domains) :: auxhist12_begin_m
integer , DIMENSION(max_domains) :: auxhist12_begin_s							integer , DIMENSION(max_domains) :: auxhist12_begin_s
integer , DIMENSION(max_domains) :: auxhist12_begin							integer , DIMENSION(max_domains) :: auxhist12_begin
integer , DIMENSION(max_domains) :: auxhist12_end_y							integer , DIMENSION(max_domains) :: auxhist12_end_y
integer , DIMENSION(max_domains) :: auxhist12_end_d							integer , DIMENSION(max_domains) :: auxhist12_end_d
integer , DIMENSION(max_domains) :: auxhist12_end_h							integer , DIMENSION(max_domains) :: auxhist12_end_h
integer , DIMENSION(max_domains) :: auxhist12_end_m							integer , DIMENSION(max_domains) :: auxhist12_end_m
integer , DIMENSION(max_domains) :: auxhist12_end_s							integer , DIMENSION(max_domains) :: auxhist12_end_s
integer , DIMENSION(max_domains) :: auxhist12_end							integer , DIMENSION(max_domains) :: auxhist12_end
integer :: io_form_auxhist12										integer :: io_form_auxhist12
integer , DIMENSION(max_domains) :: frames_per_auxhist12						integer , DIMENSION(max_domains) :: frames_per_auxhist12
character*256 :: auxhist13_inname									character*256 :: auxhist13_inname
character*256 :: auxhist13_outname									character*256 :: auxhist13_outname
integer , DIMENSION(max_domains) :: auxhist13_interval_y						integer , DIMENSION(max_domains) :: auxhist13_interval_y
integer , DIMENSION(max_domains) :: auxhist13_interval_d						integer , DIMENSION(max_domains) :: auxhist13_interval_d
integer , DIMENSION(max_domains) :: auxhist13_interval_h						integer , DIMENSION(max_domains) :: auxhist13_interval_h
integer , DIMENSION(max_domains) :: auxhist13_interval_m						integer , DIMENSION(max_domains) :: auxhist13_interval_m
integer , DIMENSION(max_domains) :: auxhist13_interval_s						integer , DIMENSION(max_domains) :: auxhist13_interval_s
integer , DIMENSION(max_domains) :: auxhist13_interval							integer , DIMENSION(max_domains) :: auxhist13_interval
integer , DIMENSION(max_domains) :: auxhist13_begin_y							integer , DIMENSION(max_domains) :: auxhist13_begin_y
integer , DIMENSION(max_domains) :: auxhist13_begin_d							integer , DIMENSION(max_domains) :: auxhist13_begin_d
integer , DIMENSION(max_domains) :: auxhist13_begin_h							integer , DIMENSION(max_domains) :: auxhist13_begin_h
integer , DIMENSION(max_domains) :: auxhist13_begin_m							integer , DIMENSION(max_domains) :: auxhist13_begin_m
integer , DIMENSION(max_domains) :: auxhist13_begin_s							integer , DIMENSION(max_domains) :: auxhist13_begin_s
integer , DIMENSION(max_domains) :: auxhist13_begin							integer , DIMENSION(max_domains) :: auxhist13_begin
integer , DIMENSION(max_domains) :: auxhist13_end_y							integer , DIMENSION(max_domains) :: auxhist13_end_y
integer , DIMENSION(max_domains) :: auxhist13_end_d							integer , DIMENSION(max_domains) :: auxhist13_end_d
integer , DIMENSION(max_domains) :: auxhist13_end_h							integer , DIMENSION(max_domains) :: auxhist13_end_h
integer , DIMENSION(max_domains) :: auxhist13_end_m							integer , DIMENSION(max_domains) :: auxhist13_end_m
integer , DIMENSION(max_domains) :: auxhist13_end_s							integer , DIMENSION(max_domains) :: auxhist13_end_s
integer , DIMENSION(max_domains) :: auxhist13_end							integer , DIMENSION(max_domains) :: auxhist13_end
integer :: io_form_auxhist13										integer :: io_form_auxhist13
integer , DIMENSION(max_domains) :: frames_per_auxhist13						integer , DIMENSION(max_domains) :: frames_per_auxhist13
character*256 :: auxhist14_inname									character*256 :: auxhist14_inname
character*256 :: auxhist14_outname									character*256 :: auxhist14_outname
integer , DIMENSION(max_domains) :: auxhist14_interval_y						integer , DIMENSION(max_domains) :: auxhist14_interval_y
integer , DIMENSION(max_domains) :: auxhist14_interval_d						integer , DIMENSION(max_domains) :: auxhist14_interval_d
integer , DIMENSION(max_domains) :: auxhist14_interval_h						integer , DIMENSION(max_domains) :: auxhist14_interval_h
integer , DIMENSION(max_domains) :: auxhist14_interval_m						integer , DIMENSION(max_domains) :: auxhist14_interval_m
integer , DIMENSION(max_domains) :: auxhist14_interval_s						integer , DIMENSION(max_domains) :: auxhist14_interval_s
integer , DIMENSION(max_domains) :: auxhist14_interval							integer , DIMENSION(max_domains) :: auxhist14_interval
integer , DIMENSION(max_domains) :: auxhist14_begin_y							integer , DIMENSION(max_domains) :: auxhist14_begin_y
integer , DIMENSION(max_domains) :: auxhist14_begin_d							integer , DIMENSION(max_domains) :: auxhist14_begin_d
integer , DIMENSION(max_domains) :: auxhist14_begin_h							integer , DIMENSION(max_domains) :: auxhist14_begin_h
integer , DIMENSION(max_domains) :: auxhist14_begin_m							integer , DIMENSION(max_domains) :: auxhist14_begin_m
integer , DIMENSION(max_domains) :: auxhist14_begin_s							integer , DIMENSION(max_domains) :: auxhist14_begin_s
integer , DIMENSION(max_domains) :: auxhist14_begin							integer , DIMENSION(max_domains) :: auxhist14_begin
integer , DIMENSION(max_domains) :: auxhist14_end_y							integer , DIMENSION(max_domains) :: auxhist14_end_y
integer , DIMENSION(max_domains) :: auxhist14_end_d							integer , DIMENSION(max_domains) :: auxhist14_end_d
integer , DIMENSION(max_domains) :: auxhist14_end_h							integer , DIMENSION(max_domains) :: auxhist14_end_h
integer , DIMENSION(max_domains) :: auxhist14_end_m							integer , DIMENSION(max_domains) :: auxhist14_end_m
integer , DIMENSION(max_domains) :: auxhist14_end_s							integer , DIMENSION(max_domains) :: auxhist14_end_s
integer , DIMENSION(max_domains) :: auxhist14_end							integer , DIMENSION(max_domains) :: auxhist14_end
integer :: io_form_auxhist14										integer :: io_form_auxhist14
integer , DIMENSION(max_domains) :: frames_per_auxhist14						integer , DIMENSION(max_domains) :: frames_per_auxhist14
character*256 :: auxhist15_inname									character*256 :: auxhist15_inname
character*256 :: auxhist15_outname									character*256 :: auxhist15_outname
integer , DIMENSION(max_domains) :: auxhist15_interval_y						integer , DIMENSION(max_domains) :: auxhist15_interval_y
integer , DIMENSION(max_domains) :: auxhist15_interval_d						integer , DIMENSION(max_domains) :: auxhist15_interval_d
integer , DIMENSION(max_domains) :: auxhist15_interval_h						integer , DIMENSION(max_domains) :: auxhist15_interval_h
integer , DIMENSION(max_domains) :: auxhist15_interval_m						integer , DIMENSION(max_domains) :: auxhist15_interval_m
integer , DIMENSION(max_domains) :: auxhist15_interval_s						integer , DIMENSION(max_domains) :: auxhist15_interval_s
integer , DIMENSION(max_domains) :: auxhist15_interval							integer , DIMENSION(max_domains) :: auxhist15_interval
integer , DIMENSION(max_domains) :: auxhist15_begin_y							integer , DIMENSION(max_domains) :: auxhist15_begin_y
integer , DIMENSION(max_domains) :: auxhist15_begin_d							integer , DIMENSION(max_domains) :: auxhist15_begin_d
integer , DIMENSION(max_domains) :: auxhist15_begin_h							integer , DIMENSION(max_domains) :: auxhist15_begin_h
integer , DIMENSION(max_domains) :: auxhist15_begin_m							integer , DIMENSION(max_domains) :: auxhist15_begin_m
integer , DIMENSION(max_domains) :: auxhist15_begin_s							integer , DIMENSION(max_domains) :: auxhist15_begin_s
integer , DIMENSION(max_domains) :: auxhist15_begin							integer , DIMENSION(max_domains) :: auxhist15_begin
integer , DIMENSION(max_domains) :: auxhist15_end_y							integer , DIMENSION(max_domains) :: auxhist15_end_y
integer , DIMENSION(max_domains) :: auxhist15_end_d							integer , DIMENSION(max_domains) :: auxhist15_end_d
integer , DIMENSION(max_domains) :: auxhist15_end_h							integer , DIMENSION(max_domains) :: auxhist15_end_h
integer , DIMENSION(max_domains) :: auxhist15_end_m							integer , DIMENSION(max_domains) :: auxhist15_end_m
integer , DIMENSION(max_domains) :: auxhist15_end_s							integer , DIMENSION(max_domains) :: auxhist15_end_s
integer , DIMENSION(max_domains) :: auxhist15_end							integer , DIMENSION(max_domains) :: auxhist15_end
integer :: io_form_auxhist15										integer :: io_form_auxhist15
integer , DIMENSION(max_domains) :: frames_per_auxhist15						integer , DIMENSION(max_domains) :: frames_per_auxhist15
character*256 :: auxhist16_inname									character*256 :: auxhist16_inname
character*256 :: auxhist16_outname									character*256 :: auxhist16_outname
integer , DIMENSION(max_domains) :: auxhist16_interval_y						integer , DIMENSION(max_domains) :: auxhist16_interval_y
integer , DIMENSION(max_domains) :: auxhist16_interval_d						integer , DIMENSION(max_domains) :: auxhist16_interval_d
integer , DIMENSION(max_domains) :: auxhist16_interval_h						integer , DIMENSION(max_domains) :: auxhist16_interval_h
integer , DIMENSION(max_domains) :: auxhist16_interval_m						integer , DIMENSION(max_domains) :: auxhist16_interval_m
integer , DIMENSION(max_domains) :: auxhist16_interval_s						integer , DIMENSION(max_domains) :: auxhist16_interval_s
integer , DIMENSION(max_domains) :: auxhist16_interval							integer , DIMENSION(max_domains) :: auxhist16_interval
integer , DIMENSION(max_domains) :: auxhist16_begin_y							integer , DIMENSION(max_domains) :: auxhist16_begin_y
integer , DIMENSION(max_domains) :: auxhist16_begin_d							integer , DIMENSION(max_domains) :: auxhist16_begin_d
integer , DIMENSION(max_domains) :: auxhist16_begin_h							integer , DIMENSION(max_domains) :: auxhist16_begin_h
integer , DIMENSION(max_domains) :: auxhist16_begin_m							integer , DIMENSION(max_domains) :: auxhist16_begin_m
integer , DIMENSION(max_domains) :: auxhist16_begin_s							integer , DIMENSION(max_domains) :: auxhist16_begin_s
integer , DIMENSION(max_domains) :: auxhist16_begin							integer , DIMENSION(max_domains) :: auxhist16_begin
integer , DIMENSION(max_domains) :: auxhist16_end_y							integer , DIMENSION(max_domains) :: auxhist16_end_y
integer , DIMENSION(max_domains) :: auxhist16_end_d							integer , DIMENSION(max_domains) :: auxhist16_end_d
integer , DIMENSION(max_domains) :: auxhist16_end_h							integer , DIMENSION(max_domains) :: auxhist16_end_h
integer , DIMENSION(max_domains) :: auxhist16_end_m							integer , DIMENSION(max_domains) :: auxhist16_end_m
integer , DIMENSION(max_domains) :: auxhist16_end_s							integer , DIMENSION(max_domains) :: auxhist16_end_s
integer , DIMENSION(max_domains) :: auxhist16_end							integer , DIMENSION(max_domains) :: auxhist16_end
integer :: io_form_auxhist16										integer :: io_form_auxhist16
integer , DIMENSION(max_domains) :: frames_per_auxhist16						integer , DIMENSION(max_domains) :: frames_per_auxhist16
character*256 :: auxhist17_inname									character*256 :: auxhist17_inname
character*256 :: auxhist17_outname									character*256 :: auxhist17_outname
integer , DIMENSION(max_domains) :: auxhist17_interval_y						integer , DIMENSION(max_domains) :: auxhist17_interval_y
integer , DIMENSION(max_domains) :: auxhist17_interval_d						integer , DIMENSION(max_domains) :: auxhist17_interval_d
integer , DIMENSION(max_domains) :: auxhist17_interval_h						integer , DIMENSION(max_domains) :: auxhist17_interval_h
integer , DIMENSION(max_domains) :: auxhist17_interval_m						integer , DIMENSION(max_domains) :: auxhist17_interval_m
integer , DIMENSION(max_domains) :: auxhist17_interval_s						integer , DIMENSION(max_domains) :: auxhist17_interval_s
integer , DIMENSION(max_domains) :: auxhist17_interval							integer , DIMENSION(max_domains) :: auxhist17_interval
integer , DIMENSION(max_domains) :: auxhist17_begin_y							integer , DIMENSION(max_domains) :: auxhist17_begin_y
integer , DIMENSION(max_domains) :: auxhist17_begin_d							integer , DIMENSION(max_domains) :: auxhist17_begin_d
integer , DIMENSION(max_domains) :: auxhist17_begin_h							integer , DIMENSION(max_domains) :: auxhist17_begin_h
integer , DIMENSION(max_domains) :: auxhist17_begin_m							integer , DIMENSION(max_domains) :: auxhist17_begin_m
integer , DIMENSION(max_domains) :: auxhist17_begin_s							integer , DIMENSION(max_domains) :: auxhist17_begin_s
integer , DIMENSION(max_domains) :: auxhist17_begin							integer , DIMENSION(max_domains) :: auxhist17_begin
integer , DIMENSION(max_domains) :: auxhist17_end_y							integer , DIMENSION(max_domains) :: auxhist17_end_y
integer , DIMENSION(max_domains) :: auxhist17_end_d							integer , DIMENSION(max_domains) :: auxhist17_end_d
integer , DIMENSION(max_domains) :: auxhist17_end_h							integer , DIMENSION(max_domains) :: auxhist17_end_h
integer , DIMENSION(max_domains) :: auxhist17_end_m							integer , DIMENSION(max_domains) :: auxhist17_end_m
integer , DIMENSION(max_domains) :: auxhist17_end_s							integer , DIMENSION(max_domains) :: auxhist17_end_s
integer , DIMENSION(max_domains) :: auxhist17_end							integer , DIMENSION(max_domains) :: auxhist17_end
integer :: io_form_auxhist17										integer :: io_form_auxhist17
integer , DIMENSION(max_domains) :: frames_per_auxhist17						integer , DIMENSION(max_domains) :: frames_per_auxhist17
character*256 :: auxhist18_inname									character*256 :: auxhist18_inname
character*256 :: auxhist18_outname									character*256 :: auxhist18_outname
integer , DIMENSION(max_domains) :: auxhist18_interval_y						integer , DIMENSION(max_domains) :: auxhist18_interval_y
integer , DIMENSION(max_domains) :: auxhist18_interval_d						integer , DIMENSION(max_domains) :: auxhist18_interval_d
integer , DIMENSION(max_domains) :: auxhist18_interval_h						integer , DIMENSION(max_domains) :: auxhist18_interval_h
integer , DIMENSION(max_domains) :: auxhist18_interval_m						integer , DIMENSION(max_domains) :: auxhist18_interval_m
integer , DIMENSION(max_domains) :: auxhist18_interval_s						integer , DIMENSION(max_domains) :: auxhist18_interval_s
integer , DIMENSION(max_domains) :: auxhist18_interval							integer , DIMENSION(max_domains) :: auxhist18_interval
integer , DIMENSION(max_domains) :: auxhist18_begin_y							integer , DIMENSION(max_domains) :: auxhist18_begin_y
integer , DIMENSION(max_domains) :: auxhist18_begin_d							integer , DIMENSION(max_domains) :: auxhist18_begin_d
integer , DIMENSION(max_domains) :: auxhist18_begin_h							integer , DIMENSION(max_domains) :: auxhist18_begin_h
integer , DIMENSION(max_domains) :: auxhist18_begin_m							integer , DIMENSION(max_domains) :: auxhist18_begin_m
integer , DIMENSION(max_domains) :: auxhist18_begin_s							integer , DIMENSION(max_domains) :: auxhist18_begin_s
integer , DIMENSION(max_domains) :: auxhist18_begin							integer , DIMENSION(max_domains) :: auxhist18_begin
integer , DIMENSION(max_domains) :: auxhist18_end_y							integer , DIMENSION(max_domains) :: auxhist18_end_y
integer , DIMENSION(max_domains) :: auxhist18_end_d							integer , DIMENSION(max_domains) :: auxhist18_end_d
integer , DIMENSION(max_domains) :: auxhist18_end_h							integer , DIMENSION(max_domains) :: auxhist18_end_h
integer , DIMENSION(max_domains) :: auxhist18_end_m							integer , DIMENSION(max_domains) :: auxhist18_end_m
integer , DIMENSION(max_domains) :: auxhist18_end_s							integer , DIMENSION(max_domains) :: auxhist18_end_s
integer , DIMENSION(max_domains) :: auxhist18_end							integer , DIMENSION(max_domains) :: auxhist18_end
integer :: io_form_auxhist18										integer :: io_form_auxhist18
integer , DIMENSION(max_domains) :: frames_per_auxhist18						integer , DIMENSION(max_domains) :: frames_per_auxhist18
character*256 :: auxhist19_inname									character*256 :: auxhist19_inname
character*256 :: auxhist19_outname									character*256 :: auxhist19_outname
integer , DIMENSION(max_domains) :: auxhist19_interval_y						integer , DIMENSION(max_domains) :: auxhist19_interval_y
integer , DIMENSION(max_domains) :: auxhist19_interval_d						integer , DIMENSION(max_domains) :: auxhist19_interval_d
integer , DIMENSION(max_domains) :: auxhist19_interval_h						integer , DIMENSION(max_domains) :: auxhist19_interval_h
integer , DIMENSION(max_domains) :: auxhist19_interval_m						integer , DIMENSION(max_domains) :: auxhist19_interval_m
integer , DIMENSION(max_domains) :: auxhist19_interval_s						integer , DIMENSION(max_domains) :: auxhist19_interval_s
integer , DIMENSION(max_domains) :: auxhist19_interval							integer , DIMENSION(max_domains) :: auxhist19_interval
integer , DIMENSION(max_domains) :: auxhist19_begin_y							integer , DIMENSION(max_domains) :: auxhist19_begin_y
integer , DIMENSION(max_domains) :: auxhist19_begin_d							integer , DIMENSION(max_domains) :: auxhist19_begin_d
integer , DIMENSION(max_domains) :: auxhist19_begin_h							integer , DIMENSION(max_domains) :: auxhist19_begin_h
integer , DIMENSION(max_domains) :: auxhist19_begin_m							integer , DIMENSION(max_domains) :: auxhist19_begin_m
integer , DIMENSION(max_domains) :: auxhist19_begin_s							integer , DIMENSION(max_domains) :: auxhist19_begin_s
integer , DIMENSION(max_domains) :: auxhist19_begin							integer , DIMENSION(max_domains) :: auxhist19_begin
integer , DIMENSION(max_domains) :: auxhist19_end_y							integer , DIMENSION(max_domains) :: auxhist19_end_y
integer , DIMENSION(max_domains) :: auxhist19_end_d							integer , DIMENSION(max_domains) :: auxhist19_end_d
integer , DIMENSION(max_domains) :: auxhist19_end_h							integer , DIMENSION(max_domains) :: auxhist19_end_h
integer , DIMENSION(max_domains) :: auxhist19_end_m							integer , DIMENSION(max_domains) :: auxhist19_end_m
integer , DIMENSION(max_domains) :: auxhist19_end_s							integer , DIMENSION(max_domains) :: auxhist19_end_s
integer , DIMENSION(max_domains) :: auxhist19_end							integer , DIMENSION(max_domains) :: auxhist19_end
integer :: io_form_auxhist19										integer :: io_form_auxhist19
integer , DIMENSION(max_domains) :: frames_per_auxhist19						integer , DIMENSION(max_domains) :: frames_per_auxhist19
character*256 :: auxhist20_inname									character*256 :: auxhist20_inname
character*256 :: auxhist20_outname									character*256 :: auxhist20_outname
integer , DIMENSION(max_domains) :: auxhist20_interval_y						integer , DIMENSION(max_domains) :: auxhist20_interval_y
integer , DIMENSION(max_domains) :: auxhist20_interval_d						integer , DIMENSION(max_domains) :: auxhist20_interval_d
integer , DIMENSION(max_domains) :: auxhist20_interval_h						integer , DIMENSION(max_domains) :: auxhist20_interval_h
integer , DIMENSION(max_domains) :: auxhist20_interval_m						integer , DIMENSION(max_domains) :: auxhist20_interval_m
integer , DIMENSION(max_domains) :: auxhist20_interval_s						integer , DIMENSION(max_domains) :: auxhist20_interval_s
integer , DIMENSION(max_domains) :: auxhist20_interval							integer , DIMENSION(max_domains) :: auxhist20_interval
integer , DIMENSION(max_domains) :: auxhist20_begin_y							integer , DIMENSION(max_domains) :: auxhist20_begin_y
integer , DIMENSION(max_domains) :: auxhist20_begin_d							integer , DIMENSION(max_domains) :: auxhist20_begin_d
integer , DIMENSION(max_domains) :: auxhist20_begin_h							integer , DIMENSION(max_domains) :: auxhist20_begin_h
integer , DIMENSION(max_domains) :: auxhist20_begin_m							integer , DIMENSION(max_domains) :: auxhist20_begin_m
integer , DIMENSION(max_domains) :: auxhist20_begin_s							integer , DIMENSION(max_domains) :: auxhist20_begin_s
integer , DIMENSION(max_domains) :: auxhist20_begin							integer , DIMENSION(max_domains) :: auxhist20_begin
integer , DIMENSION(max_domains) :: auxhist20_end_y							integer , DIMENSION(max_domains) :: auxhist20_end_y
integer , DIMENSION(max_domains) :: auxhist20_end_d							integer , DIMENSION(max_domains) :: auxhist20_end_d
integer , DIMENSION(max_domains) :: auxhist20_end_h							integer , DIMENSION(max_domains) :: auxhist20_end_h
integer , DIMENSION(max_domains) :: auxhist20_end_m							integer , DIMENSION(max_domains) :: auxhist20_end_m
integer , DIMENSION(max_domains) :: auxhist20_end_s							integer , DIMENSION(max_domains) :: auxhist20_end_s
integer , DIMENSION(max_domains) :: auxhist20_end							integer , DIMENSION(max_domains) :: auxhist20_end
integer :: io_form_auxhist20										integer :: io_form_auxhist20
integer , DIMENSION(max_domains) :: frames_per_auxhist20						integer , DIMENSION(max_domains) :: frames_per_auxhist20
character*256 :: auxhist21_inname									character*256 :: auxhist21_inname
character*256 :: auxhist21_outname									character*256 :: auxhist21_outname
integer , DIMENSION(max_domains) :: auxhist21_interval_y						integer , DIMENSION(max_domains) :: auxhist21_interval_y
integer , DIMENSION(max_domains) :: auxhist21_interval_d						integer , DIMENSION(max_domains) :: auxhist21_interval_d
integer , DIMENSION(max_domains) :: auxhist21_interval_h						integer , DIMENSION(max_domains) :: auxhist21_interval_h
integer , DIMENSION(max_domains) :: auxhist21_interval_m						integer , DIMENSION(max_domains) :: auxhist21_interval_m
integer , DIMENSION(max_domains) :: auxhist21_interval_s						integer , DIMENSION(max_domains) :: auxhist21_interval_s
integer , DIMENSION(max_domains) :: auxhist21_interval							integer , DIMENSION(max_domains) :: auxhist21_interval
integer , DIMENSION(max_domains) :: auxhist21_begin_y							integer , DIMENSION(max_domains) :: auxhist21_begin_y
integer , DIMENSION(max_domains) :: auxhist21_begin_d							integer , DIMENSION(max_domains) :: auxhist21_begin_d
integer , DIMENSION(max_domains) :: auxhist21_begin_h							integer , DIMENSION(max_domains) :: auxhist21_begin_h
integer , DIMENSION(max_domains) :: auxhist21_begin_m							integer , DIMENSION(max_domains) :: auxhist21_begin_m
integer , DIMENSION(max_domains) :: auxhist21_begin_s							integer , DIMENSION(max_domains) :: auxhist21_begin_s
integer , DIMENSION(max_domains) :: auxhist21_begin							integer , DIMENSION(max_domains) :: auxhist21_begin
integer , DIMENSION(max_domains) :: auxhist21_end_y							integer , DIMENSION(max_domains) :: auxhist21_end_y
integer , DIMENSION(max_domains) :: auxhist21_end_d							integer , DIMENSION(max_domains) :: auxhist21_end_d
integer , DIMENSION(max_domains) :: auxhist21_end_h							integer , DIMENSION(max_domains) :: auxhist21_end_h
integer , DIMENSION(max_domains) :: auxhist21_end_m							integer , DIMENSION(max_domains) :: auxhist21_end_m
integer , DIMENSION(max_domains) :: auxhist21_end_s							integer , DIMENSION(max_domains) :: auxhist21_end_s
integer , DIMENSION(max_domains) :: auxhist21_end							integer , DIMENSION(max_domains) :: auxhist21_end
integer :: io_form_auxhist21										integer :: io_form_auxhist21
integer , DIMENSION(max_domains) :: frames_per_auxhist21						integer , DIMENSION(max_domains) :: frames_per_auxhist21
character*256 :: auxhist22_inname									character*256 :: auxhist22_inname
character*256 :: auxhist22_outname									character*256 :: auxhist22_outname
integer , DIMENSION(max_domains) :: auxhist22_interval_y						integer , DIMENSION(max_domains) :: auxhist22_interval_y
integer , DIMENSION(max_domains) :: auxhist22_interval_d						integer , DIMENSION(max_domains) :: auxhist22_interval_d
integer , DIMENSION(max_domains) :: auxhist22_interval_h						integer , DIMENSION(max_domains) :: auxhist22_interval_h
integer , DIMENSION(max_domains) :: auxhist22_interval_m						integer , DIMENSION(max_domains) :: auxhist22_interval_m
integer , DIMENSION(max_domains) :: auxhist22_interval_s						integer , DIMENSION(max_domains) :: auxhist22_interval_s
integer , DIMENSION(max_domains) :: auxhist22_interval							integer , DIMENSION(max_domains) :: auxhist22_interval
integer , DIMENSION(max_domains) :: auxhist22_begin_y							integer , DIMENSION(max_domains) :: auxhist22_begin_y
integer , DIMENSION(max_domains) :: auxhist22_begin_d							integer , DIMENSION(max_domains) :: auxhist22_begin_d
integer , DIMENSION(max_domains) :: auxhist22_begin_h							integer , DIMENSION(max_domains) :: auxhist22_begin_h
integer , DIMENSION(max_domains) :: auxhist22_begin_m							integer , DIMENSION(max_domains) :: auxhist22_begin_m
integer , DIMENSION(max_domains) :: auxhist22_begin_s							integer , DIMENSION(max_domains) :: auxhist22_begin_s
integer , DIMENSION(max_domains) :: auxhist22_begin							integer , DIMENSION(max_domains) :: auxhist22_begin
integer , DIMENSION(max_domains) :: auxhist22_end_y							integer , DIMENSION(max_domains) :: auxhist22_end_y
integer , DIMENSION(max_domains) :: auxhist22_end_d							integer , DIMENSION(max_domains) :: auxhist22_end_d
integer , DIMENSION(max_domains) :: auxhist22_end_h							integer , DIMENSION(max_domains) :: auxhist22_end_h
integer , DIMENSION(max_domains) :: auxhist22_end_m							integer , DIMENSION(max_domains) :: auxhist22_end_m
integer , DIMENSION(max_domains) :: auxhist22_end_s							integer , DIMENSION(max_domains) :: auxhist22_end_s
integer , DIMENSION(max_domains) :: auxhist22_end							integer , DIMENSION(max_domains) :: auxhist22_end
integer :: io_form_auxhist22										integer :: io_form_auxhist22
integer , DIMENSION(max_domains) :: frames_per_auxhist22						integer , DIMENSION(max_domains) :: frames_per_auxhist22
character*256 :: auxhist23_inname									character*256 :: auxhist23_inname
character*256 :: auxhist23_outname									character*256 :: auxhist23_outname
integer , DIMENSION(max_domains) :: auxhist23_interval_y						integer , DIMENSION(max_domains) :: auxhist23_interval_y
integer , DIMENSION(max_domains) :: auxhist23_interval_d						integer , DIMENSION(max_domains) :: auxhist23_interval_d
integer , DIMENSION(max_domains) :: auxhist23_interval_h						integer , DIMENSION(max_domains) :: auxhist23_interval_h
integer , DIMENSION(max_domains) :: auxhist23_interval_m						integer , DIMENSION(max_domains) :: auxhist23_interval_m
integer , DIMENSION(max_domains) :: auxhist23_interval_s						integer , DIMENSION(max_domains) :: auxhist23_interval_s
integer , DIMENSION(max_domains) :: auxhist23_interval							integer , DIMENSION(max_domains) :: auxhist23_interval
integer , DIMENSION(max_domains) :: auxhist23_begin_y							integer , DIMENSION(max_domains) :: auxhist23_begin_y
integer , DIMENSION(max_domains) :: auxhist23_begin_d							integer , DIMENSION(max_domains) :: auxhist23_begin_d
integer , DIMENSION(max_domains) :: auxhist23_begin_h							integer , DIMENSION(max_domains) :: auxhist23_begin_h
integer , DIMENSION(max_domains) :: auxhist23_begin_m							integer , DIMENSION(max_domains) :: auxhist23_begin_m
integer , DIMENSION(max_domains) :: auxhist23_begin_s							integer , DIMENSION(max_domains) :: auxhist23_begin_s
integer , DIMENSION(max_domains) :: auxhist23_begin							integer , DIMENSION(max_domains) :: auxhist23_begin
integer , DIMENSION(max_domains) :: auxhist23_end_y							integer , DIMENSION(max_domains) :: auxhist23_end_y
integer , DIMENSION(max_domains) :: auxhist23_end_d							integer , DIMENSION(max_domains) :: auxhist23_end_d
integer , DIMENSION(max_domains) :: auxhist23_end_h							integer , DIMENSION(max_domains) :: auxhist23_end_h
integer , DIMENSION(max_domains) :: auxhist23_end_m							integer , DIMENSION(max_domains) :: auxhist23_end_m
integer , DIMENSION(max_domains) :: auxhist23_end_s							integer , DIMENSION(max_domains) :: auxhist23_end_s
integer , DIMENSION(max_domains) :: auxhist23_end							integer , DIMENSION(max_domains) :: auxhist23_end
integer :: io_form_auxhist23										integer :: io_form_auxhist23
integer , DIMENSION(max_domains) :: frames_per_auxhist23						integer , DIMENSION(max_domains) :: frames_per_auxhist23
character*256 :: auxhist24_inname									character*256 :: auxhist24_inname
character*256 :: auxhist24_outname									character*256 :: auxhist24_outname
integer , DIMENSION(max_domains) :: auxhist24_interval_y						integer , DIMENSION(max_domains) :: auxhist24_interval_y
integer , DIMENSION(max_domains) :: auxhist24_interval_d						integer , DIMENSION(max_domains) :: auxhist24_interval_d
integer , DIMENSION(max_domains) :: auxhist24_interval_h						integer , DIMENSION(max_domains) :: auxhist24_interval_h
integer , DIMENSION(max_domains) :: auxhist24_interval_m						integer , DIMENSION(max_domains) :: auxhist24_interval_m
integer , DIMENSION(max_domains) :: auxhist24_interval_s						integer , DIMENSION(max_domains) :: auxhist24_interval_s
integer , DIMENSION(max_domains) :: auxhist24_interval							integer , DIMENSION(max_domains) :: auxhist24_interval
integer , DIMENSION(max_domains) :: auxhist24_begin_y							integer , DIMENSION(max_domains) :: auxhist24_begin_y
integer , DIMENSION(max_domains) :: auxhist24_begin_d							integer , DIMENSION(max_domains) :: auxhist24_begin_d
integer , DIMENSION(max_domains) :: auxhist24_begin_h							integer , DIMENSION(max_domains) :: auxhist24_begin_h
integer , DIMENSION(max_domains) :: auxhist24_begin_m							integer , DIMENSION(max_domains) :: auxhist24_begin_m
integer , DIMENSION(max_domains) :: auxhist24_begin_s							integer , DIMENSION(max_domains) :: auxhist24_begin_s
integer , DIMENSION(max_domains) :: auxhist24_begin							integer , DIMENSION(max_domains) :: auxhist24_begin
integer , DIMENSION(max_domains) :: auxhist24_end_y							integer , DIMENSION(max_domains) :: auxhist24_end_y
integer , DIMENSION(max_domains) :: auxhist24_end_d							integer , DIMENSION(max_domains) :: auxhist24_end_d
integer , DIMENSION(max_domains) :: auxhist24_end_h							integer , DIMENSION(max_domains) :: auxhist24_end_h
integer , DIMENSION(max_domains) :: auxhist24_end_m							integer , DIMENSION(max_domains) :: auxhist24_end_m
integer , DIMENSION(max_domains) :: auxhist24_end_s							integer , DIMENSION(max_domains) :: auxhist24_end_s
integer , DIMENSION(max_domains) :: auxhist24_end							integer , DIMENSION(max_domains) :: auxhist24_end
integer :: io_form_auxhist24										integer :: io_form_auxhist24
integer , DIMENSION(max_domains) :: frames_per_auxhist24						integer , DIMENSION(max_domains) :: frames_per_auxhist24
character*256 :: auxinput1_outname									character*256 :: auxinput1_outname
integer , DIMENSION(max_domains) :: auxinput1_interval_y						integer , DIMENSION(max_domains) :: auxinput1_interval_y
integer , DIMENSION(max_domains) :: auxinput1_interval_d						integer , DIMENSION(max_domains) :: auxinput1_interval_d
integer , DIMENSION(max_domains) :: auxinput1_interval_h						integer , DIMENSION(max_domains) :: auxinput1_interval_h
integer , DIMENSION(max_domains) :: auxinput1_interval_m						integer , DIMENSION(max_domains) :: auxinput1_interval_m
integer , DIMENSION(max_domains) :: auxinput1_interval_s						integer , DIMENSION(max_domains) :: auxinput1_interval_s
integer , DIMENSION(max_domains) :: auxinput1_interval							integer , DIMENSION(max_domains) :: auxinput1_interval
integer , DIMENSION(max_domains) :: auxinput1_begin_y							integer , DIMENSION(max_domains) :: auxinput1_begin_y
integer , DIMENSION(max_domains) :: auxinput1_begin_d							integer , DIMENSION(max_domains) :: auxinput1_begin_d
integer , DIMENSION(max_domains) :: auxinput1_begin_h							integer , DIMENSION(max_domains) :: auxinput1_begin_h
integer , DIMENSION(max_domains) :: auxinput1_begin_m							integer , DIMENSION(max_domains) :: auxinput1_begin_m
integer , DIMENSION(max_domains) :: auxinput1_begin_s							integer , DIMENSION(max_domains) :: auxinput1_begin_s
integer , DIMENSION(max_domains) :: auxinput1_begin							integer , DIMENSION(max_domains) :: auxinput1_begin
integer , DIMENSION(max_domains) :: auxinput1_end_y							integer , DIMENSION(max_domains) :: auxinput1_end_y
integer , DIMENSION(max_domains) :: auxinput1_end_d							integer , DIMENSION(max_domains) :: auxinput1_end_d
integer , DIMENSION(max_domains) :: auxinput1_end_h							integer , DIMENSION(max_domains) :: auxinput1_end_h
integer , DIMENSION(max_domains) :: auxinput1_end_m							integer , DIMENSION(max_domains) :: auxinput1_end_m
integer , DIMENSION(max_domains) :: auxinput1_end_s							integer , DIMENSION(max_domains) :: auxinput1_end_s
integer , DIMENSION(max_domains) :: auxinput1_end							integer , DIMENSION(max_domains) :: auxinput1_end
integer , DIMENSION(max_domains) :: frames_per_auxinput1						integer , DIMENSION(max_domains) :: frames_per_auxinput1
character*256 :: auxinput2_inname									character*256 :: auxinput2_inname
character*256 :: auxinput2_outname									character*256 :: auxinput2_outname
integer , DIMENSION(max_domains) :: auxinput2_interval_y						integer , DIMENSION(max_domains) :: auxinput2_interval_y
integer , DIMENSION(max_domains) :: auxinput2_interval_d						integer , DIMENSION(max_domains) :: auxinput2_interval_d
integer , DIMENSION(max_domains) :: auxinput2_interval_h						integer , DIMENSION(max_domains) :: auxinput2_interval_h
integer , DIMENSION(max_domains) :: auxinput2_interval_m						integer , DIMENSION(max_domains) :: auxinput2_interval_m
integer , DIMENSION(max_domains) :: auxinput2_interval_s						integer , DIMENSION(max_domains) :: auxinput2_interval_s
integer , DIMENSION(max_domains) :: auxinput2_interval							integer , DIMENSION(max_domains) :: auxinput2_interval
integer , DIMENSION(max_domains) :: auxinput2_begin_y							integer , DIMENSION(max_domains) :: auxinput2_begin_y
integer , DIMENSION(max_domains) :: auxinput2_begin_d							integer , DIMENSION(max_domains) :: auxinput2_begin_d
integer , DIMENSION(max_domains) :: auxinput2_begin_h							integer , DIMENSION(max_domains) :: auxinput2_begin_h
integer , DIMENSION(max_domains) :: auxinput2_begin_m							integer , DIMENSION(max_domains) :: auxinput2_begin_m
integer , DIMENSION(max_domains) :: auxinput2_begin_s							integer , DIMENSION(max_domains) :: auxinput2_begin_s
integer , DIMENSION(max_domains) :: auxinput2_begin							integer , DIMENSION(max_domains) :: auxinput2_begin
integer , DIMENSION(max_domains) :: auxinput2_end_y							integer , DIMENSION(max_domains) :: auxinput2_end_y
integer , DIMENSION(max_domains) :: auxinput2_end_d							integer , DIMENSION(max_domains) :: auxinput2_end_d
integer , DIMENSION(max_domains) :: auxinput2_end_h							integer , DIMENSION(max_domains) :: auxinput2_end_h
integer , DIMENSION(max_domains) :: auxinput2_end_m							integer , DIMENSION(max_domains) :: auxinput2_end_m
integer , DIMENSION(max_domains) :: auxinput2_end_s							integer , DIMENSION(max_domains) :: auxinput2_end_s
integer , DIMENSION(max_domains) :: auxinput2_end							integer , DIMENSION(max_domains) :: auxinput2_end
integer :: io_form_auxinput2										integer :: io_form_auxinput2
integer , DIMENSION(max_domains) :: frames_per_auxinput2						integer , DIMENSION(max_domains) :: frames_per_auxinput2
character*256 :: auxinput3_inname									character*256 :: auxinput3_inname
character*256 :: auxinput3_outname									character*256 :: auxinput3_outname
integer , DIMENSION(max_domains) :: auxinput3_interval_y						integer , DIMENSION(max_domains) :: auxinput3_interval_y
integer , DIMENSION(max_domains) :: auxinput3_interval_d						integer , DIMENSION(max_domains) :: auxinput3_interval_d
integer , DIMENSION(max_domains) :: auxinput3_interval_h						integer , DIMENSION(max_domains) :: auxinput3_interval_h
integer , DIMENSION(max_domains) :: auxinput3_interval_m						integer , DIMENSION(max_domains) :: auxinput3_interval_m
integer , DIMENSION(max_domains) :: auxinput3_interval_s						integer , DIMENSION(max_domains) :: auxinput3_interval_s
integer , DIMENSION(max_domains) :: auxinput3_interval							integer , DIMENSION(max_domains) :: auxinput3_interval
integer , DIMENSION(max_domains) :: auxinput3_begin_y							integer , DIMENSION(max_domains) :: auxinput3_begin_y
integer , DIMENSION(max_domains) :: auxinput3_begin_d							integer , DIMENSION(max_domains) :: auxinput3_begin_d
integer , DIMENSION(max_domains) :: auxinput3_begin_h							integer , DIMENSION(max_domains) :: auxinput3_begin_h
integer , DIMENSION(max_domains) :: auxinput3_begin_m							integer , DIMENSION(max_domains) :: auxinput3_begin_m
integer , DIMENSION(max_domains) :: auxinput3_begin_s							integer , DIMENSION(max_domains) :: auxinput3_begin_s
integer , DIMENSION(max_domains) :: auxinput3_begin							integer , DIMENSION(max_domains) :: auxinput3_begin
integer , DIMENSION(max_domains) :: auxinput3_end_y							integer , DIMENSION(max_domains) :: auxinput3_end_y
integer , DIMENSION(max_domains) :: auxinput3_end_d							integer , DIMENSION(max_domains) :: auxinput3_end_d
integer , DIMENSION(max_domains) :: auxinput3_end_h							integer , DIMENSION(max_domains) :: auxinput3_end_h
integer , DIMENSION(max_domains) :: auxinput3_end_m							integer , DIMENSION(max_domains) :: auxinput3_end_m
integer , DIMENSION(max_domains) :: auxinput3_end_s							integer , DIMENSION(max_domains) :: auxinput3_end_s
integer , DIMENSION(max_domains) :: auxinput3_end							integer , DIMENSION(max_domains) :: auxinput3_end
integer :: io_form_auxinput3										integer :: io_form_auxinput3
integer , DIMENSION(max_domains) :: frames_per_auxinput3						integer , DIMENSION(max_domains) :: frames_per_auxinput3
character*256 :: auxinput4_inname									character*256 :: auxinput4_inname
character*256 :: auxinput4_outname									character*256 :: auxinput4_outname
integer , DIMENSION(max_domains) :: auxinput4_interval_y						integer , DIMENSION(max_domains) :: auxinput4_interval_y
integer , DIMENSION(max_domains) :: auxinput4_interval_d						integer , DIMENSION(max_domains) :: auxinput4_interval_d
integer , DIMENSION(max_domains) :: auxinput4_interval_h						integer , DIMENSION(max_domains) :: auxinput4_interval_h
integer , DIMENSION(max_domains) :: auxinput4_interval_m						integer , DIMENSION(max_domains) :: auxinput4_interval_m
integer , DIMENSION(max_domains) :: auxinput4_interval_s						integer , DIMENSION(max_domains) :: auxinput4_interval_s
integer , DIMENSION(max_domains) :: auxinput4_interval							integer , DIMENSION(max_domains) :: auxinput4_interval
integer , DIMENSION(max_domains) :: auxinput4_begin_y							integer , DIMENSION(max_domains) :: auxinput4_begin_y
integer , DIMENSION(max_domains) :: auxinput4_begin_d							integer , DIMENSION(max_domains) :: auxinput4_begin_d
integer , DIMENSION(max_domains) :: auxinput4_begin_h							integer , DIMENSION(max_domains) :: auxinput4_begin_h
integer , DIMENSION(max_domains) :: auxinput4_begin_m							integer , DIMENSION(max_domains) :: auxinput4_begin_m
integer , DIMENSION(max_domains) :: auxinput4_begin_s							integer , DIMENSION(max_domains) :: auxinput4_begin_s
integer , DIMENSION(max_domains) :: auxinput4_begin							integer , DIMENSION(max_domains) :: auxinput4_begin
integer , DIMENSION(max_domains) :: auxinput4_end_y							integer , DIMENSION(max_domains) :: auxinput4_end_y
integer , DIMENSION(max_domains) :: auxinput4_end_d							integer , DIMENSION(max_domains) :: auxinput4_end_d
integer , DIMENSION(max_domains) :: auxinput4_end_h							integer , DIMENSION(max_domains) :: auxinput4_end_h
integer , DIMENSION(max_domains) :: auxinput4_end_m							integer , DIMENSION(max_domains) :: auxinput4_end_m
integer , DIMENSION(max_domains) :: auxinput4_end_s							integer , DIMENSION(max_domains) :: auxinput4_end_s
integer , DIMENSION(max_domains) :: auxinput4_end							integer , DIMENSION(max_domains) :: auxinput4_end
integer :: io_form_auxinput4										integer :: io_form_auxinput4
integer , DIMENSION(max_domains) :: frames_per_auxinput4						integer , DIMENSION(max_domains) :: frames_per_auxinput4
character*256 :: auxinput5_inname									character*256 :: auxinput5_inname
character*256 :: auxinput5_outname									character*256 :: auxinput5_outname
integer , DIMENSION(max_domains) :: auxinput5_interval_y						integer , DIMENSION(max_domains) :: auxinput5_interval_y
integer , DIMENSION(max_domains) :: auxinput5_interval_d						integer , DIMENSION(max_domains) :: auxinput5_interval_d
integer , DIMENSION(max_domains) :: auxinput5_interval_h						integer , DIMENSION(max_domains) :: auxinput5_interval_h
integer , DIMENSION(max_domains) :: auxinput5_interval_m						integer , DIMENSION(max_domains) :: auxinput5_interval_m
integer , DIMENSION(max_domains) :: auxinput5_interval_s						integer , DIMENSION(max_domains) :: auxinput5_interval_s
integer , DIMENSION(max_domains) :: auxinput5_interval							integer , DIMENSION(max_domains) :: auxinput5_interval
integer , DIMENSION(max_domains) :: auxinput5_begin_y							integer , DIMENSION(max_domains) :: auxinput5_begin_y
integer , DIMENSION(max_domains) :: auxinput5_begin_d							integer , DIMENSION(max_domains) :: auxinput5_begin_d
integer , DIMENSION(max_domains) :: auxinput5_begin_h							integer , DIMENSION(max_domains) :: auxinput5_begin_h
integer , DIMENSION(max_domains) :: auxinput5_begin_m							integer , DIMENSION(max_domains) :: auxinput5_begin_m
integer , DIMENSION(max_domains) :: auxinput5_begin_s							integer , DIMENSION(max_domains) :: auxinput5_begin_s
integer , DIMENSION(max_domains) :: auxinput5_begin							integer , DIMENSION(max_domains) :: auxinput5_begin
integer , DIMENSION(max_domains) :: auxinput5_end_y							integer , DIMENSION(max_domains) :: auxinput5_end_y
integer , DIMENSION(max_domains) :: auxinput5_end_d							integer , DIMENSION(max_domains) :: auxinput5_end_d
integer , DIMENSION(max_domains) :: auxinput5_end_h							integer , DIMENSION(max_domains) :: auxinput5_end_h
integer , DIMENSION(max_domains) :: auxinput5_end_m							integer , DIMENSION(max_domains) :: auxinput5_end_m
integer , DIMENSION(max_domains) :: auxinput5_end_s							integer , DIMENSION(max_domains) :: auxinput5_end_s
integer , DIMENSION(max_domains) :: auxinput5_end							integer , DIMENSION(max_domains) :: auxinput5_end
integer :: io_form_auxinput5										integer :: io_form_auxinput5
integer , DIMENSION(max_domains) :: frames_per_auxinput5						integer , DIMENSION(max_domains) :: frames_per_auxinput5
character*256 :: auxinput6_inname									character*256 :: auxinput6_inname
character*256 :: auxinput6_outname									character*256 :: auxinput6_outname
integer , DIMENSION(max_domains) :: auxinput6_interval_y						integer , DIMENSION(max_domains) :: auxinput6_interval_y
integer , DIMENSION(max_domains) :: auxinput6_interval_d						integer , DIMENSION(max_domains) :: auxinput6_interval_d
integer , DIMENSION(max_domains) :: auxinput6_interval_h						integer , DIMENSION(max_domains) :: auxinput6_interval_h
integer , DIMENSION(max_domains) :: auxinput6_interval_m						integer , DIMENSION(max_domains) :: auxinput6_interval_m
integer , DIMENSION(max_domains) :: auxinput6_interval_s						integer , DIMENSION(max_domains) :: auxinput6_interval_s
integer , DIMENSION(max_domains) :: auxinput6_interval							integer , DIMENSION(max_domains) :: auxinput6_interval
integer , DIMENSION(max_domains) :: auxinput6_begin_y							integer , DIMENSION(max_domains) :: auxinput6_begin_y
integer , DIMENSION(max_domains) :: auxinput6_begin_d							integer , DIMENSION(max_domains) :: auxinput6_begin_d
integer , DIMENSION(max_domains) :: auxinput6_begin_h							integer , DIMENSION(max_domains) :: auxinput6_begin_h
integer , DIMENSION(max_domains) :: auxinput6_begin_m							integer , DIMENSION(max_domains) :: auxinput6_begin_m
integer , DIMENSION(max_domains) :: auxinput6_begin_s							integer , DIMENSION(max_domains) :: auxinput6_begin_s
integer , DIMENSION(max_domains) :: auxinput6_begin							integer , DIMENSION(max_domains) :: auxinput6_begin
integer , DIMENSION(max_domains) :: auxinput6_end_y							integer , DIMENSION(max_domains) :: auxinput6_end_y
integer , DIMENSION(max_domains) :: auxinput6_end_d							integer , DIMENSION(max_domains) :: auxinput6_end_d
integer , DIMENSION(max_domains) :: auxinput6_end_h							integer , DIMENSION(max_domains) :: auxinput6_end_h
integer , DIMENSION(max_domains) :: auxinput6_end_m							integer , DIMENSION(max_domains) :: auxinput6_end_m
integer , DIMENSION(max_domains) :: auxinput6_end_s							integer , DIMENSION(max_domains) :: auxinput6_end_s
integer , DIMENSION(max_domains) :: auxinput6_end							integer , DIMENSION(max_domains) :: auxinput6_end
integer :: io_form_auxinput6										integer :: io_form_auxinput6
integer , DIMENSION(max_domains) :: frames_per_auxinput6						integer , DIMENSION(max_domains) :: frames_per_auxinput6
character*256 :: auxinput7_inname									character*256 :: auxinput7_inname
character*256 :: auxinput7_outname									character*256 :: auxinput7_outname
integer , DIMENSION(max_domains) :: auxinput7_interval_y						integer , DIMENSION(max_domains) :: auxinput7_interval_y
integer , DIMENSION(max_domains) :: auxinput7_interval_d						integer , DIMENSION(max_domains) :: auxinput7_interval_d
integer , DIMENSION(max_domains) :: auxinput7_interval_h						integer , DIMENSION(max_domains) :: auxinput7_interval_h
integer , DIMENSION(max_domains) :: auxinput7_interval_m						integer , DIMENSION(max_domains) :: auxinput7_interval_m
integer , DIMENSION(max_domains) :: auxinput7_interval_s						integer , DIMENSION(max_domains) :: auxinput7_interval_s
integer , DIMENSION(max_domains) :: auxinput7_interval							integer , DIMENSION(max_domains) :: auxinput7_interval
integer , DIMENSION(max_domains) :: auxinput7_begin_y							integer , DIMENSION(max_domains) :: auxinput7_begin_y
integer , DIMENSION(max_domains) :: auxinput7_begin_d							integer , DIMENSION(max_domains) :: auxinput7_begin_d
integer , DIMENSION(max_domains) :: auxinput7_begin_h							integer , DIMENSION(max_domains) :: auxinput7_begin_h
integer , DIMENSION(max_domains) :: auxinput7_begin_m							integer , DIMENSION(max_domains) :: auxinput7_begin_m
integer , DIMENSION(max_domains) :: auxinput7_begin_s							integer , DIMENSION(max_domains) :: auxinput7_begin_s
integer , DIMENSION(max_domains) :: auxinput7_begin							integer , DIMENSION(max_domains) :: auxinput7_begin
integer , DIMENSION(max_domains) :: auxinput7_end_y							integer , DIMENSION(max_domains) :: auxinput7_end_y
integer , DIMENSION(max_domains) :: auxinput7_end_d							integer , DIMENSION(max_domains) :: auxinput7_end_d
integer , DIMENSION(max_domains) :: auxinput7_end_h							integer , DIMENSION(max_domains) :: auxinput7_end_h
integer , DIMENSION(max_domains) :: auxinput7_end_m							integer , DIMENSION(max_domains) :: auxinput7_end_m
integer , DIMENSION(max_domains) :: auxinput7_end_s							integer , DIMENSION(max_domains) :: auxinput7_end_s
integer , DIMENSION(max_domains) :: auxinput7_end							integer , DIMENSION(max_domains) :: auxinput7_end
integer :: io_form_auxinput7										integer :: io_form_auxinput7
integer , DIMENSION(max_domains) :: frames_per_auxinput7						integer , DIMENSION(max_domains) :: frames_per_auxinput7
character*256 :: auxinput8_inname									character*256 :: auxinput8_inname
character*256 :: auxinput8_outname									character*256 :: auxinput8_outname
integer , DIMENSION(max_domains) :: auxinput8_interval_y						integer , DIMENSION(max_domains) :: auxinput8_interval_y
integer , DIMENSION(max_domains) :: auxinput8_interval_d						integer , DIMENSION(max_domains) :: auxinput8_interval_d
integer , DIMENSION(max_domains) :: auxinput8_interval_h						integer , DIMENSION(max_domains) :: auxinput8_interval_h
integer , DIMENSION(max_domains) :: auxinput8_interval_m						integer , DIMENSION(max_domains) :: auxinput8_interval_m
integer , DIMENSION(max_domains) :: auxinput8_interval_s						integer , DIMENSION(max_domains) :: auxinput8_interval_s
integer , DIMENSION(max_domains) :: auxinput8_interval							integer , DIMENSION(max_domains) :: auxinput8_interval
integer , DIMENSION(max_domains) :: auxinput8_begin_y							integer , DIMENSION(max_domains) :: auxinput8_begin_y
integer , DIMENSION(max_domains) :: auxinput8_begin_d							integer , DIMENSION(max_domains) :: auxinput8_begin_d
integer , DIMENSION(max_domains) :: auxinput8_begin_h							integer , DIMENSION(max_domains) :: auxinput8_begin_h
integer , DIMENSION(max_domains) :: auxinput8_begin_m							integer , DIMENSION(max_domains) :: auxinput8_begin_m
integer , DIMENSION(max_domains) :: auxinput8_begin_s							integer , DIMENSION(max_domains) :: auxinput8_begin_s
integer , DIMENSION(max_domains) :: auxinput8_begin							integer , DIMENSION(max_domains) :: auxinput8_begin
integer , DIMENSION(max_domains) :: auxinput8_end_y							integer , DIMENSION(max_domains) :: auxinput8_end_y
integer , DIMENSION(max_domains) :: auxinput8_end_d							integer , DIMENSION(max_domains) :: auxinput8_end_d
integer , DIMENSION(max_domains) :: auxinput8_end_h							integer , DIMENSION(max_domains) :: auxinput8_end_h
integer , DIMENSION(max_domains) :: auxinput8_end_m							integer , DIMENSION(max_domains) :: auxinput8_end_m
integer , DIMENSION(max_domains) :: auxinput8_end_s							integer , DIMENSION(max_domains) :: auxinput8_end_s
integer , DIMENSION(max_domains) :: auxinput8_end							integer , DIMENSION(max_domains) :: auxinput8_end
integer :: io_form_auxinput8										integer :: io_form_auxinput8
integer , DIMENSION(max_domains) :: frames_per_auxinput8						integer , DIMENSION(max_domains) :: frames_per_auxinput8
character*256 :: auxinput9_inname									character*256 :: auxinput9_inname
character*256 :: auxinput9_outname									character*256 :: auxinput9_outname
integer , DIMENSION(max_domains) :: auxinput9_interval_y						integer , DIMENSION(max_domains) :: auxinput9_interval_y
integer , DIMENSION(max_domains) :: auxinput9_interval_d						integer , DIMENSION(max_domains) :: auxinput9_interval_d
integer , DIMENSION(max_domains) :: auxinput9_interval_h						integer , DIMENSION(max_domains) :: auxinput9_interval_h
integer , DIMENSION(max_domains) :: auxinput9_interval_m						integer , DIMENSION(max_domains) :: auxinput9_interval_m
integer , DIMENSION(max_domains) :: auxinput9_interval_s						integer , DIMENSION(max_domains) :: auxinput9_interval_s
integer , DIMENSION(max_domains) :: auxinput9_interval							integer , DIMENSION(max_domains) :: auxinput9_interval
integer , DIMENSION(max_domains) :: auxinput9_begin_y							integer , DIMENSION(max_domains) :: auxinput9_begin_y
integer , DIMENSION(max_domains) :: auxinput9_begin_d							integer , DIMENSION(max_domains) :: auxinput9_begin_d
integer , DIMENSION(max_domains) :: auxinput9_begin_h							integer , DIMENSION(max_domains) :: auxinput9_begin_h
integer , DIMENSION(max_domains) :: auxinput9_begin_m							integer , DIMENSION(max_domains) :: auxinput9_begin_m
integer , DIMENSION(max_domains) :: auxinput9_begin_s							integer , DIMENSION(max_domains) :: auxinput9_begin_s
integer , DIMENSION(max_domains) :: auxinput9_begin							integer , DIMENSION(max_domains) :: auxinput9_begin
integer , DIMENSION(max_domains) :: auxinput9_end_y							integer , DIMENSION(max_domains) :: auxinput9_end_y
integer , DIMENSION(max_domains) :: auxinput9_end_d							integer , DIMENSION(max_domains) :: auxinput9_end_d
integer , DIMENSION(max_domains) :: auxinput9_end_h							integer , DIMENSION(max_domains) :: auxinput9_end_h
integer , DIMENSION(max_domains) :: auxinput9_end_m							integer , DIMENSION(max_domains) :: auxinput9_end_m
integer , DIMENSION(max_domains) :: auxinput9_end_s							integer , DIMENSION(max_domains) :: auxinput9_end_s
integer , DIMENSION(max_domains) :: auxinput9_end							integer , DIMENSION(max_domains) :: auxinput9_end
integer :: io_form_auxinput9										integer :: io_form_auxinput9
integer , DIMENSION(max_domains) :: frames_per_auxinput9						integer , DIMENSION(max_domains) :: frames_per_auxinput9
character*256 :: auxinput10_inname									character*256 :: auxinput10_inname
character*256 :: auxinput10_outname									character*256 :: auxinput10_outname
integer , DIMENSION(max_domains) :: auxinput10_interval_y						integer , DIMENSION(max_domains) :: auxinput10_interval_y
integer , DIMENSION(max_domains) :: auxinput10_interval_d						integer , DIMENSION(max_domains) :: auxinput10_interval_d
integer , DIMENSION(max_domains) :: auxinput10_interval_h						integer , DIMENSION(max_domains) :: auxinput10_interval_h
integer , DIMENSION(max_domains) :: auxinput10_interval_m						integer , DIMENSION(max_domains) :: auxinput10_interval_m
integer , DIMENSION(max_domains) :: auxinput10_interval_s						integer , DIMENSION(max_domains) :: auxinput10_interval_s
integer , DIMENSION(max_domains) :: auxinput10_interval							integer , DIMENSION(max_domains) :: auxinput10_interval
integer , DIMENSION(max_domains) :: auxinput10_begin_y							integer , DIMENSION(max_domains) :: auxinput10_begin_y
integer , DIMENSION(max_domains) :: auxinput10_begin_d							integer , DIMENSION(max_domains) :: auxinput10_begin_d
integer , DIMENSION(max_domains) :: auxinput10_begin_h							integer , DIMENSION(max_domains) :: auxinput10_begin_h
integer , DIMENSION(max_domains) :: auxinput10_begin_m							integer , DIMENSION(max_domains) :: auxinput10_begin_m
integer , DIMENSION(max_domains) :: auxinput10_begin_s							integer , DIMENSION(max_domains) :: auxinput10_begin_s
integer , DIMENSION(max_domains) :: auxinput10_begin							integer , DIMENSION(max_domains) :: auxinput10_begin
integer , DIMENSION(max_domains) :: auxinput10_end_y							integer , DIMENSION(max_domains) :: auxinput10_end_y
integer , DIMENSION(max_domains) :: auxinput10_end_d							integer , DIMENSION(max_domains) :: auxinput10_end_d
integer , DIMENSION(max_domains) :: auxinput10_end_h							integer , DIMENSION(max_domains) :: auxinput10_end_h
integer , DIMENSION(max_domains) :: auxinput10_end_m							integer , DIMENSION(max_domains) :: auxinput10_end_m
integer , DIMENSION(max_domains) :: auxinput10_end_s							integer , DIMENSION(max_domains) :: auxinput10_end_s
integer , DIMENSION(max_domains) :: auxinput10_end							integer , DIMENSION(max_domains) :: auxinput10_end
integer :: io_form_auxinput10										integer :: io_form_auxinput10
integer , DIMENSION(max_domains) :: frames_per_auxinput10						integer , DIMENSION(max_domains) :: frames_per_auxinput10
character*256 :: auxinput11_inname									character*256 :: auxinput11_inname
character*256 :: auxinput11_outname									character*256 :: auxinput11_outname
integer , DIMENSION(max_domains) :: auxinput11_interval_y						integer , DIMENSION(max_domains) :: auxinput11_interval_y
integer , DIMENSION(max_domains) :: auxinput11_interval_d						integer , DIMENSION(max_domains) :: auxinput11_interval_d
integer , DIMENSION(max_domains) :: auxinput11_interval_h						integer , DIMENSION(max_domains) :: auxinput11_interval_h
integer , DIMENSION(max_domains) :: auxinput11_interval_m						integer , DIMENSION(max_domains) :: auxinput11_interval_m
integer , DIMENSION(max_domains) :: auxinput11_interval_s						integer , DIMENSION(max_domains) :: auxinput11_interval_s
integer , DIMENSION(max_domains) :: auxinput11_interval							integer , DIMENSION(max_domains) :: auxinput11_interval
integer , DIMENSION(max_domains) :: auxinput11_begin_y							integer , DIMENSION(max_domains) :: auxinput11_begin_y
integer , DIMENSION(max_domains) :: auxinput11_begin_d							integer , DIMENSION(max_domains) :: auxinput11_begin_d
integer , DIMENSION(max_domains) :: auxinput11_begin_h							integer , DIMENSION(max_domains) :: auxinput11_begin_h
integer , DIMENSION(max_domains) :: auxinput11_begin_m							integer , DIMENSION(max_domains) :: auxinput11_begin_m
integer , DIMENSION(max_domains) :: auxinput11_begin_s							integer , DIMENSION(max_domains) :: auxinput11_begin_s
integer , DIMENSION(max_domains) :: auxinput11_begin							integer , DIMENSION(max_domains) :: auxinput11_begin
integer , DIMENSION(max_domains) :: auxinput11_end_y							integer , DIMENSION(max_domains) :: auxinput11_end_y
integer , DIMENSION(max_domains) :: auxinput11_end_d							integer , DIMENSION(max_domains) :: auxinput11_end_d
integer , DIMENSION(max_domains) :: auxinput11_end_h							integer , DIMENSION(max_domains) :: auxinput11_end_h
integer , DIMENSION(max_domains) :: auxinput11_end_m							integer , DIMENSION(max_domains) :: auxinput11_end_m
integer , DIMENSION(max_domains) :: auxinput11_end_s							integer , DIMENSION(max_domains) :: auxinput11_end_s
integer , DIMENSION(max_domains) :: auxinput11_end							integer , DIMENSION(max_domains) :: auxinput11_end
integer :: io_form_auxinput11										integer :: io_form_auxinput11
integer , DIMENSION(max_domains) :: frames_per_auxinput11						integer , DIMENSION(max_domains) :: frames_per_auxinput11
character*256 :: auxinput12_inname									character*256 :: auxinput12_inname
character*256 :: auxinput12_outname									character*256 :: auxinput12_outname
integer , DIMENSION(max_domains) :: auxinput12_interval_y						integer , DIMENSION(max_domains) :: auxinput12_interval_y
integer , DIMENSION(max_domains) :: auxinput12_interval_d						integer , DIMENSION(max_domains) :: auxinput12_interval_d
integer , DIMENSION(max_domains) :: auxinput12_interval_h						integer , DIMENSION(max_domains) :: auxinput12_interval_h
integer , DIMENSION(max_domains) :: auxinput12_interval_m						integer , DIMENSION(max_domains) :: auxinput12_interval_m
integer , DIMENSION(max_domains) :: auxinput12_interval_s						integer , DIMENSION(max_domains) :: auxinput12_interval_s
integer , DIMENSION(max_domains) :: auxinput12_interval							integer , DIMENSION(max_domains) :: auxinput12_interval
integer , DIMENSION(max_domains) :: auxinput12_begin_y							integer , DIMENSION(max_domains) :: auxinput12_begin_y
integer , DIMENSION(max_domains) :: auxinput12_begin_d							integer , DIMENSION(max_domains) :: auxinput12_begin_d
integer , DIMENSION(max_domains) :: auxinput12_begin_h							integer , DIMENSION(max_domains) :: auxinput12_begin_h
integer , DIMENSION(max_domains) :: auxinput12_begin_m							integer , DIMENSION(max_domains) :: auxinput12_begin_m
integer , DIMENSION(max_domains) :: auxinput12_begin_s							integer , DIMENSION(max_domains) :: auxinput12_begin_s
integer , DIMENSION(max_domains) :: auxinput12_begin							integer , DIMENSION(max_domains) :: auxinput12_begin
integer , DIMENSION(max_domains) :: auxinput12_end_y							integer , DIMENSION(max_domains) :: auxinput12_end_y
integer , DIMENSION(max_domains) :: auxinput12_end_d							integer , DIMENSION(max_domains) :: auxinput12_end_d
integer , DIMENSION(max_domains) :: auxinput12_end_h							integer , DIMENSION(max_domains) :: auxinput12_end_h
integer , DIMENSION(max_domains) :: auxinput12_end_m							integer , DIMENSION(max_domains) :: auxinput12_end_m
integer , DIMENSION(max_domains) :: auxinput12_end_s							integer , DIMENSION(max_domains) :: auxinput12_end_s
integer , DIMENSION(max_domains) :: auxinput12_end							integer , DIMENSION(max_domains) :: auxinput12_end
integer :: io_form_auxinput12										integer :: io_form_auxinput12
integer , DIMENSION(max_domains) :: frames_per_auxinput12						integer , DIMENSION(max_domains) :: frames_per_auxinput12
character*256 :: auxinput13_inname									character*256 :: auxinput13_inname
character*256 :: auxinput13_outname									character*256 :: auxinput13_outname
integer , DIMENSION(max_domains) :: auxinput13_interval_y						integer , DIMENSION(max_domains) :: auxinput13_interval_y
integer , DIMENSION(max_domains) :: auxinput13_interval_d						integer , DIMENSION(max_domains) :: auxinput13_interval_d
integer , DIMENSION(max_domains) :: auxinput13_interval_h						integer , DIMENSION(max_domains) :: auxinput13_interval_h
integer , DIMENSION(max_domains) :: auxinput13_interval_m						integer , DIMENSION(max_domains) :: auxinput13_interval_m
integer , DIMENSION(max_domains) :: auxinput13_interval_s						integer , DIMENSION(max_domains) :: auxinput13_interval_s
integer , DIMENSION(max_domains) :: auxinput13_interval							integer , DIMENSION(max_domains) :: auxinput13_interval
integer , DIMENSION(max_domains) :: auxinput13_begin_y							integer , DIMENSION(max_domains) :: auxinput13_begin_y
integer , DIMENSION(max_domains) :: auxinput13_begin_d							integer , DIMENSION(max_domains) :: auxinput13_begin_d
integer , DIMENSION(max_domains) :: auxinput13_begin_h							integer , DIMENSION(max_domains) :: auxinput13_begin_h
integer , DIMENSION(max_domains) :: auxinput13_begin_m							integer , DIMENSION(max_domains) :: auxinput13_begin_m
integer , DIMENSION(max_domains) :: auxinput13_begin_s							integer , DIMENSION(max_domains) :: auxinput13_begin_s
integer , DIMENSION(max_domains) :: auxinput13_begin							integer , DIMENSION(max_domains) :: auxinput13_begin
integer , DIMENSION(max_domains) :: auxinput13_end_y							integer , DIMENSION(max_domains) :: auxinput13_end_y
integer , DIMENSION(max_domains) :: auxinput13_end_d							integer , DIMENSION(max_domains) :: auxinput13_end_d
integer , DIMENSION(max_domains) :: auxinput13_end_h							integer , DIMENSION(max_domains) :: auxinput13_end_h
integer , DIMENSION(max_domains) :: auxinput13_end_m							integer , DIMENSION(max_domains) :: auxinput13_end_m
integer , DIMENSION(max_domains) :: auxinput13_end_s							integer , DIMENSION(max_domains) :: auxinput13_end_s
integer , DIMENSION(max_domains) :: auxinput13_end							integer , DIMENSION(max_domains) :: auxinput13_end
integer :: io_form_auxinput13										integer :: io_form_auxinput13
integer , DIMENSION(max_domains) :: frames_per_auxinput13						integer , DIMENSION(max_domains) :: frames_per_auxinput13
character*256 :: auxinput14_inname									character*256 :: auxinput14_inname
character*256 :: auxinput14_outname									character*256 :: auxinput14_outname
integer , DIMENSION(max_domains) :: auxinput14_interval_y						integer , DIMENSION(max_domains) :: auxinput14_interval_y
integer , DIMENSION(max_domains) :: auxinput14_interval_d						integer , DIMENSION(max_domains) :: auxinput14_interval_d
integer , DIMENSION(max_domains) :: auxinput14_interval_h						integer , DIMENSION(max_domains) :: auxinput14_interval_h
integer , DIMENSION(max_domains) :: auxinput14_interval_m						integer , DIMENSION(max_domains) :: auxinput14_interval_m
integer , DIMENSION(max_domains) :: auxinput14_interval_s						integer , DIMENSION(max_domains) :: auxinput14_interval_s
integer , DIMENSION(max_domains) :: auxinput14_interval							integer , DIMENSION(max_domains) :: auxinput14_interval
integer , DIMENSION(max_domains) :: auxinput14_begin_y							integer , DIMENSION(max_domains) :: auxinput14_begin_y
integer , DIMENSION(max_domains) :: auxinput14_begin_d							integer , DIMENSION(max_domains) :: auxinput14_begin_d
integer , DIMENSION(max_domains) :: auxinput14_begin_h							integer , DIMENSION(max_domains) :: auxinput14_begin_h
integer , DIMENSION(max_domains) :: auxinput14_begin_m							integer , DIMENSION(max_domains) :: auxinput14_begin_m
integer , DIMENSION(max_domains) :: auxinput14_begin_s							integer , DIMENSION(max_domains) :: auxinput14_begin_s
integer , DIMENSION(max_domains) :: auxinput14_begin							integer , DIMENSION(max_domains) :: auxinput14_begin
integer , DIMENSION(max_domains) :: auxinput14_end_y							integer , DIMENSION(max_domains) :: auxinput14_end_y
integer , DIMENSION(max_domains) :: auxinput14_end_d							integer , DIMENSION(max_domains) :: auxinput14_end_d
integer , DIMENSION(max_domains) :: auxinput14_end_h							integer , DIMENSION(max_domains) :: auxinput14_end_h
integer , DIMENSION(max_domains) :: auxinput14_end_m							integer , DIMENSION(max_domains) :: auxinput14_end_m
integer , DIMENSION(max_domains) :: auxinput14_end_s							integer , DIMENSION(max_domains) :: auxinput14_end_s
integer , DIMENSION(max_domains) :: auxinput14_end							integer , DIMENSION(max_domains) :: auxinput14_end
integer :: io_form_auxinput14										integer :: io_form_auxinput14
integer , DIMENSION(max_domains) :: frames_per_auxinput14						integer , DIMENSION(max_domains) :: frames_per_auxinput14
character*256 :: auxinput15_inname									character*256 :: auxinput15_inname
character*256 :: auxinput15_outname									character*256 :: auxinput15_outname
integer , DIMENSION(max_domains) :: auxinput15_interval_y						integer , DIMENSION(max_domains) :: auxinput15_interval_y
integer , DIMENSION(max_domains) :: auxinput15_interval_d						integer , DIMENSION(max_domains) :: auxinput15_interval_d
integer , DIMENSION(max_domains) :: auxinput15_interval_h						integer , DIMENSION(max_domains) :: auxinput15_interval_h
integer , DIMENSION(max_domains) :: auxinput15_interval_m						integer , DIMENSION(max_domains) :: auxinput15_interval_m
integer , DIMENSION(max_domains) :: auxinput15_interval_s						integer , DIMENSION(max_domains) :: auxinput15_interval_s
integer , DIMENSION(max_domains) :: auxinput15_interval							integer , DIMENSION(max_domains) :: auxinput15_interval
integer , DIMENSION(max_domains) :: auxinput15_begin_y							integer , DIMENSION(max_domains) :: auxinput15_begin_y
integer , DIMENSION(max_domains) :: auxinput15_begin_d							integer , DIMENSION(max_domains) :: auxinput15_begin_d
integer , DIMENSION(max_domains) :: auxinput15_begin_h							integer , DIMENSION(max_domains) :: auxinput15_begin_h
integer , DIMENSION(max_domains) :: auxinput15_begin_m							integer , DIMENSION(max_domains) :: auxinput15_begin_m
integer , DIMENSION(max_domains) :: auxinput15_begin_s							integer , DIMENSION(max_domains) :: auxinput15_begin_s
integer , DIMENSION(max_domains) :: auxinput15_begin							integer , DIMENSION(max_domains) :: auxinput15_begin
integer , DIMENSION(max_domains) :: auxinput15_end_y							integer , DIMENSION(max_domains) :: auxinput15_end_y
integer , DIMENSION(max_domains) :: auxinput15_end_d							integer , DIMENSION(max_domains) :: auxinput15_end_d
integer , DIMENSION(max_domains) :: auxinput15_end_h							integer , DIMENSION(max_domains) :: auxinput15_end_h
integer , DIMENSION(max_domains) :: auxinput15_end_m							integer , DIMENSION(max_domains) :: auxinput15_end_m
integer , DIMENSION(max_domains) :: auxinput15_end_s							integer , DIMENSION(max_domains) :: auxinput15_end_s
integer , DIMENSION(max_domains) :: auxinput15_end							integer , DIMENSION(max_domains) :: auxinput15_end
integer :: io_form_auxinput15										integer :: io_form_auxinput15
integer , DIMENSION(max_domains) :: frames_per_auxinput15						integer , DIMENSION(max_domains) :: frames_per_auxinput15
character*256 :: auxinput16_inname									character*256 :: auxinput16_inname
character*256 :: auxinput16_outname									character*256 :: auxinput16_outname
integer , DIMENSION(max_domains) :: auxinput16_interval_y						integer , DIMENSION(max_domains) :: auxinput16_interval_y
integer , DIMENSION(max_domains) :: auxinput16_interval_d						integer , DIMENSION(max_domains) :: auxinput16_interval_d
integer , DIMENSION(max_domains) :: auxinput16_interval_h						integer , DIMENSION(max_domains) :: auxinput16_interval_h
integer , DIMENSION(max_domains) :: auxinput16_interval_m						integer , DIMENSION(max_domains) :: auxinput16_interval_m
integer , DIMENSION(max_domains) :: auxinput16_interval_s						integer , DIMENSION(max_domains) :: auxinput16_interval_s
integer , DIMENSION(max_domains) :: auxinput16_interval							integer , DIMENSION(max_domains) :: auxinput16_interval
integer , DIMENSION(max_domains) :: auxinput16_begin_y							integer , DIMENSION(max_domains) :: auxinput16_begin_y
integer , DIMENSION(max_domains) :: auxinput16_begin_d							integer , DIMENSION(max_domains) :: auxinput16_begin_d
integer , DIMENSION(max_domains) :: auxinput16_begin_h							integer , DIMENSION(max_domains) :: auxinput16_begin_h
integer , DIMENSION(max_domains) :: auxinput16_begin_m							integer , DIMENSION(max_domains) :: auxinput16_begin_m
integer , DIMENSION(max_domains) :: auxinput16_begin_s							integer , DIMENSION(max_domains) :: auxinput16_begin_s
integer , DIMENSION(max_domains) :: auxinput16_begin							integer , DIMENSION(max_domains) :: auxinput16_begin
integer , DIMENSION(max_domains) :: auxinput16_end_y							integer , DIMENSION(max_domains) :: auxinput16_end_y
integer , DIMENSION(max_domains) :: auxinput16_end_d							integer , DIMENSION(max_domains) :: auxinput16_end_d
integer , DIMENSION(max_domains) :: auxinput16_end_h							integer , DIMENSION(max_domains) :: auxinput16_end_h
integer , DIMENSION(max_domains) :: auxinput16_end_m							integer , DIMENSION(max_domains) :: auxinput16_end_m
integer , DIMENSION(max_domains) :: auxinput16_end_s							integer , DIMENSION(max_domains) :: auxinput16_end_s
integer , DIMENSION(max_domains) :: auxinput16_end							integer , DIMENSION(max_domains) :: auxinput16_end
integer :: io_form_auxinput16										integer :: io_form_auxinput16
integer , DIMENSION(max_domains) :: frames_per_auxinput16						integer , DIMENSION(max_domains) :: frames_per_auxinput16
character*256 :: auxinput17_inname									character*256 :: auxinput17_inname
character*256 :: auxinput17_outname									character*256 :: auxinput17_outname
integer , DIMENSION(max_domains) :: auxinput17_interval_y						integer , DIMENSION(max_domains) :: auxinput17_interval_y
integer , DIMENSION(max_domains) :: auxinput17_interval_d						integer , DIMENSION(max_domains) :: auxinput17_interval_d
integer , DIMENSION(max_domains) :: auxinput17_interval_h						integer , DIMENSION(max_domains) :: auxinput17_interval_h
integer , DIMENSION(max_domains) :: auxinput17_interval_m						integer , DIMENSION(max_domains) :: auxinput17_interval_m
integer , DIMENSION(max_domains) :: auxinput17_interval_s						integer , DIMENSION(max_domains) :: auxinput17_interval_s
integer , DIMENSION(max_domains) :: auxinput17_interval							integer , DIMENSION(max_domains) :: auxinput17_interval
integer , DIMENSION(max_domains) :: auxinput17_begin_y							integer , DIMENSION(max_domains) :: auxinput17_begin_y
integer , DIMENSION(max_domains) :: auxinput17_begin_d							integer , DIMENSION(max_domains) :: auxinput17_begin_d
integer , DIMENSION(max_domains) :: auxinput17_begin_h							integer , DIMENSION(max_domains) :: auxinput17_begin_h
integer , DIMENSION(max_domains) :: auxinput17_begin_m							integer , DIMENSION(max_domains) :: auxinput17_begin_m
integer , DIMENSION(max_domains) :: auxinput17_begin_s							integer , DIMENSION(max_domains) :: auxinput17_begin_s
integer , DIMENSION(max_domains) :: auxinput17_begin							integer , DIMENSION(max_domains) :: auxinput17_begin
integer , DIMENSION(max_domains) :: auxinput17_end_y							integer , DIMENSION(max_domains) :: auxinput17_end_y
integer , DIMENSION(max_domains) :: auxinput17_end_d							integer , DIMENSION(max_domains) :: auxinput17_end_d
integer , DIMENSION(max_domains) :: auxinput17_end_h							integer , DIMENSION(max_domains) :: auxinput17_end_h
integer , DIMENSION(max_domains) :: auxinput17_end_m							integer , DIMENSION(max_domains) :: auxinput17_end_m
integer , DIMENSION(max_domains) :: auxinput17_end_s							integer , DIMENSION(max_domains) :: auxinput17_end_s
integer , DIMENSION(max_domains) :: auxinput17_end							integer , DIMENSION(max_domains) :: auxinput17_end
integer :: io_form_auxinput17										integer :: io_form_auxinput17
integer , DIMENSION(max_domains) :: frames_per_auxinput17						integer , DIMENSION(max_domains) :: frames_per_auxinput17
character*256 :: auxinput18_inname									character*256 :: auxinput18_inname
character*256 :: auxinput18_outname									character*256 :: auxinput18_outname
integer , DIMENSION(max_domains) :: auxinput18_interval_y						integer , DIMENSION(max_domains) :: auxinput18_interval_y
integer , DIMENSION(max_domains) :: auxinput18_interval_d						integer , DIMENSION(max_domains) :: auxinput18_interval_d
integer , DIMENSION(max_domains) :: auxinput18_interval_h						integer , DIMENSION(max_domains) :: auxinput18_interval_h
integer , DIMENSION(max_domains) :: auxinput18_interval_m						integer , DIMENSION(max_domains) :: auxinput18_interval_m
integer , DIMENSION(max_domains) :: auxinput18_interval_s						integer , DIMENSION(max_domains) :: auxinput18_interval_s
integer , DIMENSION(max_domains) :: auxinput18_interval							integer , DIMENSION(max_domains) :: auxinput18_interval
integer , DIMENSION(max_domains) :: auxinput18_begin_y							integer , DIMENSION(max_domains) :: auxinput18_begin_y
integer , DIMENSION(max_domains) :: auxinput18_begin_d							integer , DIMENSION(max_domains) :: auxinput18_begin_d
integer , DIMENSION(max_domains) :: auxinput18_begin_h							integer , DIMENSION(max_domains) :: auxinput18_begin_h
integer , DIMENSION(max_domains) :: auxinput18_begin_m							integer , DIMENSION(max_domains) :: auxinput18_begin_m
integer , DIMENSION(max_domains) :: auxinput18_begin_s							integer , DIMENSION(max_domains) :: auxinput18_begin_s
integer , DIMENSION(max_domains) :: auxinput18_begin							integer , DIMENSION(max_domains) :: auxinput18_begin
integer , DIMENSION(max_domains) :: auxinput18_end_y							integer , DIMENSION(max_domains) :: auxinput18_end_y
integer , DIMENSION(max_domains) :: auxinput18_end_d							integer , DIMENSION(max_domains) :: auxinput18_end_d
integer , DIMENSION(max_domains) :: auxinput18_end_h							integer , DIMENSION(max_domains) :: auxinput18_end_h
integer , DIMENSION(max_domains) :: auxinput18_end_m							integer , DIMENSION(max_domains) :: auxinput18_end_m
integer , DIMENSION(max_domains) :: auxinput18_end_s							integer , DIMENSION(max_domains) :: auxinput18_end_s
integer , DIMENSION(max_domains) :: auxinput18_end							integer , DIMENSION(max_domains) :: auxinput18_end
integer :: io_form_auxinput18										integer :: io_form_auxinput18
integer , DIMENSION(max_domains) :: frames_per_auxinput18						integer , DIMENSION(max_domains) :: frames_per_auxinput18
character*256 :: auxinput19_inname									character*256 :: auxinput19_inname
character*256 :: auxinput19_outname									character*256 :: auxinput19_outname
integer , DIMENSION(max_domains) :: auxinput19_interval_y						integer , DIMENSION(max_domains) :: auxinput19_interval_y
integer , DIMENSION(max_domains) :: auxinput19_interval_d						integer , DIMENSION(max_domains) :: auxinput19_interval_d
integer , DIMENSION(max_domains) :: auxinput19_interval_h						integer , DIMENSION(max_domains) :: auxinput19_interval_h
integer , DIMENSION(max_domains) :: auxinput19_interval_m						integer , DIMENSION(max_domains) :: auxinput19_interval_m
integer , DIMENSION(max_domains) :: auxinput19_interval_s						integer , DIMENSION(max_domains) :: auxinput19_interval_s
integer , DIMENSION(max_domains) :: auxinput19_interval							integer , DIMENSION(max_domains) :: auxinput19_interval
integer , DIMENSION(max_domains) :: auxinput19_begin_y							integer , DIMENSION(max_domains) :: auxinput19_begin_y
integer , DIMENSION(max_domains) :: auxinput19_begin_d							integer , DIMENSION(max_domains) :: auxinput19_begin_d
integer , DIMENSION(max_domains) :: auxinput19_begin_h							integer , DIMENSION(max_domains) :: auxinput19_begin_h
integer , DIMENSION(max_domains) :: auxinput19_begin_m							integer , DIMENSION(max_domains) :: auxinput19_begin_m
integer , DIMENSION(max_domains) :: auxinput19_begin_s							integer , DIMENSION(max_domains) :: auxinput19_begin_s
integer , DIMENSION(max_domains) :: auxinput19_begin							integer , DIMENSION(max_domains) :: auxinput19_begin
integer , DIMENSION(max_domains) :: auxinput19_end_y							integer , DIMENSION(max_domains) :: auxinput19_end_y
integer , DIMENSION(max_domains) :: auxinput19_end_d							integer , DIMENSION(max_domains) :: auxinput19_end_d
integer , DIMENSION(max_domains) :: auxinput19_end_h							integer , DIMENSION(max_domains) :: auxinput19_end_h
integer , DIMENSION(max_domains) :: auxinput19_end_m							integer , DIMENSION(max_domains) :: auxinput19_end_m
integer , DIMENSION(max_domains) :: auxinput19_end_s							integer , DIMENSION(max_domains) :: auxinput19_end_s
integer , DIMENSION(max_domains) :: auxinput19_end							integer , DIMENSION(max_domains) :: auxinput19_end
integer :: io_form_auxinput19										integer :: io_form_auxinput19
integer , DIMENSION(max_domains) :: frames_per_auxinput19						integer , DIMENSION(max_domains) :: frames_per_auxinput19
character*256 :: auxinput20_inname									character*256 :: auxinput20_inname
character*256 :: auxinput20_outname									character*256 :: auxinput20_outname
integer , DIMENSION(max_domains) :: auxinput20_interval_y						integer , DIMENSION(max_domains) :: auxinput20_interval_y
integer , DIMENSION(max_domains) :: auxinput20_interval_d						integer , DIMENSION(max_domains) :: auxinput20_interval_d
integer , DIMENSION(max_domains) :: auxinput20_interval_h						integer , DIMENSION(max_domains) :: auxinput20_interval_h
integer , DIMENSION(max_domains) :: auxinput20_interval_m						integer , DIMENSION(max_domains) :: auxinput20_interval_m
integer , DIMENSION(max_domains) :: auxinput20_interval_s						integer , DIMENSION(max_domains) :: auxinput20_interval_s
integer , DIMENSION(max_domains) :: auxinput20_interval							integer , DIMENSION(max_domains) :: auxinput20_interval
integer , DIMENSION(max_domains) :: auxinput20_begin_y							integer , DIMENSION(max_domains) :: auxinput20_begin_y
integer , DIMENSION(max_domains) :: auxinput20_begin_d							integer , DIMENSION(max_domains) :: auxinput20_begin_d
integer , DIMENSION(max_domains) :: auxinput20_begin_h							integer , DIMENSION(max_domains) :: auxinput20_begin_h
integer , DIMENSION(max_domains) :: auxinput20_begin_m							integer , DIMENSION(max_domains) :: auxinput20_begin_m
integer , DIMENSION(max_domains) :: auxinput20_begin_s							integer , DIMENSION(max_domains) :: auxinput20_begin_s
integer , DIMENSION(max_domains) :: auxinput20_begin							integer , DIMENSION(max_domains) :: auxinput20_begin
integer , DIMENSION(max_domains) :: auxinput20_end_y							integer , DIMENSION(max_domains) :: auxinput20_end_y
integer , DIMENSION(max_domains) :: auxinput20_end_d							integer , DIMENSION(max_domains) :: auxinput20_end_d
integer , DIMENSION(max_domains) :: auxinput20_end_h							integer , DIMENSION(max_domains) :: auxinput20_end_h
integer , DIMENSION(max_domains) :: auxinput20_end_m							integer , DIMENSION(max_domains) :: auxinput20_end_m
integer , DIMENSION(max_domains) :: auxinput20_end_s							integer , DIMENSION(max_domains) :: auxinput20_end_s
integer , DIMENSION(max_domains) :: auxinput20_end							integer , DIMENSION(max_domains) :: auxinput20_end
integer :: io_form_auxinput20										integer :: io_form_auxinput20
integer , DIMENSION(max_domains) :: frames_per_auxinput20						integer , DIMENSION(max_domains) :: frames_per_auxinput20
character*256 :: auxinput21_inname									character*256 :: auxinput21_inname
character*256 :: auxinput21_outname									character*256 :: auxinput21_outname
integer , DIMENSION(max_domains) :: auxinput21_interval_y						integer , DIMENSION(max_domains) :: auxinput21_interval_y
integer , DIMENSION(max_domains) :: auxinput21_interval_d						integer , DIMENSION(max_domains) :: auxinput21_interval_d
integer , DIMENSION(max_domains) :: auxinput21_interval_h						integer , DIMENSION(max_domains) :: auxinput21_interval_h
integer , DIMENSION(max_domains) :: auxinput21_interval_m						integer , DIMENSION(max_domains) :: auxinput21_interval_m
integer , DIMENSION(max_domains) :: auxinput21_interval_s						integer , DIMENSION(max_domains) :: auxinput21_interval_s
integer , DIMENSION(max_domains) :: auxinput21_interval							integer , DIMENSION(max_domains) :: auxinput21_interval
integer , DIMENSION(max_domains) :: auxinput21_begin_y							integer , DIMENSION(max_domains) :: auxinput21_begin_y
integer , DIMENSION(max_domains) :: auxinput21_begin_d							integer , DIMENSION(max_domains) :: auxinput21_begin_d
integer , DIMENSION(max_domains) :: auxinput21_begin_h							integer , DIMENSION(max_domains) :: auxinput21_begin_h
integer , DIMENSION(max_domains) :: auxinput21_begin_m							integer , DIMENSION(max_domains) :: auxinput21_begin_m
integer , DIMENSION(max_domains) :: auxinput21_begin_s							integer , DIMENSION(max_domains) :: auxinput21_begin_s
integer , DIMENSION(max_domains) :: auxinput21_begin							integer , DIMENSION(max_domains) :: auxinput21_begin
integer , DIMENSION(max_domains) :: auxinput21_end_y							integer , DIMENSION(max_domains) :: auxinput21_end_y
integer , DIMENSION(max_domains) :: auxinput21_end_d							integer , DIMENSION(max_domains) :: auxinput21_end_d
integer , DIMENSION(max_domains) :: auxinput21_end_h							integer , DIMENSION(max_domains) :: auxinput21_end_h
integer , DIMENSION(max_domains) :: auxinput21_end_m							integer , DIMENSION(max_domains) :: auxinput21_end_m
integer , DIMENSION(max_domains) :: auxinput21_end_s							integer , DIMENSION(max_domains) :: auxinput21_end_s
integer , DIMENSION(max_domains) :: auxinput21_end							integer , DIMENSION(max_domains) :: auxinput21_end
integer :: io_form_auxinput21										integer :: io_form_auxinput21
integer , DIMENSION(max_domains) :: frames_per_auxinput21						integer , DIMENSION(max_domains) :: frames_per_auxinput21
character*256 :: auxinput22_inname									character*256 :: auxinput22_inname
character*256 :: auxinput22_outname									character*256 :: auxinput22_outname
integer , DIMENSION(max_domains) :: auxinput22_interval_y						integer , DIMENSION(max_domains) :: auxinput22_interval_y
integer , DIMENSION(max_domains) :: auxinput22_interval_d						integer , DIMENSION(max_domains) :: auxinput22_interval_d
integer , DIMENSION(max_domains) :: auxinput22_interval_h						integer , DIMENSION(max_domains) :: auxinput22_interval_h
integer , DIMENSION(max_domains) :: auxinput22_interval_m						integer , DIMENSION(max_domains) :: auxinput22_interval_m
integer , DIMENSION(max_domains) :: auxinput22_interval_s						integer , DIMENSION(max_domains) :: auxinput22_interval_s
integer , DIMENSION(max_domains) :: auxinput22_interval							integer , DIMENSION(max_domains) :: auxinput22_interval
integer , DIMENSION(max_domains) :: auxinput22_begin_y							integer , DIMENSION(max_domains) :: auxinput22_begin_y
integer , DIMENSION(max_domains) :: auxinput22_begin_d							integer , DIMENSION(max_domains) :: auxinput22_begin_d
integer , DIMENSION(max_domains) :: auxinput22_begin_h							integer , DIMENSION(max_domains) :: auxinput22_begin_h
integer , DIMENSION(max_domains) :: auxinput22_begin_m							integer , DIMENSION(max_domains) :: auxinput22_begin_m
integer , DIMENSION(max_domains) :: auxinput22_begin_s							integer , DIMENSION(max_domains) :: auxinput22_begin_s
integer , DIMENSION(max_domains) :: auxinput22_begin							integer , DIMENSION(max_domains) :: auxinput22_begin
integer , DIMENSION(max_domains) :: auxinput22_end_y							integer , DIMENSION(max_domains) :: auxinput22_end_y
integer , DIMENSION(max_domains) :: auxinput22_end_d							integer , DIMENSION(max_domains) :: auxinput22_end_d
integer , DIMENSION(max_domains) :: auxinput22_end_h							integer , DIMENSION(max_domains) :: auxinput22_end_h
integer , DIMENSION(max_domains) :: auxinput22_end_m							integer , DIMENSION(max_domains) :: auxinput22_end_m
integer , DIMENSION(max_domains) :: auxinput22_end_s							integer , DIMENSION(max_domains) :: auxinput22_end_s
integer , DIMENSION(max_domains) :: auxinput22_end							integer , DIMENSION(max_domains) :: auxinput22_end
integer :: io_form_auxinput22										integer :: io_form_auxinput22
integer , DIMENSION(max_domains) :: frames_per_auxinput22						integer , DIMENSION(max_domains) :: frames_per_auxinput22
character*256 :: auxinput23_inname									character*256 :: auxinput23_inname
character*256 :: auxinput23_outname									character*256 :: auxinput23_outname
integer , DIMENSION(max_domains) :: auxinput23_interval_y						integer , DIMENSION(max_domains) :: auxinput23_interval_y
integer , DIMENSION(max_domains) :: auxinput23_interval_d						integer , DIMENSION(max_domains) :: auxinput23_interval_d
integer , DIMENSION(max_domains) :: auxinput23_interval_h						integer , DIMENSION(max_domains) :: auxinput23_interval_h
integer , DIMENSION(max_domains) :: auxinput23_interval_m						integer , DIMENSION(max_domains) :: auxinput23_interval_m
integer , DIMENSION(max_domains) :: auxinput23_interval_s						integer , DIMENSION(max_domains) :: auxinput23_interval_s
integer , DIMENSION(max_domains) :: auxinput23_interval							integer , DIMENSION(max_domains) :: auxinput23_interval
integer , DIMENSION(max_domains) :: auxinput23_begin_y							integer , DIMENSION(max_domains) :: auxinput23_begin_y
integer , DIMENSION(max_domains) :: auxinput23_begin_d							integer , DIMENSION(max_domains) :: auxinput23_begin_d
integer , DIMENSION(max_domains) :: auxinput23_begin_h							integer , DIMENSION(max_domains) :: auxinput23_begin_h
integer , DIMENSION(max_domains) :: auxinput23_begin_m							integer , DIMENSION(max_domains) :: auxinput23_begin_m
integer , DIMENSION(max_domains) :: auxinput23_begin_s							integer , DIMENSION(max_domains) :: auxinput23_begin_s
integer , DIMENSION(max_domains) :: auxinput23_begin							integer , DIMENSION(max_domains) :: auxinput23_begin
integer , DIMENSION(max_domains) :: auxinput23_end_y							integer , DIMENSION(max_domains) :: auxinput23_end_y
integer , DIMENSION(max_domains) :: auxinput23_end_d							integer , DIMENSION(max_domains) :: auxinput23_end_d
integer , DIMENSION(max_domains) :: auxinput23_end_h							integer , DIMENSION(max_domains) :: auxinput23_end_h
integer , DIMENSION(max_domains) :: auxinput23_end_m							integer , DIMENSION(max_domains) :: auxinput23_end_m
integer , DIMENSION(max_domains) :: auxinput23_end_s							integer , DIMENSION(max_domains) :: auxinput23_end_s
integer , DIMENSION(max_domains) :: auxinput23_end							integer , DIMENSION(max_domains) :: auxinput23_end
integer :: io_form_auxinput23										integer :: io_form_auxinput23
integer , DIMENSION(max_domains) :: frames_per_auxinput23						integer , DIMENSION(max_domains) :: frames_per_auxinput23
character*256 :: auxinput24_inname									character*256 :: auxinput24_inname
character*256 :: auxinput24_outname									character*256 :: auxinput24_outname
integer , DIMENSION(max_domains) :: auxinput24_interval_y						integer , DIMENSION(max_domains) :: auxinput24_interval_y
integer , DIMENSION(max_domains) :: auxinput24_interval_d						integer , DIMENSION(max_domains) :: auxinput24_interval_d
integer , DIMENSION(max_domains) :: auxinput24_interval_h						integer , DIMENSION(max_domains) :: auxinput24_interval_h
integer , DIMENSION(max_domains) :: auxinput24_interval_m						integer , DIMENSION(max_domains) :: auxinput24_interval_m
integer , DIMENSION(max_domains) :: auxinput24_interval_s						integer , DIMENSION(max_domains) :: auxinput24_interval_s
integer , DIMENSION(max_domains) :: auxinput24_interval							integer , DIMENSION(max_domains) :: auxinput24_interval
integer , DIMENSION(max_domains) :: auxinput24_begin_y							integer , DIMENSION(max_domains) :: auxinput24_begin_y
integer , DIMENSION(max_domains) :: auxinput24_begin_d							integer , DIMENSION(max_domains) :: auxinput24_begin_d
integer , DIMENSION(max_domains) :: auxinput24_begin_h							integer , DIMENSION(max_domains) :: auxinput24_begin_h
integer , DIMENSION(max_domains) :: auxinput24_begin_m							integer , DIMENSION(max_domains) :: auxinput24_begin_m
integer , DIMENSION(max_domains) :: auxinput24_begin_s							integer , DIMENSION(max_domains) :: auxinput24_begin_s
integer , DIMENSION(max_domains) :: auxinput24_begin							integer , DIMENSION(max_domains) :: auxinput24_begin
integer , DIMENSION(max_domains) :: auxinput24_end_y							integer , DIMENSION(max_domains) :: auxinput24_end_y
integer , DIMENSION(max_domains) :: auxinput24_end_d							integer , DIMENSION(max_domains) :: auxinput24_end_d
integer , DIMENSION(max_domains) :: auxinput24_end_h							integer , DIMENSION(max_domains) :: auxinput24_end_h
integer , DIMENSION(max_domains) :: auxinput24_end_m							integer , DIMENSION(max_domains) :: auxinput24_end_m
integer , DIMENSION(max_domains) :: auxinput24_end_s							integer , DIMENSION(max_domains) :: auxinput24_end_s
integer , DIMENSION(max_domains) :: auxinput24_end							integer , DIMENSION(max_domains) :: auxinput24_end
integer :: io_form_auxinput24										integer :: io_form_auxinput24
integer , DIMENSION(max_domains) :: frames_per_auxinput24						integer , DIMENSION(max_domains) :: frames_per_auxinput24
integer , DIMENSION(max_domains) :: history_interval							integer , DIMENSION(max_domains) :: history_interval
integer , DIMENSION(max_domains) :: frames_per_outfile							integer , DIMENSION(max_domains) :: frames_per_outfile
logical :: restart											logical :: restart
integer :: restart_interval										integer :: restart_interval
integer :: io_form_input										integer :: io_form_input
integer :: io_form_history										integer :: io_form_history
integer :: io_form_restart										integer :: io_form_restart
integer :: io_form_boundary										integer :: io_form_boundary
integer :: debug_level											integer :: debug_level
logical :: self_test_domain										logical :: self_test_domain
character*256 :: history_outname									character*256 :: history_outname
character*256 :: history_inname										character*256 :: history_inname
logical :: use_netcdf_classic										logical :: use_netcdf_classic
integer , DIMENSION(max_domains) :: history_interval_d							integer , DIMENSION(max_domains) :: history_interval_d
integer , DIMENSION(max_domains) :: history_interval_h							integer , DIMENSION(max_domains) :: history_interval_h
integer , DIMENSION(max_domains) :: history_interval_m							integer , DIMENSION(max_domains) :: history_interval_m
integer , DIMENSION(max_domains) :: history_interval_s							integer , DIMENSION(max_domains) :: history_interval_s
integer , DIMENSION(max_domains) :: inputout_interval_d							integer , DIMENSION(max_domains) :: inputout_interval_d
integer , DIMENSION(max_domains) :: inputout_interval_h							integer , DIMENSION(max_domains) :: inputout_interval_h
integer , DIMENSION(max_domains) :: inputout_interval_m							integer , DIMENSION(max_domains) :: inputout_interval_m
integer , DIMENSION(max_domains) :: inputout_interval_s							integer , DIMENSION(max_domains) :: inputout_interval_s
integer , DIMENSION(max_domains) :: inputout_interval							integer , DIMENSION(max_domains) :: inputout_interval
integer :: restart_interval_d										integer :: restart_interval_d
integer :: restart_interval_h										integer :: restart_interval_h
integer :: restart_interval_m										integer :: restart_interval_m
integer :: restart_interval_s										integer :: restart_interval_s
integer , DIMENSION(max_domains) :: history_begin_y							integer , DIMENSION(max_domains) :: history_begin_y
integer , DIMENSION(max_domains) :: history_begin_d							integer , DIMENSION(max_domains) :: history_begin_d
integer , DIMENSION(max_domains) :: history_begin_h							integer , DIMENSION(max_domains) :: history_begin_h
integer , DIMENSION(max_domains) :: history_begin_m							integer , DIMENSION(max_domains) :: history_begin_m
integer , DIMENSION(max_domains) :: history_begin_s							integer , DIMENSION(max_domains) :: history_begin_s
integer , DIMENSION(max_domains) :: history_begin							integer , DIMENSION(max_domains) :: history_begin
integer , DIMENSION(max_domains) :: inputout_begin_y							integer , DIMENSION(max_domains) :: inputout_begin_y
integer , DIMENSION(max_domains) :: inputout_begin_d							integer , DIMENSION(max_domains) :: inputout_begin_d
integer , DIMENSION(max_domains) :: inputout_begin_h							integer , DIMENSION(max_domains) :: inputout_begin_h
integer , DIMENSION(max_domains) :: inputout_begin_m							integer , DIMENSION(max_domains) :: inputout_begin_m
integer , DIMENSION(max_domains) :: inputout_begin_s							integer , DIMENSION(max_domains) :: inputout_begin_s
integer :: restart_begin_y										integer :: restart_begin_y
integer :: restart_begin_d										integer :: restart_begin_d
integer :: restart_begin_h										integer :: restart_begin_h
integer :: restart_begin_m										integer :: restart_begin_m
integer :: restart_begin_s										integer :: restart_begin_s
integer :: restart_begin										integer :: restart_begin
integer , DIMENSION(max_domains) :: history_end_y							integer , DIMENSION(max_domains) :: history_end_y
integer , DIMENSION(max_domains) :: history_end_d							integer , DIMENSION(max_domains) :: history_end_d
integer , DIMENSION(max_domains) :: history_end_h							integer , DIMENSION(max_domains) :: history_end_h
integer , DIMENSION(max_domains) :: history_end_m							integer , DIMENSION(max_domains) :: history_end_m
integer , DIMENSION(max_domains) :: history_end_s							integer , DIMENSION(max_domains) :: history_end_s
integer , DIMENSION(max_domains) :: history_end								integer , DIMENSION(max_domains) :: history_end
integer , DIMENSION(max_domains) :: inputout_end_y							integer , DIMENSION(max_domains) :: inputout_end_y
integer , DIMENSION(max_domains) :: inputout_end_d							integer , DIMENSION(max_domains) :: inputout_end_d
integer , DIMENSION(max_domains) :: inputout_end_h							integer , DIMENSION(max_domains) :: inputout_end_h
integer , DIMENSION(max_domains) :: inputout_end_m							integer , DIMENSION(max_domains) :: inputout_end_m
integer , DIMENSION(max_domains) :: inputout_end_s							integer , DIMENSION(max_domains) :: inputout_end_s
integer :: simulation_start_year									integer :: simulation_start_year
integer :: simulation_start_month									integer :: simulation_start_month
integer :: simulation_start_day										integer :: simulation_start_day
integer :: simulation_start_hour									integer :: simulation_start_hour
integer :: simulation_start_minute									integer :: simulation_start_minute
integer :: simulation_start_second									integer :: simulation_start_second
logical :: reset_simulation_start									logical :: reset_simulation_start
integer , DIMENSION(max_domains) :: sr_x								integer , DIMENSION(max_domains) :: sr_x
integer , DIMENSION(max_domains) :: sr_y								integer , DIMENSION(max_domains) :: sr_y
character*256 :: sgfdda_inname										character*256 :: sgfdda_inname
character*256 :: gfdda_inname										character*256 :: gfdda_inname
integer , DIMENSION(max_domains) :: sgfdda_interval_d							integer , DIMENSION(max_domains) :: sgfdda_interval_d
integer , DIMENSION(max_domains) :: sgfdda_interval_h							integer , DIMENSION(max_domains) :: sgfdda_interval_h
integer , DIMENSION(max_domains) :: sgfdda_interval_m							integer , DIMENSION(max_domains) :: sgfdda_interval_m
integer , DIMENSION(max_domains) :: sgfdda_interval_s							integer , DIMENSION(max_domains) :: sgfdda_interval_s
integer , DIMENSION(max_domains) :: sgfdda_interval_y							integer , DIMENSION(max_domains) :: sgfdda_interval_y
integer , DIMENSION(max_domains) :: sgfdda_interval							integer , DIMENSION(max_domains) :: sgfdda_interval
integer , DIMENSION(max_domains) :: gfdda_interval_d							integer , DIMENSION(max_domains) :: gfdda_interval_d
integer , DIMENSION(max_domains) :: gfdda_interval_h							integer , DIMENSION(max_domains) :: gfdda_interval_h
integer , DIMENSION(max_domains) :: gfdda_interval_m							integer , DIMENSION(max_domains) :: gfdda_interval_m
integer , DIMENSION(max_domains) :: gfdda_interval_s							integer , DIMENSION(max_domains) :: gfdda_interval_s
integer , DIMENSION(max_domains) :: gfdda_interval_y							integer , DIMENSION(max_domains) :: gfdda_interval_y
integer , DIMENSION(max_domains) :: gfdda_interval							integer , DIMENSION(max_domains) :: gfdda_interval
integer , DIMENSION(max_domains) :: sgfdda_begin_y							integer , DIMENSION(max_domains) :: sgfdda_begin_y
integer , DIMENSION(max_domains) :: sgfdda_begin_d							integer , DIMENSION(max_domains) :: sgfdda_begin_d
integer , DIMENSION(max_domains) :: sgfdda_begin_h							integer , DIMENSION(max_domains) :: sgfdda_begin_h
integer , DIMENSION(max_domains) :: sgfdda_begin_m							integer , DIMENSION(max_domains) :: sgfdda_begin_m
integer , DIMENSION(max_domains) :: sgfdda_begin_s							integer , DIMENSION(max_domains) :: sgfdda_begin_s
integer , DIMENSION(max_domains) :: gfdda_begin_y							integer , DIMENSION(max_domains) :: gfdda_begin_y
integer , DIMENSION(max_domains) :: gfdda_begin_d							integer , DIMENSION(max_domains) :: gfdda_begin_d
integer , DIMENSION(max_domains) :: gfdda_begin_h							integer , DIMENSION(max_domains) :: gfdda_begin_h
integer , DIMENSION(max_domains) :: gfdda_begin_m							integer , DIMENSION(max_domains) :: gfdda_begin_m
integer , DIMENSION(max_domains) :: gfdda_begin_s							integer , DIMENSION(max_domains) :: gfdda_begin_s
integer , DIMENSION(max_domains) :: sgfdda_end_y							integer , DIMENSION(max_domains) :: sgfdda_end_y
integer , DIMENSION(max_domains) :: sgfdda_end_d							integer , DIMENSION(max_domains) :: sgfdda_end_d
integer , DIMENSION(max_domains) :: sgfdda_end_h							integer , DIMENSION(max_domains) :: sgfdda_end_h
integer , DIMENSION(max_domains) :: sgfdda_end_m							integer , DIMENSION(max_domains) :: sgfdda_end_m
integer , DIMENSION(max_domains) :: sgfdda_end_s							integer , DIMENSION(max_domains) :: sgfdda_end_s
integer , DIMENSION(max_domains) :: gfdda_end_y								integer , DIMENSION(max_domains) :: gfdda_end_y
integer , DIMENSION(max_domains) :: gfdda_end_d								integer , DIMENSION(max_domains) :: gfdda_end_d
integer , DIMENSION(max_domains) :: gfdda_end_h								integer , DIMENSION(max_domains) :: gfdda_end_h
integer , DIMENSION(max_domains) :: gfdda_end_m								integer , DIMENSION(max_domains) :: gfdda_end_m
integer , DIMENSION(max_domains) :: gfdda_end_s								integer , DIMENSION(max_domains) :: gfdda_end_s
integer :: io_form_sgfdda										integer :: io_form_sgfdda
integer :: io_form_gfdda										integer :: io_form_gfdda
character*256 , DIMENSION(max_domains) :: iofields_filename						character*256 , DIMENSION(max_domains) :: iofields_filename
logical :: ignore_iofields_warning									logical :: ignore_iofields_warning
logical :: ncd_nofill											logical :: ncd_nofill
integer , DIMENSION(max_domains) :: ifire								integer , DIMENSION(max_domains) :: ifire
integer , DIMENSION(max_domains) :: fire_boundary_guard							integer , DIMENSION(max_domains) :: fire_boundary_guard
integer , DIMENSION(max_domains) :: fire_num_ignitions							integer , DIMENSION(max_domains) :: fire_num_ignitions
real , DIMENSION(max_domains) :: fire_ignition_ros1							real , DIMENSION(max_domains) :: fire_ignition_ros1
real , DIMENSION(max_domains) :: fire_ignition_start_lon1						real , DIMENSION(max_domains) :: fire_ignition_start_lon1
real , DIMENSION(max_domains) :: fire_ignition_start_lat1						real , DIMENSION(max_domains) :: fire_ignition_start_lat1
real , DIMENSION(max_domains) :: fire_ignition_end_lon1							real , DIMENSION(max_domains) :: fire_ignition_end_lon1
real , DIMENSION(max_domains) :: fire_ignition_end_lat1							real , DIMENSION(max_domains) :: fire_ignition_end_lat1
real , DIMENSION(max_domains) :: fire_ignition_radius1							real , DIMENSION(max_domains) :: fire_ignition_radius1
real , DIMENSION(max_domains) :: fire_ignition_start_time1						real , DIMENSION(max_domains) :: fire_ignition_start_time1
real , DIMENSION(max_domains) :: fire_ignition_end_time1						real , DIMENSION(max_domains) :: fire_ignition_end_time1
real , DIMENSION(max_domains) :: fire_ignition_ros2							real , DIMENSION(max_domains) :: fire_ignition_ros2
real , DIMENSION(max_domains) :: fire_ignition_start_lon2						real , DIMENSION(max_domains) :: fire_ignition_start_lon2
real , DIMENSION(max_domains) :: fire_ignition_start_lat2						real , DIMENSION(max_domains) :: fire_ignition_start_lat2
real , DIMENSION(max_domains) :: fire_ignition_end_lon2							real , DIMENSION(max_domains) :: fire_ignition_end_lon2
real , DIMENSION(max_domains) :: fire_ignition_end_lat2							real , DIMENSION(max_domains) :: fire_ignition_end_lat2
real , DIMENSION(max_domains) :: fire_ignition_radius2							real , DIMENSION(max_domains) :: fire_ignition_radius2
real , DIMENSION(max_domains) :: fire_ignition_start_time2						real , DIMENSION(max_domains) :: fire_ignition_start_time2
real , DIMENSION(max_domains) :: fire_ignition_end_time2						real , DIMENSION(max_domains) :: fire_ignition_end_time2
real , DIMENSION(max_domains) :: fire_ignition_ros3							real , DIMENSION(max_domains) :: fire_ignition_ros3
real , DIMENSION(max_domains) :: fire_ignition_start_lon3						real , DIMENSION(max_domains) :: fire_ignition_start_lon3
real , DIMENSION(max_domains) :: fire_ignition_start_lat3						real , DIMENSION(max_domains) :: fire_ignition_start_lat3
real , DIMENSION(max_domains) :: fire_ignition_end_lon3							real , DIMENSION(max_domains) :: fire_ignition_end_lon3
real , DIMENSION(max_domains) :: fire_ignition_end_lat3							real , DIMENSION(max_domains) :: fire_ignition_end_lat3
real , DIMENSION(max_domains) :: fire_ignition_radius3							real , DIMENSION(max_domains) :: fire_ignition_radius3
real , DIMENSION(max_domains) :: fire_ignition_start_time3						real , DIMENSION(max_domains) :: fire_ignition_start_time3
real , DIMENSION(max_domains) :: fire_ignition_end_time3						real , DIMENSION(max_domains) :: fire_ignition_end_time3
real , DIMENSION(max_domains) :: fire_ignition_ros4							real , DIMENSION(max_domains) :: fire_ignition_ros4
real , DIMENSION(max_domains) :: fire_ignition_start_lon4						real , DIMENSION(max_domains) :: fire_ignition_start_lon4
real , DIMENSION(max_domains) :: fire_ignition_start_lat4						real , DIMENSION(max_domains) :: fire_ignition_start_lat4
real , DIMENSION(max_domains) :: fire_ignition_end_lon4							real , DIMENSION(max_domains) :: fire_ignition_end_lon4
real , DIMENSION(max_domains) :: fire_ignition_end_lat4							real , DIMENSION(max_domains) :: fire_ignition_end_lat4
real , DIMENSION(max_domains) :: fire_ignition_radius4							real , DIMENSION(max_domains) :: fire_ignition_radius4
real , DIMENSION(max_domains) :: fire_ignition_start_time4						real , DIMENSION(max_domains) :: fire_ignition_start_time4
real , DIMENSION(max_domains) :: fire_ignition_end_time4						real , DIMENSION(max_domains) :: fire_ignition_end_time4
real , DIMENSION(max_domains) :: fire_ignition_ros5							real , DIMENSION(max_domains) :: fire_ignition_ros5
real , DIMENSION(max_domains) :: fire_ignition_start_lon5						real , DIMENSION(max_domains) :: fire_ignition_start_lon5
real , DIMENSION(max_domains) :: fire_ignition_start_lat5						real , DIMENSION(max_domains) :: fire_ignition_start_lat5
real , DIMENSION(max_domains) :: fire_ignition_end_lon5							real , DIMENSION(max_domains) :: fire_ignition_end_lon5
real , DIMENSION(max_domains) :: fire_ignition_end_lat5							real , DIMENSION(max_domains) :: fire_ignition_end_lat5
real , DIMENSION(max_domains) :: fire_ignition_radius5							real , DIMENSION(max_domains) :: fire_ignition_radius5
real , DIMENSION(max_domains) :: fire_ignition_start_time5						real , DIMENSION(max_domains) :: fire_ignition_start_time5
real , DIMENSION(max_domains) :: fire_ignition_end_time5						real , DIMENSION(max_domains) :: fire_ignition_end_time5
real , DIMENSION(max_domains) :: fire_ignition_start_x1							real , DIMENSION(max_domains) :: fire_ignition_start_x1
real , DIMENSION(max_domains) :: fire_ignition_start_y1							real , DIMENSION(max_domains) :: fire_ignition_start_y1
real , DIMENSION(max_domains) :: fire_ignition_end_x1							real , DIMENSION(max_domains) :: fire_ignition_end_x1
real , DIMENSION(max_domains) :: fire_ignition_end_y1							real , DIMENSION(max_domains) :: fire_ignition_end_y1
real , DIMENSION(max_domains) :: fire_ignition_start_x2							real , DIMENSION(max_domains) :: fire_ignition_start_x2
real , DIMENSION(max_domains) :: fire_ignition_start_y2							real , DIMENSION(max_domains) :: fire_ignition_start_y2
real , DIMENSION(max_domains) :: fire_ignition_end_x2							real , DIMENSION(max_domains) :: fire_ignition_end_x2
real , DIMENSION(max_domains) :: fire_ignition_end_y2							real , DIMENSION(max_domains) :: fire_ignition_end_y2
real , DIMENSION(max_domains) :: fire_ignition_start_x3							real , DIMENSION(max_domains) :: fire_ignition_start_x3
real , DIMENSION(max_domains) :: fire_ignition_start_y3							real , DIMENSION(max_domains) :: fire_ignition_start_y3
real , DIMENSION(max_domains) :: fire_ignition_end_x3							real , DIMENSION(max_domains) :: fire_ignition_end_x3
real , DIMENSION(max_domains) :: fire_ignition_end_y3							real , DIMENSION(max_domains) :: fire_ignition_end_y3
real , DIMENSION(max_domains) :: fire_ignition_start_x4							real , DIMENSION(max_domains) :: fire_ignition_start_x4
real , DIMENSION(max_domains) :: fire_ignition_start_y4							real , DIMENSION(max_domains) :: fire_ignition_start_y4
real , DIMENSION(max_domains) :: fire_ignition_end_x4							real , DIMENSION(max_domains) :: fire_ignition_end_x4
real , DIMENSION(max_domains) :: fire_ignition_end_y4							real , DIMENSION(max_domains) :: fire_ignition_end_y4
real , DIMENSION(max_domains) :: fire_ignition_start_x5							real , DIMENSION(max_domains) :: fire_ignition_start_x5
real , DIMENSION(max_domains) :: fire_ignition_start_y5							real , DIMENSION(max_domains) :: fire_ignition_start_y5
real , DIMENSION(max_domains) :: fire_ignition_end_x5							real , DIMENSION(max_domains) :: fire_ignition_end_x5
real , DIMENSION(max_domains) :: fire_ignition_end_y5							real , DIMENSION(max_domains) :: fire_ignition_end_y5
real , DIMENSION(max_domains) :: fire_lat_init								real , DIMENSION(max_domains) :: fire_lat_init
real , DIMENSION(max_domains) :: fire_lon_init								real , DIMENSION(max_domains) :: fire_lon_init
real , DIMENSION(max_domains) :: fire_ign_time								real , DIMENSION(max_domains) :: fire_ign_time
integer , DIMENSION(max_domains) :: fire_shape								integer , DIMENSION(max_domains) :: fire_shape
integer , DIMENSION(max_domains) :: fire_sprd_mdl							integer , DIMENSION(max_domains) :: fire_sprd_mdl
real , DIMENSION(max_domains) :: fire_crwn_hgt								real , DIMENSION(max_domains) :: fire_crwn_hgt
real , DIMENSION(max_domains) :: fire_ext_grnd								real , DIMENSION(max_domains) :: fire_ext_grnd
real , DIMENSION(max_domains) :: fire_ext_crwn								real , DIMENSION(max_domains) :: fire_ext_crwn
real , DIMENSION(max_domains) :: fire_wind_height							real , DIMENSION(max_domains) :: fire_wind_height
integer , DIMENSION(max_domains) :: fire_fuel_read							integer , DIMENSION(max_domains) :: fire_fuel_read
integer , DIMENSION(max_domains) :: fire_fuel_cat							integer , DIMENSION(max_domains) :: fire_fuel_cat
integer , DIMENSION(max_domains) :: fire_print_msg							integer , DIMENSION(max_domains) :: fire_print_msg
integer , DIMENSION(max_domains) :: fire_print_file							integer , DIMENSION(max_domains) :: fire_print_file
integer , DIMENSION(max_domains) :: fire_fuel_left_method						integer , DIMENSION(max_domains) :: fire_fuel_left_method
integer , DIMENSION(max_domains) :: fire_fuel_left_irl							integer , DIMENSION(max_domains) :: fire_fuel_left_irl
integer , DIMENSION(max_domains) :: fire_fuel_left_jrl							integer , DIMENSION(max_domains) :: fire_fuel_left_jrl
real , DIMENSION(max_domains) :: fire_back_weight							real , DIMENSION(max_domains) :: fire_back_weight
integer , DIMENSION(max_domains) :: fire_grows_only							integer , DIMENSION(max_domains) :: fire_grows_only
integer , DIMENSION(max_domains) :: fire_upwinding							integer , DIMENSION(max_domains) :: fire_upwinding
integer , DIMENSION(max_domains) :: fire_upwind_split							integer , DIMENSION(max_domains) :: fire_upwind_split
real , DIMENSION(max_domains) :: fire_viscosity								real , DIMENSION(max_domains) :: fire_viscosity
real , DIMENSION(max_domains) :: fire_lfn_ext_up							real , DIMENSION(max_domains) :: fire_lfn_ext_up
integer , DIMENSION(max_domains) :: fire_topo_from_atm							integer , DIMENSION(max_domains) :: fire_topo_from_atm
integer , DIMENSION(max_domains) :: fire_advection							integer , DIMENSION(max_domains) :: fire_advection
integer , DIMENSION(max_domains) :: fire_test_steps							integer , DIMENSION(max_domains) :: fire_test_steps
real , DIMENSION(max_domains) :: fire_const_time							real , DIMENSION(max_domains) :: fire_const_time
real , DIMENSION(max_domains) :: fire_const_grnhfx							real , DIMENSION(max_domains) :: fire_const_grnhfx
real , DIMENSION(max_domains) :: fire_const_grnqfx							real , DIMENSION(max_domains) :: fire_const_grnqfx
real , DIMENSION(max_domains) :: fire_atm_feedback							real , DIMENSION(max_domains) :: fire_atm_feedback
integer , DIMENSION(max_domains) :: fire_mountain_type							integer , DIMENSION(max_domains) :: fire_mountain_type
real , DIMENSION(max_domains) :: fire_mountain_height							real , DIMENSION(max_domains) :: fire_mountain_height
real , DIMENSION(max_domains) :: fire_mountain_start_x							real , DIMENSION(max_domains) :: fire_mountain_start_x
real , DIMENSION(max_domains) :: fire_mountain_start_y							real , DIMENSION(max_domains) :: fire_mountain_start_y
real , DIMENSION(max_domains) :: fire_mountain_end_x							real , DIMENSION(max_domains) :: fire_mountain_end_x
real , DIMENSION(max_domains) :: fire_mountain_end_y							real , DIMENSION(max_domains) :: fire_mountain_end_y
real , DIMENSION(max_domains) :: delt_perturbation							real , DIMENSION(max_domains) :: delt_perturbation
real , DIMENSION(max_domains) :: xrad_perturbation							real , DIMENSION(max_domains) :: xrad_perturbation
real , DIMENSION(max_domains) :: yrad_perturbation							real , DIMENSION(max_domains) :: yrad_perturbation
real , DIMENSION(max_domains) :: zrad_perturbation							real , DIMENSION(max_domains) :: zrad_perturbation
real , DIMENSION(max_domains) :: hght_perturbation							real , DIMENSION(max_domains) :: hght_perturbation
logical , DIMENSION(max_domains) :: stretch_grd								logical , DIMENSION(max_domains) :: stretch_grd
logical , DIMENSION(max_domains) :: stretch_hyp								logical , DIMENSION(max_domains) :: stretch_hyp
real , DIMENSION(max_domains) :: z_grd_scale								real , DIMENSION(max_domains) :: z_grd_scale
logical , DIMENSION(max_domains) :: sfc_full_init							logical , DIMENSION(max_domains) :: sfc_full_init
integer , DIMENSION(max_domains) :: sfc_lu_index							integer , DIMENSION(max_domains) :: sfc_lu_index
real , DIMENSION(max_domains) :: sfc_tsk								real , DIMENSION(max_domains) :: sfc_tsk
real , DIMENSION(max_domains) :: sfc_tmn								real , DIMENSION(max_domains) :: sfc_tmn
logical , DIMENSION(max_domains) :: fire_read_lu							logical , DIMENSION(max_domains) :: fire_read_lu
logical , DIMENSION(max_domains) :: fire_read_tsk							logical , DIMENSION(max_domains) :: fire_read_tsk
logical , DIMENSION(max_domains) :: fire_read_tmn							logical , DIMENSION(max_domains) :: fire_read_tmn
logical , DIMENSION(max_domains) :: fire_read_atm_ht							logical , DIMENSION(max_domains) :: fire_read_atm_ht
logical , DIMENSION(max_domains) :: fire_read_fire_ht							logical , DIMENSION(max_domains) :: fire_read_fire_ht
logical , DIMENSION(max_domains) :: fire_read_atm_grad							logical , DIMENSION(max_domains) :: fire_read_atm_grad
logical , DIMENSION(max_domains) :: fire_read_fire_grad							logical , DIMENSION(max_domains) :: fire_read_fire_grad
real , DIMENSION(max_domains) :: sfc_vegfra								real , DIMENSION(max_domains) :: sfc_vegfra
real , DIMENSION(max_domains) :: sfc_canwat								real , DIMENSION(max_domains) :: sfc_canwat
integer , DIMENSION(max_domains) :: sfc_ivgtyp								integer , DIMENSION(max_domains) :: sfc_ivgtyp
integer , DIMENSION(max_domains) :: sfc_isltyp								integer , DIMENSION(max_domains) :: sfc_isltyp
integer , DIMENSION(max_domains) :: do_avgflx_em							integer , DIMENSION(max_domains) :: do_avgflx_em
integer , DIMENSION(max_domains) :: do_avgflx_cugd							integer , DIMENSION(max_domains) :: do_avgflx_cugd
integer :: nens												integer :: nens
integer , DIMENSION(max_domains) :: skebs								integer , DIMENSION(max_domains) :: skebs
integer , DIMENSION(max_domains) :: stoch_force_opt							integer , DIMENSION(max_domains) :: stoch_force_opt
integer :: skebs_vertstruc										integer :: skebs_vertstruc
integer , DIMENSION(max_domains) :: stoch_vertstruc_opt							integer , DIMENSION(max_domains) :: stoch_vertstruc_opt
real , DIMENSION(max_domains) :: tot_backscat_psi							real , DIMENSION(max_domains) :: tot_backscat_psi
real , DIMENSION(max_domains) :: tot_backscat_t								real , DIMENSION(max_domains) :: tot_backscat_t
real :: ztau_psi											real :: ztau_psi
real :: ztau_t												real :: ztau_t
real :: rexponent_psi											real :: rexponent_psi
real :: rexponent_t											real :: rexponent_t
real :: zsigma2_eps											real :: zsigma2_eps
real :: zsigma2_eta											real :: zsigma2_eta
integer :: kminforc											integer :: kminforc
integer :: lminforc											integer :: lminforc
integer :: kminforct											integer :: kminforct
integer :: lminforct											integer :: lminforct
integer :: kmaxforc											integer :: kmaxforc
integer :: lmaxforc											integer :: lmaxforc
integer :: kmaxforct											integer :: kmaxforct
integer :: lmaxforct											integer :: lmaxforct
integer :: iseed_skebs											integer :: iseed_skebs
integer :: kmaxforch											integer :: kmaxforch
integer :: lmaxforch											integer :: lmaxforch
integer :: kmaxforcth											integer :: kmaxforcth
integer :: lmaxforcth											integer :: lmaxforcth
integer , DIMENSION(max_domains) :: sppt								integer , DIMENSION(max_domains) :: sppt
real , DIMENSION(max_domains) :: gridpt_stddev_sppt							real , DIMENSION(max_domains) :: gridpt_stddev_sppt
real , DIMENSION(max_domains) :: stddev_cutoff_sppt							real , DIMENSION(max_domains) :: stddev_cutoff_sppt
real , DIMENSION(max_domains) :: lengthscale_sppt							real , DIMENSION(max_domains) :: lengthscale_sppt
real , DIMENSION(max_domains) :: timescale_sppt								real , DIMENSION(max_domains) :: timescale_sppt
integer :: sppt_vertstruc										integer :: sppt_vertstruc
integer :: iseed_sppt											integer :: iseed_sppt
integer , DIMENSION(max_domains) :: rand_perturb							integer , DIMENSION(max_domains) :: rand_perturb
real , DIMENSION(max_domains) :: gridpt_stddev_rand_pert						real , DIMENSION(max_domains) :: gridpt_stddev_rand_pert
real , DIMENSION(max_domains) :: stddev_cutoff_rand_pert						real , DIMENSION(max_domains) :: stddev_cutoff_rand_pert
real , DIMENSION(max_domains) :: lengthscale_rand_pert							real , DIMENSION(max_domains) :: lengthscale_rand_pert
real , DIMENSION(max_domains) :: timescale_rand_pert							real , DIMENSION(max_domains) :: timescale_rand_pert
integer :: rand_pert_vertstruc										integer :: rand_pert_vertstruc
integer :: iseed_rand_pert										integer :: iseed_rand_pert
integer , DIMENSION(max_domains) :: spp								   <
logical :: hrrr_cycling										   <
integer , DIMENSION(max_domains) :: spp_conv							   <
real , DIMENSION(max_domains) :: gridpt_stddev_spp_conv						   <
real , DIMENSION(max_domains) :: stddev_cutoff_spp_conv						   <
real , DIMENSION(max_domains) :: lengthscale_spp_conv						   <
real , DIMENSION(max_domains) :: timescale_spp_conv						   <
integer :: vertstruc_spp_conv									   <
integer :: iseed_spp_conv									   <
integer , DIMENSION(max_domains) :: spp_pbl							   <
real , DIMENSION(max_domains) :: gridpt_stddev_spp_pbl						   <
real , DIMENSION(max_domains) :: stddev_cutoff_spp_pbl						   <
real , DIMENSION(max_domains) :: lengthscale_spp_pbl						   <
real , DIMENSION(max_domains) :: timescale_spp_pbl						   <
integer :: vertstruc_spp_pbl									   <
integer :: iseed_spp_pbl									   <
integer , DIMENSION(max_domains) :: spp_lsm							   <
real , DIMENSION(max_domains) :: gridpt_stddev_spp_lsm						   <
real , DIMENSION(max_domains) :: stddev_cutoff_spp_lsm						   <
real , DIMENSION(max_domains) :: lengthscale_spp_lsm						   <
real , DIMENSION(max_domains) :: timescale_spp_lsm						   <
integer :: vertstruc_spp_lsm									   <
integer :: iseed_spp_lsm									   <
integer :: skebs_on											integer :: skebs_on
integer :: sppt_on											integer :: sppt_on
integer :: spp_on										   <
integer :: rand_perturb_on										integer :: rand_perturb_on
integer :: num_stoch_levels										integer :: num_stoch_levels
integer , DIMENSION(max_domains) :: sfs_opt								integer , DIMENSION(max_domains) :: sfs_opt
integer , DIMENSION(max_domains) :: m_opt								integer , DIMENSION(max_domains) :: m_opt
real , DIMENSION(max_domains) :: lakedepth_default							real , DIMENSION(max_domains) :: lakedepth_default
real , DIMENSION(max_domains) :: lake_min_elev								real , DIMENSION(max_domains) :: lake_min_elev
integer , DIMENSION(max_domains) :: use_lakedepth							integer , DIMENSION(max_domains) :: use_lakedepth
integer :: p_lev_diags											integer :: p_lev_diags
integer :: p_lev_diags_dfi										integer :: p_lev_diags_dfi
integer :: num_press_levels										integer :: num_press_levels
real , DIMENSION(max_plevs) :: press_levels								real , DIMENSION(max_plevs) :: press_levels
integer :: use_tot_or_hyd_p										integer :: use_tot_or_hyd_p
integer :: extrap_below_grnd										integer :: extrap_below_grnd
real :: p_lev_missing											real :: p_lev_missing
real , DIMENSION(max_domains) :: p_lev_interval								real , DIMENSION(max_domains) :: p_lev_interval
integer :: z_lev_diags											integer :: z_lev_diags
integer :: z_lev_diags_dfi										integer :: z_lev_diags_dfi
integer :: num_z_levels											integer :: num_z_levels
real , DIMENSION(max_zlevs) :: z_levels									real , DIMENSION(max_zlevs) :: z_levels
real :: z_lev_missing											real :: z_lev_missing
real , DIMENSION(max_domains) :: z_lev_interval								real , DIMENSION(max_domains) :: z_lev_interval
integer , DIMENSION(max_domains) :: afwa_diag_opt							integer , DIMENSION(max_domains) :: afwa_diag_opt
integer , DIMENSION(max_domains) :: afwa_ptype_opt							integer , DIMENSION(max_domains) :: afwa_ptype_opt
integer , DIMENSION(max_domains) :: afwa_vil_opt							integer , DIMENSION(max_domains) :: afwa_vil_opt
integer , DIMENSION(max_domains) :: afwa_radar_opt							integer , DIMENSION(max_domains) :: afwa_radar_opt
integer , DIMENSION(max_domains) :: afwa_severe_opt							integer , DIMENSION(max_domains) :: afwa_severe_opt
integer , DIMENSION(max_domains) :: afwa_icing_opt							integer , DIMENSION(max_domains) :: afwa_icing_opt
integer , DIMENSION(max_domains) :: afwa_vis_opt							integer , DIMENSION(max_domains) :: afwa_vis_opt
integer , DIMENSION(max_domains) :: afwa_cloud_opt							integer , DIMENSION(max_domains) :: afwa_cloud_opt
integer , DIMENSION(max_domains) :: afwa_therm_opt							integer , DIMENSION(max_domains) :: afwa_therm_opt
integer , DIMENSION(max_domains) :: afwa_turb_opt							integer , DIMENSION(max_domains) :: afwa_turb_opt
integer , DIMENSION(max_domains) :: afwa_buoy_opt							integer , DIMENSION(max_domains) :: afwa_buoy_opt
												   >	integer , DIMENSION(max_domains) :: afwa_hailcast_opt
real :: afwa_ptype_ccn_tmp										real :: afwa_ptype_ccn_tmp
real :: afwa_ptype_tot_melt										real :: afwa_ptype_tot_melt
integer :: afwa_bad_data_check										integer :: afwa_bad_data_check
integer :: perturb_bdy											integer :: perturb_bdy
integer :: perturb_chem_bdy										integer :: perturb_chem_bdy
integer , DIMENSION(max_domains) :: chem_opt								integer , DIMENSION(max_domains) :: chem_opt
integer    :: last_item_in_struct									integer    :: last_item_in_struct
!ENDOFREGISTRYGENERATEDINCLUDE										!ENDOFREGISTRYGENERATEDINCLUDE
>                                                 
>=================================================================================
>  inc/namelist_script.inc
>=================================================================================
# Machine generated, do not edit									# Machine generated, do not edit

FILE=${1:-namelist.input}										FILE=${1:-namelist.input}

echo \&time_control >> $FILE										echo \&time_control >> $FILE
if test ! -z "$NL_RUN_DAYS"; then echo "run_days=${NL_RUN_DAYS}," >> $FILE;fi				if test ! -z "$NL_RUN_DAYS"; then echo "run_days=${NL_RUN_DAYS}," >> $FILE;fi
if test ! -z "$NL_RUN_HOURS"; then echo "run_hours=${NL_RUN_HOURS}," >> $FILE;fi			if test ! -z "$NL_RUN_HOURS"; then echo "run_hours=${NL_RUN_HOURS}," >> $FILE;fi
if test ! -z "$NL_RUN_MINUTES"; then echo "run_minutes=${NL_RUN_MINUTES}," >> $FILE;fi			if test ! -z "$NL_RUN_MINUTES"; then echo "run_minutes=${NL_RUN_MINUTES}," >> $FILE;fi
if test ! -z "$NL_RUN_SECONDS"; then echo "run_seconds=${NL_RUN_SECONDS}," >> $FILE;fi			if test ! -z "$NL_RUN_SECONDS"; then echo "run_seconds=${NL_RUN_SECONDS}," >> $FILE;fi
if test ! -z "$NL_START_YEAR"; then echo "start_year=${NL_START_YEAR}," >> $FILE;fi			if test ! -z "$NL_START_YEAR"; then echo "start_year=${NL_START_YEAR}," >> $FILE;fi
if test ! -z "$NL_START_MONTH"; then echo "start_month=${NL_START_MONTH}," >> $FILE;fi			if test ! -z "$NL_START_MONTH"; then echo "start_month=${NL_START_MONTH}," >> $FILE;fi
if test ! -z "$NL_START_DAY"; then echo "start_day=${NL_START_DAY}," >> $FILE;fi			if test ! -z "$NL_START_DAY"; then echo "start_day=${NL_START_DAY}," >> $FILE;fi
if test ! -z "$NL_START_HOUR"; then echo "start_hour=${NL_START_HOUR}," >> $FILE;fi			if test ! -z "$NL_START_HOUR"; then echo "start_hour=${NL_START_HOUR}," >> $FILE;fi
if test ! -z "$NL_START_MINUTE"; then echo "start_minute=${NL_START_MINUTE}," >> $FILE;fi		if test ! -z "$NL_START_MINUTE"; then echo "start_minute=${NL_START_MINUTE}," >> $FILE;fi
if test ! -z "$NL_START_SECOND"; then echo "start_second=${NL_START_SECOND}," >> $FILE;fi		if test ! -z "$NL_START_SECOND"; then echo "start_second=${NL_START_SECOND}," >> $FILE;fi
if test ! -z "$NL_END_YEAR"; then echo "end_year=${NL_END_YEAR}," >> $FILE;fi				if test ! -z "$NL_END_YEAR"; then echo "end_year=${NL_END_YEAR}," >> $FILE;fi
if test ! -z "$NL_END_MONTH"; then echo "end_month=${NL_END_MONTH}," >> $FILE;fi			if test ! -z "$NL_END_MONTH"; then echo "end_month=${NL_END_MONTH}," >> $FILE;fi
if test ! -z "$NL_END_DAY"; then echo "end_day=${NL_END_DAY}," >> $FILE;fi				if test ! -z "$NL_END_DAY"; then echo "end_day=${NL_END_DAY}," >> $FILE;fi
if test ! -z "$NL_END_HOUR"; then echo "end_hour=${NL_END_HOUR}," >> $FILE;fi				if test ! -z "$NL_END_HOUR"; then echo "end_hour=${NL_END_HOUR}," >> $FILE;fi
if test ! -z "$NL_END_MINUTE"; then echo "end_minute=${NL_END_MINUTE}," >> $FILE;fi			if test ! -z "$NL_END_MINUTE"; then echo "end_minute=${NL_END_MINUTE}," >> $FILE;fi
if test ! -z "$NL_END_SECOND"; then echo "end_second=${NL_END_SECOND}," >> $FILE;fi			if test ! -z "$NL_END_SECOND"; then echo "end_second=${NL_END_SECOND}," >> $FILE;fi
if test ! -z "$NL_INTERVAL_SECONDS"; then echo "interval_seconds=${NL_INTERVAL_SECONDS}," >> $FI	if test ! -z "$NL_INTERVAL_SECONDS"; then echo "interval_seconds=${NL_INTERVAL_SECONDS}," >> $FI
if test ! -z "$NL_INPUT_FROM_FILE"; then echo "input_from_file=${NL_INPUT_FROM_FILE}," >> $FILE;	if test ! -z "$NL_INPUT_FROM_FILE"; then echo "input_from_file=${NL_INPUT_FROM_FILE}," >> $FILE;
if test ! -z "$NL_FINE_INPUT_STREAM"; then echo "fine_input_stream=${NL_FINE_INPUT_STREAM}," >> 	if test ! -z "$NL_FINE_INPUT_STREAM"; then echo "fine_input_stream=${NL_FINE_INPUT_STREAM}," >> 
if test ! -z "$NL_INPUT_FROM_HIRES"; then echo "input_from_hires=${NL_INPUT_FROM_HIRES}," >> $FI	if test ! -z "$NL_INPUT_FROM_HIRES"; then echo "input_from_hires=${NL_INPUT_FROM_HIRES}," >> $FI
if test ! -z "$NL_RSMAS_DATA_PATH"; then echo "rsmas_data_path=\"${NL_RSMAS_DATA_PATH}\"," >> $F	if test ! -z "$NL_RSMAS_DATA_PATH"; then echo "rsmas_data_path=\"${NL_RSMAS_DATA_PATH}\"," >> $F
if test ! -z "$NL_ALL_IC_TIMES"; then echo "all_ic_times=${NL_ALL_IC_TIMES}," >> $FILE;fi		if test ! -z "$NL_ALL_IC_TIMES"; then echo "all_ic_times=${NL_ALL_IC_TIMES}," >> $FILE;fi
if test ! -z "$NL_JULYR"; then echo "julyr=${NL_JULYR}," >> $FILE;fi					if test ! -z "$NL_JULYR"; then echo "julyr=${NL_JULYR}," >> $FILE;fi
if test ! -z "$NL_JULDAY"; then echo "julday=${NL_JULDAY}," >> $FILE;fi					if test ! -z "$NL_JULDAY"; then echo "julday=${NL_JULDAY}," >> $FILE;fi
if test ! -z "$NL_GMT"; then echo "gmt=${NL_GMT}," >> $FILE;fi						if test ! -z "$NL_GMT"; then echo "gmt=${NL_GMT}," >> $FILE;fi
if test ! -z "$NL_INPUT_INNAME"; then echo "input_inname=\"${NL_INPUT_INNAME}\"," >> $FILE;fi		if test ! -z "$NL_INPUT_INNAME"; then echo "input_inname=\"${NL_INPUT_INNAME}\"," >> $FILE;fi
if test ! -z "$NL_INPUT_OUTNAME"; then echo "input_outname=\"${NL_INPUT_OUTNAME}\"," >> $FILE;fi	if test ! -z "$NL_INPUT_OUTNAME"; then echo "input_outname=\"${NL_INPUT_OUTNAME}\"," >> $FILE;fi
if test ! -z "$NL_BDY_INNAME"; then echo "bdy_inname=\"${NL_BDY_INNAME}\"," >> $FILE;fi			if test ! -z "$NL_BDY_INNAME"; then echo "bdy_inname=\"${NL_BDY_INNAME}\"," >> $FILE;fi
if test ! -z "$NL_BDY_OUTNAME"; then echo "bdy_outname=\"${NL_BDY_OUTNAME}\"," >> $FILE;fi		if test ! -z "$NL_BDY_OUTNAME"; then echo "bdy_outname=\"${NL_BDY_OUTNAME}\"," >> $FILE;fi
if test ! -z "$NL_RST_INNAME"; then echo "rst_inname=\"${NL_RST_INNAME}\"," >> $FILE;fi			if test ! -z "$NL_RST_INNAME"; then echo "rst_inname=\"${NL_RST_INNAME}\"," >> $FILE;fi
if test ! -z "$NL_RST_OUTNAME"; then echo "rst_outname=\"${NL_RST_OUTNAME}\"," >> $FILE;fi		if test ! -z "$NL_RST_OUTNAME"; then echo "rst_outname=\"${NL_RST_OUTNAME}\"," >> $FILE;fi
if test ! -z "$NL_WRITE_INPUT"; then echo "write_input=${NL_WRITE_INPUT}," >> $FILE;fi			if test ! -z "$NL_WRITE_INPUT"; then echo "write_input=${NL_WRITE_INPUT}," >> $FILE;fi
if test ! -z "$NL_WRITE_RESTART_AT_0H"; then echo "write_restart_at_0h=${NL_WRITE_RESTART_AT_0H}	if test ! -z "$NL_WRITE_RESTART_AT_0H"; then echo "write_restart_at_0h=${NL_WRITE_RESTART_AT_0H}
if test ! -z "$NL_WRITE_HIST_AT_0H_RST"; then echo "write_hist_at_0h_rst=${NL_WRITE_HIST_AT_0H_R	if test ! -z "$NL_WRITE_HIST_AT_0H_RST"; then echo "write_hist_at_0h_rst=${NL_WRITE_HIST_AT_0H_R
if test ! -z "$NL_ADJUST_OUTPUT_TIMES"; then echo "adjust_output_times=${NL_ADJUST_OUTPUT_TIMES}	if test ! -z "$NL_ADJUST_OUTPUT_TIMES"; then echo "adjust_output_times=${NL_ADJUST_OUTPUT_TIMES}
if test ! -z "$NL_ADJUST_INPUT_TIMES"; then echo "adjust_input_times=${NL_ADJUST_INPUT_TIMES}," 	if test ! -z "$NL_ADJUST_INPUT_TIMES"; then echo "adjust_input_times=${NL_ADJUST_INPUT_TIMES}," 
if test ! -z "$NL_DIAG_PRINT"; then echo "diag_print=${NL_DIAG_PRINT}," >> $FILE;fi			if test ! -z "$NL_DIAG_PRINT"; then echo "diag_print=${NL_DIAG_PRINT}," >> $FILE;fi
if test ! -z "$NL_NOCOLONS"; then echo "nocolons=${NL_NOCOLONS}," >> $FILE;fi				if test ! -z "$NL_NOCOLONS"; then echo "nocolons=${NL_NOCOLONS}," >> $FILE;fi
if test ! -z "$NL_CYCLING"; then echo "cycling=${NL_CYCLING}," >> $FILE;fi				if test ! -z "$NL_CYCLING"; then echo "cycling=${NL_CYCLING}," >> $FILE;fi
if test ! -z "$NL_OUTPUT_DIAGNOSTICS"; then echo "output_diagnostics=${NL_OUTPUT_DIAGNOSTICS}," 	if test ! -z "$NL_OUTPUT_DIAGNOSTICS"; then echo "output_diagnostics=${NL_OUTPUT_DIAGNOSTICS}," 
if test ! -z "$NL_NWP_DIAGNOSTICS"; then echo "nwp_diagnostics=${NL_NWP_DIAGNOSTICS}," >> $FILE;	if test ! -z "$NL_NWP_DIAGNOSTICS"; then echo "nwp_diagnostics=${NL_NWP_DIAGNOSTICS}," >> $FILE;
if test ! -z "$NL_OUTPUT_READY_FLAG"; then echo "output_ready_flag=${NL_OUTPUT_READY_FLAG}," >> 	if test ! -z "$NL_OUTPUT_READY_FLAG"; then echo "output_ready_flag=${NL_OUTPUT_READY_FLAG}," >> 
if test ! -z "$NL_AUXINPUT1_INNAME"; then echo "auxinput1_inname=\"${NL_AUXINPUT1_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT1_INNAME"; then echo "auxinput1_inname=\"${NL_AUXINPUT1_INNAME}\"," >>
if test ! -z "$NL_IO_FORM_AUXINPUT1"; then echo "io_form_auxinput1=${NL_IO_FORM_AUXINPUT1}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT1"; then echo "io_form_auxinput1=${NL_IO_FORM_AUXINPUT1}," >> 
if test ! -z "$NL_OVERRIDE_RESTART_TIMERS"; then echo "override_restart_timers=${NL_OVERRIDE_RES	if test ! -z "$NL_OVERRIDE_RESTART_TIMERS"; then echo "override_restart_timers=${NL_OVERRIDE_RES
if test ! -z "$NL_AUXHIST1_INNAME"; then echo "auxhist1_inname=\"${NL_AUXHIST1_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST1_INNAME"; then echo "auxhist1_inname=\"${NL_AUXHIST1_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST1_OUTNAME"; then echo "auxhist1_outname=\"${NL_AUXHIST1_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST1_OUTNAME"; then echo "auxhist1_outname=\"${NL_AUXHIST1_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST1_INTERVAL_Y"; then echo "auxhist1_interval_y=${NL_AUXHIST1_INTERVAL_Y}	if test ! -z "$NL_AUXHIST1_INTERVAL_Y"; then echo "auxhist1_interval_y=${NL_AUXHIST1_INTERVAL_Y}
if test ! -z "$NL_AUXHIST1_INTERVAL_D"; then echo "auxhist1_interval_d=${NL_AUXHIST1_INTERVAL_D}	if test ! -z "$NL_AUXHIST1_INTERVAL_D"; then echo "auxhist1_interval_d=${NL_AUXHIST1_INTERVAL_D}
if test ! -z "$NL_AUXHIST1_INTERVAL_H"; then echo "auxhist1_interval_h=${NL_AUXHIST1_INTERVAL_H}	if test ! -z "$NL_AUXHIST1_INTERVAL_H"; then echo "auxhist1_interval_h=${NL_AUXHIST1_INTERVAL_H}
if test ! -z "$NL_AUXHIST1_INTERVAL_M"; then echo "auxhist1_interval_m=${NL_AUXHIST1_INTERVAL_M}	if test ! -z "$NL_AUXHIST1_INTERVAL_M"; then echo "auxhist1_interval_m=${NL_AUXHIST1_INTERVAL_M}
if test ! -z "$NL_AUXHIST1_INTERVAL_S"; then echo "auxhist1_interval_s=${NL_AUXHIST1_INTERVAL_S}	if test ! -z "$NL_AUXHIST1_INTERVAL_S"; then echo "auxhist1_interval_s=${NL_AUXHIST1_INTERVAL_S}
if test ! -z "$NL_AUXHIST1_INTERVAL"; then echo "auxhist1_interval=${NL_AUXHIST1_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST1_INTERVAL"; then echo "auxhist1_interval=${NL_AUXHIST1_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST1_BEGIN_Y"; then echo "auxhist1_begin_y=${NL_AUXHIST1_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST1_BEGIN_Y"; then echo "auxhist1_begin_y=${NL_AUXHIST1_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST1_BEGIN_D"; then echo "auxhist1_begin_d=${NL_AUXHIST1_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST1_BEGIN_D"; then echo "auxhist1_begin_d=${NL_AUXHIST1_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST1_BEGIN_H"; then echo "auxhist1_begin_h=${NL_AUXHIST1_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST1_BEGIN_H"; then echo "auxhist1_begin_h=${NL_AUXHIST1_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST1_BEGIN_M"; then echo "auxhist1_begin_m=${NL_AUXHIST1_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST1_BEGIN_M"; then echo "auxhist1_begin_m=${NL_AUXHIST1_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST1_BEGIN_S"; then echo "auxhist1_begin_s=${NL_AUXHIST1_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST1_BEGIN_S"; then echo "auxhist1_begin_s=${NL_AUXHIST1_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST1_BEGIN"; then echo "auxhist1_begin=${NL_AUXHIST1_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_BEGIN"; then echo "auxhist1_begin=${NL_AUXHIST1_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END_Y"; then echo "auxhist1_end_y=${NL_AUXHIST1_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END_Y"; then echo "auxhist1_end_y=${NL_AUXHIST1_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END_D"; then echo "auxhist1_end_d=${NL_AUXHIST1_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END_D"; then echo "auxhist1_end_d=${NL_AUXHIST1_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END_H"; then echo "auxhist1_end_h=${NL_AUXHIST1_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END_H"; then echo "auxhist1_end_h=${NL_AUXHIST1_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END_M"; then echo "auxhist1_end_m=${NL_AUXHIST1_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END_M"; then echo "auxhist1_end_m=${NL_AUXHIST1_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END_S"; then echo "auxhist1_end_s=${NL_AUXHIST1_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END_S"; then echo "auxhist1_end_s=${NL_AUXHIST1_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST1_END"; then echo "auxhist1_end=${NL_AUXHIST1_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST1_END"; then echo "auxhist1_end=${NL_AUXHIST1_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST1"; then echo "io_form_auxhist1=${NL_IO_FORM_AUXHIST1}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST1"; then echo "io_form_auxhist1=${NL_IO_FORM_AUXHIST1}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST1"; then echo "frames_per_auxhist1=${NL_FRAMES_PER_AUXHIST1}	if test ! -z "$NL_FRAMES_PER_AUXHIST1"; then echo "frames_per_auxhist1=${NL_FRAMES_PER_AUXHIST1}
if test ! -z "$NL_AUXHIST2_INNAME"; then echo "auxhist2_inname=\"${NL_AUXHIST2_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST2_INNAME"; then echo "auxhist2_inname=\"${NL_AUXHIST2_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST2_OUTNAME"; then echo "auxhist2_outname=\"${NL_AUXHIST2_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST2_OUTNAME"; then echo "auxhist2_outname=\"${NL_AUXHIST2_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST2_INTERVAL_Y"; then echo "auxhist2_interval_y=${NL_AUXHIST2_INTERVAL_Y}	if test ! -z "$NL_AUXHIST2_INTERVAL_Y"; then echo "auxhist2_interval_y=${NL_AUXHIST2_INTERVAL_Y}
if test ! -z "$NL_AUXHIST2_INTERVAL_D"; then echo "auxhist2_interval_d=${NL_AUXHIST2_INTERVAL_D}	if test ! -z "$NL_AUXHIST2_INTERVAL_D"; then echo "auxhist2_interval_d=${NL_AUXHIST2_INTERVAL_D}
if test ! -z "$NL_AUXHIST2_INTERVAL_H"; then echo "auxhist2_interval_h=${NL_AUXHIST2_INTERVAL_H}	if test ! -z "$NL_AUXHIST2_INTERVAL_H"; then echo "auxhist2_interval_h=${NL_AUXHIST2_INTERVAL_H}
if test ! -z "$NL_AUXHIST2_INTERVAL_M"; then echo "auxhist2_interval_m=${NL_AUXHIST2_INTERVAL_M}	if test ! -z "$NL_AUXHIST2_INTERVAL_M"; then echo "auxhist2_interval_m=${NL_AUXHIST2_INTERVAL_M}
if test ! -z "$NL_AUXHIST2_INTERVAL_S"; then echo "auxhist2_interval_s=${NL_AUXHIST2_INTERVAL_S}	if test ! -z "$NL_AUXHIST2_INTERVAL_S"; then echo "auxhist2_interval_s=${NL_AUXHIST2_INTERVAL_S}
if test ! -z "$NL_AUXHIST2_INTERVAL"; then echo "auxhist2_interval=${NL_AUXHIST2_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST2_INTERVAL"; then echo "auxhist2_interval=${NL_AUXHIST2_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST2_BEGIN_Y"; then echo "auxhist2_begin_y=${NL_AUXHIST2_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST2_BEGIN_Y"; then echo "auxhist2_begin_y=${NL_AUXHIST2_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST2_BEGIN_D"; then echo "auxhist2_begin_d=${NL_AUXHIST2_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST2_BEGIN_D"; then echo "auxhist2_begin_d=${NL_AUXHIST2_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST2_BEGIN_H"; then echo "auxhist2_begin_h=${NL_AUXHIST2_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST2_BEGIN_H"; then echo "auxhist2_begin_h=${NL_AUXHIST2_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST2_BEGIN_M"; then echo "auxhist2_begin_m=${NL_AUXHIST2_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST2_BEGIN_M"; then echo "auxhist2_begin_m=${NL_AUXHIST2_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST2_BEGIN_S"; then echo "auxhist2_begin_s=${NL_AUXHIST2_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST2_BEGIN_S"; then echo "auxhist2_begin_s=${NL_AUXHIST2_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST2_BEGIN"; then echo "auxhist2_begin=${NL_AUXHIST2_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_BEGIN"; then echo "auxhist2_begin=${NL_AUXHIST2_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END_Y"; then echo "auxhist2_end_y=${NL_AUXHIST2_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END_Y"; then echo "auxhist2_end_y=${NL_AUXHIST2_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END_D"; then echo "auxhist2_end_d=${NL_AUXHIST2_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END_D"; then echo "auxhist2_end_d=${NL_AUXHIST2_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END_H"; then echo "auxhist2_end_h=${NL_AUXHIST2_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END_H"; then echo "auxhist2_end_h=${NL_AUXHIST2_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END_M"; then echo "auxhist2_end_m=${NL_AUXHIST2_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END_M"; then echo "auxhist2_end_m=${NL_AUXHIST2_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END_S"; then echo "auxhist2_end_s=${NL_AUXHIST2_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END_S"; then echo "auxhist2_end_s=${NL_AUXHIST2_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST2_END"; then echo "auxhist2_end=${NL_AUXHIST2_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST2_END"; then echo "auxhist2_end=${NL_AUXHIST2_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST2"; then echo "io_form_auxhist2=${NL_IO_FORM_AUXHIST2}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST2"; then echo "io_form_auxhist2=${NL_IO_FORM_AUXHIST2}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST2"; then echo "frames_per_auxhist2=${NL_FRAMES_PER_AUXHIST2}	if test ! -z "$NL_FRAMES_PER_AUXHIST2"; then echo "frames_per_auxhist2=${NL_FRAMES_PER_AUXHIST2}
if test ! -z "$NL_AUXHIST3_INNAME"; then echo "auxhist3_inname=\"${NL_AUXHIST3_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST3_INNAME"; then echo "auxhist3_inname=\"${NL_AUXHIST3_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST3_OUTNAME"; then echo "auxhist3_outname=\"${NL_AUXHIST3_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST3_OUTNAME"; then echo "auxhist3_outname=\"${NL_AUXHIST3_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST3_INTERVAL_Y"; then echo "auxhist3_interval_y=${NL_AUXHIST3_INTERVAL_Y}	if test ! -z "$NL_AUXHIST3_INTERVAL_Y"; then echo "auxhist3_interval_y=${NL_AUXHIST3_INTERVAL_Y}
if test ! -z "$NL_AUXHIST3_INTERVAL_D"; then echo "auxhist3_interval_d=${NL_AUXHIST3_INTERVAL_D}	if test ! -z "$NL_AUXHIST3_INTERVAL_D"; then echo "auxhist3_interval_d=${NL_AUXHIST3_INTERVAL_D}
if test ! -z "$NL_AUXHIST3_INTERVAL_H"; then echo "auxhist3_interval_h=${NL_AUXHIST3_INTERVAL_H}	if test ! -z "$NL_AUXHIST3_INTERVAL_H"; then echo "auxhist3_interval_h=${NL_AUXHIST3_INTERVAL_H}
if test ! -z "$NL_AUXHIST3_INTERVAL_M"; then echo "auxhist3_interval_m=${NL_AUXHIST3_INTERVAL_M}	if test ! -z "$NL_AUXHIST3_INTERVAL_M"; then echo "auxhist3_interval_m=${NL_AUXHIST3_INTERVAL_M}
if test ! -z "$NL_AUXHIST3_INTERVAL_S"; then echo "auxhist3_interval_s=${NL_AUXHIST3_INTERVAL_S}	if test ! -z "$NL_AUXHIST3_INTERVAL_S"; then echo "auxhist3_interval_s=${NL_AUXHIST3_INTERVAL_S}
if test ! -z "$NL_AUXHIST3_INTERVAL"; then echo "auxhist3_interval=${NL_AUXHIST3_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST3_INTERVAL"; then echo "auxhist3_interval=${NL_AUXHIST3_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST3_BEGIN_Y"; then echo "auxhist3_begin_y=${NL_AUXHIST3_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST3_BEGIN_Y"; then echo "auxhist3_begin_y=${NL_AUXHIST3_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST3_BEGIN_D"; then echo "auxhist3_begin_d=${NL_AUXHIST3_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST3_BEGIN_D"; then echo "auxhist3_begin_d=${NL_AUXHIST3_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST3_BEGIN_H"; then echo "auxhist3_begin_h=${NL_AUXHIST3_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST3_BEGIN_H"; then echo "auxhist3_begin_h=${NL_AUXHIST3_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST3_BEGIN_M"; then echo "auxhist3_begin_m=${NL_AUXHIST3_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST3_BEGIN_M"; then echo "auxhist3_begin_m=${NL_AUXHIST3_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST3_BEGIN_S"; then echo "auxhist3_begin_s=${NL_AUXHIST3_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST3_BEGIN_S"; then echo "auxhist3_begin_s=${NL_AUXHIST3_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST3_BEGIN"; then echo "auxhist3_begin=${NL_AUXHIST3_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_BEGIN"; then echo "auxhist3_begin=${NL_AUXHIST3_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END_Y"; then echo "auxhist3_end_y=${NL_AUXHIST3_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END_Y"; then echo "auxhist3_end_y=${NL_AUXHIST3_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END_D"; then echo "auxhist3_end_d=${NL_AUXHIST3_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END_D"; then echo "auxhist3_end_d=${NL_AUXHIST3_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END_H"; then echo "auxhist3_end_h=${NL_AUXHIST3_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END_H"; then echo "auxhist3_end_h=${NL_AUXHIST3_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END_M"; then echo "auxhist3_end_m=${NL_AUXHIST3_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END_M"; then echo "auxhist3_end_m=${NL_AUXHIST3_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END_S"; then echo "auxhist3_end_s=${NL_AUXHIST3_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END_S"; then echo "auxhist3_end_s=${NL_AUXHIST3_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST3_END"; then echo "auxhist3_end=${NL_AUXHIST3_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST3_END"; then echo "auxhist3_end=${NL_AUXHIST3_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST3"; then echo "io_form_auxhist3=${NL_IO_FORM_AUXHIST3}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST3"; then echo "io_form_auxhist3=${NL_IO_FORM_AUXHIST3}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST3"; then echo "frames_per_auxhist3=${NL_FRAMES_PER_AUXHIST3}	if test ! -z "$NL_FRAMES_PER_AUXHIST3"; then echo "frames_per_auxhist3=${NL_FRAMES_PER_AUXHIST3}
if test ! -z "$NL_AUXHIST4_INNAME"; then echo "auxhist4_inname=\"${NL_AUXHIST4_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST4_INNAME"; then echo "auxhist4_inname=\"${NL_AUXHIST4_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST4_OUTNAME"; then echo "auxhist4_outname=\"${NL_AUXHIST4_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST4_OUTNAME"; then echo "auxhist4_outname=\"${NL_AUXHIST4_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST4_INTERVAL_Y"; then echo "auxhist4_interval_y=${NL_AUXHIST4_INTERVAL_Y}	if test ! -z "$NL_AUXHIST4_INTERVAL_Y"; then echo "auxhist4_interval_y=${NL_AUXHIST4_INTERVAL_Y}
if test ! -z "$NL_AUXHIST4_INTERVAL_D"; then echo "auxhist4_interval_d=${NL_AUXHIST4_INTERVAL_D}	if test ! -z "$NL_AUXHIST4_INTERVAL_D"; then echo "auxhist4_interval_d=${NL_AUXHIST4_INTERVAL_D}
if test ! -z "$NL_AUXHIST4_INTERVAL_H"; then echo "auxhist4_interval_h=${NL_AUXHIST4_INTERVAL_H}	if test ! -z "$NL_AUXHIST4_INTERVAL_H"; then echo "auxhist4_interval_h=${NL_AUXHIST4_INTERVAL_H}
if test ! -z "$NL_AUXHIST4_INTERVAL_M"; then echo "auxhist4_interval_m=${NL_AUXHIST4_INTERVAL_M}	if test ! -z "$NL_AUXHIST4_INTERVAL_M"; then echo "auxhist4_interval_m=${NL_AUXHIST4_INTERVAL_M}
if test ! -z "$NL_AUXHIST4_INTERVAL_S"; then echo "auxhist4_interval_s=${NL_AUXHIST4_INTERVAL_S}	if test ! -z "$NL_AUXHIST4_INTERVAL_S"; then echo "auxhist4_interval_s=${NL_AUXHIST4_INTERVAL_S}
if test ! -z "$NL_AUXHIST4_INTERVAL"; then echo "auxhist4_interval=${NL_AUXHIST4_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST4_INTERVAL"; then echo "auxhist4_interval=${NL_AUXHIST4_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST4_BEGIN_Y"; then echo "auxhist4_begin_y=${NL_AUXHIST4_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST4_BEGIN_Y"; then echo "auxhist4_begin_y=${NL_AUXHIST4_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST4_BEGIN_D"; then echo "auxhist4_begin_d=${NL_AUXHIST4_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST4_BEGIN_D"; then echo "auxhist4_begin_d=${NL_AUXHIST4_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST4_BEGIN_H"; then echo "auxhist4_begin_h=${NL_AUXHIST4_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST4_BEGIN_H"; then echo "auxhist4_begin_h=${NL_AUXHIST4_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST4_BEGIN_M"; then echo "auxhist4_begin_m=${NL_AUXHIST4_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST4_BEGIN_M"; then echo "auxhist4_begin_m=${NL_AUXHIST4_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST4_BEGIN_S"; then echo "auxhist4_begin_s=${NL_AUXHIST4_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST4_BEGIN_S"; then echo "auxhist4_begin_s=${NL_AUXHIST4_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST4_BEGIN"; then echo "auxhist4_begin=${NL_AUXHIST4_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_BEGIN"; then echo "auxhist4_begin=${NL_AUXHIST4_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END_Y"; then echo "auxhist4_end_y=${NL_AUXHIST4_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END_Y"; then echo "auxhist4_end_y=${NL_AUXHIST4_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END_D"; then echo "auxhist4_end_d=${NL_AUXHIST4_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END_D"; then echo "auxhist4_end_d=${NL_AUXHIST4_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END_H"; then echo "auxhist4_end_h=${NL_AUXHIST4_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END_H"; then echo "auxhist4_end_h=${NL_AUXHIST4_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END_M"; then echo "auxhist4_end_m=${NL_AUXHIST4_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END_M"; then echo "auxhist4_end_m=${NL_AUXHIST4_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END_S"; then echo "auxhist4_end_s=${NL_AUXHIST4_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END_S"; then echo "auxhist4_end_s=${NL_AUXHIST4_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST4_END"; then echo "auxhist4_end=${NL_AUXHIST4_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST4_END"; then echo "auxhist4_end=${NL_AUXHIST4_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST4"; then echo "io_form_auxhist4=${NL_IO_FORM_AUXHIST4}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST4"; then echo "io_form_auxhist4=${NL_IO_FORM_AUXHIST4}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST4"; then echo "frames_per_auxhist4=${NL_FRAMES_PER_AUXHIST4}	if test ! -z "$NL_FRAMES_PER_AUXHIST4"; then echo "frames_per_auxhist4=${NL_FRAMES_PER_AUXHIST4}
if test ! -z "$NL_AUXHIST5_INNAME"; then echo "auxhist5_inname=\"${NL_AUXHIST5_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST5_INNAME"; then echo "auxhist5_inname=\"${NL_AUXHIST5_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST5_OUTNAME"; then echo "auxhist5_outname=\"${NL_AUXHIST5_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST5_OUTNAME"; then echo "auxhist5_outname=\"${NL_AUXHIST5_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST5_INTERVAL_Y"; then echo "auxhist5_interval_y=${NL_AUXHIST5_INTERVAL_Y}	if test ! -z "$NL_AUXHIST5_INTERVAL_Y"; then echo "auxhist5_interval_y=${NL_AUXHIST5_INTERVAL_Y}
if test ! -z "$NL_AUXHIST5_INTERVAL_D"; then echo "auxhist5_interval_d=${NL_AUXHIST5_INTERVAL_D}	if test ! -z "$NL_AUXHIST5_INTERVAL_D"; then echo "auxhist5_interval_d=${NL_AUXHIST5_INTERVAL_D}
if test ! -z "$NL_AUXHIST5_INTERVAL_H"; then echo "auxhist5_interval_h=${NL_AUXHIST5_INTERVAL_H}	if test ! -z "$NL_AUXHIST5_INTERVAL_H"; then echo "auxhist5_interval_h=${NL_AUXHIST5_INTERVAL_H}
if test ! -z "$NL_AUXHIST5_INTERVAL_M"; then echo "auxhist5_interval_m=${NL_AUXHIST5_INTERVAL_M}	if test ! -z "$NL_AUXHIST5_INTERVAL_M"; then echo "auxhist5_interval_m=${NL_AUXHIST5_INTERVAL_M}
if test ! -z "$NL_AUXHIST5_INTERVAL_S"; then echo "auxhist5_interval_s=${NL_AUXHIST5_INTERVAL_S}	if test ! -z "$NL_AUXHIST5_INTERVAL_S"; then echo "auxhist5_interval_s=${NL_AUXHIST5_INTERVAL_S}
if test ! -z "$NL_AUXHIST5_INTERVAL"; then echo "auxhist5_interval=${NL_AUXHIST5_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST5_INTERVAL"; then echo "auxhist5_interval=${NL_AUXHIST5_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST5_BEGIN_Y"; then echo "auxhist5_begin_y=${NL_AUXHIST5_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST5_BEGIN_Y"; then echo "auxhist5_begin_y=${NL_AUXHIST5_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST5_BEGIN_D"; then echo "auxhist5_begin_d=${NL_AUXHIST5_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST5_BEGIN_D"; then echo "auxhist5_begin_d=${NL_AUXHIST5_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST5_BEGIN_H"; then echo "auxhist5_begin_h=${NL_AUXHIST5_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST5_BEGIN_H"; then echo "auxhist5_begin_h=${NL_AUXHIST5_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST5_BEGIN_M"; then echo "auxhist5_begin_m=${NL_AUXHIST5_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST5_BEGIN_M"; then echo "auxhist5_begin_m=${NL_AUXHIST5_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST5_BEGIN_S"; then echo "auxhist5_begin_s=${NL_AUXHIST5_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST5_BEGIN_S"; then echo "auxhist5_begin_s=${NL_AUXHIST5_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST5_BEGIN"; then echo "auxhist5_begin=${NL_AUXHIST5_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_BEGIN"; then echo "auxhist5_begin=${NL_AUXHIST5_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END_Y"; then echo "auxhist5_end_y=${NL_AUXHIST5_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END_Y"; then echo "auxhist5_end_y=${NL_AUXHIST5_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END_D"; then echo "auxhist5_end_d=${NL_AUXHIST5_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END_D"; then echo "auxhist5_end_d=${NL_AUXHIST5_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END_H"; then echo "auxhist5_end_h=${NL_AUXHIST5_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END_H"; then echo "auxhist5_end_h=${NL_AUXHIST5_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END_M"; then echo "auxhist5_end_m=${NL_AUXHIST5_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END_M"; then echo "auxhist5_end_m=${NL_AUXHIST5_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END_S"; then echo "auxhist5_end_s=${NL_AUXHIST5_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END_S"; then echo "auxhist5_end_s=${NL_AUXHIST5_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST5_END"; then echo "auxhist5_end=${NL_AUXHIST5_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST5_END"; then echo "auxhist5_end=${NL_AUXHIST5_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST5"; then echo "io_form_auxhist5=${NL_IO_FORM_AUXHIST5}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST5"; then echo "io_form_auxhist5=${NL_IO_FORM_AUXHIST5}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST5"; then echo "frames_per_auxhist5=${NL_FRAMES_PER_AUXHIST5}	if test ! -z "$NL_FRAMES_PER_AUXHIST5"; then echo "frames_per_auxhist5=${NL_FRAMES_PER_AUXHIST5}
if test ! -z "$NL_AUXHIST6_INNAME"; then echo "auxhist6_inname=\"${NL_AUXHIST6_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST6_INNAME"; then echo "auxhist6_inname=\"${NL_AUXHIST6_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST6_OUTNAME"; then echo "auxhist6_outname=\"${NL_AUXHIST6_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST6_OUTNAME"; then echo "auxhist6_outname=\"${NL_AUXHIST6_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST6_INTERVAL_Y"; then echo "auxhist6_interval_y=${NL_AUXHIST6_INTERVAL_Y}	if test ! -z "$NL_AUXHIST6_INTERVAL_Y"; then echo "auxhist6_interval_y=${NL_AUXHIST6_INTERVAL_Y}
if test ! -z "$NL_AUXHIST6_INTERVAL_D"; then echo "auxhist6_interval_d=${NL_AUXHIST6_INTERVAL_D}	if test ! -z "$NL_AUXHIST6_INTERVAL_D"; then echo "auxhist6_interval_d=${NL_AUXHIST6_INTERVAL_D}
if test ! -z "$NL_AUXHIST6_INTERVAL_H"; then echo "auxhist6_interval_h=${NL_AUXHIST6_INTERVAL_H}	if test ! -z "$NL_AUXHIST6_INTERVAL_H"; then echo "auxhist6_interval_h=${NL_AUXHIST6_INTERVAL_H}
if test ! -z "$NL_AUXHIST6_INTERVAL_M"; then echo "auxhist6_interval_m=${NL_AUXHIST6_INTERVAL_M}	if test ! -z "$NL_AUXHIST6_INTERVAL_M"; then echo "auxhist6_interval_m=${NL_AUXHIST6_INTERVAL_M}
if test ! -z "$NL_AUXHIST6_INTERVAL_S"; then echo "auxhist6_interval_s=${NL_AUXHIST6_INTERVAL_S}	if test ! -z "$NL_AUXHIST6_INTERVAL_S"; then echo "auxhist6_interval_s=${NL_AUXHIST6_INTERVAL_S}
if test ! -z "$NL_AUXHIST6_INTERVAL"; then echo "auxhist6_interval=${NL_AUXHIST6_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST6_INTERVAL"; then echo "auxhist6_interval=${NL_AUXHIST6_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST6_BEGIN_Y"; then echo "auxhist6_begin_y=${NL_AUXHIST6_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST6_BEGIN_Y"; then echo "auxhist6_begin_y=${NL_AUXHIST6_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST6_BEGIN_D"; then echo "auxhist6_begin_d=${NL_AUXHIST6_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST6_BEGIN_D"; then echo "auxhist6_begin_d=${NL_AUXHIST6_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST6_BEGIN_H"; then echo "auxhist6_begin_h=${NL_AUXHIST6_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST6_BEGIN_H"; then echo "auxhist6_begin_h=${NL_AUXHIST6_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST6_BEGIN_M"; then echo "auxhist6_begin_m=${NL_AUXHIST6_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST6_BEGIN_M"; then echo "auxhist6_begin_m=${NL_AUXHIST6_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST6_BEGIN_S"; then echo "auxhist6_begin_s=${NL_AUXHIST6_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST6_BEGIN_S"; then echo "auxhist6_begin_s=${NL_AUXHIST6_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST6_BEGIN"; then echo "auxhist6_begin=${NL_AUXHIST6_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_BEGIN"; then echo "auxhist6_begin=${NL_AUXHIST6_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END_Y"; then echo "auxhist6_end_y=${NL_AUXHIST6_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END_Y"; then echo "auxhist6_end_y=${NL_AUXHIST6_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END_D"; then echo "auxhist6_end_d=${NL_AUXHIST6_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END_D"; then echo "auxhist6_end_d=${NL_AUXHIST6_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END_H"; then echo "auxhist6_end_h=${NL_AUXHIST6_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END_H"; then echo "auxhist6_end_h=${NL_AUXHIST6_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END_M"; then echo "auxhist6_end_m=${NL_AUXHIST6_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END_M"; then echo "auxhist6_end_m=${NL_AUXHIST6_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END_S"; then echo "auxhist6_end_s=${NL_AUXHIST6_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END_S"; then echo "auxhist6_end_s=${NL_AUXHIST6_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST6_END"; then echo "auxhist6_end=${NL_AUXHIST6_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST6_END"; then echo "auxhist6_end=${NL_AUXHIST6_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST6"; then echo "io_form_auxhist6=${NL_IO_FORM_AUXHIST6}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST6"; then echo "io_form_auxhist6=${NL_IO_FORM_AUXHIST6}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST6"; then echo "frames_per_auxhist6=${NL_FRAMES_PER_AUXHIST6}	if test ! -z "$NL_FRAMES_PER_AUXHIST6"; then echo "frames_per_auxhist6=${NL_FRAMES_PER_AUXHIST6}
if test ! -z "$NL_AUXHIST7_INNAME"; then echo "auxhist7_inname=\"${NL_AUXHIST7_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST7_INNAME"; then echo "auxhist7_inname=\"${NL_AUXHIST7_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST7_OUTNAME"; then echo "auxhist7_outname=\"${NL_AUXHIST7_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST7_OUTNAME"; then echo "auxhist7_outname=\"${NL_AUXHIST7_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST7_INTERVAL_Y"; then echo "auxhist7_interval_y=${NL_AUXHIST7_INTERVAL_Y}	if test ! -z "$NL_AUXHIST7_INTERVAL_Y"; then echo "auxhist7_interval_y=${NL_AUXHIST7_INTERVAL_Y}
if test ! -z "$NL_AUXHIST7_INTERVAL_D"; then echo "auxhist7_interval_d=${NL_AUXHIST7_INTERVAL_D}	if test ! -z "$NL_AUXHIST7_INTERVAL_D"; then echo "auxhist7_interval_d=${NL_AUXHIST7_INTERVAL_D}
if test ! -z "$NL_AUXHIST7_INTERVAL_H"; then echo "auxhist7_interval_h=${NL_AUXHIST7_INTERVAL_H}	if test ! -z "$NL_AUXHIST7_INTERVAL_H"; then echo "auxhist7_interval_h=${NL_AUXHIST7_INTERVAL_H}
if test ! -z "$NL_AUXHIST7_INTERVAL_M"; then echo "auxhist7_interval_m=${NL_AUXHIST7_INTERVAL_M}	if test ! -z "$NL_AUXHIST7_INTERVAL_M"; then echo "auxhist7_interval_m=${NL_AUXHIST7_INTERVAL_M}
if test ! -z "$NL_AUXHIST7_INTERVAL_S"; then echo "auxhist7_interval_s=${NL_AUXHIST7_INTERVAL_S}	if test ! -z "$NL_AUXHIST7_INTERVAL_S"; then echo "auxhist7_interval_s=${NL_AUXHIST7_INTERVAL_S}
if test ! -z "$NL_AUXHIST7_INTERVAL"; then echo "auxhist7_interval=${NL_AUXHIST7_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST7_INTERVAL"; then echo "auxhist7_interval=${NL_AUXHIST7_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST7_BEGIN_Y"; then echo "auxhist7_begin_y=${NL_AUXHIST7_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST7_BEGIN_Y"; then echo "auxhist7_begin_y=${NL_AUXHIST7_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST7_BEGIN_D"; then echo "auxhist7_begin_d=${NL_AUXHIST7_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST7_BEGIN_D"; then echo "auxhist7_begin_d=${NL_AUXHIST7_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST7_BEGIN_H"; then echo "auxhist7_begin_h=${NL_AUXHIST7_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST7_BEGIN_H"; then echo "auxhist7_begin_h=${NL_AUXHIST7_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST7_BEGIN_M"; then echo "auxhist7_begin_m=${NL_AUXHIST7_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST7_BEGIN_M"; then echo "auxhist7_begin_m=${NL_AUXHIST7_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST7_BEGIN_S"; then echo "auxhist7_begin_s=${NL_AUXHIST7_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST7_BEGIN_S"; then echo "auxhist7_begin_s=${NL_AUXHIST7_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST7_BEGIN"; then echo "auxhist7_begin=${NL_AUXHIST7_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_BEGIN"; then echo "auxhist7_begin=${NL_AUXHIST7_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END_Y"; then echo "auxhist7_end_y=${NL_AUXHIST7_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END_Y"; then echo "auxhist7_end_y=${NL_AUXHIST7_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END_D"; then echo "auxhist7_end_d=${NL_AUXHIST7_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END_D"; then echo "auxhist7_end_d=${NL_AUXHIST7_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END_H"; then echo "auxhist7_end_h=${NL_AUXHIST7_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END_H"; then echo "auxhist7_end_h=${NL_AUXHIST7_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END_M"; then echo "auxhist7_end_m=${NL_AUXHIST7_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END_M"; then echo "auxhist7_end_m=${NL_AUXHIST7_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END_S"; then echo "auxhist7_end_s=${NL_AUXHIST7_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END_S"; then echo "auxhist7_end_s=${NL_AUXHIST7_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST7_END"; then echo "auxhist7_end=${NL_AUXHIST7_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST7_END"; then echo "auxhist7_end=${NL_AUXHIST7_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST7"; then echo "io_form_auxhist7=${NL_IO_FORM_AUXHIST7}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST7"; then echo "io_form_auxhist7=${NL_IO_FORM_AUXHIST7}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST7"; then echo "frames_per_auxhist7=${NL_FRAMES_PER_AUXHIST7}	if test ! -z "$NL_FRAMES_PER_AUXHIST7"; then echo "frames_per_auxhist7=${NL_FRAMES_PER_AUXHIST7}
if test ! -z "$NL_AUXHIST8_INNAME"; then echo "auxhist8_inname=\"${NL_AUXHIST8_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST8_INNAME"; then echo "auxhist8_inname=\"${NL_AUXHIST8_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST8_OUTNAME"; then echo "auxhist8_outname=\"${NL_AUXHIST8_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST8_OUTNAME"; then echo "auxhist8_outname=\"${NL_AUXHIST8_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST8_INTERVAL_Y"; then echo "auxhist8_interval_y=${NL_AUXHIST8_INTERVAL_Y}	if test ! -z "$NL_AUXHIST8_INTERVAL_Y"; then echo "auxhist8_interval_y=${NL_AUXHIST8_INTERVAL_Y}
if test ! -z "$NL_AUXHIST8_INTERVAL_D"; then echo "auxhist8_interval_d=${NL_AUXHIST8_INTERVAL_D}	if test ! -z "$NL_AUXHIST8_INTERVAL_D"; then echo "auxhist8_interval_d=${NL_AUXHIST8_INTERVAL_D}
if test ! -z "$NL_AUXHIST8_INTERVAL_H"; then echo "auxhist8_interval_h=${NL_AUXHIST8_INTERVAL_H}	if test ! -z "$NL_AUXHIST8_INTERVAL_H"; then echo "auxhist8_interval_h=${NL_AUXHIST8_INTERVAL_H}
if test ! -z "$NL_AUXHIST8_INTERVAL_M"; then echo "auxhist8_interval_m=${NL_AUXHIST8_INTERVAL_M}	if test ! -z "$NL_AUXHIST8_INTERVAL_M"; then echo "auxhist8_interval_m=${NL_AUXHIST8_INTERVAL_M}
if test ! -z "$NL_AUXHIST8_INTERVAL_S"; then echo "auxhist8_interval_s=${NL_AUXHIST8_INTERVAL_S}	if test ! -z "$NL_AUXHIST8_INTERVAL_S"; then echo "auxhist8_interval_s=${NL_AUXHIST8_INTERVAL_S}
if test ! -z "$NL_AUXHIST8_INTERVAL"; then echo "auxhist8_interval=${NL_AUXHIST8_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST8_INTERVAL"; then echo "auxhist8_interval=${NL_AUXHIST8_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST8_BEGIN_Y"; then echo "auxhist8_begin_y=${NL_AUXHIST8_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST8_BEGIN_Y"; then echo "auxhist8_begin_y=${NL_AUXHIST8_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST8_BEGIN_D"; then echo "auxhist8_begin_d=${NL_AUXHIST8_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST8_BEGIN_D"; then echo "auxhist8_begin_d=${NL_AUXHIST8_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST8_BEGIN_H"; then echo "auxhist8_begin_h=${NL_AUXHIST8_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST8_BEGIN_H"; then echo "auxhist8_begin_h=${NL_AUXHIST8_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST8_BEGIN_M"; then echo "auxhist8_begin_m=${NL_AUXHIST8_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST8_BEGIN_M"; then echo "auxhist8_begin_m=${NL_AUXHIST8_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST8_BEGIN_S"; then echo "auxhist8_begin_s=${NL_AUXHIST8_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST8_BEGIN_S"; then echo "auxhist8_begin_s=${NL_AUXHIST8_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST8_BEGIN"; then echo "auxhist8_begin=${NL_AUXHIST8_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_BEGIN"; then echo "auxhist8_begin=${NL_AUXHIST8_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END_Y"; then echo "auxhist8_end_y=${NL_AUXHIST8_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END_Y"; then echo "auxhist8_end_y=${NL_AUXHIST8_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END_D"; then echo "auxhist8_end_d=${NL_AUXHIST8_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END_D"; then echo "auxhist8_end_d=${NL_AUXHIST8_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END_H"; then echo "auxhist8_end_h=${NL_AUXHIST8_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END_H"; then echo "auxhist8_end_h=${NL_AUXHIST8_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END_M"; then echo "auxhist8_end_m=${NL_AUXHIST8_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END_M"; then echo "auxhist8_end_m=${NL_AUXHIST8_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END_S"; then echo "auxhist8_end_s=${NL_AUXHIST8_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END_S"; then echo "auxhist8_end_s=${NL_AUXHIST8_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST8_END"; then echo "auxhist8_end=${NL_AUXHIST8_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST8_END"; then echo "auxhist8_end=${NL_AUXHIST8_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST8"; then echo "io_form_auxhist8=${NL_IO_FORM_AUXHIST8}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST8"; then echo "io_form_auxhist8=${NL_IO_FORM_AUXHIST8}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST8"; then echo "frames_per_auxhist8=${NL_FRAMES_PER_AUXHIST8}	if test ! -z "$NL_FRAMES_PER_AUXHIST8"; then echo "frames_per_auxhist8=${NL_FRAMES_PER_AUXHIST8}
if test ! -z "$NL_AUXHIST9_INNAME"; then echo "auxhist9_inname=\"${NL_AUXHIST9_INNAME}\"," >> $F	if test ! -z "$NL_AUXHIST9_INNAME"; then echo "auxhist9_inname=\"${NL_AUXHIST9_INNAME}\"," >> $F
if test ! -z "$NL_AUXHIST9_OUTNAME"; then echo "auxhist9_outname=\"${NL_AUXHIST9_OUTNAME}\"," >>	if test ! -z "$NL_AUXHIST9_OUTNAME"; then echo "auxhist9_outname=\"${NL_AUXHIST9_OUTNAME}\"," >>
if test ! -z "$NL_AUXHIST9_INTERVAL_Y"; then echo "auxhist9_interval_y=${NL_AUXHIST9_INTERVAL_Y}	if test ! -z "$NL_AUXHIST9_INTERVAL_Y"; then echo "auxhist9_interval_y=${NL_AUXHIST9_INTERVAL_Y}
if test ! -z "$NL_AUXHIST9_INTERVAL_D"; then echo "auxhist9_interval_d=${NL_AUXHIST9_INTERVAL_D}	if test ! -z "$NL_AUXHIST9_INTERVAL_D"; then echo "auxhist9_interval_d=${NL_AUXHIST9_INTERVAL_D}
if test ! -z "$NL_AUXHIST9_INTERVAL_H"; then echo "auxhist9_interval_h=${NL_AUXHIST9_INTERVAL_H}	if test ! -z "$NL_AUXHIST9_INTERVAL_H"; then echo "auxhist9_interval_h=${NL_AUXHIST9_INTERVAL_H}
if test ! -z "$NL_AUXHIST9_INTERVAL_M"; then echo "auxhist9_interval_m=${NL_AUXHIST9_INTERVAL_M}	if test ! -z "$NL_AUXHIST9_INTERVAL_M"; then echo "auxhist9_interval_m=${NL_AUXHIST9_INTERVAL_M}
if test ! -z "$NL_AUXHIST9_INTERVAL_S"; then echo "auxhist9_interval_s=${NL_AUXHIST9_INTERVAL_S}	if test ! -z "$NL_AUXHIST9_INTERVAL_S"; then echo "auxhist9_interval_s=${NL_AUXHIST9_INTERVAL_S}
if test ! -z "$NL_AUXHIST9_INTERVAL"; then echo "auxhist9_interval=${NL_AUXHIST9_INTERVAL}," >> 	if test ! -z "$NL_AUXHIST9_INTERVAL"; then echo "auxhist9_interval=${NL_AUXHIST9_INTERVAL}," >> 
if test ! -z "$NL_AUXHIST9_BEGIN_Y"; then echo "auxhist9_begin_y=${NL_AUXHIST9_BEGIN_Y}," >> $FI	if test ! -z "$NL_AUXHIST9_BEGIN_Y"; then echo "auxhist9_begin_y=${NL_AUXHIST9_BEGIN_Y}," >> $FI
if test ! -z "$NL_AUXHIST9_BEGIN_D"; then echo "auxhist9_begin_d=${NL_AUXHIST9_BEGIN_D}," >> $FI	if test ! -z "$NL_AUXHIST9_BEGIN_D"; then echo "auxhist9_begin_d=${NL_AUXHIST9_BEGIN_D}," >> $FI
if test ! -z "$NL_AUXHIST9_BEGIN_H"; then echo "auxhist9_begin_h=${NL_AUXHIST9_BEGIN_H}," >> $FI	if test ! -z "$NL_AUXHIST9_BEGIN_H"; then echo "auxhist9_begin_h=${NL_AUXHIST9_BEGIN_H}," >> $FI
if test ! -z "$NL_AUXHIST9_BEGIN_M"; then echo "auxhist9_begin_m=${NL_AUXHIST9_BEGIN_M}," >> $FI	if test ! -z "$NL_AUXHIST9_BEGIN_M"; then echo "auxhist9_begin_m=${NL_AUXHIST9_BEGIN_M}," >> $FI
if test ! -z "$NL_AUXHIST9_BEGIN_S"; then echo "auxhist9_begin_s=${NL_AUXHIST9_BEGIN_S}," >> $FI	if test ! -z "$NL_AUXHIST9_BEGIN_S"; then echo "auxhist9_begin_s=${NL_AUXHIST9_BEGIN_S}," >> $FI
if test ! -z "$NL_AUXHIST9_BEGIN"; then echo "auxhist9_begin=${NL_AUXHIST9_BEGIN}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_BEGIN"; then echo "auxhist9_begin=${NL_AUXHIST9_BEGIN}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END_Y"; then echo "auxhist9_end_y=${NL_AUXHIST9_END_Y}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END_Y"; then echo "auxhist9_end_y=${NL_AUXHIST9_END_Y}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END_D"; then echo "auxhist9_end_d=${NL_AUXHIST9_END_D}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END_D"; then echo "auxhist9_end_d=${NL_AUXHIST9_END_D}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END_H"; then echo "auxhist9_end_h=${NL_AUXHIST9_END_H}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END_H"; then echo "auxhist9_end_h=${NL_AUXHIST9_END_H}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END_M"; then echo "auxhist9_end_m=${NL_AUXHIST9_END_M}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END_M"; then echo "auxhist9_end_m=${NL_AUXHIST9_END_M}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END_S"; then echo "auxhist9_end_s=${NL_AUXHIST9_END_S}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END_S"; then echo "auxhist9_end_s=${NL_AUXHIST9_END_S}," >> $FILE;fi
if test ! -z "$NL_AUXHIST9_END"; then echo "auxhist9_end=${NL_AUXHIST9_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST9_END"; then echo "auxhist9_end=${NL_AUXHIST9_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST9"; then echo "io_form_auxhist9=${NL_IO_FORM_AUXHIST9}," >> $FI	if test ! -z "$NL_IO_FORM_AUXHIST9"; then echo "io_form_auxhist9=${NL_IO_FORM_AUXHIST9}," >> $FI
if test ! -z "$NL_FRAMES_PER_AUXHIST9"; then echo "frames_per_auxhist9=${NL_FRAMES_PER_AUXHIST9}	if test ! -z "$NL_FRAMES_PER_AUXHIST9"; then echo "frames_per_auxhist9=${NL_FRAMES_PER_AUXHIST9}
if test ! -z "$NL_AUXHIST10_INNAME"; then echo "auxhist10_inname=\"${NL_AUXHIST10_INNAME}\"," >>	if test ! -z "$NL_AUXHIST10_INNAME"; then echo "auxhist10_inname=\"${NL_AUXHIST10_INNAME}\"," >>
if test ! -z "$NL_AUXHIST10_OUTNAME"; then echo "auxhist10_outname=\"${NL_AUXHIST10_OUTNAME}\","	if test ! -z "$NL_AUXHIST10_OUTNAME"; then echo "auxhist10_outname=\"${NL_AUXHIST10_OUTNAME}\","
if test ! -z "$NL_AUXHIST10_INTERVAL_Y"; then echo "auxhist10_interval_y=${NL_AUXHIST10_INTERVAL	if test ! -z "$NL_AUXHIST10_INTERVAL_Y"; then echo "auxhist10_interval_y=${NL_AUXHIST10_INTERVAL
if test ! -z "$NL_AUXHIST10_INTERVAL_D"; then echo "auxhist10_interval_d=${NL_AUXHIST10_INTERVAL	if test ! -z "$NL_AUXHIST10_INTERVAL_D"; then echo "auxhist10_interval_d=${NL_AUXHIST10_INTERVAL
if test ! -z "$NL_AUXHIST10_INTERVAL_H"; then echo "auxhist10_interval_h=${NL_AUXHIST10_INTERVAL	if test ! -z "$NL_AUXHIST10_INTERVAL_H"; then echo "auxhist10_interval_h=${NL_AUXHIST10_INTERVAL
if test ! -z "$NL_AUXHIST10_INTERVAL_M"; then echo "auxhist10_interval_m=${NL_AUXHIST10_INTERVAL	if test ! -z "$NL_AUXHIST10_INTERVAL_M"; then echo "auxhist10_interval_m=${NL_AUXHIST10_INTERVAL
if test ! -z "$NL_AUXHIST10_INTERVAL_S"; then echo "auxhist10_interval_s=${NL_AUXHIST10_INTERVAL	if test ! -z "$NL_AUXHIST10_INTERVAL_S"; then echo "auxhist10_interval_s=${NL_AUXHIST10_INTERVAL
if test ! -z "$NL_AUXHIST10_INTERVAL"; then echo "auxhist10_interval=${NL_AUXHIST10_INTERVAL}," 	if test ! -z "$NL_AUXHIST10_INTERVAL"; then echo "auxhist10_interval=${NL_AUXHIST10_INTERVAL}," 
if test ! -z "$NL_AUXHIST10_BEGIN_Y"; then echo "auxhist10_begin_y=${NL_AUXHIST10_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST10_BEGIN_Y"; then echo "auxhist10_begin_y=${NL_AUXHIST10_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST10_BEGIN_D"; then echo "auxhist10_begin_d=${NL_AUXHIST10_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST10_BEGIN_D"; then echo "auxhist10_begin_d=${NL_AUXHIST10_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST10_BEGIN_H"; then echo "auxhist10_begin_h=${NL_AUXHIST10_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST10_BEGIN_H"; then echo "auxhist10_begin_h=${NL_AUXHIST10_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST10_BEGIN_M"; then echo "auxhist10_begin_m=${NL_AUXHIST10_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST10_BEGIN_M"; then echo "auxhist10_begin_m=${NL_AUXHIST10_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST10_BEGIN_S"; then echo "auxhist10_begin_s=${NL_AUXHIST10_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST10_BEGIN_S"; then echo "auxhist10_begin_s=${NL_AUXHIST10_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST10_BEGIN"; then echo "auxhist10_begin=${NL_AUXHIST10_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST10_BEGIN"; then echo "auxhist10_begin=${NL_AUXHIST10_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END_Y"; then echo "auxhist10_end_y=${NL_AUXHIST10_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST10_END_Y"; then echo "auxhist10_end_y=${NL_AUXHIST10_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END_D"; then echo "auxhist10_end_d=${NL_AUXHIST10_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST10_END_D"; then echo "auxhist10_end_d=${NL_AUXHIST10_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END_H"; then echo "auxhist10_end_h=${NL_AUXHIST10_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST10_END_H"; then echo "auxhist10_end_h=${NL_AUXHIST10_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END_M"; then echo "auxhist10_end_m=${NL_AUXHIST10_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST10_END_M"; then echo "auxhist10_end_m=${NL_AUXHIST10_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END_S"; then echo "auxhist10_end_s=${NL_AUXHIST10_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST10_END_S"; then echo "auxhist10_end_s=${NL_AUXHIST10_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST10_END"; then echo "auxhist10_end=${NL_AUXHIST10_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST10_END"; then echo "auxhist10_end=${NL_AUXHIST10_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST10"; then echo "io_form_auxhist10=${NL_IO_FORM_AUXHIST10}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST10"; then echo "io_form_auxhist10=${NL_IO_FORM_AUXHIST10}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST10"; then echo "frames_per_auxhist10=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST10"; then echo "frames_per_auxhist10=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST11_INNAME"; then echo "auxhist11_inname=\"${NL_AUXHIST11_INNAME}\"," >>	if test ! -z "$NL_AUXHIST11_INNAME"; then echo "auxhist11_inname=\"${NL_AUXHIST11_INNAME}\"," >>
if test ! -z "$NL_AUXHIST11_OUTNAME"; then echo "auxhist11_outname=\"${NL_AUXHIST11_OUTNAME}\","	if test ! -z "$NL_AUXHIST11_OUTNAME"; then echo "auxhist11_outname=\"${NL_AUXHIST11_OUTNAME}\","
if test ! -z "$NL_AUXHIST11_INTERVAL_Y"; then echo "auxhist11_interval_y=${NL_AUXHIST11_INTERVAL	if test ! -z "$NL_AUXHIST11_INTERVAL_Y"; then echo "auxhist11_interval_y=${NL_AUXHIST11_INTERVAL
if test ! -z "$NL_AUXHIST11_INTERVAL_D"; then echo "auxhist11_interval_d=${NL_AUXHIST11_INTERVAL	if test ! -z "$NL_AUXHIST11_INTERVAL_D"; then echo "auxhist11_interval_d=${NL_AUXHIST11_INTERVAL
if test ! -z "$NL_AUXHIST11_INTERVAL_H"; then echo "auxhist11_interval_h=${NL_AUXHIST11_INTERVAL	if test ! -z "$NL_AUXHIST11_INTERVAL_H"; then echo "auxhist11_interval_h=${NL_AUXHIST11_INTERVAL
if test ! -z "$NL_AUXHIST11_INTERVAL_M"; then echo "auxhist11_interval_m=${NL_AUXHIST11_INTERVAL	if test ! -z "$NL_AUXHIST11_INTERVAL_M"; then echo "auxhist11_interval_m=${NL_AUXHIST11_INTERVAL
if test ! -z "$NL_AUXHIST11_INTERVAL_S"; then echo "auxhist11_interval_s=${NL_AUXHIST11_INTERVAL	if test ! -z "$NL_AUXHIST11_INTERVAL_S"; then echo "auxhist11_interval_s=${NL_AUXHIST11_INTERVAL
if test ! -z "$NL_AUXHIST11_INTERVAL"; then echo "auxhist11_interval=${NL_AUXHIST11_INTERVAL}," 	if test ! -z "$NL_AUXHIST11_INTERVAL"; then echo "auxhist11_interval=${NL_AUXHIST11_INTERVAL}," 
if test ! -z "$NL_AUXHIST11_BEGIN_Y"; then echo "auxhist11_begin_y=${NL_AUXHIST11_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST11_BEGIN_Y"; then echo "auxhist11_begin_y=${NL_AUXHIST11_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST11_BEGIN_D"; then echo "auxhist11_begin_d=${NL_AUXHIST11_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST11_BEGIN_D"; then echo "auxhist11_begin_d=${NL_AUXHIST11_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST11_BEGIN_H"; then echo "auxhist11_begin_h=${NL_AUXHIST11_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST11_BEGIN_H"; then echo "auxhist11_begin_h=${NL_AUXHIST11_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST11_BEGIN_M"; then echo "auxhist11_begin_m=${NL_AUXHIST11_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST11_BEGIN_M"; then echo "auxhist11_begin_m=${NL_AUXHIST11_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST11_BEGIN_S"; then echo "auxhist11_begin_s=${NL_AUXHIST11_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST11_BEGIN_S"; then echo "auxhist11_begin_s=${NL_AUXHIST11_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST11_BEGIN"; then echo "auxhist11_begin=${NL_AUXHIST11_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST11_BEGIN"; then echo "auxhist11_begin=${NL_AUXHIST11_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END_Y"; then echo "auxhist11_end_y=${NL_AUXHIST11_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST11_END_Y"; then echo "auxhist11_end_y=${NL_AUXHIST11_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END_D"; then echo "auxhist11_end_d=${NL_AUXHIST11_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST11_END_D"; then echo "auxhist11_end_d=${NL_AUXHIST11_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END_H"; then echo "auxhist11_end_h=${NL_AUXHIST11_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST11_END_H"; then echo "auxhist11_end_h=${NL_AUXHIST11_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END_M"; then echo "auxhist11_end_m=${NL_AUXHIST11_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST11_END_M"; then echo "auxhist11_end_m=${NL_AUXHIST11_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END_S"; then echo "auxhist11_end_s=${NL_AUXHIST11_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST11_END_S"; then echo "auxhist11_end_s=${NL_AUXHIST11_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST11_END"; then echo "auxhist11_end=${NL_AUXHIST11_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST11_END"; then echo "auxhist11_end=${NL_AUXHIST11_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST11"; then echo "io_form_auxhist11=${NL_IO_FORM_AUXHIST11}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST11"; then echo "io_form_auxhist11=${NL_IO_FORM_AUXHIST11}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST11"; then echo "frames_per_auxhist11=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST11"; then echo "frames_per_auxhist11=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST12_INNAME"; then echo "auxhist12_inname=\"${NL_AUXHIST12_INNAME}\"," >>	if test ! -z "$NL_AUXHIST12_INNAME"; then echo "auxhist12_inname=\"${NL_AUXHIST12_INNAME}\"," >>
if test ! -z "$NL_AUXHIST12_OUTNAME"; then echo "auxhist12_outname=\"${NL_AUXHIST12_OUTNAME}\","	if test ! -z "$NL_AUXHIST12_OUTNAME"; then echo "auxhist12_outname=\"${NL_AUXHIST12_OUTNAME}\","
if test ! -z "$NL_AUXHIST12_INTERVAL_Y"; then echo "auxhist12_interval_y=${NL_AUXHIST12_INTERVAL	if test ! -z "$NL_AUXHIST12_INTERVAL_Y"; then echo "auxhist12_interval_y=${NL_AUXHIST12_INTERVAL
if test ! -z "$NL_AUXHIST12_INTERVAL_D"; then echo "auxhist12_interval_d=${NL_AUXHIST12_INTERVAL	if test ! -z "$NL_AUXHIST12_INTERVAL_D"; then echo "auxhist12_interval_d=${NL_AUXHIST12_INTERVAL
if test ! -z "$NL_AUXHIST12_INTERVAL_H"; then echo "auxhist12_interval_h=${NL_AUXHIST12_INTERVAL	if test ! -z "$NL_AUXHIST12_INTERVAL_H"; then echo "auxhist12_interval_h=${NL_AUXHIST12_INTERVAL
if test ! -z "$NL_AUXHIST12_INTERVAL_M"; then echo "auxhist12_interval_m=${NL_AUXHIST12_INTERVAL	if test ! -z "$NL_AUXHIST12_INTERVAL_M"; then echo "auxhist12_interval_m=${NL_AUXHIST12_INTERVAL
if test ! -z "$NL_AUXHIST12_INTERVAL_S"; then echo "auxhist12_interval_s=${NL_AUXHIST12_INTERVAL	if test ! -z "$NL_AUXHIST12_INTERVAL_S"; then echo "auxhist12_interval_s=${NL_AUXHIST12_INTERVAL
if test ! -z "$NL_AUXHIST12_INTERVAL"; then echo "auxhist12_interval=${NL_AUXHIST12_INTERVAL}," 	if test ! -z "$NL_AUXHIST12_INTERVAL"; then echo "auxhist12_interval=${NL_AUXHIST12_INTERVAL}," 
if test ! -z "$NL_AUXHIST12_BEGIN_Y"; then echo "auxhist12_begin_y=${NL_AUXHIST12_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST12_BEGIN_Y"; then echo "auxhist12_begin_y=${NL_AUXHIST12_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST12_BEGIN_D"; then echo "auxhist12_begin_d=${NL_AUXHIST12_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST12_BEGIN_D"; then echo "auxhist12_begin_d=${NL_AUXHIST12_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST12_BEGIN_H"; then echo "auxhist12_begin_h=${NL_AUXHIST12_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST12_BEGIN_H"; then echo "auxhist12_begin_h=${NL_AUXHIST12_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST12_BEGIN_M"; then echo "auxhist12_begin_m=${NL_AUXHIST12_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST12_BEGIN_M"; then echo "auxhist12_begin_m=${NL_AUXHIST12_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST12_BEGIN_S"; then echo "auxhist12_begin_s=${NL_AUXHIST12_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST12_BEGIN_S"; then echo "auxhist12_begin_s=${NL_AUXHIST12_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST12_BEGIN"; then echo "auxhist12_begin=${NL_AUXHIST12_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST12_BEGIN"; then echo "auxhist12_begin=${NL_AUXHIST12_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END_Y"; then echo "auxhist12_end_y=${NL_AUXHIST12_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST12_END_Y"; then echo "auxhist12_end_y=${NL_AUXHIST12_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END_D"; then echo "auxhist12_end_d=${NL_AUXHIST12_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST12_END_D"; then echo "auxhist12_end_d=${NL_AUXHIST12_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END_H"; then echo "auxhist12_end_h=${NL_AUXHIST12_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST12_END_H"; then echo "auxhist12_end_h=${NL_AUXHIST12_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END_M"; then echo "auxhist12_end_m=${NL_AUXHIST12_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST12_END_M"; then echo "auxhist12_end_m=${NL_AUXHIST12_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END_S"; then echo "auxhist12_end_s=${NL_AUXHIST12_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST12_END_S"; then echo "auxhist12_end_s=${NL_AUXHIST12_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST12_END"; then echo "auxhist12_end=${NL_AUXHIST12_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST12_END"; then echo "auxhist12_end=${NL_AUXHIST12_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST12"; then echo "io_form_auxhist12=${NL_IO_FORM_AUXHIST12}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST12"; then echo "io_form_auxhist12=${NL_IO_FORM_AUXHIST12}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST12"; then echo "frames_per_auxhist12=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST12"; then echo "frames_per_auxhist12=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST13_INNAME"; then echo "auxhist13_inname=\"${NL_AUXHIST13_INNAME}\"," >>	if test ! -z "$NL_AUXHIST13_INNAME"; then echo "auxhist13_inname=\"${NL_AUXHIST13_INNAME}\"," >>
if test ! -z "$NL_AUXHIST13_OUTNAME"; then echo "auxhist13_outname=\"${NL_AUXHIST13_OUTNAME}\","	if test ! -z "$NL_AUXHIST13_OUTNAME"; then echo "auxhist13_outname=\"${NL_AUXHIST13_OUTNAME}\","
if test ! -z "$NL_AUXHIST13_INTERVAL_Y"; then echo "auxhist13_interval_y=${NL_AUXHIST13_INTERVAL	if test ! -z "$NL_AUXHIST13_INTERVAL_Y"; then echo "auxhist13_interval_y=${NL_AUXHIST13_INTERVAL
if test ! -z "$NL_AUXHIST13_INTERVAL_D"; then echo "auxhist13_interval_d=${NL_AUXHIST13_INTERVAL	if test ! -z "$NL_AUXHIST13_INTERVAL_D"; then echo "auxhist13_interval_d=${NL_AUXHIST13_INTERVAL
if test ! -z "$NL_AUXHIST13_INTERVAL_H"; then echo "auxhist13_interval_h=${NL_AUXHIST13_INTERVAL	if test ! -z "$NL_AUXHIST13_INTERVAL_H"; then echo "auxhist13_interval_h=${NL_AUXHIST13_INTERVAL
if test ! -z "$NL_AUXHIST13_INTERVAL_M"; then echo "auxhist13_interval_m=${NL_AUXHIST13_INTERVAL	if test ! -z "$NL_AUXHIST13_INTERVAL_M"; then echo "auxhist13_interval_m=${NL_AUXHIST13_INTERVAL
if test ! -z "$NL_AUXHIST13_INTERVAL_S"; then echo "auxhist13_interval_s=${NL_AUXHIST13_INTERVAL	if test ! -z "$NL_AUXHIST13_INTERVAL_S"; then echo "auxhist13_interval_s=${NL_AUXHIST13_INTERVAL
if test ! -z "$NL_AUXHIST13_INTERVAL"; then echo "auxhist13_interval=${NL_AUXHIST13_INTERVAL}," 	if test ! -z "$NL_AUXHIST13_INTERVAL"; then echo "auxhist13_interval=${NL_AUXHIST13_INTERVAL}," 
if test ! -z "$NL_AUXHIST13_BEGIN_Y"; then echo "auxhist13_begin_y=${NL_AUXHIST13_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST13_BEGIN_Y"; then echo "auxhist13_begin_y=${NL_AUXHIST13_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST13_BEGIN_D"; then echo "auxhist13_begin_d=${NL_AUXHIST13_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST13_BEGIN_D"; then echo "auxhist13_begin_d=${NL_AUXHIST13_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST13_BEGIN_H"; then echo "auxhist13_begin_h=${NL_AUXHIST13_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST13_BEGIN_H"; then echo "auxhist13_begin_h=${NL_AUXHIST13_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST13_BEGIN_M"; then echo "auxhist13_begin_m=${NL_AUXHIST13_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST13_BEGIN_M"; then echo "auxhist13_begin_m=${NL_AUXHIST13_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST13_BEGIN_S"; then echo "auxhist13_begin_s=${NL_AUXHIST13_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST13_BEGIN_S"; then echo "auxhist13_begin_s=${NL_AUXHIST13_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST13_BEGIN"; then echo "auxhist13_begin=${NL_AUXHIST13_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST13_BEGIN"; then echo "auxhist13_begin=${NL_AUXHIST13_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END_Y"; then echo "auxhist13_end_y=${NL_AUXHIST13_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST13_END_Y"; then echo "auxhist13_end_y=${NL_AUXHIST13_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END_D"; then echo "auxhist13_end_d=${NL_AUXHIST13_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST13_END_D"; then echo "auxhist13_end_d=${NL_AUXHIST13_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END_H"; then echo "auxhist13_end_h=${NL_AUXHIST13_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST13_END_H"; then echo "auxhist13_end_h=${NL_AUXHIST13_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END_M"; then echo "auxhist13_end_m=${NL_AUXHIST13_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST13_END_M"; then echo "auxhist13_end_m=${NL_AUXHIST13_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END_S"; then echo "auxhist13_end_s=${NL_AUXHIST13_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST13_END_S"; then echo "auxhist13_end_s=${NL_AUXHIST13_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST13_END"; then echo "auxhist13_end=${NL_AUXHIST13_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST13_END"; then echo "auxhist13_end=${NL_AUXHIST13_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST13"; then echo "io_form_auxhist13=${NL_IO_FORM_AUXHIST13}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST13"; then echo "io_form_auxhist13=${NL_IO_FORM_AUXHIST13}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST13"; then echo "frames_per_auxhist13=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST13"; then echo "frames_per_auxhist13=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST14_INNAME"; then echo "auxhist14_inname=\"${NL_AUXHIST14_INNAME}\"," >>	if test ! -z "$NL_AUXHIST14_INNAME"; then echo "auxhist14_inname=\"${NL_AUXHIST14_INNAME}\"," >>
if test ! -z "$NL_AUXHIST14_OUTNAME"; then echo "auxhist14_outname=\"${NL_AUXHIST14_OUTNAME}\","	if test ! -z "$NL_AUXHIST14_OUTNAME"; then echo "auxhist14_outname=\"${NL_AUXHIST14_OUTNAME}\","
if test ! -z "$NL_AUXHIST14_INTERVAL_Y"; then echo "auxhist14_interval_y=${NL_AUXHIST14_INTERVAL	if test ! -z "$NL_AUXHIST14_INTERVAL_Y"; then echo "auxhist14_interval_y=${NL_AUXHIST14_INTERVAL
if test ! -z "$NL_AUXHIST14_INTERVAL_D"; then echo "auxhist14_interval_d=${NL_AUXHIST14_INTERVAL	if test ! -z "$NL_AUXHIST14_INTERVAL_D"; then echo "auxhist14_interval_d=${NL_AUXHIST14_INTERVAL
if test ! -z "$NL_AUXHIST14_INTERVAL_H"; then echo "auxhist14_interval_h=${NL_AUXHIST14_INTERVAL	if test ! -z "$NL_AUXHIST14_INTERVAL_H"; then echo "auxhist14_interval_h=${NL_AUXHIST14_INTERVAL
if test ! -z "$NL_AUXHIST14_INTERVAL_M"; then echo "auxhist14_interval_m=${NL_AUXHIST14_INTERVAL	if test ! -z "$NL_AUXHIST14_INTERVAL_M"; then echo "auxhist14_interval_m=${NL_AUXHIST14_INTERVAL
if test ! -z "$NL_AUXHIST14_INTERVAL_S"; then echo "auxhist14_interval_s=${NL_AUXHIST14_INTERVAL	if test ! -z "$NL_AUXHIST14_INTERVAL_S"; then echo "auxhist14_interval_s=${NL_AUXHIST14_INTERVAL
if test ! -z "$NL_AUXHIST14_INTERVAL"; then echo "auxhist14_interval=${NL_AUXHIST14_INTERVAL}," 	if test ! -z "$NL_AUXHIST14_INTERVAL"; then echo "auxhist14_interval=${NL_AUXHIST14_INTERVAL}," 
if test ! -z "$NL_AUXHIST14_BEGIN_Y"; then echo "auxhist14_begin_y=${NL_AUXHIST14_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST14_BEGIN_Y"; then echo "auxhist14_begin_y=${NL_AUXHIST14_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST14_BEGIN_D"; then echo "auxhist14_begin_d=${NL_AUXHIST14_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST14_BEGIN_D"; then echo "auxhist14_begin_d=${NL_AUXHIST14_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST14_BEGIN_H"; then echo "auxhist14_begin_h=${NL_AUXHIST14_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST14_BEGIN_H"; then echo "auxhist14_begin_h=${NL_AUXHIST14_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST14_BEGIN_M"; then echo "auxhist14_begin_m=${NL_AUXHIST14_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST14_BEGIN_M"; then echo "auxhist14_begin_m=${NL_AUXHIST14_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST14_BEGIN_S"; then echo "auxhist14_begin_s=${NL_AUXHIST14_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST14_BEGIN_S"; then echo "auxhist14_begin_s=${NL_AUXHIST14_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST14_BEGIN"; then echo "auxhist14_begin=${NL_AUXHIST14_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST14_BEGIN"; then echo "auxhist14_begin=${NL_AUXHIST14_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END_Y"; then echo "auxhist14_end_y=${NL_AUXHIST14_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST14_END_Y"; then echo "auxhist14_end_y=${NL_AUXHIST14_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END_D"; then echo "auxhist14_end_d=${NL_AUXHIST14_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST14_END_D"; then echo "auxhist14_end_d=${NL_AUXHIST14_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END_H"; then echo "auxhist14_end_h=${NL_AUXHIST14_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST14_END_H"; then echo "auxhist14_end_h=${NL_AUXHIST14_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END_M"; then echo "auxhist14_end_m=${NL_AUXHIST14_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST14_END_M"; then echo "auxhist14_end_m=${NL_AUXHIST14_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END_S"; then echo "auxhist14_end_s=${NL_AUXHIST14_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST14_END_S"; then echo "auxhist14_end_s=${NL_AUXHIST14_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST14_END"; then echo "auxhist14_end=${NL_AUXHIST14_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST14_END"; then echo "auxhist14_end=${NL_AUXHIST14_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST14"; then echo "io_form_auxhist14=${NL_IO_FORM_AUXHIST14}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST14"; then echo "io_form_auxhist14=${NL_IO_FORM_AUXHIST14}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST14"; then echo "frames_per_auxhist14=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST14"; then echo "frames_per_auxhist14=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST15_INNAME"; then echo "auxhist15_inname=\"${NL_AUXHIST15_INNAME}\"," >>	if test ! -z "$NL_AUXHIST15_INNAME"; then echo "auxhist15_inname=\"${NL_AUXHIST15_INNAME}\"," >>
if test ! -z "$NL_AUXHIST15_OUTNAME"; then echo "auxhist15_outname=\"${NL_AUXHIST15_OUTNAME}\","	if test ! -z "$NL_AUXHIST15_OUTNAME"; then echo "auxhist15_outname=\"${NL_AUXHIST15_OUTNAME}\","
if test ! -z "$NL_AUXHIST15_INTERVAL_Y"; then echo "auxhist15_interval_y=${NL_AUXHIST15_INTERVAL	if test ! -z "$NL_AUXHIST15_INTERVAL_Y"; then echo "auxhist15_interval_y=${NL_AUXHIST15_INTERVAL
if test ! -z "$NL_AUXHIST15_INTERVAL_D"; then echo "auxhist15_interval_d=${NL_AUXHIST15_INTERVAL	if test ! -z "$NL_AUXHIST15_INTERVAL_D"; then echo "auxhist15_interval_d=${NL_AUXHIST15_INTERVAL
if test ! -z "$NL_AUXHIST15_INTERVAL_H"; then echo "auxhist15_interval_h=${NL_AUXHIST15_INTERVAL	if test ! -z "$NL_AUXHIST15_INTERVAL_H"; then echo "auxhist15_interval_h=${NL_AUXHIST15_INTERVAL
if test ! -z "$NL_AUXHIST15_INTERVAL_M"; then echo "auxhist15_interval_m=${NL_AUXHIST15_INTERVAL	if test ! -z "$NL_AUXHIST15_INTERVAL_M"; then echo "auxhist15_interval_m=${NL_AUXHIST15_INTERVAL
if test ! -z "$NL_AUXHIST15_INTERVAL_S"; then echo "auxhist15_interval_s=${NL_AUXHIST15_INTERVAL	if test ! -z "$NL_AUXHIST15_INTERVAL_S"; then echo "auxhist15_interval_s=${NL_AUXHIST15_INTERVAL
if test ! -z "$NL_AUXHIST15_INTERVAL"; then echo "auxhist15_interval=${NL_AUXHIST15_INTERVAL}," 	if test ! -z "$NL_AUXHIST15_INTERVAL"; then echo "auxhist15_interval=${NL_AUXHIST15_INTERVAL}," 
if test ! -z "$NL_AUXHIST15_BEGIN_Y"; then echo "auxhist15_begin_y=${NL_AUXHIST15_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST15_BEGIN_Y"; then echo "auxhist15_begin_y=${NL_AUXHIST15_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST15_BEGIN_D"; then echo "auxhist15_begin_d=${NL_AUXHIST15_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST15_BEGIN_D"; then echo "auxhist15_begin_d=${NL_AUXHIST15_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST15_BEGIN_H"; then echo "auxhist15_begin_h=${NL_AUXHIST15_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST15_BEGIN_H"; then echo "auxhist15_begin_h=${NL_AUXHIST15_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST15_BEGIN_M"; then echo "auxhist15_begin_m=${NL_AUXHIST15_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST15_BEGIN_M"; then echo "auxhist15_begin_m=${NL_AUXHIST15_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST15_BEGIN_S"; then echo "auxhist15_begin_s=${NL_AUXHIST15_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST15_BEGIN_S"; then echo "auxhist15_begin_s=${NL_AUXHIST15_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST15_BEGIN"; then echo "auxhist15_begin=${NL_AUXHIST15_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST15_BEGIN"; then echo "auxhist15_begin=${NL_AUXHIST15_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END_Y"; then echo "auxhist15_end_y=${NL_AUXHIST15_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST15_END_Y"; then echo "auxhist15_end_y=${NL_AUXHIST15_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END_D"; then echo "auxhist15_end_d=${NL_AUXHIST15_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST15_END_D"; then echo "auxhist15_end_d=${NL_AUXHIST15_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END_H"; then echo "auxhist15_end_h=${NL_AUXHIST15_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST15_END_H"; then echo "auxhist15_end_h=${NL_AUXHIST15_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END_M"; then echo "auxhist15_end_m=${NL_AUXHIST15_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST15_END_M"; then echo "auxhist15_end_m=${NL_AUXHIST15_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END_S"; then echo "auxhist15_end_s=${NL_AUXHIST15_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST15_END_S"; then echo "auxhist15_end_s=${NL_AUXHIST15_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST15_END"; then echo "auxhist15_end=${NL_AUXHIST15_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST15_END"; then echo "auxhist15_end=${NL_AUXHIST15_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST15"; then echo "io_form_auxhist15=${NL_IO_FORM_AUXHIST15}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST15"; then echo "io_form_auxhist15=${NL_IO_FORM_AUXHIST15}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST15"; then echo "frames_per_auxhist15=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST15"; then echo "frames_per_auxhist15=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST16_INNAME"; then echo "auxhist16_inname=\"${NL_AUXHIST16_INNAME}\"," >>	if test ! -z "$NL_AUXHIST16_INNAME"; then echo "auxhist16_inname=\"${NL_AUXHIST16_INNAME}\"," >>
if test ! -z "$NL_AUXHIST16_OUTNAME"; then echo "auxhist16_outname=\"${NL_AUXHIST16_OUTNAME}\","	if test ! -z "$NL_AUXHIST16_OUTNAME"; then echo "auxhist16_outname=\"${NL_AUXHIST16_OUTNAME}\","
if test ! -z "$NL_AUXHIST16_INTERVAL_Y"; then echo "auxhist16_interval_y=${NL_AUXHIST16_INTERVAL	if test ! -z "$NL_AUXHIST16_INTERVAL_Y"; then echo "auxhist16_interval_y=${NL_AUXHIST16_INTERVAL
if test ! -z "$NL_AUXHIST16_INTERVAL_D"; then echo "auxhist16_interval_d=${NL_AUXHIST16_INTERVAL	if test ! -z "$NL_AUXHIST16_INTERVAL_D"; then echo "auxhist16_interval_d=${NL_AUXHIST16_INTERVAL
if test ! -z "$NL_AUXHIST16_INTERVAL_H"; then echo "auxhist16_interval_h=${NL_AUXHIST16_INTERVAL	if test ! -z "$NL_AUXHIST16_INTERVAL_H"; then echo "auxhist16_interval_h=${NL_AUXHIST16_INTERVAL
if test ! -z "$NL_AUXHIST16_INTERVAL_M"; then echo "auxhist16_interval_m=${NL_AUXHIST16_INTERVAL	if test ! -z "$NL_AUXHIST16_INTERVAL_M"; then echo "auxhist16_interval_m=${NL_AUXHIST16_INTERVAL
if test ! -z "$NL_AUXHIST16_INTERVAL_S"; then echo "auxhist16_interval_s=${NL_AUXHIST16_INTERVAL	if test ! -z "$NL_AUXHIST16_INTERVAL_S"; then echo "auxhist16_interval_s=${NL_AUXHIST16_INTERVAL
if test ! -z "$NL_AUXHIST16_INTERVAL"; then echo "auxhist16_interval=${NL_AUXHIST16_INTERVAL}," 	if test ! -z "$NL_AUXHIST16_INTERVAL"; then echo "auxhist16_interval=${NL_AUXHIST16_INTERVAL}," 
if test ! -z "$NL_AUXHIST16_BEGIN_Y"; then echo "auxhist16_begin_y=${NL_AUXHIST16_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST16_BEGIN_Y"; then echo "auxhist16_begin_y=${NL_AUXHIST16_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST16_BEGIN_D"; then echo "auxhist16_begin_d=${NL_AUXHIST16_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST16_BEGIN_D"; then echo "auxhist16_begin_d=${NL_AUXHIST16_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST16_BEGIN_H"; then echo "auxhist16_begin_h=${NL_AUXHIST16_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST16_BEGIN_H"; then echo "auxhist16_begin_h=${NL_AUXHIST16_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST16_BEGIN_M"; then echo "auxhist16_begin_m=${NL_AUXHIST16_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST16_BEGIN_M"; then echo "auxhist16_begin_m=${NL_AUXHIST16_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST16_BEGIN_S"; then echo "auxhist16_begin_s=${NL_AUXHIST16_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST16_BEGIN_S"; then echo "auxhist16_begin_s=${NL_AUXHIST16_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST16_BEGIN"; then echo "auxhist16_begin=${NL_AUXHIST16_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST16_BEGIN"; then echo "auxhist16_begin=${NL_AUXHIST16_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END_Y"; then echo "auxhist16_end_y=${NL_AUXHIST16_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST16_END_Y"; then echo "auxhist16_end_y=${NL_AUXHIST16_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END_D"; then echo "auxhist16_end_d=${NL_AUXHIST16_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST16_END_D"; then echo "auxhist16_end_d=${NL_AUXHIST16_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END_H"; then echo "auxhist16_end_h=${NL_AUXHIST16_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST16_END_H"; then echo "auxhist16_end_h=${NL_AUXHIST16_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END_M"; then echo "auxhist16_end_m=${NL_AUXHIST16_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST16_END_M"; then echo "auxhist16_end_m=${NL_AUXHIST16_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END_S"; then echo "auxhist16_end_s=${NL_AUXHIST16_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST16_END_S"; then echo "auxhist16_end_s=${NL_AUXHIST16_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST16_END"; then echo "auxhist16_end=${NL_AUXHIST16_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST16_END"; then echo "auxhist16_end=${NL_AUXHIST16_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST16"; then echo "io_form_auxhist16=${NL_IO_FORM_AUXHIST16}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST16"; then echo "io_form_auxhist16=${NL_IO_FORM_AUXHIST16}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST16"; then echo "frames_per_auxhist16=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST16"; then echo "frames_per_auxhist16=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST17_INNAME"; then echo "auxhist17_inname=\"${NL_AUXHIST17_INNAME}\"," >>	if test ! -z "$NL_AUXHIST17_INNAME"; then echo "auxhist17_inname=\"${NL_AUXHIST17_INNAME}\"," >>
if test ! -z "$NL_AUXHIST17_OUTNAME"; then echo "auxhist17_outname=\"${NL_AUXHIST17_OUTNAME}\","	if test ! -z "$NL_AUXHIST17_OUTNAME"; then echo "auxhist17_outname=\"${NL_AUXHIST17_OUTNAME}\","
if test ! -z "$NL_AUXHIST17_INTERVAL_Y"; then echo "auxhist17_interval_y=${NL_AUXHIST17_INTERVAL	if test ! -z "$NL_AUXHIST17_INTERVAL_Y"; then echo "auxhist17_interval_y=${NL_AUXHIST17_INTERVAL
if test ! -z "$NL_AUXHIST17_INTERVAL_D"; then echo "auxhist17_interval_d=${NL_AUXHIST17_INTERVAL	if test ! -z "$NL_AUXHIST17_INTERVAL_D"; then echo "auxhist17_interval_d=${NL_AUXHIST17_INTERVAL
if test ! -z "$NL_AUXHIST17_INTERVAL_H"; then echo "auxhist17_interval_h=${NL_AUXHIST17_INTERVAL	if test ! -z "$NL_AUXHIST17_INTERVAL_H"; then echo "auxhist17_interval_h=${NL_AUXHIST17_INTERVAL
if test ! -z "$NL_AUXHIST17_INTERVAL_M"; then echo "auxhist17_interval_m=${NL_AUXHIST17_INTERVAL	if test ! -z "$NL_AUXHIST17_INTERVAL_M"; then echo "auxhist17_interval_m=${NL_AUXHIST17_INTERVAL
if test ! -z "$NL_AUXHIST17_INTERVAL_S"; then echo "auxhist17_interval_s=${NL_AUXHIST17_INTERVAL	if test ! -z "$NL_AUXHIST17_INTERVAL_S"; then echo "auxhist17_interval_s=${NL_AUXHIST17_INTERVAL
if test ! -z "$NL_AUXHIST17_INTERVAL"; then echo "auxhist17_interval=${NL_AUXHIST17_INTERVAL}," 	if test ! -z "$NL_AUXHIST17_INTERVAL"; then echo "auxhist17_interval=${NL_AUXHIST17_INTERVAL}," 
if test ! -z "$NL_AUXHIST17_BEGIN_Y"; then echo "auxhist17_begin_y=${NL_AUXHIST17_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST17_BEGIN_Y"; then echo "auxhist17_begin_y=${NL_AUXHIST17_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST17_BEGIN_D"; then echo "auxhist17_begin_d=${NL_AUXHIST17_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST17_BEGIN_D"; then echo "auxhist17_begin_d=${NL_AUXHIST17_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST17_BEGIN_H"; then echo "auxhist17_begin_h=${NL_AUXHIST17_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST17_BEGIN_H"; then echo "auxhist17_begin_h=${NL_AUXHIST17_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST17_BEGIN_M"; then echo "auxhist17_begin_m=${NL_AUXHIST17_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST17_BEGIN_M"; then echo "auxhist17_begin_m=${NL_AUXHIST17_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST17_BEGIN_S"; then echo "auxhist17_begin_s=${NL_AUXHIST17_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST17_BEGIN_S"; then echo "auxhist17_begin_s=${NL_AUXHIST17_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST17_BEGIN"; then echo "auxhist17_begin=${NL_AUXHIST17_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST17_BEGIN"; then echo "auxhist17_begin=${NL_AUXHIST17_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END_Y"; then echo "auxhist17_end_y=${NL_AUXHIST17_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST17_END_Y"; then echo "auxhist17_end_y=${NL_AUXHIST17_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END_D"; then echo "auxhist17_end_d=${NL_AUXHIST17_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST17_END_D"; then echo "auxhist17_end_d=${NL_AUXHIST17_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END_H"; then echo "auxhist17_end_h=${NL_AUXHIST17_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST17_END_H"; then echo "auxhist17_end_h=${NL_AUXHIST17_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END_M"; then echo "auxhist17_end_m=${NL_AUXHIST17_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST17_END_M"; then echo "auxhist17_end_m=${NL_AUXHIST17_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END_S"; then echo "auxhist17_end_s=${NL_AUXHIST17_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST17_END_S"; then echo "auxhist17_end_s=${NL_AUXHIST17_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST17_END"; then echo "auxhist17_end=${NL_AUXHIST17_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST17_END"; then echo "auxhist17_end=${NL_AUXHIST17_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST17"; then echo "io_form_auxhist17=${NL_IO_FORM_AUXHIST17}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST17"; then echo "io_form_auxhist17=${NL_IO_FORM_AUXHIST17}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST17"; then echo "frames_per_auxhist17=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST17"; then echo "frames_per_auxhist17=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST18_INNAME"; then echo "auxhist18_inname=\"${NL_AUXHIST18_INNAME}\"," >>	if test ! -z "$NL_AUXHIST18_INNAME"; then echo "auxhist18_inname=\"${NL_AUXHIST18_INNAME}\"," >>
if test ! -z "$NL_AUXHIST18_OUTNAME"; then echo "auxhist18_outname=\"${NL_AUXHIST18_OUTNAME}\","	if test ! -z "$NL_AUXHIST18_OUTNAME"; then echo "auxhist18_outname=\"${NL_AUXHIST18_OUTNAME}\","
if test ! -z "$NL_AUXHIST18_INTERVAL_Y"; then echo "auxhist18_interval_y=${NL_AUXHIST18_INTERVAL	if test ! -z "$NL_AUXHIST18_INTERVAL_Y"; then echo "auxhist18_interval_y=${NL_AUXHIST18_INTERVAL
if test ! -z "$NL_AUXHIST18_INTERVAL_D"; then echo "auxhist18_interval_d=${NL_AUXHIST18_INTERVAL	if test ! -z "$NL_AUXHIST18_INTERVAL_D"; then echo "auxhist18_interval_d=${NL_AUXHIST18_INTERVAL
if test ! -z "$NL_AUXHIST18_INTERVAL_H"; then echo "auxhist18_interval_h=${NL_AUXHIST18_INTERVAL	if test ! -z "$NL_AUXHIST18_INTERVAL_H"; then echo "auxhist18_interval_h=${NL_AUXHIST18_INTERVAL
if test ! -z "$NL_AUXHIST18_INTERVAL_M"; then echo "auxhist18_interval_m=${NL_AUXHIST18_INTERVAL	if test ! -z "$NL_AUXHIST18_INTERVAL_M"; then echo "auxhist18_interval_m=${NL_AUXHIST18_INTERVAL
if test ! -z "$NL_AUXHIST18_INTERVAL_S"; then echo "auxhist18_interval_s=${NL_AUXHIST18_INTERVAL	if test ! -z "$NL_AUXHIST18_INTERVAL_S"; then echo "auxhist18_interval_s=${NL_AUXHIST18_INTERVAL
if test ! -z "$NL_AUXHIST18_INTERVAL"; then echo "auxhist18_interval=${NL_AUXHIST18_INTERVAL}," 	if test ! -z "$NL_AUXHIST18_INTERVAL"; then echo "auxhist18_interval=${NL_AUXHIST18_INTERVAL}," 
if test ! -z "$NL_AUXHIST18_BEGIN_Y"; then echo "auxhist18_begin_y=${NL_AUXHIST18_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST18_BEGIN_Y"; then echo "auxhist18_begin_y=${NL_AUXHIST18_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST18_BEGIN_D"; then echo "auxhist18_begin_d=${NL_AUXHIST18_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST18_BEGIN_D"; then echo "auxhist18_begin_d=${NL_AUXHIST18_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST18_BEGIN_H"; then echo "auxhist18_begin_h=${NL_AUXHIST18_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST18_BEGIN_H"; then echo "auxhist18_begin_h=${NL_AUXHIST18_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST18_BEGIN_M"; then echo "auxhist18_begin_m=${NL_AUXHIST18_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST18_BEGIN_M"; then echo "auxhist18_begin_m=${NL_AUXHIST18_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST18_BEGIN_S"; then echo "auxhist18_begin_s=${NL_AUXHIST18_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST18_BEGIN_S"; then echo "auxhist18_begin_s=${NL_AUXHIST18_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST18_BEGIN"; then echo "auxhist18_begin=${NL_AUXHIST18_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST18_BEGIN"; then echo "auxhist18_begin=${NL_AUXHIST18_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END_Y"; then echo "auxhist18_end_y=${NL_AUXHIST18_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST18_END_Y"; then echo "auxhist18_end_y=${NL_AUXHIST18_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END_D"; then echo "auxhist18_end_d=${NL_AUXHIST18_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST18_END_D"; then echo "auxhist18_end_d=${NL_AUXHIST18_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END_H"; then echo "auxhist18_end_h=${NL_AUXHIST18_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST18_END_H"; then echo "auxhist18_end_h=${NL_AUXHIST18_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END_M"; then echo "auxhist18_end_m=${NL_AUXHIST18_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST18_END_M"; then echo "auxhist18_end_m=${NL_AUXHIST18_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END_S"; then echo "auxhist18_end_s=${NL_AUXHIST18_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST18_END_S"; then echo "auxhist18_end_s=${NL_AUXHIST18_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST18_END"; then echo "auxhist18_end=${NL_AUXHIST18_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST18_END"; then echo "auxhist18_end=${NL_AUXHIST18_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST18"; then echo "io_form_auxhist18=${NL_IO_FORM_AUXHIST18}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST18"; then echo "io_form_auxhist18=${NL_IO_FORM_AUXHIST18}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST18"; then echo "frames_per_auxhist18=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST18"; then echo "frames_per_auxhist18=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST19_INNAME"; then echo "auxhist19_inname=\"${NL_AUXHIST19_INNAME}\"," >>	if test ! -z "$NL_AUXHIST19_INNAME"; then echo "auxhist19_inname=\"${NL_AUXHIST19_INNAME}\"," >>
if test ! -z "$NL_AUXHIST19_OUTNAME"; then echo "auxhist19_outname=\"${NL_AUXHIST19_OUTNAME}\","	if test ! -z "$NL_AUXHIST19_OUTNAME"; then echo "auxhist19_outname=\"${NL_AUXHIST19_OUTNAME}\","
if test ! -z "$NL_AUXHIST19_INTERVAL_Y"; then echo "auxhist19_interval_y=${NL_AUXHIST19_INTERVAL	if test ! -z "$NL_AUXHIST19_INTERVAL_Y"; then echo "auxhist19_interval_y=${NL_AUXHIST19_INTERVAL
if test ! -z "$NL_AUXHIST19_INTERVAL_D"; then echo "auxhist19_interval_d=${NL_AUXHIST19_INTERVAL	if test ! -z "$NL_AUXHIST19_INTERVAL_D"; then echo "auxhist19_interval_d=${NL_AUXHIST19_INTERVAL
if test ! -z "$NL_AUXHIST19_INTERVAL_H"; then echo "auxhist19_interval_h=${NL_AUXHIST19_INTERVAL	if test ! -z "$NL_AUXHIST19_INTERVAL_H"; then echo "auxhist19_interval_h=${NL_AUXHIST19_INTERVAL
if test ! -z "$NL_AUXHIST19_INTERVAL_M"; then echo "auxhist19_interval_m=${NL_AUXHIST19_INTERVAL	if test ! -z "$NL_AUXHIST19_INTERVAL_M"; then echo "auxhist19_interval_m=${NL_AUXHIST19_INTERVAL
if test ! -z "$NL_AUXHIST19_INTERVAL_S"; then echo "auxhist19_interval_s=${NL_AUXHIST19_INTERVAL	if test ! -z "$NL_AUXHIST19_INTERVAL_S"; then echo "auxhist19_interval_s=${NL_AUXHIST19_INTERVAL
if test ! -z "$NL_AUXHIST19_INTERVAL"; then echo "auxhist19_interval=${NL_AUXHIST19_INTERVAL}," 	if test ! -z "$NL_AUXHIST19_INTERVAL"; then echo "auxhist19_interval=${NL_AUXHIST19_INTERVAL}," 
if test ! -z "$NL_AUXHIST19_BEGIN_Y"; then echo "auxhist19_begin_y=${NL_AUXHIST19_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST19_BEGIN_Y"; then echo "auxhist19_begin_y=${NL_AUXHIST19_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST19_BEGIN_D"; then echo "auxhist19_begin_d=${NL_AUXHIST19_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST19_BEGIN_D"; then echo "auxhist19_begin_d=${NL_AUXHIST19_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST19_BEGIN_H"; then echo "auxhist19_begin_h=${NL_AUXHIST19_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST19_BEGIN_H"; then echo "auxhist19_begin_h=${NL_AUXHIST19_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST19_BEGIN_M"; then echo "auxhist19_begin_m=${NL_AUXHIST19_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST19_BEGIN_M"; then echo "auxhist19_begin_m=${NL_AUXHIST19_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST19_BEGIN_S"; then echo "auxhist19_begin_s=${NL_AUXHIST19_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST19_BEGIN_S"; then echo "auxhist19_begin_s=${NL_AUXHIST19_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST19_BEGIN"; then echo "auxhist19_begin=${NL_AUXHIST19_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST19_BEGIN"; then echo "auxhist19_begin=${NL_AUXHIST19_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END_Y"; then echo "auxhist19_end_y=${NL_AUXHIST19_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST19_END_Y"; then echo "auxhist19_end_y=${NL_AUXHIST19_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END_D"; then echo "auxhist19_end_d=${NL_AUXHIST19_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST19_END_D"; then echo "auxhist19_end_d=${NL_AUXHIST19_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END_H"; then echo "auxhist19_end_h=${NL_AUXHIST19_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST19_END_H"; then echo "auxhist19_end_h=${NL_AUXHIST19_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END_M"; then echo "auxhist19_end_m=${NL_AUXHIST19_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST19_END_M"; then echo "auxhist19_end_m=${NL_AUXHIST19_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END_S"; then echo "auxhist19_end_s=${NL_AUXHIST19_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST19_END_S"; then echo "auxhist19_end_s=${NL_AUXHIST19_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST19_END"; then echo "auxhist19_end=${NL_AUXHIST19_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST19_END"; then echo "auxhist19_end=${NL_AUXHIST19_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST19"; then echo "io_form_auxhist19=${NL_IO_FORM_AUXHIST19}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST19"; then echo "io_form_auxhist19=${NL_IO_FORM_AUXHIST19}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST19"; then echo "frames_per_auxhist19=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST19"; then echo "frames_per_auxhist19=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST20_INNAME"; then echo "auxhist20_inname=\"${NL_AUXHIST20_INNAME}\"," >>	if test ! -z "$NL_AUXHIST20_INNAME"; then echo "auxhist20_inname=\"${NL_AUXHIST20_INNAME}\"," >>
if test ! -z "$NL_AUXHIST20_OUTNAME"; then echo "auxhist20_outname=\"${NL_AUXHIST20_OUTNAME}\","	if test ! -z "$NL_AUXHIST20_OUTNAME"; then echo "auxhist20_outname=\"${NL_AUXHIST20_OUTNAME}\","
if test ! -z "$NL_AUXHIST20_INTERVAL_Y"; then echo "auxhist20_interval_y=${NL_AUXHIST20_INTERVAL	if test ! -z "$NL_AUXHIST20_INTERVAL_Y"; then echo "auxhist20_interval_y=${NL_AUXHIST20_INTERVAL
if test ! -z "$NL_AUXHIST20_INTERVAL_D"; then echo "auxhist20_interval_d=${NL_AUXHIST20_INTERVAL	if test ! -z "$NL_AUXHIST20_INTERVAL_D"; then echo "auxhist20_interval_d=${NL_AUXHIST20_INTERVAL
if test ! -z "$NL_AUXHIST20_INTERVAL_H"; then echo "auxhist20_interval_h=${NL_AUXHIST20_INTERVAL	if test ! -z "$NL_AUXHIST20_INTERVAL_H"; then echo "auxhist20_interval_h=${NL_AUXHIST20_INTERVAL
if test ! -z "$NL_AUXHIST20_INTERVAL_M"; then echo "auxhist20_interval_m=${NL_AUXHIST20_INTERVAL	if test ! -z "$NL_AUXHIST20_INTERVAL_M"; then echo "auxhist20_interval_m=${NL_AUXHIST20_INTERVAL
if test ! -z "$NL_AUXHIST20_INTERVAL_S"; then echo "auxhist20_interval_s=${NL_AUXHIST20_INTERVAL	if test ! -z "$NL_AUXHIST20_INTERVAL_S"; then echo "auxhist20_interval_s=${NL_AUXHIST20_INTERVAL
if test ! -z "$NL_AUXHIST20_INTERVAL"; then echo "auxhist20_interval=${NL_AUXHIST20_INTERVAL}," 	if test ! -z "$NL_AUXHIST20_INTERVAL"; then echo "auxhist20_interval=${NL_AUXHIST20_INTERVAL}," 
if test ! -z "$NL_AUXHIST20_BEGIN_Y"; then echo "auxhist20_begin_y=${NL_AUXHIST20_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST20_BEGIN_Y"; then echo "auxhist20_begin_y=${NL_AUXHIST20_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST20_BEGIN_D"; then echo "auxhist20_begin_d=${NL_AUXHIST20_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST20_BEGIN_D"; then echo "auxhist20_begin_d=${NL_AUXHIST20_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST20_BEGIN_H"; then echo "auxhist20_begin_h=${NL_AUXHIST20_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST20_BEGIN_H"; then echo "auxhist20_begin_h=${NL_AUXHIST20_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST20_BEGIN_M"; then echo "auxhist20_begin_m=${NL_AUXHIST20_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST20_BEGIN_M"; then echo "auxhist20_begin_m=${NL_AUXHIST20_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST20_BEGIN_S"; then echo "auxhist20_begin_s=${NL_AUXHIST20_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST20_BEGIN_S"; then echo "auxhist20_begin_s=${NL_AUXHIST20_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST20_BEGIN"; then echo "auxhist20_begin=${NL_AUXHIST20_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST20_BEGIN"; then echo "auxhist20_begin=${NL_AUXHIST20_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END_Y"; then echo "auxhist20_end_y=${NL_AUXHIST20_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST20_END_Y"; then echo "auxhist20_end_y=${NL_AUXHIST20_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END_D"; then echo "auxhist20_end_d=${NL_AUXHIST20_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST20_END_D"; then echo "auxhist20_end_d=${NL_AUXHIST20_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END_H"; then echo "auxhist20_end_h=${NL_AUXHIST20_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST20_END_H"; then echo "auxhist20_end_h=${NL_AUXHIST20_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END_M"; then echo "auxhist20_end_m=${NL_AUXHIST20_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST20_END_M"; then echo "auxhist20_end_m=${NL_AUXHIST20_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END_S"; then echo "auxhist20_end_s=${NL_AUXHIST20_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST20_END_S"; then echo "auxhist20_end_s=${NL_AUXHIST20_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST20_END"; then echo "auxhist20_end=${NL_AUXHIST20_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST20_END"; then echo "auxhist20_end=${NL_AUXHIST20_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST20"; then echo "io_form_auxhist20=${NL_IO_FORM_AUXHIST20}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST20"; then echo "io_form_auxhist20=${NL_IO_FORM_AUXHIST20}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST20"; then echo "frames_per_auxhist20=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST20"; then echo "frames_per_auxhist20=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST21_INNAME"; then echo "auxhist21_inname=\"${NL_AUXHIST21_INNAME}\"," >>	if test ! -z "$NL_AUXHIST21_INNAME"; then echo "auxhist21_inname=\"${NL_AUXHIST21_INNAME}\"," >>
if test ! -z "$NL_AUXHIST21_OUTNAME"; then echo "auxhist21_outname=\"${NL_AUXHIST21_OUTNAME}\","	if test ! -z "$NL_AUXHIST21_OUTNAME"; then echo "auxhist21_outname=\"${NL_AUXHIST21_OUTNAME}\","
if test ! -z "$NL_AUXHIST21_INTERVAL_Y"; then echo "auxhist21_interval_y=${NL_AUXHIST21_INTERVAL	if test ! -z "$NL_AUXHIST21_INTERVAL_Y"; then echo "auxhist21_interval_y=${NL_AUXHIST21_INTERVAL
if test ! -z "$NL_AUXHIST21_INTERVAL_D"; then echo "auxhist21_interval_d=${NL_AUXHIST21_INTERVAL	if test ! -z "$NL_AUXHIST21_INTERVAL_D"; then echo "auxhist21_interval_d=${NL_AUXHIST21_INTERVAL
if test ! -z "$NL_AUXHIST21_INTERVAL_H"; then echo "auxhist21_interval_h=${NL_AUXHIST21_INTERVAL	if test ! -z "$NL_AUXHIST21_INTERVAL_H"; then echo "auxhist21_interval_h=${NL_AUXHIST21_INTERVAL
if test ! -z "$NL_AUXHIST21_INTERVAL_M"; then echo "auxhist21_interval_m=${NL_AUXHIST21_INTERVAL	if test ! -z "$NL_AUXHIST21_INTERVAL_M"; then echo "auxhist21_interval_m=${NL_AUXHIST21_INTERVAL
if test ! -z "$NL_AUXHIST21_INTERVAL_S"; then echo "auxhist21_interval_s=${NL_AUXHIST21_INTERVAL	if test ! -z "$NL_AUXHIST21_INTERVAL_S"; then echo "auxhist21_interval_s=${NL_AUXHIST21_INTERVAL
if test ! -z "$NL_AUXHIST21_INTERVAL"; then echo "auxhist21_interval=${NL_AUXHIST21_INTERVAL}," 	if test ! -z "$NL_AUXHIST21_INTERVAL"; then echo "auxhist21_interval=${NL_AUXHIST21_INTERVAL}," 
if test ! -z "$NL_AUXHIST21_BEGIN_Y"; then echo "auxhist21_begin_y=${NL_AUXHIST21_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST21_BEGIN_Y"; then echo "auxhist21_begin_y=${NL_AUXHIST21_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST21_BEGIN_D"; then echo "auxhist21_begin_d=${NL_AUXHIST21_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST21_BEGIN_D"; then echo "auxhist21_begin_d=${NL_AUXHIST21_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST21_BEGIN_H"; then echo "auxhist21_begin_h=${NL_AUXHIST21_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST21_BEGIN_H"; then echo "auxhist21_begin_h=${NL_AUXHIST21_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST21_BEGIN_M"; then echo "auxhist21_begin_m=${NL_AUXHIST21_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST21_BEGIN_M"; then echo "auxhist21_begin_m=${NL_AUXHIST21_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST21_BEGIN_S"; then echo "auxhist21_begin_s=${NL_AUXHIST21_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST21_BEGIN_S"; then echo "auxhist21_begin_s=${NL_AUXHIST21_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST21_BEGIN"; then echo "auxhist21_begin=${NL_AUXHIST21_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST21_BEGIN"; then echo "auxhist21_begin=${NL_AUXHIST21_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END_Y"; then echo "auxhist21_end_y=${NL_AUXHIST21_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST21_END_Y"; then echo "auxhist21_end_y=${NL_AUXHIST21_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END_D"; then echo "auxhist21_end_d=${NL_AUXHIST21_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST21_END_D"; then echo "auxhist21_end_d=${NL_AUXHIST21_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END_H"; then echo "auxhist21_end_h=${NL_AUXHIST21_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST21_END_H"; then echo "auxhist21_end_h=${NL_AUXHIST21_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END_M"; then echo "auxhist21_end_m=${NL_AUXHIST21_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST21_END_M"; then echo "auxhist21_end_m=${NL_AUXHIST21_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END_S"; then echo "auxhist21_end_s=${NL_AUXHIST21_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST21_END_S"; then echo "auxhist21_end_s=${NL_AUXHIST21_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST21_END"; then echo "auxhist21_end=${NL_AUXHIST21_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST21_END"; then echo "auxhist21_end=${NL_AUXHIST21_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST21"; then echo "io_form_auxhist21=${NL_IO_FORM_AUXHIST21}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST21"; then echo "io_form_auxhist21=${NL_IO_FORM_AUXHIST21}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST21"; then echo "frames_per_auxhist21=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST21"; then echo "frames_per_auxhist21=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST22_INNAME"; then echo "auxhist22_inname=\"${NL_AUXHIST22_INNAME}\"," >>	if test ! -z "$NL_AUXHIST22_INNAME"; then echo "auxhist22_inname=\"${NL_AUXHIST22_INNAME}\"," >>
if test ! -z "$NL_AUXHIST22_OUTNAME"; then echo "auxhist22_outname=\"${NL_AUXHIST22_OUTNAME}\","	if test ! -z "$NL_AUXHIST22_OUTNAME"; then echo "auxhist22_outname=\"${NL_AUXHIST22_OUTNAME}\","
if test ! -z "$NL_AUXHIST22_INTERVAL_Y"; then echo "auxhist22_interval_y=${NL_AUXHIST22_INTERVAL	if test ! -z "$NL_AUXHIST22_INTERVAL_Y"; then echo "auxhist22_interval_y=${NL_AUXHIST22_INTERVAL
if test ! -z "$NL_AUXHIST22_INTERVAL_D"; then echo "auxhist22_interval_d=${NL_AUXHIST22_INTERVAL	if test ! -z "$NL_AUXHIST22_INTERVAL_D"; then echo "auxhist22_interval_d=${NL_AUXHIST22_INTERVAL
if test ! -z "$NL_AUXHIST22_INTERVAL_H"; then echo "auxhist22_interval_h=${NL_AUXHIST22_INTERVAL	if test ! -z "$NL_AUXHIST22_INTERVAL_H"; then echo "auxhist22_interval_h=${NL_AUXHIST22_INTERVAL
if test ! -z "$NL_AUXHIST22_INTERVAL_M"; then echo "auxhist22_interval_m=${NL_AUXHIST22_INTERVAL	if test ! -z "$NL_AUXHIST22_INTERVAL_M"; then echo "auxhist22_interval_m=${NL_AUXHIST22_INTERVAL
if test ! -z "$NL_AUXHIST22_INTERVAL_S"; then echo "auxhist22_interval_s=${NL_AUXHIST22_INTERVAL	if test ! -z "$NL_AUXHIST22_INTERVAL_S"; then echo "auxhist22_interval_s=${NL_AUXHIST22_INTERVAL
if test ! -z "$NL_AUXHIST22_INTERVAL"; then echo "auxhist22_interval=${NL_AUXHIST22_INTERVAL}," 	if test ! -z "$NL_AUXHIST22_INTERVAL"; then echo "auxhist22_interval=${NL_AUXHIST22_INTERVAL}," 
if test ! -z "$NL_AUXHIST22_BEGIN_Y"; then echo "auxhist22_begin_y=${NL_AUXHIST22_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST22_BEGIN_Y"; then echo "auxhist22_begin_y=${NL_AUXHIST22_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST22_BEGIN_D"; then echo "auxhist22_begin_d=${NL_AUXHIST22_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST22_BEGIN_D"; then echo "auxhist22_begin_d=${NL_AUXHIST22_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST22_BEGIN_H"; then echo "auxhist22_begin_h=${NL_AUXHIST22_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST22_BEGIN_H"; then echo "auxhist22_begin_h=${NL_AUXHIST22_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST22_BEGIN_M"; then echo "auxhist22_begin_m=${NL_AUXHIST22_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST22_BEGIN_M"; then echo "auxhist22_begin_m=${NL_AUXHIST22_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST22_BEGIN_S"; then echo "auxhist22_begin_s=${NL_AUXHIST22_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST22_BEGIN_S"; then echo "auxhist22_begin_s=${NL_AUXHIST22_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST22_BEGIN"; then echo "auxhist22_begin=${NL_AUXHIST22_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST22_BEGIN"; then echo "auxhist22_begin=${NL_AUXHIST22_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END_Y"; then echo "auxhist22_end_y=${NL_AUXHIST22_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST22_END_Y"; then echo "auxhist22_end_y=${NL_AUXHIST22_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END_D"; then echo "auxhist22_end_d=${NL_AUXHIST22_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST22_END_D"; then echo "auxhist22_end_d=${NL_AUXHIST22_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END_H"; then echo "auxhist22_end_h=${NL_AUXHIST22_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST22_END_H"; then echo "auxhist22_end_h=${NL_AUXHIST22_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END_M"; then echo "auxhist22_end_m=${NL_AUXHIST22_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST22_END_M"; then echo "auxhist22_end_m=${NL_AUXHIST22_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END_S"; then echo "auxhist22_end_s=${NL_AUXHIST22_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST22_END_S"; then echo "auxhist22_end_s=${NL_AUXHIST22_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST22_END"; then echo "auxhist22_end=${NL_AUXHIST22_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST22_END"; then echo "auxhist22_end=${NL_AUXHIST22_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST22"; then echo "io_form_auxhist22=${NL_IO_FORM_AUXHIST22}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST22"; then echo "io_form_auxhist22=${NL_IO_FORM_AUXHIST22}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST22"; then echo "frames_per_auxhist22=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST22"; then echo "frames_per_auxhist22=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST23_INNAME"; then echo "auxhist23_inname=\"${NL_AUXHIST23_INNAME}\"," >>	if test ! -z "$NL_AUXHIST23_INNAME"; then echo "auxhist23_inname=\"${NL_AUXHIST23_INNAME}\"," >>
if test ! -z "$NL_AUXHIST23_OUTNAME"; then echo "auxhist23_outname=\"${NL_AUXHIST23_OUTNAME}\","	if test ! -z "$NL_AUXHIST23_OUTNAME"; then echo "auxhist23_outname=\"${NL_AUXHIST23_OUTNAME}\","
if test ! -z "$NL_AUXHIST23_INTERVAL_Y"; then echo "auxhist23_interval_y=${NL_AUXHIST23_INTERVAL	if test ! -z "$NL_AUXHIST23_INTERVAL_Y"; then echo "auxhist23_interval_y=${NL_AUXHIST23_INTERVAL
if test ! -z "$NL_AUXHIST23_INTERVAL_D"; then echo "auxhist23_interval_d=${NL_AUXHIST23_INTERVAL	if test ! -z "$NL_AUXHIST23_INTERVAL_D"; then echo "auxhist23_interval_d=${NL_AUXHIST23_INTERVAL
if test ! -z "$NL_AUXHIST23_INTERVAL_H"; then echo "auxhist23_interval_h=${NL_AUXHIST23_INTERVAL	if test ! -z "$NL_AUXHIST23_INTERVAL_H"; then echo "auxhist23_interval_h=${NL_AUXHIST23_INTERVAL
if test ! -z "$NL_AUXHIST23_INTERVAL_M"; then echo "auxhist23_interval_m=${NL_AUXHIST23_INTERVAL	if test ! -z "$NL_AUXHIST23_INTERVAL_M"; then echo "auxhist23_interval_m=${NL_AUXHIST23_INTERVAL
if test ! -z "$NL_AUXHIST23_INTERVAL_S"; then echo "auxhist23_interval_s=${NL_AUXHIST23_INTERVAL	if test ! -z "$NL_AUXHIST23_INTERVAL_S"; then echo "auxhist23_interval_s=${NL_AUXHIST23_INTERVAL
if test ! -z "$NL_AUXHIST23_INTERVAL"; then echo "auxhist23_interval=${NL_AUXHIST23_INTERVAL}," 	if test ! -z "$NL_AUXHIST23_INTERVAL"; then echo "auxhist23_interval=${NL_AUXHIST23_INTERVAL}," 
if test ! -z "$NL_AUXHIST23_BEGIN_Y"; then echo "auxhist23_begin_y=${NL_AUXHIST23_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST23_BEGIN_Y"; then echo "auxhist23_begin_y=${NL_AUXHIST23_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST23_BEGIN_D"; then echo "auxhist23_begin_d=${NL_AUXHIST23_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST23_BEGIN_D"; then echo "auxhist23_begin_d=${NL_AUXHIST23_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST23_BEGIN_H"; then echo "auxhist23_begin_h=${NL_AUXHIST23_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST23_BEGIN_H"; then echo "auxhist23_begin_h=${NL_AUXHIST23_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST23_BEGIN_M"; then echo "auxhist23_begin_m=${NL_AUXHIST23_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST23_BEGIN_M"; then echo "auxhist23_begin_m=${NL_AUXHIST23_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST23_BEGIN_S"; then echo "auxhist23_begin_s=${NL_AUXHIST23_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST23_BEGIN_S"; then echo "auxhist23_begin_s=${NL_AUXHIST23_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST23_BEGIN"; then echo "auxhist23_begin=${NL_AUXHIST23_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST23_BEGIN"; then echo "auxhist23_begin=${NL_AUXHIST23_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END_Y"; then echo "auxhist23_end_y=${NL_AUXHIST23_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST23_END_Y"; then echo "auxhist23_end_y=${NL_AUXHIST23_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END_D"; then echo "auxhist23_end_d=${NL_AUXHIST23_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST23_END_D"; then echo "auxhist23_end_d=${NL_AUXHIST23_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END_H"; then echo "auxhist23_end_h=${NL_AUXHIST23_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST23_END_H"; then echo "auxhist23_end_h=${NL_AUXHIST23_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END_M"; then echo "auxhist23_end_m=${NL_AUXHIST23_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST23_END_M"; then echo "auxhist23_end_m=${NL_AUXHIST23_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END_S"; then echo "auxhist23_end_s=${NL_AUXHIST23_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST23_END_S"; then echo "auxhist23_end_s=${NL_AUXHIST23_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST23_END"; then echo "auxhist23_end=${NL_AUXHIST23_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST23_END"; then echo "auxhist23_end=${NL_AUXHIST23_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST23"; then echo "io_form_auxhist23=${NL_IO_FORM_AUXHIST23}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST23"; then echo "io_form_auxhist23=${NL_IO_FORM_AUXHIST23}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST23"; then echo "frames_per_auxhist23=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST23"; then echo "frames_per_auxhist23=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXHIST24_INNAME"; then echo "auxhist24_inname=\"${NL_AUXHIST24_INNAME}\"," >>	if test ! -z "$NL_AUXHIST24_INNAME"; then echo "auxhist24_inname=\"${NL_AUXHIST24_INNAME}\"," >>
if test ! -z "$NL_AUXHIST24_OUTNAME"; then echo "auxhist24_outname=\"${NL_AUXHIST24_OUTNAME}\","	if test ! -z "$NL_AUXHIST24_OUTNAME"; then echo "auxhist24_outname=\"${NL_AUXHIST24_OUTNAME}\","
if test ! -z "$NL_AUXHIST24_INTERVAL_Y"; then echo "auxhist24_interval_y=${NL_AUXHIST24_INTERVAL	if test ! -z "$NL_AUXHIST24_INTERVAL_Y"; then echo "auxhist24_interval_y=${NL_AUXHIST24_INTERVAL
if test ! -z "$NL_AUXHIST24_INTERVAL_D"; then echo "auxhist24_interval_d=${NL_AUXHIST24_INTERVAL	if test ! -z "$NL_AUXHIST24_INTERVAL_D"; then echo "auxhist24_interval_d=${NL_AUXHIST24_INTERVAL
if test ! -z "$NL_AUXHIST24_INTERVAL_H"; then echo "auxhist24_interval_h=${NL_AUXHIST24_INTERVAL	if test ! -z "$NL_AUXHIST24_INTERVAL_H"; then echo "auxhist24_interval_h=${NL_AUXHIST24_INTERVAL
if test ! -z "$NL_AUXHIST24_INTERVAL_M"; then echo "auxhist24_interval_m=${NL_AUXHIST24_INTERVAL	if test ! -z "$NL_AUXHIST24_INTERVAL_M"; then echo "auxhist24_interval_m=${NL_AUXHIST24_INTERVAL
if test ! -z "$NL_AUXHIST24_INTERVAL_S"; then echo "auxhist24_interval_s=${NL_AUXHIST24_INTERVAL	if test ! -z "$NL_AUXHIST24_INTERVAL_S"; then echo "auxhist24_interval_s=${NL_AUXHIST24_INTERVAL
if test ! -z "$NL_AUXHIST24_INTERVAL"; then echo "auxhist24_interval=${NL_AUXHIST24_INTERVAL}," 	if test ! -z "$NL_AUXHIST24_INTERVAL"; then echo "auxhist24_interval=${NL_AUXHIST24_INTERVAL}," 
if test ! -z "$NL_AUXHIST24_BEGIN_Y"; then echo "auxhist24_begin_y=${NL_AUXHIST24_BEGIN_Y}," >> 	if test ! -z "$NL_AUXHIST24_BEGIN_Y"; then echo "auxhist24_begin_y=${NL_AUXHIST24_BEGIN_Y}," >> 
if test ! -z "$NL_AUXHIST24_BEGIN_D"; then echo "auxhist24_begin_d=${NL_AUXHIST24_BEGIN_D}," >> 	if test ! -z "$NL_AUXHIST24_BEGIN_D"; then echo "auxhist24_begin_d=${NL_AUXHIST24_BEGIN_D}," >> 
if test ! -z "$NL_AUXHIST24_BEGIN_H"; then echo "auxhist24_begin_h=${NL_AUXHIST24_BEGIN_H}," >> 	if test ! -z "$NL_AUXHIST24_BEGIN_H"; then echo "auxhist24_begin_h=${NL_AUXHIST24_BEGIN_H}," >> 
if test ! -z "$NL_AUXHIST24_BEGIN_M"; then echo "auxhist24_begin_m=${NL_AUXHIST24_BEGIN_M}," >> 	if test ! -z "$NL_AUXHIST24_BEGIN_M"; then echo "auxhist24_begin_m=${NL_AUXHIST24_BEGIN_M}," >> 
if test ! -z "$NL_AUXHIST24_BEGIN_S"; then echo "auxhist24_begin_s=${NL_AUXHIST24_BEGIN_S}," >> 	if test ! -z "$NL_AUXHIST24_BEGIN_S"; then echo "auxhist24_begin_s=${NL_AUXHIST24_BEGIN_S}," >> 
if test ! -z "$NL_AUXHIST24_BEGIN"; then echo "auxhist24_begin=${NL_AUXHIST24_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXHIST24_BEGIN"; then echo "auxhist24_begin=${NL_AUXHIST24_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END_Y"; then echo "auxhist24_end_y=${NL_AUXHIST24_END_Y}," >> $FILE;	if test ! -z "$NL_AUXHIST24_END_Y"; then echo "auxhist24_end_y=${NL_AUXHIST24_END_Y}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END_D"; then echo "auxhist24_end_d=${NL_AUXHIST24_END_D}," >> $FILE;	if test ! -z "$NL_AUXHIST24_END_D"; then echo "auxhist24_end_d=${NL_AUXHIST24_END_D}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END_H"; then echo "auxhist24_end_h=${NL_AUXHIST24_END_H}," >> $FILE;	if test ! -z "$NL_AUXHIST24_END_H"; then echo "auxhist24_end_h=${NL_AUXHIST24_END_H}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END_M"; then echo "auxhist24_end_m=${NL_AUXHIST24_END_M}," >> $FILE;	if test ! -z "$NL_AUXHIST24_END_M"; then echo "auxhist24_end_m=${NL_AUXHIST24_END_M}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END_S"; then echo "auxhist24_end_s=${NL_AUXHIST24_END_S}," >> $FILE;	if test ! -z "$NL_AUXHIST24_END_S"; then echo "auxhist24_end_s=${NL_AUXHIST24_END_S}," >> $FILE;
if test ! -z "$NL_AUXHIST24_END"; then echo "auxhist24_end=${NL_AUXHIST24_END}," >> $FILE;fi		if test ! -z "$NL_AUXHIST24_END"; then echo "auxhist24_end=${NL_AUXHIST24_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXHIST24"; then echo "io_form_auxhist24=${NL_IO_FORM_AUXHIST24}," >> 	if test ! -z "$NL_IO_FORM_AUXHIST24"; then echo "io_form_auxhist24=${NL_IO_FORM_AUXHIST24}," >> 
if test ! -z "$NL_FRAMES_PER_AUXHIST24"; then echo "frames_per_auxhist24=${NL_FRAMES_PER_AUXHIST	if test ! -z "$NL_FRAMES_PER_AUXHIST24"; then echo "frames_per_auxhist24=${NL_FRAMES_PER_AUXHIST
if test ! -z "$NL_AUXINPUT1_OUTNAME"; then echo "auxinput1_outname=\"${NL_AUXINPUT1_OUTNAME}\","	if test ! -z "$NL_AUXINPUT1_OUTNAME"; then echo "auxinput1_outname=\"${NL_AUXINPUT1_OUTNAME}\","
if test ! -z "$NL_AUXINPUT1_INTERVAL_Y"; then echo "auxinput1_interval_y=${NL_AUXINPUT1_INTERVAL	if test ! -z "$NL_AUXINPUT1_INTERVAL_Y"; then echo "auxinput1_interval_y=${NL_AUXINPUT1_INTERVAL
if test ! -z "$NL_AUXINPUT1_INTERVAL_D"; then echo "auxinput1_interval_d=${NL_AUXINPUT1_INTERVAL	if test ! -z "$NL_AUXINPUT1_INTERVAL_D"; then echo "auxinput1_interval_d=${NL_AUXINPUT1_INTERVAL
if test ! -z "$NL_AUXINPUT1_INTERVAL_H"; then echo "auxinput1_interval_h=${NL_AUXINPUT1_INTERVAL	if test ! -z "$NL_AUXINPUT1_INTERVAL_H"; then echo "auxinput1_interval_h=${NL_AUXINPUT1_INTERVAL
if test ! -z "$NL_AUXINPUT1_INTERVAL_M"; then echo "auxinput1_interval_m=${NL_AUXINPUT1_INTERVAL	if test ! -z "$NL_AUXINPUT1_INTERVAL_M"; then echo "auxinput1_interval_m=${NL_AUXINPUT1_INTERVAL
if test ! -z "$NL_AUXINPUT1_INTERVAL_S"; then echo "auxinput1_interval_s=${NL_AUXINPUT1_INTERVAL	if test ! -z "$NL_AUXINPUT1_INTERVAL_S"; then echo "auxinput1_interval_s=${NL_AUXINPUT1_INTERVAL
if test ! -z "$NL_AUXINPUT1_INTERVAL"; then echo "auxinput1_interval=${NL_AUXINPUT1_INTERVAL}," 	if test ! -z "$NL_AUXINPUT1_INTERVAL"; then echo "auxinput1_interval=${NL_AUXINPUT1_INTERVAL}," 
if test ! -z "$NL_AUXINPUT1_BEGIN_Y"; then echo "auxinput1_begin_y=${NL_AUXINPUT1_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT1_BEGIN_Y"; then echo "auxinput1_begin_y=${NL_AUXINPUT1_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT1_BEGIN_D"; then echo "auxinput1_begin_d=${NL_AUXINPUT1_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT1_BEGIN_D"; then echo "auxinput1_begin_d=${NL_AUXINPUT1_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT1_BEGIN_H"; then echo "auxinput1_begin_h=${NL_AUXINPUT1_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT1_BEGIN_H"; then echo "auxinput1_begin_h=${NL_AUXINPUT1_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT1_BEGIN_M"; then echo "auxinput1_begin_m=${NL_AUXINPUT1_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT1_BEGIN_M"; then echo "auxinput1_begin_m=${NL_AUXINPUT1_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT1_BEGIN_S"; then echo "auxinput1_begin_s=${NL_AUXINPUT1_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT1_BEGIN_S"; then echo "auxinput1_begin_s=${NL_AUXINPUT1_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT1_BEGIN"; then echo "auxinput1_begin=${NL_AUXINPUT1_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_BEGIN"; then echo "auxinput1_begin=${NL_AUXINPUT1_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END_Y"; then echo "auxinput1_end_y=${NL_AUXINPUT1_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_END_Y"; then echo "auxinput1_end_y=${NL_AUXINPUT1_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END_D"; then echo "auxinput1_end_d=${NL_AUXINPUT1_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_END_D"; then echo "auxinput1_end_d=${NL_AUXINPUT1_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END_H"; then echo "auxinput1_end_h=${NL_AUXINPUT1_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_END_H"; then echo "auxinput1_end_h=${NL_AUXINPUT1_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END_M"; then echo "auxinput1_end_m=${NL_AUXINPUT1_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_END_M"; then echo "auxinput1_end_m=${NL_AUXINPUT1_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END_S"; then echo "auxinput1_end_s=${NL_AUXINPUT1_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT1_END_S"; then echo "auxinput1_end_s=${NL_AUXINPUT1_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT1_END"; then echo "auxinput1_end=${NL_AUXINPUT1_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT1_END"; then echo "auxinput1_end=${NL_AUXINPUT1_END}," >> $FILE;fi
if test ! -z "$NL_FRAMES_PER_AUXINPUT1"; then echo "frames_per_auxinput1=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT1"; then echo "frames_per_auxinput1=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT2_INNAME"; then echo "auxinput2_inname=\"${NL_AUXINPUT2_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT2_INNAME"; then echo "auxinput2_inname=\"${NL_AUXINPUT2_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT2_OUTNAME"; then echo "auxinput2_outname=\"${NL_AUXINPUT2_OUTNAME}\","	if test ! -z "$NL_AUXINPUT2_OUTNAME"; then echo "auxinput2_outname=\"${NL_AUXINPUT2_OUTNAME}\","
if test ! -z "$NL_AUXINPUT2_INTERVAL_Y"; then echo "auxinput2_interval_y=${NL_AUXINPUT2_INTERVAL	if test ! -z "$NL_AUXINPUT2_INTERVAL_Y"; then echo "auxinput2_interval_y=${NL_AUXINPUT2_INTERVAL
if test ! -z "$NL_AUXINPUT2_INTERVAL_D"; then echo "auxinput2_interval_d=${NL_AUXINPUT2_INTERVAL	if test ! -z "$NL_AUXINPUT2_INTERVAL_D"; then echo "auxinput2_interval_d=${NL_AUXINPUT2_INTERVAL
if test ! -z "$NL_AUXINPUT2_INTERVAL_H"; then echo "auxinput2_interval_h=${NL_AUXINPUT2_INTERVAL	if test ! -z "$NL_AUXINPUT2_INTERVAL_H"; then echo "auxinput2_interval_h=${NL_AUXINPUT2_INTERVAL
if test ! -z "$NL_AUXINPUT2_INTERVAL_M"; then echo "auxinput2_interval_m=${NL_AUXINPUT2_INTERVAL	if test ! -z "$NL_AUXINPUT2_INTERVAL_M"; then echo "auxinput2_interval_m=${NL_AUXINPUT2_INTERVAL
if test ! -z "$NL_AUXINPUT2_INTERVAL_S"; then echo "auxinput2_interval_s=${NL_AUXINPUT2_INTERVAL	if test ! -z "$NL_AUXINPUT2_INTERVAL_S"; then echo "auxinput2_interval_s=${NL_AUXINPUT2_INTERVAL
if test ! -z "$NL_AUXINPUT2_INTERVAL"; then echo "auxinput2_interval=${NL_AUXINPUT2_INTERVAL}," 	if test ! -z "$NL_AUXINPUT2_INTERVAL"; then echo "auxinput2_interval=${NL_AUXINPUT2_INTERVAL}," 
if test ! -z "$NL_AUXINPUT2_BEGIN_Y"; then echo "auxinput2_begin_y=${NL_AUXINPUT2_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT2_BEGIN_Y"; then echo "auxinput2_begin_y=${NL_AUXINPUT2_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT2_BEGIN_D"; then echo "auxinput2_begin_d=${NL_AUXINPUT2_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT2_BEGIN_D"; then echo "auxinput2_begin_d=${NL_AUXINPUT2_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT2_BEGIN_H"; then echo "auxinput2_begin_h=${NL_AUXINPUT2_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT2_BEGIN_H"; then echo "auxinput2_begin_h=${NL_AUXINPUT2_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT2_BEGIN_M"; then echo "auxinput2_begin_m=${NL_AUXINPUT2_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT2_BEGIN_M"; then echo "auxinput2_begin_m=${NL_AUXINPUT2_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT2_BEGIN_S"; then echo "auxinput2_begin_s=${NL_AUXINPUT2_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT2_BEGIN_S"; then echo "auxinput2_begin_s=${NL_AUXINPUT2_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT2_BEGIN"; then echo "auxinput2_begin=${NL_AUXINPUT2_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_BEGIN"; then echo "auxinput2_begin=${NL_AUXINPUT2_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END_Y"; then echo "auxinput2_end_y=${NL_AUXINPUT2_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_END_Y"; then echo "auxinput2_end_y=${NL_AUXINPUT2_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END_D"; then echo "auxinput2_end_d=${NL_AUXINPUT2_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_END_D"; then echo "auxinput2_end_d=${NL_AUXINPUT2_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END_H"; then echo "auxinput2_end_h=${NL_AUXINPUT2_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_END_H"; then echo "auxinput2_end_h=${NL_AUXINPUT2_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END_M"; then echo "auxinput2_end_m=${NL_AUXINPUT2_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_END_M"; then echo "auxinput2_end_m=${NL_AUXINPUT2_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END_S"; then echo "auxinput2_end_s=${NL_AUXINPUT2_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT2_END_S"; then echo "auxinput2_end_s=${NL_AUXINPUT2_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT2_END"; then echo "auxinput2_end=${NL_AUXINPUT2_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT2_END"; then echo "auxinput2_end=${NL_AUXINPUT2_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT2"; then echo "io_form_auxinput2=${NL_IO_FORM_AUXINPUT2}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT2"; then echo "io_form_auxinput2=${NL_IO_FORM_AUXINPUT2}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT2"; then echo "frames_per_auxinput2=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT2"; then echo "frames_per_auxinput2=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT3_INNAME"; then echo "auxinput3_inname=\"${NL_AUXINPUT3_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT3_INNAME"; then echo "auxinput3_inname=\"${NL_AUXINPUT3_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT3_OUTNAME"; then echo "auxinput3_outname=\"${NL_AUXINPUT3_OUTNAME}\","	if test ! -z "$NL_AUXINPUT3_OUTNAME"; then echo "auxinput3_outname=\"${NL_AUXINPUT3_OUTNAME}\","
if test ! -z "$NL_AUXINPUT3_INTERVAL_Y"; then echo "auxinput3_interval_y=${NL_AUXINPUT3_INTERVAL	if test ! -z "$NL_AUXINPUT3_INTERVAL_Y"; then echo "auxinput3_interval_y=${NL_AUXINPUT3_INTERVAL
if test ! -z "$NL_AUXINPUT3_INTERVAL_D"; then echo "auxinput3_interval_d=${NL_AUXINPUT3_INTERVAL	if test ! -z "$NL_AUXINPUT3_INTERVAL_D"; then echo "auxinput3_interval_d=${NL_AUXINPUT3_INTERVAL
if test ! -z "$NL_AUXINPUT3_INTERVAL_H"; then echo "auxinput3_interval_h=${NL_AUXINPUT3_INTERVAL	if test ! -z "$NL_AUXINPUT3_INTERVAL_H"; then echo "auxinput3_interval_h=${NL_AUXINPUT3_INTERVAL
if test ! -z "$NL_AUXINPUT3_INTERVAL_M"; then echo "auxinput3_interval_m=${NL_AUXINPUT3_INTERVAL	if test ! -z "$NL_AUXINPUT3_INTERVAL_M"; then echo "auxinput3_interval_m=${NL_AUXINPUT3_INTERVAL
if test ! -z "$NL_AUXINPUT3_INTERVAL_S"; then echo "auxinput3_interval_s=${NL_AUXINPUT3_INTERVAL	if test ! -z "$NL_AUXINPUT3_INTERVAL_S"; then echo "auxinput3_interval_s=${NL_AUXINPUT3_INTERVAL
if test ! -z "$NL_AUXINPUT3_INTERVAL"; then echo "auxinput3_interval=${NL_AUXINPUT3_INTERVAL}," 	if test ! -z "$NL_AUXINPUT3_INTERVAL"; then echo "auxinput3_interval=${NL_AUXINPUT3_INTERVAL}," 
if test ! -z "$NL_AUXINPUT3_BEGIN_Y"; then echo "auxinput3_begin_y=${NL_AUXINPUT3_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT3_BEGIN_Y"; then echo "auxinput3_begin_y=${NL_AUXINPUT3_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT3_BEGIN_D"; then echo "auxinput3_begin_d=${NL_AUXINPUT3_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT3_BEGIN_D"; then echo "auxinput3_begin_d=${NL_AUXINPUT3_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT3_BEGIN_H"; then echo "auxinput3_begin_h=${NL_AUXINPUT3_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT3_BEGIN_H"; then echo "auxinput3_begin_h=${NL_AUXINPUT3_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT3_BEGIN_M"; then echo "auxinput3_begin_m=${NL_AUXINPUT3_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT3_BEGIN_M"; then echo "auxinput3_begin_m=${NL_AUXINPUT3_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT3_BEGIN_S"; then echo "auxinput3_begin_s=${NL_AUXINPUT3_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT3_BEGIN_S"; then echo "auxinput3_begin_s=${NL_AUXINPUT3_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT3_BEGIN"; then echo "auxinput3_begin=${NL_AUXINPUT3_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_BEGIN"; then echo "auxinput3_begin=${NL_AUXINPUT3_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END_Y"; then echo "auxinput3_end_y=${NL_AUXINPUT3_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_END_Y"; then echo "auxinput3_end_y=${NL_AUXINPUT3_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END_D"; then echo "auxinput3_end_d=${NL_AUXINPUT3_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_END_D"; then echo "auxinput3_end_d=${NL_AUXINPUT3_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END_H"; then echo "auxinput3_end_h=${NL_AUXINPUT3_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_END_H"; then echo "auxinput3_end_h=${NL_AUXINPUT3_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END_M"; then echo "auxinput3_end_m=${NL_AUXINPUT3_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_END_M"; then echo "auxinput3_end_m=${NL_AUXINPUT3_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END_S"; then echo "auxinput3_end_s=${NL_AUXINPUT3_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT3_END_S"; then echo "auxinput3_end_s=${NL_AUXINPUT3_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT3_END"; then echo "auxinput3_end=${NL_AUXINPUT3_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT3_END"; then echo "auxinput3_end=${NL_AUXINPUT3_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT3"; then echo "io_form_auxinput3=${NL_IO_FORM_AUXINPUT3}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT3"; then echo "io_form_auxinput3=${NL_IO_FORM_AUXINPUT3}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT3"; then echo "frames_per_auxinput3=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT3"; then echo "frames_per_auxinput3=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT4_INNAME"; then echo "auxinput4_inname=\"${NL_AUXINPUT4_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT4_INNAME"; then echo "auxinput4_inname=\"${NL_AUXINPUT4_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT4_OUTNAME"; then echo "auxinput4_outname=\"${NL_AUXINPUT4_OUTNAME}\","	if test ! -z "$NL_AUXINPUT4_OUTNAME"; then echo "auxinput4_outname=\"${NL_AUXINPUT4_OUTNAME}\","
if test ! -z "$NL_AUXINPUT4_INTERVAL_Y"; then echo "auxinput4_interval_y=${NL_AUXINPUT4_INTERVAL	if test ! -z "$NL_AUXINPUT4_INTERVAL_Y"; then echo "auxinput4_interval_y=${NL_AUXINPUT4_INTERVAL
if test ! -z "$NL_AUXINPUT4_INTERVAL_D"; then echo "auxinput4_interval_d=${NL_AUXINPUT4_INTERVAL	if test ! -z "$NL_AUXINPUT4_INTERVAL_D"; then echo "auxinput4_interval_d=${NL_AUXINPUT4_INTERVAL
if test ! -z "$NL_AUXINPUT4_INTERVAL_H"; then echo "auxinput4_interval_h=${NL_AUXINPUT4_INTERVAL	if test ! -z "$NL_AUXINPUT4_INTERVAL_H"; then echo "auxinput4_interval_h=${NL_AUXINPUT4_INTERVAL
if test ! -z "$NL_AUXINPUT4_INTERVAL_M"; then echo "auxinput4_interval_m=${NL_AUXINPUT4_INTERVAL	if test ! -z "$NL_AUXINPUT4_INTERVAL_M"; then echo "auxinput4_interval_m=${NL_AUXINPUT4_INTERVAL
if test ! -z "$NL_AUXINPUT4_INTERVAL_S"; then echo "auxinput4_interval_s=${NL_AUXINPUT4_INTERVAL	if test ! -z "$NL_AUXINPUT4_INTERVAL_S"; then echo "auxinput4_interval_s=${NL_AUXINPUT4_INTERVAL
if test ! -z "$NL_AUXINPUT4_INTERVAL"; then echo "auxinput4_interval=${NL_AUXINPUT4_INTERVAL}," 	if test ! -z "$NL_AUXINPUT4_INTERVAL"; then echo "auxinput4_interval=${NL_AUXINPUT4_INTERVAL}," 
if test ! -z "$NL_AUXINPUT4_BEGIN_Y"; then echo "auxinput4_begin_y=${NL_AUXINPUT4_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT4_BEGIN_Y"; then echo "auxinput4_begin_y=${NL_AUXINPUT4_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT4_BEGIN_D"; then echo "auxinput4_begin_d=${NL_AUXINPUT4_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT4_BEGIN_D"; then echo "auxinput4_begin_d=${NL_AUXINPUT4_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT4_BEGIN_H"; then echo "auxinput4_begin_h=${NL_AUXINPUT4_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT4_BEGIN_H"; then echo "auxinput4_begin_h=${NL_AUXINPUT4_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT4_BEGIN_M"; then echo "auxinput4_begin_m=${NL_AUXINPUT4_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT4_BEGIN_M"; then echo "auxinput4_begin_m=${NL_AUXINPUT4_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT4_BEGIN_S"; then echo "auxinput4_begin_s=${NL_AUXINPUT4_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT4_BEGIN_S"; then echo "auxinput4_begin_s=${NL_AUXINPUT4_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT4_BEGIN"; then echo "auxinput4_begin=${NL_AUXINPUT4_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_BEGIN"; then echo "auxinput4_begin=${NL_AUXINPUT4_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END_Y"; then echo "auxinput4_end_y=${NL_AUXINPUT4_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_END_Y"; then echo "auxinput4_end_y=${NL_AUXINPUT4_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END_D"; then echo "auxinput4_end_d=${NL_AUXINPUT4_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_END_D"; then echo "auxinput4_end_d=${NL_AUXINPUT4_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END_H"; then echo "auxinput4_end_h=${NL_AUXINPUT4_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_END_H"; then echo "auxinput4_end_h=${NL_AUXINPUT4_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END_M"; then echo "auxinput4_end_m=${NL_AUXINPUT4_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_END_M"; then echo "auxinput4_end_m=${NL_AUXINPUT4_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END_S"; then echo "auxinput4_end_s=${NL_AUXINPUT4_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT4_END_S"; then echo "auxinput4_end_s=${NL_AUXINPUT4_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT4_END"; then echo "auxinput4_end=${NL_AUXINPUT4_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT4_END"; then echo "auxinput4_end=${NL_AUXINPUT4_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT4"; then echo "io_form_auxinput4=${NL_IO_FORM_AUXINPUT4}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT4"; then echo "io_form_auxinput4=${NL_IO_FORM_AUXINPUT4}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT4"; then echo "frames_per_auxinput4=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT4"; then echo "frames_per_auxinput4=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT5_INNAME"; then echo "auxinput5_inname=\"${NL_AUXINPUT5_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT5_INNAME"; then echo "auxinput5_inname=\"${NL_AUXINPUT5_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT5_OUTNAME"; then echo "auxinput5_outname=\"${NL_AUXINPUT5_OUTNAME}\","	if test ! -z "$NL_AUXINPUT5_OUTNAME"; then echo "auxinput5_outname=\"${NL_AUXINPUT5_OUTNAME}\","
if test ! -z "$NL_AUXINPUT5_INTERVAL_Y"; then echo "auxinput5_interval_y=${NL_AUXINPUT5_INTERVAL	if test ! -z "$NL_AUXINPUT5_INTERVAL_Y"; then echo "auxinput5_interval_y=${NL_AUXINPUT5_INTERVAL
if test ! -z "$NL_AUXINPUT5_INTERVAL_D"; then echo "auxinput5_interval_d=${NL_AUXINPUT5_INTERVAL	if test ! -z "$NL_AUXINPUT5_INTERVAL_D"; then echo "auxinput5_interval_d=${NL_AUXINPUT5_INTERVAL
if test ! -z "$NL_AUXINPUT5_INTERVAL_H"; then echo "auxinput5_interval_h=${NL_AUXINPUT5_INTERVAL	if test ! -z "$NL_AUXINPUT5_INTERVAL_H"; then echo "auxinput5_interval_h=${NL_AUXINPUT5_INTERVAL
if test ! -z "$NL_AUXINPUT5_INTERVAL_M"; then echo "auxinput5_interval_m=${NL_AUXINPUT5_INTERVAL	if test ! -z "$NL_AUXINPUT5_INTERVAL_M"; then echo "auxinput5_interval_m=${NL_AUXINPUT5_INTERVAL
if test ! -z "$NL_AUXINPUT5_INTERVAL_S"; then echo "auxinput5_interval_s=${NL_AUXINPUT5_INTERVAL	if test ! -z "$NL_AUXINPUT5_INTERVAL_S"; then echo "auxinput5_interval_s=${NL_AUXINPUT5_INTERVAL
if test ! -z "$NL_AUXINPUT5_INTERVAL"; then echo "auxinput5_interval=${NL_AUXINPUT5_INTERVAL}," 	if test ! -z "$NL_AUXINPUT5_INTERVAL"; then echo "auxinput5_interval=${NL_AUXINPUT5_INTERVAL}," 
if test ! -z "$NL_AUXINPUT5_BEGIN_Y"; then echo "auxinput5_begin_y=${NL_AUXINPUT5_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT5_BEGIN_Y"; then echo "auxinput5_begin_y=${NL_AUXINPUT5_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT5_BEGIN_D"; then echo "auxinput5_begin_d=${NL_AUXINPUT5_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT5_BEGIN_D"; then echo "auxinput5_begin_d=${NL_AUXINPUT5_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT5_BEGIN_H"; then echo "auxinput5_begin_h=${NL_AUXINPUT5_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT5_BEGIN_H"; then echo "auxinput5_begin_h=${NL_AUXINPUT5_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT5_BEGIN_M"; then echo "auxinput5_begin_m=${NL_AUXINPUT5_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT5_BEGIN_M"; then echo "auxinput5_begin_m=${NL_AUXINPUT5_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT5_BEGIN_S"; then echo "auxinput5_begin_s=${NL_AUXINPUT5_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT5_BEGIN_S"; then echo "auxinput5_begin_s=${NL_AUXINPUT5_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT5_BEGIN"; then echo "auxinput5_begin=${NL_AUXINPUT5_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_BEGIN"; then echo "auxinput5_begin=${NL_AUXINPUT5_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END_Y"; then echo "auxinput5_end_y=${NL_AUXINPUT5_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_END_Y"; then echo "auxinput5_end_y=${NL_AUXINPUT5_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END_D"; then echo "auxinput5_end_d=${NL_AUXINPUT5_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_END_D"; then echo "auxinput5_end_d=${NL_AUXINPUT5_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END_H"; then echo "auxinput5_end_h=${NL_AUXINPUT5_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_END_H"; then echo "auxinput5_end_h=${NL_AUXINPUT5_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END_M"; then echo "auxinput5_end_m=${NL_AUXINPUT5_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_END_M"; then echo "auxinput5_end_m=${NL_AUXINPUT5_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END_S"; then echo "auxinput5_end_s=${NL_AUXINPUT5_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT5_END_S"; then echo "auxinput5_end_s=${NL_AUXINPUT5_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT5_END"; then echo "auxinput5_end=${NL_AUXINPUT5_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT5_END"; then echo "auxinput5_end=${NL_AUXINPUT5_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT5"; then echo "io_form_auxinput5=${NL_IO_FORM_AUXINPUT5}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT5"; then echo "io_form_auxinput5=${NL_IO_FORM_AUXINPUT5}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT5"; then echo "frames_per_auxinput5=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT5"; then echo "frames_per_auxinput5=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT6_INNAME"; then echo "auxinput6_inname=\"${NL_AUXINPUT6_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT6_INNAME"; then echo "auxinput6_inname=\"${NL_AUXINPUT6_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT6_OUTNAME"; then echo "auxinput6_outname=\"${NL_AUXINPUT6_OUTNAME}\","	if test ! -z "$NL_AUXINPUT6_OUTNAME"; then echo "auxinput6_outname=\"${NL_AUXINPUT6_OUTNAME}\","
if test ! -z "$NL_AUXINPUT6_INTERVAL_Y"; then echo "auxinput6_interval_y=${NL_AUXINPUT6_INTERVAL	if test ! -z "$NL_AUXINPUT6_INTERVAL_Y"; then echo "auxinput6_interval_y=${NL_AUXINPUT6_INTERVAL
if test ! -z "$NL_AUXINPUT6_INTERVAL_D"; then echo "auxinput6_interval_d=${NL_AUXINPUT6_INTERVAL	if test ! -z "$NL_AUXINPUT6_INTERVAL_D"; then echo "auxinput6_interval_d=${NL_AUXINPUT6_INTERVAL
if test ! -z "$NL_AUXINPUT6_INTERVAL_H"; then echo "auxinput6_interval_h=${NL_AUXINPUT6_INTERVAL	if test ! -z "$NL_AUXINPUT6_INTERVAL_H"; then echo "auxinput6_interval_h=${NL_AUXINPUT6_INTERVAL
if test ! -z "$NL_AUXINPUT6_INTERVAL_M"; then echo "auxinput6_interval_m=${NL_AUXINPUT6_INTERVAL	if test ! -z "$NL_AUXINPUT6_INTERVAL_M"; then echo "auxinput6_interval_m=${NL_AUXINPUT6_INTERVAL
if test ! -z "$NL_AUXINPUT6_INTERVAL_S"; then echo "auxinput6_interval_s=${NL_AUXINPUT6_INTERVAL	if test ! -z "$NL_AUXINPUT6_INTERVAL_S"; then echo "auxinput6_interval_s=${NL_AUXINPUT6_INTERVAL
if test ! -z "$NL_AUXINPUT6_INTERVAL"; then echo "auxinput6_interval=${NL_AUXINPUT6_INTERVAL}," 	if test ! -z "$NL_AUXINPUT6_INTERVAL"; then echo "auxinput6_interval=${NL_AUXINPUT6_INTERVAL}," 
if test ! -z "$NL_AUXINPUT6_BEGIN_Y"; then echo "auxinput6_begin_y=${NL_AUXINPUT6_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT6_BEGIN_Y"; then echo "auxinput6_begin_y=${NL_AUXINPUT6_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT6_BEGIN_D"; then echo "auxinput6_begin_d=${NL_AUXINPUT6_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT6_BEGIN_D"; then echo "auxinput6_begin_d=${NL_AUXINPUT6_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT6_BEGIN_H"; then echo "auxinput6_begin_h=${NL_AUXINPUT6_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT6_BEGIN_H"; then echo "auxinput6_begin_h=${NL_AUXINPUT6_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT6_BEGIN_M"; then echo "auxinput6_begin_m=${NL_AUXINPUT6_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT6_BEGIN_M"; then echo "auxinput6_begin_m=${NL_AUXINPUT6_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT6_BEGIN_S"; then echo "auxinput6_begin_s=${NL_AUXINPUT6_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT6_BEGIN_S"; then echo "auxinput6_begin_s=${NL_AUXINPUT6_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT6_BEGIN"; then echo "auxinput6_begin=${NL_AUXINPUT6_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_BEGIN"; then echo "auxinput6_begin=${NL_AUXINPUT6_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END_Y"; then echo "auxinput6_end_y=${NL_AUXINPUT6_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_END_Y"; then echo "auxinput6_end_y=${NL_AUXINPUT6_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END_D"; then echo "auxinput6_end_d=${NL_AUXINPUT6_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_END_D"; then echo "auxinput6_end_d=${NL_AUXINPUT6_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END_H"; then echo "auxinput6_end_h=${NL_AUXINPUT6_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_END_H"; then echo "auxinput6_end_h=${NL_AUXINPUT6_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END_M"; then echo "auxinput6_end_m=${NL_AUXINPUT6_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_END_M"; then echo "auxinput6_end_m=${NL_AUXINPUT6_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END_S"; then echo "auxinput6_end_s=${NL_AUXINPUT6_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT6_END_S"; then echo "auxinput6_end_s=${NL_AUXINPUT6_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT6_END"; then echo "auxinput6_end=${NL_AUXINPUT6_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT6_END"; then echo "auxinput6_end=${NL_AUXINPUT6_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT6"; then echo "io_form_auxinput6=${NL_IO_FORM_AUXINPUT6}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT6"; then echo "io_form_auxinput6=${NL_IO_FORM_AUXINPUT6}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT6"; then echo "frames_per_auxinput6=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT6"; then echo "frames_per_auxinput6=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT7_INNAME"; then echo "auxinput7_inname=\"${NL_AUXINPUT7_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT7_INNAME"; then echo "auxinput7_inname=\"${NL_AUXINPUT7_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT7_OUTNAME"; then echo "auxinput7_outname=\"${NL_AUXINPUT7_OUTNAME}\","	if test ! -z "$NL_AUXINPUT7_OUTNAME"; then echo "auxinput7_outname=\"${NL_AUXINPUT7_OUTNAME}\","
if test ! -z "$NL_AUXINPUT7_INTERVAL_Y"; then echo "auxinput7_interval_y=${NL_AUXINPUT7_INTERVAL	if test ! -z "$NL_AUXINPUT7_INTERVAL_Y"; then echo "auxinput7_interval_y=${NL_AUXINPUT7_INTERVAL
if test ! -z "$NL_AUXINPUT7_INTERVAL_D"; then echo "auxinput7_interval_d=${NL_AUXINPUT7_INTERVAL	if test ! -z "$NL_AUXINPUT7_INTERVAL_D"; then echo "auxinput7_interval_d=${NL_AUXINPUT7_INTERVAL
if test ! -z "$NL_AUXINPUT7_INTERVAL_H"; then echo "auxinput7_interval_h=${NL_AUXINPUT7_INTERVAL	if test ! -z "$NL_AUXINPUT7_INTERVAL_H"; then echo "auxinput7_interval_h=${NL_AUXINPUT7_INTERVAL
if test ! -z "$NL_AUXINPUT7_INTERVAL_M"; then echo "auxinput7_interval_m=${NL_AUXINPUT7_INTERVAL	if test ! -z "$NL_AUXINPUT7_INTERVAL_M"; then echo "auxinput7_interval_m=${NL_AUXINPUT7_INTERVAL
if test ! -z "$NL_AUXINPUT7_INTERVAL_S"; then echo "auxinput7_interval_s=${NL_AUXINPUT7_INTERVAL	if test ! -z "$NL_AUXINPUT7_INTERVAL_S"; then echo "auxinput7_interval_s=${NL_AUXINPUT7_INTERVAL
if test ! -z "$NL_AUXINPUT7_INTERVAL"; then echo "auxinput7_interval=${NL_AUXINPUT7_INTERVAL}," 	if test ! -z "$NL_AUXINPUT7_INTERVAL"; then echo "auxinput7_interval=${NL_AUXINPUT7_INTERVAL}," 
if test ! -z "$NL_AUXINPUT7_BEGIN_Y"; then echo "auxinput7_begin_y=${NL_AUXINPUT7_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT7_BEGIN_Y"; then echo "auxinput7_begin_y=${NL_AUXINPUT7_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT7_BEGIN_D"; then echo "auxinput7_begin_d=${NL_AUXINPUT7_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT7_BEGIN_D"; then echo "auxinput7_begin_d=${NL_AUXINPUT7_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT7_BEGIN_H"; then echo "auxinput7_begin_h=${NL_AUXINPUT7_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT7_BEGIN_H"; then echo "auxinput7_begin_h=${NL_AUXINPUT7_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT7_BEGIN_M"; then echo "auxinput7_begin_m=${NL_AUXINPUT7_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT7_BEGIN_M"; then echo "auxinput7_begin_m=${NL_AUXINPUT7_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT7_BEGIN_S"; then echo "auxinput7_begin_s=${NL_AUXINPUT7_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT7_BEGIN_S"; then echo "auxinput7_begin_s=${NL_AUXINPUT7_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT7_BEGIN"; then echo "auxinput7_begin=${NL_AUXINPUT7_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_BEGIN"; then echo "auxinput7_begin=${NL_AUXINPUT7_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END_Y"; then echo "auxinput7_end_y=${NL_AUXINPUT7_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_END_Y"; then echo "auxinput7_end_y=${NL_AUXINPUT7_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END_D"; then echo "auxinput7_end_d=${NL_AUXINPUT7_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_END_D"; then echo "auxinput7_end_d=${NL_AUXINPUT7_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END_H"; then echo "auxinput7_end_h=${NL_AUXINPUT7_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_END_H"; then echo "auxinput7_end_h=${NL_AUXINPUT7_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END_M"; then echo "auxinput7_end_m=${NL_AUXINPUT7_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_END_M"; then echo "auxinput7_end_m=${NL_AUXINPUT7_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END_S"; then echo "auxinput7_end_s=${NL_AUXINPUT7_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT7_END_S"; then echo "auxinput7_end_s=${NL_AUXINPUT7_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT7_END"; then echo "auxinput7_end=${NL_AUXINPUT7_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT7_END"; then echo "auxinput7_end=${NL_AUXINPUT7_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT7"; then echo "io_form_auxinput7=${NL_IO_FORM_AUXINPUT7}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT7"; then echo "io_form_auxinput7=${NL_IO_FORM_AUXINPUT7}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT7"; then echo "frames_per_auxinput7=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT7"; then echo "frames_per_auxinput7=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT8_INNAME"; then echo "auxinput8_inname=\"${NL_AUXINPUT8_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT8_INNAME"; then echo "auxinput8_inname=\"${NL_AUXINPUT8_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT8_OUTNAME"; then echo "auxinput8_outname=\"${NL_AUXINPUT8_OUTNAME}\","	if test ! -z "$NL_AUXINPUT8_OUTNAME"; then echo "auxinput8_outname=\"${NL_AUXINPUT8_OUTNAME}\","
if test ! -z "$NL_AUXINPUT8_INTERVAL_Y"; then echo "auxinput8_interval_y=${NL_AUXINPUT8_INTERVAL	if test ! -z "$NL_AUXINPUT8_INTERVAL_Y"; then echo "auxinput8_interval_y=${NL_AUXINPUT8_INTERVAL
if test ! -z "$NL_AUXINPUT8_INTERVAL_D"; then echo "auxinput8_interval_d=${NL_AUXINPUT8_INTERVAL	if test ! -z "$NL_AUXINPUT8_INTERVAL_D"; then echo "auxinput8_interval_d=${NL_AUXINPUT8_INTERVAL
if test ! -z "$NL_AUXINPUT8_INTERVAL_H"; then echo "auxinput8_interval_h=${NL_AUXINPUT8_INTERVAL	if test ! -z "$NL_AUXINPUT8_INTERVAL_H"; then echo "auxinput8_interval_h=${NL_AUXINPUT8_INTERVAL
if test ! -z "$NL_AUXINPUT8_INTERVAL_M"; then echo "auxinput8_interval_m=${NL_AUXINPUT8_INTERVAL	if test ! -z "$NL_AUXINPUT8_INTERVAL_M"; then echo "auxinput8_interval_m=${NL_AUXINPUT8_INTERVAL
if test ! -z "$NL_AUXINPUT8_INTERVAL_S"; then echo "auxinput8_interval_s=${NL_AUXINPUT8_INTERVAL	if test ! -z "$NL_AUXINPUT8_INTERVAL_S"; then echo "auxinput8_interval_s=${NL_AUXINPUT8_INTERVAL
if test ! -z "$NL_AUXINPUT8_INTERVAL"; then echo "auxinput8_interval=${NL_AUXINPUT8_INTERVAL}," 	if test ! -z "$NL_AUXINPUT8_INTERVAL"; then echo "auxinput8_interval=${NL_AUXINPUT8_INTERVAL}," 
if test ! -z "$NL_AUXINPUT8_BEGIN_Y"; then echo "auxinput8_begin_y=${NL_AUXINPUT8_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT8_BEGIN_Y"; then echo "auxinput8_begin_y=${NL_AUXINPUT8_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT8_BEGIN_D"; then echo "auxinput8_begin_d=${NL_AUXINPUT8_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT8_BEGIN_D"; then echo "auxinput8_begin_d=${NL_AUXINPUT8_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT8_BEGIN_H"; then echo "auxinput8_begin_h=${NL_AUXINPUT8_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT8_BEGIN_H"; then echo "auxinput8_begin_h=${NL_AUXINPUT8_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT8_BEGIN_M"; then echo "auxinput8_begin_m=${NL_AUXINPUT8_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT8_BEGIN_M"; then echo "auxinput8_begin_m=${NL_AUXINPUT8_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT8_BEGIN_S"; then echo "auxinput8_begin_s=${NL_AUXINPUT8_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT8_BEGIN_S"; then echo "auxinput8_begin_s=${NL_AUXINPUT8_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT8_BEGIN"; then echo "auxinput8_begin=${NL_AUXINPUT8_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_BEGIN"; then echo "auxinput8_begin=${NL_AUXINPUT8_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END_Y"; then echo "auxinput8_end_y=${NL_AUXINPUT8_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_END_Y"; then echo "auxinput8_end_y=${NL_AUXINPUT8_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END_D"; then echo "auxinput8_end_d=${NL_AUXINPUT8_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_END_D"; then echo "auxinput8_end_d=${NL_AUXINPUT8_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END_H"; then echo "auxinput8_end_h=${NL_AUXINPUT8_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_END_H"; then echo "auxinput8_end_h=${NL_AUXINPUT8_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END_M"; then echo "auxinput8_end_m=${NL_AUXINPUT8_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_END_M"; then echo "auxinput8_end_m=${NL_AUXINPUT8_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END_S"; then echo "auxinput8_end_s=${NL_AUXINPUT8_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT8_END_S"; then echo "auxinput8_end_s=${NL_AUXINPUT8_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT8_END"; then echo "auxinput8_end=${NL_AUXINPUT8_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT8_END"; then echo "auxinput8_end=${NL_AUXINPUT8_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT8"; then echo "io_form_auxinput8=${NL_IO_FORM_AUXINPUT8}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT8"; then echo "io_form_auxinput8=${NL_IO_FORM_AUXINPUT8}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT8"; then echo "frames_per_auxinput8=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT8"; then echo "frames_per_auxinput8=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT9_INNAME"; then echo "auxinput9_inname=\"${NL_AUXINPUT9_INNAME}\"," >>	if test ! -z "$NL_AUXINPUT9_INNAME"; then echo "auxinput9_inname=\"${NL_AUXINPUT9_INNAME}\"," >>
if test ! -z "$NL_AUXINPUT9_OUTNAME"; then echo "auxinput9_outname=\"${NL_AUXINPUT9_OUTNAME}\","	if test ! -z "$NL_AUXINPUT9_OUTNAME"; then echo "auxinput9_outname=\"${NL_AUXINPUT9_OUTNAME}\","
if test ! -z "$NL_AUXINPUT9_INTERVAL_Y"; then echo "auxinput9_interval_y=${NL_AUXINPUT9_INTERVAL	if test ! -z "$NL_AUXINPUT9_INTERVAL_Y"; then echo "auxinput9_interval_y=${NL_AUXINPUT9_INTERVAL
if test ! -z "$NL_AUXINPUT9_INTERVAL_D"; then echo "auxinput9_interval_d=${NL_AUXINPUT9_INTERVAL	if test ! -z "$NL_AUXINPUT9_INTERVAL_D"; then echo "auxinput9_interval_d=${NL_AUXINPUT9_INTERVAL
if test ! -z "$NL_AUXINPUT9_INTERVAL_H"; then echo "auxinput9_interval_h=${NL_AUXINPUT9_INTERVAL	if test ! -z "$NL_AUXINPUT9_INTERVAL_H"; then echo "auxinput9_interval_h=${NL_AUXINPUT9_INTERVAL
if test ! -z "$NL_AUXINPUT9_INTERVAL_M"; then echo "auxinput9_interval_m=${NL_AUXINPUT9_INTERVAL	if test ! -z "$NL_AUXINPUT9_INTERVAL_M"; then echo "auxinput9_interval_m=${NL_AUXINPUT9_INTERVAL
if test ! -z "$NL_AUXINPUT9_INTERVAL_S"; then echo "auxinput9_interval_s=${NL_AUXINPUT9_INTERVAL	if test ! -z "$NL_AUXINPUT9_INTERVAL_S"; then echo "auxinput9_interval_s=${NL_AUXINPUT9_INTERVAL
if test ! -z "$NL_AUXINPUT9_INTERVAL"; then echo "auxinput9_interval=${NL_AUXINPUT9_INTERVAL}," 	if test ! -z "$NL_AUXINPUT9_INTERVAL"; then echo "auxinput9_interval=${NL_AUXINPUT9_INTERVAL}," 
if test ! -z "$NL_AUXINPUT9_BEGIN_Y"; then echo "auxinput9_begin_y=${NL_AUXINPUT9_BEGIN_Y}," >> 	if test ! -z "$NL_AUXINPUT9_BEGIN_Y"; then echo "auxinput9_begin_y=${NL_AUXINPUT9_BEGIN_Y}," >> 
if test ! -z "$NL_AUXINPUT9_BEGIN_D"; then echo "auxinput9_begin_d=${NL_AUXINPUT9_BEGIN_D}," >> 	if test ! -z "$NL_AUXINPUT9_BEGIN_D"; then echo "auxinput9_begin_d=${NL_AUXINPUT9_BEGIN_D}," >> 
if test ! -z "$NL_AUXINPUT9_BEGIN_H"; then echo "auxinput9_begin_h=${NL_AUXINPUT9_BEGIN_H}," >> 	if test ! -z "$NL_AUXINPUT9_BEGIN_H"; then echo "auxinput9_begin_h=${NL_AUXINPUT9_BEGIN_H}," >> 
if test ! -z "$NL_AUXINPUT9_BEGIN_M"; then echo "auxinput9_begin_m=${NL_AUXINPUT9_BEGIN_M}," >> 	if test ! -z "$NL_AUXINPUT9_BEGIN_M"; then echo "auxinput9_begin_m=${NL_AUXINPUT9_BEGIN_M}," >> 
if test ! -z "$NL_AUXINPUT9_BEGIN_S"; then echo "auxinput9_begin_s=${NL_AUXINPUT9_BEGIN_S}," >> 	if test ! -z "$NL_AUXINPUT9_BEGIN_S"; then echo "auxinput9_begin_s=${NL_AUXINPUT9_BEGIN_S}," >> 
if test ! -z "$NL_AUXINPUT9_BEGIN"; then echo "auxinput9_begin=${NL_AUXINPUT9_BEGIN}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_BEGIN"; then echo "auxinput9_begin=${NL_AUXINPUT9_BEGIN}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END_Y"; then echo "auxinput9_end_y=${NL_AUXINPUT9_END_Y}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_END_Y"; then echo "auxinput9_end_y=${NL_AUXINPUT9_END_Y}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END_D"; then echo "auxinput9_end_d=${NL_AUXINPUT9_END_D}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_END_D"; then echo "auxinput9_end_d=${NL_AUXINPUT9_END_D}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END_H"; then echo "auxinput9_end_h=${NL_AUXINPUT9_END_H}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_END_H"; then echo "auxinput9_end_h=${NL_AUXINPUT9_END_H}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END_M"; then echo "auxinput9_end_m=${NL_AUXINPUT9_END_M}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_END_M"; then echo "auxinput9_end_m=${NL_AUXINPUT9_END_M}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END_S"; then echo "auxinput9_end_s=${NL_AUXINPUT9_END_S}," >> $FILE;	if test ! -z "$NL_AUXINPUT9_END_S"; then echo "auxinput9_end_s=${NL_AUXINPUT9_END_S}," >> $FILE;
if test ! -z "$NL_AUXINPUT9_END"; then echo "auxinput9_end=${NL_AUXINPUT9_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT9_END"; then echo "auxinput9_end=${NL_AUXINPUT9_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT9"; then echo "io_form_auxinput9=${NL_IO_FORM_AUXINPUT9}," >> 	if test ! -z "$NL_IO_FORM_AUXINPUT9"; then echo "io_form_auxinput9=${NL_IO_FORM_AUXINPUT9}," >> 
if test ! -z "$NL_FRAMES_PER_AUXINPUT9"; then echo "frames_per_auxinput9=${NL_FRAMES_PER_AUXINPU	if test ! -z "$NL_FRAMES_PER_AUXINPUT9"; then echo "frames_per_auxinput9=${NL_FRAMES_PER_AUXINPU
if test ! -z "$NL_AUXINPUT10_INNAME"; then echo "auxinput10_inname=\"${NL_AUXINPUT10_INNAME}\","	if test ! -z "$NL_AUXINPUT10_INNAME"; then echo "auxinput10_inname=\"${NL_AUXINPUT10_INNAME}\","
if test ! -z "$NL_AUXINPUT10_OUTNAME"; then echo "auxinput10_outname=\"${NL_AUXINPUT10_OUTNAME}\	if test ! -z "$NL_AUXINPUT10_OUTNAME"; then echo "auxinput10_outname=\"${NL_AUXINPUT10_OUTNAME}\
if test ! -z "$NL_AUXINPUT10_INTERVAL_Y"; then echo "auxinput10_interval_y=${NL_AUXINPUT10_INTER	if test ! -z "$NL_AUXINPUT10_INTERVAL_Y"; then echo "auxinput10_interval_y=${NL_AUXINPUT10_INTER
if test ! -z "$NL_AUXINPUT10_INTERVAL_D"; then echo "auxinput10_interval_d=${NL_AUXINPUT10_INTER	if test ! -z "$NL_AUXINPUT10_INTERVAL_D"; then echo "auxinput10_interval_d=${NL_AUXINPUT10_INTER
if test ! -z "$NL_AUXINPUT10_INTERVAL_H"; then echo "auxinput10_interval_h=${NL_AUXINPUT10_INTER	if test ! -z "$NL_AUXINPUT10_INTERVAL_H"; then echo "auxinput10_interval_h=${NL_AUXINPUT10_INTER
if test ! -z "$NL_AUXINPUT10_INTERVAL_M"; then echo "auxinput10_interval_m=${NL_AUXINPUT10_INTER	if test ! -z "$NL_AUXINPUT10_INTERVAL_M"; then echo "auxinput10_interval_m=${NL_AUXINPUT10_INTER
if test ! -z "$NL_AUXINPUT10_INTERVAL_S"; then echo "auxinput10_interval_s=${NL_AUXINPUT10_INTER	if test ! -z "$NL_AUXINPUT10_INTERVAL_S"; then echo "auxinput10_interval_s=${NL_AUXINPUT10_INTER
if test ! -z "$NL_AUXINPUT10_INTERVAL"; then echo "auxinput10_interval=${NL_AUXINPUT10_INTERVAL}	if test ! -z "$NL_AUXINPUT10_INTERVAL"; then echo "auxinput10_interval=${NL_AUXINPUT10_INTERVAL}
if test ! -z "$NL_AUXINPUT10_BEGIN_Y"; then echo "auxinput10_begin_y=${NL_AUXINPUT10_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT10_BEGIN_Y"; then echo "auxinput10_begin_y=${NL_AUXINPUT10_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT10_BEGIN_D"; then echo "auxinput10_begin_d=${NL_AUXINPUT10_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT10_BEGIN_D"; then echo "auxinput10_begin_d=${NL_AUXINPUT10_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT10_BEGIN_H"; then echo "auxinput10_begin_h=${NL_AUXINPUT10_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT10_BEGIN_H"; then echo "auxinput10_begin_h=${NL_AUXINPUT10_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT10_BEGIN_M"; then echo "auxinput10_begin_m=${NL_AUXINPUT10_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT10_BEGIN_M"; then echo "auxinput10_begin_m=${NL_AUXINPUT10_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT10_BEGIN_S"; then echo "auxinput10_begin_s=${NL_AUXINPUT10_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT10_BEGIN_S"; then echo "auxinput10_begin_s=${NL_AUXINPUT10_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT10_BEGIN"; then echo "auxinput10_begin=${NL_AUXINPUT10_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT10_BEGIN"; then echo "auxinput10_begin=${NL_AUXINPUT10_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT10_END_Y"; then echo "auxinput10_end_y=${NL_AUXINPUT10_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT10_END_Y"; then echo "auxinput10_end_y=${NL_AUXINPUT10_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT10_END_D"; then echo "auxinput10_end_d=${NL_AUXINPUT10_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT10_END_D"; then echo "auxinput10_end_d=${NL_AUXINPUT10_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT10_END_H"; then echo "auxinput10_end_h=${NL_AUXINPUT10_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT10_END_H"; then echo "auxinput10_end_h=${NL_AUXINPUT10_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT10_END_M"; then echo "auxinput10_end_m=${NL_AUXINPUT10_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT10_END_M"; then echo "auxinput10_end_m=${NL_AUXINPUT10_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT10_END_S"; then echo "auxinput10_end_s=${NL_AUXINPUT10_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT10_END_S"; then echo "auxinput10_end_s=${NL_AUXINPUT10_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT10_END"; then echo "auxinput10_end=${NL_AUXINPUT10_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT10_END"; then echo "auxinput10_end=${NL_AUXINPUT10_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT10"; then echo "io_form_auxinput10=${NL_IO_FORM_AUXINPUT10}," 	if test ! -z "$NL_IO_FORM_AUXINPUT10"; then echo "io_form_auxinput10=${NL_IO_FORM_AUXINPUT10}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT10"; then echo "frames_per_auxinput10=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT10"; then echo "frames_per_auxinput10=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT11_INNAME"; then echo "auxinput11_inname=\"${NL_AUXINPUT11_INNAME}\","	if test ! -z "$NL_AUXINPUT11_INNAME"; then echo "auxinput11_inname=\"${NL_AUXINPUT11_INNAME}\","
if test ! -z "$NL_AUXINPUT11_OUTNAME"; then echo "auxinput11_outname=\"${NL_AUXINPUT11_OUTNAME}\	if test ! -z "$NL_AUXINPUT11_OUTNAME"; then echo "auxinput11_outname=\"${NL_AUXINPUT11_OUTNAME}\
if test ! -z "$NL_AUXINPUT11_INTERVAL_Y"; then echo "auxinput11_interval_y=${NL_AUXINPUT11_INTER	if test ! -z "$NL_AUXINPUT11_INTERVAL_Y"; then echo "auxinput11_interval_y=${NL_AUXINPUT11_INTER
if test ! -z "$NL_AUXINPUT11_INTERVAL_D"; then echo "auxinput11_interval_d=${NL_AUXINPUT11_INTER	if test ! -z "$NL_AUXINPUT11_INTERVAL_D"; then echo "auxinput11_interval_d=${NL_AUXINPUT11_INTER
if test ! -z "$NL_AUXINPUT11_INTERVAL_H"; then echo "auxinput11_interval_h=${NL_AUXINPUT11_INTER	if test ! -z "$NL_AUXINPUT11_INTERVAL_H"; then echo "auxinput11_interval_h=${NL_AUXINPUT11_INTER
if test ! -z "$NL_AUXINPUT11_INTERVAL_M"; then echo "auxinput11_interval_m=${NL_AUXINPUT11_INTER	if test ! -z "$NL_AUXINPUT11_INTERVAL_M"; then echo "auxinput11_interval_m=${NL_AUXINPUT11_INTER
if test ! -z "$NL_AUXINPUT11_INTERVAL_S"; then echo "auxinput11_interval_s=${NL_AUXINPUT11_INTER	if test ! -z "$NL_AUXINPUT11_INTERVAL_S"; then echo "auxinput11_interval_s=${NL_AUXINPUT11_INTER
if test ! -z "$NL_AUXINPUT11_INTERVAL"; then echo "auxinput11_interval=${NL_AUXINPUT11_INTERVAL}	if test ! -z "$NL_AUXINPUT11_INTERVAL"; then echo "auxinput11_interval=${NL_AUXINPUT11_INTERVAL}
if test ! -z "$NL_AUXINPUT11_BEGIN_Y"; then echo "auxinput11_begin_y=${NL_AUXINPUT11_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT11_BEGIN_Y"; then echo "auxinput11_begin_y=${NL_AUXINPUT11_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT11_BEGIN_D"; then echo "auxinput11_begin_d=${NL_AUXINPUT11_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT11_BEGIN_D"; then echo "auxinput11_begin_d=${NL_AUXINPUT11_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT11_BEGIN_H"; then echo "auxinput11_begin_h=${NL_AUXINPUT11_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT11_BEGIN_H"; then echo "auxinput11_begin_h=${NL_AUXINPUT11_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT11_BEGIN_M"; then echo "auxinput11_begin_m=${NL_AUXINPUT11_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT11_BEGIN_M"; then echo "auxinput11_begin_m=${NL_AUXINPUT11_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT11_BEGIN_S"; then echo "auxinput11_begin_s=${NL_AUXINPUT11_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT11_BEGIN_S"; then echo "auxinput11_begin_s=${NL_AUXINPUT11_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT11_BEGIN"; then echo "auxinput11_begin=${NL_AUXINPUT11_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT11_BEGIN"; then echo "auxinput11_begin=${NL_AUXINPUT11_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT11_END_Y"; then echo "auxinput11_end_y=${NL_AUXINPUT11_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT11_END_Y"; then echo "auxinput11_end_y=${NL_AUXINPUT11_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT11_END_D"; then echo "auxinput11_end_d=${NL_AUXINPUT11_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT11_END_D"; then echo "auxinput11_end_d=${NL_AUXINPUT11_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT11_END_H"; then echo "auxinput11_end_h=${NL_AUXINPUT11_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT11_END_H"; then echo "auxinput11_end_h=${NL_AUXINPUT11_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT11_END_M"; then echo "auxinput11_end_m=${NL_AUXINPUT11_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT11_END_M"; then echo "auxinput11_end_m=${NL_AUXINPUT11_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT11_END_S"; then echo "auxinput11_end_s=${NL_AUXINPUT11_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT11_END_S"; then echo "auxinput11_end_s=${NL_AUXINPUT11_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT11_END"; then echo "auxinput11_end=${NL_AUXINPUT11_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT11_END"; then echo "auxinput11_end=${NL_AUXINPUT11_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT11"; then echo "io_form_auxinput11=${NL_IO_FORM_AUXINPUT11}," 	if test ! -z "$NL_IO_FORM_AUXINPUT11"; then echo "io_form_auxinput11=${NL_IO_FORM_AUXINPUT11}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT11"; then echo "frames_per_auxinput11=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT11"; then echo "frames_per_auxinput11=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT12_INNAME"; then echo "auxinput12_inname=\"${NL_AUXINPUT12_INNAME}\","	if test ! -z "$NL_AUXINPUT12_INNAME"; then echo "auxinput12_inname=\"${NL_AUXINPUT12_INNAME}\","
if test ! -z "$NL_AUXINPUT12_OUTNAME"; then echo "auxinput12_outname=\"${NL_AUXINPUT12_OUTNAME}\	if test ! -z "$NL_AUXINPUT12_OUTNAME"; then echo "auxinput12_outname=\"${NL_AUXINPUT12_OUTNAME}\
if test ! -z "$NL_AUXINPUT12_INTERVAL_Y"; then echo "auxinput12_interval_y=${NL_AUXINPUT12_INTER	if test ! -z "$NL_AUXINPUT12_INTERVAL_Y"; then echo "auxinput12_interval_y=${NL_AUXINPUT12_INTER
if test ! -z "$NL_AUXINPUT12_INTERVAL_D"; then echo "auxinput12_interval_d=${NL_AUXINPUT12_INTER	if test ! -z "$NL_AUXINPUT12_INTERVAL_D"; then echo "auxinput12_interval_d=${NL_AUXINPUT12_INTER
if test ! -z "$NL_AUXINPUT12_INTERVAL_H"; then echo "auxinput12_interval_h=${NL_AUXINPUT12_INTER	if test ! -z "$NL_AUXINPUT12_INTERVAL_H"; then echo "auxinput12_interval_h=${NL_AUXINPUT12_INTER
if test ! -z "$NL_AUXINPUT12_INTERVAL_M"; then echo "auxinput12_interval_m=${NL_AUXINPUT12_INTER	if test ! -z "$NL_AUXINPUT12_INTERVAL_M"; then echo "auxinput12_interval_m=${NL_AUXINPUT12_INTER
if test ! -z "$NL_AUXINPUT12_INTERVAL_S"; then echo "auxinput12_interval_s=${NL_AUXINPUT12_INTER	if test ! -z "$NL_AUXINPUT12_INTERVAL_S"; then echo "auxinput12_interval_s=${NL_AUXINPUT12_INTER
if test ! -z "$NL_AUXINPUT12_INTERVAL"; then echo "auxinput12_interval=${NL_AUXINPUT12_INTERVAL}	if test ! -z "$NL_AUXINPUT12_INTERVAL"; then echo "auxinput12_interval=${NL_AUXINPUT12_INTERVAL}
if test ! -z "$NL_AUXINPUT12_BEGIN_Y"; then echo "auxinput12_begin_y=${NL_AUXINPUT12_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT12_BEGIN_Y"; then echo "auxinput12_begin_y=${NL_AUXINPUT12_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT12_BEGIN_D"; then echo "auxinput12_begin_d=${NL_AUXINPUT12_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT12_BEGIN_D"; then echo "auxinput12_begin_d=${NL_AUXINPUT12_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT12_BEGIN_H"; then echo "auxinput12_begin_h=${NL_AUXINPUT12_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT12_BEGIN_H"; then echo "auxinput12_begin_h=${NL_AUXINPUT12_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT12_BEGIN_M"; then echo "auxinput12_begin_m=${NL_AUXINPUT12_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT12_BEGIN_M"; then echo "auxinput12_begin_m=${NL_AUXINPUT12_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT12_BEGIN_S"; then echo "auxinput12_begin_s=${NL_AUXINPUT12_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT12_BEGIN_S"; then echo "auxinput12_begin_s=${NL_AUXINPUT12_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT12_BEGIN"; then echo "auxinput12_begin=${NL_AUXINPUT12_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT12_BEGIN"; then echo "auxinput12_begin=${NL_AUXINPUT12_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT12_END_Y"; then echo "auxinput12_end_y=${NL_AUXINPUT12_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT12_END_Y"; then echo "auxinput12_end_y=${NL_AUXINPUT12_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT12_END_D"; then echo "auxinput12_end_d=${NL_AUXINPUT12_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT12_END_D"; then echo "auxinput12_end_d=${NL_AUXINPUT12_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT12_END_H"; then echo "auxinput12_end_h=${NL_AUXINPUT12_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT12_END_H"; then echo "auxinput12_end_h=${NL_AUXINPUT12_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT12_END_M"; then echo "auxinput12_end_m=${NL_AUXINPUT12_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT12_END_M"; then echo "auxinput12_end_m=${NL_AUXINPUT12_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT12_END_S"; then echo "auxinput12_end_s=${NL_AUXINPUT12_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT12_END_S"; then echo "auxinput12_end_s=${NL_AUXINPUT12_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT12_END"; then echo "auxinput12_end=${NL_AUXINPUT12_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT12_END"; then echo "auxinput12_end=${NL_AUXINPUT12_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT12"; then echo "io_form_auxinput12=${NL_IO_FORM_AUXINPUT12}," 	if test ! -z "$NL_IO_FORM_AUXINPUT12"; then echo "io_form_auxinput12=${NL_IO_FORM_AUXINPUT12}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT12"; then echo "frames_per_auxinput12=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT12"; then echo "frames_per_auxinput12=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT13_INNAME"; then echo "auxinput13_inname=\"${NL_AUXINPUT13_INNAME}\","	if test ! -z "$NL_AUXINPUT13_INNAME"; then echo "auxinput13_inname=\"${NL_AUXINPUT13_INNAME}\","
if test ! -z "$NL_AUXINPUT13_OUTNAME"; then echo "auxinput13_outname=\"${NL_AUXINPUT13_OUTNAME}\	if test ! -z "$NL_AUXINPUT13_OUTNAME"; then echo "auxinput13_outname=\"${NL_AUXINPUT13_OUTNAME}\
if test ! -z "$NL_AUXINPUT13_INTERVAL_Y"; then echo "auxinput13_interval_y=${NL_AUXINPUT13_INTER	if test ! -z "$NL_AUXINPUT13_INTERVAL_Y"; then echo "auxinput13_interval_y=${NL_AUXINPUT13_INTER
if test ! -z "$NL_AUXINPUT13_INTERVAL_D"; then echo "auxinput13_interval_d=${NL_AUXINPUT13_INTER	if test ! -z "$NL_AUXINPUT13_INTERVAL_D"; then echo "auxinput13_interval_d=${NL_AUXINPUT13_INTER
if test ! -z "$NL_AUXINPUT13_INTERVAL_H"; then echo "auxinput13_interval_h=${NL_AUXINPUT13_INTER	if test ! -z "$NL_AUXINPUT13_INTERVAL_H"; then echo "auxinput13_interval_h=${NL_AUXINPUT13_INTER
if test ! -z "$NL_AUXINPUT13_INTERVAL_M"; then echo "auxinput13_interval_m=${NL_AUXINPUT13_INTER	if test ! -z "$NL_AUXINPUT13_INTERVAL_M"; then echo "auxinput13_interval_m=${NL_AUXINPUT13_INTER
if test ! -z "$NL_AUXINPUT13_INTERVAL_S"; then echo "auxinput13_interval_s=${NL_AUXINPUT13_INTER	if test ! -z "$NL_AUXINPUT13_INTERVAL_S"; then echo "auxinput13_interval_s=${NL_AUXINPUT13_INTER
if test ! -z "$NL_AUXINPUT13_INTERVAL"; then echo "auxinput13_interval=${NL_AUXINPUT13_INTERVAL}	if test ! -z "$NL_AUXINPUT13_INTERVAL"; then echo "auxinput13_interval=${NL_AUXINPUT13_INTERVAL}
if test ! -z "$NL_AUXINPUT13_BEGIN_Y"; then echo "auxinput13_begin_y=${NL_AUXINPUT13_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT13_BEGIN_Y"; then echo "auxinput13_begin_y=${NL_AUXINPUT13_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT13_BEGIN_D"; then echo "auxinput13_begin_d=${NL_AUXINPUT13_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT13_BEGIN_D"; then echo "auxinput13_begin_d=${NL_AUXINPUT13_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT13_BEGIN_H"; then echo "auxinput13_begin_h=${NL_AUXINPUT13_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT13_BEGIN_H"; then echo "auxinput13_begin_h=${NL_AUXINPUT13_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT13_BEGIN_M"; then echo "auxinput13_begin_m=${NL_AUXINPUT13_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT13_BEGIN_M"; then echo "auxinput13_begin_m=${NL_AUXINPUT13_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT13_BEGIN_S"; then echo "auxinput13_begin_s=${NL_AUXINPUT13_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT13_BEGIN_S"; then echo "auxinput13_begin_s=${NL_AUXINPUT13_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT13_BEGIN"; then echo "auxinput13_begin=${NL_AUXINPUT13_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT13_BEGIN"; then echo "auxinput13_begin=${NL_AUXINPUT13_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT13_END_Y"; then echo "auxinput13_end_y=${NL_AUXINPUT13_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT13_END_Y"; then echo "auxinput13_end_y=${NL_AUXINPUT13_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT13_END_D"; then echo "auxinput13_end_d=${NL_AUXINPUT13_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT13_END_D"; then echo "auxinput13_end_d=${NL_AUXINPUT13_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT13_END_H"; then echo "auxinput13_end_h=${NL_AUXINPUT13_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT13_END_H"; then echo "auxinput13_end_h=${NL_AUXINPUT13_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT13_END_M"; then echo "auxinput13_end_m=${NL_AUXINPUT13_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT13_END_M"; then echo "auxinput13_end_m=${NL_AUXINPUT13_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT13_END_S"; then echo "auxinput13_end_s=${NL_AUXINPUT13_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT13_END_S"; then echo "auxinput13_end_s=${NL_AUXINPUT13_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT13_END"; then echo "auxinput13_end=${NL_AUXINPUT13_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT13_END"; then echo "auxinput13_end=${NL_AUXINPUT13_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT13"; then echo "io_form_auxinput13=${NL_IO_FORM_AUXINPUT13}," 	if test ! -z "$NL_IO_FORM_AUXINPUT13"; then echo "io_form_auxinput13=${NL_IO_FORM_AUXINPUT13}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT13"; then echo "frames_per_auxinput13=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT13"; then echo "frames_per_auxinput13=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT14_INNAME"; then echo "auxinput14_inname=\"${NL_AUXINPUT14_INNAME}\","	if test ! -z "$NL_AUXINPUT14_INNAME"; then echo "auxinput14_inname=\"${NL_AUXINPUT14_INNAME}\","
if test ! -z "$NL_AUXINPUT14_OUTNAME"; then echo "auxinput14_outname=\"${NL_AUXINPUT14_OUTNAME}\	if test ! -z "$NL_AUXINPUT14_OUTNAME"; then echo "auxinput14_outname=\"${NL_AUXINPUT14_OUTNAME}\
if test ! -z "$NL_AUXINPUT14_INTERVAL_Y"; then echo "auxinput14_interval_y=${NL_AUXINPUT14_INTER	if test ! -z "$NL_AUXINPUT14_INTERVAL_Y"; then echo "auxinput14_interval_y=${NL_AUXINPUT14_INTER
if test ! -z "$NL_AUXINPUT14_INTERVAL_D"; then echo "auxinput14_interval_d=${NL_AUXINPUT14_INTER	if test ! -z "$NL_AUXINPUT14_INTERVAL_D"; then echo "auxinput14_interval_d=${NL_AUXINPUT14_INTER
if test ! -z "$NL_AUXINPUT14_INTERVAL_H"; then echo "auxinput14_interval_h=${NL_AUXINPUT14_INTER	if test ! -z "$NL_AUXINPUT14_INTERVAL_H"; then echo "auxinput14_interval_h=${NL_AUXINPUT14_INTER
if test ! -z "$NL_AUXINPUT14_INTERVAL_M"; then echo "auxinput14_interval_m=${NL_AUXINPUT14_INTER	if test ! -z "$NL_AUXINPUT14_INTERVAL_M"; then echo "auxinput14_interval_m=${NL_AUXINPUT14_INTER
if test ! -z "$NL_AUXINPUT14_INTERVAL_S"; then echo "auxinput14_interval_s=${NL_AUXINPUT14_INTER	if test ! -z "$NL_AUXINPUT14_INTERVAL_S"; then echo "auxinput14_interval_s=${NL_AUXINPUT14_INTER
if test ! -z "$NL_AUXINPUT14_INTERVAL"; then echo "auxinput14_interval=${NL_AUXINPUT14_INTERVAL}	if test ! -z "$NL_AUXINPUT14_INTERVAL"; then echo "auxinput14_interval=${NL_AUXINPUT14_INTERVAL}
if test ! -z "$NL_AUXINPUT14_BEGIN_Y"; then echo "auxinput14_begin_y=${NL_AUXINPUT14_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT14_BEGIN_Y"; then echo "auxinput14_begin_y=${NL_AUXINPUT14_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT14_BEGIN_D"; then echo "auxinput14_begin_d=${NL_AUXINPUT14_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT14_BEGIN_D"; then echo "auxinput14_begin_d=${NL_AUXINPUT14_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT14_BEGIN_H"; then echo "auxinput14_begin_h=${NL_AUXINPUT14_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT14_BEGIN_H"; then echo "auxinput14_begin_h=${NL_AUXINPUT14_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT14_BEGIN_M"; then echo "auxinput14_begin_m=${NL_AUXINPUT14_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT14_BEGIN_M"; then echo "auxinput14_begin_m=${NL_AUXINPUT14_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT14_BEGIN_S"; then echo "auxinput14_begin_s=${NL_AUXINPUT14_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT14_BEGIN_S"; then echo "auxinput14_begin_s=${NL_AUXINPUT14_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT14_BEGIN"; then echo "auxinput14_begin=${NL_AUXINPUT14_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT14_BEGIN"; then echo "auxinput14_begin=${NL_AUXINPUT14_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT14_END_Y"; then echo "auxinput14_end_y=${NL_AUXINPUT14_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT14_END_Y"; then echo "auxinput14_end_y=${NL_AUXINPUT14_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT14_END_D"; then echo "auxinput14_end_d=${NL_AUXINPUT14_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT14_END_D"; then echo "auxinput14_end_d=${NL_AUXINPUT14_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT14_END_H"; then echo "auxinput14_end_h=${NL_AUXINPUT14_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT14_END_H"; then echo "auxinput14_end_h=${NL_AUXINPUT14_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT14_END_M"; then echo "auxinput14_end_m=${NL_AUXINPUT14_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT14_END_M"; then echo "auxinput14_end_m=${NL_AUXINPUT14_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT14_END_S"; then echo "auxinput14_end_s=${NL_AUXINPUT14_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT14_END_S"; then echo "auxinput14_end_s=${NL_AUXINPUT14_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT14_END"; then echo "auxinput14_end=${NL_AUXINPUT14_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT14_END"; then echo "auxinput14_end=${NL_AUXINPUT14_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT14"; then echo "io_form_auxinput14=${NL_IO_FORM_AUXINPUT14}," 	if test ! -z "$NL_IO_FORM_AUXINPUT14"; then echo "io_form_auxinput14=${NL_IO_FORM_AUXINPUT14}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT14"; then echo "frames_per_auxinput14=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT14"; then echo "frames_per_auxinput14=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT15_INNAME"; then echo "auxinput15_inname=\"${NL_AUXINPUT15_INNAME}\","	if test ! -z "$NL_AUXINPUT15_INNAME"; then echo "auxinput15_inname=\"${NL_AUXINPUT15_INNAME}\","
if test ! -z "$NL_AUXINPUT15_OUTNAME"; then echo "auxinput15_outname=\"${NL_AUXINPUT15_OUTNAME}\	if test ! -z "$NL_AUXINPUT15_OUTNAME"; then echo "auxinput15_outname=\"${NL_AUXINPUT15_OUTNAME}\
if test ! -z "$NL_AUXINPUT15_INTERVAL_Y"; then echo "auxinput15_interval_y=${NL_AUXINPUT15_INTER	if test ! -z "$NL_AUXINPUT15_INTERVAL_Y"; then echo "auxinput15_interval_y=${NL_AUXINPUT15_INTER
if test ! -z "$NL_AUXINPUT15_INTERVAL_D"; then echo "auxinput15_interval_d=${NL_AUXINPUT15_INTER	if test ! -z "$NL_AUXINPUT15_INTERVAL_D"; then echo "auxinput15_interval_d=${NL_AUXINPUT15_INTER
if test ! -z "$NL_AUXINPUT15_INTERVAL_H"; then echo "auxinput15_interval_h=${NL_AUXINPUT15_INTER	if test ! -z "$NL_AUXINPUT15_INTERVAL_H"; then echo "auxinput15_interval_h=${NL_AUXINPUT15_INTER
if test ! -z "$NL_AUXINPUT15_INTERVAL_M"; then echo "auxinput15_interval_m=${NL_AUXINPUT15_INTER	if test ! -z "$NL_AUXINPUT15_INTERVAL_M"; then echo "auxinput15_interval_m=${NL_AUXINPUT15_INTER
if test ! -z "$NL_AUXINPUT15_INTERVAL_S"; then echo "auxinput15_interval_s=${NL_AUXINPUT15_INTER	if test ! -z "$NL_AUXINPUT15_INTERVAL_S"; then echo "auxinput15_interval_s=${NL_AUXINPUT15_INTER
if test ! -z "$NL_AUXINPUT15_INTERVAL"; then echo "auxinput15_interval=${NL_AUXINPUT15_INTERVAL}	if test ! -z "$NL_AUXINPUT15_INTERVAL"; then echo "auxinput15_interval=${NL_AUXINPUT15_INTERVAL}
if test ! -z "$NL_AUXINPUT15_BEGIN_Y"; then echo "auxinput15_begin_y=${NL_AUXINPUT15_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT15_BEGIN_Y"; then echo "auxinput15_begin_y=${NL_AUXINPUT15_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT15_BEGIN_D"; then echo "auxinput15_begin_d=${NL_AUXINPUT15_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT15_BEGIN_D"; then echo "auxinput15_begin_d=${NL_AUXINPUT15_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT15_BEGIN_H"; then echo "auxinput15_begin_h=${NL_AUXINPUT15_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT15_BEGIN_H"; then echo "auxinput15_begin_h=${NL_AUXINPUT15_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT15_BEGIN_M"; then echo "auxinput15_begin_m=${NL_AUXINPUT15_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT15_BEGIN_M"; then echo "auxinput15_begin_m=${NL_AUXINPUT15_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT15_BEGIN_S"; then echo "auxinput15_begin_s=${NL_AUXINPUT15_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT15_BEGIN_S"; then echo "auxinput15_begin_s=${NL_AUXINPUT15_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT15_BEGIN"; then echo "auxinput15_begin=${NL_AUXINPUT15_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT15_BEGIN"; then echo "auxinput15_begin=${NL_AUXINPUT15_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT15_END_Y"; then echo "auxinput15_end_y=${NL_AUXINPUT15_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT15_END_Y"; then echo "auxinput15_end_y=${NL_AUXINPUT15_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT15_END_D"; then echo "auxinput15_end_d=${NL_AUXINPUT15_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT15_END_D"; then echo "auxinput15_end_d=${NL_AUXINPUT15_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT15_END_H"; then echo "auxinput15_end_h=${NL_AUXINPUT15_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT15_END_H"; then echo "auxinput15_end_h=${NL_AUXINPUT15_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT15_END_M"; then echo "auxinput15_end_m=${NL_AUXINPUT15_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT15_END_M"; then echo "auxinput15_end_m=${NL_AUXINPUT15_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT15_END_S"; then echo "auxinput15_end_s=${NL_AUXINPUT15_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT15_END_S"; then echo "auxinput15_end_s=${NL_AUXINPUT15_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT15_END"; then echo "auxinput15_end=${NL_AUXINPUT15_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT15_END"; then echo "auxinput15_end=${NL_AUXINPUT15_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT15"; then echo "io_form_auxinput15=${NL_IO_FORM_AUXINPUT15}," 	if test ! -z "$NL_IO_FORM_AUXINPUT15"; then echo "io_form_auxinput15=${NL_IO_FORM_AUXINPUT15}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT15"; then echo "frames_per_auxinput15=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT15"; then echo "frames_per_auxinput15=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT16_INNAME"; then echo "auxinput16_inname=\"${NL_AUXINPUT16_INNAME}\","	if test ! -z "$NL_AUXINPUT16_INNAME"; then echo "auxinput16_inname=\"${NL_AUXINPUT16_INNAME}\","
if test ! -z "$NL_AUXINPUT16_OUTNAME"; then echo "auxinput16_outname=\"${NL_AUXINPUT16_OUTNAME}\	if test ! -z "$NL_AUXINPUT16_OUTNAME"; then echo "auxinput16_outname=\"${NL_AUXINPUT16_OUTNAME}\
if test ! -z "$NL_AUXINPUT16_INTERVAL_Y"; then echo "auxinput16_interval_y=${NL_AUXINPUT16_INTER	if test ! -z "$NL_AUXINPUT16_INTERVAL_Y"; then echo "auxinput16_interval_y=${NL_AUXINPUT16_INTER
if test ! -z "$NL_AUXINPUT16_INTERVAL_D"; then echo "auxinput16_interval_d=${NL_AUXINPUT16_INTER	if test ! -z "$NL_AUXINPUT16_INTERVAL_D"; then echo "auxinput16_interval_d=${NL_AUXINPUT16_INTER
if test ! -z "$NL_AUXINPUT16_INTERVAL_H"; then echo "auxinput16_interval_h=${NL_AUXINPUT16_INTER	if test ! -z "$NL_AUXINPUT16_INTERVAL_H"; then echo "auxinput16_interval_h=${NL_AUXINPUT16_INTER
if test ! -z "$NL_AUXINPUT16_INTERVAL_M"; then echo "auxinput16_interval_m=${NL_AUXINPUT16_INTER	if test ! -z "$NL_AUXINPUT16_INTERVAL_M"; then echo "auxinput16_interval_m=${NL_AUXINPUT16_INTER
if test ! -z "$NL_AUXINPUT16_INTERVAL_S"; then echo "auxinput16_interval_s=${NL_AUXINPUT16_INTER	if test ! -z "$NL_AUXINPUT16_INTERVAL_S"; then echo "auxinput16_interval_s=${NL_AUXINPUT16_INTER
if test ! -z "$NL_AUXINPUT16_INTERVAL"; then echo "auxinput16_interval=${NL_AUXINPUT16_INTERVAL}	if test ! -z "$NL_AUXINPUT16_INTERVAL"; then echo "auxinput16_interval=${NL_AUXINPUT16_INTERVAL}
if test ! -z "$NL_AUXINPUT16_BEGIN_Y"; then echo "auxinput16_begin_y=${NL_AUXINPUT16_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT16_BEGIN_Y"; then echo "auxinput16_begin_y=${NL_AUXINPUT16_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT16_BEGIN_D"; then echo "auxinput16_begin_d=${NL_AUXINPUT16_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT16_BEGIN_D"; then echo "auxinput16_begin_d=${NL_AUXINPUT16_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT16_BEGIN_H"; then echo "auxinput16_begin_h=${NL_AUXINPUT16_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT16_BEGIN_H"; then echo "auxinput16_begin_h=${NL_AUXINPUT16_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT16_BEGIN_M"; then echo "auxinput16_begin_m=${NL_AUXINPUT16_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT16_BEGIN_M"; then echo "auxinput16_begin_m=${NL_AUXINPUT16_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT16_BEGIN_S"; then echo "auxinput16_begin_s=${NL_AUXINPUT16_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT16_BEGIN_S"; then echo "auxinput16_begin_s=${NL_AUXINPUT16_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT16_BEGIN"; then echo "auxinput16_begin=${NL_AUXINPUT16_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT16_BEGIN"; then echo "auxinput16_begin=${NL_AUXINPUT16_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT16_END_Y"; then echo "auxinput16_end_y=${NL_AUXINPUT16_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT16_END_Y"; then echo "auxinput16_end_y=${NL_AUXINPUT16_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT16_END_D"; then echo "auxinput16_end_d=${NL_AUXINPUT16_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT16_END_D"; then echo "auxinput16_end_d=${NL_AUXINPUT16_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT16_END_H"; then echo "auxinput16_end_h=${NL_AUXINPUT16_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT16_END_H"; then echo "auxinput16_end_h=${NL_AUXINPUT16_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT16_END_M"; then echo "auxinput16_end_m=${NL_AUXINPUT16_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT16_END_M"; then echo "auxinput16_end_m=${NL_AUXINPUT16_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT16_END_S"; then echo "auxinput16_end_s=${NL_AUXINPUT16_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT16_END_S"; then echo "auxinput16_end_s=${NL_AUXINPUT16_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT16_END"; then echo "auxinput16_end=${NL_AUXINPUT16_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT16_END"; then echo "auxinput16_end=${NL_AUXINPUT16_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT16"; then echo "io_form_auxinput16=${NL_IO_FORM_AUXINPUT16}," 	if test ! -z "$NL_IO_FORM_AUXINPUT16"; then echo "io_form_auxinput16=${NL_IO_FORM_AUXINPUT16}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT16"; then echo "frames_per_auxinput16=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT16"; then echo "frames_per_auxinput16=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT17_INNAME"; then echo "auxinput17_inname=\"${NL_AUXINPUT17_INNAME}\","	if test ! -z "$NL_AUXINPUT17_INNAME"; then echo "auxinput17_inname=\"${NL_AUXINPUT17_INNAME}\","
if test ! -z "$NL_AUXINPUT17_OUTNAME"; then echo "auxinput17_outname=\"${NL_AUXINPUT17_OUTNAME}\	if test ! -z "$NL_AUXINPUT17_OUTNAME"; then echo "auxinput17_outname=\"${NL_AUXINPUT17_OUTNAME}\
if test ! -z "$NL_AUXINPUT17_INTERVAL_Y"; then echo "auxinput17_interval_y=${NL_AUXINPUT17_INTER	if test ! -z "$NL_AUXINPUT17_INTERVAL_Y"; then echo "auxinput17_interval_y=${NL_AUXINPUT17_INTER
if test ! -z "$NL_AUXINPUT17_INTERVAL_D"; then echo "auxinput17_interval_d=${NL_AUXINPUT17_INTER	if test ! -z "$NL_AUXINPUT17_INTERVAL_D"; then echo "auxinput17_interval_d=${NL_AUXINPUT17_INTER
if test ! -z "$NL_AUXINPUT17_INTERVAL_H"; then echo "auxinput17_interval_h=${NL_AUXINPUT17_INTER	if test ! -z "$NL_AUXINPUT17_INTERVAL_H"; then echo "auxinput17_interval_h=${NL_AUXINPUT17_INTER
if test ! -z "$NL_AUXINPUT17_INTERVAL_M"; then echo "auxinput17_interval_m=${NL_AUXINPUT17_INTER	if test ! -z "$NL_AUXINPUT17_INTERVAL_M"; then echo "auxinput17_interval_m=${NL_AUXINPUT17_INTER
if test ! -z "$NL_AUXINPUT17_INTERVAL_S"; then echo "auxinput17_interval_s=${NL_AUXINPUT17_INTER	if test ! -z "$NL_AUXINPUT17_INTERVAL_S"; then echo "auxinput17_interval_s=${NL_AUXINPUT17_INTER
if test ! -z "$NL_AUXINPUT17_INTERVAL"; then echo "auxinput17_interval=${NL_AUXINPUT17_INTERVAL}	if test ! -z "$NL_AUXINPUT17_INTERVAL"; then echo "auxinput17_interval=${NL_AUXINPUT17_INTERVAL}
if test ! -z "$NL_AUXINPUT17_BEGIN_Y"; then echo "auxinput17_begin_y=${NL_AUXINPUT17_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT17_BEGIN_Y"; then echo "auxinput17_begin_y=${NL_AUXINPUT17_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT17_BEGIN_D"; then echo "auxinput17_begin_d=${NL_AUXINPUT17_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT17_BEGIN_D"; then echo "auxinput17_begin_d=${NL_AUXINPUT17_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT17_BEGIN_H"; then echo "auxinput17_begin_h=${NL_AUXINPUT17_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT17_BEGIN_H"; then echo "auxinput17_begin_h=${NL_AUXINPUT17_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT17_BEGIN_M"; then echo "auxinput17_begin_m=${NL_AUXINPUT17_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT17_BEGIN_M"; then echo "auxinput17_begin_m=${NL_AUXINPUT17_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT17_BEGIN_S"; then echo "auxinput17_begin_s=${NL_AUXINPUT17_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT17_BEGIN_S"; then echo "auxinput17_begin_s=${NL_AUXINPUT17_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT17_BEGIN"; then echo "auxinput17_begin=${NL_AUXINPUT17_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT17_BEGIN"; then echo "auxinput17_begin=${NL_AUXINPUT17_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT17_END_Y"; then echo "auxinput17_end_y=${NL_AUXINPUT17_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT17_END_Y"; then echo "auxinput17_end_y=${NL_AUXINPUT17_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT17_END_D"; then echo "auxinput17_end_d=${NL_AUXINPUT17_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT17_END_D"; then echo "auxinput17_end_d=${NL_AUXINPUT17_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT17_END_H"; then echo "auxinput17_end_h=${NL_AUXINPUT17_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT17_END_H"; then echo "auxinput17_end_h=${NL_AUXINPUT17_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT17_END_M"; then echo "auxinput17_end_m=${NL_AUXINPUT17_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT17_END_M"; then echo "auxinput17_end_m=${NL_AUXINPUT17_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT17_END_S"; then echo "auxinput17_end_s=${NL_AUXINPUT17_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT17_END_S"; then echo "auxinput17_end_s=${NL_AUXINPUT17_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT17_END"; then echo "auxinput17_end=${NL_AUXINPUT17_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT17_END"; then echo "auxinput17_end=${NL_AUXINPUT17_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT17"; then echo "io_form_auxinput17=${NL_IO_FORM_AUXINPUT17}," 	if test ! -z "$NL_IO_FORM_AUXINPUT17"; then echo "io_form_auxinput17=${NL_IO_FORM_AUXINPUT17}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT17"; then echo "frames_per_auxinput17=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT17"; then echo "frames_per_auxinput17=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT18_INNAME"; then echo "auxinput18_inname=\"${NL_AUXINPUT18_INNAME}\","	if test ! -z "$NL_AUXINPUT18_INNAME"; then echo "auxinput18_inname=\"${NL_AUXINPUT18_INNAME}\","
if test ! -z "$NL_AUXINPUT18_OUTNAME"; then echo "auxinput18_outname=\"${NL_AUXINPUT18_OUTNAME}\	if test ! -z "$NL_AUXINPUT18_OUTNAME"; then echo "auxinput18_outname=\"${NL_AUXINPUT18_OUTNAME}\
if test ! -z "$NL_AUXINPUT18_INTERVAL_Y"; then echo "auxinput18_interval_y=${NL_AUXINPUT18_INTER	if test ! -z "$NL_AUXINPUT18_INTERVAL_Y"; then echo "auxinput18_interval_y=${NL_AUXINPUT18_INTER
if test ! -z "$NL_AUXINPUT18_INTERVAL_D"; then echo "auxinput18_interval_d=${NL_AUXINPUT18_INTER	if test ! -z "$NL_AUXINPUT18_INTERVAL_D"; then echo "auxinput18_interval_d=${NL_AUXINPUT18_INTER
if test ! -z "$NL_AUXINPUT18_INTERVAL_H"; then echo "auxinput18_interval_h=${NL_AUXINPUT18_INTER	if test ! -z "$NL_AUXINPUT18_INTERVAL_H"; then echo "auxinput18_interval_h=${NL_AUXINPUT18_INTER
if test ! -z "$NL_AUXINPUT18_INTERVAL_M"; then echo "auxinput18_interval_m=${NL_AUXINPUT18_INTER	if test ! -z "$NL_AUXINPUT18_INTERVAL_M"; then echo "auxinput18_interval_m=${NL_AUXINPUT18_INTER
if test ! -z "$NL_AUXINPUT18_INTERVAL_S"; then echo "auxinput18_interval_s=${NL_AUXINPUT18_INTER	if test ! -z "$NL_AUXINPUT18_INTERVAL_S"; then echo "auxinput18_interval_s=${NL_AUXINPUT18_INTER
if test ! -z "$NL_AUXINPUT18_INTERVAL"; then echo "auxinput18_interval=${NL_AUXINPUT18_INTERVAL}	if test ! -z "$NL_AUXINPUT18_INTERVAL"; then echo "auxinput18_interval=${NL_AUXINPUT18_INTERVAL}
if test ! -z "$NL_AUXINPUT18_BEGIN_Y"; then echo "auxinput18_begin_y=${NL_AUXINPUT18_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT18_BEGIN_Y"; then echo "auxinput18_begin_y=${NL_AUXINPUT18_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT18_BEGIN_D"; then echo "auxinput18_begin_d=${NL_AUXINPUT18_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT18_BEGIN_D"; then echo "auxinput18_begin_d=${NL_AUXINPUT18_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT18_BEGIN_H"; then echo "auxinput18_begin_h=${NL_AUXINPUT18_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT18_BEGIN_H"; then echo "auxinput18_begin_h=${NL_AUXINPUT18_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT18_BEGIN_M"; then echo "auxinput18_begin_m=${NL_AUXINPUT18_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT18_BEGIN_M"; then echo "auxinput18_begin_m=${NL_AUXINPUT18_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT18_BEGIN_S"; then echo "auxinput18_begin_s=${NL_AUXINPUT18_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT18_BEGIN_S"; then echo "auxinput18_begin_s=${NL_AUXINPUT18_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT18_BEGIN"; then echo "auxinput18_begin=${NL_AUXINPUT18_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT18_BEGIN"; then echo "auxinput18_begin=${NL_AUXINPUT18_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT18_END_Y"; then echo "auxinput18_end_y=${NL_AUXINPUT18_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT18_END_Y"; then echo "auxinput18_end_y=${NL_AUXINPUT18_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT18_END_D"; then echo "auxinput18_end_d=${NL_AUXINPUT18_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT18_END_D"; then echo "auxinput18_end_d=${NL_AUXINPUT18_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT18_END_H"; then echo "auxinput18_end_h=${NL_AUXINPUT18_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT18_END_H"; then echo "auxinput18_end_h=${NL_AUXINPUT18_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT18_END_M"; then echo "auxinput18_end_m=${NL_AUXINPUT18_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT18_END_M"; then echo "auxinput18_end_m=${NL_AUXINPUT18_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT18_END_S"; then echo "auxinput18_end_s=${NL_AUXINPUT18_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT18_END_S"; then echo "auxinput18_end_s=${NL_AUXINPUT18_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT18_END"; then echo "auxinput18_end=${NL_AUXINPUT18_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT18_END"; then echo "auxinput18_end=${NL_AUXINPUT18_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT18"; then echo "io_form_auxinput18=${NL_IO_FORM_AUXINPUT18}," 	if test ! -z "$NL_IO_FORM_AUXINPUT18"; then echo "io_form_auxinput18=${NL_IO_FORM_AUXINPUT18}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT18"; then echo "frames_per_auxinput18=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT18"; then echo "frames_per_auxinput18=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT19_INNAME"; then echo "auxinput19_inname=\"${NL_AUXINPUT19_INNAME}\","	if test ! -z "$NL_AUXINPUT19_INNAME"; then echo "auxinput19_inname=\"${NL_AUXINPUT19_INNAME}\","
if test ! -z "$NL_AUXINPUT19_OUTNAME"; then echo "auxinput19_outname=\"${NL_AUXINPUT19_OUTNAME}\	if test ! -z "$NL_AUXINPUT19_OUTNAME"; then echo "auxinput19_outname=\"${NL_AUXINPUT19_OUTNAME}\
if test ! -z "$NL_AUXINPUT19_INTERVAL_Y"; then echo "auxinput19_interval_y=${NL_AUXINPUT19_INTER	if test ! -z "$NL_AUXINPUT19_INTERVAL_Y"; then echo "auxinput19_interval_y=${NL_AUXINPUT19_INTER
if test ! -z "$NL_AUXINPUT19_INTERVAL_D"; then echo "auxinput19_interval_d=${NL_AUXINPUT19_INTER	if test ! -z "$NL_AUXINPUT19_INTERVAL_D"; then echo "auxinput19_interval_d=${NL_AUXINPUT19_INTER
if test ! -z "$NL_AUXINPUT19_INTERVAL_H"; then echo "auxinput19_interval_h=${NL_AUXINPUT19_INTER	if test ! -z "$NL_AUXINPUT19_INTERVAL_H"; then echo "auxinput19_interval_h=${NL_AUXINPUT19_INTER
if test ! -z "$NL_AUXINPUT19_INTERVAL_M"; then echo "auxinput19_interval_m=${NL_AUXINPUT19_INTER	if test ! -z "$NL_AUXINPUT19_INTERVAL_M"; then echo "auxinput19_interval_m=${NL_AUXINPUT19_INTER
if test ! -z "$NL_AUXINPUT19_INTERVAL_S"; then echo "auxinput19_interval_s=${NL_AUXINPUT19_INTER	if test ! -z "$NL_AUXINPUT19_INTERVAL_S"; then echo "auxinput19_interval_s=${NL_AUXINPUT19_INTER
if test ! -z "$NL_AUXINPUT19_INTERVAL"; then echo "auxinput19_interval=${NL_AUXINPUT19_INTERVAL}	if test ! -z "$NL_AUXINPUT19_INTERVAL"; then echo "auxinput19_interval=${NL_AUXINPUT19_INTERVAL}
if test ! -z "$NL_AUXINPUT19_BEGIN_Y"; then echo "auxinput19_begin_y=${NL_AUXINPUT19_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT19_BEGIN_Y"; then echo "auxinput19_begin_y=${NL_AUXINPUT19_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT19_BEGIN_D"; then echo "auxinput19_begin_d=${NL_AUXINPUT19_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT19_BEGIN_D"; then echo "auxinput19_begin_d=${NL_AUXINPUT19_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT19_BEGIN_H"; then echo "auxinput19_begin_h=${NL_AUXINPUT19_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT19_BEGIN_H"; then echo "auxinput19_begin_h=${NL_AUXINPUT19_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT19_BEGIN_M"; then echo "auxinput19_begin_m=${NL_AUXINPUT19_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT19_BEGIN_M"; then echo "auxinput19_begin_m=${NL_AUXINPUT19_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT19_BEGIN_S"; then echo "auxinput19_begin_s=${NL_AUXINPUT19_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT19_BEGIN_S"; then echo "auxinput19_begin_s=${NL_AUXINPUT19_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT19_BEGIN"; then echo "auxinput19_begin=${NL_AUXINPUT19_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT19_BEGIN"; then echo "auxinput19_begin=${NL_AUXINPUT19_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT19_END_Y"; then echo "auxinput19_end_y=${NL_AUXINPUT19_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT19_END_Y"; then echo "auxinput19_end_y=${NL_AUXINPUT19_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT19_END_D"; then echo "auxinput19_end_d=${NL_AUXINPUT19_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT19_END_D"; then echo "auxinput19_end_d=${NL_AUXINPUT19_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT19_END_H"; then echo "auxinput19_end_h=${NL_AUXINPUT19_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT19_END_H"; then echo "auxinput19_end_h=${NL_AUXINPUT19_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT19_END_M"; then echo "auxinput19_end_m=${NL_AUXINPUT19_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT19_END_M"; then echo "auxinput19_end_m=${NL_AUXINPUT19_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT19_END_S"; then echo "auxinput19_end_s=${NL_AUXINPUT19_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT19_END_S"; then echo "auxinput19_end_s=${NL_AUXINPUT19_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT19_END"; then echo "auxinput19_end=${NL_AUXINPUT19_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT19_END"; then echo "auxinput19_end=${NL_AUXINPUT19_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT19"; then echo "io_form_auxinput19=${NL_IO_FORM_AUXINPUT19}," 	if test ! -z "$NL_IO_FORM_AUXINPUT19"; then echo "io_form_auxinput19=${NL_IO_FORM_AUXINPUT19}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT19"; then echo "frames_per_auxinput19=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT19"; then echo "frames_per_auxinput19=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT20_INNAME"; then echo "auxinput20_inname=\"${NL_AUXINPUT20_INNAME}\","	if test ! -z "$NL_AUXINPUT20_INNAME"; then echo "auxinput20_inname=\"${NL_AUXINPUT20_INNAME}\","
if test ! -z "$NL_AUXINPUT20_OUTNAME"; then echo "auxinput20_outname=\"${NL_AUXINPUT20_OUTNAME}\	if test ! -z "$NL_AUXINPUT20_OUTNAME"; then echo "auxinput20_outname=\"${NL_AUXINPUT20_OUTNAME}\
if test ! -z "$NL_AUXINPUT20_INTERVAL_Y"; then echo "auxinput20_interval_y=${NL_AUXINPUT20_INTER	if test ! -z "$NL_AUXINPUT20_INTERVAL_Y"; then echo "auxinput20_interval_y=${NL_AUXINPUT20_INTER
if test ! -z "$NL_AUXINPUT20_INTERVAL_D"; then echo "auxinput20_interval_d=${NL_AUXINPUT20_INTER	if test ! -z "$NL_AUXINPUT20_INTERVAL_D"; then echo "auxinput20_interval_d=${NL_AUXINPUT20_INTER
if test ! -z "$NL_AUXINPUT20_INTERVAL_H"; then echo "auxinput20_interval_h=${NL_AUXINPUT20_INTER	if test ! -z "$NL_AUXINPUT20_INTERVAL_H"; then echo "auxinput20_interval_h=${NL_AUXINPUT20_INTER
if test ! -z "$NL_AUXINPUT20_INTERVAL_M"; then echo "auxinput20_interval_m=${NL_AUXINPUT20_INTER	if test ! -z "$NL_AUXINPUT20_INTERVAL_M"; then echo "auxinput20_interval_m=${NL_AUXINPUT20_INTER
if test ! -z "$NL_AUXINPUT20_INTERVAL_S"; then echo "auxinput20_interval_s=${NL_AUXINPUT20_INTER	if test ! -z "$NL_AUXINPUT20_INTERVAL_S"; then echo "auxinput20_interval_s=${NL_AUXINPUT20_INTER
if test ! -z "$NL_AUXINPUT20_INTERVAL"; then echo "auxinput20_interval=${NL_AUXINPUT20_INTERVAL}	if test ! -z "$NL_AUXINPUT20_INTERVAL"; then echo "auxinput20_interval=${NL_AUXINPUT20_INTERVAL}
if test ! -z "$NL_AUXINPUT20_BEGIN_Y"; then echo "auxinput20_begin_y=${NL_AUXINPUT20_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT20_BEGIN_Y"; then echo "auxinput20_begin_y=${NL_AUXINPUT20_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT20_BEGIN_D"; then echo "auxinput20_begin_d=${NL_AUXINPUT20_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT20_BEGIN_D"; then echo "auxinput20_begin_d=${NL_AUXINPUT20_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT20_BEGIN_H"; then echo "auxinput20_begin_h=${NL_AUXINPUT20_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT20_BEGIN_H"; then echo "auxinput20_begin_h=${NL_AUXINPUT20_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT20_BEGIN_M"; then echo "auxinput20_begin_m=${NL_AUXINPUT20_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT20_BEGIN_M"; then echo "auxinput20_begin_m=${NL_AUXINPUT20_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT20_BEGIN_S"; then echo "auxinput20_begin_s=${NL_AUXINPUT20_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT20_BEGIN_S"; then echo "auxinput20_begin_s=${NL_AUXINPUT20_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT20_BEGIN"; then echo "auxinput20_begin=${NL_AUXINPUT20_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT20_BEGIN"; then echo "auxinput20_begin=${NL_AUXINPUT20_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT20_END_Y"; then echo "auxinput20_end_y=${NL_AUXINPUT20_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT20_END_Y"; then echo "auxinput20_end_y=${NL_AUXINPUT20_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT20_END_D"; then echo "auxinput20_end_d=${NL_AUXINPUT20_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT20_END_D"; then echo "auxinput20_end_d=${NL_AUXINPUT20_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT20_END_H"; then echo "auxinput20_end_h=${NL_AUXINPUT20_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT20_END_H"; then echo "auxinput20_end_h=${NL_AUXINPUT20_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT20_END_M"; then echo "auxinput20_end_m=${NL_AUXINPUT20_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT20_END_M"; then echo "auxinput20_end_m=${NL_AUXINPUT20_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT20_END_S"; then echo "auxinput20_end_s=${NL_AUXINPUT20_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT20_END_S"; then echo "auxinput20_end_s=${NL_AUXINPUT20_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT20_END"; then echo "auxinput20_end=${NL_AUXINPUT20_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT20_END"; then echo "auxinput20_end=${NL_AUXINPUT20_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT20"; then echo "io_form_auxinput20=${NL_IO_FORM_AUXINPUT20}," 	if test ! -z "$NL_IO_FORM_AUXINPUT20"; then echo "io_form_auxinput20=${NL_IO_FORM_AUXINPUT20}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT20"; then echo "frames_per_auxinput20=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT20"; then echo "frames_per_auxinput20=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT21_INNAME"; then echo "auxinput21_inname=\"${NL_AUXINPUT21_INNAME}\","	if test ! -z "$NL_AUXINPUT21_INNAME"; then echo "auxinput21_inname=\"${NL_AUXINPUT21_INNAME}\","
if test ! -z "$NL_AUXINPUT21_OUTNAME"; then echo "auxinput21_outname=\"${NL_AUXINPUT21_OUTNAME}\	if test ! -z "$NL_AUXINPUT21_OUTNAME"; then echo "auxinput21_outname=\"${NL_AUXINPUT21_OUTNAME}\
if test ! -z "$NL_AUXINPUT21_INTERVAL_Y"; then echo "auxinput21_interval_y=${NL_AUXINPUT21_INTER	if test ! -z "$NL_AUXINPUT21_INTERVAL_Y"; then echo "auxinput21_interval_y=${NL_AUXINPUT21_INTER
if test ! -z "$NL_AUXINPUT21_INTERVAL_D"; then echo "auxinput21_interval_d=${NL_AUXINPUT21_INTER	if test ! -z "$NL_AUXINPUT21_INTERVAL_D"; then echo "auxinput21_interval_d=${NL_AUXINPUT21_INTER
if test ! -z "$NL_AUXINPUT21_INTERVAL_H"; then echo "auxinput21_interval_h=${NL_AUXINPUT21_INTER	if test ! -z "$NL_AUXINPUT21_INTERVAL_H"; then echo "auxinput21_interval_h=${NL_AUXINPUT21_INTER
if test ! -z "$NL_AUXINPUT21_INTERVAL_M"; then echo "auxinput21_interval_m=${NL_AUXINPUT21_INTER	if test ! -z "$NL_AUXINPUT21_INTERVAL_M"; then echo "auxinput21_interval_m=${NL_AUXINPUT21_INTER
if test ! -z "$NL_AUXINPUT21_INTERVAL_S"; then echo "auxinput21_interval_s=${NL_AUXINPUT21_INTER	if test ! -z "$NL_AUXINPUT21_INTERVAL_S"; then echo "auxinput21_interval_s=${NL_AUXINPUT21_INTER
if test ! -z "$NL_AUXINPUT21_INTERVAL"; then echo "auxinput21_interval=${NL_AUXINPUT21_INTERVAL}	if test ! -z "$NL_AUXINPUT21_INTERVAL"; then echo "auxinput21_interval=${NL_AUXINPUT21_INTERVAL}
if test ! -z "$NL_AUXINPUT21_BEGIN_Y"; then echo "auxinput21_begin_y=${NL_AUXINPUT21_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT21_BEGIN_Y"; then echo "auxinput21_begin_y=${NL_AUXINPUT21_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT21_BEGIN_D"; then echo "auxinput21_begin_d=${NL_AUXINPUT21_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT21_BEGIN_D"; then echo "auxinput21_begin_d=${NL_AUXINPUT21_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT21_BEGIN_H"; then echo "auxinput21_begin_h=${NL_AUXINPUT21_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT21_BEGIN_H"; then echo "auxinput21_begin_h=${NL_AUXINPUT21_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT21_BEGIN_M"; then echo "auxinput21_begin_m=${NL_AUXINPUT21_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT21_BEGIN_M"; then echo "auxinput21_begin_m=${NL_AUXINPUT21_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT21_BEGIN_S"; then echo "auxinput21_begin_s=${NL_AUXINPUT21_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT21_BEGIN_S"; then echo "auxinput21_begin_s=${NL_AUXINPUT21_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT21_BEGIN"; then echo "auxinput21_begin=${NL_AUXINPUT21_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT21_BEGIN"; then echo "auxinput21_begin=${NL_AUXINPUT21_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT21_END_Y"; then echo "auxinput21_end_y=${NL_AUXINPUT21_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT21_END_Y"; then echo "auxinput21_end_y=${NL_AUXINPUT21_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT21_END_D"; then echo "auxinput21_end_d=${NL_AUXINPUT21_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT21_END_D"; then echo "auxinput21_end_d=${NL_AUXINPUT21_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT21_END_H"; then echo "auxinput21_end_h=${NL_AUXINPUT21_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT21_END_H"; then echo "auxinput21_end_h=${NL_AUXINPUT21_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT21_END_M"; then echo "auxinput21_end_m=${NL_AUXINPUT21_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT21_END_M"; then echo "auxinput21_end_m=${NL_AUXINPUT21_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT21_END_S"; then echo "auxinput21_end_s=${NL_AUXINPUT21_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT21_END_S"; then echo "auxinput21_end_s=${NL_AUXINPUT21_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT21_END"; then echo "auxinput21_end=${NL_AUXINPUT21_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT21_END"; then echo "auxinput21_end=${NL_AUXINPUT21_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT21"; then echo "io_form_auxinput21=${NL_IO_FORM_AUXINPUT21}," 	if test ! -z "$NL_IO_FORM_AUXINPUT21"; then echo "io_form_auxinput21=${NL_IO_FORM_AUXINPUT21}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT21"; then echo "frames_per_auxinput21=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT21"; then echo "frames_per_auxinput21=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT22_INNAME"; then echo "auxinput22_inname=\"${NL_AUXINPUT22_INNAME}\","	if test ! -z "$NL_AUXINPUT22_INNAME"; then echo "auxinput22_inname=\"${NL_AUXINPUT22_INNAME}\","
if test ! -z "$NL_AUXINPUT22_OUTNAME"; then echo "auxinput22_outname=\"${NL_AUXINPUT22_OUTNAME}\	if test ! -z "$NL_AUXINPUT22_OUTNAME"; then echo "auxinput22_outname=\"${NL_AUXINPUT22_OUTNAME}\
if test ! -z "$NL_AUXINPUT22_INTERVAL_Y"; then echo "auxinput22_interval_y=${NL_AUXINPUT22_INTER	if test ! -z "$NL_AUXINPUT22_INTERVAL_Y"; then echo "auxinput22_interval_y=${NL_AUXINPUT22_INTER
if test ! -z "$NL_AUXINPUT22_INTERVAL_D"; then echo "auxinput22_interval_d=${NL_AUXINPUT22_INTER	if test ! -z "$NL_AUXINPUT22_INTERVAL_D"; then echo "auxinput22_interval_d=${NL_AUXINPUT22_INTER
if test ! -z "$NL_AUXINPUT22_INTERVAL_H"; then echo "auxinput22_interval_h=${NL_AUXINPUT22_INTER	if test ! -z "$NL_AUXINPUT22_INTERVAL_H"; then echo "auxinput22_interval_h=${NL_AUXINPUT22_INTER
if test ! -z "$NL_AUXINPUT22_INTERVAL_M"; then echo "auxinput22_interval_m=${NL_AUXINPUT22_INTER	if test ! -z "$NL_AUXINPUT22_INTERVAL_M"; then echo "auxinput22_interval_m=${NL_AUXINPUT22_INTER
if test ! -z "$NL_AUXINPUT22_INTERVAL_S"; then echo "auxinput22_interval_s=${NL_AUXINPUT22_INTER	if test ! -z "$NL_AUXINPUT22_INTERVAL_S"; then echo "auxinput22_interval_s=${NL_AUXINPUT22_INTER
if test ! -z "$NL_AUXINPUT22_INTERVAL"; then echo "auxinput22_interval=${NL_AUXINPUT22_INTERVAL}	if test ! -z "$NL_AUXINPUT22_INTERVAL"; then echo "auxinput22_interval=${NL_AUXINPUT22_INTERVAL}
if test ! -z "$NL_AUXINPUT22_BEGIN_Y"; then echo "auxinput22_begin_y=${NL_AUXINPUT22_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT22_BEGIN_Y"; then echo "auxinput22_begin_y=${NL_AUXINPUT22_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT22_BEGIN_D"; then echo "auxinput22_begin_d=${NL_AUXINPUT22_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT22_BEGIN_D"; then echo "auxinput22_begin_d=${NL_AUXINPUT22_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT22_BEGIN_H"; then echo "auxinput22_begin_h=${NL_AUXINPUT22_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT22_BEGIN_H"; then echo "auxinput22_begin_h=${NL_AUXINPUT22_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT22_BEGIN_M"; then echo "auxinput22_begin_m=${NL_AUXINPUT22_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT22_BEGIN_M"; then echo "auxinput22_begin_m=${NL_AUXINPUT22_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT22_BEGIN_S"; then echo "auxinput22_begin_s=${NL_AUXINPUT22_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT22_BEGIN_S"; then echo "auxinput22_begin_s=${NL_AUXINPUT22_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT22_BEGIN"; then echo "auxinput22_begin=${NL_AUXINPUT22_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT22_BEGIN"; then echo "auxinput22_begin=${NL_AUXINPUT22_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT22_END_Y"; then echo "auxinput22_end_y=${NL_AUXINPUT22_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT22_END_Y"; then echo "auxinput22_end_y=${NL_AUXINPUT22_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT22_END_D"; then echo "auxinput22_end_d=${NL_AUXINPUT22_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT22_END_D"; then echo "auxinput22_end_d=${NL_AUXINPUT22_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT22_END_H"; then echo "auxinput22_end_h=${NL_AUXINPUT22_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT22_END_H"; then echo "auxinput22_end_h=${NL_AUXINPUT22_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT22_END_M"; then echo "auxinput22_end_m=${NL_AUXINPUT22_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT22_END_M"; then echo "auxinput22_end_m=${NL_AUXINPUT22_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT22_END_S"; then echo "auxinput22_end_s=${NL_AUXINPUT22_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT22_END_S"; then echo "auxinput22_end_s=${NL_AUXINPUT22_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT22_END"; then echo "auxinput22_end=${NL_AUXINPUT22_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT22_END"; then echo "auxinput22_end=${NL_AUXINPUT22_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT22"; then echo "io_form_auxinput22=${NL_IO_FORM_AUXINPUT22}," 	if test ! -z "$NL_IO_FORM_AUXINPUT22"; then echo "io_form_auxinput22=${NL_IO_FORM_AUXINPUT22}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT22"; then echo "frames_per_auxinput22=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT22"; then echo "frames_per_auxinput22=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT23_INNAME"; then echo "auxinput23_inname=\"${NL_AUXINPUT23_INNAME}\","	if test ! -z "$NL_AUXINPUT23_INNAME"; then echo "auxinput23_inname=\"${NL_AUXINPUT23_INNAME}\","
if test ! -z "$NL_AUXINPUT23_OUTNAME"; then echo "auxinput23_outname=\"${NL_AUXINPUT23_OUTNAME}\	if test ! -z "$NL_AUXINPUT23_OUTNAME"; then echo "auxinput23_outname=\"${NL_AUXINPUT23_OUTNAME}\
if test ! -z "$NL_AUXINPUT23_INTERVAL_Y"; then echo "auxinput23_interval_y=${NL_AUXINPUT23_INTER	if test ! -z "$NL_AUXINPUT23_INTERVAL_Y"; then echo "auxinput23_interval_y=${NL_AUXINPUT23_INTER
if test ! -z "$NL_AUXINPUT23_INTERVAL_D"; then echo "auxinput23_interval_d=${NL_AUXINPUT23_INTER	if test ! -z "$NL_AUXINPUT23_INTERVAL_D"; then echo "auxinput23_interval_d=${NL_AUXINPUT23_INTER
if test ! -z "$NL_AUXINPUT23_INTERVAL_H"; then echo "auxinput23_interval_h=${NL_AUXINPUT23_INTER	if test ! -z "$NL_AUXINPUT23_INTERVAL_H"; then echo "auxinput23_interval_h=${NL_AUXINPUT23_INTER
if test ! -z "$NL_AUXINPUT23_INTERVAL_M"; then echo "auxinput23_interval_m=${NL_AUXINPUT23_INTER	if test ! -z "$NL_AUXINPUT23_INTERVAL_M"; then echo "auxinput23_interval_m=${NL_AUXINPUT23_INTER
if test ! -z "$NL_AUXINPUT23_INTERVAL_S"; then echo "auxinput23_interval_s=${NL_AUXINPUT23_INTER	if test ! -z "$NL_AUXINPUT23_INTERVAL_S"; then echo "auxinput23_interval_s=${NL_AUXINPUT23_INTER
if test ! -z "$NL_AUXINPUT23_INTERVAL"; then echo "auxinput23_interval=${NL_AUXINPUT23_INTERVAL}	if test ! -z "$NL_AUXINPUT23_INTERVAL"; then echo "auxinput23_interval=${NL_AUXINPUT23_INTERVAL}
if test ! -z "$NL_AUXINPUT23_BEGIN_Y"; then echo "auxinput23_begin_y=${NL_AUXINPUT23_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT23_BEGIN_Y"; then echo "auxinput23_begin_y=${NL_AUXINPUT23_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT23_BEGIN_D"; then echo "auxinput23_begin_d=${NL_AUXINPUT23_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT23_BEGIN_D"; then echo "auxinput23_begin_d=${NL_AUXINPUT23_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT23_BEGIN_H"; then echo "auxinput23_begin_h=${NL_AUXINPUT23_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT23_BEGIN_H"; then echo "auxinput23_begin_h=${NL_AUXINPUT23_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT23_BEGIN_M"; then echo "auxinput23_begin_m=${NL_AUXINPUT23_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT23_BEGIN_M"; then echo "auxinput23_begin_m=${NL_AUXINPUT23_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT23_BEGIN_S"; then echo "auxinput23_begin_s=${NL_AUXINPUT23_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT23_BEGIN_S"; then echo "auxinput23_begin_s=${NL_AUXINPUT23_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT23_BEGIN"; then echo "auxinput23_begin=${NL_AUXINPUT23_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT23_BEGIN"; then echo "auxinput23_begin=${NL_AUXINPUT23_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT23_END_Y"; then echo "auxinput23_end_y=${NL_AUXINPUT23_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT23_END_Y"; then echo "auxinput23_end_y=${NL_AUXINPUT23_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT23_END_D"; then echo "auxinput23_end_d=${NL_AUXINPUT23_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT23_END_D"; then echo "auxinput23_end_d=${NL_AUXINPUT23_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT23_END_H"; then echo "auxinput23_end_h=${NL_AUXINPUT23_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT23_END_H"; then echo "auxinput23_end_h=${NL_AUXINPUT23_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT23_END_M"; then echo "auxinput23_end_m=${NL_AUXINPUT23_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT23_END_M"; then echo "auxinput23_end_m=${NL_AUXINPUT23_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT23_END_S"; then echo "auxinput23_end_s=${NL_AUXINPUT23_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT23_END_S"; then echo "auxinput23_end_s=${NL_AUXINPUT23_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT23_END"; then echo "auxinput23_end=${NL_AUXINPUT23_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT23_END"; then echo "auxinput23_end=${NL_AUXINPUT23_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT23"; then echo "io_form_auxinput23=${NL_IO_FORM_AUXINPUT23}," 	if test ! -z "$NL_IO_FORM_AUXINPUT23"; then echo "io_form_auxinput23=${NL_IO_FORM_AUXINPUT23}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT23"; then echo "frames_per_auxinput23=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT23"; then echo "frames_per_auxinput23=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_AUXINPUT24_INNAME"; then echo "auxinput24_inname=\"${NL_AUXINPUT24_INNAME}\","	if test ! -z "$NL_AUXINPUT24_INNAME"; then echo "auxinput24_inname=\"${NL_AUXINPUT24_INNAME}\","
if test ! -z "$NL_AUXINPUT24_OUTNAME"; then echo "auxinput24_outname=\"${NL_AUXINPUT24_OUTNAME}\	if test ! -z "$NL_AUXINPUT24_OUTNAME"; then echo "auxinput24_outname=\"${NL_AUXINPUT24_OUTNAME}\
if test ! -z "$NL_AUXINPUT24_INTERVAL_Y"; then echo "auxinput24_interval_y=${NL_AUXINPUT24_INTER	if test ! -z "$NL_AUXINPUT24_INTERVAL_Y"; then echo "auxinput24_interval_y=${NL_AUXINPUT24_INTER
if test ! -z "$NL_AUXINPUT24_INTERVAL_D"; then echo "auxinput24_interval_d=${NL_AUXINPUT24_INTER	if test ! -z "$NL_AUXINPUT24_INTERVAL_D"; then echo "auxinput24_interval_d=${NL_AUXINPUT24_INTER
if test ! -z "$NL_AUXINPUT24_INTERVAL_H"; then echo "auxinput24_interval_h=${NL_AUXINPUT24_INTER	if test ! -z "$NL_AUXINPUT24_INTERVAL_H"; then echo "auxinput24_interval_h=${NL_AUXINPUT24_INTER
if test ! -z "$NL_AUXINPUT24_INTERVAL_M"; then echo "auxinput24_interval_m=${NL_AUXINPUT24_INTER	if test ! -z "$NL_AUXINPUT24_INTERVAL_M"; then echo "auxinput24_interval_m=${NL_AUXINPUT24_INTER
if test ! -z "$NL_AUXINPUT24_INTERVAL_S"; then echo "auxinput24_interval_s=${NL_AUXINPUT24_INTER	if test ! -z "$NL_AUXINPUT24_INTERVAL_S"; then echo "auxinput24_interval_s=${NL_AUXINPUT24_INTER
if test ! -z "$NL_AUXINPUT24_INTERVAL"; then echo "auxinput24_interval=${NL_AUXINPUT24_INTERVAL}	if test ! -z "$NL_AUXINPUT24_INTERVAL"; then echo "auxinput24_interval=${NL_AUXINPUT24_INTERVAL}
if test ! -z "$NL_AUXINPUT24_BEGIN_Y"; then echo "auxinput24_begin_y=${NL_AUXINPUT24_BEGIN_Y}," 	if test ! -z "$NL_AUXINPUT24_BEGIN_Y"; then echo "auxinput24_begin_y=${NL_AUXINPUT24_BEGIN_Y}," 
if test ! -z "$NL_AUXINPUT24_BEGIN_D"; then echo "auxinput24_begin_d=${NL_AUXINPUT24_BEGIN_D}," 	if test ! -z "$NL_AUXINPUT24_BEGIN_D"; then echo "auxinput24_begin_d=${NL_AUXINPUT24_BEGIN_D}," 
if test ! -z "$NL_AUXINPUT24_BEGIN_H"; then echo "auxinput24_begin_h=${NL_AUXINPUT24_BEGIN_H}," 	if test ! -z "$NL_AUXINPUT24_BEGIN_H"; then echo "auxinput24_begin_h=${NL_AUXINPUT24_BEGIN_H}," 
if test ! -z "$NL_AUXINPUT24_BEGIN_M"; then echo "auxinput24_begin_m=${NL_AUXINPUT24_BEGIN_M}," 	if test ! -z "$NL_AUXINPUT24_BEGIN_M"; then echo "auxinput24_begin_m=${NL_AUXINPUT24_BEGIN_M}," 
if test ! -z "$NL_AUXINPUT24_BEGIN_S"; then echo "auxinput24_begin_s=${NL_AUXINPUT24_BEGIN_S}," 	if test ! -z "$NL_AUXINPUT24_BEGIN_S"; then echo "auxinput24_begin_s=${NL_AUXINPUT24_BEGIN_S}," 
if test ! -z "$NL_AUXINPUT24_BEGIN"; then echo "auxinput24_begin=${NL_AUXINPUT24_BEGIN}," >> $FI	if test ! -z "$NL_AUXINPUT24_BEGIN"; then echo "auxinput24_begin=${NL_AUXINPUT24_BEGIN}," >> $FI
if test ! -z "$NL_AUXINPUT24_END_Y"; then echo "auxinput24_end_y=${NL_AUXINPUT24_END_Y}," >> $FI	if test ! -z "$NL_AUXINPUT24_END_Y"; then echo "auxinput24_end_y=${NL_AUXINPUT24_END_Y}," >> $FI
if test ! -z "$NL_AUXINPUT24_END_D"; then echo "auxinput24_end_d=${NL_AUXINPUT24_END_D}," >> $FI	if test ! -z "$NL_AUXINPUT24_END_D"; then echo "auxinput24_end_d=${NL_AUXINPUT24_END_D}," >> $FI
if test ! -z "$NL_AUXINPUT24_END_H"; then echo "auxinput24_end_h=${NL_AUXINPUT24_END_H}," >> $FI	if test ! -z "$NL_AUXINPUT24_END_H"; then echo "auxinput24_end_h=${NL_AUXINPUT24_END_H}," >> $FI
if test ! -z "$NL_AUXINPUT24_END_M"; then echo "auxinput24_end_m=${NL_AUXINPUT24_END_M}," >> $FI	if test ! -z "$NL_AUXINPUT24_END_M"; then echo "auxinput24_end_m=${NL_AUXINPUT24_END_M}," >> $FI
if test ! -z "$NL_AUXINPUT24_END_S"; then echo "auxinput24_end_s=${NL_AUXINPUT24_END_S}," >> $FI	if test ! -z "$NL_AUXINPUT24_END_S"; then echo "auxinput24_end_s=${NL_AUXINPUT24_END_S}," >> $FI
if test ! -z "$NL_AUXINPUT24_END"; then echo "auxinput24_end=${NL_AUXINPUT24_END}," >> $FILE;fi		if test ! -z "$NL_AUXINPUT24_END"; then echo "auxinput24_end=${NL_AUXINPUT24_END}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_AUXINPUT24"; then echo "io_form_auxinput24=${NL_IO_FORM_AUXINPUT24}," 	if test ! -z "$NL_IO_FORM_AUXINPUT24"; then echo "io_form_auxinput24=${NL_IO_FORM_AUXINPUT24}," 
if test ! -z "$NL_FRAMES_PER_AUXINPUT24"; then echo "frames_per_auxinput24=${NL_FRAMES_PER_AUXIN	if test ! -z "$NL_FRAMES_PER_AUXINPUT24"; then echo "frames_per_auxinput24=${NL_FRAMES_PER_AUXIN
if test ! -z "$NL_HISTORY_INTERVAL"; then echo "history_interval=${NL_HISTORY_INTERVAL}," >> $FI	if test ! -z "$NL_HISTORY_INTERVAL"; then echo "history_interval=${NL_HISTORY_INTERVAL}," >> $FI
if test ! -z "$NL_FRAMES_PER_OUTFILE"; then echo "frames_per_outfile=${NL_FRAMES_PER_OUTFILE}," 	if test ! -z "$NL_FRAMES_PER_OUTFILE"; then echo "frames_per_outfile=${NL_FRAMES_PER_OUTFILE}," 
if test ! -z "$NL_RESTART"; then echo "restart=${NL_RESTART}," >> $FILE;fi				if test ! -z "$NL_RESTART"; then echo "restart=${NL_RESTART}," >> $FILE;fi
if test ! -z "$NL_RESTART_INTERVAL"; then echo "restart_interval=${NL_RESTART_INTERVAL}," >> $FI	if test ! -z "$NL_RESTART_INTERVAL"; then echo "restart_interval=${NL_RESTART_INTERVAL}," >> $FI
if test ! -z "$NL_IO_FORM_INPUT"; then echo "io_form_input=${NL_IO_FORM_INPUT}," >> $FILE;fi		if test ! -z "$NL_IO_FORM_INPUT"; then echo "io_form_input=${NL_IO_FORM_INPUT}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_HISTORY"; then echo "io_form_history=${NL_IO_FORM_HISTORY}," >> $FILE;	if test ! -z "$NL_IO_FORM_HISTORY"; then echo "io_form_history=${NL_IO_FORM_HISTORY}," >> $FILE;
if test ! -z "$NL_IO_FORM_RESTART"; then echo "io_form_restart=${NL_IO_FORM_RESTART}," >> $FILE;	if test ! -z "$NL_IO_FORM_RESTART"; then echo "io_form_restart=${NL_IO_FORM_RESTART}," >> $FILE;
if test ! -z "$NL_IO_FORM_BOUNDARY"; then echo "io_form_boundary=${NL_IO_FORM_BOUNDARY}," >> $FI	if test ! -z "$NL_IO_FORM_BOUNDARY"; then echo "io_form_boundary=${NL_IO_FORM_BOUNDARY}," >> $FI
if test ! -z "$NL_DEBUG_LEVEL"; then echo "debug_level=${NL_DEBUG_LEVEL}," >> $FILE;fi			if test ! -z "$NL_DEBUG_LEVEL"; then echo "debug_level=${NL_DEBUG_LEVEL}," >> $FILE;fi
if test ! -z "$NL_SELF_TEST_DOMAIN"; then echo "self_test_domain=${NL_SELF_TEST_DOMAIN}," >> $FI	if test ! -z "$NL_SELF_TEST_DOMAIN"; then echo "self_test_domain=${NL_SELF_TEST_DOMAIN}," >> $FI
if test ! -z "$NL_HISTORY_OUTNAME"; then echo "history_outname=\"${NL_HISTORY_OUTNAME}\"," >> $F	if test ! -z "$NL_HISTORY_OUTNAME"; then echo "history_outname=\"${NL_HISTORY_OUTNAME}\"," >> $F
if test ! -z "$NL_HISTORY_INNAME"; then echo "history_inname=\"${NL_HISTORY_INNAME}\"," >> $FILE	if test ! -z "$NL_HISTORY_INNAME"; then echo "history_inname=\"${NL_HISTORY_INNAME}\"," >> $FILE
if test ! -z "$NL_USE_NETCDF_CLASSIC"; then echo "use_netcdf_classic=${NL_USE_NETCDF_CLASSIC}," 	if test ! -z "$NL_USE_NETCDF_CLASSIC"; then echo "use_netcdf_classic=${NL_USE_NETCDF_CLASSIC}," 
if test ! -z "$NL_HISTORY_INTERVAL_D"; then echo "history_interval_d=${NL_HISTORY_INTERVAL_D}," 	if test ! -z "$NL_HISTORY_INTERVAL_D"; then echo "history_interval_d=${NL_HISTORY_INTERVAL_D}," 
if test ! -z "$NL_HISTORY_INTERVAL_H"; then echo "history_interval_h=${NL_HISTORY_INTERVAL_H}," 	if test ! -z "$NL_HISTORY_INTERVAL_H"; then echo "history_interval_h=${NL_HISTORY_INTERVAL_H}," 
if test ! -z "$NL_HISTORY_INTERVAL_M"; then echo "history_interval_m=${NL_HISTORY_INTERVAL_M}," 	if test ! -z "$NL_HISTORY_INTERVAL_M"; then echo "history_interval_m=${NL_HISTORY_INTERVAL_M}," 
if test ! -z "$NL_HISTORY_INTERVAL_S"; then echo "history_interval_s=${NL_HISTORY_INTERVAL_S}," 	if test ! -z "$NL_HISTORY_INTERVAL_S"; then echo "history_interval_s=${NL_HISTORY_INTERVAL_S}," 
if test ! -z "$NL_INPUTOUT_INTERVAL_D"; then echo "inputout_interval_d=${NL_INPUTOUT_INTERVAL_D}	if test ! -z "$NL_INPUTOUT_INTERVAL_D"; then echo "inputout_interval_d=${NL_INPUTOUT_INTERVAL_D}
if test ! -z "$NL_INPUTOUT_INTERVAL_H"; then echo "inputout_interval_h=${NL_INPUTOUT_INTERVAL_H}	if test ! -z "$NL_INPUTOUT_INTERVAL_H"; then echo "inputout_interval_h=${NL_INPUTOUT_INTERVAL_H}
if test ! -z "$NL_INPUTOUT_INTERVAL_M"; then echo "inputout_interval_m=${NL_INPUTOUT_INTERVAL_M}	if test ! -z "$NL_INPUTOUT_INTERVAL_M"; then echo "inputout_interval_m=${NL_INPUTOUT_INTERVAL_M}
if test ! -z "$NL_INPUTOUT_INTERVAL_S"; then echo "inputout_interval_s=${NL_INPUTOUT_INTERVAL_S}	if test ! -z "$NL_INPUTOUT_INTERVAL_S"; then echo "inputout_interval_s=${NL_INPUTOUT_INTERVAL_S}
if test ! -z "$NL_INPUTOUT_INTERVAL"; then echo "inputout_interval=${NL_INPUTOUT_INTERVAL}," >> 	if test ! -z "$NL_INPUTOUT_INTERVAL"; then echo "inputout_interval=${NL_INPUTOUT_INTERVAL}," >> 
if test ! -z "$NL_RESTART_INTERVAL_D"; then echo "restart_interval_d=${NL_RESTART_INTERVAL_D}," 	if test ! -z "$NL_RESTART_INTERVAL_D"; then echo "restart_interval_d=${NL_RESTART_INTERVAL_D}," 
if test ! -z "$NL_RESTART_INTERVAL_H"; then echo "restart_interval_h=${NL_RESTART_INTERVAL_H}," 	if test ! -z "$NL_RESTART_INTERVAL_H"; then echo "restart_interval_h=${NL_RESTART_INTERVAL_H}," 
if test ! -z "$NL_RESTART_INTERVAL_M"; then echo "restart_interval_m=${NL_RESTART_INTERVAL_M}," 	if test ! -z "$NL_RESTART_INTERVAL_M"; then echo "restart_interval_m=${NL_RESTART_INTERVAL_M}," 
if test ! -z "$NL_RESTART_INTERVAL_S"; then echo "restart_interval_s=${NL_RESTART_INTERVAL_S}," 	if test ! -z "$NL_RESTART_INTERVAL_S"; then echo "restart_interval_s=${NL_RESTART_INTERVAL_S}," 
if test ! -z "$NL_HISTORY_BEGIN_Y"; then echo "history_begin_y=${NL_HISTORY_BEGIN_Y}," >> $FILE;	if test ! -z "$NL_HISTORY_BEGIN_Y"; then echo "history_begin_y=${NL_HISTORY_BEGIN_Y}," >> $FILE;
if test ! -z "$NL_HISTORY_BEGIN_D"; then echo "history_begin_d=${NL_HISTORY_BEGIN_D}," >> $FILE;	if test ! -z "$NL_HISTORY_BEGIN_D"; then echo "history_begin_d=${NL_HISTORY_BEGIN_D}," >> $FILE;
if test ! -z "$NL_HISTORY_BEGIN_H"; then echo "history_begin_h=${NL_HISTORY_BEGIN_H}," >> $FILE;	if test ! -z "$NL_HISTORY_BEGIN_H"; then echo "history_begin_h=${NL_HISTORY_BEGIN_H}," >> $FILE;
if test ! -z "$NL_HISTORY_BEGIN_M"; then echo "history_begin_m=${NL_HISTORY_BEGIN_M}," >> $FILE;	if test ! -z "$NL_HISTORY_BEGIN_M"; then echo "history_begin_m=${NL_HISTORY_BEGIN_M}," >> $FILE;
if test ! -z "$NL_HISTORY_BEGIN_S"; then echo "history_begin_s=${NL_HISTORY_BEGIN_S}," >> $FILE;	if test ! -z "$NL_HISTORY_BEGIN_S"; then echo "history_begin_s=${NL_HISTORY_BEGIN_S}," >> $FILE;
if test ! -z "$NL_HISTORY_BEGIN"; then echo "history_begin=${NL_HISTORY_BEGIN}," >> $FILE;fi		if test ! -z "$NL_HISTORY_BEGIN"; then echo "history_begin=${NL_HISTORY_BEGIN}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_BEGIN_Y"; then echo "inputout_begin_y=${NL_INPUTOUT_BEGIN_Y}," >> $FI	if test ! -z "$NL_INPUTOUT_BEGIN_Y"; then echo "inputout_begin_y=${NL_INPUTOUT_BEGIN_Y}," >> $FI
if test ! -z "$NL_INPUTOUT_BEGIN_D"; then echo "inputout_begin_d=${NL_INPUTOUT_BEGIN_D}," >> $FI	if test ! -z "$NL_INPUTOUT_BEGIN_D"; then echo "inputout_begin_d=${NL_INPUTOUT_BEGIN_D}," >> $FI
if test ! -z "$NL_INPUTOUT_BEGIN_H"; then echo "inputout_begin_h=${NL_INPUTOUT_BEGIN_H}," >> $FI	if test ! -z "$NL_INPUTOUT_BEGIN_H"; then echo "inputout_begin_h=${NL_INPUTOUT_BEGIN_H}," >> $FI
if test ! -z "$NL_INPUTOUT_BEGIN_M"; then echo "inputout_begin_m=${NL_INPUTOUT_BEGIN_M}," >> $FI	if test ! -z "$NL_INPUTOUT_BEGIN_M"; then echo "inputout_begin_m=${NL_INPUTOUT_BEGIN_M}," >> $FI
if test ! -z "$NL_INPUTOUT_BEGIN_S"; then echo "inputout_begin_s=${NL_INPUTOUT_BEGIN_S}," >> $FI	if test ! -z "$NL_INPUTOUT_BEGIN_S"; then echo "inputout_begin_s=${NL_INPUTOUT_BEGIN_S}," >> $FI
if test ! -z "$NL_RESTART_BEGIN_Y"; then echo "restart_begin_y=${NL_RESTART_BEGIN_Y}," >> $FILE;	if test ! -z "$NL_RESTART_BEGIN_Y"; then echo "restart_begin_y=${NL_RESTART_BEGIN_Y}," >> $FILE;
if test ! -z "$NL_RESTART_BEGIN_D"; then echo "restart_begin_d=${NL_RESTART_BEGIN_D}," >> $FILE;	if test ! -z "$NL_RESTART_BEGIN_D"; then echo "restart_begin_d=${NL_RESTART_BEGIN_D}," >> $FILE;
if test ! -z "$NL_RESTART_BEGIN_H"; then echo "restart_begin_h=${NL_RESTART_BEGIN_H}," >> $FILE;	if test ! -z "$NL_RESTART_BEGIN_H"; then echo "restart_begin_h=${NL_RESTART_BEGIN_H}," >> $FILE;
if test ! -z "$NL_RESTART_BEGIN_M"; then echo "restart_begin_m=${NL_RESTART_BEGIN_M}," >> $FILE;	if test ! -z "$NL_RESTART_BEGIN_M"; then echo "restart_begin_m=${NL_RESTART_BEGIN_M}," >> $FILE;
if test ! -z "$NL_RESTART_BEGIN_S"; then echo "restart_begin_s=${NL_RESTART_BEGIN_S}," >> $FILE;	if test ! -z "$NL_RESTART_BEGIN_S"; then echo "restart_begin_s=${NL_RESTART_BEGIN_S}," >> $FILE;
if test ! -z "$NL_RESTART_BEGIN"; then echo "restart_begin=${NL_RESTART_BEGIN}," >> $FILE;fi		if test ! -z "$NL_RESTART_BEGIN"; then echo "restart_begin=${NL_RESTART_BEGIN}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END_Y"; then echo "history_end_y=${NL_HISTORY_END_Y}," >> $FILE;fi		if test ! -z "$NL_HISTORY_END_Y"; then echo "history_end_y=${NL_HISTORY_END_Y}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END_D"; then echo "history_end_d=${NL_HISTORY_END_D}," >> $FILE;fi		if test ! -z "$NL_HISTORY_END_D"; then echo "history_end_d=${NL_HISTORY_END_D}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END_H"; then echo "history_end_h=${NL_HISTORY_END_H}," >> $FILE;fi		if test ! -z "$NL_HISTORY_END_H"; then echo "history_end_h=${NL_HISTORY_END_H}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END_M"; then echo "history_end_m=${NL_HISTORY_END_M}," >> $FILE;fi		if test ! -z "$NL_HISTORY_END_M"; then echo "history_end_m=${NL_HISTORY_END_M}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END_S"; then echo "history_end_s=${NL_HISTORY_END_S}," >> $FILE;fi		if test ! -z "$NL_HISTORY_END_S"; then echo "history_end_s=${NL_HISTORY_END_S}," >> $FILE;fi
if test ! -z "$NL_HISTORY_END"; then echo "history_end=${NL_HISTORY_END}," >> $FILE;fi			if test ! -z "$NL_HISTORY_END"; then echo "history_end=${NL_HISTORY_END}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_END_Y"; then echo "inputout_end_y=${NL_INPUTOUT_END_Y}," >> $FILE;fi		if test ! -z "$NL_INPUTOUT_END_Y"; then echo "inputout_end_y=${NL_INPUTOUT_END_Y}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_END_D"; then echo "inputout_end_d=${NL_INPUTOUT_END_D}," >> $FILE;fi		if test ! -z "$NL_INPUTOUT_END_D"; then echo "inputout_end_d=${NL_INPUTOUT_END_D}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_END_H"; then echo "inputout_end_h=${NL_INPUTOUT_END_H}," >> $FILE;fi		if test ! -z "$NL_INPUTOUT_END_H"; then echo "inputout_end_h=${NL_INPUTOUT_END_H}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_END_M"; then echo "inputout_end_m=${NL_INPUTOUT_END_M}," >> $FILE;fi		if test ! -z "$NL_INPUTOUT_END_M"; then echo "inputout_end_m=${NL_INPUTOUT_END_M}," >> $FILE;fi
if test ! -z "$NL_INPUTOUT_END_S"; then echo "inputout_end_s=${NL_INPUTOUT_END_S}," >> $FILE;fi		if test ! -z "$NL_INPUTOUT_END_S"; then echo "inputout_end_s=${NL_INPUTOUT_END_S}," >> $FILE;fi
if test ! -z "$NL_RESET_SIMULATION_START"; then echo "reset_simulation_start=${NL_RESET_SIMULATI	if test ! -z "$NL_RESET_SIMULATION_START"; then echo "reset_simulation_start=${NL_RESET_SIMULATI
if test ! -z "$NL_IOFIELDS_FILENAME"; then echo "iofields_filename=\"${NL_IOFIELDS_FILENAME}\","	if test ! -z "$NL_IOFIELDS_FILENAME"; then echo "iofields_filename=\"${NL_IOFIELDS_FILENAME}\","
if test ! -z "$NL_IGNORE_IOFIELDS_WARNING"; then echo "ignore_iofields_warning=${NL_IGNORE_IOFIE	if test ! -z "$NL_IGNORE_IOFIELDS_WARNING"; then echo "ignore_iofields_warning=${NL_IGNORE_IOFIE
if test ! -z "$NL_NCD_NOFILL"; then echo "ncd_nofill=${NL_NCD_NOFILL}," >> $FILE;fi			if test ! -z "$NL_NCD_NOFILL"; then echo "ncd_nofill=${NL_NCD_NOFILL}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&pio_control >> $FILE										echo \&pio_control >> $FILE
if test ! -z "$NL_USEPIO"; then echo "usepio=${NL_USEPIO}," >> $FILE;fi					if test ! -z "$NL_USEPIO"; then echo "usepio=${NL_USEPIO}," >> $FILE;fi
if test ! -z "$NL_PIOPROCS"; then echo "pioprocs=${NL_PIOPROCS}," >> $FILE;fi				if test ! -z "$NL_PIOPROCS"; then echo "pioprocs=${NL_PIOPROCS}," >> $FILE;fi
if test ! -z "$NL_PIOSTART"; then echo "piostart=${NL_PIOSTART}," >> $FILE;fi				if test ! -z "$NL_PIOSTART"; then echo "piostart=${NL_PIOSTART}," >> $FILE;fi
if test ! -z "$NL_PIOSTRIDE"; then echo "piostride=${NL_PIOSTRIDE}," >> $FILE;fi			if test ! -z "$NL_PIOSTRIDE"; then echo "piostride=${NL_PIOSTRIDE}," >> $FILE;fi
if test ! -z "$NL_PIOSHIFT"; then echo "pioshift=${NL_PIOSHIFT}," >> $FILE;fi				if test ! -z "$NL_PIOSHIFT"; then echo "pioshift=${NL_PIOSHIFT}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&dfi_control >> $FILE										echo \&dfi_control >> $FILE
if test ! -z "$NL_DFI_OPT"; then echo "dfi_opt=${NL_DFI_OPT}," >> $FILE;fi				if test ! -z "$NL_DFI_OPT"; then echo "dfi_opt=${NL_DFI_OPT}," >> $FILE;fi
if test ! -z "$NL_DFI_SAVEHYDMETEORS"; then echo "dfi_savehydmeteors=${NL_DFI_SAVEHYDMETEORS}," 	if test ! -z "$NL_DFI_SAVEHYDMETEORS"; then echo "dfi_savehydmeteors=${NL_DFI_SAVEHYDMETEORS}," 
if test ! -z "$NL_DFI_NFILTER"; then echo "dfi_nfilter=${NL_DFI_NFILTER}," >> $FILE;fi			if test ! -z "$NL_DFI_NFILTER"; then echo "dfi_nfilter=${NL_DFI_NFILTER}," >> $FILE;fi
if test ! -z "$NL_DFI_WRITE_FILTERED_INPUT"; then echo "dfi_write_filtered_input=${NL_DFI_WRITE_	if test ! -z "$NL_DFI_WRITE_FILTERED_INPUT"; then echo "dfi_write_filtered_input=${NL_DFI_WRITE_
if test ! -z "$NL_DFI_WRITE_DFI_HISTORY"; then echo "dfi_write_dfi_history=${NL_DFI_WRITE_DFI_HI	if test ! -z "$NL_DFI_WRITE_DFI_HISTORY"; then echo "dfi_write_dfi_history=${NL_DFI_WRITE_DFI_HI
if test ! -z "$NL_DFI_CUTOFF_SECONDS"; then echo "dfi_cutoff_seconds=${NL_DFI_CUTOFF_SECONDS}," 	if test ! -z "$NL_DFI_CUTOFF_SECONDS"; then echo "dfi_cutoff_seconds=${NL_DFI_CUTOFF_SECONDS}," 
if test ! -z "$NL_DFI_TIME_DIM"; then echo "dfi_time_dim=${NL_DFI_TIME_DIM}," >> $FILE;fi		if test ! -z "$NL_DFI_TIME_DIM"; then echo "dfi_time_dim=${NL_DFI_TIME_DIM}," >> $FILE;fi
if test ! -z "$NL_DFI_FWDSTOP_YEAR"; then echo "dfi_fwdstop_year=${NL_DFI_FWDSTOP_YEAR}," >> $FI	if test ! -z "$NL_DFI_FWDSTOP_YEAR"; then echo "dfi_fwdstop_year=${NL_DFI_FWDSTOP_YEAR}," >> $FI
if test ! -z "$NL_DFI_FWDSTOP_MONTH"; then echo "dfi_fwdstop_month=${NL_DFI_FWDSTOP_MONTH}," >> 	if test ! -z "$NL_DFI_FWDSTOP_MONTH"; then echo "dfi_fwdstop_month=${NL_DFI_FWDSTOP_MONTH}," >> 
if test ! -z "$NL_DFI_FWDSTOP_DAY"; then echo "dfi_fwdstop_day=${NL_DFI_FWDSTOP_DAY}," >> $FILE;	if test ! -z "$NL_DFI_FWDSTOP_DAY"; then echo "dfi_fwdstop_day=${NL_DFI_FWDSTOP_DAY}," >> $FILE;
if test ! -z "$NL_DFI_FWDSTOP_HOUR"; then echo "dfi_fwdstop_hour=${NL_DFI_FWDSTOP_HOUR}," >> $FI	if test ! -z "$NL_DFI_FWDSTOP_HOUR"; then echo "dfi_fwdstop_hour=${NL_DFI_FWDSTOP_HOUR}," >> $FI
if test ! -z "$NL_DFI_FWDSTOP_MINUTE"; then echo "dfi_fwdstop_minute=${NL_DFI_FWDSTOP_MINUTE}," 	if test ! -z "$NL_DFI_FWDSTOP_MINUTE"; then echo "dfi_fwdstop_minute=${NL_DFI_FWDSTOP_MINUTE}," 
if test ! -z "$NL_DFI_FWDSTOP_SECOND"; then echo "dfi_fwdstop_second=${NL_DFI_FWDSTOP_SECOND}," 	if test ! -z "$NL_DFI_FWDSTOP_SECOND"; then echo "dfi_fwdstop_second=${NL_DFI_FWDSTOP_SECOND}," 
if test ! -z "$NL_DFI_BCKSTOP_YEAR"; then echo "dfi_bckstop_year=${NL_DFI_BCKSTOP_YEAR}," >> $FI	if test ! -z "$NL_DFI_BCKSTOP_YEAR"; then echo "dfi_bckstop_year=${NL_DFI_BCKSTOP_YEAR}," >> $FI
if test ! -z "$NL_DFI_BCKSTOP_MONTH"; then echo "dfi_bckstop_month=${NL_DFI_BCKSTOP_MONTH}," >> 	if test ! -z "$NL_DFI_BCKSTOP_MONTH"; then echo "dfi_bckstop_month=${NL_DFI_BCKSTOP_MONTH}," >> 
if test ! -z "$NL_DFI_BCKSTOP_DAY"; then echo "dfi_bckstop_day=${NL_DFI_BCKSTOP_DAY}," >> $FILE;	if test ! -z "$NL_DFI_BCKSTOP_DAY"; then echo "dfi_bckstop_day=${NL_DFI_BCKSTOP_DAY}," >> $FILE;
if test ! -z "$NL_DFI_BCKSTOP_HOUR"; then echo "dfi_bckstop_hour=${NL_DFI_BCKSTOP_HOUR}," >> $FI	if test ! -z "$NL_DFI_BCKSTOP_HOUR"; then echo "dfi_bckstop_hour=${NL_DFI_BCKSTOP_HOUR}," >> $FI
if test ! -z "$NL_DFI_BCKSTOP_MINUTE"; then echo "dfi_bckstop_minute=${NL_DFI_BCKSTOP_MINUTE}," 	if test ! -z "$NL_DFI_BCKSTOP_MINUTE"; then echo "dfi_bckstop_minute=${NL_DFI_BCKSTOP_MINUTE}," 
if test ! -z "$NL_DFI_BCKSTOP_SECOND"; then echo "dfi_bckstop_second=${NL_DFI_BCKSTOP_SECOND}," 	if test ! -z "$NL_DFI_BCKSTOP_SECOND"; then echo "dfi_bckstop_second=${NL_DFI_BCKSTOP_SECOND}," 
echo / >> $FILE												echo / >> $FILE
echo \&domains >> $FILE											echo \&domains >> $FILE
if test ! -z "$NL_TIME_STEP"; then echo "time_step=${NL_TIME_STEP}," >> $FILE;fi			if test ! -z "$NL_TIME_STEP"; then echo "time_step=${NL_TIME_STEP}," >> $FILE;fi
if test ! -z "$NL_TIME_STEP_FRACT_NUM"; then echo "time_step_fract_num=${NL_TIME_STEP_FRACT_NUM}	if test ! -z "$NL_TIME_STEP_FRACT_NUM"; then echo "time_step_fract_num=${NL_TIME_STEP_FRACT_NUM}
if test ! -z "$NL_TIME_STEP_FRACT_DEN"; then echo "time_step_fract_den=${NL_TIME_STEP_FRACT_DEN}	if test ! -z "$NL_TIME_STEP_FRACT_DEN"; then echo "time_step_fract_den=${NL_TIME_STEP_FRACT_DEN}
if test ! -z "$NL_TIME_STEP_DFI"; then echo "time_step_dfi=${NL_TIME_STEP_DFI}," >> $FILE;fi		if test ! -z "$NL_TIME_STEP_DFI"; then echo "time_step_dfi=${NL_TIME_STEP_DFI}," >> $FILE;fi
if test ! -z "$NL_MIN_TIME_STEP"; then echo "min_time_step=${NL_MIN_TIME_STEP}," >> $FILE;fi		if test ! -z "$NL_MIN_TIME_STEP"; then echo "min_time_step=${NL_MIN_TIME_STEP}," >> $FILE;fi
if test ! -z "$NL_MIN_TIME_STEP_DEN"; then echo "min_time_step_den=${NL_MIN_TIME_STEP_DEN}," >> 	if test ! -z "$NL_MIN_TIME_STEP_DEN"; then echo "min_time_step_den=${NL_MIN_TIME_STEP_DEN}," >> 
if test ! -z "$NL_MAX_TIME_STEP"; then echo "max_time_step=${NL_MAX_TIME_STEP}," >> $FILE;fi		if test ! -z "$NL_MAX_TIME_STEP"; then echo "max_time_step=${NL_MAX_TIME_STEP}," >> $FILE;fi
if test ! -z "$NL_MAX_TIME_STEP_DEN"; then echo "max_time_step_den=${NL_MAX_TIME_STEP_DEN}," >> 	if test ! -z "$NL_MAX_TIME_STEP_DEN"; then echo "max_time_step_den=${NL_MAX_TIME_STEP_DEN}," >> 
if test ! -z "$NL_TARGET_CFL"; then echo "target_cfl=${NL_TARGET_CFL}," >> $FILE;fi			if test ! -z "$NL_TARGET_CFL"; then echo "target_cfl=${NL_TARGET_CFL}," >> $FILE;fi
if test ! -z "$NL_TARGET_HCFL"; then echo "target_hcfl=${NL_TARGET_HCFL}," >> $FILE;fi			if test ! -z "$NL_TARGET_HCFL"; then echo "target_hcfl=${NL_TARGET_HCFL}," >> $FILE;fi
if test ! -z "$NL_MAX_STEP_INCREASE_PCT"; then echo "max_step_increase_pct=${NL_MAX_STEP_INCREAS	if test ! -z "$NL_MAX_STEP_INCREASE_PCT"; then echo "max_step_increase_pct=${NL_MAX_STEP_INCREAS
if test ! -z "$NL_STARTING_TIME_STEP"; then echo "starting_time_step=${NL_STARTING_TIME_STEP}," 	if test ! -z "$NL_STARTING_TIME_STEP"; then echo "starting_time_step=${NL_STARTING_TIME_STEP}," 
if test ! -z "$NL_STARTING_TIME_STEP_DEN"; then echo "starting_time_step_den=${NL_STARTING_TIME_	if test ! -z "$NL_STARTING_TIME_STEP_DEN"; then echo "starting_time_step_den=${NL_STARTING_TIME_
if test ! -z "$NL_STEP_TO_OUTPUT_TIME"; then echo "step_to_output_time=${NL_STEP_TO_OUTPUT_TIME}	if test ! -z "$NL_STEP_TO_OUTPUT_TIME"; then echo "step_to_output_time=${NL_STEP_TO_OUTPUT_TIME}
if test ! -z "$NL_ADAPTATION_DOMAIN"; then echo "adaptation_domain=${NL_ADAPTATION_DOMAIN}," >> 	if test ! -z "$NL_ADAPTATION_DOMAIN"; then echo "adaptation_domain=${NL_ADAPTATION_DOMAIN}," >> 
if test ! -z "$NL_USE_ADAPTIVE_TIME_STEP"; then echo "use_adaptive_time_step=${NL_USE_ADAPTIVE_T	if test ! -z "$NL_USE_ADAPTIVE_TIME_STEP"; then echo "use_adaptive_time_step=${NL_USE_ADAPTIVE_T
if test ! -z "$NL_USE_ADAPTIVE_TIME_STEP_DFI"; then echo "use_adaptive_time_step_dfi=${NL_USE_AD	if test ! -z "$NL_USE_ADAPTIVE_TIME_STEP_DFI"; then echo "use_adaptive_time_step_dfi=${NL_USE_AD
if test ! -z "$NL_MAX_DOM"; then echo "max_dom=${NL_MAX_DOM}," >> $FILE;fi				if test ! -z "$NL_MAX_DOM"; then echo "max_dom=${NL_MAX_DOM}," >> $FILE;fi
if test ! -z "$NL_LATS_TO_MIC"; then echo "lats_to_mic=${NL_LATS_TO_MIC}," >> $FILE;fi			if test ! -z "$NL_LATS_TO_MIC"; then echo "lats_to_mic=${NL_LATS_TO_MIC}," >> $FILE;fi
if test ! -z "$NL_S_WE"; then echo "s_we=${NL_S_WE}," >> $FILE;fi					if test ! -z "$NL_S_WE"; then echo "s_we=${NL_S_WE}," >> $FILE;fi
if test ! -z "$NL_E_WE"; then echo "e_we=${NL_E_WE}," >> $FILE;fi					if test ! -z "$NL_E_WE"; then echo "e_we=${NL_E_WE}," >> $FILE;fi
if test ! -z "$NL_S_SN"; then echo "s_sn=${NL_S_SN}," >> $FILE;fi					if test ! -z "$NL_S_SN"; then echo "s_sn=${NL_S_SN}," >> $FILE;fi
if test ! -z "$NL_E_SN"; then echo "e_sn=${NL_E_SN}," >> $FILE;fi					if test ! -z "$NL_E_SN"; then echo "e_sn=${NL_E_SN}," >> $FILE;fi
if test ! -z "$NL_S_VERT"; then echo "s_vert=${NL_S_VERT}," >> $FILE;fi					if test ! -z "$NL_S_VERT"; then echo "s_vert=${NL_S_VERT}," >> $FILE;fi
if test ! -z "$NL_E_VERT"; then echo "e_vert=${NL_E_VERT}," >> $FILE;fi					if test ! -z "$NL_E_VERT"; then echo "e_vert=${NL_E_VERT}," >> $FILE;fi
if test ! -z "$NL_NUM_METGRID_LEVELS"; then echo "num_metgrid_levels=${NL_NUM_METGRID_LEVELS}," 	if test ! -z "$NL_NUM_METGRID_LEVELS"; then echo "num_metgrid_levels=${NL_NUM_METGRID_LEVELS}," 
if test ! -z "$NL_NUM_METGRID_SOIL_LEVELS"; then echo "num_metgrid_soil_levels=${NL_NUM_METGRID_	if test ! -z "$NL_NUM_METGRID_SOIL_LEVELS"; then echo "num_metgrid_soil_levels=${NL_NUM_METGRID_
if test ! -z "$NL_P_TOP_REQUESTED"; then echo "p_top_requested=${NL_P_TOP_REQUESTED}," >> $FILE;	if test ! -z "$NL_P_TOP_REQUESTED"; then echo "p_top_requested=${NL_P_TOP_REQUESTED}," >> $FILE;
if test ! -z "$NL_INTERP_THETA"; then echo "interp_theta=${NL_INTERP_THETA}," >> $FILE;fi		if test ! -z "$NL_INTERP_THETA"; then echo "interp_theta=${NL_INTERP_THETA}," >> $FILE;fi
if test ! -z "$NL_INTERP_TYPE"; then echo "interp_type=${NL_INTERP_TYPE}," >> $FILE;fi			if test ! -z "$NL_INTERP_TYPE"; then echo "interp_type=${NL_INTERP_TYPE}," >> $FILE;fi
if test ! -z "$NL_REBALANCE"; then echo "rebalance=${NL_REBALANCE}," >> $FILE;fi		   <
if test ! -z "$NL_VERT_REFINE_METHOD"; then echo "vert_refine_method=${NL_VERT_REFINE_METHOD}," 	if test ! -z "$NL_VERT_REFINE_METHOD"; then echo "vert_refine_method=${NL_VERT_REFINE_METHOD}," 
if test ! -z "$NL_VERT_REFINE_FACT"; then echo "vert_refine_fact=${NL_VERT_REFINE_FACT}," >> $FI	if test ! -z "$NL_VERT_REFINE_FACT"; then echo "vert_refine_fact=${NL_VERT_REFINE_FACT}," >> $FI
if test ! -z "$NL_EXTRAP_TYPE"; then echo "extrap_type=${NL_EXTRAP_TYPE}," >> $FILE;fi			if test ! -z "$NL_EXTRAP_TYPE"; then echo "extrap_type=${NL_EXTRAP_TYPE}," >> $FILE;fi
if test ! -z "$NL_T_EXTRAP_TYPE"; then echo "t_extrap_type=${NL_T_EXTRAP_TYPE}," >> $FILE;fi		if test ! -z "$NL_T_EXTRAP_TYPE"; then echo "t_extrap_type=${NL_T_EXTRAP_TYPE}," >> $FILE;fi
if test ! -z "$NL_HYPSOMETRIC_OPT"; then echo "hypsometric_opt=${NL_HYPSOMETRIC_OPT}," >> $FILE;	if test ! -z "$NL_HYPSOMETRIC_OPT"; then echo "hypsometric_opt=${NL_HYPSOMETRIC_OPT}," >> $FILE;
if test ! -z "$NL_LOWEST_LEV_FROM_SFC"; then echo "lowest_lev_from_sfc=${NL_LOWEST_LEV_FROM_SFC}	if test ! -z "$NL_LOWEST_LEV_FROM_SFC"; then echo "lowest_lev_from_sfc=${NL_LOWEST_LEV_FROM_SFC}
if test ! -z "$NL_USE_LEVELS_BELOW_GROUND"; then echo "use_levels_below_ground=${NL_USE_LEVELS_B	if test ! -z "$NL_USE_LEVELS_BELOW_GROUND"; then echo "use_levels_below_ground=${NL_USE_LEVELS_B
if test ! -z "$NL_USE_TAVG_FOR_TSK"; then echo "use_tavg_for_tsk=${NL_USE_TAVG_FOR_TSK}," >> $FI	if test ! -z "$NL_USE_TAVG_FOR_TSK"; then echo "use_tavg_for_tsk=${NL_USE_TAVG_FOR_TSK}," >> $FI
if test ! -z "$NL_USE_SURFACE"; then echo "use_surface=${NL_USE_SURFACE}," >> $FILE;fi			if test ! -z "$NL_USE_SURFACE"; then echo "use_surface=${NL_USE_SURFACE}," >> $FILE;fi
if test ! -z "$NL_LAGRANGE_ORDER"; then echo "lagrange_order=${NL_LAGRANGE_ORDER}," >> $FILE;fi		if test ! -z "$NL_LAGRANGE_ORDER"; then echo "lagrange_order=${NL_LAGRANGE_ORDER}," >> $FILE;fi
if test ! -z "$NL_FORCE_SFC_IN_VINTERP"; then echo "force_sfc_in_vinterp=${NL_FORCE_SFC_IN_VINTE	if test ! -z "$NL_FORCE_SFC_IN_VINTERP"; then echo "force_sfc_in_vinterp=${NL_FORCE_SFC_IN_VINTE
if test ! -z "$NL_ZAP_CLOSE_LEVELS"; then echo "zap_close_levels=${NL_ZAP_CLOSE_LEVELS}," >> $FI	if test ! -z "$NL_ZAP_CLOSE_LEVELS"; then echo "zap_close_levels=${NL_ZAP_CLOSE_LEVELS}," >> $FI
if test ! -z "$NL_MAXW_HORIZ_PRES_DIFF"; then echo "maxw_horiz_pres_diff=${NL_MAXW_HORIZ_PRES_DI	if test ! -z "$NL_MAXW_HORIZ_PRES_DIFF"; then echo "maxw_horiz_pres_diff=${NL_MAXW_HORIZ_PRES_DI
if test ! -z "$NL_TROP_HORIZ_PRES_DIFF"; then echo "trop_horiz_pres_diff=${NL_TROP_HORIZ_PRES_DI	if test ! -z "$NL_TROP_HORIZ_PRES_DIFF"; then echo "trop_horiz_pres_diff=${NL_TROP_HORIZ_PRES_DI
if test ! -z "$NL_MAXW_ABOVE_THIS_LEVEL"; then echo "maxw_above_this_level=${NL_MAXW_ABOVE_THIS_	if test ! -z "$NL_MAXW_ABOVE_THIS_LEVEL"; then echo "maxw_above_this_level=${NL_MAXW_ABOVE_THIS_
if test ! -z "$NL_USE_MAXW_LEVEL"; then echo "use_maxw_level=${NL_USE_MAXW_LEVEL}," >> $FILE;fi		if test ! -z "$NL_USE_MAXW_LEVEL"; then echo "use_maxw_level=${NL_USE_MAXW_LEVEL}," >> $FILE;fi
if test ! -z "$NL_USE_TROP_LEVEL"; then echo "use_trop_level=${NL_USE_TROP_LEVEL}," >> $FILE;fi		if test ! -z "$NL_USE_TROP_LEVEL"; then echo "use_trop_level=${NL_USE_TROP_LEVEL}," >> $FILE;fi
if test ! -z "$NL_SFCP_TO_SFCP"; then echo "sfcp_to_sfcp=${NL_SFCP_TO_SFCP}," >> $FILE;fi		if test ! -z "$NL_SFCP_TO_SFCP"; then echo "sfcp_to_sfcp=${NL_SFCP_TO_SFCP}," >> $FILE;fi
if test ! -z "$NL_ADJUST_HEIGHTS"; then echo "adjust_heights=${NL_ADJUST_HEIGHTS}," >> $FILE;fi		if test ! -z "$NL_ADJUST_HEIGHTS"; then echo "adjust_heights=${NL_ADJUST_HEIGHTS}," >> $FILE;fi
if test ! -z "$NL_SMOOTH_CG_TOPO"; then echo "smooth_cg_topo=${NL_SMOOTH_CG_TOPO}," >> $FILE;fi		if test ! -z "$NL_SMOOTH_CG_TOPO"; then echo "smooth_cg_topo=${NL_SMOOTH_CG_TOPO}," >> $FILE;fi
if test ! -z "$NL_NEST_INTERP_COORD"; then echo "nest_interp_coord=${NL_NEST_INTERP_COORD}," >> 	if test ! -z "$NL_NEST_INTERP_COORD"; then echo "nest_interp_coord=${NL_NEST_INTERP_COORD}," >> 
if test ! -z "$NL_INTERP_METHOD_TYPE"; then echo "interp_method_type=${NL_INTERP_METHOD_TYPE}," 	if test ! -z "$NL_INTERP_METHOD_TYPE"; then echo "interp_method_type=${NL_INTERP_METHOD_TYPE}," 
if test ! -z "$NL_AGGREGATE_LU"; then echo "aggregate_lu=${NL_AGGREGATE_LU}," >> $FILE;fi		if test ! -z "$NL_AGGREGATE_LU"; then echo "aggregate_lu=${NL_AGGREGATE_LU}," >> $FILE;fi
if test ! -z "$NL_RH2QV_WRT_LIQUID"; then echo "rh2qv_wrt_liquid=${NL_RH2QV_WRT_LIQUID}," >> $FI	if test ! -z "$NL_RH2QV_WRT_LIQUID"; then echo "rh2qv_wrt_liquid=${NL_RH2QV_WRT_LIQUID}," >> $FI
if test ! -z "$NL_RH2QV_METHOD"; then echo "rh2qv_method=${NL_RH2QV_METHOD}," >> $FILE;fi		if test ! -z "$NL_RH2QV_METHOD"; then echo "rh2qv_method=${NL_RH2QV_METHOD}," >> $FILE;fi
if test ! -z "$NL_QV_MAX_P_SAFE"; then echo "qv_max_p_safe=${NL_QV_MAX_P_SAFE}," >> $FILE;fi		if test ! -z "$NL_QV_MAX_P_SAFE"; then echo "qv_max_p_safe=${NL_QV_MAX_P_SAFE}," >> $FILE;fi
if test ! -z "$NL_QV_MAX_FLAG"; then echo "qv_max_flag=${NL_QV_MAX_FLAG}," >> $FILE;fi			if test ! -z "$NL_QV_MAX_FLAG"; then echo "qv_max_flag=${NL_QV_MAX_FLAG}," >> $FILE;fi
if test ! -z "$NL_QV_MAX_VALUE"; then echo "qv_max_value=${NL_QV_MAX_VALUE}," >> $FILE;fi		if test ! -z "$NL_QV_MAX_VALUE"; then echo "qv_max_value=${NL_QV_MAX_VALUE}," >> $FILE;fi
if test ! -z "$NL_QV_MIN_P_SAFE"; then echo "qv_min_p_safe=${NL_QV_MIN_P_SAFE}," >> $FILE;fi		if test ! -z "$NL_QV_MIN_P_SAFE"; then echo "qv_min_p_safe=${NL_QV_MIN_P_SAFE}," >> $FILE;fi
if test ! -z "$NL_QV_MIN_FLAG"; then echo "qv_min_flag=${NL_QV_MIN_FLAG}," >> $FILE;fi			if test ! -z "$NL_QV_MIN_FLAG"; then echo "qv_min_flag=${NL_QV_MIN_FLAG}," >> $FILE;fi
if test ! -z "$NL_QV_MIN_VALUE"; then echo "qv_min_value=${NL_QV_MIN_VALUE}," >> $FILE;fi		if test ! -z "$NL_QV_MIN_VALUE"; then echo "qv_min_value=${NL_QV_MIN_VALUE}," >> $FILE;fi
if test ! -z "$NL_IDEAL_INIT_METHOD"; then echo "ideal_init_method=${NL_IDEAL_INIT_METHOD}," >>    <
if test ! -z "$NL_DX"; then echo "dx=${NL_DX}," >> $FILE;fi						if test ! -z "$NL_DX"; then echo "dx=${NL_DX}," >> $FILE;fi
if test ! -z "$NL_DY"; then echo "dy=${NL_DY}," >> $FILE;fi						if test ! -z "$NL_DY"; then echo "dy=${NL_DY}," >> $FILE;fi
if test ! -z "$NL_GRID_ID"; then echo "grid_id=${NL_GRID_ID}," >> $FILE;fi				if test ! -z "$NL_GRID_ID"; then echo "grid_id=${NL_GRID_ID}," >> $FILE;fi
if test ! -z "$NL_GRID_ALLOWED"; then echo "grid_allowed=${NL_GRID_ALLOWED}," >> $FILE;fi		if test ! -z "$NL_GRID_ALLOWED"; then echo "grid_allowed=${NL_GRID_ALLOWED}," >> $FILE;fi
if test ! -z "$NL_PARENT_ID"; then echo "parent_id=${NL_PARENT_ID}," >> $FILE;fi			if test ! -z "$NL_PARENT_ID"; then echo "parent_id=${NL_PARENT_ID}," >> $FILE;fi
if test ! -z "$NL_I_PARENT_START"; then echo "i_parent_start=${NL_I_PARENT_START}," >> $FILE;fi		if test ! -z "$NL_I_PARENT_START"; then echo "i_parent_start=${NL_I_PARENT_START}," >> $FILE;fi
if test ! -z "$NL_J_PARENT_START"; then echo "j_parent_start=${NL_J_PARENT_START}," >> $FILE;fi		if test ! -z "$NL_J_PARENT_START"; then echo "j_parent_start=${NL_J_PARENT_START}," >> $FILE;fi
if test ! -z "$NL_PARENT_GRID_RATIO"; then echo "parent_grid_ratio=${NL_PARENT_GRID_RATIO}," >> 	if test ! -z "$NL_PARENT_GRID_RATIO"; then echo "parent_grid_ratio=${NL_PARENT_GRID_RATIO}," >> 
if test ! -z "$NL_PARENT_TIME_STEP_RATIO"; then echo "parent_time_step_ratio=${NL_PARENT_TIME_ST	if test ! -z "$NL_PARENT_TIME_STEP_RATIO"; then echo "parent_time_step_ratio=${NL_PARENT_TIME_ST
if test ! -z "$NL_FEEDBACK"; then echo "feedback=${NL_FEEDBACK}," >> $FILE;fi				if test ! -z "$NL_FEEDBACK"; then echo "feedback=${NL_FEEDBACK}," >> $FILE;fi
if test ! -z "$NL_SMOOTH_OPTION"; then echo "smooth_option=${NL_SMOOTH_OPTION}," >> $FILE;fi		if test ! -z "$NL_SMOOTH_OPTION"; then echo "smooth_option=${NL_SMOOTH_OPTION}," >> $FILE;fi
if test ! -z "$NL_BLEND_WIDTH"; then echo "blend_width=${NL_BLEND_WIDTH}," >> $FILE;fi			if test ! -z "$NL_BLEND_WIDTH"; then echo "blend_width=${NL_BLEND_WIDTH}," >> $FILE;fi
if test ! -z "$NL_ZTOP"; then echo "ztop=${NL_ZTOP}," >> $FILE;fi					if test ! -z "$NL_ZTOP"; then echo "ztop=${NL_ZTOP}," >> $FILE;fi
if test ! -z "$NL_MOAD_GRID_RATIO"; then echo "moad_grid_ratio=${NL_MOAD_GRID_RATIO}," >> $FILE;	if test ! -z "$NL_MOAD_GRID_RATIO"; then echo "moad_grid_ratio=${NL_MOAD_GRID_RATIO}," >> $FILE;
if test ! -z "$NL_MOAD_TIME_STEP_RATIO"; then echo "moad_time_step_ratio=${NL_MOAD_TIME_STEP_RAT	if test ! -z "$NL_MOAD_TIME_STEP_RATIO"; then echo "moad_time_step_ratio=${NL_MOAD_TIME_STEP_RAT
if test ! -z "$NL_SHW"; then echo "shw=${NL_SHW}," >> $FILE;fi						if test ! -z "$NL_SHW"; then echo "shw=${NL_SHW}," >> $FILE;fi
if test ! -z "$NL_TILE_SZ_X"; then echo "tile_sz_x=${NL_TILE_SZ_X}," >> $FILE;fi			if test ! -z "$NL_TILE_SZ_X"; then echo "tile_sz_x=${NL_TILE_SZ_X}," >> $FILE;fi
if test ! -z "$NL_TILE_SZ_Y"; then echo "tile_sz_y=${NL_TILE_SZ_Y}," >> $FILE;fi			if test ! -z "$NL_TILE_SZ_Y"; then echo "tile_sz_y=${NL_TILE_SZ_Y}," >> $FILE;fi
if test ! -z "$NL_NUMTILES"; then echo "numtiles=${NL_NUMTILES}," >> $FILE;fi				if test ! -z "$NL_NUMTILES"; then echo "numtiles=${NL_NUMTILES}," >> $FILE;fi
if test ! -z "$NL_NUMTILES_INC"; then echo "numtiles_inc=${NL_NUMTILES_INC}," >> $FILE;fi		if test ! -z "$NL_NUMTILES_INC"; then echo "numtiles_inc=${NL_NUMTILES_INC}," >> $FILE;fi
if test ! -z "$NL_NUMTILES_X"; then echo "numtiles_x=${NL_NUMTILES_X}," >> $FILE;fi			if test ! -z "$NL_NUMTILES_X"; then echo "numtiles_x=${NL_NUMTILES_X}," >> $FILE;fi
if test ! -z "$NL_NUMTILES_Y"; then echo "numtiles_y=${NL_NUMTILES_Y}," >> $FILE;fi			if test ! -z "$NL_NUMTILES_Y"; then echo "numtiles_y=${NL_NUMTILES_Y}," >> $FILE;fi
if test ! -z "$NL_TILE_STRATEGY"; then echo "tile_strategy=${NL_TILE_STRATEGY}," >> $FILE;fi		if test ! -z "$NL_TILE_STRATEGY"; then echo "tile_strategy=${NL_TILE_STRATEGY}," >> $FILE;fi
if test ! -z "$NL_NPROC_X"; then echo "nproc_x=${NL_NPROC_X}," >> $FILE;fi				if test ! -z "$NL_NPROC_X"; then echo "nproc_x=${NL_NPROC_X}," >> $FILE;fi
if test ! -z "$NL_NPROC_Y"; then echo "nproc_y=${NL_NPROC_Y}," >> $FILE;fi				if test ! -z "$NL_NPROC_Y"; then echo "nproc_y=${NL_NPROC_Y}," >> $FILE;fi
if test ! -z "$NL_IRAND"; then echo "irand=${NL_IRAND}," >> $FILE;fi					if test ! -z "$NL_IRAND"; then echo "irand=${NL_IRAND}," >> $FILE;fi
if test ! -z "$NL_NUM_MOVES"; then echo "num_moves=${NL_NUM_MOVES}," >> $FILE;fi			if test ! -z "$NL_NUM_MOVES"; then echo "num_moves=${NL_NUM_MOVES}," >> $FILE;fi
if test ! -z "$NL_TS_BUF_SIZE"; then echo "ts_buf_size=${NL_TS_BUF_SIZE}," >> $FILE;fi			if test ! -z "$NL_TS_BUF_SIZE"; then echo "ts_buf_size=${NL_TS_BUF_SIZE}," >> $FILE;fi
if test ! -z "$NL_MAX_TS_LOCS"; then echo "max_ts_locs=${NL_MAX_TS_LOCS}," >> $FILE;fi			if test ! -z "$NL_MAX_TS_LOCS"; then echo "max_ts_locs=${NL_MAX_TS_LOCS}," >> $FILE;fi
if test ! -z "$NL_VORTEX_INTERVAL"; then echo "vortex_interval=${NL_VORTEX_INTERVAL}," >> $FILE;	if test ! -z "$NL_VORTEX_INTERVAL"; then echo "vortex_interval=${NL_VORTEX_INTERVAL}," >> $FILE;
if test ! -z "$NL_MAX_VORTEX_SPEED"; then echo "max_vortex_speed=${NL_MAX_VORTEX_SPEED}," >> $FI	if test ! -z "$NL_MAX_VORTEX_SPEED"; then echo "max_vortex_speed=${NL_MAX_VORTEX_SPEED}," >> $FI
if test ! -z "$NL_CORRAL_DIST"; then echo "corral_dist=${NL_CORRAL_DIST}," >> $FILE;fi			if test ! -z "$NL_CORRAL_DIST"; then echo "corral_dist=${NL_CORRAL_DIST}," >> $FILE;fi
if test ! -z "$NL_TRACK_LEVEL"; then echo "track_level=${NL_TRACK_LEVEL}," >> $FILE;fi			if test ! -z "$NL_TRACK_LEVEL"; then echo "track_level=${NL_TRACK_LEVEL}," >> $FILE;fi
if test ! -z "$NL_TIME_TO_MOVE"; then echo "time_to_move=${NL_TIME_TO_MOVE}," >> $FILE;fi		if test ! -z "$NL_TIME_TO_MOVE"; then echo "time_to_move=${NL_TIME_TO_MOVE}," >> $FILE;fi
if test ! -z "$NL_MOVE_ID"; then echo "move_id=${NL_MOVE_ID}," >> $FILE;fi				if test ! -z "$NL_MOVE_ID"; then echo "move_id=${NL_MOVE_ID}," >> $FILE;fi
if test ! -z "$NL_MOVE_INTERVAL"; then echo "move_interval=${NL_MOVE_INTERVAL}," >> $FILE;fi		if test ! -z "$NL_MOVE_INTERVAL"; then echo "move_interval=${NL_MOVE_INTERVAL}," >> $FILE;fi
if test ! -z "$NL_MOVE_CD_X"; then echo "move_cd_x=${NL_MOVE_CD_X}," >> $FILE;fi			if test ! -z "$NL_MOVE_CD_X"; then echo "move_cd_x=${NL_MOVE_CD_X}," >> $FILE;fi
if test ! -z "$NL_MOVE_CD_Y"; then echo "move_cd_y=${NL_MOVE_CD_Y}," >> $FILE;fi			if test ! -z "$NL_MOVE_CD_Y"; then echo "move_cd_y=${NL_MOVE_CD_Y}," >> $FILE;fi
if test ! -z "$NL_SWAP_X"; then echo "swap_x=${NL_SWAP_X}," >> $FILE;fi					if test ! -z "$NL_SWAP_X"; then echo "swap_x=${NL_SWAP_X}," >> $FILE;fi
if test ! -z "$NL_SWAP_Y"; then echo "swap_y=${NL_SWAP_Y}," >> $FILE;fi					if test ! -z "$NL_SWAP_Y"; then echo "swap_y=${NL_SWAP_Y}," >> $FILE;fi
if test ! -z "$NL_CYCLE_X"; then echo "cycle_x=${NL_CYCLE_X}," >> $FILE;fi				if test ! -z "$NL_CYCLE_X"; then echo "cycle_x=${NL_CYCLE_X}," >> $FILE;fi
if test ! -z "$NL_CYCLE_Y"; then echo "cycle_y=${NL_CYCLE_Y}," >> $FILE;fi				if test ! -z "$NL_CYCLE_Y"; then echo "cycle_y=${NL_CYCLE_Y}," >> $FILE;fi
if test ! -z "$NL_REORDER_MESH"; then echo "reorder_mesh=${NL_REORDER_MESH}," >> $FILE;fi		if test ! -z "$NL_REORDER_MESH"; then echo "reorder_mesh=${NL_REORDER_MESH}," >> $FILE;fi
if test ! -z "$NL_PERTURB_INPUT"; then echo "perturb_input=${NL_PERTURB_INPUT}," >> $FILE;fi		if test ! -z "$NL_PERTURB_INPUT"; then echo "perturb_input=${NL_PERTURB_INPUT}," >> $FILE;fi
if test ! -z "$NL_ETA_LEVELS"; then echo "eta_levels=${NL_ETA_LEVELS}," >> $FILE;fi			if test ! -z "$NL_ETA_LEVELS"; then echo "eta_levels=${NL_ETA_LEVELS}," >> $FILE;fi
if test ! -z "$NL_MAX_DZ"; then echo "max_dz=${NL_MAX_DZ}," >> $FILE;fi					if test ! -z "$NL_MAX_DZ"; then echo "max_dz=${NL_MAX_DZ}," >> $FILE;fi
if test ! -z "$NL_OCEAN_LEVELS"; then echo "ocean_levels=${NL_OCEAN_LEVELS}," >> $FILE;fi		if test ! -z "$NL_OCEAN_LEVELS"; then echo "ocean_levels=${NL_OCEAN_LEVELS}," >> $FILE;fi
if test ! -z "$NL_OCEAN_Z"; then echo "ocean_z=${NL_OCEAN_Z}," >> $FILE;fi				if test ! -z "$NL_OCEAN_Z"; then echo "ocean_z=${NL_OCEAN_Z}," >> $FILE;fi
if test ! -z "$NL_OCEAN_T"; then echo "ocean_t=${NL_OCEAN_T}," >> $FILE;fi				if test ! -z "$NL_OCEAN_T"; then echo "ocean_t=${NL_OCEAN_T}," >> $FILE;fi
if test ! -z "$NL_OCEAN_S"; then echo "ocean_s=${NL_OCEAN_S}," >> $FILE;fi				if test ! -z "$NL_OCEAN_S"; then echo "ocean_s=${NL_OCEAN_S}," >> $FILE;fi
if test ! -z "$NL_NUM_TRAJ"; then echo "num_traj=${NL_NUM_TRAJ}," >> $FILE;fi				if test ! -z "$NL_NUM_TRAJ"; then echo "num_traj=${NL_NUM_TRAJ}," >> $FILE;fi
if test ! -z "$NL_CHM_SECTIONS"; then echo "chm_sections=${NL_CHM_SECTIONS}," >> $FILE;fi		if test ! -z "$NL_CHM_SECTIONS"; then echo "chm_sections=${NL_CHM_SECTIONS}," >> $FILE;fi
if test ! -z "$NL_MAX_TS_LEVEL"; then echo "max_ts_level=${NL_MAX_TS_LEVEL}," >> $FILE;fi		if test ! -z "$NL_MAX_TS_LEVEL"; then echo "max_ts_level=${NL_MAX_TS_LEVEL}," >> $FILE;fi
if test ! -z "$NL_TRACK_LOC_IN"; then echo "track_loc_in=${NL_TRACK_LOC_IN}," >> $FILE;fi		if test ! -z "$NL_TRACK_LOC_IN"; then echo "track_loc_in=${NL_TRACK_LOC_IN}," >> $FILE;fi
if test ! -z "$NL_NUM_EXT_MODEL_COUPLE_DOM"; then echo "num_ext_model_couple_dom=${NL_NUM_EXT_MO	if test ! -z "$NL_NUM_EXT_MODEL_COUPLE_DOM"; then echo "num_ext_model_couple_dom=${NL_NUM_EXT_MO
if test ! -z "$NL_SR_X"; then echo "sr_x=${NL_SR_X}," >> $FILE;fi					if test ! -z "$NL_SR_X"; then echo "sr_x=${NL_SR_X}," >> $FILE;fi
if test ! -z "$NL_SR_Y"; then echo "sr_y=${NL_SR_Y}," >> $FILE;fi					if test ! -z "$NL_SR_Y"; then echo "sr_y=${NL_SR_Y}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&tc >> $FILE											echo \&tc >> $FILE
if test ! -z "$NL_INSERT_BOGUS_STORM"; then echo "insert_bogus_storm=${NL_INSERT_BOGUS_STORM}," 	if test ! -z "$NL_INSERT_BOGUS_STORM"; then echo "insert_bogus_storm=${NL_INSERT_BOGUS_STORM}," 
if test ! -z "$NL_REMOVE_STORM"; then echo "remove_storm=${NL_REMOVE_STORM}," >> $FILE;fi		if test ! -z "$NL_REMOVE_STORM"; then echo "remove_storm=${NL_REMOVE_STORM}," >> $FILE;fi
if test ! -z "$NL_NUM_STORM"; then echo "num_storm=${NL_NUM_STORM}," >> $FILE;fi			if test ! -z "$NL_NUM_STORM"; then echo "num_storm=${NL_NUM_STORM}," >> $FILE;fi
if test ! -z "$NL_LATC_LOC"; then echo "latc_loc=${NL_LATC_LOC}," >> $FILE;fi				if test ! -z "$NL_LATC_LOC"; then echo "latc_loc=${NL_LATC_LOC}," >> $FILE;fi
if test ! -z "$NL_LONC_LOC"; then echo "lonc_loc=${NL_LONC_LOC}," >> $FILE;fi				if test ! -z "$NL_LONC_LOC"; then echo "lonc_loc=${NL_LONC_LOC}," >> $FILE;fi
if test ! -z "$NL_VMAX_METERS_PER_SECOND"; then echo "vmax_meters_per_second=${NL_VMAX_METERS_PE	if test ! -z "$NL_VMAX_METERS_PER_SECOND"; then echo "vmax_meters_per_second=${NL_VMAX_METERS_PE
if test ! -z "$NL_RMAX"; then echo "rmax=${NL_RMAX}," >> $FILE;fi					if test ! -z "$NL_RMAX"; then echo "rmax=${NL_RMAX}," >> $FILE;fi
if test ! -z "$NL_VMAX_RATIO"; then echo "vmax_ratio=${NL_VMAX_RATIO}," >> $FILE;fi			if test ! -z "$NL_VMAX_RATIO"; then echo "vmax_ratio=${NL_VMAX_RATIO}," >> $FILE;fi
if test ! -z "$NL_RANKINE_LID"; then echo "rankine_lid=${NL_RANKINE_LID}," >> $FILE;fi			if test ! -z "$NL_RANKINE_LID"; then echo "rankine_lid=${NL_RANKINE_LID}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&physics >> $FILE											echo \&physics >> $FILE
if test ! -z "$NL_PHYSICS_SUITE"; then echo "physics_suite=\"${NL_PHYSICS_SUITE}\"," >> $FILE;fi   <
if test ! -z "$NL_FORCE_READ_THOMPSON"; then echo "force_read_thompson=${NL_FORCE_READ_THOMPSON}	if test ! -z "$NL_FORCE_READ_THOMPSON"; then echo "force_read_thompson=${NL_FORCE_READ_THOMPSON}
if test ! -z "$NL_WRITE_THOMPSON_TABLES"; then echo "write_thompson_tables=${NL_WRITE_THOMPSON_T	if test ! -z "$NL_WRITE_THOMPSON_TABLES"; then echo "write_thompson_tables=${NL_WRITE_THOMPSON_T
if test ! -z "$NL_MP_PHYSICS"; then echo "mp_physics=${NL_MP_PHYSICS}," >> $FILE;fi			if test ! -z "$NL_MP_PHYSICS"; then echo "mp_physics=${NL_MP_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_NSSL_CCCN"; then echo "nssl_cccn=${NL_NSSL_CCCN}," >> $FILE;fi			if test ! -z "$NL_NSSL_CCCN"; then echo "nssl_cccn=${NL_NSSL_CCCN}," >> $FILE;fi
if test ! -z "$NL_NSSL_ALPHAH"; then echo "nssl_alphah=${NL_NSSL_ALPHAH}," >> $FILE;fi			if test ! -z "$NL_NSSL_ALPHAH"; then echo "nssl_alphah=${NL_NSSL_ALPHAH}," >> $FILE;fi
if test ! -z "$NL_NSSL_ALPHAHL"; then echo "nssl_alphahl=${NL_NSSL_ALPHAHL}," >> $FILE;fi		if test ! -z "$NL_NSSL_ALPHAHL"; then echo "nssl_alphahl=${NL_NSSL_ALPHAHL}," >> $FILE;fi
if test ! -z "$NL_NSSL_CNOH"; then echo "nssl_cnoh=${NL_NSSL_CNOH}," >> $FILE;fi			if test ! -z "$NL_NSSL_CNOH"; then echo "nssl_cnoh=${NL_NSSL_CNOH}," >> $FILE;fi
if test ! -z "$NL_NSSL_CNOHL"; then echo "nssl_cnohl=${NL_NSSL_CNOHL}," >> $FILE;fi			if test ! -z "$NL_NSSL_CNOHL"; then echo "nssl_cnohl=${NL_NSSL_CNOHL}," >> $FILE;fi
if test ! -z "$NL_NSSL_CNOR"; then echo "nssl_cnor=${NL_NSSL_CNOR}," >> $FILE;fi			if test ! -z "$NL_NSSL_CNOR"; then echo "nssl_cnor=${NL_NSSL_CNOR}," >> $FILE;fi
if test ! -z "$NL_NSSL_CNOS"; then echo "nssl_cnos=${NL_NSSL_CNOS}," >> $FILE;fi			if test ! -z "$NL_NSSL_CNOS"; then echo "nssl_cnos=${NL_NSSL_CNOS}," >> $FILE;fi
if test ! -z "$NL_NSSL_RHO_QH"; then echo "nssl_rho_qh=${NL_NSSL_RHO_QH}," >> $FILE;fi			if test ! -z "$NL_NSSL_RHO_QH"; then echo "nssl_rho_qh=${NL_NSSL_RHO_QH}," >> $FILE;fi
if test ! -z "$NL_NSSL_RHO_QHL"; then echo "nssl_rho_qhl=${NL_NSSL_RHO_QHL}," >> $FILE;fi		if test ! -z "$NL_NSSL_RHO_QHL"; then echo "nssl_rho_qhl=${NL_NSSL_RHO_QHL}," >> $FILE;fi
if test ! -z "$NL_NSSL_RHO_QS"; then echo "nssl_rho_qs=${NL_NSSL_RHO_QS}," >> $FILE;fi			if test ! -z "$NL_NSSL_RHO_QS"; then echo "nssl_rho_qs=${NL_NSSL_RHO_QS}," >> $FILE;fi
if test ! -z "$NL_NUDGE_LIGHTNING"; then echo "nudge_lightning=${NL_NUDGE_LIGHTNING}," >> $FILE;   <
if test ! -z "$NL_NUDGE_LIGHT_TIMES"; then echo "nudge_light_times=${NL_NUDGE_LIGHT_TIMES}," >>    <
if test ! -z "$NL_NUDGE_LIGHT_TIMEE"; then echo "nudge_light_timee=${NL_NUDGE_LIGHT_TIMEE}," >>    <
if test ! -z "$NL_NUDGE_LIGHT_INT"; then echo "nudge_light_int=${NL_NUDGE_LIGHT_INT}," >> $FILE;   <
if test ! -z "$NL_PATH_TO_FILES"; then echo "path_to_files=\"${NL_PATH_TO_FILES}\"," >> $FILE;fi   <
if test ! -z "$NL_GSFCGCE_HAIL"; then echo "gsfcgce_hail=${NL_GSFCGCE_HAIL}," >> $FILE;fi		if test ! -z "$NL_GSFCGCE_HAIL"; then echo "gsfcgce_hail=${NL_GSFCGCE_HAIL}," >> $FILE;fi
if test ! -z "$NL_GSFCGCE_2ICE"; then echo "gsfcgce_2ice=${NL_GSFCGCE_2ICE}," >> $FILE;fi		if test ! -z "$NL_GSFCGCE_2ICE"; then echo "gsfcgce_2ice=${NL_GSFCGCE_2ICE}," >> $FILE;fi
if test ! -z "$NL_PROGN"; then echo "progn=${NL_PROGN}," >> $FILE;fi					if test ! -z "$NL_PROGN"; then echo "progn=${NL_PROGN}," >> $FILE;fi
if test ! -z "$NL_ACCUM_MODE"; then echo "accum_mode=${NL_ACCUM_MODE}," >> $FILE;fi			if test ! -z "$NL_ACCUM_MODE"; then echo "accum_mode=${NL_ACCUM_MODE}," >> $FILE;fi
if test ! -z "$NL_AITKEN_MODE"; then echo "aitken_mode=${NL_AITKEN_MODE}," >> $FILE;fi			if test ! -z "$NL_AITKEN_MODE"; then echo "aitken_mode=${NL_AITKEN_MODE}," >> $FILE;fi
if test ! -z "$NL_COARSE_MODE"; then echo "coarse_mode=${NL_COARSE_MODE}," >> $FILE;fi			if test ! -z "$NL_COARSE_MODE"; then echo "coarse_mode=${NL_COARSE_MODE}," >> $FILE;fi
if test ! -z "$NL_DO_RADAR_REF"; then echo "do_radar_ref=${NL_DO_RADAR_REF}," >> $FILE;fi		if test ! -z "$NL_DO_RADAR_REF"; then echo "do_radar_ref=${NL_DO_RADAR_REF}," >> $FILE;fi
if test ! -z "$NL_RA_LW_PHYSICS"; then echo "ra_lw_physics=${NL_RA_LW_PHYSICS}," >> $FILE;fi		if test ! -z "$NL_RA_LW_PHYSICS"; then echo "ra_lw_physics=${NL_RA_LW_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_RA_SW_PHYSICS"; then echo "ra_sw_physics=${NL_RA_SW_PHYSICS}," >> $FILE;fi		if test ! -z "$NL_RA_SW_PHYSICS"; then echo "ra_sw_physics=${NL_RA_SW_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_RADT"; then echo "radt=${NL_RADT}," >> $FILE;fi					if test ! -z "$NL_RADT"; then echo "radt=${NL_RADT}," >> $FILE;fi
if test ! -z "$NL_NAER"; then echo "naer=${NL_NAER}," >> $FILE;fi					if test ! -z "$NL_NAER"; then echo "naer=${NL_NAER}," >> $FILE;fi
if test ! -z "$NL_SF_SFCLAY_PHYSICS"; then echo "sf_sfclay_physics=${NL_SF_SFCLAY_PHYSICS}," >> 	if test ! -z "$NL_SF_SFCLAY_PHYSICS"; then echo "sf_sfclay_physics=${NL_SF_SFCLAY_PHYSICS}," >> 
if test ! -z "$NL_SF_SURFACE_PHYSICS"; then echo "sf_surface_physics=${NL_SF_SURFACE_PHYSICS}," 	if test ! -z "$NL_SF_SURFACE_PHYSICS"; then echo "sf_surface_physics=${NL_SF_SURFACE_PHYSICS}," 
if test ! -z "$NL_BL_PBL_PHYSICS"; then echo "bl_pbl_physics=${NL_BL_PBL_PHYSICS}," >> $FILE;fi		if test ! -z "$NL_BL_PBL_PHYSICS"; then echo "bl_pbl_physics=${NL_BL_PBL_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_BL_MYNN_TKEBUDGET"; then echo "bl_mynn_tkebudget=${NL_BL_MYNN_TKEBUDGET}," >> 	if test ! -z "$NL_BL_MYNN_TKEBUDGET"; then echo "bl_mynn_tkebudget=${NL_BL_MYNN_TKEBUDGET}," >> 
if test ! -z "$NL_YSU_TOPDOWN_PBLMIX"; then echo "ysu_topdown_pblmix=${NL_YSU_TOPDOWN_PBLMIX}," 	if test ! -z "$NL_YSU_TOPDOWN_PBLMIX"; then echo "ysu_topdown_pblmix=${NL_YSU_TOPDOWN_PBLMIX}," 
if test ! -z "$NL_SHINHONG_TKE_DIAG"; then echo "shinhong_tke_diag=${NL_SHINHONG_TKE_DIAG}," >> 	if test ! -z "$NL_SHINHONG_TKE_DIAG"; then echo "shinhong_tke_diag=${NL_SHINHONG_TKE_DIAG}," >> 
if test ! -z "$NL_BL_MYNN_TKEADVECT"; then echo "bl_mynn_tkeadvect=${NL_BL_MYNN_TKEADVECT}," >> 	if test ! -z "$NL_BL_MYNN_TKEADVECT"; then echo "bl_mynn_tkeadvect=${NL_BL_MYNN_TKEADVECT}," >> 
if test ! -z "$NL_BL_MYNN_CLOUDPDF"; then echo "bl_mynn_cloudpdf=${NL_BL_MYNN_CLOUDPDF}," >> $FI	if test ! -z "$NL_BL_MYNN_CLOUDPDF"; then echo "bl_mynn_cloudpdf=${NL_BL_MYNN_CLOUDPDF}," >> $FI
if test ! -z "$NL_BL_MYNN_MIXLENGTH"; then echo "bl_mynn_mixlength=${NL_BL_MYNN_MIXLENGTH}," >>    <
if test ! -z "$NL_BL_MYNN_EDMF"; then echo "bl_mynn_edmf=${NL_BL_MYNN_EDMF}," >> $FILE;fi	   <
if test ! -z "$NL_BL_MYNN_EDMF_MOM"; then echo "bl_mynn_edmf_mom=${NL_BL_MYNN_EDMF_MOM}," >> $FI   <
if test ! -z "$NL_BL_MYNN_EDMF_TKE"; then echo "bl_mynn_edmf_tke=${NL_BL_MYNN_EDMF_TKE}," >> $FI   <
if test ! -z "$NL_BL_MYNN_EDMF_PART"; then echo "bl_mynn_edmf_part=${NL_BL_MYNN_EDMF_PART}," >>    <
if test ! -z "$NL_BL_MYNN_CLOUDMIX"; then echo "bl_mynn_cloudmix=${NL_BL_MYNN_CLOUDMIX}," >> $FI   <
if test ! -z "$NL_BL_MYNN_MIXQT"; then echo "bl_mynn_mixqt=${NL_BL_MYNN_MIXQT}," >> $FILE;fi	   <
if test ! -z "$NL_ICLOUD_BL"; then echo "icloud_bl=${NL_ICLOUD_BL}," >> $FILE;fi		   <
if test ! -z "$NL_MFSHCONV"; then echo "mfshconv=${NL_MFSHCONV}," >> $FILE;fi				if test ! -z "$NL_MFSHCONV"; then echo "mfshconv=${NL_MFSHCONV}," >> $FILE;fi
if test ! -z "$NL_SF_URBAN_PHYSICS"; then echo "sf_urban_physics=${NL_SF_URBAN_PHYSICS}," >> $FI	if test ! -z "$NL_SF_URBAN_PHYSICS"; then echo "sf_urban_physics=${NL_SF_URBAN_PHYSICS}," >> $FI
if test ! -z "$NL_BLDT"; then echo "bldt=${NL_BLDT}," >> $FILE;fi					if test ! -z "$NL_BLDT"; then echo "bldt=${NL_BLDT}," >> $FILE;fi
if test ! -z "$NL_CU_PHYSICS"; then echo "cu_physics=${NL_CU_PHYSICS}," >> $FILE;fi			if test ! -z "$NL_CU_PHYSICS"; then echo "cu_physics=${NL_CU_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_SHCU_PHYSICS"; then echo "shcu_physics=${NL_SHCU_PHYSICS}," >> $FILE;fi		if test ! -z "$NL_SHCU_PHYSICS"; then echo "shcu_physics=${NL_SHCU_PHYSICS}," >> $FILE;fi
if test ! -z "$NL_CU_DIAG"; then echo "cu_diag=${NL_CU_DIAG}," >> $FILE;fi				if test ! -z "$NL_CU_DIAG"; then echo "cu_diag=${NL_CU_DIAG}," >> $FILE;fi
if test ! -z "$NL_KF_EDRATES"; then echo "kf_edrates=${NL_KF_EDRATES}," >> $FILE;fi		   <
if test ! -z "$NL_KFETA_TRIGGER"; then echo "kfeta_trigger=${NL_KFETA_TRIGGER}," >> $FILE;fi		if test ! -z "$NL_KFETA_TRIGGER"; then echo "kfeta_trigger=${NL_KFETA_TRIGGER}," >> $FILE;fi
if test ! -z "$NL_NSAS_DX_FACTOR"; then echo "nsas_dx_factor=${NL_NSAS_DX_FACTOR}," >> $FILE;fi		if test ! -z "$NL_NSAS_DX_FACTOR"; then echo "nsas_dx_factor=${NL_NSAS_DX_FACTOR}," >> $FILE;fi
if test ! -z "$NL_CUDT"; then echo "cudt=${NL_CUDT}," >> $FILE;fi					if test ! -z "$NL_CUDT"; then echo "cudt=${NL_CUDT}," >> $FILE;fi
if test ! -z "$NL_GSMDT"; then echo "gsmdt=${NL_GSMDT}," >> $FILE;fi					if test ! -z "$NL_GSMDT"; then echo "gsmdt=${NL_GSMDT}," >> $FILE;fi
if test ! -z "$NL_ISFFLX"; then echo "isfflx=${NL_ISFFLX}," >> $FILE;fi					if test ! -z "$NL_ISFFLX"; then echo "isfflx=${NL_ISFFLX}," >> $FILE;fi
if test ! -z "$NL_IFSNOW"; then echo "ifsnow=${NL_IFSNOW}," >> $FILE;fi					if test ! -z "$NL_IFSNOW"; then echo "ifsnow=${NL_IFSNOW}," >> $FILE;fi
if test ! -z "$NL_ICLOUD"; then echo "icloud=${NL_ICLOUD}," >> $FILE;fi					if test ! -z "$NL_ICLOUD"; then echo "icloud=${NL_ICLOUD}," >> $FILE;fi
if test ! -z "$NL_IDEAL_XLAND"; then echo "ideal_xland=${NL_IDEAL_XLAND}," >> $FILE;fi			if test ! -z "$NL_IDEAL_XLAND"; then echo "ideal_xland=${NL_IDEAL_XLAND}," >> $FILE;fi
if test ! -z "$NL_SWRAD_SCAT"; then echo "swrad_scat=${NL_SWRAD_SCAT}," >> $FILE;fi			if test ! -z "$NL_SWRAD_SCAT"; then echo "swrad_scat=${NL_SWRAD_SCAT}," >> $FILE;fi
if test ! -z "$NL_SURFACE_INPUT_SOURCE"; then echo "surface_input_source=${NL_SURFACE_INPUT_SOUR	if test ! -z "$NL_SURFACE_INPUT_SOURCE"; then echo "surface_input_source=${NL_SURFACE_INPUT_SOUR
if test ! -z "$NL_NUM_SOIL_LAYERS"; then echo "num_soil_layers=${NL_NUM_SOIL_LAYERS}," >> $FILE;	if test ! -z "$NL_NUM_SOIL_LAYERS"; then echo "num_soil_layers=${NL_NUM_SOIL_LAYERS}," >> $FILE;
if test ! -z "$NL_MAXPATCH"; then echo "maxpatch=${NL_MAXPATCH}," >> $FILE;fi				if test ! -z "$NL_MAXPATCH"; then echo "maxpatch=${NL_MAXPATCH}," >> $FILE;fi
if test ! -z "$NL_NUM_SNOW_LAYERS"; then echo "num_snow_layers=${NL_NUM_SNOW_LAYERS}," >> $FILE;	if test ! -z "$NL_NUM_SNOW_LAYERS"; then echo "num_snow_layers=${NL_NUM_SNOW_LAYERS}," >> $FILE;
if test ! -z "$NL_NUM_SNSO_LAYERS"; then echo "num_snso_layers=${NL_NUM_SNSO_LAYERS}," >> $FILE;	if test ! -z "$NL_NUM_SNSO_LAYERS"; then echo "num_snso_layers=${NL_NUM_SNSO_LAYERS}," >> $FILE;
if test ! -z "$NL_NUM_URBAN_LAYERS"; then echo "num_urban_layers=${NL_NUM_URBAN_LAYERS}," >> $FI	if test ! -z "$NL_NUM_URBAN_LAYERS"; then echo "num_urban_layers=${NL_NUM_URBAN_LAYERS}," >> $FI
if test ! -z "$NL_NUM_URBAN_HI"; then echo "num_urban_hi=${NL_NUM_URBAN_HI}," >> $FILE;fi		if test ! -z "$NL_NUM_URBAN_HI"; then echo "num_urban_hi=${NL_NUM_URBAN_HI}," >> $FILE;fi
if test ! -z "$NL_NUM_MONTHS"; then echo "num_months=${NL_NUM_MONTHS}," >> $FILE;fi			if test ! -z "$NL_NUM_MONTHS"; then echo "num_months=${NL_NUM_MONTHS}," >> $FILE;fi
if test ! -z "$NL_SF_SURFACE_MOSAIC"; then echo "sf_surface_mosaic=${NL_SF_SURFACE_MOSAIC}," >> 	if test ! -z "$NL_SF_SURFACE_MOSAIC"; then echo "sf_surface_mosaic=${NL_SF_SURFACE_MOSAIC}," >> 
if test ! -z "$NL_MOSAIC_CAT"; then echo "mosaic_cat=${NL_MOSAIC_CAT}," >> $FILE;fi			if test ! -z "$NL_MOSAIC_CAT"; then echo "mosaic_cat=${NL_MOSAIC_CAT}," >> $FILE;fi
if test ! -z "$NL_MOSAIC_LU"; then echo "mosaic_lu=${NL_MOSAIC_LU}," >> $FILE;fi			if test ! -z "$NL_MOSAIC_LU"; then echo "mosaic_lu=${NL_MOSAIC_LU}," >> $FILE;fi
if test ! -z "$NL_MOSAIC_SOIL"; then echo "mosaic_soil=${NL_MOSAIC_SOIL}," >> $FILE;fi			if test ! -z "$NL_MOSAIC_SOIL"; then echo "mosaic_soil=${NL_MOSAIC_SOIL}," >> $FILE;fi
if test ! -z "$NL_MAXIENS"; then echo "maxiens=${NL_MAXIENS}," >> $FILE;fi				if test ! -z "$NL_MAXIENS"; then echo "maxiens=${NL_MAXIENS}," >> $FILE;fi
if test ! -z "$NL_MAXENS"; then echo "maxens=${NL_MAXENS}," >> $FILE;fi					if test ! -z "$NL_MAXENS"; then echo "maxens=${NL_MAXENS}," >> $FILE;fi
if test ! -z "$NL_MAXENS2"; then echo "maxens2=${NL_MAXENS2}," >> $FILE;fi				if test ! -z "$NL_MAXENS2"; then echo "maxens2=${NL_MAXENS2}," >> $FILE;fi
if test ! -z "$NL_MAXENS3"; then echo "maxens3=${NL_MAXENS3}," >> $FILE;fi				if test ! -z "$NL_MAXENS3"; then echo "maxens3=${NL_MAXENS3}," >> $FILE;fi
if test ! -z "$NL_ENSDIM"; then echo "ensdim=${NL_ENSDIM}," >> $FILE;fi					if test ! -z "$NL_ENSDIM"; then echo "ensdim=${NL_ENSDIM}," >> $FILE;fi
if test ! -z "$NL_CUGD_AVEDX"; then echo "cugd_avedx=${NL_CUGD_AVEDX}," >> $FILE;fi			if test ! -z "$NL_CUGD_AVEDX"; then echo "cugd_avedx=${NL_CUGD_AVEDX}," >> $FILE;fi
if test ! -z "$NL_CLOS_CHOICE"; then echo "clos_choice=${NL_CLOS_CHOICE}," >> $FILE;fi			if test ! -z "$NL_CLOS_CHOICE"; then echo "clos_choice=${NL_CLOS_CHOICE}," >> $FILE;fi
if test ! -z "$NL_IMOMENTUM"; then echo "imomentum=${NL_IMOMENTUM}," >> $FILE;fi			if test ! -z "$NL_IMOMENTUM"; then echo "imomentum=${NL_IMOMENTUM}," >> $FILE;fi
if test ! -z "$NL_ISHALLOW"; then echo "ishallow=${NL_ISHALLOW}," >> $FILE;fi				if test ! -z "$NL_ISHALLOW"; then echo "ishallow=${NL_ISHALLOW}," >> $FILE;fi
if test ! -z "$NL_CONVTRANS_AVGLEN_M"; then echo "convtrans_avglen_m=${NL_CONVTRANS_AVGLEN_M}," 	if test ! -z "$NL_CONVTRANS_AVGLEN_M"; then echo "convtrans_avglen_m=${NL_CONVTRANS_AVGLEN_M}," 
if test ! -z "$NL_NUM_LAND_CAT"; then echo "num_land_cat=${NL_NUM_LAND_CAT}," >> $FILE;fi		if test ! -z "$NL_NUM_LAND_CAT"; then echo "num_land_cat=${NL_NUM_LAND_CAT}," >> $FILE;fi
if test ! -z "$NL_NUM_SOIL_CAT"; then echo "num_soil_cat=${NL_NUM_SOIL_CAT}," >> $FILE;fi		if test ! -z "$NL_NUM_SOIL_CAT"; then echo "num_soil_cat=${NL_NUM_SOIL_CAT}," >> $FILE;fi
if test ! -z "$NL_MP_ZERO_OUT"; then echo "mp_zero_out=${NL_MP_ZERO_OUT}," >> $FILE;fi			if test ! -z "$NL_MP_ZERO_OUT"; then echo "mp_zero_out=${NL_MP_ZERO_OUT}," >> $FILE;fi
if test ! -z "$NL_MP_ZERO_OUT_THRESH"; then echo "mp_zero_out_thresh=${NL_MP_ZERO_OUT_THRESH}," 	if test ! -z "$NL_MP_ZERO_OUT_THRESH"; then echo "mp_zero_out_thresh=${NL_MP_ZERO_OUT_THRESH}," 
if test ! -z "$NL_SEAICE_THRESHOLD"; then echo "seaice_threshold=${NL_SEAICE_THRESHOLD}," >> $FI	if test ! -z "$NL_SEAICE_THRESHOLD"; then echo "seaice_threshold=${NL_SEAICE_THRESHOLD}," >> $FI
if test ! -z "$NL_SST_UPDATE"; then echo "sst_update=${NL_SST_UPDATE}," >> $FILE;fi			if test ! -z "$NL_SST_UPDATE"; then echo "sst_update=${NL_SST_UPDATE}," >> $FILE;fi
if test ! -z "$NL_SST_SKIN"; then echo "sst_skin=${NL_SST_SKIN}," >> $FILE;fi				if test ! -z "$NL_SST_SKIN"; then echo "sst_skin=${NL_SST_SKIN}," >> $FILE;fi
if test ! -z "$NL_TMN_UPDATE"; then echo "tmn_update=${NL_TMN_UPDATE}," >> $FILE;fi			if test ! -z "$NL_TMN_UPDATE"; then echo "tmn_update=${NL_TMN_UPDATE}," >> $FILE;fi
if test ! -z "$NL_USEMONALB"; then echo "usemonalb=${NL_USEMONALB}," >> $FILE;fi			if test ! -z "$NL_USEMONALB"; then echo "usemonalb=${NL_USEMONALB}," >> $FILE;fi
if test ! -z "$NL_RDMAXALB"; then echo "rdmaxalb=${NL_RDMAXALB}," >> $FILE;fi				if test ! -z "$NL_RDMAXALB"; then echo "rdmaxalb=${NL_RDMAXALB}," >> $FILE;fi
if test ! -z "$NL_RDLAI2D"; then echo "rdlai2d=${NL_RDLAI2D}," >> $FILE;fi				if test ! -z "$NL_RDLAI2D"; then echo "rdlai2d=${NL_RDLAI2D}," >> $FILE;fi
if test ! -z "$NL_UA_PHYS"; then echo "ua_phys=${NL_UA_PHYS}," >> $FILE;fi				if test ! -z "$NL_UA_PHYS"; then echo "ua_phys=${NL_UA_PHYS}," >> $FILE;fi
if test ! -z "$NL_OPT_THCND"; then echo "opt_thcnd=${NL_OPT_THCND}," >> $FILE;fi		   <
if test ! -z "$NL_CO2TF"; then echo "co2tf=${NL_CO2TF}," >> $FILE;fi					if test ! -z "$NL_CO2TF"; then echo "co2tf=${NL_CO2TF}," >> $FILE;fi
if test ! -z "$NL_RA_CALL_OFFSET"; then echo "ra_call_offset=${NL_RA_CALL_OFFSET}," >> $FILE;fi		if test ! -z "$NL_RA_CALL_OFFSET"; then echo "ra_call_offset=${NL_RA_CALL_OFFSET}," >> $FILE;fi
if test ! -z "$NL_CAM_ABS_FREQ_S"; then echo "cam_abs_freq_s=${NL_CAM_ABS_FREQ_S}," >> $FILE;fi		if test ! -z "$NL_CAM_ABS_FREQ_S"; then echo "cam_abs_freq_s=${NL_CAM_ABS_FREQ_S}," >> $FILE;fi
if test ! -z "$NL_LEVSIZ"; then echo "levsiz=${NL_LEVSIZ}," >> $FILE;fi					if test ! -z "$NL_LEVSIZ"; then echo "levsiz=${NL_LEVSIZ}," >> $FILE;fi
if test ! -z "$NL_PAERLEV"; then echo "paerlev=${NL_PAERLEV}," >> $FILE;fi				if test ! -z "$NL_PAERLEV"; then echo "paerlev=${NL_PAERLEV}," >> $FILE;fi
if test ! -z "$NL_CAM_ABS_DIM1"; then echo "cam_abs_dim1=${NL_CAM_ABS_DIM1}," >> $FILE;fi		if test ! -z "$NL_CAM_ABS_DIM1"; then echo "cam_abs_dim1=${NL_CAM_ABS_DIM1}," >> $FILE;fi
if test ! -z "$NL_CAM_ABS_DIM2"; then echo "cam_abs_dim2=${NL_CAM_ABS_DIM2}," >> $FILE;fi		if test ! -z "$NL_CAM_ABS_DIM2"; then echo "cam_abs_dim2=${NL_CAM_ABS_DIM2}," >> $FILE;fi
if test ! -z "$NL_LAGDAY"; then echo "lagday=${NL_LAGDAY}," >> $FILE;fi					if test ! -z "$NL_LAGDAY"; then echo "lagday=${NL_LAGDAY}," >> $FILE;fi
if test ! -z "$NL_NO_SRC_TYPES"; then echo "no_src_types=${NL_NO_SRC_TYPES}," >> $FILE;fi		if test ! -z "$NL_NO_SRC_TYPES"; then echo "no_src_types=${NL_NO_SRC_TYPES}," >> $FILE;fi
if test ! -z "$NL_ALEVSIZ"; then echo "alevsiz=${NL_ALEVSIZ}," >> $FILE;fi				if test ! -z "$NL_ALEVSIZ"; then echo "alevsiz=${NL_ALEVSIZ}," >> $FILE;fi
if test ! -z "$NL_O3INPUT"; then echo "o3input=${NL_O3INPUT}," >> $FILE;fi				if test ! -z "$NL_O3INPUT"; then echo "o3input=${NL_O3INPUT}," >> $FILE;fi
if test ! -z "$NL_AER_OPT"; then echo "aer_opt=${NL_AER_OPT}," >> $FILE;fi				if test ! -z "$NL_AER_OPT"; then echo "aer_opt=${NL_AER_OPT}," >> $FILE;fi
if test ! -z "$NL_SWINT_OPT"; then echo "swint_opt=${NL_SWINT_OPT}," >> $FILE;fi			if test ! -z "$NL_SWINT_OPT"; then echo "swint_opt=${NL_SWINT_OPT}," >> $FILE;fi
if test ! -z "$NL_AER_TYPE"; then echo "aer_type=${NL_AER_TYPE}," >> $FILE;fi				if test ! -z "$NL_AER_TYPE"; then echo "aer_type=${NL_AER_TYPE}," >> $FILE;fi
if test ! -z "$NL_AER_AOD550_OPT"; then echo "aer_aod550_opt=${NL_AER_AOD550_OPT}," >> $FILE;fi		if test ! -z "$NL_AER_AOD550_OPT"; then echo "aer_aod550_opt=${NL_AER_AOD550_OPT}," >> $FILE;fi
if test ! -z "$NL_AER_ANGEXP_OPT"; then echo "aer_angexp_opt=${NL_AER_ANGEXP_OPT}," >> $FILE;fi		if test ! -z "$NL_AER_ANGEXP_OPT"; then echo "aer_angexp_opt=${NL_AER_ANGEXP_OPT}," >> $FILE;fi
if test ! -z "$NL_AER_SSA_OPT"; then echo "aer_ssa_opt=${NL_AER_SSA_OPT}," >> $FILE;fi			if test ! -z "$NL_AER_SSA_OPT"; then echo "aer_ssa_opt=${NL_AER_SSA_OPT}," >> $FILE;fi
if test ! -z "$NL_AER_ASY_OPT"; then echo "aer_asy_opt=${NL_AER_ASY_OPT}," >> $FILE;fi			if test ! -z "$NL_AER_ASY_OPT"; then echo "aer_asy_opt=${NL_AER_ASY_OPT}," >> $FILE;fi
if test ! -z "$NL_AER_AOD550_VAL"; then echo "aer_aod550_val=${NL_AER_AOD550_VAL}," >> $FILE;fi		if test ! -z "$NL_AER_AOD550_VAL"; then echo "aer_aod550_val=${NL_AER_AOD550_VAL}," >> $FILE;fi
if test ! -z "$NL_AER_ANGEXP_VAL"; then echo "aer_angexp_val=${NL_AER_ANGEXP_VAL}," >> $FILE;fi		if test ! -z "$NL_AER_ANGEXP_VAL"; then echo "aer_angexp_val=${NL_AER_ANGEXP_VAL}," >> $FILE;fi
if test ! -z "$NL_AER_SSA_VAL"; then echo "aer_ssa_val=${NL_AER_SSA_VAL}," >> $FILE;fi			if test ! -z "$NL_AER_SSA_VAL"; then echo "aer_ssa_val=${NL_AER_SSA_VAL}," >> $FILE;fi
if test ! -z "$NL_AER_ASY_VAL"; then echo "aer_asy_val=${NL_AER_ASY_VAL}," >> $FILE;fi			if test ! -z "$NL_AER_ASY_VAL"; then echo "aer_asy_val=${NL_AER_ASY_VAL}," >> $FILE;fi
if test ! -z "$NL_CU_RAD_FEEDBACK"; then echo "cu_rad_feedback=${NL_CU_RAD_FEEDBACK}," >> $FILE;	if test ! -z "$NL_CU_RAD_FEEDBACK"; then echo "cu_rad_feedback=${NL_CU_RAD_FEEDBACK}," >> $FILE;
if test ! -z "$NL_SHALLOWCU_FORCED_RA"; then echo "shallowcu_forced_ra=${NL_SHALLOWCU_FORCED_RA}	if test ! -z "$NL_SHALLOWCU_FORCED_RA"; then echo "shallowcu_forced_ra=${NL_SHALLOWCU_FORCED_RA}
if test ! -z "$NL_NUMBINS"; then echo "numbins=${NL_NUMBINS}," >> $FILE;fi				if test ! -z "$NL_NUMBINS"; then echo "numbins=${NL_NUMBINS}," >> $FILE;fi
if test ! -z "$NL_THBINSIZE"; then echo "thbinsize=${NL_THBINSIZE}," >> $FILE;fi			if test ! -z "$NL_THBINSIZE"; then echo "thbinsize=${NL_THBINSIZE}," >> $FILE;fi
if test ! -z "$NL_RBINSIZE"; then echo "rbinsize=${NL_RBINSIZE}," >> $FILE;fi				if test ! -z "$NL_RBINSIZE"; then echo "rbinsize=${NL_RBINSIZE}," >> $FILE;fi
if test ! -z "$NL_MINDEEPFREQ"; then echo "mindeepfreq=${NL_MINDEEPFREQ}," >> $FILE;fi			if test ! -z "$NL_MINDEEPFREQ"; then echo "mindeepfreq=${NL_MINDEEPFREQ}," >> $FILE;fi
if test ! -z "$NL_MINSHALLOWFREQ"; then echo "minshallowfreq=${NL_MINSHALLOWFREQ}," >> $FILE;fi		if test ! -z "$NL_MINSHALLOWFREQ"; then echo "minshallowfreq=${NL_MINSHALLOWFREQ}," >> $FILE;fi
if test ! -z "$NL_SHCU_AEROSOLS_OPT"; then echo "shcu_aerosols_opt=${NL_SHCU_AEROSOLS_OPT}," >> 	if test ! -z "$NL_SHCU_AEROSOLS_OPT"; then echo "shcu_aerosols_opt=${NL_SHCU_AEROSOLS_OPT}," >> 
if test ! -z "$NL_PXLSM_SMOIS_INIT"; then echo "pxlsm_smois_init=${NL_PXLSM_SMOIS_INIT}," >> $FI	if test ! -z "$NL_PXLSM_SMOIS_INIT"; then echo "pxlsm_smois_init=${NL_PXLSM_SMOIS_INIT}," >> $FI
if test ! -z "$NL_OMLCALL"; then echo "omlcall=${NL_OMLCALL}," >> $FILE;fi				if test ! -z "$NL_OMLCALL"; then echo "omlcall=${NL_OMLCALL}," >> $FILE;fi
if test ! -z "$NL_SF_OCEAN_PHYSICS"; then echo "sf_ocean_physics=${NL_SF_OCEAN_PHYSICS}," >> $FI	if test ! -z "$NL_SF_OCEAN_PHYSICS"; then echo "sf_ocean_physics=${NL_SF_OCEAN_PHYSICS}," >> $FI
if test ! -z "$NL_TRAJ_OPT"; then echo "traj_opt=${NL_TRAJ_OPT}," >> $FILE;fi				if test ! -z "$NL_TRAJ_OPT"; then echo "traj_opt=${NL_TRAJ_OPT}," >> $FILE;fi
if test ! -z "$NL_DM_HAS_TRAJ"; then echo "dm_has_traj=${NL_DM_HAS_TRAJ}," >> $FILE;fi		   <
if test ! -z "$NL_TRACERCALL"; then echo "tracercall=${NL_TRACERCALL}," >> $FILE;fi			if test ! -z "$NL_TRACERCALL"; then echo "tracercall=${NL_TRACERCALL}," >> $FILE;fi
if test ! -z "$NL_OMDT"; then echo "omdt=${NL_OMDT}," >> $FILE;fi					if test ! -z "$NL_OMDT"; then echo "omdt=${NL_OMDT}," >> $FILE;fi
if test ! -z "$NL_OML_HML0"; then echo "oml_hml0=${NL_OML_HML0}," >> $FILE;fi				if test ! -z "$NL_OML_HML0"; then echo "oml_hml0=${NL_OML_HML0}," >> $FILE;fi
if test ! -z "$NL_OML_GAMMA"; then echo "oml_gamma=${NL_OML_GAMMA}," >> $FILE;fi			if test ! -z "$NL_OML_GAMMA"; then echo "oml_gamma=${NL_OML_GAMMA}," >> $FILE;fi
if test ! -z "$NL_OML_RELAXATION_TIME"; then echo "oml_relaxation_time=${NL_OML_RELAXATION_TIME}   <
if test ! -z "$NL_ISFTCFLX"; then echo "isftcflx=${NL_ISFTCFLX}," >> $FILE;fi				if test ! -z "$NL_ISFTCFLX"; then echo "isftcflx=${NL_ISFTCFLX}," >> $FILE;fi
if test ! -z "$NL_IZ0TLND"; then echo "iz0tlnd=${NL_IZ0TLND}," >> $FILE;fi				if test ! -z "$NL_IZ0TLND"; then echo "iz0tlnd=${NL_IZ0TLND}," >> $FILE;fi
if test ! -z "$NL_SHADLEN"; then echo "shadlen=${NL_SHADLEN}," >> $FILE;fi				if test ! -z "$NL_SHADLEN"; then echo "shadlen=${NL_SHADLEN}," >> $FILE;fi
if test ! -z "$NL_SLOPE_RAD"; then echo "slope_rad=${NL_SLOPE_RAD}," >> $FILE;fi			if test ! -z "$NL_SLOPE_RAD"; then echo "slope_rad=${NL_SLOPE_RAD}," >> $FILE;fi
if test ! -z "$NL_TOPO_SHADING"; then echo "topo_shading=${NL_TOPO_SHADING}," >> $FILE;fi		if test ! -z "$NL_TOPO_SHADING"; then echo "topo_shading=${NL_TOPO_SHADING}," >> $FILE;fi
if test ! -z "$NL_TOPO_WIND"; then echo "topo_wind=${NL_TOPO_WIND}," >> $FILE;fi			if test ! -z "$NL_TOPO_WIND"; then echo "topo_wind=${NL_TOPO_WIND}," >> $FILE;fi
if test ! -z "$NL_NO_MP_HEATING"; then echo "no_mp_heating=${NL_NO_MP_HEATING}," >> $FILE;fi		if test ! -z "$NL_NO_MP_HEATING"; then echo "no_mp_heating=${NL_NO_MP_HEATING}," >> $FILE;fi
if test ! -z "$NL_FRACTIONAL_SEAICE"; then echo "fractional_seaice=${NL_FRACTIONAL_SEAICE}," >> 	if test ! -z "$NL_FRACTIONAL_SEAICE"; then echo "fractional_seaice=${NL_FRACTIONAL_SEAICE}," >> 
if test ! -z "$NL_SEAICE_SNOWDEPTH_OPT"; then echo "seaice_snowdepth_opt=${NL_SEAICE_SNOWDEPTH_O	if test ! -z "$NL_SEAICE_SNOWDEPTH_OPT"; then echo "seaice_snowdepth_opt=${NL_SEAICE_SNOWDEPTH_O
if test ! -z "$NL_SEAICE_SNOWDEPTH_MAX"; then echo "seaice_snowdepth_max=${NL_SEAICE_SNOWDEPTH_M	if test ! -z "$NL_SEAICE_SNOWDEPTH_MAX"; then echo "seaice_snowdepth_max=${NL_SEAICE_SNOWDEPTH_M
if test ! -z "$NL_SEAICE_SNOWDEPTH_MIN"; then echo "seaice_snowdepth_min=${NL_SEAICE_SNOWDEPTH_M	if test ! -z "$NL_SEAICE_SNOWDEPTH_MIN"; then echo "seaice_snowdepth_min=${NL_SEAICE_SNOWDEPTH_M
if test ! -z "$NL_SEAICE_ALBEDO_OPT"; then echo "seaice_albedo_opt=${NL_SEAICE_ALBEDO_OPT}," >> 	if test ! -z "$NL_SEAICE_ALBEDO_OPT"; then echo "seaice_albedo_opt=${NL_SEAICE_ALBEDO_OPT}," >> 
if test ! -z "$NL_SEAICE_ALBEDO_DEFAULT"; then echo "seaice_albedo_default=${NL_SEAICE_ALBEDO_DE	if test ! -z "$NL_SEAICE_ALBEDO_DEFAULT"; then echo "seaice_albedo_default=${NL_SEAICE_ALBEDO_DE
if test ! -z "$NL_SEAICE_THICKNESS_OPT"; then echo "seaice_thickness_opt=${NL_SEAICE_THICKNESS_O	if test ! -z "$NL_SEAICE_THICKNESS_OPT"; then echo "seaice_thickness_opt=${NL_SEAICE_THICKNESS_O
if test ! -z "$NL_SEAICE_THICKNESS_DEFAULT"; then echo "seaice_thickness_default=${NL_SEAICE_THI	if test ! -z "$NL_SEAICE_THICKNESS_DEFAULT"; then echo "seaice_thickness_default=${NL_SEAICE_THI
if test ! -z "$NL_TICE2TSK_IF2COLD"; then echo "tice2tsk_if2cold=${NL_TICE2TSK_IF2COLD}," >> $FI	if test ! -z "$NL_TICE2TSK_IF2COLD"; then echo "tice2tsk_if2cold=${NL_TICE2TSK_IF2COLD}," >> $FI
if test ! -z "$NL_BUCKET_MM"; then echo "bucket_mm=${NL_BUCKET_MM}," >> $FILE;fi			if test ! -z "$NL_BUCKET_MM"; then echo "bucket_mm=${NL_BUCKET_MM}," >> $FILE;fi
if test ! -z "$NL_BUCKET_J"; then echo "bucket_j=${NL_BUCKET_J}," >> $FILE;fi				if test ! -z "$NL_BUCKET_J"; then echo "bucket_j=${NL_BUCKET_J}," >> $FILE;fi
if test ! -z "$NL_MP_TEND_LIM"; then echo "mp_tend_lim=${NL_MP_TEND_LIM}," >> $FILE;fi			if test ! -z "$NL_MP_TEND_LIM"; then echo "mp_tend_lim=${NL_MP_TEND_LIM}," >> $FILE;fi
if test ! -z "$NL_PREC_ACC_DT"; then echo "prec_acc_dt=${NL_PREC_ACC_DT}," >> $FILE;fi			if test ! -z "$NL_PREC_ACC_DT"; then echo "prec_acc_dt=${NL_PREC_ACC_DT}," >> $FILE;fi
if test ! -z "$NL_GRAV_SETTLING"; then echo "grav_settling=${NL_GRAV_SETTLING}," >> $FILE;fi		if test ! -z "$NL_GRAV_SETTLING"; then echo "grav_settling=${NL_GRAV_SETTLING}," >> $FILE;fi
if test ! -z "$NL_SAS_PGCON"; then echo "sas_pgcon=${NL_SAS_PGCON}," >> $FILE;fi			if test ! -z "$NL_SAS_PGCON"; then echo "sas_pgcon=${NL_SAS_PGCON}," >> $FILE;fi
if test ! -z "$NL_SCALAR_PBLMIX"; then echo "scalar_pblmix=${NL_SCALAR_PBLMIX}," >> $FILE;fi		if test ! -z "$NL_SCALAR_PBLMIX"; then echo "scalar_pblmix=${NL_SCALAR_PBLMIX}," >> $FILE;fi
if test ! -z "$NL_TRACER_PBLMIX"; then echo "tracer_pblmix=${NL_TRACER_PBLMIX}," >> $FILE;fi		if test ! -z "$NL_TRACER_PBLMIX"; then echo "tracer_pblmix=${NL_TRACER_PBLMIX}," >> $FILE;fi
if test ! -z "$NL_USE_AERO_ICBC"; then echo "use_aero_icbc=${NL_USE_AERO_ICBC}," >> $FILE;fi		if test ! -z "$NL_USE_AERO_ICBC"; then echo "use_aero_icbc=${NL_USE_AERO_ICBC}," >> $FILE;fi
if test ! -z "$NL_USE_RAP_AERO_ICBC"; then echo "use_rap_aero_icbc=${NL_USE_RAP_AERO_ICBC}," >> 	if test ! -z "$NL_USE_RAP_AERO_ICBC"; then echo "use_rap_aero_icbc=${NL_USE_RAP_AERO_ICBC}," >> 
if test ! -z "$NL_USE_MP_RE"; then echo "use_mp_re=${NL_USE_MP_RE}," >> $FILE;fi		   <
if test ! -z "$NL_DIRECT_FEED_CHIMERE"; then echo "direct_feed_chimere=${NL_DIRECT_FEED_CHIMERE}	if test ! -z "$NL_DIRECT_FEED_CHIMERE"; then echo "direct_feed_chimere=${NL_DIRECT_FEED_CHIMERE}
if test ! -z "$NL_INDIRECT_FEED_CHIMERE"; then echo "indirect_feed_chimere=${NL_INDIRECT_FEED_CH	if test ! -z "$NL_INDIRECT_FEED_CHIMERE"; then echo "indirect_feed_chimere=${NL_INDIRECT_FEED_CH
if test ! -z "$NL_N_BIN"; then echo "n_bin=${NL_N_BIN}," >> $FILE;fi					if test ! -z "$NL_N_BIN"; then echo "n_bin=${NL_N_BIN}," >> $FILE;fi
if test ! -z "$NL_CCN_CONC"; then echo "ccn_conc=${NL_CCN_CONC}," >> $FILE;fi				if test ! -z "$NL_CCN_CONC"; then echo "ccn_conc=${NL_CCN_CONC}," >> $FILE;fi
if test ! -z "$NL_HAIL_OPT"; then echo "hail_opt=${NL_HAIL_OPT}," >> $FILE;fi				if test ! -z "$NL_HAIL_OPT"; then echo "hail_opt=${NL_HAIL_OPT}," >> $FILE;fi
if test ! -z "$NL_WTDDT"; then echo "wtddt=${NL_WTDDT}," >> $FILE;fi					if test ! -z "$NL_WTDDT"; then echo "wtddt=${NL_WTDDT}," >> $FILE;fi
if test ! -z "$NL_WINDFARM_OPT"; then echo "windfarm_opt=${NL_WINDFARM_OPT}," >> $FILE;fi		if test ! -z "$NL_WINDFARM_OPT"; then echo "windfarm_opt=${NL_WINDFARM_OPT}," >> $FILE;fi
if test ! -z "$NL_WINDFARM_IJ"; then echo "windfarm_ij=${NL_WINDFARM_IJ}," >> $FILE;fi			if test ! -z "$NL_WINDFARM_IJ"; then echo "windfarm_ij=${NL_WINDFARM_IJ}," >> $FILE;fi
if test ! -z "$NL_HAILCAST_OPT"; then echo "hailcast_opt=${NL_HAILCAST_OPT}," >> $FILE;fi	   <
if test ! -z "$NL_LIGHTNING_OPTION"; then echo "lightning_option=${NL_LIGHTNING_OPTION}," >> $FI	if test ! -z "$NL_LIGHTNING_OPTION"; then echo "lightning_option=${NL_LIGHTNING_OPTION}," >> $FI
if test ! -z "$NL_LIGHTNING_DT"; then echo "lightning_dt=${NL_LIGHTNING_DT}," >> $FILE;fi		if test ! -z "$NL_LIGHTNING_DT"; then echo "lightning_dt=${NL_LIGHTNING_DT}," >> $FILE;fi
if test ! -z "$NL_LIGHTNING_START_SECONDS"; then echo "lightning_start_seconds=${NL_LIGHTNING_ST	if test ! -z "$NL_LIGHTNING_START_SECONDS"; then echo "lightning_start_seconds=${NL_LIGHTNING_ST
if test ! -z "$NL_FLASHRATE_FACTOR"; then echo "flashrate_factor=${NL_FLASHRATE_FACTOR}," >> $FI	if test ! -z "$NL_FLASHRATE_FACTOR"; then echo "flashrate_factor=${NL_FLASHRATE_FACTOR}," >> $FI
if test ! -z "$NL_ICCG_METHOD"; then echo "iccg_method=${NL_ICCG_METHOD}," >> $FILE;fi			if test ! -z "$NL_ICCG_METHOD"; then echo "iccg_method=${NL_ICCG_METHOD}," >> $FILE;fi
if test ! -z "$NL_ICCG_PRESCRIBED_NUM"; then echo "iccg_prescribed_num=${NL_ICCG_PRESCRIBED_NUM}	if test ! -z "$NL_ICCG_PRESCRIBED_NUM"; then echo "iccg_prescribed_num=${NL_ICCG_PRESCRIBED_NUM}
if test ! -z "$NL_ICCG_PRESCRIBED_DEN"; then echo "iccg_prescribed_den=${NL_ICCG_PRESCRIBED_DEN}	if test ! -z "$NL_ICCG_PRESCRIBED_DEN"; then echo "iccg_prescribed_den=${NL_ICCG_PRESCRIBED_DEN}
if test ! -z "$NL_CELLCOUNT_METHOD"; then echo "cellcount_method=${NL_CELLCOUNT_METHOD}," >> $FI	if test ! -z "$NL_CELLCOUNT_METHOD"; then echo "cellcount_method=${NL_CELLCOUNT_METHOD}," >> $FI
if test ! -z "$NL_CLDTOP_ADJUSTMENT"; then echo "cldtop_adjustment=${NL_CLDTOP_ADJUSTMENT}," >> 	if test ! -z "$NL_CLDTOP_ADJUSTMENT"; then echo "cldtop_adjustment=${NL_CLDTOP_ADJUSTMENT}," >> 
if test ! -z "$NL_SF_LAKE_PHYSICS"; then echo "sf_lake_physics=${NL_SF_LAKE_PHYSICS}," >> $FILE;	if test ! -z "$NL_SF_LAKE_PHYSICS"; then echo "sf_lake_physics=${NL_SF_LAKE_PHYSICS}," >> $FILE;
if test ! -z "$NL_LAKEDEPTH_DEFAULT"; then echo "lakedepth_default=${NL_LAKEDEPTH_DEFAULT}," >> 	if test ! -z "$NL_LAKEDEPTH_DEFAULT"; then echo "lakedepth_default=${NL_LAKEDEPTH_DEFAULT}," >> 
if test ! -z "$NL_LAKE_MIN_ELEV"; then echo "lake_min_elev=${NL_LAKE_MIN_ELEV}," >> $FILE;fi		if test ! -z "$NL_LAKE_MIN_ELEV"; then echo "lake_min_elev=${NL_LAKE_MIN_ELEV}," >> $FILE;fi
if test ! -z "$NL_USE_LAKEDEPTH"; then echo "use_lakedepth=${NL_USE_LAKEDEPTH}," >> $FILE;fi		if test ! -z "$NL_USE_LAKEDEPTH"; then echo "use_lakedepth=${NL_USE_LAKEDEPTH}," >> $FILE;fi
if test ! -z "$NL_CHEM_OPT"; then echo "chem_opt=${NL_CHEM_OPT}," >> $FILE;fi				if test ! -z "$NL_CHEM_OPT"; then echo "chem_opt=${NL_CHEM_OPT}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&noah_mp >> $FILE											echo \&noah_mp >> $FILE
if test ! -z "$NL_DVEG"; then echo "dveg=${NL_DVEG}," >> $FILE;fi					if test ! -z "$NL_DVEG"; then echo "dveg=${NL_DVEG}," >> $FILE;fi
if test ! -z "$NL_OPT_CRS"; then echo "opt_crs=${NL_OPT_CRS}," >> $FILE;fi				if test ! -z "$NL_OPT_CRS"; then echo "opt_crs=${NL_OPT_CRS}," >> $FILE;fi
if test ! -z "$NL_OPT_BTR"; then echo "opt_btr=${NL_OPT_BTR}," >> $FILE;fi				if test ! -z "$NL_OPT_BTR"; then echo "opt_btr=${NL_OPT_BTR}," >> $FILE;fi
if test ! -z "$NL_OPT_RUN"; then echo "opt_run=${NL_OPT_RUN}," >> $FILE;fi				if test ! -z "$NL_OPT_RUN"; then echo "opt_run=${NL_OPT_RUN}," >> $FILE;fi
if test ! -z "$NL_OPT_SFC"; then echo "opt_sfc=${NL_OPT_SFC}," >> $FILE;fi				if test ! -z "$NL_OPT_SFC"; then echo "opt_sfc=${NL_OPT_SFC}," >> $FILE;fi
if test ! -z "$NL_OPT_FRZ"; then echo "opt_frz=${NL_OPT_FRZ}," >> $FILE;fi				if test ! -z "$NL_OPT_FRZ"; then echo "opt_frz=${NL_OPT_FRZ}," >> $FILE;fi
if test ! -z "$NL_OPT_INF"; then echo "opt_inf=${NL_OPT_INF}," >> $FILE;fi				if test ! -z "$NL_OPT_INF"; then echo "opt_inf=${NL_OPT_INF}," >> $FILE;fi
if test ! -z "$NL_OPT_RAD"; then echo "opt_rad=${NL_OPT_RAD}," >> $FILE;fi				if test ! -z "$NL_OPT_RAD"; then echo "opt_rad=${NL_OPT_RAD}," >> $FILE;fi
if test ! -z "$NL_OPT_ALB"; then echo "opt_alb=${NL_OPT_ALB}," >> $FILE;fi				if test ! -z "$NL_OPT_ALB"; then echo "opt_alb=${NL_OPT_ALB}," >> $FILE;fi
if test ! -z "$NL_OPT_SNF"; then echo "opt_snf=${NL_OPT_SNF}," >> $FILE;fi				if test ! -z "$NL_OPT_SNF"; then echo "opt_snf=${NL_OPT_SNF}," >> $FILE;fi
if test ! -z "$NL_OPT_TBOT"; then echo "opt_tbot=${NL_OPT_TBOT}," >> $FILE;fi				if test ! -z "$NL_OPT_TBOT"; then echo "opt_tbot=${NL_OPT_TBOT}," >> $FILE;fi
if test ! -z "$NL_OPT_STC"; then echo "opt_stc=${NL_OPT_STC}," >> $FILE;fi				if test ! -z "$NL_OPT_STC"; then echo "opt_stc=${NL_OPT_STC}," >> $FILE;fi
if test ! -z "$NL_OPT_GLA"; then echo "opt_gla=${NL_OPT_GLA}," >> $FILE;fi			   <
if test ! -z "$NL_OPT_RSF"; then echo "opt_rsf=${NL_OPT_RSF}," >> $FILE;fi			   <
echo / >> $FILE												echo / >> $FILE
echo \&fdda >> $FILE											echo \&fdda >> $FILE
if test ! -z "$NL_FGDT"; then echo "fgdt=${NL_FGDT}," >> $FILE;fi					if test ! -z "$NL_FGDT"; then echo "fgdt=${NL_FGDT}," >> $FILE;fi
if test ! -z "$NL_FGDTZERO"; then echo "fgdtzero=${NL_FGDTZERO}," >> $FILE;fi				if test ! -z "$NL_FGDTZERO"; then echo "fgdtzero=${NL_FGDTZERO}," >> $FILE;fi
if test ! -z "$NL_GRID_FDDA"; then echo "grid_fdda=${NL_GRID_FDDA}," >> $FILE;fi			if test ! -z "$NL_GRID_FDDA"; then echo "grid_fdda=${NL_GRID_FDDA}," >> $FILE;fi
if test ! -z "$NL_GRID_SFDDA"; then echo "grid_sfdda=${NL_GRID_SFDDA}," >> $FILE;fi			if test ! -z "$NL_GRID_SFDDA"; then echo "grid_sfdda=${NL_GRID_SFDDA}," >> $FILE;fi
if test ! -z "$NL_IF_NO_PBL_NUDGING_UV"; then echo "if_no_pbl_nudging_uv=${NL_IF_NO_PBL_NUDGING_	if test ! -z "$NL_IF_NO_PBL_NUDGING_UV"; then echo "if_no_pbl_nudging_uv=${NL_IF_NO_PBL_NUDGING_
if test ! -z "$NL_IF_NO_PBL_NUDGING_T"; then echo "if_no_pbl_nudging_t=${NL_IF_NO_PBL_NUDGING_T}	if test ! -z "$NL_IF_NO_PBL_NUDGING_T"; then echo "if_no_pbl_nudging_t=${NL_IF_NO_PBL_NUDGING_T}
if test ! -z "$NL_IF_NO_PBL_NUDGING_PH"; then echo "if_no_pbl_nudging_ph=${NL_IF_NO_PBL_NUDGING_	if test ! -z "$NL_IF_NO_PBL_NUDGING_PH"; then echo "if_no_pbl_nudging_ph=${NL_IF_NO_PBL_NUDGING_
if test ! -z "$NL_IF_NO_PBL_NUDGING_Q"; then echo "if_no_pbl_nudging_q=${NL_IF_NO_PBL_NUDGING_Q}	if test ! -z "$NL_IF_NO_PBL_NUDGING_Q"; then echo "if_no_pbl_nudging_q=${NL_IF_NO_PBL_NUDGING_Q}
if test ! -z "$NL_IF_ZFAC_UV"; then echo "if_zfac_uv=${NL_IF_ZFAC_UV}," >> $FILE;fi			if test ! -z "$NL_IF_ZFAC_UV"; then echo "if_zfac_uv=${NL_IF_ZFAC_UV}," >> $FILE;fi
if test ! -z "$NL_K_ZFAC_UV"; then echo "k_zfac_uv=${NL_K_ZFAC_UV}," >> $FILE;fi			if test ! -z "$NL_K_ZFAC_UV"; then echo "k_zfac_uv=${NL_K_ZFAC_UV}," >> $FILE;fi
if test ! -z "$NL_IF_ZFAC_T"; then echo "if_zfac_t=${NL_IF_ZFAC_T}," >> $FILE;fi			if test ! -z "$NL_IF_ZFAC_T"; then echo "if_zfac_t=${NL_IF_ZFAC_T}," >> $FILE;fi
if test ! -z "$NL_K_ZFAC_T"; then echo "k_zfac_t=${NL_K_ZFAC_T}," >> $FILE;fi				if test ! -z "$NL_K_ZFAC_T"; then echo "k_zfac_t=${NL_K_ZFAC_T}," >> $FILE;fi
if test ! -z "$NL_IF_ZFAC_PH"; then echo "if_zfac_ph=${NL_IF_ZFAC_PH}," >> $FILE;fi			if test ! -z "$NL_IF_ZFAC_PH"; then echo "if_zfac_ph=${NL_IF_ZFAC_PH}," >> $FILE;fi
if test ! -z "$NL_K_ZFAC_PH"; then echo "k_zfac_ph=${NL_K_ZFAC_PH}," >> $FILE;fi			if test ! -z "$NL_K_ZFAC_PH"; then echo "k_zfac_ph=${NL_K_ZFAC_PH}," >> $FILE;fi
if test ! -z "$NL_IF_ZFAC_Q"; then echo "if_zfac_q=${NL_IF_ZFAC_Q}," >> $FILE;fi			if test ! -z "$NL_IF_ZFAC_Q"; then echo "if_zfac_q=${NL_IF_ZFAC_Q}," >> $FILE;fi
if test ! -z "$NL_K_ZFAC_Q"; then echo "k_zfac_q=${NL_K_ZFAC_Q}," >> $FILE;fi				if test ! -z "$NL_K_ZFAC_Q"; then echo "k_zfac_q=${NL_K_ZFAC_Q}," >> $FILE;fi
if test ! -z "$NL_DK_ZFAC_UV"; then echo "dk_zfac_uv=${NL_DK_ZFAC_UV}," >> $FILE;fi			if test ! -z "$NL_DK_ZFAC_UV"; then echo "dk_zfac_uv=${NL_DK_ZFAC_UV}," >> $FILE;fi
if test ! -z "$NL_DK_ZFAC_T"; then echo "dk_zfac_t=${NL_DK_ZFAC_T}," >> $FILE;fi			if test ! -z "$NL_DK_ZFAC_T"; then echo "dk_zfac_t=${NL_DK_ZFAC_T}," >> $FILE;fi
if test ! -z "$NL_DK_ZFAC_PH"; then echo "dk_zfac_ph=${NL_DK_ZFAC_PH}," >> $FILE;fi			if test ! -z "$NL_DK_ZFAC_PH"; then echo "dk_zfac_ph=${NL_DK_ZFAC_PH}," >> $FILE;fi
if test ! -z "$NL_GUV"; then echo "guv=${NL_GUV}," >> $FILE;fi						if test ! -z "$NL_GUV"; then echo "guv=${NL_GUV}," >> $FILE;fi
if test ! -z "$NL_GUV_SFC"; then echo "guv_sfc=${NL_GUV_SFC}," >> $FILE;fi				if test ! -z "$NL_GUV_SFC"; then echo "guv_sfc=${NL_GUV_SFC}," >> $FILE;fi
if test ! -z "$NL_GT"; then echo "gt=${NL_GT}," >> $FILE;fi						if test ! -z "$NL_GT"; then echo "gt=${NL_GT}," >> $FILE;fi
if test ! -z "$NL_GT_SFC"; then echo "gt_sfc=${NL_GT_SFC}," >> $FILE;fi					if test ! -z "$NL_GT_SFC"; then echo "gt_sfc=${NL_GT_SFC}," >> $FILE;fi
if test ! -z "$NL_GQ"; then echo "gq=${NL_GQ}," >> $FILE;fi						if test ! -z "$NL_GQ"; then echo "gq=${NL_GQ}," >> $FILE;fi
if test ! -z "$NL_GQ_SFC"; then echo "gq_sfc=${NL_GQ_SFC}," >> $FILE;fi					if test ! -z "$NL_GQ_SFC"; then echo "gq_sfc=${NL_GQ_SFC}," >> $FILE;fi
if test ! -z "$NL_GPH"; then echo "gph=${NL_GPH}," >> $FILE;fi						if test ! -z "$NL_GPH"; then echo "gph=${NL_GPH}," >> $FILE;fi
if test ! -z "$NL_DTRAMP_MIN"; then echo "dtramp_min=${NL_DTRAMP_MIN}," >> $FILE;fi			if test ! -z "$NL_DTRAMP_MIN"; then echo "dtramp_min=${NL_DTRAMP_MIN}," >> $FILE;fi
if test ! -z "$NL_IF_RAMPING"; then echo "if_ramping=${NL_IF_RAMPING}," >> $FILE;fi			if test ! -z "$NL_IF_RAMPING"; then echo "if_ramping=${NL_IF_RAMPING}," >> $FILE;fi
if test ! -z "$NL_RINBLW"; then echo "rinblw=${NL_RINBLW}," >> $FILE;fi					if test ! -z "$NL_RINBLW"; then echo "rinblw=${NL_RINBLW}," >> $FILE;fi
if test ! -z "$NL_XWAVENUM"; then echo "xwavenum=${NL_XWAVENUM}," >> $FILE;fi				if test ! -z "$NL_XWAVENUM"; then echo "xwavenum=${NL_XWAVENUM}," >> $FILE;fi
if test ! -z "$NL_YWAVENUM"; then echo "ywavenum=${NL_YWAVENUM}," >> $FILE;fi				if test ! -z "$NL_YWAVENUM"; then echo "ywavenum=${NL_YWAVENUM}," >> $FILE;fi
if test ! -z "$NL_PXLSM_SOIL_NUDGE"; then echo "pxlsm_soil_nudge=${NL_PXLSM_SOIL_NUDGE}," >> $FI	if test ! -z "$NL_PXLSM_SOIL_NUDGE"; then echo "pxlsm_soil_nudge=${NL_PXLSM_SOIL_NUDGE}," >> $FI
if test ! -z "$NL_OBS_NUDGE_OPT"; then echo "obs_nudge_opt=${NL_OBS_NUDGE_OPT}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGE_OPT"; then echo "obs_nudge_opt=${NL_OBS_NUDGE_OPT}," >> $FILE;fi
if test ! -z "$NL_MAX_OBS"; then echo "max_obs=${NL_MAX_OBS}," >> $FILE;fi				if test ! -z "$NL_MAX_OBS"; then echo "max_obs=${NL_MAX_OBS}," >> $FILE;fi
if test ! -z "$NL_FDDA_START"; then echo "fdda_start=${NL_FDDA_START}," >> $FILE;fi			if test ! -z "$NL_FDDA_START"; then echo "fdda_start=${NL_FDDA_START}," >> $FILE;fi
if test ! -z "$NL_FDDA_END"; then echo "fdda_end=${NL_FDDA_END}," >> $FILE;fi				if test ! -z "$NL_FDDA_END"; then echo "fdda_end=${NL_FDDA_END}," >> $FILE;fi
if test ! -z "$NL_OBS_NUDGE_WIND"; then echo "obs_nudge_wind=${NL_OBS_NUDGE_WIND}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGE_WIND"; then echo "obs_nudge_wind=${NL_OBS_NUDGE_WIND}," >> $FILE;fi
if test ! -z "$NL_OBS_COEF_WIND"; then echo "obs_coef_wind=${NL_OBS_COEF_WIND}," >> $FILE;fi		if test ! -z "$NL_OBS_COEF_WIND"; then echo "obs_coef_wind=${NL_OBS_COEF_WIND}," >> $FILE;fi
if test ! -z "$NL_OBS_NUDGE_TEMP"; then echo "obs_nudge_temp=${NL_OBS_NUDGE_TEMP}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGE_TEMP"; then echo "obs_nudge_temp=${NL_OBS_NUDGE_TEMP}," >> $FILE;fi
if test ! -z "$NL_OBS_COEF_TEMP"; then echo "obs_coef_temp=${NL_OBS_COEF_TEMP}," >> $FILE;fi		if test ! -z "$NL_OBS_COEF_TEMP"; then echo "obs_coef_temp=${NL_OBS_COEF_TEMP}," >> $FILE;fi
if test ! -z "$NL_OBS_NUDGE_MOIS"; then echo "obs_nudge_mois=${NL_OBS_NUDGE_MOIS}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGE_MOIS"; then echo "obs_nudge_mois=${NL_OBS_NUDGE_MOIS}," >> $FILE;fi
if test ! -z "$NL_OBS_COEF_MOIS"; then echo "obs_coef_mois=${NL_OBS_COEF_MOIS}," >> $FILE;fi		if test ! -z "$NL_OBS_COEF_MOIS"; then echo "obs_coef_mois=${NL_OBS_COEF_MOIS}," >> $FILE;fi
if test ! -z "$NL_OBS_NUDGE_PSTR"; then echo "obs_nudge_pstr=${NL_OBS_NUDGE_PSTR}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGE_PSTR"; then echo "obs_nudge_pstr=${NL_OBS_NUDGE_PSTR}," >> $FILE;fi
if test ! -z "$NL_OBS_COEF_PSTR"; then echo "obs_coef_pstr=${NL_OBS_COEF_PSTR}," >> $FILE;fi		if test ! -z "$NL_OBS_COEF_PSTR"; then echo "obs_coef_pstr=${NL_OBS_COEF_PSTR}," >> $FILE;fi
if test ! -z "$NL_OBS_NO_PBL_NUDGE_UV"; then echo "obs_no_pbl_nudge_uv=${NL_OBS_NO_PBL_NUDGE_UV}	if test ! -z "$NL_OBS_NO_PBL_NUDGE_UV"; then echo "obs_no_pbl_nudge_uv=${NL_OBS_NO_PBL_NUDGE_UV}
if test ! -z "$NL_OBS_NO_PBL_NUDGE_T"; then echo "obs_no_pbl_nudge_t=${NL_OBS_NO_PBL_NUDGE_T}," 	if test ! -z "$NL_OBS_NO_PBL_NUDGE_T"; then echo "obs_no_pbl_nudge_t=${NL_OBS_NO_PBL_NUDGE_T}," 
if test ! -z "$NL_OBS_NO_PBL_NUDGE_Q"; then echo "obs_no_pbl_nudge_q=${NL_OBS_NO_PBL_NUDGE_Q}," 	if test ! -z "$NL_OBS_NO_PBL_NUDGE_Q"; then echo "obs_no_pbl_nudge_q=${NL_OBS_NO_PBL_NUDGE_Q}," 
if test ! -z "$NL_OBS_SFC_SCHEME_HORIZ"; then echo "obs_sfc_scheme_horiz=${NL_OBS_SFC_SCHEME_HOR	if test ! -z "$NL_OBS_SFC_SCHEME_HORIZ"; then echo "obs_sfc_scheme_horiz=${NL_OBS_SFC_SCHEME_HOR
if test ! -z "$NL_OBS_SFC_SCHEME_VERT"; then echo "obs_sfc_scheme_vert=${NL_OBS_SFC_SCHEME_VERT}	if test ! -z "$NL_OBS_SFC_SCHEME_VERT"; then echo "obs_sfc_scheme_vert=${NL_OBS_SFC_SCHEME_VERT}
if test ! -z "$NL_OBS_MAX_SNDNG_GAP"; then echo "obs_max_sndng_gap=${NL_OBS_MAX_SNDNG_GAP}," >> 	if test ! -z "$NL_OBS_MAX_SNDNG_GAP"; then echo "obs_max_sndng_gap=${NL_OBS_MAX_SNDNG_GAP}," >> 
if test ! -z "$NL_OBS_NUDGEZFULLR1_UV"; then echo "obs_nudgezfullr1_uv=${NL_OBS_NUDGEZFULLR1_UV}	if test ! -z "$NL_OBS_NUDGEZFULLR1_UV"; then echo "obs_nudgezfullr1_uv=${NL_OBS_NUDGEZFULLR1_UV}
if test ! -z "$NL_OBS_NUDGEZRAMPR1_UV"; then echo "obs_nudgezrampr1_uv=${NL_OBS_NUDGEZRAMPR1_UV}	if test ! -z "$NL_OBS_NUDGEZRAMPR1_UV"; then echo "obs_nudgezrampr1_uv=${NL_OBS_NUDGEZRAMPR1_UV}
if test ! -z "$NL_OBS_NUDGEZFULLR2_UV"; then echo "obs_nudgezfullr2_uv=${NL_OBS_NUDGEZFULLR2_UV}	if test ! -z "$NL_OBS_NUDGEZFULLR2_UV"; then echo "obs_nudgezfullr2_uv=${NL_OBS_NUDGEZFULLR2_UV}
if test ! -z "$NL_OBS_NUDGEZRAMPR2_UV"; then echo "obs_nudgezrampr2_uv=${NL_OBS_NUDGEZRAMPR2_UV}	if test ! -z "$NL_OBS_NUDGEZRAMPR2_UV"; then echo "obs_nudgezrampr2_uv=${NL_OBS_NUDGEZRAMPR2_UV}
if test ! -z "$NL_OBS_NUDGEZFULLR4_UV"; then echo "obs_nudgezfullr4_uv=${NL_OBS_NUDGEZFULLR4_UV}	if test ! -z "$NL_OBS_NUDGEZFULLR4_UV"; then echo "obs_nudgezfullr4_uv=${NL_OBS_NUDGEZFULLR4_UV}
if test ! -z "$NL_OBS_NUDGEZRAMPR4_UV"; then echo "obs_nudgezrampr4_uv=${NL_OBS_NUDGEZRAMPR4_UV}	if test ! -z "$NL_OBS_NUDGEZRAMPR4_UV"; then echo "obs_nudgezrampr4_uv=${NL_OBS_NUDGEZRAMPR4_UV}
if test ! -z "$NL_OBS_NUDGEZFULLR1_T"; then echo "obs_nudgezfullr1_t=${NL_OBS_NUDGEZFULLR1_T}," 	if test ! -z "$NL_OBS_NUDGEZFULLR1_T"; then echo "obs_nudgezfullr1_t=${NL_OBS_NUDGEZFULLR1_T}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR1_T"; then echo "obs_nudgezrampr1_t=${NL_OBS_NUDGEZRAMPR1_T}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR1_T"; then echo "obs_nudgezrampr1_t=${NL_OBS_NUDGEZRAMPR1_T}," 
if test ! -z "$NL_OBS_NUDGEZFULLR2_T"; then echo "obs_nudgezfullr2_t=${NL_OBS_NUDGEZFULLR2_T}," 	if test ! -z "$NL_OBS_NUDGEZFULLR2_T"; then echo "obs_nudgezfullr2_t=${NL_OBS_NUDGEZFULLR2_T}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR2_T"; then echo "obs_nudgezrampr2_t=${NL_OBS_NUDGEZRAMPR2_T}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR2_T"; then echo "obs_nudgezrampr2_t=${NL_OBS_NUDGEZRAMPR2_T}," 
if test ! -z "$NL_OBS_NUDGEZFULLR4_T"; then echo "obs_nudgezfullr4_t=${NL_OBS_NUDGEZFULLR4_T}," 	if test ! -z "$NL_OBS_NUDGEZFULLR4_T"; then echo "obs_nudgezfullr4_t=${NL_OBS_NUDGEZFULLR4_T}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR4_T"; then echo "obs_nudgezrampr4_t=${NL_OBS_NUDGEZRAMPR4_T}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR4_T"; then echo "obs_nudgezrampr4_t=${NL_OBS_NUDGEZRAMPR4_T}," 
if test ! -z "$NL_OBS_NUDGEZFULLR1_Q"; then echo "obs_nudgezfullr1_q=${NL_OBS_NUDGEZFULLR1_Q}," 	if test ! -z "$NL_OBS_NUDGEZFULLR1_Q"; then echo "obs_nudgezfullr1_q=${NL_OBS_NUDGEZFULLR1_Q}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR1_Q"; then echo "obs_nudgezrampr1_q=${NL_OBS_NUDGEZRAMPR1_Q}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR1_Q"; then echo "obs_nudgezrampr1_q=${NL_OBS_NUDGEZRAMPR1_Q}," 
if test ! -z "$NL_OBS_NUDGEZFULLR2_Q"; then echo "obs_nudgezfullr2_q=${NL_OBS_NUDGEZFULLR2_Q}," 	if test ! -z "$NL_OBS_NUDGEZFULLR2_Q"; then echo "obs_nudgezfullr2_q=${NL_OBS_NUDGEZFULLR2_Q}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR2_Q"; then echo "obs_nudgezrampr2_q=${NL_OBS_NUDGEZRAMPR2_Q}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR2_Q"; then echo "obs_nudgezrampr2_q=${NL_OBS_NUDGEZRAMPR2_Q}," 
if test ! -z "$NL_OBS_NUDGEZFULLR4_Q"; then echo "obs_nudgezfullr4_q=${NL_OBS_NUDGEZFULLR4_Q}," 	if test ! -z "$NL_OBS_NUDGEZFULLR4_Q"; then echo "obs_nudgezfullr4_q=${NL_OBS_NUDGEZFULLR4_Q}," 
if test ! -z "$NL_OBS_NUDGEZRAMPR4_Q"; then echo "obs_nudgezrampr4_q=${NL_OBS_NUDGEZRAMPR4_Q}," 	if test ! -z "$NL_OBS_NUDGEZRAMPR4_Q"; then echo "obs_nudgezrampr4_q=${NL_OBS_NUDGEZRAMPR4_Q}," 
if test ! -z "$NL_OBS_NUDGEZFULLMIN"; then echo "obs_nudgezfullmin=${NL_OBS_NUDGEZFULLMIN}," >> 	if test ! -z "$NL_OBS_NUDGEZFULLMIN"; then echo "obs_nudgezfullmin=${NL_OBS_NUDGEZFULLMIN}," >> 
if test ! -z "$NL_OBS_NUDGEZRAMPMIN"; then echo "obs_nudgezrampmin=${NL_OBS_NUDGEZRAMPMIN}," >> 	if test ! -z "$NL_OBS_NUDGEZRAMPMIN"; then echo "obs_nudgezrampmin=${NL_OBS_NUDGEZRAMPMIN}," >> 
if test ! -z "$NL_OBS_NUDGEZMAX"; then echo "obs_nudgezmax=${NL_OBS_NUDGEZMAX}," >> $FILE;fi		if test ! -z "$NL_OBS_NUDGEZMAX"; then echo "obs_nudgezmax=${NL_OBS_NUDGEZMAX}," >> $FILE;fi
if test ! -z "$NL_OBS_SFCFACT"; then echo "obs_sfcfact=${NL_OBS_SFCFACT}," >> $FILE;fi			if test ! -z "$NL_OBS_SFCFACT"; then echo "obs_sfcfact=${NL_OBS_SFCFACT}," >> $FILE;fi
if test ! -z "$NL_OBS_SFCFACR"; then echo "obs_sfcfacr=${NL_OBS_SFCFACR}," >> $FILE;fi			if test ! -z "$NL_OBS_SFCFACR"; then echo "obs_sfcfacr=${NL_OBS_SFCFACR}," >> $FILE;fi
if test ! -z "$NL_OBS_DPSMX"; then echo "obs_dpsmx=${NL_OBS_DPSMX}," >> $FILE;fi			if test ! -z "$NL_OBS_DPSMX"; then echo "obs_dpsmx=${NL_OBS_DPSMX}," >> $FILE;fi
if test ! -z "$NL_OBS_RINXY"; then echo "obs_rinxy=${NL_OBS_RINXY}," >> $FILE;fi			if test ! -z "$NL_OBS_RINXY"; then echo "obs_rinxy=${NL_OBS_RINXY}," >> $FILE;fi
if test ! -z "$NL_OBS_RINSIG"; then echo "obs_rinsig=${NL_OBS_RINSIG}," >> $FILE;fi			if test ! -z "$NL_OBS_RINSIG"; then echo "obs_rinsig=${NL_OBS_RINSIG}," >> $FILE;fi
if test ! -z "$NL_OBS_TWINDO"; then echo "obs_twindo=${NL_OBS_TWINDO}," >> $FILE;fi			if test ! -z "$NL_OBS_TWINDO"; then echo "obs_twindo=${NL_OBS_TWINDO}," >> $FILE;fi
if test ! -z "$NL_OBS_NPFI"; then echo "obs_npfi=${NL_OBS_NPFI}," >> $FILE;fi				if test ! -z "$NL_OBS_NPFI"; then echo "obs_npfi=${NL_OBS_NPFI}," >> $FILE;fi
if test ! -z "$NL_OBS_IONF"; then echo "obs_ionf=${NL_OBS_IONF}," >> $FILE;fi				if test ! -z "$NL_OBS_IONF"; then echo "obs_ionf=${NL_OBS_IONF}," >> $FILE;fi
if test ! -z "$NL_OBS_IDYNIN"; then echo "obs_idynin=${NL_OBS_IDYNIN}," >> $FILE;fi			if test ! -z "$NL_OBS_IDYNIN"; then echo "obs_idynin=${NL_OBS_IDYNIN}," >> $FILE;fi
if test ! -z "$NL_OBS_DTRAMP"; then echo "obs_dtramp=${NL_OBS_DTRAMP}," >> $FILE;fi			if test ! -z "$NL_OBS_DTRAMP"; then echo "obs_dtramp=${NL_OBS_DTRAMP}," >> $FILE;fi
if test ! -z "$NL_OBS_PRT_MAX"; then echo "obs_prt_max=${NL_OBS_PRT_MAX}," >> $FILE;fi			if test ! -z "$NL_OBS_PRT_MAX"; then echo "obs_prt_max=${NL_OBS_PRT_MAX}," >> $FILE;fi
if test ! -z "$NL_OBS_PRT_FREQ"; then echo "obs_prt_freq=${NL_OBS_PRT_FREQ}," >> $FILE;fi		if test ! -z "$NL_OBS_PRT_FREQ"; then echo "obs_prt_freq=${NL_OBS_PRT_FREQ}," >> $FILE;fi
if test ! -z "$NL_OBS_IPF_IN4DOB"; then echo "obs_ipf_in4dob=${NL_OBS_IPF_IN4DOB}," >> $FILE;fi		if test ! -z "$NL_OBS_IPF_IN4DOB"; then echo "obs_ipf_in4dob=${NL_OBS_IPF_IN4DOB}," >> $FILE;fi
if test ! -z "$NL_OBS_IPF_ERROB"; then echo "obs_ipf_errob=${NL_OBS_IPF_ERROB}," >> $FILE;fi		if test ! -z "$NL_OBS_IPF_ERROB"; then echo "obs_ipf_errob=${NL_OBS_IPF_ERROB}," >> $FILE;fi
if test ! -z "$NL_OBS_IPF_NUDOB"; then echo "obs_ipf_nudob=${NL_OBS_IPF_NUDOB}," >> $FILE;fi		if test ! -z "$NL_OBS_IPF_NUDOB"; then echo "obs_ipf_nudob=${NL_OBS_IPF_NUDOB}," >> $FILE;fi
if test ! -z "$NL_OBS_IPF_INIT"; then echo "obs_ipf_init=${NL_OBS_IPF_INIT}," >> $FILE;fi		if test ! -z "$NL_OBS_IPF_INIT"; then echo "obs_ipf_init=${NL_OBS_IPF_INIT}," >> $FILE;fi
if test ! -z "$NL_OBS_SCL_NEG_QV_INNOV"; then echo "obs_scl_neg_qv_innov=${NL_OBS_SCL_NEG_QV_INN	if test ! -z "$NL_OBS_SCL_NEG_QV_INNOV"; then echo "obs_scl_neg_qv_innov=${NL_OBS_SCL_NEG_QV_INN
if test ! -z "$NL_SGFDDA_INNAME"; then echo "sgfdda_inname=\"${NL_SGFDDA_INNAME}\"," >> $FILE;fi	if test ! -z "$NL_SGFDDA_INNAME"; then echo "sgfdda_inname=\"${NL_SGFDDA_INNAME}\"," >> $FILE;fi
if test ! -z "$NL_GFDDA_INNAME"; then echo "gfdda_inname=\"${NL_GFDDA_INNAME}\"," >> $FILE;fi		if test ! -z "$NL_GFDDA_INNAME"; then echo "gfdda_inname=\"${NL_GFDDA_INNAME}\"," >> $FILE;fi
if test ! -z "$NL_SGFDDA_INTERVAL_D"; then echo "sgfdda_interval_d=${NL_SGFDDA_INTERVAL_D}," >> 	if test ! -z "$NL_SGFDDA_INTERVAL_D"; then echo "sgfdda_interval_d=${NL_SGFDDA_INTERVAL_D}," >> 
if test ! -z "$NL_SGFDDA_INTERVAL_H"; then echo "sgfdda_interval_h=${NL_SGFDDA_INTERVAL_H}," >> 	if test ! -z "$NL_SGFDDA_INTERVAL_H"; then echo "sgfdda_interval_h=${NL_SGFDDA_INTERVAL_H}," >> 
if test ! -z "$NL_SGFDDA_INTERVAL_M"; then echo "sgfdda_interval_m=${NL_SGFDDA_INTERVAL_M}," >> 	if test ! -z "$NL_SGFDDA_INTERVAL_M"; then echo "sgfdda_interval_m=${NL_SGFDDA_INTERVAL_M}," >> 
if test ! -z "$NL_SGFDDA_INTERVAL_S"; then echo "sgfdda_interval_s=${NL_SGFDDA_INTERVAL_S}," >> 	if test ! -z "$NL_SGFDDA_INTERVAL_S"; then echo "sgfdda_interval_s=${NL_SGFDDA_INTERVAL_S}," >> 
if test ! -z "$NL_SGFDDA_INTERVAL_Y"; then echo "sgfdda_interval_y=${NL_SGFDDA_INTERVAL_Y}," >> 	if test ! -z "$NL_SGFDDA_INTERVAL_Y"; then echo "sgfdda_interval_y=${NL_SGFDDA_INTERVAL_Y}," >> 
if test ! -z "$NL_SGFDDA_INTERVAL"; then echo "sgfdda_interval=${NL_SGFDDA_INTERVAL}," >> $FILE;	if test ! -z "$NL_SGFDDA_INTERVAL"; then echo "sgfdda_interval=${NL_SGFDDA_INTERVAL}," >> $FILE;
if test ! -z "$NL_GFDDA_INTERVAL_D"; then echo "gfdda_interval_d=${NL_GFDDA_INTERVAL_D}," >> $FI	if test ! -z "$NL_GFDDA_INTERVAL_D"; then echo "gfdda_interval_d=${NL_GFDDA_INTERVAL_D}," >> $FI
if test ! -z "$NL_GFDDA_INTERVAL_H"; then echo "gfdda_interval_h=${NL_GFDDA_INTERVAL_H}," >> $FI	if test ! -z "$NL_GFDDA_INTERVAL_H"; then echo "gfdda_interval_h=${NL_GFDDA_INTERVAL_H}," >> $FI
if test ! -z "$NL_GFDDA_INTERVAL_M"; then echo "gfdda_interval_m=${NL_GFDDA_INTERVAL_M}," >> $FI	if test ! -z "$NL_GFDDA_INTERVAL_M"; then echo "gfdda_interval_m=${NL_GFDDA_INTERVAL_M}," >> $FI
if test ! -z "$NL_GFDDA_INTERVAL_S"; then echo "gfdda_interval_s=${NL_GFDDA_INTERVAL_S}," >> $FI	if test ! -z "$NL_GFDDA_INTERVAL_S"; then echo "gfdda_interval_s=${NL_GFDDA_INTERVAL_S}," >> $FI
if test ! -z "$NL_GFDDA_INTERVAL_Y"; then echo "gfdda_interval_y=${NL_GFDDA_INTERVAL_Y}," >> $FI	if test ! -z "$NL_GFDDA_INTERVAL_Y"; then echo "gfdda_interval_y=${NL_GFDDA_INTERVAL_Y}," >> $FI
if test ! -z "$NL_GFDDA_INTERVAL"; then echo "gfdda_interval=${NL_GFDDA_INTERVAL}," >> $FILE;fi		if test ! -z "$NL_GFDDA_INTERVAL"; then echo "gfdda_interval=${NL_GFDDA_INTERVAL}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_BEGIN_Y"; then echo "sgfdda_begin_y=${NL_SGFDDA_BEGIN_Y}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_BEGIN_Y"; then echo "sgfdda_begin_y=${NL_SGFDDA_BEGIN_Y}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_BEGIN_D"; then echo "sgfdda_begin_d=${NL_SGFDDA_BEGIN_D}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_BEGIN_D"; then echo "sgfdda_begin_d=${NL_SGFDDA_BEGIN_D}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_BEGIN_H"; then echo "sgfdda_begin_h=${NL_SGFDDA_BEGIN_H}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_BEGIN_H"; then echo "sgfdda_begin_h=${NL_SGFDDA_BEGIN_H}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_BEGIN_M"; then echo "sgfdda_begin_m=${NL_SGFDDA_BEGIN_M}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_BEGIN_M"; then echo "sgfdda_begin_m=${NL_SGFDDA_BEGIN_M}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_BEGIN_S"; then echo "sgfdda_begin_s=${NL_SGFDDA_BEGIN_S}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_BEGIN_S"; then echo "sgfdda_begin_s=${NL_SGFDDA_BEGIN_S}," >> $FILE;fi
if test ! -z "$NL_GFDDA_BEGIN_Y"; then echo "gfdda_begin_y=${NL_GFDDA_BEGIN_Y}," >> $FILE;fi		if test ! -z "$NL_GFDDA_BEGIN_Y"; then echo "gfdda_begin_y=${NL_GFDDA_BEGIN_Y}," >> $FILE;fi
if test ! -z "$NL_GFDDA_BEGIN_D"; then echo "gfdda_begin_d=${NL_GFDDA_BEGIN_D}," >> $FILE;fi		if test ! -z "$NL_GFDDA_BEGIN_D"; then echo "gfdda_begin_d=${NL_GFDDA_BEGIN_D}," >> $FILE;fi
if test ! -z "$NL_GFDDA_BEGIN_H"; then echo "gfdda_begin_h=${NL_GFDDA_BEGIN_H}," >> $FILE;fi		if test ! -z "$NL_GFDDA_BEGIN_H"; then echo "gfdda_begin_h=${NL_GFDDA_BEGIN_H}," >> $FILE;fi
if test ! -z "$NL_GFDDA_BEGIN_M"; then echo "gfdda_begin_m=${NL_GFDDA_BEGIN_M}," >> $FILE;fi		if test ! -z "$NL_GFDDA_BEGIN_M"; then echo "gfdda_begin_m=${NL_GFDDA_BEGIN_M}," >> $FILE;fi
if test ! -z "$NL_GFDDA_BEGIN_S"; then echo "gfdda_begin_s=${NL_GFDDA_BEGIN_S}," >> $FILE;fi		if test ! -z "$NL_GFDDA_BEGIN_S"; then echo "gfdda_begin_s=${NL_GFDDA_BEGIN_S}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_END_Y"; then echo "sgfdda_end_y=${NL_SGFDDA_END_Y}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_END_Y"; then echo "sgfdda_end_y=${NL_SGFDDA_END_Y}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_END_D"; then echo "sgfdda_end_d=${NL_SGFDDA_END_D}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_END_D"; then echo "sgfdda_end_d=${NL_SGFDDA_END_D}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_END_H"; then echo "sgfdda_end_h=${NL_SGFDDA_END_H}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_END_H"; then echo "sgfdda_end_h=${NL_SGFDDA_END_H}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_END_M"; then echo "sgfdda_end_m=${NL_SGFDDA_END_M}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_END_M"; then echo "sgfdda_end_m=${NL_SGFDDA_END_M}," >> $FILE;fi
if test ! -z "$NL_SGFDDA_END_S"; then echo "sgfdda_end_s=${NL_SGFDDA_END_S}," >> $FILE;fi		if test ! -z "$NL_SGFDDA_END_S"; then echo "sgfdda_end_s=${NL_SGFDDA_END_S}," >> $FILE;fi
if test ! -z "$NL_GFDDA_END_Y"; then echo "gfdda_end_y=${NL_GFDDA_END_Y}," >> $FILE;fi			if test ! -z "$NL_GFDDA_END_Y"; then echo "gfdda_end_y=${NL_GFDDA_END_Y}," >> $FILE;fi
if test ! -z "$NL_GFDDA_END_D"; then echo "gfdda_end_d=${NL_GFDDA_END_D}," >> $FILE;fi			if test ! -z "$NL_GFDDA_END_D"; then echo "gfdda_end_d=${NL_GFDDA_END_D}," >> $FILE;fi
if test ! -z "$NL_GFDDA_END_H"; then echo "gfdda_end_h=${NL_GFDDA_END_H}," >> $FILE;fi			if test ! -z "$NL_GFDDA_END_H"; then echo "gfdda_end_h=${NL_GFDDA_END_H}," >> $FILE;fi
if test ! -z "$NL_GFDDA_END_M"; then echo "gfdda_end_m=${NL_GFDDA_END_M}," >> $FILE;fi			if test ! -z "$NL_GFDDA_END_M"; then echo "gfdda_end_m=${NL_GFDDA_END_M}," >> $FILE;fi
if test ! -z "$NL_GFDDA_END_S"; then echo "gfdda_end_s=${NL_GFDDA_END_S}," >> $FILE;fi			if test ! -z "$NL_GFDDA_END_S"; then echo "gfdda_end_s=${NL_GFDDA_END_S}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_SGFDDA"; then echo "io_form_sgfdda=${NL_IO_FORM_SGFDDA}," >> $FILE;fi		if test ! -z "$NL_IO_FORM_SGFDDA"; then echo "io_form_sgfdda=${NL_IO_FORM_SGFDDA}," >> $FILE;fi
if test ! -z "$NL_IO_FORM_GFDDA"; then echo "io_form_gfdda=${NL_IO_FORM_GFDDA}," >> $FILE;fi		if test ! -z "$NL_IO_FORM_GFDDA"; then echo "io_form_gfdda=${NL_IO_FORM_GFDDA}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&scm >> $FILE											echo \&scm >> $FILE
if test ! -z "$NL_SCM_FORCE"; then echo "scm_force=${NL_SCM_FORCE}," >> $FILE;fi			if test ! -z "$NL_SCM_FORCE"; then echo "scm_force=${NL_SCM_FORCE}," >> $FILE;fi
if test ! -z "$NL_SCM_FORCE_DX"; then echo "scm_force_dx=${NL_SCM_FORCE_DX}," >> $FILE;fi		if test ! -z "$NL_SCM_FORCE_DX"; then echo "scm_force_dx=${NL_SCM_FORCE_DX}," >> $FILE;fi
if test ! -z "$NL_NUM_FORCE_LAYERS"; then echo "num_force_layers=${NL_NUM_FORCE_LAYERS}," >> $FI	if test ! -z "$NL_NUM_FORCE_LAYERS"; then echo "num_force_layers=${NL_NUM_FORCE_LAYERS}," >> $FI
if test ! -z "$NL_SCM_LU_INDEX"; then echo "scm_lu_index=${NL_SCM_LU_INDEX}," >> $FILE;fi		if test ! -z "$NL_SCM_LU_INDEX"; then echo "scm_lu_index=${NL_SCM_LU_INDEX}," >> $FILE;fi
if test ! -z "$NL_SCM_ISLTYP"; then echo "scm_isltyp=${NL_SCM_ISLTYP}," >> $FILE;fi			if test ! -z "$NL_SCM_ISLTYP"; then echo "scm_isltyp=${NL_SCM_ISLTYP}," >> $FILE;fi
if test ! -z "$NL_SCM_VEGFRA"; then echo "scm_vegfra=${NL_SCM_VEGFRA}," >> $FILE;fi			if test ! -z "$NL_SCM_VEGFRA"; then echo "scm_vegfra=${NL_SCM_VEGFRA}," >> $FILE;fi
if test ! -z "$NL_SCM_CANWAT"; then echo "scm_canwat=${NL_SCM_CANWAT}," >> $FILE;fi			if test ! -z "$NL_SCM_CANWAT"; then echo "scm_canwat=${NL_SCM_CANWAT}," >> $FILE;fi
if test ! -z "$NL_SCM_LAT"; then echo "scm_lat=${NL_SCM_LAT}," >> $FILE;fi				if test ! -z "$NL_SCM_LAT"; then echo "scm_lat=${NL_SCM_LAT}," >> $FILE;fi
if test ! -z "$NL_SCM_LON"; then echo "scm_lon=${NL_SCM_LON}," >> $FILE;fi				if test ! -z "$NL_SCM_LON"; then echo "scm_lon=${NL_SCM_LON}," >> $FILE;fi
if test ! -z "$NL_SCM_TH_T_TEND"; then echo "scm_th_t_tend=${NL_SCM_TH_T_TEND}," >> $FILE;fi		if test ! -z "$NL_SCM_TH_T_TEND"; then echo "scm_th_t_tend=${NL_SCM_TH_T_TEND}," >> $FILE;fi
if test ! -z "$NL_SCM_QV_T_TEND"; then echo "scm_qv_t_tend=${NL_SCM_QV_T_TEND}," >> $FILE;fi		if test ! -z "$NL_SCM_QV_T_TEND"; then echo "scm_qv_t_tend=${NL_SCM_QV_T_TEND}," >> $FILE;fi
if test ! -z "$NL_SCM_TH_ADV"; then echo "scm_th_adv=${NL_SCM_TH_ADV}," >> $FILE;fi			if test ! -z "$NL_SCM_TH_ADV"; then echo "scm_th_adv=${NL_SCM_TH_ADV}," >> $FILE;fi
if test ! -z "$NL_SCM_WIND_ADV"; then echo "scm_wind_adv=${NL_SCM_WIND_ADV}," >> $FILE;fi		if test ! -z "$NL_SCM_WIND_ADV"; then echo "scm_wind_adv=${NL_SCM_WIND_ADV}," >> $FILE;fi
if test ! -z "$NL_SCM_QV_ADV"; then echo "scm_qv_adv=${NL_SCM_QV_ADV}," >> $FILE;fi			if test ! -z "$NL_SCM_QV_ADV"; then echo "scm_qv_adv=${NL_SCM_QV_ADV}," >> $FILE;fi
if test ! -z "$NL_SCM_QL_ADV"; then echo "scm_ql_adv=${NL_SCM_QL_ADV}," >> $FILE;fi			if test ! -z "$NL_SCM_QL_ADV"; then echo "scm_ql_adv=${NL_SCM_QL_ADV}," >> $FILE;fi
if test ! -z "$NL_SCM_VERT_ADV"; then echo "scm_vert_adv=${NL_SCM_VERT_ADV}," >> $FILE;fi		if test ! -z "$NL_SCM_VERT_ADV"; then echo "scm_vert_adv=${NL_SCM_VERT_ADV}," >> $FILE;fi
if test ! -z "$NL_NUM_FORCE_SOIL_LAYERS"; then echo "num_force_soil_layers=${NL_NUM_FORCE_SOIL_L	if test ! -z "$NL_NUM_FORCE_SOIL_LAYERS"; then echo "num_force_soil_layers=${NL_NUM_FORCE_SOIL_L
if test ! -z "$NL_SCM_SOILT_FORCE"; then echo "scm_soilt_force=${NL_SCM_SOILT_FORCE}," >> $FILE;	if test ! -z "$NL_SCM_SOILT_FORCE"; then echo "scm_soilt_force=${NL_SCM_SOILT_FORCE}," >> $FILE;
if test ! -z "$NL_SCM_SOILQ_FORCE"; then echo "scm_soilq_force=${NL_SCM_SOILQ_FORCE}," >> $FILE;	if test ! -z "$NL_SCM_SOILQ_FORCE"; then echo "scm_soilq_force=${NL_SCM_SOILQ_FORCE}," >> $FILE;
if test ! -z "$NL_SCM_FORCE_TH_LARGESCALE"; then echo "scm_force_th_largescale=${NL_SCM_FORCE_TH	if test ! -z "$NL_SCM_FORCE_TH_LARGESCALE"; then echo "scm_force_th_largescale=${NL_SCM_FORCE_TH
if test ! -z "$NL_SCM_FORCE_QV_LARGESCALE"; then echo "scm_force_qv_largescale=${NL_SCM_FORCE_QV	if test ! -z "$NL_SCM_FORCE_QV_LARGESCALE"; then echo "scm_force_qv_largescale=${NL_SCM_FORCE_QV
if test ! -z "$NL_SCM_FORCE_QL_LARGESCALE"; then echo "scm_force_ql_largescale=${NL_SCM_FORCE_QL	if test ! -z "$NL_SCM_FORCE_QL_LARGESCALE"; then echo "scm_force_ql_largescale=${NL_SCM_FORCE_QL
if test ! -z "$NL_SCM_FORCE_WIND_LARGESCALE"; then echo "scm_force_wind_largescale=${NL_SCM_FORC	if test ! -z "$NL_SCM_FORCE_WIND_LARGESCALE"; then echo "scm_force_wind_largescale=${NL_SCM_FORC
if test ! -z "$NL_SCM_FORCE_SKINTEMP"; then echo "scm_force_skintemp=${NL_SCM_FORCE_SKINTEMP}," 	if test ! -z "$NL_SCM_FORCE_SKINTEMP"; then echo "scm_force_skintemp=${NL_SCM_FORCE_SKINTEMP}," 
if test ! -z "$NL_SCM_FORCE_FLUX"; then echo "scm_force_flux=${NL_SCM_FORCE_FLUX}," >> $FILE;fi		if test ! -z "$NL_SCM_FORCE_FLUX"; then echo "scm_force_flux=${NL_SCM_FORCE_FLUX}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&dynamics >> $FILE										echo \&dynamics >> $FILE
if test ! -z "$NL_DYN_OPT"; then echo "dyn_opt=${NL_DYN_OPT}," >> $FILE;fi				if test ! -z "$NL_DYN_OPT"; then echo "dyn_opt=${NL_DYN_OPT}," >> $FILE;fi
if test ! -z "$NL_RK_ORD"; then echo "rk_ord=${NL_RK_ORD}," >> $FILE;fi					if test ! -z "$NL_RK_ORD"; then echo "rk_ord=${NL_RK_ORD}," >> $FILE;fi
if test ! -z "$NL_W_DAMPING"; then echo "w_damping=${NL_W_DAMPING}," >> $FILE;fi			if test ! -z "$NL_W_DAMPING"; then echo "w_damping=${NL_W_DAMPING}," >> $FILE;fi
if test ! -z "$NL_DIFF_OPT"; then echo "diff_opt=${NL_DIFF_OPT}," >> $FILE;fi				if test ! -z "$NL_DIFF_OPT"; then echo "diff_opt=${NL_DIFF_OPT}," >> $FILE;fi
if test ! -z "$NL_DIFF_OPT_DFI"; then echo "diff_opt_dfi=${NL_DIFF_OPT_DFI}," >> $FILE;fi		if test ! -z "$NL_DIFF_OPT_DFI"; then echo "diff_opt_dfi=${NL_DIFF_OPT_DFI}," >> $FILE;fi
if test ! -z "$NL_KM_OPT"; then echo "km_opt=${NL_KM_OPT}," >> $FILE;fi					if test ! -z "$NL_KM_OPT"; then echo "km_opt=${NL_KM_OPT}," >> $FILE;fi
if test ! -z "$NL_KM_OPT_DFI"; then echo "km_opt_dfi=${NL_KM_OPT_DFI}," >> $FILE;fi			if test ! -z "$NL_KM_OPT_DFI"; then echo "km_opt_dfi=${NL_KM_OPT_DFI}," >> $FILE;fi
if test ! -z "$NL_DAMP_OPT"; then echo "damp_opt=${NL_DAMP_OPT}," >> $FILE;fi				if test ! -z "$NL_DAMP_OPT"; then echo "damp_opt=${NL_DAMP_OPT}," >> $FILE;fi
if test ! -z "$NL_RAD_NUDGE"; then echo "rad_nudge=${NL_RAD_NUDGE}," >> $FILE;fi			if test ! -z "$NL_RAD_NUDGE"; then echo "rad_nudge=${NL_RAD_NUDGE}," >> $FILE;fi
if test ! -z "$NL_GWD_OPT"; then echo "gwd_opt=${NL_GWD_OPT}," >> $FILE;fi				if test ! -z "$NL_GWD_OPT"; then echo "gwd_opt=${NL_GWD_OPT}," >> $FILE;fi
if test ! -z "$NL_MAX_ROT_ANGLE_GWD"; then echo "max_rot_angle_gwd=${NL_MAX_ROT_ANGLE_GWD}," >>    <
if test ! -z "$NL_ZDAMP"; then echo "zdamp=${NL_ZDAMP}," >> $FILE;fi					if test ! -z "$NL_ZDAMP"; then echo "zdamp=${NL_ZDAMP}," >> $FILE;fi
if test ! -z "$NL_DAMPCOEF"; then echo "dampcoef=${NL_DAMPCOEF}," >> $FILE;fi				if test ! -z "$NL_DAMPCOEF"; then echo "dampcoef=${NL_DAMPCOEF}," >> $FILE;fi
if test ! -z "$NL_KHDIF"; then echo "khdif=${NL_KHDIF}," >> $FILE;fi					if test ! -z "$NL_KHDIF"; then echo "khdif=${NL_KHDIF}," >> $FILE;fi
if test ! -z "$NL_KVDIF"; then echo "kvdif=${NL_KVDIF}," >> $FILE;fi					if test ! -z "$NL_KVDIF"; then echo "kvdif=${NL_KVDIF}," >> $FILE;fi
if test ! -z "$NL_DIFF_6TH_FACTOR"; then echo "diff_6th_factor=${NL_DIFF_6TH_FACTOR}," >> $FILE;	if test ! -z "$NL_DIFF_6TH_FACTOR"; then echo "diff_6th_factor=${NL_DIFF_6TH_FACTOR}," >> $FILE;
if test ! -z "$NL_DIFF_6TH_OPT"; then echo "diff_6th_opt=${NL_DIFF_6TH_OPT}," >> $FILE;fi		if test ! -z "$NL_DIFF_6TH_OPT"; then echo "diff_6th_opt=${NL_DIFF_6TH_OPT}," >> $FILE;fi
if test ! -z "$NL_USE_THETA_M"; then echo "use_theta_m=${NL_USE_THETA_M}," >> $FILE;fi			if test ! -z "$NL_USE_THETA_M"; then echo "use_theta_m=${NL_USE_THETA_M}," >> $FILE;fi
if test ! -z "$NL_USE_Q_DIABATIC"; then echo "use_q_diabatic=${NL_USE_Q_DIABATIC}," >> $FILE;fi		if test ! -z "$NL_USE_Q_DIABATIC"; then echo "use_q_diabatic=${NL_USE_Q_DIABATIC}," >> $FILE;fi
if test ! -z "$NL_C_S"; then echo "c_s=${NL_C_S}," >> $FILE;fi						if test ! -z "$NL_C_S"; then echo "c_s=${NL_C_S}," >> $FILE;fi
if test ! -z "$NL_C_K"; then echo "c_k=${NL_C_K}," >> $FILE;fi						if test ! -z "$NL_C_K"; then echo "c_k=${NL_C_K}," >> $FILE;fi
if test ! -z "$NL_SMDIV"; then echo "smdiv=${NL_SMDIV}," >> $FILE;fi					if test ! -z "$NL_SMDIV"; then echo "smdiv=${NL_SMDIV}," >> $FILE;fi
if test ! -z "$NL_EMDIV"; then echo "emdiv=${NL_EMDIV}," >> $FILE;fi					if test ! -z "$NL_EMDIV"; then echo "emdiv=${NL_EMDIV}," >> $FILE;fi
if test ! -z "$NL_EPSSM"; then echo "epssm=${NL_EPSSM}," >> $FILE;fi					if test ! -z "$NL_EPSSM"; then echo "epssm=${NL_EPSSM}," >> $FILE;fi
if test ! -z "$NL_NON_HYDROSTATIC"; then echo "non_hydrostatic=${NL_NON_HYDROSTATIC}," >> $FILE;	if test ! -z "$NL_NON_HYDROSTATIC"; then echo "non_hydrostatic=${NL_NON_HYDROSTATIC}," >> $FILE;
if test ! -z "$NL_USE_INPUT_W"; then echo "use_input_w=${NL_USE_INPUT_W}," >> $FILE;fi			if test ! -z "$NL_USE_INPUT_W"; then echo "use_input_w=${NL_USE_INPUT_W}," >> $FILE;fi
if test ! -z "$NL_TIME_STEP_SOUND"; then echo "time_step_sound=${NL_TIME_STEP_SOUND}," >> $FILE;	if test ! -z "$NL_TIME_STEP_SOUND"; then echo "time_step_sound=${NL_TIME_STEP_SOUND}," >> $FILE;
if test ! -z "$NL_H_MOM_ADV_ORDER"; then echo "h_mom_adv_order=${NL_H_MOM_ADV_ORDER}," >> $FILE;	if test ! -z "$NL_H_MOM_ADV_ORDER"; then echo "h_mom_adv_order=${NL_H_MOM_ADV_ORDER}," >> $FILE;
if test ! -z "$NL_V_MOM_ADV_ORDER"; then echo "v_mom_adv_order=${NL_V_MOM_ADV_ORDER}," >> $FILE;	if test ! -z "$NL_V_MOM_ADV_ORDER"; then echo "v_mom_adv_order=${NL_V_MOM_ADV_ORDER}," >> $FILE;
if test ! -z "$NL_H_SCA_ADV_ORDER"; then echo "h_sca_adv_order=${NL_H_SCA_ADV_ORDER}," >> $FILE;	if test ! -z "$NL_H_SCA_ADV_ORDER"; then echo "h_sca_adv_order=${NL_H_SCA_ADV_ORDER}," >> $FILE;
if test ! -z "$NL_V_SCA_ADV_ORDER"; then echo "v_sca_adv_order=${NL_V_SCA_ADV_ORDER}," >> $FILE;	if test ! -z "$NL_V_SCA_ADV_ORDER"; then echo "v_sca_adv_order=${NL_V_SCA_ADV_ORDER}," >> $FILE;
if test ! -z "$NL_MOMENTUM_ADV_OPT"; then echo "momentum_adv_opt=${NL_MOMENTUM_ADV_OPT}," >> $FI	if test ! -z "$NL_MOMENTUM_ADV_OPT"; then echo "momentum_adv_opt=${NL_MOMENTUM_ADV_OPT}," >> $FI
if test ! -z "$NL_MOIST_ADV_OPT"; then echo "moist_adv_opt=${NL_MOIST_ADV_OPT}," >> $FILE;fi		if test ! -z "$NL_MOIST_ADV_OPT"; then echo "moist_adv_opt=${NL_MOIST_ADV_OPT}," >> $FILE;fi
if test ! -z "$NL_MOIST_ADV_DFI_OPT"; then echo "moist_adv_dfi_opt=${NL_MOIST_ADV_DFI_OPT}," >> 	if test ! -z "$NL_MOIST_ADV_DFI_OPT"; then echo "moist_adv_dfi_opt=${NL_MOIST_ADV_DFI_OPT}," >> 
if test ! -z "$NL_CHEM_ADV_OPT"; then echo "chem_adv_opt=${NL_CHEM_ADV_OPT}," >> $FILE;fi		if test ! -z "$NL_CHEM_ADV_OPT"; then echo "chem_adv_opt=${NL_CHEM_ADV_OPT}," >> $FILE;fi
if test ! -z "$NL_TRACER_ADV_OPT"; then echo "tracer_adv_opt=${NL_TRACER_ADV_OPT}," >> $FILE;fi		if test ! -z "$NL_TRACER_ADV_OPT"; then echo "tracer_adv_opt=${NL_TRACER_ADV_OPT}," >> $FILE;fi
if test ! -z "$NL_SCALAR_ADV_OPT"; then echo "scalar_adv_opt=${NL_SCALAR_ADV_OPT}," >> $FILE;fi		if test ! -z "$NL_SCALAR_ADV_OPT"; then echo "scalar_adv_opt=${NL_SCALAR_ADV_OPT}," >> $FILE;fi
if test ! -z "$NL_TKE_ADV_OPT"; then echo "tke_adv_opt=${NL_TKE_ADV_OPT}," >> $FILE;fi			if test ! -z "$NL_TKE_ADV_OPT"; then echo "tke_adv_opt=${NL_TKE_ADV_OPT}," >> $FILE;fi
if test ! -z "$NL_TOP_RADIATION"; then echo "top_radiation=${NL_TOP_RADIATION}," >> $FILE;fi		if test ! -z "$NL_TOP_RADIATION"; then echo "top_radiation=${NL_TOP_RADIATION}," >> $FILE;fi
if test ! -z "$NL_MIX_ISOTROPIC"; then echo "mix_isotropic=${NL_MIX_ISOTROPIC}," >> $FILE;fi		if test ! -z "$NL_MIX_ISOTROPIC"; then echo "mix_isotropic=${NL_MIX_ISOTROPIC}," >> $FILE;fi
if test ! -z "$NL_MIX_UPPER_BOUND"; then echo "mix_upper_bound=${NL_MIX_UPPER_BOUND}," >> $FILE;	if test ! -z "$NL_MIX_UPPER_BOUND"; then echo "mix_upper_bound=${NL_MIX_UPPER_BOUND}," >> $FILE;
if test ! -z "$NL_TOP_LID"; then echo "top_lid=${NL_TOP_LID}," >> $FILE;fi				if test ! -z "$NL_TOP_LID"; then echo "top_lid=${NL_TOP_LID}," >> $FILE;fi
if test ! -z "$NL_TKE_UPPER_BOUND"; then echo "tke_upper_bound=${NL_TKE_UPPER_BOUND}," >> $FILE;	if test ! -z "$NL_TKE_UPPER_BOUND"; then echo "tke_upper_bound=${NL_TKE_UPPER_BOUND}," >> $FILE;
if test ! -z "$NL_TKE_DRAG_COEFFICIENT"; then echo "tke_drag_coefficient=${NL_TKE_DRAG_COEFFICIE	if test ! -z "$NL_TKE_DRAG_COEFFICIENT"; then echo "tke_drag_coefficient=${NL_TKE_DRAG_COEFFICIE
if test ! -z "$NL_TKE_HEAT_FLUX"; then echo "tke_heat_flux=${NL_TKE_HEAT_FLUX}," >> $FILE;fi		if test ! -z "$NL_TKE_HEAT_FLUX"; then echo "tke_heat_flux=${NL_TKE_HEAT_FLUX}," >> $FILE;fi
if test ! -z "$NL_PERT_CORIOLIS"; then echo "pert_coriolis=${NL_PERT_CORIOLIS}," >> $FILE;fi		if test ! -z "$NL_PERT_CORIOLIS"; then echo "pert_coriolis=${NL_PERT_CORIOLIS}," >> $FILE;fi
if test ! -z "$NL_CORIOLIS2D"; then echo "coriolis2d=${NL_CORIOLIS2D}," >> $FILE;fi			if test ! -z "$NL_CORIOLIS2D"; then echo "coriolis2d=${NL_CORIOLIS2D}," >> $FILE;fi
if test ! -z "$NL_MIX_FULL_FIELDS"; then echo "mix_full_fields=${NL_MIX_FULL_FIELDS}," >> $FILE;	if test ! -z "$NL_MIX_FULL_FIELDS"; then echo "mix_full_fields=${NL_MIX_FULL_FIELDS}," >> $FILE;
if test ! -z "$NL_BASE_PRES"; then echo "base_pres=${NL_BASE_PRES}," >> $FILE;fi			if test ! -z "$NL_BASE_PRES"; then echo "base_pres=${NL_BASE_PRES}," >> $FILE;fi
if test ! -z "$NL_BASE_TEMP"; then echo "base_temp=${NL_BASE_TEMP}," >> $FILE;fi			if test ! -z "$NL_BASE_TEMP"; then echo "base_temp=${NL_BASE_TEMP}," >> $FILE;fi
if test ! -z "$NL_BASE_LAPSE"; then echo "base_lapse=${NL_BASE_LAPSE}," >> $FILE;fi			if test ! -z "$NL_BASE_LAPSE"; then echo "base_lapse=${NL_BASE_LAPSE}," >> $FILE;fi
if test ! -z "$NL_ISO_TEMP"; then echo "iso_temp=${NL_ISO_TEMP}," >> $FILE;fi				if test ! -z "$NL_ISO_TEMP"; then echo "iso_temp=${NL_ISO_TEMP}," >> $FILE;fi
if test ! -z "$NL_BASE_PRES_STRAT"; then echo "base_pres_strat=${NL_BASE_PRES_STRAT}," >> $FILE;	if test ! -z "$NL_BASE_PRES_STRAT"; then echo "base_pres_strat=${NL_BASE_PRES_STRAT}," >> $FILE;
if test ! -z "$NL_BASE_LAPSE_STRAT"; then echo "base_lapse_strat=${NL_BASE_LAPSE_STRAT}," >> $FI	if test ! -z "$NL_BASE_LAPSE_STRAT"; then echo "base_lapse_strat=${NL_BASE_LAPSE_STRAT}," >> $FI
if test ! -z "$NL_USE_BASEPARAM_FR_NML"; then echo "use_baseparam_fr_nml=${NL_USE_BASEPARAM_FR_N	if test ! -z "$NL_USE_BASEPARAM_FR_NML"; then echo "use_baseparam_fr_nml=${NL_USE_BASEPARAM_FR_N
if test ! -z "$NL_FFT_FILTER_LAT"; then echo "fft_filter_lat=${NL_FFT_FILTER_LAT}," >> $FILE;fi		if test ! -z "$NL_FFT_FILTER_LAT"; then echo "fft_filter_lat=${NL_FFT_FILTER_LAT}," >> $FILE;fi
if test ! -z "$NL_COUPLED_FILTERING"; then echo "coupled_filtering=${NL_COUPLED_FILTERING}," >> 	if test ! -z "$NL_COUPLED_FILTERING"; then echo "coupled_filtering=${NL_COUPLED_FILTERING}," >> 
if test ! -z "$NL_POS_DEF"; then echo "pos_def=${NL_POS_DEF}," >> $FILE;fi				if test ! -z "$NL_POS_DEF"; then echo "pos_def=${NL_POS_DEF}," >> $FILE;fi
if test ! -z "$NL_SWAP_POLE_WITH_NEXT_J"; then echo "swap_pole_with_next_j=${NL_SWAP_POLE_WITH_N	if test ! -z "$NL_SWAP_POLE_WITH_NEXT_J"; then echo "swap_pole_with_next_j=${NL_SWAP_POLE_WITH_N
if test ! -z "$NL_ACTUAL_DISTANCE_AVERAGE"; then echo "actual_distance_average=${NL_ACTUAL_DISTA	if test ! -z "$NL_ACTUAL_DISTANCE_AVERAGE"; then echo "actual_distance_average=${NL_ACTUAL_DISTA
if test ! -z "$NL_ROTATED_POLE"; then echo "rotated_pole=${NL_ROTATED_POLE}," >> $FILE;fi		if test ! -z "$NL_ROTATED_POLE"; then echo "rotated_pole=${NL_ROTATED_POLE}," >> $FILE;fi
if test ! -z "$NL_DO_CORIOLIS"; then echo "do_coriolis=${NL_DO_CORIOLIS}," >> $FILE;fi			if test ! -z "$NL_DO_CORIOLIS"; then echo "do_coriolis=${NL_DO_CORIOLIS}," >> $FILE;fi
if test ! -z "$NL_DO_CURVATURE"; then echo "do_curvature=${NL_DO_CURVATURE}," >> $FILE;fi		if test ! -z "$NL_DO_CURVATURE"; then echo "do_curvature=${NL_DO_CURVATURE}," >> $FILE;fi
if test ! -z "$NL_DO_GRADP"; then echo "do_gradp=${NL_DO_GRADP}," >> $FILE;fi				if test ! -z "$NL_DO_GRADP"; then echo "do_gradp=${NL_DO_GRADP}," >> $FILE;fi
if test ! -z "$NL_TRACER_OPT"; then echo "tracer_opt=${NL_TRACER_OPT}," >> $FILE;fi			if test ! -z "$NL_TRACER_OPT"; then echo "tracer_opt=${NL_TRACER_OPT}," >> $FILE;fi
if test ! -z "$NL_TENDDIAG"; then echo "tenddiag=${NL_TENDDIAG}," >> $FILE;fi				if test ! -z "$NL_TENDDIAG"; then echo "tenddiag=${NL_TENDDIAG}," >> $FILE;fi
if test ! -z "$NL_DO_AVGFLX_EM"; then echo "do_avgflx_em=${NL_DO_AVGFLX_EM}," >> $FILE;fi		if test ! -z "$NL_DO_AVGFLX_EM"; then echo "do_avgflx_em=${NL_DO_AVGFLX_EM}," >> $FILE;fi
if test ! -z "$NL_DO_AVGFLX_CUGD"; then echo "do_avgflx_cugd=${NL_DO_AVGFLX_CUGD}," >> $FILE;fi		if test ! -z "$NL_DO_AVGFLX_CUGD"; then echo "do_avgflx_cugd=${NL_DO_AVGFLX_CUGD}," >> $FILE;fi
if test ! -z "$NL_SFS_OPT"; then echo "sfs_opt=${NL_SFS_OPT}," >> $FILE;fi				if test ! -z "$NL_SFS_OPT"; then echo "sfs_opt=${NL_SFS_OPT}," >> $FILE;fi
if test ! -z "$NL_M_OPT"; then echo "m_opt=${NL_M_OPT}," >> $FILE;fi					if test ! -z "$NL_M_OPT"; then echo "m_opt=${NL_M_OPT}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&bdy_control >> $FILE										echo \&bdy_control >> $FILE
if test ! -z "$NL_SPEC_BDY_WIDTH"; then echo "spec_bdy_width=${NL_SPEC_BDY_WIDTH}," >> $FILE;fi		if test ! -z "$NL_SPEC_BDY_WIDTH"; then echo "spec_bdy_width=${NL_SPEC_BDY_WIDTH}," >> $FILE;fi
if test ! -z "$NL_SPEC_ZONE"; then echo "spec_zone=${NL_SPEC_ZONE}," >> $FILE;fi			if test ! -z "$NL_SPEC_ZONE"; then echo "spec_zone=${NL_SPEC_ZONE}," >> $FILE;fi
if test ! -z "$NL_RELAX_ZONE"; then echo "relax_zone=${NL_RELAX_ZONE}," >> $FILE;fi			if test ! -z "$NL_RELAX_ZONE"; then echo "relax_zone=${NL_RELAX_ZONE}," >> $FILE;fi
if test ! -z "$NL_SPECIFIED"; then echo "specified=${NL_SPECIFIED}," >> $FILE;fi			if test ! -z "$NL_SPECIFIED"; then echo "specified=${NL_SPECIFIED}," >> $FILE;fi
if test ! -z "$NL_CONSTANT_BC"; then echo "constant_bc=${NL_CONSTANT_BC}," >> $FILE;fi			if test ! -z "$NL_CONSTANT_BC"; then echo "constant_bc=${NL_CONSTANT_BC}," >> $FILE;fi
if test ! -z "$NL_PERIODIC_X"; then echo "periodic_x=${NL_PERIODIC_X}," >> $FILE;fi			if test ! -z "$NL_PERIODIC_X"; then echo "periodic_x=${NL_PERIODIC_X}," >> $FILE;fi
if test ! -z "$NL_SYMMETRIC_XS"; then echo "symmetric_xs=${NL_SYMMETRIC_XS}," >> $FILE;fi		if test ! -z "$NL_SYMMETRIC_XS"; then echo "symmetric_xs=${NL_SYMMETRIC_XS}," >> $FILE;fi
if test ! -z "$NL_SYMMETRIC_XE"; then echo "symmetric_xe=${NL_SYMMETRIC_XE}," >> $FILE;fi		if test ! -z "$NL_SYMMETRIC_XE"; then echo "symmetric_xe=${NL_SYMMETRIC_XE}," >> $FILE;fi
if test ! -z "$NL_OPEN_XS"; then echo "open_xs=${NL_OPEN_XS}," >> $FILE;fi				if test ! -z "$NL_OPEN_XS"; then echo "open_xs=${NL_OPEN_XS}," >> $FILE;fi
if test ! -z "$NL_OPEN_XE"; then echo "open_xe=${NL_OPEN_XE}," >> $FILE;fi				if test ! -z "$NL_OPEN_XE"; then echo "open_xe=${NL_OPEN_XE}," >> $FILE;fi
if test ! -z "$NL_PERIODIC_Y"; then echo "periodic_y=${NL_PERIODIC_Y}," >> $FILE;fi			if test ! -z "$NL_PERIODIC_Y"; then echo "periodic_y=${NL_PERIODIC_Y}," >> $FILE;fi
if test ! -z "$NL_SYMMETRIC_YS"; then echo "symmetric_ys=${NL_SYMMETRIC_YS}," >> $FILE;fi		if test ! -z "$NL_SYMMETRIC_YS"; then echo "symmetric_ys=${NL_SYMMETRIC_YS}," >> $FILE;fi
if test ! -z "$NL_SYMMETRIC_YE"; then echo "symmetric_ye=${NL_SYMMETRIC_YE}," >> $FILE;fi		if test ! -z "$NL_SYMMETRIC_YE"; then echo "symmetric_ye=${NL_SYMMETRIC_YE}," >> $FILE;fi
if test ! -z "$NL_OPEN_YS"; then echo "open_ys=${NL_OPEN_YS}," >> $FILE;fi				if test ! -z "$NL_OPEN_YS"; then echo "open_ys=${NL_OPEN_YS}," >> $FILE;fi
if test ! -z "$NL_OPEN_YE"; then echo "open_ye=${NL_OPEN_YE}," >> $FILE;fi				if test ! -z "$NL_OPEN_YE"; then echo "open_ye=${NL_OPEN_YE}," >> $FILE;fi
if test ! -z "$NL_POLAR"; then echo "polar=${NL_POLAR}," >> $FILE;fi					if test ! -z "$NL_POLAR"; then echo "polar=${NL_POLAR}," >> $FILE;fi
if test ! -z "$NL_NESTED"; then echo "nested=${NL_NESTED}," >> $FILE;fi					if test ! -z "$NL_NESTED"; then echo "nested=${NL_NESTED}," >> $FILE;fi
if test ! -z "$NL_SPEC_EXP"; then echo "spec_exp=${NL_SPEC_EXP}," >> $FILE;fi				if test ! -z "$NL_SPEC_EXP"; then echo "spec_exp=${NL_SPEC_EXP}," >> $FILE;fi
if test ! -z "$NL_SPEC_BDY_FINAL_MU"; then echo "spec_bdy_final_mu=${NL_SPEC_BDY_FINAL_MU}," >> 	if test ! -z "$NL_SPEC_BDY_FINAL_MU"; then echo "spec_bdy_final_mu=${NL_SPEC_BDY_FINAL_MU}," >> 
if test ! -z "$NL_REAL_DATA_INIT_TYPE"; then echo "real_data_init_type=${NL_REAL_DATA_INIT_TYPE}	if test ! -z "$NL_REAL_DATA_INIT_TYPE"; then echo "real_data_init_type=${NL_REAL_DATA_INIT_TYPE}
if test ! -z "$NL_HAVE_BCS_MOIST"; then echo "have_bcs_moist=${NL_HAVE_BCS_MOIST}," >> $FILE;fi		if test ! -z "$NL_HAVE_BCS_MOIST"; then echo "have_bcs_moist=${NL_HAVE_BCS_MOIST}," >> $FILE;fi
if test ! -z "$NL_HAVE_BCS_SCALAR"; then echo "have_bcs_scalar=${NL_HAVE_BCS_SCALAR}," >> $FILE;	if test ! -z "$NL_HAVE_BCS_SCALAR"; then echo "have_bcs_scalar=${NL_HAVE_BCS_SCALAR}," >> $FILE;
echo / >> $FILE												echo / >> $FILE
echo \&grib2 >> $FILE											echo \&grib2 >> $FILE
if test ! -z "$NL_BACKGROUND_PROC_ID"; then echo "background_proc_id=${NL_BACKGROUND_PROC_ID}," 	if test ! -z "$NL_BACKGROUND_PROC_ID"; then echo "background_proc_id=${NL_BACKGROUND_PROC_ID}," 
if test ! -z "$NL_FORECAST_PROC_ID"; then echo "forecast_proc_id=${NL_FORECAST_PROC_ID}," >> $FI	if test ! -z "$NL_FORECAST_PROC_ID"; then echo "forecast_proc_id=${NL_FORECAST_PROC_ID}," >> $FI
if test ! -z "$NL_PRODUCTION_STATUS"; then echo "production_status=${NL_PRODUCTION_STATUS}," >> 	if test ! -z "$NL_PRODUCTION_STATUS"; then echo "production_status=${NL_PRODUCTION_STATUS}," >> 
if test ! -z "$NL_COMPRESSION"; then echo "compression=${NL_COMPRESSION}," >> $FILE;fi			if test ! -z "$NL_COMPRESSION"; then echo "compression=${NL_COMPRESSION}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&fire >> $FILE											echo \&fire >> $FILE
if test ! -z "$NL_IFIRE"; then echo "ifire=${NL_IFIRE}," >> $FILE;fi					if test ! -z "$NL_IFIRE"; then echo "ifire=${NL_IFIRE}," >> $FILE;fi
if test ! -z "$NL_FIRE_BOUNDARY_GUARD"; then echo "fire_boundary_guard=${NL_FIRE_BOUNDARY_GUARD}	if test ! -z "$NL_FIRE_BOUNDARY_GUARD"; then echo "fire_boundary_guard=${NL_FIRE_BOUNDARY_GUARD}
if test ! -z "$NL_FIRE_NUM_IGNITIONS"; then echo "fire_num_ignitions=${NL_FIRE_NUM_IGNITIONS}," 	if test ! -z "$NL_FIRE_NUM_IGNITIONS"; then echo "fire_num_ignitions=${NL_FIRE_NUM_IGNITIONS}," 
if test ! -z "$NL_FIRE_IGNITION_ROS1"; then echo "fire_ignition_ros1=${NL_FIRE_IGNITION_ROS1}," 	if test ! -z "$NL_FIRE_IGNITION_ROS1"; then echo "fire_ignition_ros1=${NL_FIRE_IGNITION_ROS1}," 
if test ! -z "$NL_FIRE_IGNITION_START_LON1"; then echo "fire_ignition_start_lon1=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LON1"; then echo "fire_ignition_start_lon1=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_START_LAT1"; then echo "fire_ignition_start_lat1=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LAT1"; then echo "fire_ignition_start_lat1=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_END_LON1"; then echo "fire_ignition_end_lon1=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LON1"; then echo "fire_ignition_end_lon1=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_LAT1"; then echo "fire_ignition_end_lat1=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LAT1"; then echo "fire_ignition_end_lat1=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_RADIUS1"; then echo "fire_ignition_radius1=${NL_FIRE_IGNITION_RA	if test ! -z "$NL_FIRE_IGNITION_RADIUS1"; then echo "fire_ignition_radius1=${NL_FIRE_IGNITION_RA
if test ! -z "$NL_FIRE_IGNITION_START_TIME1"; then echo "fire_ignition_start_time1=${NL_FIRE_IGN	if test ! -z "$NL_FIRE_IGNITION_START_TIME1"; then echo "fire_ignition_start_time1=${NL_FIRE_IGN
if test ! -z "$NL_FIRE_IGNITION_END_TIME1"; then echo "fire_ignition_end_time1=${NL_FIRE_IGNITIO	if test ! -z "$NL_FIRE_IGNITION_END_TIME1"; then echo "fire_ignition_end_time1=${NL_FIRE_IGNITIO
if test ! -z "$NL_FIRE_IGNITION_ROS2"; then echo "fire_ignition_ros2=${NL_FIRE_IGNITION_ROS2}," 	if test ! -z "$NL_FIRE_IGNITION_ROS2"; then echo "fire_ignition_ros2=${NL_FIRE_IGNITION_ROS2}," 
if test ! -z "$NL_FIRE_IGNITION_START_LON2"; then echo "fire_ignition_start_lon2=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LON2"; then echo "fire_ignition_start_lon2=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_START_LAT2"; then echo "fire_ignition_start_lat2=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LAT2"; then echo "fire_ignition_start_lat2=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_END_LON2"; then echo "fire_ignition_end_lon2=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LON2"; then echo "fire_ignition_end_lon2=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_LAT2"; then echo "fire_ignition_end_lat2=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LAT2"; then echo "fire_ignition_end_lat2=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_RADIUS2"; then echo "fire_ignition_radius2=${NL_FIRE_IGNITION_RA	if test ! -z "$NL_FIRE_IGNITION_RADIUS2"; then echo "fire_ignition_radius2=${NL_FIRE_IGNITION_RA
if test ! -z "$NL_FIRE_IGNITION_START_TIME2"; then echo "fire_ignition_start_time2=${NL_FIRE_IGN	if test ! -z "$NL_FIRE_IGNITION_START_TIME2"; then echo "fire_ignition_start_time2=${NL_FIRE_IGN
if test ! -z "$NL_FIRE_IGNITION_END_TIME2"; then echo "fire_ignition_end_time2=${NL_FIRE_IGNITIO	if test ! -z "$NL_FIRE_IGNITION_END_TIME2"; then echo "fire_ignition_end_time2=${NL_FIRE_IGNITIO
if test ! -z "$NL_FIRE_IGNITION_ROS3"; then echo "fire_ignition_ros3=${NL_FIRE_IGNITION_ROS3}," 	if test ! -z "$NL_FIRE_IGNITION_ROS3"; then echo "fire_ignition_ros3=${NL_FIRE_IGNITION_ROS3}," 
if test ! -z "$NL_FIRE_IGNITION_START_LON3"; then echo "fire_ignition_start_lon3=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LON3"; then echo "fire_ignition_start_lon3=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_START_LAT3"; then echo "fire_ignition_start_lat3=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LAT3"; then echo "fire_ignition_start_lat3=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_END_LON3"; then echo "fire_ignition_end_lon3=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LON3"; then echo "fire_ignition_end_lon3=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_LAT3"; then echo "fire_ignition_end_lat3=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LAT3"; then echo "fire_ignition_end_lat3=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_RADIUS3"; then echo "fire_ignition_radius3=${NL_FIRE_IGNITION_RA	if test ! -z "$NL_FIRE_IGNITION_RADIUS3"; then echo "fire_ignition_radius3=${NL_FIRE_IGNITION_RA
if test ! -z "$NL_FIRE_IGNITION_START_TIME3"; then echo "fire_ignition_start_time3=${NL_FIRE_IGN	if test ! -z "$NL_FIRE_IGNITION_START_TIME3"; then echo "fire_ignition_start_time3=${NL_FIRE_IGN
if test ! -z "$NL_FIRE_IGNITION_END_TIME3"; then echo "fire_ignition_end_time3=${NL_FIRE_IGNITIO	if test ! -z "$NL_FIRE_IGNITION_END_TIME3"; then echo "fire_ignition_end_time3=${NL_FIRE_IGNITIO
if test ! -z "$NL_FIRE_IGNITION_ROS4"; then echo "fire_ignition_ros4=${NL_FIRE_IGNITION_ROS4}," 	if test ! -z "$NL_FIRE_IGNITION_ROS4"; then echo "fire_ignition_ros4=${NL_FIRE_IGNITION_ROS4}," 
if test ! -z "$NL_FIRE_IGNITION_START_LON4"; then echo "fire_ignition_start_lon4=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LON4"; then echo "fire_ignition_start_lon4=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_START_LAT4"; then echo "fire_ignition_start_lat4=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LAT4"; then echo "fire_ignition_start_lat4=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_END_LON4"; then echo "fire_ignition_end_lon4=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LON4"; then echo "fire_ignition_end_lon4=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_LAT4"; then echo "fire_ignition_end_lat4=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LAT4"; then echo "fire_ignition_end_lat4=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_RADIUS4"; then echo "fire_ignition_radius4=${NL_FIRE_IGNITION_RA	if test ! -z "$NL_FIRE_IGNITION_RADIUS4"; then echo "fire_ignition_radius4=${NL_FIRE_IGNITION_RA
if test ! -z "$NL_FIRE_IGNITION_START_TIME4"; then echo "fire_ignition_start_time4=${NL_FIRE_IGN	if test ! -z "$NL_FIRE_IGNITION_START_TIME4"; then echo "fire_ignition_start_time4=${NL_FIRE_IGN
if test ! -z "$NL_FIRE_IGNITION_END_TIME4"; then echo "fire_ignition_end_time4=${NL_FIRE_IGNITIO	if test ! -z "$NL_FIRE_IGNITION_END_TIME4"; then echo "fire_ignition_end_time4=${NL_FIRE_IGNITIO
if test ! -z "$NL_FIRE_IGNITION_ROS5"; then echo "fire_ignition_ros5=${NL_FIRE_IGNITION_ROS5}," 	if test ! -z "$NL_FIRE_IGNITION_ROS5"; then echo "fire_ignition_ros5=${NL_FIRE_IGNITION_ROS5}," 
if test ! -z "$NL_FIRE_IGNITION_START_LON5"; then echo "fire_ignition_start_lon5=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LON5"; then echo "fire_ignition_start_lon5=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_START_LAT5"; then echo "fire_ignition_start_lat5=${NL_FIRE_IGNIT	if test ! -z "$NL_FIRE_IGNITION_START_LAT5"; then echo "fire_ignition_start_lat5=${NL_FIRE_IGNIT
if test ! -z "$NL_FIRE_IGNITION_END_LON5"; then echo "fire_ignition_end_lon5=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LON5"; then echo "fire_ignition_end_lon5=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_LAT5"; then echo "fire_ignition_end_lat5=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_END_LAT5"; then echo "fire_ignition_end_lat5=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_RADIUS5"; then echo "fire_ignition_radius5=${NL_FIRE_IGNITION_RA	if test ! -z "$NL_FIRE_IGNITION_RADIUS5"; then echo "fire_ignition_radius5=${NL_FIRE_IGNITION_RA
if test ! -z "$NL_FIRE_IGNITION_START_TIME5"; then echo "fire_ignition_start_time5=${NL_FIRE_IGN	if test ! -z "$NL_FIRE_IGNITION_START_TIME5"; then echo "fire_ignition_start_time5=${NL_FIRE_IGN
if test ! -z "$NL_FIRE_IGNITION_END_TIME5"; then echo "fire_ignition_end_time5=${NL_FIRE_IGNITIO	if test ! -z "$NL_FIRE_IGNITION_END_TIME5"; then echo "fire_ignition_end_time5=${NL_FIRE_IGNITIO
if test ! -z "$NL_FIRE_IGNITION_START_X1"; then echo "fire_ignition_start_x1=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_X1"; then echo "fire_ignition_start_x1=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_START_Y1"; then echo "fire_ignition_start_y1=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_Y1"; then echo "fire_ignition_start_y1=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_X1"; then echo "fire_ignition_end_x1=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_X1"; then echo "fire_ignition_end_x1=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_END_Y1"; then echo "fire_ignition_end_y1=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_Y1"; then echo "fire_ignition_end_y1=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_START_X2"; then echo "fire_ignition_start_x2=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_X2"; then echo "fire_ignition_start_x2=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_START_Y2"; then echo "fire_ignition_start_y2=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_Y2"; then echo "fire_ignition_start_y2=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_X2"; then echo "fire_ignition_end_x2=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_X2"; then echo "fire_ignition_end_x2=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_END_Y2"; then echo "fire_ignition_end_y2=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_Y2"; then echo "fire_ignition_end_y2=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_START_X3"; then echo "fire_ignition_start_x3=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_X3"; then echo "fire_ignition_start_x3=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_START_Y3"; then echo "fire_ignition_start_y3=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_Y3"; then echo "fire_ignition_start_y3=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_X3"; then echo "fire_ignition_end_x3=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_X3"; then echo "fire_ignition_end_x3=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_END_Y3"; then echo "fire_ignition_end_y3=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_Y3"; then echo "fire_ignition_end_y3=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_START_X4"; then echo "fire_ignition_start_x4=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_X4"; then echo "fire_ignition_start_x4=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_START_Y4"; then echo "fire_ignition_start_y4=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_Y4"; then echo "fire_ignition_start_y4=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_X4"; then echo "fire_ignition_end_x4=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_X4"; then echo "fire_ignition_end_x4=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_END_Y4"; then echo "fire_ignition_end_y4=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_Y4"; then echo "fire_ignition_end_y4=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_START_X5"; then echo "fire_ignition_start_x5=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_X5"; then echo "fire_ignition_start_x5=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_START_Y5"; then echo "fire_ignition_start_y5=${NL_FIRE_IGNITION_	if test ! -z "$NL_FIRE_IGNITION_START_Y5"; then echo "fire_ignition_start_y5=${NL_FIRE_IGNITION_
if test ! -z "$NL_FIRE_IGNITION_END_X5"; then echo "fire_ignition_end_x5=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_X5"; then echo "fire_ignition_end_x5=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_IGNITION_END_Y5"; then echo "fire_ignition_end_y5=${NL_FIRE_IGNITION_END_	if test ! -z "$NL_FIRE_IGNITION_END_Y5"; then echo "fire_ignition_end_y5=${NL_FIRE_IGNITION_END_
if test ! -z "$NL_FIRE_LAT_INIT"; then echo "fire_lat_init=${NL_FIRE_LAT_INIT}," >> $FILE;fi		if test ! -z "$NL_FIRE_LAT_INIT"; then echo "fire_lat_init=${NL_FIRE_LAT_INIT}," >> $FILE;fi
if test ! -z "$NL_FIRE_LON_INIT"; then echo "fire_lon_init=${NL_FIRE_LON_INIT}," >> $FILE;fi		if test ! -z "$NL_FIRE_LON_INIT"; then echo "fire_lon_init=${NL_FIRE_LON_INIT}," >> $FILE;fi
if test ! -z "$NL_FIRE_IGN_TIME"; then echo "fire_ign_time=${NL_FIRE_IGN_TIME}," >> $FILE;fi		if test ! -z "$NL_FIRE_IGN_TIME"; then echo "fire_ign_time=${NL_FIRE_IGN_TIME}," >> $FILE;fi
if test ! -z "$NL_FIRE_SHAPE"; then echo "fire_shape=${NL_FIRE_SHAPE}," >> $FILE;fi			if test ! -z "$NL_FIRE_SHAPE"; then echo "fire_shape=${NL_FIRE_SHAPE}," >> $FILE;fi
if test ! -z "$NL_FIRE_SPRD_MDL"; then echo "fire_sprd_mdl=${NL_FIRE_SPRD_MDL}," >> $FILE;fi		if test ! -z "$NL_FIRE_SPRD_MDL"; then echo "fire_sprd_mdl=${NL_FIRE_SPRD_MDL}," >> $FILE;fi
if test ! -z "$NL_FIRE_CRWN_HGT"; then echo "fire_crwn_hgt=${NL_FIRE_CRWN_HGT}," >> $FILE;fi		if test ! -z "$NL_FIRE_CRWN_HGT"; then echo "fire_crwn_hgt=${NL_FIRE_CRWN_HGT}," >> $FILE;fi
if test ! -z "$NL_FIRE_EXT_GRND"; then echo "fire_ext_grnd=${NL_FIRE_EXT_GRND}," >> $FILE;fi		if test ! -z "$NL_FIRE_EXT_GRND"; then echo "fire_ext_grnd=${NL_FIRE_EXT_GRND}," >> $FILE;fi
if test ! -z "$NL_FIRE_EXT_CRWN"; then echo "fire_ext_crwn=${NL_FIRE_EXT_CRWN}," >> $FILE;fi		if test ! -z "$NL_FIRE_EXT_CRWN"; then echo "fire_ext_crwn=${NL_FIRE_EXT_CRWN}," >> $FILE;fi
if test ! -z "$NL_FIRE_WIND_HEIGHT"; then echo "fire_wind_height=${NL_FIRE_WIND_HEIGHT}," >> $FI	if test ! -z "$NL_FIRE_WIND_HEIGHT"; then echo "fire_wind_height=${NL_FIRE_WIND_HEIGHT}," >> $FI
if test ! -z "$NL_FIRE_FUEL_READ"; then echo "fire_fuel_read=${NL_FIRE_FUEL_READ}," >> $FILE;fi		if test ! -z "$NL_FIRE_FUEL_READ"; then echo "fire_fuel_read=${NL_FIRE_FUEL_READ}," >> $FILE;fi
if test ! -z "$NL_FIRE_FUEL_CAT"; then echo "fire_fuel_cat=${NL_FIRE_FUEL_CAT}," >> $FILE;fi		if test ! -z "$NL_FIRE_FUEL_CAT"; then echo "fire_fuel_cat=${NL_FIRE_FUEL_CAT}," >> $FILE;fi
if test ! -z "$NL_FIRE_PRINT_MSG"; then echo "fire_print_msg=${NL_FIRE_PRINT_MSG}," >> $FILE;fi		if test ! -z "$NL_FIRE_PRINT_MSG"; then echo "fire_print_msg=${NL_FIRE_PRINT_MSG}," >> $FILE;fi
if test ! -z "$NL_FIRE_PRINT_FILE"; then echo "fire_print_file=${NL_FIRE_PRINT_FILE}," >> $FILE;	if test ! -z "$NL_FIRE_PRINT_FILE"; then echo "fire_print_file=${NL_FIRE_PRINT_FILE}," >> $FILE;
if test ! -z "$NL_FIRE_FUEL_LEFT_METHOD"; then echo "fire_fuel_left_method=${NL_FIRE_FUEL_LEFT_M	if test ! -z "$NL_FIRE_FUEL_LEFT_METHOD"; then echo "fire_fuel_left_method=${NL_FIRE_FUEL_LEFT_M
if test ! -z "$NL_FIRE_FUEL_LEFT_IRL"; then echo "fire_fuel_left_irl=${NL_FIRE_FUEL_LEFT_IRL}," 	if test ! -z "$NL_FIRE_FUEL_LEFT_IRL"; then echo "fire_fuel_left_irl=${NL_FIRE_FUEL_LEFT_IRL}," 
if test ! -z "$NL_FIRE_FUEL_LEFT_JRL"; then echo "fire_fuel_left_jrl=${NL_FIRE_FUEL_LEFT_JRL}," 	if test ! -z "$NL_FIRE_FUEL_LEFT_JRL"; then echo "fire_fuel_left_jrl=${NL_FIRE_FUEL_LEFT_JRL}," 
if test ! -z "$NL_FIRE_BACK_WEIGHT"; then echo "fire_back_weight=${NL_FIRE_BACK_WEIGHT}," >> $FI	if test ! -z "$NL_FIRE_BACK_WEIGHT"; then echo "fire_back_weight=${NL_FIRE_BACK_WEIGHT}," >> $FI
if test ! -z "$NL_FIRE_GROWS_ONLY"; then echo "fire_grows_only=${NL_FIRE_GROWS_ONLY}," >> $FILE;	if test ! -z "$NL_FIRE_GROWS_ONLY"; then echo "fire_grows_only=${NL_FIRE_GROWS_ONLY}," >> $FILE;
if test ! -z "$NL_FIRE_UPWINDING"; then echo "fire_upwinding=${NL_FIRE_UPWINDING}," >> $FILE;fi		if test ! -z "$NL_FIRE_UPWINDING"; then echo "fire_upwinding=${NL_FIRE_UPWINDING}," >> $FILE;fi
if test ! -z "$NL_FIRE_UPWIND_SPLIT"; then echo "fire_upwind_split=${NL_FIRE_UPWIND_SPLIT}," >> 	if test ! -z "$NL_FIRE_UPWIND_SPLIT"; then echo "fire_upwind_split=${NL_FIRE_UPWIND_SPLIT}," >> 
if test ! -z "$NL_FIRE_VISCOSITY"; then echo "fire_viscosity=${NL_FIRE_VISCOSITY}," >> $FILE;fi		if test ! -z "$NL_FIRE_VISCOSITY"; then echo "fire_viscosity=${NL_FIRE_VISCOSITY}," >> $FILE;fi
if test ! -z "$NL_FIRE_LFN_EXT_UP"; then echo "fire_lfn_ext_up=${NL_FIRE_LFN_EXT_UP}," >> $FILE;	if test ! -z "$NL_FIRE_LFN_EXT_UP"; then echo "fire_lfn_ext_up=${NL_FIRE_LFN_EXT_UP}," >> $FILE;
if test ! -z "$NL_FIRE_TOPO_FROM_ATM"; then echo "fire_topo_from_atm=${NL_FIRE_TOPO_FROM_ATM}," 	if test ! -z "$NL_FIRE_TOPO_FROM_ATM"; then echo "fire_topo_from_atm=${NL_FIRE_TOPO_FROM_ATM}," 
if test ! -z "$NL_FIRE_ADVECTION"; then echo "fire_advection=${NL_FIRE_ADVECTION}," >> $FILE;fi		if test ! -z "$NL_FIRE_ADVECTION"; then echo "fire_advection=${NL_FIRE_ADVECTION}," >> $FILE;fi
if test ! -z "$NL_FIRE_TEST_STEPS"; then echo "fire_test_steps=${NL_FIRE_TEST_STEPS}," >> $FILE;	if test ! -z "$NL_FIRE_TEST_STEPS"; then echo "fire_test_steps=${NL_FIRE_TEST_STEPS}," >> $FILE;
if test ! -z "$NL_FIRE_CONST_TIME"; then echo "fire_const_time=${NL_FIRE_CONST_TIME}," >> $FILE;	if test ! -z "$NL_FIRE_CONST_TIME"; then echo "fire_const_time=${NL_FIRE_CONST_TIME}," >> $FILE;
if test ! -z "$NL_FIRE_CONST_GRNHFX"; then echo "fire_const_grnhfx=${NL_FIRE_CONST_GRNHFX}," >> 	if test ! -z "$NL_FIRE_CONST_GRNHFX"; then echo "fire_const_grnhfx=${NL_FIRE_CONST_GRNHFX}," >> 
if test ! -z "$NL_FIRE_CONST_GRNQFX"; then echo "fire_const_grnqfx=${NL_FIRE_CONST_GRNQFX}," >> 	if test ! -z "$NL_FIRE_CONST_GRNQFX"; then echo "fire_const_grnqfx=${NL_FIRE_CONST_GRNQFX}," >> 
if test ! -z "$NL_FIRE_ATM_FEEDBACK"; then echo "fire_atm_feedback=${NL_FIRE_ATM_FEEDBACK}," >> 	if test ! -z "$NL_FIRE_ATM_FEEDBACK"; then echo "fire_atm_feedback=${NL_FIRE_ATM_FEEDBACK}," >> 
if test ! -z "$NL_FIRE_MOUNTAIN_TYPE"; then echo "fire_mountain_type=${NL_FIRE_MOUNTAIN_TYPE}," 	if test ! -z "$NL_FIRE_MOUNTAIN_TYPE"; then echo "fire_mountain_type=${NL_FIRE_MOUNTAIN_TYPE}," 
if test ! -z "$NL_FIRE_MOUNTAIN_HEIGHT"; then echo "fire_mountain_height=${NL_FIRE_MOUNTAIN_HEIG	if test ! -z "$NL_FIRE_MOUNTAIN_HEIGHT"; then echo "fire_mountain_height=${NL_FIRE_MOUNTAIN_HEIG
if test ! -z "$NL_FIRE_MOUNTAIN_START_X"; then echo "fire_mountain_start_x=${NL_FIRE_MOUNTAIN_ST	if test ! -z "$NL_FIRE_MOUNTAIN_START_X"; then echo "fire_mountain_start_x=${NL_FIRE_MOUNTAIN_ST
if test ! -z "$NL_FIRE_MOUNTAIN_START_Y"; then echo "fire_mountain_start_y=${NL_FIRE_MOUNTAIN_ST	if test ! -z "$NL_FIRE_MOUNTAIN_START_Y"; then echo "fire_mountain_start_y=${NL_FIRE_MOUNTAIN_ST
if test ! -z "$NL_FIRE_MOUNTAIN_END_X"; then echo "fire_mountain_end_x=${NL_FIRE_MOUNTAIN_END_X}	if test ! -z "$NL_FIRE_MOUNTAIN_END_X"; then echo "fire_mountain_end_x=${NL_FIRE_MOUNTAIN_END_X}
if test ! -z "$NL_FIRE_MOUNTAIN_END_Y"; then echo "fire_mountain_end_y=${NL_FIRE_MOUNTAIN_END_Y}	if test ! -z "$NL_FIRE_MOUNTAIN_END_Y"; then echo "fire_mountain_end_y=${NL_FIRE_MOUNTAIN_END_Y}
if test ! -z "$NL_DELT_PERTURBATION"; then echo "delt_perturbation=${NL_DELT_PERTURBATION}," >> 	if test ! -z "$NL_DELT_PERTURBATION"; then echo "delt_perturbation=${NL_DELT_PERTURBATION}," >> 
if test ! -z "$NL_XRAD_PERTURBATION"; then echo "xrad_perturbation=${NL_XRAD_PERTURBATION}," >> 	if test ! -z "$NL_XRAD_PERTURBATION"; then echo "xrad_perturbation=${NL_XRAD_PERTURBATION}," >> 
if test ! -z "$NL_YRAD_PERTURBATION"; then echo "yrad_perturbation=${NL_YRAD_PERTURBATION}," >> 	if test ! -z "$NL_YRAD_PERTURBATION"; then echo "yrad_perturbation=${NL_YRAD_PERTURBATION}," >> 
if test ! -z "$NL_ZRAD_PERTURBATION"; then echo "zrad_perturbation=${NL_ZRAD_PERTURBATION}," >> 	if test ! -z "$NL_ZRAD_PERTURBATION"; then echo "zrad_perturbation=${NL_ZRAD_PERTURBATION}," >> 
if test ! -z "$NL_HGHT_PERTURBATION"; then echo "hght_perturbation=${NL_HGHT_PERTURBATION}," >> 	if test ! -z "$NL_HGHT_PERTURBATION"; then echo "hght_perturbation=${NL_HGHT_PERTURBATION}," >> 
if test ! -z "$NL_STRETCH_GRD"; then echo "stretch_grd=${NL_STRETCH_GRD}," >> $FILE;fi			if test ! -z "$NL_STRETCH_GRD"; then echo "stretch_grd=${NL_STRETCH_GRD}," >> $FILE;fi
if test ! -z "$NL_STRETCH_HYP"; then echo "stretch_hyp=${NL_STRETCH_HYP}," >> $FILE;fi			if test ! -z "$NL_STRETCH_HYP"; then echo "stretch_hyp=${NL_STRETCH_HYP}," >> $FILE;fi
if test ! -z "$NL_Z_GRD_SCALE"; then echo "z_grd_scale=${NL_Z_GRD_SCALE}," >> $FILE;fi			if test ! -z "$NL_Z_GRD_SCALE"; then echo "z_grd_scale=${NL_Z_GRD_SCALE}," >> $FILE;fi
if test ! -z "$NL_SFC_FULL_INIT"; then echo "sfc_full_init=${NL_SFC_FULL_INIT}," >> $FILE;fi		if test ! -z "$NL_SFC_FULL_INIT"; then echo "sfc_full_init=${NL_SFC_FULL_INIT}," >> $FILE;fi
if test ! -z "$NL_SFC_LU_INDEX"; then echo "sfc_lu_index=${NL_SFC_LU_INDEX}," >> $FILE;fi		if test ! -z "$NL_SFC_LU_INDEX"; then echo "sfc_lu_index=${NL_SFC_LU_INDEX}," >> $FILE;fi
if test ! -z "$NL_SFC_TSK"; then echo "sfc_tsk=${NL_SFC_TSK}," >> $FILE;fi				if test ! -z "$NL_SFC_TSK"; then echo "sfc_tsk=${NL_SFC_TSK}," >> $FILE;fi
if test ! -z "$NL_SFC_TMN"; then echo "sfc_tmn=${NL_SFC_TMN}," >> $FILE;fi				if test ! -z "$NL_SFC_TMN"; then echo "sfc_tmn=${NL_SFC_TMN}," >> $FILE;fi
if test ! -z "$NL_FIRE_READ_LU"; then echo "fire_read_lu=${NL_FIRE_READ_LU}," >> $FILE;fi		if test ! -z "$NL_FIRE_READ_LU"; then echo "fire_read_lu=${NL_FIRE_READ_LU}," >> $FILE;fi
if test ! -z "$NL_FIRE_READ_TSK"; then echo "fire_read_tsk=${NL_FIRE_READ_TSK}," >> $FILE;fi		if test ! -z "$NL_FIRE_READ_TSK"; then echo "fire_read_tsk=${NL_FIRE_READ_TSK}," >> $FILE;fi
if test ! -z "$NL_FIRE_READ_TMN"; then echo "fire_read_tmn=${NL_FIRE_READ_TMN}," >> $FILE;fi		if test ! -z "$NL_FIRE_READ_TMN"; then echo "fire_read_tmn=${NL_FIRE_READ_TMN}," >> $FILE;fi
if test ! -z "$NL_FIRE_READ_ATM_HT"; then echo "fire_read_atm_ht=${NL_FIRE_READ_ATM_HT}," >> $FI	if test ! -z "$NL_FIRE_READ_ATM_HT"; then echo "fire_read_atm_ht=${NL_FIRE_READ_ATM_HT}," >> $FI
if test ! -z "$NL_FIRE_READ_FIRE_HT"; then echo "fire_read_fire_ht=${NL_FIRE_READ_FIRE_HT}," >> 	if test ! -z "$NL_FIRE_READ_FIRE_HT"; then echo "fire_read_fire_ht=${NL_FIRE_READ_FIRE_HT}," >> 
if test ! -z "$NL_FIRE_READ_ATM_GRAD"; then echo "fire_read_atm_grad=${NL_FIRE_READ_ATM_GRAD}," 	if test ! -z "$NL_FIRE_READ_ATM_GRAD"; then echo "fire_read_atm_grad=${NL_FIRE_READ_ATM_GRAD}," 
if test ! -z "$NL_FIRE_READ_FIRE_GRAD"; then echo "fire_read_fire_grad=${NL_FIRE_READ_FIRE_GRAD}	if test ! -z "$NL_FIRE_READ_FIRE_GRAD"; then echo "fire_read_fire_grad=${NL_FIRE_READ_FIRE_GRAD}
if test ! -z "$NL_SFC_VEGFRA"; then echo "sfc_vegfra=${NL_SFC_VEGFRA}," >> $FILE;fi			if test ! -z "$NL_SFC_VEGFRA"; then echo "sfc_vegfra=${NL_SFC_VEGFRA}," >> $FILE;fi
if test ! -z "$NL_SFC_CANWAT"; then echo "sfc_canwat=${NL_SFC_CANWAT}," >> $FILE;fi			if test ! -z "$NL_SFC_CANWAT"; then echo "sfc_canwat=${NL_SFC_CANWAT}," >> $FILE;fi
if test ! -z "$NL_SFC_IVGTYP"; then echo "sfc_ivgtyp=${NL_SFC_IVGTYP}," >> $FILE;fi			if test ! -z "$NL_SFC_IVGTYP"; then echo "sfc_ivgtyp=${NL_SFC_IVGTYP}," >> $FILE;fi
if test ! -z "$NL_SFC_ISLTYP"; then echo "sfc_isltyp=${NL_SFC_ISLTYP}," >> $FILE;fi			if test ! -z "$NL_SFC_ISLTYP"; then echo "sfc_isltyp=${NL_SFC_ISLTYP}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&stoch >> $FILE											echo \&stoch >> $FILE
if test ! -z "$NL_NENS"; then echo "nens=${NL_NENS}," >> $FILE;fi					if test ! -z "$NL_NENS"; then echo "nens=${NL_NENS}," >> $FILE;fi
if test ! -z "$NL_SKEBS"; then echo "skebs=${NL_SKEBS}," >> $FILE;fi					if test ! -z "$NL_SKEBS"; then echo "skebs=${NL_SKEBS}," >> $FILE;fi
if test ! -z "$NL_STOCH_FORCE_OPT"; then echo "stoch_force_opt=${NL_STOCH_FORCE_OPT}," >> $FILE;	if test ! -z "$NL_STOCH_FORCE_OPT"; then echo "stoch_force_opt=${NL_STOCH_FORCE_OPT}," >> $FILE;
if test ! -z "$NL_SKEBS_VERTSTRUC"; then echo "skebs_vertstruc=${NL_SKEBS_VERTSTRUC}," >> $FILE;	if test ! -z "$NL_SKEBS_VERTSTRUC"; then echo "skebs_vertstruc=${NL_SKEBS_VERTSTRUC}," >> $FILE;
if test ! -z "$NL_STOCH_VERTSTRUC_OPT"; then echo "stoch_vertstruc_opt=${NL_STOCH_VERTSTRUC_OPT}	if test ! -z "$NL_STOCH_VERTSTRUC_OPT"; then echo "stoch_vertstruc_opt=${NL_STOCH_VERTSTRUC_OPT}
if test ! -z "$NL_TOT_BACKSCAT_PSI"; then echo "tot_backscat_psi=${NL_TOT_BACKSCAT_PSI}," >> $FI	if test ! -z "$NL_TOT_BACKSCAT_PSI"; then echo "tot_backscat_psi=${NL_TOT_BACKSCAT_PSI}," >> $FI
if test ! -z "$NL_TOT_BACKSCAT_T"; then echo "tot_backscat_t=${NL_TOT_BACKSCAT_T}," >> $FILE;fi		if test ! -z "$NL_TOT_BACKSCAT_T"; then echo "tot_backscat_t=${NL_TOT_BACKSCAT_T}," >> $FILE;fi
if test ! -z "$NL_ZTAU_PSI"; then echo "ztau_psi=${NL_ZTAU_PSI}," >> $FILE;fi				if test ! -z "$NL_ZTAU_PSI"; then echo "ztau_psi=${NL_ZTAU_PSI}," >> $FILE;fi
if test ! -z "$NL_ZTAU_T"; then echo "ztau_t=${NL_ZTAU_T}," >> $FILE;fi					if test ! -z "$NL_ZTAU_T"; then echo "ztau_t=${NL_ZTAU_T}," >> $FILE;fi
if test ! -z "$NL_REXPONENT_PSI"; then echo "rexponent_psi=${NL_REXPONENT_PSI}," >> $FILE;fi		if test ! -z "$NL_REXPONENT_PSI"; then echo "rexponent_psi=${NL_REXPONENT_PSI}," >> $FILE;fi
if test ! -z "$NL_REXPONENT_T"; then echo "rexponent_t=${NL_REXPONENT_T}," >> $FILE;fi			if test ! -z "$NL_REXPONENT_T"; then echo "rexponent_t=${NL_REXPONENT_T}," >> $FILE;fi
if test ! -z "$NL_ZSIGMA2_EPS"; then echo "zsigma2_eps=${NL_ZSIGMA2_EPS}," >> $FILE;fi			if test ! -z "$NL_ZSIGMA2_EPS"; then echo "zsigma2_eps=${NL_ZSIGMA2_EPS}," >> $FILE;fi
if test ! -z "$NL_ZSIGMA2_ETA"; then echo "zsigma2_eta=${NL_ZSIGMA2_ETA}," >> $FILE;fi			if test ! -z "$NL_ZSIGMA2_ETA"; then echo "zsigma2_eta=${NL_ZSIGMA2_ETA}," >> $FILE;fi
if test ! -z "$NL_KMINFORC"; then echo "kminforc=${NL_KMINFORC}," >> $FILE;fi				if test ! -z "$NL_KMINFORC"; then echo "kminforc=${NL_KMINFORC}," >> $FILE;fi
if test ! -z "$NL_LMINFORC"; then echo "lminforc=${NL_LMINFORC}," >> $FILE;fi				if test ! -z "$NL_LMINFORC"; then echo "lminforc=${NL_LMINFORC}," >> $FILE;fi
if test ! -z "$NL_KMINFORCT"; then echo "kminforct=${NL_KMINFORCT}," >> $FILE;fi			if test ! -z "$NL_KMINFORCT"; then echo "kminforct=${NL_KMINFORCT}," >> $FILE;fi
if test ! -z "$NL_LMINFORCT"; then echo "lminforct=${NL_LMINFORCT}," >> $FILE;fi			if test ! -z "$NL_LMINFORCT"; then echo "lminforct=${NL_LMINFORCT}," >> $FILE;fi
if test ! -z "$NL_KMAXFORC"; then echo "kmaxforc=${NL_KMAXFORC}," >> $FILE;fi				if test ! -z "$NL_KMAXFORC"; then echo "kmaxforc=${NL_KMAXFORC}," >> $FILE;fi
if test ! -z "$NL_LMAXFORC"; then echo "lmaxforc=${NL_LMAXFORC}," >> $FILE;fi				if test ! -z "$NL_LMAXFORC"; then echo "lmaxforc=${NL_LMAXFORC}," >> $FILE;fi
if test ! -z "$NL_KMAXFORCT"; then echo "kmaxforct=${NL_KMAXFORCT}," >> $FILE;fi			if test ! -z "$NL_KMAXFORCT"; then echo "kmaxforct=${NL_KMAXFORCT}," >> $FILE;fi
if test ! -z "$NL_LMAXFORCT"; then echo "lmaxforct=${NL_LMAXFORCT}," >> $FILE;fi			if test ! -z "$NL_LMAXFORCT"; then echo "lmaxforct=${NL_LMAXFORCT}," >> $FILE;fi
if test ! -z "$NL_ISEED_SKEBS"; then echo "iseed_skebs=${NL_ISEED_SKEBS}," >> $FILE;fi			if test ! -z "$NL_ISEED_SKEBS"; then echo "iseed_skebs=${NL_ISEED_SKEBS}," >> $FILE;fi
if test ! -z "$NL_SPPT"; then echo "sppt=${NL_SPPT}," >> $FILE;fi					if test ! -z "$NL_SPPT"; then echo "sppt=${NL_SPPT}," >> $FILE;fi
if test ! -z "$NL_GRIDPT_STDDEV_SPPT"; then echo "gridpt_stddev_sppt=${NL_GRIDPT_STDDEV_SPPT}," 	if test ! -z "$NL_GRIDPT_STDDEV_SPPT"; then echo "gridpt_stddev_sppt=${NL_GRIDPT_STDDEV_SPPT}," 
if test ! -z "$NL_STDDEV_CUTOFF_SPPT"; then echo "stddev_cutoff_sppt=${NL_STDDEV_CUTOFF_SPPT}," 	if test ! -z "$NL_STDDEV_CUTOFF_SPPT"; then echo "stddev_cutoff_sppt=${NL_STDDEV_CUTOFF_SPPT}," 
if test ! -z "$NL_LENGTHSCALE_SPPT"; then echo "lengthscale_sppt=${NL_LENGTHSCALE_SPPT}," >> $FI	if test ! -z "$NL_LENGTHSCALE_SPPT"; then echo "lengthscale_sppt=${NL_LENGTHSCALE_SPPT}," >> $FI
if test ! -z "$NL_TIMESCALE_SPPT"; then echo "timescale_sppt=${NL_TIMESCALE_SPPT}," >> $FILE;fi		if test ! -z "$NL_TIMESCALE_SPPT"; then echo "timescale_sppt=${NL_TIMESCALE_SPPT}," >> $FILE;fi
if test ! -z "$NL_SPPT_VERTSTRUC"; then echo "sppt_vertstruc=${NL_SPPT_VERTSTRUC}," >> $FILE;fi		if test ! -z "$NL_SPPT_VERTSTRUC"; then echo "sppt_vertstruc=${NL_SPPT_VERTSTRUC}," >> $FILE;fi
if test ! -z "$NL_ISEED_SPPT"; then echo "iseed_sppt=${NL_ISEED_SPPT}," >> $FILE;fi			if test ! -z "$NL_ISEED_SPPT"; then echo "iseed_sppt=${NL_ISEED_SPPT}," >> $FILE;fi
if test ! -z "$NL_RAND_PERTURB"; then echo "rand_perturb=${NL_RAND_PERTURB}," >> $FILE;fi		if test ! -z "$NL_RAND_PERTURB"; then echo "rand_perturb=${NL_RAND_PERTURB}," >> $FILE;fi
if test ! -z "$NL_GRIDPT_STDDEV_RAND_PERT"; then echo "gridpt_stddev_rand_pert=${NL_GRIDPT_STDDE	if test ! -z "$NL_GRIDPT_STDDEV_RAND_PERT"; then echo "gridpt_stddev_rand_pert=${NL_GRIDPT_STDDE
if test ! -z "$NL_STDDEV_CUTOFF_RAND_PERT"; then echo "stddev_cutoff_rand_pert=${NL_STDDEV_CUTOF	if test ! -z "$NL_STDDEV_CUTOFF_RAND_PERT"; then echo "stddev_cutoff_rand_pert=${NL_STDDEV_CUTOF
if test ! -z "$NL_LENGTHSCALE_RAND_PERT"; then echo "lengthscale_rand_pert=${NL_LENGTHSCALE_RAND	if test ! -z "$NL_LENGTHSCALE_RAND_PERT"; then echo "lengthscale_rand_pert=${NL_LENGTHSCALE_RAND
if test ! -z "$NL_TIMESCALE_RAND_PERT"; then echo "timescale_rand_pert=${NL_TIMESCALE_RAND_PERT}	if test ! -z "$NL_TIMESCALE_RAND_PERT"; then echo "timescale_rand_pert=${NL_TIMESCALE_RAND_PERT}
if test ! -z "$NL_RAND_PERT_VERTSTRUC"; then echo "rand_pert_vertstruc=${NL_RAND_PERT_VERTSTRUC}	if test ! -z "$NL_RAND_PERT_VERTSTRUC"; then echo "rand_pert_vertstruc=${NL_RAND_PERT_VERTSTRUC}
if test ! -z "$NL_ISEED_RAND_PERT"; then echo "iseed_rand_pert=${NL_ISEED_RAND_PERT}," >> $FILE;	if test ! -z "$NL_ISEED_RAND_PERT"; then echo "iseed_rand_pert=${NL_ISEED_RAND_PERT}," >> $FILE;
if test ! -z "$NL_SPP"; then echo "spp=${NL_SPP}," >> $FILE;fi					   <
if test ! -z "$NL_HRRR_CYCLING"; then echo "hrrr_cycling=${NL_HRRR_CYCLING}," >> $FILE;fi	   <
if test ! -z "$NL_SPP_CONV"; then echo "spp_conv=${NL_SPP_CONV}," >> $FILE;fi			   <
if test ! -z "$NL_GRIDPT_STDDEV_SPP_CONV"; then echo "gridpt_stddev_spp_conv=${NL_GRIDPT_STDDEV_   <
if test ! -z "$NL_STDDEV_CUTOFF_SPP_CONV"; then echo "stddev_cutoff_spp_conv=${NL_STDDEV_CUTOFF_   <
if test ! -z "$NL_LENGTHSCALE_SPP_CONV"; then echo "lengthscale_spp_conv=${NL_LENGTHSCALE_SPP_CO   <
if test ! -z "$NL_TIMESCALE_SPP_CONV"; then echo "timescale_spp_conv=${NL_TIMESCALE_SPP_CONV},"    <
if test ! -z "$NL_VERTSTRUC_SPP_CONV"; then echo "vertstruc_spp_conv=${NL_VERTSTRUC_SPP_CONV},"    <
if test ! -z "$NL_ISEED_SPP_CONV"; then echo "iseed_spp_conv=${NL_ISEED_SPP_CONV}," >> $FILE;fi	   <
if test ! -z "$NL_SPP_PBL"; then echo "spp_pbl=${NL_SPP_PBL}," >> $FILE;fi			   <
if test ! -z "$NL_GRIDPT_STDDEV_SPP_PBL"; then echo "gridpt_stddev_spp_pbl=${NL_GRIDPT_STDDEV_SP   <
if test ! -z "$NL_STDDEV_CUTOFF_SPP_PBL"; then echo "stddev_cutoff_spp_pbl=${NL_STDDEV_CUTOFF_SP   <
if test ! -z "$NL_LENGTHSCALE_SPP_PBL"; then echo "lengthscale_spp_pbl=${NL_LENGTHSCALE_SPP_PBL}   <
if test ! -z "$NL_TIMESCALE_SPP_PBL"; then echo "timescale_spp_pbl=${NL_TIMESCALE_SPP_PBL}," >>    <
if test ! -z "$NL_VERTSTRUC_SPP_PBL"; then echo "vertstruc_spp_pbl=${NL_VERTSTRUC_SPP_PBL}," >>    <
if test ! -z "$NL_ISEED_SPP_PBL"; then echo "iseed_spp_pbl=${NL_ISEED_SPP_PBL}," >> $FILE;fi	   <
if test ! -z "$NL_SPP_LSM"; then echo "spp_lsm=${NL_SPP_LSM}," >> $FILE;fi			   <
if test ! -z "$NL_GRIDPT_STDDEV_SPP_LSM"; then echo "gridpt_stddev_spp_lsm=${NL_GRIDPT_STDDEV_SP   <
if test ! -z "$NL_STDDEV_CUTOFF_SPP_LSM"; then echo "stddev_cutoff_spp_lsm=${NL_STDDEV_CUTOFF_SP   <
if test ! -z "$NL_LENGTHSCALE_SPP_LSM"; then echo "lengthscale_spp_lsm=${NL_LENGTHSCALE_SPP_LSM}   <
if test ! -z "$NL_TIMESCALE_SPP_LSM"; then echo "timescale_spp_lsm=${NL_TIMESCALE_SPP_LSM}," >>    <
if test ! -z "$NL_VERTSTRUC_SPP_LSM"; then echo "vertstruc_spp_lsm=${NL_VERTSTRUC_SPP_LSM}," >>    <
if test ! -z "$NL_ISEED_SPP_LSM"; then echo "iseed_spp_lsm=${NL_ISEED_SPP_LSM}," >> $FILE;fi	   <
if test ! -z "$NL_PERTURB_BDY"; then echo "perturb_bdy=${NL_PERTURB_BDY}," >> $FILE;fi			if test ! -z "$NL_PERTURB_BDY"; then echo "perturb_bdy=${NL_PERTURB_BDY}," >> $FILE;fi
if test ! -z "$NL_PERTURB_CHEM_BDY"; then echo "perturb_chem_bdy=${NL_PERTURB_CHEM_BDY}," >> $FI	if test ! -z "$NL_PERTURB_CHEM_BDY"; then echo "perturb_chem_bdy=${NL_PERTURB_CHEM_BDY}," >> $FI
echo / >> $FILE												echo / >> $FILE
echo \&diags >> $FILE											echo \&diags >> $FILE
if test ! -z "$NL_P_LEV_DIAGS"; then echo "p_lev_diags=${NL_P_LEV_DIAGS}," >> $FILE;fi			if test ! -z "$NL_P_LEV_DIAGS"; then echo "p_lev_diags=${NL_P_LEV_DIAGS}," >> $FILE;fi
if test ! -z "$NL_P_LEV_DIAGS_DFI"; then echo "p_lev_diags_dfi=${NL_P_LEV_DIAGS_DFI}," >> $FILE;	if test ! -z "$NL_P_LEV_DIAGS_DFI"; then echo "p_lev_diags_dfi=${NL_P_LEV_DIAGS_DFI}," >> $FILE;
if test ! -z "$NL_NUM_PRESS_LEVELS"; then echo "num_press_levels=${NL_NUM_PRESS_LEVELS}," >> $FI	if test ! -z "$NL_NUM_PRESS_LEVELS"; then echo "num_press_levels=${NL_NUM_PRESS_LEVELS}," >> $FI
if test ! -z "$NL_PRESS_LEVELS"; then echo "press_levels=${NL_PRESS_LEVELS}," >> $FILE;fi		if test ! -z "$NL_PRESS_LEVELS"; then echo "press_levels=${NL_PRESS_LEVELS}," >> $FILE;fi
if test ! -z "$NL_USE_TOT_OR_HYD_P"; then echo "use_tot_or_hyd_p=${NL_USE_TOT_OR_HYD_P}," >> $FI	if test ! -z "$NL_USE_TOT_OR_HYD_P"; then echo "use_tot_or_hyd_p=${NL_USE_TOT_OR_HYD_P}," >> $FI
if test ! -z "$NL_EXTRAP_BELOW_GRND"; then echo "extrap_below_grnd=${NL_EXTRAP_BELOW_GRND}," >> 	if test ! -z "$NL_EXTRAP_BELOW_GRND"; then echo "extrap_below_grnd=${NL_EXTRAP_BELOW_GRND}," >> 
if test ! -z "$NL_P_LEV_MISSING"; then echo "p_lev_missing=${NL_P_LEV_MISSING}," >> $FILE;fi		if test ! -z "$NL_P_LEV_MISSING"; then echo "p_lev_missing=${NL_P_LEV_MISSING}," >> $FILE;fi
if test ! -z "$NL_Z_LEV_DIAGS"; then echo "z_lev_diags=${NL_Z_LEV_DIAGS}," >> $FILE;fi			if test ! -z "$NL_Z_LEV_DIAGS"; then echo "z_lev_diags=${NL_Z_LEV_DIAGS}," >> $FILE;fi
if test ! -z "$NL_Z_LEV_DIAGS_DFI"; then echo "z_lev_diags_dfi=${NL_Z_LEV_DIAGS_DFI}," >> $FILE;	if test ! -z "$NL_Z_LEV_DIAGS_DFI"; then echo "z_lev_diags_dfi=${NL_Z_LEV_DIAGS_DFI}," >> $FILE;
if test ! -z "$NL_NUM_Z_LEVELS"; then echo "num_z_levels=${NL_NUM_Z_LEVELS}," >> $FILE;fi		if test ! -z "$NL_NUM_Z_LEVELS"; then echo "num_z_levels=${NL_NUM_Z_LEVELS}," >> $FILE;fi
if test ! -z "$NL_Z_LEVELS"; then echo "z_levels=${NL_Z_LEVELS}," >> $FILE;fi				if test ! -z "$NL_Z_LEVELS"; then echo "z_levels=${NL_Z_LEVELS}," >> $FILE;fi
if test ! -z "$NL_Z_LEV_MISSING"; then echo "z_lev_missing=${NL_Z_LEV_MISSING}," >> $FILE;fi		if test ! -z "$NL_Z_LEV_MISSING"; then echo "z_lev_missing=${NL_Z_LEV_MISSING}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
echo \&afwa >> $FILE											echo \&afwa >> $FILE
if test ! -z "$NL_AFWA_DIAG_OPT"; then echo "afwa_diag_opt=${NL_AFWA_DIAG_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_DIAG_OPT"; then echo "afwa_diag_opt=${NL_AFWA_DIAG_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_PTYPE_OPT"; then echo "afwa_ptype_opt=${NL_AFWA_PTYPE_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_PTYPE_OPT"; then echo "afwa_ptype_opt=${NL_AFWA_PTYPE_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_VIL_OPT"; then echo "afwa_vil_opt=${NL_AFWA_VIL_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_VIL_OPT"; then echo "afwa_vil_opt=${NL_AFWA_VIL_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_RADAR_OPT"; then echo "afwa_radar_opt=${NL_AFWA_RADAR_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_RADAR_OPT"; then echo "afwa_radar_opt=${NL_AFWA_RADAR_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_SEVERE_OPT"; then echo "afwa_severe_opt=${NL_AFWA_SEVERE_OPT}," >> $FILE;	if test ! -z "$NL_AFWA_SEVERE_OPT"; then echo "afwa_severe_opt=${NL_AFWA_SEVERE_OPT}," >> $FILE;
if test ! -z "$NL_AFWA_ICING_OPT"; then echo "afwa_icing_opt=${NL_AFWA_ICING_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_ICING_OPT"; then echo "afwa_icing_opt=${NL_AFWA_ICING_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_VIS_OPT"; then echo "afwa_vis_opt=${NL_AFWA_VIS_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_VIS_OPT"; then echo "afwa_vis_opt=${NL_AFWA_VIS_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_CLOUD_OPT"; then echo "afwa_cloud_opt=${NL_AFWA_CLOUD_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_CLOUD_OPT"; then echo "afwa_cloud_opt=${NL_AFWA_CLOUD_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_THERM_OPT"; then echo "afwa_therm_opt=${NL_AFWA_THERM_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_THERM_OPT"; then echo "afwa_therm_opt=${NL_AFWA_THERM_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_TURB_OPT"; then echo "afwa_turb_opt=${NL_AFWA_TURB_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_TURB_OPT"; then echo "afwa_turb_opt=${NL_AFWA_TURB_OPT}," >> $FILE;fi
if test ! -z "$NL_AFWA_BUOY_OPT"; then echo "afwa_buoy_opt=${NL_AFWA_BUOY_OPT}," >> $FILE;fi		if test ! -z "$NL_AFWA_BUOY_OPT"; then echo "afwa_buoy_opt=${NL_AFWA_BUOY_OPT}," >> $FILE;fi
												   >	if test ! -z "$NL_AFWA_HAILCAST_OPT"; then echo "afwa_hailcast_opt=${NL_AFWA_HAILCAST_OPT}," >> 
if test ! -z "$NL_AFWA_PTYPE_CCN_TMP"; then echo "afwa_ptype_ccn_tmp=${NL_AFWA_PTYPE_CCN_TMP}," 	if test ! -z "$NL_AFWA_PTYPE_CCN_TMP"; then echo "afwa_ptype_ccn_tmp=${NL_AFWA_PTYPE_CCN_TMP}," 
if test ! -z "$NL_AFWA_PTYPE_TOT_MELT"; then echo "afwa_ptype_tot_melt=${NL_AFWA_PTYPE_TOT_MELT}	if test ! -z "$NL_AFWA_PTYPE_TOT_MELT"; then echo "afwa_ptype_tot_melt=${NL_AFWA_PTYPE_TOT_MELT}
if test ! -z "$NL_AFWA_BAD_DATA_CHECK"; then echo "afwa_bad_data_check=${NL_AFWA_BAD_DATA_CHECK}	if test ! -z "$NL_AFWA_BAD_DATA_CHECK"; then echo "afwa_bad_data_check=${NL_AFWA_BAD_DATA_CHECK}
echo / >> $FILE												echo / >> $FILE
echo \&namelist_quilt >> $FILE										echo \&namelist_quilt >> $FILE
if test ! -z "$NL_NIO_TASKS_PER_GROUP"; then echo "nio_tasks_per_group=${NL_NIO_TASKS_PER_GROUP}	if test ! -z "$NL_NIO_TASKS_PER_GROUP"; then echo "nio_tasks_per_group=${NL_NIO_TASKS_PER_GROUP}
if test ! -z "$NL_NIO_GROUPS"; then echo "nio_groups=${NL_NIO_GROUPS}," >> $FILE;fi			if test ! -z "$NL_NIO_GROUPS"; then echo "nio_groups=${NL_NIO_GROUPS}," >> $FILE;fi
echo / >> $FILE												echo / >> $FILE
>                                                 
>=================================================================================
>  inc/namelist_statements.inc
>=================================================================================
!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_statements.inc'						!STARTOFREGISTRYGENERATEDINCLUDE 'inc/namelist_statements.inc'
!													!
! WARNING This file is generated automatically by use_registry						! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.							! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.							! Do not edit.  Your changes to this file will be lost.
!													!
NAMELIST /time_control/ run_days									NAMELIST /time_control/ run_days
NAMELIST /time_control/ run_hours									NAMELIST /time_control/ run_hours
NAMELIST /time_control/ run_minutes									NAMELIST /time_control/ run_minutes
NAMELIST /time_control/ run_seconds									NAMELIST /time_control/ run_seconds
NAMELIST /time_control/ start_year									NAMELIST /time_control/ start_year
NAMELIST /time_control/ start_month									NAMELIST /time_control/ start_month
NAMELIST /time_control/ start_day									NAMELIST /time_control/ start_day
NAMELIST /time_control/ start_hour									NAMELIST /time_control/ start_hour
NAMELIST /time_control/ start_minute									NAMELIST /time_control/ start_minute
NAMELIST /time_control/ start_second									NAMELIST /time_control/ start_second
NAMELIST /time_control/ end_year									NAMELIST /time_control/ end_year
NAMELIST /time_control/ end_month									NAMELIST /time_control/ end_month
NAMELIST /time_control/ end_day										NAMELIST /time_control/ end_day
NAMELIST /time_control/ end_hour									NAMELIST /time_control/ end_hour
NAMELIST /time_control/ end_minute									NAMELIST /time_control/ end_minute
NAMELIST /time_control/ end_second									NAMELIST /time_control/ end_second
NAMELIST /time_control/ interval_seconds								NAMELIST /time_control/ interval_seconds
NAMELIST /time_control/ input_from_file									NAMELIST /time_control/ input_from_file
NAMELIST /time_control/ fine_input_stream								NAMELIST /time_control/ fine_input_stream
NAMELIST /time_control/ input_from_hires								NAMELIST /time_control/ input_from_hires
NAMELIST /time_control/ rsmas_data_path									NAMELIST /time_control/ rsmas_data_path
NAMELIST /time_control/ all_ic_times									NAMELIST /time_control/ all_ic_times
NAMELIST /time_control/ julyr										NAMELIST /time_control/ julyr
NAMELIST /time_control/ julday										NAMELIST /time_control/ julday
NAMELIST /time_control/ gmt										NAMELIST /time_control/ gmt
NAMELIST /time_control/ input_inname									NAMELIST /time_control/ input_inname
NAMELIST /time_control/ input_outname									NAMELIST /time_control/ input_outname
NAMELIST /time_control/ bdy_inname									NAMELIST /time_control/ bdy_inname
NAMELIST /time_control/ bdy_outname									NAMELIST /time_control/ bdy_outname
NAMELIST /time_control/ rst_inname									NAMELIST /time_control/ rst_inname
NAMELIST /time_control/ rst_outname									NAMELIST /time_control/ rst_outname
NAMELIST /time_control/ write_input									NAMELIST /time_control/ write_input
NAMELIST /time_control/ write_restart_at_0h								NAMELIST /time_control/ write_restart_at_0h
NAMELIST /time_control/ write_hist_at_0h_rst								NAMELIST /time_control/ write_hist_at_0h_rst
NAMELIST /time_control/ adjust_output_times								NAMELIST /time_control/ adjust_output_times
NAMELIST /time_control/ adjust_input_times								NAMELIST /time_control/ adjust_input_times
NAMELIST /time_control/ diag_print									NAMELIST /time_control/ diag_print
NAMELIST /time_control/ nocolons									NAMELIST /time_control/ nocolons
NAMELIST /time_control/ cycling										NAMELIST /time_control/ cycling
NAMELIST /time_control/ output_diagnostics								NAMELIST /time_control/ output_diagnostics
NAMELIST /time_control/ nwp_diagnostics									NAMELIST /time_control/ nwp_diagnostics
NAMELIST /time_control/ output_ready_flag								NAMELIST /time_control/ output_ready_flag
NAMELIST /pio_control/ usepio										NAMELIST /pio_control/ usepio
NAMELIST /pio_control/ pioprocs										NAMELIST /pio_control/ pioprocs
NAMELIST /pio_control/ piostart										NAMELIST /pio_control/ piostart
NAMELIST /pio_control/ piostride									NAMELIST /pio_control/ piostride
NAMELIST /pio_control/ pioshift										NAMELIST /pio_control/ pioshift
NAMELIST /dfi_control/ dfi_opt										NAMELIST /dfi_control/ dfi_opt
NAMELIST /dfi_control/ dfi_savehydmeteors								NAMELIST /dfi_control/ dfi_savehydmeteors
NAMELIST /dfi_control/ dfi_nfilter									NAMELIST /dfi_control/ dfi_nfilter
NAMELIST /dfi_control/ dfi_write_filtered_input								NAMELIST /dfi_control/ dfi_write_filtered_input
NAMELIST /dfi_control/ dfi_write_dfi_history								NAMELIST /dfi_control/ dfi_write_dfi_history
NAMELIST /dfi_control/ dfi_cutoff_seconds								NAMELIST /dfi_control/ dfi_cutoff_seconds
NAMELIST /dfi_control/ dfi_time_dim									NAMELIST /dfi_control/ dfi_time_dim
NAMELIST /dfi_control/ dfi_fwdstop_year									NAMELIST /dfi_control/ dfi_fwdstop_year
NAMELIST /dfi_control/ dfi_fwdstop_month								NAMELIST /dfi_control/ dfi_fwdstop_month
NAMELIST /dfi_control/ dfi_fwdstop_day									NAMELIST /dfi_control/ dfi_fwdstop_day
NAMELIST /dfi_control/ dfi_fwdstop_hour									NAMELIST /dfi_control/ dfi_fwdstop_hour
NAMELIST /dfi_control/ dfi_fwdstop_minute								NAMELIST /dfi_control/ dfi_fwdstop_minute
NAMELIST /dfi_control/ dfi_fwdstop_second								NAMELIST /dfi_control/ dfi_fwdstop_second
NAMELIST /dfi_control/ dfi_bckstop_year									NAMELIST /dfi_control/ dfi_bckstop_year
NAMELIST /dfi_control/ dfi_bckstop_month								NAMELIST /dfi_control/ dfi_bckstop_month
NAMELIST /dfi_control/ dfi_bckstop_day									NAMELIST /dfi_control/ dfi_bckstop_day
NAMELIST /dfi_control/ dfi_bckstop_hour									NAMELIST /dfi_control/ dfi_bckstop_hour
NAMELIST /dfi_control/ dfi_bckstop_minute								NAMELIST /dfi_control/ dfi_bckstop_minute
NAMELIST /dfi_control/ dfi_bckstop_second								NAMELIST /dfi_control/ dfi_bckstop_second
NAMELIST /domains/ time_step										NAMELIST /domains/ time_step
NAMELIST /domains/ time_step_fract_num									NAMELIST /domains/ time_step_fract_num
NAMELIST /domains/ time_step_fract_den									NAMELIST /domains/ time_step_fract_den
NAMELIST /domains/ time_step_dfi									NAMELIST /domains/ time_step_dfi
NAMELIST /domains/ min_time_step									NAMELIST /domains/ min_time_step
NAMELIST /domains/ min_time_step_den									NAMELIST /domains/ min_time_step_den
NAMELIST /domains/ max_time_step									NAMELIST /domains/ max_time_step
NAMELIST /domains/ max_time_step_den									NAMELIST /domains/ max_time_step_den
NAMELIST /domains/ target_cfl										NAMELIST /domains/ target_cfl
NAMELIST /domains/ target_hcfl										NAMELIST /domains/ target_hcfl
NAMELIST /domains/ max_step_increase_pct								NAMELIST /domains/ max_step_increase_pct
NAMELIST /domains/ starting_time_step									NAMELIST /domains/ starting_time_step
NAMELIST /domains/ starting_time_step_den								NAMELIST /domains/ starting_time_step_den
NAMELIST /domains/ step_to_output_time									NAMELIST /domains/ step_to_output_time
NAMELIST /domains/ adaptation_domain									NAMELIST /domains/ adaptation_domain
NAMELIST /domains/ use_adaptive_time_step								NAMELIST /domains/ use_adaptive_time_step
NAMELIST /domains/ use_adaptive_time_step_dfi								NAMELIST /domains/ use_adaptive_time_step_dfi
NAMELIST /domains/ max_dom										NAMELIST /domains/ max_dom
NAMELIST /domains/ lats_to_mic										NAMELIST /domains/ lats_to_mic
NAMELIST /domains/ s_we											NAMELIST /domains/ s_we
NAMELIST /domains/ e_we											NAMELIST /domains/ e_we
NAMELIST /domains/ s_sn											NAMELIST /domains/ s_sn
NAMELIST /domains/ e_sn											NAMELIST /domains/ e_sn
NAMELIST /domains/ s_vert										NAMELIST /domains/ s_vert
NAMELIST /domains/ e_vert										NAMELIST /domains/ e_vert
NAMELIST /domains/ num_metgrid_levels									NAMELIST /domains/ num_metgrid_levels
NAMELIST /domains/ num_metgrid_soil_levels								NAMELIST /domains/ num_metgrid_soil_levels
NAMELIST /domains/ p_top_requested									NAMELIST /domains/ p_top_requested
NAMELIST /domains/ interp_theta										NAMELIST /domains/ interp_theta
NAMELIST /domains/ interp_type										NAMELIST /domains/ interp_type
NAMELIST /domains/ rebalance									   <
NAMELIST /domains/ vert_refine_method									NAMELIST /domains/ vert_refine_method
NAMELIST /domains/ vert_refine_fact									NAMELIST /domains/ vert_refine_fact
NAMELIST /domains/ extrap_type										NAMELIST /domains/ extrap_type
NAMELIST /domains/ t_extrap_type									NAMELIST /domains/ t_extrap_type
NAMELIST /domains/ hypsometric_opt									NAMELIST /domains/ hypsometric_opt
NAMELIST /domains/ lowest_lev_from_sfc									NAMELIST /domains/ lowest_lev_from_sfc
NAMELIST /domains/ use_levels_below_ground								NAMELIST /domains/ use_levels_below_ground
NAMELIST /domains/ use_tavg_for_tsk									NAMELIST /domains/ use_tavg_for_tsk
NAMELIST /domains/ use_surface										NAMELIST /domains/ use_surface
NAMELIST /domains/ lagrange_order									NAMELIST /domains/ lagrange_order
NAMELIST /domains/ force_sfc_in_vinterp									NAMELIST /domains/ force_sfc_in_vinterp
NAMELIST /domains/ zap_close_levels									NAMELIST /domains/ zap_close_levels
NAMELIST /domains/ maxw_horiz_pres_diff									NAMELIST /domains/ maxw_horiz_pres_diff
NAMELIST /domains/ trop_horiz_pres_diff									NAMELIST /domains/ trop_horiz_pres_diff
NAMELIST /domains/ maxw_above_this_level								NAMELIST /domains/ maxw_above_this_level
NAMELIST /domains/ use_maxw_level									NAMELIST /domains/ use_maxw_level
NAMELIST /domains/ use_trop_level									NAMELIST /domains/ use_trop_level
NAMELIST /domains/ sfcp_to_sfcp										NAMELIST /domains/ sfcp_to_sfcp
NAMELIST /domains/ adjust_heights									NAMELIST /domains/ adjust_heights
NAMELIST /domains/ smooth_cg_topo									NAMELIST /domains/ smooth_cg_topo
NAMELIST /domains/ nest_interp_coord									NAMELIST /domains/ nest_interp_coord
NAMELIST /domains/ interp_method_type									NAMELIST /domains/ interp_method_type
NAMELIST /domains/ aggregate_lu										NAMELIST /domains/ aggregate_lu
NAMELIST /domains/ rh2qv_wrt_liquid									NAMELIST /domains/ rh2qv_wrt_liquid
NAMELIST /domains/ rh2qv_method										NAMELIST /domains/ rh2qv_method
NAMELIST /domains/ qv_max_p_safe									NAMELIST /domains/ qv_max_p_safe
NAMELIST /domains/ qv_max_flag										NAMELIST /domains/ qv_max_flag
NAMELIST /domains/ qv_max_value										NAMELIST /domains/ qv_max_value
NAMELIST /domains/ qv_min_p_safe									NAMELIST /domains/ qv_min_p_safe
NAMELIST /domains/ qv_min_flag										NAMELIST /domains/ qv_min_flag
NAMELIST /domains/ qv_min_value										NAMELIST /domains/ qv_min_value
NAMELIST /domains/ ideal_init_method								   <
NAMELIST /domains/ dx											NAMELIST /domains/ dx
NAMELIST /domains/ dy											NAMELIST /domains/ dy
NAMELIST /domains/ grid_id										NAMELIST /domains/ grid_id
NAMELIST /domains/ grid_allowed										NAMELIST /domains/ grid_allowed
NAMELIST /domains/ parent_id										NAMELIST /domains/ parent_id
NAMELIST /domains/ i_parent_start									NAMELIST /domains/ i_parent_start
NAMELIST /domains/ j_parent_start									NAMELIST /domains/ j_parent_start
NAMELIST /domains/ parent_grid_ratio									NAMELIST /domains/ parent_grid_ratio
NAMELIST /domains/ parent_time_step_ratio								NAMELIST /domains/ parent_time_step_ratio
NAMELIST /domains/ feedback										NAMELIST /domains/ feedback
NAMELIST /domains/ smooth_option									NAMELIST /domains/ smooth_option
NAMELIST /domains/ blend_width										NAMELIST /domains/ blend_width
NAMELIST /domains/ ztop											NAMELIST /domains/ ztop
NAMELIST /domains/ moad_grid_ratio									NAMELIST /domains/ moad_grid_ratio
NAMELIST /domains/ moad_time_step_ratio									NAMELIST /domains/ moad_time_step_ratio
NAMELIST /domains/ shw											NAMELIST /domains/ shw
NAMELIST /domains/ tile_sz_x										NAMELIST /domains/ tile_sz_x
NAMELIST /domains/ tile_sz_y										NAMELIST /domains/ tile_sz_y
NAMELIST /domains/ numtiles										NAMELIST /domains/ numtiles
NAMELIST /domains/ numtiles_inc										NAMELIST /domains/ numtiles_inc
NAMELIST /domains/ numtiles_x										NAMELIST /domains/ numtiles_x
NAMELIST /domains/ numtiles_y										NAMELIST /domains/ numtiles_y
NAMELIST /domains/ tile_strategy									NAMELIST /domains/ tile_strategy
NAMELIST /domains/ nproc_x										NAMELIST /domains/ nproc_x
NAMELIST /domains/ nproc_y										NAMELIST /domains/ nproc_y
NAMELIST /domains/ irand										NAMELIST /domains/ irand
NAMELIST /domains/ num_moves										NAMELIST /domains/ num_moves
NAMELIST /domains/ ts_buf_size										NAMELIST /domains/ ts_buf_size
NAMELIST /domains/ max_ts_locs										NAMELIST /domains/ max_ts_locs
NAMELIST /domains/ vortex_interval									NAMELIST /domains/ vortex_interval
NAMELIST /domains/ max_vortex_speed									NAMELIST /domains/ max_vortex_speed
NAMELIST /domains/ corral_dist										NAMELIST /domains/ corral_dist
NAMELIST /domains/ track_level										NAMELIST /domains/ track_level
NAMELIST /domains/ time_to_move										NAMELIST /domains/ time_to_move
NAMELIST /domains/ move_id										NAMELIST /domains/ move_id
NAMELIST /domains/ move_interval									NAMELIST /domains/ move_interval
NAMELIST /domains/ move_cd_x										NAMELIST /domains/ move_cd_x
NAMELIST /domains/ move_cd_y										NAMELIST /domains/ move_cd_y
NAMELIST /domains/ swap_x										NAMELIST /domains/ swap_x
NAMELIST /domains/ swap_y										NAMELIST /domains/ swap_y
NAMELIST /domains/ cycle_x										NAMELIST /domains/ cycle_x
NAMELIST /domains/ cycle_y										NAMELIST /domains/ cycle_y
NAMELIST /domains/ reorder_mesh										NAMELIST /domains/ reorder_mesh
NAMELIST /domains/ perturb_input									NAMELIST /domains/ perturb_input
NAMELIST /domains/ eta_levels										NAMELIST /domains/ eta_levels
NAMELIST /domains/ max_dz										NAMELIST /domains/ max_dz
NAMELIST /domains/ ocean_levels										NAMELIST /domains/ ocean_levels
NAMELIST /domains/ ocean_z										NAMELIST /domains/ ocean_z
NAMELIST /domains/ ocean_t										NAMELIST /domains/ ocean_t
NAMELIST /domains/ ocean_s										NAMELIST /domains/ ocean_s
NAMELIST /domains/ num_traj										NAMELIST /domains/ num_traj
NAMELIST /domains/ chm_sections										NAMELIST /domains/ chm_sections
NAMELIST /domains/ max_ts_level										NAMELIST /domains/ max_ts_level
NAMELIST /domains/ track_loc_in										NAMELIST /domains/ track_loc_in
NAMELIST /domains/ num_ext_model_couple_dom								NAMELIST /domains/ num_ext_model_couple_dom
NAMELIST /tc/ insert_bogus_storm									NAMELIST /tc/ insert_bogus_storm
NAMELIST /tc/ remove_storm										NAMELIST /tc/ remove_storm
NAMELIST /tc/ num_storm											NAMELIST /tc/ num_storm
NAMELIST /tc/ latc_loc											NAMELIST /tc/ latc_loc
NAMELIST /tc/ lonc_loc											NAMELIST /tc/ lonc_loc
NAMELIST /tc/ vmax_meters_per_second									NAMELIST /tc/ vmax_meters_per_second
NAMELIST /tc/ rmax											NAMELIST /tc/ rmax
NAMELIST /tc/ vmax_ratio										NAMELIST /tc/ vmax_ratio
NAMELIST /tc/ rankine_lid										NAMELIST /tc/ rankine_lid
NAMELIST /physics/ physics_suite								   <
NAMELIST /physics/ force_read_thompson									NAMELIST /physics/ force_read_thompson
NAMELIST /physics/ write_thompson_tables								NAMELIST /physics/ write_thompson_tables
NAMELIST /physics/ mp_physics										NAMELIST /physics/ mp_physics
NAMELIST /physics/ nssl_cccn										NAMELIST /physics/ nssl_cccn
NAMELIST /physics/ nssl_alphah										NAMELIST /physics/ nssl_alphah
NAMELIST /physics/ nssl_alphahl										NAMELIST /physics/ nssl_alphahl
NAMELIST /physics/ nssl_cnoh										NAMELIST /physics/ nssl_cnoh
NAMELIST /physics/ nssl_cnohl										NAMELIST /physics/ nssl_cnohl
NAMELIST /physics/ nssl_cnor										NAMELIST /physics/ nssl_cnor
NAMELIST /physics/ nssl_cnos										NAMELIST /physics/ nssl_cnos
NAMELIST /physics/ nssl_rho_qh										NAMELIST /physics/ nssl_rho_qh
NAMELIST /physics/ nssl_rho_qhl										NAMELIST /physics/ nssl_rho_qhl
NAMELIST /physics/ nssl_rho_qs										NAMELIST /physics/ nssl_rho_qs
NAMELIST /physics/ nudge_lightning								   <
NAMELIST /physics/ nudge_light_times								   <
NAMELIST /physics/ nudge_light_timee								   <
NAMELIST /physics/ nudge_light_int								   <
NAMELIST /physics/ path_to_files								   <
NAMELIST /physics/ gsfcgce_hail										NAMELIST /physics/ gsfcgce_hail
NAMELIST /physics/ gsfcgce_2ice										NAMELIST /physics/ gsfcgce_2ice
NAMELIST /physics/ progn										NAMELIST /physics/ progn
NAMELIST /physics/ accum_mode										NAMELIST /physics/ accum_mode
NAMELIST /physics/ aitken_mode										NAMELIST /physics/ aitken_mode
NAMELIST /physics/ coarse_mode										NAMELIST /physics/ coarse_mode
NAMELIST /physics/ do_radar_ref										NAMELIST /physics/ do_radar_ref
NAMELIST /physics/ ra_lw_physics									NAMELIST /physics/ ra_lw_physics
NAMELIST /physics/ ra_sw_physics									NAMELIST /physics/ ra_sw_physics
NAMELIST /physics/ radt											NAMELIST /physics/ radt
NAMELIST /physics/ naer											NAMELIST /physics/ naer
NAMELIST /physics/ sf_sfclay_physics									NAMELIST /physics/ sf_sfclay_physics
NAMELIST /physics/ sf_surface_physics									NAMELIST /physics/ sf_surface_physics
NAMELIST /physics/ bl_pbl_physics									NAMELIST /physics/ bl_pbl_physics
NAMELIST /physics/ bl_mynn_tkebudget									NAMELIST /physics/ bl_mynn_tkebudget
NAMELIST /physics/ ysu_topdown_pblmix									NAMELIST /physics/ ysu_topdown_pblmix
NAMELIST /physics/ shinhong_tke_diag									NAMELIST /physics/ shinhong_tke_diag
NAMELIST /physics/ bl_mynn_tkeadvect									NAMELIST /physics/ bl_mynn_tkeadvect
NAMELIST /physics/ bl_mynn_cloudpdf									NAMELIST /physics/ bl_mynn_cloudpdf
NAMELIST /physics/ bl_mynn_mixlength								   <
NAMELIST /physics/ bl_mynn_edmf									   <
NAMELIST /physics/ bl_mynn_edmf_mom								   <
NAMELIST /physics/ bl_mynn_edmf_tke								   <
NAMELIST /physics/ bl_mynn_edmf_part								   <
NAMELIST /physics/ bl_mynn_cloudmix								   <
NAMELIST /physics/ bl_mynn_mixqt								   <
NAMELIST /physics/ icloud_bl									   <
NAMELIST /physics/ mfshconv										NAMELIST /physics/ mfshconv
NAMELIST /physics/ sf_urban_physics									NAMELIST /physics/ sf_urban_physics
NAMELIST /physics/ bldt											NAMELIST /physics/ bldt
NAMELIST /physics/ cu_physics										NAMELIST /physics/ cu_physics
NAMELIST /physics/ shcu_physics										NAMELIST /physics/ shcu_physics
NAMELIST /physics/ cu_diag										NAMELIST /physics/ cu_diag
NAMELIST /physics/ kf_edrates									   <
NAMELIST /physics/ kfeta_trigger									NAMELIST /physics/ kfeta_trigger
NAMELIST /physics/ nsas_dx_factor									NAMELIST /physics/ nsas_dx_factor
NAMELIST /physics/ cudt											NAMELIST /physics/ cudt
NAMELIST /physics/ gsmdt										NAMELIST /physics/ gsmdt
NAMELIST /physics/ isfflx										NAMELIST /physics/ isfflx
NAMELIST /physics/ ifsnow										NAMELIST /physics/ ifsnow
NAMELIST /physics/ icloud										NAMELIST /physics/ icloud
NAMELIST /physics/ ideal_xland										NAMELIST /physics/ ideal_xland
NAMELIST /physics/ swrad_scat										NAMELIST /physics/ swrad_scat
NAMELIST /physics/ surface_input_source									NAMELIST /physics/ surface_input_source
NAMELIST /physics/ num_soil_layers									NAMELIST /physics/ num_soil_layers
NAMELIST /physics/ maxpatch										NAMELIST /physics/ maxpatch
NAMELIST /physics/ num_snow_layers									NAMELIST /physics/ num_snow_layers
NAMELIST /physics/ num_snso_layers									NAMELIST /physics/ num_snso_layers
NAMELIST /physics/ num_urban_layers									NAMELIST /physics/ num_urban_layers
NAMELIST /physics/ num_urban_hi										NAMELIST /physics/ num_urban_hi
NAMELIST /physics/ num_months										NAMELIST /physics/ num_months
NAMELIST /physics/ sf_surface_mosaic									NAMELIST /physics/ sf_surface_mosaic
NAMELIST /physics/ mosaic_cat										NAMELIST /physics/ mosaic_cat
NAMELIST /physics/ mosaic_lu										NAMELIST /physics/ mosaic_lu
NAMELIST /physics/ mosaic_soil										NAMELIST /physics/ mosaic_soil
NAMELIST /physics/ maxiens										NAMELIST /physics/ maxiens
NAMELIST /physics/ maxens										NAMELIST /physics/ maxens
NAMELIST /physics/ maxens2										NAMELIST /physics/ maxens2
NAMELIST /physics/ maxens3										NAMELIST /physics/ maxens3
NAMELIST /physics/ ensdim										NAMELIST /physics/ ensdim
NAMELIST /physics/ cugd_avedx										NAMELIST /physics/ cugd_avedx
NAMELIST /physics/ clos_choice										NAMELIST /physics/ clos_choice
NAMELIST /physics/ imomentum										NAMELIST /physics/ imomentum
NAMELIST /physics/ ishallow										NAMELIST /physics/ ishallow
NAMELIST /physics/ convtrans_avglen_m									NAMELIST /physics/ convtrans_avglen_m
NAMELIST /physics/ num_land_cat										NAMELIST /physics/ num_land_cat
NAMELIST /physics/ num_soil_cat										NAMELIST /physics/ num_soil_cat
NAMELIST /physics/ mp_zero_out										NAMELIST /physics/ mp_zero_out
NAMELIST /physics/ mp_zero_out_thresh									NAMELIST /physics/ mp_zero_out_thresh
NAMELIST /physics/ seaice_threshold									NAMELIST /physics/ seaice_threshold
NAMELIST /physics/ sst_update										NAMELIST /physics/ sst_update
NAMELIST /physics/ sst_skin										NAMELIST /physics/ sst_skin
NAMELIST /physics/ tmn_update										NAMELIST /physics/ tmn_update
NAMELIST /physics/ usemonalb										NAMELIST /physics/ usemonalb
NAMELIST /physics/ rdmaxalb										NAMELIST /physics/ rdmaxalb
NAMELIST /physics/ rdlai2d										NAMELIST /physics/ rdlai2d
NAMELIST /physics/ ua_phys										NAMELIST /physics/ ua_phys
NAMELIST /physics/ opt_thcnd									   <
NAMELIST /physics/ co2tf										NAMELIST /physics/ co2tf
NAMELIST /physics/ ra_call_offset									NAMELIST /physics/ ra_call_offset
NAMELIST /physics/ cam_abs_freq_s									NAMELIST /physics/ cam_abs_freq_s
NAMELIST /physics/ levsiz										NAMELIST /physics/ levsiz
NAMELIST /physics/ paerlev										NAMELIST /physics/ paerlev
NAMELIST /physics/ cam_abs_dim1										NAMELIST /physics/ cam_abs_dim1
NAMELIST /physics/ cam_abs_dim2										NAMELIST /physics/ cam_abs_dim2
NAMELIST /physics/ lagday										NAMELIST /physics/ lagday
NAMELIST /physics/ no_src_types										NAMELIST /physics/ no_src_types
NAMELIST /physics/ alevsiz										NAMELIST /physics/ alevsiz
NAMELIST /physics/ o3input										NAMELIST /physics/ o3input
NAMELIST /physics/ aer_opt										NAMELIST /physics/ aer_opt
NAMELIST /physics/ swint_opt										NAMELIST /physics/ swint_opt
NAMELIST /physics/ aer_type										NAMELIST /physics/ aer_type
NAMELIST /physics/ aer_aod550_opt									NAMELIST /physics/ aer_aod550_opt
NAMELIST /physics/ aer_angexp_opt									NAMELIST /physics/ aer_angexp_opt
NAMELIST /physics/ aer_ssa_opt										NAMELIST /physics/ aer_ssa_opt
NAMELIST /physics/ aer_asy_opt										NAMELIST /physics/ aer_asy_opt
NAMELIST /physics/ aer_aod550_val									NAMELIST /physics/ aer_aod550_val
NAMELIST /physics/ aer_angexp_val									NAMELIST /physics/ aer_angexp_val
NAMELIST /physics/ aer_ssa_val										NAMELIST /physics/ aer_ssa_val
NAMELIST /physics/ aer_asy_val										NAMELIST /physics/ aer_asy_val
NAMELIST /physics/ cu_rad_feedback									NAMELIST /physics/ cu_rad_feedback
NAMELIST /physics/ shallowcu_forced_ra									NAMELIST /physics/ shallowcu_forced_ra
NAMELIST /physics/ numbins										NAMELIST /physics/ numbins
NAMELIST /physics/ thbinsize										NAMELIST /physics/ thbinsize
NAMELIST /physics/ rbinsize										NAMELIST /physics/ rbinsize
NAMELIST /physics/ mindeepfreq										NAMELIST /physics/ mindeepfreq
NAMELIST /physics/ minshallowfreq									NAMELIST /physics/ minshallowfreq
NAMELIST /physics/ shcu_aerosols_opt									NAMELIST /physics/ shcu_aerosols_opt
NAMELIST /physics/ pxlsm_smois_init									NAMELIST /physics/ pxlsm_smois_init
NAMELIST /physics/ omlcall										NAMELIST /physics/ omlcall
NAMELIST /physics/ sf_ocean_physics									NAMELIST /physics/ sf_ocean_physics
NAMELIST /physics/ traj_opt										NAMELIST /physics/ traj_opt
NAMELIST /physics/ dm_has_traj									   <
NAMELIST /physics/ tracercall										NAMELIST /physics/ tracercall
NAMELIST /physics/ omdt											NAMELIST /physics/ omdt
NAMELIST /physics/ oml_hml0										NAMELIST /physics/ oml_hml0
NAMELIST /physics/ oml_gamma										NAMELIST /physics/ oml_gamma
NAMELIST /physics/ oml_relaxation_time								   <
NAMELIST /physics/ isftcflx										NAMELIST /physics/ isftcflx
NAMELIST /physics/ iz0tlnd										NAMELIST /physics/ iz0tlnd
NAMELIST /physics/ shadlen										NAMELIST /physics/ shadlen
NAMELIST /physics/ slope_rad										NAMELIST /physics/ slope_rad
NAMELIST /physics/ topo_shading										NAMELIST /physics/ topo_shading
NAMELIST /physics/ topo_wind										NAMELIST /physics/ topo_wind
NAMELIST /physics/ no_mp_heating									NAMELIST /physics/ no_mp_heating
NAMELIST /physics/ fractional_seaice									NAMELIST /physics/ fractional_seaice
NAMELIST /physics/ seaice_snowdepth_opt									NAMELIST /physics/ seaice_snowdepth_opt
NAMELIST /physics/ seaice_snowdepth_max									NAMELIST /physics/ seaice_snowdepth_max
NAMELIST /physics/ seaice_snowdepth_min									NAMELIST /physics/ seaice_snowdepth_min
NAMELIST /physics/ seaice_albedo_opt									NAMELIST /physics/ seaice_albedo_opt
NAMELIST /physics/ seaice_albedo_default								NAMELIST /physics/ seaice_albedo_default
NAMELIST /physics/ seaice_thickness_opt									NAMELIST /physics/ seaice_thickness_opt
NAMELIST /physics/ seaice_thickness_default								NAMELIST /physics/ seaice_thickness_default
NAMELIST /physics/ tice2tsk_if2cold									NAMELIST /physics/ tice2tsk_if2cold
NAMELIST /physics/ bucket_mm										NAMELIST /physics/ bucket_mm
NAMELIST /physics/ bucket_j										NAMELIST /physics/ bucket_j
NAMELIST /physics/ mp_tend_lim										NAMELIST /physics/ mp_tend_lim
NAMELIST /physics/ prec_acc_dt										NAMELIST /physics/ prec_acc_dt
NAMELIST /physics/ grav_settling									NAMELIST /physics/ grav_settling
NAMELIST /physics/ sas_pgcon										NAMELIST /physics/ sas_pgcon
NAMELIST /physics/ scalar_pblmix									NAMELIST /physics/ scalar_pblmix
NAMELIST /physics/ tracer_pblmix									NAMELIST /physics/ tracer_pblmix
NAMELIST /physics/ use_aero_icbc									NAMELIST /physics/ use_aero_icbc
NAMELIST /physics/ use_rap_aero_icbc									NAMELIST /physics/ use_rap_aero_icbc
NAMELIST /physics/ use_mp_re									   <
NAMELIST /physics/ direct_feed_chimere									NAMELIST /physics/ direct_feed_chimere
NAMELIST /physics/ indirect_feed_chimere								NAMELIST /physics/ indirect_feed_chimere
NAMELIST /physics/ n_bin										NAMELIST /physics/ n_bin
NAMELIST /physics/ ccn_conc										NAMELIST /physics/ ccn_conc
NAMELIST /physics/ hail_opt										NAMELIST /physics/ hail_opt
NAMELIST /noah_mp/ dveg											NAMELIST /noah_mp/ dveg
NAMELIST /noah_mp/ opt_crs										NAMELIST /noah_mp/ opt_crs
NAMELIST /noah_mp/ opt_btr										NAMELIST /noah_mp/ opt_btr
NAMELIST /noah_mp/ opt_run										NAMELIST /noah_mp/ opt_run
NAMELIST /noah_mp/ opt_sfc										NAMELIST /noah_mp/ opt_sfc
NAMELIST /noah_mp/ opt_frz										NAMELIST /noah_mp/ opt_frz
NAMELIST /noah_mp/ opt_inf										NAMELIST /noah_mp/ opt_inf
NAMELIST /noah_mp/ opt_rad										NAMELIST /noah_mp/ opt_rad
NAMELIST /noah_mp/ opt_alb										NAMELIST /noah_mp/ opt_alb
NAMELIST /noah_mp/ opt_snf										NAMELIST /noah_mp/ opt_snf
NAMELIST /noah_mp/ opt_tbot										NAMELIST /noah_mp/ opt_tbot
NAMELIST /noah_mp/ opt_stc										NAMELIST /noah_mp/ opt_stc
NAMELIST /noah_mp/ opt_gla									   <
NAMELIST /noah_mp/ opt_rsf									   <
NAMELIST /physics/ wtddt										NAMELIST /physics/ wtddt
NAMELIST /fdda/ fgdt											NAMELIST /fdda/ fgdt
NAMELIST /fdda/ fgdtzero										NAMELIST /fdda/ fgdtzero
NAMELIST /fdda/ grid_fdda										NAMELIST /fdda/ grid_fdda
NAMELIST /fdda/ grid_sfdda										NAMELIST /fdda/ grid_sfdda
NAMELIST /fdda/ if_no_pbl_nudging_uv									NAMELIST /fdda/ if_no_pbl_nudging_uv
NAMELIST /fdda/ if_no_pbl_nudging_t									NAMELIST /fdda/ if_no_pbl_nudging_t
NAMELIST /fdda/ if_no_pbl_nudging_ph									NAMELIST /fdda/ if_no_pbl_nudging_ph
NAMELIST /fdda/ if_no_pbl_nudging_q									NAMELIST /fdda/ if_no_pbl_nudging_q
NAMELIST /fdda/ if_zfac_uv										NAMELIST /fdda/ if_zfac_uv
NAMELIST /fdda/ k_zfac_uv										NAMELIST /fdda/ k_zfac_uv
NAMELIST /fdda/ if_zfac_t										NAMELIST /fdda/ if_zfac_t
NAMELIST /fdda/ k_zfac_t										NAMELIST /fdda/ k_zfac_t
NAMELIST /fdda/ if_zfac_ph										NAMELIST /fdda/ if_zfac_ph
NAMELIST /fdda/ k_zfac_ph										NAMELIST /fdda/ k_zfac_ph
NAMELIST /fdda/ if_zfac_q										NAMELIST /fdda/ if_zfac_q
NAMELIST /fdda/ k_zfac_q										NAMELIST /fdda/ k_zfac_q
NAMELIST /fdda/ dk_zfac_uv										NAMELIST /fdda/ dk_zfac_uv
NAMELIST /fdda/ dk_zfac_t										NAMELIST /fdda/ dk_zfac_t
NAMELIST /fdda/ dk_zfac_ph										NAMELIST /fdda/ dk_zfac_ph
NAMELIST /fdda/ guv											NAMELIST /fdda/ guv
NAMELIST /fdda/ guv_sfc											NAMELIST /fdda/ guv_sfc
NAMELIST /fdda/ gt											NAMELIST /fdda/ gt
NAMELIST /fdda/ gt_sfc											NAMELIST /fdda/ gt_sfc
NAMELIST /fdda/ gq											NAMELIST /fdda/ gq
NAMELIST /fdda/ gq_sfc											NAMELIST /fdda/ gq_sfc
NAMELIST /fdda/ gph											NAMELIST /fdda/ gph
NAMELIST /fdda/ dtramp_min										NAMELIST /fdda/ dtramp_min
NAMELIST /fdda/ if_ramping										NAMELIST /fdda/ if_ramping
NAMELIST /fdda/ rinblw											NAMELIST /fdda/ rinblw
NAMELIST /fdda/ xwavenum										NAMELIST /fdda/ xwavenum
NAMELIST /fdda/ ywavenum										NAMELIST /fdda/ ywavenum
NAMELIST /fdda/ pxlsm_soil_nudge									NAMELIST /fdda/ pxlsm_soil_nudge
NAMELIST /fdda/ obs_nudge_opt										NAMELIST /fdda/ obs_nudge_opt
NAMELIST /fdda/ max_obs											NAMELIST /fdda/ max_obs
NAMELIST /fdda/ fdda_start										NAMELIST /fdda/ fdda_start
NAMELIST /fdda/ fdda_end										NAMELIST /fdda/ fdda_end
NAMELIST /fdda/ obs_nudge_wind										NAMELIST /fdda/ obs_nudge_wind
NAMELIST /fdda/ obs_coef_wind										NAMELIST /fdda/ obs_coef_wind
NAMELIST /fdda/ obs_nudge_temp										NAMELIST /fdda/ obs_nudge_temp
NAMELIST /fdda/ obs_coef_temp										NAMELIST /fdda/ obs_coef_temp
NAMELIST /fdda/ obs_nudge_mois										NAMELIST /fdda/ obs_nudge_mois
NAMELIST /fdda/ obs_coef_mois										NAMELIST /fdda/ obs_coef_mois
NAMELIST /fdda/ obs_nudge_pstr										NAMELIST /fdda/ obs_nudge_pstr
NAMELIST /fdda/ obs_coef_pstr										NAMELIST /fdda/ obs_coef_pstr
NAMELIST /fdda/ obs_no_pbl_nudge_uv									NAMELIST /fdda/ obs_no_pbl_nudge_uv
NAMELIST /fdda/ obs_no_pbl_nudge_t									NAMELIST /fdda/ obs_no_pbl_nudge_t
NAMELIST /fdda/ obs_no_pbl_nudge_q									NAMELIST /fdda/ obs_no_pbl_nudge_q
NAMELIST /fdda/ obs_sfc_scheme_horiz									NAMELIST /fdda/ obs_sfc_scheme_horiz
NAMELIST /fdda/ obs_sfc_scheme_vert									NAMELIST /fdda/ obs_sfc_scheme_vert
NAMELIST /fdda/ obs_max_sndng_gap									NAMELIST /fdda/ obs_max_sndng_gap
NAMELIST /fdda/ obs_nudgezfullr1_uv									NAMELIST /fdda/ obs_nudgezfullr1_uv
NAMELIST /fdda/ obs_nudgezrampr1_uv									NAMELIST /fdda/ obs_nudgezrampr1_uv
NAMELIST /fdda/ obs_nudgezfullr2_uv									NAMELIST /fdda/ obs_nudgezfullr2_uv
NAMELIST /fdda/ obs_nudgezrampr2_uv									NAMELIST /fdda/ obs_nudgezrampr2_uv
NAMELIST /fdda/ obs_nudgezfullr4_uv									NAMELIST /fdda/ obs_nudgezfullr4_uv
NAMELIST /fdda/ obs_nudgezrampr4_uv									NAMELIST /fdda/ obs_nudgezrampr4_uv
NAMELIST /fdda/ obs_nudgezfullr1_t									NAMELIST /fdda/ obs_nudgezfullr1_t
NAMELIST /fdda/ obs_nudgezrampr1_t									NAMELIST /fdda/ obs_nudgezrampr1_t
NAMELIST /fdda/ obs_nudgezfullr2_t									NAMELIST /fdda/ obs_nudgezfullr2_t
NAMELIST /fdda/ obs_nudgezrampr2_t									NAMELIST /fdda/ obs_nudgezrampr2_t
NAMELIST /fdda/ obs_nudgezfullr4_t									NAMELIST /fdda/ obs_nudgezfullr4_t
NAMELIST /fdda/ obs_nudgezrampr4_t									NAMELIST /fdda/ obs_nudgezrampr4_t
NAMELIST /fdda/ obs_nudgezfullr1_q									NAMELIST /fdda/ obs_nudgezfullr1_q
NAMELIST /fdda/ obs_nudgezrampr1_q									NAMELIST /fdda/ obs_nudgezrampr1_q
NAMELIST /fdda/ obs_nudgezfullr2_q									NAMELIST /fdda/ obs_nudgezfullr2_q
NAMELIST /fdda/ obs_nudgezrampr2_q									NAMELIST /fdda/ obs_nudgezrampr2_q
NAMELIST /fdda/ obs_nudgezfullr4_q									NAMELIST /fdda/ obs_nudgezfullr4_q
NAMELIST /fdda/ obs_nudgezrampr4_q									NAMELIST /fdda/ obs_nudgezrampr4_q
NAMELIST /fdda/ obs_nudgezfullmin									NAMELIST /fdda/ obs_nudgezfullmin
NAMELIST /fdda/ obs_nudgezrampmin									NAMELIST /fdda/ obs_nudgezrampmin
NAMELIST /fdda/ obs_nudgezmax										NAMELIST /fdda/ obs_nudgezmax
NAMELIST /fdda/ obs_sfcfact										NAMELIST /fdda/ obs_sfcfact
NAMELIST /fdda/ obs_sfcfacr										NAMELIST /fdda/ obs_sfcfacr
NAMELIST /fdda/ obs_dpsmx										NAMELIST /fdda/ obs_dpsmx
NAMELIST /fdda/ obs_rinxy										NAMELIST /fdda/ obs_rinxy
NAMELIST /fdda/ obs_rinsig										NAMELIST /fdda/ obs_rinsig
NAMELIST /fdda/ obs_twindo										NAMELIST /fdda/ obs_twindo
NAMELIST /fdda/ obs_npfi										NAMELIST /fdda/ obs_npfi
NAMELIST /fdda/ obs_ionf										NAMELIST /fdda/ obs_ionf
NAMELIST /fdda/ obs_idynin										NAMELIST /fdda/ obs_idynin
NAMELIST /fdda/ obs_dtramp										NAMELIST /fdda/ obs_dtramp
NAMELIST /fdda/ obs_prt_max										NAMELIST /fdda/ obs_prt_max
NAMELIST /fdda/ obs_prt_freq										NAMELIST /fdda/ obs_prt_freq
NAMELIST /fdda/ obs_ipf_in4dob										NAMELIST /fdda/ obs_ipf_in4dob
NAMELIST /fdda/ obs_ipf_errob										NAMELIST /fdda/ obs_ipf_errob
NAMELIST /fdda/ obs_ipf_nudob										NAMELIST /fdda/ obs_ipf_nudob
NAMELIST /fdda/ obs_ipf_init										NAMELIST /fdda/ obs_ipf_init
NAMELIST /fdda/ obs_scl_neg_qv_innov									NAMELIST /fdda/ obs_scl_neg_qv_innov
NAMELIST /scm/ scm_force										NAMELIST /scm/ scm_force
NAMELIST /scm/ scm_force_dx										NAMELIST /scm/ scm_force_dx
NAMELIST /scm/ num_force_layers										NAMELIST /scm/ num_force_layers
NAMELIST /scm/ scm_lu_index										NAMELIST /scm/ scm_lu_index
NAMELIST /scm/ scm_isltyp										NAMELIST /scm/ scm_isltyp
NAMELIST /scm/ scm_vegfra										NAMELIST /scm/ scm_vegfra
NAMELIST /scm/ scm_canwat										NAMELIST /scm/ scm_canwat
NAMELIST /scm/ scm_lat											NAMELIST /scm/ scm_lat
NAMELIST /scm/ scm_lon											NAMELIST /scm/ scm_lon
NAMELIST /scm/ scm_th_t_tend										NAMELIST /scm/ scm_th_t_tend
NAMELIST /scm/ scm_qv_t_tend										NAMELIST /scm/ scm_qv_t_tend
NAMELIST /scm/ scm_th_adv										NAMELIST /scm/ scm_th_adv
NAMELIST /scm/ scm_wind_adv										NAMELIST /scm/ scm_wind_adv
NAMELIST /scm/ scm_qv_adv										NAMELIST /scm/ scm_qv_adv
NAMELIST /scm/ scm_ql_adv										NAMELIST /scm/ scm_ql_adv
NAMELIST /scm/ scm_vert_adv										NAMELIST /scm/ scm_vert_adv
NAMELIST /scm/ num_force_soil_layers									NAMELIST /scm/ num_force_soil_layers
NAMELIST /scm/ scm_soilt_force										NAMELIST /scm/ scm_soilt_force
NAMELIST /scm/ scm_soilq_force										NAMELIST /scm/ scm_soilq_force
NAMELIST /scm/ scm_force_th_largescale									NAMELIST /scm/ scm_force_th_largescale
NAMELIST /scm/ scm_force_qv_largescale									NAMELIST /scm/ scm_force_qv_largescale
NAMELIST /scm/ scm_force_ql_largescale									NAMELIST /scm/ scm_force_ql_largescale
NAMELIST /scm/ scm_force_wind_largescale								NAMELIST /scm/ scm_force_wind_largescale
NAMELIST /scm/ scm_force_skintemp									NAMELIST /scm/ scm_force_skintemp
NAMELIST /scm/ scm_force_flux										NAMELIST /scm/ scm_force_flux
NAMELIST /dynamics/ dyn_opt										NAMELIST /dynamics/ dyn_opt
NAMELIST /dynamics/ rk_ord										NAMELIST /dynamics/ rk_ord
NAMELIST /dynamics/ w_damping										NAMELIST /dynamics/ w_damping
NAMELIST /dynamics/ diff_opt										NAMELIST /dynamics/ diff_opt
NAMELIST /dynamics/ diff_opt_dfi									NAMELIST /dynamics/ diff_opt_dfi
NAMELIST /dynamics/ km_opt										NAMELIST /dynamics/ km_opt
NAMELIST /dynamics/ km_opt_dfi										NAMELIST /dynamics/ km_opt_dfi
NAMELIST /dynamics/ damp_opt										NAMELIST /dynamics/ damp_opt
NAMELIST /dynamics/ rad_nudge										NAMELIST /dynamics/ rad_nudge
NAMELIST /dynamics/ gwd_opt										NAMELIST /dynamics/ gwd_opt
NAMELIST /dynamics/ max_rot_angle_gwd								   <
NAMELIST /dynamics/ zdamp										NAMELIST /dynamics/ zdamp
NAMELIST /dynamics/ dampcoef										NAMELIST /dynamics/ dampcoef
NAMELIST /dynamics/ khdif										NAMELIST /dynamics/ khdif
NAMELIST /dynamics/ kvdif										NAMELIST /dynamics/ kvdif
NAMELIST /dynamics/ diff_6th_factor									NAMELIST /dynamics/ diff_6th_factor
NAMELIST /dynamics/ diff_6th_opt									NAMELIST /dynamics/ diff_6th_opt
NAMELIST /dynamics/ use_theta_m										NAMELIST /dynamics/ use_theta_m
NAMELIST /dynamics/ use_q_diabatic									NAMELIST /dynamics/ use_q_diabatic
NAMELIST /dynamics/ c_s											NAMELIST /dynamics/ c_s
NAMELIST /dynamics/ c_k											NAMELIST /dynamics/ c_k
NAMELIST /dynamics/ smdiv										NAMELIST /dynamics/ smdiv
NAMELIST /dynamics/ emdiv										NAMELIST /dynamics/ emdiv
NAMELIST /dynamics/ epssm										NAMELIST /dynamics/ epssm
NAMELIST /dynamics/ non_hydrostatic									NAMELIST /dynamics/ non_hydrostatic
NAMELIST /dynamics/ use_input_w										NAMELIST /dynamics/ use_input_w
NAMELIST /dynamics/ time_step_sound									NAMELIST /dynamics/ time_step_sound
NAMELIST /dynamics/ h_mom_adv_order									NAMELIST /dynamics/ h_mom_adv_order
NAMELIST /dynamics/ v_mom_adv_order									NAMELIST /dynamics/ v_mom_adv_order
NAMELIST /dynamics/ h_sca_adv_order									NAMELIST /dynamics/ h_sca_adv_order
NAMELIST /dynamics/ v_sca_adv_order									NAMELIST /dynamics/ v_sca_adv_order
NAMELIST /dynamics/ momentum_adv_opt									NAMELIST /dynamics/ momentum_adv_opt
NAMELIST /dynamics/ moist_adv_opt									NAMELIST /dynamics/ moist_adv_opt
NAMELIST /dynamics/ moist_adv_dfi_opt									NAMELIST /dynamics/ moist_adv_dfi_opt
NAMELIST /dynamics/ chem_adv_opt									NAMELIST /dynamics/ chem_adv_opt
NAMELIST /dynamics/ tracer_adv_opt									NAMELIST /dynamics/ tracer_adv_opt
NAMELIST /dynamics/ scalar_adv_opt									NAMELIST /dynamics/ scalar_adv_opt
NAMELIST /dynamics/ tke_adv_opt										NAMELIST /dynamics/ tke_adv_opt
NAMELIST /dynamics/ top_radiation									NAMELIST /dynamics/ top_radiation
NAMELIST /dynamics/ mix_isotropic									NAMELIST /dynamics/ mix_isotropic
NAMELIST /dynamics/ mix_upper_bound									NAMELIST /dynamics/ mix_upper_bound
NAMELIST /dynamics/ top_lid										NAMELIST /dynamics/ top_lid
NAMELIST /dynamics/ tke_upper_bound									NAMELIST /dynamics/ tke_upper_bound
NAMELIST /dynamics/ tke_drag_coefficient								NAMELIST /dynamics/ tke_drag_coefficient
NAMELIST /dynamics/ tke_heat_flux									NAMELIST /dynamics/ tke_heat_flux
NAMELIST /dynamics/ pert_coriolis									NAMELIST /dynamics/ pert_coriolis
NAMELIST /dynamics/ coriolis2d										NAMELIST /dynamics/ coriolis2d
NAMELIST /dynamics/ mix_full_fields									NAMELIST /dynamics/ mix_full_fields
NAMELIST /dynamics/ base_pres										NAMELIST /dynamics/ base_pres
NAMELIST /dynamics/ base_temp										NAMELIST /dynamics/ base_temp
NAMELIST /dynamics/ base_lapse										NAMELIST /dynamics/ base_lapse
NAMELIST /dynamics/ iso_temp										NAMELIST /dynamics/ iso_temp
NAMELIST /dynamics/ base_pres_strat									NAMELIST /dynamics/ base_pres_strat
NAMELIST /dynamics/ base_lapse_strat									NAMELIST /dynamics/ base_lapse_strat
NAMELIST /dynamics/ use_baseparam_fr_nml								NAMELIST /dynamics/ use_baseparam_fr_nml
NAMELIST /dynamics/ fft_filter_lat									NAMELIST /dynamics/ fft_filter_lat
NAMELIST /dynamics/ coupled_filtering									NAMELIST /dynamics/ coupled_filtering
NAMELIST /dynamics/ pos_def										NAMELIST /dynamics/ pos_def
NAMELIST /dynamics/ swap_pole_with_next_j								NAMELIST /dynamics/ swap_pole_with_next_j
NAMELIST /dynamics/ actual_distance_average								NAMELIST /dynamics/ actual_distance_average
NAMELIST /dynamics/ rotated_pole									NAMELIST /dynamics/ rotated_pole
NAMELIST /dynamics/ do_coriolis										NAMELIST /dynamics/ do_coriolis
NAMELIST /dynamics/ do_curvature									NAMELIST /dynamics/ do_curvature
NAMELIST /dynamics/ do_gradp										NAMELIST /dynamics/ do_gradp
NAMELIST /dynamics/ tracer_opt										NAMELIST /dynamics/ tracer_opt
NAMELIST /dynamics/ tenddiag										NAMELIST /dynamics/ tenddiag
NAMELIST /bdy_control/ spec_bdy_width									NAMELIST /bdy_control/ spec_bdy_width
NAMELIST /bdy_control/ spec_zone									NAMELIST /bdy_control/ spec_zone
NAMELIST /bdy_control/ relax_zone									NAMELIST /bdy_control/ relax_zone
NAMELIST /bdy_control/ specified									NAMELIST /bdy_control/ specified
NAMELIST /bdy_control/ constant_bc									NAMELIST /bdy_control/ constant_bc
NAMELIST /bdy_control/ periodic_x									NAMELIST /bdy_control/ periodic_x
NAMELIST /bdy_control/ symmetric_xs									NAMELIST /bdy_control/ symmetric_xs
NAMELIST /bdy_control/ symmetric_xe									NAMELIST /bdy_control/ symmetric_xe
NAMELIST /bdy_control/ open_xs										NAMELIST /bdy_control/ open_xs
NAMELIST /bdy_control/ open_xe										NAMELIST /bdy_control/ open_xe
NAMELIST /bdy_control/ periodic_y									NAMELIST /bdy_control/ periodic_y
NAMELIST /bdy_control/ symmetric_ys									NAMELIST /bdy_control/ symmetric_ys
NAMELIST /bdy_control/ symmetric_ye									NAMELIST /bdy_control/ symmetric_ye
NAMELIST /bdy_control/ open_ys										NAMELIST /bdy_control/ open_ys
NAMELIST /bdy_control/ open_ye										NAMELIST /bdy_control/ open_ye
NAMELIST /bdy_control/ polar										NAMELIST /bdy_control/ polar
NAMELIST /bdy_control/ nested										NAMELIST /bdy_control/ nested
NAMELIST /bdy_control/ spec_exp										NAMELIST /bdy_control/ spec_exp
NAMELIST /bdy_control/ spec_bdy_final_mu								NAMELIST /bdy_control/ spec_bdy_final_mu
NAMELIST /bdy_control/ real_data_init_type								NAMELIST /bdy_control/ real_data_init_type
NAMELIST /bdy_control/ have_bcs_moist									NAMELIST /bdy_control/ have_bcs_moist
NAMELIST /bdy_control/ have_bcs_scalar									NAMELIST /bdy_control/ have_bcs_scalar
NAMELIST /grib2/ background_proc_id									NAMELIST /grib2/ background_proc_id
NAMELIST /grib2/ forecast_proc_id									NAMELIST /grib2/ forecast_proc_id
NAMELIST /grib2/ production_status									NAMELIST /grib2/ production_status
NAMELIST /grib2/ compression										NAMELIST /grib2/ compression
NAMELIST /physics/ windfarm_opt										NAMELIST /physics/ windfarm_opt
NAMELIST /physics/ windfarm_ij										NAMELIST /physics/ windfarm_ij
NAMELIST /physics/ hailcast_opt									   <
NAMELIST /physics/ lightning_option									NAMELIST /physics/ lightning_option
NAMELIST /physics/ lightning_dt										NAMELIST /physics/ lightning_dt
NAMELIST /physics/ lightning_start_seconds								NAMELIST /physics/ lightning_start_seconds
NAMELIST /physics/ flashrate_factor									NAMELIST /physics/ flashrate_factor
NAMELIST /physics/ iccg_method										NAMELIST /physics/ iccg_method
NAMELIST /physics/ iccg_prescribed_num									NAMELIST /physics/ iccg_prescribed_num
NAMELIST /physics/ iccg_prescribed_den									NAMELIST /physics/ iccg_prescribed_den
NAMELIST /physics/ cellcount_method									NAMELIST /physics/ cellcount_method
NAMELIST /physics/ cldtop_adjustment									NAMELIST /physics/ cldtop_adjustment
NAMELIST /physics/ sf_lake_physics									NAMELIST /physics/ sf_lake_physics
NAMELIST /time_control/ auxinput1_inname								NAMELIST /time_control/ auxinput1_inname
NAMELIST /time_control/ io_form_auxinput1								NAMELIST /time_control/ io_form_auxinput1
NAMELIST /time_control/ override_restart_timers								NAMELIST /time_control/ override_restart_timers
NAMELIST /time_control/ auxhist1_inname									NAMELIST /time_control/ auxhist1_inname
NAMELIST /time_control/ auxhist1_outname								NAMELIST /time_control/ auxhist1_outname
NAMELIST /time_control/ auxhist1_interval_y								NAMELIST /time_control/ auxhist1_interval_y
NAMELIST /time_control/ auxhist1_interval_d								NAMELIST /time_control/ auxhist1_interval_d
NAMELIST /time_control/ auxhist1_interval_h								NAMELIST /time_control/ auxhist1_interval_h
NAMELIST /time_control/ auxhist1_interval_m								NAMELIST /time_control/ auxhist1_interval_m
NAMELIST /time_control/ auxhist1_interval_s								NAMELIST /time_control/ auxhist1_interval_s
NAMELIST /time_control/ auxhist1_interval								NAMELIST /time_control/ auxhist1_interval
NAMELIST /time_control/ auxhist1_begin_y								NAMELIST /time_control/ auxhist1_begin_y
NAMELIST /time_control/ auxhist1_begin_d								NAMELIST /time_control/ auxhist1_begin_d
NAMELIST /time_control/ auxhist1_begin_h								NAMELIST /time_control/ auxhist1_begin_h
NAMELIST /time_control/ auxhist1_begin_m								NAMELIST /time_control/ auxhist1_begin_m
NAMELIST /time_control/ auxhist1_begin_s								NAMELIST /time_control/ auxhist1_begin_s
NAMELIST /time_control/ auxhist1_begin									NAMELIST /time_control/ auxhist1_begin
NAMELIST /time_control/ auxhist1_end_y									NAMELIST /time_control/ auxhist1_end_y
NAMELIST /time_control/ auxhist1_end_d									NAMELIST /time_control/ auxhist1_end_d
NAMELIST /time_control/ auxhist1_end_h									NAMELIST /time_control/ auxhist1_end_h
NAMELIST /time_control/ auxhist1_end_m									NAMELIST /time_control/ auxhist1_end_m
NAMELIST /time_control/ auxhist1_end_s									NAMELIST /time_control/ auxhist1_end_s
NAMELIST /time_control/ auxhist1_end									NAMELIST /time_control/ auxhist1_end
NAMELIST /time_control/ io_form_auxhist1								NAMELIST /time_control/ io_form_auxhist1
NAMELIST /time_control/ frames_per_auxhist1								NAMELIST /time_control/ frames_per_auxhist1
NAMELIST /time_control/ auxhist2_inname									NAMELIST /time_control/ auxhist2_inname
NAMELIST /time_control/ auxhist2_outname								NAMELIST /time_control/ auxhist2_outname
NAMELIST /time_control/ auxhist2_interval_y								NAMELIST /time_control/ auxhist2_interval_y
NAMELIST /time_control/ auxhist2_interval_d								NAMELIST /time_control/ auxhist2_interval_d
NAMELIST /time_control/ auxhist2_interval_h								NAMELIST /time_control/ auxhist2_interval_h
NAMELIST /time_control/ auxhist2_interval_m								NAMELIST /time_control/ auxhist2_interval_m
NAMELIST /time_control/ auxhist2_interval_s								NAMELIST /time_control/ auxhist2_interval_s
NAMELIST /time_control/ auxhist2_interval								NAMELIST /time_control/ auxhist2_interval
NAMELIST /time_control/ auxhist2_begin_y								NAMELIST /time_control/ auxhist2_begin_y
NAMELIST /time_control/ auxhist2_begin_d								NAMELIST /time_control/ auxhist2_begin_d
NAMELIST /time_control/ auxhist2_begin_h								NAMELIST /time_control/ auxhist2_begin_h
NAMELIST /time_control/ auxhist2_begin_m								NAMELIST /time_control/ auxhist2_begin_m
NAMELIST /time_control/ auxhist2_begin_s								NAMELIST /time_control/ auxhist2_begin_s
NAMELIST /time_control/ auxhist2_begin									NAMELIST /time_control/ auxhist2_begin
NAMELIST /time_control/ auxhist2_end_y									NAMELIST /time_control/ auxhist2_end_y
NAMELIST /time_control/ auxhist2_end_d									NAMELIST /time_control/ auxhist2_end_d
NAMELIST /time_control/ auxhist2_end_h									NAMELIST /time_control/ auxhist2_end_h
NAMELIST /time_control/ auxhist2_end_m									NAMELIST /time_control/ auxhist2_end_m
NAMELIST /time_control/ auxhist2_end_s									NAMELIST /time_control/ auxhist2_end_s
NAMELIST /time_control/ auxhist2_end									NAMELIST /time_control/ auxhist2_end
NAMELIST /time_control/ io_form_auxhist2								NAMELIST /time_control/ io_form_auxhist2
NAMELIST /time_control/ frames_per_auxhist2								NAMELIST /time_control/ frames_per_auxhist2
NAMELIST /time_control/ auxhist3_inname									NAMELIST /time_control/ auxhist3_inname
NAMELIST /time_control/ auxhist3_outname								NAMELIST /time_control/ auxhist3_outname
NAMELIST /time_control/ auxhist3_interval_y								NAMELIST /time_control/ auxhist3_interval_y
NAMELIST /time_control/ auxhist3_interval_d								NAMELIST /time_control/ auxhist3_interval_d
NAMELIST /time_control/ auxhist3_interval_h								NAMELIST /time_control/ auxhist3_interval_h
NAMELIST /time_control/ auxhist3_interval_m								NAMELIST /time_control/ auxhist3_interval_m
NAMELIST /time_control/ auxhist3_interval_s								NAMELIST /time_control/ auxhist3_interval_s
NAMELIST /time_control/ auxhist3_interval								NAMELIST /time_control/ auxhist3_interval
NAMELIST /time_control/ auxhist3_begin_y								NAMELIST /time_control/ auxhist3_begin_y
NAMELIST /time_control/ auxhist3_begin_d								NAMELIST /time_control/ auxhist3_begin_d
NAMELIST /time_control/ auxhist3_begin_h								NAMELIST /time_control/ auxhist3_begin_h
NAMELIST /time_control/ auxhist3_begin_m								NAMELIST /time_control/ auxhist3_begin_m
NAMELIST /time_control/ auxhist3_begin_s								NAMELIST /time_control/ auxhist3_begin_s
NAMELIST /time_control/ auxhist3_begin									NAMELIST /time_control/ auxhist3_begin
NAMELIST /time_control/ auxhist3_end_y									NAMELIST /time_control/ auxhist3_end_y
NAMELIST /time_control/ auxhist3_end_d									NAMELIST /time_control/ auxhist3_end_d
NAMELIST /time_control/ auxhist3_end_h									NAMELIST /time_control/ auxhist3_end_h
NAMELIST /time_control/ auxhist3_end_m									NAMELIST /time_control/ auxhist3_end_m
NAMELIST /time_control/ auxhist3_end_s									NAMELIST /time_control/ auxhist3_end_s
NAMELIST /time_control/ auxhist3_end									NAMELIST /time_control/ auxhist3_end
NAMELIST /time_control/ io_form_auxhist3								NAMELIST /time_control/ io_form_auxhist3
NAMELIST /time_control/ frames_per_auxhist3								NAMELIST /time_control/ frames_per_auxhist3
NAMELIST /time_control/ auxhist4_inname									NAMELIST /time_control/ auxhist4_inname
NAMELIST /time_control/ auxhist4_outname								NAMELIST /time_control/ auxhist4_outname
NAMELIST /time_control/ auxhist4_interval_y								NAMELIST /time_control/ auxhist4_interval_y
NAMELIST /time_control/ auxhist4_interval_d								NAMELIST /time_control/ auxhist4_interval_d
NAMELIST /time_control/ auxhist4_interval_h								NAMELIST /time_control/ auxhist4_interval_h
NAMELIST /time_control/ auxhist4_interval_m								NAMELIST /time_control/ auxhist4_interval_m
NAMELIST /time_control/ auxhist4_interval_s								NAMELIST /time_control/ auxhist4_interval_s
NAMELIST /time_control/ auxhist4_interval								NAMELIST /time_control/ auxhist4_interval
NAMELIST /time_control/ auxhist4_begin_y								NAMELIST /time_control/ auxhist4_begin_y
NAMELIST /time_control/ auxhist4_begin_d								NAMELIST /time_control/ auxhist4_begin_d
NAMELIST /time_control/ auxhist4_begin_h								NAMELIST /time_control/ auxhist4_begin_h
NAMELIST /time_control/ auxhist4_begin_m								NAMELIST /time_control/ auxhist4_begin_m
NAMELIST /time_control/ auxhist4_begin_s								NAMELIST /time_control/ auxhist4_begin_s
NAMELIST /time_control/ auxhist4_begin									NAMELIST /time_control/ auxhist4_begin
NAMELIST /time_control/ auxhist4_end_y									NAMELIST /time_control/ auxhist4_end_y
NAMELIST /time_control/ auxhist4_end_d									NAMELIST /time_control/ auxhist4_end_d
NAMELIST /time_control/ auxhist4_end_h									NAMELIST /time_control/ auxhist4_end_h
NAMELIST /time_control/ auxhist4_end_m									NAMELIST /time_control/ auxhist4_end_m
NAMELIST /time_control/ auxhist4_end_s									NAMELIST /time_control/ auxhist4_end_s
NAMELIST /time_control/ auxhist4_end									NAMELIST /time_control/ auxhist4_end
NAMELIST /time_control/ io_form_auxhist4								NAMELIST /time_control/ io_form_auxhist4
NAMELIST /time_control/ frames_per_auxhist4								NAMELIST /time_control/ frames_per_auxhist4
NAMELIST /time_control/ auxhist5_inname									NAMELIST /time_control/ auxhist5_inname
NAMELIST /time_control/ auxhist5_outname								NAMELIST /time_control/ auxhist5_outname
NAMELIST /time_control/ auxhist5_interval_y								NAMELIST /time_control/ auxhist5_interval_y
NAMELIST /time_control/ auxhist5_interval_d								NAMELIST /time_control/ auxhist5_interval_d
NAMELIST /time_control/ auxhist5_interval_h								NAMELIST /time_control/ auxhist5_interval_h
NAMELIST /time_control/ auxhist5_interval_m								NAMELIST /time_control/ auxhist5_interval_m
NAMELIST /time_control/ auxhist5_interval_s								NAMELIST /time_control/ auxhist5_interval_s
NAMELIST /time_control/ auxhist5_interval								NAMELIST /time_control/ auxhist5_interval
NAMELIST /time_control/ auxhist5_begin_y								NAMELIST /time_control/ auxhist5_begin_y
NAMELIST /time_control/ auxhist5_begin_d								NAMELIST /time_control/ auxhist5_begin_d
NAMELIST /time_control/ auxhist5_begin_h								NAMELIST /time_control/ auxhist5_begin_h
NAMELIST /time_control/ auxhist5_begin_m								NAMELIST /time_control/ auxhist5_begin_m
NAMELIST /time_control/ auxhist5_begin_s								NAMELIST /time_control/ auxhist5_begin_s
NAMELIST /time_control/ auxhist5_begin									NAMELIST /time_control/ auxhist5_begin
NAMELIST /time_control/ auxhist5_end_y									NAMELIST /time_control/ auxhist5_end_y
NAMELIST /time_control/ auxhist5_end_d									NAMELIST /time_control/ auxhist5_end_d
NAMELIST /time_control/ auxhist5_end_h									NAMELIST /time_control/ auxhist5_end_h
NAMELIST /time_control/ auxhist5_end_m									NAMELIST /time_control/ auxhist5_end_m
NAMELIST /time_control/ auxhist5_end_s									NAMELIST /time_control/ auxhist5_end_s
NAMELIST /time_control/ auxhist5_end									NAMELIST /time_control/ auxhist5_end
NAMELIST /time_control/ io_form_auxhist5								NAMELIST /time_control/ io_form_auxhist5
NAMELIST /time_control/ frames_per_auxhist5								NAMELIST /time_control/ frames_per_auxhist5
NAMELIST /time_control/ auxhist6_inname									NAMELIST /time_control/ auxhist6_inname
NAMELIST /time_control/ auxhist6_outname								NAMELIST /time_control/ auxhist6_outname
NAMELIST /time_control/ auxhist6_interval_y								NAMELIST /time_control/ auxhist6_interval_y
NAMELIST /time_control/ auxhist6_interval_d								NAMELIST /time_control/ auxhist6_interval_d
NAMELIST /time_control/ auxhist6_interval_h								NAMELIST /time_control/ auxhist6_interval_h
NAMELIST /time_control/ auxhist6_interval_m								NAMELIST /time_control/ auxhist6_interval_m
NAMELIST /time_control/ auxhist6_interval_s								NAMELIST /time_control/ auxhist6_interval_s
NAMELIST /time_control/ auxhist6_interval								NAMELIST /time_control/ auxhist6_interval
NAMELIST /time_control/ auxhist6_begin_y								NAMELIST /time_control/ auxhist6_begin_y
NAMELIST /time_control/ auxhist6_begin_d								NAMELIST /time_control/ auxhist6_begin_d
NAMELIST /time_control/ auxhist6_begin_h								NAMELIST /time_control/ auxhist6_begin_h
NAMELIST /time_control/ auxhist6_begin_m								NAMELIST /time_control/ auxhist6_begin_m
NAMELIST /time_control/ auxhist6_begin_s								NAMELIST /time_control/ auxhist6_begin_s
NAMELIST /time_control/ auxhist6_begin									NAMELIST /time_control/ auxhist6_begin
NAMELIST /time_control/ auxhist6_end_y									NAMELIST /time_control/ auxhist6_end_y
NAMELIST /time_control/ auxhist6_end_d									NAMELIST /time_control/ auxhist6_end_d
NAMELIST /time_control/ auxhist6_end_h									NAMELIST /time_control/ auxhist6_end_h
NAMELIST /time_control/ auxhist6_end_m									NAMELIST /time_control/ auxhist6_end_m
NAMELIST /time_control/ auxhist6_end_s									NAMELIST /time_control/ auxhist6_end_s
NAMELIST /time_control/ auxhist6_end									NAMELIST /time_control/ auxhist6_end
NAMELIST /time_control/ io_form_auxhist6								NAMELIST /time_control/ io_form_auxhist6
NAMELIST /time_control/ frames_per_auxhist6								NAMELIST /time_control/ frames_per_auxhist6
NAMELIST /time_control/ auxhist7_inname									NAMELIST /time_control/ auxhist7_inname
NAMELIST /time_control/ auxhist7_outname								NAMELIST /time_control/ auxhist7_outname
NAMELIST /time_control/ auxhist7_interval_y								NAMELIST /time_control/ auxhist7_interval_y
NAMELIST /time_control/ auxhist7_interval_d								NAMELIST /time_control/ auxhist7_interval_d
NAMELIST /time_control/ auxhist7_interval_h								NAMELIST /time_control/ auxhist7_interval_h
NAMELIST /time_control/ auxhist7_interval_m								NAMELIST /time_control/ auxhist7_interval_m
NAMELIST /time_control/ auxhist7_interval_s								NAMELIST /time_control/ auxhist7_interval_s
NAMELIST /time_control/ auxhist7_interval								NAMELIST /time_control/ auxhist7_interval
NAMELIST /time_control/ auxhist7_begin_y								NAMELIST /time_control/ auxhist7_begin_y
NAMELIST /time_control/ auxhist7_begin_d								NAMELIST /time_control/ auxhist7_begin_d
NAMELIST /time_control/ auxhist7_begin_h								NAMELIST /time_control/ auxhist7_begin_h
NAMELIST /time_control/ auxhist7_begin_m								NAMELIST /time_control/ auxhist7_begin_m
NAMELIST /time_control/ auxhist7_begin_s								NAMELIST /time_control/ auxhist7_begin_s
NAMELIST /time_control/ auxhist7_begin									NAMELIST /time_control/ auxhist7_begin
NAMELIST /time_control/ auxhist7_end_y									NAMELIST /time_control/ auxhist7_end_y
NAMELIST /time_control/ auxhist7_end_d									NAMELIST /time_control/ auxhist7_end_d
NAMELIST /time_control/ auxhist7_end_h									NAMELIST /time_control/ auxhist7_end_h
NAMELIST /time_control/ auxhist7_end_m									NAMELIST /time_control/ auxhist7_end_m
NAMELIST /time_control/ auxhist7_end_s									NAMELIST /time_control/ auxhist7_end_s
NAMELIST /time_control/ auxhist7_end									NAMELIST /time_control/ auxhist7_end
NAMELIST /time_control/ io_form_auxhist7								NAMELIST /time_control/ io_form_auxhist7
NAMELIST /time_control/ frames_per_auxhist7								NAMELIST /time_control/ frames_per_auxhist7
NAMELIST /time_control/ auxhist8_inname									NAMELIST /time_control/ auxhist8_inname
NAMELIST /time_control/ auxhist8_outname								NAMELIST /time_control/ auxhist8_outname
NAMELIST /time_control/ auxhist8_interval_y								NAMELIST /time_control/ auxhist8_interval_y
NAMELIST /time_control/ auxhist8_interval_d								NAMELIST /time_control/ auxhist8_interval_d
NAMELIST /time_control/ auxhist8_interval_h								NAMELIST /time_control/ auxhist8_interval_h
NAMELIST /time_control/ auxhist8_interval_m								NAMELIST /time_control/ auxhist8_interval_m
NAMELIST /time_control/ auxhist8_interval_s								NAMELIST /time_control/ auxhist8_interval_s
NAMELIST /time_control/ auxhist8_interval								NAMELIST /time_control/ auxhist8_interval
NAMELIST /time_control/ auxhist8_begin_y								NAMELIST /time_control/ auxhist8_begin_y
NAMELIST /time_control/ auxhist8_begin_d								NAMELIST /time_control/ auxhist8_begin_d
NAMELIST /time_control/ auxhist8_begin_h								NAMELIST /time_control/ auxhist8_begin_h
NAMELIST /time_control/ auxhist8_begin_m								NAMELIST /time_control/ auxhist8_begin_m
NAMELIST /time_control/ auxhist8_begin_s								NAMELIST /time_control/ auxhist8_begin_s
NAMELIST /time_control/ auxhist8_begin									NAMELIST /time_control/ auxhist8_begin
NAMELIST /time_control/ auxhist8_end_y									NAMELIST /time_control/ auxhist8_end_y
NAMELIST /time_control/ auxhist8_end_d									NAMELIST /time_control/ auxhist8_end_d
NAMELIST /time_control/ auxhist8_end_h									NAMELIST /time_control/ auxhist8_end_h
NAMELIST /time_control/ auxhist8_end_m									NAMELIST /time_control/ auxhist8_end_m
NAMELIST /time_control/ auxhist8_end_s									NAMELIST /time_control/ auxhist8_end_s
NAMELIST /time_control/ auxhist8_end									NAMELIST /time_control/ auxhist8_end
NAMELIST /time_control/ io_form_auxhist8								NAMELIST /time_control/ io_form_auxhist8
NAMELIST /time_control/ frames_per_auxhist8								NAMELIST /time_control/ frames_per_auxhist8
NAMELIST /time_control/ auxhist9_inname									NAMELIST /time_control/ auxhist9_inname
NAMELIST /time_control/ auxhist9_outname								NAMELIST /time_control/ auxhist9_outname
NAMELIST /time_control/ auxhist9_interval_y								NAMELIST /time_control/ auxhist9_interval_y
NAMELIST /time_control/ auxhist9_interval_d								NAMELIST /time_control/ auxhist9_interval_d
NAMELIST /time_control/ auxhist9_interval_h								NAMELIST /time_control/ auxhist9_interval_h
NAMELIST /time_control/ auxhist9_interval_m								NAMELIST /time_control/ auxhist9_interval_m
NAMELIST /time_control/ auxhist9_interval_s								NAMELIST /time_control/ auxhist9_interval_s
NAMELIST /time_control/ auxhist9_interval								NAMELIST /time_control/ auxhist9_interval
NAMELIST /time_control/ auxhist9_begin_y								NAMELIST /time_control/ auxhist9_begin_y
NAMELIST /time_control/ auxhist9_begin_d								NAMELIST /time_control/ auxhist9_begin_d
NAMELIST /time_control/ auxhist9_begin_h								NAMELIST /time_control/ auxhist9_begin_h
NAMELIST /time_control/ auxhist9_begin_m								NAMELIST /time_control/ auxhist9_begin_m
NAMELIST /time_control/ auxhist9_begin_s								NAMELIST /time_control/ auxhist9_begin_s
NAMELIST /time_control/ auxhist9_begin									NAMELIST /time_control/ auxhist9_begin
NAMELIST /time_control/ auxhist9_end_y									NAMELIST /time_control/ auxhist9_end_y
NAMELIST /time_control/ auxhist9_end_d									NAMELIST /time_control/ auxhist9_end_d
NAMELIST /time_control/ auxhist9_end_h									NAMELIST /time_control/ auxhist9_end_h
NAMELIST /time_control/ auxhist9_end_m									NAMELIST /time_control/ auxhist9_end_m
NAMELIST /time_control/ auxhist9_end_s									NAMELIST /time_control/ auxhist9_end_s
NAMELIST /time_control/ auxhist9_end									NAMELIST /time_control/ auxhist9_end
NAMELIST /time_control/ io_form_auxhist9								NAMELIST /time_control/ io_form_auxhist9
NAMELIST /time_control/ frames_per_auxhist9								NAMELIST /time_control/ frames_per_auxhist9
NAMELIST /time_control/ auxhist10_inname								NAMELIST /time_control/ auxhist10_inname
NAMELIST /time_control/ auxhist10_outname								NAMELIST /time_control/ auxhist10_outname
NAMELIST /time_control/ auxhist10_interval_y								NAMELIST /time_control/ auxhist10_interval_y
NAMELIST /time_control/ auxhist10_interval_d								NAMELIST /time_control/ auxhist10_interval_d
NAMELIST /time_control/ auxhist10_interval_h								NAMELIST /time_control/ auxhist10_interval_h
NAMELIST /time_control/ auxhist10_interval_m								NAMELIST /time_control/ auxhist10_interval_m
NAMELIST /time_control/ auxhist10_interval_s								NAMELIST /time_control/ auxhist10_interval_s
NAMELIST /time_control/ auxhist10_interval								NAMELIST /time_control/ auxhist10_interval
NAMELIST /time_control/ auxhist10_begin_y								NAMELIST /time_control/ auxhist10_begin_y
NAMELIST /time_control/ auxhist10_begin_d								NAMELIST /time_control/ auxhist10_begin_d
NAMELIST /time_control/ auxhist10_begin_h								NAMELIST /time_control/ auxhist10_begin_h
NAMELIST /time_control/ auxhist10_begin_m								NAMELIST /time_control/ auxhist10_begin_m
NAMELIST /time_control/ auxhist10_begin_s								NAMELIST /time_control/ auxhist10_begin_s
NAMELIST /time_control/ auxhist10_begin									NAMELIST /time_control/ auxhist10_begin
NAMELIST /time_control/ auxhist10_end_y									NAMELIST /time_control/ auxhist10_end_y
NAMELIST /time_control/ auxhist10_end_d									NAMELIST /time_control/ auxhist10_end_d
NAMELIST /time_control/ auxhist10_end_h									NAMELIST /time_control/ auxhist10_end_h
NAMELIST /time_control/ auxhist10_end_m									NAMELIST /time_control/ auxhist10_end_m
NAMELIST /time_control/ auxhist10_end_s									NAMELIST /time_control/ auxhist10_end_s
NAMELIST /time_control/ auxhist10_end									NAMELIST /time_control/ auxhist10_end
NAMELIST /time_control/ io_form_auxhist10								NAMELIST /time_control/ io_form_auxhist10
NAMELIST /time_control/ frames_per_auxhist10								NAMELIST /time_control/ frames_per_auxhist10
NAMELIST /time_control/ auxhist11_inname								NAMELIST /time_control/ auxhist11_inname
NAMELIST /time_control/ auxhist11_outname								NAMELIST /time_control/ auxhist11_outname
NAMELIST /time_control/ auxhist11_interval_y								NAMELIST /time_control/ auxhist11_interval_y
NAMELIST /time_control/ auxhist11_interval_d								NAMELIST /time_control/ auxhist11_interval_d
NAMELIST /time_control/ auxhist11_interval_h								NAMELIST /time_control/ auxhist11_interval_h
NAMELIST /time_control/ auxhist11_interval_m								NAMELIST /time_control/ auxhist11_interval_m
NAMELIST /time_control/ auxhist11_interval_s								NAMELIST /time_control/ auxhist11_interval_s
NAMELIST /time_control/ auxhist11_interval								NAMELIST /time_control/ auxhist11_interval
NAMELIST /time_control/ auxhist11_begin_y								NAMELIST /time_control/ auxhist11_begin_y
NAMELIST /time_control/ auxhist11_begin_d								NAMELIST /time_control/ auxhist11_begin_d
NAMELIST /time_control/ auxhist11_begin_h								NAMELIST /time_control/ auxhist11_begin_h
NAMELIST /time_control/ auxhist11_begin_m								NAMELIST /time_control/ auxhist11_begin_m
NAMELIST /time_control/ auxhist11_begin_s								NAMELIST /time_control/ auxhist11_begin_s
NAMELIST /time_control/ auxhist11_begin									NAMELIST /time_control/ auxhist11_begin
NAMELIST /time_control/ auxhist11_end_y									NAMELIST /time_control/ auxhist11_end_y
NAMELIST /time_control/ auxhist11_end_d									NAMELIST /time_control/ auxhist11_end_d
NAMELIST /time_control/ auxhist11_end_h									NAMELIST /time_control/ auxhist11_end_h
NAMELIST /time_control/ auxhist11_end_m									NAMELIST /time_control/ auxhist11_end_m
NAMELIST /time_control/ auxhist11_end_s									NAMELIST /time_control/ auxhist11_end_s
NAMELIST /time_control/ auxhist11_end									NAMELIST /time_control/ auxhist11_end
NAMELIST /time_control/ io_form_auxhist11								NAMELIST /time_control/ io_form_auxhist11
NAMELIST /time_control/ frames_per_auxhist11								NAMELIST /time_control/ frames_per_auxhist11
NAMELIST /time_control/ auxhist12_inname								NAMELIST /time_control/ auxhist12_inname
NAMELIST /time_control/ auxhist12_outname								NAMELIST /time_control/ auxhist12_outname
NAMELIST /time_control/ auxhist12_interval_y								NAMELIST /time_control/ auxhist12_interval_y
NAMELIST /time_control/ auxhist12_interval_d								NAMELIST /time_control/ auxhist12_interval_d
NAMELIST /time_control/ auxhist12_interval_h								NAMELIST /time_control/ auxhist12_interval_h
NAMELIST /time_control/ auxhist12_interval_m								NAMELIST /time_control/ auxhist12_interval_m
NAMELIST /time_control/ auxhist12_interval_s								NAMELIST /time_control/ auxhist12_interval_s
NAMELIST /time_control/ auxhist12_interval								NAMELIST /time_control/ auxhist12_interval
NAMELIST /time_control/ auxhist12_begin_y								NAMELIST /time_control/ auxhist12_begin_y
NAMELIST /time_control/ auxhist12_begin_d								NAMELIST /time_control/ auxhist12_begin_d
NAMELIST /time_control/ auxhist12_begin_h								NAMELIST /time_control/ auxhist12_begin_h
NAMELIST /time_control/ auxhist12_begin_m								NAMELIST /time_control/ auxhist12_begin_m
NAMELIST /time_control/ auxhist12_begin_s								NAMELIST /time_control/ auxhist12_begin_s
NAMELIST /time_control/ auxhist12_begin									NAMELIST /time_control/ auxhist12_begin
NAMELIST /time_control/ auxhist12_end_y									NAMELIST /time_control/ auxhist12_end_y
NAMELIST /time_control/ auxhist12_end_d									NAMELIST /time_control/ auxhist12_end_d
NAMELIST /time_control/ auxhist12_end_h									NAMELIST /time_control/ auxhist12_end_h
NAMELIST /time_control/ auxhist12_end_m									NAMELIST /time_control/ auxhist12_end_m
NAMELIST /time_control/ auxhist12_end_s									NAMELIST /time_control/ auxhist12_end_s
NAMELIST /time_control/ auxhist12_end									NAMELIST /time_control/ auxhist12_end
NAMELIST /time_control/ io_form_auxhist12								NAMELIST /time_control/ io_form_auxhist12
NAMELIST /time_control/ frames_per_auxhist12								NAMELIST /time_control/ frames_per_auxhist12
NAMELIST /time_control/ auxhist13_inname								NAMELIST /time_control/ auxhist13_inname
NAMELIST /time_control/ auxhist13_outname								NAMELIST /time_control/ auxhist13_outname
NAMELIST /time_control/ auxhist13_interval_y								NAMELIST /time_control/ auxhist13_interval_y
NAMELIST /time_control/ auxhist13_interval_d								NAMELIST /time_control/ auxhist13_interval_d
NAMELIST /time_control/ auxhist13_interval_h								NAMELIST /time_control/ auxhist13_interval_h
NAMELIST /time_control/ auxhist13_interval_m								NAMELIST /time_control/ auxhist13_interval_m
NAMELIST /time_control/ auxhist13_interval_s								NAMELIST /time_control/ auxhist13_interval_s
NAMELIST /time_control/ auxhist13_interval								NAMELIST /time_control/ auxhist13_interval
NAMELIST /time_control/ auxhist13_begin_y								NAMELIST /time_control/ auxhist13_begin_y
NAMELIST /time_control/ auxhist13_begin_d								NAMELIST /time_control/ auxhist13_begin_d
NAMELIST /time_control/ auxhist13_begin_h								NAMELIST /time_control/ auxhist13_begin_h
NAMELIST /time_control/ auxhist13_begin_m								NAMELIST /time_control/ auxhist13_begin_m
NAMELIST /time_control/ auxhist13_begin_s								NAMELIST /time_control/ auxhist13_begin_s
NAMELIST /time_control/ auxhist13_begin									NAMELIST /time_control/ auxhist13_begin
NAMELIST /time_control/ auxhist13_end_y									NAMELIST /time_control/ auxhist13_end_y
NAMELIST /time_control/ auxhist13_end_d									NAMELIST /time_control/ auxhist13_end_d
NAMELIST /time_control/ auxhist13_end_h									NAMELIST /time_control/ auxhist13_end_h
NAMELIST /time_control/ auxhist13_end_m									NAMELIST /time_control/ auxhist13_end_m
NAMELIST /time_control/ auxhist13_end_s									NAMELIST /time_control/ auxhist13_end_s
NAMELIST /time_control/ auxhist13_end									NAMELIST /time_control/ auxhist13_end
NAMELIST /time_control/ io_form_auxhist13								NAMELIST /time_control/ io_form_auxhist13
NAMELIST /time_control/ frames_per_auxhist13								NAMELIST /time_control/ frames_per_auxhist13
NAMELIST /time_control/ auxhist14_inname								NAMELIST /time_control/ auxhist14_inname
NAMELIST /time_control/ auxhist14_outname								NAMELIST /time_control/ auxhist14_outname
NAMELIST /time_control/ auxhist14_interval_y								NAMELIST /time_control/ auxhist14_interval_y
NAMELIST /time_control/ auxhist14_interval_d								NAMELIST /time_control/ auxhist14_interval_d
NAMELIST /time_control/ auxhist14_interval_h								NAMELIST /time_control/ auxhist14_interval_h
NAMELIST /time_control/ auxhist14_interval_m								NAMELIST /time_control/ auxhist14_interval_m
NAMELIST /time_control/ auxhist14_interval_s								NAMELIST /time_control/ auxhist14_interval_s
NAMELIST /time_control/ auxhist14_interval								NAMELIST /time_control/ auxhist14_interval
NAMELIST /time_control/ auxhist14_begin_y								NAMELIST /time_control/ auxhist14_begin_y
NAMELIST /time_control/ auxhist14_begin_d								NAMELIST /time_control/ auxhist14_begin_d
NAMELIST /time_control/ auxhist14_begin_h								NAMELIST /time_control/ auxhist14_begin_h
NAMELIST /time_control/ auxhist14_begin_m								NAMELIST /time_control/ auxhist14_begin_m
NAMELIST /time_control/ auxhist14_begin_s								NAMELIST /time_control/ auxhist14_begin_s
NAMELIST /time_control/ auxhist14_begin									NAMELIST /time_control/ auxhist14_begin
NAMELIST /time_control/ auxhist14_end_y									NAMELIST /time_control/ auxhist14_end_y
NAMELIST /time_control/ auxhist14_end_d									NAMELIST /time_control/ auxhist14_end_d
NAMELIST /time_control/ auxhist14_end_h									NAMELIST /time_control/ auxhist14_end_h
NAMELIST /time_control/ auxhist14_end_m									NAMELIST /time_control/ auxhist14_end_m
NAMELIST /time_control/ auxhist14_end_s									NAMELIST /time_control/ auxhist14_end_s
NAMELIST /time_control/ auxhist14_end									NAMELIST /time_control/ auxhist14_end
NAMELIST /time_control/ io_form_auxhist14								NAMELIST /time_control/ io_form_auxhist14
NAMELIST /time_control/ frames_per_auxhist14								NAMELIST /time_control/ frames_per_auxhist14
NAMELIST /time_control/ auxhist15_inname								NAMELIST /time_control/ auxhist15_inname
NAMELIST /time_control/ auxhist15_outname								NAMELIST /time_control/ auxhist15_outname
NAMELIST /time_control/ auxhist15_interval_y								NAMELIST /time_control/ auxhist15_interval_y
NAMELIST /time_control/ auxhist15_interval_d								NAMELIST /time_control/ auxhist15_interval_d
NAMELIST /time_control/ auxhist15_interval_h								NAMELIST /time_control/ auxhist15_interval_h
NAMELIST /time_control/ auxhist15_interval_m								NAMELIST /time_control/ auxhist15_interval_m
NAMELIST /time_control/ auxhist15_interval_s								NAMELIST /time_control/ auxhist15_interval_s
NAMELIST /time_control/ auxhist15_interval								NAMELIST /time_control/ auxhist15_interval
NAMELIST /time_control/ auxhist15_begin_y								NAMELIST /time_control/ auxhist15_begin_y
NAMELIST /time_control/ auxhist15_begin_d								NAMELIST /time_control/ auxhist15_begin_d
NAMELIST /time_control/ auxhist15_begin_h								NAMELIST /time_control/ auxhist15_begin_h
NAMELIST /time_control/ auxhist15_begin_m								NAMELIST /time_control/ auxhist15_begin_m
NAMELIST /time_control/ auxhist15_begin_s								NAMELIST /time_control/ auxhist15_begin_s
NAMELIST /time_control/ auxhist15_begin									NAMELIST /time_control/ auxhist15_begin
NAMELIST /time_control/ auxhist15_end_y									NAMELIST /time_control/ auxhist15_end_y
NAMELIST /time_control/ auxhist15_end_d									NAMELIST /time_control/ auxhist15_end_d
NAMELIST /time_control/ auxhist15_end_h									NAMELIST /time_control/ auxhist15_end_h
NAMELIST /time_control/ auxhist15_end_m									NAMELIST /time_control/ auxhist15_end_m
NAMELIST /time_control/ auxhist15_end_s									NAMELIST /time_control/ auxhist15_end_s
NAMELIST /time_control/ auxhist15_end									NAMELIST /time_control/ auxhist15_end
NAMELIST /time_control/ io_form_auxhist15								NAMELIST /time_control/ io_form_auxhist15
NAMELIST /time_control/ frames_per_auxhist15								NAMELIST /time_control/ frames_per_auxhist15
NAMELIST /time_control/ auxhist16_inname								NAMELIST /time_control/ auxhist16_inname
NAMELIST /time_control/ auxhist16_outname								NAMELIST /time_control/ auxhist16_outname
NAMELIST /time_control/ auxhist16_interval_y								NAMELIST /time_control/ auxhist16_interval_y
NAMELIST /time_control/ auxhist16_interval_d								NAMELIST /time_control/ auxhist16_interval_d
NAMELIST /time_control/ auxhist16_interval_h								NAMELIST /time_control/ auxhist16_interval_h
NAMELIST /time_control/ auxhist16_interval_m								NAMELIST /time_control/ auxhist16_interval_m
NAMELIST /time_control/ auxhist16_interval_s								NAMELIST /time_control/ auxhist16_interval_s
NAMELIST /time_control/ auxhist16_interval								NAMELIST /time_control/ auxhist16_interval
NAMELIST /time_control/ auxhist16_begin_y								NAMELIST /time_control/ auxhist16_begin_y
NAMELIST /time_control/ auxhist16_begin_d								NAMELIST /time_control/ auxhist16_begin_d
NAMELIST /time_control/ auxhist16_begin_h								NAMELIST /time_control/ auxhist16_begin_h
NAMELIST /time_control/ auxhist16_begin_m								NAMELIST /time_control/ auxhist16_begin_m
NAMELIST /time_control/ auxhist16_begin_s								NAMELIST /time_control/ auxhist16_begin_s
NAMELIST /time_control/ auxhist16_begin									NAMELIST /time_control/ auxhist16_begin
NAMELIST /time_control/ auxhist16_end_y									NAMELIST /time_control/ auxhist16_end_y
NAMELIST /time_control/ auxhist16_end_d									NAMELIST /time_control/ auxhist16_end_d
NAMELIST /time_control/ auxhist16_end_h									NAMELIST /time_control/ auxhist16_end_h
NAMELIST /time_control/ auxhist16_end_m									NAMELIST /time_control/ auxhist16_end_m
NAMELIST /time_control/ auxhist16_end_s									NAMELIST /time_control/ auxhist16_end_s
NAMELIST /time_control/ auxhist16_end									NAMELIST /time_control/ auxhist16_end
NAMELIST /time_control/ io_form_auxhist16								NAMELIST /time_control/ io_form_auxhist16
NAMELIST /time_control/ frames_per_auxhist16								NAMELIST /time_control/ frames_per_auxhist16
NAMELIST /time_control/ auxhist17_inname								NAMELIST /time_control/ auxhist17_inname
NAMELIST /time_control/ auxhist17_outname								NAMELIST /time_control/ auxhist17_outname
NAMELIST /time_control/ auxhist17_interval_y								NAMELIST /time_control/ auxhist17_interval_y
NAMELIST /time_control/ auxhist17_interval_d								NAMELIST /time_control/ auxhist17_interval_d
NAMELIST /time_control/ auxhist17_interval_h								NAMELIST /time_control/ auxhist17_interval_h
NAMELIST /time_control/ auxhist17_interval_m								NAMELIST /time_control/ auxhist17_interval_m
NAMELIST /time_control/ auxhist17_interval_s								NAMELIST /time_control/ auxhist17_interval_s
NAMELIST /time_control/ auxhist17_interval								NAMELIST /time_control/ auxhist17_interval
NAMELIST /time_control/ auxhist17_begin_y								NAMELIST /time_control/ auxhist17_begin_y
NAMELIST /time_control/ auxhist17_begin_d								NAMELIST /time_control/ auxhist17_begin_d
NAMELIST /time_control/ auxhist17_begin_h								NAMELIST /time_control/ auxhist17_begin_h
NAMELIST /time_control/ auxhist17_begin_m								NAMELIST /time_control/ auxhist17_begin_m
NAMELIST /time_control/ auxhist17_begin_s								NAMELIST /time_control/ auxhist17_begin_s
NAMELIST /time_control/ auxhist17_begin									NAMELIST /time_control/ auxhist17_begin
NAMELIST /time_control/ auxhist17_end_y									NAMELIST /time_control/ auxhist17_end_y
NAMELIST /time_control/ auxhist17_end_d									NAMELIST /time_control/ auxhist17_end_d
NAMELIST /time_control/ auxhist17_end_h									NAMELIST /time_control/ auxhist17_end_h
NAMELIST /time_control/ auxhist17_end_m									NAMELIST /time_control/ auxhist17_end_m
NAMELIST /time_control/ auxhist17_end_s									NAMELIST /time_control/ auxhist17_end_s
NAMELIST /time_control/ auxhist17_end									NAMELIST /time_control/ auxhist17_end
NAMELIST /time_control/ io_form_auxhist17								NAMELIST /time_control/ io_form_auxhist17
NAMELIST /time_control/ frames_per_auxhist17								NAMELIST /time_control/ frames_per_auxhist17
NAMELIST /time_control/ auxhist18_inname								NAMELIST /time_control/ auxhist18_inname
NAMELIST /time_control/ auxhist18_outname								NAMELIST /time_control/ auxhist18_outname
NAMELIST /time_control/ auxhist18_interval_y								NAMELIST /time_control/ auxhist18_interval_y
NAMELIST /time_control/ auxhist18_interval_d								NAMELIST /time_control/ auxhist18_interval_d
NAMELIST /time_control/ auxhist18_interval_h								NAMELIST /time_control/ auxhist18_interval_h
NAMELIST /time_control/ auxhist18_interval_m								NAMELIST /time_control/ auxhist18_interval_m
NAMELIST /time_control/ auxhist18_interval_s								NAMELIST /time_control/ auxhist18_interval_s
NAMELIST /time_control/ auxhist18_interval								NAMELIST /time_control/ auxhist18_interval
NAMELIST /time_control/ auxhist18_begin_y								NAMELIST /time_control/ auxhist18_begin_y
NAMELIST /time_control/ auxhist18_begin_d								NAMELIST /time_control/ auxhist18_begin_d
NAMELIST /time_control/ auxhist18_begin_h								NAMELIST /time_control/ auxhist18_begin_h
NAMELIST /time_control/ auxhist18_begin_m								NAMELIST /time_control/ auxhist18_begin_m
NAMELIST /time_control/ auxhist18_begin_s								NAMELIST /time_control/ auxhist18_begin_s
NAMELIST /time_control/ auxhist18_begin									NAMELIST /time_control/ auxhist18_begin
NAMELIST /time_control/ auxhist18_end_y									NAMELIST /time_control/ auxhist18_end_y
NAMELIST /time_control/ auxhist18_end_d									NAMELIST /time_control/ auxhist18_end_d
NAMELIST /time_control/ auxhist18_end_h									NAMELIST /time_control/ auxhist18_end_h
NAMELIST /time_control/ auxhist18_end_m									NAMELIST /time_control/ auxhist18_end_m
NAMELIST /time_control/ auxhist18_end_s									NAMELIST /time_control/ auxhist18_end_s
NAMELIST /time_control/ auxhist18_end									NAMELIST /time_control/ auxhist18_end
NAMELIST /time_control/ io_form_auxhist18								NAMELIST /time_control/ io_form_auxhist18
NAMELIST /time_control/ frames_per_auxhist18								NAMELIST /time_control/ frames_per_auxhist18
NAMELIST /time_control/ auxhist19_inname								NAMELIST /time_control/ auxhist19_inname
NAMELIST /time_control/ auxhist19_outname								NAMELIST /time_control/ auxhist19_outname
NAMELIST /time_control/ auxhist19_interval_y								NAMELIST /time_control/ auxhist19_interval_y
NAMELIST /time_control/ auxhist19_interval_d								NAMELIST /time_control/ auxhist19_interval_d
NAMELIST /time_control/ auxhist19_interval_h								NAMELIST /time_control/ auxhist19_interval_h
NAMELIST /time_control/ auxhist19_interval_m								NAMELIST /time_control/ auxhist19_interval_m
NAMELIST /time_control/ auxhist19_interval_s								NAMELIST /time_control/ auxhist19_interval_s
NAMELIST /time_control/ auxhist19_interval								NAMELIST /time_control/ auxhist19_interval
NAMELIST /time_control/ auxhist19_begin_y								NAMELIST /time_control/ auxhist19_begin_y
NAMELIST /time_control/ auxhist19_begin_d								NAMELIST /time_control/ auxhist19_begin_d
NAMELIST /time_control/ auxhist19_begin_h								NAMELIST /time_control/ auxhist19_begin_h
NAMELIST /time_control/ auxhist19_begin_m								NAMELIST /time_control/ auxhist19_begin_m
NAMELIST /time_control/ auxhist19_begin_s								NAMELIST /time_control/ auxhist19_begin_s
NAMELIST /time_control/ auxhist19_begin									NAMELIST /time_control/ auxhist19_begin
NAMELIST /time_control/ auxhist19_end_y									NAMELIST /time_control/ auxhist19_end_y
NAMELIST /time_control/ auxhist19_end_d									NAMELIST /time_control/ auxhist19_end_d
NAMELIST /time_control/ auxhist19_end_h									NAMELIST /time_control/ auxhist19_end_h
NAMELIST /time_control/ auxhist19_end_m									NAMELIST /time_control/ auxhist19_end_m
NAMELIST /time_control/ auxhist19_end_s									NAMELIST /time_control/ auxhist19_end_s
NAMELIST /time_control/ auxhist19_end									NAMELIST /time_control/ auxhist19_end
NAMELIST /time_control/ io_form_auxhist19								NAMELIST /time_control/ io_form_auxhist19
NAMELIST /time_control/ frames_per_auxhist19								NAMELIST /time_control/ frames_per_auxhist19
NAMELIST /time_control/ auxhist20_inname								NAMELIST /time_control/ auxhist20_inname
NAMELIST /time_control/ auxhist20_outname								NAMELIST /time_control/ auxhist20_outname
NAMELIST /time_control/ auxhist20_interval_y								NAMELIST /time_control/ auxhist20_interval_y
NAMELIST /time_control/ auxhist20_interval_d								NAMELIST /time_control/ auxhist20_interval_d
NAMELIST /time_control/ auxhist20_interval_h								NAMELIST /time_control/ auxhist20_interval_h
NAMELIST /time_control/ auxhist20_interval_m								NAMELIST /time_control/ auxhist20_interval_m
NAMELIST /time_control/ auxhist20_interval_s								NAMELIST /time_control/ auxhist20_interval_s
NAMELIST /time_control/ auxhist20_interval								NAMELIST /time_control/ auxhist20_interval
NAMELIST /time_control/ auxhist20_begin_y								NAMELIST /time_control/ auxhist20_begin_y
NAMELIST /time_control/ auxhist20_begin_d								NAMELIST /time_control/ auxhist20_begin_d
NAMELIST /time_control/ auxhist20_begin_h								NAMELIST /time_control/ auxhist20_begin_h
NAMELIST /time_control/ auxhist20_begin_m								NAMELIST /time_control/ auxhist20_begin_m
NAMELIST /time_control/ auxhist20_begin_s								NAMELIST /time_control/ auxhist20_begin_s
NAMELIST /time_control/ auxhist20_begin									NAMELIST /time_control/ auxhist20_begin
NAMELIST /time_control/ auxhist20_end_y									NAMELIST /time_control/ auxhist20_end_y
NAMELIST /time_control/ auxhist20_end_d									NAMELIST /time_control/ auxhist20_end_d
NAMELIST /time_control/ auxhist20_end_h									NAMELIST /time_control/ auxhist20_end_h
NAMELIST /time_control/ auxhist20_end_m									NAMELIST /time_control/ auxhist20_end_m
NAMELIST /time_control/ auxhist20_end_s									NAMELIST /time_control/ auxhist20_end_s
NAMELIST /time_control/ auxhist20_end									NAMELIST /time_control/ auxhist20_end
NAMELIST /time_control/ io_form_auxhist20								NAMELIST /time_control/ io_form_auxhist20
NAMELIST /time_control/ frames_per_auxhist20								NAMELIST /time_control/ frames_per_auxhist20
NAMELIST /time_control/ auxhist21_inname								NAMELIST /time_control/ auxhist21_inname
NAMELIST /time_control/ auxhist21_outname								NAMELIST /time_control/ auxhist21_outname
NAMELIST /time_control/ auxhist21_interval_y								NAMELIST /time_control/ auxhist21_interval_y
NAMELIST /time_control/ auxhist21_interval_d								NAMELIST /time_control/ auxhist21_interval_d
NAMELIST /time_control/ auxhist21_interval_h								NAMELIST /time_control/ auxhist21_interval_h
NAMELIST /time_control/ auxhist21_interval_m								NAMELIST /time_control/ auxhist21_interval_m
NAMELIST /time_control/ auxhist21_interval_s								NAMELIST /time_control/ auxhist21_interval_s
NAMELIST /time_control/ auxhist21_interval								NAMELIST /time_control/ auxhist21_interval
NAMELIST /time_control/ auxhist21_begin_y								NAMELIST /time_control/ auxhist21_begin_y
NAMELIST /time_control/ auxhist21_begin_d								NAMELIST /time_control/ auxhist21_begin_d
NAMELIST /time_control/ auxhist21_begin_h								NAMELIST /time_control/ auxhist21_begin_h
NAMELIST /time_control/ auxhist21_begin_m								NAMELIST /time_control/ auxhist21_begin_m
NAMELIST /time_control/ auxhist21_begin_s								NAMELIST /time_control/ auxhist21_begin_s
NAMELIST /time_control/ auxhist21_begin									NAMELIST /time_control/ auxhist21_begin
NAMELIST /time_control/ auxhist21_end_y									NAMELIST /time_control/ auxhist21_end_y
NAMELIST /time_control/ auxhist21_end_d									NAMELIST /time_control/ auxhist21_end_d
NAMELIST /time_control/ auxhist21_end_h									NAMELIST /time_control/ auxhist21_end_h
NAMELIST /time_control/ auxhist21_end_m									NAMELIST /time_control/ auxhist21_end_m
NAMELIST /time_control/ auxhist21_end_s									NAMELIST /time_control/ auxhist21_end_s
NAMELIST /time_control/ auxhist21_end									NAMELIST /time_control/ auxhist21_end
NAMELIST /time_control/ io_form_auxhist21								NAMELIST /time_control/ io_form_auxhist21
NAMELIST /time_control/ frames_per_auxhist21								NAMELIST /time_control/ frames_per_auxhist21
NAMELIST /time_control/ auxhist22_inname								NAMELIST /time_control/ auxhist22_inname
NAMELIST /time_control/ auxhist22_outname								NAMELIST /time_control/ auxhist22_outname
NAMELIST /time_control/ auxhist22_interval_y								NAMELIST /time_control/ auxhist22_interval_y
NAMELIST /time_control/ auxhist22_interval_d								NAMELIST /time_control/ auxhist22_interval_d
NAMELIST /time_control/ auxhist22_interval_h								NAMELIST /time_control/ auxhist22_interval_h
NAMELIST /time_control/ auxhist22_interval_m								NAMELIST /time_control/ auxhist22_interval_m
NAMELIST /time_control/ auxhist22_interval_s								NAMELIST /time_control/ auxhist22_interval_s
NAMELIST /time_control/ auxhist22_interval								NAMELIST /time_control/ auxhist22_interval
NAMELIST /time_control/ auxhist22_begin_y								NAMELIST /time_control/ auxhist22_begin_y
NAMELIST /time_control/ auxhist22_begin_d								NAMELIST /time_control/ auxhist22_begin_d
NAMELIST /time_control/ auxhist22_begin_h								NAMELIST /time_control/ auxhist22_begin_h
NAMELIST /time_control/ auxhist22_begin_m								NAMELIST /time_control/ auxhist22_begin_m
NAMELIST /time_control/ auxhist22_begin_s								NAMELIST /time_control/ auxhist22_begin_s
NAMELIST /time_control/ auxhist22_begin									NAMELIST /time_control/ auxhist22_begin
NAMELIST /time_control/ auxhist22_end_y									NAMELIST /time_control/ auxhist22_end_y
NAMELIST /time_control/ auxhist22_end_d									NAMELIST /time_control/ auxhist22_end_d
NAMELIST /time_control/ auxhist22_end_h									NAMELIST /time_control/ auxhist22_end_h
NAMELIST /time_control/ auxhist22_end_m									NAMELIST /time_control/ auxhist22_end_m
NAMELIST /time_control/ auxhist22_end_s									NAMELIST /time_control/ auxhist22_end_s
NAMELIST /time_control/ auxhist22_end									NAMELIST /time_control/ auxhist22_end
NAMELIST /time_control/ io_form_auxhist22								NAMELIST /time_control/ io_form_auxhist22
NAMELIST /time_control/ frames_per_auxhist22								NAMELIST /time_control/ frames_per_auxhist22
NAMELIST /time_control/ auxhist23_inname								NAMELIST /time_control/ auxhist23_inname
NAMELIST /time_control/ auxhist23_outname								NAMELIST /time_control/ auxhist23_outname
NAMELIST /time_control/ auxhist23_interval_y								NAMELIST /time_control/ auxhist23_interval_y
NAMELIST /time_control/ auxhist23_interval_d								NAMELIST /time_control/ auxhist23_interval_d
NAMELIST /time_control/ auxhist23_interval_h								NAMELIST /time_control/ auxhist23_interval_h
NAMELIST /time_control/ auxhist23_interval_m								NAMELIST /time_control/ auxhist23_interval_m
NAMELIST /time_control/ auxhist23_interval_s								NAMELIST /time_control/ auxhist23_interval_s
NAMELIST /time_control/ auxhist23_interval								NAMELIST /time_control/ auxhist23_interval
NAMELIST /time_control/ auxhist23_begin_y								NAMELIST /time_control/ auxhist23_begin_y
NAMELIST /time_control/ auxhist23_begin_d								NAMELIST /time_control/ auxhist23_begin_d
NAMELIST /time_control/ auxhist23_begin_h								NAMELIST /time_control/ auxhist23_begin_h
NAMELIST /time_control/ auxhist23_begin_m								NAMELIST /time_control/ auxhist23_begin_m
NAMELIST /time_control/ auxhist23_begin_s								NAMELIST /time_control/ auxhist23_begin_s
NAMELIST /time_control/ auxhist23_begin									NAMELIST /time_control/ auxhist23_begin
NAMELIST /time_control/ auxhist23_end_y									NAMELIST /time_control/ auxhist23_end_y
NAMELIST /time_control/ auxhist23_end_d									NAMELIST /time_control/ auxhist23_end_d
NAMELIST /time_control/ auxhist23_end_h									NAMELIST /time_control/ auxhist23_end_h
NAMELIST /time_control/ auxhist23_end_m									NAMELIST /time_control/ auxhist23_end_m
NAMELIST /time_control/ auxhist23_end_s									NAMELIST /time_control/ auxhist23_end_s
NAMELIST /time_control/ auxhist23_end									NAMELIST /time_control/ auxhist23_end
NAMELIST /time_control/ io_form_auxhist23								NAMELIST /time_control/ io_form_auxhist23
NAMELIST /time_control/ frames_per_auxhist23								NAMELIST /time_control/ frames_per_auxhist23
NAMELIST /time_control/ auxhist24_inname								NAMELIST /time_control/ auxhist24_inname
NAMELIST /time_control/ auxhist24_outname								NAMELIST /time_control/ auxhist24_outname
NAMELIST /time_control/ auxhist24_interval_y								NAMELIST /time_control/ auxhist24_interval_y
NAMELIST /time_control/ auxhist24_interval_d								NAMELIST /time_control/ auxhist24_interval_d
NAMELIST /time_control/ auxhist24_interval_h								NAMELIST /time_control/ auxhist24_interval_h
NAMELIST /time_control/ auxhist24_interval_m								NAMELIST /time_control/ auxhist24_interval_m
NAMELIST /time_control/ auxhist24_interval_s								NAMELIST /time_control/ auxhist24_interval_s
NAMELIST /time_control/ auxhist24_interval								NAMELIST /time_control/ auxhist24_interval
NAMELIST /time_control/ auxhist24_begin_y								NAMELIST /time_control/ auxhist24_begin_y
NAMELIST /time_control/ auxhist24_begin_d								NAMELIST /time_control/ auxhist24_begin_d
NAMELIST /time_control/ auxhist24_begin_h								NAMELIST /time_control/ auxhist24_begin_h
NAMELIST /time_control/ auxhist24_begin_m								NAMELIST /time_control/ auxhist24_begin_m
NAMELIST /time_control/ auxhist24_begin_s								NAMELIST /time_control/ auxhist24_begin_s
NAMELIST /time_control/ auxhist24_begin									NAMELIST /time_control/ auxhist24_begin
NAMELIST /time_control/ auxhist24_end_y									NAMELIST /time_control/ auxhist24_end_y
NAMELIST /time_control/ auxhist24_end_d									NAMELIST /time_control/ auxhist24_end_d
NAMELIST /time_control/ auxhist24_end_h									NAMELIST /time_control/ auxhist24_end_h
NAMELIST /time_control/ auxhist24_end_m									NAMELIST /time_control/ auxhist24_end_m
NAMELIST /time_control/ auxhist24_end_s									NAMELIST /time_control/ auxhist24_end_s
NAMELIST /time_control/ auxhist24_end									NAMELIST /time_control/ auxhist24_end
NAMELIST /time_control/ io_form_auxhist24								NAMELIST /time_control/ io_form_auxhist24
NAMELIST /time_control/ frames_per_auxhist24								NAMELIST /time_control/ frames_per_auxhist24
NAMELIST /time_control/ auxinput1_outname								NAMELIST /time_control/ auxinput1_outname
NAMELIST /time_control/ auxinput1_interval_y								NAMELIST /time_control/ auxinput1_interval_y
NAMELIST /time_control/ auxinput1_interval_d								NAMELIST /time_control/ auxinput1_interval_d
NAMELIST /time_control/ auxinput1_interval_h								NAMELIST /time_control/ auxinput1_interval_h
NAMELIST /time_control/ auxinput1_interval_m								NAMELIST /time_control/ auxinput1_interval_m
NAMELIST /time_control/ auxinput1_interval_s								NAMELIST /time_control/ auxinput1_interval_s
NAMELIST /time_control/ auxinput1_interval								NAMELIST /time_control/ auxinput1_interval
NAMELIST /time_control/ auxinput1_begin_y								NAMELIST /time_control/ auxinput1_begin_y
NAMELIST /time_control/ auxinput1_begin_d								NAMELIST /time_control/ auxinput1_begin_d
NAMELIST /time_control/ auxinput1_begin_h								NAMELIST /time_control/ auxinput1_begin_h
NAMELIST /time_control/ auxinput1_begin_m								NAMELIST /time_control/ auxinput1_begin_m
NAMELIST /time_control/ auxinput1_begin_s								NAMELIST /time_control/ auxinput1_begin_s
NAMELIST /time_control/ auxinput1_begin									NAMELIST /time_control/ auxinput1_begin
NAMELIST /time_control/ auxinput1_end_y									NAMELIST /time_control/ auxinput1_end_y
NAMELIST /time_control/ auxinput1_end_d									NAMELIST /time_control/ auxinput1_end_d
NAMELIST /time_control/ auxinput1_end_h									NAMELIST /time_control/ auxinput1_end_h
NAMELIST /time_control/ auxinput1_end_m									NAMELIST /time_control/ auxinput1_end_m
NAMELIST /time_control/ auxinput1_end_s									NAMELIST /time_control/ auxinput1_end_s
NAMELIST /time_control/ auxinput1_end									NAMELIST /time_control/ auxinput1_end
NAMELIST /time_control/ frames_per_auxinput1								NAMELIST /time_control/ frames_per_auxinput1
NAMELIST /time_control/ auxinput2_inname								NAMELIST /time_control/ auxinput2_inname
NAMELIST /time_control/ auxinput2_outname								NAMELIST /time_control/ auxinput2_outname
NAMELIST /time_control/ auxinput2_interval_y								NAMELIST /time_control/ auxinput2_interval_y
NAMELIST /time_control/ auxinput2_interval_d								NAMELIST /time_control/ auxinput2_interval_d
NAMELIST /time_control/ auxinput2_interval_h								NAMELIST /time_control/ auxinput2_interval_h
NAMELIST /time_control/ auxinput2_interval_m								NAMELIST /time_control/ auxinput2_interval_m
NAMELIST /time_control/ auxinput2_interval_s								NAMELIST /time_control/ auxinput2_interval_s
NAMELIST /time_control/ auxinput2_interval								NAMELIST /time_control/ auxinput2_interval
NAMELIST /time_control/ auxinput2_begin_y								NAMELIST /time_control/ auxinput2_begin_y
NAMELIST /time_control/ auxinput2_begin_d								NAMELIST /time_control/ auxinput2_begin_d
NAMELIST /time_control/ auxinput2_begin_h								NAMELIST /time_control/ auxinput2_begin_h
NAMELIST /time_control/ auxinput2_begin_m								NAMELIST /time_control/ auxinput2_begin_m
NAMELIST /time_control/ auxinput2_begin_s								NAMELIST /time_control/ auxinput2_begin_s
NAMELIST /time_control/ auxinput2_begin									NAMELIST /time_control/ auxinput2_begin
NAMELIST /time_control/ auxinput2_end_y									NAMELIST /time_control/ auxinput2_end_y
NAMELIST /time_control/ auxinput2_end_d									NAMELIST /time_control/ auxinput2_end_d
NAMELIST /time_control/ auxinput2_end_h									NAMELIST /time_control/ auxinput2_end_h
NAMELIST /time_control/ auxinput2_end_m									NAMELIST /time_control/ auxinput2_end_m
NAMELIST /time_control/ auxinput2_end_s									NAMELIST /time_control/ auxinput2_end_s
NAMELIST /time_control/ auxinput2_end									NAMELIST /time_control/ auxinput2_end
NAMELIST /time_control/ io_form_auxinput2								NAMELIST /time_control/ io_form_auxinput2
NAMELIST /time_control/ frames_per_auxinput2								NAMELIST /time_control/ frames_per_auxinput2
NAMELIST /time_control/ auxinput3_inname								NAMELIST /time_control/ auxinput3_inname
NAMELIST /time_control/ auxinput3_outname								NAMELIST /time_control/ auxinput3_outname
NAMELIST /time_control/ auxinput3_interval_y								NAMELIST /time_control/ auxinput3_interval_y
NAMELIST /time_control/ auxinput3_interval_d								NAMELIST /time_control/ auxinput3_interval_d
NAMELIST /time_control/ auxinput3_interval_h								NAMELIST /time_control/ auxinput3_interval_h
NAMELIST /time_control/ auxinput3_interval_m								NAMELIST /time_control/ auxinput3_interval_m
NAMELIST /time_control/ auxinput3_interval_s								NAMELIST /time_control/ auxinput3_interval_s
NAMELIST /time_control/ auxinput3_interval								NAMELIST /time_control/ auxinput3_interval
NAMELIST /time_control/ auxinput3_begin_y								NAMELIST /time_control/ auxinput3_begin_y
NAMELIST /time_control/ auxinput3_begin_d								NAMELIST /time_control/ auxinput3_begin_d
NAMELIST /time_control/ auxinput3_begin_h								NAMELIST /time_control/ auxinput3_begin_h
NAMELIST /time_control/ auxinput3_begin_m								NAMELIST /time_control/ auxinput3_begin_m
NAMELIST /time_control/ auxinput3_begin_s								NAMELIST /time_control/ auxinput3_begin_s
NAMELIST /time_control/ auxinput3_begin									NAMELIST /time_control/ auxinput3_begin
NAMELIST /time_control/ auxinput3_end_y									NAMELIST /time_control/ auxinput3_end_y
NAMELIST /time_control/ auxinput3_end_d									NAMELIST /time_control/ auxinput3_end_d
NAMELIST /time_control/ auxinput3_end_h									NAMELIST /time_control/ auxinput3_end_h
NAMELIST /time_control/ auxinput3_end_m									NAMELIST /time_control/ auxinput3_end_m
NAMELIST /time_control/ auxinput3_end_s									NAMELIST /time_control/ auxinput3_end_s
NAMELIST /time_control/ auxinput3_end									NAMELIST /time_control/ auxinput3_end
NAMELIST /time_control/ io_form_auxinput3								NAMELIST /time_control/ io_form_auxinput3
NAMELIST /time_control/ frames_per_auxinput3								NAMELIST /time_control/ frames_per_auxinput3
NAMELIST /time_control/ auxinput4_inname								NAMELIST /time_control/ auxinput4_inname
NAMELIST /time_control/ auxinput4_outname								NAMELIST /time_control/ auxinput4_outname
NAMELIST /time_control/ auxinput4_interval_y								NAMELIST /time_control/ auxinput4_interval_y
NAMELIST /time_control/ auxinput4_interval_d								NAMELIST /time_control/ auxinput4_interval_d
NAMELIST /time_control/ auxinput4_interval_h								NAMELIST /time_control/ auxinput4_interval_h
NAMELIST /time_control/ auxinput4_interval_m								NAMELIST /time_control/ auxinput4_interval_m
NAMELIST /time_control/ auxinput4_interval_s								NAMELIST /time_control/ auxinput4_interval_s
NAMELIST /time_control/ auxinput4_interval								NAMELIST /time_control/ auxinput4_interval
NAMELIST /time_control/ auxinput4_begin_y								NAMELIST /time_control/ auxinput4_begin_y
NAMELIST /time_control/ auxinput4_begin_d								NAMELIST /time_control/ auxinput4_begin_d
NAMELIST /time_control/ auxinput4_begin_h								NAMELIST /time_control/ auxinput4_begin_h
NAMELIST /time_control/ auxinput4_begin_m								NAMELIST /time_control/ auxinput4_begin_m
NAMELIST /time_control/ auxinput4_begin_s								NAMELIST /time_control/ auxinput4_begin_s
NAMELIST /time_control/ auxinput4_begin									NAMELIST /time_control/ auxinput4_begin
NAMELIST /time_control/ auxinput4_end_y									NAMELIST /time_control/ auxinput4_end_y
NAMELIST /time_control/ auxinput4_end_d									NAMELIST /time_control/ auxinput4_end_d
NAMELIST /time_control/ auxinput4_end_h									NAMELIST /time_control/ auxinput4_end_h
NAMELIST /time_control/ auxinput4_end_m									NAMELIST /time_control/ auxinput4_end_m
NAMELIST /time_control/ auxinput4_end_s									NAMELIST /time_control/ auxinput4_end_s
NAMELIST /time_control/ auxinput4_end									NAMELIST /time_control/ auxinput4_end
NAMELIST /time_control/ io_form_auxinput4								NAMELIST /time_control/ io_form_auxinput4
NAMELIST /time_control/ frames_per_auxinput4								NAMELIST /time_control/ frames_per_auxinput4
NAMELIST /time_control/ auxinput5_inname								NAMELIST /time_control/ auxinput5_inname
NAMELIST /time_control/ auxinput5_outname								NAMELIST /time_control/ auxinput5_outname
NAMELIST /time_control/ auxinput5_interval_y								NAMELIST /time_control/ auxinput5_interval_y
NAMELIST /time_control/ auxinput5_interval_d								NAMELIST /time_control/ auxinput5_interval_d
NAMELIST /time_control/ auxinput5_interval_h								NAMELIST /time_control/ auxinput5_interval_h
NAMELIST /time_control/ auxinput5_interval_m								NAMELIST /time_control/ auxinput5_interval_m
NAMELIST /time_control/ auxinput5_interval_s								NAMELIST /time_control/ auxinput5_interval_s
NAMELIST /time_control/ auxinput5_interval								NAMELIST /time_control/ auxinput5_interval
NAMELIST /time_control/ auxinput5_begin_y								NAMELIST /time_control/ auxinput5_begin_y
NAMELIST /time_control/ auxinput5_begin_d								NAMELIST /time_control/ auxinput5_begin_d
NAMELIST /time_control/ auxinput5_begin_h								NAMELIST /time_control/ auxinput5_begin_h
NAMELIST /time_control/ auxinput5_begin_m								NAMELIST /time_control/ auxinput5_begin_m
NAMELIST /time_control/ auxinput5_begin_s								NAMELIST /time_control/ auxinput5_begin_s
NAMELIST /time_control/ auxinput5_begin									NAMELIST /time_control/ auxinput5_begin
NAMELIST /time_control/ auxinput5_end_y									NAMELIST /time_control/ auxinput5_end_y
NAMELIST /time_control/ auxinput5_end_d									NAMELIST /time_control/ auxinput5_end_d
NAMELIST /time_control/ auxinput5_end_h									NAMELIST /time_control/ auxinput5_end_h
NAMELIST /time_control/ auxinput5_end_m									NAMELIST /time_control/ auxinput5_end_m
NAMELIST /time_control/ auxinput5_end_s									NAMELIST /time_control/ auxinput5_end_s
NAMELIST /time_control/ auxinput5_end									NAMELIST /time_control/ auxinput5_end
NAMELIST /time_control/ io_form_auxinput5								NAMELIST /time_control/ io_form_auxinput5
NAMELIST /time_control/ frames_per_auxinput5								NAMELIST /time_control/ frames_per_auxinput5
NAMELIST /time_control/ auxinput6_inname								NAMELIST /time_control/ auxinput6_inname
NAMELIST /time_control/ auxinput6_outname								NAMELIST /time_control/ auxinput6_outname
NAMELIST /time_control/ auxinput6_interval_y								NAMELIST /time_control/ auxinput6_interval_y
NAMELIST /time_control/ auxinput6_interval_d								NAMELIST /time_control/ auxinput6_interval_d
NAMELIST /time_control/ auxinput6_interval_h								NAMELIST /time_control/ auxinput6_interval_h
NAMELIST /time_control/ auxinput6_interval_m								NAMELIST /time_control/ auxinput6_interval_m
NAMELIST /time_control/ auxinput6_interval_s								NAMELIST /time_control/ auxinput6_interval_s
NAMELIST /time_control/ auxinput6_interval								NAMELIST /time_control/ auxinput6_interval
NAMELIST /time_control/ auxinput6_begin_y								NAMELIST /time_control/ auxinput6_begin_y
NAMELIST /time_control/ auxinput6_begin_d								NAMELIST /time_control/ auxinput6_begin_d
NAMELIST /time_control/ auxinput6_begin_h								NAMELIST /time_control/ auxinput6_begin_h
NAMELIST /time_control/ auxinput6_begin_m								NAMELIST /time_control/ auxinput6_begin_m
NAMELIST /time_control/ auxinput6_begin_s								NAMELIST /time_control/ auxinput6_begin_s
NAMELIST /time_control/ auxinput6_begin									NAMELIST /time_control/ auxinput6_begin
NAMELIST /time_control/ auxinput6_end_y									NAMELIST /time_control/ auxinput6_end_y
NAMELIST /time_control/ auxinput6_end_d									NAMELIST /time_control/ auxinput6_end_d
NAMELIST /time_control/ auxinput6_end_h									NAMELIST /time_control/ auxinput6_end_h
NAMELIST /time_control/ auxinput6_end_m									NAMELIST /time_control/ auxinput6_end_m
NAMELIST /time_control/ auxinput6_end_s									NAMELIST /time_control/ auxinput6_end_s
NAMELIST /time_control/ auxinput6_end									NAMELIST /time_control/ auxinput6_end
NAMELIST /time_control/ io_form_auxinput6								NAMELIST /time_control/ io_form_auxinput6
NAMELIST /time_control/ frames_per_auxinput6								NAMELIST /time_control/ frames_per_auxinput6
NAMELIST /time_control/ auxinput7_inname								NAMELIST /time_control/ auxinput7_inname
NAMELIST /time_control/ auxinput7_outname								NAMELIST /time_control/ auxinput7_outname
NAMELIST /time_control/ auxinput7_interval_y								NAMELIST /time_control/ auxinput7_interval_y
NAMELIST /time_control/ auxinput7_interval_d								NAMELIST /time_control/ auxinput7_interval_d
NAMELIST /time_control/ auxinput7_interval_h								NAMELIST /time_control/ auxinput7_interval_h
NAMELIST /time_control/ auxinput7_interval_m								NAMELIST /time_control/ auxinput7_interval_m
NAMELIST /time_control/ auxinput7_interval_s								NAMELIST /time_control/ auxinput7_interval_s
NAMELIST /time_control/ auxinput7_interval								NAMELIST /time_control/ auxinput7_interval
NAMELIST /time_control/ auxinput7_begin_y								NAMELIST /time_control/ auxinput7_begin_y
NAMELIST /time_control/ auxinput7_begin_d								NAMELIST /time_control/ auxinput7_begin_d
NAMELIST /time_control/ auxinput7_begin_h								NAMELIST /time_control/ auxinput7_begin_h
NAMELIST /time_control/ auxinput7_begin_m								NAMELIST /time_control/ auxinput7_begin_m
NAMELIST /time_control/ auxinput7_begin_s								NAMELIST /time_control/ auxinput7_begin_s
NAMELIST /time_control/ auxinput7_begin									NAMELIST /time_control/ auxinput7_begin
NAMELIST /time_control/ auxinput7_end_y									NAMELIST /time_control/ auxinput7_end_y
NAMELIST /time_control/ auxinput7_end_d									NAMELIST /time_control/ auxinput7_end_d
NAMELIST /time_control/ auxinput7_end_h									NAMELIST /time_control/ auxinput7_end_h
NAMELIST /time_control/ auxinput7_end_m									NAMELIST /time_control/ auxinput7_end_m
NAMELIST /time_control/ auxinput7_end_s									NAMELIST /time_control/ auxinput7_end_s
NAMELIST /time_control/ auxinput7_end									NAMELIST /time_control/ auxinput7_end
NAMELIST /time_control/ io_form_auxinput7								NAMELIST /time_control/ io_form_auxinput7
NAMELIST /time_control/ frames_per_auxinput7								NAMELIST /time_control/ frames_per_auxinput7
NAMELIST /time_control/ auxinput8_inname								NAMELIST /time_control/ auxinput8_inname
NAMELIST /time_control/ auxinput8_outname								NAMELIST /time_control/ auxinput8_outname
NAMELIST /time_control/ auxinput8_interval_y								NAMELIST /time_control/ auxinput8_interval_y
NAMELIST /time_control/ auxinput8_interval_d								NAMELIST /time_control/ auxinput8_interval_d
NAMELIST /time_control/ auxinput8_interval_h								NAMELIST /time_control/ auxinput8_interval_h
NAMELIST /time_control/ auxinput8_interval_m								NAMELIST /time_control/ auxinput8_interval_m
NAMELIST /time_control/ auxinput8_interval_s								NAMELIST /time_control/ auxinput8_interval_s
NAMELIST /time_control/ auxinput8_interval								NAMELIST /time_control/ auxinput8_interval
NAMELIST /time_control/ auxinput8_begin_y								NAMELIST /time_control/ auxinput8_begin_y
NAMELIST /time_control/ auxinput8_begin_d								NAMELIST /time_control/ auxinput8_begin_d
NAMELIST /time_control/ auxinput8_begin_h								NAMELIST /time_control/ auxinput8_begin_h
NAMELIST /time_control/ auxinput8_begin_m								NAMELIST /time_control/ auxinput8_begin_m
NAMELIST /time_control/ auxinput8_begin_s								NAMELIST /time_control/ auxinput8_begin_s
NAMELIST /time_control/ auxinput8_begin									NAMELIST /time_control/ auxinput8_begin
NAMELIST /time_control/ auxinput8_end_y									NAMELIST /time_control/ auxinput8_end_y
NAMELIST /time_control/ auxinput8_end_d									NAMELIST /time_control/ auxinput8_end_d
NAMELIST /time_control/ auxinput8_end_h									NAMELIST /time_control/ auxinput8_end_h
NAMELIST /time_control/ auxinput8_end_m									NAMELIST /time_control/ auxinput8_end_m
NAMELIST /time_control/ auxinput8_end_s									NAMELIST /time_control/ auxinput8_end_s
NAMELIST /time_control/ auxinput8_end									NAMELIST /time_control/ auxinput8_end
NAMELIST /time_control/ io_form_auxinput8								NAMELIST /time_control/ io_form_auxinput8
NAMELIST /time_control/ frames_per_auxinput8								NAMELIST /time_control/ frames_per_auxinput8
NAMELIST /time_control/ auxinput9_inname								NAMELIST /time_control/ auxinput9_inname
NAMELIST /time_control/ auxinput9_outname								NAMELIST /time_control/ auxinput9_outname
NAMELIST /time_control/ auxinput9_interval_y								NAMELIST /time_control/ auxinput9_interval_y
NAMELIST /time_control/ auxinput9_interval_d								NAMELIST /time_control/ auxinput9_interval_d
NAMELIST /time_control/ auxinput9_interval_h								NAMELIST /time_control/ auxinput9_interval_h
NAMELIST /time_control/ auxinput9_interval_m								NAMELIST /time_control/ auxinput9_interval_m
NAMELIST /time_control/ auxinput9_interval_s								NAMELIST /time_control/ auxinput9_interval_s
NAMELIST /time_control/ auxinput9_interval								NAMELIST /time_control/ auxinput9_interval
NAMELIST /time_control/ auxinput9_begin_y								NAMELIST /time_control/ auxinput9_begin_y
NAMELIST /time_control/ auxinput9_begin_d								NAMELIST /time_control/ auxinput9_begin_d
NAMELIST /time_control/ auxinput9_begin_h								NAMELIST /time_control/ auxinput9_begin_h
NAMELIST /time_control/ auxinput9_begin_m								NAMELIST /time_control/ auxinput9_begin_m
NAMELIST /time_control/ auxinput9_begin_s								NAMELIST /time_control/ auxinput9_begin_s
NAMELIST /time_control/ auxinput9_begin									NAMELIST /time_control/ auxinput9_begin
NAMELIST /time_control/ auxinput9_end_y									NAMELIST /time_control/ auxinput9_end_y
NAMELIST /time_control/ auxinput9_end_d									NAMELIST /time_control/ auxinput9_end_d
NAMELIST /time_control/ auxinput9_end_h									NAMELIST /time_control/ auxinput9_end_h
NAMELIST /time_control/ auxinput9_end_m									NAMELIST /time_control/ auxinput9_end_m
NAMELIST /time_control/ auxinput9_end_s									NAMELIST /time_control/ auxinput9_end_s
NAMELIST /time_control/ auxinput9_end									NAMELIST /time_control/ auxinput9_end
NAMELIST /time_control/ io_form_auxinput9								NAMELIST /time_control/ io_form_auxinput9
NAMELIST /time_control/ frames_per_auxinput9								NAMELIST /time_control/ frames_per_auxinput9
NAMELIST /time_control/ auxinput10_inname								NAMELIST /time_control/ auxinput10_inname
NAMELIST /time_control/ auxinput10_outname								NAMELIST /time_control/ auxinput10_outname
NAMELIST /time_control/ auxinput10_interval_y								NAMELIST /time_control/ auxinput10_interval_y
NAMELIST /time_control/ auxinput10_interval_d								NAMELIST /time_control/ auxinput10_interval_d
NAMELIST /time_control/ auxinput10_interval_h								NAMELIST /time_control/ auxinput10_interval_h
NAMELIST /time_control/ auxinput10_interval_m								NAMELIST /time_control/ auxinput10_interval_m
NAMELIST /time_control/ auxinput10_interval_s								NAMELIST /time_control/ auxinput10_interval_s
NAMELIST /time_control/ auxinput10_interval								NAMELIST /time_control/ auxinput10_interval
NAMELIST /time_control/ auxinput10_begin_y								NAMELIST /time_control/ auxinput10_begin_y
NAMELIST /time_control/ auxinput10_begin_d								NAMELIST /time_control/ auxinput10_begin_d
NAMELIST /time_control/ auxinput10_begin_h								NAMELIST /time_control/ auxinput10_begin_h
NAMELIST /time_control/ auxinput10_begin_m								NAMELIST /time_control/ auxinput10_begin_m
NAMELIST /time_control/ auxinput10_begin_s								NAMELIST /time_control/ auxinput10_begin_s
NAMELIST /time_control/ auxinput10_begin								NAMELIST /time_control/ auxinput10_begin
NAMELIST /time_control/ auxinput10_end_y								NAMELIST /time_control/ auxinput10_end_y
NAMELIST /time_control/ auxinput10_end_d								NAMELIST /time_control/ auxinput10_end_d
NAMELIST /time_control/ auxinput10_end_h								NAMELIST /time_control/ auxinput10_end_h
NAMELIST /time_control/ auxinput10_end_m								NAMELIST /time_control/ auxinput10_end_m
NAMELIST /time_control/ auxinput10_end_s								NAMELIST /time_control/ auxinput10_end_s
NAMELIST /time_control/ auxinput10_end									NAMELIST /time_control/ auxinput10_end
NAMELIST /time_control/ io_form_auxinput10								NAMELIST /time_control/ io_form_auxinput10
NAMELIST /time_control/ frames_per_auxinput10								NAMELIST /time_control/ frames_per_auxinput10
NAMELIST /time_control/ auxinput11_inname								NAMELIST /time_control/ auxinput11_inname
NAMELIST /time_control/ auxinput11_outname								NAMELIST /time_control/ auxinput11_outname
NAMELIST /time_control/ auxinput11_interval_y								NAMELIST /time_control/ auxinput11_interval_y
NAMELIST /time_control/ auxinput11_interval_d								NAMELIST /time_control/ auxinput11_interval_d
NAMELIST /time_control/ auxinput11_interval_h								NAMELIST /time_control/ auxinput11_interval_h
NAMELIST /time_control/ auxinput11_interval_m								NAMELIST /time_control/ auxinput11_interval_m
NAMELIST /time_control/ auxinput11_interval_s								NAMELIST /time_control/ auxinput11_interval_s
NAMELIST /time_control/ auxinput11_interval								NAMELIST /time_control/ auxinput11_interval
NAMELIST /time_control/ auxinput11_begin_y								NAMELIST /time_control/ auxinput11_begin_y
NAMELIST /time_control/ auxinput11_begin_d								NAMELIST /time_control/ auxinput11_begin_d
NAMELIST /time_control/ auxinput11_begin_h								NAMELIST /time_control/ auxinput11_begin_h
NAMELIST /time_control/ auxinput11_begin_m								NAMELIST /time_control/ auxinput11_begin_m
NAMELIST /time_control/ auxinput11_begin_s								NAMELIST /time_control/ auxinput11_begin_s
NAMELIST /time_control/ auxinput11_begin								NAMELIST /time_control/ auxinput11_begin
NAMELIST /time_control/ auxinput11_end_y								NAMELIST /time_control/ auxinput11_end_y
NAMELIST /time_control/ auxinput11_end_d								NAMELIST /time_control/ auxinput11_end_d
NAMELIST /time_control/ auxinput11_end_h								NAMELIST /time_control/ auxinput11_end_h
NAMELIST /time_control/ auxinput11_end_m								NAMELIST /time_control/ auxinput11_end_m
NAMELIST /time_control/ auxinput11_end_s								NAMELIST /time_control/ auxinput11_end_s
NAMELIST /time_control/ auxinput11_end									NAMELIST /time_control/ auxinput11_end
NAMELIST /time_control/ io_form_auxinput11								NAMELIST /time_control/ io_form_auxinput11
NAMELIST /time_control/ frames_per_auxinput11								NAMELIST /time_control/ frames_per_auxinput11
NAMELIST /time_control/ auxinput12_inname								NAMELIST /time_control/ auxinput12_inname
NAMELIST /time_control/ auxinput12_outname								NAMELIST /time_control/ auxinput12_outname
NAMELIST /time_control/ auxinput12_interval_y								NAMELIST /time_control/ auxinput12_interval_y
NAMELIST /time_control/ auxinput12_interval_d								NAMELIST /time_control/ auxinput12_interval_d
NAMELIST /time_control/ auxinput12_interval_h								NAMELIST /time_control/ auxinput12_interval_h
NAMELIST /time_control/ auxinput12_interval_m								NAMELIST /time_control/ auxinput12_interval_m
NAMELIST /time_control/ auxinput12_interval_s								NAMELIST /time_control/ auxinput12_interval_s
NAMELIST /time_control/ auxinput12_interval								NAMELIST /time_control/ auxinput12_interval
NAMELIST /time_control/ auxinput12_begin_y								NAMELIST /time_control/ auxinput12_begin_y
NAMELIST /time_control/ auxinput12_begin_d								NAMELIST /time_control/ auxinput12_begin_d
NAMELIST /time_control/ auxinput12_begin_h								NAMELIST /time_control/ auxinput12_begin_h
NAMELIST /time_control/ auxinput12_begin_m								NAMELIST /time_control/ auxinput12_begin_m
NAMELIST /time_control/ auxinput12_begin_s								NAMELIST /time_control/ auxinput12_begin_s
NAMELIST /time_control/ auxinput12_begin								NAMELIST /time_control/ auxinput12_begin
NAMELIST /time_control/ auxinput12_end_y								NAMELIST /time_control/ auxinput12_end_y
NAMELIST /time_control/ auxinput12_end_d								NAMELIST /time_control/ auxinput12_end_d
NAMELIST /time_control/ auxinput12_end_h								NAMELIST /time_control/ auxinput12_end_h
NAMELIST /time_control/ auxinput12_end_m								NAMELIST /time_control/ auxinput12_end_m
NAMELIST /time_control/ auxinput12_end_s								NAMELIST /time_control/ auxinput12_end_s
NAMELIST /time_control/ auxinput12_end									NAMELIST /time_control/ auxinput12_end
NAMELIST /time_control/ io_form_auxinput12								NAMELIST /time_control/ io_form_auxinput12
NAMELIST /time_control/ frames_per_auxinput12								NAMELIST /time_control/ frames_per_auxinput12
NAMELIST /time_control/ auxinput13_inname								NAMELIST /time_control/ auxinput13_inname
NAMELIST /time_control/ auxinput13_outname								NAMELIST /time_control/ auxinput13_outname
NAMELIST /time_control/ auxinput13_interval_y								NAMELIST /time_control/ auxinput13_interval_y
NAMELIST /time_control/ auxinput13_interval_d								NAMELIST /time_control/ auxinput13_interval_d
NAMELIST /time_control/ auxinput13_interval_h								NAMELIST /time_control/ auxinput13_interval_h
NAMELIST /time_control/ auxinput13_interval_m								NAMELIST /time_control/ auxinput13_interval_m
NAMELIST /time_control/ auxinput13_interval_s								NAMELIST /time_control/ auxinput13_interval_s
NAMELIST /time_control/ auxinput13_interval								NAMELIST /time_control/ auxinput13_interval
NAMELIST /time_control/ auxinput13_begin_y								NAMELIST /time_control/ auxinput13_begin_y
NAMELIST /time_control/ auxinput13_begin_d								NAMELIST /time_control/ auxinput13_begin_d
NAMELIST /time_control/ auxinput13_begin_h								NAMELIST /time_control/ auxinput13_begin_h
NAMELIST /time_control/ auxinput13_begin_m								NAMELIST /time_control/ auxinput13_begin_m
NAMELIST /time_control/ auxinput13_begin_s								NAMELIST /time_control/ auxinput13_begin_s
NAMELIST /time_control/ auxinput13_begin								NAMELIST /time_control/ auxinput13_begin
NAMELIST /time_control/ auxinput13_end_y								NAMELIST /time_control/ auxinput13_end_y
NAMELIST /time_control/ auxinput13_end_d								NAMELIST /time_control/ auxinput13_end_d
NAMELIST /time_control/ auxinput13_end_h								NAMELIST /time_control/ auxinput13_end_h
NAMELIST /time_control/ auxinput13_end_m								NAMELIST /time_control/ auxinput13_end_m
NAMELIST /time_control/ auxinput13_end_s								NAMELIST /time_control/ auxinput13_end_s
NAMELIST /time_control/ auxinput13_end									NAMELIST /time_control/ auxinput13_end
NAMELIST /time_control/ io_form_auxinput13								NAMELIST /time_control/ io_form_auxinput13
NAMELIST /time_control/ frames_per_auxinput13								NAMELIST /time_control/ frames_per_auxinput13
NAMELIST /time_control/ auxinput14_inname								NAMELIST /time_control/ auxinput14_inname
NAMELIST /time_control/ auxinput14_outname								NAMELIST /time_control/ auxinput14_outname
NAMELIST /time_control/ auxinput14_interval_y								NAMELIST /time_control/ auxinput14_interval_y
NAMELIST /time_control/ auxinput14_interval_d								NAMELIST /time_control/ auxinput14_interval_d
NAMELIST /time_control/ auxinput14_interval_h								NAMELIST /time_control/ auxinput14_interval_h
NAMELIST /time_control/ auxinput14_interval_m								NAMELIST /time_control/ auxinput14_interval_m
NAMELIST /time_control/ auxinput14_interval_s								NAMELIST /time_control/ auxinput14_interval_s
NAMELIST /time_control/ auxinput14_interval								NAMELIST /time_control/ auxinput14_interval
NAMELIST /time_control/ auxinput14_begin_y								NAMELIST /time_control/ auxinput14_begin_y
NAMELIST /time_control/ auxinput14_begin_d								NAMELIST /time_control/ auxinput14_begin_d
NAMELIST /time_control/ auxinput14_begin_h								NAMELIST /time_control/ auxinput14_begin_h
NAMELIST /time_control/ auxinput14_begin_m								NAMELIST /time_control/ auxinput14_begin_m
NAMELIST /time_control/ auxinput14_begin_s								NAMELIST /time_control/ auxinput14_begin_s
NAMELIST /time_control/ auxinput14_begin								NAMELIST /time_control/ auxinput14_begin
NAMELIST /time_control/ auxinput14_end_y								NAMELIST /time_control/ auxinput14_end_y
NAMELIST /time_control/ auxinput14_end_d								NAMELIST /time_control/ auxinput14_end_d
NAMELIST /time_control/ auxinput14_end_h								NAMELIST /time_control/ auxinput14_end_h
NAMELIST /time_control/ auxinput14_end_m								NAMELIST /time_control/ auxinput14_end_m
NAMELIST /time_control/ auxinput14_end_s								NAMELIST /time_control/ auxinput14_end_s
NAMELIST /time_control/ auxinput14_end									NAMELIST /time_control/ auxinput14_end
NAMELIST /time_control/ io_form_auxinput14								NAMELIST /time_control/ io_form_auxinput14
NAMELIST /time_control/ frames_per_auxinput14								NAMELIST /time_control/ frames_per_auxinput14
NAMELIST /time_control/ auxinput15_inname								NAMELIST /time_control/ auxinput15_inname
NAMELIST /time_control/ auxinput15_outname								NAMELIST /time_control/ auxinput15_outname
NAMELIST /time_control/ auxinput15_interval_y								NAMELIST /time_control/ auxinput15_interval_y
NAMELIST /time_control/ auxinput15_interval_d								NAMELIST /time_control/ auxinput15_interval_d
NAMELIST /time_control/ auxinput15_interval_h								NAMELIST /time_control/ auxinput15_interval_h
NAMELIST /time_control/ auxinput15_interval_m								NAMELIST /time_control/ auxinput15_interval_m
NAMELIST /time_control/ auxinput15_interval_s								NAMELIST /time_control/ auxinput15_interval_s
NAMELIST /time_control/ auxinput15_interval								NAMELIST /time_control/ auxinput15_interval
NAMELIST /time_control/ auxinput15_begin_y								NAMELIST /time_control/ auxinput15_begin_y
NAMELIST /time_control/ auxinput15_begin_d								NAMELIST /time_control/ auxinput15_begin_d
NAMELIST /time_control/ auxinput15_begin_h								NAMELIST /time_control/ auxinput15_begin_h
NAMELIST /time_control/ auxinput15_begin_m								NAMELIST /time_control/ auxinput15_begin_m
NAMELIST /time_control/ auxinput15_begin_s								NAMELIST /time_control/ auxinput15_begin_s
NAMELIST /time_control/ auxinput15_begin								NAMELIST /time_control/ auxinput15_begin
NAMELIST /time_control/ auxinput15_end_y								NAMELIST /time_control/ auxinput15_end_y
NAMELIST /time_control/ auxinput15_end_d								NAMELIST /time_control/ auxinput15_end_d
NAMELIST /time_control/ auxinput15_end_h								NAMELIST /time_control/ auxinput15_end_h
NAMELIST /time_control/ auxinput15_end_m								NAMELIST /time_control/ auxinput15_end_m
NAMELIST /time_control/ auxinput15_end_s								NAMELIST /time_control/ auxinput15_end_s
NAMELIST /time_control/ auxinput15_end									NAMELIST /time_control/ auxinput15_end
NAMELIST /time_control/ io_form_auxinput15								NAMELIST /time_control/ io_form_auxinput15
NAMELIST /time_control/ frames_per_auxinput15								NAMELIST /time_control/ frames_per_auxinput15
NAMELIST /time_control/ auxinput16_inname								NAMELIST /time_control/ auxinput16_inname
NAMELIST /time_control/ auxinput16_outname								NAMELIST /time_control/ auxinput16_outname
NAMELIST /time_control/ auxinput16_interval_y								NAMELIST /time_control/ auxinput16_interval_y
NAMELIST /time_control/ auxinput16_interval_d								NAMELIST /time_control/ auxinput16_interval_d
NAMELIST /time_control/ auxinput16_interval_h								NAMELIST /time_control/ auxinput16_interval_h
NAMELIST /time_control/ auxinput16_interval_m								NAMELIST /time_control/ auxinput16_interval_m
NAMELIST /time_control/ auxinput16_interval_s								NAMELIST /time_control/ auxinput16_interval_s
NAMELIST /time_control/ auxinput16_interval								NAMELIST /time_control/ auxinput16_interval
NAMELIST /time_control/ auxinput16_begin_y								NAMELIST /time_control/ auxinput16_begin_y
NAMELIST /time_control/ auxinput16_begin_d								NAMELIST /time_control/ auxinput16_begin_d
NAMELIST /time_control/ auxinput16_begin_h								NAMELIST /time_control/ auxinput16_begin_h
NAMELIST /time_control/ auxinput16_begin_m								NAMELIST /time_control/ auxinput16_begin_m
NAMELIST /time_control/ auxinput16_begin_s								NAMELIST /time_control/ auxinput16_begin_s
NAMELIST /time_control/ auxinput16_begin								NAMELIST /time_control/ auxinput16_begin
NAMELIST /time_control/ auxinput16_end_y								NAMELIST /time_control/ auxinput16_end_y
NAMELIST /time_control/ auxinput16_end_d								NAMELIST /time_control/ auxinput16_end_d
NAMELIST /time_control/ auxinput16_end_h								NAMELIST /time_control/ auxinput16_end_h
NAMELIST /time_control/ auxinput16_end_m								NAMELIST /time_control/ auxinput16_end_m
NAMELIST /time_control/ auxinput16_end_s								NAMELIST /time_control/ auxinput16_end_s
NAMELIST /time_control/ auxinput16_end									NAMELIST /time_control/ auxinput16_end
NAMELIST /time_control/ io_form_auxinput16								NAMELIST /time_control/ io_form_auxinput16
NAMELIST /time_control/ frames_per_auxinput16								NAMELIST /time_control/ frames_per_auxinput16
NAMELIST /time_control/ auxinput17_inname								NAMELIST /time_control/ auxinput17_inname
NAMELIST /time_control/ auxinput17_outname								NAMELIST /time_control/ auxinput17_outname
NAMELIST /time_control/ auxinput17_interval_y								NAMELIST /time_control/ auxinput17_interval_y
NAMELIST /time_control/ auxinput17_interval_d								NAMELIST /time_control/ auxinput17_interval_d
NAMELIST /time_control/ auxinput17_interval_h								NAMELIST /time_control/ auxinput17_interval_h
NAMELIST /time_control/ auxinput17_interval_m								NAMELIST /time_control/ auxinput17_interval_m
NAMELIST /time_control/ auxinput17_interval_s								NAMELIST /time_control/ auxinput17_interval_s
NAMELIST /time_control/ auxinput17_interval								NAMELIST /time_control/ auxinput17_interval
NAMELIST /time_control/ auxinput17_begin_y								NAMELIST /time_control/ auxinput17_begin_y
NAMELIST /time_control/ auxinput17_begin_d								NAMELIST /time_control/ auxinput17_begin_d
NAMELIST /time_control/ auxinput17_begin_h								NAMELIST /time_control/ auxinput17_begin_h
NAMELIST /time_control/ auxinput17_begin_m								NAMELIST /time_control/ auxinput17_begin_m
NAMELIST /time_control/ auxinput17_begin_s								NAMELIST /time_control/ auxinput17_begin_s
NAMELIST /time_control/ auxinput17_begin								NAMELIST /time_control/ auxinput17_begin
NAMELIST /time_control/ auxinput17_end_y								NAMELIST /time_control/ auxinput17_end_y
NAMELIST /time_control/ auxinput17_end_d								NAMELIST /time_control/ auxinput17_end_d
NAMELIST /time_control/ auxinput17_end_h								NAMELIST /time_control/ auxinput17_end_h
NAMELIST /time_control/ auxinput17_end_m								NAMELIST /time_control/ auxinput17_end_m
NAMELIST /time_control/ auxinput17_end_s								NAMELIST /time_control/ auxinput17_end_s
NAMELIST /time_control/ auxinput17_end									NAMELIST /time_control/ auxinput17_end
NAMELIST /time_control/ io_form_auxinput17								NAMELIST /time_control/ io_form_auxinput17
NAMELIST /time_control/ frames_per_auxinput17								NAMELIST /time_control/ frames_per_auxinput17
NAMELIST /time_control/ auxinput18_inname								NAMELIST /time_control/ auxinput18_inname
NAMELIST /time_control/ auxinput18_outname								NAMELIST /time_control/ auxinput18_outname
NAMELIST /time_control/ auxinput18_interval_y								NAMELIST /time_control/ auxinput18_interval_y
NAMELIST /time_control/ auxinput18_interval_d								NAMELIST /time_control/ auxinput18_interval_d
NAMELIST /time_control/ auxinput18_interval_h								NAMELIST /time_control/ auxinput18_interval_h
NAMELIST /time_control/ auxinput18_interval_m								NAMELIST /time_control/ auxinput18_interval_m
NAMELIST /time_control/ auxinput18_interval_s								NAMELIST /time_control/ auxinput18_interval_s
NAMELIST /time_control/ auxinput18_interval								NAMELIST /time_control/ auxinput18_interval
NAMELIST /time_control/ auxinput18_begin_y								NAMELIST /time_control/ auxinput18_begin_y
NAMELIST /time_control/ auxinput18_begin_d								NAMELIST /time_control/ auxinput18_begin_d
NAMELIST /time_control/ auxinput18_begin_h								NAMELIST /time_control/ auxinput18_begin_h
NAMELIST /time_control/ auxinput18_begin_m								NAMELIST /time_control/ auxinput18_begin_m
NAMELIST /time_control/ auxinput18_begin_s								NAMELIST /time_control/ auxinput18_begin_s
NAMELIST /time_control/ auxinput18_begin								NAMELIST /time_control/ auxinput18_begin
NAMELIST /time_control/ auxinput18_end_y								NAMELIST /time_control/ auxinput18_end_y
NAMELIST /time_control/ auxinput18_end_d								NAMELIST /time_control/ auxinput18_end_d
NAMELIST /time_control/ auxinput18_end_h								NAMELIST /time_control/ auxinput18_end_h
NAMELIST /time_control/ auxinput18_end_m								NAMELIST /time_control/ auxinput18_end_m
NAMELIST /time_control/ auxinput18_end_s								NAMELIST /time_control/ auxinput18_end_s
NAMELIST /time_control/ auxinput18_end									NAMELIST /time_control/ auxinput18_end
NAMELIST /time_control/ io_form_auxinput18								NAMELIST /time_control/ io_form_auxinput18
NAMELIST /time_control/ frames_per_auxinput18								NAMELIST /time_control/ frames_per_auxinput18
NAMELIST /time_control/ auxinput19_inname								NAMELIST /time_control/ auxinput19_inname
NAMELIST /time_control/ auxinput19_outname								NAMELIST /time_control/ auxinput19_outname
NAMELIST /time_control/ auxinput19_interval_y								NAMELIST /time_control/ auxinput19_interval_y
NAMELIST /time_control/ auxinput19_interval_d								NAMELIST /time_control/ auxinput19_interval_d
NAMELIST /time_control/ auxinput19_interval_h								NAMELIST /time_control/ auxinput19_interval_h
NAMELIST /time_control/ auxinput19_interval_m								NAMELIST /time_control/ auxinput19_interval_m
NAMELIST /time_control/ auxinput19_interval_s								NAMELIST /time_control/ auxinput19_interval_s
NAMELIST /time_control/ auxinput19_interval								NAMELIST /time_control/ auxinput19_interval
NAMELIST /time_control/ auxinput19_begin_y								NAMELIST /time_control/ auxinput19_begin_y
NAMELIST /time_control/ auxinput19_begin_d								NAMELIST /time_control/ auxinput19_begin_d
NAMELIST /time_control/ auxinput19_begin_h								NAMELIST /time_control/ auxinput19_begin_h
NAMELIST /time_control/ auxinput19_begin_m								NAMELIST /time_control/ auxinput19_begin_m
NAMELIST /time_control/ auxinput19_begin_s								NAMELIST /time_control/ auxinput19_begin_s
NAMELIST /time_control/ auxinput19_begin								NAMELIST /time_control/ auxinput19_begin
NAMELIST /time_control/ auxinput19_end_y								NAMELIST /time_control/ auxinput19_end_y
NAMELIST /time_control/ auxinput19_end_d								NAMELIST /time_control/ auxinput19_end_d
NAMELIST /time_control/ auxinput19_end_h								NAMELIST /time_control/ auxinput19_end_h
NAMELIST /time_control/ auxinput19_end_m								NAMELIST /time_control/ auxinput19_end_m
NAMELIST /time_control/ auxinput19_end_s								NAMELIST /time_control/ auxinput19_end_s
NAMELIST /time_control/ auxinput19_end									NAMELIST /time_control/ auxinput19_end
NAMELIST /time_control/ io_form_auxinput19								NAMELIST /time_control/ io_form_auxinput19
NAMELIST /time_control/ frames_per_auxinput19								NAMELIST /time_control/ frames_per_auxinput19
NAMELIST /time_control/ auxinput20_inname								NAMELIST /time_control/ auxinput20_inname
NAMELIST /time_control/ auxinput20_outname								NAMELIST /time_control/ auxinput20_outname
NAMELIST /time_control/ auxinput20_interval_y								NAMELIST /time_control/ auxinput20_interval_y
NAMELIST /time_control/ auxinput20_interval_d								NAMELIST /time_control/ auxinput20_interval_d
NAMELIST /time_control/ auxinput20_interval_h								NAMELIST /time_control/ auxinput20_interval_h
NAMELIST /time_control/ auxinput20_interval_m								NAMELIST /time_control/ auxinput20_interval_m
NAMELIST /time_control/ auxinput20_interval_s								NAMELIST /time_control/ auxinput20_interval_s
NAMELIST /time_control/ auxinput20_interval								NAMELIST /time_control/ auxinput20_interval
NAMELIST /time_control/ auxinput20_begin_y								NAMELIST /time_control/ auxinput20_begin_y
NAMELIST /time_control/ auxinput20_begin_d								NAMELIST /time_control/ auxinput20_begin_d
NAMELIST /time_control/ auxinput20_begin_h								NAMELIST /time_control/ auxinput20_begin_h
NAMELIST /time_control/ auxinput20_begin_m								NAMELIST /time_control/ auxinput20_begin_m
NAMELIST /time_control/ auxinput20_begin_s								NAMELIST /time_control/ auxinput20_begin_s
NAMELIST /time_control/ auxinput20_begin								NAMELIST /time_control/ auxinput20_begin
NAMELIST /time_control/ auxinput20_end_y								NAMELIST /time_control/ auxinput20_end_y
NAMELIST /time_control/ auxinput20_end_d								NAMELIST /time_control/ auxinput20_end_d
NAMELIST /time_control/ auxinput20_end_h								NAMELIST /time_control/ auxinput20_end_h
NAMELIST /time_control/ auxinput20_end_m								NAMELIST /time_control/ auxinput20_end_m
NAMELIST /time_control/ auxinput20_end_s								NAMELIST /time_control/ auxinput20_end_s
NAMELIST /time_control/ auxinput20_end									NAMELIST /time_control/ auxinput20_end
NAMELIST /time_control/ io_form_auxinput20								NAMELIST /time_control/ io_form_auxinput20
NAMELIST /time_control/ frames_per_auxinput20								NAMELIST /time_control/ frames_per_auxinput20
NAMELIST /time_control/ auxinput21_inname								NAMELIST /time_control/ auxinput21_inname
NAMELIST /time_control/ auxinput21_outname								NAMELIST /time_control/ auxinput21_outname
NAMELIST /time_control/ auxinput21_interval_y								NAMELIST /time_control/ auxinput21_interval_y
NAMELIST /time_control/ auxinput21_interval_d								NAMELIST /time_control/ auxinput21_interval_d
NAMELIST /time_control/ auxinput21_interval_h								NAMELIST /time_control/ auxinput21_interval_h
NAMELIST /time_control/ auxinput21_interval_m								NAMELIST /time_control/ auxinput21_interval_m
NAMELIST /time_control/ auxinput21_interval_s								NAMELIST /time_control/ auxinput21_interval_s
NAMELIST /time_control/ auxinput21_interval								NAMELIST /time_control/ auxinput21_interval
NAMELIST /time_control/ auxinput21_begin_y								NAMELIST /time_control/ auxinput21_begin_y
NAMELIST /time_control/ auxinput21_begin_d								NAMELIST /time_control/ auxinput21_begin_d
NAMELIST /time_control/ auxinput21_begin_h								NAMELIST /time_control/ auxinput21_begin_h
NAMELIST /time_control/ auxinput21_begin_m								NAMELIST /time_control/ auxinput21_begin_m
NAMELIST /time_control/ auxinput21_begin_s								NAMELIST /time_control/ auxinput21_begin_s
NAMELIST /time_control/ auxinput21_begin								NAMELIST /time_control/ auxinput21_begin
NAMELIST /time_control/ auxinput21_end_y								NAMELIST /time_control/ auxinput21_end_y
NAMELIST /time_control/ auxinput21_end_d								NAMELIST /time_control/ auxinput21_end_d
NAMELIST /time_control/ auxinput21_end_h								NAMELIST /time_control/ auxinput21_end_h
NAMELIST /time_control/ auxinput21_end_m								NAMELIST /time_control/ auxinput21_end_m
NAMELIST /time_control/ auxinput21_end_s								NAMELIST /time_control/ auxinput21_end_s
NAMELIST /time_control/ auxinput21_end									NAMELIST /time_control/ auxinput21_end
NAMELIST /time_control/ io_form_auxinput21								NAMELIST /time_control/ io_form_auxinput21
NAMELIST /time_control/ frames_per_auxinput21								NAMELIST /time_control/ frames_per_auxinput21
NAMELIST /time_control/ auxinput22_inname								NAMELIST /time_control/ auxinput22_inname
NAMELIST /time_control/ auxinput22_outname								NAMELIST /time_control/ auxinput22_outname
NAMELIST /time_control/ auxinput22_interval_y								NAMELIST /time_control/ auxinput22_interval_y
NAMELIST /time_control/ auxinput22_interval_d								NAMELIST /time_control/ auxinput22_interval_d
NAMELIST /time_control/ auxinput22_interval_h								NAMELIST /time_control/ auxinput22_interval_h
NAMELIST /time_control/ auxinput22_interval_m								NAMELIST /time_control/ auxinput22_interval_m
NAMELIST /time_control/ auxinput22_interval_s								NAMELIST /time_control/ auxinput22_interval_s
NAMELIST /time_control/ auxinput22_interval								NAMELIST /time_control/ auxinput22_interval
NAMELIST /time_control/ auxinput22_begin_y								NAMELIST /time_control/ auxinput22_begin_y
NAMELIST /time_control/ auxinput22_begin_d								NAMELIST /time_control/ auxinput22_begin_d
NAMELIST /time_control/ auxinput22_begin_h								NAMELIST /time_control/ auxinput22_begin_h
NAMELIST /time_control/ auxinput22_begin_m								NAMELIST /time_control/ auxinput22_begin_m
NAMELIST /time_control/ auxinput22_begin_s								NAMELIST /time_control/ auxinput22_begin_s
NAMELIST /time_control/ auxinput22_begin								NAMELIST /time_control/ auxinput22_begin
NAMELIST /time_control/ auxinput22_end_y								NAMELIST /time_control/ auxinput22_end_y
NAMELIST /time_control/ auxinput22_end_d								NAMELIST /time_control/ auxinput22_end_d
NAMELIST /time_control/ auxinput22_end_h								NAMELIST /time_control/ auxinput22_end_h
NAMELIST /time_control/ auxinput22_end_m								NAMELIST /time_control/ auxinput22_end_m
NAMELIST /time_control/ auxinput22_end_s								NAMELIST /time_control/ auxinput22_end_s
NAMELIST /time_control/ auxinput22_end									NAMELIST /time_control/ auxinput22_end
NAMELIST /time_control/ io_form_auxinput22								NAMELIST /time_control/ io_form_auxinput22
NAMELIST /time_control/ frames_per_auxinput22								NAMELIST /time_control/ frames_per_auxinput22
NAMELIST /time_control/ auxinput23_inname								NAMELIST /time_control/ auxinput23_inname
NAMELIST /time_control/ auxinput23_outname								NAMELIST /time_control/ auxinput23_outname
NAMELIST /time_control/ auxinput23_interval_y								NAMELIST /time_control/ auxinput23_interval_y
NAMELIST /time_control/ auxinput23_interval_d								NAMELIST /time_control/ auxinput23_interval_d
NAMELIST /time_control/ auxinput23_interval_h								NAMELIST /time_control/ auxinput23_interval_h
NAMELIST /time_control/ auxinput23_interval_m								NAMELIST /time_control/ auxinput23_interval_m
NAMELIST /time_control/ auxinput23_interval_s								NAMELIST /time_control/ auxinput23_interval_s
NAMELIST /time_control/ auxinput23_interval								NAMELIST /time_control/ auxinput23_interval
NAMELIST /time_control/ auxinput23_begin_y								NAMELIST /time_control/ auxinput23_begin_y
NAMELIST /time_control/ auxinput23_begin_d								NAMELIST /time_control/ auxinput23_begin_d
NAMELIST /time_control/ auxinput23_begin_h								NAMELIST /time_control/ auxinput23_begin_h
NAMELIST /time_control/ auxinput23_begin_m								NAMELIST /time_control/ auxinput23_begin_m
NAMELIST /time_control/ auxinput23_begin_s								NAMELIST /time_control/ auxinput23_begin_s
NAMELIST /time_control/ auxinput23_begin								NAMELIST /time_control/ auxinput23_begin
NAMELIST /time_control/ auxinput23_end_y								NAMELIST /time_control/ auxinput23_end_y
NAMELIST /time_control/ auxinput23_end_d								NAMELIST /time_control/ auxinput23_end_d
NAMELIST /time_control/ auxinput23_end_h								NAMELIST /time_control/ auxinput23_end_h
NAMELIST /time_control/ auxinput23_end_m								NAMELIST /time_control/ auxinput23_end_m
NAMELIST /time_control/ auxinput23_end_s								NAMELIST /time_control/ auxinput23_end_s
NAMELIST /time_control/ auxinput23_end									NAMELIST /time_control/ auxinput23_end
NAMELIST /time_control/ io_form_auxinput23								NAMELIST /time_control/ io_form_auxinput23
NAMELIST /time_control/ frames_per_auxinput23								NAMELIST /time_control/ frames_per_auxinput23
NAMELIST /time_control/ auxinput24_inname								NAMELIST /time_control/ auxinput24_inname
NAMELIST /time_control/ auxinput24_outname								NAMELIST /time_control/ auxinput24_outname
NAMELIST /time_control/ auxinput24_interval_y								NAMELIST /time_control/ auxinput24_interval_y
NAMELIST /time_control/ auxinput24_interval_d								NAMELIST /time_control/ auxinput24_interval_d
NAMELIST /time_control/ auxinput24_interval_h								NAMELIST /time_control/ auxinput24_interval_h
NAMELIST /time_control/ auxinput24_interval_m								NAMELIST /time_control/ auxinput24_interval_m
NAMELIST /time_control/ auxinput24_interval_s								NAMELIST /time_control/ auxinput24_interval_s
NAMELIST /time_control/ auxinput24_interval								NAMELIST /time_control/ auxinput24_interval
NAMELIST /time_control/ auxinput24_begin_y								NAMELIST /time_control/ auxinput24_begin_y
NAMELIST /time_control/ auxinput24_begin_d								NAMELIST /time_control/ auxinput24_begin_d
NAMELIST /time_control/ auxinput24_begin_h								NAMELIST /time_control/ auxinput24_begin_h
NAMELIST /time_control/ auxinput24_begin_m								NAMELIST /time_control/ auxinput24_begin_m
NAMELIST /time_control/ auxinput24_begin_s								NAMELIST /time_control/ auxinput24_begin_s
NAMELIST /time_control/ auxinput24_begin								NAMELIST /time_control/ auxinput24_begin
NAMELIST /time_control/ auxinput24_end_y								NAMELIST /time_control/ auxinput24_end_y
NAMELIST /time_control/ auxinput24_end_d								NAMELIST /time_control/ auxinput24_end_d
NAMELIST /time_control/ auxinput24_end_h								NAMELIST /time_control/ auxinput24_end_h
NAMELIST /time_control/ auxinput24_end_m								NAMELIST /time_control/ auxinput24_end_m
NAMELIST /time_control/ auxinput24_end_s								NAMELIST /time_control/ auxinput24_end_s
NAMELIST /time_control/ auxinput24_end									NAMELIST /time_control/ auxinput24_end
NAMELIST /time_control/ io_form_auxinput24								NAMELIST /time_control/ io_form_auxinput24
NAMELIST /time_control/ frames_per_auxinput24								NAMELIST /time_control/ frames_per_auxinput24
NAMELIST /time_control/ history_interval								NAMELIST /time_control/ history_interval
NAMELIST /time_control/ frames_per_outfile								NAMELIST /time_control/ frames_per_outfile
NAMELIST /time_control/ restart										NAMELIST /time_control/ restart
NAMELIST /time_control/ restart_interval								NAMELIST /time_control/ restart_interval
NAMELIST /time_control/ io_form_input									NAMELIST /time_control/ io_form_input
NAMELIST /time_control/ io_form_history									NAMELIST /time_control/ io_form_history
NAMELIST /time_control/ io_form_restart									NAMELIST /time_control/ io_form_restart
NAMELIST /time_control/ io_form_boundary								NAMELIST /time_control/ io_form_boundary
NAMELIST /time_control/ debug_level									NAMELIST /time_control/ debug_level
NAMELIST /time_control/ self_test_domain								NAMELIST /time_control/ self_test_domain
NAMELIST /time_control/ history_outname									NAMELIST /time_control/ history_outname
NAMELIST /time_control/ history_inname									NAMELIST /time_control/ history_inname
NAMELIST /time_control/ use_netcdf_classic								NAMELIST /time_control/ use_netcdf_classic
NAMELIST /time_control/ history_interval_d								NAMELIST /time_control/ history_interval_d
NAMELIST /time_control/ history_interval_h								NAMELIST /time_control/ history_interval_h
NAMELIST /time_control/ history_interval_m								NAMELIST /time_control/ history_interval_m
NAMELIST /time_control/ history_interval_s								NAMELIST /time_control/ history_interval_s
NAMELIST /time_control/ inputout_interval_d								NAMELIST /time_control/ inputout_interval_d
NAMELIST /time_control/ inputout_interval_h								NAMELIST /time_control/ inputout_interval_h
NAMELIST /time_control/ inputout_interval_m								NAMELIST /time_control/ inputout_interval_m
NAMELIST /time_control/ inputout_interval_s								NAMELIST /time_control/ inputout_interval_s
NAMELIST /time_control/ inputout_interval								NAMELIST /time_control/ inputout_interval
NAMELIST /time_control/ restart_interval_d								NAMELIST /time_control/ restart_interval_d
NAMELIST /time_control/ restart_interval_h								NAMELIST /time_control/ restart_interval_h
NAMELIST /time_control/ restart_interval_m								NAMELIST /time_control/ restart_interval_m
NAMELIST /time_control/ restart_interval_s								NAMELIST /time_control/ restart_interval_s
NAMELIST /time_control/ history_begin_y									NAMELIST /time_control/ history_begin_y
NAMELIST /time_control/ history_begin_d									NAMELIST /time_control/ history_begin_d
NAMELIST /time_control/ history_begin_h									NAMELIST /time_control/ history_begin_h
NAMELIST /time_control/ history_begin_m									NAMELIST /time_control/ history_begin_m
NAMELIST /time_control/ history_begin_s									NAMELIST /time_control/ history_begin_s
NAMELIST /time_control/ history_begin									NAMELIST /time_control/ history_begin
NAMELIST /time_control/ inputout_begin_y								NAMELIST /time_control/ inputout_begin_y
NAMELIST /time_control/ inputout_begin_d								NAMELIST /time_control/ inputout_begin_d
NAMELIST /time_control/ inputout_begin_h								NAMELIST /time_control/ inputout_begin_h
NAMELIST /time_control/ inputout_begin_m								NAMELIST /time_control/ inputout_begin_m
NAMELIST /time_control/ inputout_begin_s								NAMELIST /time_control/ inputout_begin_s
NAMELIST /time_control/ restart_begin_y									NAMELIST /time_control/ restart_begin_y
NAMELIST /time_control/ restart_begin_d									NAMELIST /time_control/ restart_begin_d
NAMELIST /time_control/ restart_begin_h									NAMELIST /time_control/ restart_begin_h
NAMELIST /time_control/ restart_begin_m									NAMELIST /time_control/ restart_begin_m
NAMELIST /time_control/ restart_begin_s									NAMELIST /time_control/ restart_begin_s
NAMELIST /time_control/ restart_begin									NAMELIST /time_control/ restart_begin
NAMELIST /time_control/ history_end_y									NAMELIST /time_control/ history_end_y
NAMELIST /time_control/ history_end_d									NAMELIST /time_control/ history_end_d
NAMELIST /time_control/ history_end_h									NAMELIST /time_control/ history_end_h
NAMELIST /time_control/ history_end_m									NAMELIST /time_control/ history_end_m
NAMELIST /time_control/ history_end_s									NAMELIST /time_control/ history_end_s
NAMELIST /time_control/ history_end									NAMELIST /time_control/ history_end
NAMELIST /time_control/ inputout_end_y									NAMELIST /time_control/ inputout_end_y
NAMELIST /time_control/ inputout_end_d									NAMELIST /time_control/ inputout_end_d
NAMELIST /time_control/ inputout_end_h									NAMELIST /time_control/ inputout_end_h
NAMELIST /time_control/ inputout_end_m									NAMELIST /time_control/ inputout_end_m
NAMELIST /time_control/ inputout_end_s									NAMELIST /time_control/ inputout_end_s
NAMELIST /time_control/ reset_simulation_start								NAMELIST /time_control/ reset_simulation_start
NAMELIST /domains/ sr_x											NAMELIST /domains/ sr_x
NAMELIST /domains/ sr_y											NAMELIST /domains/ sr_y
NAMELIST /fdda/ sgfdda_inname										NAMELIST /fdda/ sgfdda_inname
NAMELIST /fdda/ gfdda_inname										NAMELIST /fdda/ gfdda_inname
NAMELIST /fdda/ sgfdda_interval_d									NAMELIST /fdda/ sgfdda_interval_d
NAMELIST /fdda/ sgfdda_interval_h									NAMELIST /fdda/ sgfdda_interval_h
NAMELIST /fdda/ sgfdda_interval_m									NAMELIST /fdda/ sgfdda_interval_m
NAMELIST /fdda/ sgfdda_interval_s									NAMELIST /fdda/ sgfdda_interval_s
NAMELIST /fdda/ sgfdda_interval_y									NAMELIST /fdda/ sgfdda_interval_y
NAMELIST /fdda/ sgfdda_interval										NAMELIST /fdda/ sgfdda_interval
NAMELIST /fdda/ gfdda_interval_d									NAMELIST /fdda/ gfdda_interval_d
NAMELIST /fdda/ gfdda_interval_h									NAMELIST /fdda/ gfdda_interval_h
NAMELIST /fdda/ gfdda_interval_m									NAMELIST /fdda/ gfdda_interval_m
NAMELIST /fdda/ gfdda_interval_s									NAMELIST /fdda/ gfdda_interval_s
NAMELIST /fdda/ gfdda_interval_y									NAMELIST /fdda/ gfdda_interval_y
NAMELIST /fdda/ gfdda_interval										NAMELIST /fdda/ gfdda_interval
NAMELIST /fdda/ sgfdda_begin_y										NAMELIST /fdda/ sgfdda_begin_y
NAMELIST /fdda/ sgfdda_begin_d										NAMELIST /fdda/ sgfdda_begin_d
NAMELIST /fdda/ sgfdda_begin_h										NAMELIST /fdda/ sgfdda_begin_h
NAMELIST /fdda/ sgfdda_begin_m										NAMELIST /fdda/ sgfdda_begin_m
NAMELIST /fdda/ sgfdda_begin_s										NAMELIST /fdda/ sgfdda_begin_s
NAMELIST /fdda/ gfdda_begin_y										NAMELIST /fdda/ gfdda_begin_y
NAMELIST /fdda/ gfdda_begin_d										NAMELIST /fdda/ gfdda_begin_d
NAMELIST /fdda/ gfdda_begin_h										NAMELIST /fdda/ gfdda_begin_h
NAMELIST /fdda/ gfdda_begin_m										NAMELIST /fdda/ gfdda_begin_m
NAMELIST /fdda/ gfdda_begin_s										NAMELIST /fdda/ gfdda_begin_s
NAMELIST /fdda/ sgfdda_end_y										NAMELIST /fdda/ sgfdda_end_y
NAMELIST /fdda/ sgfdda_end_d										NAMELIST /fdda/ sgfdda_end_d
NAMELIST /fdda/ sgfdda_end_h										NAMELIST /fdda/ sgfdda_end_h
NAMELIST /fdda/ sgfdda_end_m										NAMELIST /fdda/ sgfdda_end_m
NAMELIST /fdda/ sgfdda_end_s										NAMELIST /fdda/ sgfdda_end_s
NAMELIST /fdda/ gfdda_end_y										NAMELIST /fdda/ gfdda_end_y
NAMELIST /fdda/ gfdda_end_d										NAMELIST /fdda/ gfdda_end_d
NAMELIST /fdda/ gfdda_end_h										NAMELIST /fdda/ gfdda_end_h
NAMELIST /fdda/ gfdda_end_m										NAMELIST /fdda/ gfdda_end_m
NAMELIST /fdda/ gfdda_end_s										NAMELIST /fdda/ gfdda_end_s
NAMELIST /fdda/ io_form_sgfdda										NAMELIST /fdda/ io_form_sgfdda
NAMELIST /fdda/ io_form_gfdda										NAMELIST /fdda/ io_form_gfdda
NAMELIST /time_control/ iofields_filename								NAMELIST /time_control/ iofields_filename
NAMELIST /time_control/ ignore_iofields_warning								NAMELIST /time_control/ ignore_iofields_warning
NAMELIST /time_control/ ncd_nofill									NAMELIST /time_control/ ncd_nofill
NAMELIST /fire/ ifire											NAMELIST /fire/ ifire
NAMELIST /fire/ fire_boundary_guard									NAMELIST /fire/ fire_boundary_guard
NAMELIST /fire/ fire_num_ignitions									NAMELIST /fire/ fire_num_ignitions
NAMELIST /fire/ fire_ignition_ros1									NAMELIST /fire/ fire_ignition_ros1
NAMELIST /fire/ fire_ignition_start_lon1								NAMELIST /fire/ fire_ignition_start_lon1
NAMELIST /fire/ fire_ignition_start_lat1								NAMELIST /fire/ fire_ignition_start_lat1
NAMELIST /fire/ fire_ignition_end_lon1									NAMELIST /fire/ fire_ignition_end_lon1
NAMELIST /fire/ fire_ignition_end_lat1									NAMELIST /fire/ fire_ignition_end_lat1
NAMELIST /fire/ fire_ignition_radius1									NAMELIST /fire/ fire_ignition_radius1
NAMELIST /fire/ fire_ignition_start_time1								NAMELIST /fire/ fire_ignition_start_time1
NAMELIST /fire/ fire_ignition_end_time1									NAMELIST /fire/ fire_ignition_end_time1
NAMELIST /fire/ fire_ignition_ros2									NAMELIST /fire/ fire_ignition_ros2
NAMELIST /fire/ fire_ignition_start_lon2								NAMELIST /fire/ fire_ignition_start_lon2
NAMELIST /fire/ fire_ignition_start_lat2								NAMELIST /fire/ fire_ignition_start_lat2
NAMELIST /fire/ fire_ignition_end_lon2									NAMELIST /fire/ fire_ignition_end_lon2
NAMELIST /fire/ fire_ignition_end_lat2									NAMELIST /fire/ fire_ignition_end_lat2
NAMELIST /fire/ fire_ignition_radius2									NAMELIST /fire/ fire_ignition_radius2
NAMELIST /fire/ fire_ignition_start_time2								NAMELIST /fire/ fire_ignition_start_time2
NAMELIST /fire/ fire_ignition_end_time2									NAMELIST /fire/ fire_ignition_end_time2
NAMELIST /fire/ fire_ignition_ros3									NAMELIST /fire/ fire_ignition_ros3
NAMELIST /fire/ fire_ignition_start_lon3								NAMELIST /fire/ fire_ignition_start_lon3
NAMELIST /fire/ fire_ignition_start_lat3								NAMELIST /fire/ fire_ignition_start_lat3
NAMELIST /fire/ fire_ignition_end_lon3									NAMELIST /fire/ fire_ignition_end_lon3
NAMELIST /fire/ fire_ignition_end_lat3									NAMELIST /fire/ fire_ignition_end_lat3
NAMELIST /fire/ fire_ignition_radius3									NAMELIST /fire/ fire_ignition_radius3
NAMELIST /fire/ fire_ignition_start_time3								NAMELIST /fire/ fire_ignition_start_time3
NAMELIST /fire/ fire_ignition_end_time3									NAMELIST /fire/ fire_ignition_end_time3
NAMELIST /fire/ fire_ignition_ros4									NAMELIST /fire/ fire_ignition_ros4
NAMELIST /fire/ fire_ignition_start_lon4								NAMELIST /fire/ fire_ignition_start_lon4
NAMELIST /fire/ fire_ignition_start_lat4								NAMELIST /fire/ fire_ignition_start_lat4
NAMELIST /fire/ fire_ignition_end_lon4									NAMELIST /fire/ fire_ignition_end_lon4
NAMELIST /fire/ fire_ignition_end_lat4									NAMELIST /fire/ fire_ignition_end_lat4
NAMELIST /fire/ fire_ignition_radius4									NAMELIST /fire/ fire_ignition_radius4
NAMELIST /fire/ fire_ignition_start_time4								NAMELIST /fire/ fire_ignition_start_time4
NAMELIST /fire/ fire_ignition_end_time4									NAMELIST /fire/ fire_ignition_end_time4
NAMELIST /fire/ fire_ignition_ros5									NAMELIST /fire/ fire_ignition_ros5
NAMELIST /fire/ fire_ignition_start_lon5								NAMELIST /fire/ fire_ignition_start_lon5
NAMELIST /fire/ fire_ignition_start_lat5								NAMELIST /fire/ fire_ignition_start_lat5
NAMELIST /fire/ fire_ignition_end_lon5									NAMELIST /fire/ fire_ignition_end_lon5
NAMELIST /fire/ fire_ignition_end_lat5									NAMELIST /fire/ fire_ignition_end_lat5
NAMELIST /fire/ fire_ignition_radius5									NAMELIST /fire/ fire_ignition_radius5
NAMELIST /fire/ fire_ignition_start_time5								NAMELIST /fire/ fire_ignition_start_time5
NAMELIST /fire/ fire_ignition_end_time5									NAMELIST /fire/ fire_ignition_end_time5
NAMELIST /fire/ fire_ignition_start_x1									NAMELIST /fire/ fire_ignition_start_x1
NAMELIST /fire/ fire_ignition_start_y1									NAMELIST /fire/ fire_ignition_start_y1
NAMELIST /fire/ fire_ignition_end_x1									NAMELIST /fire/ fire_ignition_end_x1
NAMELIST /fire/ fire_ignition_end_y1									NAMELIST /fire/ fire_ignition_end_y1
NAMELIST /fire/ fire_ignition_start_x2									NAMELIST /fire/ fire_ignition_start_x2
NAMELIST /fire/ fire_ignition_start_y2									NAMELIST /fire/ fire_ignition_start_y2
NAMELIST /fire/ fire_ignition_end_x2									NAMELIST /fire/ fire_ignition_end_x2
NAMELIST /fire/ fire_ignition_end_y2									NAMELIST /fire/ fire_ignition_end_y2
NAMELIST /fire/ fire_ignition_start_x3									NAMELIST /fire/ fire_ignition_start_x3
NAMELIST /fire/ fire_ignition_start_y3									NAMELIST /fire/ fire_ignition_start_y3
NAMELIST /fire/ fire_ignition_end_x3									NAMELIST /fire/ fire_ignition_end_x3
NAMELIST /fire/ fire_ignition_end_y3									NAMELIST /fire/ fire_ignition_end_y3
NAMELIST /fire/ fire_ignition_start_x4									NAMELIST /fire/ fire_ignition_start_x4
NAMELIST /fire/ fire_ignition_start_y4									NAMELIST /fire/ fire_ignition_start_y4
NAMELIST /fire/ fire_ignition_end_x4									NAMELIST /fire/ fire_ignition_end_x4
NAMELIST /fire/ fire_ignition_end_y4									NAMELIST /fire/ fire_ignition_end_y4
NAMELIST /fire/ fire_ignition_start_x5									NAMELIST /fire/ fire_ignition_start_x5
NAMELIST /fire/ fire_ignition_start_y5									NAMELIST /fire/ fire_ignition_start_y5
NAMELIST /fire/ fire_ignition_end_x5									NAMELIST /fire/ fire_ignition_end_x5
NAMELIST /fire/ fire_ignition_end_y5									NAMELIST /fire/ fire_ignition_end_y5
NAMELIST /fire/ fire_lat_init										NAMELIST /fire/ fire_lat_init
NAMELIST /fire/ fire_lon_init										NAMELIST /fire/ fire_lon_init
NAMELIST /fire/ fire_ign_time										NAMELIST /fire/ fire_ign_time
NAMELIST /fire/ fire_shape										NAMELIST /fire/ fire_shape
NAMELIST /fire/ fire_sprd_mdl										NAMELIST /fire/ fire_sprd_mdl
NAMELIST /fire/ fire_crwn_hgt										NAMELIST /fire/ fire_crwn_hgt
NAMELIST /fire/ fire_ext_grnd										NAMELIST /fire/ fire_ext_grnd
NAMELIST /fire/ fire_ext_crwn										NAMELIST /fire/ fire_ext_crwn
NAMELIST /fire/ fire_wind_height									NAMELIST /fire/ fire_wind_height
NAMELIST /fire/ fire_fuel_read										NAMELIST /fire/ fire_fuel_read
NAMELIST /fire/ fire_fuel_cat										NAMELIST /fire/ fire_fuel_cat
NAMELIST /fire/ fire_print_msg										NAMELIST /fire/ fire_print_msg
NAMELIST /fire/ fire_print_file										NAMELIST /fire/ fire_print_file
NAMELIST /fire/ fire_fuel_left_method									NAMELIST /fire/ fire_fuel_left_method
NAMELIST /fire/ fire_fuel_left_irl									NAMELIST /fire/ fire_fuel_left_irl
NAMELIST /fire/ fire_fuel_left_jrl									NAMELIST /fire/ fire_fuel_left_jrl
NAMELIST /fire/ fire_back_weight									NAMELIST /fire/ fire_back_weight
NAMELIST /fire/ fire_grows_only										NAMELIST /fire/ fire_grows_only
NAMELIST /fire/ fire_upwinding										NAMELIST /fire/ fire_upwinding
NAMELIST /fire/ fire_upwind_split									NAMELIST /fire/ fire_upwind_split
NAMELIST /fire/ fire_viscosity										NAMELIST /fire/ fire_viscosity
NAMELIST /fire/ fire_lfn_ext_up										NAMELIST /fire/ fire_lfn_ext_up
NAMELIST /fire/ fire_topo_from_atm									NAMELIST /fire/ fire_topo_from_atm
NAMELIST /fire/ fire_advection										NAMELIST /fire/ fire_advection
NAMELIST /fire/ fire_test_steps										NAMELIST /fire/ fire_test_steps
NAMELIST /fire/ fire_const_time										NAMELIST /fire/ fire_const_time
NAMELIST /fire/ fire_const_grnhfx									NAMELIST /fire/ fire_const_grnhfx
NAMELIST /fire/ fire_const_grnqfx									NAMELIST /fire/ fire_const_grnqfx
NAMELIST /fire/ fire_atm_feedback									NAMELIST /fire/ fire_atm_feedback
NAMELIST /fire/ fire_mountain_type									NAMELIST /fire/ fire_mountain_type
NAMELIST /fire/ fire_mountain_height									NAMELIST /fire/ fire_mountain_height
NAMELIST /fire/ fire_mountain_start_x									NAMELIST /fire/ fire_mountain_start_x
NAMELIST /fire/ fire_mountain_start_y									NAMELIST /fire/ fire_mountain_start_y
NAMELIST /fire/ fire_mountain_end_x									NAMELIST /fire/ fire_mountain_end_x
NAMELIST /fire/ fire_mountain_end_y									NAMELIST /fire/ fire_mountain_end_y
NAMELIST /fire/ delt_perturbation									NAMELIST /fire/ delt_perturbation
NAMELIST /fire/ xrad_perturbation									NAMELIST /fire/ xrad_perturbation
NAMELIST /fire/ yrad_perturbation									NAMELIST /fire/ yrad_perturbation
NAMELIST /fire/ zrad_perturbation									NAMELIST /fire/ zrad_perturbation
NAMELIST /fire/ hght_perturbation									NAMELIST /fire/ hght_perturbation
NAMELIST /fire/ stretch_grd										NAMELIST /fire/ stretch_grd
NAMELIST /fire/ stretch_hyp										NAMELIST /fire/ stretch_hyp
NAMELIST /fire/ z_grd_scale										NAMELIST /fire/ z_grd_scale
NAMELIST /fire/ sfc_full_init										NAMELIST /fire/ sfc_full_init
NAMELIST /fire/ sfc_lu_index										NAMELIST /fire/ sfc_lu_index
NAMELIST /fire/ sfc_tsk											NAMELIST /fire/ sfc_tsk
NAMELIST /fire/ sfc_tmn											NAMELIST /fire/ sfc_tmn
NAMELIST /fire/ fire_read_lu										NAMELIST /fire/ fire_read_lu
NAMELIST /fire/ fire_read_tsk										NAMELIST /fire/ fire_read_tsk
NAMELIST /fire/ fire_read_tmn										NAMELIST /fire/ fire_read_tmn
NAMELIST /fire/ fire_read_atm_ht									NAMELIST /fire/ fire_read_atm_ht
NAMELIST /fire/ fire_read_fire_ht									NAMELIST /fire/ fire_read_fire_ht
NAMELIST /fire/ fire_read_atm_grad									NAMELIST /fire/ fire_read_atm_grad
NAMELIST /fire/ fire_read_fire_grad									NAMELIST /fire/ fire_read_fire_grad
NAMELIST /fire/ sfc_vegfra										NAMELIST /fire/ sfc_vegfra
NAMELIST /fire/ sfc_canwat										NAMELIST /fire/ sfc_canwat
NAMELIST /fire/ sfc_ivgtyp										NAMELIST /fire/ sfc_ivgtyp
NAMELIST /fire/ sfc_isltyp										NAMELIST /fire/ sfc_isltyp
NAMELIST /dynamics/ do_avgflx_em									NAMELIST /dynamics/ do_avgflx_em
NAMELIST /dynamics/ do_avgflx_cugd									NAMELIST /dynamics/ do_avgflx_cugd
NAMELIST /stoch/ nens											NAMELIST /stoch/ nens
NAMELIST /stoch/ skebs											NAMELIST /stoch/ skebs
NAMELIST /stoch/ stoch_force_opt									NAMELIST /stoch/ stoch_force_opt
NAMELIST /stoch/ skebs_vertstruc									NAMELIST /stoch/ skebs_vertstruc
NAMELIST /stoch/ stoch_vertstruc_opt									NAMELIST /stoch/ stoch_vertstruc_opt
NAMELIST /stoch/ tot_backscat_psi									NAMELIST /stoch/ tot_backscat_psi
NAMELIST /stoch/ tot_backscat_t										NAMELIST /stoch/ tot_backscat_t
NAMELIST /stoch/ ztau_psi										NAMELIST /stoch/ ztau_psi
NAMELIST /stoch/ ztau_t											NAMELIST /stoch/ ztau_t
NAMELIST /stoch/ rexponent_psi										NAMELIST /stoch/ rexponent_psi
NAMELIST /stoch/ rexponent_t										NAMELIST /stoch/ rexponent_t
NAMELIST /stoch/ zsigma2_eps										NAMELIST /stoch/ zsigma2_eps
NAMELIST /stoch/ zsigma2_eta										NAMELIST /stoch/ zsigma2_eta
NAMELIST /stoch/ kminforc										NAMELIST /stoch/ kminforc
NAMELIST /stoch/ lminforc										NAMELIST /stoch/ lminforc
NAMELIST /stoch/ kminforct										NAMELIST /stoch/ kminforct
NAMELIST /stoch/ lminforct										NAMELIST /stoch/ lminforct
NAMELIST /stoch/ kmaxforc										NAMELIST /stoch/ kmaxforc
NAMELIST /stoch/ lmaxforc										NAMELIST /stoch/ lmaxforc
NAMELIST /stoch/ kmaxforct										NAMELIST /stoch/ kmaxforct
NAMELIST /stoch/ lmaxforct										NAMELIST /stoch/ lmaxforct
NAMELIST /stoch/ iseed_skebs										NAMELIST /stoch/ iseed_skebs
NAMELIST /stoch/ sppt											NAMELIST /stoch/ sppt
NAMELIST /stoch/ gridpt_stddev_sppt									NAMELIST /stoch/ gridpt_stddev_sppt
NAMELIST /stoch/ stddev_cutoff_sppt									NAMELIST /stoch/ stddev_cutoff_sppt
NAMELIST /stoch/ lengthscale_sppt									NAMELIST /stoch/ lengthscale_sppt
NAMELIST /stoch/ timescale_sppt										NAMELIST /stoch/ timescale_sppt
NAMELIST /stoch/ sppt_vertstruc										NAMELIST /stoch/ sppt_vertstruc
NAMELIST /stoch/ iseed_sppt										NAMELIST /stoch/ iseed_sppt
NAMELIST /stoch/ rand_perturb										NAMELIST /stoch/ rand_perturb
NAMELIST /stoch/ gridpt_stddev_rand_pert								NAMELIST /stoch/ gridpt_stddev_rand_pert
NAMELIST /stoch/ stddev_cutoff_rand_pert								NAMELIST /stoch/ stddev_cutoff_rand_pert
NAMELIST /stoch/ lengthscale_rand_pert									NAMELIST /stoch/ lengthscale_rand_pert
NAMELIST /stoch/ timescale_rand_pert									NAMELIST /stoch/ timescale_rand_pert
NAMELIST /stoch/ rand_pert_vertstruc									NAMELIST /stoch/ rand_pert_vertstruc
NAMELIST /stoch/ iseed_rand_pert									NAMELIST /stoch/ iseed_rand_pert
NAMELIST /stoch/ spp										   <
NAMELIST /stoch/ hrrr_cycling									   <
NAMELIST /stoch/ spp_conv									   <
NAMELIST /stoch/ gridpt_stddev_spp_conv								   <
NAMELIST /stoch/ stddev_cutoff_spp_conv								   <
NAMELIST /stoch/ lengthscale_spp_conv								   <
NAMELIST /stoch/ timescale_spp_conv								   <
NAMELIST /stoch/ vertstruc_spp_conv								   <
NAMELIST /stoch/ iseed_spp_conv									   <
NAMELIST /stoch/ spp_pbl									   <
NAMELIST /stoch/ gridpt_stddev_spp_pbl								   <
NAMELIST /stoch/ stddev_cutoff_spp_pbl								   <
NAMELIST /stoch/ lengthscale_spp_pbl								   <
NAMELIST /stoch/ timescale_spp_pbl								   <
NAMELIST /stoch/ vertstruc_spp_pbl								   <
NAMELIST /stoch/ iseed_spp_pbl									   <
NAMELIST /stoch/ spp_lsm									   <
NAMELIST /stoch/ gridpt_stddev_spp_lsm								   <
NAMELIST /stoch/ stddev_cutoff_spp_lsm								   <
NAMELIST /stoch/ lengthscale_spp_lsm								   <
NAMELIST /stoch/ timescale_spp_lsm								   <
NAMELIST /stoch/ vertstruc_spp_lsm								   <
NAMELIST /stoch/ iseed_spp_lsm									   <
NAMELIST /dynamics/ sfs_opt										NAMELIST /dynamics/ sfs_opt
NAMELIST /dynamics/ m_opt										NAMELIST /dynamics/ m_opt
NAMELIST /physics/ lakedepth_default									NAMELIST /physics/ lakedepth_default
NAMELIST /physics/ lake_min_elev									NAMELIST /physics/ lake_min_elev
NAMELIST /physics/ use_lakedepth									NAMELIST /physics/ use_lakedepth
NAMELIST /diags/ p_lev_diags										NAMELIST /diags/ p_lev_diags
NAMELIST /diags/ p_lev_diags_dfi									NAMELIST /diags/ p_lev_diags_dfi
NAMELIST /diags/ num_press_levels									NAMELIST /diags/ num_press_levels
NAMELIST /diags/ press_levels										NAMELIST /diags/ press_levels
NAMELIST /diags/ use_tot_or_hyd_p									NAMELIST /diags/ use_tot_or_hyd_p
NAMELIST /diags/ extrap_below_grnd									NAMELIST /diags/ extrap_below_grnd
NAMELIST /diags/ p_lev_missing										NAMELIST /diags/ p_lev_missing
NAMELIST /diags/ z_lev_diags										NAMELIST /diags/ z_lev_diags
NAMELIST /diags/ z_lev_diags_dfi									NAMELIST /diags/ z_lev_diags_dfi
NAMELIST /diags/ num_z_levels										NAMELIST /diags/ num_z_levels
NAMELIST /diags/ z_levels										NAMELIST /diags/ z_levels
NAMELIST /diags/ z_lev_missing										NAMELIST /diags/ z_lev_missing
NAMELIST /afwa/ afwa_diag_opt										NAMELIST /afwa/ afwa_diag_opt
NAMELIST /afwa/ afwa_ptype_opt										NAMELIST /afwa/ afwa_ptype_opt
NAMELIST /afwa/ afwa_vil_opt										NAMELIST /afwa/ afwa_vil_opt
NAMELIST /afwa/ afwa_radar_opt										NAMELIST /afwa/ afwa_radar_opt
NAMELIST /afwa/ afwa_severe_opt										NAMELIST /afwa/ afwa_severe_opt
NAMELIST /afwa/ afwa_icing_opt										NAMELIST /afwa/ afwa_icing_opt
NAMELIST /afwa/ afwa_vis_opt										NAMELIST /afwa/ afwa_vis_opt
NAMELIST /afwa/ afwa_cloud_opt										NAMELIST /afwa/ afwa_cloud_opt
NAMELIST /afwa/ afwa_therm_opt										NAMELIST /afwa/ afwa_therm_opt
NAMELIST /afwa/ afwa_turb_opt										NAMELIST /afwa/ afwa_turb_opt
NAMELIST /afwa/ afwa_buoy_opt										NAMELIST /afwa/ afwa_buoy_opt
												   >	NAMELIST /afwa/ afwa_hailcast_opt
NAMELIST /afwa/ afwa_ptype_ccn_tmp									NAMELIST /afwa/ afwa_ptype_ccn_tmp
NAMELIST /afwa/ afwa_ptype_tot_melt									NAMELIST /afwa/ afwa_ptype_tot_melt
NAMELIST /afwa/ afwa_bad_data_check									NAMELIST /afwa/ afwa_bad_data_check
NAMELIST /stoch/ perturb_bdy										NAMELIST /stoch/ perturb_bdy
NAMELIST /stoch/ perturb_chem_bdy									NAMELIST /stoch/ perturb_chem_bdy
NAMELIST /physics/ chem_opt										NAMELIST /physics/ chem_opt
!ENDOFREGISTRYGENERATEDINCLUDE										!ENDOFREGISTRYGENERATEDINCLUDE
>                                                 
>=================================================================================
>  phys/module_microphysics_driver.F
>=================================================================================
!WRF:MEDIATION_LAYER:PHYSICS										!WRF:MEDIATION_LAYER:PHYSICS
! *** add new modules of schemes here									! *** add new modules of schemes here
!													!
MODULE module_microphysics_driver									MODULE module_microphysics_driver
CONTAINS												CONTAINS

SUBROUTINE microphysics_driver(                                          &				SUBROUTINE microphysics_driver(                                          &
                       th, rho, pi_phy, p                                &				                       th, rho, pi_phy, p                                &
                      ,ht, dz8w, p8w, dt,dx,dy                           &				                      ,ht, dz8w, p8w, dt,dx,dy                           &
                      ,mp_physics, spec_zone                             &				                      ,mp_physics, spec_zone                             &
                      ,specified, channel_switch                         &				                      ,specified, channel_switch                         &
                      ,warm_rain                                         &				                      ,warm_rain                                         &
                      ,t8w                                               &				                      ,t8w                                               &
                      ,chem_opt, progn                                   &				                      ,chem_opt, progn                                   &
                      ,cldfra, cldfra_old, exch_h, nsource               &				                      ,cldfra, cldfra_old, exch_h, nsource               &
                      ,qlsink, precr, preci, precs, precg                &				                      ,qlsink, precr, preci, precs, precg                &
                      ,xland,snowh,itimestep                             &				                      ,xland,snowh,itimestep                             &
                      ,f_ice_phy,f_rain_phy,f_rimef_phy                  &				                      ,f_ice_phy,f_rain_phy,f_rimef_phy                  &
                      ,lowlyr,sr, id                                     &				                      ,lowlyr,sr, id                                     &
                      ,ids,ide, jds,jde, kds,kde                         &				                      ,ids,ide, jds,jde, kds,kde                         &
                      ,ims,ime, jms,jme, kms,kme                         &				                      ,ims,ime, jms,jme, kms,kme                         &
                      ,ips,ipe, jps,jpe, kps,kpe                         &				                      ,ips,ipe, jps,jpe, kps,kpe                         &
                      ,i_start,i_end,j_start,j_end,kts,kte               &				                      ,i_start,i_end,j_start,j_end,kts,kte               &
                      ,num_tiles, naer                                   &				                      ,num_tiles, naer                                   &
!======================											!======================
                      !Variables required for CAMMGMP Scheme						                      !Variables required for CAMMGMP Scheme
                      ,dlf,dlf2,t_phy,p_hyd,p8w_hyd,tke_pbl,z_at_w,qfx   &				                      ,dlf,dlf2,t_phy,p_hyd,p8w_hyd,tke_pbl,z_at_w,qfx   &
                      ,rliq,turbtype3d,smaw3d,wsedl3d,cldfra_old_mp      &				                      ,rliq,turbtype3d,smaw3d,wsedl3d,cldfra_old_mp      &
                      ,cldfra_mp,cldfra_mp_all,lradius,iradius           &				                      ,cldfra_mp,cldfra_mp_all,lradius,iradius           &
                      ,cldfrai,cldfral,cldfra_conv                       &				                      ,cldfrai,cldfral,cldfra_conv                       &
                      ,alt                                               &				                      ,alt                                               &
                      ,accum_mode,aitken_mode,coarse_mode                &				                      ,accum_mode,aitken_mode,coarse_mode                &
                      ,icwmrsh3d,icwmrdp3d,shfrc3d,cmfmc3d,cmfmc2_3d     &				                      ,icwmrsh3d,icwmrdp3d,shfrc3d,cmfmc3d,cmfmc2_3d     &
                      ,config_flags,fnm,fnp,rh_old_mp,lcd_old_mp         &				                      ,config_flags,fnm,fnp,rh_old_mp,lcd_old_mp         &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                      ,chem                                              &! For CAMMGMP scheme P	                      ,chem                                              &! For CAMMGMP scheme P
                      ,qme3d,prain3d,nevapr3d,rate1ord_cw2pr_st3d        &				                      ,qme3d,prain3d,nevapr3d,rate1ord_cw2pr_st3d        &
                      ,dgnum4D,dgnumwet4D                                &				                      ,dgnum4D,dgnumwet4D                                &
#endif													#endif
!======================                                   						!======================                                   
                      ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr   &				                      ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr   &
                      ,qic_curr,qip_curr,qid_curr &							                      ,qic_curr,qip_curr,qid_curr &
                      ,qnic_curr,qnip_curr,qnid_curr &							                      ,qnic_curr,qnip_curr,qnid_curr &
                      ,qndrop_curr,qni_curr,qh_curr,qnh_curr             &				                      ,qndrop_curr,qni_curr,qh_curr,qnh_curr             &
                      ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr      &				                      ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr      &
                      ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr      &				                      ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr      &
                      ,qnwfa_curr,qnifa_curr                             & ! for water/ice-frien	                      ,qnwfa_curr,qnifa_curr                             & ! for water/ice-frien
                      ,f_qnwfa,f_qnifa                                   & ! for water/ice-frien	                      ,f_qnwfa,f_qnifa                                   & ! for water/ice-frien
                      ,qvolg_curr,qvolh_curr                             &				                      ,qvolg_curr,qvolh_curr                             &
                      ,effr_curr,ice_effr_curr,tot_effr_curr             &				                      ,effr_curr,ice_effr_curr,tot_effr_curr             &
                       ,qic_effr_curr,qip_effr_curr,qid_effr_curr        &             			                       ,qic_effr_curr,qip_effr_curr,qid_effr_curr        &             
                      ,f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni      &				                      ,f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni      &
                      ,f_qns,f_qnr,f_qng,f_qnc,f_qnn,f_qh,f_qnh          &				                      ,f_qns,f_qnr,f_qng,f_qnc,f_qnn,f_qh,f_qnh          &
                      ,            f_qzr,f_qzi,f_qzs,f_qzg,f_qzh         &				                      ,            f_qzr,f_qzi,f_qzs,f_qzg,f_qzh         &
                      ,f_qvolg,f_qvolh                                   &				                      ,f_qvolg,f_qvolh                                   &
                      ,f_qic,f_qip,f_qid &								                      ,f_qic,f_qip,f_qid &
                      ,f_qnic,f_qnip,f_qnid &								                      ,f_qnic,f_qnip,f_qnid &
                      ,f_effr,f_ice_effr,f_tot_effr                      &				                      ,f_effr,f_ice_effr,f_tot_effr                      &
                      ,f_qic_effr,f_qip_effr,f_qid_effr                  &                 		                      ,f_qic_effr,f_qip_effr,f_qid_effr                  &                 
                      ,qrcuten, qscuten, qicuten, mu                     &				                      ,qrcuten, qscuten, qicuten, mu                     &
                      ,qt_curr,f_qt                                      &				                      ,qt_curr,f_qt                                      &
                      ,mp_restart_state,tbpvs_state,tbpvs0_state         & ! for etampnew or eta	                      ,mp_restart_state,tbpvs_state,tbpvs0_state         & ! for etampnew or eta
                      ,hail,ice2                                         & ! for mp_gsfcgce		                      ,hail,ice2                                         & ! for mp_gsfcgce
!                     ,ccntype                                           & ! for mp_milbrandt2mo	!                     ,ccntype                                           & ! for mp_milbrandt2mo
                      ,u,v,w,z                                          &   				                      ,u,v,w,z                                          &   
                      ,rainnc,    rainncv                                &				                      ,rainnc,    rainncv                                &
                      ,snownc,    snowncv                                &				                      ,snownc,    snowncv                                &
                      ,hailnc,    hailncv                                &				                      ,hailnc,    hailncv                                &
                      ,graupelnc, graupelncv                             &				                      ,graupelnc, graupelncv                             &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                      ,rainprod, evapprod                                &				                      ,rainprod, evapprod                                &
                      ,qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp                &				                      ,qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp                &
#endif													#endif
                      ,qnwfa2d                                           & ! for water/ice-frien	                      ,qnwfa2d                                           & ! for water/ice-frien
                      ,refl_10cm                                         & ! HM, 9/22/09, add fo	                      ,refl_10cm                                         & ! HM, 9/22/09, add fo
! YLIN													! YLIN
! Added the RI_CURR array to the call									! Added the RI_CURR array to the call
                      ,ri_curr                                           &				                      ,ri_curr                                           &
                      ,diagflag,   do_radar_ref                          &				                      ,diagflag,   do_radar_ref                          &
                      ,re_cloud, re_ice, re_snow                         & ! G. Thompson		                      ,re_cloud, re_ice, re_snow                         & ! G. Thompson
                      ,has_reqc, has_reqi, has_reqs                      & ! G. Thompson		                      ,has_reqc, has_reqi, has_reqs                      & ! G. Thompson
                      ,ccn_conc                                          & ! RAS			                      ,ccn_conc                                          & ! RAS
                      ,scalar,num_scalar                                   &				                      ,scalar,num_scalar                                   &
                      ,kext_ql,kext_qs,kext_qg            &						                      ,kext_ql,kext_qs,kext_qg            &
                      ,kext_qh,kext_qa                         &					                      ,kext_qh,kext_qa                         &
                      ,kext_qic,kext_qid,kext_qip         &						                      ,kext_qic,kext_qid,kext_qip         &
                      ,kext_ft_qic,kext_ft_qid,kext_ft_qip         &					                      ,kext_ft_qic,kext_ft_qid,kext_ft_qip         &
                      ,kext_ft_qs,kext_ft_qg            &						                      ,kext_ft_qs,kext_ft_qg            &
                      ,height,tempc &									                      ,height,tempc &
                      ,TH_OLD                                            &				                      ,TH_OLD                                            &
                      ,QV_OLD                                            &				                      ,QV_OLD                                            &
                      ,xlat,xlong,ivgtyp                                 &				                      ,xlat,xlong,ivgtyp                                 &
#ifdef cpl_wrf_chimere 											#ifdef cpl_wrf_chimere 
                      ,indirect_feed_chimere                             &				                      ,indirect_feed_chimere                             &
                      ,n_bin                                             &				                      ,n_bin                                             &
                      ,max_sect                                          &				                      ,max_sect                                          &
                      ,sect                                              &				                      ,sect                                              &
                      ,dropsource                                        &				                      ,dropsource                                        &
                      ,num_aer                                           &				                      ,num_aer                                           &
                      ,num_hygro_aer                                     &				                      ,num_hygro_aer                                     &
                      ,hygro_aer                                         &				                      ,hygro_aer                                         &
                      ,in_aer                                            &				                      ,in_aer                                            &
                      ,num01,num02,num10                                 &				                      ,num01,num02,num10                                 &
                      ,ccn1,ccn2,ccn3,ccn4,ccn5,ccn6                     &				                      ,ccn1,ccn2,ccn3,ccn4,ccn5,ccn6                     &
                      ,rainrate,evaprate                                 &				                      ,rainrate,evaprate                                 &
#endif													#endif

                                                   )							                                                   )
! Framework												! Framework
#if(NMM_CORE==1)											#if(NMM_CORE==1)
   USE module_state_description, ONLY :                                  &				   USE module_state_description, ONLY :                                  &
                     KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME    &		                     KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME    &
                    ,WSM6SCHEME, ETAMPNEW, ETAMP_HR, etamp_HWRF,THOMPSON, THOMPSONAERO, MORR_TWO	                    ,WSM6SCHEME, ETAMPNEW, ETAMP_HR, etamp_HWRF,THOMPSON, THOMPSONAERO, MORR_TWO
                    ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME, NSSL_2MOM, NSSL_2MOMCCN, NSSL_2MOMG 	                    ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME, NSSL_2MOM, NSSL_2MOMCCN, NSSL_2MOMG 
                    ,NSSL_1MOM,NSSL_1MOMLFO &								                    ,NSSL_1MOM,NSSL_1MOMLFO &
                    ,MILBRANDT2MOM !,MILBRANDT3MOM 							                    ,MILBRANDT2MOM !,MILBRANDT3MOM 
#else													#else
   USE module_state_description, ONLY :                                  &				   USE module_state_description, ONLY :                                  &
                     KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME    &		                     KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME    &
                    ,WSM6SCHEME, ETAMPNEW, ETAMP_HR, THOMPSON, THOMPSONAERO, FAST_KHAIN_LYNN, MO	                    ,WSM6SCHEME, ETAMPNEW, ETAMP_HR, THOMPSON, THOMPSONAERO, FAST_KHAIN_LYNN, MO
                    ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME, NSSL_2MOM, NSSL_2MOMCCN, NSSL_2MOMG 	                    ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME, NSSL_2MOM, NSSL_2MOMCCN, NSSL_2MOMG 
                    ,NSSL_1MOM,NSSL_1MOMLFO & ! ,NSSL_3MOM       &					                    ,NSSL_1MOM,NSSL_1MOMLFO & ! ,NSSL_3MOM       &
                    ,MILBRANDT2MOM , CAMMGMPSCHEME,FULL_KHAIN_LYNN  !,MILBRANDT3MOM			                    ,MILBRANDT2MOM , CAMMGMPSCHEME,FULL_KHAIN_LYNN  !,MILBRANDT3MOM
#endif													#endif

#ifdef DM_PARALLEL											#ifdef DM_PARALLEL
  USE module_dm, ONLY : &										  USE module_dm, ONLY : &
                 local_communicator, mytask,  wrf_dm_min_real, wrf_dm_max_real				                 local_communicator, mytask,  wrf_dm_min_real, wrf_dm_max_real
#endif													#endif

! Model Layer												! Model Layer
   USE module_model_constants										   USE module_model_constants
   USE module_wrf_error											   USE module_wrf_error
   USE module_configure, only: grid_config_rec_type							   USE module_configure, only: grid_config_rec_type
#if ( WRF_CHEM == 1 )   										#if ( WRF_CHEM == 1 )   
!mchen   USE module_state_description, only: num_scalar               ! For CAMMGMP scheme Progn	!mchen   USE module_state_description, only: num_scalar               ! For CAMMGMP scheme Progn
   USE module_state_description, only: num_chem               ! mchen 					   USE module_state_description, only: num_chem               ! mchen 
   USE modal_aero_data, only:  ntot_amode_cam_mam => ntot_amode ! For CAMMGMP scheme Prognostic 	   USE modal_aero_data, only:  ntot_amode_cam_mam => ntot_amode ! For CAMMGMP scheme Prognostic 
#endif													#endif

! *** add new modules of schemes here									! *** add new modules of schemes here

   USE module_mp_kessler										   USE module_mp_kessler
   USE module_mp_lin											   USE module_mp_lin
   USE module_mp_sbu_ylin										   USE module_mp_sbu_ylin
   USE module_mp_wsm3											   USE module_mp_wsm3
   USE module_mp_wsm5											   USE module_mp_wsm5
   USE module_mp_wsm6											   USE module_mp_wsm6
   USE module_mp_etanew											   USE module_mp_etanew
   USE module_mp_thompson										   USE module_mp_thompson
   USE module_mp_full_sbm										   USE module_mp_full_sbm
   USE module_mp_fast_sbm										   USE module_mp_fast_sbm
   USE module_mp_gsfcgce										   USE module_mp_gsfcgce
   USE module_mp_morr_two_moment									   USE module_mp_morr_two_moment
   USE module_mp_wdm5											   USE module_mp_wdm5
   USE module_mp_wdm6											   USE module_mp_wdm6
   USE module_mp_milbrandt2mom										   USE module_mp_milbrandt2mom
# if (EM_CORE == 1)											# if (EM_CORE == 1)
   USE module_mp_cammgmp_driver, ONLY: CAMMGMP ! CAM5's microphysics driver				   USE module_mp_cammgmp_driver, ONLY: CAMMGMP ! CAM5's microphysics driver
# endif													# endif
!  USE module_mp_milbrandt3mom										!  USE module_mp_milbrandt3mom
#if (EM_CORE==1)											#if (EM_CORE==1)
   USE module_mp_nssl_2mom										   USE module_mp_nssl_2mom
#endif													#endif

   USE module_mp_HWRF											   USE module_mp_HWRF
   USE module_mixactivate, only: prescribe_aerosol_mixactivate						   USE module_mixactivate, only: prescribe_aerosol_mixactivate

! For checking model timestep is history time (for radar reflectivity)					! For checking model timestep is history time (for radar reflectivity)
   USE module_utility, ONLY: WRFU_Clock, WRFU_Alarm							   USE module_utility, ONLY: WRFU_Clock, WRFU_Alarm
   USE module_domain, ONLY : HISTORY_ALARM, Is_alarm_tstep						   USE module_domain, ONLY : HISTORY_ALARM, Is_alarm_tstep

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
use module_radiation_driver, ONLY : cal_cldfra1 							use module_radiation_driver, ONLY : cal_cldfra1 
use module_cpl, ONLY : coupler_on, wrf_chimere								use module_cpl, ONLY : coupler_on, wrf_chimere
#endif													#endif
!----------------------------------------------------------------------					!----------------------------------------------------------------------
   ! This driver calls subroutines for the microphys.							   ! This driver calls subroutines for the microphys.
   !													   !
   ! Schemes												   ! Schemes
   !													   !
   ! Kessler scheme											   ! Kessler scheme
   ! Lin et al. (1983), Rutledge and Hobbs (1984)							   ! Lin et al. (1983), Rutledge and Hobbs (1984)
   ! WRF Single-Moment 3-class, Hong, Dudhia and Chen (2004)						   ! WRF Single-Moment 3-class, Hong, Dudhia and Chen (2004)
   ! WRF Single-Moment 5-class, Hong, Dudhia and Chen (2004)						   ! WRF Single-Moment 5-class, Hong, Dudhia and Chen (2004)
   ! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop)					   ! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop)
   ! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier)					   ! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier)
   !   * etampnew - what's in the operational 4-km High-Resolution Window Runs				   !   * etampnew - what's in the operational 4-km High-Resolution Window Runs
   ! Milbrandt and Yau (2005)										   ! Milbrandt and Yau (2005)

!----------------------------------------------------------------------					!----------------------------------------------------------------------
   IMPLICIT NONE											   IMPLICIT NONE
!======================================================================					!======================================================================
! Grid structure in physics part of WRF									! Grid structure in physics part of WRF
!----------------------------------------------------------------------					!----------------------------------------------------------------------
! The horizontal velocities used in the physics are unstaggered						! The horizontal velocities used in the physics are unstaggered
! relative to temperature/moisture variables. All predicted						! relative to temperature/moisture variables. All predicted
! variables are carried at half levels except w, which is at full					! variables are carried at half levels except w, which is at full
! levels. Some arrays with names (*8w) are at w (full) levels.						! levels. Some arrays with names (*8w) are at w (full) levels.
!													!
!----------------------------------------------------------------------					!----------------------------------------------------------------------
! In WRF, kms (smallest number) is the bottom level and kme (largest					! In WRF, kms (smallest number) is the bottom level and kme (largest
! number) is the top level.  In your scheme, if 1 is at the top level,					! number) is the top level.  In your scheme, if 1 is at the top level,
! then you have to reverse the order in the k direction.						! then you have to reverse the order in the k direction.
!													!
!         kme      -   half level (no data at this level)						!         kme      -   half level (no data at this level)
!         kme    ----- full level									!         kme    ----- full level
!         kme-1    -   half level									!         kme-1    -   half level
!         kme-1  ----- full level									!         kme-1  ----- full level
!         .												!         .
!         .												!         .
!         .												!         .
!         kms+2    -   half level									!         kms+2    -   half level
!         kms+2  ----- full level									!         kms+2  ----- full level
!         kms+1    -   half level									!         kms+1    -   half level
!         kms+1  ----- full level									!         kms+1  ----- full level
!         kms      -   half level									!         kms      -   half level
!         kms    ----- full level									!         kms    ----- full level
!													!
!======================================================================					!======================================================================
! Definitions												! Definitions
!-----------												!-----------
! Rho_d      dry density (kg/m^3)									! Rho_d      dry density (kg/m^3)
! Theta_m    moist potential temperature (K)								! Theta_m    moist potential temperature (K)
! Qv         water vapor    mixing ratio (kg/kg)							! Qv         water vapor    mixing ratio (kg/kg)
! Qc         cloud water    mixing ratio (kg/kg)							! Qc         cloud water    mixing ratio (kg/kg)
! Qr         rain water     mixing ratio (kg/kg)							! Qr         rain water     mixing ratio (kg/kg)
! Qi         cloud ice      mixing ratio (kg/kg)							! Qi         cloud ice      mixing ratio (kg/kg)
! Qs         snow           mixing ratio (kg/kg)							! Qs         snow           mixing ratio (kg/kg)
! Qg         graupel        mixing ratio (kg/kg)							! Qg         graupel        mixing ratio (kg/kg)
! Qh         hail           mixing ratio (kg/kg)							! Qh         hail           mixing ratio (kg/kg)
! Qndrop     droplet number mixing ratio (#/kg)								! Qndrop     droplet number mixing ratio (#/kg)
! Qni        cloud ice number concentration (#/kg)							! Qni        cloud ice number concentration (#/kg)
! Qns        snow      number concentration (#/kg)							! Qns        snow      number concentration (#/kg)
! Qnr        rain      number concentration (#/kg)							! Qnr        rain      number concentration (#/kg)
! Qng        graupel   number concentration (#/kg)							! Qng        graupel   number concentration (#/kg)
! Qnh        hail      number concentration (#/kg)							! Qnh        hail      number concentration (#/kg)

! Qzr        rain             reflectivity (m6/kg)							! Qzr        rain             reflectivity (m6/kg)
! Qzi        ice              reflectivity (m6/kg)							! Qzi        ice              reflectivity (m6/kg)
! Qzs        snow             reflectivity (m6/kg)							! Qzs        snow             reflectivity (m6/kg)
! Qzg        graupel          reflectivity (m6/kg)							! Qzg        graupel          reflectivity (m6/kg)
! Qzh        hail             reflectivity (m6/kg)							! Qzh        hail             reflectivity (m6/kg)

! Qvolg        graupel   particle volume (m3/kg)							! Qvolg        graupel   particle volume (m3/kg)

!													!
!----------------------------------------------------------------------					!----------------------------------------------------------------------
!-- th        potential temperature    (K)								!-- th        potential temperature    (K)
!-- moist_new     updated moisture array   (kg/kg)							!-- moist_new     updated moisture array   (kg/kg)
!-- moist_old     Old moisture array       (kg/kg)							!-- moist_old     Old moisture array       (kg/kg)
!-- rho           density of air           (kg/m^3)							!-- rho           density of air           (kg/m^3)
!-- pi_phy        exner function           (dimensionless)						!-- pi_phy        exner function           (dimensionless)
!-- p             pressure                 (Pa)								!-- p             pressure                 (Pa)
!-- RAINNC        grid scale precipitation (mm)								!-- RAINNC        grid scale precipitation (mm)
!-- RAINNCV       one time step grid scale precipitation (mm/step)					!-- RAINNCV       one time step grid scale precipitation (mm/step)
!-- SNOWNC        grid scale snow and ice (mm)								!-- SNOWNC        grid scale snow and ice (mm)
!-- SNOWNCV       one time step grid scale snow and ice (mm/step)					!-- SNOWNCV       one time step grid scale snow and ice (mm/step)
!-- GRAUPELNC     grid scale graupel (mm)								!-- GRAUPELNC     grid scale graupel (mm)
!-- GRAUPELNCV    one time step grid scale graupel (mm/step)						!-- GRAUPELNCV    one time step grid scale graupel (mm/step)
!-- HAILNC        grid scale hail (mm)									!-- HAILNC        grid scale hail (mm)
!-- HAILNCV       one time step grid scale hail (mm/step)						!-- HAILNCV       one time step grid scale hail (mm/step)
!-- SR            one time step mass ratio of snow to total precip					!-- SR            one time step mass ratio of snow to total precip
!-- z             Height above sea level   (m)								!-- z             Height above sea level   (m)
!-- dt            Time step              (s)								!-- dt            Time step              (s)
!-- G             acceleration due to gravity  (m/s^2)							!-- G             acceleration due to gravity  (m/s^2)
!-- CP            heat capacity at constant pressure for dry air (J/kg/K)				!-- CP            heat capacity at constant pressure for dry air (J/kg/K)
!-- R_d           gas constant for dry air (J/kg/K)							!-- R_d           gas constant for dry air (J/kg/K)
!-- R_v           gas constant for water vapor (J/kg/K)							!-- R_v           gas constant for water vapor (J/kg/K)
!-- XLS           latent heat of sublimation   (J/kg)							!-- XLS           latent heat of sublimation   (J/kg)
!-- XLV           latent heat of vaporization  (J/kg)							!-- XLV           latent heat of vaporization  (J/kg)
!-- XLF           latent heat of melting       (J/kg)							!-- XLF           latent heat of melting       (J/kg)
!-- rhowater      water density                      (kg/m^3)						!-- rhowater      water density                      (kg/m^3)
!-- rhosnow       snow density               (kg/m^3)							!-- rhosnow       snow density               (kg/m^3)
!-- F_ICE_PHY     Fraction of ice.									!-- F_ICE_PHY     Fraction of ice.
!-- F_RAIN_PHY    Fraction of rain.									!-- F_RAIN_PHY    Fraction of rain.
!-- F_RIMEF_PHY   Mass ratio of rimed ice (rime factor)							!-- F_RIMEF_PHY   Mass ratio of rimed ice (rime factor)
!-- t8w           temperature at layer interfaces							!-- t8w           temperature at layer interfaces
!-- cldfra, cldfra_old, current, previous cloud fraction						!-- cldfra, cldfra_old, current, previous cloud fraction
!-- exch_h        vertical diffusivity (m2/s)								!-- exch_h        vertical diffusivity (m2/s)
!-- qlsink        Fractional cloud water sink (/s)							!-- qlsink        Fractional cloud water sink (/s)
!-- precr         rain precipitation rate at all levels (kg/m2/s)					!-- precr         rain precipitation rate at all levels (kg/m2/s)
!-- preci         ice precipitation rate at all levels (kg/m2/s)					!-- preci         ice precipitation rate at all levels (kg/m2/s)
!-- precs         snow precipitation rate at all levels (kg/m2/s)					!-- precs         snow precipitation rate at all levels (kg/m2/s)
!-- precg         graupel precipitation rate at all levels (kg/m2/s)                            	!-- precg         graupel precipitation rate at all levels (kg/m2/s)                            
!-- P_QV          species index for water vapor								!-- P_QV          species index for water vapor
!-- P_QC          species index for cloud water								!-- P_QC          species index for cloud water
!-- P_QR          species index for rain water								!-- P_QR          species index for rain water
!-- P_QI          species index for cloud ice								!-- P_QI          species index for cloud ice
!-- P_QS          species index for snow								!-- P_QS          species index for snow
!-- P_QG          species index for graupel								!-- P_QG          species index for graupel
!-- P_QH          species index for hail								!-- P_QH          species index for hail
!-- P_QNDROP      species index for cloud drop mixing ratio						!-- P_QNDROP      species index for cloud drop mixing ratio
!-- P_QNR         species index for rain number concentration,						!-- P_QNR         species index for rain number concentration,
!-- P_QNI         species index for cloud ice number concentration					!-- P_QNI         species index for cloud ice number concentration
!-- P_QNS         species index for snow number concentration,						!-- P_QNS         species index for snow number concentration,
!-- P_QNG         species index for graupel number concentration,					!-- P_QNG         species index for graupel number concentration,
!-- P_QNH         species index for hail number concentration,						!-- P_QNH         species index for hail number concentration,
!-- P_QZR         species index for rain    reflectivity						!-- P_QZR         species index for rain    reflectivity
!-- P_QZI         species index for ice     reflectivity						!-- P_QZI         species index for ice     reflectivity
!-- P_QZS         species index for snow    reflectivity						!-- P_QZS         species index for snow    reflectivity
!-- P_QZG         species index for graupel reflectivity						!-- P_QZG         species index for graupel reflectivity
!-- P_QZH         species index for hail    reflectivity						!-- P_QZH         species index for hail    reflectivity
!-- P_QVOLG       species index for graupel particle volume,						!-- P_QVOLG       species index for graupel particle volume,
!-- id            grid id number									!-- id            grid id number
!-- ids           start index for i in domain								!-- ids           start index for i in domain
!-- ide           end index for i in domain								!-- ide           end index for i in domain
!-- jds           start index for j in domain								!-- jds           start index for j in domain
!-- jde           end index for j in domain								!-- jde           end index for j in domain
!-- kds           start index for k in domain								!-- kds           start index for k in domain
!-- kde           end index for k in domain								!-- kde           end index for k in domain
!-- ims           start index for i in memory								!-- ims           start index for i in memory
!-- ime           end index for i in memory								!-- ime           end index for i in memory
!-- jms           start index for j in memory								!-- jms           start index for j in memory
!-- jme           end index for j in memory								!-- jme           end index for j in memory
!-- kms           start index for k in memory								!-- kms           start index for k in memory
!-- kme           end index for k in memory								!-- kme           end index for k in memory
!-- i_start       start indices for i in tile								!-- i_start       start indices for i in tile
!-- i_end         end indices for i in tile								!-- i_end         end indices for i in tile
!-- j_start       start indices for j in tile								!-- j_start       start indices for j in tile
!-- j_end         end indices for j in tile								!-- j_end         end indices for j in tile
!-- its           start index for i in tile								!-- its           start index for i in tile
!-- ite           end index for i in tile								!-- ite           end index for i in tile
!-- jts           start index for j in tile								!-- jts           start index for j in tile
!-- jte           end index for j in tile								!-- jte           end index for j in tile
!-- kts           start index for k in tile								!-- kts           start index for k in tile
!-- kte           end index for k in tile								!-- kte           end index for k in tile
!-- num_tiles     number of tiles									!-- num_tiles     number of tiles
!-- diagflag      Logical to tell us when to produce diagnostics for history or restart			!-- diagflag      Logical to tell us when to produce diagnostics for history or restart
!													!
!======================================================================					!======================================================================
  INTEGER,parameter :: iunit=6										  INTEGER,parameter :: iunit=6
  INTEGER :: mpi_error_code=1										  INTEGER :: mpi_error_code=1

   TYPE(grid_config_rec_type),  INTENT(IN   ) , OPTIONAL   :: config_flags				   TYPE(grid_config_rec_type),  INTENT(IN   ) , OPTIONAL   :: config_flags
   INTEGER,    INTENT(IN   )    :: mp_physics								   INTEGER,    INTENT(IN   )    :: mp_physics
   LOGICAL,    INTENT(IN   )    :: specified								   LOGICAL,    INTENT(IN   )    :: specified
   INTEGER, OPTIONAL, INTENT(IN   )    :: chem_opt, progn						   INTEGER, OPTIONAL, INTENT(IN   )    :: chem_opt, progn
   INTEGER, OPTIONAL, INTENT(IN   )    :: hail, ice2 !, ccntype						   INTEGER, OPTIONAL, INTENT(IN   )    :: hail, ice2 !, ccntype
!													!
   INTEGER,      INTENT(IN   )    ::       ids,ide, jds,jde, kds,kde					   INTEGER,      INTENT(IN   )    ::       ids,ide, jds,jde, kds,kde
   INTEGER,      INTENT(IN   )    ::       ims,ime, jms,jme, kms,kme,num_scalar				   INTEGER,      INTENT(IN   )    ::       ims,ime, jms,jme, kms,kme,num_scalar
   INTEGER, OPTIONAL, INTENT(IN   )    ::       ips,ipe, jps,jpe, kps,kpe				   INTEGER, OPTIONAL, INTENT(IN   )    ::       ips,ipe, jps,jpe, kps,kpe
   INTEGER,      INTENT(IN   )    ::                         kts,kte					   INTEGER,      INTENT(IN   )    ::                         kts,kte
   INTEGER,      INTENT(IN   )    ::     itimestep,num_tiles,spec_zone					   INTEGER,      INTENT(IN   )    ::     itimestep,num_tiles,spec_zone
   INTEGER, DIMENSION(num_tiles), INTENT(IN) ::                       &					   INTEGER, DIMENSION(num_tiles), INTENT(IN) ::                       &
     &           i_start,i_end,j_start,j_end								     &           i_start,i_end,j_start,j_end

   LOGICAL,      INTENT(IN   )    ::   warm_rain							   LOGICAL,      INTENT(IN   )    ::   warm_rain
!													!
   REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),                    &					   REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),                    &
         INTENT(INOUT) ::                                         th					         INTENT(INOUT) ::                                         th
!													!

!													!
   REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),                    &					   REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),                    &
         INTENT(IN   ) ::                                             &					         INTENT(IN   ) ::                                             &
                                                                 rho, &					                                                                 rho, &
                                                                dz8w, &					                                                                dz8w, &
                                                                 p8w, &					                                                                 p8w, &
                                                              pi_phy, &					                                                              pi_phy, &
                                                                   p					                                                                   p
    REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),INTENT(INOUT), OPTIONAL :: th_old,qv_old		    REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),INTENT(INOUT), OPTIONAL :: th_old,qv_old
    REAL,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT), OPTIONAL   :: scalar		    REAL,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT), OPTIONAL   :: scalar
    INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(IN), OPTIONAL::   IVGTYP				    INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(IN), OPTIONAL::   IVGTYP
    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN), OPTIONAL    :: XLAT, XLONG				    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN), OPTIONAL    :: XLAT, XLONG

!=================											!=================
!Data for CAMMGMP scheme										!Data for CAMMGMP scheme
   REAL,INTENT(IN), OPTIONAL ::accum_mode,aitken_mode,coarse_mode  					   REAL,INTENT(IN), OPTIONAL ::accum_mode,aitken_mode,coarse_mode  
!1D variables required for CAMMGMP scheme								!1D variables required for CAMMGMP scheme
   REAL , DIMENSION( kms:kme ) ,                                      &					   REAL , DIMENSION( kms:kme ) ,                                      &
        INTENT(IN   ) , OPTIONAL ::                                        fnm,  & !Factors for 	        INTENT(IN   ) , OPTIONAL ::                                        fnm,  & !Factors for 
                                                                fnp     				                                                                fnp     
!2D variables required for CAMMGMP scheme								!2D variables required for CAMMGMP scheme
   REAL, DIMENSION( ims:ime, jms:jme ),                               &					   REAL, DIMENSION( ims:ime, jms:jme ),                               &
        INTENT(IN), OPTIONAL ::                                                 &			        INTENT(IN), OPTIONAL ::                                                 &
                                                                 qfx, &    !Moisture flux at sur	                                                                 qfx, &    !Moisture flux at sur
                                                                 rliq      !Vertically-integrate	                                                                 rliq      !Vertically-integrate
 													 
 !3D variables required for CAMMGMP scheme								 !3D variables required for CAMMGMP scheme
 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &					 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &
      INTENT(IN), OPTIONAL ::                                                   &			      INTENT(IN), OPTIONAL ::                                                   &
                                                                 dlf, &    !Detraining cloud wat	                                                                 dlf, &    !Detraining cloud wat
                                                                dlf2, &    !dq/dt due to export 	                                                                dlf2, &    !dq/dt due to export 
                                                               t_phy, &    !Temprature at the mi	                                                               t_phy, &    !Temprature at the mi
                                                               p_hyd, &    !Hydrostatic pressure	                                                               p_hyd, &    !Hydrostatic pressure
                                                             p8w_hyd, &    !Hydrostatic Pressure	                                                             p8w_hyd, &    !Hydrostatic Pressure
                                                              z_at_w, &    !Height above sea lev	                                                              z_at_w, &    !Height above sea lev
                                                             tke_pbl, &    !Turbulence kinetic e	                                                             tke_pbl, &    !Turbulence kinetic e
                                                          turbtype3d, &    !Turbulent interface 	                                                          turbtype3d, &    !Turbulent interface 
                                                              smaw3d, &    !Normalized Galperin 	                                                              smaw3d, &    !Normalized Galperin 
                                                                 alt, &    !inverse density(m3/k	                                                                 alt, &    !inverse density(m3/k
                                                           icwmrsh3d, &    !Shallow cumulus in-c	                                                           icwmrsh3d, &    !Shallow cumulus in-c
                                                           icwmrdp3d, &    !Deep Convection in-c	                                                           icwmrdp3d, &    !Deep Convection in-c
                                                             shfrc3d, &    !Shallow cloud fracti	                                                             shfrc3d, &    !Shallow cloud fracti
                                                             cmfmc3d, &    !Deep + Shallow Conve	                                                             cmfmc3d, &    !Deep + Shallow Conve
                                                           cmfmc2_3d       !Shallow convective m	                                                           cmfmc2_3d       !Shallow convective m
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
!4D variables required for CAMMGMP scheme								!4D variables required for CAMMGMP scheme
 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme,ntot_amode_cam_mam ),     &			 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme,ntot_amode_cam_mam ),     &
        INTENT(IN) ::                                                 &					        INTENT(IN) ::                                                 &
                                                             dgnum4D, &					                                                             dgnum4D, &
                                                          dgnumwet4D 					                                                          dgnumwet4D 
#endif													#endif
!In-outs												!In-outs
 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &					 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &
      INTENT(INOUT) , OPTIONAL ::                                                &			      INTENT(INOUT) , OPTIONAL ::                                                &
                                                       cldfra_old_mp, &    !Old Cloud fraction f	                                                       cldfra_old_mp, &    !Old Cloud fraction f
                                                           rh_old_mp, &    !Old RH			                                                           rh_old_mp, &    !Old RH
                                                          lcd_old_mp       !Old liquid cloud fra	                                                          lcd_old_mp       !Old liquid cloud fra
!In-outs -optional											!In-outs -optional
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem),     &					 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem),     &
      INTENT(INOUT) ::                                                &					      INTENT(INOUT) ::                                                &
                                                                 chem      !Chem array for CAMMG	                                                                 chem      !Chem array for CAMMG
#endif													#endif
!outs													!outs
REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &					REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &
      INTENT(INOUT) , OPTIONAL::                                                 &			      INTENT(INOUT) , OPTIONAL::                                                 &
                                                            wsedl3d, &    !Sedimentation velocit	                                                            wsedl3d, &    !Sedimentation velocit
                                                          cldfra_mp, &    !Old Cloud fraction fo	                                                          cldfra_mp, &    !Old Cloud fraction fo
                                                      cldfra_mp_all, &    !Old Cloud fraction fo	                                                      cldfra_mp_all, &    !Old Cloud fraction fo
                                                            cldfrai, &    !Old Cloud fraction fo	                                                            cldfrai, &    !Old Cloud fraction fo
                                                            cldfral, &    !Old Cloud fraction fo	                                                            cldfral, &    !Old Cloud fraction fo
                                                            lradius, &    !Old Cloud fraction fo	                                                            lradius, &    !Old Cloud fraction fo
                                                            iradius, &    !Old Cloud fraction fo	                                                            iradius, &    !Old Cloud fraction fo
                                                        cldfra_conv 					                                                        cldfra_conv 
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &					REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                        &
      INTENT(INOUT), OPTIONAL ::                                                 &			      INTENT(INOUT), OPTIONAL ::                                                 &
                                                              qme3d, &     !Net condensation rat	                                                              qme3d, &     !Net condensation rat
                                                            prain3d, &     !Rate of conversion o	                                                            prain3d, &     !Rate of conversion o
                                                           nevapr3d, &     !Evaporation rate of 	                                                           nevapr3d, &     !Evaporation rate of 
                                                rate1ord_cw2pr_st3d        !1st order rate for d	                                                rate1ord_cw2pr_st3d        !1st order rate for d
#endif													#endif

   REAL, INTENT(INOUT),  DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &					   REAL, INTENT(INOUT),  DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &
                                     F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY					                                     F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY
!!$#if ( WRF_CHEM == 1 )										!!$#if ( WRF_CHEM == 1 )
!  REAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &					!  REAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &
   REAL, OPTIONAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &				   REAL, OPTIONAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &
!!$#else												!!$#else
!!$  REAL, DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &						!!$  REAL, DIMENSION(ims:ime, kms:kme, jms:jme ) ::     &
!!$#endif												!!$#endif
         qlsink, & ! cloud water sink (/s)								         qlsink, & ! cloud water sink (/s)
         precr, & ! rain precipitation rate at all levels (kg/m2/s)					         precr, & ! rain precipitation rate at all levels (kg/m2/s)
         preci, & ! ice precipitation rate at all levels (kg/m2/s)					         preci, & ! ice precipitation rate at all levels (kg/m2/s)
         precs, & ! snow precipitation rate at all levels (kg/m2/s)					         precs, & ! snow precipitation rate at all levels (kg/m2/s)
         precg    ! graupel precipitation rate at all levels (kg/m2/s)					         precg    ! graupel precipitation rate at all levels (kg/m2/s)

!													!

   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN)   :: XLAND					   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN)   :: XLAND
   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN), OPTIONAL   :: SNOWH				   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN), OPTIONAL   :: SNOWH

   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(OUT)   :: SR						   REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(OUT)   :: SR

   REAL, INTENT(IN   ) :: dt,dx,dy									   REAL, INTENT(IN   ) :: dt,dx,dy

   INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: LOWLYR					   INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: LOWLYR

!													!
! Optional												! Optional
!													!
   REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: refl_10cm			   REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: refl_10cm

   LOGICAL,  OPTIONAL,   INTENT(IN   )    :: channel_switch						   LOGICAL,  OPTIONAL,   INTENT(IN   )    :: channel_switch
   REAL, OPTIONAL,  INTENT(INOUT   ) :: naer  ! aerosol number concentration (/kg)			   REAL, OPTIONAL,  INTENT(INOUT   ) :: naer  ! aerosol number concentration (/kg)
   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) , OPTIONAL :: qnwfa2d      ! Added by G. Thom	   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) , OPTIONAL :: qnwfa2d      ! Added by G. Thom
   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &					   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &
         OPTIONAL,                                                &					         OPTIONAL,                                                &
         INTENT(INOUT ) ::                                        &					         INTENT(INOUT ) ::                                        &
                  u,v,w, z, t8w                                       &					                  u,v,w, z, t8w                                       &
                 ,cldfra, cldfra_old, exch_h                      &					                 ,cldfra, cldfra_old, exch_h                      &
                 ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr &					                 ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr &
                 ,qt_curr,qndrop_curr,qni_curr,qh_curr,qnh_curr   &					                 ,qt_curr,qndrop_curr,qni_curr,qh_curr,qnh_curr   &
                 ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr    &					                 ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr    &
                 ,qic_curr,qip_curr,qid_curr &								                 ,qic_curr,qip_curr,qid_curr &
                 ,qnic_curr,qnip_curr,qnid_curr &							                 ,qnic_curr,qnip_curr,qnid_curr &
                 ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr    &					                 ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr    &
                 ,effr_curr,ice_effr_curr,tot_effr_curr           &					                 ,effr_curr,ice_effr_curr,tot_effr_curr           &
                 ,qic_effr_curr,qip_effr_curr,qid_effr_curr           &					                 ,qic_effr_curr,qip_effr_curr,qid_effr_curr           &
                  ,kext_ql,kext_qs,kext_qg          &							                  ,kext_ql,kext_qs,kext_qg          &
                 ,kext_qh,kext_qa                       &						                 ,kext_qh,kext_qa                       &
                 ,kext_qic,kext_qip,kext_qid,tempc,height      &					                 ,kext_qic,kext_qip,kext_qid,tempc,height      &
                 ,kext_ft_qic,kext_ft_qip,kext_ft_qid &							                 ,kext_ft_qic,kext_ft_qip,kext_ft_qid &
                 ,kext_ft_qs,kext_ft_qg                           &					                 ,kext_ft_qs,kext_ft_qg                           &
                 ,qnwfa_curr,qnifa_curr                           & ! Added by G. Thompson		                 ,qnwfa_curr,qnifa_curr                           & ! Added by G. Thompson
                 ,qvolg_curr,qvolh_curr									                 ,qvolg_curr,qvolh_curr



   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &					   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &
         OPTIONAL,                                                &					         OPTIONAL,                                                &
         INTENT(IN) :: qrcuten, qscuten, qicuten							         INTENT(IN) :: qrcuten, qscuten, qicuten
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &					   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &
         INTENT(INOUT) :: rainprod, evapprod								         INTENT(INOUT) :: rainprod, evapprod
   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &					   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &
         INTENT(INOUT) :: qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp						         INTENT(INOUT) :: qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp
#endif													#endif
   REAL, DIMENSION( ims:ime, jms:jme ),                           &					   REAL, DIMENSION( ims:ime, jms:jme ),                           &
         OPTIONAL,                                                &					         OPTIONAL,                                                &
         INTENT(IN) :: mu										         INTENT(IN) :: mu
! YLIN													! YLIN
! Added RI_CURR similar to microphysics fields above							! Added RI_CURR similar to microphysics fields above
   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &					   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                  &
         OPTIONAL,                                                &					         OPTIONAL,                                                &
         INTENT(INOUT) :: ri_curr									         INTENT(INOUT) :: ri_curr


   REAL, DIMENSION(ims:ime, kms:kme, jms:jme ),                   &					   REAL, DIMENSION(ims:ime, kms:kme, jms:jme ),                   &
         OPTIONAL,                                                &					         OPTIONAL,                                                &
         INTENT(OUT ) ::                                          &					         INTENT(OUT ) ::                                          &
                  nsource										                  nsource

!													!
   REAL, DIMENSION( ims:ime , jms:jme ),                          &					   REAL, DIMENSION( ims:ime , jms:jme ),                          &
         INTENT(INOUT),                                           &					         INTENT(INOUT),                                           &
         OPTIONAL   ::                                            &					         OPTIONAL   ::                                            &
                                                           RAINNC &					                                                           RAINNC &
                                                         ,RAINNCV &					                                                         ,RAINNCV &
                                                          ,SNOWNC &					                                                          ,SNOWNC &
                                                         ,SNOWNCV &					                                                         ,SNOWNCV &
                                                       ,GRAUPELNC &					                                                       ,GRAUPELNC &
                                                      ,GRAUPELNCV &					                                                      ,GRAUPELNCV &
                                                          ,HAILNC &					                                                          ,HAILNC &
                                                         ,HAILNCV					                                                         ,HAILNCV
   INTEGER,OPTIONAL,INTENT(IN   )    ::                        id					   INTEGER,OPTIONAL,INTENT(IN   )    ::                        id

   REAL , DIMENSION( ims:ime , jms:jme ) , OPTIONAL ,             &					   REAL , DIMENSION( ims:ime , jms:jme ) , OPTIONAL ,             &
         INTENT(IN)   ::                                       ht					         INTENT(IN)   ::                                       ht

   REAL, DIMENSION (:), OPTIONAL, INTENT(INOUT) :: mp_restart_state &					   REAL, DIMENSION (:), OPTIONAL, INTENT(INOUT) :: mp_restart_state &
                                         ,tbpvs_state,tbpvs0_state					                                         ,tbpvs_state,tbpvs0_state
!													!

   LOGICAL, OPTIONAL :: f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni,f_qt    &				   LOGICAL, OPTIONAL :: f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni,f_qt    &
                       ,f_qns,f_qnr,f_qng,f_qnn,f_qnc,f_qh,f_qnh,f_qzr       &				                       ,f_qns,f_qnr,f_qng,f_qnn,f_qnc,f_qh,f_qnh,f_qzr       &
                      ,f_effr,f_ice_effr,f_tot_effr &							                      ,f_effr,f_ice_effr,f_tot_effr &
                       ,f_qic_effr,f_qip_effr,f_qid_effr &						                       ,f_qic_effr,f_qip_effr,f_qid_effr &
                      ,f_qic,f_qip,f_qid &								                      ,f_qic,f_qip,f_qid &
                      ,f_qnic,f_qnip,f_qnid                                  &				                      ,f_qnic,f_qnip,f_qnid                                  &
                       ,f_qzi,f_qzs,f_qzg,f_qzh,f_qvolg,f_qvolh              &				                       ,f_qzi,f_qzs,f_qzg,f_qzh,f_qvolg,f_qvolh              &
                       ,f_qnwfa, f_qnifa                         ! Added by G. Thompson			                       ,f_qnwfa, f_qnifa                         ! Added by G. Thompson


   LOGICAL, OPTIONAL, INTENT(IN) :: diagflag								   LOGICAL, OPTIONAL, INTENT(IN) :: diagflag
   REAL, INTENT(IN) :: ccn_conc ! RAS									   REAL, INTENT(IN) :: ccn_conc ! RAS
   INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref							   INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref
   REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) ::  & ! G. Thompson				   REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) ::  & ! G. Thompson
                 re_cloud, re_ice, re_snow								                 re_cloud, re_ice, re_snow
   INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs							   INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
!  REAL , DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(INOUT) :: lwp				!  REAL , DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(INOUT) :: lwp

! LOCAL  VAR												! LOCAL  VAR

   INTEGER :: i,j,k,its,ite,jts,jte,ij,sz,n								   INTEGER :: i,j,k,its,ite,jts,jte,ij,sz,n
   LOGICAL :: channel											   LOGICAL :: channel
   LOGICAL :: nssl_progn = .false.									   LOGICAL :: nssl_progn = .false.
   REAL    :: z0, z1, z2, w1, w2, cumul									   REAL    :: z0, z1, z2, w1, w2, cumul

   integer, parameter :: ntot = 50									   integer, parameter :: ntot = 50
   real :: wmin, wmax											   real :: wmin, wmax
   integer :: ierr											   integer :: ierr

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
   INTEGER, INTENT(IN) :: indirect_feed_chimere,n_bin,max_sect						   INTEGER, INTENT(IN) :: indirect_feed_chimere,n_bin,max_sect
   REAL,DIMENSION(max_sect),INTENT(IN) :: sect                   					   REAL,DIMENSION(max_sect),INTENT(IN) :: sect                   
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme,n_bin),INTENT(IN) :: num_aer,num_hygro_aer			   REAL,DIMENSION(ims:ime,kms:kme,jms:jme,n_bin),INTENT(IN) :: num_aer,num_hygro_aer
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(IN)  :: hygro_aer					   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(IN)  :: hygro_aer
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(IN)  :: in_aer					   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(IN)  :: in_aer
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: dropsource					   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: dropsource
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: num01,num02,num10				   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: num01,num02,num10
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: ccn1,ccn2,ccn3,ccn4,ccn5,ccn6			   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: ccn1,ccn2,ccn3,ccn4,ccn5,ccn6
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: rainrate,evaprate				   REAL,DIMENSION(ims:ime,kms:kme,jms:jme),INTENT(OUT) :: rainrate,evaprate

   !! Local												   !! Local
   REAL :: kzzz 											   REAL :: kzzz 
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme) :: temp,wtke							   REAL,DIMENSION(ims:ime,kms:kme,jms:jme) :: temp,wtke
   REAL,DIMENSION(ims:ime,kms:kme,jms:jme) :: cldfra_chm,lcldfra_chm					   REAL,DIMENSION(ims:ime,kms:kme,jms:jme) :: cldfra_chm,lcldfra_chm
#endif 													#endif 
!---------------------------------------------------------------------					!---------------------------------------------------------------------
!  check for microphysics type.  We need a clean way to							!  check for microphysics type.  We need a clean way to
!  specify these things!										!  specify these things!
!---------------------------------------------------------------------					!---------------------------------------------------------------------

   channel = .FALSE.											   channel = .FALSE.
   IF ( PRESENT ( channel_switch ) ) channel = channel_switch						   IF ( PRESENT ( channel_switch ) ) channel = channel_switch

   if (mp_physics .eq. 0) return									   if (mp_physics .eq. 0) return
   IF( specified ) THEN											   IF( specified ) THEN
     sz = spec_zone											     sz = spec_zone
   ELSE													   ELSE
     sz = 0												     sz = 0
   ENDIF												   ENDIF

! set this to true to print out the global max/min for W on each time step.				! set this to true to print out the global max/min for W on each time step.
   IF ( .false. ) THEN											   IF ( .false. ) THEN
      wmax = maxval( w(ips:ipe,kps:kpe,jps:jpe) )							      wmax = maxval( w(ips:ipe,kps:kpe,jps:jpe) )
      wmin = minval( w(ips:ipe,kps:kpe,jps:jpe) )							      wmin = minval( w(ips:ipe,kps:kpe,jps:jpe) )
#if ( defined(DM_PARALLEL)  &&   ! defined(STUBMPI) )							#if ( defined(DM_PARALLEL)  &&   ! defined(STUBMPI) )
      wmax = wrf_dm_max_real ( wmax )									      wmax = wrf_dm_max_real ( wmax )
      wmin = wrf_dm_min_real ( wmin )									      wmin = wrf_dm_min_real ( wmin )
#endif													#endif
      WRITE( wrf_err_message , * ) 'microphysics_driver: GLOBAL w max/min = ', wmax, wmin		      WRITE( wrf_err_message , * ) 'microphysics_driver: GLOBAL w max/min = ', wmax, wmin
      CALL wrf_message ( wrf_err_message )								      CALL wrf_message ( wrf_err_message )
   ENDIF												   ENDIF

#ifdef XEON_OPTIMIZED_WSM5										#ifdef XEON_OPTIMIZED_WSM5
   ! the OpenMP loops are inside the scheme when running on MIC						   ! the OpenMP loops are inside the scheme when running on MIC
   IF ( mp_physics .EQ. WSM5SCHEME ) THEN								   IF ( mp_physics .EQ. WSM5SCHEME ) THEN
       IF (channel) THEN										       IF (channel) THEN
         its = max(ips,ids)										         its = max(ips,ids)
         ite = min(ipe,ide-1)										         ite = min(ipe,ide-1)
       ELSE												       ELSE
         its = max(ips,ids+sz)										         its = max(ips,ids+sz)
         ite = min(ipe,ide-1-sz)									         ite = min(ipe,ide-1-sz)
       ENDIF												       ENDIF
       jts = max(jps,jds+sz)										       jts = max(jps,jds+sz)
       jte = min(jpe,jde-1-sz)										       jte = min(jpe,jde-1-sz)

       CALL wsm5(                                              &					       CALL wsm5(                                              &
             TH=th                                             &					             TH=th                                             &
            ,Q=qv_curr                                         &					            ,Q=qv_curr                                         &
            ,QC=qc_curr                                        &					            ,QC=qc_curr                                        &
            ,QR=qr_curr                                        &					            ,QR=qr_curr                                        &
            ,QI=qi_curr                                        &					            ,QI=qi_curr                                        &
            ,QS=qs_curr                                        &					            ,QS=qs_curr                                        &
            ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &					            ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &
            ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &					            ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &
            ,RD=r_d,RV=r_v,T0C=svpt0                           &					            ,RD=r_d,RV=r_v,T0C=svpt0                           &
            ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					            ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
            ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					            ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
            ,DEN0=rhoair0, DENR=rhowater                       &					            ,DEN0=rhoair0, DENR=rhowater                       &
            ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					            ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
            ,RAIN=rainnc ,RAINNCV=rainncv                      &					            ,RAIN=rainnc ,RAINNCV=rainncv                      &
            ,SNOW=snownc ,SNOWNCV=snowncv                      &					            ,SNOW=snownc ,SNOWNCV=snowncv                      &
            ,SR=sr                                             &					            ,SR=sr                                             &
            ,REFL_10CM=refl_10cm                               &					            ,REFL_10CM=refl_10cm                               &
            ,diagflag=diagflag                                 &					            ,diagflag=diagflag                                 &
            ,do_radar_ref=do_radar_ref                         &					            ,do_radar_ref=do_radar_ref                         &
            ,has_reqc=has_reqc                                 &  ! for radiation +			            ,has_reqc=has_reqc                                 &  ! for radiation +
            ,has_reqi=has_reqi                                 &					            ,has_reqi=has_reqi                                 &
            ,has_reqs=has_reqs                                 &					            ,has_reqs=has_reqs                                 &
            ,re_cloud=re_cloud                                 &					            ,re_cloud=re_cloud                                 &
            ,re_ice=re_ice                                     &					            ,re_ice=re_ice                                     &
            ,re_snow=re_snow                                   &  ! for radiation -  			            ,re_snow=re_snow                                   &  ! for radiation -  
            ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					            ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
            ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					            ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
            ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					            ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
            )												            )

   ELSE													   ELSE
#endif													#endif

   !$OMP PARALLEL DO   &										   !$OMP PARALLEL DO   &
   !$OMP PRIVATE ( ij, its, ite, jts, jte, i,j,k,n )							   !$OMP PRIVATE ( ij, its, ite, jts, jte, i,j,k,n )

   DO ij = 1 , num_tiles										   DO ij = 1 , num_tiles
       IF (channel) THEN										       IF (channel) THEN
         its = max(i_start(ij),ids)									         its = max(i_start(ij),ids)
         ite = min(i_end(ij),ide-1)									         ite = min(i_end(ij),ide-1)
       ELSE												       ELSE
         its = max(i_start(ij),ids+sz)									         its = max(i_start(ij),ids+sz)
         ite = min(i_end(ij),ide-1-sz)									         ite = min(i_end(ij),ide-1-sz)
       ENDIF												       ENDIF
       jts = max(j_start(ij),jds+sz)									       jts = max(j_start(ij),jds+sz)
       jte = min(j_end(ij),jde-1-sz)									       jte = min(j_end(ij),jde-1-sz)

! 2009-06009 rce - zero all these for safety								! 2009-06009 rce - zero all these for safety
       IF( PRESENT(qlsink) ) qlsink(its:ite,kts:kte,jts:jte) = 0.					       IF( PRESENT(qlsink) ) qlsink(its:ite,kts:kte,jts:jte) = 0.
       IF( PRESENT(precr ) ) precr(its:ite,kts:kte,jts:jte)  = 0.					       IF( PRESENT(precr ) ) precr(its:ite,kts:kte,jts:jte)  = 0.
       IF( PRESENT(preci ) ) preci(its:ite,kts:kte,jts:jte)  = 0.					       IF( PRESENT(preci ) ) preci(its:ite,kts:kte,jts:jte)  = 0.
       IF( PRESENT(precs ) ) precs(its:ite,kts:kte,jts:jte)  = 0.					       IF( PRESENT(precs ) ) precs(its:ite,kts:kte,jts:jte)  = 0.
       IF( PRESENT(precg ) ) precg(its:ite,kts:kte,jts:jte)  = 0.					       IF( PRESENT(precg ) ) precg(its:ite,kts:kte,jts:jte)  = 0.

!-----------												!-----------
       IF( PRESENT(chem_opt) .AND. PRESENT(progn) ) THEN						       IF( PRESENT(chem_opt) .AND. PRESENT(progn) ) THEN
       													       
       ! ERM: check whether to use built-in droplet nucleation or use qndrop from CHEM			       ! ERM: check whether to use built-in droplet nucleation or use qndrop from CHEM
       IF ( mp_physics==NSSL_2MOMCCN .or. mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG ) TH	       IF ( mp_physics==NSSL_2MOMCCN .or. mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG ) TH
         IF ( progn > 0 ) THEN										         IF ( progn > 0 ) THEN
          IF ( .not. (chem_opt == 0 .or. chem_opt == 401) ) nssl_progn = .true.				          IF ( .not. (chem_opt == 0 .or. chem_opt == 401) ) nssl_progn = .true.
         ELSE												         ELSE
           nssl_progn = .false. ! use NUCOND for droplet nucleation					           nssl_progn = .false. ! use NUCOND for droplet nucleation
         ENDIF												         ENDIF
       ENDIF												       ENDIF
       													       
       !Add pass for dust-only wrf-chem option - RAS							       !Add pass for dust-only wrf-chem option - RAS
       IF( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==LINSCHEME  .OR. mp	       IF( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==LINSCHEME  .OR. mp
          IF( PRESENT( QNDROP_CURR ) ) THEN								          IF( PRESENT( QNDROP_CURR ) ) THEN
             CALL wrf_debug ( 100 , 'microphysics_driver: calling prescribe_aerosol_mixactivate'	             CALL wrf_debug ( 100 , 'microphysics_driver: calling prescribe_aerosol_mixactivate'
! 06-nov-2005 rce - id  & itimestep added to arg list							! 06-nov-2005 rce - id  & itimestep added to arg list
             call prescribe_aerosol_mixactivate (               &					             call prescribe_aerosol_mixactivate (               &
                  id, itimestep, dt, naer,                      &					                  id, itimestep, dt, naer,                      &
                  ccn_conc, chem_opt,                           & !RAS13.1				                  ccn_conc, chem_opt,                           & !RAS13.1
                  rho, th, pi_phy, w, cldfra, cldfra_old,       &					                  rho, th, pi_phy, w, cldfra, cldfra_old,       &
                  z, dz8w, p8w, t8w, exch_h,                    &					                  z, dz8w, p8w, t8w, exch_h,                    &
                  qv_curr, qc_curr, qi_curr, qndrop_curr,       &					                  qv_curr, qc_curr, qi_curr, qndrop_curr,       &
                  nsource,                                      &					                  nsource,                                      &
                  ids,ide, jds,jde, kds,kde,                    &					                  ids,ide, jds,jde, kds,kde,                    &
                  ims,ime, jms,jme, kms,kme,                    &					                  ims,ime, jms,jme, kms,kme,                    &
                  its,ite, jts,jte, kts,kte,                    &					                  its,ite, jts,jte, kts,kte,                    &
                  F_QC=f_qc, F_QI=f_qi                          )					                  F_QC=f_qc, F_QI=f_qi                          )
          END IF											          END IF
       ELSEIF ( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==NSSL_2MOMCCN 	       ELSEIF ( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==NSSL_2MOMCCN 
                 mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG)) THEN				                 mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG)) THEN
!          Do nothing here for the moment. Use activation of CCN within the NSSL_2MOM scheme ins	!          Do nothing here for the moment. Use activation of CCN within the NSSL_2MOM scheme ins
       ELSEIF ( progn==1 .AND. mp_physics/=LINSCHEME .AND. mp_physics/=MORR_TWO_MOMENT &		       ELSEIF ( progn==1 .AND. mp_physics/=LINSCHEME .AND. mp_physics/=MORR_TWO_MOMENT &
                .AND. mp_physics/=NSSL_2MOM .AND. mp_physics/=NSSL_2MOMCCN .AND. mp_physics/=NSS	                .AND. mp_physics/=NSSL_2MOM .AND. mp_physics/=NSSL_2MOMCCN .AND. mp_physics/=NSS
             call wrf_error_fatal( &									             call wrf_error_fatal( &
             "SETTINGS ERROR: Prognostic cloud droplet number can only be used with the mp_physi	             "SETTINGS ERROR: Prognostic cloud droplet number can only be used with the mp_physi
       END IF												       END IF
       END IF												       END IF

     micro_select: SELECT CASE(mp_physics)								     micro_select: SELECT CASE(mp_physics)

        CASE (KESSLERSCHEME)										        CASE (KESSLERSCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling kessler' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling kessler' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND.  &
                                           PRESENT( QR_CURR ) .AND.  &					                                           PRESENT( QR_CURR ) .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                                           PRESENT( Z       ))  THEN					                                           PRESENT( Z       ))  THEN
               CALL kessler(                                        &					               CALL kessler(                                        &
                  T=th                                              &					                  T=th                                              &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &					                 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &
                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &					                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &
                 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater           &					                 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater           &
                 ,DZ8W=dz8w                                         &					                 ,DZ8W=dz8w                                         &
                 ,RAINNC=rainnc,RAINNCV=rainncv                     &					                 ,RAINNC=rainnc,RAINNCV=rainncv                     &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling kessler' )			                CALL wrf_error_fatal ( 'arguments not present for calling kessler' )
             ENDIF											             ENDIF

!													!
        CASE (THOMPSONAERO)										        CASE (THOMPSONAERO)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR )   .AND.  &				             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR )   .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR )   .AND.  &				                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR )   .AND.  &
                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR )   .AND.  &				                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR )   .AND.  &
                  PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR)   .AND.  &				                  PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR)   .AND.  &
                  PRESENT( QNC_CURR) .AND. PRESENT ( QNWFA_CURR) .AND.  &				                  PRESENT( QNC_CURR) .AND. PRESENT ( QNWFA_CURR) .AND.  &
                  PRESENT( QNIFA_CURR).AND.PRESENT ( QNWFA2D)    .AND.  &				                  PRESENT( QNIFA_CURR).AND.PRESENT ( QNWFA2D)    .AND.  &
                  PRESENT( SNOWNC)   .AND. PRESENT ( SNOWNCV)    .AND.  &				                  PRESENT( SNOWNC)   .AND. PRESENT ( SNOWNCV)    .AND.  &
                  PRESENT( GRAUPELNC).AND. PRESENT ( GRAUPELNCV) .AND.  &				                  PRESENT( GRAUPELNC).AND. PRESENT ( GRAUPELNCV) .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) ) THEN					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) ) THEN
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)			                 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
                 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)			                 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
                 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)			                 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
                 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)			                 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
#endif													#endif

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
         if(coupler_on.and.wrf_chimere.and.indirect_feed_chimere==1) then				         if(coupler_on.and.wrf_chimere.and.indirect_feed_chimere==1) then

           ! diagnosing turbulent vertical velocity							           ! diagnosing turbulent vertical velocity
           do i=its,ite											           do i=its,ite
           do j=jts,jte											           do j=jts,jte
           do k=kts,kte											           do k=kts,kte
              num01(i,k,j)=num_aer(i,k,j,1)								              num01(i,k,j)=num_aer(i,k,j,1)
              num02(i,k,j)=num_aer(i,k,j,2)								              num02(i,k,j)=num_aer(i,k,j,2)
              num10(i,k,j)=num_aer(i,k,j,10)								              num10(i,k,j)=num_aer(i,k,j,10)
              if(k==kts) then										              if(k==kts) then
                 wtke(i,k,j) = 0.2									                 wtke(i,k,j) = 0.2
              else											              else
                 kzzz = exch_h(i,k,j)									                 kzzz = exch_h(i,k,j)
                 kzzz = min(kzzz,100.)									                 kzzz = min(kzzz,100.)
                 kzzz = max(kzzz,0.01)									                 kzzz = max(kzzz,0.01)
                 wtke(i,k,j) = sqrt(2.*4.*atan(1.))/dz8w(i,k,j) 				   |	                 wtke(i,k,j) = sqrt(2.*4.*atan(1.))*kzzz/dz8w(i,k,j)
                 wtke(i,k,j) = max(wtke(i,k,j),0.2)							                 wtke(i,k,j) = max(wtke(i,k,j),0.2)
              endif											              endif
           enddo											           enddo
           enddo											           enddo
           enddo											           enddo

           ! diagnosing temperature									           ! diagnosing temperature
           do i=its,ite											           do i=its,ite
           do j=jts,jte											           do j=jts,jte
           do k=kts,kte											           do k=kts,kte
              temp(i,k,j) = th(i,k,j)*pi_phy(i,k,j)							              temp(i,k,j) = th(i,k,j)*pi_phy(i,k,j)
           enddo											           enddo
           enddo											           enddo
           enddo											           enddo
	   													   
	   ! Check positiveness in water content in clouds, vapor, ice etc					   ! Check positiveness in water content in clouds, vapor, ice etc
           do i=its,ite											           do i=its,ite
           do j=jts,jte											           do j=jts,jte
           do k=kts,kte											           do k=kts,kte
              if(qv_curr(i,k,j).lt.0.)qv_curr(i,k,j)=0.							              if(qv_curr(i,k,j).lt.0.)qv_curr(i,k,j)=0.
              if(qc_curr(i,k,j).lt.0.)qc_curr(i,k,j)=0.							              if(qc_curr(i,k,j).lt.0.)qc_curr(i,k,j)=0.
              if(qi_curr(i,k,j).lt.0.)qi_curr(i,k,j)=0.							              if(qi_curr(i,k,j).lt.0.)qi_curr(i,k,j)=0.
              if(qs_curr(i,k,j).lt.0.)qs_curr(i,k,j)=0.							              if(qs_curr(i,k,j).lt.0.)qs_curr(i,k,j)=0.
           enddo											           enddo
           enddo											           enddo
           enddo											           enddo
	   													   
           ! diagnosing cloud fraction									           ! diagnosing cloud fraction
           call cal_cldfra1(cldfra_chm,qv_curr,qc_curr,qi_curr,qs_curr,    &				           call cal_cldfra1(cldfra_chm,qv_curr,qc_curr,qi_curr,qs_curr,    &
                   F_QV,F_QC,F_QI,F_QS,temp,p,F_ICE_PHY,F_RAIN_PHY,        &				                   F_QV,F_QC,F_QI,F_QS,temp,p,F_ICE_PHY,F_RAIN_PHY,        &
                   ids,ide, jds,jde, kds,kde,                              &				                   ids,ide, jds,jde, kds,kde,                              &
                   ims,ime, jms,jme, kms,kme,                              &				                   ims,ime, jms,jme, kms,kme,                              &
                   its,ite, jts,jte, kts,kte                               )				                   its,ite, jts,jte, kts,kte                               )
		   													   
           do i=its,ite											           do i=its,ite
           do j=jts,jte											           do j=jts,jte
           do k=kts,kte											           do k=kts,kte
	      cumul=qc_curr(i,k,j)+qi_curr(i,k,j)+qs_curr(i,k,j)						      cumul=qc_curr(i,k,j)+qi_curr(i,k,j)+qs_curr(i,k,j)
              if(cldfra_chm(i,k,j).gt.0.0.and.cumul.gt.0.) then						              if(cldfra_chm(i,k,j).gt.0.0.and.cumul.gt.0.) then
                 lcldfra_chm(i,k,j) = cldfra_chm(i,k,j) * qc_curr(i,k,j)/cumul				                 lcldfra_chm(i,k,j) = cldfra_chm(i,k,j) * qc_curr(i,k,j)/cumul
              else											              else
                 lcldfra_chm(i,k,j) = 0.0								                 lcldfra_chm(i,k,j) = 0.0
              endif											              endif
           enddo											           enddo
           enddo											           enddo
           enddo											           enddo
           ! Diagnosing CCN spectrum									           ! Diagnosing CCN spectrum
           call ccn_calc(n_bin,sect,num_aer,hygro_aer,     &						           call ccn_calc(n_bin,sect,num_aer,hygro_aer,     &
                         ccn1,ccn2,ccn3,ccn4,ccn5,ccn6,    &						                         ccn1,ccn2,ccn3,ccn4,ccn5,ccn6,    &
                         ids,ide,jds,jde,kds,kde,          &						                         ids,ide,jds,jde,kds,kde,          &
                         ims,ime,jms,jme,kms,kme,          &						                         ims,ime,jms,jme,kms,kme,          &
                         its,ite,jts,jte,kts,kte           )						                         its,ite,jts,jte,kts,kte           )
         endif												         endif
#endif													#endif

             CALL mp_gt_driver(                          &						             CALL mp_gt_driver(                          &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QG=qg_curr,                         &						                     QG=qg_curr,                         &
                     NI=qni_curr,                        &						                     NI=qni_curr,                        &
                     NR=qnr_curr,                        &						                     NR=qnr_curr,                        &
                     NC=qnc_curr,                        &						                     NC=qnc_curr,                        &
                     NWFA=qnwfa_curr,                    &						                     NWFA=qnwfa_curr,                    &
                     NIFA=qnifa_curr,                    &						                     NIFA=qnifa_curr,                    &
                     NWFA2D=qnwfa2d,                     &						                     NWFA2D=qnwfa2d,                     &
                     TH=th,                              &						                     TH=th,                              &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DT_IN=dt,                           &						                     DT_IN=dt,                           &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     RAINNC=RAINNC,                      &						                     RAINNC=RAINNC,                      &
                     RAINNCV=RAINNCV,                    &						                     RAINNCV=RAINNCV,                    &
                     SNOWNC=SNOWNC,                      &						                     SNOWNC=SNOWNC,                      &
                     SNOWNCV=SNOWNCV,                    &						                     SNOWNCV=SNOWNCV,                    &
                     GRAUPELNC=GRAUPELNC,                &						                     GRAUPELNC=GRAUPELNC,                &
                     GRAUPELNCV=GRAUPELNCV,              &						                     GRAUPELNCV=GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                     RAINPROD=rainprod,                  &						                     RAINPROD=rainprod,                  &
                     EVAPPROD=evapprod,                  &						                     EVAPPROD=evapprod,                  &
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
                     INDIRECT_FEED_CHIMERE=indirect_feed_chimere, &					                     INDIRECT_FEED_CHIMERE=indirect_feed_chimere, &
                     N_BIN=n_bin,                        &						                     N_BIN=n_bin,                        &
                     SECT=sect(1:n_bin+1),               &						                     SECT=sect(1:n_bin+1),               &
                     NUM_aer=num_aer,                    &						                     NUM_aer=num_aer,                    &
                     NUM_hygro_aer=num_hygro_aer,        &						                     NUM_hygro_aer=num_hygro_aer,        &
                     HYGRO_AER=hygro_aer,                &						                     HYGRO_AER=hygro_aer,                &
                     ICE_NUCL=in_aer,                    &						                     ICE_NUCL=in_aer,                    &
                     WTKE=wtke,                          &						                     WTKE=wtke,                          &
                     LCLDFRA=lcldfra_chm,                &   						                     LCLDFRA=lcldfra_chm,                &   
                     DROPSOURCE=dropsource,              &						                     DROPSOURCE=dropsource,              &
                     RAINRATE=rainrate,                  &						                     RAINRATE=rainrate,                  &
                     EVAPRATE=evaprate,                  & 						                     EVAPRATE=evaprate,                  & 
#endif													#endif
                     REFL_10CM=refl_10cm,                &						                     REFL_10CM=refl_10cm,                &
                     diagflag=diagflag,                  &						                     diagflag=diagflag,                  &
                     do_radar_ref=do_radar_ref,          &						                     do_radar_ref=do_radar_ref,          &
                     re_cloud=re_cloud,                  &						                     re_cloud=re_cloud,                  &
                     re_ice=re_ice,                      &						                     re_ice=re_ice,                      &
                     re_snow=re_snow,                    &						                     re_snow=re_snow,                    &
                     has_reqc=has_reqc,                  & ! G. Thompson				                     has_reqc=has_reqc,                  & ! G. Thompson
                     has_reqi=has_reqi,                  & ! G. Thompson				                     has_reqi=has_reqi,                  & ! G. Thompson
                     has_reqs=has_reqs,                  & ! G. Thompson				                     has_reqs=has_reqs,                  & ! G. Thompson
                 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)					                 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )		                CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
             ENDIF											             ENDIF
!													!
        CASE (THOMPSON)											        CASE (THOMPSON)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &					                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &
                  PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND.  &					                  PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND.  &
!                  PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND.        &				!                  PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND.        &
!                  PRESENT( GRAUPELNC) .AND. PRESENT ( GRAUPELNCV) .AND.  &				!                  PRESENT( GRAUPELNC) .AND. PRESENT ( GRAUPELNCV) .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) ) THEN					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) ) THEN
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)			                 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
                 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)			                 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
                 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)			                 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
                 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)			                 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
#endif													#endif
             CALL mp_gt_driver(                          &						             CALL mp_gt_driver(                          &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QG=qg_curr,                         &						                     QG=qg_curr,                         &
                     NI=qni_curr,                        &						                     NI=qni_curr,                        &
                     NR=qnr_curr,                        &						                     NR=qnr_curr,                        &
                     TH=th,                              &						                     TH=th,                              &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DT_IN=dt,                           &						                     DT_IN=dt,                           &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     RAINNC=RAINNC,                      &						                     RAINNC=RAINNC,                      &
                     RAINNCV=RAINNCV,                    &						                     RAINNCV=RAINNCV,                    &
                     SNOWNC=SNOWNC,                      &						                     SNOWNC=SNOWNC,                      &
                     SNOWNCV=SNOWNCV,                    &						                     SNOWNCV=SNOWNCV,                    &
                     GRAUPELNC=GRAUPELNC,                &						                     GRAUPELNC=GRAUPELNC,                &
                     GRAUPELNCV=GRAUPELNCV,              &						                     GRAUPELNCV=GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                     RAINPROD=rainprod,                  &						                     RAINPROD=rainprod,                  &
                     EVAPPROD=evapprod,                  &						                     EVAPPROD=evapprod,                  &
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
                     INDIRECT_FEED_CHIMERE=indirect_feed_chimere, &					                     INDIRECT_FEED_CHIMERE=indirect_feed_chimere, &
                     N_BIN=n_bin,                        &						                     N_BIN=n_bin,                        &
                     SECT=sect(1:n_bin+1),               &						                     SECT=sect(1:n_bin+1),               &
                     NUM_aer=num_aer,                    &						                     NUM_aer=num_aer,                    &
                     NUM_hygro_aer=num_hygro_aer,        &						                     NUM_hygro_aer=num_hygro_aer,        &
                     HYGRO_AER=hygro_aer,                &						                     HYGRO_AER=hygro_aer,                &
                     ICE_NUCL=in_aer,                    &						                     ICE_NUCL=in_aer,                    &
                     WTKE=wtke,                          &						                     WTKE=wtke,                          &
                     LCLDFRA=lcldfra_chm,                &						                     LCLDFRA=lcldfra_chm,                &
                     DROPSOURCE=dropsource,              &						                     DROPSOURCE=dropsource,              &
                     RAINRATE=rainrate,                  &						                     RAINRATE=rainrate,                  &
                     EVAPRATE=evaprate,                  &						                     EVAPRATE=evaprate,                  &
#endif													#endif
                     REFL_10CM=refl_10cm,                &						                     REFL_10CM=refl_10cm,                &
                     diagflag=diagflag,                  &						                     diagflag=diagflag,                  &
                     do_radar_ref=do_radar_ref,          &						                     do_radar_ref=do_radar_ref,          &
                     re_cloud=re_cloud,                  & ! G. Thompson				                     re_cloud=re_cloud,                  & ! G. Thompson
                     re_ice=re_ice,                      & ! G. Thompson				                     re_ice=re_ice,                      & ! G. Thompson
                     re_snow=re_snow,                    & ! G. Thompson				                     re_snow=re_snow,                    & ! G. Thompson
                     has_reqc=has_reqc,                  & ! G. Thompson				                     has_reqc=has_reqc,                  & ! G. Thompson
                     has_reqi=has_reqi,                  & ! G. Thompson				                     has_reqi=has_reqi,                  & ! G. Thompson
                     has_reqs=has_reqs,                  & ! G. Thompson				                     has_reqs=has_reqs,                  & ! G. Thompson
                 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)					                 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )		                CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
             ENDIF											             ENDIF
#if (EM_CORE==1)											#if (EM_CORE==1)
       CASE (FAST_KHAIN_LYNN)										       CASE (FAST_KHAIN_LYNN)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
               CALL fast_sbm(W=w,U=u,V=v,TH_OLD=th_old          &					               CALL fast_sbm(W=w,U=u,V=v,TH_OLD=th_old          &
                 ,CHEM_new=scalar,N_CHEM=num_scalar                     &				                 ,CHEM_new=scalar,N_CHEM=num_scalar                     &
                 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &					                 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &
                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &				                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
                 ,xland=xland                                       &					                 ,xland=xland                                       &
                 ,ivgtyp=ivgtyp                                      &					                 ,ivgtyp=ivgtyp                                      &
                 ,xlat=xlat                                        &					                 ,xlat=xlat                                        &
                 ,xlong=xlong                                        &					                 ,xlong=xlong                                        &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,QV_OLD=qv_old                                     &					                 ,QV_OLD=qv_old                                     &
                 ,QNC=qnc_curr                                      &					                 ,QNC=qnc_curr                                      &
                 ,QNR=qnr_curr                                      &					                 ,QNR=qnr_curr                                      &
                 ,QNS=qns_curr                                      &					                 ,QNS=qns_curr                                      &
                 ,QNG=qng_curr                                      &					                 ,QNG=qng_curr                                      &
                 ,QNA=qnn_curr                                      &					                 ,QNA=qnn_curr                                      &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity			                 ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity
                 ,diagflag=diagflag                   &  ! added for radar reflectivity			                 ,diagflag=diagflag                   &  ! added for radar reflectivity
                 ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity			                 ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity
                 ,RAINNC=rainnc)									                 ,RAINNC=rainnc)

!													!
       CASE (FULL_KHAIN_LYNN)										       CASE (FULL_KHAIN_LYNN)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
               CALL sbm(W=w,U=u,V=v,TH_OLD=th_old          &						               CALL sbm(W=w,U=u,V=v,TH_OLD=th_old          &
                 ,CHEM_new=scalar,N_CHEM=num_scalar                     &				                 ,CHEM_new=scalar,N_CHEM=num_scalar                     &
                 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &					                 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &
                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &				                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
                 ,xland=xland                                       &					                 ,xland=xland                                       &
                 ,ivgtyp=ivgtyp                                      &					                 ,ivgtyp=ivgtyp                                      &
                 ,xlat=xlat                                        &					                 ,xlat=xlat                                        &
                 ,xlong=xlong                                        &					                 ,xlong=xlong                                        &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QIP=qip_curr                                        &					                 ,QIP=qip_curr                                        &
                 ,QIC=qic_curr                                        &					                 ,QIC=qic_curr                                        &
                 ,QID=qid_curr                                        &					                 ,QID=qid_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,QH=qh_curr                                        &					                 ,QH=qh_curr                                        &
                 ,QV_OLD=qv_old                                     &					                 ,QV_OLD=qv_old                                     &
                 ,QNC=qnc_curr                                      &					                 ,QNC=qnc_curr                                      &
                 ,QNR=qnr_curr                                      &					                 ,QNR=qnr_curr                                      &
                 ,QNIP=qnip_curr                                      &					                 ,QNIP=qnip_curr                                      &
                 ,QNIC=qnic_curr                                      &					                 ,QNIC=qnic_curr                                      &
                 ,QNID=qnid_curr                                      &					                 ,QNID=qnid_curr                                      &
                 ,QNS=qns_curr                                      &					                 ,QNS=qns_curr                                      &
                 ,QNG=qng_curr                                      &					                 ,QNG=qng_curr                                      &
                 ,QNH=qng_curr                                      &					                 ,QNH=qng_curr                                      &
                 ,QNA=qnn_curr                                      &					                 ,QNA=qnn_curr                                      &
                 ,EFFR=effr_curr                                  &					                 ,EFFR=effr_curr                                  &
                 ,ICE_EFFR=ice_effr_curr                                  &				                 ,ICE_EFFR=ice_effr_curr                                  &
                 ,TOT_EFFR=tot_effr_curr                                  &				                 ,TOT_EFFR=tot_effr_curr                                  &
                 ,QIC_EFFR=qic_effr_curr                                  &				                 ,QIC_EFFR=qic_effr_curr                                  &
                 ,QIP_EFFR=qip_effr_curr                                  &				                 ,QIP_EFFR=qip_effr_curr                                  &
                 ,QID_EFFR=qid_effr_curr                                  &				                 ,QID_EFFR=qid_effr_curr                                  &
                 ,height=height                                        &				                 ,height=height                                        &
                 ,tempc=tempc                                         &					                 ,tempc=tempc                                         &
                 ,kext_ql=kext_ql                                       &				                 ,kext_ql=kext_ql                                       &
                 ,kext_qs=kext_qs                                       &				                 ,kext_qs=kext_qs                                       &
                 ,kext_qg=kext_qg                                       &				                 ,kext_qg=kext_qg                                       &
                 ,kext_qh=kext_qh                                       &				                 ,kext_qh=kext_qh                                       &
                 ,kext_qa=kext_qa                                       &				                 ,kext_qa=kext_qa                                       &
                 ,kext_qic=kext_qic                                       &				                 ,kext_qic=kext_qic                                       &
                 ,kext_qip=kext_qip                                       &				                 ,kext_qip=kext_qip                                       &
                 ,kext_qid=kext_qid                                       &				                 ,kext_qid=kext_qid                                       &
                 ,kext_ft_qic=kext_ft_qic                                       &			                 ,kext_ft_qic=kext_ft_qic                                       &
                 ,kext_ft_qip=kext_ft_qip                                       &			                 ,kext_ft_qip=kext_ft_qip                                       &
                 ,kext_ft_qid=kext_ft_qid                                       &			                 ,kext_ft_qid=kext_ft_qid                                       &
                 ,kext_ft_qs=kext_ft_qs                                       &				                 ,kext_ft_qs=kext_ft_qs                                       &
                 ,kext_ft_qg=kext_ft_qg                                       &				                 ,kext_ft_qg=kext_ft_qg                                       &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity			                 ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity
                 ,diagflag=diagflag                   &  ! added for radar reflectivity			                 ,diagflag=diagflag                   &  ! added for radar reflectivity
                 ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity			                 ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity
                 ,RAINNC=rainnc)									                 ,RAINNC=rainnc)
#endif													#endif

!													!

    CASE (MORR_TWO_MOMENT)										    CASE (MORR_TWO_MOMENT)
         CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')			         CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')
         IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &						         IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
             PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &						             PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
         PRESENT (QS_CURR) .AND. PRESENT (QG_CURR) .AND. &						         PRESENT (QS_CURR) .AND. PRESENT (QG_CURR) .AND. &
         PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &						         PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
         PRESENT (QNS_CURR) .AND. PRESENT (QNI_CURR).AND. &						         PRESENT (QNS_CURR) .AND. PRESENT (QNI_CURR).AND. &
         PRESENT (QNR_CURR) .AND. PRESENT (QNG_CURR).AND. &						         PRESENT (QNR_CURR) .AND. PRESENT (QNG_CURR).AND. &
         PRESENT (MU) .AND. PRESENT (QSCUTEN).AND. &							         PRESENT (MU) .AND. PRESENT (QSCUTEN).AND. &
         PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &						         PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
         PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &						         PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
         PRESENT (Z      ) .AND.PRESENT ( W      )  ) THEN						         PRESENT (Z      ) .AND.PRESENT ( W      )  ) THEN
         CALL mp_morr_two_moment(                            &						         CALL mp_morr_two_moment(                            &
                     ITIMESTEP=itimestep,                &  !*						                     ITIMESTEP=itimestep,                &  !*
                     TH=th,                              &  !*						                     TH=th,                              &  !*
                     QV=qv_curr,                         &  !*						                     QV=qv_curr,                         &  !*
                     QC=qc_curr,                         &  !*						                     QC=qc_curr,                         &  !*
                     QR=qr_curr,                         &  !*						                     QR=qr_curr,                         &  !*
                     QI=qi_curr,                         &  !*						                     QI=qi_curr,                         &  !*
                     QS=qs_curr,                         &  !*						                     QS=qs_curr,                         &  !*
                     QG=qg_curr,                         &  !*						                     QG=qg_curr,                         &  !*
                     NI=qni_curr,                        &  !*						                     NI=qni_curr,                        &  !*
                     NS=qns_curr,                        &  !* ! VVT					                     NS=qns_curr,                        &  !* ! VVT
                     NR=qnr_curr,                        &  !* ! VVT					                     NR=qnr_curr,                        &  !* ! VVT
                     NG=qng_curr,                        &  !* ! VVT					                     NG=qng_curr,                        &  !* ! VVT
                     RHO=rho,                            &  !*						                     RHO=rho,                            &  !*
                     PII=pi_phy,                         &  !*						                     PII=pi_phy,                         &  !*
                     P=p,                                &  !*						                     P=p,                                &  !*
                     DT_IN=dt,                           &  !*						                     DT_IN=dt,                           &  !*
                     DZ=dz8w,                            &  !* !hm					                     DZ=dz8w,                            &  !* !hm
                     HT=ht,                              &  !*						                     HT=ht,                              &  !*
                     W=w                                 &  !*						                     W=w                                 &  !*
                    ,RAINNC=RAINNC                       &  !*						                    ,RAINNC=RAINNC                       &  !*
                    ,RAINNCV=RAINNCV                     &  !*						                    ,RAINNCV=RAINNCV                     &  !*
                    ,SNOWNC=SNOWNC                       &  !*						                    ,SNOWNC=SNOWNC                       &  !*
                    ,SNOWNCV=SNOWNCV                     &  !*						                    ,SNOWNCV=SNOWNCV                     &  !*
                    ,GRAUPELNC=GRAUPELNC                 &  !*						                    ,GRAUPELNC=GRAUPELNC                 &  !*
                    ,GRAUPELNCV=GRAUPELNCV               &  !*						                    ,GRAUPELNCV=GRAUPELNCV               &  !*
                    ,SR=SR                               &  !* !hm					                    ,SR=SR                               &  !* !hm
                    ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity		                    ,REFL_10CM=refl_10cm                 &  ! added for radar reflectivity
                    ,diagflag=diagflag                   &  ! added for radar reflectivity		                    ,diagflag=diagflag                   &  ! added for radar reflectivity
                    ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity		                    ,do_radar_ref=do_radar_ref           &  ! added for radar reflectivity
                    ,qrcuten=qrcuten                     &  ! hm					                    ,qrcuten=qrcuten                     &  ! hm
                    ,qscuten=qscuten                     &  ! hm					                    ,qscuten=qscuten                     &  ! hm
                    ,qicuten=qicuten                     &  ! hm					                    ,qicuten=qicuten                     &  ! hm
                    ,mu=mu                          &  ! hm						                    ,mu=mu                          &  ! hm
                    ,F_QNDROP=f_qndrop                   &  ! hm for wrf-chem				                    ,F_QNDROP=f_qndrop                   &  ! hm for wrf-chem
                 ,QNDROP=qndrop_curr                     &  ! hm for wrf-chem				                 ,QNDROP=qndrop_curr                     &  ! hm for wrf-chem
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,QLSINK=qlsink                                     & ! jdf for wrf-chem		                 ,QLSINK=qlsink                                     & ! jdf for wrf-chem
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                 ,EVAPPROD=evapprod,RAINPROD=rainprod               &					                 ,EVAPPROD=evapprod,RAINPROD=rainprod               &
#endif													#endif
                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   & ! jdf for wrf-chem		                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   & ! jdf for wrf-chem
                                                                    )					                                                                    )
        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling morrison two moment')		           Call wrf_error_fatal( 'arguments not present for calling morrison two moment')
        ENDIF												        ENDIF

    CASE (MILBRANDT2MOM)										    CASE (MILBRANDT2MOM)
         CALL wrf_debug(100, 'microphysics_driver: calling milbrandt2mom')				         CALL wrf_debug(100, 'microphysics_driver: calling milbrandt2mom')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR)  .AND. &					             PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR)  .AND. &
             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &					             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &
             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &					             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &
             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &					             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &
             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &					             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &
             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &					             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &					             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN						             PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN
!            PRESENT (ccntype)                                 &					!            PRESENT (ccntype)                                 &

         CALL mp_milbrandt2mom_driver(                   &						         CALL mp_milbrandt2mom_driver(                   &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     p8w=p8w,                              &						                     p8w=p8w,                              &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QG=qg_curr,                         &						                     QG=qg_curr,                         &
                     QH=qh_curr,                         &						                     QH=qh_curr,                         &
                     NC=qnc_curr,                        &						                     NC=qnc_curr,                        &
                     NR=qnr_curr,                        &						                     NR=qnr_curr,                        &
                     NI=qni_curr,                        &						                     NI=qni_curr,                        &
                     NS=qns_curr,                        &						                     NS=qns_curr,                        &
                     NG=qng_curr,                        &						                     NG=qng_curr,                        &
                     NH=qnh_curr,                        &						                     NH=qnh_curr,                        &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     DT_IN=dt,                           &						                     DT_IN=dt,                           &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     W=w,                                &						                     W=w,                                &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     HAILNC   = HAILNC,                  &						                     HAILNC   = HAILNC,                  &
                     HAILNCV  = HAILNCV,                 &						                     HAILNCV  = HAILNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
!                    ccntype  = ccntype,                 &						!                    ccntype  = ccntype,                 &
                     Zet      = refl_10cm,               & ! HM, 9/22/09 for refl			                     Zet      = refl_10cm,               & ! HM, 9/22/09 for refl
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )
        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling milbrandt2mom')			           Call wrf_error_fatal( 'arguments not present for calling milbrandt2mom')
        ENDIF												        ENDIF


!     CASE (MILBRANDT3MOM)										!     CASE (MILBRANDT3MOM)
!          CALL wrf_debug(100, 'microphysics_driver: calling milbrandt3mom')				!          CALL wrf_debug(100, 'microphysics_driver: calling milbrandt3mom')
!          IF (PRESENT (QV_CURR) .AND.                          &					!          IF (PRESENT (QV_CURR) .AND.                          &
!              PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &					!              PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &
!              PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. PRESENT (QZR_CURR) .AND.  &		!              PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. PRESENT (QZR_CURR) .AND.  &
!              PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. PRESENT (QZI_CURR) .AND.  &		!              PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. PRESENT (QZI_CURR) .AND.  &
!              PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. PRESENT (QZS_CURR) .AND.  &		!              PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. PRESENT (QZS_CURR) .AND.  &
!              PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. PRESENT (QZG_CURR) .AND.  &		!              PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. PRESENT (QZG_CURR) .AND.  &
!              PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. PRESENT (QZH_CURR) .AND.  &		!              PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. PRESENT (QZH_CURR) .AND.  &
!              PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)  .AND. &					!              PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)  .AND. &
!              PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN					!              PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN
!          CALL mp_milbrandt3mom_driver(                   &						!          CALL mp_milbrandt3mom_driver(                   &
!                      ITIMESTEP=itimestep,                &  !*					!                      ITIMESTEP=itimestep,                &  !*
!                      TH=th,                              &  !*					!                      TH=th,                              &  !*
!                      QV=qv_curr,                         &  !*					!                      QV=qv_curr,                         &  !*
!                      QC=qc_curr,                         &  !*					!                      QC=qc_curr,                         &  !*
!                      QR=qr_curr,                         &  !*					!                      QR=qr_curr,                         &  !*
!                      QI=qi_curr,                         &  !*					!                      QI=qi_curr,                         &  !*
!                      QS=qs_curr,                         &  !*					!                      QS=qs_curr,                         &  !*
!                      QG=qg_curr,                         &  !*					!                      QG=qg_curr,                         &  !*
!                      QH=qh_curr,                         &  !*					!                      QH=qh_curr,                         &  !*
!                      NC=qnc_curr,                        &  !*					!                      NC=qnc_curr,                        &  !*
!                      NR=qnr_curr,                        &  !*					!                      NR=qnr_curr,                        &  !*
!                      NI=qni_curr,                        &  !*					!                      NI=qni_curr,                        &  !*
!                      NS=qns_curr,                        &  !*					!                      NS=qns_curr,                        &  !*
!                      NG=qng_curr,                        &  !*					!                      NG=qng_curr,                        &  !*
!                      NH=qnh_curr,                        &  !*					!                      NH=qnh_curr,                        &  !*
!                      ZR=qzr_curr,                        &  !*					!                      ZR=qzr_curr,                        &  !*
!                      ZI=qzi_curr,                        &  !*					!                      ZI=qzi_curr,                        &  !*
!                      ZS=qzs_curr,                        &  !*					!                      ZS=qzs_curr,                        &  !*
!                      ZG=qzg_curr,                        &  !*					!                      ZG=qzg_curr,                        &  !*
!                      ZH=qzh_curr,                        &  !*					!                      ZH=qzh_curr,                        &  !*
!                      PII=pi_phy,                         &  !*					!                      PII=pi_phy,                         &  !*
!                      P=p,                                &  !*					!                      P=p,                                &  !*
!                      DT_IN=dt,                           &  !*					!                      DT_IN=dt,                           &  !*
!                      DZ=dz8w,                            &  !* ! h					!                      DZ=dz8w,                            &  !* ! h
!                      W=w                                 &  !*					!                      W=w                                 &  !*
!                     ,RAINNC=RAINNC                       &  !*					!                     ,RAINNC=RAINNC                       &  !*
!                     ,RAINNCV=RAINNCV                     &  !*					!                     ,RAINNCV=RAINNCV                     &  !*
!                     ,SR=SR                               &  !* !hm					!                     ,SR=SR                               &  !* !hm
!                  ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					!                  ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
!                  ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					!                  ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
!                  ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					!                  ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
!                                                                     )					!                                                                     )
!         ELSE												!         ELSE
!            Call wrf_error_fatal( 'arguments not present for calling milbrandt3mom')			!            Call wrf_error_fatal( 'arguments not present for calling milbrandt3mom')
!         ENDIF												!         ENDIF

#if (EM_CORE==1)											#if (EM_CORE==1)
    CASE (NSSL_1MOM)											    CASE (NSSL_1MOM)
         CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')					         CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND.  &									             PRESENT (QC_CURR) .AND.  &
             PRESENT (QR_CURR) .AND.  &									             PRESENT (QR_CURR) .AND.  &
             PRESENT (QI_CURR) .AND.  &									             PRESENT (QI_CURR) .AND.  &
             PRESENT (QS_CURR) .AND.  &									             PRESENT (QS_CURR) .AND.  &
             PRESENT (QG_CURR) .AND.  &									             PRESENT (QG_CURR) .AND.  &
             PRESENT (QH_CURR) .AND.  &									             PRESENT (QH_CURR) .AND.  &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &					             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &					             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &
             PRESENT (QVOLG_CURR) ) THEN								             PRESENT (QVOLG_CURR) ) THEN
             												             

         CALL nssl_2mom_driver(                          &						         CALL nssl_2mom_driver(                          &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QH=qg_curr,                         &						                     QH=qg_curr,                         &
                     QHL=qh_curr,                        &						                     QHL=qh_curr,                        &
                     CCW=qnc_curr,                       &						                     CCW=qnc_curr,                       &
                     CRW=qnr_curr,                       &						                     CRW=qnr_curr,                       &
                     CCI=qni_curr,                       &						                     CCI=qni_curr,                       &
                     CSW=qns_curr,                       &						                     CSW=qns_curr,                       &
                     CHW=qng_curr,                       &						                     CHW=qng_curr,                       &
                     CHL=qnh_curr,                       &						                     CHL=qnh_curr,                       &
                     VHW=qvolg_curr,                     &						                     VHW=qvolg_curr,                     &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DTP=dt,                             &						                     DTP=dt,                             &
                     DN=rho,                             &						                     DN=rho,                             &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     HAILNC   = HAILNC,                  &						                     HAILNC   = HAILNC,                  &
                     HAILNCV  = HAILNCV,                 &						                     HAILNCV  = HAILNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
                     dbz      = refl_10cm,               &						                     dbz      = refl_10cm,               &
                     diagflag = diagflag,                &						                     diagflag = diagflag,                &
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )
        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')				           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
        ENDIF												        ENDIF


    CASE (NSSL_1MOMLFO)											    CASE (NSSL_1MOMLFO)
         CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')					         CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND.  &									             PRESENT (QC_CURR) .AND.  &
             PRESENT (QR_CURR) .AND.  &									             PRESENT (QR_CURR) .AND.  &
             PRESENT (QI_CURR) .AND.  &									             PRESENT (QI_CURR) .AND.  &
             PRESENT (QS_CURR) .AND.  &									             PRESENT (QS_CURR) .AND.  &
             PRESENT (QG_CURR) .AND.  &									             PRESENT (QG_CURR) .AND.  &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN						             PRESENT (Z      ) .AND. PRESENT ( W      )  ) THEN
             												             

         CALL nssl_2mom_driver(                          &						         CALL nssl_2mom_driver(                          &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QH=qg_curr,                         &						                     QH=qg_curr,                         &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DTP=dt,                             &						                     DTP=dt,                             &
                     DN=rho,                             &						                     DN=rho,                             &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
                     dbz      = refl_10cm,               &						                     dbz      = refl_10cm,               &
                     diagflag = diagflag,                &						                     diagflag = diagflag,                &
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )
        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')				           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
        ENDIF												        ENDIF

    CASE (NSSL_2MOM)											    CASE (NSSL_2MOM)
         CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')					         CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR)  .AND. &					             PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR)  .AND. &
             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &					             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &
             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &					             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &
             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &					             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &
             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &					             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &
             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &					             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &					             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &					             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &
             PRESENT (QVOLG_CURR) .AND. F_QVOLG  .AND.         &					             PRESENT (QVOLG_CURR) .AND. F_QVOLG  .AND.         &
             PRESENT (QVOLH_CURR) .AND. F_QVOLH ) THEN							             PRESENT (QVOLH_CURR) .AND. F_QVOLH ) THEN
             												             

         CALL nssl_2mom_driver(                          &						         CALL nssl_2mom_driver(                          &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QH=qg_curr,                         &						                     QH=qg_curr,                         &
                     QHL=qh_curr,                        &						                     QHL=qh_curr,                        &
 !                    CCW=qnc_curr,                       &						 !                    CCW=qnc_curr,                       &
                     CCW=qndrop_curr,                    &						                     CCW=qndrop_curr,                    &
                     CRW=qnr_curr,                       &						                     CRW=qnr_curr,                       &
                     CCI=qni_curr,                       &						                     CCI=qni_curr,                       &
                     CSW=qns_curr,                       &						                     CSW=qns_curr,                       &
                     CHW=qng_curr,                       &						                     CHW=qng_curr,                       &
                     CHL=qnh_curr,                       &						                     CHL=qnh_curr,                       &
                     VHW=qvolg_curr,                     &						                     VHW=qvolg_curr,                     &
                     VHL=qvolh_curr,                     &						                     VHL=qvolh_curr,                     &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DTP=dt,                             &						                     DTP=dt,                             &
                     DN=rho,                             &						                     DN=rho,                             &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     HAILNC   = HAILNC,                  &						                     HAILNC   = HAILNC,                  &
                     HAILNCV  = HAILNCV,                 &						                     HAILNCV  = HAILNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
                     dbz      = refl_10cm,               &						                     dbz      = refl_10cm,               &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                    EVAPPROD=evapprod,RAINPROD=rainprod, &						                    EVAPPROD=evapprod,RAINPROD=rainprod, &
#endif													#endif
                     nssl_progn=nssl_progn,              &						                     nssl_progn=nssl_progn,              &
                     diagflag = diagflag,                &						                     diagflag = diagflag,                &
                     re_cloud=re_cloud,                  &						                     re_cloud=re_cloud,                  &
                     re_ice=re_ice,                      &						                     re_ice=re_ice,                      &
                     re_snow=re_snow,                    &						                     re_snow=re_snow,                    &
                     has_reqc=has_reqc,                  & ! ala G. Thompson				                     has_reqc=has_reqc,                  & ! ala G. Thompson
                     has_reqi=has_reqi,                  & ! ala G. Thompson				                     has_reqi=has_reqi,                  & ! ala G. Thompson
                     has_reqs=has_reqs,                  & ! ala G. Thompson				                     has_reqs=has_reqs,                  & ! ala G. Thompson
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )

        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')				           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
        ENDIF												        ENDIF

    CASE (NSSL_2MOMG)											    CASE (NSSL_2MOMG)
         CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')					         CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR)  .AND. &					             PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR)  .AND. &
             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &					             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &
             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &					             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &
             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &					             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &
             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &					             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &					             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &					             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &
             PRESENT (QVOLG_CURR) .AND. F_QVOLG  ) THEN							             PRESENT (QVOLG_CURR) .AND. F_QVOLG  ) THEN
             												             

         CALL nssl_2mom_driver(                          &						         CALL nssl_2mom_driver(                          &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QH=qg_curr,                         &						                     QH=qg_curr,                         &
 !                    CCW=qnc_curr,                       &						 !                    CCW=qnc_curr,                       &
                     CCW=qndrop_curr,                    &						                     CCW=qndrop_curr,                    &
                     CRW=qnr_curr,                       &						                     CRW=qnr_curr,                       &
                     CCI=qni_curr,                       &						                     CCI=qni_curr,                       &
                     CSW=qns_curr,                       &						                     CSW=qns_curr,                       &
                     CHW=qng_curr,                       &						                     CHW=qng_curr,                       &
                     VHW=qvolg_curr,                     &						                     VHW=qvolg_curr,                     &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DTP=dt,                             &						                     DTP=dt,                             &
                     DN=rho,                             &						                     DN=rho,                             &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     HAILNC   = HAILNC,                  &						                     HAILNC   = HAILNC,                  &
                     HAILNCV  = HAILNCV,                 &						                     HAILNCV  = HAILNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
                     dbz      = refl_10cm,               &						                     dbz      = refl_10cm,               &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                    EVAPPROD=evapprod,RAINPROD=rainprod, &						                    EVAPPROD=evapprod,RAINPROD=rainprod, &
#endif													#endif
                     nssl_progn=nssl_progn,              &						                     nssl_progn=nssl_progn,              &
                      diagflag = diagflag,               &						                      diagflag = diagflag,               &
                     re_cloud=re_cloud,                  &						                     re_cloud=re_cloud,                  &
                     re_ice=re_ice,                      &						                     re_ice=re_ice,                      &
                     re_snow=re_snow,                    &						                     re_snow=re_snow,                    &
                     has_reqc=has_reqc,                  & ! ala G. Thompson				                     has_reqc=has_reqc,                  & ! ala G. Thompson
                     has_reqi=has_reqi,                  & ! ala G. Thompson				                     has_reqi=has_reqi,                  & ! ala G. Thompson
                     has_reqs=has_reqs,                  & ! ala G. Thompson				                     has_reqs=has_reqs,                  & ! ala G. Thompson
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )

        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')				           Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
        ENDIF												        ENDIF

    CASE (NSSL_2MOMCCN)											    CASE (NSSL_2MOMCCN)
         CALL wrf_debug(100, 'microphysics_driver: calling nssl_2momccn')				         CALL wrf_debug(100, 'microphysics_driver: calling nssl_2momccn')
         IF (PRESENT (QV_CURR) .AND.                           &					         IF (PRESENT (QV_CURR) .AND.                           &
             PRESENT (QC_CURR) .AND. PRESENT (QNDROP_CURR)  .AND. &					             PRESENT (QC_CURR) .AND. PRESENT (QNDROP_CURR)  .AND. &
             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &					             PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR)  .AND. &
             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &					             PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR)  .AND. &
             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &					             PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR)  .AND. &
             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &					             PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR)  .AND. &
             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &					             PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR)  .AND. &
             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &					             PRESENT (RAINNC ) .AND. PRESENT (RAINNCV)   .AND. &
             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &					             PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV)   .AND. &
             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &					             PRESENT (HAILNC ) .AND. PRESENT (HAILNCV)   .AND. &
             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &					             PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &					             PRESENT (Z      ) .AND. PRESENT ( W      )  .AND. &
             PRESENT (QVOLG_CURR) .AND. F_QVOLG  .AND.         &					             PRESENT (QVOLG_CURR) .AND. F_QVOLG  .AND.         &
             PRESENT (QVOLH_CURR) .AND. F_QVOLH  .AND.         &					             PRESENT (QVOLH_CURR) .AND. F_QVOLH  .AND.         &
             PRESENT( QNN_CURR )                          ) THEN					             PRESENT( QNN_CURR )                          ) THEN
             												             

         CALL nssl_2mom_driver(                          &						         CALL nssl_2mom_driver(                          &
                     ITIMESTEP=itimestep,                &						                     ITIMESTEP=itimestep,                &
                     TH=th,                              &						                     TH=th,                              &
                     QV=qv_curr,                         &						                     QV=qv_curr,                         &
                     QC=qc_curr,                         &						                     QC=qc_curr,                         &
                     QR=qr_curr,                         &						                     QR=qr_curr,                         &
                     QI=qi_curr,                         &						                     QI=qi_curr,                         &
                     QS=qs_curr,                         &						                     QS=qs_curr,                         &
                     QH=qg_curr,                         &						                     QH=qg_curr,                         &
                     QHL=qh_curr,                        &						                     QHL=qh_curr,                        &
!                     CCW=qnc_curr,                       &						!                     CCW=qnc_curr,                       &
                     CCW=qndrop_curr,                    &						                     CCW=qndrop_curr,                    &
                     CRW=qnr_curr,                       &						                     CRW=qnr_curr,                       &
                     CCI=qni_curr,                       &						                     CCI=qni_curr,                       &
                     CSW=qns_curr,                       &						                     CSW=qns_curr,                       &
                     CHW=qng_curr,                       &						                     CHW=qng_curr,                       &
                     CHL=qnh_curr,                       &						                     CHL=qnh_curr,                       &
                     VHW=qvolg_curr,                     &						                     VHW=qvolg_curr,                     &
                     VHL=qvolh_curr,                     &						                     VHL=qvolh_curr,                     &
                     cn=qnn_curr,                        &						                     cn=qnn_curr,                        &
                     PII=pi_phy,                         &						                     PII=pi_phy,                         &
                     P=p,                                &						                     P=p,                                &
                     W=w,                                &						                     W=w,                                &
                     DZ=dz8w,                            &						                     DZ=dz8w,                            &
                     DTP=dt,                             &						                     DTP=dt,                             &
                     DN=rho,                             &						                     DN=rho,                             &
                     RAINNC   = RAINNC,                  &						                     RAINNC   = RAINNC,                  &
                     RAINNCV  = RAINNCV,                 &						                     RAINNCV  = RAINNCV,                 &
                     SNOWNC   = SNOWNC,                  &						                     SNOWNC   = SNOWNC,                  &
                     SNOWNCV  = SNOWNCV,                 &						                     SNOWNCV  = SNOWNCV,                 &
                     HAILNC   = HAILNC,                  &						                     HAILNC   = HAILNC,                  &
                     HAILNCV  = HAILNCV,                 &						                     HAILNCV  = HAILNCV,                 &
                     GRPLNC   = GRAUPELNC,               &						                     GRPLNC   = GRAUPELNC,               &
                     GRPLNCV  = GRAUPELNCV,              &						                     GRPLNCV  = GRAUPELNCV,              &
                     SR=SR,                              &						                     SR=SR,                              &
                     dbz      = refl_10cm,               &						                     dbz      = refl_10cm,               &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                     EVAPPROD=evapprod,RAINPROD=rainprod,&						                     EVAPPROD=evapprod,RAINPROD=rainprod,&
#endif													#endif
                     nssl_progn=nssl_progn,              &						                     nssl_progn=nssl_progn,              &
                     diagflag = diagflag,                &						                     diagflag = diagflag,                &
                     re_cloud=re_cloud,                  &						                     re_cloud=re_cloud,                  &
                     re_ice=re_ice,                      &						                     re_ice=re_ice,                      &
                     re_snow=re_snow,                    &						                     re_snow=re_snow,                    &
                     has_reqc=has_reqc,                  & ! ala G. Thompson				                     has_reqc=has_reqc,                  & ! ala G. Thompson
                     has_reqi=has_reqi,                  & ! ala G. Thompson				                     has_reqi=has_reqi,                  & ! ala G. Thompson
                     has_reqs=has_reqs,                  & ! ala G. Thompson				                     has_reqs=has_reqs,                  & ! ala G. Thompson
                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &					                  IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &					                  IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &					                  ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte  &
                                                                    )					                                                                    )
        ELSE												        ELSE
           Call wrf_error_fatal( 'arguments not present for calling nssl_2momccn')			           Call wrf_error_fatal( 'arguments not present for calling nssl_2momccn')
        ENDIF												        ENDIF
#endif													#endif
!													!
        CASE (GSFCGCESCHEME)										        CASE (GSFCGCESCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling GSFCGCE' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling GSFCGCE' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR )                           .AND.  &					                  PRESENT( QS_CURR )                           .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( HAIL    ) .AND. PRESENT ( ICE2    ) .AND.  &					                  PRESENT( HAIL    ) .AND. PRESENT ( ICE2    ) .AND.  &
                  PRESENT( Z       ) .AND. PRESENT ( W       )  ) THEN					                  PRESENT( Z       ) .AND. PRESENT ( W       )  ) THEN
               CALL gsfcgce(                                        &					               CALL gsfcgce(                                        &
                  TH=th                                             &					                  TH=th                                             &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QL=qc_curr                                        &					                 ,QL=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &					                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &
                 ,HT=ht, DZ8W=dz8w, GRAV=G                          &					                 ,HT=ht, DZ8W=dz8w, GRAV=G                          &
                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &					                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &
                 ,ITIMESTEP=itimestep                               &					                 ,ITIMESTEP=itimestep                               &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,RAINNC=rainnc, RAINNCV=rainncv                    &					                 ,RAINNC=rainnc, RAINNCV=rainncv                    &
                 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr             &					                 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr             &
                 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv        &					                 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv        &
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,F_QG=f_qg                                         &					                 ,F_QG=f_qg                                         &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,IHAIL=hail, ICE2=ice2                             &					                 ,IHAIL=hail, ICE2=ice2                             &
                                                                    )					                                                                    )
! HAIL = 1,  run gsfcgce with hail option								! HAIL = 1,  run gsfcgce with hail option
!        0,  run gsfcgce with graupel option   <---- default						!        0,  run gsfcgce with graupel option   <---- default
!        note: no effect if ice2 = 1									!        note: no effect if ice2 = 1
! ICE2 = 1,  run gsfcgce with only snow, ice								! ICE2 = 1,  run gsfcgce with only snow, ice
!        2,  run gsfcgce with only graupel, ice								!        2,  run gsfcgce with only graupel, ice
!        0,  run gsfcgce with snow, ice and hail/graupel   <---- default				!        0,  run gsfcgce with snow, ice and hail/graupel   <---- default

             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling GSFCGCE' )			                CALL wrf_error_fatal ( 'arguments not present for calling GSFCGCE' )
             ENDIF											             ENDIF

        CASE (LINSCHEME)										        CASE (LINSCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling lin_et_al' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling lin_et_al' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR )                           .AND.  &					                  PRESENT( QS_CURR )                           .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( Z       ) ) THEN								                  PRESENT( Z       ) ) THEN
               CALL lin_et_al(                                      &					               CALL lin_et_al(                                      &
                  TH=th                                             &					                  TH=th                                             &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QL=qc_curr                                        &					                 ,QL=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QLSINK=qlsink                                     &					                 ,QLSINK=qlsink                                     &
                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &					                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &
                 ,HT=ht, DZ8W=dz8w, GRAV=G,  CP=cp                  &					                 ,HT=ht, DZ8W=dz8w, GRAV=G,  CP=cp                  &
                 ,RAIR=r_d, RVAPOR=R_v                              &					                 ,RAIR=r_d, RVAPOR=R_v                              &
                 ,XLS=xls, XLV=xlv, XLF=xlf                         &					                 ,XLS=xls, XLV=xlv, XLF=xlf                         &
                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &					                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &
                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &					                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &
                 ,SVP3=svp3,SVPT0=svpt0                             &					                 ,SVP3=svp3,SVPT0=svpt0                             &
                 ,RAINNC=rainnc, RAINNCV=rainncv                    &					                 ,RAINNC=rainnc, RAINNCV=rainncv                    &
                 ,SNOWNC=snownc, SNOWNCV=snowncv                    &					                 ,SNOWNC=snownc, SNOWNCV=snowncv                    &
                 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &					                 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   &					                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   &
                 ,F_QG=f_qg, F_QNDROP=f_qndrop                      &					                 ,F_QG=f_qg, F_QNDROP=f_qndrop                      &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,QNDROP=qndrop_curr                                &					                 ,QNDROP=qndrop_curr                                &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling lin_et_al' )			                CALL wrf_error_fatal ( 'arguments not present for calling lin_et_al' )
             ENDIF											             ENDIF

       CASE (SBU_YLINSCHEME)										       CASE (SBU_YLINSCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbu_ylin' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling sbu_ylin' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR )                           .AND.  &					                  PRESENT( QS_CURR )                           .AND.  &
                  PRESENT( RI_CURR )                           .AND.  &					                  PRESENT( RI_CURR )                           .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( Z       ) ) THEN								                  PRESENT( Z       ) ) THEN
               CALL sbu_ylin(                                       &					               CALL sbu_ylin(                                       &
                  TH=th                                             &					                  TH=th                                             &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QL=qc_curr                                        &					                 ,QL=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,RI3D=ri_curr                                      &					                 ,RI3D=ri_curr                                      &
!                 ,QLSINK=qlsink                                     &					!                 ,QLSINK=qlsink                                     &
                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &					                 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z           &
                 ,HT=ht, DZ8W=dz8w                                  &					                 ,HT=ht, DZ8W=dz8w                                  &
!                 , GRAV=G,  CP=cp                  &							!                 , GRAV=G,  CP=cp                  &
!                 ,RAIR=r_d, RVAPOR=R_v                              &					!                 ,RAIR=r_d, RVAPOR=R_v                              &
!                 ,XLS=xls, XLV=xlv, XLF=xlf                         &					!                 ,XLS=xls, XLV=xlv, XLF=xlf                         &
!                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &					!                 ,RHOWATER=rhowater, RHOSNOW=rhosnow                &
!                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &					!                 ,EP2=ep_2,SVP1=svp1,SVP2=svp2                      &
!                 ,SVP3=svp3,SVPT0=svpt0                             &					!                 ,SVP3=svp3,SVPT0=svpt0                             &
                 ,RAINNC=rainnc, RAINNCV=rainncv                    &					                 ,RAINNC=rainnc, RAINNCV=rainncv                    &
!                 ,SNOWNC=snownc, SNOWNCV=snowncv                    &					!                 ,SNOWNC=snownc, SNOWNCV=snowncv                    &
!                 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &					!                 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
!                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   &					!                 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg   &
!                 ,F_QG=f_qg                                         &					!                 ,F_QG=f_qg                                         &
!                 ,F_QNDROP=f_qndrop                      &						!                 ,F_QNDROP=f_qndrop                      &
!                 ,QG=qg_curr                                        &					!                 ,QG=qg_curr                                        &
!                 ,QNDROP=qndrop_curr                                &					!                 ,QNDROP=qndrop_curr                                &
                                                                     )					                                                                     )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling sbu_ylin' )			                CALL wrf_error_fatal ( 'arguments not present for calling sbu_ylin' )
             ENDIF											             ENDIF


        CASE (WSM3SCHEME)										        CASE (WSM3SCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm3' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm3' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND.                            &					                  PRESENT( QR_CURR ) .AND.                            &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( W       )                            ) THEN					                  PRESENT( W       )                            ) THEN
             CALL wsm3(                                             &					             CALL wsm3(                                             &
                  TH=th                                             &					                  TH=th                                             &
                 ,Q=qv_curr                                         &					                 ,Q=qv_curr                                         &
                 ,QCI=qc_curr                                       &					                 ,QCI=qc_curr                                       &
                 ,QRS=qr_curr                                       &					                 ,QRS=qr_curr                                       &
                 ,W=w,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w              &					                 ,W=w,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w              &
                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &					                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &
                 ,RD=r_d,RV=r_v,T0C=svpt0                           &					                 ,RD=r_d,RV=r_v,T0C=svpt0                           &
                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
                 ,DEN0=rhoair0, DENR=rhowater                       &					                 ,DEN0=rhoair0, DENR=rhowater                       &
                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
                 ,RAIN=rainnc ,RAINNCV=rainncv                      &					                 ,RAIN=rainnc ,RAINNCV=rainncv                      &
                 ,SNOW=snownc ,SNOWNCV=snowncv                      &					                 ,SNOW=snownc ,SNOWNCV=snowncv                      &
                 ,SR=sr                                             &					                 ,SR=sr                                             &
# ifndef _ACCEL												# ifndef _ACCEL
                 ,has_reqc=has_reqc                                 &  ! for radiation +		                 ,has_reqc=has_reqc                                 &  ! for radiation +
                 ,has_reqi=has_reqi                                 &					                 ,has_reqi=has_reqi                                 &
                 ,has_reqs=has_reqs                                 &					                 ,has_reqs=has_reqs                                 &
                 ,re_cloud=re_cloud                                 &					                 ,re_cloud=re_cloud                                 &
                 ,re_ice=re_ice                                     &					                 ,re_ice=re_ice                                     &
                 ,re_snow=re_snow                                   &  ! for radiation -  		                 ,re_snow=re_snow                                   &  ! for radiation -  
# endif													# endif
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling wsm3' )			                CALL wrf_error_fatal ( 'arguments not present for calling wsm3' )
             ENDIF											             ENDIF

#ifndef XEON_OPTIMIZED_WSM5										#ifndef XEON_OPTIMIZED_WSM5
        CASE (WSM5SCHEME)										        CASE (WSM5SCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm5' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm5' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR ) .AND.                            &					                  PRESENT( QS_CURR ) .AND.                            &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN
             CALL wsm5(                                             &					             CALL wsm5(                                             &
                  TH=th                                             &					                  TH=th                                             &
                 ,Q=qv_curr                                         &					                 ,Q=qv_curr                                         &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &					                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &
                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &					                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &
                 ,RD=r_d,RV=r_v,T0C=svpt0                           &					                 ,RD=r_d,RV=r_v,T0C=svpt0                           &
                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
                 ,DEN0=rhoair0, DENR=rhowater                       &					                 ,DEN0=rhoair0, DENR=rhowater                       &
                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
                 ,RAIN=rainnc ,RAINNCV=rainncv                      &					                 ,RAIN=rainnc ,RAINNCV=rainncv                      &
                 ,SNOW=snownc ,SNOWNCV=snowncv                      &					                 ,SNOW=snownc ,SNOWNCV=snowncv                      &
                 ,SR=sr                                             &					                 ,SR=sr                                             &
# ifndef _ACCEL												# ifndef _ACCEL
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,has_reqc=has_reqc                                 &  ! for radiation +		                 ,has_reqc=has_reqc                                 &  ! for radiation +
                 ,has_reqi=has_reqi                                 &					                 ,has_reqi=has_reqi                                 &
                 ,has_reqs=has_reqs                                 &					                 ,has_reqs=has_reqs                                 &
                 ,re_cloud=re_cloud                                 &					                 ,re_cloud=re_cloud                                 &
                 ,re_ice=re_ice                                     &					                 ,re_ice=re_ice                                     &
                 ,re_snow=re_snow                                   &  ! for radiation -  		                 ,re_snow=re_snow                                   &  ! for radiation -  
# endif													# endif
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling wsm5' )			                CALL wrf_error_fatal ( 'arguments not present for calling wsm5' )
             ENDIF											             ENDIF
#endif													#endif

        CASE (WSM6SCHEME)										        CASE (WSM6SCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &					                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN
             CALL wsm6(                                             &					             CALL wsm6(                                             &
                  TH=th                                             &					                  TH=th                                             &
                 ,Q=qv_curr                                         &					                 ,Q=qv_curr                                         &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &					                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &
                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &					                 ,DELT=dt,G=g,CPD=cp,CPV=cpv                        &
                 ,RD=r_d,RV=r_v,T0C=svpt0                           &					                 ,RD=r_d,RV=r_v,T0C=svpt0                           &
                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
                 ,DEN0=rhoair0, DENR=rhowater                       &					                 ,DEN0=rhoair0, DENR=rhowater                       &
                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
                 ,RAIN=rainnc ,RAINNCV=rainncv                      &					                 ,RAIN=rainnc ,RAINNCV=rainncv                      &
                 ,SNOW=snownc ,SNOWNCV=snowncv                      &					                 ,SNOW=snownc ,SNOWNCV=snowncv                      &
                 ,SR=sr                                             &					                 ,SR=sr                                             &
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv          &					                 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv          &
                 ,has_reqc=has_reqc                                 &  ! for radiation +		                 ,has_reqc=has_reqc                                 &  ! for radiation +
                 ,has_reqi=has_reqi                                 &					                 ,has_reqi=has_reqi                                 &
                 ,has_reqs=has_reqs                                 &					                 ,has_reqs=has_reqs                                 &
                 ,re_cloud=re_cloud                                 &					                 ,re_cloud=re_cloud                                 &
                 ,re_ice=re_ice                                     &					                 ,re_ice=re_ice                                     &
                 ,re_snow=re_snow                                   &  ! for radiation -  		                 ,re_snow=re_snow                                   &  ! for radiation -  
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling wsm6' )			                CALL wrf_error_fatal ( 'arguments not present for calling wsm6' )
             ENDIF											             ENDIF

        CASE (WDM5SCHEME)										        CASE (WDM5SCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm5' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm5' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR ) .AND. PRESENT( QNN_CURR ) .AND.  &					                  PRESENT( QS_CURR ) .AND. PRESENT( QNN_CURR ) .AND.  &
                  PRESENT ( QNC_CURR ) .AND. PRESENT( QNR_CURR ).AND.  &				                  PRESENT ( QNC_CURR ) .AND. PRESENT( QNR_CURR ).AND.  &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN
             CALL wdm5(                                             &					             CALL wdm5(                                             &
                  TH=th                                             &					                  TH=th                                             &
                 ,Q=qv_curr                                         &					                 ,Q=qv_curr                                         &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,NN=qnn_curr                                       &					                 ,NN=qnn_curr                                       &
                 ,NC=qnc_curr                                       &					                 ,NC=qnc_curr                                       &
                 ,NR=qnr_curr                                       &					                 ,NR=qnr_curr                                       &
                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &					                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &
                 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc          & ! RAS				                 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc          & ! RAS
                 ,RD=r_d,RV=r_v,T0C=svpt0                           &					                 ,RD=r_d,RV=r_v,T0C=svpt0                           &
                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
                 ,DEN0=rhoair0, DENR=rhowater                       &					                 ,DEN0=rhoair0, DENR=rhowater                       &
                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
                 ,RAIN=rainnc ,RAINNCV=rainncv                      &					                 ,RAIN=rainnc ,RAINNCV=rainncv                      &
                 ,SNOW=snownc ,SNOWNCV=snowncv                      &					                 ,SNOW=snownc ,SNOWNCV=snowncv                      &
                 ,SR=sr                                             &					                 ,SR=sr                                             &
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,has_reqc=has_reqc                                 &  ! for radiation +		                 ,has_reqc=has_reqc                                 &  ! for radiation +
                 ,has_reqi=has_reqi                                 &					                 ,has_reqi=has_reqi                                 &
                 ,has_reqs=has_reqs                                 &					                 ,has_reqs=has_reqs                                 &
                 ,re_cloud=re_cloud                                 &					                 ,re_cloud=re_cloud                                 &
                 ,re_ice=re_ice                                     &					                 ,re_ice=re_ice                                     &
                 ,re_snow=re_snow                                   &  ! for radiation -       		                 ,re_snow=re_snow                                   &  ! for radiation -       
                 ,ITIMESTEP=itimestep                               & 					                 ,ITIMESTEP=itimestep                               & 
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling wdm5')			                CALL wrf_error_fatal ( 'arguments not present for calling wdm5')
             ENDIF											             ENDIF

       CASE (WDM6SCHEME)										       CASE (WDM6SCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm6' )				             CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm6' )
             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &					             IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND.  &
                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &					                  PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND.  &
                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &					                  PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND.  &
                  PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &				                  PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &
                  PRESENT( QNR_CURR ).AND.                            &					                  PRESENT( QNR_CURR ).AND.                            &
                 PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN					                 PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV )  ) THEN
             CALL wdm6(                                             &					             CALL wdm6(                                             &
                  TH=th                                             &					                  TH=th                                             &
                 ,Q=qv_curr                                         &					                 ,Q=qv_curr                                         &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QI=qi_curr                                        &					                 ,QI=qi_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QG=qg_curr                                        &					                 ,QG=qg_curr                                        &
                 ,NN=qnn_curr                                       &					                 ,NN=qnn_curr                                       &
                 ,NC=qnc_curr                                       &					                 ,NC=qnc_curr                                       &
                 ,NR=qnr_curr                                       &					                 ,NR=qnr_curr                                       &
                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &					                 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w                  &
                 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc          & ! RAS				                 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc          & ! RAS
                 ,RD=r_d,RV=r_v,T0C=svpt0                           &					                 ,RD=r_d,RV=r_v,T0C=svpt0                           &
                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &					                 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon                  &
                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &					                 ,XLS=xls, XLV0=xlv, XLF0=xlf                       &
                 ,DEN0=rhoair0, DENR=rhowater                       &					                 ,DEN0=rhoair0, DENR=rhowater                       &
                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &					                 ,CLIQ=cliq,CICE=cice,PSAT=psat                     &
                 ,RAIN=rainnc ,RAINNCV=rainncv                      &					                 ,RAIN=rainnc ,RAINNCV=rainncv                      &
                 ,SNOW=snownc ,SNOWNCV=snowncv                      &					                 ,SNOW=snownc ,SNOWNCV=snowncv                      &
                 ,SR=sr                                             &					                 ,SR=sr                                             &
                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect	                 ,REFL_10CM=refl_10cm                               &  ! added for radar reflect
                 ,diagflag=diagflag                                 &  ! added for radar reflect	                 ,diagflag=diagflag                                 &  ! added for radar reflect
                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect	                 ,do_radar_ref=do_radar_ref                         &  ! added for radar reflect
                 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv          &					                 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv          &
                 ,ITIMESTEP=itimestep                               & 					                 ,ITIMESTEP=itimestep                               & 
                 ,has_reqc=has_reqc                                 &  ! for radiation +		                 ,has_reqc=has_reqc                                 &  ! for radiation +
                 ,has_reqi=has_reqi                                 &					                 ,has_reqi=has_reqi                                 &
                 ,has_reqs=has_reqs                                 &					                 ,has_reqs=has_reqs                                 &
                 ,re_cloud=re_cloud                                 &					                 ,re_cloud=re_cloud                                 &
                 ,re_ice=re_ice                                     & 					                 ,re_ice=re_ice                                     & 
                 ,re_snow=re_snow                                   &  ! for radiation -  		                 ,re_snow=re_snow                                   &  ! for radiation -  
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
               CALL wrf_error_fatal ( 'arguments not present for calling wdm6')				               CALL wrf_error_fatal ( 'arguments not present for calling wdm6')
             ENDIF											             ENDIF
#if(NMM_CORE==1)											#if(NMM_CORE==1)
        CASE (ETAMP_HWRF)										        CASE (ETAMP_HWRF)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew_HWRF')			             CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew_HWRF')

             IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &					             IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( mp_restart_state )                  .AND. &					                  PRESENT( mp_restart_state )                  .AND. &
                  PRESENT( tbpvs_state )                      .AND. &					                  PRESENT( tbpvs_state )                      .AND. &
                  PRESENT( tbpvs0_state )                       ) THEN					                  PRESENT( tbpvs0_state )                       ) THEN

               CALL ETAMP_NEW_HWRF(                                      &				               CALL ETAMP_NEW_HWRF(                                      &
                  ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &					                  ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &
                 ,RAINNC=rainnc,RAINNCV=rainncv                     &					                 ,RAINNC=rainnc,RAINNCV=rainncv                     &
                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &				                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QT=qt_curr                                        &					                 ,QT=qt_curr                                        &
                 ,LOWLYR=LOWLYR,SR=SR                               &					                 ,LOWLYR=LOWLYR,SR=SR                               &
                 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY         &					                 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY         &
                 ,F_RIMEF_PHY=F_RIMEF_PHY                           &					                 ,F_RIMEF_PHY=F_RIMEF_PHY                           &
                 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr                  &					                 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr                  &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )			                CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )
             ENDIF											             ENDIF
#endif													#endif
        CASE (ETAMPNEW)    !-- Operational 4-km High-Resolution Window (HRW) version			        CASE (ETAMPNEW)    !-- Operational 4-km High-Resolution Window (HRW) version
             CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')				             CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')

             IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &					             IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &					                  PRESENT( RAINNC  ) .AND. PRESENT ( RAINNCV ) .AND.  &
                  PRESENT( mp_restart_state )                  .AND. &					                  PRESENT( mp_restart_state )                  .AND. &
                  PRESENT( tbpvs_state )                      .AND. &					                  PRESENT( tbpvs_state )                      .AND. &
                  PRESENT( tbpvs0_state )                       ) THEN					                  PRESENT( tbpvs0_state )                       ) THEN
               CALL ETAMP_NEW(                                      &					               CALL ETAMP_NEW(                                      &
                  ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &					                  ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy             &
                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &				                 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
                 ,QV=qv_curr                                        &					                 ,QV=qv_curr                                        &
                 ,QC=qc_curr                                        &					                 ,QC=qc_curr                                        &
                 ,QS=qs_curr                                        &					                 ,QS=qs_curr                                        &
                 ,QR=qr_curr                                        &					                 ,QR=qr_curr                                        &
                 ,QT=qt_curr                                        &					                 ,QT=qt_curr                                        &
                 ,LOWLYR=LOWLYR,SR=SR                               &					                 ,LOWLYR=LOWLYR,SR=SR                               &
                 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY         &					                 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY         &
                 ,F_RIMEF_PHY=F_RIMEF_PHY                           &					                 ,F_RIMEF_PHY=F_RIMEF_PHY                           &
                 ,RAINNC=rainnc,RAINNCV=rainncv                     &					                 ,RAINNC=rainnc,RAINNCV=rainncv                     &
                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &					                 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &					                 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &					                 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
                 ,MP_RESTART_STATE=mp_restart_state                 &					                 ,MP_RESTART_STATE=mp_restart_state                 &
                 ,TBPVS_STATE=tbpvs_state,TBPVS0_STATE=tbpvs0_state &					                 ,TBPVS_STATE=tbpvs_state,TBPVS0_STATE=tbpvs0_state &
                                                                    )					                                                                    )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )			                CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )
             ENDIF											             ENDIF
#if(EM_CORE==1)												#if(EM_CORE==1)
          CASE (CAMMGMPSCHEME)										          CASE (CAMMGMPSCHEME)
             CALL wrf_debug ( 100 , 'microphysics_driver: calling CAMMGMPSCHEME')			             CALL wrf_debug ( 100 , 'microphysics_driver: calling CAMMGMPSCHEME')
             IF ( PRESENT( z          ) .AND. PRESENT( ht          ) .AND. &				             IF ( PRESENT( z          ) .AND. PRESENT( ht          ) .AND. &
                  PRESENT( qs_curr    ) .AND.                              &				                  PRESENT( qs_curr    ) .AND.                              &
                  PRESENT( qv_curr    ) .AND. PRESENT( qc_curr     ) .AND. &				                  PRESENT( qv_curr    ) .AND. PRESENT( qc_curr     ) .AND. &
                  PRESENT( qi_curr    ) .AND. PRESENT( f_qc        ) .AND. &				                  PRESENT( qi_curr    ) .AND. PRESENT( f_qc        ) .AND. &
                  PRESENT( qr_curr    ) .AND. PRESENT( qndrop_curr ) .AND. &                  		                  PRESENT( qr_curr    ) .AND. PRESENT( qndrop_curr ) .AND. &                  
                  PRESENT( f_qi       ) .AND. PRESENT( qnc_curr    ) .AND. &				                  PRESENT( f_qi       ) .AND. PRESENT( qnc_curr    ) .AND. &
                  PRESENT( RAINNCV    ) .AND. PRESENT( SNOWNCV     ) .AND. &				                  PRESENT( RAINNCV    ) .AND. PRESENT( SNOWNCV     ) .AND. &
                  PRESENT( qns_curr   ) .AND. PRESENT( qnr_curr    ) .AND. &				                  PRESENT( qns_curr   ) .AND. PRESENT( qnr_curr    ) .AND. &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                  PRESENT( chem       ) .AND. PRESENT(dgnum4D      )  .AND. &				                  PRESENT( chem       ) .AND. PRESENT(dgnum4D      )  .AND. &
                  PRESENT( dgnumwet4D ) .AND.                           &				                  PRESENT( dgnumwet4D ) .AND.                           &
#endif													#endif
                  PRESENT( qni_curr   ) .AND. PRESENT( RAINNC      ) ) THEN				                  PRESENT( qni_curr   ) .AND. PRESENT( RAINNC      ) ) THEN
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)			                qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
                qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)			                qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
                qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)			                qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
                qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)			                qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
#endif													#endif
                  											                  
                CALL CAMMGMP(ITIMESTEP=itimestep,DT=dt,P8W=p8w_hyd,P_HYD=p_hyd    &			                CALL CAMMGMP(ITIMESTEP=itimestep,DT=dt,P8W=p8w_hyd,P_HYD=p_hyd    &
                     ,T_PHY=t_phy,PI_PHY=pi_phy,Z_AT_W=z_at_w,QFX=qfx             &			                     ,T_PHY=t_phy,PI_PHY=pi_phy,Z_AT_W=z_at_w,QFX=qfx             &
                     ,TKE_PBL=tke_pbl,TURBTYPE3D=turbtype3d,SMAW3D=smaw3d     &				                     ,TKE_PBL=tke_pbl,TURBTYPE3D=turbtype3d,SMAW3D=smaw3d     &
                     ,DLF3D=dlf,DLF2_3D=dlf2,RLIQ2D=rliq,Z_SEA_LEVEL=z            &			                     ,DLF3D=dlf,DLF2_3D=dlf2,RLIQ2D=rliq,Z_SEA_LEVEL=z            &
                     ,KVH3D=exch_h,HT=ht,ALT=alt,ACCUM_MODE=accum_mode            &			                     ,KVH3D=exch_h,HT=ht,ALT=alt,ACCUM_MODE=accum_mode            &
                     ,AITKEN_MODE=aitken_mode,COARSE_MODE=coarse_mode             &			                     ,AITKEN_MODE=aitken_mode,COARSE_MODE=coarse_mode             &
                     ,ICWMRSH3D=icwmrsh3d,ICWMRDP3D=icwmrdp3d,SHFRC3D=shfrc3d     &			                     ,ICWMRSH3D=icwmrsh3d,ICWMRDP3D=icwmrdp3d,SHFRC3D=shfrc3d     &
                     ,CMFMC3D=cmfmc3d,CMFMC2_3D=cmfmc2_3d                         &			                     ,CMFMC3D=cmfmc3d,CMFMC2_3D=cmfmc2_3d                         &
                     ,CONFIG_FLAGS=config_flags,F_ICE_PHY=f_ice_phy               &			                     ,CONFIG_FLAGS=config_flags,F_ICE_PHY=f_ice_phy               &
                     ,F_RAIN_PHY=f_rain_phy                                       &			                     ,F_RAIN_PHY=f_rain_phy                                       &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                     ,DGNUM4D=dgnum4D,DGNUMWET4D=dgnumwet4D                       &			                     ,DGNUM4D=dgnum4D,DGNUMWET4D=dgnumwet4D                       &
#endif													#endif
                     ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde           &			                     ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde           &
                     ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme           &			                     ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme           &
                     ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte           &			                     ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte           &
!Output variables from CAMMGMP										!Output variables from CAMMGMP
                     ,TH=th,CLDFRA_OLD_MP=cldfra_old_mp,CLDFRA_MP=cldfra_mp       &			                     ,TH=th,CLDFRA_OLD_MP=cldfra_old_mp,CLDFRA_MP=cldfra_mp       &
                     ,CLDFRA_MP_ALL=cldfra_mp_all,lradius=lradius,iradius=iradius &			                     ,CLDFRA_MP_ALL=cldfra_mp_all,lradius=lradius,iradius=iradius &
                     ,CLDFRAI=cldfrai,CLDFRAL=cldfral                             &			                     ,CLDFRAI=cldfrai,CLDFRAL=cldfral                             &
                     ,CLDFRA_CONV=cldfra_conv,WSEDL3D=wsedl3d                     &			                     ,CLDFRA_CONV=cldfra_conv,WSEDL3D=wsedl3d                     &
                     ,RAINNC=rainnc,RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv &			                     ,RAINNC=rainnc,RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv &
                     ,SR=sr,QV_CURR=qv_curr,QC_CURR=qc_curr,QI_CURR=qi_curr       &			                     ,SR=sr,QV_CURR=qv_curr,QC_CURR=qc_curr,QI_CURR=qi_curr       &
                     ,QS_CURR=qs_curr,QR_CURR=qr_curr,NC3D=qnc_curr               &			                     ,QS_CURR=qs_curr,QR_CURR=qr_curr,NC3D=qnc_curr               &
                     ,NI3D=qni_curr,NS3D=qns_curr,NR3D=qnr_curr,QNDROP=qndrop_curr&			                     ,NI3D=qni_curr,NS3D=qns_curr,NR3D=qnr_curr,QNDROP=qndrop_curr&
                     ,RH_OLD_MP=rh_old_mp,LCD_OLD_MP=lcd_old_mp                   &			                     ,RH_OLD_MP=rh_old_mp,LCD_OLD_MP=lcd_old_mp                   &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                     ,CHEM=chem                                                   &			                     ,CHEM=chem                                                   &
                     ,QME3D=qme3d,PRAIN3D=prain3d,NEVAPR3D=nevapr3d               &			                     ,QME3D=qme3d,PRAIN3D=prain3d,NEVAPR3D=nevapr3d               &
                     ,RATE1ORD_CW2PR_ST3D=rate1ord_cw2pr_st3d                     &			                     ,RATE1ORD_CW2PR_ST3D=rate1ord_cw2pr_st3d                     &
#endif													#endif
                     ,XLAND=XLAND,SNOWH=SNOWH                                     &			                     ,XLAND=XLAND,SNOWH=SNOWH                                     &
                     )											                     )
             ELSE											             ELSE
                CALL wrf_error_fatal ( 'arguments not present for calling CAMMGMP SCHEME' )		                CALL wrf_error_fatal ( 'arguments not present for calling CAMMGMP SCHEME' )
             ENDIF											             ENDIF
#endif													#endif

      CASE DEFAULT											      CASE DEFAULT

         WRITE( wrf_err_message , * ) 'The microphysics option does not exist: mp_physics = ', m	         WRITE( wrf_err_message , * ) 'The microphysics option does not exist: mp_physics = ', m
         CALL wrf_error_fatal ( wrf_err_message )							         CALL wrf_error_fatal ( wrf_err_message )

      END SELECT micro_select										      END SELECT micro_select

   ENDDO												   ENDDO
   !$OMP END PARALLEL DO										   !$OMP END PARALLEL DO

#ifdef XEON_OPTIMIZED_WSM5										#ifdef XEON_OPTIMIZED_WSM5
   ENDIF												   ENDIF
#endif													#endif

! by ZCX												! by ZCX
! IF ( PRESENT (LWP) ) THEN										! IF ( PRESENT (LWP) ) THEN
!   DO ij = 1 , num_tiles										!   DO ij = 1 , num_tiles
!      its = i_start(ij)										!      its = i_start(ij)
!      ite = i_end(ij)											!      ite = i_end(ij)
!      jts = j_start(ij)										!      jts = j_start(ij)
!      jte = j_end(ij)											!      jte = j_end(ij)
!      DO j=jts,jte											!      DO j=jts,jte
!      DO i=its,ite											!      DO i=its,ite
!         lwp(i,j) = 0.0										!         lwp(i,j) = 0.0
!         do k=kts,kte											!         do k=kts,kte
!           lwp(i,j)=lwp(i,j)+qc_curr(i,k,j)*rho(i,k,j)*dz8w(i,k,j)					!           lwp(i,j)=lwp(i,j)+qc_curr(i,k,j)*rho(i,k,j)*dz8w(i,k,j)
!         end do											!         end do
!      ENDDO												!      ENDDO
!      ENDDO												!      ENDDO
!   ENDDO												!   ENDDO
! ENDIF													! ENDIF
! ZCX													! ZCX

   CALL wrf_debug ( 200 , 'microphysics_driver: returning from' )					   CALL wrf_debug ( 200 , 'microphysics_driver: returning from' )

   RETURN												   RETURN

   END SUBROUTINE microphysics_driver									   END SUBROUTINE microphysics_driver

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
!----------------------------------------------------------------------------------			!----------------------------------------------------------------------------------
SUBROUTINE ccn_calc(nbin,sect,num_aer,hygro_aer,     &							SUBROUTINE ccn_calc(nbin,sect,num_aer,hygro_aer,     &
		    ccn1,ccn2,ccn3,ccn4,ccn5,ccn6,   &									    ccn1,ccn2,ccn3,ccn4,ccn5,ccn6,   &
		    ids,ide, jds,jde, kds,kde,       &									    ids,ide, jds,jde, kds,kde,       &
		    ims,ime, jms,jme, kms,kme,       &									    ims,ime, jms,jme, kms,kme,       &
		    its,ite, jts,jte, kts,kte	     )									    its,ite, jts,jte, kts,kte	     )

! i/o variable												! i/o variable
integer,intent(in) :: nbin 										integer,intent(in) :: nbin 
real :: addhygro											real :: addhygro
real,dimension(nbin+1),intent(in) :: sect 								real,dimension(nbin+1),intent(in) :: sect 
real,dimension(ims:ime,kms:kme,jms:jme,nbin),intent(in) :: num_aer					real,dimension(ims:ime,kms:kme,jms:jme,nbin),intent(in) :: num_aer
real,dimension(ims:ime,kms:kme,jms:jme),intent(in) :: hygro_aer						real,dimension(ims:ime,kms:kme,jms:jme),intent(in) :: hygro_aer
real,dimension(ims:ime,kms:kme,jms:jme),intent(out):: ccn1, ccn2, ccn3, ccn4, ccn5, ccn6		real,dimension(ims:ime,kms:kme,jms:jme),intent(out):: ccn1, ccn2, ccn3, ccn4, ccn5, ccn6
integer, intent(in) :: ids, ide, jds, jde, kds, kde							integer, intent(in) :: ids, ide, jds, jde, kds, kde
integer, intent(in) :: ims, ime, jms, jme, kms, kme							integer, intent(in) :: ims, ime, jms, jme, kms, kme
integer, intent(in) :: its, ite, jts, jte, kts, kte							integer, intent(in) :: its, ite, jts, jte, kts, kte

! local variable											! local variable
integer,parameter :: nsat=6										integer,parameter :: nsat=6
! supersaturation (%) of the spectrum									! supersaturation (%) of the spectrum
real,parameter :: ss(nsat)= (/0.02,0.05,0.1,0.2,0.5,1.0/)						real,parameter :: ss(nsat)= (/0.02,0.05,0.1,0.2,0.5,1.0/)
integer :: i_start,j_start,i_end,j_end, i, j, k, l, m							integer :: i_start,j_start,i_end,j_end, i, j, k, l, m
real	:: ak,dc,frac											real	:: ak,dc,frac
real,dimension(nsat) :: logss										real,dimension(nsat) :: logss

! Surface tension term											! Surface tension term
ak = log(1.2*1.e-9)											ak = log(1.2*1.e-9)

! Supersaturation spectrum										! Supersaturation spectrum
logss = log(ss*0.01) 											logss = log(ss*0.01) 

! Inizialize CCN											! Inizialize CCN
ccn1 = 0.0												ccn1 = 0.0
ccn2 = 0.0												ccn2 = 0.0
ccn3 = 0.0												ccn3 = 0.0
ccn4 = 0.0												ccn4 = 0.0
ccn5 = 0.0												ccn5 = 0.0
ccn6 = 0.0												ccn6 = 0.0

! CCN diagnostic											! CCN diagnostic
do i=its,ite												do i=its,ite
do j=jts,jte												do j=jts,jte
do k=kts,kte												do k=kts,kte

! Critical activation diameter for each supersaturation level						! Critical activation diameter for each supersaturation level
   addhygro=0.												   addhygro=0.
   if(hygro_aer(i,k,j).gt.1.e-10)addhygro=0.5*log(hygro_aer(i,k,j))					   if(hygro_aer(i,k,j).gt.1.e-10)addhygro=0.5*log(hygro_aer(i,k,j))

   do l=1,nsat												   do l=1,nsat
        												        
      dc = ak-log(3.)-2./3.*(logss(l)-log(2.)+addhygro)							      dc = ak-log(3.)-2./3.*(logss(l)-log(2.)+addhygro)
												   >	      if(dc.lt.0)dc=0
      dc = 2.*exp(dc)*1.e6										      dc = 2.*exp(dc)*1.e6

      do m=1,nbin											      do m=1,nbin

! Fraction of each section acting as CCN								! Fraction of each section acting as CCN
         frac = 0.											         frac = 0.
         if(sect(m).le.dc.and.sect(m+1).ge.dc)frac=log(sect(m+1)/dc)/log(sect(m+1)/sect(m))		         if(sect(m).le.dc.and.sect(m+1).ge.dc)frac=log(sect(m+1)/dc)/log(sect(m+1)/sect(m))
         if(sect(m).gt.dc)frac = 1.									         if(sect(m).gt.dc)frac = 1.

! CCN concentration (#/cm3)										! CCN concentration (#/cm3)
         if(frac.gt.0) then										         if(frac.gt.0) then
            if(l==1) then										            if(l==1) then
              ccn1(i,k,j) = ccn1(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn1(i,k,j) = ccn1(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            elseif(l==2) then										            elseif(l==2) then
              ccn2(i,k,j) = ccn2(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn2(i,k,j) = ccn2(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            elseif(l==3) then										            elseif(l==3) then
              ccn3(i,k,j) = ccn3(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn3(i,k,j) = ccn3(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            elseif(l==4) then										            elseif(l==4) then
              ccn4(i,k,j) = ccn4(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn4(i,k,j) = ccn4(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            elseif(l==5) then										            elseif(l==5) then
              ccn5(i,k,j) = ccn5(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn5(i,k,j) = ccn5(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            elseif(l==6) then										            elseif(l==6) then
              ccn6(i,k,j) = ccn6(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6					              ccn6(i,k,j) = ccn6(i,k,j)+frac*num_aer(i,k,j,m)*1.e-6
            endif											            endif
         endif												         endif
      													      
      enddo !m												      enddo !m

enddo !l												enddo !l
enddo !k												enddo !k
enddo !j												enddo !j
enddo !i												enddo !i

END SUBROUTINE ccn_calc											END SUBROUTINE ccn_calc

#endif													#endif

END MODULE module_microphysics_driver									END MODULE module_microphysics_driver
>                                                 
>=================================================================================
>  phys/module_mp_thompson.F
>=================================================================================
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. This subroutine computes the moisture tendencies of water vapor,					!.. This subroutine computes the moisture tendencies of water vapor,
!.. cloud droplets, rain, cloud ice (pristine), snow, and graupel.					!.. cloud droplets, rain, cloud ice (pristine), snow, and graupel.
!.. Prior to WRFv2.2 this code was based on Reisner et al (1998), but					!.. Prior to WRFv2.2 this code was based on Reisner et al (1998), but
!.. few of those pieces remain.  A complete description is now found in					!.. few of those pieces remain.  A complete description is now found in
!.. Thompson, G., P. R. Field, R. M. Rasmussen, and W. D. Hall, 2008:					!.. Thompson, G., P. R. Field, R. M. Rasmussen, and W. D. Hall, 2008:
!.. Explicit Forecasts of winter precipitation using an improved bulk					!.. Explicit Forecasts of winter precipitation using an improved bulk
!.. microphysics scheme. Part II: Implementation of a new snow						!.. microphysics scheme. Part II: Implementation of a new snow
!.. parameterization.  Mon. Wea. Rev., 136, 5095-5115.							!.. parameterization.  Mon. Wea. Rev., 136, 5095-5115.
!.. Prior to WRFv3.1, this code was single-moment rain prediction as					!.. Prior to WRFv3.1, this code was single-moment rain prediction as
!.. described in the reference above, but in v3.1 and higher, the					!.. described in the reference above, but in v3.1 and higher, the
!.. scheme is two-moment rain (predicted rain number concentration).					!.. scheme is two-moment rain (predicted rain number concentration).
!..													!..
!.. Beginning with WRFv3.6, this is also the "aerosol-aware" scheme as					!.. Beginning with WRFv3.6, this is also the "aerosol-aware" scheme as
!.. described in Thompson, G. and T. Eidhammer, 2014:  A study of					!.. described in Thompson, G. and T. Eidhammer, 2014:  A study of
!.. aerosol impacts on clouds and precipitation development in a large					!.. aerosol impacts on clouds and precipitation development in a large
!.. winter cyclone.  J. Atmos. Sci., 71, 3636-3658.  Setting WRF					!.. winter cyclone.  J. Atmos. Sci., 71, 3636-3658.  Setting WRF
!.. namelist option mp_physics=8 utilizes the older one-moment cloud					!.. namelist option mp_physics=8 utilizes the older one-moment cloud
!.. water with constant droplet concentration set as Nt_c (found below)					!.. water with constant droplet concentration set as Nt_c (found below)
!.. while mp_physics=28 uses double-moment cloud droplet number						!.. while mp_physics=28 uses double-moment cloud droplet number
!.. concentration, which is not permitted to exceed Nt_c_max below.					!.. concentration, which is not permitted to exceed Nt_c_max below.
!..													!..
!.. Most importantly, users may wish to modify the prescribed number of					!.. Most importantly, users may wish to modify the prescribed number of
!.. cloud droplets (Nt_c; see guidelines mentioned below).  Otherwise,					!.. cloud droplets (Nt_c; see guidelines mentioned below).  Otherwise,
!.. users may alter the rain and graupel size distribution parameters					!.. users may alter the rain and graupel size distribution parameters
!.. to use exponential (Marshal-Palmer) or generalized gamma shape.					!.. to use exponential (Marshal-Palmer) or generalized gamma shape.
!.. The snow field assumes a combination of two gamma functions (from					!.. The snow field assumes a combination of two gamma functions (from
!.. Field et al. 2005) and would require significant modifications					!.. Field et al. 2005) and would require significant modifications
!.. throughout the entire code to alter its shape as well as accretion					!.. throughout the entire code to alter its shape as well as accretion
!.. rates.  Users may also alter the constants used for density of rain,				!.. rates.  Users may also alter the constants used for density of rain,
!.. graupel, ice, and snow, but the latter is not constant when using					!.. graupel, ice, and snow, but the latter is not constant when using
!.. Paul Field's snow distribution and moments methods.  Other values					!.. Paul Field's snow distribution and moments methods.  Other values
!.. users can modify include the constants for mass and/or velocity					!.. users can modify include the constants for mass and/or velocity
!.. power law relations and assumed capacitances used in deposition/					!.. power law relations and assumed capacitances used in deposition/
!.. sublimation/evaporation/melting.									!.. sublimation/evaporation/melting.
!.. Remaining values should probably be left alone.							!.. Remaining values should probably be left alone.
!..													!..
!..Author: Greg Thompson, NCAR-RAL, gthompsn@ucar.edu, 303-497-2805					!..Author: Greg Thompson, NCAR-RAL, gthompsn@ucar.edu, 303-497-2805
!..Last modified: 01 Aug 2016   Aerosol additions to v3.5.1 code 9/2013					!..Last modified: 01 Aug 2016   Aerosol additions to v3.5.1 code 9/2013
!..                 Cloud fraction additions 11/2014 part of pre-v3.7					!..                 Cloud fraction additions 11/2014 part of pre-v3.7
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!wrft:model_layer:physics										!wrft:model_layer:physics
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!													!
      MODULE module_mp_thompson										      MODULE module_mp_thompson

      USE module_wrf_error										      USE module_wrf_error
      USE module_mp_radar										      USE module_mp_radar
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
      USE module_dm, ONLY : wrf_dm_max_real								      USE module_dm, ONLY : wrf_dm_max_real
#endif													#endif

      IMPLICIT NONE											      IMPLICIT NONE

      LOGICAL, PARAMETER, PRIVATE:: iiwarm = .false.							      LOGICAL, PARAMETER, PRIVATE:: iiwarm = .false.
      LOGICAL, PRIVATE:: is_aerosol_aware = .false.							      LOGICAL, PRIVATE:: is_aerosol_aware = .false.
      LOGICAL, PARAMETER, PRIVATE:: dustyIce = .true.							      LOGICAL, PARAMETER, PRIVATE:: dustyIce = .true.
      LOGICAL, PARAMETER, PRIVATE:: homogIce = .true.							      LOGICAL, PARAMETER, PRIVATE:: homogIce = .true.

      INTEGER, PARAMETER, PRIVATE:: IFDRY = 0								      INTEGER, PARAMETER, PRIVATE:: IFDRY = 0
      REAL, PARAMETER, PRIVATE:: T_0 = 273.15								      REAL, PARAMETER, PRIVATE:: T_0 = 273.15
      REAL, PARAMETER, PRIVATE:: PI = 3.1415926536							      REAL, PARAMETER, PRIVATE:: PI = 3.1415926536

!..Densities of rain, snow, graupel, and cloud ice.							!..Densities of rain, snow, graupel, and cloud ice.
      REAL, PARAMETER, PRIVATE:: rho_w = 1000.0								      REAL, PARAMETER, PRIVATE:: rho_w = 1000.0
      REAL, PARAMETER, PRIVATE:: rho_s = 100.0								      REAL, PARAMETER, PRIVATE:: rho_s = 100.0
      REAL, PARAMETER, PRIVATE:: rho_g = 500.0								      REAL, PARAMETER, PRIVATE:: rho_g = 500.0
      REAL, PARAMETER, PRIVATE:: rho_i = 890.0								      REAL, PARAMETER, PRIVATE:: rho_i = 890.0

!..Prescribed number of cloud droplets.  Set according to known data or					!..Prescribed number of cloud droplets.  Set according to known data or
!.. roughly 100 per cc (100.E6 m^-3) for Maritime cases and						!.. roughly 100 per cc (100.E6 m^-3) for Maritime cases and
!.. 300 per cc (300.E6 m^-3) for Continental.  Gamma shape parameter,					!.. 300 per cc (300.E6 m^-3) for Continental.  Gamma shape parameter,
!.. mu_c, calculated based on Nt_c is important in autoconversion					!.. mu_c, calculated based on Nt_c is important in autoconversion
!.. scheme.  In 2-moment cloud water, Nt_c represents a maximum of					!.. scheme.  In 2-moment cloud water, Nt_c represents a maximum of
!.. droplet concentration and nu_c is also variable depending on local					!.. droplet concentration and nu_c is also variable depending on local
!.. droplet number concentration.									!.. droplet number concentration.
      REAL, PARAMETER, PRIVATE:: Nt_c = 100.E6								      REAL, PARAMETER, PRIVATE:: Nt_c = 100.E6
      REAL, PARAMETER, PRIVATE:: Nt_c_max = 1999.E6							      REAL, PARAMETER, PRIVATE:: Nt_c_max = 1999.E6

!..Declaration of constants for assumed CCN/IN aerosols when none in					!..Declaration of constants for assumed CCN/IN aerosols when none in
!.. the input data.  Look inside the init routine for modifications					!.. the input data.  Look inside the init routine for modifications
!.. due to surface land-sea points or vegetation characteristics.					!.. due to surface land-sea points or vegetation characteristics.
      REAL, PARAMETER, PRIVATE:: naIN0 = 1.5E6								      REAL, PARAMETER, PRIVATE:: naIN0 = 1.5E6
      REAL, PARAMETER, PRIVATE:: naIN1 = 0.5E6								      REAL, PARAMETER, PRIVATE:: naIN1 = 0.5E6
      REAL, PARAMETER, PRIVATE:: naCCN0 = 300.0E6							      REAL, PARAMETER, PRIVATE:: naCCN0 = 300.0E6
      REAL, PARAMETER, PRIVATE:: naCCN1 = 50.0E6							      REAL, PARAMETER, PRIVATE:: naCCN1 = 50.0E6

!..Generalized gamma distributions for rain, graupel and cloud ice.					!..Generalized gamma distributions for rain, graupel and cloud ice.
!.. N(D) = N_0 * D**mu * exp(-lamda*D);  mu=0 is exponential.						!.. N(D) = N_0 * D**mu * exp(-lamda*D);  mu=0 is exponential.
      REAL, PARAMETER, PRIVATE:: mu_r = 0.0								      REAL, PARAMETER, PRIVATE:: mu_r = 0.0
      REAL, PARAMETER, PRIVATE:: mu_g = 0.0								      REAL, PARAMETER, PRIVATE:: mu_g = 0.0
      REAL, PARAMETER, PRIVATE:: mu_i = 0.0								      REAL, PARAMETER, PRIVATE:: mu_i = 0.0
      REAL, PRIVATE:: mu_c										      REAL, PRIVATE:: mu_c

!..Sum of two gamma distrib for snow (Field et al. 2005).						!..Sum of two gamma distrib for snow (Field et al. 2005).
!.. N(D) = M2**4/M3**3 * [Kap0*exp(-M2*Lam0*D/M3)							!.. N(D) = M2**4/M3**3 * [Kap0*exp(-M2*Lam0*D/M3)
!..    + Kap1*(M2/M3)**mu_s * D**mu_s * exp(-M2*Lam1*D/M3)]						!..    + Kap1*(M2/M3)**mu_s * D**mu_s * exp(-M2*Lam1*D/M3)]
!.. M2 and M3 are the (bm_s)th and (bm_s+1)th moments respectively					!.. M2 and M3 are the (bm_s)th and (bm_s+1)th moments respectively
!.. calculated as function of ice water content and temperature.					!.. calculated as function of ice water content and temperature.
      REAL, PARAMETER, PRIVATE:: mu_s = 0.6357								      REAL, PARAMETER, PRIVATE:: mu_s = 0.6357
      REAL, PARAMETER, PRIVATE:: Kap0 = 490.6								      REAL, PARAMETER, PRIVATE:: Kap0 = 490.6
      REAL, PARAMETER, PRIVATE:: Kap1 = 17.46								      REAL, PARAMETER, PRIVATE:: Kap1 = 17.46
      REAL, PARAMETER, PRIVATE:: Lam0 = 20.78								      REAL, PARAMETER, PRIVATE:: Lam0 = 20.78
      REAL, PARAMETER, PRIVATE:: Lam1 = 3.29								      REAL, PARAMETER, PRIVATE:: Lam1 = 3.29

!..Y-intercept parameter for graupel is not constant and depends on					!..Y-intercept parameter for graupel is not constant and depends on
!.. mixing ratio.  Also, when mu_g is non-zero, these become equiv					!.. mixing ratio.  Also, when mu_g is non-zero, these become equiv
!.. y-intercept for an exponential distrib and proper values are					!.. y-intercept for an exponential distrib and proper values are
!.. computed based on same mixing ratio and total number concentration.					!.. computed based on same mixing ratio and total number concentration.
      REAL, PARAMETER, PRIVATE:: gonv_min = 1.E4							      REAL, PARAMETER, PRIVATE:: gonv_min = 1.E4
      REAL, PARAMETER, PRIVATE:: gonv_max = 3.E6							      REAL, PARAMETER, PRIVATE:: gonv_max = 3.E6

!..Mass power law relations:  mass = am*D**bm								!..Mass power law relations:  mass = am*D**bm
!.. Snow from Field et al. (2005), others assume spherical form.					!.. Snow from Field et al. (2005), others assume spherical form.
      REAL, PARAMETER, PRIVATE:: am_r = PI*rho_w/6.0							      REAL, PARAMETER, PRIVATE:: am_r = PI*rho_w/6.0
      REAL, PARAMETER, PRIVATE:: bm_r = 3.0								      REAL, PARAMETER, PRIVATE:: bm_r = 3.0
      REAL, PARAMETER, PRIVATE:: am_s = 0.069								      REAL, PARAMETER, PRIVATE:: am_s = 0.069
      REAL, PARAMETER, PRIVATE:: bm_s = 2.0								      REAL, PARAMETER, PRIVATE:: bm_s = 2.0
      REAL, PARAMETER, PRIVATE:: am_g = PI*rho_g/6.0							      REAL, PARAMETER, PRIVATE:: am_g = PI*rho_g/6.0
      REAL, PARAMETER, PRIVATE:: bm_g = 3.0								      REAL, PARAMETER, PRIVATE:: bm_g = 3.0
      REAL, PARAMETER, PRIVATE:: am_i = PI*rho_i/6.0							      REAL, PARAMETER, PRIVATE:: am_i = PI*rho_i/6.0
      REAL, PARAMETER, PRIVATE:: bm_i = 3.0								      REAL, PARAMETER, PRIVATE:: bm_i = 3.0

!..Fallspeed power laws relations:  v = (av*D**bv)*exp(-fv*D)						!..Fallspeed power laws relations:  v = (av*D**bv)*exp(-fv*D)
!.. Rain from Ferrier (1994), ice, snow, and graupel from						!.. Rain from Ferrier (1994), ice, snow, and graupel from
!.. Thompson et al (2008). Coefficient fv is zero for graupel/ice.					!.. Thompson et al (2008). Coefficient fv is zero for graupel/ice.
      REAL, PARAMETER, PRIVATE:: av_r = 4854.0								      REAL, PARAMETER, PRIVATE:: av_r = 4854.0
      REAL, PARAMETER, PRIVATE:: bv_r = 1.0								      REAL, PARAMETER, PRIVATE:: bv_r = 1.0
      REAL, PARAMETER, PRIVATE:: fv_r = 195.0								      REAL, PARAMETER, PRIVATE:: fv_r = 195.0
      REAL, PARAMETER, PRIVATE:: av_s = 40.0								      REAL, PARAMETER, PRIVATE:: av_s = 40.0
      REAL, PARAMETER, PRIVATE:: bv_s = 0.55								      REAL, PARAMETER, PRIVATE:: bv_s = 0.55
      REAL, PARAMETER, PRIVATE:: fv_s = 100.0								      REAL, PARAMETER, PRIVATE:: fv_s = 100.0
      REAL, PARAMETER, PRIVATE:: av_g = 442.0								      REAL, PARAMETER, PRIVATE:: av_g = 442.0
      REAL, PARAMETER, PRIVATE:: bv_g = 0.89								      REAL, PARAMETER, PRIVATE:: bv_g = 0.89
      REAL, PARAMETER, PRIVATE:: av_i = 1847.5								      REAL, PARAMETER, PRIVATE:: av_i = 1847.5
      REAL, PARAMETER, PRIVATE:: bv_i = 1.0								      REAL, PARAMETER, PRIVATE:: bv_i = 1.0
      REAL, PARAMETER, PRIVATE:: av_c = 0.316946E8							      REAL, PARAMETER, PRIVATE:: av_c = 0.316946E8
      REAL, PARAMETER, PRIVATE:: bv_c = 2.0								      REAL, PARAMETER, PRIVATE:: bv_c = 2.0

!..Capacitance of sphere and plates/aggregates: D**3, D**2						!..Capacitance of sphere and plates/aggregates: D**3, D**2
      REAL, PARAMETER, PRIVATE:: C_cube = 0.5								      REAL, PARAMETER, PRIVATE:: C_cube = 0.5
      REAL, PARAMETER, PRIVATE:: C_sqrd = 0.15								      REAL, PARAMETER, PRIVATE:: C_sqrd = 0.15

!..Collection efficiencies.  Rain/snow/graupel collection of cloud					!..Collection efficiencies.  Rain/snow/graupel collection of cloud
!.. droplets use variables (Ef_rw, Ef_sw, Ef_gw respectively) and					!.. droplets use variables (Ef_rw, Ef_sw, Ef_gw respectively) and
!.. get computed elsewhere because they are dependent on stokes						!.. get computed elsewhere because they are dependent on stokes
!.. number.												!.. number.
      REAL, PARAMETER, PRIVATE:: Ef_si = 0.05								      REAL, PARAMETER, PRIVATE:: Ef_si = 0.05
      REAL, PARAMETER, PRIVATE:: Ef_rs = 0.95								      REAL, PARAMETER, PRIVATE:: Ef_rs = 0.95
      REAL, PARAMETER, PRIVATE:: Ef_rg = 0.75								      REAL, PARAMETER, PRIVATE:: Ef_rg = 0.75
      REAL, PARAMETER, PRIVATE:: Ef_ri = 0.95								      REAL, PARAMETER, PRIVATE:: Ef_ri = 0.95

!..Minimum microphys values										!..Minimum microphys values
!.. R1 value, 1.E-12, cannot be set lower because of numerical						!.. R1 value, 1.E-12, cannot be set lower because of numerical
!.. problems with Paul Field's moments and should not be set larger					!.. problems with Paul Field's moments and should not be set larger
!.. because of truncation problems in snow/ice growth.							!.. because of truncation problems in snow/ice growth.
      REAL, PARAMETER, PRIVATE:: R1 = 1.E-12								      REAL, PARAMETER, PRIVATE:: R1 = 1.E-12
      REAL, PARAMETER, PRIVATE:: R2 = 1.E-6								      REAL, PARAMETER, PRIVATE:: R2 = 1.E-6
      REAL, PARAMETER, PRIVATE:: eps = 1.E-15								      REAL, PARAMETER, PRIVATE:: eps = 1.E-15

!..Constants in Cooper curve relation for cloud ice number.						!..Constants in Cooper curve relation for cloud ice number.
      REAL, PARAMETER, PRIVATE:: TNO = 5.0								      REAL, PARAMETER, PRIVATE:: TNO = 5.0
      REAL, PARAMETER, PRIVATE:: ATO = 0.304								      REAL, PARAMETER, PRIVATE:: ATO = 0.304

!..Rho_not used in fallspeed relations (rho_not/rho)**.5 adjustment.					!..Rho_not used in fallspeed relations (rho_not/rho)**.5 adjustment.
      REAL, PARAMETER, PRIVATE:: rho_not = 101325.0/(287.05*298.0)					      REAL, PARAMETER, PRIVATE:: rho_not = 101325.0/(287.05*298.0)

!..Schmidt number											!..Schmidt number
      REAL, PARAMETER, PRIVATE:: Sc = 0.632								      REAL, PARAMETER, PRIVATE:: Sc = 0.632
      REAL, PRIVATE:: Sc3										      REAL, PRIVATE:: Sc3

!..Homogeneous freezing temperature									!..Homogeneous freezing temperature
      REAL, PARAMETER, PRIVATE:: HGFR = 235.16								      REAL, PARAMETER, PRIVATE:: HGFR = 235.16

!..Water vapor and air gas constants at constant pressure						!..Water vapor and air gas constants at constant pressure
      REAL, PARAMETER, PRIVATE:: Rv = 461.5								      REAL, PARAMETER, PRIVATE:: Rv = 461.5
      REAL, PARAMETER, PRIVATE:: oRv = 1./Rv								      REAL, PARAMETER, PRIVATE:: oRv = 1./Rv
      REAL, PARAMETER, PRIVATE:: R = 287.04								      REAL, PARAMETER, PRIVATE:: R = 287.04
      REAL, PARAMETER, PRIVATE:: Cp = 1004.0								      REAL, PARAMETER, PRIVATE:: Cp = 1004.0
      REAL, PARAMETER, PRIVATE:: R_uni = 8.314                           ! J (mol K)-1			      REAL, PARAMETER, PRIVATE:: R_uni = 8.314                           ! J (mol K)-1

      DOUBLE PRECISION, PARAMETER, PRIVATE:: k_b = 1.38065E-23           ! Boltzmann constant [J	      DOUBLE PRECISION, PARAMETER, PRIVATE:: k_b = 1.38065E-23           ! Boltzmann constant [J
      DOUBLE PRECISION, PARAMETER, PRIVATE:: M_w = 18.01528E-3           ! molecular mass of wat	      DOUBLE PRECISION, PARAMETER, PRIVATE:: M_w = 18.01528E-3           ! molecular mass of wat
      DOUBLE PRECISION, PARAMETER, PRIVATE:: M_a = 28.96E-3              ! molecular mass of air	      DOUBLE PRECISION, PARAMETER, PRIVATE:: M_a = 28.96E-3              ! molecular mass of air
      DOUBLE PRECISION, PARAMETER, PRIVATE:: N_avo = 6.022E23            ! Avogadro number [1/mo	      DOUBLE PRECISION, PARAMETER, PRIVATE:: N_avo = 6.022E23            ! Avogadro number [1/mo
      DOUBLE PRECISION, PARAMETER, PRIVATE:: ma_w = M_w / N_avo          ! mass of water molecul	      DOUBLE PRECISION, PARAMETER, PRIVATE:: ma_w = M_w / N_avo          ! mass of water molecul
      REAL, PARAMETER, PRIVATE:: ar_volume = 4./3.*PI*(2.5e-6)**3        ! assume radius of 0.02	      REAL, PARAMETER, PRIVATE:: ar_volume = 4./3.*PI*(2.5e-6)**3        ! assume radius of 0.02

!..Enthalpy of sublimation, vaporization, and fusion at 0C.						!..Enthalpy of sublimation, vaporization, and fusion at 0C.
      REAL, PARAMETER, PRIVATE:: lsub = 2.834E6								      REAL, PARAMETER, PRIVATE:: lsub = 2.834E6
      REAL, PARAMETER, PRIVATE:: lvap0 = 2.5E6								      REAL, PARAMETER, PRIVATE:: lvap0 = 2.5E6
      REAL, PARAMETER, PRIVATE:: lfus = lsub - lvap0							      REAL, PARAMETER, PRIVATE:: lfus = lsub - lvap0
      REAL, PARAMETER, PRIVATE:: olfus = 1./lfus							      REAL, PARAMETER, PRIVATE:: olfus = 1./lfus

!..Ice initiates with this mass (kg), corresponding diameter calc.					!..Ice initiates with this mass (kg), corresponding diameter calc.
!..Min diameters and mass of cloud, rain, snow, and graupel (m, kg).					!..Min diameters and mass of cloud, rain, snow, and graupel (m, kg).
      REAL, PARAMETER, PRIVATE:: xm0i = 1.E-12								      REAL, PARAMETER, PRIVATE:: xm0i = 1.E-12
      REAL, PARAMETER, PRIVATE:: D0c = 1.E-6								      REAL, PARAMETER, PRIVATE:: D0c = 1.E-6
      REAL, PARAMETER, PRIVATE:: D0r = 50.E-6								      REAL, PARAMETER, PRIVATE:: D0r = 50.E-6
      REAL, PARAMETER, PRIVATE:: D0s = 200.E-6								      REAL, PARAMETER, PRIVATE:: D0s = 200.E-6
      REAL, PARAMETER, PRIVATE:: D0g = 250.E-6								      REAL, PARAMETER, PRIVATE:: D0g = 250.E-6
      REAL, PRIVATE:: D0i, xm0s, xm0g									      REAL, PRIVATE:: D0i, xm0s, xm0g

!..Lookup table dimensions										!..Lookup table dimensions
      INTEGER, PARAMETER, PRIVATE:: nbins = 100								      INTEGER, PARAMETER, PRIVATE:: nbins = 100
      INTEGER, PARAMETER, PRIVATE:: nbc = nbins								      INTEGER, PARAMETER, PRIVATE:: nbc = nbins
      INTEGER, PARAMETER, PRIVATE:: nbi = nbins								      INTEGER, PARAMETER, PRIVATE:: nbi = nbins
      INTEGER, PARAMETER, PRIVATE:: nbr = nbins								      INTEGER, PARAMETER, PRIVATE:: nbr = nbins
      INTEGER, PARAMETER, PRIVATE:: nbs = nbins								      INTEGER, PARAMETER, PRIVATE:: nbs = nbins
      INTEGER, PARAMETER, PRIVATE:: nbg = nbins								      INTEGER, PARAMETER, PRIVATE:: nbg = nbins
      INTEGER, PARAMETER, PRIVATE:: ntb_c = 37								      INTEGER, PARAMETER, PRIVATE:: ntb_c = 37
      INTEGER, PARAMETER, PRIVATE:: ntb_i = 64								      INTEGER, PARAMETER, PRIVATE:: ntb_i = 64
      INTEGER, PARAMETER, PRIVATE:: ntb_r = 37								      INTEGER, PARAMETER, PRIVATE:: ntb_r = 37
      INTEGER, PARAMETER, PRIVATE:: ntb_s = 28								      INTEGER, PARAMETER, PRIVATE:: ntb_s = 28
      INTEGER, PARAMETER, PRIVATE:: ntb_g = 28								      INTEGER, PARAMETER, PRIVATE:: ntb_g = 28
      INTEGER, PARAMETER, PRIVATE:: ntb_g1 = 28								      INTEGER, PARAMETER, PRIVATE:: ntb_g1 = 28
      INTEGER, PARAMETER, PRIVATE:: ntb_r1 = 37								      INTEGER, PARAMETER, PRIVATE:: ntb_r1 = 37
      INTEGER, PARAMETER, PRIVATE:: ntb_i1 = 55								      INTEGER, PARAMETER, PRIVATE:: ntb_i1 = 55
      INTEGER, PARAMETER, PRIVATE:: ntb_t = 9								      INTEGER, PARAMETER, PRIVATE:: ntb_t = 9
      INTEGER, PRIVATE:: nic1, nic2, nii2, nii3, nir2, nir3, nis2, nig2, nig3				      INTEGER, PRIVATE:: nic1, nic2, nii2, nii3, nir2, nir3, nis2, nig2, nig3
      INTEGER, PARAMETER, PRIVATE:: ntb_arc = 7								      INTEGER, PARAMETER, PRIVATE:: ntb_arc = 7
      INTEGER, PARAMETER, PRIVATE:: ntb_arw = 9								      INTEGER, PARAMETER, PRIVATE:: ntb_arw = 9
      INTEGER, PARAMETER, PRIVATE:: ntb_art = 7								      INTEGER, PARAMETER, PRIVATE:: ntb_art = 7
      INTEGER, PARAMETER, PRIVATE:: ntb_arr = 5								      INTEGER, PARAMETER, PRIVATE:: ntb_arr = 5
      INTEGER, PARAMETER, PRIVATE:: ntb_ark = 4								      INTEGER, PARAMETER, PRIVATE:: ntb_ark = 4
      INTEGER, PARAMETER, PRIVATE:: ntb_IN = 55								      INTEGER, PARAMETER, PRIVATE:: ntb_IN = 55
      INTEGER, PRIVATE:: niIN2										      INTEGER, PRIVATE:: niIN2

      DOUBLE PRECISION, DIMENSION(nbins+1):: xDx							      DOUBLE PRECISION, DIMENSION(nbins+1):: xDx
      DOUBLE PRECISION, DIMENSION(nbc):: Dc, dtc							      DOUBLE PRECISION, DIMENSION(nbc):: Dc, dtc
      DOUBLE PRECISION, DIMENSION(nbi):: Di, dti							      DOUBLE PRECISION, DIMENSION(nbi):: Di, dti
      DOUBLE PRECISION, DIMENSION(nbr):: Dr, dtr							      DOUBLE PRECISION, DIMENSION(nbr):: Dr, dtr
      DOUBLE PRECISION, DIMENSION(nbs):: Ds, dts							      DOUBLE PRECISION, DIMENSION(nbs):: Ds, dts
      DOUBLE PRECISION, DIMENSION(nbg):: Dg, dtg							      DOUBLE PRECISION, DIMENSION(nbg):: Dg, dtg
      DOUBLE PRECISION, DIMENSION(nbc):: t_Nc								      DOUBLE PRECISION, DIMENSION(nbc):: t_Nc

!..Lookup tables for cloud water content (kg/m**3).							!..Lookup tables for cloud water content (kg/m**3).
      REAL, DIMENSION(ntb_c), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_c), PARAMETER, PRIVATE:: &
      r_c = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &					      r_c = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &
              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &					              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &					              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &					              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
              1.e-2/)											              1.e-2/)

!..Lookup tables for cloud ice content (kg/m**3).							!..Lookup tables for cloud ice content (kg/m**3).
      REAL, DIMENSION(ntb_i), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_i), PARAMETER, PRIVATE:: &
      r_i = (/1.e-10,2.e-10,3.e-10,4.e-10, &								      r_i = (/1.e-10,2.e-10,3.e-10,4.e-10, &
              5.e-10,6.e-10,7.e-10,8.e-10,9.e-10, &							              5.e-10,6.e-10,7.e-10,8.e-10,9.e-10, &
              1.e-9,2.e-9,3.e-9,4.e-9,5.e-9,6.e-9,7.e-9,8.e-9,9.e-9, &					              1.e-9,2.e-9,3.e-9,4.e-9,5.e-9,6.e-9,7.e-9,8.e-9,9.e-9, &
              1.e-8,2.e-8,3.e-8,4.e-8,5.e-8,6.e-8,7.e-8,8.e-8,9.e-8, &					              1.e-8,2.e-8,3.e-8,4.e-8,5.e-8,6.e-8,7.e-8,8.e-8,9.e-8, &
              1.e-7,2.e-7,3.e-7,4.e-7,5.e-7,6.e-7,7.e-7,8.e-7,9.e-7, &					              1.e-7,2.e-7,3.e-7,4.e-7,5.e-7,6.e-7,7.e-7,8.e-7,9.e-7, &
              1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &					              1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &
              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &					              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &					              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
              1.e-3/)											              1.e-3/)

!..Lookup tables for rain content (kg/m**3).								!..Lookup tables for rain content (kg/m**3).
      REAL, DIMENSION(ntb_r), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_r), PARAMETER, PRIVATE:: &
      r_r = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &					      r_r = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &
              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &					              1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &					              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &					              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
              1.e-2/)											              1.e-2/)

!..Lookup tables for graupel content (kg/m**3).								!..Lookup tables for graupel content (kg/m**3).
      REAL, DIMENSION(ntb_g), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_g), PARAMETER, PRIVATE:: &
      r_g = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &					      r_g = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &					              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &					              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
              1.e-2/)											              1.e-2/)

!..Lookup tables for snow content (kg/m**3).								!..Lookup tables for snow content (kg/m**3).
      REAL, DIMENSION(ntb_s), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_s), PARAMETER, PRIVATE:: &
      r_s = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &					      r_s = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &					              1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &					              1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
              1.e-2/)											              1.e-2/)

!..Lookup tables for rain y-intercept parameter (/m**4).						!..Lookup tables for rain y-intercept parameter (/m**4).
      REAL, DIMENSION(ntb_r1), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_r1), PARAMETER, PRIVATE:: &
      N0r_exp = (/1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, &					      N0r_exp = (/1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, &
                  1.e7,2.e7,3.e7,4.e7,5.e7,6.e7,7.e7,8.e7,9.e7, &					                  1.e7,2.e7,3.e7,4.e7,5.e7,6.e7,7.e7,8.e7,9.e7, &
                  1.e8,2.e8,3.e8,4.e8,5.e8,6.e8,7.e8,8.e8,9.e8, &					                  1.e8,2.e8,3.e8,4.e8,5.e8,6.e8,7.e8,8.e8,9.e8, &
                  1.e9,2.e9,3.e9,4.e9,5.e9,6.e9,7.e9,8.e9,9.e9, &					                  1.e9,2.e9,3.e9,4.e9,5.e9,6.e9,7.e9,8.e9,9.e9, &
                  1.e10/)										                  1.e10/)

!..Lookup tables for graupel y-intercept parameter (/m**4).						!..Lookup tables for graupel y-intercept parameter (/m**4).
      REAL, DIMENSION(ntb_g1), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_g1), PARAMETER, PRIVATE:: &
      N0g_exp = (/1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &					      N0g_exp = (/1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &
                  1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &					                  1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &
                  1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, &					                  1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, &
                  1.e7/)										                  1.e7/)

!..Lookup tables for ice number concentration (/m**3).							!..Lookup tables for ice number concentration (/m**3).
      REAL, DIMENSION(ntb_i1), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_i1), PARAMETER, PRIVATE:: &
      Nt_i = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, &							      Nt_i = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, &
               1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, &						               1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, &
               1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, &						               1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, &
               1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, &						               1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, &
               1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &						               1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &
               1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &						               1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &
               1.e6/)											               1.e6/)

!..Aerosol table parameter: Number of available aerosols, vertical					!..Aerosol table parameter: Number of available aerosols, vertical
!.. velocity, temperature, aerosol mean radius, and hygroscopicity.					!.. velocity, temperature, aerosol mean radius, and hygroscopicity.
      REAL, DIMENSION(ntb_arc), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_arc), PARAMETER, PRIVATE:: &
      ta_Na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/)					      ta_Na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/)
      REAL, DIMENSION(ntb_arw), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_arw), PARAMETER, PRIVATE:: &
      ta_Ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/)				      ta_Ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/)
      REAL, DIMENSION(ntb_art), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_art), PARAMETER, PRIVATE:: &
      ta_Tk = (/243.15, 253.15, 263.15, 273.15, 283.15, 293.15, 303.15/)				      ta_Tk = (/243.15, 253.15, 263.15, 273.15, 283.15, 293.15, 303.15/)
      REAL, DIMENSION(ntb_arr), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_arr), PARAMETER, PRIVATE:: &
      ta_Ra = (/0.01, 0.02, 0.04, 0.08, 0.16/)								      ta_Ra = (/0.01, 0.02, 0.04, 0.08, 0.16/)
      REAL, DIMENSION(ntb_ark), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_ark), PARAMETER, PRIVATE:: &
      ta_Ka = (/0.2, 0.4, 0.6, 0.8/)									      ta_Ka = (/0.2, 0.4, 0.6, 0.8/)

!..Lookup tables for IN concentration (/m**3) from 0.001 to 1000/Liter.					!..Lookup tables for IN concentration (/m**3) from 0.001 to 1000/Liter.
      REAL, DIMENSION(ntb_IN), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_IN), PARAMETER, PRIVATE:: &
      Nt_IN = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, &							      Nt_IN = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, &
               1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, &						               1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, &
               1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, &						               1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, &
               1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, &						               1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, &
               1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &						               1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &
               1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &						               1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &
               1.e6/)											               1.e6/)

!..For snow moments conversions (from Field et al. 2005)						!..For snow moments conversions (from Field et al. 2005)
      REAL, DIMENSION(10), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(10), PARAMETER, PRIVATE:: &
      sa = (/ 5.065339, -0.062659, -3.032362, 0.029469, -0.000285, &					      sa = (/ 5.065339, -0.062659, -3.032362, 0.029469, -0.000285, &
              0.31255,   0.000204,  0.003199, 0.0,      -0.015952/)					              0.31255,   0.000204,  0.003199, 0.0,      -0.015952/)
      REAL, DIMENSION(10), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(10), PARAMETER, PRIVATE:: &
      sb = (/ 0.476221, -0.015896,  0.165977, 0.007468, -0.000141, &					      sb = (/ 0.476221, -0.015896,  0.165977, 0.007468, -0.000141, &
              0.060366,  0.000079,  0.000594, 0.0,      -0.003577/)					              0.060366,  0.000079,  0.000594, 0.0,      -0.003577/)

!..Temperatures (5 C interval 0 to -40) used in lookup tables.						!..Temperatures (5 C interval 0 to -40) used in lookup tables.
      REAL, DIMENSION(ntb_t), PARAMETER, PRIVATE:: &							      REAL, DIMENSION(ntb_t), PARAMETER, PRIVATE:: &
      Tc = (/-0.01, -5., -10., -15., -20., -25., -30., -35., -40./)					      Tc = (/-0.01, -5., -10., -15., -20., -25., -30., -35., -40./)

!..Lookup tables for various accretion/collection terms.						!..Lookup tables for various accretion/collection terms.
!.. ntb_x refers to the number of elements for rain, snow, graupel,					!.. ntb_x refers to the number of elements for rain, snow, graupel,
!.. and temperature array indices.  Variables beginning with t-p/c/m/n					!.. and temperature array indices.  Variables beginning with t-p/c/m/n
!.. represent lookup tables.  Save compile-time memory by making					!.. represent lookup tables.  Save compile-time memory by making
!.. allocatable (2009Jun12, J. Michalakes).								!.. allocatable (2009Jun12, J. Michalakes).
      INTEGER, PARAMETER, PRIVATE:: R8SIZE = 8								      INTEGER, PARAMETER, PRIVATE:: R8SIZE = 8
      INTEGER, PARAMETER, PRIVATE:: R4SIZE = 4								      INTEGER, PARAMETER, PRIVATE:: R4SIZE = 4
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &
                tcg_racg, tmr_racg, tcr_gacr, tmg_gacr,                 &				                tcg_racg, tmr_racg, tcr_gacr, tmg_gacr,                 &
                tnr_racg, tnr_gacr									                tnr_racg, tnr_gacr
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &
                tcs_racs1, tmr_racs1, tcs_racs2, tmr_racs2,             &				                tcs_racs1, tmr_racs1, tcs_racs2, tmr_racs2,             &
                tcr_sacr1, tms_sacr1, tcr_sacr2, tms_sacr2,             &				                tcr_sacr1, tms_sacr1, tcr_sacr2, tms_sacr2,             &
                tnr_racs1, tnr_racs2, tnr_sacr1, tnr_sacr2						                tnr_racs1, tnr_racs2, tnr_sacr1, tnr_sacr2
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &
                tpi_qcfz, tni_qcfz									                tpi_qcfz, tni_qcfz
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:)::             &
                tpi_qrfz, tpg_qrfz, tni_qrfz, tnr_qrfz							                tpi_qrfz, tpg_qrfz, tni_qrfz, tnr_qrfz
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:)::                 &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:)::                 &
                tps_iaus, tni_iaus, tpi_ide								                tps_iaus, tni_iaus, tpi_ide
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:):: t_Efrw						      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:):: t_Efrw
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:):: t_Efsw						      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:):: t_Efsw
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:):: tnr_rev					      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:):: tnr_rev
      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:)::               &				      REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:)::               &
                tpc_wev, tnc_wev									                tpc_wev, tnc_wev
      REAL (KIND=R4SIZE), ALLOCATABLE, DIMENSION(:,:,:,:,:):: tnccn_act					      REAL (KIND=R4SIZE), ALLOCATABLE, DIMENSION(:,:,:,:,:):: tnccn_act

!..Variables holding a bunch of exponents and gamma values (cloud water,				!..Variables holding a bunch of exponents and gamma values (cloud water,
!.. cloud ice, rain, snow, then graupel).								!.. cloud ice, rain, snow, then graupel).
      REAL, DIMENSION(5,15), PRIVATE:: cce, ccg								      REAL, DIMENSION(5,15), PRIVATE:: cce, ccg
      REAL, DIMENSION(15), PRIVATE::  ocg1, ocg2							      REAL, DIMENSION(15), PRIVATE::  ocg1, ocg2
      REAL, DIMENSION(7), PRIVATE:: cie, cig								      REAL, DIMENSION(7), PRIVATE:: cie, cig
      REAL, PRIVATE:: oig1, oig2, obmi									      REAL, PRIVATE:: oig1, oig2, obmi
      REAL, DIMENSION(13), PRIVATE:: cre, crg								      REAL, DIMENSION(13), PRIVATE:: cre, crg
      REAL, PRIVATE:: ore1, org1, org2, org3, obmr							      REAL, PRIVATE:: ore1, org1, org2, org3, obmr
      REAL, DIMENSION(18), PRIVATE:: cse, csg								      REAL, DIMENSION(18), PRIVATE:: cse, csg
      REAL, PRIVATE:: oams, obms, ocms									      REAL, PRIVATE:: oams, obms, ocms
      REAL, DIMENSION(12), PRIVATE:: cge, cgg								      REAL, DIMENSION(12), PRIVATE:: cge, cgg
      REAL, PRIVATE:: oge1, ogg1, ogg2, ogg3, oamg, obmg, ocmg						      REAL, PRIVATE:: oge1, ogg1, ogg2, ogg3, oamg, obmg, ocmg

!..Declaration of precomputed constants in various rate eqns.						!..Declaration of precomputed constants in various rate eqns.
      REAL:: t1_qr_qc, t1_qr_qi, t2_qr_qi, t1_qg_qc, t1_qs_qc, t1_qs_qi					      REAL:: t1_qr_qc, t1_qr_qi, t2_qr_qi, t1_qg_qc, t1_qs_qc, t1_qs_qi
      REAL:: t1_qr_ev, t2_qr_ev										      REAL:: t1_qr_ev, t2_qr_ev
      REAL:: t1_qs_sd, t2_qs_sd, t1_qg_sd, t2_qg_sd							      REAL:: t1_qs_sd, t2_qs_sd, t1_qg_sd, t2_qg_sd
      REAL:: t1_qs_me, t2_qs_me, t1_qg_me, t2_qg_me							      REAL:: t1_qs_me, t2_qs_me, t1_qg_me, t2_qg_me

!+---+													!+---+
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..END DECLARATIONS											!..END DECLARATIONS
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!+---+													!+---+
!ctrlL													!ctrlL

      CONTAINS												      CONTAINS

      SUBROUTINE thompson_init(hgt, nwfa2d, nwfa, nifa, dx, dy,         &				      SUBROUTINE thompson_init(hgt, nwfa2d, nwfa, nifa, dx, dy,         &
                          is_start,                                     &				                          is_start,                                     &
                          ids, ide, jds, jde, kds, kde,                 &				                          ids, ide, jds, jde, kds, kde,                 &
                          ims, ime, jms, jme, kms, kme,                 &				                          ims, ime, jms, jme, kms, kme,                 &
                          its, ite, jts, jte, kts, kte)							                          its, ite, jts, jte, kts, kte)

      IMPLICIT NONE											      IMPLICIT NONE

      INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, &						      INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, &
                            ims,ime, jms,jme, kms,kme, &						                            ims,ime, jms,jme, kms,kme, &
                            its,ite, jts,jte, kts,kte							                            its,ite, jts,jte, kts,kte
      REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(IN):: hgt					      REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(IN):: hgt

!..OPTIONAL variables that control application of aerosol-aware scheme					!..OPTIONAL variables that control application of aerosol-aware scheme

      REAL, DIMENSION(ims:ime,kms:kme,jms:jme), OPTIONAL, INTENT(INOUT) :: nwfa, nifa			      REAL, DIMENSION(ims:ime,kms:kme,jms:jme), OPTIONAL, INTENT(INOUT) :: nwfa, nifa
      REAL, DIMENSION(ims:ime,jms:jme), OPTIONAL, INTENT(INOUT) :: nwfa2d				      REAL, DIMENSION(ims:ime,jms:jme), OPTIONAL, INTENT(INOUT) :: nwfa2d
      REAL, OPTIONAL, INTENT(IN) :: DX, DY								      REAL, OPTIONAL, INTENT(IN) :: DX, DY
      LOGICAL, OPTIONAL, INTENT(IN) :: is_start								      LOGICAL, OPTIONAL, INTENT(IN) :: is_start
      CHARACTER*256:: mp_debug										      CHARACTER*256:: mp_debug


      INTEGER:: i, j, k, l, m, n									      INTEGER:: i, j, k, l, m, n
      REAL:: h_01, niIN3, niCCN3, max_test								      REAL:: h_01, niIN3, niCCN3, max_test
      LOGICAL:: micro_init, has_CCN, has_IN								      LOGICAL:: micro_init, has_CCN, has_IN

      is_aerosol_aware = .FALSE.									      is_aerosol_aware = .FALSE.
      micro_init = .FALSE.										      micro_init = .FALSE.
      has_CCN    = .FALSE.										      has_CCN    = .FALSE.
      has_IN     = .FALSE.										      has_IN     = .FALSE.

      write(mp_debug,*) ' DEBUG  checking column of hgt ', its+1,jts+1					      write(mp_debug,*) ' DEBUG  checking column of hgt ', its+1,jts+1
      CALL wrf_debug(250, mp_debug)									      CALL wrf_debug(250, mp_debug)
      do k = kts, kte											      do k = kts, kte
         write(mp_debug,*) ' DEBUGT  k, hgt = ', k, hgt(its+1,k,jts+1)					         write(mp_debug,*) ' DEBUGT  k, hgt = ', k, hgt(its+1,k,jts+1)
         CALL wrf_debug(250, mp_debug)									         CALL wrf_debug(250, mp_debug)
      enddo												      enddo

      if (PRESENT(nwfa2d) .AND. PRESENT(nwfa) .AND. PRESENT(nifa)) is_aerosol_aware = .TRUE.		      if (PRESENT(nwfa2d) .AND. PRESENT(nwfa) .AND. PRESENT(nifa)) is_aerosol_aware = .TRUE.

      if (is_aerosol_aware) then									      if (is_aerosol_aware) then

!..Check for existing aerosol data, both CCN and IN aerosols.  If missing				!..Check for existing aerosol data, both CCN and IN aerosols.  If missing
!.. fill in just a basic vertical profile, somewhat boundary-layer following.				!.. fill in just a basic vertical profile, somewhat boundary-layer following.

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
      max_test = wrf_dm_max_real ( MAXVAL(nwfa(its:ite-1,:,jts:jte-1)) )				      max_test = wrf_dm_max_real ( MAXVAL(nwfa(its:ite-1,:,jts:jte-1)) )
#else													#else
      max_test = MAXVAL ( nwfa(its:ite-1,:,jts:jte-1) )							      max_test = MAXVAL ( nwfa(its:ite-1,:,jts:jte-1) )
#endif													#endif

      if (max_test .lt. eps) then									      if (max_test .lt. eps) then
         write(mp_debug,*) ' Apparently there are no initial CCN aerosols.'				         write(mp_debug,*) ' Apparently there are no initial CCN aerosols.'
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         write(mp_debug,*) '   checked column at point (i,j) = ', its,jts				         write(mp_debug,*) '   checked column at point (i,j) = ', its,jts
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         do j = jts, min(jde-1,jte)									         do j = jts, min(jde-1,jte)
         do i = its, min(ide-1,ite)									         do i = its, min(ide-1,ite)
            if (hgt(i,1,j).le.1000.0) then								            if (hgt(i,1,j).le.1000.0) then
               h_01 = 0.8										               h_01 = 0.8
            elseif (hgt(i,1,j).ge.2500.0) then								            elseif (hgt(i,1,j).ge.2500.0) then
               h_01 = 0.01										               h_01 = 0.01
            else											            else
               h_01 = 0.8*cos(hgt(i,1,j)*0.001 - 1.0)							               h_01 = 0.8*cos(hgt(i,1,j)*0.001 - 1.0)
            endif											            endif
            niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01							            niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01
            nwfa(i,1,j) = naCCN1+naCCN0*exp(-((hgt(i,2,j)-hgt(i,1,j))/1000.)*niCCN3)			            nwfa(i,1,j) = naCCN1+naCCN0*exp(-((hgt(i,2,j)-hgt(i,1,j))/1000.)*niCCN3)
            do k = 2, kte										            do k = 2, kte
               nwfa(i,k,j) = naCCN1+naCCN0*exp(-((hgt(i,k,j)-hgt(i,1,j))/1000.)*niCCN3)			               nwfa(i,k,j) = naCCN1+naCCN0*exp(-((hgt(i,k,j)-hgt(i,1,j))/1000.)*niCCN3)
            enddo											            enddo
         enddo												         enddo
         enddo												         enddo
      else												      else
         has_CCN    = .TRUE.										         has_CCN    = .TRUE.
         write(mp_debug,*) ' Apparently initial CCN aerosols are present.'				         write(mp_debug,*) ' Apparently initial CCN aerosols are present.'
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         write(mp_debug,*) '   column sum at point (i,j) = ', its,jts, SUM(nwfa(its,:,jts))		         write(mp_debug,*) '   column sum at point (i,j) = ', its,jts, SUM(nwfa(its,:,jts))
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
      endif												      endif


#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
      max_test = wrf_dm_max_real ( MAXVAL(nifa(its:ite-1,:,jts:jte-1)) )				      max_test = wrf_dm_max_real ( MAXVAL(nifa(its:ite-1,:,jts:jte-1)) )
#else													#else
      max_test = MAXVAL ( nifa(its:ite-1,:,jts:jte-1) )							      max_test = MAXVAL ( nifa(its:ite-1,:,jts:jte-1) )
#endif													#endif

      if (max_test .lt. eps) then									      if (max_test .lt. eps) then
         write(mp_debug,*) ' Apparently there are no initial IN aerosols.'				         write(mp_debug,*) ' Apparently there are no initial IN aerosols.'
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         write(mp_debug,*) '   checked column at point (i,j) = ', its,jts				         write(mp_debug,*) '   checked column at point (i,j) = ', its,jts
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         do j = jts, min(jde-1,jte)									         do j = jts, min(jde-1,jte)
         do i = its, min(ide-1,ite)									         do i = its, min(ide-1,ite)
            if (hgt(i,1,j).le.1000.0) then								            if (hgt(i,1,j).le.1000.0) then
               h_01 = 0.8										               h_01 = 0.8
            elseif (hgt(i,1,j).ge.2500.0) then								            elseif (hgt(i,1,j).ge.2500.0) then
               h_01 = 0.01										               h_01 = 0.01
            else											            else
               h_01 = 0.8*cos(hgt(i,1,j)*0.001 - 1.0)							               h_01 = 0.8*cos(hgt(i,1,j)*0.001 - 1.0)
            endif											            endif
            niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01								            niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01
            nifa(i,1,j) = naIN1+naIN0*exp(-((hgt(i,2,j)-hgt(i,1,j))/1000.)*niIN3)			            nifa(i,1,j) = naIN1+naIN0*exp(-((hgt(i,2,j)-hgt(i,1,j))/1000.)*niIN3)
            do k = 2, kte										            do k = 2, kte
               nifa(i,k,j) = naIN1+naIN0*exp(-((hgt(i,k,j)-hgt(i,1,j))/1000.)*niIN3)			               nifa(i,k,j) = naIN1+naIN0*exp(-((hgt(i,k,j)-hgt(i,1,j))/1000.)*niIN3)
            enddo											            enddo
         enddo												         enddo
         enddo												         enddo
      else												      else
         has_IN     = .TRUE.										         has_IN     = .TRUE.
         write(mp_debug,*) ' Apparently initial IN aerosols are present.'				         write(mp_debug,*) ' Apparently initial IN aerosols are present.'
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         write(mp_debug,*) '   column sum at point (i,j) = ', its,jts, SUM(nifa(its,:,jts))		         write(mp_debug,*) '   column sum at point (i,j) = ', its,jts, SUM(nifa(its,:,jts))
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
      endif												      endif

!..Capture initial state lowest level CCN aerosol data in 2D array.					!..Capture initial state lowest level CCN aerosol data in 2D array.

!     do j = jts, min(jde-1,jte)									!     do j = jts, min(jde-1,jte)
!     do i = its, min(ide-1,ite)									!     do i = its, min(ide-1,ite)
!        nwfa2d(i,j) = nwfa(i,kts,j)									!        nwfa2d(i,j) = nwfa(i,kts,j)
!     enddo												!     enddo
!     enddo												!     enddo

!..Scale the lowest level aerosol data into an emissions rate.  This is					!..Scale the lowest level aerosol data into an emissions rate.  This is
!.. very far from ideal, but need higher emissions where larger amount					!.. very far from ideal, but need higher emissions where larger amount
!.. of existing and lesser emissions where not already lots of aerosols					!.. of existing and lesser emissions where not already lots of aerosols
!.. for first-order simplistic approach.  Later, proper connection to					!.. for first-order simplistic approach.  Later, proper connection to
!.. emission inventory would be better, but, for now, scale like this:					!.. emission inventory would be better, but, for now, scale like this:
!.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second					!.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second
!..        Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second					!..        Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second
!..        Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second					!..        Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second
!.. for a grid with 20km spacing and scale accordingly for other spacings.				!.. for a grid with 20km spacing and scale accordingly for other spacings.

      if (is_start) then										      if (is_start) then
         if (SQRT(DX*DY)/20000.0 .ge. 1.0) then								         if (SQRT(DX*DY)/20000.0 .ge. 1.0) then
            h_01 = 0.875										            h_01 = 0.875
         else												         else
            h_01 = (0.875 + 0.125*((20000.-SQRT(DX*DY))/16000.)) * SQRT(DX*DY)/20000.			            h_01 = (0.875 + 0.125*((20000.-SQRT(DX*DY))/16000.)) * SQRT(DX*DY)/20000.
         endif												         endif
         write(mp_debug,*) '   aerosol surface flux emission scale factor is: ', h_01			         write(mp_debug,*) '   aerosol surface flux emission scale factor is: ', h_01
         CALL wrf_debug(100, mp_debug)									         CALL wrf_debug(100, mp_debug)
         do j = jts, min(jde-1,jte)									         do j = jts, min(jde-1,jte)
         do i = its, min(ide-1,ite)									         do i = its, min(ide-1,ite)
            nwfa2d(i,j) = 10.0**(LOG10(nwfa(i,kts,j)*1.E-6)-3.69897)					            nwfa2d(i,j) = 10.0**(LOG10(nwfa(i,kts,j)*1.E-6)-3.69897)
            nwfa2d(i,j) = nwfa2d(i,j)*h_01 * 1.E6							            nwfa2d(i,j) = nwfa2d(i,j)*h_01 * 1.E6
         enddo												         enddo
         enddo												         enddo
!     else												!     else
!        write(mp_debug,*) '   sample (lower-left) aerosol surface flux emission rate: ', nwfa2d	!        write(mp_debug,*) '   sample (lower-left) aerosol surface flux emission rate: ', nwfa2d
!        CALL wrf_debug(100, mp_debug)									!        CALL wrf_debug(100, mp_debug)
      endif												      endif

      endif												      endif


!..Allocate space for lookup tables (J. Michalakes 2009Jun08).						!..Allocate space for lookup tables (J. Michalakes 2009Jun08).

      if (.NOT. ALLOCATED(tcg_racg) ) then								      if (.NOT. ALLOCATED(tcg_racg) ) then
         ALLOCATE(tcg_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))							         ALLOCATE(tcg_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))
         micro_init = .TRUE.										         micro_init = .TRUE.
      endif												      endif

      if (.NOT. ALLOCATED(tmr_racg)) ALLOCATE(tmr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tmr_racg)) ALLOCATE(tmr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tcr_gacr)) ALLOCATE(tcr_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tcr_gacr)) ALLOCATE(tcr_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tmg_gacr)) ALLOCATE(tmg_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tmg_gacr)) ALLOCATE(tmg_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_racg)) ALLOCATE(tnr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_racg)) ALLOCATE(tnr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_gacr)) ALLOCATE(tnr_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_gacr)) ALLOCATE(tnr_gacr(ntb_g1,ntb_g,ntb_r1,ntb_r))

      if (.NOT. ALLOCATED(tcs_racs1)) ALLOCATE(tcs_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tcs_racs1)) ALLOCATE(tcs_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tmr_racs1)) ALLOCATE(tmr_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tmr_racs1)) ALLOCATE(tmr_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tcs_racs2)) ALLOCATE(tcs_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tcs_racs2)) ALLOCATE(tcs_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tmr_racs2)) ALLOCATE(tmr_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tmr_racs2)) ALLOCATE(tmr_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tcr_sacr1)) ALLOCATE(tcr_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tcr_sacr1)) ALLOCATE(tcr_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tms_sacr1)) ALLOCATE(tms_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tms_sacr1)) ALLOCATE(tms_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tcr_sacr2)) ALLOCATE(tcr_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tcr_sacr2)) ALLOCATE(tcr_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tms_sacr2)) ALLOCATE(tms_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tms_sacr2)) ALLOCATE(tms_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_racs1)) ALLOCATE(tnr_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_racs1)) ALLOCATE(tnr_racs1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_racs2)) ALLOCATE(tnr_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_racs2)) ALLOCATE(tnr_racs2(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_sacr1)) ALLOCATE(tnr_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_sacr1)) ALLOCATE(tnr_sacr1(ntb_s,ntb_t,ntb_r1,ntb_r))
      if (.NOT. ALLOCATED(tnr_sacr2)) ALLOCATE(tnr_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))			      if (.NOT. ALLOCATED(tnr_sacr2)) ALLOCATE(tnr_sacr2(ntb_s,ntb_t,ntb_r1,ntb_r))

      if (.NOT. ALLOCATED(tpi_qcfz)) ALLOCATE(tpi_qcfz(ntb_c,nbc,45,ntb_IN))				      if (.NOT. ALLOCATED(tpi_qcfz)) ALLOCATE(tpi_qcfz(ntb_c,nbc,45,ntb_IN))
      if (.NOT. ALLOCATED(tni_qcfz)) ALLOCATE(tni_qcfz(ntb_c,nbc,45,ntb_IN))				      if (.NOT. ALLOCATED(tni_qcfz)) ALLOCATE(tni_qcfz(ntb_c,nbc,45,ntb_IN))

      if (.NOT. ALLOCATED(tpi_qrfz)) ALLOCATE(tpi_qrfz(ntb_r,ntb_r1,45,ntb_IN))				      if (.NOT. ALLOCATED(tpi_qrfz)) ALLOCATE(tpi_qrfz(ntb_r,ntb_r1,45,ntb_IN))
      if (.NOT. ALLOCATED(tpg_qrfz)) ALLOCATE(tpg_qrfz(ntb_r,ntb_r1,45,ntb_IN))				      if (.NOT. ALLOCATED(tpg_qrfz)) ALLOCATE(tpg_qrfz(ntb_r,ntb_r1,45,ntb_IN))
      if (.NOT. ALLOCATED(tni_qrfz)) ALLOCATE(tni_qrfz(ntb_r,ntb_r1,45,ntb_IN))				      if (.NOT. ALLOCATED(tni_qrfz)) ALLOCATE(tni_qrfz(ntb_r,ntb_r1,45,ntb_IN))
      if (.NOT. ALLOCATED(tnr_qrfz)) ALLOCATE(tnr_qrfz(ntb_r,ntb_r1,45,ntb_IN))				      if (.NOT. ALLOCATED(tnr_qrfz)) ALLOCATE(tnr_qrfz(ntb_r,ntb_r1,45,ntb_IN))

      if (.NOT. ALLOCATED(tps_iaus)) ALLOCATE(tps_iaus(ntb_i,ntb_i1))					      if (.NOT. ALLOCATED(tps_iaus)) ALLOCATE(tps_iaus(ntb_i,ntb_i1))
      if (.NOT. ALLOCATED(tni_iaus)) ALLOCATE(tni_iaus(ntb_i,ntb_i1))					      if (.NOT. ALLOCATED(tni_iaus)) ALLOCATE(tni_iaus(ntb_i,ntb_i1))
      if (.NOT. ALLOCATED(tpi_ide)) ALLOCATE(tpi_ide(ntb_i,ntb_i1))					      if (.NOT. ALLOCATED(tpi_ide)) ALLOCATE(tpi_ide(ntb_i,ntb_i1))

      if (.NOT. ALLOCATED(t_Efrw)) ALLOCATE(t_Efrw(nbr,nbc))						      if (.NOT. ALLOCATED(t_Efrw)) ALLOCATE(t_Efrw(nbr,nbc))
      if (.NOT. ALLOCATED(t_Efsw)) ALLOCATE(t_Efsw(nbs,nbc))						      if (.NOT. ALLOCATED(t_Efsw)) ALLOCATE(t_Efsw(nbs,nbc))

      if (.NOT. ALLOCATED(tnr_rev)) ALLOCATE(tnr_rev(nbr, ntb_r1, ntb_r))				      if (.NOT. ALLOCATED(tnr_rev)) ALLOCATE(tnr_rev(nbr, ntb_r1, ntb_r))
      if (.NOT. ALLOCATED(tpc_wev)) ALLOCATE(tpc_wev(nbc,ntb_c,nbc))					      if (.NOT. ALLOCATED(tpc_wev)) ALLOCATE(tpc_wev(nbc,ntb_c,nbc))
      if (.NOT. ALLOCATED(tnc_wev)) ALLOCATE(tnc_wev(nbc,ntb_c,nbc))					      if (.NOT. ALLOCATED(tnc_wev)) ALLOCATE(tnc_wev(nbc,ntb_c,nbc))

      if (.NOT. ALLOCATED(tnccn_act))                                   &				      if (.NOT. ALLOCATED(tnccn_act))                                   &
            ALLOCATE(tnccn_act(ntb_arc,ntb_arw,ntb_art,ntb_arr,ntb_ark))				            ALLOCATE(tnccn_act(ntb_arc,ntb_arw,ntb_art,ntb_arr,ntb_ark))

      if (micro_init) then										      if (micro_init) then

!..From Martin et al. (1994), assign gamma shape parameter mu for cloud					!..From Martin et al. (1994), assign gamma shape parameter mu for cloud
!.. drops according to general dispersion characteristics (disp=~0.25					!.. drops according to general dispersion characteristics (disp=~0.25
!.. for Maritime and 0.45 for Continental).								!.. for Maritime and 0.45 for Continental).
!.. disp=SQRT((mu+2)/(mu+1) - 1) so mu varies from 15 for Maritime					!.. disp=SQRT((mu+2)/(mu+1) - 1) so mu varies from 15 for Maritime
!.. to 2 for really dirty air.  This not used in 2-moment cloud water					!.. to 2 for really dirty air.  This not used in 2-moment cloud water
!.. scheme and nu_c used instead and varies from 2 to 15 (integer-only).				!.. scheme and nu_c used instead and varies from 2 to 15 (integer-only).
      mu_c = MIN(15., (1000.E6/Nt_c + 2.))								      mu_c = MIN(15., (1000.E6/Nt_c + 2.))

!..Schmidt number to one-third used numerous times.							!..Schmidt number to one-third used numerous times.
      Sc3 = Sc**(1./3.)											      Sc3 = Sc**(1./3.)

!..Compute min ice diam from mass, min snow/graupel mass from diam.					!..Compute min ice diam from mass, min snow/graupel mass from diam.
      D0i = (xm0i/am_i)**(1./bm_i)									      D0i = (xm0i/am_i)**(1./bm_i)
      xm0s = am_s * D0s**bm_s										      xm0s = am_s * D0s**bm_s
      xm0g = am_g * D0g**bm_g										      xm0g = am_g * D0g**bm_g

!..These constants various exponents and gamma() assoc with cloud,					!..These constants various exponents and gamma() assoc with cloud,
!.. rain, snow, and graupel.										!.. rain, snow, and graupel.
      do n = 1, 15											      do n = 1, 15
         cce(1,n) = n + 1.										         cce(1,n) = n + 1.
         cce(2,n) = bm_r + n + 1.									         cce(2,n) = bm_r + n + 1.
         cce(3,n) = bm_r + n + 4.									         cce(3,n) = bm_r + n + 4.
         cce(4,n) = n + bv_c + 1.									         cce(4,n) = n + bv_c + 1.
         cce(5,n) = bm_r + n + bv_c + 1.								         cce(5,n) = bm_r + n + bv_c + 1.
         ccg(1,n) = WGAMMA(cce(1,n))									         ccg(1,n) = WGAMMA(cce(1,n))
         ccg(2,n) = WGAMMA(cce(2,n))									         ccg(2,n) = WGAMMA(cce(2,n))
         ccg(3,n) = WGAMMA(cce(3,n))									         ccg(3,n) = WGAMMA(cce(3,n))
         ccg(4,n) = WGAMMA(cce(4,n))									         ccg(4,n) = WGAMMA(cce(4,n))
         ccg(5,n) = WGAMMA(cce(5,n))									         ccg(5,n) = WGAMMA(cce(5,n))
         ocg1(n) = 1./ccg(1,n)										         ocg1(n) = 1./ccg(1,n)
         ocg2(n) = 1./ccg(2,n)										         ocg2(n) = 1./ccg(2,n)
      enddo												      enddo

      cie(1) = mu_i + 1.										      cie(1) = mu_i + 1.
      cie(2) = bm_i + mu_i + 1.										      cie(2) = bm_i + mu_i + 1.
      cie(3) = bm_i + mu_i + bv_i + 1.									      cie(3) = bm_i + mu_i + bv_i + 1.
      cie(4) = mu_i + bv_i + 1.										      cie(4) = mu_i + bv_i + 1.
      cie(5) = mu_i + 2.										      cie(5) = mu_i + 2.
      cie(6) = bm_i*0.5 + mu_i + bv_i + 1.								      cie(6) = bm_i*0.5 + mu_i + bv_i + 1.
      cie(7) = bm_i*0.5 + mu_i + 1.									      cie(7) = bm_i*0.5 + mu_i + 1.
      cig(1) = WGAMMA(cie(1))										      cig(1) = WGAMMA(cie(1))
      cig(2) = WGAMMA(cie(2))										      cig(2) = WGAMMA(cie(2))
      cig(3) = WGAMMA(cie(3))										      cig(3) = WGAMMA(cie(3))
      cig(4) = WGAMMA(cie(4))										      cig(4) = WGAMMA(cie(4))
      cig(5) = WGAMMA(cie(5))										      cig(5) = WGAMMA(cie(5))
      cig(6) = WGAMMA(cie(6))										      cig(6) = WGAMMA(cie(6))
      cig(7) = WGAMMA(cie(7))										      cig(7) = WGAMMA(cie(7))
      oig1 = 1./cig(1)											      oig1 = 1./cig(1)
      oig2 = 1./cig(2)											      oig2 = 1./cig(2)
      obmi = 1./bm_i											      obmi = 1./bm_i

      cre(1) = bm_r + 1.										      cre(1) = bm_r + 1.
      cre(2) = mu_r + 1.										      cre(2) = mu_r + 1.
      cre(3) = bm_r + mu_r + 1.										      cre(3) = bm_r + mu_r + 1.
      cre(4) = bm_r*2. + mu_r + 1.									      cre(4) = bm_r*2. + mu_r + 1.
      cre(5) = mu_r + bv_r + 1.										      cre(5) = mu_r + bv_r + 1.
      cre(6) = bm_r + mu_r + bv_r + 1.									      cre(6) = bm_r + mu_r + bv_r + 1.
      cre(7) = bm_r*0.5 + mu_r + bv_r + 1.								      cre(7) = bm_r*0.5 + mu_r + bv_r + 1.
      cre(8) = bm_r + mu_r + bv_r + 3.									      cre(8) = bm_r + mu_r + bv_r + 3.
      cre(9) = mu_r + bv_r + 3.										      cre(9) = mu_r + bv_r + 3.
      cre(10) = mu_r + 2.										      cre(10) = mu_r + 2.
      cre(11) = 0.5*(bv_r + 5. + 2.*mu_r)								      cre(11) = 0.5*(bv_r + 5. + 2.*mu_r)
      cre(12) = bm_r*0.5 + mu_r + 1.									      cre(12) = bm_r*0.5 + mu_r + 1.
      cre(13) = bm_r*2. + mu_r + bv_r + 1.								      cre(13) = bm_r*2. + mu_r + bv_r + 1.
      do n = 1, 13											      do n = 1, 13
         crg(n) = WGAMMA(cre(n))									         crg(n) = WGAMMA(cre(n))
      enddo												      enddo
      obmr = 1./bm_r											      obmr = 1./bm_r
      ore1 = 1./cre(1)											      ore1 = 1./cre(1)
      org1 = 1./crg(1)											      org1 = 1./crg(1)
      org2 = 1./crg(2)											      org2 = 1./crg(2)
      org3 = 1./crg(3)											      org3 = 1./crg(3)

      cse(1) = bm_s + 1.										      cse(1) = bm_s + 1.
      cse(2) = bm_s + 2.										      cse(2) = bm_s + 2.
      cse(3) = bm_s*2.											      cse(3) = bm_s*2.
      cse(4) = bm_s + bv_s + 1.										      cse(4) = bm_s + bv_s + 1.
      cse(5) = bm_s*2. + bv_s + 1.									      cse(5) = bm_s*2. + bv_s + 1.
      cse(6) = bm_s*2. + 1.										      cse(6) = bm_s*2. + 1.
      cse(7) = bm_s + mu_s + 1.										      cse(7) = bm_s + mu_s + 1.
      cse(8) = bm_s + mu_s + 2.										      cse(8) = bm_s + mu_s + 2.
      cse(9) = bm_s + mu_s + 3.										      cse(9) = bm_s + mu_s + 3.
      cse(10) = bm_s + mu_s + bv_s + 1.									      cse(10) = bm_s + mu_s + bv_s + 1.
      cse(11) = bm_s*2. + mu_s + bv_s + 1.								      cse(11) = bm_s*2. + mu_s + bv_s + 1.
      cse(12) = bm_s*2. + mu_s + 1.									      cse(12) = bm_s*2. + mu_s + 1.
      cse(13) = bv_s + 2.										      cse(13) = bv_s + 2.
      cse(14) = bm_s + bv_s										      cse(14) = bm_s + bv_s
      cse(15) = mu_s + 1.										      cse(15) = mu_s + 1.
      cse(16) = 1.0 + (1.0 + bv_s)/2.									      cse(16) = 1.0 + (1.0 + bv_s)/2.
      cse(17) = cse(16) + mu_s + 1.									      cse(17) = cse(16) + mu_s + 1.
      cse(18) = bv_s + mu_s + 3.									      cse(18) = bv_s + mu_s + 3.
      do n = 1, 18											      do n = 1, 18
         csg(n) = WGAMMA(cse(n))									         csg(n) = WGAMMA(cse(n))
      enddo												      enddo
      oams = 1./am_s											      oams = 1./am_s
      obms = 1./bm_s											      obms = 1./bm_s
      ocms = oams**obms											      ocms = oams**obms

      cge(1) = bm_g + 1.										      cge(1) = bm_g + 1.
      cge(2) = mu_g + 1.										      cge(2) = mu_g + 1.
      cge(3) = bm_g + mu_g + 1.										      cge(3) = bm_g + mu_g + 1.
      cge(4) = bm_g*2. + mu_g + 1.									      cge(4) = bm_g*2. + mu_g + 1.
      cge(5) = bm_g*2. + mu_g + bv_g + 1.								      cge(5) = bm_g*2. + mu_g + bv_g + 1.
      cge(6) = bm_g + mu_g + bv_g + 1.									      cge(6) = bm_g + mu_g + bv_g + 1.
      cge(7) = bm_g + mu_g + bv_g + 2.									      cge(7) = bm_g + mu_g + bv_g + 2.
      cge(8) = bm_g + mu_g + bv_g + 3.									      cge(8) = bm_g + mu_g + bv_g + 3.
      cge(9) = mu_g + bv_g + 3.										      cge(9) = mu_g + bv_g + 3.
      cge(10) = mu_g + 2.										      cge(10) = mu_g + 2.
      cge(11) = 0.5*(bv_g + 5. + 2.*mu_g)								      cge(11) = 0.5*(bv_g + 5. + 2.*mu_g)
      cge(12) = 0.5*(bv_g + 5.) + mu_g									      cge(12) = 0.5*(bv_g + 5.) + mu_g
      do n = 1, 12											      do n = 1, 12
         cgg(n) = WGAMMA(cge(n))									         cgg(n) = WGAMMA(cge(n))
      enddo												      enddo
      oamg = 1./am_g											      oamg = 1./am_g
      obmg = 1./bm_g											      obmg = 1./bm_g
      ocmg = oamg**obmg											      ocmg = oamg**obmg
      oge1 = 1./cge(1)											      oge1 = 1./cge(1)
      ogg1 = 1./cgg(1)											      ogg1 = 1./cgg(1)
      ogg2 = 1./cgg(2)											      ogg2 = 1./cgg(2)
      ogg3 = 1./cgg(3)											      ogg3 = 1./cgg(3)

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Simplify various rate eqns the best we can now.							!..Simplify various rate eqns the best we can now.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

!..Rain collecting cloud water and cloud ice								!..Rain collecting cloud water and cloud ice
      t1_qr_qc = PI*.25*av_r * crg(9)									      t1_qr_qc = PI*.25*av_r * crg(9)
      t1_qr_qi = PI*.25*av_r * crg(9)									      t1_qr_qi = PI*.25*av_r * crg(9)
      t2_qr_qi = PI*.25*am_r*av_r * crg(8)								      t2_qr_qi = PI*.25*am_r*av_r * crg(8)

!..Graupel collecting cloud water									!..Graupel collecting cloud water
      t1_qg_qc = PI*.25*av_g * cgg(9)									      t1_qg_qc = PI*.25*av_g * cgg(9)

!..Snow collecting cloud water										!..Snow collecting cloud water
      t1_qs_qc = PI*.25*av_s										      t1_qs_qc = PI*.25*av_s

!..Snow collecting cloud ice										!..Snow collecting cloud ice
      t1_qs_qi = PI*.25*av_s										      t1_qs_qi = PI*.25*av_s

!..Evaporation of rain; ignore depositional growth of rain.						!..Evaporation of rain; ignore depositional growth of rain.
      t1_qr_ev = 0.78 * crg(10)										      t1_qr_ev = 0.78 * crg(10)
      t2_qr_ev = 0.308*Sc3*SQRT(av_r) * crg(11)								      t2_qr_ev = 0.308*Sc3*SQRT(av_r) * crg(11)

!..Sublimation/depositional growth of snow								!..Sublimation/depositional growth of snow
      t1_qs_sd = 0.86											      t1_qs_sd = 0.86
      t2_qs_sd = 0.28*Sc3*SQRT(av_s)									      t2_qs_sd = 0.28*Sc3*SQRT(av_s)

!..Melting of snow											!..Melting of snow
      t1_qs_me = PI*4.*C_sqrd*olfus * 0.86								      t1_qs_me = PI*4.*C_sqrd*olfus * 0.86
      t2_qs_me = PI*4.*C_sqrd*olfus * 0.28*Sc3*SQRT(av_s)						      t2_qs_me = PI*4.*C_sqrd*olfus * 0.28*Sc3*SQRT(av_s)

!..Sublimation/depositional growth of graupel								!..Sublimation/depositional growth of graupel
      t1_qg_sd = 0.86 * cgg(10)										      t1_qg_sd = 0.86 * cgg(10)
      t2_qg_sd = 0.28*Sc3*SQRT(av_g) * cgg(11)								      t2_qg_sd = 0.28*Sc3*SQRT(av_g) * cgg(11)

!..Melting of graupel											!..Melting of graupel
      t1_qg_me = PI*4.*C_cube*olfus * 0.86 * cgg(10)							      t1_qg_me = PI*4.*C_cube*olfus * 0.86 * cgg(10)
      t2_qg_me = PI*4.*C_cube*olfus * 0.28*Sc3*SQRT(av_g) * cgg(11)					      t2_qg_me = PI*4.*C_cube*olfus * 0.28*Sc3*SQRT(av_g) * cgg(11)

!..Constants for helping find lookup table indexes.							!..Constants for helping find lookup table indexes.
      nic2 = NINT(ALOG10(r_c(1)))									      nic2 = NINT(ALOG10(r_c(1)))
      nii2 = NINT(ALOG10(r_i(1)))									      nii2 = NINT(ALOG10(r_i(1)))
      nii3 = NINT(ALOG10(Nt_i(1)))									      nii3 = NINT(ALOG10(Nt_i(1)))
      nir2 = NINT(ALOG10(r_r(1)))									      nir2 = NINT(ALOG10(r_r(1)))
      nir3 = NINT(ALOG10(N0r_exp(1)))									      nir3 = NINT(ALOG10(N0r_exp(1)))
      nis2 = NINT(ALOG10(r_s(1)))									      nis2 = NINT(ALOG10(r_s(1)))
      nig2 = NINT(ALOG10(r_g(1)))									      nig2 = NINT(ALOG10(r_g(1)))
      nig3 = NINT(ALOG10(N0g_exp(1)))									      nig3 = NINT(ALOG10(N0g_exp(1)))
      niIN2 = NINT(ALOG10(Nt_IN(1)))									      niIN2 = NINT(ALOG10(Nt_IN(1)))

!..Create bins of cloud water (from min diameter up to 100 microns).					!..Create bins of cloud water (from min diameter up to 100 microns).
      Dc(1) = D0c*1.0d0											      Dc(1) = D0c*1.0d0
      dtc(1) = D0c*1.0d0										      dtc(1) = D0c*1.0d0
      do n = 2, nbc											      do n = 2, nbc
         Dc(n) = Dc(n-1) + 1.0D-6									         Dc(n) = Dc(n-1) + 1.0D-6
         dtc(n) = (Dc(n) - Dc(n-1))									         dtc(n) = (Dc(n) - Dc(n-1))
      enddo												      enddo

!..Create bins of cloud ice (from min diameter up to 5x min snow size).					!..Create bins of cloud ice (from min diameter up to 5x min snow size).
      xDx(1) = D0i*1.0d0										      xDx(1) = D0i*1.0d0
      xDx(nbi+1) = 5.0d0*D0s										      xDx(nbi+1) = 5.0d0*D0s
      do n = 2, nbi											      do n = 2, nbi
         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbi) &							         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbi) &
                  *DLOG(xDx(nbi+1)/xDx(1)) +DLOG(xDx(1)))						                  *DLOG(xDx(nbi+1)/xDx(1)) +DLOG(xDx(1)))
      enddo												      enddo
      do n = 1, nbi											      do n = 1, nbi
         Di(n) = DSQRT(xDx(n)*xDx(n+1))									         Di(n) = DSQRT(xDx(n)*xDx(n+1))
         dti(n) = xDx(n+1) - xDx(n)									         dti(n) = xDx(n+1) - xDx(n)
      enddo												      enddo

!..Create bins of rain (from min diameter up to 5 mm).							!..Create bins of rain (from min diameter up to 5 mm).
      xDx(1) = D0r*1.0d0										      xDx(1) = D0r*1.0d0
      xDx(nbr+1) = 0.005d0										      xDx(nbr+1) = 0.005d0
      do n = 2, nbr											      do n = 2, nbr
         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbr) &							         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbr) &
                  *DLOG(xDx(nbr+1)/xDx(1)) +DLOG(xDx(1)))						                  *DLOG(xDx(nbr+1)/xDx(1)) +DLOG(xDx(1)))
      enddo												      enddo
      do n = 1, nbr											      do n = 1, nbr
         Dr(n) = DSQRT(xDx(n)*xDx(n+1))									         Dr(n) = DSQRT(xDx(n)*xDx(n+1))
         dtr(n) = xDx(n+1) - xDx(n)									         dtr(n) = xDx(n+1) - xDx(n)
      enddo												      enddo

!..Create bins of snow (from min diameter up to 2 cm).							!..Create bins of snow (from min diameter up to 2 cm).
      xDx(1) = D0s*1.0d0										      xDx(1) = D0s*1.0d0
      xDx(nbs+1) = 0.02d0										      xDx(nbs+1) = 0.02d0
      do n = 2, nbs											      do n = 2, nbs
         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbs) &							         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbs) &
                  *DLOG(xDx(nbs+1)/xDx(1)) +DLOG(xDx(1)))						                  *DLOG(xDx(nbs+1)/xDx(1)) +DLOG(xDx(1)))
      enddo												      enddo
      do n = 1, nbs											      do n = 1, nbs
         Ds(n) = DSQRT(xDx(n)*xDx(n+1))									         Ds(n) = DSQRT(xDx(n)*xDx(n+1))
         dts(n) = xDx(n+1) - xDx(n)									         dts(n) = xDx(n+1) - xDx(n)
      enddo												      enddo

!..Create bins of graupel (from min diameter up to 5 cm).						!..Create bins of graupel (from min diameter up to 5 cm).
      xDx(1) = D0g*1.0d0										      xDx(1) = D0g*1.0d0
      xDx(nbg+1) = 0.05d0										      xDx(nbg+1) = 0.05d0
      do n = 2, nbg											      do n = 2, nbg
         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbg) &							         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbg) &
                  *DLOG(xDx(nbg+1)/xDx(1)) +DLOG(xDx(1)))						                  *DLOG(xDx(nbg+1)/xDx(1)) +DLOG(xDx(1)))
      enddo												      enddo
      do n = 1, nbg											      do n = 1, nbg
         Dg(n) = DSQRT(xDx(n)*xDx(n+1))									         Dg(n) = DSQRT(xDx(n)*xDx(n+1))
         dtg(n) = xDx(n+1) - xDx(n)									         dtg(n) = xDx(n+1) - xDx(n)
      enddo												      enddo

!..Create bins of cloud droplet number concentration (1 to 3000 per cc).				!..Create bins of cloud droplet number concentration (1 to 3000 per cc).
      xDx(1) = 1.0d0											      xDx(1) = 1.0d0
      xDx(nbc+1) = 3000.0d0										      xDx(nbc+1) = 3000.0d0
      do n = 2, nbc											      do n = 2, nbc
         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbc)                          &				         xDx(n) = DEXP(DFLOAT(n-1)/DFLOAT(nbc)                          &
                  *DLOG(xDx(nbc+1)/xDx(1)) +DLOG(xDx(1)))						                  *DLOG(xDx(nbc+1)/xDx(1)) +DLOG(xDx(1)))
      enddo												      enddo
      do n = 1, nbc											      do n = 1, nbc
         t_Nc(n) = DSQRT(xDx(n)*xDx(n+1)) * 1.D6							         t_Nc(n) = DSQRT(xDx(n)*xDx(n+1)) * 1.D6
      enddo												      enddo
      nic1 = DLOG(t_Nc(nbc)/t_Nc(1))									      nic1 = DLOG(t_Nc(nbc)/t_Nc(1))

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Create lookup tables for most costly calculations.							!..Create lookup tables for most costly calculations.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      do m = 1, ntb_r											      do m = 1, ntb_r
         do k = 1, ntb_r1										         do k = 1, ntb_r1
            do j = 1, ntb_g										            do j = 1, ntb_g
               do i = 1, ntb_g1										               do i = 1, ntb_g1
                  tcg_racg(i,j,k,m) = 0.0d0								                  tcg_racg(i,j,k,m) = 0.0d0
                  tmr_racg(i,j,k,m) = 0.0d0								                  tmr_racg(i,j,k,m) = 0.0d0
                  tcr_gacr(i,j,k,m) = 0.0d0								                  tcr_gacr(i,j,k,m) = 0.0d0
                  tmg_gacr(i,j,k,m) = 0.0d0								                  tmg_gacr(i,j,k,m) = 0.0d0
                  tnr_racg(i,j,k,m) = 0.0d0								                  tnr_racg(i,j,k,m) = 0.0d0
                  tnr_gacr(i,j,k,m) = 0.0d0								                  tnr_gacr(i,j,k,m) = 0.0d0
               enddo											               enddo
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      do m = 1, ntb_r											      do m = 1, ntb_r
         do k = 1, ntb_r1										         do k = 1, ntb_r1
            do j = 1, ntb_t										            do j = 1, ntb_t
               do i = 1, ntb_s										               do i = 1, ntb_s
                  tcs_racs1(i,j,k,m) = 0.0d0								                  tcs_racs1(i,j,k,m) = 0.0d0
                  tmr_racs1(i,j,k,m) = 0.0d0								                  tmr_racs1(i,j,k,m) = 0.0d0
                  tcs_racs2(i,j,k,m) = 0.0d0								                  tcs_racs2(i,j,k,m) = 0.0d0
                  tmr_racs2(i,j,k,m) = 0.0d0								                  tmr_racs2(i,j,k,m) = 0.0d0
                  tcr_sacr1(i,j,k,m) = 0.0d0								                  tcr_sacr1(i,j,k,m) = 0.0d0
                  tms_sacr1(i,j,k,m) = 0.0d0								                  tms_sacr1(i,j,k,m) = 0.0d0
                  tcr_sacr2(i,j,k,m) = 0.0d0								                  tcr_sacr2(i,j,k,m) = 0.0d0
                  tms_sacr2(i,j,k,m) = 0.0d0								                  tms_sacr2(i,j,k,m) = 0.0d0
                  tnr_racs1(i,j,k,m) = 0.0d0								                  tnr_racs1(i,j,k,m) = 0.0d0
                  tnr_racs2(i,j,k,m) = 0.0d0								                  tnr_racs2(i,j,k,m) = 0.0d0
                  tnr_sacr1(i,j,k,m) = 0.0d0								                  tnr_sacr1(i,j,k,m) = 0.0d0
                  tnr_sacr2(i,j,k,m) = 0.0d0								                  tnr_sacr2(i,j,k,m) = 0.0d0
               enddo											               enddo
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      do m = 1, ntb_IN											      do m = 1, ntb_IN
         do k = 1, 45											         do k = 1, 45
            do j = 1, ntb_r1										            do j = 1, ntb_r1
               do i = 1, ntb_r										               do i = 1, ntb_r
                  tpi_qrfz(i,j,k,m) = 0.0d0								                  tpi_qrfz(i,j,k,m) = 0.0d0
                  tni_qrfz(i,j,k,m) = 0.0d0								                  tni_qrfz(i,j,k,m) = 0.0d0
                  tpg_qrfz(i,j,k,m) = 0.0d0								                  tpg_qrfz(i,j,k,m) = 0.0d0
                  tnr_qrfz(i,j,k,m) = 0.0d0								                  tnr_qrfz(i,j,k,m) = 0.0d0
               enddo											               enddo
            enddo											            enddo
            do j = 1, nbc										            do j = 1, nbc
               do i = 1, ntb_c										               do i = 1, ntb_c
                  tpi_qcfz(i,j,k,m) = 0.0d0								                  tpi_qcfz(i,j,k,m) = 0.0d0
                  tni_qcfz(i,j,k,m) = 0.0d0								                  tni_qcfz(i,j,k,m) = 0.0d0
               enddo											               enddo
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      do j = 1, ntb_i1											      do j = 1, ntb_i1
         do i = 1, ntb_i										         do i = 1, ntb_i
            tps_iaus(i,j) = 0.0d0									            tps_iaus(i,j) = 0.0d0
            tni_iaus(i,j) = 0.0d0									            tni_iaus(i,j) = 0.0d0
            tpi_ide(i,j) = 0.0d0									            tpi_ide(i,j) = 0.0d0
         enddo												         enddo
      enddo												      enddo

      do j = 1, nbc											      do j = 1, nbc
         do i = 1, nbr											         do i = 1, nbr
            t_Efrw(i,j) = 0.0										            t_Efrw(i,j) = 0.0
         enddo												         enddo
         do i = 1, nbs											         do i = 1, nbs
            t_Efsw(i,j) = 0.0										            t_Efsw(i,j) = 0.0
         enddo												         enddo
      enddo												      enddo

      do k = 1, ntb_r											      do k = 1, ntb_r
         do j = 1, ntb_r1										         do j = 1, ntb_r1
            do i = 1, nbr										            do i = 1, nbr
               tnr_rev(i,j,k) = 0.0d0									               tnr_rev(i,j,k) = 0.0d0
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      do k = 1, nbc											      do k = 1, nbc
         do j = 1, ntb_c										         do j = 1, ntb_c
            do i = 1, nbc										            do i = 1, nbc
               tpc_wev(i,j,k) = 0.0d0									               tpc_wev(i,j,k) = 0.0d0
               tnc_wev(i,j,k) = 0.0d0									               tnc_wev(i,j,k) = 0.0d0
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      do m = 1, ntb_ark											      do m = 1, ntb_ark
         do l = 1, ntb_arr										         do l = 1, ntb_arr
            do k = 1, ntb_art										            do k = 1, ntb_art
               do j = 1, ntb_arw									               do j = 1, ntb_arw
                  do i = 1, ntb_arc									                  do i = 1, ntb_arc
                     tnccn_act(i,j,k,l,m) = 1.0								                     tnccn_act(i,j,k,l,m) = 1.0
                  enddo											                  enddo
               enddo											               enddo
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

      CALL wrf_debug(150, 'CREATING MICROPHYSICS LOOKUP TABLES ... ')					      CALL wrf_debug(150, 'CREATING MICROPHYSICS LOOKUP TABLES ... ')
      WRITE (wrf_err_message, '(a, f5.2, a, f5.2, a, f5.2, a, f5.2)') &					      WRITE (wrf_err_message, '(a, f5.2, a, f5.2, a, f5.2, a, f5.2)') &
          ' using: mu_c=',mu_c,' mu_i=',mu_i,' mu_r=',mu_r,' mu_g=',mu_g				          ' using: mu_c=',mu_c,' mu_i=',mu_i,' mu_r=',mu_r,' mu_g=',mu_g
      CALL wrf_debug(150, wrf_err_message)								      CALL wrf_debug(150, wrf_err_message)

!..Read a static file containing CCN activation of aerosols. The					!..Read a static file containing CCN activation of aerosols. The
!.. data were created from a parcel model by Feingold & Heymsfield with					!.. data were created from a parcel model by Feingold & Heymsfield with
!.. further changes by Eidhammer and Kriedenweis.							!.. further changes by Eidhammer and Kriedenweis.
      if (is_aerosol_aware) then									      if (is_aerosol_aware) then
         CALL wrf_debug(200, '  calling table_ccnAct routine')						         CALL wrf_debug(200, '  calling table_ccnAct routine')
         call table_ccnAct										         call table_ccnAct
      endif												      endif

!..Collision efficiency between rain/snow and cloud water.						!..Collision efficiency between rain/snow and cloud water.
      CALL wrf_debug(200, '  creating qc collision eff tables')						      CALL wrf_debug(200, '  creating qc collision eff tables')
      call table_Efrw											      call table_Efrw
      call table_Efsw											      call table_Efsw

!..Drop evaporation.											!..Drop evaporation.
      CALL wrf_debug(200, '  creating rain evap table')							      CALL wrf_debug(200, '  creating rain evap table')
      call table_dropEvap										      call table_dropEvap

!..Initialize various constants for computing radar reflectivity.					!..Initialize various constants for computing radar reflectivity.
      xam_r = am_r											      xam_r = am_r
      xbm_r = bm_r											      xbm_r = bm_r
      xmu_r = mu_r											      xmu_r = mu_r
      xam_s = am_s											      xam_s = am_s
      xbm_s = bm_s											      xbm_s = bm_s
      xmu_s = mu_s											      xmu_s = mu_s
      xam_g = am_g											      xam_g = am_g
      xbm_g = bm_g											      xbm_g = bm_g
      xmu_g = mu_g											      xmu_g = mu_g
      call radar_init											      call radar_init

      if (.not. iiwarm) then										      if (.not. iiwarm) then

!..Rain collecting graupel & graupel collecting rain.							!..Rain collecting graupel & graupel collecting rain.
      CALL wrf_debug(200, '  creating rain collecting graupel table')					      CALL wrf_debug(200, '  creating rain collecting graupel table')
      call qr_acr_qg											      call qr_acr_qg

!..Rain collecting snow & snow collecting rain.								!..Rain collecting snow & snow collecting rain.
      CALL wrf_debug(200, '  creating rain collecting snow table')					      CALL wrf_debug(200, '  creating rain collecting snow table')
      call qr_acr_qs											      call qr_acr_qs

!..Cloud water and rain freezing (Bigg, 1953).								!..Cloud water and rain freezing (Bigg, 1953).
      CALL wrf_debug(200, '  creating freezing of water drops table')					      CALL wrf_debug(200, '  creating freezing of water drops table')
      call freezeH2O											      call freezeH2O

!..Conversion of some ice mass into snow category.							!..Conversion of some ice mass into snow category.
      CALL wrf_debug(200, '  creating ice converting to snow table')					      CALL wrf_debug(200, '  creating ice converting to snow table')
      call qi_aut_qs											      call qi_aut_qs

      endif												      endif

      CALL wrf_debug(150, ' ... DONE microphysical lookup tables')					      CALL wrf_debug(150, ' ... DONE microphysical lookup tables')

      endif												      endif

      END SUBROUTINE thompson_init									      END SUBROUTINE thompson_init
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..This is a wrapper routine designed to transfer values from 3D to 1D.					!..This is a wrapper routine designed to transfer values from 3D to 1D.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc,       &				      SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc,       &
                              nwfa, nifa, nwfa2d,                       &				                              nwfa, nifa, nwfa2d,                       &
                              th, pii, p, w, dz, dt_in, itimestep,      &				                              th, pii, p, w, dz, dt_in, itimestep,      &
                              RAINNC, RAINNCV, &							                              RAINNC, RAINNCV, &
                              SNOWNC, SNOWNCV, &							                              SNOWNC, SNOWNCV, &
                              GRAUPELNC, GRAUPELNCV, SR, &						                              GRAUPELNC, GRAUPELNCV, SR, &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                              rainprod, evapprod, &							                              rainprod, evapprod, &
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
                              indirect_feed_chimere,n_bin,sect,         &				                              indirect_feed_chimere,n_bin,sect,         &
                              num_aer,num_hygro_aer,hygro_aer,ice_nucl, &				                              num_aer,num_hygro_aer,hygro_aer,ice_nucl, &
                              wtke,lcldfra,                             &				                              wtke,lcldfra,                             &
                              dropsource,rainrate,evaprate,             &				                              dropsource,rainrate,evaprate,             &
#endif													#endif
                              refl_10cm, diagflag, do_radar_ref,      &					                              refl_10cm, diagflag, do_radar_ref,      &
                              re_cloud, re_ice, re_snow,              &					                              re_cloud, re_ice, re_snow,              &
                              has_reqc, has_reqi, has_reqs,           &					                              has_reqc, has_reqi, has_reqs,           &
                              ids,ide, jds,jde, kds,kde, &             ! domain dims			                              ids,ide, jds,jde, kds,kde, &             ! domain dims
                              ims,ime, jms,jme, kms,kme, &             ! memory dims			                              ims,ime, jms,jme, kms,kme, &             ! memory dims
                              its,ite, jts,jte, kts,kte)               ! tile dims			                              its,ite, jts,jte, kts,kte)               ! tile dims

      implicit none											      implicit none

!..Subroutine arguments											!..Subroutine arguments
      INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, &						      INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, &
                            ims,ime, jms,jme, kms,kme, &						                            ims,ime, jms,jme, kms,kme, &
                            its,ite, jts,jte, kts,kte							                            its,ite, jts,jte, kts,kte
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &					      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &
                          qv, qc, qr, qi, qs, qg, ni, nr, th						                          qv, qc, qr, qi, qs, qg, ni, nr, th
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &				      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
                          nc, nwfa, nifa								                          nc, nwfa, nifa
      REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d					      REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &					      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &
                          re_cloud, re_ice, re_snow							                          re_cloud, re_ice, re_snow
      INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs						      INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &					      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &
                          rainprod, evapprod								                          rainprod, evapprod
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      INTEGER,INTENT(IN) :: indirect_feed_chimere,n_bin							      INTEGER,INTENT(IN) :: indirect_feed_chimere,n_bin
      REAL,INTENT(IN),DIMENSION(n_bin+1) :: sect							      REAL,INTENT(IN),DIMENSION(n_bin+1) :: sect
      REAL,DIMENSION(ims:ime,kms:kme,jms:jme),OPTIONAL,INTENT(IN) :: hygro_aer,ice_nucl,wtke,lcl	      REAL,DIMENSION(ims:ime,kms:kme,jms:jme),OPTIONAL,INTENT(IN) :: hygro_aer,ice_nucl,wtke,lcl
      REAL,DIMENSION(ims:ime,kms:kme,jms:jme,n_bin),OPTIONAL,INTENT(IN) :: num_aer,num_hygro_aer	      REAL,DIMENSION(ims:ime,kms:kme,jms:jme,n_bin),OPTIONAL,INTENT(IN) :: num_aer,num_hygro_aer
      REAL,DIMENSION(ims:ime,kms:kme,jms:jme),OPTIONAL,INTENT(OUT) :: dropsource,rainrate,evapra	      REAL,DIMENSION(ims:ime,kms:kme,jms:jme),OPTIONAL,INTENT(OUT) :: dropsource,rainrate,evapra
#endif													#endif
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(IN):: &					      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(IN):: &
                          pii, p, w, dz									                          pii, p, w, dz
      REAL, DIMENSION(ims:ime, jms:jme), INTENT(INOUT):: &						      REAL, DIMENSION(ims:ime, jms:jme), INTENT(INOUT):: &
                          RAINNC, RAINNCV, SR								                          RAINNC, RAINNCV, SR
      REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(INOUT)::      &				      REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(INOUT)::      &
                          SNOWNC, SNOWNCV, GRAUPELNC, GRAUPELNCV					                          SNOWNC, SNOWNCV, GRAUPELNC, GRAUPELNCV
      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT)::       &				      REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT)::       &
                          refl_10cm									                          refl_10cm
      REAL, INTENT(IN):: dt_in										      REAL, INTENT(IN):: dt_in
      INTEGER, INTENT(IN):: itimestep									      INTEGER, INTENT(IN):: itimestep

!..Local variables											!..Local variables
      REAL, DIMENSION(kts:kte):: &									      REAL, DIMENSION(kts:kte):: &
                          qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d,     &				                          qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d,     &
                          nr1d, nc1d, nwfa1d, nifa1d,                   &				                          nr1d, nc1d, nwfa1d, nifa1d,                   &
                          t1d, p1d, w1d, dz1d, rho, dBZ							                          t1d, p1d, w1d, dz1d, rho, dBZ
      REAL, DIMENSION(kts:kte):: re_qc1d, re_qi1d, re_qs1d						      REAL, DIMENSION(kts:kte):: re_qc1d, re_qi1d, re_qs1d
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
      REAL, DIMENSION(kts:kte):: &									      REAL, DIMENSION(kts:kte):: &
                          rainprod1d, evapprod1d							                          rainprod1d, evapprod1d
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      INTEGER :: nb											      INTEGER :: nb
      REAL,DIMENSION(kts:kte) :: hygro_aer1d,ice_nucl1d,wtke1d,dropsource1d				      REAL,DIMENSION(kts:kte) :: hygro_aer1d,ice_nucl1d,wtke1d,dropsource1d
      REAL,DIMENSION(kts:kte,n_bin) :: num_aer1d,num_hygro_aer1d					      REAL,DIMENSION(kts:kte,n_bin) :: num_aer1d,num_hygro_aer1d
      REAL,DIMENSION(kts:kte) :: rainrate1d,evaprate1d							      REAL,DIMENSION(kts:kte) :: rainrate1d,evaprate1d
       REAL,DIMENSION(kts:kte) :: lcldf1d								       REAL,DIMENSION(kts:kte) :: lcldf1d
#endif													#endif
      REAL, DIMENSION(its:ite, jts:jte):: pcp_ra, pcp_sn, pcp_gr, pcp_ic				      REAL, DIMENSION(its:ite, jts:jte):: pcp_ra, pcp_sn, pcp_gr, pcp_ic
      REAL:: dt, pptrain, pptsnow, pptgraul, pptice							      REAL:: dt, pptrain, pptsnow, pptgraul, pptice
      REAL:: qc_max, qr_max, qs_max, qi_max, qg_max, ni_max, nr_max					      REAL:: qc_max, qr_max, qs_max, qi_max, qg_max, ni_max, nr_max
      REAL:: nwfa1											      REAL:: nwfa1
      INTEGER:: i, j, k											      INTEGER:: i, j, k
      INTEGER:: imax_qc,imax_qr,imax_qi,imax_qs,imax_qg,imax_ni,imax_nr					      INTEGER:: imax_qc,imax_qr,imax_qi,imax_qs,imax_qg,imax_ni,imax_nr
      INTEGER:: jmax_qc,jmax_qr,jmax_qi,jmax_qs,jmax_qg,jmax_ni,jmax_nr					      INTEGER:: jmax_qc,jmax_qr,jmax_qi,jmax_qs,jmax_qg,jmax_ni,jmax_nr
      INTEGER:: kmax_qc,kmax_qr,kmax_qi,kmax_qs,kmax_qg,kmax_ni,kmax_nr					      INTEGER:: kmax_qc,kmax_qr,kmax_qi,kmax_qs,kmax_qg,kmax_ni,kmax_nr
      INTEGER:: i_start, j_start, i_end, j_end								      INTEGER:: i_start, j_start, i_end, j_end
      LOGICAL, OPTIONAL, INTENT(IN) :: diagflag								      LOGICAL, OPTIONAL, INTENT(IN) :: diagflag
      INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref							      INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref
      CHARACTER*256:: mp_debug										      CHARACTER*256:: mp_debug

!+---+													!+---+

      i_start = its											      i_start = its
      j_start = jts											      j_start = jts
      i_end   = MIN(ite, ide-1)										      i_end   = MIN(ite, ide-1)
      j_end   = MIN(jte, jde-1)										      j_end   = MIN(jte, jde-1)

!..For idealized testing by developer.									!..For idealized testing by developer.
!     if ( (ide-ids+1).gt.4 .and. (jde-jds+1).lt.4 .and.                &				!     if ( (ide-ids+1).gt.4 .and. (jde-jds+1).lt.4 .and.                &
!          ids.eq.its.and.ide.eq.ite.and.jds.eq.jts.and.jde.eq.jte) then				!          ids.eq.its.and.ide.eq.ite.and.jds.eq.jts.and.jde.eq.jte) then
!        i_start = its + 2										!        i_start = its + 2
!        i_end   = ite											!        i_end   = ite
!        j_start = jts											!        j_start = jts
!        j_end   = jte											!        j_end   = jte
!     endif												!     endif

      dt = dt_in											      dt = dt_in
   													   
      qc_max = 0.											      qc_max = 0.
      qr_max = 0.											      qr_max = 0.
      qs_max = 0.											      qs_max = 0.
      qi_max = 0.											      qi_max = 0.
      qg_max = 0											      qg_max = 0
      ni_max = 0.											      ni_max = 0.
      nr_max = 0.											      nr_max = 0.
      imax_qc = 0											      imax_qc = 0
      imax_qr = 0											      imax_qr = 0
      imax_qi = 0											      imax_qi = 0
      imax_qs = 0											      imax_qs = 0
      imax_qg = 0											      imax_qg = 0
      imax_ni = 0											      imax_ni = 0
      imax_nr = 0											      imax_nr = 0
      jmax_qc = 0											      jmax_qc = 0
      jmax_qr = 0											      jmax_qr = 0
      jmax_qi = 0											      jmax_qi = 0
      jmax_qs = 0											      jmax_qs = 0
      jmax_qg = 0											      jmax_qg = 0
      jmax_ni = 0											      jmax_ni = 0
      jmax_nr = 0											      jmax_nr = 0
      kmax_qc = 0											      kmax_qc = 0
      kmax_qr = 0											      kmax_qr = 0
      kmax_qi = 0											      kmax_qi = 0
      kmax_qs = 0											      kmax_qs = 0
      kmax_qg = 0											      kmax_qg = 0
      kmax_ni = 0											      kmax_ni = 0
      kmax_nr = 0											      kmax_nr = 0
      do i = 1, 256											      do i = 1, 256
         mp_debug(i:i) = char(0)									         mp_debug(i:i) = char(0)
      enddo												      enddo

      if (.NOT. is_aerosol_aware .AND. PRESENT(nc) .AND. PRESENT(nwfa)  &				      if (.NOT. is_aerosol_aware .AND. PRESENT(nc) .AND. PRESENT(nwfa)  &
                .AND. PRESENT(nifa) .AND. PRESENT(nwfa2d)) then						                .AND. PRESENT(nifa) .AND. PRESENT(nwfa2d)) then
         write(mp_debug,*) 'WARNING, nc-nwfa-nifa-nwfa2d present but is_aerosol_aware is FALSE'		         write(mp_debug,*) 'WARNING, nc-nwfa-nifa-nwfa2d present but is_aerosol_aware is FALSE'
         CALL wrf_debug(0, mp_debug)									         CALL wrf_debug(0, mp_debug)
      endif												      endif

      j_loop:  do j = j_start, j_end									      j_loop:  do j = j_start, j_end
      i_loop:  do i = i_start, i_end									      i_loop:  do i = i_start, i_end

         pptrain = 0.											         pptrain = 0.
         pptsnow = 0.											         pptsnow = 0.
         pptgraul = 0.											         pptgraul = 0.
         pptice = 0.											         pptice = 0.
         RAINNCV(i,j) = 0.										         RAINNCV(i,j) = 0.
         IF ( PRESENT (snowncv) ) THEN									         IF ( PRESENT (snowncv) ) THEN
            SNOWNCV(i,j) = 0.										            SNOWNCV(i,j) = 0.
         ENDIF												         ENDIF
         IF ( PRESENT (graupelncv) ) THEN								         IF ( PRESENT (graupelncv) ) THEN
            GRAUPELNCV(i,j) = 0.									            GRAUPELNCV(i,j) = 0.
         ENDIF												         ENDIF
         SR(i,j) = 0.											         SR(i,j) = 0.

         do k = kts, kte										         do k = kts, kte
            t1d(k) = th(i,k,j)*pii(i,k,j)								            t1d(k) = th(i,k,j)*pii(i,k,j)
            p1d(k) = p(i,k,j)										            p1d(k) = p(i,k,j)
            w1d(k) = w(i,k,j)										            w1d(k) = w(i,k,j)
            dz1d(k) = dz(i,k,j)										            dz1d(k) = dz(i,k,j)
            qv1d(k) = qv(i,k,j)										            qv1d(k) = qv(i,k,j)
            qc1d(k) = qc(i,k,j)										            qc1d(k) = qc(i,k,j)
            qi1d(k) = qi(i,k,j)										            qi1d(k) = qi(i,k,j)
            qr1d(k) = qr(i,k,j)										            qr1d(k) = qr(i,k,j)
            qs1d(k) = qs(i,k,j)										            qs1d(k) = qs(i,k,j)
            qg1d(k) = qg(i,k,j)										            qg1d(k) = qg(i,k,j)
            ni1d(k) = ni(i,k,j)										            ni1d(k) = ni(i,k,j)
            nr1d(k) = nr(i,k,j)										            nr1d(k) = nr(i,k,j)
         enddo												         enddo
         if (is_aerosol_aware) then									         if (is_aerosol_aware) then
            do k = kts, kte										            do k = kts, kte
               nc1d(k) = nc(i,k,j)									               nc1d(k) = nc(i,k,j)
               nwfa1d(k) = nwfa(i,k,j)									               nwfa1d(k) = nwfa(i,k,j)
               nifa1d(k) = nifa(i,k,j)									               nifa1d(k) = nifa(i,k,j)
            enddo											            enddo
            nwfa1 = nwfa2d(i,j)										            nwfa1 = nwfa2d(i,j)
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
            if(indirect_feed_chimere==1) then								            if(indirect_feed_chimere==1) then
              do k = kts, kte										              do k = kts, kte
                do nb = 1, n_bin									                do nb = 1, n_bin
                  num_aer1d(k,nb) = max(num_aer(i,k,j,nb),1.e-20)					                  num_aer1d(k,nb) = max(num_aer(i,k,j,nb),1.e-20)
                  num_hygro_aer1d(k,nb) = max(num_hygro_aer(i,k,j,nb),1.e-20)				                  num_hygro_aer1d(k,nb) = max(num_hygro_aer(i,k,j,nb),1.e-20)
                enddo											                enddo
                hygro_aer1d(k) = max(hygro_aer(i,k,j),1.e-20)						                hygro_aer1d(k) = max(hygro_aer(i,k,j),1.e-20)
                ice_nucl1d(k) = max(ice_nucl(i,k,j),1.e-20)						                ice_nucl1d(k) = max(ice_nucl(i,k,j),1.e-20)
                wtke1d(k) = wtke(i,k,j)									                wtke1d(k) = wtke(i,k,j)
                lcldf1d(k) = lcldfra(i,k,j)								                lcldf1d(k) = lcldfra(i,k,j)
                dropsource1d(k) = 0.0									                dropsource1d(k) = 0.0
              enddo											              enddo
            endif											            endif
#endif													#endif
         else												         else
            do k = kts, kte										            do k = kts, kte
               rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622))						               rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622))
               nc1d(k) = Nt_c/rho(k)									               nc1d(k) = Nt_c/rho(k)
               nwfa1d(k) = 11.1E6/rho(k)								               nwfa1d(k) = 11.1E6/rho(k)
               nifa1d(k) = naIN1*0.01/rho(k)								               nifa1d(k) = naIN1*0.01/rho(k)
            enddo											            enddo
            nwfa1 = 11.1E6										            nwfa1 = 11.1E6
         endif												         endif

         call mp_thompson(qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d,     &				         call mp_thompson(qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d,     &
                      nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dz1d,  &				                      nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dz1d,  &
                      pptrain, pptsnow, pptgraul, pptice, &						                      pptrain, pptsnow, pptgraul, pptice, &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                      rainprod1d, evapprod1d, &								                      rainprod1d, evapprod1d, &
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
                      indirect_feed_chimere,n_bin,sect,num_aer1d,       &				                      indirect_feed_chimere,n_bin,sect,num_aer1d,       &
                      num_hygro_aer1d,hygro_aer1d,ice_nucl1d,           &				                      num_hygro_aer1d,hygro_aer1d,ice_nucl1d,           &
                      wtke1d,lcldf1d,dropsource1d,rainrate1d,evaprate1d,&				                      wtke1d,lcldf1d,dropsource1d,rainrate1d,evaprate1d,&
#endif													#endif
                      kts, kte, dt, i, j)								                      kts, kte, dt, i, j)

         pcp_ra(i,j) = pptrain										         pcp_ra(i,j) = pptrain
         pcp_sn(i,j) = pptsnow										         pcp_sn(i,j) = pptsnow
         pcp_gr(i,j) = pptgraul										         pcp_gr(i,j) = pptgraul
         pcp_ic(i,j) = pptice										         pcp_ic(i,j) = pptice
         RAINNCV(i,j) = pptrain + pptsnow + pptgraul + pptice						         RAINNCV(i,j) = pptrain + pptsnow + pptgraul + pptice
         RAINNC(i,j) = RAINNC(i,j) + pptrain + pptsnow + pptgraul + pptice				         RAINNC(i,j) = RAINNC(i,j) + pptrain + pptsnow + pptgraul + pptice
         IF ( PRESENT(snowncv) .AND. PRESENT(snownc) ) THEN						         IF ( PRESENT(snowncv) .AND. PRESENT(snownc) ) THEN
            SNOWNCV(i,j) = pptsnow + pptice								            SNOWNCV(i,j) = pptsnow + pptice
            SNOWNC(i,j) = SNOWNC(i,j) + pptsnow + pptice						            SNOWNC(i,j) = SNOWNC(i,j) + pptsnow + pptice
         ENDIF												         ENDIF
         IF ( PRESENT(graupelncv) .AND. PRESENT(graupelnc) ) THEN					         IF ( PRESENT(graupelncv) .AND. PRESENT(graupelnc) ) THEN
            GRAUPELNCV(i,j) = pptgraul									            GRAUPELNCV(i,j) = pptgraul
            GRAUPELNC(i,j) = GRAUPELNC(i,j) + pptgraul							            GRAUPELNC(i,j) = GRAUPELNC(i,j) + pptgraul
         ENDIF												         ENDIF
         SR(i,j) = (pptsnow + pptgraul + pptice)/(RAINNCV(i,j)+1.e-12)					         SR(i,j) = (pptsnow + pptgraul + pptice)/(RAINNCV(i,j)+1.e-12)



!..Reset lowest model level to initial state aerosols (fake sfc source).				!..Reset lowest model level to initial state aerosols (fake sfc source).
!.. Changed 13 May 2013 to fake emissions in which nwfa2d is aerosol					!.. Changed 13 May 2013 to fake emissions in which nwfa2d is aerosol
!.. number tendency (number per kg per second).								!.. number tendency (number per kg per second).
         if (is_aerosol_aware) then									         if (is_aerosol_aware) then
!-GT        nwfa1d(kts) = nwfa1										!-GT        nwfa1d(kts) = nwfa1
            nwfa1d(kts) = nwfa1d(kts) + nwfa2d(i,j)*dt_in						            nwfa1d(kts) = nwfa1d(kts) + nwfa2d(i,j)*dt_in

            do k = kts, kte										            do k = kts, kte
               nc(i,k,j) = nc1d(k)									               nc(i,k,j) = nc1d(k)
               nwfa(i,k,j) = nwfa1d(k)									               nwfa(i,k,j) = nwfa1d(k)
               nifa(i,k,j) = nifa1d(k)									               nifa(i,k,j) = nifa1d(k)
            enddo											            enddo
         endif												         endif

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
         do k = kts, kte										         do k = kts, kte
            rainrate(i,k,j) = rainrate1d(k)								            rainrate(i,k,j) = rainrate1d(k)
            evaprate(i,k,j) = evaprate1d(k)								            evaprate(i,k,j) = evaprate1d(k)
            if(indirect_feed_chimere==1) dropsource(i,k,j) = dropsource1d(k)				            if(indirect_feed_chimere==1) dropsource(i,k,j) = dropsource1d(k)
         enddo												         enddo
#endif													#endif

         do k = kts, kte										         do k = kts, kte
            qv(i,k,j) = qv1d(k)										            qv(i,k,j) = qv1d(k)
            qc(i,k,j) = qc1d(k)										            qc(i,k,j) = qc1d(k)
            qi(i,k,j) = qi1d(k)										            qi(i,k,j) = qi1d(k)
            qr(i,k,j) = qr1d(k)										            qr(i,k,j) = qr1d(k)
            qs(i,k,j) = qs1d(k)										            qs(i,k,j) = qs1d(k)
            qg(i,k,j) = qg1d(k)										            qg(i,k,j) = qg1d(k)
            ni(i,k,j) = ni1d(k)										            ni(i,k,j) = ni1d(k)
            nr(i,k,j) = nr1d(k)										            nr(i,k,j) = nr1d(k)
            th(i,k,j) = t1d(k)/pii(i,k,j)								            th(i,k,j) = t1d(k)/pii(i,k,j)
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
            rainprod(i,k,j) = rainprod1d(k)								            rainprod(i,k,j) = rainprod1d(k)
            evapprod(i,k,j) = evapprod1d(k)								            evapprod(i,k,j) = evapprod1d(k)
#endif													#endif
            if (qc1d(k) .gt. qc_max) then								            if (qc1d(k) .gt. qc_max) then
             imax_qc = i										             imax_qc = i
             jmax_qc = j										             jmax_qc = j
             kmax_qc = k										             kmax_qc = k
             qc_max = qc1d(k)										             qc_max = qc1d(k)
            elseif (qc1d(k) .lt. 0.0) then								            elseif (qc1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qc ', qc1d(k),        &				             write(mp_debug,*) 'WARNING, negative qc ', qc1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (qr1d(k) .gt. qr_max) then								            if (qr1d(k) .gt. qr_max) then
             imax_qr = i										             imax_qr = i
             jmax_qr = j										             jmax_qr = j
             kmax_qr = k										             kmax_qr = k
             qr_max = qr1d(k)										             qr_max = qr1d(k)
            elseif (qr1d(k) .lt. 0.0) then								            elseif (qr1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qr ', qr1d(k),        &				             write(mp_debug,*) 'WARNING, negative qr ', qr1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (nr1d(k) .gt. nr_max) then								            if (nr1d(k) .gt. nr_max) then
             imax_nr = i										             imax_nr = i
             jmax_nr = j										             jmax_nr = j
             kmax_nr = k										             kmax_nr = k
             nr_max = nr1d(k)										             nr_max = nr1d(k)
            elseif (nr1d(k) .lt. 0.0) then								            elseif (nr1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative nr ', nr1d(k),        &				             write(mp_debug,*) 'WARNING, negative nr ', nr1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (qs1d(k) .gt. qs_max) then								            if (qs1d(k) .gt. qs_max) then
             imax_qs = i										             imax_qs = i
             jmax_qs = j										             jmax_qs = j
             kmax_qs = k										             kmax_qs = k
             qs_max = qs1d(k)										             qs_max = qs1d(k)
            elseif (qs1d(k) .lt. 0.0) then								            elseif (qs1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qs ', qs1d(k),        &				             write(mp_debug,*) 'WARNING, negative qs ', qs1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (qi1d(k) .gt. qi_max) then								            if (qi1d(k) .gt. qi_max) then
             imax_qi = i										             imax_qi = i
             jmax_qi = j										             jmax_qi = j
             kmax_qi = k										             kmax_qi = k
             qi_max = qi1d(k)										             qi_max = qi1d(k)
            elseif (qi1d(k) .lt. 0.0) then								            elseif (qi1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qi ', qi1d(k),        &				             write(mp_debug,*) 'WARNING, negative qi ', qi1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (qg1d(k) .gt. qg_max) then								            if (qg1d(k) .gt. qg_max) then
             imax_qg = i										             imax_qg = i
             jmax_qg = j										             jmax_qg = j
             kmax_qg = k										             kmax_qg = k
             qg_max = qg1d(k)										             qg_max = qg1d(k)
            elseif (qg1d(k) .lt. 0.0) then								            elseif (qg1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qg ', qg1d(k),        &				             write(mp_debug,*) 'WARNING, negative qg ', qg1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (ni1d(k) .gt. ni_max) then								            if (ni1d(k) .gt. ni_max) then
             imax_ni = i										             imax_ni = i
             jmax_ni = j										             jmax_ni = j
             kmax_ni = k										             kmax_ni = k
             ni_max = ni1d(k)										             ni_max = ni1d(k)
            elseif (ni1d(k) .lt. 0.0) then								            elseif (ni1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative ni ', ni1d(k),        &				             write(mp_debug,*) 'WARNING, negative ni ', ni1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
            endif											            endif
            if (qv1d(k) .lt. 0.0) then									            if (qv1d(k) .lt. 0.0) then
             write(mp_debug,*) 'WARNING, negative qv ', qv1d(k),        &				             write(mp_debug,*) 'WARNING, negative qv ', qv1d(k),        &
                        ' at i,j,k=', i,j,k								                        ' at i,j,k=', i,j,k
             CALL wrf_debug(150, mp_debug)								             CALL wrf_debug(150, mp_debug)
             if (k.lt.kte-2 .and. k.gt.kts+1) then							             if (k.lt.kte-2 .and. k.gt.kts+1) then
                write(mp_debug,*) '   below and above are: ', qv(i,k-1,j), qv(i,k+1,j)			                write(mp_debug,*) '   below and above are: ', qv(i,k-1,j), qv(i,k+1,j)
                CALL wrf_debug(150, mp_debug)								                CALL wrf_debug(150, mp_debug)
                qv(i,k,j) = MAX(1.E-7, 0.5*(qv(i,k-1,j) + qv(i,k+1,j)))					                qv(i,k,j) = MAX(1.E-7, 0.5*(qv(i,k-1,j) + qv(i,k+1,j)))
             else											             else
                qv(i,k,j) = 1.E-7									                qv(i,k,j) = 1.E-7
             endif											             endif
            endif											            endif
         enddo												         enddo

         IF ( PRESENT (diagflag) ) THEN									         IF ( PRESENT (diagflag) ) THEN
         if (diagflag .and. do_radar_ref == 1) then							         if (diagflag .and. do_radar_ref == 1) then
          call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d,       &				          call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d,       &
                      t1d, p1d, dBZ, kts, kte, i, j)							                      t1d, p1d, dBZ, kts, kte, i, j)
          do k = kts, kte										          do k = kts, kte
             refl_10cm(i,k,j) = MAX(-35., dBZ(k))							             refl_10cm(i,k,j) = MAX(-35., dBZ(k))
          enddo												          enddo
         endif												         endif
         ENDIF												         ENDIF

         IF (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) THEN				         IF (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) THEN
          do k = kts, kte										          do k = kts, kte
             re_qc1d(k) = 2.49E-6									             re_qc1d(k) = 2.49E-6
             re_qi1d(k) = 4.99E-6									             re_qi1d(k) = 4.99E-6
             re_qs1d(k) = 9.99E-6									             re_qs1d(k) = 9.99E-6
          enddo												          enddo
          call calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d,  &				          call calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d,  &
                      re_qc1d, re_qi1d, re_qs1d, kts, kte)						                      re_qc1d, re_qi1d, re_qs1d, kts, kte)
          do k = kts, kte										          do k = kts, kte
             re_cloud(i,k,j) = MAX(2.49E-6, MIN(re_qc1d(k), 50.E-6))					             re_cloud(i,k,j) = MAX(2.49E-6, MIN(re_qc1d(k), 50.E-6))
             re_ice(i,k,j)   = MAX(4.99E-6, MIN(re_qi1d(k), 125.E-6))					             re_ice(i,k,j)   = MAX(4.99E-6, MIN(re_qi1d(k), 125.E-6))
             re_snow(i,k,j)  = MAX(9.99E-6, MIN(re_qs1d(k), 999.E-6))					             re_snow(i,k,j)  = MAX(9.99E-6, MIN(re_qs1d(k), 999.E-6))
          enddo												          enddo
         ENDIF												         ENDIF

      enddo i_loop											      enddo i_loop
      enddo j_loop											      enddo j_loop

! DEBUG - GT												! DEBUG - GT
      write(mp_debug,'(a,7(a,e13.6,1x,a,i3,a,i3,a,i3,a,1x))') 'MP-GT:', &				      write(mp_debug,'(a,7(a,e13.6,1x,a,i3,a,i3,a,i3,a,1x))') 'MP-GT:', &
         'qc: ', qc_max, '(', imax_qc, ',', jmax_qc, ',', kmax_qc, ')', &				         'qc: ', qc_max, '(', imax_qc, ',', jmax_qc, ',', kmax_qc, ')', &
         'qr: ', qr_max, '(', imax_qr, ',', jmax_qr, ',', kmax_qr, ')', &				         'qr: ', qr_max, '(', imax_qr, ',', jmax_qr, ',', kmax_qr, ')', &
         'qi: ', qi_max, '(', imax_qi, ',', jmax_qi, ',', kmax_qi, ')', &				         'qi: ', qi_max, '(', imax_qi, ',', jmax_qi, ',', kmax_qi, ')', &
         'qs: ', qs_max, '(', imax_qs, ',', jmax_qs, ',', kmax_qs, ')', &				         'qs: ', qs_max, '(', imax_qs, ',', jmax_qs, ',', kmax_qs, ')', &
         'qg: ', qg_max, '(', imax_qg, ',', jmax_qg, ',', kmax_qg, ')', &				         'qg: ', qg_max, '(', imax_qg, ',', jmax_qg, ',', kmax_qg, ')', &
         'ni: ', ni_max, '(', imax_ni, ',', jmax_ni, ',', kmax_ni, ')', &				         'ni: ', ni_max, '(', imax_ni, ',', jmax_ni, ',', kmax_ni, ')', &
         'nr: ', nr_max, '(', imax_nr, ',', jmax_nr, ',', kmax_nr, ')'					         'nr: ', nr_max, '(', imax_nr, ',', jmax_nr, ',', kmax_nr, ')'
      CALL wrf_debug(150, mp_debug)									      CALL wrf_debug(150, mp_debug)
! END DEBUG - GT											! END DEBUG - GT

      do i = 1, 256											      do i = 1, 256
         mp_debug(i:i) = char(0)									         mp_debug(i:i) = char(0)
      enddo												      enddo

      END SUBROUTINE mp_gt_driver									      END SUBROUTINE mp_gt_driver

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. This subroutine computes the moisture tendencies of water vapor,					!.. This subroutine computes the moisture tendencies of water vapor,
!.. cloud droplets, rain, cloud ice (pristine), snow, and graupel.					!.. cloud droplets, rain, cloud ice (pristine), snow, and graupel.
!.. Previously this code was based on Reisner et al (1998), but few of					!.. Previously this code was based on Reisner et al (1998), but few of
!.. those pieces remain.  A complete description is now found in					!.. those pieces remain.  A complete description is now found in
!.. Thompson et al. (2004, 2008).									!.. Thompson et al. (2004, 2008).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!													!
      subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &				      subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
                          nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dzq, &				                          nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dzq, &
                          pptrain, pptsnow, pptgraul, pptice, &						                          pptrain, pptsnow, pptgraul, pptice, &
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
                          rainprod, evapprod, &								                          rainprod, evapprod, &
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
                          indirect_feed_chimere,n_bin,sect,num_aer1d,   &				                          indirect_feed_chimere,n_bin,sect,num_aer1d,   &
                          num_hygro_aer1d,                              &				                          num_hygro_aer1d,                              &
                          hygro_aer1d,ice_nucl1d,wtke1d,lcldf1d,        &				                          hygro_aer1d,ice_nucl1d,wtke1d,lcldf1d,        &
                          dropsource1d,rainrate1d,evaprate1d,           &				                          dropsource1d,rainrate1d,evaprate1d,           &
#endif													#endif
                          kts, kte, dt, ii, jj)								                          kts, kte, dt, ii, jj)

      implicit none											      implicit none

!..Sub arguments											!..Sub arguments
      INTEGER, INTENT(IN):: kts, kte, ii, jj								      INTEGER, INTENT(IN):: kts, kte, ii, jj
      REAL, DIMENSION(kts:kte), INTENT(INOUT):: &							      REAL, DIMENSION(kts:kte), INTENT(INOUT):: &
                          qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &					                          qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
                          nr1d, nc1d, nwfa1d, nifa1d, t1d						                          nr1d, nc1d, nwfa1d, nifa1d, t1d
      REAL, DIMENSION(kts:kte), INTENT(IN):: p1d, w1d, dzq						      REAL, DIMENSION(kts:kte), INTENT(IN):: p1d, w1d, dzq
      REAL, INTENT(INOUT):: pptrain, pptsnow, pptgraul, pptice						      REAL, INTENT(INOUT):: pptrain, pptsnow, pptgraul, pptice
      REAL, INTENT(IN):: dt										      REAL, INTENT(IN):: dt
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
      REAL, DIMENSION(kts:kte), INTENT(INOUT):: &							      REAL, DIMENSION(kts:kte), INTENT(INOUT):: &
                          rainprod, evapprod								                          rainprod, evapprod
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      INTEGER,INTENT(IN) :: indirect_feed_chimere,n_bin							      INTEGER,INTENT(IN) :: indirect_feed_chimere,n_bin
      REAL,INTENT(IN),DIMENSION(n_bin+1) :: sect							      REAL,INTENT(IN),DIMENSION(n_bin+1) :: sect
      REAL,DIMENSION(kts:kte),INTENT(IN) :: hygro_aer1d,ice_nucl1d,wtke1d,lcldf1d  			      REAL,DIMENSION(kts:kte),INTENT(IN) :: hygro_aer1d,ice_nucl1d,wtke1d,lcldf1d  
      REAL,DIMENSION(kts:kte,n_bin),INTENT(IN) :: num_aer1d,num_hygro_aer1d 				      REAL,DIMENSION(kts:kte,n_bin),INTENT(IN) :: num_aer1d,num_hygro_aer1d 
      REAL,DIMENSION(kts:kte),INTENT(OUT) :: dropsource1d,rainrate1d,evaprate1d 			      REAL,DIMENSION(kts:kte),INTENT(OUT) :: dropsource1d,rainrate1d,evaprate1d
												   >	      REAL,DIMENSION(n_bin) :: num_aer_tmp
												   >	      REAL ::  nc_tmp 
#endif													#endif

!..Local variables											!..Local variables
      REAL, DIMENSION(kts:kte):: tten, qvten, qcten, qiten, &						      REAL, DIMENSION(kts:kte):: tten, qvten, qcten, qiten, &
           qrten, qsten, qgten, niten, nrten, ncten, nwfaten, nifaten					           qrten, qsten, qgten, niten, nrten, ncten, nwfaten, nifaten

      DOUBLE PRECISION, DIMENSION(kts:kte):: prw_vcd							      DOUBLE PRECISION, DIMENSION(kts:kte):: prw_vcd

      DOUBLE PRECISION, DIMENSION(kts:kte):: pnc_wcd, pnc_wau, pnc_rcw, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: pnc_wcd, pnc_wau, pnc_rcw, &
           pnc_scw, pnc_gcw										           pnc_scw, pnc_gcw

      DOUBLE PRECISION, DIMENSION(kts:kte):: pna_rca, pna_sca, pna_gca, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: pna_rca, pna_sca, pna_gca, &
           pnd_rcd, pnd_scd, pnd_gcd									           pnd_rcd, pnd_scd, pnd_gcd

      DOUBLE PRECISION, DIMENSION(kts:kte):: prr_wau, prr_rcw, prr_rcs, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: prr_wau, prr_rcw, prr_rcs, &
           prr_rcg, prr_sml, prr_gml, &									           prr_rcg, prr_sml, prr_gml, &
           prr_rci, prv_rev,          &									           prr_rci, prv_rev,          &
           pnr_wau, pnr_rcs, pnr_rcg, &									           pnr_wau, pnr_rcs, pnr_rcg, &
           pnr_rci, pnr_sml, pnr_gml, &									           pnr_rci, pnr_sml, pnr_gml, &
           pnr_rev, pnr_rcr, pnr_rfz									           pnr_rev, pnr_rcr, pnr_rfz

      DOUBLE PRECISION, DIMENSION(kts:kte):: pri_inu, pni_inu, pri_ihm, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: pri_inu, pni_inu, pri_ihm, &
           pni_ihm, pri_wfz, pni_wfz, &									           pni_ihm, pri_wfz, pni_wfz, &
           pri_rfz, pni_rfz, pri_ide, &									           pri_rfz, pni_rfz, pri_ide, &
           pni_ide, pri_rci, pni_rci, &									           pni_ide, pri_rci, pni_rci, &
           pni_sci, pni_iau, pri_iha, pni_iha								           pni_sci, pni_iau, pri_iha, pni_iha

      DOUBLE PRECISION, DIMENSION(kts:kte):: prs_iau, prs_sci, prs_rcs, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: prs_iau, prs_sci, prs_rcs, &
           prs_scw, prs_sde, prs_ihm, &									           prs_scw, prs_sde, prs_ihm, &
           prs_ide											           prs_ide

      DOUBLE PRECISION, DIMENSION(kts:kte):: prg_scw, prg_rfz, prg_gde, &				      DOUBLE PRECISION, DIMENSION(kts:kte):: prg_scw, prg_rfz, prg_gde, &
           prg_gcw, prg_rci, prg_rcs, &									           prg_gcw, prg_rci, prg_rcs, &
           prg_rcg, prg_ihm										           prg_rcg, prg_ihm

      DOUBLE PRECISION, PARAMETER:: zeroD0 = 0.0d0							      DOUBLE PRECISION, PARAMETER:: zeroD0 = 0.0d0

      REAL, DIMENSION(kts:kte):: temp, pres, qv								      REAL, DIMENSION(kts:kte):: temp, pres, qv
      REAL, DIMENSION(kts:kte):: rc, ri, rr, rs, rg, ni, nr, nc, nwfa, nifa				      REAL, DIMENSION(kts:kte):: rc, ri, rr, rs, rg, ni, nr, nc, nwfa, nifa
      REAL, DIMENSION(kts:kte):: rho, rhof, rhof2							      REAL, DIMENSION(kts:kte):: rho, rhof, rhof2
      REAL, DIMENSION(kts:kte):: qvs, qvsi, delQvs							      REAL, DIMENSION(kts:kte):: qvs, qvsi, delQvs
      REAL, DIMENSION(kts:kte):: satw, sati, ssatw, ssati						      REAL, DIMENSION(kts:kte):: satw, sati, ssatw, ssati
      REAL, DIMENSION(kts:kte):: diffu, visco, vsc2, &							      REAL, DIMENSION(kts:kte):: diffu, visco, vsc2, &
           tcond, lvap, ocp, lvt2									           tcond, lvap, ocp, lvt2
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      REAL, DIMENSION(kts:kte,n_bin):: num_aer,num_hygro_aer						      REAL, DIMENSION(kts:kte,n_bin):: num_aer,num_hygro_aer
      REAL, DIMENSION(kts:kte) :: ice_nucl								      REAL, DIMENSION(kts:kte) :: ice_nucl
      REAL, DIMENSION(n_bin)   :: act_frac								      REAL, DIMENSION(n_bin)   :: act_frac
#endif													#endif

      DOUBLE PRECISION, DIMENSION(kts:kte):: ilamr, ilamg, N0_r, N0_g					      DOUBLE PRECISION, DIMENSION(kts:kte):: ilamr, ilamg, N0_r, N0_g
      REAL, DIMENSION(kts:kte):: mvd_r, mvd_c								      REAL, DIMENSION(kts:kte):: mvd_r, mvd_c
      REAL, DIMENSION(kts:kte):: smob, smo2, smo1, smo0, &						      REAL, DIMENSION(kts:kte):: smob, smo2, smo1, smo0, &
           smoc, smod, smoe, smof									           smoc, smod, smoe, smof

      REAL, DIMENSION(kts:kte):: sed_r, sed_s, sed_g, sed_i, sed_n,sed_c				      REAL, DIMENSION(kts:kte):: sed_r, sed_s, sed_g, sed_i, sed_n,sed_c

      REAL:: rgvm, delta_tp, orho, lfus2								      REAL:: rgvm, delta_tp, orho, lfus2
      REAL, DIMENSION(5):: onstep									      REAL, DIMENSION(5):: onstep
      DOUBLE PRECISION:: N0_exp, N0_min, lam_exp, lamc, lamr, lamg					      DOUBLE PRECISION:: N0_exp, N0_min, lam_exp, lamc, lamr, lamg
      DOUBLE PRECISION:: lami, ilami, ilamc								      DOUBLE PRECISION:: lami, ilami, ilamc
      REAL:: xDc, Dc_b, Dc_g, xDi, xDr, xDs, xDg, Ds_m, Dg_m						      REAL:: xDc, Dc_b, Dc_g, xDi, xDr, xDs, xDg, Ds_m, Dg_m
      DOUBLE PRECISION:: Dr_star, Dc_star								      DOUBLE PRECISION:: Dr_star, Dc_star
      REAL:: zeta1, zeta, taud, tau									      REAL:: zeta1, zeta, taud, tau
      REAL:: stoke_r, stoke_s, stoke_g, stoke_i								      REAL:: stoke_r, stoke_s, stoke_g, stoke_i
      REAL:: vti, vtr, vts, vtg, vtc									      REAL:: vti, vtr, vts, vtg, vtc
      REAL, DIMENSION(kts:kte+1):: vtik, vtnik, vtrk, vtnrk, vtsk, vtgk,  &				      REAL, DIMENSION(kts:kte+1):: vtik, vtnik, vtrk, vtnrk, vtsk, vtgk,  &
           vtck, vtnck											           vtck, vtnck
      REAL, DIMENSION(kts:kte):: vts_boost								      REAL, DIMENSION(kts:kte):: vts_boost
      REAL:: Mrat, ils1, ils2, t1_vts, t2_vts, t3_vts, t4_vts, C_snow					      REAL:: Mrat, ils1, ils2, t1_vts, t2_vts, t3_vts, t4_vts, C_snow
      REAL:: a_, b_, loga_, A1, A2, tf									      REAL:: a_, b_, loga_, A1, A2, tf
      REAL:: tempc, tc0, r_mvd1, r_mvd2, xkrat								      REAL:: tempc, tc0, r_mvd1, r_mvd2, xkrat
      REAL:: xnc, xri, xni, xmi, oxmi, xrc, xrr, xnr							      REAL:: xnc, xri, xni, xmi, oxmi, xrc, xrr, xnr
      REAL:: xsat, rate_max, sump, ratio								      REAL:: xsat, rate_max, sump, ratio
      REAL:: clap, fcd, dfcd										      REAL:: clap, fcd, dfcd
      REAL:: otemp, rvs, rvs_p, rvs_pp, gamsc, alphsc, t1_evap, t1_subl					      REAL:: otemp, rvs, rvs_p, rvs_pp, gamsc, alphsc, t1_evap, t1_subl
      REAL:: r_frac, g_frac										      REAL:: r_frac, g_frac
      REAL:: Ef_rw, Ef_sw, Ef_gw, Ef_rr									      REAL:: Ef_rw, Ef_sw, Ef_gw, Ef_rr
      REAL:: Ef_ra, Ef_sa, Ef_ga									      REAL:: Ef_ra, Ef_sa, Ef_ga
      REAL:: dtsave, odts, odt, odzq, hgt_agl								      REAL:: dtsave, odts, odt, odzq, hgt_agl
      REAL:: xslw1, ygra1, zans1, eva_factor								      REAL:: xslw1, ygra1, zans1, eva_factor
      INTEGER:: i, k, k2, n, nn, nstep, k_0, kbot, IT, iexfrq						      INTEGER:: i, k, k2, n, nn, nstep, k_0, kbot, IT, iexfrq
      INTEGER, DIMENSION(5):: ksed1									      INTEGER, DIMENSION(5):: ksed1
      INTEGER:: nir, nis, nig, nii, nic, niin								      INTEGER:: nir, nis, nig, nii, nic, niin
      INTEGER:: idx_tc, idx_t, idx_s, idx_g1, idx_g, idx_r1, idx_r,     &				      INTEGER:: idx_tc, idx_t, idx_s, idx_g1, idx_g, idx_r1, idx_r,     &
                idx_i1, idx_i, idx_c, idx, idx_d, idx_n, idx_in						                idx_i1, idx_i, idx_c, idx, idx_d, idx_n, idx_in

      LOGICAL:: melti, no_micro										      LOGICAL:: melti, no_micro
      LOGICAL, DIMENSION(kts:kte):: L_qc, L_qi, L_qr, L_qs, L_qg					      LOGICAL, DIMENSION(kts:kte):: L_qc, L_qi, L_qr, L_qs, L_qg
      LOGICAL:: debug_flag										      LOGICAL:: debug_flag
      CHARACTER*256:: mp_debug										      CHARACTER*256:: mp_debug
      INTEGER:: nu_c											      INTEGER:: nu_c

!+---+													!+---+

      debug_flag = .false.										      debug_flag = .false.
!     if (ii.eq.901 .and. jj.eq.379) debug_flag = .true.						!     if (ii.eq.901 .and. jj.eq.379) debug_flag = .true.
      if(debug_flag) then										      if(debug_flag) then
        write(mp_debug, *) 'DEBUG INFO, mp_thompson at (i,j) ', ii, ', ', jj				        write(mp_debug, *) 'DEBUG INFO, mp_thompson at (i,j) ', ii, ', ', jj
        CALL wrf_debug(550, mp_debug)									        CALL wrf_debug(550, mp_debug)
      endif												      endif

      no_micro = .true.											      no_micro = .true.
      dtsave = dt											      dtsave = dt
      odt = 1./dt											      odt = 1./dt
      odts = 1./dtsave											      odts = 1./dtsave
      iexfrq = 1											      iexfrq = 1

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. Source/sink terms.  First 2 chars: "pr" represents source/sink of					!.. Source/sink terms.  First 2 chars: "pr" represents source/sink of
!.. mass while "pn" represents source/sink of number.  Next char is one					!.. mass while "pn" represents source/sink of number.  Next char is one
!.. of "v" for water vapor, "r" for rain, "i" for cloud ice, "w" for					!.. of "v" for water vapor, "r" for rain, "i" for cloud ice, "w" for
!.. cloud water, "s" for snow, and "g" for graupel.  Next chars						!.. cloud water, "s" for snow, and "g" for graupel.  Next chars
!.. represent processes: "de" for sublimation/deposition, "ev" for					!.. represent processes: "de" for sublimation/deposition, "ev" for
!.. evaporation, "fz" for freezing, "ml" for melting, "au" for						!.. evaporation, "fz" for freezing, "ml" for melting, "au" for
!.. autoconversion, "nu" for ice nucleation, "hm" for Hallet/Mossop					!.. autoconversion, "nu" for ice nucleation, "hm" for Hallet/Mossop
!.. secondary ice production, and "c" for collection followed by the					!.. secondary ice production, and "c" for collection followed by the
!.. character for the species being collected.  ALL of these terms are					!.. character for the species being collected.  ALL of these terms are
!.. positive (except for deposition/sublimation terms which can switch					!.. positive (except for deposition/sublimation terms which can switch
!.. signs based on super/subsaturation) and are treated as negatives					!.. signs based on super/subsaturation) and are treated as negatives
!.. where necessary in the tendency equations.								!.. where necessary in the tendency equations.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      do k = kts, kte											      do k = kts, kte
         tten(k) = 0.											         tten(k) = 0.
         qvten(k) = 0.											         qvten(k) = 0.
         qcten(k) = 0.											         qcten(k) = 0.
         qiten(k) = 0.											         qiten(k) = 0.
         qrten(k) = 0.											         qrten(k) = 0.
         qsten(k) = 0.											         qsten(k) = 0.
         qgten(k) = 0.											         qgten(k) = 0.
         niten(k) = 0.											         niten(k) = 0.
         nrten(k) = 0.											         nrten(k) = 0.
         ncten(k) = 0.											         ncten(k) = 0.
         nwfaten(k) = 0.										         nwfaten(k) = 0.
         nifaten(k) = 0.										         nifaten(k) = 0.

         prw_vcd(k) = 0.										         prw_vcd(k) = 0.

         pnc_wcd(k) = 0.										         pnc_wcd(k) = 0.
         pnc_wau(k) = 0.										         pnc_wau(k) = 0.
         pnc_rcw(k) = 0.										         pnc_rcw(k) = 0.
         pnc_scw(k) = 0.										         pnc_scw(k) = 0.
         pnc_gcw(k) = 0.										         pnc_gcw(k) = 0.

         prv_rev(k) = 0.										         prv_rev(k) = 0.
         prr_wau(k) = 0.										         prr_wau(k) = 0.
         prr_rcw(k) = 0.										         prr_rcw(k) = 0.
         prr_rcs(k) = 0.										         prr_rcs(k) = 0.
         prr_rcg(k) = 0.										         prr_rcg(k) = 0.
         prr_sml(k) = 0.										         prr_sml(k) = 0.
         prr_gml(k) = 0.										         prr_gml(k) = 0.
         prr_rci(k) = 0.										         prr_rci(k) = 0.
         pnr_wau(k) = 0.										         pnr_wau(k) = 0.
         pnr_rcs(k) = 0.										         pnr_rcs(k) = 0.
         pnr_rcg(k) = 0.										         pnr_rcg(k) = 0.
         pnr_rci(k) = 0.										         pnr_rci(k) = 0.
         pnr_sml(k) = 0.										         pnr_sml(k) = 0.
         pnr_gml(k) = 0.										         pnr_gml(k) = 0.
         pnr_rev(k) = 0.										         pnr_rev(k) = 0.
         pnr_rcr(k) = 0.										         pnr_rcr(k) = 0.
         pnr_rfz(k) = 0.										         pnr_rfz(k) = 0.

         pri_inu(k) = 0.										         pri_inu(k) = 0.
         pni_inu(k) = 0.										         pni_inu(k) = 0.
         pri_ihm(k) = 0.										         pri_ihm(k) = 0.
         pni_ihm(k) = 0.										         pni_ihm(k) = 0.
         pri_wfz(k) = 0.										         pri_wfz(k) = 0.
         pni_wfz(k) = 0.										         pni_wfz(k) = 0.
         pri_rfz(k) = 0.										         pri_rfz(k) = 0.
         pni_rfz(k) = 0.										         pni_rfz(k) = 0.
         pri_ide(k) = 0.										         pri_ide(k) = 0.
         pni_ide(k) = 0.										         pni_ide(k) = 0.
         pri_rci(k) = 0.										         pri_rci(k) = 0.
         pni_rci(k) = 0.										         pni_rci(k) = 0.
         pni_sci(k) = 0.										         pni_sci(k) = 0.
         pni_iau(k) = 0.										         pni_iau(k) = 0.
         pri_iha(k) = 0.										         pri_iha(k) = 0.
         pni_iha(k) = 0.										         pni_iha(k) = 0.

         prs_iau(k) = 0.										         prs_iau(k) = 0.
         prs_sci(k) = 0.										         prs_sci(k) = 0.
         prs_rcs(k) = 0.										         prs_rcs(k) = 0.
         prs_scw(k) = 0.										         prs_scw(k) = 0.
         prs_sde(k) = 0.										         prs_sde(k) = 0.
         prs_ihm(k) = 0.										         prs_ihm(k) = 0.
         prs_ide(k) = 0.										         prs_ide(k) = 0.

         prg_scw(k) = 0.										         prg_scw(k) = 0.
         prg_rfz(k) = 0.										         prg_rfz(k) = 0.
         prg_gde(k) = 0.										         prg_gde(k) = 0.
         prg_gcw(k) = 0.										         prg_gcw(k) = 0.
         prg_rci(k) = 0.										         prg_rci(k) = 0.
         prg_rcs(k) = 0.										         prg_rcs(k) = 0.
         prg_rcg(k) = 0.										         prg_rcg(k) = 0.
         prg_ihm(k) = 0.										         prg_ihm(k) = 0.

         pna_rca(k) = 0.										         pna_rca(k) = 0.
         pna_sca(k) = 0.										         pna_sca(k) = 0.
         pna_gca(k) = 0.										         pna_gca(k) = 0.

         pnd_rcd(k) = 0.										         pnd_rcd(k) = 0.
         pnd_scd(k) = 0.										         pnd_scd(k) = 0.
         pnd_gcd(k) = 0.										         pnd_gcd(k) = 0.
      enddo												      enddo
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
      do k = kts, kte											      do k = kts, kte
         rainprod(k) = 0.										         rainprod(k) = 0.
         evapprod(k) = 0.										         evapprod(k) = 0.
      enddo												      enddo
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      do k = kts,kte											      do k = kts,kte
         rainrate1d(k) = 0.										         rainrate1d(k) = 0.
         evaprate1d(k) = 0.										         evaprate1d(k) = 0.
      enddo												      enddo
#endif													#endif

!..Bug fix (2016Jun15), prevent use of uninitialized value(s) of snow moments.				!..Bug fix (2016Jun15), prevent use of uninitialized value(s) of snow moments.
      do k = kts, kte											      do k = kts, kte
         smo0(k) = 0.											         smo0(k) = 0.
         smo1(k) = 0.											         smo1(k) = 0.
         smo2(k) = 0.											         smo2(k) = 0.
         smob(k) = 0.											         smob(k) = 0.
         smoc(k) = 0.											         smoc(k) = 0.
         smod(k) = 0.											         smod(k) = 0.
         smoe(k) = 0.											         smoe(k) = 0.
         smof(k) = 0.											         smof(k) = 0.
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Put column of data into local arrays.								!..Put column of data into local arrays.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         temp(k) = t1d(k)										         temp(k) = t1d(k)
         qv(k) = MAX(1.E-10, qv1d(k))									         qv(k) = MAX(1.E-10, qv1d(k))
         pres(k) = p1d(k)										         pres(k) = p1d(k)
         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))						         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))
         nwfa(k) = MAX(11.1E6, MIN(9999.E6, nwfa1d(k)*rho(k)))						         nwfa(k) = MAX(11.1E6, MIN(9999.E6, nwfa1d(k)*rho(k)))
         nifa(k) = MAX(naIN1*0.01, MIN(9999.E6, nifa1d(k)*rho(k)))					         nifa(k) = MAX(naIN1*0.01, MIN(9999.E6, nifa1d(k)*rho(k)))
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
         if(indirect_feed_chimere==1) then								         if(indirect_feed_chimere==1) then
            num_aer(k,:) = num_aer1d(k,:)*rho(k)							            num_aer(k,:) = num_aer1d(k,:)*rho(k)
            num_hygro_aer(k,:) = num_hygro_aer1d(k,:)*rho(k)						            num_hygro_aer(k,:) = num_hygro_aer1d(k,:)*rho(k)
            ice_nucl(k) = ice_nucl1d(k)*rho(k)								            ice_nucl(k) = ice_nucl1d(k)*rho(k)
         endif												         endif
#endif													#endif
         if (qc1d(k) .gt. R1) then									         if (qc1d(k) .gt. R1) then
            no_micro = .false.										            no_micro = .false.
            rc(k) = qc1d(k)*rho(k)									            rc(k) = qc1d(k)*rho(k)
            nc(k) = MAX(2., nc1d(k)*rho(k))								            nc(k) = MAX(2., nc1d(k)*rho(k))
            L_qc(k) = .true.										            L_qc(k) = .true.
            nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)							            nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)
            lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr					            lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr
            xDc = (bm_r + nu_c + 1.) / lamc								            xDc = (bm_r + nu_c + 1.) / lamc
            if (xDc.lt. D0c) then									            if (xDc.lt. D0c) then
             lamc = cce(2,nu_c)/D0c									             lamc = cce(2,nu_c)/D0c
            elseif (xDc.gt. D0r*2.) then								            elseif (xDc.gt. D0r*2.) then
             lamc = cce(2,nu_c)/(D0r*2.)								             lamc = cce(2,nu_c)/(D0r*2.)
            endif											            endif
            nc(k) = MIN( DBLE(Nt_c_max), ccg(1,nu_c)*ocg2(nu_c)*rc(k)   &				            nc(k) = MIN( DBLE(Nt_c_max), ccg(1,nu_c)*ocg2(nu_c)*rc(k)   &
                  / am_r*lamc**bm_r)									                  / am_r*lamc**bm_r)
            if (.NOT. is_aerosol_aware) nc(k) = Nt_c							            if (.NOT. is_aerosol_aware) nc(k) = Nt_c
         else												         else
            qc1d(k) = 0.0										            qc1d(k) = 0.0
            nc1d(k) = 0.0										            nc1d(k) = 0.0
            rc(k) = R1											            rc(k) = R1
            nc(k) = 2.											            nc(k) = 2.
            L_qc(k) = .false.										            L_qc(k) = .false.
         endif												         endif

         if (qi1d(k) .gt. R1) then									         if (qi1d(k) .gt. R1) then
            no_micro = .false.										            no_micro = .false.
            ri(k) = qi1d(k)*rho(k)									            ri(k) = qi1d(k)*rho(k)
            ni(k) = MAX(R2, ni1d(k)*rho(k))								            ni(k) = MAX(R2, ni1d(k)*rho(k))
            if (ni(k).le. R2) then									            if (ni(k).le. R2) then
               lami = cie(2)/25.E-6									               lami = cie(2)/25.E-6
               ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i)					               ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
            endif											            endif
            L_qi(k) = .true.										            L_qi(k) = .true.
            lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi							            lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
            ilami = 1./lami										            ilami = 1./lami
            xDi = (bm_i + mu_i + 1.) * ilami								            xDi = (bm_i + mu_i + 1.) * ilami
            if (xDi.lt. 5.E-6) then									            if (xDi.lt. 5.E-6) then
             lami = cie(2)/5.E-6									             lami = cie(2)/5.E-6
             ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i)					             ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
            elseif (xDi.gt. 300.E-6) then								            elseif (xDi.gt. 300.E-6) then
             lami = cie(2)/300.E-6									             lami = cie(2)/300.E-6
             ni(k) = cig(1)*oig2*ri(k)/am_i*lami**bm_i							             ni(k) = cig(1)*oig2*ri(k)/am_i*lami**bm_i
            endif											            endif
         else												         else
            qi1d(k) = 0.0										            qi1d(k) = 0.0
            ni1d(k) = 0.0										            ni1d(k) = 0.0
            ri(k) = R1											            ri(k) = R1
            ni(k) = R2											            ni(k) = R2
            L_qi(k) = .false.										            L_qi(k) = .false.
         endif												         endif

         if (qr1d(k) .gt. R1) then									         if (qr1d(k) .gt. R1) then
            no_micro = .false.										            no_micro = .false.
            rr(k) = qr1d(k)*rho(k)									            rr(k) = qr1d(k)*rho(k)
            nr(k) = MAX(R2, nr1d(k)*rho(k))								            nr(k) = MAX(R2, nr1d(k)*rho(k))
            if (nr(k).le. R2) then									            if (nr(k).le. R2) then
               mvd_r(k) = 1.0E-3									               mvd_r(k) = 1.0E-3
               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r						               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r
            endif											            endif
            L_qr(k) = .true.										            L_qr(k) = .true.
            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
            mvd_r(k) = (3.0 + mu_r + 0.672) / lamr							            mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
            if (mvd_r(k) .gt. 2.5E-3) then								            if (mvd_r(k) .gt. 2.5E-3) then
               mvd_r(k) = 2.5E-3									               mvd_r(k) = 2.5E-3
               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r						               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r
            elseif (mvd_r(k) .lt. D0r*0.75) then							            elseif (mvd_r(k) .lt. D0r*0.75) then
               mvd_r(k) = D0r*0.75									               mvd_r(k) = D0r*0.75
               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r						               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r
            endif											            endif
         else												         else
            qr1d(k) = 0.0										            qr1d(k) = 0.0
            nr1d(k) = 0.0										            nr1d(k) = 0.0
            rr(k) = R1											            rr(k) = R1
            nr(k) = R2											            nr(k) = R2
            L_qr(k) = .false.										            L_qr(k) = .false.
         endif												         endif
         if (qs1d(k) .gt. R1) then									         if (qs1d(k) .gt. R1) then
            no_micro = .false.										            no_micro = .false.
            rs(k) = qs1d(k)*rho(k)									            rs(k) = qs1d(k)*rho(k)
            L_qs(k) = .true.										            L_qs(k) = .true.
         else												         else
            qs1d(k) = 0.0										            qs1d(k) = 0.0
            rs(k) = R1											            rs(k) = R1
            L_qs(k) = .false.										            L_qs(k) = .false.
         endif												         endif
         if (qg1d(k) .gt. R1) then									         if (qg1d(k) .gt. R1) then
            no_micro = .false.										            no_micro = .false.
            rg(k) = qg1d(k)*rho(k)									            rg(k) = qg1d(k)*rho(k)
            L_qg(k) = .true.										            L_qg(k) = .true.
         else												         else
            qg1d(k) = 0.0										            qg1d(k) = 0.0
            rg(k) = R1											            rg(k) = R1
            L_qg(k) = .false.										            L_qg(k) = .false.
         endif												         endif
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!     if (debug_flag) then										!     if (debug_flag) then
!      write(mp_debug,*) 'DEBUG-VERBOSE at (i,j) ', ii, ', ', jj					!      write(mp_debug,*) 'DEBUG-VERBOSE at (i,j) ', ii, ', ', jj
!      CALL wrf_debug(550, mp_debug)									!      CALL wrf_debug(550, mp_debug)
!      do k = kts, kte											!      do k = kts, kte
!        write(mp_debug, '(a,i3,f8.2,1x,f7.2,1x, 11(1x,e13.6))')        &				!        write(mp_debug, '(a,i3,f8.2,1x,f7.2,1x, 11(1x,e13.6))')        &
!    &              'VERBOSE: ', k, pres(k)*0.01, temp(k)-273.15, qv(k), rc(k), rr(k), ri(k), rs	!    &              'VERBOSE: ', k, pres(k)*0.01, temp(k)-273.15, qv(k), rc(k), rr(k), ri(k), rs
!        CALL wrf_debug(550, mp_debug)									!        CALL wrf_debug(550, mp_debug)
!      enddo												!      enddo
!     endif												!     endif
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Derive various thermodynamic variables frequently used.						!..Derive various thermodynamic variables frequently used.
!.. Saturation vapor pressure (mixing ratio) over liquid/ice comes from					!.. Saturation vapor pressure (mixing ratio) over liquid/ice comes from
!.. Flatau et al. 1992; enthalpy (latent heat) of vaporization from					!.. Flatau et al. 1992; enthalpy (latent heat) of vaporization from
!.. Bohren & Albrecht 1998; others from Pruppacher & Klett 1978.					!.. Bohren & Albrecht 1998; others from Pruppacher & Klett 1978.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         tempc = temp(k) - 273.15									         tempc = temp(k) - 273.15
         rhof(k) = SQRT(RHO_NOT/rho(k))									         rhof(k) = SQRT(RHO_NOT/rho(k))
         rhof2(k) = SQRT(rhof(k))									         rhof2(k) = SQRT(rhof(k))
         qvs(k) = rslf(pres(k), temp(k))								         qvs(k) = rslf(pres(k), temp(k))
         delQvs(k) = MAX(0.0, rslf(pres(k), 273.15)-qv(k))						         delQvs(k) = MAX(0.0, rslf(pres(k), 273.15)-qv(k))
         if (tempc .le. 0.0) then									         if (tempc .le. 0.0) then
          qvsi(k) = rsif(pres(k), temp(k))								          qvsi(k) = rsif(pres(k), temp(k))
         else												         else
          qvsi(k) = qvs(k)										          qvsi(k) = qvs(k)
         endif												         endif
         satw(k) = qv(k)/qvs(k)										         satw(k) = qv(k)/qvs(k)
         sati(k) = qv(k)/qvsi(k)									         sati(k) = qv(k)/qvsi(k)
         ssatw(k) = satw(k) - 1.									         ssatw(k) = satw(k) - 1.
         ssati(k) = sati(k) - 1.									         ssati(k) = sati(k) - 1.
         if (abs(ssatw(k)).lt. eps) ssatw(k) = 0.0							         if (abs(ssatw(k)).lt. eps) ssatw(k) = 0.0
         if (abs(ssati(k)).lt. eps) ssati(k) = 0.0							         if (abs(ssati(k)).lt. eps) ssati(k) = 0.0
         if (no_micro .and. ssati(k).gt. 0.0) no_micro = .false.					         if (no_micro .and. ssati(k).gt. 0.0) no_micro = .false.
         diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))					         diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))
         if (tempc .ge. 0.0) then									         if (tempc .ge. 0.0) then
            visco(k) = (1.718+0.0049*tempc)*1.0E-5							            visco(k) = (1.718+0.0049*tempc)*1.0E-5
         else												         else
            visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5					            visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5
         endif												         endif
         ocp(k) = 1./(Cp*(1.+0.887*qv(k)))								         ocp(k) = 1./(Cp*(1.+0.887*qv(k)))
         vsc2(k) = SQRT(rho(k)/visco(k))								         vsc2(k) = SQRT(rho(k)/visco(k))
         lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc							         lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc
         tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936						         tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..If no existing hydrometeor species and no chance to initiate ice or					!..If no existing hydrometeor species and no chance to initiate ice or
!.. condense cloud water, just exit quickly!								!.. condense cloud water, just exit quickly!
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      if (no_micro) return										      if (no_micro) return

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope, and useful moments for snow.						!..Calculate y-intercept, slope, and useful moments for snow.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      if (.not. iiwarm) then										      if (.not. iiwarm) then
      do k = kts, kte											      do k = kts, kte
         if (.not. L_qs(k)) CYCLE									         if (.not. L_qs(k)) CYCLE
         tc0 = MIN(-0.1, temp(k)-273.15)								         tc0 = MIN(-0.1, temp(k)-273.15)
         smob(k) = rs(k)*oams										         smob(k) = rs(k)*oams

!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,					!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,
!.. then we must compute actual 2nd moment and use as reference.					!.. then we must compute actual 2nd moment and use as reference.
         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then					         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then
            smo2(k) = smob(k)										            smo2(k) = smob(k)
         else												         else
            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &							            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &
               + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &							               + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &
               + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &							               + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &
               + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &						               + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &
               + sa(10)*bm_s*bm_s*bm_s									               + sa(10)*bm_s*bm_s*bm_s
            a_ = 10.0**loga_										            a_ = 10.0**loga_
            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &							            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &
               + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &							               + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &
               + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &							               + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &
               + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &						               + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &
               + sb(10)*bm_s*bm_s*bm_s									               + sb(10)*bm_s*bm_s*bm_s
            smo2(k) = (smob(k)/a_)**(1./b_)								            smo2(k) = (smob(k)/a_)**(1./b_)
         endif												         endif

!..Calculate 0th moment.  Represents snow number concentration.						!..Calculate 0th moment.  Represents snow number concentration.
         loga_ = sa(1) + sa(2)*tc0 + sa(5)*tc0*tc0 + sa(9)*tc0*tc0*tc0					         loga_ = sa(1) + sa(2)*tc0 + sa(5)*tc0*tc0 + sa(9)*tc0*tc0*tc0
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1) + sb(2)*tc0 + sb(5)*tc0*tc0 + sb(9)*tc0*tc0*tc0					         b_ = sb(1) + sb(2)*tc0 + sb(5)*tc0*tc0 + sb(9)*tc0*tc0*tc0
         smo0(k) = a_ * smo2(k)**b_									         smo0(k) = a_ * smo2(k)**b_

!..Calculate 1st moment.  Useful for depositional growth and melting.					!..Calculate 1st moment.  Useful for depositional growth and melting.
         loga_ = sa(1) + sa(2)*tc0 + sa(3) &								         loga_ = sa(1) + sa(2)*tc0 + sa(3) &
               + sa(4)*tc0 + sa(5)*tc0*tc0 &								               + sa(4)*tc0 + sa(5)*tc0*tc0 &
               + sa(6) + sa(7)*tc0*tc0 &								               + sa(6) + sa(7)*tc0*tc0 &
               + sa(8)*tc0 + sa(9)*tc0*tc0*tc0 &							               + sa(8)*tc0 + sa(9)*tc0*tc0*tc0 &
               + sa(10)											               + sa(10)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3) + sb(4)*tc0 &							         b_ = sb(1)+ sb(2)*tc0 + sb(3) + sb(4)*tc0 &
              + sb(5)*tc0*tc0 + sb(6) &									              + sb(5)*tc0*tc0 + sb(6) &
              + sb(7)*tc0*tc0 + sb(8)*tc0 &								              + sb(7)*tc0*tc0 + sb(8)*tc0 &
              + sb(9)*tc0*tc0*tc0 + sb(10)								              + sb(9)*tc0*tc0*tc0 + sb(10)
         smo1(k) = a_ * smo2(k)**b_									         smo1(k) = a_ * smo2(k)**b_

!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.						!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &
               + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &							               + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &
               + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &						               + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &
               + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &						               + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &
               + sa(10)*cse(1)*cse(1)*cse(1)								               + sa(10)*cse(1)*cse(1)*cse(1)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &
              + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &							              + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &
              + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &					              + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &
              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)						              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)
         smoc(k) = a_ * smo2(k)**b_									         smoc(k) = a_ * smo2(k)**b_

!..Calculate bv_s+2 (th) moment.  Useful for riming.							!..Calculate bv_s+2 (th) moment.  Useful for riming.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(13) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(13) &
               + sa(4)*tc0*cse(13) + sa(5)*tc0*tc0 &							               + sa(4)*tc0*cse(13) + sa(5)*tc0*tc0 &
               + sa(6)*cse(13)*cse(13) + sa(7)*tc0*tc0*cse(13) &					               + sa(6)*cse(13)*cse(13) + sa(7)*tc0*tc0*cse(13) &
               + sa(8)*tc0*cse(13)*cse(13) + sa(9)*tc0*tc0*tc0 &					               + sa(8)*tc0*cse(13)*cse(13) + sa(9)*tc0*tc0*tc0 &
               + sa(10)*cse(13)*cse(13)*cse(13)								               + sa(10)*cse(13)*cse(13)*cse(13)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(13) + sb(4)*tc0*cse(13) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(13) + sb(4)*tc0*cse(13) &
              + sb(5)*tc0*tc0 + sb(6)*cse(13)*cse(13) &							              + sb(5)*tc0*tc0 + sb(6)*cse(13)*cse(13) &
              + sb(7)*tc0*tc0*cse(13) + sb(8)*tc0*cse(13)*cse(13) &					              + sb(7)*tc0*tc0*cse(13) + sb(8)*tc0*cse(13)*cse(13) &
              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(13)*cse(13)*cse(13)					              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(13)*cse(13)*cse(13)
         smoe(k) = a_ * smo2(k)**b_									         smoe(k) = a_ * smo2(k)**b_

!..Calculate 1+(bv_s+1)/2 (th) moment.  Useful for depositional growth.					!..Calculate 1+(bv_s+1)/2 (th) moment.  Useful for depositional growth.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(16) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(16) &
               + sa(4)*tc0*cse(16) + sa(5)*tc0*tc0 &							               + sa(4)*tc0*cse(16) + sa(5)*tc0*tc0 &
               + sa(6)*cse(16)*cse(16) + sa(7)*tc0*tc0*cse(16) &					               + sa(6)*cse(16)*cse(16) + sa(7)*tc0*tc0*cse(16) &
               + sa(8)*tc0*cse(16)*cse(16) + sa(9)*tc0*tc0*tc0 &					               + sa(8)*tc0*cse(16)*cse(16) + sa(9)*tc0*tc0*tc0 &
               + sa(10)*cse(16)*cse(16)*cse(16)								               + sa(10)*cse(16)*cse(16)*cse(16)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(16) + sb(4)*tc0*cse(16) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(16) + sb(4)*tc0*cse(16) &
              + sb(5)*tc0*tc0 + sb(6)*cse(16)*cse(16) &							              + sb(5)*tc0*tc0 + sb(6)*cse(16)*cse(16) &
              + sb(7)*tc0*tc0*cse(16) + sb(8)*tc0*cse(16)*cse(16) &					              + sb(7)*tc0*tc0*cse(16) + sb(8)*tc0*cse(16)*cse(16) &
              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(16)*cse(16)*cse(16)					              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(16)*cse(16)*cse(16)
         smof(k) = a_ * smo2(k)**b_									         smof(k) = a_ * smo2(k)**b_

      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope values for graupel.							!..Calculate y-intercept, slope values for graupel.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      N0_min = gonv_max											      N0_min = gonv_max
      k_0 = kts												      k_0 = kts
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)							         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)
      enddo												      enddo
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then					         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then
            xslw1 = 4.01 + alog10(mvd_r(k))								            xslw1 = 4.01 + alog10(mvd_r(k))
         else												         else
            xslw1 = 0.01										            xslw1 = 0.01
         endif												         endif
         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))							         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))
         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))		         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))
         N0_exp = 10.**(zans1)										         N0_exp = 10.**(zans1)
         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))					         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
         N0_min = MIN(N0_exp, N0_min)									         N0_min = MIN(N0_exp, N0_min)
         N0_exp = N0_min										         N0_exp = N0_min
         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1							         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg							         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
         ilamg(k) = 1./lamg										         ilamg(k) = 1./lamg
         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)						         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
      enddo												      enddo

      endif												      endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope values for rain.							!..Calculate y-intercept, slope values for rain.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kte, kts, -1										      do k = kte, kts, -1
         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
         ilamr(k) = 1./lamr										         ilamr(k) = 1./lamr
         mvd_r(k) = (3.0 + mu_r + 0.672) / lamr								         mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
         N0_r(k) = nr(k)*org2*lamr**cre(2)								         N0_r(k) = nr(k)*org2*lamr**cre(2)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Compute warm-rain process terms (except evap done later).						!..Compute warm-rain process terms (except evap done later).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      do k = kts, kte											      do k = kts, kte

!..Rain self-collection follows Seifert, 1994 and drop break-up						!..Rain self-collection follows Seifert, 1994 and drop break-up
!.. follows Verlinde and Cotton, 1993.                                        RAIN2M			!.. follows Verlinde and Cotton, 1993.                                        RAIN2M
         if (L_qr(k) .and. mvd_r(k).gt. D0r) then							         if (L_qr(k) .and. mvd_r(k).gt. D0r) then
!-GT      Ef_rr = 1.0											!-GT      Ef_rr = 1.0
!-GT      if (mvd_r(k) .gt. 1500.0E-6) then								!-GT      if (mvd_r(k) .gt. 1500.0E-6) then
             Ef_rr = 1.0 - EXP(2300.0*(mvd_r(k)-1950.0E-6))						             Ef_rr = 1.0 - EXP(2300.0*(mvd_r(k)-1950.0E-6))
!-GT      endif												!-GT      endif
          pnr_rcr(k) = Ef_rr * 2.0*nr(k)*rr(k)								          pnr_rcr(k) = Ef_rr * 2.0*nr(k)*rr(k)
         endif												         endif

         mvd_c(k) = D0c											         mvd_c(k) = D0c
         if (L_qc(k)) then										         if (L_qc(k)) then
          nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)							          nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)
          xDc = MAX(D0c*1.E6, ((rc(k)/(am_r*nc(k)))**obmr) * 1.E6)					          xDc = MAX(D0c*1.E6, ((rc(k)/(am_r*nc(k)))**obmr) * 1.E6)
          lamc = (nc(k)*am_r* ccg(2,nu_c) * ocg1(nu_c) / rc(k))**obmr					          lamc = (nc(k)*am_r* ccg(2,nu_c) * ocg1(nu_c) / rc(k))**obmr
          mvd_c(k) = (3.0+nu_c+0.672) / lamc								          mvd_c(k) = (3.0+nu_c+0.672) / lamc
         endif												         endif

!..Autoconversion follows Berry & Reinhardt (1974) with characteristic					!..Autoconversion follows Berry & Reinhardt (1974) with characteristic
!.. diameters correctly computed from gamma distrib of cloud droplets.					!.. diameters correctly computed from gamma distrib of cloud droplets.
         if (rc(k).gt. 0.01e-3) then									         if (rc(k).gt. 0.01e-3) then
          Dc_g = ((ccg(3,nu_c)*ocg2(nu_c))**obmr / lamc) * 1.E6						          Dc_g = ((ccg(3,nu_c)*ocg2(nu_c))**obmr / lamc) * 1.E6
          Dc_b = (xDc*xDc*xDc*Dc_g*Dc_g*Dc_g - xDc*xDc*xDc*xDc*xDc*xDc) &				          Dc_b = (xDc*xDc*xDc*Dc_g*Dc_g*Dc_g - xDc*xDc*xDc*xDc*xDc*xDc) &
                 **(1./6.)										                 **(1./6.)
          zeta1 = 0.5*((6.25E-6*xDc*Dc_b*Dc_b*Dc_b - 0.4) &						          zeta1 = 0.5*((6.25E-6*xDc*Dc_b*Dc_b*Dc_b - 0.4) &
                     + abs(6.25E-6*xDc*Dc_b*Dc_b*Dc_b - 0.4))						                     + abs(6.25E-6*xDc*Dc_b*Dc_b*Dc_b - 0.4))
          zeta = 0.027*rc(k)*zeta1									          zeta = 0.027*rc(k)*zeta1
          taud = 0.5*((0.5*Dc_b - 7.5) + abs(0.5*Dc_b - 7.5)) + R1					          taud = 0.5*((0.5*Dc_b - 7.5) + abs(0.5*Dc_b - 7.5)) + R1
          tau  = 3.72/(rc(k)*taud)									          tau  = 3.72/(rc(k)*taud)
          prr_wau(k) = zeta/tau										          prr_wau(k) = zeta/tau
          prr_wau(k) = MIN(DBLE(rc(k)*odts), prr_wau(k))						          prr_wau(k) = MIN(DBLE(rc(k)*odts), prr_wau(k))
          pnr_wau(k) = prr_wau(k) / (am_r*nu_c*D0r*D0r*D0r)              ! RAIN2M			          pnr_wau(k) = prr_wau(k) / (am_r*nu_c*D0r*D0r*D0r)              ! RAIN2M
          pnc_wau(k) = MIN(DBLE(nc(k)*odts), prr_wau(k)                 &				          pnc_wau(k) = MIN(DBLE(nc(k)*odts), prr_wau(k)                 &
                     / (am_r*mvd_c(k)*mvd_c(k)*mvd_c(k)))                   ! Qc2M			                     / (am_r*mvd_c(k)*mvd_c(k)*mvd_c(k)))                   ! Qc2M
         endif												         endif

!..Rain collecting cloud water.  In CE, assume Dc<<Dr and vtc=~0.					!..Rain collecting cloud water.  In CE, assume Dc<<Dr and vtc=~0.
         if (L_qr(k) .and. mvd_r(k).gt. D0r .and. mvd_c(k).gt. D0c) then				         if (L_qr(k) .and. mvd_r(k).gt. D0r .and. mvd_c(k).gt. D0c) then
          lamr = 1./ilamr(k)										          lamr = 1./ilamr(k)
          idx = 1 + INT(nbr*DLOG(mvd_r(k)/Dr(1))/DLOG(Dr(nbr)/Dr(1)))					          idx = 1 + INT(nbr*DLOG(mvd_r(k)/Dr(1))/DLOG(Dr(nbr)/Dr(1)))
          idx = MIN(idx, nbr)										          idx = MIN(idx, nbr)
          Ef_rw = t_Efrw(idx, INT(mvd_c(k)*1.E6))							          Ef_rw = t_Efrw(idx, INT(mvd_c(k)*1.E6))
          prr_rcw(k) = rhof(k)*t1_qr_qc*Ef_rw*rc(k)*N0_r(k) &						          prr_rcw(k) = rhof(k)*t1_qr_qc*Ef_rw*rc(k)*N0_r(k) &
                         *((lamr+fv_r)**(-cre(9)))							                         *((lamr+fv_r)**(-cre(9)))
          prr_rcw(k) = MIN(DBLE(rc(k)*odts), prr_rcw(k))						          prr_rcw(k) = MIN(DBLE(rc(k)*odts), prr_rcw(k))
          pnc_rcw(k) = rhof(k)*t1_qr_qc*Ef_rw*nc(k)*N0_r(k)             &				          pnc_rcw(k) = rhof(k)*t1_qr_qc*Ef_rw*nc(k)*N0_r(k)             &
                         *((lamr+fv_r)**(-cre(9)))                          ! Qc2M			                         *((lamr+fv_r)**(-cre(9)))                          ! Qc2M
          pnc_rcw(k) = MIN(DBLE(nc(k)*odts), pnc_rcw(k))						          pnc_rcw(k) = MIN(DBLE(nc(k)*odts), pnc_rcw(k))
         endif												         endif

!..Rain collecting aerosols, wet scavenging.								!..Rain collecting aerosols, wet scavenging.
         if (L_qr(k) .and. mvd_r(k).gt. D0r) then							         if (L_qr(k) .and. mvd_r(k).gt. D0r) then
          Ef_ra = Eff_aero(mvd_r(k),0.04E-6,visco(k),rho(k),temp(k),'r')				          Ef_ra = Eff_aero(mvd_r(k),0.04E-6,visco(k),rho(k),temp(k),'r')
          lamr = 1./ilamr(k)										          lamr = 1./ilamr(k)
          pna_rca(k) = rhof(k)*t1_qr_qc*Ef_ra*nwfa(k)*N0_r(k)           &				          pna_rca(k) = rhof(k)*t1_qr_qc*Ef_ra*nwfa(k)*N0_r(k)           &
                         *((lamr+fv_r)**(-cre(9)))							                         *((lamr+fv_r)**(-cre(9)))
          pna_rca(k) = MIN(DBLE(nwfa(k)*odts), pna_rca(k))						          pna_rca(k) = MIN(DBLE(nwfa(k)*odts), pna_rca(k))

          Ef_ra = Eff_aero(mvd_r(k),0.8E-6,visco(k),rho(k),temp(k),'r')					          Ef_ra = Eff_aero(mvd_r(k),0.8E-6,visco(k),rho(k),temp(k),'r')
          pnd_rcd(k) = rhof(k)*t1_qr_qc*Ef_ra*nifa(k)*N0_r(k)           &				          pnd_rcd(k) = rhof(k)*t1_qr_qc*Ef_ra*nifa(k)*N0_r(k)           &
                         *((lamr+fv_r)**(-cre(9)))							                         *((lamr+fv_r)**(-cre(9)))
          pnd_rcd(k) = MIN(DBLE(nifa(k)*odts), pnd_rcd(k))						          pnd_rcd(k) = MIN(DBLE(nifa(k)*odts), pnd_rcd(k))
         endif												         endif

      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Compute all frozen hydrometeor species' process terms.						!..Compute all frozen hydrometeor species' process terms.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      if (.not. iiwarm) then										      if (.not. iiwarm) then
      do k = kts, kte											      do k = kts, kte
         vts_boost(k) = 1.5										         vts_boost(k) = 1.5

!..Temperature lookup table indexes.									!..Temperature lookup table indexes.
         tempc = temp(k) - 273.15									         tempc = temp(k) - 273.15
         idx_tc = MAX(1, MIN(NINT(-tempc), 45) )							         idx_tc = MAX(1, MIN(NINT(-tempc), 45) )
         idx_t = INT( (tempc-2.5)/5. ) - 1								         idx_t = INT( (tempc-2.5)/5. ) - 1
         idx_t = MAX(1, -idx_t)										         idx_t = MAX(1, -idx_t)
         idx_t = MIN(idx_t, ntb_t)									         idx_t = MIN(idx_t, ntb_t)
         IT = MAX(1, MIN(NINT(-tempc), 31) )								         IT = MAX(1, MIN(NINT(-tempc), 31) )

!..Cloud water lookup table index.									!..Cloud water lookup table index.
         if (rc(k).gt. r_c(1)) then									         if (rc(k).gt. r_c(1)) then
          nic = NINT(ALOG10(rc(k)))									          nic = NINT(ALOG10(rc(k)))
          do nn = nic-1, nic+1										          do nn = nic-1, nic+1
             n = nn											             n = nn
             if ( (rc(k)/10.**nn).ge.1.0 .and. &							             if ( (rc(k)/10.**nn).ge.1.0 .and. &
                  (rc(k)/10.**nn).lt.10.0) goto 141							                  (rc(k)/10.**nn).lt.10.0) goto 141
          enddo												          enddo
 141      continue											 141      continue
          idx_c = INT(rc(k)/10.**n) + 10*(n-nic2) - (n-nic2)						          idx_c = INT(rc(k)/10.**n) + 10*(n-nic2) - (n-nic2)
          idx_c = MAX(1, MIN(idx_c, ntb_c))								          idx_c = MAX(1, MIN(idx_c, ntb_c))
         else												         else
          idx_c = 1											          idx_c = 1
         endif												         endif

!..Cloud droplet number lookup table index.								!..Cloud droplet number lookup table index.
         idx_n = NINT(1.0 + FLOAT(nbc) * DLOG(nc(k)/t_Nc(1)) / nic1)					         idx_n = NINT(1.0 + FLOAT(nbc) * DLOG(nc(k)/t_Nc(1)) / nic1)
         idx_n = MAX(1, MIN(idx_n, nbc))								         idx_n = MAX(1, MIN(idx_n, nbc))

!..Cloud ice lookup table indexes.									!..Cloud ice lookup table indexes.
         if (ri(k).gt. r_i(1)) then									         if (ri(k).gt. r_i(1)) then
          nii = NINT(ALOG10(ri(k)))									          nii = NINT(ALOG10(ri(k)))
          do nn = nii-1, nii+1										          do nn = nii-1, nii+1
             n = nn											             n = nn
             if ( (ri(k)/10.**nn).ge.1.0 .and. &							             if ( (ri(k)/10.**nn).ge.1.0 .and. &
                  (ri(k)/10.**nn).lt.10.0) goto 142							                  (ri(k)/10.**nn).lt.10.0) goto 142
          enddo												          enddo
 142      continue											 142      continue
          idx_i = INT(ri(k)/10.**n) + 10*(n-nii2) - (n-nii2)						          idx_i = INT(ri(k)/10.**n) + 10*(n-nii2) - (n-nii2)
          idx_i = MAX(1, MIN(idx_i, ntb_i))								          idx_i = MAX(1, MIN(idx_i, ntb_i))
         else												         else
          idx_i = 1											          idx_i = 1
         endif												         endif

         if (ni(k).gt. Nt_i(1)) then									         if (ni(k).gt. Nt_i(1)) then
          nii = NINT(ALOG10(ni(k)))									          nii = NINT(ALOG10(ni(k)))
          do nn = nii-1, nii+1										          do nn = nii-1, nii+1
             n = nn											             n = nn
             if ( (ni(k)/10.**nn).ge.1.0 .and. &							             if ( (ni(k)/10.**nn).ge.1.0 .and. &
                  (ni(k)/10.**nn).lt.10.0) goto 143							                  (ni(k)/10.**nn).lt.10.0) goto 143
          enddo												          enddo
 143      continue											 143      continue
          idx_i1 = INT(ni(k)/10.**n) + 10*(n-nii3) - (n-nii3)						          idx_i1 = INT(ni(k)/10.**n) + 10*(n-nii3) - (n-nii3)
          idx_i1 = MAX(1, MIN(idx_i1, ntb_i1))								          idx_i1 = MAX(1, MIN(idx_i1, ntb_i1))
         else												         else
          idx_i1 = 1											          idx_i1 = 1
         endif												         endif

!..Rain lookup table indexes.										!..Rain lookup table indexes.
         if (rr(k).gt. r_r(1)) then									         if (rr(k).gt. r_r(1)) then
          nir = NINT(ALOG10(rr(k)))									          nir = NINT(ALOG10(rr(k)))
          do nn = nir-1, nir+1										          do nn = nir-1, nir+1
             n = nn											             n = nn
             if ( (rr(k)/10.**nn).ge.1.0 .and. &							             if ( (rr(k)/10.**nn).ge.1.0 .and. &
                  (rr(k)/10.**nn).lt.10.0) goto 144							                  (rr(k)/10.**nn).lt.10.0) goto 144
          enddo												          enddo
 144      continue											 144      continue
          idx_r = INT(rr(k)/10.**n) + 10*(n-nir2) - (n-nir2)						          idx_r = INT(rr(k)/10.**n) + 10*(n-nir2) - (n-nir2)
          idx_r = MAX(1, MIN(idx_r, ntb_r))								          idx_r = MAX(1, MIN(idx_r, ntb_r))

          lamr = 1./ilamr(k)										          lamr = 1./ilamr(k)
          lam_exp = lamr * (crg(3)*org2*org1)**bm_r							          lam_exp = lamr * (crg(3)*org2*org1)**bm_r
          N0_exp = org1*rr(k)/am_r * lam_exp**cre(1)							          N0_exp = org1*rr(k)/am_r * lam_exp**cre(1)
          nir = NINT(DLOG10(N0_exp))									          nir = NINT(DLOG10(N0_exp))
          do nn = nir-1, nir+1										          do nn = nir-1, nir+1
             n = nn											             n = nn
             if ( (N0_exp/10.**nn).ge.1.0 .and. &							             if ( (N0_exp/10.**nn).ge.1.0 .and. &
                  (N0_exp/10.**nn).lt.10.0) goto 145							                  (N0_exp/10.**nn).lt.10.0) goto 145
          enddo												          enddo
 145      continue											 145      continue
          idx_r1 = INT(N0_exp/10.**n) + 10*(n-nir3) - (n-nir3)						          idx_r1 = INT(N0_exp/10.**n) + 10*(n-nir3) - (n-nir3)
          idx_r1 = MAX(1, MIN(idx_r1, ntb_r1))								          idx_r1 = MAX(1, MIN(idx_r1, ntb_r1))
         else												         else
          idx_r = 1											          idx_r = 1
          idx_r1 = ntb_r1										          idx_r1 = ntb_r1
         endif												         endif

!..Snow lookup table index.										!..Snow lookup table index.
         if (rs(k).gt. r_s(1)) then									         if (rs(k).gt. r_s(1)) then
          nis = NINT(ALOG10(rs(k)))									          nis = NINT(ALOG10(rs(k)))
          do nn = nis-1, nis+1										          do nn = nis-1, nis+1
             n = nn											             n = nn
             if ( (rs(k)/10.**nn).ge.1.0 .and. &							             if ( (rs(k)/10.**nn).ge.1.0 .and. &
                  (rs(k)/10.**nn).lt.10.0) goto 146							                  (rs(k)/10.**nn).lt.10.0) goto 146
          enddo												          enddo
 146      continue											 146      continue
          idx_s = INT(rs(k)/10.**n) + 10*(n-nis2) - (n-nis2)						          idx_s = INT(rs(k)/10.**n) + 10*(n-nis2) - (n-nis2)
          idx_s = MAX(1, MIN(idx_s, ntb_s))								          idx_s = MAX(1, MIN(idx_s, ntb_s))
         else												         else
          idx_s = 1											          idx_s = 1
         endif												         endif

!..Graupel lookup table index.										!..Graupel lookup table index.
         if (rg(k).gt. r_g(1)) then									         if (rg(k).gt. r_g(1)) then
          nig = NINT(ALOG10(rg(k)))									          nig = NINT(ALOG10(rg(k)))
          do nn = nig-1, nig+1										          do nn = nig-1, nig+1
             n = nn											             n = nn
             if ( (rg(k)/10.**nn).ge.1.0 .and. &							             if ( (rg(k)/10.**nn).ge.1.0 .and. &
                  (rg(k)/10.**nn).lt.10.0) goto 147							                  (rg(k)/10.**nn).lt.10.0) goto 147
          enddo												          enddo
 147      continue											 147      continue
          idx_g = INT(rg(k)/10.**n) + 10*(n-nig2) - (n-nig2)						          idx_g = INT(rg(k)/10.**n) + 10*(n-nig2) - (n-nig2)
          idx_g = MAX(1, MIN(idx_g, ntb_g))								          idx_g = MAX(1, MIN(idx_g, ntb_g))

          lamg = 1./ilamg(k)										          lamg = 1./ilamg(k)
          lam_exp = lamg * (cgg(3)*ogg2*ogg1)**bm_g							          lam_exp = lamg * (cgg(3)*ogg2*ogg1)**bm_g
          N0_exp = ogg1*rg(k)/am_g * lam_exp**cge(1)							          N0_exp = ogg1*rg(k)/am_g * lam_exp**cge(1)
          nig = NINT(DLOG10(N0_exp))									          nig = NINT(DLOG10(N0_exp))
          do nn = nig-1, nig+1										          do nn = nig-1, nig+1
             n = nn											             n = nn
             if ( (N0_exp/10.**nn).ge.1.0 .and. &							             if ( (N0_exp/10.**nn).ge.1.0 .and. &
                  (N0_exp/10.**nn).lt.10.0) goto 148							                  (N0_exp/10.**nn).lt.10.0) goto 148
          enddo												          enddo
 148      continue											 148      continue
          idx_g1 = INT(N0_exp/10.**n) + 10*(n-nig3) - (n-nig3)						          idx_g1 = INT(N0_exp/10.**n) + 10*(n-nig3) - (n-nig3)
          idx_g1 = MAX(1, MIN(idx_g1, ntb_g1))								          idx_g1 = MAX(1, MIN(idx_g1, ntb_g1))
         else												         else
          idx_g = 1											          idx_g = 1
          idx_g1 = ntb_g1										          idx_g1 = ntb_g1
         endif												         endif

!..Deposition/sublimation prefactor (from Srivastava & Coen 1992).					!..Deposition/sublimation prefactor (from Srivastava & Coen 1992).
         otemp = 1./temp(k)										         otemp = 1./temp(k)
         rvs = rho(k)*qvsi(k)										         rvs = rho(k)*qvsi(k)
         rvs_p = rvs*otemp*(lsub*otemp*oRv - 1.)							         rvs_p = rvs*otemp*(lsub*otemp*oRv - 1.)
         rvs_pp = rvs * ( otemp*(lsub*otemp*oRv - 1.) &							         rvs_pp = rvs * ( otemp*(lsub*otemp*oRv - 1.) &
                         *otemp*(lsub*otemp*oRv - 1.) &							                         *otemp*(lsub*otemp*oRv - 1.) &
                         + (-2.*lsub*otemp*otemp*otemp*oRv) &						                         + (-2.*lsub*otemp*otemp*otemp*oRv) &
                         + otemp*otemp)									                         + otemp*otemp)
         gamsc = lsub*diffu(k)/tcond(k) * rvs_p								         gamsc = lsub*diffu(k)/tcond(k) * rvs_p
         alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &						         alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &
                    * rvs_pp/rvs_p * rvs/rvs_p								                    * rvs_pp/rvs_p * rvs/rvs_p
         alphsc = MAX(1.E-9, alphsc)									         alphsc = MAX(1.E-9, alphsc)
         xsat = ssati(k)										         xsat = ssati(k)
         if (abs(xsat).lt. 1.E-9) xsat=0.								         if (abs(xsat).lt. 1.E-9) xsat=0.
         t1_subl = 4.*PI*( 1.0 - alphsc*xsat &								         t1_subl = 4.*PI*( 1.0 - alphsc*xsat &
                + 2.*alphsc*alphsc*xsat*xsat &								                + 2.*alphsc*alphsc*xsat*xsat &
                - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &						                - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &
                / (1.+gamsc)										                / (1.+gamsc)

!..Snow collecting cloud water.  In CE, assume Dc<<Ds and vtc=~0.					!..Snow collecting cloud water.  In CE, assume Dc<<Ds and vtc=~0.
         if (L_qc(k) .and. mvd_c(k).gt. D0c) then							         if (L_qc(k) .and. mvd_c(k).gt. D0c) then
          xDs = 0.0											          xDs = 0.0
          if (L_qs(k)) xDs = smoc(k) / smob(k)								          if (L_qs(k)) xDs = smoc(k) / smob(k)
          if (xDs .gt. D0s) then									          if (xDs .gt. D0s) then
           idx = 1 + INT(nbs*DLOG(xDs/Ds(1))/DLOG(Ds(nbs)/Ds(1)))					           idx = 1 + INT(nbs*DLOG(xDs/Ds(1))/DLOG(Ds(nbs)/Ds(1)))
           idx = MIN(idx, nbs)										           idx = MIN(idx, nbs)
           Ef_sw = t_Efsw(idx, INT(mvd_c(k)*1.E6))							           Ef_sw = t_Efsw(idx, INT(mvd_c(k)*1.E6))
           prs_scw(k) = rhof(k)*t1_qs_qc*Ef_sw*rc(k)*smoe(k)						           prs_scw(k) = rhof(k)*t1_qs_qc*Ef_sw*rc(k)*smoe(k)
           pnc_scw(k) = rhof(k)*t1_qs_qc*Ef_sw*nc(k)*smoe(k)                ! Qc2M			           pnc_scw(k) = rhof(k)*t1_qs_qc*Ef_sw*nc(k)*smoe(k)                ! Qc2M
           pnc_scw(k) = MIN(DBLE(nc(k)*odts), pnc_scw(k))						           pnc_scw(k) = MIN(DBLE(nc(k)*odts), pnc_scw(k))
          endif												          endif

!..Graupel collecting cloud water.  In CE, assume Dc<<Dg and vtc=~0.					!..Graupel collecting cloud water.  In CE, assume Dc<<Dg and vtc=~0.
          if (rg(k).ge. r_g(1) .and. mvd_c(k).gt. D0c) then						          if (rg(k).ge. r_g(1) .and. mvd_c(k).gt. D0c) then
           xDg = (bm_g + mu_g + 1.) * ilamg(k)								           xDg = (bm_g + mu_g + 1.) * ilamg(k)
           vtg = rhof(k)*av_g*cgg(6)*ogg3 * ilamg(k)**bv_g						           vtg = rhof(k)*av_g*cgg(6)*ogg3 * ilamg(k)**bv_g
           stoke_g = mvd_c(k)*mvd_c(k)*vtg*rho_w/(9.*visco(k)*xDg)					           stoke_g = mvd_c(k)*mvd_c(k)*vtg*rho_w/(9.*visco(k)*xDg)
           if (xDg.gt. D0g) then									           if (xDg.gt. D0g) then
            if (stoke_g.ge.0.4 .and. stoke_g.le.10.) then						            if (stoke_g.ge.0.4 .and. stoke_g.le.10.) then
             Ef_gw = 0.55*ALOG10(2.51*stoke_g)								             Ef_gw = 0.55*ALOG10(2.51*stoke_g)
            elseif (stoke_g.lt.0.4) then								            elseif (stoke_g.lt.0.4) then
             Ef_gw = 0.0										             Ef_gw = 0.0
            elseif (stoke_g.gt.10) then									            elseif (stoke_g.gt.10) then
             Ef_gw = 0.77										             Ef_gw = 0.77
            endif											            endif
            prg_gcw(k) = rhof(k)*t1_qg_qc*Ef_gw*rc(k)*N0_g(k) &						            prg_gcw(k) = rhof(k)*t1_qg_qc*Ef_gw*rc(k)*N0_g(k) &
                          *ilamg(k)**cge(9)								                          *ilamg(k)**cge(9)
            pnc_gcw(k) = rhof(k)*t1_qg_qc*Ef_gw*nc(k)*N0_g(k)           &				            pnc_gcw(k) = rhof(k)*t1_qg_qc*Ef_gw*nc(k)*N0_g(k)           &
                          *ilamg(k)**cge(9)                                 ! Qc2M			                          *ilamg(k)**cge(9)                                 ! Qc2M
            pnc_gcw(k) = MIN(DBLE(nc(k)*odts), pnc_gcw(k))						            pnc_gcw(k) = MIN(DBLE(nc(k)*odts), pnc_gcw(k))
           endif											           endif
          endif												          endif
         endif												         endif

!..Snow and graupel collecting aerosols, wet scavenging.						!..Snow and graupel collecting aerosols, wet scavenging.
         if (rs(k) .gt. r_s(1)) then									         if (rs(k) .gt. r_s(1)) then
          xDs = smoc(k) / smob(k)									          xDs = smoc(k) / smob(k)
          Ef_sa = Eff_aero(xDs,0.04E-6,visco(k),rho(k),temp(k),'s')					          Ef_sa = Eff_aero(xDs,0.04E-6,visco(k),rho(k),temp(k),'s')
          pna_sca(k) = rhof(k)*t1_qs_qc*Ef_sa*nwfa(k)*smoe(k)						          pna_sca(k) = rhof(k)*t1_qs_qc*Ef_sa*nwfa(k)*smoe(k)
          pna_sca(k) = MIN(DBLE(nwfa(k)*odts), pna_sca(k))						          pna_sca(k) = MIN(DBLE(nwfa(k)*odts), pna_sca(k))

          Ef_sa = Eff_aero(xDs,0.8E-6,visco(k),rho(k),temp(k),'s')					          Ef_sa = Eff_aero(xDs,0.8E-6,visco(k),rho(k),temp(k),'s')
          pnd_scd(k) = rhof(k)*t1_qs_qc*Ef_sa*nifa(k)*smoe(k)						          pnd_scd(k) = rhof(k)*t1_qs_qc*Ef_sa*nifa(k)*smoe(k)
          pnd_scd(k) = MIN(DBLE(nifa(k)*odts), pnd_scd(k))						          pnd_scd(k) = MIN(DBLE(nifa(k)*odts), pnd_scd(k))
         endif												         endif
         if (rg(k) .gt. r_g(1)) then									         if (rg(k) .gt. r_g(1)) then
          xDg = (bm_g + mu_g + 1.) * ilamg(k)								          xDg = (bm_g + mu_g + 1.) * ilamg(k)
          Ef_ga = Eff_aero(xDg,0.04E-6,visco(k),rho(k),temp(k),'g')					          Ef_ga = Eff_aero(xDg,0.04E-6,visco(k),rho(k),temp(k),'g')
          pna_gca(k) = rhof(k)*t1_qg_qc*Ef_ga*nwfa(k)*N0_g(k)           &				          pna_gca(k) = rhof(k)*t1_qg_qc*Ef_ga*nwfa(k)*N0_g(k)           &
                        *ilamg(k)**cge(9)								                        *ilamg(k)**cge(9)
          pna_gca(k) = MIN(DBLE(nwfa(k)*odts), pna_gca(k))						          pna_gca(k) = MIN(DBLE(nwfa(k)*odts), pna_gca(k))

          Ef_ga = Eff_aero(xDg,0.8E-6,visco(k),rho(k),temp(k),'g')					          Ef_ga = Eff_aero(xDg,0.8E-6,visco(k),rho(k),temp(k),'g')
          pnd_gcd(k) = rhof(k)*t1_qg_qc*Ef_ga*nifa(k)*N0_g(k)           &				          pnd_gcd(k) = rhof(k)*t1_qg_qc*Ef_ga*nifa(k)*N0_g(k)           &
                        *ilamg(k)**cge(9)								                        *ilamg(k)**cge(9)
          pnd_gcd(k) = MIN(DBLE(nifa(k)*odts), pnd_gcd(k))						          pnd_gcd(k) = MIN(DBLE(nifa(k)*odts), pnd_gcd(k))
         endif												         endif

!..Rain collecting snow.  Cannot assume Wisner (1972) approximation					!..Rain collecting snow.  Cannot assume Wisner (1972) approximation
!.. or Mizuno (1990) approach so we solve the CE explicitly and store					!.. or Mizuno (1990) approach so we solve the CE explicitly and store
!.. results in lookup table.										!.. results in lookup table.
         if (rr(k).ge. r_r(1)) then									         if (rr(k).ge. r_r(1)) then
          if (rs(k).ge. r_s(1)) then									          if (rs(k).ge. r_s(1)) then
           if (temp(k).lt.T_0) then									           if (temp(k).lt.T_0) then
            prr_rcs(k) = -(tmr_racs2(idx_s,idx_t,idx_r1,idx_r) &					            prr_rcs(k) = -(tmr_racs2(idx_s,idx_t,idx_r1,idx_r) &
                           + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r) &					                           + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r) &
                           + tmr_racs1(idx_s,idx_t,idx_r1,idx_r) &					                           + tmr_racs1(idx_s,idx_t,idx_r1,idx_r) &
                           + tcr_sacr1(idx_s,idx_t,idx_r1,idx_r))					                           + tcr_sacr1(idx_s,idx_t,idx_r1,idx_r))
            prs_rcs(k) = tmr_racs2(idx_s,idx_t,idx_r1,idx_r) &						            prs_rcs(k) = tmr_racs2(idx_s,idx_t,idx_r1,idx_r) &
                         + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r) &					                         + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r) &
                         - tcs_racs1(idx_s,idx_t,idx_r1,idx_r) &					                         - tcs_racs1(idx_s,idx_t,idx_r1,idx_r) &
                         - tms_sacr1(idx_s,idx_t,idx_r1,idx_r)						                         - tms_sacr1(idx_s,idx_t,idx_r1,idx_r)
            prg_rcs(k) = tmr_racs1(idx_s,idx_t,idx_r1,idx_r) &						            prg_rcs(k) = tmr_racs1(idx_s,idx_t,idx_r1,idx_r) &
                         + tcr_sacr1(idx_s,idx_t,idx_r1,idx_r) &					                         + tcr_sacr1(idx_s,idx_t,idx_r1,idx_r) &
                         + tcs_racs1(idx_s,idx_t,idx_r1,idx_r) &					                         + tcs_racs1(idx_s,idx_t,idx_r1,idx_r) &
                         + tms_sacr1(idx_s,idx_t,idx_r1,idx_r)						                         + tms_sacr1(idx_s,idx_t,idx_r1,idx_r)
            prr_rcs(k) = MAX(DBLE(-rr(k)*odts), prr_rcs(k))						            prr_rcs(k) = MAX(DBLE(-rr(k)*odts), prr_rcs(k))
            prs_rcs(k) = MAX(DBLE(-rs(k)*odts), prs_rcs(k))						            prs_rcs(k) = MAX(DBLE(-rs(k)*odts), prs_rcs(k))
            prg_rcs(k) = MIN(DBLE((rr(k)+rs(k))*odts), prg_rcs(k))					            prg_rcs(k) = MIN(DBLE((rr(k)+rs(k))*odts), prg_rcs(k))
            pnr_rcs(k) = tnr_racs1(idx_s,idx_t,idx_r1,idx_r)            &   ! RAIN2M			            pnr_rcs(k) = tnr_racs1(idx_s,idx_t,idx_r1,idx_r)            &   ! RAIN2M
                         + tnr_racs2(idx_s,idx_t,idx_r1,idx_r)          &				                         + tnr_racs2(idx_s,idx_t,idx_r1,idx_r)          &
                         + tnr_sacr1(idx_s,idx_t,idx_r1,idx_r)          &				                         + tnr_sacr1(idx_s,idx_t,idx_r1,idx_r)          &
                         + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r)						                         + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r)
           else												           else
            prs_rcs(k) = -tcs_racs1(idx_s,idx_t,idx_r1,idx_r)           &				            prs_rcs(k) = -tcs_racs1(idx_s,idx_t,idx_r1,idx_r)           &
                         - tms_sacr1(idx_s,idx_t,idx_r1,idx_r)          &				                         - tms_sacr1(idx_s,idx_t,idx_r1,idx_r)          &
                         + tmr_racs2(idx_s,idx_t,idx_r1,idx_r)          &				                         + tmr_racs2(idx_s,idx_t,idx_r1,idx_r)          &
                         + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r)						                         + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r)
            prs_rcs(k) = MAX(DBLE(-rs(k)*odts), prs_rcs(k))						            prs_rcs(k) = MAX(DBLE(-rs(k)*odts), prs_rcs(k))
            prr_rcs(k) = -prs_rcs(k)									            prr_rcs(k) = -prs_rcs(k)
            pnr_rcs(k) = tnr_racs2(idx_s,idx_t,idx_r1,idx_r)            &   ! RAIN2M			            pnr_rcs(k) = tnr_racs2(idx_s,idx_t,idx_r1,idx_r)            &   ! RAIN2M
                         + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r)						                         + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r)
           endif											           endif
           pnr_rcs(k) = MIN(DBLE(nr(k)*odts), pnr_rcs(k))						           pnr_rcs(k) = MIN(DBLE(nr(k)*odts), pnr_rcs(k))
          endif												          endif

!..Rain collecting graupel.  Cannot assume Wisner (1972) approximation					!..Rain collecting graupel.  Cannot assume Wisner (1972) approximation
!.. or Mizuno (1990) approach so we solve the CE explicitly and store					!.. or Mizuno (1990) approach so we solve the CE explicitly and store
!.. results in lookup table.										!.. results in lookup table.
          if (rg(k).ge. r_g(1)) then									          if (rg(k).ge. r_g(1)) then
           if (temp(k).lt.T_0) then									           if (temp(k).lt.T_0) then
            prg_rcg(k) = tmr_racg(idx_g1,idx_g,idx_r1,idx_r) &						            prg_rcg(k) = tmr_racg(idx_g1,idx_g,idx_r1,idx_r) &
                         + tcr_gacr(idx_g1,idx_g,idx_r1,idx_r)						                         + tcr_gacr(idx_g1,idx_g,idx_r1,idx_r)
            prg_rcg(k) = MIN(DBLE(rr(k)*odts), prg_rcg(k))						            prg_rcg(k) = MIN(DBLE(rr(k)*odts), prg_rcg(k))
            prr_rcg(k) = -prg_rcg(k)									            prr_rcg(k) = -prg_rcg(k)
            pnr_rcg(k) = tnr_racg(idx_g1,idx_g,idx_r1,idx_r)            &   ! RAIN2M			            pnr_rcg(k) = tnr_racg(idx_g1,idx_g,idx_r1,idx_r)            &   ! RAIN2M
                         + tnr_gacr(idx_g1,idx_g,idx_r1,idx_r)						                         + tnr_gacr(idx_g1,idx_g,idx_r1,idx_r)
            pnr_rcg(k) = MIN(DBLE(nr(k)*odts), pnr_rcg(k))						            pnr_rcg(k) = MIN(DBLE(nr(k)*odts), pnr_rcg(k))
           else												           else
            prr_rcg(k) = tcg_racg(idx_g1,idx_g,idx_r1,idx_r)						            prr_rcg(k) = tcg_racg(idx_g1,idx_g,idx_r1,idx_r)
            prr_rcg(k) = MIN(DBLE(rg(k)*odts), prr_rcg(k))						            prr_rcg(k) = MIN(DBLE(rg(k)*odts), prr_rcg(k))
            prg_rcg(k) = -prr_rcg(k)									            prg_rcg(k) = -prr_rcg(k)
!..Put in explicit drop break-up due to collisions.							!..Put in explicit drop break-up due to collisions.
            pnr_rcg(k) = -5.*tnr_gacr(idx_g1,idx_g,idx_r1,idx_r)         ! RAIN2M			            pnr_rcg(k) = -5.*tnr_gacr(idx_g1,idx_g,idx_r1,idx_r)         ! RAIN2M
           endif											           endif
          endif												          endif
         endif												         endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Next IF block handles only those processes below 0C.							!..Next IF block handles only those processes below 0C.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

         if (temp(k).lt.T_0) then									         if (temp(k).lt.T_0) then

          vts_boost(k) = 1.0										          vts_boost(k) = 1.0
          rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999							          rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999

!+---+---------------- BEGIN NEW ICE NUCLEATION -----------------------+				!+---+---------------- BEGIN NEW ICE NUCLEATION -----------------------+
!..Freezing of supercooled water (rain or cloud) is influenced by dust					!..Freezing of supercooled water (rain or cloud) is influenced by dust
!.. but still using Bigg 1953 with a temperature adjustment of a few					!.. but still using Bigg 1953 with a temperature adjustment of a few
!.. degrees depending on dust concentration.  A default value by way					!.. degrees depending on dust concentration.  A default value by way
!.. of idx_IN is 1.0 per Liter of air is used when dustyIce flag is					!.. of idx_IN is 1.0 per Liter of air is used when dustyIce flag is
!.. false.  Next, a combination of deposition/condensation freezing					!.. false.  Next, a combination of deposition/condensation freezing
!.. using DeMott et al (2010) dust nucleation when water saturated or					!.. using DeMott et al (2010) dust nucleation when water saturated or
!.. Phillips et al (2008) when below water saturation; else, without					!.. Phillips et al (2008) when below water saturation; else, without
!.. dustyIce flag, use the previous Cooper (1986) temperature-dependent					!.. dustyIce flag, use the previous Cooper (1986) temperature-dependent
!.. value.  Lastly, allow homogeneous freezing of deliquesced aerosols					!.. value.  Lastly, allow homogeneous freezing of deliquesced aerosols
!.. following Koop et al. (2001, Nature).								!.. following Koop et al. (2001, Nature).
!.. Implemented by T. Eidhammer and G. Thompson 2012Dec18						!.. Implemented by T. Eidhammer and G. Thompson 2012Dec18
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

          if (dustyIce .AND. is_aerosol_aware) then							          if (dustyIce .AND. is_aerosol_aware) then
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
           if(indirect_feed_chimere==1) then								           if(indirect_feed_chimere==1) then
              xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),ice_nucl(k)) 				              xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),ice_nucl(k)) 
           else												           else
              xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),nifa(k))				              xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),nifa(k))
           endif											           endif
#else													#else
           xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),nifa(k))					           xni = iceDeMott(tempc,qvs(k),qvs(k),qvsi(k),rho(k),nifa(k))
#endif													#endif
          else												          else
           xni = 1.0 *1000.                                               ! Default is 1.0 per L	           xni = 1.0 *1000.                                               ! Default is 1.0 per L
          endif												          endif

!..Ice nuclei lookup table index.									!..Ice nuclei lookup table index.
          if (xni.gt. Nt_IN(1)) then									          if (xni.gt. Nt_IN(1)) then
           niin = NINT(ALOG10(xni))									           niin = NINT(ALOG10(xni))
           do nn = niin-1, niin+1									           do nn = niin-1, niin+1
              n = nn											              n = nn
              if ( (xni/10.**nn).ge.1.0 .and. &								              if ( (xni/10.**nn).ge.1.0 .and. &
                   (xni/10.**nn).lt.10.0) goto 149							                   (xni/10.**nn).lt.10.0) goto 149
           enddo											           enddo
 149       continue											 149       continue
           idx_IN = INT(xni/10.**n) + 10*(n-niin2) - (n-niin2)						           idx_IN = INT(xni/10.**n) + 10*(n-niin2) - (n-niin2)
           idx_IN = MAX(1, MIN(idx_IN, ntb_IN))								           idx_IN = MAX(1, MIN(idx_IN, ntb_IN))
          else												          else
           idx_IN = 1											           idx_IN = 1
          endif												          endif

!..Freezing of water drops into graupel/cloud ice (Bigg 1953).						!..Freezing of water drops into graupel/cloud ice (Bigg 1953).
          if (rr(k).gt. r_r(1)) then									          if (rr(k).gt. r_r(1)) then
           prg_rfz(k) = tpg_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts					           prg_rfz(k) = tpg_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts
           pri_rfz(k) = tpi_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts					           pri_rfz(k) = tpi_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts
           pni_rfz(k) = tni_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts					           pni_rfz(k) = tni_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts
           pnr_rfz(k) = tnr_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts          ! RAIN2M			           pnr_rfz(k) = tnr_qrfz(idx_r,idx_r1,idx_tc,idx_IN)*odts          ! RAIN2M
           pnr_rfz(k) = MIN(DBLE(nr(k)*odts), pnr_rfz(k))						           pnr_rfz(k) = MIN(DBLE(nr(k)*odts), pnr_rfz(k))
          elseif (rr(k).gt. R1 .and. temp(k).lt.HGFR) then						          elseif (rr(k).gt. R1 .and. temp(k).lt.HGFR) then
           pri_rfz(k) = rr(k)*odts									           pri_rfz(k) = rr(k)*odts
           pnr_rfz(k) = nr(k)*odts                                         ! RAIN2M			           pnr_rfz(k) = nr(k)*odts                                         ! RAIN2M
           pni_rfz(k) = pnr_rfz(k)									           pni_rfz(k) = pnr_rfz(k)
          endif												          endif

          if (rc(k).gt. r_c(1)) then									          if (rc(k).gt. r_c(1)) then
           pri_wfz(k) = tpi_qcfz(idx_c,idx_n,idx_tc,idx_IN)*odts					           pri_wfz(k) = tpi_qcfz(idx_c,idx_n,idx_tc,idx_IN)*odts
           pri_wfz(k) = MIN(DBLE(rc(k)*odts), pri_wfz(k))						           pri_wfz(k) = MIN(DBLE(rc(k)*odts), pri_wfz(k))
           pni_wfz(k) = tni_qcfz(idx_c,idx_n,idx_tc,idx_IN)*odts					           pni_wfz(k) = tni_qcfz(idx_c,idx_n,idx_tc,idx_IN)*odts
           pni_wfz(k) = MIN(DBLE(nc(k)*odts), pri_wfz(k)/(2.*xm0i),     &				           pni_wfz(k) = MIN(DBLE(nc(k)*odts), pri_wfz(k)/(2.*xm0i),     &
                                pni_wfz(k))								                                pni_wfz(k))
          elseif (rc(k).gt. R1 .and. temp(k).lt.HGFR) then						          elseif (rc(k).gt. R1 .and. temp(k).lt.HGFR) then
           pri_wfz(k) = rc(k)*odts									           pri_wfz(k) = rc(k)*odts
           pni_wfz(k) = nc(k)*odts									           pni_wfz(k) = nc(k)*odts
          endif												          endif

!..Deposition nucleation of dust/mineral from DeMott et al (2010)					!..Deposition nucleation of dust/mineral from DeMott et al (2010)
!.. we may need to relax the temperature and ssati constraints.						!.. we may need to relax the temperature and ssati constraints.
          if ( (ssati(k).ge. 0.25) .or. (ssatw(k).gt. eps &						          if ( (ssati(k).ge. 0.25) .or. (ssatw(k).gt. eps &
                                .and. temp(k).lt.253.15) ) then						                                .and. temp(k).lt.253.15) ) then
           if (dustyIce .AND. is_aerosol_aware) then							           if (dustyIce .AND. is_aerosol_aware) then
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
            if(indirect_feed_chimere==1) then								            if(indirect_feed_chimere==1) then
              xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),ice_nucl(k)) 				              xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),ice_nucl(k)) 
            else											            else
              xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k))				              xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k))
            endif											            endif
#else													#else
            xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k))					            xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k))
#endif													#endif
           else												           else
            xnc = MIN(250.E3, TNO*EXP(ATO*(T_0-temp(k))))						            xnc = MIN(250.E3, TNO*EXP(ATO*(T_0-temp(k))))
           endif											           endif
           xni = ni(k) + (pni_rfz(k)+pni_wfz(k))*dtsave							           xni = ni(k) + (pni_rfz(k)+pni_wfz(k))*dtsave
           pni_inu(k) = 0.5*(xnc-xni + abs(xnc-xni))*odts						           pni_inu(k) = 0.5*(xnc-xni + abs(xnc-xni))*odts
           pri_inu(k) = MIN(DBLE(rate_max), xm0i*pni_inu(k))						           pri_inu(k) = MIN(DBLE(rate_max), xm0i*pni_inu(k))
           pni_inu(k) = pri_inu(k)/xm0i									           pni_inu(k) = pri_inu(k)/xm0i
          endif												          endif

!..Freezing of aqueous aerosols based on Koop et al (2001, Nature)					!..Freezing of aqueous aerosols based on Koop et al (2001, Nature)
          xni = smo0(k)+ni(k) + (pni_rfz(k)+pni_wfz(k)+pni_inu(k))*dtsave				          xni = smo0(k)+ni(k) + (pni_rfz(k)+pni_wfz(k)+pni_inu(k))*dtsave
          if (is_aerosol_aware .AND. homogIce .AND. (xni.le.500.E3)     &				          if (is_aerosol_aware .AND. homogIce .AND. (xni.le.500.E3)     &
     &                .AND.(temp(k).lt.238).AND.(ssati(k).ge.0.4) ) then				     &                .AND.(temp(k).lt.238).AND.(ssati(k).ge.0.4) ) then
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
            if(indirect_feed_chimere==1) then								            if(indirect_feed_chimere==1) then
              xnc = iceKoop_chm(temp(k),qv(k),qvs(k),num_hygro_aer(k,:),dtsave,sect,n_bin)		              xnc = iceKoop_chm(temp(k),qv(k),qvs(k),num_hygro_aer(k,:),dtsave,sect,n_bin)
            else											            else
              xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave)					              xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave)
            endif											            endif
#else     												#else     
            xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave)						            xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave)
#endif													#endif
            pni_iha(k) = xnc*odts									            pni_iha(k) = xnc*odts
            pri_iha(k) = MIN(DBLE(rate_max), xm0i*0.1*pni_iha(k))					            pri_iha(k) = MIN(DBLE(rate_max), xm0i*0.1*pni_iha(k))
            pni_iha(k) = pri_iha(k)/(xm0i*0.1)								            pni_iha(k) = pri_iha(k)/(xm0i*0.1)
          endif												          endif
!+---+------------------ END NEW ICE NUCLEATION -----------------------+				!+---+------------------ END NEW ICE NUCLEATION -----------------------+


!..Deposition/sublimation of cloud ice (Srivastava & Coen 1992).					!..Deposition/sublimation of cloud ice (Srivastava & Coen 1992).
          if (L_qi(k)) then										          if (L_qi(k)) then
           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi							           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
           ilami = 1./lami										           ilami = 1./lami
           xDi = MAX(DBLE(D0i), (bm_i + mu_i + 1.) * ilami)						           xDi = MAX(DBLE(D0i), (bm_i + mu_i + 1.) * ilami)
           xmi = am_i*xDi**bm_i										           xmi = am_i*xDi**bm_i
           oxmi = 1./xmi										           oxmi = 1./xmi
           pri_ide(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &						           pri_ide(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &
                  *oig1*cig(5)*ni(k)*ilami								                  *oig1*cig(5)*ni(k)*ilami

           if (pri_ide(k) .lt. 0.0) then								           if (pri_ide(k) .lt. 0.0) then
            pri_ide(k) = MAX(DBLE(-ri(k)*odts), pri_ide(k), DBLE(rate_max))				            pri_ide(k) = MAX(DBLE(-ri(k)*odts), pri_ide(k), DBLE(rate_max))
            pni_ide(k) = pri_ide(k)*oxmi								            pni_ide(k) = pri_ide(k)*oxmi
            pni_ide(k) = MAX(DBLE(-ni(k)*odts), pni_ide(k))						            pni_ide(k) = MAX(DBLE(-ni(k)*odts), pni_ide(k))
           else												           else
            pri_ide(k) = MIN(pri_ide(k), DBLE(rate_max))						            pri_ide(k) = MIN(pri_ide(k), DBLE(rate_max))
            prs_ide(k) = (1.0D0-tpi_ide(idx_i,idx_i1))*pri_ide(k)					            prs_ide(k) = (1.0D0-tpi_ide(idx_i,idx_i1))*pri_ide(k)
            pri_ide(k) = tpi_ide(idx_i,idx_i1)*pri_ide(k)						            pri_ide(k) = tpi_ide(idx_i,idx_i1)*pri_ide(k)
           endif											           endif

!..Some cloud ice needs to move into the snow category.  Use lookup					!..Some cloud ice needs to move into the snow category.  Use lookup
!.. table that resulted from explicit bin representation of distrib.					!.. table that resulted from explicit bin representation of distrib.
           if ( (idx_i.eq. ntb_i) .or. (xDi.gt. 5.0*D0s) ) then						           if ( (idx_i.eq. ntb_i) .or. (xDi.gt. 5.0*D0s) ) then
            prs_iau(k) = ri(k)*.99*odts									            prs_iau(k) = ri(k)*.99*odts
            pni_iau(k) = ni(k)*.95*odts									            pni_iau(k) = ni(k)*.95*odts
           elseif (xDi.lt. 0.1*D0s) then								           elseif (xDi.lt. 0.1*D0s) then
            prs_iau(k) = 0.										            prs_iau(k) = 0.
            pni_iau(k) = 0.										            pni_iau(k) = 0.
           else												           else
            prs_iau(k) = tps_iaus(idx_i,idx_i1)*odts							            prs_iau(k) = tps_iaus(idx_i,idx_i1)*odts
            prs_iau(k) = MIN(DBLE(ri(k)*.99*odts), prs_iau(k))						            prs_iau(k) = MIN(DBLE(ri(k)*.99*odts), prs_iau(k))
            pni_iau(k) = tni_iaus(idx_i,idx_i1)*odts							            pni_iau(k) = tni_iaus(idx_i,idx_i1)*odts
            pni_iau(k) = MIN(DBLE(ni(k)*.95*odts), pni_iau(k))						            pni_iau(k) = MIN(DBLE(ni(k)*.95*odts), pni_iau(k))
           endif											           endif
          endif												          endif

!..Deposition/sublimation of snow/graupel follows Srivastava & Coen					!..Deposition/sublimation of snow/graupel follows Srivastava & Coen
!.. (1992).												!.. (1992).
          if (L_qs(k)) then										          if (L_qs(k)) then
           C_snow = C_sqrd + (tempc+1.5)*(C_cube-C_sqrd)/(-30.+1.5)					           C_snow = C_sqrd + (tempc+1.5)*(C_cube-C_sqrd)/(-30.+1.5)
           C_snow = MAX(C_sqrd, MIN(C_snow, C_cube))							           C_snow = MAX(C_sqrd, MIN(C_snow, C_cube))
           prs_sde(k) = C_snow*t1_subl*diffu(k)*ssati(k)*rvs &						           prs_sde(k) = C_snow*t1_subl*diffu(k)*ssati(k)*rvs &
                        * (t1_qs_sd*smo1(k) &								                        * (t1_qs_sd*smo1(k) &
                         + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k))						                         + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k))
           if (prs_sde(k).lt. 0.) then									           if (prs_sde(k).lt. 0.) then
            prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k), DBLE(rate_max))				            prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k), DBLE(rate_max))
           else												           else
            prs_sde(k) = MIN(prs_sde(k), DBLE(rate_max))						            prs_sde(k) = MIN(prs_sde(k), DBLE(rate_max))
           endif											           endif
          endif												          endif

          if (L_qg(k) .and. ssati(k).lt. -eps) then							          if (L_qg(k) .and. ssati(k).lt. -eps) then
           prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &						           prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &
               * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) &						               * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) &
               + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11))						               + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11))
           if (prg_gde(k).lt. 0.) then									           if (prg_gde(k).lt. 0.) then
            prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k), DBLE(rate_max))				            prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k), DBLE(rate_max))
           else												           else
            prg_gde(k) = MIN(prg_gde(k), DBLE(rate_max))						            prg_gde(k) = MIN(prg_gde(k), DBLE(rate_max))
           endif											           endif
          endif												          endif

!..Snow collecting cloud ice.  In CE, assume Di<<Ds and vti=~0.						!..Snow collecting cloud ice.  In CE, assume Di<<Ds and vti=~0.
          if (L_qi(k)) then										          if (L_qi(k)) then
           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi							           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
           ilami = 1./lami										           ilami = 1./lami
           xDi = MAX(DBLE(D0i), (bm_i + mu_i + 1.) * ilami)						           xDi = MAX(DBLE(D0i), (bm_i + mu_i + 1.) * ilami)
           xmi = am_i*xDi**bm_i										           xmi = am_i*xDi**bm_i
           oxmi = 1./xmi										           oxmi = 1./xmi
           if (rs(k).ge. r_s(1)) then									           if (rs(k).ge. r_s(1)) then
            prs_sci(k) = t1_qs_qi*rhof(k)*Ef_si*ri(k)*smoe(k)						            prs_sci(k) = t1_qs_qi*rhof(k)*Ef_si*ri(k)*smoe(k)
            pni_sci(k) = prs_sci(k) * oxmi								            pni_sci(k) = prs_sci(k) * oxmi
           endif											           endif

!..Rain collecting cloud ice.  In CE, assume Di<<Dr and vti=~0.						!..Rain collecting cloud ice.  In CE, assume Di<<Dr and vti=~0.
           if (rr(k).ge. r_r(1) .and. mvd_r(k).gt. 4.*xDi) then						           if (rr(k).ge. r_r(1) .and. mvd_r(k).gt. 4.*xDi) then
            lamr = 1./ilamr(k)										            lamr = 1./ilamr(k)
            pri_rci(k) = rhof(k)*t1_qr_qi*Ef_ri*ri(k)*N0_r(k) &						            pri_rci(k) = rhof(k)*t1_qr_qi*Ef_ri*ri(k)*N0_r(k) &
                           *((lamr+fv_r)**(-cre(9)))							                           *((lamr+fv_r)**(-cre(9)))
            pnr_rci(k) = rhof(k)*t1_qr_qi*Ef_ri*ni(k)*N0_r(k)           &   ! RAIN2M			            pnr_rci(k) = rhof(k)*t1_qr_qi*Ef_ri*ni(k)*N0_r(k)           &   ! RAIN2M
                           *((lamr+fv_r)**(-cre(9)))							                           *((lamr+fv_r)**(-cre(9)))
            pni_rci(k) = pri_rci(k) * oxmi								            pni_rci(k) = pri_rci(k) * oxmi
            prr_rci(k) = rhof(k)*t2_qr_qi*Ef_ri*ni(k)*N0_r(k) &						            prr_rci(k) = rhof(k)*t2_qr_qi*Ef_ri*ni(k)*N0_r(k) &
                           *((lamr+fv_r)**(-cre(8)))							                           *((lamr+fv_r)**(-cre(8)))
            prr_rci(k) = MIN(DBLE(rr(k)*odts), prr_rci(k))						            prr_rci(k) = MIN(DBLE(rr(k)*odts), prr_rci(k))
            prg_rci(k) = pri_rci(k) + prr_rci(k)							            prg_rci(k) = pri_rci(k) + prr_rci(k)
           endif											           endif
          endif												          endif

!..Ice multiplication from rime-splinters (Hallet & Mossop 1974).					!..Ice multiplication from rime-splinters (Hallet & Mossop 1974).
          if (prg_gcw(k).gt. eps .and. tempc.gt.-8.0) then						          if (prg_gcw(k).gt. eps .and. tempc.gt.-8.0) then
           tf = 0.											           tf = 0.
           if (tempc.ge.-5.0 .and. tempc.lt.-3.0) then							           if (tempc.ge.-5.0 .and. tempc.lt.-3.0) then
            tf = 0.5*(-3.0 - tempc)									            tf = 0.5*(-3.0 - tempc)
           elseif (tempc.gt.-8.0 .and. tempc.lt.-5.0) then						           elseif (tempc.gt.-8.0 .and. tempc.lt.-5.0) then
            tf = 0.33333333*(8.0 + tempc)								            tf = 0.33333333*(8.0 + tempc)
           endif											           endif
           pni_ihm(k) = 3.5E8*tf*prg_gcw(k)								           pni_ihm(k) = 3.5E8*tf*prg_gcw(k)
           pri_ihm(k) = xm0i*pni_ihm(k)									           pri_ihm(k) = xm0i*pni_ihm(k)
           prs_ihm(k) = prs_scw(k)/(prs_scw(k)+prg_gcw(k)) &						           prs_ihm(k) = prs_scw(k)/(prs_scw(k)+prg_gcw(k)) &
                          * pri_ihm(k)									                          * pri_ihm(k)
           prg_ihm(k) = prg_gcw(k)/(prs_scw(k)+prg_gcw(k)) &						           prg_ihm(k) = prg_gcw(k)/(prs_scw(k)+prg_gcw(k)) &
                          * pri_ihm(k)									                          * pri_ihm(k)
          endif												          endif

!..A portion of rimed snow converts to graupel but some remains snow.					!..A portion of rimed snow converts to graupel but some remains snow.
!.. Interp from 15 to 95% as riming factor increases from 2.0 to 30.0					!.. Interp from 15 to 95% as riming factor increases from 2.0 to 30.0
!.. 0.028 came from (.95-.15)/(30.-2.).  This remains ad-hoc and should					!.. 0.028 came from (.95-.15)/(30.-2.).  This remains ad-hoc and should
!.. be revisited.											!.. be revisited.
          if (prs_scw(k).gt.2.0*prs_sde(k) .and. &							          if (prs_scw(k).gt.2.0*prs_sde(k) .and. &
                         prs_sde(k).gt.eps) then							                         prs_sde(k).gt.eps) then
           r_frac = MIN(30.0D0, prs_scw(k)/prs_sde(k))							           r_frac = MIN(30.0D0, prs_scw(k)/prs_sde(k))
           g_frac = MIN(0.95, 0.15 + (r_frac-2.)*.028)							           g_frac = MIN(0.95, 0.15 + (r_frac-2.)*.028)
           vts_boost(k) = MIN(1.5, 1.1 + (r_frac-2.)*.016)						           vts_boost(k) = MIN(1.5, 1.1 + (r_frac-2.)*.016)
           prg_scw(k) = g_frac*prs_scw(k)								           prg_scw(k) = g_frac*prs_scw(k)
           prs_scw(k) = (1. - g_frac)*prs_scw(k)							           prs_scw(k) = (1. - g_frac)*prs_scw(k)
          endif												          endif

         else												         else

!..Melt snow and graupel and enhance from collisions with liquid.					!..Melt snow and graupel and enhance from collisions with liquid.
!.. We also need to sublimate snow and graupel if subsaturated.						!.. We also need to sublimate snow and graupel if subsaturated.
          if (L_qs(k)) then										          if (L_qs(k)) then
           prr_sml(k) = (tempc*tcond(k)-lvap0*diffu(k)*delQvs(k))       &				           prr_sml(k) = (tempc*tcond(k)-lvap0*diffu(k)*delQvs(k))       &
                      * (t1_qs_me*smo1(k) + t2_qs_me*rhof2(k)*vsc2(k)*smof(k))				                      * (t1_qs_me*smo1(k) + t2_qs_me*rhof2(k)*vsc2(k)*smof(k))
           prr_sml(k) = prr_sml(k) + 4218.*olfus*tempc &						           prr_sml(k) = prr_sml(k) + 4218.*olfus*tempc &
                                   * (prr_rcs(k)+prs_scw(k))						                                   * (prr_rcs(k)+prs_scw(k))
           prr_sml(k) = MIN(DBLE(rs(k)*odts), MAX(0.D0, prr_sml(k)))					           prr_sml(k) = MIN(DBLE(rs(k)*odts), MAX(0.D0, prr_sml(k)))
           pnr_sml(k) = smo0(k)/rs(k)*prr_sml(k) * 10.0**(-0.25*tempc)      ! RAIN2M			           pnr_sml(k) = smo0(k)/rs(k)*prr_sml(k) * 10.0**(-0.25*tempc)      ! RAIN2M
           pnr_sml(k) = MIN(DBLE(smo0(k)*odts), pnr_sml(k))						           pnr_sml(k) = MIN(DBLE(smo0(k)*odts), pnr_sml(k))
!          if (tempc.gt.3.5 .or. rs(k).lt.0.005E-3) pnr_sml(k)=0.0					!          if (tempc.gt.3.5 .or. rs(k).lt.0.005E-3) pnr_sml(k)=0.0

           if (ssati(k).lt. 0.) then									           if (ssati(k).lt. 0.) then
            prs_sde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &						            prs_sde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &
                         * (t1_qs_sd*smo1(k) &								                         * (t1_qs_sd*smo1(k) &
                          + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k))						                          + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k))
            prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k))						            prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k))
           endif											           endif
          endif												          endif

          if (L_qg(k)) then										          if (L_qg(k)) then
           prr_gml(k) = (tempc*tcond(k)-lvap0*diffu(k)*delQvs(k))       &				           prr_gml(k) = (tempc*tcond(k)-lvap0*diffu(k)*delQvs(k))       &
                      * N0_g(k)*(t1_qg_me*ilamg(k)**cge(10)             &				                      * N0_g(k)*(t1_qg_me*ilamg(k)**cge(10)             &
                      + t2_qg_me*rhof2(k)*vsc2(k)*ilamg(k)**cge(11))					                      + t2_qg_me*rhof2(k)*vsc2(k)*ilamg(k)**cge(11))
!-GT       prr_gml(k) = prr_gml(k) + 4218.*olfus*tempc &						!-GT       prr_gml(k) = prr_gml(k) + 4218.*olfus*tempc &
!-GT                               * (prr_rcg(k)+prg_gcw(k))						!-GT                               * (prr_rcg(k)+prg_gcw(k))
           prr_gml(k) = MIN(DBLE(rg(k)*odts), MAX(0.D0, prr_gml(k)))					           prr_gml(k) = MIN(DBLE(rg(k)*odts), MAX(0.D0, prr_gml(k)))
           pnr_gml(k) = N0_g(k)*cgg(2)*ilamg(k)**cge(2) / rg(k)         &   ! RAIN2M			           pnr_gml(k) = N0_g(k)*cgg(2)*ilamg(k)**cge(2) / rg(k)         &   ! RAIN2M
                      * prr_gml(k) * 10.0**(-0.5*tempc)							                      * prr_gml(k) * 10.0**(-0.5*tempc)
!          if (tempc.gt.7.5 .or. rg(k).lt.0.005E-3) pnr_gml(k)=0.0					!          if (tempc.gt.7.5 .or. rg(k).lt.0.005E-3) pnr_gml(k)=0.0

           if (ssati(k).lt. 0.) then									           if (ssati(k).lt. 0.) then
            prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &						            prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs &
                * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) &						                * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) &
                + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11))						                + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11))
            prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k))						            prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k))
           endif											           endif
          endif												          endif

!.. This change will be required if users run adaptive time step that					!.. This change will be required if users run adaptive time step that
!.. results in delta-t that is generally too long to allow cloud water					!.. results in delta-t that is generally too long to allow cloud water
!.. collection by snow/graupel above melting temperature.						!.. collection by snow/graupel above melting temperature.
!.. Credit to Bjorn-Egil Nygaard for discovering.							!.. Credit to Bjorn-Egil Nygaard for discovering.
          if (dt .gt. 120.) then									          if (dt .gt. 120.) then
             prr_rcw(k)=prr_rcw(k)+prs_scw(k)+prg_gcw(k)						             prr_rcw(k)=prr_rcw(k)+prs_scw(k)+prg_gcw(k)
             prs_scw(k)=0.										             prs_scw(k)=0.
             prg_gcw(k)=0.										             prg_gcw(k)=0.
          endif												          endif

         endif												         endif

      enddo												      enddo
      endif												      endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Ensure we do not deplete more hydrometeor species than exists.					!..Ensure we do not deplete more hydrometeor species than exists.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte

!..If ice supersaturated, ensure sum of depos growth terms does not					!..If ice supersaturated, ensure sum of depos growth terms does not
!.. deplete more vapor than possibly exists.  If subsaturated, limit					!.. deplete more vapor than possibly exists.  If subsaturated, limit
!.. sum of sublimation terms such that vapor does not reproduce ice					!.. sum of sublimation terms such that vapor does not reproduce ice
!.. supersat again.											!.. supersat again.
         sump = pri_inu(k) + pri_ide(k) + prs_ide(k) &							         sump = pri_inu(k) + pri_ide(k) + prs_ide(k) &
              + prs_sde(k) + prg_gde(k) + pri_iha(k)							              + prs_sde(k) + prg_gde(k) + pri_iha(k)
         rate_max = (qv(k)-qvsi(k))*odts*0.999								         rate_max = (qv(k)-qvsi(k))*odts*0.999
         if ( (sump.gt. eps .and. sump.gt. rate_max) .or. &						         if ( (sump.gt. eps .and. sump.gt. rate_max) .or. &
              (sump.lt. -eps .and. sump.lt. rate_max) ) then						              (sump.lt. -eps .and. sump.lt. rate_max) ) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          pri_inu(k) = pri_inu(k) * ratio								          pri_inu(k) = pri_inu(k) * ratio
          pri_ide(k) = pri_ide(k) * ratio								          pri_ide(k) = pri_ide(k) * ratio
          pni_ide(k) = pni_ide(k) * ratio								          pni_ide(k) = pni_ide(k) * ratio
          prs_ide(k) = prs_ide(k) * ratio								          prs_ide(k) = prs_ide(k) * ratio
          prs_sde(k) = prs_sde(k) * ratio								          prs_sde(k) = prs_sde(k) * ratio
          prg_gde(k) = prg_gde(k) * ratio								          prg_gde(k) = prg_gde(k) * ratio
          pri_iha(k) = pri_iha(k) * ratio								          pri_iha(k) = pri_iha(k) * ratio
         endif												         endif

!..Cloud water conservation.										!..Cloud water conservation.
         sump = -prr_wau(k) - pri_wfz(k) - prr_rcw(k) &							         sump = -prr_wau(k) - pri_wfz(k) - prr_rcw(k) &
                - prs_scw(k) - prg_scw(k) - prg_gcw(k)							                - prs_scw(k) - prg_scw(k) - prg_gcw(k)
         rate_max = -rc(k)*odts										         rate_max = -rc(k)*odts
         if (sump.lt. rate_max .and. L_qc(k)) then							         if (sump.lt. rate_max .and. L_qc(k)) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          prr_wau(k) = prr_wau(k) * ratio								          prr_wau(k) = prr_wau(k) * ratio
          pri_wfz(k) = pri_wfz(k) * ratio								          pri_wfz(k) = pri_wfz(k) * ratio
          prr_rcw(k) = prr_rcw(k) * ratio								          prr_rcw(k) = prr_rcw(k) * ratio
          prs_scw(k) = prs_scw(k) * ratio								          prs_scw(k) = prs_scw(k) * ratio
          prg_scw(k) = prg_scw(k) * ratio								          prg_scw(k) = prg_scw(k) * ratio
          prg_gcw(k) = prg_gcw(k) * ratio								          prg_gcw(k) = prg_gcw(k) * ratio
         endif												         endif

!..Cloud ice conservation.										!..Cloud ice conservation.
         sump = pri_ide(k) - prs_iau(k) - prs_sci(k) &							         sump = pri_ide(k) - prs_iau(k) - prs_sci(k) &
                - pri_rci(k)										                - pri_rci(k)
         rate_max = -ri(k)*odts										         rate_max = -ri(k)*odts
         if (sump.lt. rate_max .and. L_qi(k)) then							         if (sump.lt. rate_max .and. L_qi(k)) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          pri_ide(k) = pri_ide(k) * ratio								          pri_ide(k) = pri_ide(k) * ratio
          prs_iau(k) = prs_iau(k) * ratio								          prs_iau(k) = prs_iau(k) * ratio
          prs_sci(k) = prs_sci(k) * ratio								          prs_sci(k) = prs_sci(k) * ratio
          pri_rci(k) = pri_rci(k) * ratio								          pri_rci(k) = pri_rci(k) * ratio
         endif												         endif

!..Rain conservation.											!..Rain conservation.
         sump = -prg_rfz(k) - pri_rfz(k) - prr_rci(k) &							         sump = -prg_rfz(k) - pri_rfz(k) - prr_rci(k) &
                + prr_rcs(k) + prr_rcg(k)								                + prr_rcs(k) + prr_rcg(k)
         rate_max = -rr(k)*odts										         rate_max = -rr(k)*odts
         if (sump.lt. rate_max .and. L_qr(k)) then							         if (sump.lt. rate_max .and. L_qr(k)) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          prg_rfz(k) = prg_rfz(k) * ratio								          prg_rfz(k) = prg_rfz(k) * ratio
          pri_rfz(k) = pri_rfz(k) * ratio								          pri_rfz(k) = pri_rfz(k) * ratio
          prr_rci(k) = prr_rci(k) * ratio								          prr_rci(k) = prr_rci(k) * ratio
          prr_rcs(k) = prr_rcs(k) * ratio								          prr_rcs(k) = prr_rcs(k) * ratio
          prr_rcg(k) = prr_rcg(k) * ratio								          prr_rcg(k) = prr_rcg(k) * ratio
         endif												         endif

!..Snow conservation.											!..Snow conservation.
         sump = prs_sde(k) - prs_ihm(k) - prr_sml(k) &							         sump = prs_sde(k) - prs_ihm(k) - prr_sml(k) &
                + prs_rcs(k)										                + prs_rcs(k)
         rate_max = -rs(k)*odts										         rate_max = -rs(k)*odts
         if (sump.lt. rate_max .and. L_qs(k)) then							         if (sump.lt. rate_max .and. L_qs(k)) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          prs_sde(k) = prs_sde(k) * ratio								          prs_sde(k) = prs_sde(k) * ratio
          prs_ihm(k) = prs_ihm(k) * ratio								          prs_ihm(k) = prs_ihm(k) * ratio
          prr_sml(k) = prr_sml(k) * ratio								          prr_sml(k) = prr_sml(k) * ratio
          prs_rcs(k) = prs_rcs(k) * ratio								          prs_rcs(k) = prs_rcs(k) * ratio
         endif												         endif

!..Graupel conservation.										!..Graupel conservation.
         sump = prg_gde(k) - prg_ihm(k) - prr_gml(k) &							         sump = prg_gde(k) - prg_ihm(k) - prr_gml(k) &
              + prg_rcg(k)										              + prg_rcg(k)
         rate_max = -rg(k)*odts										         rate_max = -rg(k)*odts
         if (sump.lt. rate_max .and. L_qg(k)) then							         if (sump.lt. rate_max .and. L_qg(k)) then
          ratio = rate_max/sump										          ratio = rate_max/sump
          prg_gde(k) = prg_gde(k) * ratio								          prg_gde(k) = prg_gde(k) * ratio
          prg_ihm(k) = prg_ihm(k) * ratio								          prg_ihm(k) = prg_ihm(k) * ratio
          prr_gml(k) = prr_gml(k) * ratio								          prr_gml(k) = prr_gml(k) * ratio
          prg_rcg(k) = prg_rcg(k) * ratio								          prg_rcg(k) = prg_rcg(k) * ratio
         endif												         endif

!..Re-enforce proper mass conservation for subsequent elements in case					!..Re-enforce proper mass conservation for subsequent elements in case
!.. any of the above terms were altered.  Thanks P. Blossey. 2009Sep28					!.. any of the above terms were altered.  Thanks P. Blossey. 2009Sep28
         pri_ihm(k) = prs_ihm(k) + prg_ihm(k)								         pri_ihm(k) = prs_ihm(k) + prg_ihm(k)
         ratio = MIN( ABS(prr_rcg(k)), ABS(prg_rcg(k)) )						         ratio = MIN( ABS(prr_rcg(k)), ABS(prg_rcg(k)) )
         prr_rcg(k) = ratio * SIGN(1.0, SNGL(prr_rcg(k)))						         prr_rcg(k) = ratio * SIGN(1.0, SNGL(prr_rcg(k)))
         prg_rcg(k) = -prr_rcg(k)									         prg_rcg(k) = -prr_rcg(k)
         if (temp(k).gt.T_0) then									         if (temp(k).gt.T_0) then
            ratio = MIN( ABS(prr_rcs(k)), ABS(prs_rcs(k)) )						            ratio = MIN( ABS(prr_rcs(k)), ABS(prs_rcs(k)) )
            prr_rcs(k) = ratio * SIGN(1.0, SNGL(prr_rcs(k)))						            prr_rcs(k) = ratio * SIGN(1.0, SNGL(prr_rcs(k)))
            prs_rcs(k) = -prr_rcs(k)									            prs_rcs(k) = -prr_rcs(k)
         endif												         endif

      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate tendencies of all species but constrain the number of ice					!..Calculate tendencies of all species but constrain the number of ice
!.. to reasonable values.										!.. to reasonable values.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         orho = 1./rho(k)										         orho = 1./rho(k)
         lfus2 = lsub - lvap(k)										         lfus2 = lsub - lvap(k)

!..Aerosol number tendency										!..Aerosol number tendency
         if (is_aerosol_aware) then									         if (is_aerosol_aware) then
            nwfaten(k) = nwfaten(k) - (pna_rca(k) + pna_sca(k)          &				            nwfaten(k) = nwfaten(k) - (pna_rca(k) + pna_sca(k)          &
                       + pna_gca(k) + pni_iha(k)) * orho						                       + pna_gca(k) + pni_iha(k)) * orho
            nifaten(k) = nifaten(k) - (pnd_rcd(k) + pnd_scd(k)          &				            nifaten(k) = nifaten(k) - (pnd_rcd(k) + pnd_scd(k)          &
                       + pnd_gcd(k)) * orho								                       + pnd_gcd(k)) * orho
            if (dustyIce) then										            if (dustyIce) then
               nifaten(k) = nifaten(k) - pni_inu(k)*orho						               nifaten(k) = nifaten(k) - pni_inu(k)*orho
            else											            else
               nifaten(k) = 0.										               nifaten(k) = 0.
            endif											            endif
         endif												         endif

!..Water vapor tendency											!..Water vapor tendency
         qvten(k) = qvten(k) + (-pri_inu(k) - pri_iha(k) - pri_ide(k)   &				         qvten(k) = qvten(k) + (-pri_inu(k) - pri_iha(k) - pri_ide(k)   &
                      - prs_ide(k) - prs_sde(k) - prg_gde(k)) &						                      - prs_ide(k) - prs_sde(k) - prg_gde(k)) &
                      * orho										                      * orho

!..Cloud water tendency											!..Cloud water tendency
         qcten(k) = qcten(k) + (-prr_wau(k) - pri_wfz(k) &						         qcten(k) = qcten(k) + (-prr_wau(k) - pri_wfz(k) &
                      - prr_rcw(k) - prs_scw(k) - prg_scw(k) &						                      - prr_rcw(k) - prs_scw(k) - prg_scw(k) &
                      - prg_gcw(k)) &									                      - prg_gcw(k)) &
                      * orho										                      * orho

!..Cloud water number tendency										!..Cloud water number tendency
         ncten(k) = ncten(k) + (-pnc_wau(k) - pnc_rcw(k) &						         ncten(k) = ncten(k) + (-pnc_wau(k) - pnc_rcw(k) &
                      - pni_wfz(k) - pnc_scw(k) - pnc_gcw(k)) &						                      - pni_wfz(k) - pnc_scw(k) - pnc_gcw(k)) &
                      * orho										                      * orho

!..Cloud water mass/number balance; keep mass-wt mean size between					!..Cloud water mass/number balance; keep mass-wt mean size between
!.. 1 and 50 microns.  Also no more than Nt_c_max drops total.						!.. 1 and 50 microns.  Also no more than Nt_c_max drops total.
         xrc=MAX(R1, (qc1d(k) + qcten(k)*dtsave)*rho(k))						         xrc=MAX(R1, (qc1d(k) + qcten(k)*dtsave)*rho(k))
         xnc=MAX(2., (nc1d(k) + ncten(k)*dtsave)*rho(k))						         xnc=MAX(2., (nc1d(k) + ncten(k)*dtsave)*rho(k))
         if (xrc .gt. R1) then										         if (xrc .gt. R1) then
          nu_c = MIN(15, NINT(1000.E6/xnc) + 2)								          nu_c = MIN(15, NINT(1000.E6/xnc) + 2)
          lamc = (xnc*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr						          lamc = (xnc*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr
          xDc = (bm_r + nu_c + 1.) / lamc								          xDc = (bm_r + nu_c + 1.) / lamc
          if (xDc.lt. D0c) then										          if (xDc.lt. D0c) then
           lamc = cce(2,nu_c)/D0c									           lamc = cce(2,nu_c)/D0c
           xnc = ccg(1,nu_c)*ocg2(nu_c)*xrc/am_r*lamc**bm_r						           xnc = ccg(1,nu_c)*ocg2(nu_c)*xrc/am_r*lamc**bm_r
           ncten(k) = (xnc-nc1d(k)*rho(k))*odts*orho							           ncten(k) = (xnc-nc1d(k)*rho(k))*odts*orho
          elseif (xDc.gt. D0r*2.) then									          elseif (xDc.gt. D0r*2.) then
           lamc = cce(2,nu_c)/(D0r*2.)									           lamc = cce(2,nu_c)/(D0r*2.)
           xnc = ccg(1,nu_c)*ocg2(nu_c)*xrc/am_r*lamc**bm_r						           xnc = ccg(1,nu_c)*ocg2(nu_c)*xrc/am_r*lamc**bm_r
           ncten(k) = (xnc-nc1d(k)*rho(k))*odts*orho							           ncten(k) = (xnc-nc1d(k)*rho(k))*odts*orho
          endif												          endif
         else												         else
          ncten(k) = -nc1d(k)*odts									          ncten(k) = -nc1d(k)*odts
         endif												         endif
         xnc=MAX(0.,(nc1d(k) + ncten(k)*dtsave)*rho(k))							         xnc=MAX(0.,(nc1d(k) + ncten(k)*dtsave)*rho(k))
         if (xnc.gt.Nt_c_max) &										         if (xnc.gt.Nt_c_max) &
                ncten(k) = (Nt_c_max-nc1d(k)*rho(k))*odts*orho						                ncten(k) = (Nt_c_max-nc1d(k)*rho(k))*odts*orho

!..Cloud ice mixing ratio tendency									!..Cloud ice mixing ratio tendency
         qiten(k) = qiten(k) + (pri_inu(k) + pri_iha(k) + pri_ihm(k)    &				         qiten(k) = qiten(k) + (pri_inu(k) + pri_iha(k) + pri_ihm(k)    &
                      + pri_wfz(k) + pri_rfz(k) + pri_ide(k) &						                      + pri_wfz(k) + pri_rfz(k) + pri_ide(k) &
                      - prs_iau(k) - prs_sci(k) - pri_rci(k)) &						                      - prs_iau(k) - prs_sci(k) - pri_rci(k)) &
                      * orho										                      * orho

!..Cloud ice number tendency.										!..Cloud ice number tendency.
         niten(k) = niten(k) + (pni_inu(k) + pni_iha(k) + pni_ihm(k)    &				         niten(k) = niten(k) + (pni_inu(k) + pni_iha(k) + pni_ihm(k)    &
                      + pni_wfz(k) + pni_rfz(k) + pni_ide(k) &						                      + pni_wfz(k) + pni_rfz(k) + pni_ide(k) &
                      - pni_iau(k) - pni_sci(k) - pni_rci(k)) &						                      - pni_iau(k) - pni_sci(k) - pni_rci(k)) &
                      * orho										                      * orho

!..Cloud ice mass/number balance; keep mass-wt mean size between					!..Cloud ice mass/number balance; keep mass-wt mean size between
!.. 5 and 300 microns.  Also no more than 500 xtals per liter.						!.. 5 and 300 microns.  Also no more than 500 xtals per liter.
         xri=MAX(R1,(qi1d(k) + qiten(k)*dtsave)*rho(k))							         xri=MAX(R1,(qi1d(k) + qiten(k)*dtsave)*rho(k))
         xni=MAX(R2,(ni1d(k) + niten(k)*dtsave)*rho(k))							         xni=MAX(R2,(ni1d(k) + niten(k)*dtsave)*rho(k))
         if (xri.gt. R1) then										         if (xri.gt. R1) then
           lami = (am_i*cig(2)*oig1*xni/xri)**obmi							           lami = (am_i*cig(2)*oig1*xni/xri)**obmi
           ilami = 1./lami										           ilami = 1./lami
           xDi = (bm_i + mu_i + 1.) * ilami								           xDi = (bm_i + mu_i + 1.) * ilami
           if (xDi.lt. 5.E-6) then									           if (xDi.lt. 5.E-6) then
            lami = cie(2)/5.E-6										            lami = cie(2)/5.E-6
            xni = MIN(499.D3, cig(1)*oig2*xri/am_i*lami**bm_i)						            xni = MIN(499.D3, cig(1)*oig2*xri/am_i*lami**bm_i)
            niten(k) = (xni-ni1d(k)*rho(k))*odts*orho							            niten(k) = (xni-ni1d(k)*rho(k))*odts*orho
           elseif (xDi.gt. 300.E-6) then								           elseif (xDi.gt. 300.E-6) then
            lami = cie(2)/300.E-6									            lami = cie(2)/300.E-6
            xni = cig(1)*oig2*xri/am_i*lami**bm_i							            xni = cig(1)*oig2*xri/am_i*lami**bm_i
            niten(k) = (xni-ni1d(k)*rho(k))*odts*orho							            niten(k) = (xni-ni1d(k)*rho(k))*odts*orho
           endif											           endif
         else												         else
          niten(k) = -ni1d(k)*odts									          niten(k) = -ni1d(k)*odts
         endif												         endif
         xni=MAX(0.,(ni1d(k) + niten(k)*dtsave)*rho(k))							         xni=MAX(0.,(ni1d(k) + niten(k)*dtsave)*rho(k))
         if (xni.gt.499.E3) &										         if (xni.gt.499.E3) &
                niten(k) = (499.E3-ni1d(k)*rho(k))*odts*orho						                niten(k) = (499.E3-ni1d(k)*rho(k))*odts*orho

!..Rain tendency											!..Rain tendency
         qrten(k) = qrten(k) + (prr_wau(k) + prr_rcw(k) &						         qrten(k) = qrten(k) + (prr_wau(k) + prr_rcw(k) &
                      + prr_sml(k) + prr_gml(k) + prr_rcs(k) &						                      + prr_sml(k) + prr_gml(k) + prr_rcs(k) &
                      + prr_rcg(k) - prg_rfz(k) &							                      + prr_rcg(k) - prg_rfz(k) &
                      - pri_rfz(k) - prr_rci(k)) &							                      - pri_rfz(k) - prr_rci(k)) &
                      * orho										                      * orho

!..Rain number tendency											!..Rain number tendency
         nrten(k) = nrten(k) + (pnr_wau(k) + pnr_sml(k) + pnr_gml(k)    &				         nrten(k) = nrten(k) + (pnr_wau(k) + pnr_sml(k) + pnr_gml(k)    &
                      - (pnr_rfz(k) + pnr_rcr(k) + pnr_rcg(k)           &				                      - (pnr_rfz(k) + pnr_rcr(k) + pnr_rcg(k)           &
                      + pnr_rcs(k) + pnr_rci(k)) )                      &				                      + pnr_rcs(k) + pnr_rci(k)) )                      &
                      * orho										                      * orho

!..Rain mass/number balance; keep median volume diameter between					!..Rain mass/number balance; keep median volume diameter between
!.. 37 microns (D0r*0.75) and 2.5 mm.									!.. 37 microns (D0r*0.75) and 2.5 mm.
         xrr=MAX(R1,(qr1d(k) + qrten(k)*dtsave)*rho(k))							         xrr=MAX(R1,(qr1d(k) + qrten(k)*dtsave)*rho(k))
         xnr=MAX(R2,(nr1d(k) + nrten(k)*dtsave)*rho(k))							         xnr=MAX(R2,(nr1d(k) + nrten(k)*dtsave)*rho(k))
         if (xrr.gt. R1) then										         if (xrr.gt. R1) then
           lamr = (am_r*crg(3)*org2*xnr/xrr)**obmr							           lamr = (am_r*crg(3)*org2*xnr/xrr)**obmr
           mvd_r(k) = (3.0 + mu_r + 0.672) / lamr							           mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
           if (mvd_r(k) .gt. 2.5E-3) then								           if (mvd_r(k) .gt. 2.5E-3) then
              mvd_r(k) = 2.5E-3										              mvd_r(k) = 2.5E-3
              lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							              lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
              xnr = crg(2)*org3*xrr*lamr**bm_r / am_r							              xnr = crg(2)*org3*xrr*lamr**bm_r / am_r
              nrten(k) = (xnr-nr1d(k)*rho(k))*odts*orho							              nrten(k) = (xnr-nr1d(k)*rho(k))*odts*orho
           elseif (mvd_r(k) .lt. D0r*0.75) then								           elseif (mvd_r(k) .lt. D0r*0.75) then
              mvd_r(k) = D0r*0.75									              mvd_r(k) = D0r*0.75
              lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							              lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
              xnr = crg(2)*org3*xrr*lamr**bm_r / am_r							              xnr = crg(2)*org3*xrr*lamr**bm_r / am_r
              nrten(k) = (xnr-nr1d(k)*rho(k))*odts*orho							              nrten(k) = (xnr-nr1d(k)*rho(k))*odts*orho
           endif											           endif
         else												         else
           qrten(k) = -qr1d(k)*odts									           qrten(k) = -qr1d(k)*odts
           nrten(k) = -nr1d(k)*odts									           nrten(k) = -nr1d(k)*odts
         endif												         endif

!..Snow tendency											!..Snow tendency
         qsten(k) = qsten(k) + (prs_iau(k) + prs_sde(k) &						         qsten(k) = qsten(k) + (prs_iau(k) + prs_sde(k) &
                      + prs_sci(k) + prs_scw(k) + prs_rcs(k) &						                      + prs_sci(k) + prs_scw(k) + prs_rcs(k) &
                      + prs_ide(k) - prs_ihm(k) - prr_sml(k)) &						                      + prs_ide(k) - prs_ihm(k) - prr_sml(k)) &
                      * orho										                      * orho

!..Graupel tendency											!..Graupel tendency
         qgten(k) = qgten(k) + (prg_scw(k) + prg_rfz(k) &						         qgten(k) = qgten(k) + (prg_scw(k) + prg_rfz(k) &
                      + prg_gde(k) + prg_rcg(k) + prg_gcw(k) &						                      + prg_gde(k) + prg_rcg(k) + prg_gcw(k) &
                      + prg_rci(k) + prg_rcs(k) - prg_ihm(k) &						                      + prg_rci(k) + prg_rcs(k) - prg_ihm(k) &
                      - prr_gml(k)) &									                      - prr_gml(k)) &
                      * orho										                      * orho

!..Temperature tendency											!..Temperature tendency
         if (temp(k).lt.T_0) then									         if (temp(k).lt.T_0) then
          tten(k) = tten(k) &										          tten(k) = tten(k) &
                    + ( lsub*ocp(k)*(pri_inu(k) + pri_ide(k) &						                    + ( lsub*ocp(k)*(pri_inu(k) + pri_ide(k) &
                                     + prs_ide(k) + prs_sde(k) &					                                     + prs_ide(k) + prs_sde(k) &
                                     + prg_gde(k) + pri_iha(k)) &					                                     + prg_gde(k) + pri_iha(k)) &
                     + lfus2*ocp(k)*(pri_wfz(k) + pri_rfz(k) &						                     + lfus2*ocp(k)*(pri_wfz(k) + pri_rfz(k) &
                                     + prg_rfz(k) + prs_scw(k) &					                                     + prg_rfz(k) + prs_scw(k) &
                                     + prg_scw(k) + prg_gcw(k) &					                                     + prg_scw(k) + prg_gcw(k) &
                                     + prg_rcs(k) + prs_rcs(k) &					                                     + prg_rcs(k) + prs_rcs(k) &
                                     + prr_rci(k) + prg_rcg(k)) &					                                     + prr_rci(k) + prg_rcg(k)) &
                       )*orho * (1-IFDRY)								                       )*orho * (1-IFDRY)
         else												         else
          tten(k) = tten(k) &										          tten(k) = tten(k) &
                    + ( lfus*ocp(k)*(-prr_sml(k) - prr_gml(k) &						                    + ( lfus*ocp(k)*(-prr_sml(k) - prr_gml(k) &
                                     - prr_rcg(k) - prr_rcs(k)) &					                                     - prr_rcg(k) - prr_rcs(k)) &
                      + lsub*ocp(k)*(prs_sde(k) + prg_gde(k)) &						                      + lsub*ocp(k)*(prs_sde(k) + prg_gde(k)) &
                       )*orho * (1-IFDRY)								                       )*orho * (1-IFDRY)
         endif												         endif

      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Update variables for TAU+1 before condensation & sedimention.					!..Update variables for TAU+1 before condensation & sedimention.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         temp(k) = t1d(k) + DT*tten(k)									         temp(k) = t1d(k) + DT*tten(k)
         otemp = 1./temp(k)										         otemp = 1./temp(k)
         tempc = temp(k) - 273.15									         tempc = temp(k) - 273.15
         qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))							         qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))
         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))						         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))
         rhof(k) = SQRT(RHO_NOT/rho(k))									         rhof(k) = SQRT(RHO_NOT/rho(k))
         rhof2(k) = SQRT(rhof(k))									         rhof2(k) = SQRT(rhof(k))
         qvs(k) = rslf(pres(k), temp(k))								         qvs(k) = rslf(pres(k), temp(k))
         ssatw(k) = qv(k)/qvs(k) - 1.									         ssatw(k) = qv(k)/qvs(k) - 1.
         if (abs(ssatw(k)).lt. eps) ssatw(k) = 0.0							         if (abs(ssatw(k)).lt. eps) ssatw(k) = 0.0
         diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))					         diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))
         if (tempc .ge. 0.0) then									         if (tempc .ge. 0.0) then
            visco(k) = (1.718+0.0049*tempc)*1.0E-5							            visco(k) = (1.718+0.0049*tempc)*1.0E-5
         else												         else
            visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5					            visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5
         endif												         endif
         vsc2(k) = SQRT(rho(k)/visco(k))								         vsc2(k) = SQRT(rho(k)/visco(k))
         lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc							         lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc
         tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936						         tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936
         ocp(k) = 1./(Cp*(1.+0.887*qv(k)))								         ocp(k) = 1./(Cp*(1.+0.887*qv(k)))
         lvt2(k)=lvap(k)*lvap(k)*ocp(k)*oRv*otemp*otemp							         lvt2(k)=lvap(k)*lvap(k)*ocp(k)*oRv*otemp*otemp

         nwfa(k) = MAX(11.1E6, (nwfa1d(k) + nwfaten(k)*DT)*rho(k))					         nwfa(k) = MAX(11.1E6, (nwfa1d(k) + nwfaten(k)*DT)*rho(k))

         if ((qc1d(k) + qcten(k)*DT) .gt. R1) then							         if ((qc1d(k) + qcten(k)*DT) .gt. R1) then
            rc(k) = (qc1d(k) + qcten(k)*DT)*rho(k)							            rc(k) = (qc1d(k) + qcten(k)*DT)*rho(k)
            nc(k) = MAX(2., (nc1d(k) + ncten(k)*DT)*rho(k))					   |	            !nc(k) = MAX(2., (nc1d(k) + ncten(k)*DT)*rho(k))
												   >	            ! Dalla 3.9
												   >	            nc(k) = MAX(2., MIN((nc1d(k)+ncten(k)*DT)*rho(k), Nt_c_max))
            if (.NOT. is_aerosol_aware) nc(k) = Nt_c							            if (.NOT. is_aerosol_aware) nc(k) = Nt_c
            L_qc(k) = .true.										            L_qc(k) = .true.
         else												         else
            rc(k) = R1											            rc(k) = R1
            nc(k) = 2.											            nc(k) = 2.
            L_qc(k) = .false.										            L_qc(k) = .false.
         endif												         endif

         if ((qi1d(k) + qiten(k)*DT) .gt. R1) then							         if ((qi1d(k) + qiten(k)*DT) .gt. R1) then
            ri(k) = (qi1d(k) + qiten(k)*DT)*rho(k)							            ri(k) = (qi1d(k) + qiten(k)*DT)*rho(k)
            ni(k) = MAX(R2, (ni1d(k) + niten(k)*DT)*rho(k))						            ni(k) = MAX(R2, (ni1d(k) + niten(k)*DT)*rho(k))
            L_qi(k) = .true. 										            L_qi(k) = .true. 
         else												         else
            ri(k) = R1											            ri(k) = R1
            ni(k) = R2											            ni(k) = R2
            L_qi(k) = .false.										            L_qi(k) = .false.
         endif												         endif

         if ((qr1d(k) + qrten(k)*DT) .gt. R1) then							         if ((qr1d(k) + qrten(k)*DT) .gt. R1) then
            rr(k) = (qr1d(k) + qrten(k)*DT)*rho(k)							            rr(k) = (qr1d(k) + qrten(k)*DT)*rho(k)
            nr(k) = MAX(R2, (nr1d(k) + nrten(k)*DT)*rho(k))						            nr(k) = MAX(R2, (nr1d(k) + nrten(k)*DT)*rho(k))
            L_qr(k) = .true.										            L_qr(k) = .true.
            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
            mvd_r(k) = (3.0 + mu_r + 0.672) / lamr							            mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
            if (mvd_r(k) .gt. 2.5E-3) then								            if (mvd_r(k) .gt. 2.5E-3) then
               mvd_r(k) = 2.5E-3									               mvd_r(k) = 2.5E-3
               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r						               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r
            elseif (mvd_r(k) .lt. D0r*0.75) then							            elseif (mvd_r(k) .lt. D0r*0.75) then
               mvd_r(k) = D0r*0.75									               mvd_r(k) = D0r*0.75
               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							               lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r						               nr(k) = crg(2)*org3*rr(k)*lamr**bm_r / am_r
            endif											            endif
         else												         else
            rr(k) = R1											            rr(k) = R1
            nr(k) = R2											            nr(k) = R2
            L_qr(k) = .false.										            L_qr(k) = .false.
         endif												         endif
               												               
         if ((qs1d(k) + qsten(k)*DT) .gt. R1) then							         if ((qs1d(k) + qsten(k)*DT) .gt. R1) then
            rs(k) = (qs1d(k) + qsten(k)*DT)*rho(k)							            rs(k) = (qs1d(k) + qsten(k)*DT)*rho(k)
            L_qs(k) = .true.										            L_qs(k) = .true.
         else												         else
            rs(k) = R1											            rs(k) = R1
            L_qs(k) = .false.										            L_qs(k) = .false.
         endif												         endif

         if ((qg1d(k) + qgten(k)*DT) .gt. R1) then							         if ((qg1d(k) + qgten(k)*DT) .gt. R1) then
            rg(k) = (qg1d(k) + qgten(k)*DT)*rho(k)							            rg(k) = (qg1d(k) + qgten(k)*DT)*rho(k)
            L_qg(k) = .true.										            L_qg(k) = .true.
         else												         else
            rg(k) = R1											            rg(k) = R1
            L_qg(k) = .false.										            L_qg(k) = .false.
         endif												         endif
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..With tendency-updated mixing ratios, recalculate snow moments and					!..With tendency-updated mixing ratios, recalculate snow moments and
!.. intercepts/slopes of graupel and rain.								!.. intercepts/slopes of graupel and rain.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      if (.not. iiwarm) then										      if (.not. iiwarm) then
      do k = kts, kte											      do k = kts, kte
         if (.not. L_qs(k)) CYCLE									         if (.not. L_qs(k)) CYCLE
         tc0 = MIN(-0.1, temp(k)-273.15)								         tc0 = MIN(-0.1, temp(k)-273.15)
         smob(k) = rs(k)*oams										         smob(k) = rs(k)*oams

!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,					!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,
!.. then we must compute actual 2nd moment and use as reference.					!.. then we must compute actual 2nd moment and use as reference.
         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then					         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then
            smo2(k) = smob(k)										            smo2(k) = smob(k)
         else												         else
            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &							            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &
               + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &							               + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &
               + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &							               + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &
               + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &						               + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &
               + sa(10)*bm_s*bm_s*bm_s									               + sa(10)*bm_s*bm_s*bm_s
            a_ = 10.0**loga_										            a_ = 10.0**loga_
            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &							            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &
               + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &							               + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &
               + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &							               + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &
               + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &						               + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &
               + sb(10)*bm_s*bm_s*bm_s									               + sb(10)*bm_s*bm_s*bm_s
            smo2(k) = (smob(k)/a_)**(1./b_)								            smo2(k) = (smob(k)/a_)**(1./b_)
         endif												         endif

!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.						!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &
               + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &							               + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &
               + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &						               + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &
               + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &						               + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &
               + sa(10)*cse(1)*cse(1)*cse(1)								               + sa(10)*cse(1)*cse(1)*cse(1)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &
              + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &							              + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &
              + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &					              + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &
              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)						              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)
         smoc(k) = a_ * smo2(k)**b_									         smoc(k) = a_ * smo2(k)**b_

!..Calculate bm_s+bv_s (th) moment.  Useful for sedimentation.						!..Calculate bm_s+bv_s (th) moment.  Useful for sedimentation.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(14) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(14) &
               + sa(4)*tc0*cse(14) + sa(5)*tc0*tc0 &							               + sa(4)*tc0*cse(14) + sa(5)*tc0*tc0 &
               + sa(6)*cse(14)*cse(14) + sa(7)*tc0*tc0*cse(14) &					               + sa(6)*cse(14)*cse(14) + sa(7)*tc0*tc0*cse(14) &
               + sa(8)*tc0*cse(14)*cse(14) + sa(9)*tc0*tc0*tc0 &					               + sa(8)*tc0*cse(14)*cse(14) + sa(9)*tc0*tc0*tc0 &
               + sa(10)*cse(14)*cse(14)*cse(14)								               + sa(10)*cse(14)*cse(14)*cse(14)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(14) + sb(4)*tc0*cse(14) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(14) + sb(4)*tc0*cse(14) &
              + sb(5)*tc0*tc0 + sb(6)*cse(14)*cse(14) &							              + sb(5)*tc0*tc0 + sb(6)*cse(14)*cse(14) &
              + sb(7)*tc0*tc0*cse(14) + sb(8)*tc0*cse(14)*cse(14) &					              + sb(7)*tc0*tc0*cse(14) + sb(8)*tc0*cse(14)*cse(14) &
              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(14)*cse(14)*cse(14)					              + sb(9)*tc0*tc0*tc0 + sb(10)*cse(14)*cse(14)*cse(14)
         smod(k) = a_ * smo2(k)**b_									         smod(k) = a_ * smo2(k)**b_
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope values for graupel.							!..Calculate y-intercept, slope values for graupel.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      N0_min = gonv_max											      N0_min = gonv_max
      k_0 = kts												      k_0 = kts
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)							         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)
      enddo												      enddo
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then					         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then
            xslw1 = 4.01 + alog10(mvd_r(k))								            xslw1 = 4.01 + alog10(mvd_r(k))
         else												         else
            xslw1 = 0.01										            xslw1 = 0.01
         endif												         endif
         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))							         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))
         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))		         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))
         N0_exp = 10.**(zans1)										         N0_exp = 10.**(zans1)
         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))					         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
         N0_min = MIN(N0_exp, N0_min)									         N0_min = MIN(N0_exp, N0_min)
         N0_exp = N0_min										         N0_exp = N0_min
         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1							         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg							         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
         ilamg(k) = 1./lamg										         ilamg(k) = 1./lamg
         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)						         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
      enddo												      enddo

      endif												      endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope values for rain.							!..Calculate y-intercept, slope values for rain.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kte, kts, -1										      do k = kte, kts, -1
         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
         ilamr(k) = 1./lamr										         ilamr(k) = 1./lamr
         mvd_r(k) = (3.0 + mu_r + 0.672) / lamr								         mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
         N0_r(k) = nr(k)*org2*lamr**cre(2)								         N0_r(k) = nr(k)*org2*lamr**cre(2)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Cloud water condensation and evaporation.  Nucleate cloud droplets					!..Cloud water condensation and evaporation.  Nucleate cloud droplets
!.. using explicit CCN aerosols with hygroscopicity like sulfates using					!.. using explicit CCN aerosols with hygroscopicity like sulfates using
!.. parcel model lookup table results provided by T. Eidhammer.  Evap					!.. parcel model lookup table results provided by T. Eidhammer.  Evap
!.. drops using calculation of max drop size capable of evaporating in					!.. drops using calculation of max drop size capable of evaporating in
!.. single timestep and explicit number of drops smaller than Dc_star					!.. single timestep and explicit number of drops smaller than Dc_star
!.. from lookup table.											!.. from lookup table.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         orho = 1./rho(k)                                                              ! rho(k)    |	         orho = 1./rho(k)
         if ( (ssatw(k).gt. eps) .or. (ssatw(k).lt. -eps .and. &					         if ( (ssatw(k).gt. eps) .or. (ssatw(k).lt. -eps .and. &
                   L_qc(k)) ) then									                   L_qc(k)) ) then
          clap = (qv(k)-qvs(k))/(1. + lvt2(k)*qvs(k))							          clap = (qv(k)-qvs(k))/(1. + lvt2(k)*qvs(k))
          do n = 1, 3											          do n = 1, 3
             fcd = qvs(k)* EXP(lvt2(k)*clap) - qv(k) + clap						             fcd = qvs(k)* EXP(lvt2(k)*clap) - qv(k) + clap
             dfcd = qvs(k)*lvt2(k)* EXP(lvt2(k)*clap) + 1.						             dfcd = qvs(k)*lvt2(k)* EXP(lvt2(k)*clap) + 1.
             clap = clap - fcd/dfcd									             clap = clap - fcd/dfcd
          enddo												          enddo
          xrc = rc(k) + clap*rho(k)									          xrc = rc(k) + clap*rho(k)
          xnc = 0.											          xnc = 0.
          if (xrc.gt. R1) then										          if (xrc.gt. R1) then
           prw_vcd(k) = clap*odt                                                      ! Condensa   |	           prw_vcd(k) = clap*odt
												   <
!+---+-----------------------------------------------------------------+ !  DROPLET NUCLEATION		!+---+-----------------------------------------------------------------+ !  DROPLET NUCLEATION
           if (clap .gt. eps) then									           if (clap .gt. eps) then
            if (is_aerosol_aware) then									            if (is_aerosol_aware) then
               xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))				   |	               !xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
               if(indirect_feed_chimere==1) then							               if(indirect_feed_chimere==1) then
                  call drop_activation(n_bin,sect,num_aer(k,:),hygro_aer1d(k), &			                  call drop_activation(n_bin,sect,num_aer(k,:),hygro_aer1d(k), &
                                       w1d(k),wtke1d(k),lcldf1d(k),            &			                                       w1d(k),wtke1d(k),lcldf1d(k),            &
                                       temp(k),pres(k),act_frac)					                                       temp(k),pres(k),act_frac)
                  xnc=max(2.,sum(act_frac*num_aer(k,:)))         ! xnc is somewhere between 2. a   |	                  xnc = max(2.,sum(act_frac*num_aer(k,:)))
												   >	                  xnc = min(xnc,Nt_c_max)
               else											               else
                  xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))					                  xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))
               endif											               endif
#else													#else
               xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))					               xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k)))
#endif													#endif
            else											            else
               xnc = Nt_c										               xnc = Nt_c
            endif											            endif
            pnc_wcd(k) = 0.5*(xnc-nc(k) + abs(xnc-nc(k)))*odts*orho				   <

												   >	            pnc_wcd(k) = 0.5*(xnc-nc(k) + abs(xnc-nc(k)))*odts*orho
!+---+-----------------------------------------------------------------+ !  EVAPORATION			!+---+-----------------------------------------------------------------+ !  EVAPORATION
           elseif (clap .lt. -eps .AND. ssatw(k).lt.-1.E-6 .AND. is_aerosol_aware) then			           elseif (clap .lt. -eps .AND. ssatw(k).lt.-1.E-6 .AND. is_aerosol_aware) then
            tempc = temp(k) - 273.15									            tempc = temp(k) - 273.15
            otemp = 1./temp(k)										            otemp = 1./temp(k)
            rvs = rho(k)*qvs(k)										            rvs = rho(k)*qvs(k)
            rvs_p = rvs*otemp*(lvap(k)*otemp*oRv - 1.)							            rvs_p = rvs*otemp*(lvap(k)*otemp*oRv - 1.)
            rvs_pp = rvs * ( otemp*(lvap(k)*otemp*oRv - 1.) &						            rvs_pp = rvs * ( otemp*(lvap(k)*otemp*oRv - 1.) &
                            *otemp*(lvap(k)*otemp*oRv - 1.) &						                            *otemp*(lvap(k)*otemp*oRv - 1.) &
                            + (-2.*lvap(k)*otemp*otemp*otemp*oRv) &					                            + (-2.*lvap(k)*otemp*otemp*otemp*oRv) &
                            + otemp*otemp)								                            + otemp*otemp)
            gamsc = lvap(k)*diffu(k)/tcond(k) * rvs_p							            gamsc = lvap(k)*diffu(k)/tcond(k) * rvs_p
            alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &					            alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &
                       * rvs_pp/rvs_p * rvs/rvs_p							                       * rvs_pp/rvs_p * rvs/rvs_p
            alphsc = MAX(1.E-9, alphsc)									            alphsc = MAX(1.E-9, alphsc)
            xsat = ssatw(k)										            xsat = ssatw(k)
            if (abs(xsat).lt. 1.E-9) xsat=0.								            if (abs(xsat).lt. 1.E-9) xsat=0.
            t1_evap = 2.*PI*( 1.0 - alphsc*xsat  &							            t1_evap = 2.*PI*( 1.0 - alphsc*xsat  &
                   + 2.*alphsc*alphsc*xsat*xsat  &							                   + 2.*alphsc*alphsc*xsat*xsat  &
                   - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &						                   - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &
                   / (1.+gamsc)										                   / (1.+gamsc)

            Dc_star = DSQRT(-2.D0*DT * t1_evap/(2.*PI) &						            Dc_star = DSQRT(-2.D0*DT * t1_evap/(2.*PI) &
                    * 4.*diffu(k)*ssatw(k)*rvs/rho_w)							                    * 4.*diffu(k)*ssatw(k)*rvs/rho_w)
            idx_d = MAX(1, MIN(INT(1.E6*Dc_star), nbc))							            idx_d = MAX(1, MIN(INT(1.E6*Dc_star), nbc))

            idx_n = NINT(1.0 + FLOAT(nbc) * DLOG(nc(k)/t_Nc(1)) / nic1)					            idx_n = NINT(1.0 + FLOAT(nbc) * DLOG(nc(k)/t_Nc(1)) / nic1)
            idx_n = MAX(1, MIN(idx_n, nbc))								            idx_n = MAX(1, MIN(idx_n, nbc))

!..Cloud water lookup table index.									!..Cloud water lookup table index.
            if (rc(k).gt. r_c(1)) then									            if (rc(k).gt. r_c(1)) then
             nic = NINT(ALOG10(rc(k)))									             nic = NINT(ALOG10(rc(k)))
             do nn = nic-1, nic+1									             do nn = nic-1, nic+1
                n = nn											                n = nn
                if ( (rc(k)/10.**nn).ge.1.0 .and. &							                if ( (rc(k)/10.**nn).ge.1.0 .and. &
                     (rc(k)/10.**nn).lt.10.0) goto 159							                     (rc(k)/10.**nn).lt.10.0) goto 159
             enddo											             enddo
 159         continue											 159         continue
             idx_c = INT(rc(k)/10.**n) + 10*(n-nic2) - (n-nic2)						             idx_c = INT(rc(k)/10.**n) + 10*(n-nic2) - (n-nic2)
             idx_c = MAX(1, MIN(idx_c, ntb_c))								             idx_c = MAX(1, MIN(idx_c, ntb_c))
            else											            else
             idx_c = 1											             idx_c = 1
            endif											            endif

           !prw_vcd(k) = MAX(DBLE(-rc(k)*orho*odt),                     &				           !prw_vcd(k) = MAX(DBLE(-rc(k)*orho*odt),                     &
           !           -tpc_wev(idx_d, idx_c, idx_n)*orho*odt)						           !           -tpc_wev(idx_d, idx_c, idx_n)*orho*odt)
            prw_vcd(k) = MAX(DBLE(-rc(k)*0.99*orho*odt), prw_vcd(k))					            prw_vcd(k) = MAX(DBLE(-rc(k)*0.99*orho*odt), prw_vcd(k))
            pnc_wcd(k) = MAX(DBLE(-nc(k)*0.99*orho*odt),                &				            pnc_wcd(k) = MAX(DBLE(-nc(k)*0.99*orho*odt),                &
                       -tnc_wev(idx_d, idx_c, idx_n)*orho*odt)						                       -tnc_wev(idx_d, idx_c, idx_n)*orho*odt)

           endif											           endif
          else												          else
           prw_vcd(k) = -rc(k)*orho*odt									           prw_vcd(k) = -rc(k)*orho*odt
           pnc_wcd(k) = -nc(k)*orho*odt									           pnc_wcd(k) = -nc(k)*orho*odt
          endif												          endif

#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
          if(indirect_feed_chimere==1) dropsource1D(k) = pnc_wcd(k)					          if(indirect_feed_chimere==1) dropsource1D(k) = pnc_wcd(k)
#endif													#endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

          qvten(k) = qvten(k) - prw_vcd(k)								          qvten(k) = qvten(k) - prw_vcd(k)
          qcten(k) = qcten(k) + prw_vcd(k)								          qcten(k) = qcten(k) + prw_vcd(k)
          ncten(k) = ncten(k) + pnc_wcd(k)								          ncten(k) = ncten(k) + pnc_wcd(k)
          nwfaten(k) = nwfaten(k) - pnc_wcd(k)								          nwfaten(k) = nwfaten(k) - pnc_wcd(k)
          tten(k) = tten(k) + lvap(k)*ocp(k)*prw_vcd(k)*(1-IFDRY)					          tten(k) = tten(k) + lvap(k)*ocp(k)*prw_vcd(k)*(1-IFDRY)
          rc(k) = MAX(R1, (qc1d(k) + DT*qcten(k))*rho(k))						          rc(k) = MAX(R1, (qc1d(k) + DT*qcten(k))*rho(k))
          nc(k) = MAX(2., (nc1d(k) + DT*ncten(k))*rho(k))					   |	          !nc(k) = MAX(2., (nc1d(k) + DT*ncten(k))*rho(k))
												   >	          ! Dalla 3.9
												   >	          nc(k) = MAX(2., MIN((nc1d(k)+ncten(k)*DT)*rho(k), Nt_c_max))
          if (.NOT. is_aerosol_aware) nc(k) = Nt_c							          if (.NOT. is_aerosol_aware) nc(k) = Nt_c
          qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))							          qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))
          temp(k) = t1d(k) + DT*tten(k)									          temp(k) = t1d(k) + DT*tten(k)
          rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))						          rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))
          qvs(k) = rslf(pres(k), temp(k))								          qvs(k) = rslf(pres(k), temp(k))
          ssatw(k) = qv(k)/qvs(k) - 1.									          ssatw(k) = qv(k)/qvs(k) - 1.
         endif												         endif
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. If still subsaturated, allow rain to evaporate, following						!.. If still subsaturated, allow rain to evaporate, following
!.. Srivastava & Coen (1992).										!.. Srivastava & Coen (1992).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         if ( (ssatw(k).lt. -eps) .and. L_qr(k) &							         if ( (ssatw(k).lt. -eps) .and. L_qr(k) &
                     .and. (.not.(prw_vcd(k).gt. 0.)) ) then						                     .and. (.not.(prw_vcd(k).gt. 0.)) ) then
          tempc = temp(k) - 273.15									          tempc = temp(k) - 273.15
          otemp = 1./temp(k)										          otemp = 1./temp(k)
          orho = 1./rho(k)										          orho = 1./rho(k)
          rhof(k) = SQRT(RHO_NOT*orho)									          rhof(k) = SQRT(RHO_NOT*orho)
          rhof2(k) = SQRT(rhof(k))									          rhof2(k) = SQRT(rhof(k))
          diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))					          diffu(k) = 2.11E-5*(temp(k)/273.15)**1.94 * (101325./pres(k))
          if (tempc .ge. 0.0) then									          if (tempc .ge. 0.0) then
             visco(k) = (1.718+0.0049*tempc)*1.0E-5							             visco(k) = (1.718+0.0049*tempc)*1.0E-5
          else												          else
             visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5					             visco(k) = (1.718+0.0049*tempc-1.2E-5*tempc*tempc)*1.0E-5
          endif												          endif
          vsc2(k) = SQRT(rho(k)/visco(k))								          vsc2(k) = SQRT(rho(k)/visco(k))
          lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc							          lvap(k) = lvap0 + (2106.0 - 4218.0)*tempc
          tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936						          tcond(k) = (5.69 + 0.0168*tempc)*1.0E-5 * 418.936
          ocp(k) = 1./(Cp*(1.+0.887*qv(k)))								          ocp(k) = 1./(Cp*(1.+0.887*qv(k)))

          rvs = rho(k)*qvs(k)										          rvs = rho(k)*qvs(k)
          rvs_p = rvs*otemp*(lvap(k)*otemp*oRv - 1.)							          rvs_p = rvs*otemp*(lvap(k)*otemp*oRv - 1.)
          rvs_pp = rvs * ( otemp*(lvap(k)*otemp*oRv - 1.) &						          rvs_pp = rvs * ( otemp*(lvap(k)*otemp*oRv - 1.) &
                          *otemp*(lvap(k)*otemp*oRv - 1.) &						                          *otemp*(lvap(k)*otemp*oRv - 1.) &
                          + (-2.*lvap(k)*otemp*otemp*otemp*oRv) &					                          + (-2.*lvap(k)*otemp*otemp*otemp*oRv) &
                          + otemp*otemp)								                          + otemp*otemp)
          gamsc = lvap(k)*diffu(k)/tcond(k) * rvs_p							          gamsc = lvap(k)*diffu(k)/tcond(k) * rvs_p
          alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &						          alphsc = 0.5*(gamsc/(1.+gamsc))*(gamsc/(1.+gamsc)) &
                     * rvs_pp/rvs_p * rvs/rvs_p								                     * rvs_pp/rvs_p * rvs/rvs_p
          alphsc = MAX(1.E-9, alphsc)									          alphsc = MAX(1.E-9, alphsc)
          xsat   = MIN(-1.E-9, ssatw(k))								          xsat   = MIN(-1.E-9, ssatw(k))
          t1_evap = 2.*PI*( 1.0 - alphsc*xsat  &							          t1_evap = 2.*PI*( 1.0 - alphsc*xsat  &
                 + 2.*alphsc*alphsc*xsat*xsat  &							                 + 2.*alphsc*alphsc*xsat*xsat  &
                 - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &						                 - 5.*alphsc*alphsc*alphsc*xsat*xsat*xsat ) &
                 / (1.+gamsc)										                 / (1.+gamsc)

          lamr = 1./ilamr(k)										          lamr = 1./ilamr(k)
!..Rapidly eliminate near zero values when low humidity (<95%)						!..Rapidly eliminate near zero values when low humidity (<95%)
          if (qv(k)/qvs(k) .lt. 0.95 .AND. rr(k)*orho.le.1.E-8) then					          if (qv(k)/qvs(k) .lt. 0.95 .AND. rr(k)*orho.le.1.E-8) then
          prv_rev(k) = rr(k)*orho*odts									          prv_rev(k) = rr(k)*orho*odts
          else												          else
          prv_rev(k) = t1_evap*diffu(k)*(-ssatw(k))*N0_r(k)*rvs &					          prv_rev(k) = t1_evap*diffu(k)*(-ssatw(k))*N0_r(k)*rvs &
              * (t1_qr_ev*ilamr(k)**cre(10) &								              * (t1_qr_ev*ilamr(k)**cre(10) &
              + t2_qr_ev*vsc2(k)*rhof2(k)*((lamr+0.5*fv_r)**(-cre(11))))				              + t2_qr_ev*vsc2(k)*rhof2(k)*((lamr+0.5*fv_r)**(-cre(11))))
          rate_max = MIN((rr(k)*orho*odts), (qvs(k)-qv(k))*odts)					          rate_max = MIN((rr(k)*orho*odts), (qvs(k)-qv(k))*odts)
          prv_rev(k) = MIN(DBLE(rate_max), prv_rev(k)*orho)						          prv_rev(k) = MIN(DBLE(rate_max), prv_rev(k)*orho)

!..TEST: G. Thompson  10 May 2013									!..TEST: G. Thompson  10 May 2013
!..Reduce the rain evaporation in same places as melting graupel occurs. 				!..Reduce the rain evaporation in same places as melting graupel occurs. 
!..Rationale: falling and simultaneous melting graupel in subsaturated					!..Rationale: falling and simultaneous melting graupel in subsaturated
!..regions will not melt as fast because particle temperature stays					!..regions will not melt as fast because particle temperature stays
!..at 0C.  Also not much shedding of the water from the graupel so					!..at 0C.  Also not much shedding of the water from the graupel so
!..likely that the water-coated graupel evaporating much slower than					!..likely that the water-coated graupel evaporating much slower than
!..if the water was immediately shed off.								!..if the water was immediately shed off.
          IF (prr_gml(k).gt.0.0) THEN									          IF (prr_gml(k).gt.0.0) THEN
             eva_factor = MIN(1.0, 0.01+(0.99-0.01)*(tempc/20.0))					             eva_factor = MIN(1.0, 0.01+(0.99-0.01)*(tempc/20.0))
             prv_rev(k) = prv_rev(k)*eva_factor								             prv_rev(k) = prv_rev(k)*eva_factor
          ENDIF												          ENDIF
          endif												          endif

          pnr_rev(k) = MIN(DBLE(nr(k)*0.99*orho*odts),                  &   ! RAIN2M			          pnr_rev(k) = MIN(DBLE(nr(k)*0.99*orho*odts),                  &   ! RAIN2M
                       prv_rev(k) * nr(k)/rr(k))							                       prv_rev(k) * nr(k)/rr(k))

          qrten(k) = qrten(k) - prv_rev(k)								          qrten(k) = qrten(k) - prv_rev(k)
          qvten(k) = qvten(k) + prv_rev(k)								          qvten(k) = qvten(k) + prv_rev(k)
          nrten(k) = nrten(k) - pnr_rev(k)								          nrten(k) = nrten(k) - pnr_rev(k)
          nwfaten(k) = nwfaten(k) + pnr_rev(k)								          nwfaten(k) = nwfaten(k) + pnr_rev(k)
          tten(k) = tten(k) - lvap(k)*ocp(k)*prv_rev(k)*(1-IFDRY)					          tten(k) = tten(k) - lvap(k)*ocp(k)*prv_rev(k)*(1-IFDRY)

          rr(k) = MAX(R1, (qr1d(k) + DT*qrten(k))*rho(k))						          rr(k) = MAX(R1, (qr1d(k) + DT*qrten(k))*rho(k))
          qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))							          qv(k) = MAX(1.E-10, qv1d(k) + DT*qvten(k))
          nr(k) = MAX(R2, (nr1d(k) + DT*nrten(k))*rho(k))						          nr(k) = MAX(R2, (nr1d(k) + DT*nrten(k))*rho(k))
          temp(k) = t1d(k) + DT*tten(k)									          temp(k) = t1d(k) + DT*tten(k)
          rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))						          rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))
         endif												         endif
      enddo												      enddo
#if ( WRF_CHEM == 1 )											#if ( WRF_CHEM == 1 )
      do k = kts, kte											      do k = kts, kte
         evapprod(k) = prv_rev(k) - (min(zeroD0,prs_sde(k)) + &						         evapprod(k) = prv_rev(k) - (min(zeroD0,prs_sde(k)) + &
                                     min(zeroD0,prg_gde(k)))						                                     min(zeroD0,prg_gde(k)))
         rainprod(k) = prr_wau(k) + prr_rcw(k) + prs_scw(k) + &						         rainprod(k) = prr_wau(k) + prr_rcw(k) + prs_scw(k) + &
                                    prg_scw(k) + prs_iau(k) + &						                                    prg_scw(k) + prs_iau(k) + &
                                    prg_gcw(k) + prs_sci(k) + &						                                    prg_gcw(k) + prs_sci(k) + &
                                    pri_rci(k)								                                    pri_rci(k)
      enddo												      enddo
#endif													#endif
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
      do k = kts,kte											      do k = kts,kte
         evaprate1d(k) = prv_rev(k) - (min(zeroD0,prs_sde(k)) + &					         evaprate1d(k) = prv_rev(k) - (min(zeroD0,prs_sde(k)) + &
                                       min(zeroD0,prg_gde(k)))						                                       min(zeroD0,prg_gde(k)))
         rainrate1d(k) = prr_wau(k) + prr_rcw(k) + prs_scw(k) + &					         rainrate1d(k) = prr_wau(k) + prr_rcw(k) + prs_scw(k) + &
                                      prg_scw(k) + prs_iau(k) + &					                                      prg_scw(k) + prs_iau(k) + &
                                      prg_gcw(k) + prs_sci(k) + &					                                      prg_gcw(k) + prs_sci(k) + &
                                      pri_rci(k)							                                      pri_rci(k)
      enddo												      enddo
#endif													#endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Find max terminal fallspeed (distribution mass-weighted mean						!..Find max terminal fallspeed (distribution mass-weighted mean
!.. velocity) and use it to determine if we need to split the timestep					!.. velocity) and use it to determine if we need to split the timestep
!.. (var nstep>1).  Either way, only bother to do sedimentation below					!.. (var nstep>1).  Either way, only bother to do sedimentation below
!.. 1st level that contains any sedimenting particles (k=ksed1 on down).				!.. 1st level that contains any sedimenting particles (k=ksed1 on down).
!.. New in v3.0+ is computing separate for rain, ice, snow, and						!.. New in v3.0+ is computing separate for rain, ice, snow, and
!.. graupel species thus making code faster with credit to J. Schmidt.					!.. graupel species thus making code faster with credit to J. Schmidt.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      nstep = 0												      nstep = 0
      onstep(:) = 1.0											      onstep(:) = 1.0
      ksed1(:) = 1											      ksed1(:) = 1
      do k = kte+1, kts, -1										      do k = kte+1, kts, -1
         vtrk(k) = 0.											         vtrk(k) = 0.
         vtnrk(k) = 0.											         vtnrk(k) = 0.
         vtik(k) = 0.											         vtik(k) = 0.
         vtnik(k) = 0.											         vtnik(k) = 0.
         vtsk(k) = 0.											         vtsk(k) = 0.
         vtgk(k) = 0.											         vtgk(k) = 0.
         vtck(k) = 0.											         vtck(k) = 0.
         vtnck(k) = 0.											         vtnck(k) = 0.
      enddo												      enddo
      do k = kte, kts, -1										      do k = kte, kts, -1
         vtr = 0.											         vtr = 0.
         rhof(k) = SQRT(RHO_NOT/rho(k))									         rhof(k) = SQRT(RHO_NOT/rho(k))

         if (rr(k).gt. R1) then										         if (rr(k).gt. R1) then
          lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							          lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
          vtr = rhof(k)*av_r*crg(6)*org3 * lamr**cre(3)                 &				          vtr = rhof(k)*av_r*crg(6)*org3 * lamr**cre(3)                 &
                      *((lamr+fv_r)**(-cre(6)))								                      *((lamr+fv_r)**(-cre(6)))
          vtrk(k) = vtr											          vtrk(k) = vtr
! First below is technically correct:									! First below is technically correct:
!         vtr = rhof(k)*av_r*crg(5)*org2 * lamr**cre(2)                 &				!         vtr = rhof(k)*av_r*crg(5)*org2 * lamr**cre(2)                 &
!                     *((lamr+fv_r)**(-cre(5)))								!                     *((lamr+fv_r)**(-cre(5)))
! Test: make number fall faster (but still slower than mass)						! Test: make number fall faster (but still slower than mass)
! Goal: less prominent size sorting									! Goal: less prominent size sorting
          vtr = rhof(k)*av_r*crg(7)/crg(12) * lamr**cre(12)             &				          vtr = rhof(k)*av_r*crg(7)/crg(12) * lamr**cre(12)             &
                      *((lamr+fv_r)**(-cre(7)))								                      *((lamr+fv_r)**(-cre(7)))
          vtnrk(k) = vtr										          vtnrk(k) = vtr
         else												         else
          vtrk(k) = vtrk(k+1)										          vtrk(k) = vtrk(k+1)
          vtnrk(k) = vtnrk(k+1)										          vtnrk(k) = vtnrk(k+1)
         endif												         endif

         if (MAX(vtrk(k),vtnrk(k)) .gt. 1.E-3) then							         if (MAX(vtrk(k),vtnrk(k)) .gt. 1.E-3) then
            ksed1(1) = MAX(ksed1(1), k)									            ksed1(1) = MAX(ksed1(1), k)
            delta_tp = dzq(k)/(MAX(vtrk(k),vtnrk(k)))							            delta_tp = dzq(k)/(MAX(vtrk(k),vtnrk(k)))
            nstep = MAX(nstep, INT(DT/delta_tp + 1.))							            nstep = MAX(nstep, INT(DT/delta_tp + 1.))
         endif												         endif
      enddo												      enddo
      if (ksed1(1) .eq. kte) ksed1(1) = kte-1								      if (ksed1(1) .eq. kte) ksed1(1) = kte-1
      if (nstep .gt. 0) onstep(1) = 1./REAL(nstep)							      if (nstep .gt. 0) onstep(1) = 1./REAL(nstep)

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      hgt_agl = 0.											      hgt_agl = 0.
      do k = kts, kte-1											      do k = kts, kte-1
         if (rc(k) .gt. R2) ksed1(5) = k								         if (rc(k) .gt. R2) ksed1(5) = k
         hgt_agl = hgt_agl + dzq(k)									         hgt_agl = hgt_agl + dzq(k)
         if (hgt_agl .gt. 500.0) goto 151								         if (hgt_agl .gt. 500.0) goto 151
      enddo												      enddo
 151  continue												 151  continue

      do k = ksed1(5), kts, -1										      do k = ksed1(5), kts, -1
         vtc = 0.											         vtc = 0.
         if (rc(k) .gt. R1 .and. w1d(k) .lt. 1.E-1) then						         if (rc(k) .gt. R1 .and. w1d(k) .lt. 1.E-1) then
          nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)							          nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)
          lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr					          lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr
          ilamc = 1./lamc										          ilamc = 1./lamc
          vtc = rhof(k)*av_c*ccg(5,nu_c)*ocg2(nu_c) * ilamc**bv_c					          vtc = rhof(k)*av_c*ccg(5,nu_c)*ocg2(nu_c) * ilamc**bv_c
          vtck(k) = vtc											          vtck(k) = vtc
          vtc = rhof(k)*av_c*ccg(4,nu_c)*ocg1(nu_c) * ilamc**bv_c					          vtc = rhof(k)*av_c*ccg(4,nu_c)*ocg1(nu_c) * ilamc**bv_c
          vtnck(k) = vtc										          vtnck(k) = vtc
         endif												         endif
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      if (.not. iiwarm) then										      if (.not. iiwarm) then

       nstep = 0											       nstep = 0
       do k = kte, kts, -1										       do k = kte, kts, -1
          vti = 0.											          vti = 0.

          if (ri(k).gt. R1) then									          if (ri(k).gt. R1) then
           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi							           lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
           ilami = 1./lami										           ilami = 1./lami
           vti = rhof(k)*av_i*cig(3)*oig2 * ilami**bv_i							           vti = rhof(k)*av_i*cig(3)*oig2 * ilami**bv_i
           vtik(k) = vti										           vtik(k) = vti
! First below is technically correct:									! First below is technically correct:
!          vti = rhof(k)*av_i*cig(4)*oig1 * ilami**bv_i							!          vti = rhof(k)*av_i*cig(4)*oig1 * ilami**bv_i
! Goal: less prominent size sorting									! Goal: less prominent size sorting
           vti = rhof(k)*av_i*cig(6)/cig(7) * ilami**bv_i						           vti = rhof(k)*av_i*cig(6)/cig(7) * ilami**bv_i
           vtnik(k) = vti										           vtnik(k) = vti
          else												          else
           vtik(k) = vtik(k+1)										           vtik(k) = vtik(k+1)
           vtnik(k) = vtnik(k+1)									           vtnik(k) = vtnik(k+1)
          endif												          endif

          if (vtik(k) .gt. 1.E-3) then									          if (vtik(k) .gt. 1.E-3) then
             ksed1(2) = MAX(ksed1(2), k)								             ksed1(2) = MAX(ksed1(2), k)
             delta_tp = dzq(k)/vtik(k)									             delta_tp = dzq(k)/vtik(k)
             nstep = MAX(nstep, INT(DT/delta_tp + 1.))							             nstep = MAX(nstep, INT(DT/delta_tp + 1.))
          endif												          endif
       enddo												       enddo
       if (ksed1(2) .eq. kte) ksed1(2) = kte-1								       if (ksed1(2) .eq. kte) ksed1(2) = kte-1
       if (nstep .gt. 0) onstep(2) = 1./REAL(nstep)							       if (nstep .gt. 0) onstep(2) = 1./REAL(nstep)

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

       nstep = 0											       nstep = 0
       do k = kte, kts, -1										       do k = kte, kts, -1
          vts = 0.											          vts = 0.

          if (rs(k).gt. R1) then									          if (rs(k).gt. R1) then
           xDs = smoc(k) / smob(k)									           xDs = smoc(k) / smob(k)
           Mrat = 1./xDs										           Mrat = 1./xDs
           ils1 = 1./(Mrat*Lam0 + fv_s)									           ils1 = 1./(Mrat*Lam0 + fv_s)
           ils2 = 1./(Mrat*Lam1 + fv_s)									           ils2 = 1./(Mrat*Lam1 + fv_s)
           t1_vts = Kap0*csg(4)*ils1**cse(4)								           t1_vts = Kap0*csg(4)*ils1**cse(4)
           t2_vts = Kap1*Mrat**mu_s*csg(10)*ils2**cse(10)						           t2_vts = Kap1*Mrat**mu_s*csg(10)*ils2**cse(10)
           ils1 = 1./(Mrat*Lam0)									           ils1 = 1./(Mrat*Lam0)
           ils2 = 1./(Mrat*Lam1)									           ils2 = 1./(Mrat*Lam1)
           t3_vts = Kap0*csg(1)*ils1**cse(1)								           t3_vts = Kap0*csg(1)*ils1**cse(1)
           t4_vts = Kap1*Mrat**mu_s*csg(7)*ils2**cse(7)							           t4_vts = Kap1*Mrat**mu_s*csg(7)*ils2**cse(7)
           vts = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts)						           vts = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts)
           if (temp(k).gt. (T_0+0.1)) then								           if (temp(k).gt. (T_0+0.1)) then
            vtsk(k) = MAX(vts*vts_boost(k),                             &				            vtsk(k) = MAX(vts*vts_boost(k),                             &
     &                vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0)))					     &                vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0)))
           else												           else
            vtsk(k) = vts*vts_boost(k)									            vtsk(k) = vts*vts_boost(k)
           endif											           endif
          else												          else
            vtsk(k) = vtsk(k+1)										            vtsk(k) = vtsk(k+1)
          endif												          endif

          if (vtsk(k) .gt. 1.E-3) then									          if (vtsk(k) .gt. 1.E-3) then
             ksed1(3) = MAX(ksed1(3), k)								             ksed1(3) = MAX(ksed1(3), k)
             delta_tp = dzq(k)/vtsk(k)									             delta_tp = dzq(k)/vtsk(k)
             nstep = MAX(nstep, INT(DT/delta_tp + 1.))							             nstep = MAX(nstep, INT(DT/delta_tp + 1.))
          endif												          endif
       enddo												       enddo
       if (ksed1(3) .eq. kte) ksed1(3) = kte-1								       if (ksed1(3) .eq. kte) ksed1(3) = kte-1
       if (nstep .gt. 0) onstep(3) = 1./REAL(nstep)							       if (nstep .gt. 0) onstep(3) = 1./REAL(nstep)

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

       nstep = 0											       nstep = 0
       do k = kte, kts, -1										       do k = kte, kts, -1
          vtg = 0.											          vtg = 0.

          if (rg(k).gt. R1) then									          if (rg(k).gt. R1) then
           vtg = rhof(k)*av_g*cgg(6)*ogg3 * ilamg(k)**bv_g						           vtg = rhof(k)*av_g*cgg(6)*ogg3 * ilamg(k)**bv_g
           if (temp(k).gt. T_0) then									           if (temp(k).gt. T_0) then
            vtgk(k) = MAX(vtg, vtrk(k))									            vtgk(k) = MAX(vtg, vtrk(k))
           else												           else
            vtgk(k) = vtg										            vtgk(k) = vtg
           endif											           endif
          else												          else
            vtgk(k) = vtgk(k+1)										            vtgk(k) = vtgk(k+1)
          endif												          endif

          if (vtgk(k) .gt. 1.E-3) then									          if (vtgk(k) .gt. 1.E-3) then
             ksed1(4) = MAX(ksed1(4), k)								             ksed1(4) = MAX(ksed1(4), k)
             delta_tp = dzq(k)/vtgk(k)									             delta_tp = dzq(k)/vtgk(k)
             nstep = MAX(nstep, INT(DT/delta_tp + 1.))							             nstep = MAX(nstep, INT(DT/delta_tp + 1.))
          endif												          endif
       enddo												       enddo
       if (ksed1(4) .eq. kte) ksed1(4) = kte-1								       if (ksed1(4) .eq. kte) ksed1(4) = kte-1
       if (nstep .gt. 0) onstep(4) = 1./REAL(nstep)							       if (nstep .gt. 0) onstep(4) = 1./REAL(nstep)
      endif												      endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Sedimentation of mixing ratio is the integral of v(D)*m(D)*N(D)*dD,					!..Sedimentation of mixing ratio is the integral of v(D)*m(D)*N(D)*dD,
!.. whereas neglect m(D) term for number concentration.  Therefore,					!.. whereas neglect m(D) term for number concentration.  Therefore,
!.. cloud ice has proper differential sedimentation.							!.. cloud ice has proper differential sedimentation.
!.. New in v3.0+ is computing separate for rain, ice, snow, and						!.. New in v3.0+ is computing separate for rain, ice, snow, and
!.. graupel species thus making code faster with credit to J. Schmidt.					!.. graupel species thus making code faster with credit to J. Schmidt.
!.. Bug fix, 2013Nov01 to tendencies using rho(k+1) correction thanks to				!.. Bug fix, 2013Nov01 to tendencies using rho(k+1) correction thanks to
!.. Eric Skyllingstad.											!.. Eric Skyllingstad.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      nstep = NINT(1./onstep(1))									      nstep = NINT(1./onstep(1))
      do n = 1, nstep											      do n = 1, nstep
         do k = kte, kts, -1										         do k = kte, kts, -1
            sed_r(k) = vtrk(k)*rr(k)									            sed_r(k) = vtrk(k)*rr(k)
            sed_n(k) = vtnrk(k)*nr(k)									            sed_n(k) = vtnrk(k)*nr(k)
         enddo												         enddo
         k = kte											         k = kte
         odzq = 1./dzq(k)										         odzq = 1./dzq(k)
         orho = 1./rho(k)										         orho = 1./rho(k)
         qrten(k) = qrten(k) - sed_r(k)*odzq*onstep(1)*orho						         qrten(k) = qrten(k) - sed_r(k)*odzq*onstep(1)*orho
         nrten(k) = nrten(k) - sed_n(k)*odzq*onstep(1)*orho						         nrten(k) = nrten(k) - sed_n(k)*odzq*onstep(1)*orho
         rr(k) = MAX(R1, rr(k) - sed_r(k)*odzq*DT*onstep(1))						         rr(k) = MAX(R1, rr(k) - sed_r(k)*odzq*DT*onstep(1))
         nr(k) = MAX(R2, nr(k) - sed_n(k)*odzq*DT*onstep(1))						         nr(k) = MAX(R2, nr(k) - sed_n(k)*odzq*DT*onstep(1))
         do k = ksed1(1), kts, -1									         do k = ksed1(1), kts, -1
            odzq = 1./dzq(k)										            odzq = 1./dzq(k)
            orho = 1./rho(k)										            orho = 1./rho(k)
            qrten(k) = qrten(k) + (sed_r(k+1)-sed_r(k))                 &				            qrten(k) = qrten(k) + (sed_r(k+1)-sed_r(k))                 &
                                               *odzq*onstep(1)*orho					                                               *odzq*onstep(1)*orho
            nrten(k) = nrten(k) + (sed_n(k+1)-sed_n(k))                 &				            nrten(k) = nrten(k) + (sed_n(k+1)-sed_n(k))                 &
                                               *odzq*onstep(1)*orho					                                               *odzq*onstep(1)*orho
            rr(k) = MAX(R1, rr(k) + (sed_r(k+1)-sed_r(k)) &						            rr(k) = MAX(R1, rr(k) + (sed_r(k+1)-sed_r(k)) &
                                           *odzq*DT*onstep(1))						                                           *odzq*DT*onstep(1))
            nr(k) = MAX(R2, nr(k) + (sed_n(k+1)-sed_n(k)) &						            nr(k) = MAX(R2, nr(k) + (sed_n(k+1)-sed_n(k)) &
                                           *odzq*DT*onstep(1))						                                           *odzq*DT*onstep(1))
         enddo												         enddo

         if (rr(kts).gt.R1*10.) &									         if (rr(kts).gt.R1*10.) &
         pptrain = pptrain + sed_r(kts)*DT*onstep(1)							         pptrain = pptrain + sed_r(kts)*DT*onstep(1)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      do k = kte, kts, -1										      do k = kte, kts, -1
         sed_c(k) = vtck(k)*rc(k)									         sed_c(k) = vtck(k)*rc(k)
         sed_n(k) = vtnck(k)*nc(k)									         sed_n(k) = vtnck(k)*nc(k)
      enddo												      enddo
      do k = ksed1(5), kts, -1										      do k = ksed1(5), kts, -1
         odzq = 1./dzq(k)										         odzq = 1./dzq(k)
         orho = 1./rho(k)										         orho = 1./rho(k)
         qcten(k) = qcten(k) + (sed_c(k+1)-sed_c(k)) *odzq*orho						         qcten(k) = qcten(k) + (sed_c(k+1)-sed_c(k)) *odzq*orho
         ncten(k) = ncten(k) + (sed_n(k+1)-sed_n(k)) *odzq*orho						         ncten(k) = ncten(k) + (sed_n(k+1)-sed_n(k)) *odzq*orho
         rc(k) = MAX(R1, rc(k) + (sed_c(k+1)-sed_c(k)) *odzq*DT)					         rc(k) = MAX(R1, rc(k) + (sed_c(k+1)-sed_c(k)) *odzq*DT)
         nc(k) = MAX(10., nc(k) + (sed_n(k+1)-sed_n(k)) *odzq*DT)					         nc(k) = MAX(10., nc(k) + (sed_n(k+1)-sed_n(k)) *odzq*DT)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      nstep = NINT(1./onstep(2))									      nstep = NINT(1./onstep(2))
      do n = 1, nstep											      do n = 1, nstep
         do k = kte, kts, -1										         do k = kte, kts, -1
            sed_i(k) = vtik(k)*ri(k)									            sed_i(k) = vtik(k)*ri(k)
            sed_n(k) = vtnik(k)*ni(k)									            sed_n(k) = vtnik(k)*ni(k)
         enddo												         enddo
         k = kte											         k = kte
         odzq = 1./dzq(k)										         odzq = 1./dzq(k)
         orho = 1./rho(k)										         orho = 1./rho(k)
         qiten(k) = qiten(k) - sed_i(k)*odzq*onstep(2)*orho						         qiten(k) = qiten(k) - sed_i(k)*odzq*onstep(2)*orho
         niten(k) = niten(k) - sed_n(k)*odzq*onstep(2)*orho						         niten(k) = niten(k) - sed_n(k)*odzq*onstep(2)*orho
         ri(k) = MAX(R1, ri(k) - sed_i(k)*odzq*DT*onstep(2))						         ri(k) = MAX(R1, ri(k) - sed_i(k)*odzq*DT*onstep(2))
         ni(k) = MAX(R2, ni(k) - sed_n(k)*odzq*DT*onstep(2))						         ni(k) = MAX(R2, ni(k) - sed_n(k)*odzq*DT*onstep(2))
         do k = ksed1(2), kts, -1									         do k = ksed1(2), kts, -1
            odzq = 1./dzq(k)										            odzq = 1./dzq(k)
            orho = 1./rho(k)										            orho = 1./rho(k)
            qiten(k) = qiten(k) + (sed_i(k+1)-sed_i(k))                 &				            qiten(k) = qiten(k) + (sed_i(k+1)-sed_i(k))                 &
                                               *odzq*onstep(2)*orho					                                               *odzq*onstep(2)*orho
            niten(k) = niten(k) + (sed_n(k+1)-sed_n(k))                 &				            niten(k) = niten(k) + (sed_n(k+1)-sed_n(k))                 &
                                               *odzq*onstep(2)*orho					                                               *odzq*onstep(2)*orho
            ri(k) = MAX(R1, ri(k) + (sed_i(k+1)-sed_i(k)) &						            ri(k) = MAX(R1, ri(k) + (sed_i(k+1)-sed_i(k)) &
                                           *odzq*DT*onstep(2))						                                           *odzq*DT*onstep(2))
            ni(k) = MAX(R2, ni(k) + (sed_n(k+1)-sed_n(k)) &						            ni(k) = MAX(R2, ni(k) + (sed_n(k+1)-sed_n(k)) &
                                           *odzq*DT*onstep(2))						                                           *odzq*DT*onstep(2))
         enddo												         enddo

         if (ri(kts).gt.R1*10.) &									         if (ri(kts).gt.R1*10.) &
         pptice = pptice + sed_i(kts)*DT*onstep(2)							         pptice = pptice + sed_i(kts)*DT*onstep(2)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      nstep = NINT(1./onstep(3))									      nstep = NINT(1./onstep(3))
      do n = 1, nstep											      do n = 1, nstep
         do k = kte, kts, -1										         do k = kte, kts, -1
            sed_s(k) = vtsk(k)*rs(k)									            sed_s(k) = vtsk(k)*rs(k)
         enddo												         enddo
         k = kte											         k = kte
         odzq = 1./dzq(k)										         odzq = 1./dzq(k)
         orho = 1./rho(k)										         orho = 1./rho(k)
         qsten(k) = qsten(k) - sed_s(k)*odzq*onstep(3)*orho						         qsten(k) = qsten(k) - sed_s(k)*odzq*onstep(3)*orho
         rs(k) = MAX(R1, rs(k) - sed_s(k)*odzq*DT*onstep(3))						         rs(k) = MAX(R1, rs(k) - sed_s(k)*odzq*DT*onstep(3))
         do k = ksed1(3), kts, -1									         do k = ksed1(3), kts, -1
            odzq = 1./dzq(k)										            odzq = 1./dzq(k)
            orho = 1./rho(k)										            orho = 1./rho(k)
            qsten(k) = qsten(k) + (sed_s(k+1)-sed_s(k))                 &				            qsten(k) = qsten(k) + (sed_s(k+1)-sed_s(k))                 &
                                               *odzq*onstep(3)*orho					                                               *odzq*onstep(3)*orho
            rs(k) = MAX(R1, rs(k) + (sed_s(k+1)-sed_s(k)) &						            rs(k) = MAX(R1, rs(k) + (sed_s(k+1)-sed_s(k)) &
                                           *odzq*DT*onstep(3))						                                           *odzq*DT*onstep(3))
         enddo												         enddo

         if (rs(kts).gt.R1*10.) &									         if (rs(kts).gt.R1*10.) &
         pptsnow = pptsnow + sed_s(kts)*DT*onstep(3)							         pptsnow = pptsnow + sed_s(kts)*DT*onstep(3)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      nstep = NINT(1./onstep(4))									      nstep = NINT(1./onstep(4))
      do n = 1, nstep											      do n = 1, nstep
         do k = kte, kts, -1										         do k = kte, kts, -1
            sed_g(k) = vtgk(k)*rg(k)									            sed_g(k) = vtgk(k)*rg(k)
         enddo												         enddo
         k = kte											         k = kte
         odzq = 1./dzq(k)										         odzq = 1./dzq(k)
         orho = 1./rho(k)										         orho = 1./rho(k)
         qgten(k) = qgten(k) - sed_g(k)*odzq*onstep(4)*orho						         qgten(k) = qgten(k) - sed_g(k)*odzq*onstep(4)*orho
         rg(k) = MAX(R1, rg(k) - sed_g(k)*odzq*DT*onstep(4))						         rg(k) = MAX(R1, rg(k) - sed_g(k)*odzq*DT*onstep(4))
         do k = ksed1(4), kts, -1									         do k = ksed1(4), kts, -1
            odzq = 1./dzq(k)										            odzq = 1./dzq(k)
            orho = 1./rho(k)										            orho = 1./rho(k)
            qgten(k) = qgten(k) + (sed_g(k+1)-sed_g(k))                 &				            qgten(k) = qgten(k) + (sed_g(k+1)-sed_g(k))                 &
                                               *odzq*onstep(4)*orho					                                               *odzq*onstep(4)*orho
            rg(k) = MAX(R1, rg(k) + (sed_g(k+1)-sed_g(k)) &						            rg(k) = MAX(R1, rg(k) + (sed_g(k+1)-sed_g(k)) &
                                           *odzq*DT*onstep(4))						                                           *odzq*DT*onstep(4))
         enddo												         enddo

         if (rg(kts).gt.R1*10.) &									         if (rg(kts).gt.R1*10.) &
         pptgraul = pptgraul + sed_g(kts)*DT*onstep(4)							         pptgraul = pptgraul + sed_g(kts)*DT*onstep(4)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. Instantly melt any cloud ice into cloud water if above 0C and					!.. Instantly melt any cloud ice into cloud water if above 0C and
!.. instantly freeze any cloud water found below HGFR.							!.. instantly freeze any cloud water found below HGFR.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      if (.not. iiwarm) then										      if (.not. iiwarm) then
      do k = kts, kte											      do k = kts, kte
         xri = MAX(0.0, qi1d(k) + qiten(k)*DT)								         xri = MAX(0.0, qi1d(k) + qiten(k)*DT)
         if ( (temp(k).gt. T_0) .and. (xri.gt. 0.0) ) then						         if ( (temp(k).gt. T_0) .and. (xri.gt. 0.0) ) then
          qcten(k) = qcten(k) + xri*odt									          qcten(k) = qcten(k) + xri*odt
          ncten(k) = ncten(k) + ni1d(k)*odt								          ncten(k) = ncten(k) + ni1d(k)*odt
          qiten(k) = qiten(k) - xri*odt									          qiten(k) = qiten(k) - xri*odt
          niten(k) = -ni1d(k)*odt									          niten(k) = -ni1d(k)*odt
          tten(k) = tten(k) - lfus*ocp(k)*xri*odt*(1-IFDRY)						          tten(k) = tten(k) - lfus*ocp(k)*xri*odt*(1-IFDRY)
         endif												         endif

         xrc = MAX(0.0, qc1d(k) + qcten(k)*DT)								         xrc = MAX(0.0, qc1d(k) + qcten(k)*DT)
         if ( (temp(k).lt. HGFR) .and. (xrc.gt. 0.0) ) then						         if ( (temp(k).lt. HGFR) .and. (xrc.gt. 0.0) ) then
          lfus2 = lsub - lvap(k)									          lfus2 = lsub - lvap(k)
          xnc = nc1d(k) + ncten(k)*DT									          xnc = nc1d(k) + ncten(k)*DT
          qiten(k) = qiten(k) + xrc*odt									          qiten(k) = qiten(k) + xrc*odt
          niten(k) = niten(k) + xnc*odt									          niten(k) = niten(k) + xnc*odt
          qcten(k) = qcten(k) - xrc*odt									          qcten(k) = qcten(k) - xrc*odt
          ncten(k) = ncten(k) - xnc*odt									          ncten(k) = ncten(k) - xnc*odt
          tten(k) = tten(k) + lfus2*ocp(k)*xrc*odt*(1-IFDRY)						          tten(k) = tten(k) + lfus2*ocp(k)*xrc*odt*(1-IFDRY)
         endif												         endif
      enddo												      enddo
      endif												      endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. All tendencies computed, apply and pass back final values to parent.				!.. All tendencies computed, apply and pass back final values to parent.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         t1d(k)  = t1d(k) + tten(k)*DT									         t1d(k)  = t1d(k) + tten(k)*DT
         qv1d(k) = MAX(1.E-10, qv1d(k) + qvten(k)*DT)							         qv1d(k) = MAX(1.E-10, qv1d(k) + qvten(k)*DT)
         qc1d(k) = qc1d(k) + qcten(k)*DT								         qc1d(k) = qc1d(k) + qcten(k)*DT
         nc1d(k) = MAX(2./rho(k), nc1d(k) + ncten(k)*DT)					   |	         !nc1d(k) = MAX(2./rho(k), nc1d(k) + ncten(k)*DT)
												   >	         ! Dalla 3.9
												   >	         nc1d(k) = MAX(2./rho(k), MIN(nc1d(k) + ncten(k)*DT, Nt_c_max))
         nwfa1d(k) = MAX(11.1E6/rho(k), MIN(9999.E6/rho(k),             &				         nwfa1d(k) = MAX(11.1E6/rho(k), MIN(9999.E6/rho(k),             &
                       (nwfa1d(k)+nwfaten(k)*DT)))							                       (nwfa1d(k)+nwfaten(k)*DT)))
         nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6/rho(k),                &				         nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6/rho(k),                &
                       (nifa1d(k)+nifaten(k)*DT)))							                       (nifa1d(k)+nifaten(k)*DT)))

         if (qc1d(k) .le. R1) then									         if (qc1d(k) .le. R1) then
           qc1d(k) = 0.0										           qc1d(k) = 0.0
           nc1d(k) = 0.0										           nc1d(k) = 0.0
         else												         else
           nu_c = MIN(15, NINT(1000.E6/(nc1d(k)*rho(k))) + 2)						           nu_c = MIN(15, NINT(1000.E6/(nc1d(k)*rho(k))) + 2)
           lamc = (am_r*ccg(2,nu_c)*ocg1(nu_c)*nc1d(k)/qc1d(k))**obmr					           lamc = (am_r*ccg(2,nu_c)*ocg1(nu_c)*nc1d(k)/qc1d(k))**obmr
           xDc = (bm_r + nu_c + 1.) / lamc								           xDc = (bm_r + nu_c + 1.) / lamc
           if (xDc.lt. D0c) then									           if (xDc.lt. D0c) then
            lamc = cce(2,nu_c)/D0c									            lamc = cce(2,nu_c)/D0c
           elseif (xDc.gt. D0r*2.) then									           elseif (xDc.gt. D0r*2.) then
            lamc = cce(2,nu_c)/(D0r*2.)									            lamc = cce(2,nu_c)/(D0r*2.)
           endif											           endif
           nc1d(k) = MIN(ccg(1,nu_c)*ocg2(nu_c)*qc1d(k)/am_r*lamc**bm_r,&				           nc1d(k) = MIN(ccg(1,nu_c)*ocg2(nu_c)*qc1d(k)/am_r*lamc**bm_r,&
                         DBLE(Nt_c_max)/rho(k))								                         DBLE(Nt_c_max)/rho(k))
         endif												         endif

         qi1d(k) = qi1d(k) + qiten(k)*DT								         qi1d(k) = qi1d(k) + qiten(k)*DT
         ni1d(k) = MAX(R2/rho(k), ni1d(k) + niten(k)*DT)						         ni1d(k) = MAX(R2/rho(k), ni1d(k) + niten(k)*DT)
         if (qi1d(k) .le. R1) then									         if (qi1d(k) .le. R1) then
           qi1d(k) = 0.0										           qi1d(k) = 0.0
           ni1d(k) = 0.0										           ni1d(k) = 0.0
         else												         else
           lami = (am_i*cig(2)*oig1*ni1d(k)/qi1d(k))**obmi						           lami = (am_i*cig(2)*oig1*ni1d(k)/qi1d(k))**obmi
           ilami = 1./lami										           ilami = 1./lami
           xDi = (bm_i + mu_i + 1.) * ilami								           xDi = (bm_i + mu_i + 1.) * ilami
           if (xDi.lt. 5.E-6) then									           if (xDi.lt. 5.E-6) then
            lami = cie(2)/5.E-6										            lami = cie(2)/5.E-6
           elseif (xDi.gt. 300.E-6) then								           elseif (xDi.gt. 300.E-6) then
            lami = cie(2)/300.E-6									            lami = cie(2)/300.E-6
           endif											           endif
           ni1d(k) = MIN(cig(1)*oig2*qi1d(k)/am_i*lami**bm_i,           &				           ni1d(k) = MIN(cig(1)*oig2*qi1d(k)/am_i*lami**bm_i,           &
                         499.D3/rho(k))									                         499.D3/rho(k))
         endif												         endif
         qr1d(k) = qr1d(k) + qrten(k)*DT								         qr1d(k) = qr1d(k) + qrten(k)*DT
         nr1d(k) = MAX(R2/rho(k), nr1d(k) + nrten(k)*DT)						         nr1d(k) = MAX(R2/rho(k), nr1d(k) + nrten(k)*DT)
         if (qr1d(k) .le. R1) then									         if (qr1d(k) .le. R1) then
           qr1d(k) = 0.0										           qr1d(k) = 0.0
           nr1d(k) = 0.0										           nr1d(k) = 0.0
         else												         else
           lamr = (am_r*crg(3)*org2*nr1d(k)/qr1d(k))**obmr						           lamr = (am_r*crg(3)*org2*nr1d(k)/qr1d(k))**obmr
           mvd_r(k) = (3.0 + mu_r + 0.672) / lamr							           mvd_r(k) = (3.0 + mu_r + 0.672) / lamr
           if (mvd_r(k) .gt. 2.5E-3) then								           if (mvd_r(k) .gt. 2.5E-3) then
              mvd_r(k) = 2.5E-3										              mvd_r(k) = 2.5E-3
           elseif (mvd_r(k) .lt. D0r*0.75) then								           elseif (mvd_r(k) .lt. D0r*0.75) then
              mvd_r(k) = D0r*0.75									              mvd_r(k) = D0r*0.75
           endif											           endif
           lamr = (3.0 + mu_r + 0.672) / mvd_r(k)							           lamr = (3.0 + mu_r + 0.672) / mvd_r(k)
           nr1d(k) = crg(2)*org3*qr1d(k)*lamr**bm_r / am_r						           nr1d(k) = crg(2)*org3*qr1d(k)*lamr**bm_r / am_r
         endif												         endif
         qs1d(k) = qs1d(k) + qsten(k)*DT								         qs1d(k) = qs1d(k) + qsten(k)*DT
         if (qs1d(k) .le. R1) qs1d(k) = 0.0								         if (qs1d(k) .le. R1) qs1d(k) = 0.0
         qg1d(k) = qg1d(k) + qgten(k)*DT								         qg1d(k) = qg1d(k) + qgten(k)*DT
         if (qg1d(k) .le. R1) qg1d(k) = 0.0								         if (qg1d(k) .le. R1) qg1d(k) = 0.0
      enddo												      enddo

      end subroutine mp_thompson									      end subroutine mp_thompson
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Creation of the lookup tables and support functions found below here.				!..Creation of the lookup tables and support functions found below here.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Rain collecting graupel (and inverse).  Explicit CE integration.					!..Rain collecting graupel (and inverse).  Explicit CE integration.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine qr_acr_qg										      subroutine qr_acr_qg

      implicit none											      implicit none

!..Local variables											!..Local variables
      INTEGER:: i, j, k, m, n, n2									      INTEGER:: i, j, k, m, n, n2
      INTEGER:: km, km_s, km_e										      INTEGER:: km, km_s, km_e
      DOUBLE PRECISION, DIMENSION(nbg):: vg, N_g							      DOUBLE PRECISION, DIMENSION(nbg):: vg, N_g
      DOUBLE PRECISION, DIMENSION(nbr):: vr, N_r							      DOUBLE PRECISION, DIMENSION(nbr):: vr, N_r
      DOUBLE PRECISION:: N0_r, N0_g, lam_exp, lamg, lamr						      DOUBLE PRECISION:: N0_r, N0_g, lam_exp, lamg, lamr
      DOUBLE PRECISION:: massg, massr, dvg, dvr, t1, t2, z1, z2, y1, y2					      DOUBLE PRECISION:: massg, massr, dvg, dvr, t1, t2, z1, z2, y1, y2
      LOGICAL force_read_thompson, write_thompson_tables						      LOGICAL force_read_thompson, write_thompson_tables
      LOGICAL lexist,lopen										      LOGICAL lexist,lopen
      INTEGER good											      INTEGER good
      LOGICAL, EXTERNAL :: wrf_dm_on_monitor								      LOGICAL, EXTERNAL :: wrf_dm_on_monitor

!+---+													!+---+

      CALL nl_get_force_read_thompson(1,force_read_thompson)						      CALL nl_get_force_read_thompson(1,force_read_thompson)
      CALL nl_get_write_thompson_tables(1,write_thompson_tables)					      CALL nl_get_write_thompson_tables(1,write_thompson_tables)

      good = 0												      good = 0
      IF ( wrf_dm_on_monitor() ) THEN									      IF ( wrf_dm_on_monitor() ) THEN
        INQUIRE(FILE="qr_acr_qg.dat",EXIST=lexist)							        INQUIRE(FILE="qr_acr_qg.dat",EXIST=lexist)
        IF ( lexist ) THEN										        IF ( lexist ) THEN
          CALL wrf_message("ThompMP: read qr_acr_qg.dat stead of computing")				          CALL wrf_message("ThompMP: read qr_acr_qg.dat stead of computing")
          OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=1234)					          OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=1234)
          READ(63,err=1234) tcg_racg									          READ(63,err=1234) tcg_racg
          READ(63,err=1234) tmr_racg									          READ(63,err=1234) tmr_racg
          READ(63,err=1234) tcr_gacr									          READ(63,err=1234) tcr_gacr
          READ(63,err=1234) tmg_gacr									          READ(63,err=1234) tmg_gacr
          READ(63,err=1234) tnr_racg									          READ(63,err=1234) tnr_racg
          READ(63,err=1234) tnr_gacr									          READ(63,err=1234) tnr_gacr
          good = 1											          good = 1
 1234     CONTINUE											 1234     CONTINUE
          IF ( good .NE. 1 ) THEN									          IF ( good .NE. 1 ) THEN
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error reading qr_acr_qg.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error reading qr_acr_qg.dat. Aborting because force_read_t
              ENDIF											              ENDIF
              CLOSE(63)											              CLOSE(63)
            ELSE											            ELSE
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error opening qr_acr_qg.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error opening qr_acr_qg.dat. Aborting because force_read_t
              ENDIF											              ENDIF
            ENDIF											            ENDIF
         ELSE												         ELSE
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              CLOSE(63)											              CLOSE(63)
            ENDIF											            ENDIF
          ENDIF												          ENDIF
        ELSE												        ELSE
          IF( force_read_thompson ) THEN								          IF( force_read_thompson ) THEN
            CALL wrf_error_fatal("Non-existent qr_acr_qg.dat. Aborting because force_read_thomps	            CALL wrf_error_fatal("Non-existent qr_acr_qg.dat. Aborting because force_read_thomps
          ENDIF												          ENDIF
        ENDIF												        ENDIF
      ENDIF												      ENDIF
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
      CALL wrf_dm_bcast_integer(good,1)									      CALL wrf_dm_bcast_integer(good,1)
#endif													#endif

      IF ( good .EQ. 1 ) THEN										      IF ( good .EQ. 1 ) THEN
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
        CALL wrf_dm_bcast_double(tcg_racg,SIZE(tcg_racg))						        CALL wrf_dm_bcast_double(tcg_racg,SIZE(tcg_racg))
        CALL wrf_dm_bcast_double(tmr_racg,SIZE(tmr_racg))						        CALL wrf_dm_bcast_double(tmr_racg,SIZE(tmr_racg))
        CALL wrf_dm_bcast_double(tcr_gacr,SIZE(tcr_gacr))						        CALL wrf_dm_bcast_double(tcr_gacr,SIZE(tcr_gacr))
        CALL wrf_dm_bcast_double(tmg_gacr,SIZE(tmg_gacr))						        CALL wrf_dm_bcast_double(tmg_gacr,SIZE(tmg_gacr))
        CALL wrf_dm_bcast_double(tnr_racg,SIZE(tnr_racg))						        CALL wrf_dm_bcast_double(tnr_racg,SIZE(tnr_racg))
        CALL wrf_dm_bcast_double(tnr_gacr,SIZE(tnr_gacr))						        CALL wrf_dm_bcast_double(tnr_gacr,SIZE(tnr_gacr))
#endif													#endif
      ELSE												      ELSE
        CALL wrf_message("ThompMP: computing qr_acr_qg")						        CALL wrf_message("ThompMP: computing qr_acr_qg")
        do n2 = 1, nbr											        do n2 = 1, nbr
!        vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2))						!        vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2))
         vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2)     &				         vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2)     &
              + 0.07934E9*Dr(n2)*Dr(n2)*Dr(n2)                          &				              + 0.07934E9*Dr(n2)*Dr(n2)*Dr(n2)                          &
              - 0.002362E12*Dr(n2)*Dr(n2)*Dr(n2)*Dr(n2)							              - 0.002362E12*Dr(n2)*Dr(n2)*Dr(n2)*Dr(n2)
        enddo												        enddo
        do n = 1, nbg											        do n = 1, nbg
         vg(n) = av_g*Dg(n)**bv_g									         vg(n) = av_g*Dg(n)**bv_g
        enddo												        enddo

!..Note values returned from wrf_dm_decomp1d are zero-based, add 1 for					!..Note values returned from wrf_dm_decomp1d are zero-based, add 1 for
!.. fortran indices.  J. Michalakes, 2009Oct30.								!.. fortran indices.  J. Michalakes, 2009Oct30.

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
        CALL wrf_dm_decomp1d ( ntb_r*ntb_r1, km_s, km_e )						        CALL wrf_dm_decomp1d ( ntb_r*ntb_r1, km_s, km_e )
#else													#else
        km_s = 0											        km_s = 0
        km_e = ntb_r*ntb_r1 - 1										        km_e = ntb_r*ntb_r1 - 1
#endif													#endif

        do km = km_s, km_e										        do km = km_s, km_e
         m = km / ntb_r1 + 1										         m = km / ntb_r1 + 1
         k = mod( km , ntb_r1 ) + 1									         k = mod( km , ntb_r1 ) + 1

         lam_exp = (N0r_exp(k)*am_r*crg(1)/r_r(m))**ore1						         lam_exp = (N0r_exp(k)*am_r*crg(1)/r_r(m))**ore1
         lamr = lam_exp * (crg(3)*org2*org1)**obmr							         lamr = lam_exp * (crg(3)*org2*org1)**obmr
         N0_r = N0r_exp(k)/(crg(2)*lam_exp) * lamr**cre(2)						         N0_r = N0r_exp(k)/(crg(2)*lam_exp) * lamr**cre(2)
         do n2 = 1, nbr											         do n2 = 1, nbr
            N_r(n2) = N0_r*Dr(n2)**mu_r *DEXP(-lamr*Dr(n2))*dtr(n2)					            N_r(n2) = N0_r*Dr(n2)**mu_r *DEXP(-lamr*Dr(n2))*dtr(n2)
         enddo												         enddo

         do j = 1, ntb_g										         do j = 1, ntb_g
         do i = 1, ntb_g1										         do i = 1, ntb_g1
            lam_exp = (N0g_exp(i)*am_g*cgg(1)/r_g(j))**oge1						            lam_exp = (N0g_exp(i)*am_g*cgg(1)/r_g(j))**oge1
            lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg							            lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
            N0_g = N0g_exp(i)/(cgg(2)*lam_exp) * lamg**cge(2)						            N0_g = N0g_exp(i)/(cgg(2)*lam_exp) * lamg**cge(2)
            do n = 1, nbg										            do n = 1, nbg
               N_g(n) = N0_g*Dg(n)**mu_g * DEXP(-lamg*Dg(n))*dtg(n)					               N_g(n) = N0_g*Dg(n)**mu_g * DEXP(-lamg*Dg(n))*dtg(n)
            enddo											            enddo

            t1 = 0.0d0											            t1 = 0.0d0
            t2 = 0.0d0											            t2 = 0.0d0
            z1 = 0.0d0											            z1 = 0.0d0
            z2 = 0.0d0											            z2 = 0.0d0
            y1 = 0.0d0											            y1 = 0.0d0
            y2 = 0.0d0											            y2 = 0.0d0
            do n2 = 1, nbr										            do n2 = 1, nbr
               massr = am_r * Dr(n2)**bm_r								               massr = am_r * Dr(n2)**bm_r
               do n = 1, nbg										               do n = 1, nbg
                  massg = am_g * Dg(n)**bm_g								                  massg = am_g * Dg(n)**bm_g

                  dvg = 0.5d0*((vr(n2) - vg(n)) + DABS(vr(n2)-vg(n)))					                  dvg = 0.5d0*((vr(n2) - vg(n)) + DABS(vr(n2)-vg(n)))
                  dvr = 0.5d0*((vg(n) - vr(n2)) + DABS(vg(n)-vr(n2)))					                  dvr = 0.5d0*((vg(n) - vr(n2)) + DABS(vg(n)-vr(n2)))

                  t1 = t1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  t1 = t1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvg*massg * N_g(n)* N_r(n2)							                      *dvg*massg * N_g(n)* N_r(n2)
                  z1 = z1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  z1 = z1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvg*massr * N_g(n)* N_r(n2)							                      *dvg*massr * N_g(n)* N_r(n2)
                  y1 = y1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  y1 = y1+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvg       * N_g(n)* N_r(n2)							                      *dvg       * N_g(n)* N_r(n2)

                  t2 = t2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  t2 = t2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvr*massr * N_g(n)* N_r(n2)							                      *dvr*massr * N_g(n)* N_r(n2)
                  y2 = y2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  y2 = y2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvr       * N_g(n)* N_r(n2)							                      *dvr       * N_g(n)* N_r(n2)
                  z2 = z2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &					                  z2 = z2+ PI*.25*Ef_rg*(Dg(n)+Dr(n2))*(Dg(n)+Dr(n2)) &
                      *dvr*massg * N_g(n)* N_r(n2)							                      *dvr*massg * N_g(n)* N_r(n2)
               enddo											               enddo
 97            continue											 97            continue
            enddo											            enddo
            tcg_racg(i,j,k,m) = t1									            tcg_racg(i,j,k,m) = t1
            tmr_racg(i,j,k,m) = DMIN1(z1, r_r(m)*1.0d0)							            tmr_racg(i,j,k,m) = DMIN1(z1, r_r(m)*1.0d0)
            tcr_gacr(i,j,k,m) = t2									            tcr_gacr(i,j,k,m) = t2
            tmg_gacr(i,j,k,m) = z2									            tmg_gacr(i,j,k,m) = z2
            tnr_racg(i,j,k,m) = y1									            tnr_racg(i,j,k,m) = y1
            tnr_gacr(i,j,k,m) = y2									            tnr_gacr(i,j,k,m) = y2
         enddo												         enddo
         enddo												         enddo
        enddo												        enddo

!..Note wrf_dm_gatherv expects zero-based km_s, km_e (J. Michalakes, 2009Oct30).			!..Note wrf_dm_gatherv expects zero-based km_s, km_e (J. Michalakes, 2009Oct30).

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
        CALL wrf_dm_gatherv(tcg_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcg_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tmr_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tmr_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tcr_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcr_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tmg_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tmg_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_racg, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_gacr, ntb_g*ntb_g1, km_s, km_e, R8SIZE)
#endif													#endif

        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN					        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN
          CALL wrf_message("Writing qr_acr_qg.dat in Thompson MP init")					          CALL wrf_message("Writing qr_acr_qg.dat in Thompson MP init")
          OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=9234)					          OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=9234)
          WRITE(63,err=9234) tcg_racg									          WRITE(63,err=9234) tcg_racg
          WRITE(63,err=9234) tmr_racg									          WRITE(63,err=9234) tmr_racg
          WRITE(63,err=9234) tcr_gacr									          WRITE(63,err=9234) tcr_gacr
          WRITE(63,err=9234) tmg_gacr									          WRITE(63,err=9234) tmg_gacr
          WRITE(63,err=9234) tnr_racg									          WRITE(63,err=9234) tnr_racg
          WRITE(63,err=9234) tnr_gacr									          WRITE(63,err=9234) tnr_gacr
          CLOSE(63)											          CLOSE(63)
          RETURN    ! ----- RETURN									          RETURN    ! ----- RETURN
 9234     CONTINUE											 9234     CONTINUE
          CALL wrf_error_fatal("Error writing qr_acr_qg.dat")						          CALL wrf_error_fatal("Error writing qr_acr_qg.dat")
        ENDIF												        ENDIF
      ENDIF												      ENDIF

      end subroutine qr_acr_qg										      end subroutine qr_acr_qg
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Rain collecting snow (and inverse).  Explicit CE integration.					!..Rain collecting snow (and inverse).  Explicit CE integration.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine qr_acr_qs										      subroutine qr_acr_qs

      implicit none											      implicit none

!..Local variables											!..Local variables
      INTEGER:: i, j, k, m, n, n2									      INTEGER:: i, j, k, m, n, n2
      INTEGER:: km, km_s, km_e										      INTEGER:: km, km_s, km_e
      DOUBLE PRECISION, DIMENSION(nbr):: vr, D1, N_r							      DOUBLE PRECISION, DIMENSION(nbr):: vr, D1, N_r
      DOUBLE PRECISION, DIMENSION(nbs):: vs, N_s							      DOUBLE PRECISION, DIMENSION(nbs):: vs, N_s
      DOUBLE PRECISION:: loga_, a_, b_, second, M0, M2, M3, Mrat, oM3					      DOUBLE PRECISION:: loga_, a_, b_, second, M0, M2, M3, Mrat, oM3
      DOUBLE PRECISION:: N0_r, lam_exp, lamr, slam1, slam2						      DOUBLE PRECISION:: N0_r, lam_exp, lamr, slam1, slam2
      DOUBLE PRECISION:: dvs, dvr, masss, massr								      DOUBLE PRECISION:: dvs, dvr, masss, massr
      DOUBLE PRECISION:: t1, t2, t3, t4, z1, z2, z3, z4							      DOUBLE PRECISION:: t1, t2, t3, t4, z1, z2, z3, z4
      DOUBLE PRECISION:: y1, y2, y3, y4									      DOUBLE PRECISION:: y1, y2, y3, y4
      LOGICAL force_read_thompson, write_thompson_tables						      LOGICAL force_read_thompson, write_thompson_tables
      LOGICAL lexist,lopen										      LOGICAL lexist,lopen
      INTEGER good											      INTEGER good
      LOGICAL, EXTERNAL :: wrf_dm_on_monitor								      LOGICAL, EXTERNAL :: wrf_dm_on_monitor

!+---+													!+---+

      CALL nl_get_force_read_thompson(1,force_read_thompson)						      CALL nl_get_force_read_thompson(1,force_read_thompson)
      CALL nl_get_write_thompson_tables(1,write_thompson_tables)					      CALL nl_get_write_thompson_tables(1,write_thompson_tables)

      good = 0												      good = 0
      IF ( wrf_dm_on_monitor() ) THEN									      IF ( wrf_dm_on_monitor() ) THEN
        INQUIRE(FILE="qr_acr_qs.dat",EXIST=lexist)							        INQUIRE(FILE="qr_acr_qs.dat",EXIST=lexist)
        IF ( lexist ) THEN										        IF ( lexist ) THEN
          CALL wrf_message("ThompMP: read qr_acr_qs.dat instead of computing")				          CALL wrf_message("ThompMP: read qr_acr_qs.dat instead of computing")
          OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=1234)					          OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=1234)
          READ(63,err=1234)tcs_racs1									          READ(63,err=1234)tcs_racs1
          READ(63,err=1234)tmr_racs1									          READ(63,err=1234)tmr_racs1
          READ(63,err=1234)tcs_racs2									          READ(63,err=1234)tcs_racs2
          READ(63,err=1234)tmr_racs2									          READ(63,err=1234)tmr_racs2
          READ(63,err=1234)tcr_sacr1									          READ(63,err=1234)tcr_sacr1
          READ(63,err=1234)tms_sacr1									          READ(63,err=1234)tms_sacr1
          READ(63,err=1234)tcr_sacr2									          READ(63,err=1234)tcr_sacr2
          READ(63,err=1234)tms_sacr2									          READ(63,err=1234)tms_sacr2
          READ(63,err=1234)tnr_racs1									          READ(63,err=1234)tnr_racs1
          READ(63,err=1234)tnr_racs2									          READ(63,err=1234)tnr_racs2
          READ(63,err=1234)tnr_sacr1									          READ(63,err=1234)tnr_sacr1
          READ(63,err=1234)tnr_sacr2									          READ(63,err=1234)tnr_sacr2
          good = 1											          good = 1
 1234     CONTINUE											 1234     CONTINUE
          IF ( good .NE. 1 ) THEN									          IF ( good .NE. 1 ) THEN
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error reading qr_acr_qs.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error reading qr_acr_qs.dat. Aborting because force_read_t
              ENDIF											              ENDIF
              CLOSE(63)											              CLOSE(63)
            ELSE											            ELSE
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error opening qr_acr_qs.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error opening qr_acr_qs.dat. Aborting because force_read_t
              ENDIF											              ENDIF
            ENDIF											            ENDIF
          ELSE												          ELSE
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              CLOSE(63)											              CLOSE(63)
            ENDIF											            ENDIF
          ENDIF												          ENDIF
        ELSE												        ELSE
          IF( force_read_thompson ) THEN								          IF( force_read_thompson ) THEN
            CALL wrf_error_fatal("Non-existent qr_acr_qs.dat. Aborting because force_read_thomps	            CALL wrf_error_fatal("Non-existent qr_acr_qs.dat. Aborting because force_read_thomps
          ENDIF												          ENDIF
        ENDIF												        ENDIF
      ENDIF												      ENDIF
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
      CALL wrf_dm_bcast_integer(good,1)									      CALL wrf_dm_bcast_integer(good,1)
#endif													#endif

      IF ( good .EQ. 1 ) THEN										      IF ( good .EQ. 1 ) THEN
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
        CALL wrf_dm_bcast_double(tcs_racs1,SIZE(tcs_racs1))						        CALL wrf_dm_bcast_double(tcs_racs1,SIZE(tcs_racs1))
        CALL wrf_dm_bcast_double(tmr_racs1,SIZE(tmr_racs1))						        CALL wrf_dm_bcast_double(tmr_racs1,SIZE(tmr_racs1))
        CALL wrf_dm_bcast_double(tcs_racs2,SIZE(tcs_racs2))						        CALL wrf_dm_bcast_double(tcs_racs2,SIZE(tcs_racs2))
        CALL wrf_dm_bcast_double(tmr_racs2,SIZE(tmr_racs2))						        CALL wrf_dm_bcast_double(tmr_racs2,SIZE(tmr_racs2))
        CALL wrf_dm_bcast_double(tcr_sacr1,SIZE(tcr_sacr1))						        CALL wrf_dm_bcast_double(tcr_sacr1,SIZE(tcr_sacr1))
        CALL wrf_dm_bcast_double(tms_sacr1,SIZE(tms_sacr1))						        CALL wrf_dm_bcast_double(tms_sacr1,SIZE(tms_sacr1))
        CALL wrf_dm_bcast_double(tcr_sacr2,SIZE(tcr_sacr2))						        CALL wrf_dm_bcast_double(tcr_sacr2,SIZE(tcr_sacr2))
        CALL wrf_dm_bcast_double(tms_sacr2,SIZE(tms_sacr2))						        CALL wrf_dm_bcast_double(tms_sacr2,SIZE(tms_sacr2))
        CALL wrf_dm_bcast_double(tnr_racs1,SIZE(tnr_racs1))						        CALL wrf_dm_bcast_double(tnr_racs1,SIZE(tnr_racs1))
        CALL wrf_dm_bcast_double(tnr_racs2,SIZE(tnr_racs2))						        CALL wrf_dm_bcast_double(tnr_racs2,SIZE(tnr_racs2))
        CALL wrf_dm_bcast_double(tnr_sacr1,SIZE(tnr_sacr1))						        CALL wrf_dm_bcast_double(tnr_sacr1,SIZE(tnr_sacr1))
        CALL wrf_dm_bcast_double(tnr_sacr2,SIZE(tnr_sacr2))						        CALL wrf_dm_bcast_double(tnr_sacr2,SIZE(tnr_sacr2))
#endif													#endif
      ELSE												      ELSE
        CALL wrf_message("ThompMP: computing qr_acr_qs")						        CALL wrf_message("ThompMP: computing qr_acr_qs")
        do n2 = 1, nbr											        do n2 = 1, nbr
!        vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2))						!        vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2))
         vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2)     &				         vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2)     &
              + 0.07934E9*Dr(n2)*Dr(n2)*Dr(n2)                          &				              + 0.07934E9*Dr(n2)*Dr(n2)*Dr(n2)                          &
              - 0.002362E12*Dr(n2)*Dr(n2)*Dr(n2)*Dr(n2)							              - 0.002362E12*Dr(n2)*Dr(n2)*Dr(n2)*Dr(n2)
         D1(n2) = (vr(n2)/av_s)**(1./bv_s)								         D1(n2) = (vr(n2)/av_s)**(1./bv_s)
        enddo												        enddo
        do n = 1, nbs											        do n = 1, nbs
         vs(n) = 1.5*av_s*Ds(n)**bv_s * DEXP(-fv_s*Ds(n))						         vs(n) = 1.5*av_s*Ds(n)**bv_s * DEXP(-fv_s*Ds(n))
        enddo												        enddo

!..Note values returned from wrf_dm_decomp1d are zero-based, add 1 for					!..Note values returned from wrf_dm_decomp1d are zero-based, add 1 for
!.. fortran indices.  J. Michalakes, 2009Oct30.								!.. fortran indices.  J. Michalakes, 2009Oct30.

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
        CALL wrf_dm_decomp1d ( ntb_r*ntb_r1, km_s, km_e )						        CALL wrf_dm_decomp1d ( ntb_r*ntb_r1, km_s, km_e )
#else													#else
        km_s = 0											        km_s = 0
        km_e = ntb_r*ntb_r1 - 1										        km_e = ntb_r*ntb_r1 - 1
#endif													#endif

        do km = km_s, km_e										        do km = km_s, km_e
         m = km / ntb_r1 + 1										         m = km / ntb_r1 + 1
         k = mod( km , ntb_r1 ) + 1									         k = mod( km , ntb_r1 ) + 1

         lam_exp = (N0r_exp(k)*am_r*crg(1)/r_r(m))**ore1						         lam_exp = (N0r_exp(k)*am_r*crg(1)/r_r(m))**ore1
         lamr = lam_exp * (crg(3)*org2*org1)**obmr							         lamr = lam_exp * (crg(3)*org2*org1)**obmr
         N0_r = N0r_exp(k)/(crg(2)*lam_exp) * lamr**cre(2)						         N0_r = N0r_exp(k)/(crg(2)*lam_exp) * lamr**cre(2)
         do n2 = 1, nbr											         do n2 = 1, nbr
            N_r(n2) = N0_r*Dr(n2)**mu_r * DEXP(-lamr*Dr(n2))*dtr(n2)					            N_r(n2) = N0_r*Dr(n2)**mu_r * DEXP(-lamr*Dr(n2))*dtr(n2)
         enddo												         enddo

         do j = 1, ntb_t										         do j = 1, ntb_t
            do i = 1, ntb_s										            do i = 1, ntb_s

!..From the bm_s moment, compute plus one moment.  If we are not					!..From the bm_s moment, compute plus one moment.  If we are not
!.. using bm_s=2, then we must transform to the pure 2nd moment						!.. using bm_s=2, then we must transform to the pure 2nd moment
!.. (variable called "second") and then to the bm_s+1 moment.						!.. (variable called "second") and then to the bm_s+1 moment.

               M2 = r_s(i)*oams *1.0d0									               M2 = r_s(i)*oams *1.0d0
               if (bm_s.gt.2.0-1.E-3 .and. bm_s.lt.2.0+1.E-3) then					               if (bm_s.gt.2.0-1.E-3 .and. bm_s.lt.2.0+1.E-3) then
                  loga_ = sa(1) + sa(2)*Tc(j) + sa(3)*bm_s &						                  loga_ = sa(1) + sa(2)*Tc(j) + sa(3)*bm_s &
                     + sa(4)*Tc(j)*bm_s + sa(5)*Tc(j)*Tc(j) &						                     + sa(4)*Tc(j)*bm_s + sa(5)*Tc(j)*Tc(j) &
                     + sa(6)*bm_s*bm_s + sa(7)*Tc(j)*Tc(j)*bm_s &					                     + sa(6)*bm_s*bm_s + sa(7)*Tc(j)*Tc(j)*bm_s &
                     + sa(8)*Tc(j)*bm_s*bm_s + sa(9)*Tc(j)*Tc(j)*Tc(j) &				                     + sa(8)*Tc(j)*bm_s*bm_s + sa(9)*Tc(j)*Tc(j)*Tc(j) &
                     + sa(10)*bm_s*bm_s*bm_s								                     + sa(10)*bm_s*bm_s*bm_s
                  a_ = 10.0**loga_									                  a_ = 10.0**loga_
                  b_ = sb(1) + sb(2)*Tc(j) + sb(3)*bm_s &						                  b_ = sb(1) + sb(2)*Tc(j) + sb(3)*bm_s &
                     + sb(4)*Tc(j)*bm_s + sb(5)*Tc(j)*Tc(j) &						                     + sb(4)*Tc(j)*bm_s + sb(5)*Tc(j)*Tc(j) &
                     + sb(6)*bm_s*bm_s + sb(7)*Tc(j)*Tc(j)*bm_s &					                     + sb(6)*bm_s*bm_s + sb(7)*Tc(j)*Tc(j)*bm_s &
                     + sb(8)*Tc(j)*bm_s*bm_s + sb(9)*Tc(j)*Tc(j)*Tc(j) &				                     + sb(8)*Tc(j)*bm_s*bm_s + sb(9)*Tc(j)*Tc(j)*Tc(j) &
                     + sb(10)*bm_s*bm_s*bm_s								                     + sb(10)*bm_s*bm_s*bm_s
                  second = (M2/a_)**(1./b_)								                  second = (M2/a_)**(1./b_)
               else											               else
                  second = M2										                  second = M2
               endif											               endif

               loga_ = sa(1) + sa(2)*Tc(j) + sa(3)*cse(1) &						               loga_ = sa(1) + sa(2)*Tc(j) + sa(3)*cse(1) &
                  + sa(4)*Tc(j)*cse(1) + sa(5)*Tc(j)*Tc(j) &						                  + sa(4)*Tc(j)*cse(1) + sa(5)*Tc(j)*Tc(j) &
                  + sa(6)*cse(1)*cse(1) + sa(7)*Tc(j)*Tc(j)*cse(1) &					                  + sa(6)*cse(1)*cse(1) + sa(7)*Tc(j)*Tc(j)*cse(1) &
                  + sa(8)*Tc(j)*cse(1)*cse(1) + sa(9)*Tc(j)*Tc(j)*Tc(j) &				                  + sa(8)*Tc(j)*cse(1)*cse(1) + sa(9)*Tc(j)*Tc(j)*Tc(j) &
                  + sa(10)*cse(1)*cse(1)*cse(1)								                  + sa(10)*cse(1)*cse(1)*cse(1)
               a_ = 10.0**loga_										               a_ = 10.0**loga_
               b_ = sb(1)+sb(2)*Tc(j)+sb(3)*cse(1) + sb(4)*Tc(j)*cse(1) &				               b_ = sb(1)+sb(2)*Tc(j)+sb(3)*cse(1) + sb(4)*Tc(j)*cse(1) &
                  + sb(5)*Tc(j)*Tc(j) + sb(6)*cse(1)*cse(1) &						                  + sb(5)*Tc(j)*Tc(j) + sb(6)*cse(1)*cse(1) &
                  + sb(7)*Tc(j)*Tc(j)*cse(1) + sb(8)*Tc(j)*cse(1)*cse(1) &				                  + sb(7)*Tc(j)*Tc(j)*cse(1) + sb(8)*Tc(j)*cse(1)*cse(1) &
                  + sb(9)*Tc(j)*Tc(j)*Tc(j)+sb(10)*cse(1)*cse(1)*cse(1)					                  + sb(9)*Tc(j)*Tc(j)*Tc(j)+sb(10)*cse(1)*cse(1)*cse(1)
               M3 = a_ * second**b_									               M3 = a_ * second**b_

               oM3 = 1./M3										               oM3 = 1./M3
               Mrat = M2*(M2*oM3)*(M2*oM3)*(M2*oM3)							               Mrat = M2*(M2*oM3)*(M2*oM3)*(M2*oM3)
               M0   = (M2*oM3)**mu_s									               M0   = (M2*oM3)**mu_s
               slam1 = M2 * oM3 * Lam0									               slam1 = M2 * oM3 * Lam0
               slam2 = M2 * oM3 * Lam1									               slam2 = M2 * oM3 * Lam1

               do n = 1, nbs										               do n = 1, nbs
                  N_s(n) = Mrat*(Kap0*DEXP(-slam1*Ds(n)) &						                  N_s(n) = Mrat*(Kap0*DEXP(-slam1*Ds(n)) &
                      + Kap1*M0*Ds(n)**mu_s * DEXP(-slam2*Ds(n)))*dts(n)				                      + Kap1*M0*Ds(n)**mu_s * DEXP(-slam2*Ds(n)))*dts(n)
               enddo											               enddo

               t1 = 0.0d0										               t1 = 0.0d0
               t2 = 0.0d0										               t2 = 0.0d0
               t3 = 0.0d0										               t3 = 0.0d0
               t4 = 0.0d0										               t4 = 0.0d0
               z1 = 0.0d0										               z1 = 0.0d0
               z2 = 0.0d0										               z2 = 0.0d0
               z3 = 0.0d0										               z3 = 0.0d0
               z4 = 0.0d0										               z4 = 0.0d0
               y1 = 0.0d0										               y1 = 0.0d0
               y2 = 0.0d0										               y2 = 0.0d0
               y3 = 0.0d0										               y3 = 0.0d0
               y4 = 0.0d0										               y4 = 0.0d0
               do n2 = 1, nbr										               do n2 = 1, nbr
                  massr = am_r * Dr(n2)**bm_r								                  massr = am_r * Dr(n2)**bm_r
                  do n = 1, nbs										                  do n = 1, nbs
                     masss = am_s * Ds(n)**bm_s								                     masss = am_s * Ds(n)**bm_s
      													      
                     dvs = 0.5d0*((vr(n2) - vs(n)) + DABS(vr(n2)-vs(n)))				                     dvs = 0.5d0*((vr(n2) - vs(n)) + DABS(vr(n2)-vs(n)))
                     dvr = 0.5d0*((vs(n) - vr(n2)) + DABS(vs(n)-vr(n2)))				                     dvr = 0.5d0*((vs(n) - vr(n2)) + DABS(vs(n)-vr(n2)))

                     if (massr .gt. 1.5*masss) then							                     if (massr .gt. 1.5*masss) then
                     t1 = t1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     t1 = t1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs*masss * N_s(n)* N_r(n2)							                         *dvs*masss * N_s(n)* N_r(n2)
                     z1 = z1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     z1 = z1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs*massr * N_s(n)* N_r(n2)							                         *dvs*massr * N_s(n)* N_r(n2)
                     y1 = y1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     y1 = y1+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs       * N_s(n)* N_r(n2)							                         *dvs       * N_s(n)* N_r(n2)
                     else										                     else
                     t3 = t3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     t3 = t3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs*masss * N_s(n)* N_r(n2)							                         *dvs*masss * N_s(n)* N_r(n2)
                     z3 = z3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     z3 = z3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs*massr * N_s(n)* N_r(n2)							                         *dvs*massr * N_s(n)* N_r(n2)
                     y3 = y3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     y3 = y3+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvs       * N_s(n)* N_r(n2)							                         *dvs       * N_s(n)* N_r(n2)
                     endif										                     endif

                     if (massr .gt. 1.5*masss) then							                     if (massr .gt. 1.5*masss) then
                     t2 = t2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     t2 = t2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr*massr * N_s(n)* N_r(n2)							                         *dvr*massr * N_s(n)* N_r(n2)
                     y2 = y2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     y2 = y2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr       * N_s(n)* N_r(n2)							                         *dvr       * N_s(n)* N_r(n2)
                     z2 = z2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     z2 = z2+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr*masss * N_s(n)* N_r(n2)							                         *dvr*masss * N_s(n)* N_r(n2)
                     else										                     else
                     t4 = t4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     t4 = t4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr*massr * N_s(n)* N_r(n2)							                         *dvr*massr * N_s(n)* N_r(n2)
                     y4 = y4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     y4 = y4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr       * N_s(n)* N_r(n2)							                         *dvr       * N_s(n)* N_r(n2)
                     z4 = z4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &				                     z4 = z4+ PI*.25*Ef_rs*(Ds(n)+Dr(n2))*(Ds(n)+Dr(n2)) &
                         *dvr*masss * N_s(n)* N_r(n2)							                         *dvr*masss * N_s(n)* N_r(n2)
                     endif										                     endif

                  enddo											                  enddo
               enddo											               enddo
               tcs_racs1(i,j,k,m) = t1									               tcs_racs1(i,j,k,m) = t1
               tmr_racs1(i,j,k,m) = DMIN1(z1, r_r(m)*1.0d0)						               tmr_racs1(i,j,k,m) = DMIN1(z1, r_r(m)*1.0d0)
               tcs_racs2(i,j,k,m) = t3									               tcs_racs2(i,j,k,m) = t3
               tmr_racs2(i,j,k,m) = z3									               tmr_racs2(i,j,k,m) = z3
               tcr_sacr1(i,j,k,m) = t2									               tcr_sacr1(i,j,k,m) = t2
               tms_sacr1(i,j,k,m) = z2									               tms_sacr1(i,j,k,m) = z2
               tcr_sacr2(i,j,k,m) = t4									               tcr_sacr2(i,j,k,m) = t4
               tms_sacr2(i,j,k,m) = z4									               tms_sacr2(i,j,k,m) = z4
               tnr_racs1(i,j,k,m) = y1									               tnr_racs1(i,j,k,m) = y1
               tnr_racs2(i,j,k,m) = y3									               tnr_racs2(i,j,k,m) = y3
               tnr_sacr1(i,j,k,m) = y2									               tnr_sacr1(i,j,k,m) = y2
               tnr_sacr2(i,j,k,m) = y4									               tnr_sacr2(i,j,k,m) = y4
            enddo											            enddo
         enddo												         enddo
        enddo												        enddo

!..Note wrf_dm_gatherv expects zero-based km_s, km_e (J. Michalakes, 2009Oct30).			!..Note wrf_dm_gatherv expects zero-based km_s, km_e (J. Michalakes, 2009Oct30).

#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )						#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
        CALL wrf_dm_gatherv(tcs_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcs_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tmr_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tmr_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tcs_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcs_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tmr_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tmr_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tcr_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcr_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tms_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tms_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tcr_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tcr_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tms_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tms_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_racs1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_racs2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_sacr1, ntb_s*ntb_t, km_s, km_e, R8SIZE)
        CALL wrf_dm_gatherv(tnr_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)					        CALL wrf_dm_gatherv(tnr_sacr2, ntb_s*ntb_t, km_s, km_e, R8SIZE)
#endif													#endif

        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN					        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN
          CALL wrf_message("Writing qr_acr_qs.dat in Thompson MP init")					          CALL wrf_message("Writing qr_acr_qs.dat in Thompson MP init")
          OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=9234)					          OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=9234)
          WRITE(63,err=9234)tcs_racs1									          WRITE(63,err=9234)tcs_racs1
          WRITE(63,err=9234)tmr_racs1									          WRITE(63,err=9234)tmr_racs1
          WRITE(63,err=9234)tcs_racs2									          WRITE(63,err=9234)tcs_racs2
          WRITE(63,err=9234)tmr_racs2									          WRITE(63,err=9234)tmr_racs2
          WRITE(63,err=9234)tcr_sacr1									          WRITE(63,err=9234)tcr_sacr1
          WRITE(63,err=9234)tms_sacr1									          WRITE(63,err=9234)tms_sacr1
          WRITE(63,err=9234)tcr_sacr2									          WRITE(63,err=9234)tcr_sacr2
          WRITE(63,err=9234)tms_sacr2									          WRITE(63,err=9234)tms_sacr2
          WRITE(63,err=9234)tnr_racs1									          WRITE(63,err=9234)tnr_racs1
          WRITE(63,err=9234)tnr_racs2									          WRITE(63,err=9234)tnr_racs2
          WRITE(63,err=9234)tnr_sacr1									          WRITE(63,err=9234)tnr_sacr1
          WRITE(63,err=9234)tnr_sacr2									          WRITE(63,err=9234)tnr_sacr2
          CLOSE(63)											          CLOSE(63)
          RETURN    ! ----- RETURN									          RETURN    ! ----- RETURN
 9234     CONTINUE											 9234     CONTINUE
          CALL wrf_error_fatal("Error writing qr_acr_qs.dat")						          CALL wrf_error_fatal("Error writing qr_acr_qs.dat")
        ENDIF												        ENDIF
      ENDIF												      ENDIF

      end subroutine qr_acr_qs										      end subroutine qr_acr_qs
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..This is a literal adaptation of Bigg (1954) probability of drops of					!..This is a literal adaptation of Bigg (1954) probability of drops of
!..a particular volume freezing.  Given this probability, simply freeze					!..a particular volume freezing.  Given this probability, simply freeze
!..the proportion of drops summing their masses.							!..the proportion of drops summing their masses.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine freezeH2O										      subroutine freezeH2O

      implicit none											      implicit none

!..Local variables											!..Local variables
      INTEGER:: i, j, k, m, n, n2									      INTEGER:: i, j, k, m, n, n2
      DOUBLE PRECISION, DIMENSION(nbr):: N_r, massr							      DOUBLE PRECISION, DIMENSION(nbr):: N_r, massr
      DOUBLE PRECISION, DIMENSION(nbc):: N_c, massc							      DOUBLE PRECISION, DIMENSION(nbc):: N_c, massc
      DOUBLE PRECISION:: sum1, sum2, sumn1, sumn2, &							      DOUBLE PRECISION:: sum1, sum2, sumn1, sumn2, &
                         prob, vol, Texp, orho_w, &							                         prob, vol, Texp, orho_w, &
                         lam_exp, lamr, N0_r, lamc, N0_c, y						                         lam_exp, lamr, N0_r, lamc, N0_c, y
      INTEGER:: nu_c											      INTEGER:: nu_c
      REAL:: T_adjust											      REAL:: T_adjust
      LOGICAL force_read_thompson, write_thompson_tables						      LOGICAL force_read_thompson, write_thompson_tables
      LOGICAL lexist,lopen										      LOGICAL lexist,lopen
      INTEGER good											      INTEGER good
      LOGICAL, EXTERNAL :: wrf_dm_on_monitor								      LOGICAL, EXTERNAL :: wrf_dm_on_monitor

!+---+													!+---+
      CALL nl_get_force_read_thompson(1,force_read_thompson)						      CALL nl_get_force_read_thompson(1,force_read_thompson)
      CALL nl_get_write_thompson_tables(1,write_thompson_tables)					      CALL nl_get_write_thompson_tables(1,write_thompson_tables)

      good = 0												      good = 0
      IF ( wrf_dm_on_monitor() ) THEN									      IF ( wrf_dm_on_monitor() ) THEN
        INQUIRE(FILE="freezeH2O.dat",EXIST=lexist)							        INQUIRE(FILE="freezeH2O.dat",EXIST=lexist)
        IF ( lexist ) THEN										        IF ( lexist ) THEN
          CALL wrf_message("ThompMP: read freezeH2O.dat stead of computing")				          CALL wrf_message("ThompMP: read freezeH2O.dat stead of computing")
          OPEN(63,file="freezeH2O.dat",form="unformatted",err=1234)					          OPEN(63,file="freezeH2O.dat",form="unformatted",err=1234)
          READ(63,err=1234)tpi_qrfz									          READ(63,err=1234)tpi_qrfz
          READ(63,err=1234)tni_qrfz									          READ(63,err=1234)tni_qrfz
          READ(63,err=1234)tpg_qrfz									          READ(63,err=1234)tpg_qrfz
          READ(63,err=1234)tnr_qrfz									          READ(63,err=1234)tnr_qrfz
          READ(63,err=1234)tpi_qcfz									          READ(63,err=1234)tpi_qcfz
          READ(63,err=1234)tni_qcfz									          READ(63,err=1234)tni_qcfz
          good = 1											          good = 1
 1234     CONTINUE											 1234     CONTINUE
          IF ( good .NE. 1 ) THEN									          IF ( good .NE. 1 ) THEN
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error reading freezeH2O.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error reading freezeH2O.dat. Aborting because force_read_t
              ENDIF											              ENDIF
              CLOSE(63)											              CLOSE(63)
            ELSE											            ELSE
              IF( force_read_thompson ) THEN								              IF( force_read_thompson ) THEN
                CALL wrf_error_fatal("Error opening freezeH2O.dat. Aborting because force_read_t	                CALL wrf_error_fatal("Error opening freezeH2O.dat. Aborting because force_read_t
              ENDIF											              ENDIF
            ENDIF											            ENDIF
          ELSE												          ELSE
            INQUIRE(63,opened=lopen)									            INQUIRE(63,opened=lopen)
            IF (lopen) THEN										            IF (lopen) THEN
              CLOSE(63)											              CLOSE(63)
            ENDIF											            ENDIF
          ENDIF												          ENDIF
        ELSE												        ELSE
          IF( force_read_thompson ) THEN								          IF( force_read_thompson ) THEN
            CALL wrf_error_fatal("Non-existent freezeH2O.dat. Aborting because force_read_thomps	            CALL wrf_error_fatal("Non-existent freezeH2O.dat. Aborting because force_read_thomps
          ENDIF												          ENDIF
        ENDIF												        ENDIF
      ENDIF												      ENDIF

#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
      CALL wrf_dm_bcast_integer(good,1)									      CALL wrf_dm_bcast_integer(good,1)
#endif													#endif

      IF ( good .EQ. 1 ) THEN										      IF ( good .EQ. 1 ) THEN
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
        CALL wrf_dm_bcast_double(tpi_qrfz,SIZE(tpi_qrfz))						        CALL wrf_dm_bcast_double(tpi_qrfz,SIZE(tpi_qrfz))
        CALL wrf_dm_bcast_double(tni_qrfz,SIZE(tni_qrfz))						        CALL wrf_dm_bcast_double(tni_qrfz,SIZE(tni_qrfz))
        CALL wrf_dm_bcast_double(tpg_qrfz,SIZE(tpg_qrfz))						        CALL wrf_dm_bcast_double(tpg_qrfz,SIZE(tpg_qrfz))
        CALL wrf_dm_bcast_double(tnr_qrfz,SIZE(tnr_qrfz))						        CALL wrf_dm_bcast_double(tnr_qrfz,SIZE(tnr_qrfz))
        CALL wrf_dm_bcast_double(tpi_qcfz,SIZE(tpi_qcfz))						        CALL wrf_dm_bcast_double(tpi_qcfz,SIZE(tpi_qcfz))
        CALL wrf_dm_bcast_double(tni_qcfz,SIZE(tni_qcfz))						        CALL wrf_dm_bcast_double(tni_qcfz,SIZE(tni_qcfz))
#endif													#endif
      ELSE												      ELSE
        CALL wrf_message("ThompMP: computing freezeH2O")						        CALL wrf_message("ThompMP: computing freezeH2O")

        orho_w = 1./rho_w										        orho_w = 1./rho_w

        do n2 = 1, nbr											        do n2 = 1, nbr
         massr(n2) = am_r*Dr(n2)**bm_r									         massr(n2) = am_r*Dr(n2)**bm_r
        enddo												        enddo
        do n = 1, nbc											        do n = 1, nbc
         massc(n) = am_r*Dc(n)**bm_r									         massc(n) = am_r*Dc(n)**bm_r
        enddo												        enddo

!..Freeze water (smallest drops become cloud ice, otherwise graupel).					!..Freeze water (smallest drops become cloud ice, otherwise graupel).
        do m = 1, ntb_IN										        do m = 1, ntb_IN
        T_adjust = MAX(-3.0, MIN(3.0 - ALOG10(Nt_IN(m)), 3.0))						        T_adjust = MAX(-3.0, MIN(3.0 - ALOG10(Nt_IN(m)), 3.0))
        do k = 1, 45											        do k = 1, 45
!         print*, ' Freezing water for temp = ', -k							!         print*, ' Freezing water for temp = ', -k
         Texp = DEXP( DFLOAT(k) - T_adjust*1.0D0 ) - 1.0D0						         Texp = DEXP( DFLOAT(k) - T_adjust*1.0D0 ) - 1.0D0
         do j = 1, ntb_r1										         do j = 1, ntb_r1
            do i = 1, ntb_r										            do i = 1, ntb_r
               lam_exp = (N0r_exp(j)*am_r*crg(1)/r_r(i))**ore1						               lam_exp = (N0r_exp(j)*am_r*crg(1)/r_r(i))**ore1
               lamr = lam_exp * (crg(3)*org2*org1)**obmr						               lamr = lam_exp * (crg(3)*org2*org1)**obmr
               N0_r = N0r_exp(j)/(crg(2)*lam_exp) * lamr**cre(2)					               N0_r = N0r_exp(j)/(crg(2)*lam_exp) * lamr**cre(2)
               sum1 = 0.0d0										               sum1 = 0.0d0
               sum2 = 0.0d0										               sum2 = 0.0d0
               sumn1 = 0.0d0										               sumn1 = 0.0d0
               sumn2 = 0.0d0										               sumn2 = 0.0d0
               do n2 = nbr, 1, -1									               do n2 = nbr, 1, -1
                  N_r(n2) = N0_r*Dr(n2)**mu_r*DEXP(-lamr*Dr(n2))*dtr(n2)				                  N_r(n2) = N0_r*Dr(n2)**mu_r*DEXP(-lamr*Dr(n2))*dtr(n2)
                  vol = massr(n2)*orho_w								                  vol = massr(n2)*orho_w
                  prob = 1.0D0 - DEXP(-120.0D0*vol*5.2D-4 * Texp)					                  prob = 1.0D0 - DEXP(-120.0D0*vol*5.2D-4 * Texp)
                  if (massr(n2) .lt. xm0g) then								                  if (massr(n2) .lt. xm0g) then
                     sumn1 = sumn1 + prob*N_r(n2)							                     sumn1 = sumn1 + prob*N_r(n2)
                     sum1 = sum1 + prob*N_r(n2)*massr(n2)						                     sum1 = sum1 + prob*N_r(n2)*massr(n2)
                  else											                  else
                     sumn2 = sumn2 + prob*N_r(n2)							                     sumn2 = sumn2 + prob*N_r(n2)
                     sum2 = sum2 + prob*N_r(n2)*massr(n2)						                     sum2 = sum2 + prob*N_r(n2)*massr(n2)
                  endif											                  endif
                  if ((sum1+sum2).ge.r_r(i)) EXIT							                  if ((sum1+sum2).ge.r_r(i)) EXIT
               enddo											               enddo
               tpi_qrfz(i,j,k,m) = sum1									               tpi_qrfz(i,j,k,m) = sum1
               tni_qrfz(i,j,k,m) = sumn1								               tni_qrfz(i,j,k,m) = sumn1
               tpg_qrfz(i,j,k,m) = sum2									               tpg_qrfz(i,j,k,m) = sum2
               tnr_qrfz(i,j,k,m) = sumn2								               tnr_qrfz(i,j,k,m) = sumn2
            enddo											            enddo
         enddo												         enddo

         do j = 1, nbc											         do j = 1, nbc
            nu_c = MIN(15, NINT(1000.E6/t_Nc(j)) + 2)							            nu_c = MIN(15, NINT(1000.E6/t_Nc(j)) + 2)
            do i = 1, ntb_c										            do i = 1, ntb_c
               lamc = (t_Nc(j)*am_r* ccg(2,nu_c) * ocg1(nu_c) / r_c(i))**obmr				               lamc = (t_Nc(j)*am_r* ccg(2,nu_c) * ocg1(nu_c) / r_c(i))**obmr
               N0_c = t_Nc(j)*ocg1(nu_c) * lamc**cce(1,nu_c)						               N0_c = t_Nc(j)*ocg1(nu_c) * lamc**cce(1,nu_c)
               sum1 = 0.0d0										               sum1 = 0.0d0
               sumn2 = 0.0d0										               sumn2 = 0.0d0
               do n = nbc, 1, -1									               do n = nbc, 1, -1
                  vol = massc(n)*orho_w									                  vol = massc(n)*orho_w
                  prob = 1.0D0 - DEXP(-120.0D0*vol*5.2D-4 * Texp)					                  prob = 1.0D0 - DEXP(-120.0D0*vol*5.2D-4 * Texp)
                  N_c(n) = N0_c*Dc(n)**nu_c*EXP(-lamc*Dc(n))*dtc(n)					                  N_c(n) = N0_c*Dc(n)**nu_c*EXP(-lamc*Dc(n))*dtc(n)
                  sumn2 = MIN(t_Nc(j), sumn2 + prob*N_c(n))						                  sumn2 = MIN(t_Nc(j), sumn2 + prob*N_c(n))
                  sum1 = sum1 + prob*N_c(n)*massc(n)							                  sum1 = sum1 + prob*N_c(n)*massc(n)
                  if (sum1 .ge. r_c(i)) EXIT								                  if (sum1 .ge. r_c(i)) EXIT
               enddo											               enddo
               tpi_qcfz(i,j,k,m) = sum1									               tpi_qcfz(i,j,k,m) = sum1
               tni_qcfz(i,j,k,m) = sumn2								               tni_qcfz(i,j,k,m) = sumn2
            enddo											            enddo
         enddo												         enddo
        enddo												        enddo
        enddo												        enddo

        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN					        IF ( write_thompson_tables .AND. wrf_dm_on_monitor() ) THEN
          CALL wrf_message("Writing freezeH2O.dat in Thompson MP init")					          CALL wrf_message("Writing freezeH2O.dat in Thompson MP init")
          OPEN(63,file="freezeH2O.dat",form="unformatted",err=9234)					          OPEN(63,file="freezeH2O.dat",form="unformatted",err=9234)
          WRITE(63,err=9234)tpi_qrfz									          WRITE(63,err=9234)tpi_qrfz
          WRITE(63,err=9234)tni_qrfz									          WRITE(63,err=9234)tni_qrfz
          WRITE(63,err=9234)tpg_qrfz									          WRITE(63,err=9234)tpg_qrfz
          WRITE(63,err=9234)tnr_qrfz									          WRITE(63,err=9234)tnr_qrfz
          WRITE(63,err=9234)tpi_qcfz									          WRITE(63,err=9234)tpi_qcfz
          WRITE(63,err=9234)tni_qcfz									          WRITE(63,err=9234)tni_qcfz
          CLOSE(63)											          CLOSE(63)
          RETURN    ! ----- RETURN									          RETURN    ! ----- RETURN
 9234     CONTINUE											 9234     CONTINUE
          CALL wrf_error_fatal("Error writing freezeH2O.dat")						          CALL wrf_error_fatal("Error writing freezeH2O.dat")
        ENDIF												        ENDIF
      ENDIF												      ENDIF

      end subroutine freezeH2O										      end subroutine freezeH2O
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Cloud ice converting to snow since portion greater than min snow					!..Cloud ice converting to snow since portion greater than min snow
!.. size.  Given cloud ice content (kg/m**3), number concentration					!.. size.  Given cloud ice content (kg/m**3), number concentration
!.. (#/m**3) and gamma shape parameter, mu_i, break the distrib into					!.. (#/m**3) and gamma shape parameter, mu_i, break the distrib into
!.. bins and figure out the mass/number of ice with sizes larger than					!.. bins and figure out the mass/number of ice with sizes larger than
!.. D0s.  Also, compute incomplete gamma function for the integration					!.. D0s.  Also, compute incomplete gamma function for the integration
!.. of ice depositional growth from diameter=0 to D0s.  Amount of					!.. of ice depositional growth from diameter=0 to D0s.  Amount of
!.. ice depositional growth is this portion of distrib while larger					!.. ice depositional growth is this portion of distrib while larger
!.. diameters contribute to snow growth (as in Harrington et al. 1995).					!.. diameters contribute to snow growth (as in Harrington et al. 1995).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine qi_aut_qs										      subroutine qi_aut_qs

      implicit none											      implicit none

!..Local variables											!..Local variables
      INTEGER:: i, j, n2										      INTEGER:: i, j, n2
      DOUBLE PRECISION, DIMENSION(nbi):: N_i								      DOUBLE PRECISION, DIMENSION(nbi):: N_i
      DOUBLE PRECISION:: N0_i, lami, Di_mean, t1, t2							      DOUBLE PRECISION:: N0_i, lami, Di_mean, t1, t2
      REAL:: xlimit_intg										      REAL:: xlimit_intg

!+---+													!+---+

      do j = 1, ntb_i1											      do j = 1, ntb_i1
         do i = 1, ntb_i										         do i = 1, ntb_i
            lami = (am_i*cig(2)*oig1*Nt_i(j)/r_i(i))**obmi						            lami = (am_i*cig(2)*oig1*Nt_i(j)/r_i(i))**obmi
            Di_mean = (bm_i + mu_i + 1.) / lami								            Di_mean = (bm_i + mu_i + 1.) / lami
            N0_i = Nt_i(j)*oig1 * lami**cie(1)								            N0_i = Nt_i(j)*oig1 * lami**cie(1)
            t1 = 0.0d0											            t1 = 0.0d0
            t2 = 0.0d0											            t2 = 0.0d0
            if (SNGL(Di_mean) .gt. 5.*D0s) then								            if (SNGL(Di_mean) .gt. 5.*D0s) then
             t1 = r_i(i)										             t1 = r_i(i)
             t2 = Nt_i(j)										             t2 = Nt_i(j)
             tpi_ide(i,j) = 0.0D0									             tpi_ide(i,j) = 0.0D0
            elseif (SNGL(Di_mean) .lt. D0i) then							            elseif (SNGL(Di_mean) .lt. D0i) then
             t1 = 0.0D0											             t1 = 0.0D0
             t2 = 0.0D0											             t2 = 0.0D0
             tpi_ide(i,j) = 1.0D0									             tpi_ide(i,j) = 1.0D0
            else											            else
             xlimit_intg = lami*D0s									             xlimit_intg = lami*D0s
             tpi_ide(i,j) = GAMMP(mu_i+2.0, xlimit_intg) * 1.0D0					             tpi_ide(i,j) = GAMMP(mu_i+2.0, xlimit_intg) * 1.0D0
             do n2 = 1, nbi										             do n2 = 1, nbi
               N_i(n2) = N0_i*Di(n2)**mu_i * DEXP(-lami*Di(n2))*dti(n2)					               N_i(n2) = N0_i*Di(n2)**mu_i * DEXP(-lami*Di(n2))*dti(n2)
               if (Di(n2).ge.D0s) then									               if (Di(n2).ge.D0s) then
                  t1 = t1 + N_i(n2) * am_i*Di(n2)**bm_i							                  t1 = t1 + N_i(n2) * am_i*Di(n2)**bm_i
                  t2 = t2 + N_i(n2)									                  t2 = t2 + N_i(n2)
               endif											               endif
             enddo											             enddo
            endif											            endif
            tps_iaus(i,j) = t1										            tps_iaus(i,j) = t1
            tni_iaus(i,j) = t2										            tni_iaus(i,j) = t2
         enddo												         enddo
      enddo												      enddo

      end subroutine qi_aut_qs										      end subroutine qi_aut_qs
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Variable collision efficiency for rain collecting cloud water using					!..Variable collision efficiency for rain collecting cloud water using
!.. method of Beard and Grover, 1974 if a/A less than 0.25; otherwise					!.. method of Beard and Grover, 1974 if a/A less than 0.25; otherwise
!.. uses polynomials to get close match of Pruppacher & Klett Fig 14-9.					!.. uses polynomials to get close match of Pruppacher & Klett Fig 14-9.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine table_Efrw										      subroutine table_Efrw

      implicit none											      implicit none

!..Local variables											!..Local variables
      DOUBLE PRECISION:: vtr, stokes, reynolds, Ef_rw							      DOUBLE PRECISION:: vtr, stokes, reynolds, Ef_rw
      DOUBLE PRECISION:: p, yc0, F, G, H, z, K0, X							      DOUBLE PRECISION:: p, yc0, F, G, H, z, K0, X
      INTEGER:: i, j											      INTEGER:: i, j

      do j = 1, nbc											      do j = 1, nbc
      do i = 1, nbr											      do i = 1, nbr
         Ef_rw = 0.0											         Ef_rw = 0.0
         p = Dc(j)/Dr(i)										         p = Dc(j)/Dr(i)
         if (Dr(i).lt.50.E-6 .or. Dc(j).lt.3.E-6) then							         if (Dr(i).lt.50.E-6 .or. Dc(j).lt.3.E-6) then
          t_Efrw(i,j) = 0.0										          t_Efrw(i,j) = 0.0
         elseif (p.gt.0.25) then									         elseif (p.gt.0.25) then
          X = Dc(j)*1.D6										          X = Dc(j)*1.D6
          if (Dr(i) .lt. 75.e-6) then									          if (Dr(i) .lt. 75.e-6) then
             Ef_rw = 0.026794*X - 0.20604								             Ef_rw = 0.026794*X - 0.20604
          elseif (Dr(i) .lt. 125.e-6) then								          elseif (Dr(i) .lt. 125.e-6) then
             Ef_rw = -0.00066842*X*X + 0.061542*X - 0.37089						             Ef_rw = -0.00066842*X*X + 0.061542*X - 0.37089
          elseif (Dr(i) .lt. 175.e-6) then								          elseif (Dr(i) .lt. 175.e-6) then
             Ef_rw = 4.091e-06*X*X*X*X - 0.00030908*X*X*X               &				             Ef_rw = 4.091e-06*X*X*X*X - 0.00030908*X*X*X               &
                   + 0.0066237*X*X - 0.0013687*X - 0.073022						                   + 0.0066237*X*X - 0.0013687*X - 0.073022
          elseif (Dr(i) .lt. 250.e-6) then								          elseif (Dr(i) .lt. 250.e-6) then
             Ef_rw = 9.6719e-5*X*X*X - 0.0068901*X*X + 0.17305*X        &				             Ef_rw = 9.6719e-5*X*X*X - 0.0068901*X*X + 0.17305*X        &
                   - 0.65988										                   - 0.65988
          elseif (Dr(i) .lt. 350.e-6) then								          elseif (Dr(i) .lt. 350.e-6) then
             Ef_rw = 9.0488e-5*X*X*X - 0.006585*X*X + 0.16606*X         &				             Ef_rw = 9.0488e-5*X*X*X - 0.006585*X*X + 0.16606*X         &
                   - 0.56125										                   - 0.56125
          else												          else
             Ef_rw = 0.00010721*X*X*X - 0.0072962*X*X + 0.1704*X        &				             Ef_rw = 0.00010721*X*X*X - 0.0072962*X*X + 0.1704*X        &
                   - 0.46929										                   - 0.46929
          endif												          endif
         else												         else
          vtr = -0.1021 + 4.932E3*Dr(i) - 0.9551E6*Dr(i)*Dr(i) &					          vtr = -0.1021 + 4.932E3*Dr(i) - 0.9551E6*Dr(i)*Dr(i) &
              + 0.07934E9*Dr(i)*Dr(i)*Dr(i) &								              + 0.07934E9*Dr(i)*Dr(i)*Dr(i) &
              - 0.002362E12*Dr(i)*Dr(i)*Dr(i)*Dr(i)							              - 0.002362E12*Dr(i)*Dr(i)*Dr(i)*Dr(i)
          stokes = Dc(j)*Dc(j)*vtr*rho_w/(9.*1.718E-5*Dr(i))						          stokes = Dc(j)*Dc(j)*vtr*rho_w/(9.*1.718E-5*Dr(i))
          reynolds = 9.*stokes/(p*p*rho_w)								          reynolds = 9.*stokes/(p*p*rho_w)

          F = DLOG(reynolds)										          F = DLOG(reynolds)
          G = -0.1007D0 - 0.358D0*F + 0.0261D0*F*F							          G = -0.1007D0 - 0.358D0*F + 0.0261D0*F*F
          K0 = DEXP(G)											          K0 = DEXP(G)
          z = DLOG(stokes/(K0+1.D-15))									          z = DLOG(stokes/(K0+1.D-15))
          H = 0.1465D0 + 1.302D0*z - 0.607D0*z*z + 0.293D0*z*z*z					          H = 0.1465D0 + 1.302D0*z - 0.607D0*z*z + 0.293D0*z*z*z
          yc0 = 2.0D0/PI * ATAN(H)									          yc0 = 2.0D0/PI * ATAN(H)
          Ef_rw = (yc0+p)*(yc0+p) / ((1.+p)*(1.+p))							          Ef_rw = (yc0+p)*(yc0+p) / ((1.+p)*(1.+p))

         endif												         endif

         t_Efrw(i,j) = MAX(0.0, MIN(SNGL(Ef_rw), 0.95))							         t_Efrw(i,j) = MAX(0.0, MIN(SNGL(Ef_rw), 0.95))

      enddo												      enddo
      enddo												      enddo

      end subroutine table_Efrw										      end subroutine table_Efrw
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Variable collision efficiency for snow collecting cloud water using					!..Variable collision efficiency for snow collecting cloud water using
!.. method of Wang and Ji, 2000 except equate melted snow diameter to					!.. method of Wang and Ji, 2000 except equate melted snow diameter to
!.. their "effective collision cross-section."								!.. their "effective collision cross-section."
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine table_Efsw										      subroutine table_Efsw

      implicit none											      implicit none

!..Local variables											!..Local variables
      DOUBLE PRECISION:: Ds_m, vts, vtc, stokes, reynolds, Ef_sw					      DOUBLE PRECISION:: Ds_m, vts, vtc, stokes, reynolds, Ef_sw
      DOUBLE PRECISION:: p, yc0, F, G, H, z, K0								      DOUBLE PRECISION:: p, yc0, F, G, H, z, K0
      INTEGER:: i, j											      INTEGER:: i, j

      do j = 1, nbc											      do j = 1, nbc
      vtc = 1.19D4 * (1.0D4*Dc(j)*Dc(j)*0.25D0)								      vtc = 1.19D4 * (1.0D4*Dc(j)*Dc(j)*0.25D0)
      do i = 1, nbs											      do i = 1, nbs
         vts = av_s*Ds(i)**bv_s * DEXP(-fv_s*Ds(i)) - vtc						         vts = av_s*Ds(i)**bv_s * DEXP(-fv_s*Ds(i)) - vtc
         Ds_m = (am_s*Ds(i)**bm_s / am_r)**obmr								         Ds_m = (am_s*Ds(i)**bm_s / am_r)**obmr
         p = Dc(j)/Ds_m											         p = Dc(j)/Ds_m
         if (p.gt.0.25 .or. Ds(i).lt.D0s .or. Dc(j).lt.6.E-6 &						         if (p.gt.0.25 .or. Ds(i).lt.D0s .or. Dc(j).lt.6.E-6 &
               .or. vts.lt.1.E-3) then									               .or. vts.lt.1.E-3) then
          t_Efsw(i,j) = 0.0										          t_Efsw(i,j) = 0.0
         else												         else
          stokes = Dc(j)*Dc(j)*vts*rho_w/(9.*1.718E-5*Ds_m)						          stokes = Dc(j)*Dc(j)*vts*rho_w/(9.*1.718E-5*Ds_m)
          reynolds = 9.*stokes/(p*p*rho_w)								          reynolds = 9.*stokes/(p*p*rho_w)

          F = DLOG(reynolds)										          F = DLOG(reynolds)
          G = -0.1007D0 - 0.358D0*F + 0.0261D0*F*F							          G = -0.1007D0 - 0.358D0*F + 0.0261D0*F*F
          K0 = DEXP(G)											          K0 = DEXP(G)
          z = DLOG(stokes/(K0+1.D-15))									          z = DLOG(stokes/(K0+1.D-15))
          H = 0.1465D0 + 1.302D0*z - 0.607D0*z*z + 0.293D0*z*z*z					          H = 0.1465D0 + 1.302D0*z - 0.607D0*z*z + 0.293D0*z*z*z
          yc0 = 2.0D0/PI * ATAN(H)									          yc0 = 2.0D0/PI * ATAN(H)
          Ef_sw = (yc0+p)*(yc0+p) / ((1.+p)*(1.+p))							          Ef_sw = (yc0+p)*(yc0+p) / ((1.+p)*(1.+p))

          t_Efsw(i,j) = MAX(0.0, MIN(SNGL(Ef_sw), 0.95))						          t_Efsw(i,j) = MAX(0.0, MIN(SNGL(Ef_sw), 0.95))
         endif												         endif

      enddo												      enddo
      enddo												      enddo

      end subroutine table_Efsw										      end subroutine table_Efsw
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Function to compute collision efficiency of collector species (rain,					!..Function to compute collision efficiency of collector species (rain,
!.. snow, graupel) of aerosols.  Follows Wang et al, 2010, ACP, which					!.. snow, graupel) of aerosols.  Follows Wang et al, 2010, ACP, which
!.. follows Slinn (1983).										!.. follows Slinn (1983).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      real function Eff_aero(D, Da, visc,rhoa,Temp,species)						      real function Eff_aero(D, Da, visc,rhoa,Temp,species)

      implicit none											      implicit none
      real:: D, Da, visc, rhoa, Temp									      real:: D, Da, visc, rhoa, Temp
      character(LEN=1):: species									      character(LEN=1):: species
      real:: aval, Cc, diff, Re, Sc, St, St2, vt, Eff							      real:: aval, Cc, diff, Re, Sc, St, St2, vt, Eff
      real, parameter:: boltzman = 1.3806503E-23							      real, parameter:: boltzman = 1.3806503E-23
      real, parameter:: meanPath = 0.0256E-6								      real, parameter:: meanPath = 0.0256E-6

      vt = 1.												      vt = 1.
      if (species .eq. 'r') then									      if (species .eq. 'r') then
         vt = -0.1021 + 4.932E3*D - 0.9551E6*D*D                        &				         vt = -0.1021 + 4.932E3*D - 0.9551E6*D*D                        &
              + 0.07934E9*D*D*D - 0.002362E12*D*D*D*D							              + 0.07934E9*D*D*D - 0.002362E12*D*D*D*D
      elseif (species .eq. 's') then									      elseif (species .eq. 's') then
         vt = av_s*D**bv_s										         vt = av_s*D**bv_s
      elseif (species .eq. 'g') then									      elseif (species .eq. 'g') then
         vt = av_g*D**bv_g										         vt = av_g*D**bv_g
      endif												      endif

      Cc    = 1. + 2.*meanPath/Da *(1.257+0.4*exp(-0.55*Da/meanPath))					      Cc    = 1. + 2.*meanPath/Da *(1.257+0.4*exp(-0.55*Da/meanPath))
      diff  = boltzman*Temp*Cc/(3.*PI*visc*Da)								      diff  = boltzman*Temp*Cc/(3.*PI*visc*Da)

      Re    = 0.5*rhoa*D*vt/visc									      Re    = 0.5*rhoa*D*vt/visc
      Sc    = visc/(rhoa*diff)										      Sc    = visc/(rhoa*diff)

      St    = Da*Da*vt*1000./(9.*visc*D)								      St    = Da*Da*vt*1000./(9.*visc*D)
      aval  = 1.+LOG(1.+Re)										      aval  = 1.+LOG(1.+Re)
      St2   = (1.2 + 1./12.*aval)/(1.+aval)								      St2   = (1.2 + 1./12.*aval)/(1.+aval)

      Eff = 4./(Re*Sc) * (1. + 0.4*SQRT(Re)*Sc**0.3333                  &				      Eff = 4./(Re*Sc) * (1. + 0.4*SQRT(Re)*Sc**0.3333                  &
                             + 0.16*SQRT(Re)*SQRT(Sc))                  &				                             + 0.16*SQRT(Re)*SQRT(Sc))                  &
               + 4.*Da/D * (0.02 + Da/D*(1.+2.*SQRT(Re)))						               + 4.*Da/D * (0.02 + Da/D*(1.+2.*SQRT(Re)))

      if (St.gt.St2) Eff = Eff  + ( (St-St2)/(St-St2+0.666667))**1.5					      if (St.gt.St2) Eff = Eff  + ( (St-St2)/(St-St2+0.666667))**1.5
      Eff_aero = MAX(1.E-5, MIN(Eff, 1.0))								      Eff_aero = MAX(1.E-5, MIN(Eff, 1.0))

      end function Eff_aero										      end function Eff_aero

!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Integrate rain size distribution from zero to D-star to compute the					!..Integrate rain size distribution from zero to D-star to compute the
!.. number of drops smaller than D-star that evaporate in a single					!.. number of drops smaller than D-star that evaporate in a single
!.. timestep.  Drops larger than D-star dont evaporate entirely so do					!.. timestep.  Drops larger than D-star dont evaporate entirely so do
!.. not affect number concentration.									!.. not affect number concentration.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine table_dropEvap										      subroutine table_dropEvap

      implicit none											      implicit none

!..Local variables											!..Local variables
      INTEGER:: i, j, k, n										      INTEGER:: i, j, k, n
      DOUBLE PRECISION, DIMENSION(nbc):: N_c, massc							      DOUBLE PRECISION, DIMENSION(nbc):: N_c, massc
      DOUBLE PRECISION:: summ, summ2, lamc, N0_c							      DOUBLE PRECISION:: summ, summ2, lamc, N0_c
      INTEGER:: nu_c											      INTEGER:: nu_c
!      DOUBLE PRECISION:: Nt_r, N0, lam_exp, lam							!      DOUBLE PRECISION:: Nt_r, N0, lam_exp, lam
!      REAL:: xlimit_intg										!      REAL:: xlimit_intg

      do n = 1, nbc											      do n = 1, nbc
         massc(n) = am_r*Dc(n)**bm_r									         massc(n) = am_r*Dc(n)**bm_r
      enddo												      enddo

      do k = 1, nbc											      do k = 1, nbc
         nu_c = MIN(15, NINT(1000.E6/t_Nc(k)) + 2)							         nu_c = MIN(15, NINT(1000.E6/t_Nc(k)) + 2)
         do j = 1, ntb_c										         do j = 1, ntb_c
            lamc = (t_Nc(k)*am_r* ccg(2,nu_c)*ocg1(nu_c) / r_c(j))**obmr				            lamc = (t_Nc(k)*am_r* ccg(2,nu_c)*ocg1(nu_c) / r_c(j))**obmr
            N0_c = t_Nc(k)*ocg1(nu_c) * lamc**cce(1,nu_c)						            N0_c = t_Nc(k)*ocg1(nu_c) * lamc**cce(1,nu_c)
            do i = 1, nbc										            do i = 1, nbc
!-GT           tnc_wev(i,j,k) = GAMMP(nu_c+1., SNGL(Dc(i)*lamc))*t_Nc(k)				!-GT           tnc_wev(i,j,k) = GAMMP(nu_c+1., SNGL(Dc(i)*lamc))*t_Nc(k)
               N_c(i) = N0_c* Dc(i)**nu_c*EXP(-lamc*Dc(i))*dtc(i)					               N_c(i) = N0_c* Dc(i)**nu_c*EXP(-lamc*Dc(i))*dtc(i)
!     if(j.eq.18 .and. k.eq.50) print*, ' N_c = ', N_c(i)						!     if(j.eq.18 .and. k.eq.50) print*, ' N_c = ', N_c(i)
               summ = 0.										               summ = 0.
               summ2 = 0.										               summ2 = 0.
               do n = 1, i										               do n = 1, i
                  summ = summ + massc(n)*N_c(n)								                  summ = summ + massc(n)*N_c(n)
                  summ2 = summ2 + N_c(n)								                  summ2 = summ2 + N_c(n)
               enddo											               enddo
!      if(j.eq.18 .and. k.eq.50) print*, '  DEBUG-TABLE: ', r_c(j), t_Nc(k), summ2, summ		!      if(j.eq.18 .and. k.eq.50) print*, '  DEBUG-TABLE: ', r_c(j), t_Nc(k), summ2, summ
               tpc_wev(i,j,k) = summ									               tpc_wev(i,j,k) = summ
               tnc_wev(i,j,k) = summ2									               tnc_wev(i,j,k) = summ2
            enddo											            enddo
         enddo												         enddo
      enddo												      enddo

!													!
!..To do the same thing for rain.									!..To do the same thing for rain.
!													!
!     do k = 1, ntb_r											!     do k = 1, ntb_r
!     do j = 1, ntb_r1											!     do j = 1, ntb_r1
!        lam_exp = (N0r_exp(j)*am_r*crg(1)/r_r(k))**ore1						!        lam_exp = (N0r_exp(j)*am_r*crg(1)/r_r(k))**ore1
!        lam = lam_exp * (crg(3)*org2*org1)**obmr							!        lam = lam_exp * (crg(3)*org2*org1)**obmr
!        N0 = N0r_exp(j)/(crg(2)*lam_exp) * lam**cre(2)							!        N0 = N0r_exp(j)/(crg(2)*lam_exp) * lam**cre(2)
!        Nt_r = N0 * crg(2) / lam**cre(2)								!        Nt_r = N0 * crg(2) / lam**cre(2)
!        do i = 1, nbr											!        do i = 1, nbr
!           xlimit_intg = lam*Dr(i)									!           xlimit_intg = lam*Dr(i)
!           tnr_rev(i,j,k) = GAMMP(mu_r+1.0, xlimit_intg) * Nt_r					!           tnr_rev(i,j,k) = GAMMP(mu_r+1.0, xlimit_intg) * Nt_r
!        enddo												!        enddo
!     enddo												!     enddo
!     enddo												!     enddo

! TO APPLY TABLE ABOVE											! TO APPLY TABLE ABOVE
!..Rain lookup table indexes.										!..Rain lookup table indexes.
!         Dr_star = DSQRT(-2.D0*DT * t1_evap/(2.*PI) &							!         Dr_star = DSQRT(-2.D0*DT * t1_evap/(2.*PI) &
!                 * 0.78*4.*diffu(k)*xsat*rvs/rho_w)							!                 * 0.78*4.*diffu(k)*xsat*rvs/rho_w)
!         idx_d = NINT(1.0 + FLOAT(nbr) * DLOG(Dr_star/D0r)             &				!         idx_d = NINT(1.0 + FLOAT(nbr) * DLOG(Dr_star/D0r)             &
!               / DLOG(Dr(nbr)/D0r))									!               / DLOG(Dr(nbr)/D0r))
!         idx_d = MAX(1, MIN(idx_d, nbr))								!         idx_d = MAX(1, MIN(idx_d, nbr))
!													!
!         nir = NINT(ALOG10(rr(k)))									!         nir = NINT(ALOG10(rr(k)))
!         do nn = nir-1, nir+1										!         do nn = nir-1, nir+1
!            n = nn											!            n = nn
!            if ( (rr(k)/10.**nn).ge.1.0 .and. &							!            if ( (rr(k)/10.**nn).ge.1.0 .and. &
!                 (rr(k)/10.**nn).lt.10.0) goto 154							!                 (rr(k)/10.**nn).lt.10.0) goto 154
!         enddo												!         enddo
!154      continue											!154      continue
!         idx_r = INT(rr(k)/10.**n) + 10*(n-nir2) - (n-nir2)						!         idx_r = INT(rr(k)/10.**n) + 10*(n-nir2) - (n-nir2)
!         idx_r = MAX(1, MIN(idx_r, ntb_r))								!         idx_r = MAX(1, MIN(idx_r, ntb_r))
!													!
!         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							!         lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
!         lam_exp = lamr * (crg(3)*org2*org1)**bm_r							!         lam_exp = lamr * (crg(3)*org2*org1)**bm_r
!         N0_exp = org1*rr(k)/am_r * lam_exp**cre(1)							!         N0_exp = org1*rr(k)/am_r * lam_exp**cre(1)
!         nir = NINT(DLOG10(N0_exp))									!         nir = NINT(DLOG10(N0_exp))
!         do nn = nir-1, nir+1										!         do nn = nir-1, nir+1
!            n = nn											!            n = nn
!            if ( (N0_exp/10.**nn).ge.1.0 .and. &							!            if ( (N0_exp/10.**nn).ge.1.0 .and. &
!                 (N0_exp/10.**nn).lt.10.0) goto 155							!                 (N0_exp/10.**nn).lt.10.0) goto 155
!         enddo												!         enddo
!155      continue											!155      continue
!         idx_r1 = INT(N0_exp/10.**n) + 10*(n-nir3) - (n-nir3)						!         idx_r1 = INT(N0_exp/10.**n) + 10*(n-nir3) - (n-nir3)
!         idx_r1 = MAX(1, MIN(idx_r1, ntb_r1))								!         idx_r1 = MAX(1, MIN(idx_r1, ntb_r1))
!													!
!         pnr_rev(k) = MIN(nr(k)*odts, SNGL(tnr_rev(idx_d,idx_r1,idx_r) &   ! RAIN2M			!         pnr_rev(k) = MIN(nr(k)*odts, SNGL(tnr_rev(idx_d,idx_r1,idx_r) &   ! RAIN2M
!                    * odts))										!                    * odts))

      end subroutine table_dropEvap									      end subroutine table_dropEvap
!													!
!ctrlL													!ctrlL
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Fill the table of CCN activation data created from parcel model run					!..Fill the table of CCN activation data created from parcel model run
!.. by Trude Eidhammer with inputs of aerosol number concentration,					!.. by Trude Eidhammer with inputs of aerosol number concentration,
!.. vertical velocity, temperature, lognormal mean aerosol radius, and					!.. vertical velocity, temperature, lognormal mean aerosol radius, and
!.. hygroscopicity, kappa.  The data are read from external file and					!.. hygroscopicity, kappa.  The data are read from external file and
!.. contain activated fraction of CCN for given conditions.						!.. contain activated fraction of CCN for given conditions.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine table_ccnAct										      subroutine table_ccnAct

      USE module_domain											      USE module_domain
      USE module_dm											      USE module_dm
      implicit none											      implicit none

      LOGICAL, EXTERNAL:: wrf_dm_on_monitor								      LOGICAL, EXTERNAL:: wrf_dm_on_monitor

!..Local variables											!..Local variables
      INTEGER:: iunit_mp_th1, i										      INTEGER:: iunit_mp_th1, i
      LOGICAL:: opened											      LOGICAL:: opened
      CHARACTER*64 errmess										      CHARACTER*64 errmess

      iunit_mp_th1 = -1											      iunit_mp_th1 = -1
      IF ( wrf_dm_on_monitor() ) THEN									      IF ( wrf_dm_on_monitor() ) THEN
        DO i = 20,99											        DO i = 20,99
          INQUIRE ( i , OPENED = opened )								          INQUIRE ( i , OPENED = opened )
          IF ( .NOT. opened ) THEN									          IF ( .NOT. opened ) THEN
            iunit_mp_th1 = i										            iunit_mp_th1 = i
            GOTO 2010											            GOTO 2010
          ENDIF												          ENDIF
        ENDDO												        ENDDO
 2010   CONTINUE											 2010   CONTINUE
      ENDIF												      ENDIF
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
      CALL wrf_dm_bcast_bytes ( iunit_mp_th1 , IWORDSIZE )						      CALL wrf_dm_bcast_bytes ( iunit_mp_th1 , IWORDSIZE )
#endif													#endif
      IF ( iunit_mp_th1 < 0 ) THEN									      IF ( iunit_mp_th1 < 0 ) THEN
        CALL wrf_error_fatal ( 'module_mp_thompson: table_ccnAct: '//   &				        CALL wrf_error_fatal ( 'module_mp_thompson: table_ccnAct: '//   &
           'Can not find unused fortran unit to read in lookup table.')					           'Can not find unused fortran unit to read in lookup table.')
      ENDIF												      ENDIF

      IF ( wrf_dm_on_monitor() ) THEN									      IF ( wrf_dm_on_monitor() ) THEN
        WRITE(errmess, '(A,I2)') 'module_mp_thompson: opening CCN_ACTIVATE.BIN on unit ',iunit_m	        WRITE(errmess, '(A,I2)') 'module_mp_thompson: opening CCN_ACTIVATE.BIN on unit ',iunit_m
        CALL wrf_debug(150, errmess)									        CALL wrf_debug(150, errmess)
        OPEN(iunit_mp_th1,FILE='CCN_ACTIVATE.BIN',                      &				        OPEN(iunit_mp_th1,FILE='CCN_ACTIVATE.BIN',                      &
             FORM='UNFORMATTED',STATUS='OLD',ERR=9009)							             FORM='UNFORMATTED',STATUS='OLD',ERR=9009)
      ENDIF												      ENDIF

#define DM_BCAST_MACRO(A) CALL wrf_dm_bcast_bytes(A, size(A)*R4SIZE)					#define DM_BCAST_MACRO(A) CALL wrf_dm_bcast_bytes(A, size(A)*R4SIZE)

      IF ( wrf_dm_on_monitor() ) READ(iunit_mp_th1,ERR=9010) tnccn_act					      IF ( wrf_dm_on_monitor() ) READ(iunit_mp_th1,ERR=9010) tnccn_act
#if defined(DM_PARALLEL) && !defined(STUBMPI)								#if defined(DM_PARALLEL) && !defined(STUBMPI)
      DM_BCAST_MACRO(tnccn_act)										      DM_BCAST_MACRO(tnccn_act)
#endif													#endif


      RETURN												      RETURN
 9009 CONTINUE												 9009 CONTINUE
      WRITE( errmess , '(A,I2)' ) 'module_mp_thompson: error opening CCN_ACTIVATE.BIN on unit ',	      WRITE( errmess , '(A,I2)' ) 'module_mp_thompson: error opening CCN_ACTIVATE.BIN on unit ',
      CALL wrf_error_fatal(errmess)									      CALL wrf_error_fatal(errmess)
      RETURN												      RETURN
 9010 CONTINUE												 9010 CONTINUE
      WRITE( errmess , '(A,I2)' ) 'module_mp_thompson: error reading CCN_ACTIVATE.BIN on unit ',	      WRITE( errmess , '(A,I2)' ) 'module_mp_thompson: error reading CCN_ACTIVATE.BIN on unit ',
      CALL wrf_error_fatal(errmess)									      CALL wrf_error_fatal(errmess)

      end subroutine table_ccnAct									      end subroutine table_ccnAct
!^L													!^L
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Retrieve fraction of CCN that gets activated given the model temp,					!..Retrieve fraction of CCN that gets activated given the model temp,
!.. vertical velocity, and available CCN concentration.  The lookup					!.. vertical velocity, and available CCN concentration.  The lookup
!.. table (read from external file) has CCN concentration varying the					!.. table (read from external file) has CCN concentration varying the
!.. quickest, then updraft, then temperature, then mean aerosol radius,					!.. quickest, then updraft, then temperature, then mean aerosol radius,
!.. and finally hygroscopicity, kappa.									!.. and finally hygroscopicity, kappa.
!.. TO_DO ITEM:  For radiation cooling producing fog, in which case the					!.. TO_DO ITEM:  For radiation cooling producing fog, in which case the
!.. updraft velocity could easily be negative, we could use the temp					!.. updraft velocity could easily be negative, we could use the temp
!.. and its tendency to diagnose a pretend postive updraft velocity.					!.. and its tendency to diagnose a pretend postive updraft velocity.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      real function activ_ncloud(Tt, Ww, NCCN)								      real function activ_ncloud(Tt, Ww, NCCN)

      implicit none											      implicit none
      REAL, INTENT(IN):: Tt, Ww, NCCN									      REAL, INTENT(IN):: Tt, Ww, NCCN
      REAL:: n_local, w_local										      REAL:: n_local, w_local
      INTEGER:: i, j, k, l, m, n									      INTEGER:: i, j, k, l, m, n
      REAL:: A, B, C, D, t, u, x1, x2, y1, y2, nx, wy, fraction						      REAL:: A, B, C, D, t, u, x1, x2, y1, y2, nx, wy, fraction


!     ta_Na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/)  ntb_arc				!     ta_Na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/)  ntb_arc
!     ta_Ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/)  ntb_arw			!     ta_Ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/)  ntb_arw
!     ta_Tk = (/243.15, 253.15, 263.15, 273.15, 283.15, 293.15, 303.15/)  ntb_art			!     ta_Tk = (/243.15, 253.15, 263.15, 273.15, 283.15, 293.15, 303.15/)  ntb_art
!     ta_Ra = (/0.01, 0.02, 0.04, 0.08, 0.16/)  ntb_arr							!     ta_Ra = (/0.01, 0.02, 0.04, 0.08, 0.16/)  ntb_arr
!     ta_Ka = (/0.2, 0.4, 0.6, 0.8/)  ntb_ark								!     ta_Ka = (/0.2, 0.4, 0.6, 0.8/)  ntb_ark

      n_local = NCCN * 1.E-6										      n_local = NCCN * 1.E-6
      w_local = Ww											      w_local = Ww

      if (n_local .ge. ta_Na(ntb_arc)) then								      if (n_local .ge. ta_Na(ntb_arc)) then
         n_local = ta_Na(ntb_arc) - 1.0									         n_local = ta_Na(ntb_arc) - 1.0
      elseif (n_local .le. ta_Na(1)) then								      elseif (n_local .le. ta_Na(1)) then
         n_local = ta_Na(1) + 1.0									         n_local = ta_Na(1) + 1.0
      endif												      endif
      do n = 2, ntb_arc											      do n = 2, ntb_arc
         if (n_local.ge.ta_Na(n-1) .and. n_local.lt.ta_Na(n)) goto 8003					         if (n_local.ge.ta_Na(n-1) .and. n_local.lt.ta_Na(n)) goto 8003
      enddo												      enddo
 8003 continue												 8003 continue
      i = n												      i = n
      x1 = LOG(ta_Na(i-1))										      x1 = LOG(ta_Na(i-1))
      x2 = LOG(ta_Na(i))										      x2 = LOG(ta_Na(i))

      if (w_local .ge. ta_Ww(ntb_arw)) then								      if (w_local .ge. ta_Ww(ntb_arw)) then
         w_local = ta_Ww(ntb_arw) - 1.0									         w_local = ta_Ww(ntb_arw) - 1.0
      elseif (w_local .le. ta_Ww(1)) then								      elseif (w_local .le. ta_Ww(1)) then
         w_local = ta_Ww(1) + 0.001									         w_local = ta_Ww(1) + 0.001
      endif												      endif
      do n = 2, ntb_arw											      do n = 2, ntb_arw
         if (w_local.ge.ta_Ww(n-1) .and. w_local.lt.ta_Ww(n)) goto 8005					         if (w_local.ge.ta_Ww(n-1) .and. w_local.lt.ta_Ww(n)) goto 8005
      enddo												      enddo
 8005 continue												 8005 continue
      j = n												      j = n
      y1 = LOG(ta_Ww(j-1))										      y1 = LOG(ta_Ww(j-1))
      y2 = LOG(ta_Ww(j))										      y2 = LOG(ta_Ww(j))

      k = MAX(1, MIN( NINT( (Tt - ta_Tk(1))*0.1) + 1, ntb_art))						      k = MAX(1, MIN( NINT( (Tt - ta_Tk(1))*0.1) + 1, ntb_art))

!..The next two values are indexes of mean aerosol radius and						!..The next two values are indexes of mean aerosol radius and
!.. hygroscopicity.  Currently these are constant but a future version					!.. hygroscopicity.  Currently these are constant but a future version
!.. should implement other variables to allow more freedom such as					!.. should implement other variables to allow more freedom such as
!.. at least simple separation of tiny size sulfates from larger					!.. at least simple separation of tiny size sulfates from larger
!.. sea salts.												!.. sea salts.
      l = 3												      l = 3
      m = 2												      m = 2

      A = tnccn_act(i-1,j-1,k,l,m)									      A = tnccn_act(i-1,j-1,k,l,m)
      B = tnccn_act(i,j-1,k,l,m)									      B = tnccn_act(i,j-1,k,l,m)
      C = tnccn_act(i,j,k,l,m)										      C = tnccn_act(i,j,k,l,m)
      D = tnccn_act(i-1,j,k,l,m)									      D = tnccn_act(i-1,j,k,l,m)
      nx = LOG(n_local)											      nx = LOG(n_local)
      wy = LOG(w_local)											      wy = LOG(w_local)

      t = (nx-x1)/(x2-x1)										      t = (nx-x1)/(x2-x1)
      u = (wy-y1)/(y2-y1)										      u = (wy-y1)/(y2-y1)

!     t = (n_local-ta(Na(i-1))/(ta_Na(i)-ta_Na(i-1))							!     t = (n_local-ta(Na(i-1))/(ta_Na(i)-ta_Na(i-1))
!     u = (w_local-ta_Ww(j-1))/(ta_Ww(j)-ta_Ww(j-1))							!     u = (w_local-ta_Ww(j-1))/(ta_Ww(j)-ta_Ww(j-1))

      fraction = (1.0-t)*(1.0-u)*A + t*(1.0-u)*B + t*u*C + (1.0-t)*u*D					      fraction = (1.0-t)*(1.0-u)*A + t*(1.0-u)*B + t*u*C + (1.0-t)*u*D

!     if (NCCN*fraction .gt. 0.75*Nt_c_max) then							!     if (NCCN*fraction .gt. 0.75*Nt_c_max) then
!        write(*,*) ' DEBUG-GT ', n_local, w_local, Tt, i, j, k						!        write(*,*) ' DEBUG-GT ', n_local, w_local, Tt, i, j, k
!     endif												!     endif

      activ_ncloud = NCCN*fraction									      activ_ncloud = NCCN*fraction

      end function activ_ncloud										      end function activ_ncloud

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      SUBROUTINE GCF(GAMMCF,A,X,GLN)									      SUBROUTINE GCF(GAMMCF,A,X,GLN)
!     --- RETURNS THE INCOMPLETE GAMMA FUNCTION Q(A,X) EVALUATED BY ITS					!     --- RETURNS THE INCOMPLETE GAMMA FUNCTION Q(A,X) EVALUATED BY ITS
!     --- CONTINUED FRACTION REPRESENTATION AS GAMMCF.  ALSO RETURNS					!     --- CONTINUED FRACTION REPRESENTATION AS GAMMCF.  ALSO RETURNS
!     --- LN(GAMMA(A)) AS GLN.  THE CONTINUED FRACTION IS EVALUATED BY					!     --- LN(GAMMA(A)) AS GLN.  THE CONTINUED FRACTION IS EVALUATED BY
!     --- A MODIFIED LENTZ METHOD.									!     --- A MODIFIED LENTZ METHOD.
!     --- USES GAMMLN											!     --- USES GAMMLN
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER, PARAMETER:: ITMAX=100									      INTEGER, PARAMETER:: ITMAX=100
      REAL, PARAMETER:: gEPS=3.E-7									      REAL, PARAMETER:: gEPS=3.E-7
      REAL, PARAMETER:: FPMIN=1.E-30									      REAL, PARAMETER:: FPMIN=1.E-30
      REAL, INTENT(IN):: A, X										      REAL, INTENT(IN):: A, X
      REAL:: GAMMCF,GLN											      REAL:: GAMMCF,GLN
      INTEGER:: I											      INTEGER:: I
      REAL:: AN,B,C,D,DEL,H										      REAL:: AN,B,C,D,DEL,H
      GLN=GAMMLN(A)											      GLN=GAMMLN(A)
      B=X+1.-A												      B=X+1.-A
      C=1./FPMIN											      C=1./FPMIN
      D=1./B												      D=1./B
      H=D												      H=D
      DO 11 I=1,ITMAX											      DO 11 I=1,ITMAX
        AN=-I*(I-A)											        AN=-I*(I-A)
        B=B+2.												        B=B+2.
        D=AN*D+B											        D=AN*D+B
        IF(ABS(D).LT.FPMIN)D=FPMIN									        IF(ABS(D).LT.FPMIN)D=FPMIN
        C=B+AN/C											        C=B+AN/C
        IF(ABS(C).LT.FPMIN)C=FPMIN									        IF(ABS(C).LT.FPMIN)C=FPMIN
        D=1./D												        D=1./D
        DEL=D*C												        DEL=D*C
        H=H*DEL												        H=H*DEL
        IF(ABS(DEL-1.).LT.gEPS)GOTO 1									        IF(ABS(DEL-1.).LT.gEPS)GOTO 1
 11   CONTINUE												 11   CONTINUE
      PRINT *, 'A TOO LARGE, ITMAX TOO SMALL IN GCF'							      PRINT *, 'A TOO LARGE, ITMAX TOO SMALL IN GCF'
 1    GAMMCF=EXP(-X+A*LOG(X)-GLN)*H									 1    GAMMCF=EXP(-X+A*LOG(X)-GLN)*H
      END SUBROUTINE GCF										      END SUBROUTINE GCF
!  (C) Copr. 1986-92 Numerical Recipes Software 2.02							!  (C) Copr. 1986-92 Numerical Recipes Software 2.02
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      SUBROUTINE GSER(GAMSER,A,X,GLN)									      SUBROUTINE GSER(GAMSER,A,X,GLN)
!     --- RETURNS THE INCOMPLETE GAMMA FUNCTION P(A,X) EVALUATED BY ITS					!     --- RETURNS THE INCOMPLETE GAMMA FUNCTION P(A,X) EVALUATED BY ITS
!     --- ITS SERIES REPRESENTATION AS GAMSER.  ALSO RETURNS LN(GAMMA(A)) 				!     --- ITS SERIES REPRESENTATION AS GAMSER.  ALSO RETURNS LN(GAMMA(A)) 
!     --- AS GLN.											!     --- AS GLN.
!     --- USES GAMMLN											!     --- USES GAMMLN
      IMPLICIT NONE											      IMPLICIT NONE
      INTEGER, PARAMETER:: ITMAX=100									      INTEGER, PARAMETER:: ITMAX=100
      REAL, PARAMETER:: gEPS=3.E-7									      REAL, PARAMETER:: gEPS=3.E-7
      REAL, INTENT(IN):: A, X										      REAL, INTENT(IN):: A, X
      REAL:: GAMSER,GLN											      REAL:: GAMSER,GLN
      INTEGER:: N											      INTEGER:: N
      REAL:: AP,DEL,SUM											      REAL:: AP,DEL,SUM
      GLN=GAMMLN(A)											      GLN=GAMMLN(A)
      IF(X.LE.0.)THEN											      IF(X.LE.0.)THEN
        IF(X.LT.0.) PRINT *, 'X < 0 IN GSER'								        IF(X.LT.0.) PRINT *, 'X < 0 IN GSER'
        GAMSER=0.											        GAMSER=0.
        RETURN												        RETURN
      ENDIF												      ENDIF
      AP=A												      AP=A
      SUM=1./A												      SUM=1./A
      DEL=SUM												      DEL=SUM
      DO 11 N=1,ITMAX											      DO 11 N=1,ITMAX
        AP=AP+1.											        AP=AP+1.
        DEL=DEL*X/AP											        DEL=DEL*X/AP
        SUM=SUM+DEL											        SUM=SUM+DEL
        IF(ABS(DEL).LT.ABS(SUM)*gEPS)GOTO 1								        IF(ABS(DEL).LT.ABS(SUM)*gEPS)GOTO 1
 11   CONTINUE												 11   CONTINUE
      PRINT *,'A TOO LARGE, ITMAX TOO SMALL IN GSER'							      PRINT *,'A TOO LARGE, ITMAX TOO SMALL IN GSER'
 1    GAMSER=SUM*EXP(-X+A*LOG(X)-GLN)									 1    GAMSER=SUM*EXP(-X+A*LOG(X)-GLN)
      END SUBROUTINE GSER										      END SUBROUTINE GSER
!  (C) Copr. 1986-92 Numerical Recipes Software 2.02							!  (C) Copr. 1986-92 Numerical Recipes Software 2.02
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      REAL FUNCTION GAMMLN(XX)										      REAL FUNCTION GAMMLN(XX)
!     --- RETURNS THE VALUE LN(GAMMA(XX)) FOR XX > 0.							!     --- RETURNS THE VALUE LN(GAMMA(XX)) FOR XX > 0.
      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN):: XX										      REAL, INTENT(IN):: XX
      DOUBLE PRECISION, PARAMETER:: STP = 2.5066282746310005D0						      DOUBLE PRECISION, PARAMETER:: STP = 2.5066282746310005D0
      DOUBLE PRECISION, DIMENSION(6), PARAMETER:: &							      DOUBLE PRECISION, DIMENSION(6), PARAMETER:: &
               COF = (/76.18009172947146D0, -86.50532032941677D0, &					               COF = (/76.18009172947146D0, -86.50532032941677D0, &
                       24.01409824083091D0, -1.231739572450155D0, &					                       24.01409824083091D0, -1.231739572450155D0, &
                      .1208650973866179D-2, -.5395239384953D-5/)					                      .1208650973866179D-2, -.5395239384953D-5/)
      DOUBLE PRECISION:: SER,TMP,X,Y									      DOUBLE PRECISION:: SER,TMP,X,Y
      INTEGER:: J											      INTEGER:: J

      X=XX												      X=XX
      Y=X												      Y=X
      TMP=X+5.5D0											      TMP=X+5.5D0
      TMP=(X+0.5D0)*LOG(TMP)-TMP									      TMP=(X+0.5D0)*LOG(TMP)-TMP
      SER=1.000000000190015D0										      SER=1.000000000190015D0
      DO 11 J=1,6											      DO 11 J=1,6
        Y=Y+1.D0											        Y=Y+1.D0
        SER=SER+COF(J)/Y										        SER=SER+COF(J)/Y
11    CONTINUE												11    CONTINUE
      GAMMLN=TMP+LOG(STP*SER/X)										      GAMMLN=TMP+LOG(STP*SER/X)
      END FUNCTION GAMMLN										      END FUNCTION GAMMLN
!  (C) Copr. 1986-92 Numerical Recipes Software 2.02							!  (C) Copr. 1986-92 Numerical Recipes Software 2.02
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      REAL FUNCTION GAMMP(A,X)										      REAL FUNCTION GAMMP(A,X)
!     --- COMPUTES THE INCOMPLETE GAMMA FUNCTION P(A,X)							!     --- COMPUTES THE INCOMPLETE GAMMA FUNCTION P(A,X)
!     --- SEE ABRAMOWITZ AND STEGUN 6.5.1								!     --- SEE ABRAMOWITZ AND STEGUN 6.5.1
!     --- USES GCF,GSER											!     --- USES GCF,GSER
      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN):: A,X										      REAL, INTENT(IN):: A,X
      REAL:: GAMMCF,GAMSER,GLN										      REAL:: GAMMCF,GAMSER,GLN
      GAMMP = 0.											      GAMMP = 0.
      IF((X.LT.0.) .OR. (A.LE.0.)) THEN									      IF((X.LT.0.) .OR. (A.LE.0.)) THEN
        PRINT *, 'BAD ARGUMENTS IN GAMMP'								        PRINT *, 'BAD ARGUMENTS IN GAMMP'
        RETURN												        RETURN
      ELSEIF(X.LT.A+1.)THEN										      ELSEIF(X.LT.A+1.)THEN
        CALL GSER(GAMSER,A,X,GLN)									        CALL GSER(GAMSER,A,X,GLN)
        GAMMP=GAMSER											        GAMMP=GAMSER
      ELSE												      ELSE
        CALL GCF(GAMMCF,A,X,GLN)									        CALL GCF(GAMMCF,A,X,GLN)
        GAMMP=1.-GAMMCF											        GAMMP=1.-GAMMCF
      ENDIF												      ENDIF
      END FUNCTION GAMMP										      END FUNCTION GAMMP
!  (C) Copr. 1986-92 Numerical Recipes Software 2.02							!  (C) Copr. 1986-92 Numerical Recipes Software 2.02
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      REAL FUNCTION WGAMMA(y)										      REAL FUNCTION WGAMMA(y)

      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN):: y										      REAL, INTENT(IN):: y

      WGAMMA = EXP(GAMMLN(y))										      WGAMMA = EXP(GAMMLN(y))

      END FUNCTION WGAMMA										      END FUNCTION WGAMMA
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
! THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS					! THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS
! A FUNCTION OF TEMPERATURE AND PRESSURE								! A FUNCTION OF TEMPERATURE AND PRESSURE
!													!
      REAL FUNCTION RSLF(P,T)										      REAL FUNCTION RSLF(P,T)

      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN):: P, T										      REAL, INTENT(IN):: P, T
      REAL:: ESL,X											      REAL:: ESL,X
      REAL, PARAMETER:: C0= .611583699E03								      REAL, PARAMETER:: C0= .611583699E03
      REAL, PARAMETER:: C1= .444606896E02								      REAL, PARAMETER:: C1= .444606896E02
      REAL, PARAMETER:: C2= .143177157E01								      REAL, PARAMETER:: C2= .143177157E01
      REAL, PARAMETER:: C3= .264224321E-1								      REAL, PARAMETER:: C3= .264224321E-1
      REAL, PARAMETER:: C4= .299291081E-3								      REAL, PARAMETER:: C4= .299291081E-3
      REAL, PARAMETER:: C5= .203154182E-5								      REAL, PARAMETER:: C5= .203154182E-5
      REAL, PARAMETER:: C6= .702620698E-8								      REAL, PARAMETER:: C6= .702620698E-8
      REAL, PARAMETER:: C7= .379534310E-11								      REAL, PARAMETER:: C7= .379534310E-11
      REAL, PARAMETER:: C8=-.321582393E-13								      REAL, PARAMETER:: C8=-.321582393E-13

      X=MAX(-80.,T-273.16)										      X=MAX(-80.,T-273.16)

!      ESL=612.2*EXP(17.67*X/(T-29.65))									!      ESL=612.2*EXP(17.67*X/(T-29.65))
      ESL=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))					      ESL=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))
      ESL=MIN(ESL, P*0.15)        ! Even with P=1050mb and T=55C, the sat. vap. pres only contri	      ESL=MIN(ESL, P*0.15)        ! Even with P=1050mb and T=55C, the sat. vap. pres only contri
      RSLF=.622*ESL/(P-ESL)										      RSLF=.622*ESL/(P-ESL)

!    ALTERNATIVE											!    ALTERNATIVE
!  ; Source: Murphy and Koop, Review of the vapour pressure of ice and					!  ; Source: Murphy and Koop, Review of the vapour pressure of ice and
!             supercooled water for atmospheric applications, Q. J. R.					!             supercooled water for atmospheric applications, Q. J. R.
!             Meteorol. Soc (2005), 131, pp. 1539-1565.							!             Meteorol. Soc (2005), 131, pp. 1539-1565.
!    ESL = EXP(54.842763 - 6763.22 / T - 4.210 * ALOG(T) + 0.000367 * T					!    ESL = EXP(54.842763 - 6763.22 / T - 4.210 * ALOG(T) + 0.000367 * T
!        + TANH(0.0415 * (T - 218.8)) * (53.878 - 1331.22						!        + TANH(0.0415 * (T - 218.8)) * (53.878 - 1331.22
!        / T - 9.44523 * ALOG(T) + 0.014025 * T))							!        / T - 9.44523 * ALOG(T) + 0.014025 * T))

      END FUNCTION RSLF											      END FUNCTION RSLF
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
! THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A					! THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A
! FUNCTION OF TEMPERATURE AND PRESSURE									! FUNCTION OF TEMPERATURE AND PRESSURE
!													!
      REAL FUNCTION RSIF(P,T)										      REAL FUNCTION RSIF(P,T)

      IMPLICIT NONE											      IMPLICIT NONE
      REAL, INTENT(IN):: P, T										      REAL, INTENT(IN):: P, T
      REAL:: ESI,X											      REAL:: ESI,X
      REAL, PARAMETER:: C0= .609868993E03								      REAL, PARAMETER:: C0= .609868993E03
      REAL, PARAMETER:: C1= .499320233E02								      REAL, PARAMETER:: C1= .499320233E02
      REAL, PARAMETER:: C2= .184672631E01								      REAL, PARAMETER:: C2= .184672631E01
      REAL, PARAMETER:: C3= .402737184E-1								      REAL, PARAMETER:: C3= .402737184E-1
      REAL, PARAMETER:: C4= .565392987E-3								      REAL, PARAMETER:: C4= .565392987E-3
      REAL, PARAMETER:: C5= .521693933E-5								      REAL, PARAMETER:: C5= .521693933E-5
      REAL, PARAMETER:: C6= .307839583E-7								      REAL, PARAMETER:: C6= .307839583E-7
      REAL, PARAMETER:: C7= .105785160E-9								      REAL, PARAMETER:: C7= .105785160E-9
      REAL, PARAMETER:: C8= .161444444E-12								      REAL, PARAMETER:: C8= .161444444E-12

      X=MAX(-80.,T-273.16)										      X=MAX(-80.,T-273.16)
      ESI=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))					      ESI=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))
      ESI=MIN(ESI, P*0.15)										      ESI=MIN(ESI, P*0.15)
      RSIF=.622*ESI/(P-ESI)										      RSIF=.622*ESI/(P-ESI)

!    ALTERNATIVE											!    ALTERNATIVE
!  ; Source: Murphy and Koop, Review of the vapour pressure of ice and					!  ; Source: Murphy and Koop, Review of the vapour pressure of ice and
!             supercooled water for atmospheric applications, Q. J. R.					!             supercooled water for atmospheric applications, Q. J. R.
!             Meteorol. Soc (2005), 131, pp. 1539-1565.							!             Meteorol. Soc (2005), 131, pp. 1539-1565.
!     ESI = EXP(9.550426 - 5723.265/T + 3.53068*ALOG(T) - 0.00728332*T)					!     ESI = EXP(9.550426 - 5723.265/T + 3.53068*ALOG(T) - 0.00728332*T)

      END FUNCTION RSIF											      END FUNCTION RSIF

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      real function iceDeMott(tempc, qv, qvs, qvsi, rho, nifa)						      real function iceDeMott(tempc, qv, qvs, qvsi, rho, nifa)
      implicit none											      implicit none

      REAL, INTENT(IN):: tempc, qv, qvs, qvsi, rho, nifa						      REAL, INTENT(IN):: tempc, qv, qvs, qvsi, rho, nifa

!..Local vars												!..Local vars
      REAL:: satw, sati, siw, p_x, si0x, dtt, dsi, dsw, dab, fc, hx					      REAL:: satw, sati, siw, p_x, si0x, dtt, dsi, dsw, dab, fc, hx
      REAL:: ntilde, n_in, nmax, nhat, mux, xni, nifa_cc						      REAL:: ntilde, n_in, nmax, nhat, mux, xni, nifa_cc
      REAL, PARAMETER:: p_c1    = 1000.									      REAL, PARAMETER:: p_c1    = 1000.
      REAL, PARAMETER:: p_rho_c = 0.76									      REAL, PARAMETER:: p_rho_c = 0.76
      REAL, PARAMETER:: p_alpha = 1.0									      REAL, PARAMETER:: p_alpha = 1.0
      REAL, PARAMETER:: p_gam   = 2.									      REAL, PARAMETER:: p_gam   = 2.
      REAL, PARAMETER:: delT    = 5.									      REAL, PARAMETER:: delT    = 5.
      REAL, PARAMETER:: T0x     = -40.									      REAL, PARAMETER:: T0x     = -40.
      REAL, PARAMETER:: Sw0x    = 0.97									      REAL, PARAMETER:: Sw0x    = 0.97
      REAL, PARAMETER:: delSi   = 0.1									      REAL, PARAMETER:: delSi   = 0.1
      REAL, PARAMETER:: hdm     = 0.15									      REAL, PARAMETER:: hdm     = 0.15
      REAL, PARAMETER:: p_psi   = 0.058707*p_gam/p_rho_c						      REAL, PARAMETER:: p_psi   = 0.058707*p_gam/p_rho_c
      REAL, PARAMETER:: aap     = 1.									      REAL, PARAMETER:: aap     = 1.
      REAL, PARAMETER:: bbp     = 0.									      REAL, PARAMETER:: bbp     = 0.
      REAL, PARAMETER:: y1p     = -35.									      REAL, PARAMETER:: y1p     = -35.
      REAL, PARAMETER:: y2p     = -25.									      REAL, PARAMETER:: y2p     = -25.
      REAL, PARAMETER:: rho_not0 = 101325./(287.05*273.15)						      REAL, PARAMETER:: rho_not0 = 101325./(287.05*273.15)

!+---+													!+---+

      xni = 0.0												      xni = 0.0
!     satw = qv/qvs											!     satw = qv/qvs
!     sati = qv/qvsi											!     sati = qv/qvsi
!     siw = qvs/qvsi											!     siw = qvs/qvsi
!     p_x = -1.0261+(3.1656e-3*tempc)+(5.3938e-4*(tempc*tempc))         &				!     p_x = -1.0261+(3.1656e-3*tempc)+(5.3938e-4*(tempc*tempc))         &
!                +  (8.2584e-6*(tempc*tempc*tempc))							!                +  (8.2584e-6*(tempc*tempc*tempc))
!     si0x = 1.+(10.**p_x)										!     si0x = 1.+(10.**p_x)
!     if (sati.ge.si0x .and. satw.lt.0.985) then							!     if (sati.ge.si0x .and. satw.lt.0.985) then
!        dtt = delta_p (tempc, T0x, T0x+delT, 1., hdm)							!        dtt = delta_p (tempc, T0x, T0x+delT, 1., hdm)
!        dsi = delta_p (sati, Si0x, Si0x+delSi, 0., 1.)							!        dsi = delta_p (sati, Si0x, Si0x+delSi, 0., 1.)
!        dsw = delta_p (satw, Sw0x, 1., 0., 1.)								!        dsw = delta_p (satw, Sw0x, 1., 0., 1.)
!        fc = dtt*dsi*0.5										!        fc = dtt*dsi*0.5
!        hx = min(fc+((1.-fc)*dsw), 1.)									!        hx = min(fc+((1.-fc)*dsw), 1.)
!        ntilde = p_c1*p_gam*((exp(12.96*(sati-1.1)))**0.3) / p_rho_c					!        ntilde = p_c1*p_gam*((exp(12.96*(sati-1.1)))**0.3) / p_rho_c
!        if (tempc .le. y1p) then									!        if (tempc .le. y1p) then
!           n_in = ntilde										!           n_in = ntilde
!        elseif (tempc .ge. y2p) then									!        elseif (tempc .ge. y2p) then
!           n_in = p_psi*p_c1*exp(12.96*(sati-1.)-0.639)						!           n_in = p_psi*p_c1*exp(12.96*(sati-1.)-0.639)
!        else												!        else
!           if (tempc .le. -30.) then									!           if (tempc .le. -30.) then
!              nmax = p_c1*p_gam*(exp(12.96*(siw-1.1)))**0.3/p_rho_c					!              nmax = p_c1*p_gam*(exp(12.96*(siw-1.1)))**0.3/p_rho_c
!           else											!           else
!              nmax = p_psi*p_c1*exp(12.96*(siw-1.)-0.639)						!              nmax = p_psi*p_c1*exp(12.96*(siw-1.)-0.639)
!           endif											!           endif
!           ntilde = MIN(ntilde, nmax)									!           ntilde = MIN(ntilde, nmax)
!           nhat = MIN(p_psi*p_c1*exp(12.96*(sati-1.)-0.639), nmax)					!           nhat = MIN(p_psi*p_c1*exp(12.96*(sati-1.)-0.639), nmax)
!           dab = delta_p (tempc, y1p, y2p, aap, bbp)							!           dab = delta_p (tempc, y1p, y2p, aap, bbp)
!           n_in = MIN(nhat*(ntilde/nhat)**dab, nmax)							!           n_in = MIN(nhat*(ntilde/nhat)**dab, nmax)
!        endif												!        endif
!        mux = hx*p_alpha*n_in*rho									!        mux = hx*p_alpha*n_in*rho
!        xni = mux*((6700.*nifa)-200.)/((6700.*5.E5)-200.)						!        xni = mux*((6700.*nifa)-200.)/((6700.*5.E5)-200.)
!     elseif (satw.ge.0.985 .and. tempc.gt.HGFR-273.15) then						!     elseif (satw.ge.0.985 .and. tempc.gt.HGFR-273.15) then
         nifa_cc = nifa*RHO_NOT0*1.E-6/rho								         nifa_cc = nifa*RHO_NOT0*1.E-6/rho
!        xni  = 3.*nifa_cc**(1.25)*exp((0.46*(-tempc))-11.6)              !  [DeMott, 2015]		!        xni  = 3.*nifa_cc**(1.25)*exp((0.46*(-tempc))-11.6)              !  [DeMott, 2015]
         xni = (5.94e-5*(-tempc)**3.33)                                 & !  [DeMott, 2010]		         xni = (5.94e-5*(-tempc)**3.33)                                 & !  [DeMott, 2010]
                    * (nifa_cc**((-0.0264*(tempc))+0.0033))						                    * (nifa_cc**((-0.0264*(tempc))+0.0033))
         xni = xni*rho/RHO_NOT0 * 1000.									         xni = xni*rho/RHO_NOT0 * 1000.
!     endif												!     endif

      iceDeMott = MAX(0., xni)										      iceDeMott = MAX(0., xni)

      end FUNCTION iceDeMott										      end FUNCTION iceDeMott

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Newer research since Koop et al (2001) suggests that the freezing					!..Newer research since Koop et al (2001) suggests that the freezing
!.. rate should be lower than original paper, so J_rate is reduced					!.. rate should be lower than original paper, so J_rate is reduced
!.. by two orders of magnitude.										!.. by two orders of magnitude.

      real function iceKoop(temp, qv, qvs, naero, dt)							      real function iceKoop(temp, qv, qvs, naero, dt)
      implicit none											      implicit none

      REAL, INTENT(IN):: temp, qv, qvs, naero, DT							      REAL, INTENT(IN):: temp, qv, qvs, naero, DT
      REAL:: mu_diff, a_w_i, delta_aw, log_J_rate, J_rate, prob_h, satw					      REAL:: mu_diff, a_w_i, delta_aw, log_J_rate, J_rate, prob_h, satw
      REAL:: xni											      REAL:: xni

      xni = 0.0												      xni = 0.0
      satw = qv/qvs											      satw = qv/qvs
      mu_diff    = 210368.0 + (131.438*temp) - (3.32373E6/temp)         &				      mu_diff    = 210368.0 + (131.438*temp) - (3.32373E6/temp)         &
     &           - (41729.1*alog(temp))									     &           - (41729.1*alog(temp))
      a_w_i      = exp(mu_diff/(R_uni*temp))								      a_w_i      = exp(mu_diff/(R_uni*temp))
      delta_aw   = satw - a_w_i										      delta_aw   = satw - a_w_i
      log_J_rate = -906.7 + (8502.0*delta_aw)                           &				      log_J_rate = -906.7 + (8502.0*delta_aw)                           &
     &           - (26924.0*delta_aw*delta_aw)                          &				     &           - (26924.0*delta_aw*delta_aw)                          &
     &           + (29180.0*delta_aw*delta_aw*delta_aw)							     &           + (29180.0*delta_aw*delta_aw*delta_aw)
      log_J_rate = MIN(20.0, log_J_rate)								      log_J_rate = MIN(20.0, log_J_rate)
      J_rate     = 10.**log_J_rate                                       ! cm-3 s-1			      J_rate     = 10.**log_J_rate                                       ! cm-3 s-1
      prob_h     = MIN(1.-exp(-J_rate*ar_volume*DT), 1.)						      prob_h     = MIN(1.-exp(-J_rate*ar_volume*DT), 1.)
      if (prob_h .gt. 0.) then										      if (prob_h .gt. 0.) then
         xni     = MIN(prob_h*naero, 1000.E3)								         xni     = MIN(prob_h*naero, 1000.E3)
      endif												      endif

      iceKoop = MAX(0.0, xni)										      iceKoop = MAX(0.0, xni)

      end FUNCTION iceKoop										      end FUNCTION iceKoop
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere
!!! Special case for WRF-CHIMERE									!!! Special case for WRF-CHIMERE

      real function iceKoop_chm(temp, qv, qvs, naero, dt, sect, nbin)					      real function iceKoop_chm(temp, qv, qvs, naero, dt, sect, nbin)
      implicit none											      implicit none

      INTEGER, INTENT(IN) :: nbin									      INTEGER, INTENT(IN) :: nbin
      REAL, INTENT(IN):: temp, qv, qvs, DT								      REAL, INTENT(IN):: temp, qv, qvs, DT
      REAL, INTENT(IN):: naero(nbin), sect(nbin+1)							      REAL, INTENT(IN):: naero(nbin), sect(nbin+1)
      INTEGER :: i											      INTEGER :: i
      REAL:: mu_diff, a_w_i, delta_aw, log_J_rate, J_rate, prob_h, satw					      REAL:: mu_diff, a_w_i, delta_aw, log_J_rate, J_rate, prob_h, satw
      REAL:: volume,rad,xni										      REAL:: volume,rad,xni

      xni = 0.0												      xni = 0.0
      satw = qv/qvs											      satw = qv/qvs
      mu_diff    = 210368.0 + (131.438*temp) - (3.32373E6/temp) &					      mu_diff    = 210368.0 + (131.438*temp) - (3.32373E6/temp) &
     &           - (41729.1*alog(temp))									     &           - (41729.1*alog(temp))
      a_w_i      = exp(mu_diff/(R_uni*temp))								      a_w_i      = exp(mu_diff/(R_uni*temp))
      delta_aw   = satw - a_w_i										      delta_aw   = satw - a_w_i
      log_J_rate = -906.7 + (8502.0*delta_aw) &								      log_J_rate = -906.7 + (8502.0*delta_aw) &
     &           - (26924.0*delta_aw*delta_aw) &							     &           - (26924.0*delta_aw*delta_aw) &
     &           + (29180.0*delta_aw*delta_aw*delta_aw)							     &           + (29180.0*delta_aw*delta_aw*delta_aw)
      log_J_rate = MIN(20.0, log_J_rate)								      log_J_rate = MIN(20.0, log_J_rate)
      ! FROM 3.8.1											      ! FROM 3.8.1
      !J_rate     = 0.01*(10.**log_J_rate) ! cm-3 s-1							      !J_rate     = 0.01*(10.**log_J_rate) ! cm-3 s-1
      J_rate     = 10.**log_J_rate  !cm-3 s-1								      J_rate     = 10.**log_J_rate  !cm-3 s-1

      xni = 0.0												      xni = 0.0
      do i=1,nbin											      do i=1,nbin
        if(sect(i).ge.0.1) then										        if(sect(i).ge.0.1) then
         rad = (sect(i)+sect(i+1))/4.									         rad = (sect(i)+sect(i+1))/4.
         volume = 4./3.*PI*(rad*1.e-4)**3  ! cm3							         volume = 4./3.*PI*(rad*1.e-4)**3  ! cm3
         prob_h     = MIN(1.-exp(-J_rate*volume*DT), 1.)						         prob_h     = MIN(1.-exp(-J_rate*volume*DT), 1.)
         if (prob_h .gt. 0.) then									         if (prob_h .gt. 0.) then
           xni     = xni+prob_h*naero(i)								           xni     = xni+prob_h*naero(i)
         endif												         endif
        endif												        endif
      enddo												      enddo

      xni = MIN(xni,1000.E3)										      xni = MIN(xni,1000.E3)
      iceKoop_chm = MAX(0.0, xni)									      iceKoop_chm = MAX(0.0, xni)

      end FUNCTION iceKoop_chm										      end FUNCTION iceKoop_chm
#endif													#endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!.. Helper routine for Phillips et al (2008) ice nucleation.  Trude					!.. Helper routine for Phillips et al (2008) ice nucleation.  Trude

      REAL FUNCTION delta_p (yy, y1, y2, aa, bb)							      REAL FUNCTION delta_p (yy, y1, y2, aa, bb)
      IMPLICIT NONE											      IMPLICIT NONE

      REAL, INTENT(IN):: yy, y1, y2, aa, bb								      REAL, INTENT(IN):: yy, y1, y2, aa, bb
      REAL:: dab, A, B, a0, a1, a2, a3									      REAL:: dab, A, B, a0, a1, a2, a3

      A   = 6.*(aa-bb)/((y2-y1)*(y2-y1)*(y2-y1))							      A   = 6.*(aa-bb)/((y2-y1)*(y2-y1)*(y2-y1))
      B   = aa+(A*y1*y1*y1/6.)-(A*y1*y1*y2*0.5)								      B   = aa+(A*y1*y1*y1/6.)-(A*y1*y1*y2*0.5)
      a0  = B												      a0  = B
      a1  = A*y1*y2											      a1  = A*y1*y2
      a2  = -A*(y1+y2)*0.5										      a2  = -A*(y1+y2)*0.5
      a3  = A/3.											      a3  = A/3.

      if (yy.le.y1) then 										      if (yy.le.y1) then 
         dab = aa											         dab = aa
      else if (yy.ge.y2) then										      else if (yy.ge.y2) then
         dab = bb											         dab = bb
      else												      else
         dab = a0+(a1*yy)+(a2*yy*yy)+(a3*yy*yy*yy)							         dab = a0+(a1*yy)+(a2*yy*yy)+(a3*yy*yy*yy)
      endif												      endif

      if (dab.lt.aa) then 										      if (dab.lt.aa) then 
         dab = aa											         dab = aa
      endif												      endif
      if (dab.gt.bb) then 										      if (dab.gt.bb) then 
         dab = bb											         dab = bb
      endif												      endif
      delta_p = dab											      delta_p = dab

      END FUNCTION delta_p 										      END FUNCTION delta_p 

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!ctrlL													!ctrlL

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Compute _radiation_ effective radii of cloud water, ice, and snow.					!..Compute _radiation_ effective radii of cloud water, ice, and snow.
!.. These are entirely consistent with microphysics assumptions, not					!.. These are entirely consistent with microphysics assumptions, not
!.. constant or otherwise ad hoc as is internal to most radiation					!.. constant or otherwise ad hoc as is internal to most radiation
!.. schemes.  Since only the smallest snowflakes should impact						!.. schemes.  Since only the smallest snowflakes should impact
!.. radiation, compute from first portion of complicated Field number					!.. radiation, compute from first portion of complicated Field number
!.. distribution, not the second part, which is the larger sizes.					!.. distribution, not the second part, which is the larger sizes.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d,   &			      subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d,   &
     &                re_qc1d, re_qi1d, re_qs1d, kts, kte)						     &                re_qc1d, re_qi1d, re_qs1d, kts, kte)

      IMPLICIT NONE											      IMPLICIT NONE

!..Sub arguments											!..Sub arguments
      INTEGER, INTENT(IN):: kts, kte									      INTEGER, INTENT(IN):: kts, kte
      REAL, DIMENSION(kts:kte), INTENT(IN)::                            &				      REAL, DIMENSION(kts:kte), INTENT(IN)::                            &
     &                    t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d					     &                    t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d
      REAL, DIMENSION(kts:kte), INTENT(INOUT):: re_qc1d, re_qi1d, re_qs1d				      REAL, DIMENSION(kts:kte), INTENT(INOUT):: re_qc1d, re_qi1d, re_qs1d
!..Local variables											!..Local variables
      INTEGER:: k											      INTEGER:: k
      REAL, DIMENSION(kts:kte):: rho, rc, nc, ri, ni, rs						      REAL, DIMENSION(kts:kte):: rho, rc, nc, ri, ni, rs
      REAL:: smo2, smob, smoc										      REAL:: smo2, smob, smoc
      REAL:: tc0, loga_, a_, b_										      REAL:: tc0, loga_, a_, b_
      DOUBLE PRECISION:: lamc, lami									      DOUBLE PRECISION:: lamc, lami
      LOGICAL:: has_qc, has_qi, has_qs									      LOGICAL:: has_qc, has_qi, has_qs
      INTEGER:: inu_c											      INTEGER:: inu_c
      real, dimension(15), parameter:: g_ratio = (/24,60,120,210,336,   &				      real, dimension(15), parameter:: g_ratio = (/24,60,120,210,336,   &
     &                504,720,990,1320,1716,2184,2730,3360,4080,4896/)					     &                504,720,990,1320,1716,2184,2730,3360,4080,4896/)

      has_qc = .false.											      has_qc = .false.
      has_qi = .false.											      has_qi = .false.
      has_qs = .false.											      has_qs = .false.

      do k = kts, kte											      do k = kts, kte
         rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622))						         rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622))
         rc(k) = MAX(R1, qc1d(k)*rho(k))								         rc(k) = MAX(R1, qc1d(k)*rho(k))
         nc(k) = MAX(R2, nc1d(k)*rho(k))								         nc(k) = MAX(R2, nc1d(k)*rho(k))
         if (.NOT. is_aerosol_aware) nc(k) = Nt_c							         if (.NOT. is_aerosol_aware) nc(k) = Nt_c
         if (rc(k).gt.R1 .and. nc(k).gt.R2) has_qc = .true.						         if (rc(k).gt.R1 .and. nc(k).gt.R2) has_qc = .true.
         ri(k) = MAX(R1, qi1d(k)*rho(k))								         ri(k) = MAX(R1, qi1d(k)*rho(k))
         ni(k) = MAX(R2, ni1d(k)*rho(k))								         ni(k) = MAX(R2, ni1d(k)*rho(k))
         if (ri(k).gt.R1 .and. ni(k).gt.R2) has_qi = .true.						         if (ri(k).gt.R1 .and. ni(k).gt.R2) has_qi = .true.
         rs(k) = MAX(R1, qs1d(k)*rho(k))								         rs(k) = MAX(R1, qs1d(k)*rho(k))
         if (rs(k).gt.R1) has_qs = .true.								         if (rs(k).gt.R1) has_qs = .true.
      enddo												      enddo

      if (has_qc) then											      if (has_qc) then
      do k = kts, kte											      do k = kts, kte
         if (rc(k).le.R1 .or. nc(k).le.R2) CYCLE							         if (rc(k).le.R1 .or. nc(k).le.R2) CYCLE
         if (nc(k).lt.100) then										         if (nc(k).lt.100) then
            inu_c = 15											            inu_c = 15
         elseif (nc(k).gt.1.E10) then									         elseif (nc(k).gt.1.E10) then
            inu_c = 2											            inu_c = 2
         else												         else
            inu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)							            inu_c = MIN(15, NINT(1000.E6/nc(k)) + 2)
         endif												         endif
         lamc = (nc(k)*am_r*g_ratio(inu_c)/rc(k))**obmr							         lamc = (nc(k)*am_r*g_ratio(inu_c)/rc(k))**obmr
         re_qc1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+inu_c)/lamc), 50.E-6))			         re_qc1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+inu_c)/lamc), 50.E-6))
      enddo												      enddo
      endif												      endif

      if (has_qi) then											      if (has_qi) then
      do k = kts, kte											      do k = kts, kte
         if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE							         if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE
         lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi							         lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
         re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6))			         re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6))
      enddo												      enddo
      endif												      endif

      if (has_qs) then											      if (has_qs) then
      do k = kts, kte											      do k = kts, kte
         if (rs(k).le.R1) CYCLE										         if (rs(k).le.R1) CYCLE
         tc0 = MIN(-0.1, t1d(k)-273.15)									         tc0 = MIN(-0.1, t1d(k)-273.15)
         smob = rs(k)*oams										         smob = rs(k)*oams

!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,					!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,
!.. then we must compute actual 2nd moment and use as reference.					!.. then we must compute actual 2nd moment and use as reference.
         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then					         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then
            smo2 = smob											            smo2 = smob
         else												         else
            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &							            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &
     &         + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &							     &         + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &
     &         + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &							     &         + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &
     &         + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &						     &         + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &
     &         + sa(10)*bm_s*bm_s*bm_s									     &         + sa(10)*bm_s*bm_s*bm_s
            a_ = 10.0**loga_										            a_ = 10.0**loga_
            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &							            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &
     &         + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &							     &         + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &
     &         + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &							     &         + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &
     &         + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &						     &         + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &
     &         + sb(10)*bm_s*bm_s*bm_s									     &         + sb(10)*bm_s*bm_s*bm_s
            smo2 = (smob/a_)**(1./b_)									            smo2 = (smob/a_)**(1./b_)
         endif												         endif
!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.						!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &
     &         + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &							     &         + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &
     &         + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &						     &         + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &
     &         + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &						     &         + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &
     &         + sa(10)*cse(1)*cse(1)*cse(1)								     &         + sa(10)*cse(1)*cse(1)*cse(1)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &
     &        + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &							     &        + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &
     &        + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &					     &        + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &
     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)						     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)
         smoc = a_ * smo2**b_										         smoc = a_ * smo2**b_
         re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6))					         re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6))
      enddo												      enddo
      endif												      endif

      end subroutine calc_effectRad									      end subroutine calc_effectRad

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Compute radar reflectivity assuming 10 cm wavelength radar and using					!..Compute radar reflectivity assuming 10 cm wavelength radar and using
!.. Rayleigh approximation.  Only complication is melted snow/graupel					!.. Rayleigh approximation.  Only complication is melted snow/graupel
!.. which we treat as water-coated ice spheres and use Uli Blahak's					!.. which we treat as water-coated ice spheres and use Uli Blahak's
!.. library of routines.  The meltwater fraction is simply the amount					!.. library of routines.  The meltwater fraction is simply the amount
!.. of frozen species remaining from what initially existed at the					!.. of frozen species remaining from what initially existed at the
!.. melting level interface.										!.. melting level interface.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d,     &				      subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d,     &
                          t1d, p1d, dBZ, kts, kte, ii, jj)						                          t1d, p1d, dBZ, kts, kte, ii, jj)

      IMPLICIT NONE											      IMPLICIT NONE

!..Sub arguments											!..Sub arguments
      INTEGER, INTENT(IN):: kts, kte, ii, jj								      INTEGER, INTENT(IN):: kts, kte, ii, jj
      REAL, DIMENSION(kts:kte), INTENT(IN)::                            &				      REAL, DIMENSION(kts:kte), INTENT(IN)::                            &
                          qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, t1d, p1d					                          qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, t1d, p1d
      REAL, DIMENSION(kts:kte), INTENT(INOUT):: dBZ							      REAL, DIMENSION(kts:kte), INTENT(INOUT):: dBZ
!     REAL, DIMENSION(kts:kte), INTENT(INOUT):: vt_dBZ							!     REAL, DIMENSION(kts:kte), INTENT(INOUT):: vt_dBZ

!..Local variables											!..Local variables
      REAL, DIMENSION(kts:kte):: temp, pres, qv, rho, rhof						      REAL, DIMENSION(kts:kte):: temp, pres, qv, rho, rhof
      REAL, DIMENSION(kts:kte):: rc, rr, nr, rs, rg							      REAL, DIMENSION(kts:kte):: rc, rr, nr, rs, rg

      DOUBLE PRECISION, DIMENSION(kts:kte):: ilamr, ilamg, N0_r, N0_g					      DOUBLE PRECISION, DIMENSION(kts:kte):: ilamr, ilamg, N0_r, N0_g
      REAL, DIMENSION(kts:kte):: mvd_r									      REAL, DIMENSION(kts:kte):: mvd_r
      REAL, DIMENSION(kts:kte):: smob, smo2, smoc, smoz							      REAL, DIMENSION(kts:kte):: smob, smo2, smoc, smoz
      REAL:: oM3, M0, Mrat, slam1, slam2, xDs								      REAL:: oM3, M0, Mrat, slam1, slam2, xDs
      REAL:: ils1, ils2, t1_vts, t2_vts, t3_vts, t4_vts							      REAL:: ils1, ils2, t1_vts, t2_vts, t3_vts, t4_vts
      REAL:: vtr_dbz_wt, vts_dbz_wt, vtg_dbz_wt								      REAL:: vtr_dbz_wt, vts_dbz_wt, vtg_dbz_wt

      REAL, DIMENSION(kts:kte):: ze_rain, ze_snow, ze_graupel						      REAL, DIMENSION(kts:kte):: ze_rain, ze_snow, ze_graupel

      DOUBLE PRECISION:: N0_exp, N0_min, lam_exp, lamr, lamg						      DOUBLE PRECISION:: N0_exp, N0_min, lam_exp, lamr, lamg
      REAL:: a_, b_, loga_, tc0										      REAL:: a_, b_, loga_, tc0
      DOUBLE PRECISION:: fmelt_s, fmelt_g								      DOUBLE PRECISION:: fmelt_s, fmelt_g

      INTEGER:: i, k, k_0, kbot, n									      INTEGER:: i, k, k_0, kbot, n
      LOGICAL:: melti											      LOGICAL:: melti
      LOGICAL, DIMENSION(kts:kte):: L_qr, L_qs, L_qg							      LOGICAL, DIMENSION(kts:kte):: L_qr, L_qs, L_qg

      DOUBLE PRECISION:: cback, x, eta, f_d								      DOUBLE PRECISION:: cback, x, eta, f_d
      REAL:: xslw1, ygra1, zans1									      REAL:: xslw1, ygra1, zans1

!+---+													!+---+

      do k = kts, kte											      do k = kts, kte
         dBZ(k) = -35.0											         dBZ(k) = -35.0
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Put column of data into local arrays.								!..Put column of data into local arrays.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         temp(k) = t1d(k)										         temp(k) = t1d(k)
         qv(k) = MAX(1.E-10, qv1d(k))									         qv(k) = MAX(1.E-10, qv1d(k))
         pres(k) = p1d(k)										         pres(k) = p1d(k)
         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))						         rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622))
         rhof(k) = SQRT(RHO_NOT/rho(k))									         rhof(k) = SQRT(RHO_NOT/rho(k))
         rc(k) = MAX(R1, qc1d(k)*rho(k))								         rc(k) = MAX(R1, qc1d(k)*rho(k))
         if (qr1d(k) .gt. R1) then									         if (qr1d(k) .gt. R1) then
            rr(k) = qr1d(k)*rho(k)									            rr(k) = qr1d(k)*rho(k)
            nr(k) = MAX(R2, nr1d(k)*rho(k))								            nr(k) = MAX(R2, nr1d(k)*rho(k))
            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr							            lamr = (am_r*crg(3)*org2*nr(k)/rr(k))**obmr
            ilamr(k) = 1./lamr										            ilamr(k) = 1./lamr
            N0_r(k) = nr(k)*org2*lamr**cre(2)								            N0_r(k) = nr(k)*org2*lamr**cre(2)
            mvd_r(k) = (3.0 + mu_r + 0.672) * ilamr(k)							            mvd_r(k) = (3.0 + mu_r + 0.672) * ilamr(k)
            L_qr(k) = .true.										            L_qr(k) = .true.
         else												         else
            rr(k) = R1											            rr(k) = R1
            nr(k) = R1											            nr(k) = R1
            mvd_r(k) = 50.E-6										            mvd_r(k) = 50.E-6
            L_qr(k) = .false.										            L_qr(k) = .false.
         endif												         endif
         if (qs1d(k) .gt. R2) then									         if (qs1d(k) .gt. R2) then
            rs(k) = qs1d(k)*rho(k)									            rs(k) = qs1d(k)*rho(k)
            L_qs(k) = .true.										            L_qs(k) = .true.
         else												         else
            rs(k) = R1											            rs(k) = R1
            L_qs(k) = .false.										            L_qs(k) = .false.
         endif												         endif
         if (qg1d(k) .gt. R2) then									         if (qg1d(k) .gt. R2) then
            rg(k) = qg1d(k)*rho(k)									            rg(k) = qg1d(k)*rho(k)
            L_qg(k) = .true.										            L_qg(k) = .true.
         else												         else
            rg(k) = R1											            rg(k) = R1
            L_qg(k) = .false.										            L_qg(k) = .false.
         endif												         endif
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope, and useful moments for snow.						!..Calculate y-intercept, slope, and useful moments for snow.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      do k = kts, kte											      do k = kts, kte
         tc0 = MIN(-0.1, temp(k)-273.15)								         tc0 = MIN(-0.1, temp(k)-273.15)
         smob(k) = rs(k)*oams										         smob(k) = rs(k)*oams

!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,					!..All other moments based on reference, 2nd moment.  If bm_s.ne.2,
!.. then we must compute actual 2nd moment and use as reference.					!.. then we must compute actual 2nd moment and use as reference.
         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then					         if (bm_s.gt.(2.0-1.e-3) .and. bm_s.lt.(2.0+1.e-3)) then
            smo2(k) = smob(k)										            smo2(k) = smob(k)
         else												         else
            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &							            loga_ = sa(1) + sa(2)*tc0 + sa(3)*bm_s &
     &         + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &							     &         + sa(4)*tc0*bm_s + sa(5)*tc0*tc0 &
     &         + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &							     &         + sa(6)*bm_s*bm_s + sa(7)*tc0*tc0*bm_s &
     &         + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &						     &         + sa(8)*tc0*bm_s*bm_s + sa(9)*tc0*tc0*tc0 &
     &         + sa(10)*bm_s*bm_s*bm_s									     &         + sa(10)*bm_s*bm_s*bm_s
            a_ = 10.0**loga_										            a_ = 10.0**loga_
            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &							            b_ = sb(1) + sb(2)*tc0 + sb(3)*bm_s &
     &         + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &							     &         + sb(4)*tc0*bm_s + sb(5)*tc0*tc0 &
     &         + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &							     &         + sb(6)*bm_s*bm_s + sb(7)*tc0*tc0*bm_s &
     &         + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &						     &         + sb(8)*tc0*bm_s*bm_s + sb(9)*tc0*tc0*tc0 &
     &         + sb(10)*bm_s*bm_s*bm_s									     &         + sb(10)*bm_s*bm_s*bm_s
            smo2(k) = (smob(k)/a_)**(1./b_)								            smo2(k) = (smob(k)/a_)**(1./b_)
         endif												         endif

!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.						!..Calculate bm_s+1 (th) moment.  Useful for diameter calcs.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(1) &
     &         + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &							     &         + sa(4)*tc0*cse(1) + sa(5)*tc0*tc0 &
     &         + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &						     &         + sa(6)*cse(1)*cse(1) + sa(7)*tc0*tc0*cse(1) &
     &         + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &						     &         + sa(8)*tc0*cse(1)*cse(1) + sa(9)*tc0*tc0*tc0 &
     &         + sa(10)*cse(1)*cse(1)*cse(1)								     &         + sa(10)*cse(1)*cse(1)*cse(1)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(1) + sb(4)*tc0*cse(1) &
     &        + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &							     &        + sb(5)*tc0*tc0 + sb(6)*cse(1)*cse(1) &
     &        + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &					     &        + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) &
     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)						     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1)
         smoc(k) = a_ * smo2(k)**b_									         smoc(k) = a_ * smo2(k)**b_

!..Calculate bm_s*2 (th) moment.  Useful for reflectivity.						!..Calculate bm_s*2 (th) moment.  Useful for reflectivity.
         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(3) &							         loga_ = sa(1) + sa(2)*tc0 + sa(3)*cse(3) &
     &         + sa(4)*tc0*cse(3) + sa(5)*tc0*tc0 &							     &         + sa(4)*tc0*cse(3) + sa(5)*tc0*tc0 &
     &         + sa(6)*cse(3)*cse(3) + sa(7)*tc0*tc0*cse(3) &						     &         + sa(6)*cse(3)*cse(3) + sa(7)*tc0*tc0*cse(3) &
     &         + sa(8)*tc0*cse(3)*cse(3) + sa(9)*tc0*tc0*tc0 &						     &         + sa(8)*tc0*cse(3)*cse(3) + sa(9)*tc0*tc0*tc0 &
     &         + sa(10)*cse(3)*cse(3)*cse(3)								     &         + sa(10)*cse(3)*cse(3)*cse(3)
         a_ = 10.0**loga_										         a_ = 10.0**loga_
         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(3) + sb(4)*tc0*cse(3) &					         b_ = sb(1)+ sb(2)*tc0 + sb(3)*cse(3) + sb(4)*tc0*cse(3) &
     &        + sb(5)*tc0*tc0 + sb(6)*cse(3)*cse(3) &							     &        + sb(5)*tc0*tc0 + sb(6)*cse(3)*cse(3) &
     &        + sb(7)*tc0*tc0*cse(3) + sb(8)*tc0*cse(3)*cse(3) &					     &        + sb(7)*tc0*tc0*cse(3) + sb(8)*tc0*cse(3)*cse(3) &
     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(3)*cse(3)*cse(3)						     &        + sb(9)*tc0*tc0*tc0 + sb(10)*cse(3)*cse(3)*cse(3)
         smoz(k) = a_ * smo2(k)**b_									         smoz(k) = a_ * smo2(k)**b_
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Calculate y-intercept, slope values for graupel.							!..Calculate y-intercept, slope values for graupel.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      N0_min = gonv_max											      N0_min = gonv_max
      k_0 = kts												      k_0 = kts
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)							         if (temp(k).ge.270.65) k_0 = MAX(k_0, k)
      enddo												      enddo
      do k = kte, kts, -1										      do k = kte, kts, -1
         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then					         if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then
            xslw1 = 4.01 + alog10(mvd_r(k))								            xslw1 = 4.01 + alog10(mvd_r(k))
         else												         else
            xslw1 = 0.01										            xslw1 = 0.01
         endif												         endif
         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))							         ygra1 = 4.31 + alog10(max(5.E-5, rg(k)))
         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))		         zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))
         N0_exp = 10.**(zans1)										         N0_exp = 10.**(zans1)
         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))					         N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
         N0_min = MIN(N0_exp, N0_min)									         N0_min = MIN(N0_exp, N0_min)
         N0_exp = N0_min										         N0_exp = N0_min
         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1							         lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg							         lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
         ilamg(k) = 1./lamg										         ilamg(k) = 1./lamg
         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)						         N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Locate K-level of start of melting (k_0 is level above).						!..Locate K-level of start of melting (k_0 is level above).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
      melti = .false.											      melti = .false.
      k_0 = kts												      k_0 = kts
      do k = kte-1, kts, -1										      do k = kte-1, kts, -1
         if ( (temp(k).gt.273.15) .and. L_qr(k)                         &				         if ( (temp(k).gt.273.15) .and. L_qr(k)                         &
     &                            .and. (L_qs(k+1).or.L_qg(k+1)) ) then					     &                            .and. (L_qs(k+1).or.L_qg(k+1)) ) then
            k_0 = MAX(k+1, k_0)										            k_0 = MAX(k+1, k_0)
            melti=.true.										            melti=.true.
            goto 195											            goto 195
         endif												         endif
      enddo												      enddo
 195  continue												 195  continue

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Assume Rayleigh approximation at 10 cm wavelength. Rain (all temps)					!..Assume Rayleigh approximation at 10 cm wavelength. Rain (all temps)
!.. and non-water-coated snow and graupel when below freezing are					!.. and non-water-coated snow and graupel when below freezing are
!.. simple. Integrations of m(D)*m(D)*N(D)*dD.								!.. simple. Integrations of m(D)*m(D)*N(D)*dD.
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      do k = kts, kte											      do k = kts, kte
         ze_rain(k) = 1.e-22										         ze_rain(k) = 1.e-22
         ze_snow(k) = 1.e-22										         ze_snow(k) = 1.e-22
         ze_graupel(k) = 1.e-22										         ze_graupel(k) = 1.e-22
         if (L_qr(k)) ze_rain(k) = N0_r(k)*crg(4)*ilamr(k)**cre(4)					         if (L_qr(k)) ze_rain(k) = N0_r(k)*crg(4)*ilamr(k)**cre(4)
         if (L_qs(k)) ze_snow(k) = (0.176/0.93) * (6.0/PI)*(6.0/PI)     &				         if (L_qs(k)) ze_snow(k) = (0.176/0.93) * (6.0/PI)*(6.0/PI)     &
     &                           * (am_s/900.0)*(am_s/900.0)*smoz(k)					     &                           * (am_s/900.0)*(am_s/900.0)*smoz(k)
         if (L_qg(k)) ze_graupel(k) = (0.176/0.93) * (6.0/PI)*(6.0/PI)  &				         if (L_qg(k)) ze_graupel(k) = (0.176/0.93) * (6.0/PI)*(6.0/PI)  &
     &                              * (am_g/900.0)*(am_g/900.0)         &				     &                              * (am_g/900.0)*(am_g/900.0)         &
     &                              * N0_g(k)*cgg(4)*ilamg(k)**cge(4)					     &                              * N0_g(k)*cgg(4)*ilamg(k)**cge(4)
      enddo												      enddo

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
!..Special case of melting ice (snow/graupel) particles.  Assume the					!..Special case of melting ice (snow/graupel) particles.  Assume the
!.. ice is surrounded by the liquid water.  Fraction of meltwater is					!.. ice is surrounded by the liquid water.  Fraction of meltwater is
!.. extremely simple based on amount found above the melting level.					!.. extremely simple based on amount found above the melting level.
!.. Uses code from Uli Blahak (rayleigh_soak_wetgraupel and supporting					!.. Uses code from Uli Blahak (rayleigh_soak_wetgraupel and supporting
!.. routines).												!.. routines).
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+

      if (.not. iiwarm .and. melti .and. k_0.ge.2) then							      if (.not. iiwarm .and. melti .and. k_0.ge.2) then
       do k = k_0-1, kts, -1										       do k = k_0-1, kts, -1

!..Reflectivity contributed by melting snow								!..Reflectivity contributed by melting snow
          if (L_qs(k) .and. L_qs(k_0) ) then								          if (L_qs(k) .and. L_qs(k_0) ) then
           fmelt_s = MAX(0.05d0, MIN(1.0d0-rs(k)/rs(k_0), 0.99d0))					           fmelt_s = MAX(0.05d0, MIN(1.0d0-rs(k)/rs(k_0), 0.99d0))
           eta = 0.d0											           eta = 0.d0
           oM3 = 1./smoc(k)										           oM3 = 1./smoc(k)
           M0 = (smob(k)*oM3)										           M0 = (smob(k)*oM3)
           Mrat = smob(k)*M0*M0*M0									           Mrat = smob(k)*M0*M0*M0
           slam1 = M0 * Lam0										           slam1 = M0 * Lam0
           slam2 = M0 * Lam1										           slam2 = M0 * Lam1
           do n = 1, nrbins										           do n = 1, nrbins
              x = am_s * xxDs(n)**bm_s									              x = am_s * xxDs(n)**bm_s
              call rayleigh_soak_wetgraupel (x, DBLE(ocms), DBLE(obms), &				              call rayleigh_soak_wetgraupel (x, DBLE(ocms), DBLE(obms), &
     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &				     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &
     &              CBACK, mixingrulestring_s, matrixstring_s,          &				     &              CBACK, mixingrulestring_s, matrixstring_s,          &
     &              inclusionstring_s, hoststring_s,                    &				     &              inclusionstring_s, hoststring_s,                    &
     &              hostmatrixstring_s, hostinclusionstring_s)						     &              hostmatrixstring_s, hostinclusionstring_s)
              f_d = Mrat*(Kap0*DEXP(-slam1*xxDs(n))                     &				              f_d = Mrat*(Kap0*DEXP(-slam1*xxDs(n))                     &
     &              + Kap1*(M0*xxDs(n))**mu_s * DEXP(-slam2*xxDs(n)))					     &              + Kap1*(M0*xxDs(n))**mu_s * DEXP(-slam2*xxDs(n)))
              eta = eta + f_d * CBACK * simpson(n) * xdts(n)						              eta = eta + f_d * CBACK * simpson(n) * xdts(n)
           enddo											           enddo
           ze_snow(k) = SNGL(lamda4 / (pi5 * K_w) * eta)						           ze_snow(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
          endif												          endif

!..Reflectivity contributed by melting graupel								!..Reflectivity contributed by melting graupel

          if (L_qg(k) .and. L_qg(k_0) ) then								          if (L_qg(k) .and. L_qg(k_0) ) then
           fmelt_g = MAX(0.05d0, MIN(1.0d0-rg(k)/rg(k_0), 0.99d0))					           fmelt_g = MAX(0.05d0, MIN(1.0d0-rg(k)/rg(k_0), 0.99d0))
           eta = 0.d0											           eta = 0.d0
           lamg = 1./ilamg(k)										           lamg = 1./ilamg(k)
           do n = 1, nrbins										           do n = 1, nrbins
              x = am_g * xxDg(n)**bm_g									              x = am_g * xxDg(n)**bm_g
              call rayleigh_soak_wetgraupel (x, DBLE(ocmg), DBLE(obmg), &				              call rayleigh_soak_wetgraupel (x, DBLE(ocmg), DBLE(obmg), &
     &              fmelt_g, melt_outside_g, m_w_0, m_i_0, lamda_radar, &				     &              fmelt_g, melt_outside_g, m_w_0, m_i_0, lamda_radar, &
     &              CBACK, mixingrulestring_g, matrixstring_g,          &				     &              CBACK, mixingrulestring_g, matrixstring_g,          &
     &              inclusionstring_g, hoststring_g,                    &				     &              inclusionstring_g, hoststring_g,                    &
     &              hostmatrixstring_g, hostinclusionstring_g)						     &              hostmatrixstring_g, hostinclusionstring_g)
              f_d = N0_g(k)*xxDg(n)**mu_g * DEXP(-lamg*xxDg(n))						              f_d = N0_g(k)*xxDg(n)**mu_g * DEXP(-lamg*xxDg(n))
              eta = eta + f_d * CBACK * simpson(n) * xdtg(n)						              eta = eta + f_d * CBACK * simpson(n) * xdtg(n)
           enddo											           enddo
           ze_graupel(k) = SNGL(lamda4 / (pi5 * K_w) * eta)						           ze_graupel(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
          endif												          endif

       enddo												       enddo
      endif												      endif

      do k = kte, kts, -1										      do k = kte, kts, -1
         dBZ(k) = 10.*log10((ze_rain(k)+ze_snow(k)+ze_graupel(k))*1.d18)				         dBZ(k) = 10.*log10((ze_rain(k)+ze_snow(k)+ze_graupel(k))*1.d18)
      enddo												      enddo


!..Reflectivity-weighted terminal velocity (snow, rain, graupel, mix).					!..Reflectivity-weighted terminal velocity (snow, rain, graupel, mix).
!     do k = kte, kts, -1										!     do k = kte, kts, -1
!        vt_dBZ(k) = 1.E-3										!        vt_dBZ(k) = 1.E-3
!        if (rs(k).gt.R2) then										!        if (rs(k).gt.R2) then
!         Mrat = smob(k) / smoc(k)									!         Mrat = smob(k) / smoc(k)
!         ils1 = 1./(Mrat*Lam0 + fv_s)									!         ils1 = 1./(Mrat*Lam0 + fv_s)
!         ils2 = 1./(Mrat*Lam1 + fv_s)									!         ils2 = 1./(Mrat*Lam1 + fv_s)
!         t1_vts = Kap0*csg(5)*ils1**cse(5)								!         t1_vts = Kap0*csg(5)*ils1**cse(5)
!         t2_vts = Kap1*Mrat**mu_s*csg(11)*ils2**cse(11)						!         t2_vts = Kap1*Mrat**mu_s*csg(11)*ils2**cse(11)
!         ils1 = 1./(Mrat*Lam0)										!         ils1 = 1./(Mrat*Lam0)
!         ils2 = 1./(Mrat*Lam1)										!         ils2 = 1./(Mrat*Lam1)
!         t3_vts = Kap0*csg(6)*ils1**cse(6)								!         t3_vts = Kap0*csg(6)*ils1**cse(6)
!         t4_vts = Kap1*Mrat**mu_s*csg(12)*ils2**cse(12)						!         t4_vts = Kap1*Mrat**mu_s*csg(12)*ils2**cse(12)
!         vts_dbz_wt = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts)					!         vts_dbz_wt = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts)
!         if (temp(k).ge.273.15 .and. temp(k).lt.275.15) then						!         if (temp(k).ge.273.15 .and. temp(k).lt.275.15) then
!            vts_dbz_wt = vts_dbz_wt*1.5								!            vts_dbz_wt = vts_dbz_wt*1.5
!         elseif (temp(k).ge.275.15) then								!         elseif (temp(k).ge.275.15) then
!            vts_dbz_wt = vts_dbz_wt*2.0								!            vts_dbz_wt = vts_dbz_wt*2.0
!         endif												!         endif
!        else												!        else
!         vts_dbz_wt = 1.E-3										!         vts_dbz_wt = 1.E-3
!        endif												!        endif

!        if (rr(k).gt.R1) then										!        if (rr(k).gt.R1) then
!         lamr = 1./ilamr(k)										!         lamr = 1./ilamr(k)
!         vtr_dbz_wt = rhof(k)*av_r*crg(13)*(lamr+fv_r)**(-cre(13))      &				!         vtr_dbz_wt = rhof(k)*av_r*crg(13)*(lamr+fv_r)**(-cre(13))      &
!    &               / (crg(4)*lamr**(-cre(4)))								!    &               / (crg(4)*lamr**(-cre(4)))
!        else												!        else
!         vtr_dbz_wt = 1.E-3										!         vtr_dbz_wt = 1.E-3
!        endif												!        endif

!        if (rg(k).gt.R2) then										!        if (rg(k).gt.R2) then
!         lamg = 1./ilamg(k)										!         lamg = 1./ilamg(k)
!         vtg_dbz_wt = rhof(k)*av_g*cgg(5)*lamg**(-cge(5))               &				!         vtg_dbz_wt = rhof(k)*av_g*cgg(5)*lamg**(-cge(5))               &
!    &               / (cgg(4)*lamg**(-cge(4)))								!    &               / (cgg(4)*lamg**(-cge(4)))
!        else												!        else
!         vtg_dbz_wt = 1.E-3										!         vtg_dbz_wt = 1.E-3
!        endif												!        endif

!        vt_dBZ(k) = (vts_dbz_wt*ze_snow(k) + vtr_dbz_wt*ze_rain(k)      &				!        vt_dBZ(k) = (vts_dbz_wt*ze_snow(k) + vtr_dbz_wt*ze_rain(k)      &
!    &                + vtg_dbz_wt*ze_graupel(k))                        &				!    &                + vtg_dbz_wt*ze_graupel(k))                        &
!    &                / (ze_rain(k)+ze_snow(k)+ze_graupel(k))						!    &                / (ze_rain(k)+ze_snow(k)+ze_graupel(k))
!     enddo												!     enddo

      end subroutine calc_refl10cm									      end subroutine calc_refl10cm
!													!
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
#ifdef cpl_wrf_chimere											#ifdef cpl_wrf_chimere

subroutine drop_activation(n_bin,sect,num_aer,hygros_aer,wmean,sigm,lcldf,temp,pres,frac)		      subroutine drop_activation(n_bin,sect,num_aer,hygros_aer,wmean,sigm,lcldf,temp,pres,frac)

! sse   : Effective critical supersaturation								      ! sse   : Effective critical supersaturation
! ssmax : Maximum supersaturation									      ! ssmax : Maximum supersaturation
! dc    : Critical activation diameter									      ! dc    : Critical activation diameter
! rm    : Central section radius 									      ! rm    : Central section radius 
! sm    : Effective supersaturation									      ! sm    : Effective supersaturation

use module_model_constants, only: g,rhowater,xlv,cp,r_d,r_v						      use module_model_constants, only: g,rhowater,xlv,cp,r_d,r_v

implicit none												      implicit none

integer,intent(in) :: n_bin										      integer,intent(in) :: n_bin
real,intent(in)    :: wmean,sigm,lcldf,temp,pres							      real,intent(in)    :: wmean,sigm,lcldf,temp,pres
real :: hygros_aer											      real :: hygros_aer
real,dimension(n_bin+1),intent(in):: sect								      real,dimension(n_bin+1),intent(in):: sect
real,dimension(n_bin),intent(in)  :: num_aer								      real,dimension(n_bin),intent(in)  :: num_aer
real,dimension(n_bin),intent(out) :: frac								      real,dimension(n_bin),intent(out) :: frac

! Local variables											      ! Local variables
real,parameter :: eps = 0.622	   ! mw/mair								      real,parameter :: eps = 0.622	   ! mw/mair
real,parameter :: surften = 0.076  ! Surface tension of water w/respect to air (N/m)			      real,parameter :: surften = 0.076  ! Surface tension of water w/respect to air (N/m)
real,parameter :: p0 = 1013.25e2   ! Reference pressure (Pa)						      real,parameter :: p0 = 1013.25e2   ! Reference pressure (Pa)
real,parameter :: pi = 4.*atan(1.)									      real,parameter :: pi = 4.*atan(1.)
real,parameter :: log3 = log(3.)									      real,parameter :: log3 = log(3.)
real,parameter :: log2 = log(2.)									      real,parameter :: log2 = log(2.)
real,parameter :: wmaxf = 50.										      real,parameter :: wmaxf = 50.
real,parameter :: min_sigm=1.e-5     !Minimum imposed sigma value to permit a calculation of the   |	      !integer,parameter :: nwmax = 200
                                     ! This value is in m/s and is extremely small : 0.01mm/s 	   |	      integer :: nwmax
integer,parameter :: nwmax = 200								   <
real :: alfa,gamma1,ak,gc,esw, press,diff,conduct, ntot,zeta,eta					      real :: alfa,gamma1,ak,gc,esw, press,diff,conduct, ntot,zeta,eta
real :: sse, ssmax, w,wmax,wold,dw,wmin, gauss_old,gauss_new,sumgauss				   |	      real :: sse, ssmax,w,wmax,wold,dw,dwc,dwmax,dwmin
												   >	      real :: wmin,gauss_old,gauss_new,sumgauss
real :: frac_mean,integ, dc										      real :: frac_mean,integ,dc
real :: sigm_loc                     ! Local value of sigma protected against zero values	   <
real, dimension(n_bin) :: rm, sm, frac_new, frac_old, sumfrac						      real, dimension(n_bin) :: rm, sm, frac_new, frac_old, sumfrac

! Auxiliar variable											      ! Auxiliar variable
integer :: i,j												      integer :: i,j
real :: tmp1, tmp2, logak, loghy, normc									      real :: tmp1, tmp2, logak, loghy, normc
!---------------------------------------------------------						!---------------------------------------------------------
frac = 0.0												      frac = 0.0
ntot = sum(num_aer)
if(ntot.le.1.e-20) return										      ntot = sum(num_aer)
													      if(ntot.le.1.e-20) return
												   )
sigm_loc=max(sigm,min_sigm)									   <
												   <
!!!! DEFINE CONSTANTS											      !!!! DEFINE CONSTANTS

! log of hygroscopicity 										      ! log of hygroscopicity 
hygros_aer=max(hygros_aer,1.e-10)     ! For protection of the log				   |	      hygros_aer=max(hygros_aer,1.e-10)
loghy = log(hygros_aer)											      loghy = log(hygros_aer)

! Gaussian normalization constant									      ! Gaussian normalization constant
normc = sqrt(2.*pi)*sigm_loc									   |	      normc = sqrt(2.*pi)*sigm

! Surface tension term											      ! Surface tension term
ak=2.*surften/(r_v*temp*rhowater)									      ak=2.*surften/(r_v*temp*rhowater)
logak = log(ak)												      logak = log(ak)

! Vapor diffusivity 											      ! Vapor diffusivity 
diff=0.211e-4*(p0/pres)*(temp/t_0)**1.94								      diff=0.211e-4*(p0/pres)*(temp/t_0)**1.94

! Thermal conductivity											      ! Thermal conductivity
conduct=(5.69+0.017*(temp-t_0))*4.186d2*1e-5 ! convert to J/m/s/deg					      conduct=(5.69+0.017*(temp-t_0))*4.186d2*1e-5 ! convert to J/m/s/deg

! Saturation vapour pressure										      ! Saturation vapour pressure
esw = 611.*exp(17.27*(temp-t_0)/(temp-35.86))								      esw = 611.*exp(17.27*(temp-t_0)/(temp-35.86))

! Growth coefficient											      ! Growth coefficient
tmp1 = (rhowater*R_v*temp)/(esw*diff) +(xlv*rhowater)/(conduct*temp)*(xlv/(R_v*temp)-1.0)		      tmp1 = (rhowater*R_v*temp)/(esw*diff) +(xlv*rhowater)/(conduct*temp)*(xlv/(R_v*temp)-1.0)
gc = 1.0/tmp1												      gc = 1.0/tmp1
													    
! Parameterization parameters										      ! Parameterization parameters
alfa = g*(xlv/(cp*R_v*temp**2d0)-1.0/(R_d*temp))						   |	      alfa = g*(xlv/(cp*R_v*temp**2.0)-1.0/(R_d*temp))
gamma1 = press/esw/eps+xlv**2d0/(cp*R_v*temp**2d0)						   |	      gamma1 = press/esw/eps+xlv**2.0/(cp*R_v*temp**2.0)

! Central section radius 										      ! Central section radius 
do i=1,n_bin												      do i=1,n_bin
  rm(i) = (sect(i)+sect(i+1))/2.0									        rm(i) = (sect(i)+sect(i+1))/2.0
enddo													      enddo
rm = rm/2.*1.e-6											      rm = rm/2.*1.e-6

! Particle critical supersaturation at rm								      ! Particle critical supersaturation at rm
sm = 2.0/sqrt(hygros_aer)*(ak/(3.0*rm))**1.5								      sm = 2.0/sqrt(hygros_aer)*(ak/(3.0*rm))**1.5

! Effective critical supersatiration									      ! Effective critical supersatiration
sse = sum(num_aer/(sm**(2./3.)))									      sse = sum(num_aer/(sm**(2./3.)))
sse = (ntot/sse)**1.5											      sse = (ntot/sse)**1.5

												   >	      go to 2404      
												   >	     !!! TEST WITH SINGLE UPDRAFT
												   >	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
												   >	      w = wmean+sigm
												   >	      if(w.le.0.0) return
												   >
												   >	      tmp1 = alfa*w/gc
												   >	      zeta = 2.0/3.0*ak*sqrt(tmp1)
												   >	      if(ntot.gt.1.e-10) then
												   >	        eta = 1./(2.*pi*rhowater*gamma1*ntot)*tmp1**1.5
												   >	        eta = max(eta,1.e-20)
												   >	      else
												   >	        eta = 1.e10
												   >	      endif
												   >
												   >	      ! Supersaturation maximum
												   >	      tmp1 = 0.5*(zeta/eta)**1.5 + (sse*sse/(eta+3.0*zeta))**0.75
												   >	      ssmax = sse/sqrt(tmp1)
												   >
												   >	      ! Critical activation diameter
												   >	      dc = logak-log3-2./3.*(log(ssmax)-log2+0.5*loghy)
												   >	      dc = 2.*exp(dc)*1.e6
												   >	   
												   >	      frac = 0.
												   >	      ! Activated fraction
												   >	      do i=1,n_bin
												   >	        if(dc.le.sect(i)) then
												   >	           frac(i) = 0.99
												   >	        elseif(dc.gt.sect(i+1)) then
												   >	           frac(i) = 0.
												   >	        elseif(dc.gt.sect(i).AND.dc.le.sect(i+1)) then
												   >	           frac(i) = log(sect(i+1)/dc)/log(sect(i+1)/sect(i))
												   >	        endif
												   >	      enddo
												   >
												   >	      return
												   >	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
												   >	       2404 CONTINUE 
												   >
! Set the parameters of the updraft spectrum								      ! Set the parameters of the updraft spectrum
wmax = min(wmaxf,wmean+3.*sigm_loc)								   |	      wmax = min(wmaxf,wmean+3.*sigm)
wmin = max(0.0,wmean-3.*sigm_loc)								   |	      wmin = max(0.0,wmean-3.*sigm)
if(wmax.le.wmin) return    ! May happen if wmean+3.*sigm_loc<0					   <

dw = max(0.01,(wmax-wmin)/float(nwmax-1))							   |	      if(wmax.le.wmin) return
												   >	      !if(wmin.ge.wmean+sigm) return
												   >
												   >	      nwmax = 250
												   >	      dw = wmax/float(nwmax-1)
w = wmin+dw												      w = wmin+dw
wold = wmin												      wold = wmin

! INITIALIZE THE INTEGRAL										      ! INITIALIZE THE INTEGRAL
sumfrac = 0.0												      sumfrac = 0.0
frac_old = 0.0												      frac_old = 0.0

if(wmin.gt.0.0) then											      if(wmin.gt.0.0) then

! Non-dimensional parameters										        ! Non-dimensional parameters
   tmp1 = alfa*wmin/gc											        tmp1 = alfa*wmin/gc
   zeta = 2.0/3.0*ak*sqrt(tmp1)										        zeta = 2.0/3.0*ak*sqrt(tmp1)
   if(ntot.gt.1.e-10) then										        if(ntot.gt.1.e-10) then
      eta = 1./(2.*pi*rhowater*gamma1*ntot)*tmp1**1.5							          eta = 1./(2.*pi*rhowater*gamma1*ntot)*tmp1**1.5
      eta = max(eta,1.e-20)										          eta = max(eta,1.e-20)
   else													        else
      eta = 1.e10											          eta = 1.e10
   endif												        endif

   ! Supersaturation maximum										        ! Supersaturation maximum
   tmp1 = 0.5*(zeta/eta)**1.5 + (sse*sse/(eta+3.0*zeta))**0.75						        tmp1 = 0.5*(zeta/eta)**1.5 + (sse*sse/(eta+3.0*zeta))**0.75
   ssmax = sse/sqrt(tmp1)										        ssmax = sse/sqrt(tmp1)

   ! Critical activation diameter									        ! Critical activation diameter
   dc = logak-log3-2./3.*(log(ssmax)-log2+0.5*loghy)							        dc = logak-log3-2./3.*(log(ssmax)-log2+0.5*loghy)
   dc = 2.*exp(dc)*1.e6											        dc = 2.*exp(dc)*1.e6

   ! Activated fraction											        ! Activated fraction
   do i=1,n_bin												        do i=1,n_bin
      if(dc.le.sect(i)) then										          if(dc.le.sect(i)) then
         frac_old(i) = 1.										             frac_old(i) = 1.
      elseif(dc.gt.sect(i+1)) then									          elseif(dc.gt.sect(i+1)) then
         frac_old(i) = 0.										             frac_old(i) = 0.
      elseif(dc.gt.sect(i).AND.dc.le.sect(i+1)) then							          elseif(dc.gt.sect(i).AND.dc.le.sect(i+1)) then
         frac_old(i) = log(sect(i+1)/dc)/log(sect(i+1)/sect(i))						             frac_old(i) = log(sect(i+1)/dc)/log(sect(i+1)/sect(i))
      endif												          endif
   enddo												        enddo
endif													      endif

gauss_old = (wold-wmean)/sigm_loc								   |	      gauss_old = (wold-wmean)/sigm
gauss_old = exp(-0.5d0*gauss_old*gauss_old)							   |	      gauss_old = exp(-0.5*gauss_old*gauss_old)

!! MAIN LOOP FOR INTEGRAL 										      !! MAIN LOOP FOR INTEGRAL 
sumfrac = 0.0											   <

do i=1,nwmax												      do i=1,nwmax

												   >	      !2222 CONTINUE
												   >
 ! Non-dimensional parameters										      ! Non-dimensional parameters
 tmp1 = alfa*w/gc											      tmp1 = alfa*w/gc
 zeta = 2.0/3.0*ak*sqrt(tmp1)										      zeta = 2.0/3.0*ak*sqrt(tmp1)
 if(ntot.gt.1.e-10) then										      if(ntot.gt.1.e-10) then
  eta = 1./(2.*pi*rhowater*gamma1*ntot)*tmp1**1.5							        eta = 1./(2.*pi*rhowater*gamma1*ntot)*tmp1**1.5
  eta = max(eta,1.e-20)											        eta = max(eta,1.e-20)
 else													      else
  eta = 1.e10												        eta = 1.e10
 endif													      endif

 ! Supersaturation maximum										      ! Supersaturation maximum
 tmp1 = 0.5*(zeta/eta)**1.5 + (sse*sse/(eta+3d0*zeta))**0.75d0					   |	      tmp1 = 0.5*(zeta/eta)**1.5 + (sse*sse/(eta+3.0*zeta))**0.75
 ssmax = sse/sqrt(tmp1)											      ssmax = sse/sqrt(tmp1)

 ! Critical activation diameter										      ! Critical activation diameter
 dc = logak-log3-2./3.*(log(ssmax)-log2+0.5*loghy)							      dc = logak-log3-2./3.*(log(ssmax)-log2+0.5*loghy)
 dc = 2.*exp(dc)*1.e6											      dc = 2.*exp(dc)*1.e6
													      
 ! Activated fraction											      ! Activated fraction
 do j=1,n_bin												      do j=1,n_bin
    if(dc.le.sect(j)) then										       if(dc.le.sect(j)) then
      frac_new(j) = 1.											         frac_new(j) = 1.
    elseif(dc.gt.sect(j+1)) then									       elseif(dc.gt.sect(j+1)) then
      frac_new(j) = 0.											         frac_new(j) = 0.
    elseif(dc.gt.sect(j).AND.dc.le.sect(j+1)) then 							       elseif(dc.gt.sect(j).AND.dc.le.sect(j+1)) then 
      frac_new(j) = log(sect(j+1)/dc)/log(sect(j+1)/sect(j))						         frac_new(j) = log(sect(j+1)/dc)/log(sect(j+1)/sect(j))
    endif												       endif
 enddo													      enddo

 ! Sum up the integral											      ! Sum up the integral
 ! Gauss function											      ! Gauss function
 gauss_new = (w-wmean)/sigm_loc									   |	      gauss_new = (w-wmean)/sigm
 gauss_new = exp(-0.5d0*gauss_new*gauss_new)							   |	      gauss_new = exp(-0.5*gauss_new*gauss_new)
 do j=1,n_bin												      do j=1,n_bin
   sumfrac(j) = sumfrac(j)+0.5*(frac_new(j)*gauss_new+frac_old(j)*gauss_old)*dw				        sumfrac(j) = sumfrac(j)+0.5*(frac_new(j)*gauss_new+frac_old(j)*gauss_old)*dw
 enddo													      enddo
 !sumgauss = sumgauss+0.5*(gauss_new+gauss_old)*dw							      !sumgauss = sumgauss+0.5*(gauss_new+gauss_old)*dw

 ! Initialize the next iteraction								   <
 wold = w												      wold = w
 frac_old = frac_new											      frac_old = frac_new
 gauss_old = gauss_new											      gauss_old = gauss_new

 if(i.gt.1.and.w.gt.wmax) go to 1001									      if(i.gt.1.and.w.gt.wmax) go to 1001
 w = w+dw												      w = w+dw
enddo												   |
												   >	      enddo !! nwmax
												   >
												   >	print *, 'WRFCHIMERE: not enough cyles'
												   >	print *, w,wmax,wmean,sigm

1001 CONTINUE												1001 CONTINUE

! Conservative estimate of the remainder of the integral and normalization			   |	      tmp1 = (w-wmean)/sqrt(2.)/sigm
integ = normc*(erfc_num_recipes((w-wmean)/sqrt(2.)/sigm_loc))					   |	      tmp2 = (wmaxf-wmean)/sqrt(2.)/sigm
												   >	      integ = 0.5*normc*(erfc_num_recipes(tmp1)-erfc_num_recipes(tmp2))
												   >	      !integ = 0.0
												   >	      !integ = 0.5*normc*erfc_num_recipes(tmp1)
												   >	      !print *, w,wmaxf,integ
!sumgauss = sumgauss+integ										      !sumgauss = sumgauss+integ
do i=1,n_bin												      do i=1,n_bin
  sumfrac(i) = sumfrac(i)+frac_new(i)*integ    ! Add the end of the integral			   |	        sumfrac(i) = sumfrac(i)+frac_new(i)*integ
  !frac(i) = sumfrac(i)/sumgauss									        !frac(i) = sumfrac(i)/sumgauss
  frac(i) = sumfrac(i)/normc										        frac(i) = sumfrac(i)/normc
  frac(i) = lcldf*frac(i)									   |	        !frac(i) = lcldf*frac(i)
  frac(i) = min(frac(i),0.99)										        frac(i) = min(frac(i),0.99)
  frac(i) = max(frac(i),0.0)										        frac(i) = max(frac(i),0.0)
enddo													      enddo

return													      return

END SUBROUTINE drop_activation										      END SUBROUTINE drop_activation

!------------------------------------------------------------------------				!------------------------------------------------------------------------

real function erfc_num_recipes( x )									real function erfc_num_recipes( x )
!													!
!   from press et al, numerical recipes, 1990, page 164							!   from press et al, numerical recipes, 1990, page 164
!													!
implicit none												implicit none
real :: x												real :: x
double precision erfc_dbl, dum, t, zz									double precision erfc_dbl, dum, t, zz

zz = abs(x)												zz = abs(x)
t = 1.0/(1.0 + 0.5*zz)											t = 1.0/(1.0 + 0.5*zz)

dum = ( -zz*zz - 1.26551223 + t*(1.00002368 + t*(0.37409196 + t*(0.09678418 + t*(-0.18628806 + t	dum = ( -zz*zz - 1.26551223 + t*(1.00002368 + t*(0.37409196 + t*(0.09678418 + t*(-0.18628806 + t
        			   t*(-1.13520398 +  t*(1.48851587 + t*(-0.82215223 + t*0.170872	        			   t*(-1.13520398 +  t*(1.48851587 + t*(-0.82215223 + t*0.170872

erfc_dbl = t * exp(dum)											erfc_dbl = t * exp(dum)
if (x .lt. 0.0) erfc_dbl = 2.0d0 - erfc_dbl								if (x .lt. 0.0) erfc_dbl = 2.0d0 - erfc_dbl

erfc_num_recipes = erfc_dbl										erfc_num_recipes = erfc_dbl

return													return
end function erfc_num_recipes										end function erfc_num_recipes

#endif													#endif

!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
END MODULE module_mp_thompson										END MODULE module_mp_thompson
!+---+-----------------------------------------------------------------+				!+---+-----------------------------------------------------------------+
>                                                 
>=================================================================================
>  run/namelist.input
>=================================================================================
 &time_control												 &time_control
 run_days                            = 0,								 run_days                            = 0,
 run_hours                           = 12,								 run_hours                           = 12,
 run_minutes                         = 0,								 run_minutes                         = 0,
 run_seconds                         = 0,								 run_seconds                         = 0,
 start_year                          = 2000, 2000, 2000,						 start_year                          = 2000, 2000, 2000,
 start_month                         = 01,   01,   01,							 start_month                         = 01,   01,   01,
 start_day                           = 24,   24,   24,							 start_day                           = 24,   24,   24,
 start_hour                          = 12,   12,   12,							 start_hour                          = 12,   12,   12,
 start_minute                        = 00,   00,   00,							 start_minute                        = 00,   00,   00,
 start_second                        = 00,   00,   00,							 start_second                        = 00,   00,   00,
 end_year                            = 2000, 2000, 2000,						 end_year                            = 2000, 2000, 2000,
 end_month                           = 01,   01,   01,							 end_month                           = 01,   01,   01,
 end_day                             = 25,   25,   25,							 end_day                             = 25,   25,   25,
 end_hour                            = 12,   12,   12,							 end_hour                            = 12,   12,   12,
 end_minute                          = 00,   00,   00,							 end_minute                          = 00,   00,   00,
 end_second                          = 00,   00,   00,							 end_second                          = 00,   00,   00,
 interval_seconds                    = 21600								 interval_seconds                    = 21600
 input_from_file                     = .true.,.true.,.true.,						 input_from_file                     = .true.,.true.,.true.,
 history_interval                    = 180,  60,   60,							 history_interval                    = 180,  60,   60,
 frames_per_outfile                  = 1000, 1000, 1000,						 frames_per_outfile                  = 1000, 1000, 1000,
 restart                             = .false.,								 restart                             = .false.,
 restart_interval                    = 5000,								 restart_interval                    = 5000,
 io_form_history                     = 2								 io_form_history                     = 2
 io_form_restart                     = 2								 io_form_restart                     = 2
 io_form_input                       = 2								 io_form_input                       = 2
 io_form_boundary                    = 2								 io_form_boundary                    = 2
 debug_level                         = 0								 debug_level                         = 0
 /													 /

 &domains												 &domains
 time_step                           = 180,								 time_step                           = 180,
 time_step_fract_num                 = 0,								 time_step_fract_num                 = 0,
 time_step_fract_den                 = 1,								 time_step_fract_den                 = 1,
 max_dom                             = 1,								 max_dom                             = 1,
 e_we                                = 74,    112,   94,						 e_we                                = 74,    112,   94,
 e_sn                                = 61,    97,    91,						 e_sn                                = 61,    97,    91,
 e_vert                              = 30,    30,    30,						 e_vert                              = 30,    30,    30,
 p_top_requested                     = 5000,								 p_top_requested                     = 5000,
 num_metgrid_levels                  = 27,								 num_metgrid_levels                  = 27,
 num_metgrid_soil_levels             = 4,								 num_metgrid_soil_levels             = 4,
 dx                                  = 30000, 10000,  3333.33,						 dx                                  = 30000, 10000,  3333.33,
 dy                                  = 30000, 10000,  3333.33,						 dy                                  = 30000, 10000,  3333.33,
 grid_id                             = 1,     2,     3,							 grid_id                             = 1,     2,     3,
 parent_id                           = 0,     1,     2,							 parent_id                           = 0,     1,     2,
 i_parent_start                      = 1,     31,    30,						 i_parent_start                      = 1,     31,    30,
 j_parent_start                      = 1,     17,    30,						 j_parent_start                      = 1,     17,    30,
 parent_grid_ratio                   = 1,     3,     3,							 parent_grid_ratio                   = 1,     3,     3,
 parent_time_step_ratio              = 1,     3,     3,							 parent_time_step_ratio              = 1,     3,     3,
 feedback                            = 1,								 feedback                            = 1,
 smooth_option                       = 0								 smooth_option                       = 0
 /													 /

 &physics												 &physics
 physics_suite                       = 'CONUS'							   |	 mp_physics                          = 3,     3,     3,
												   >	 ra_lw_physics                       = 1,     1,     1,
												   >	 ra_sw_physics                       = 1,     1,     1,
 radt                                = 30,    30,    30,						 radt                                = 30,    30,    30,
												   >	 sf_sfclay_physics                   = 1,     1,     1,
												   >	 sf_surface_physics                  = 2,     2,     2,
												   >	 bl_pbl_physics                      = 1,     1,     1,
 bldt                                = 0,     0,     0,							 bldt                                = 0,     0,     0,
												   >	 cu_physics                          = 1,     1,     0,
 cudt                                = 5,     5,     5,							 cudt                                = 5,     5,     5,
												   >	 isfflx                              = 1,
												   >	 ifsnow                              = 1,
 icloud                              = 1,								 icloud                              = 1,
												   >	 surface_input_source                = 1,
 num_soil_layers                     = 4,								 num_soil_layers                     = 4,
 num_land_cat                        = 21,							   <
 sf_urban_physics                    = 0,     0,     0,							 sf_urban_physics                    = 0,     0,     0,
 /													 /

 &fdda													 &fdda
 /													 /

 &dynamics												 &dynamics
 w_damping                           = 0,								 w_damping                           = 0,
 diff_opt                            = 1,      1,      1,						 diff_opt                            = 1,      1,      1,
 km_opt                              = 4,      4,      4,						 km_opt                              = 4,      4,      4,
 diff_6th_opt                        = 0,      0,      0,						 diff_6th_opt                        = 0,      0,      0,
 diff_6th_factor                     = 0.12,   0.12,   0.12,						 diff_6th_factor                     = 0.12,   0.12,   0.12,
 base_temp                           = 290.								 base_temp                           = 290.
 damp_opt                            = 0,								 damp_opt                            = 0,
 zdamp                               = 5000.,  5000.,  5000.,						 zdamp                               = 5000.,  5000.,  5000.,
 dampcoef                            = 0.2,    0.2,    0.2						 dampcoef                            = 0.2,    0.2,    0.2
 khdif                               = 0,      0,      0,						 khdif                               = 0,      0,      0,
 kvdif                               = 0,      0,      0,						 kvdif                               = 0,      0,      0,
 non_hydrostatic                     = .true., .true., .true.,						 non_hydrostatic                     = .true., .true., .true.,
 moist_adv_opt                       = 1,      1,      1,     						 moist_adv_opt                       = 1,      1,      1,     
 scalar_adv_opt                      = 1,      1,      1,     						 scalar_adv_opt                      = 1,      1,      1,     
 gwd_opt                             = 1,							   <
 /													 /

 &bdy_control												 &bdy_control
 spec_bdy_width                      = 5,								 spec_bdy_width                      = 5,
 spec_zone                           = 1,								 spec_zone                           = 1,
 relax_zone                          = 4,								 relax_zone                          = 4,
 specified                           = .true., .false.,.false.,						 specified                           = .true., .false.,.false.,
 nested                              = .false., .true., .true.,						 nested                              = .false., .true., .true.,
 /													 /

 &grib2													 &grib2
 /													 /

 &namelist_quilt											 &namelist_quilt
 nio_tasks_per_group = 0,										 nio_tasks_per_group = 0,
 nio_groups = 1,											 nio_groups = 1,
 /													 /
