@@ -667,17 +667,16 @@ subroutine define_cam_grids()
667
667
! The native HOMME GLL grid
668
668
call cam_grid_register(trim (gridname), dyn_decomp, lat_coord, lon_coord, &
669
669
grid_map_d,block_indexed= .false. , unstruct= .true. )
670
- if (.not. single_column .or. scm_multcols) then
671
- call cam_grid_attribute_register(trim (gridname), trim (areaname), &
672
- ' gll grid areas' , trim (ncolname), pearea, pemap)
673
- else
674
- ! If single column model, set pearea_scm(1) to be the area.
675
- ! Then register attribute in same way as non-SCM to simplify.
670
+ if (single_column .or. scm_multcols) then
671
+ ! If single column model, set pearea_scm(1) to be the area as 1 value to simplify
676
672
allocate (pearea_scm(1 ))
677
673
pearea_scm(1 ) = 1.0_r8 / elem(1 )% rspheremp(1 ,1 )
678
674
call cam_grid_attribute_register(trim (gridname), trim (areaname), &
679
- ' gll grid areas' , trim (ncolname), pearea_scm, pemap)
680
- nullify(pearea_scm)
675
+ ' gll grid areas' , trim (ncolname), pearea_scm)
676
+ else
677
+ call cam_grid_attribute_register(trim (gridname), trim (areaname), &
678
+ ' gll grid areas' , trim (ncolname), pearea, pemap)
679
+
681
680
end if ! .not. single_column
682
681
683
682
call cam_grid_attribute_register(trim (gridname), ' np' , ' ' , np)
@@ -692,6 +691,9 @@ subroutine define_cam_grids()
692
691
nullify(grid_map_d)
693
692
nullify(pearea)
694
693
nullify(pemap)
694
+ if (single_column .or. scm_multcols) then
695
+ nullify(pearea_scm)
696
+ endif
695
697
696
698
!- --------------------------------------------------------------------------
697
699
! Create grid object for physics grid on the dynamics decomposition
0 commit comments