writenamelists Subroutine

public subroutine writenamelists()

Arguments

None

Called by

proc~~writenamelists~~CalledByGraph proc~writenamelists writenamelists proc~tests_roundtrip tests_roundtrip proc~tests_roundtrip->proc~writenamelists proc~execute_early_runmode_actions execute_early_runmode_actions proc~execute_early_runmode_actions->proc~tests_roundtrip program~udales uDALES program~udales->proc~execute_early_runmode_actions

Source Code

   subroutine writenamelists
      !-----------------------------------------------------------------|
      !     Write all namelists to file to verify broadcast worked     |
      !-----------------------------------------------------------------|
      
      implicit none
      integer :: iunit = 99
      character(len=100) :: filename
      
      ! Create filename with process ID for debugging
      write(filename,'(a)') 'namoptions_roundtrip'
      write(*,*) '  Writing all namelists to file: ', trim(filename)
      
      open(unit=iunit, file=filename, status='replace', action='write')
      
      ! Write each namelist section using Fortran's built-in namelist write
      write(iunit, nml=RUN)
      write(iunit, nml=DOMAIN) 
      write(iunit, nml=PHYSICS)
      write(iunit, nml=DYNAMICS)
      write(iunit, nml=BC)
      write(iunit, nml=INLET)
      write(iunit, nml=DRIVER)
      write(iunit, nml=WALLS)
      write(iunit, nml=ENERGYBALANCE)
      write(iunit, nml=SCALARS)
      write(iunit, nml=CHEMISTRY)
      write(iunit, nml=OUTPUT)
      write(iunit, nml=TREES)
      write(iunit, nml=PURIFS)
      write(iunit, nml=HEATPUMP)
      write(iunit, nml=NAMSUBGRID)
      close(iunit)   
     end subroutine writenamelists