!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
***s/r prgemnml
#include <model_macros_f.h>

      subroutine prgemnml(),7
      implicit none
*
*author V.Lee - October 20,2008
*
*object
*
*----------------------------------------------------------------------

      open (6,file="gemdict.nml",access='SEQUENTIAL',form='FORMATTED')
      call nml_ptopo()
      call nml_grid()
      call nml_gem()
      call nml_gement()
      call nml_theo()
      call nml_var4d()
      call nml_cpl()
      close(6)
     
      return
*      
*-------------------------------------------------------------------
      end
*

      subroutine nml_ptopo() 1
      implicit none
#include "ptopo.cdk"
      write (6  ,nml=ptopo)
      return
      end
*

      subroutine nml_grid() 1
      implicit none
#include "grd.cdk"
      write (6  ,nml=grid)
      return
      end
*

      subroutine nml_gem() 1
      implicit none
#include "nml.cdk"
      write (6  ,nml=gem_cfgs)
      write (6  ,nml=grdc)
      return
      end
*

      subroutine nml_gement() 1
      implicit none
#include "e_nml.cdk"
      write (6  ,nml=gement)
      return
      end
*

      subroutine nml_theo() 1
      implicit none
#include "ptopo.cdk"
#include "theonml.cdk"
      write (6  ,nml=theo_cfgs)
      write (6  ,nml=bubble_cfgs)
      write (6  ,nml=mtn_cfgs)
      return
      end
*

      subroutine nml_var4d() 1,1
      use v4dz, only: V4dz_degree,V4dzge_degree,V4dzga_degree
      implicit none
#include "lun.cdk"
#include "step.cdk"
#include "path.cdk"
#include "tr3d.cdk"
#include "v4dg.cdk"
#include "v4dj.cdk"
#include "v4dm.cdk"
#include "v4dr.cdk"
#include "v4dg_bc.cdk"
#include "v4d_nml.cdk"
      write (6  ,nml=var4d)
      return
      end
*

      subroutine nml_cpl() 1
      implicit none
#include "itf_cpl.cdk"
      namelist /coupling/ CPL_NAME
      write(6  ,nml=coupling)
      return
      end