Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WPS/metgrid/src/process_domain_module.F90
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WPS/metgrid/src/process_domain_module.F90	(revision 1865)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WPS/metgrid/src/process_domain_module.F90	(revision 1866)
@@ -42,5 +42,15 @@
       character (len=19) :: valid_date, temp_date
       character (len=128) :: cname, stagger, cunits, cdesc, title
-      character (len=128), pointer, dimension(:) :: output_flags, td_output_flags
+      character (len=128), allocatable, dimension(:) :: output_flags, td_output_flags
+
+
+      ! CWH Initialize local pointer variables
+      nullify(landmask)
+      nullify(xlat)
+      nullify(xlon)
+      nullify(xlat_u)
+      nullify(xlon_u)
+      nullify(xlat_v)
+      nullify(xlon_v)
 
       ! Compute number of times that we will process
@@ -101,4 +111,6 @@
       ! Begin time-dependent processing
       !
+
+      allocate(td_output_flags(num_entries))
    
       ! Loop over all times to be processed for this domain
@@ -124,5 +136,4 @@
          call mprintf(.true.,LOGFILE, 'Preparing to process output time %s', s1=temp_date)
    
-         allocate(td_output_flags(num_entries))
          do i=1,num_entries
             td_output_flags(i) = output_flags(i)
@@ -143,7 +154,9 @@
                              truelat2, parent_grid_ratio, corner_lats, corner_lons, td_output_flags)
 
-         deallocate(td_output_flags)
    
       end do  ! Loop over n_times
+
+
+      deallocate(td_output_flags)
 
       deallocate(output_flags)
@@ -547,5 +560,6 @@
       logical, intent(in) :: extra_row, extra_col
       character (len=19), intent(in) :: temp_date
-      character (len=128), pointer, dimension(:) :: output_flags
+
+      character (len=128), dimension(:) :: output_flags
 
 ! BUG: Move this constant to misc_definitions_module?
@@ -578,4 +592,14 @@
       character (len=128), dimension(3) :: dimnames
       type (fg_input) :: field, u_field, v_field
+
+
+      ! CWH Initialize local pointer variables
+      
+      nullify(u_levels)
+      nullify(v_levels)
+      nullify(slab)
+      nullify(halo_slab)
+      nullify(real_array)
+      nullify(got_this_field)
 
       allocate(got_this_field(num_entries))
@@ -1285,8 +1309,16 @@
       integer :: i, j, idx, idxt, orig_selected_proj, interp_mask_status, &
                  interp_land_mask_status, interp_water_mask_status
-      integer, pointer, dimension(:) :: interp_array
+      integer, pointer, dimension(:) :: interp_array, interp_opts
       real :: rx, ry, temp
       real, pointer, dimension(:,:) :: data_count
       type (fg_input) :: mask_field, mask_water_field, mask_land_field
+
+
+
+
+      ! CWH Initialize local pointer variables
+      nullify(interp_array)
+      nullify(interp_opts)
+      nullify(data_count)
 
       ! Find index into fieldname, interp_method, masked, and fill_missing
@@ -1631,5 +1663,9 @@
       type (fg_input), pointer, dimension(:) :: headers
       type (list) :: temp_levels
-   
+
+      !CWH Initialize local pointer variables
+      nullify(field_levels)
+      nullify(headers)
+
       ! Initialize a list to store levels that are found for 3-d fields 
       call list_init(temp_levels)
@@ -1708,5 +1744,13 @@
       type (list) :: temp_levels
       type (list_item), pointer, dimension(:) :: keys
-   
+
+      ! CWH Initialize local pointer variables
+      nullify(union_levels)
+      nullify(field_levels)
+      nullify(r_union_levels)
+      nullify(headers)
+      nullify(all_headers)
+      nullify(keys)
+
       ! Initialize a list to store levels that are found for 3-d fields 
       call list_init(temp_levels)
@@ -1992,4 +2036,8 @@
       character (len=128) :: asrcname
       logical :: filled_all_lev
+
+      !CWH Initialize local pointer variables
+      nullify(all_list)
+      nullify(keys)
 
       filled_all_lev = .false.
