[Dart-dev] [5873] DART/branches/development/models/mpas_ocn: removed unused variables identified by gfortran

nancy at ucar.edu nancy at ucar.edu
Wed Sep 19 13:48:20 MDT 2012


Revision: 5873
Author:   thoar
Date:     2012-09-19 13:48:19 -0600 (Wed, 19 Sep 2012)
Log Message:
-----------
removed unused variables identified by gfortran

Modified Paths:
--------------
    DART/branches/development/models/mpas_ocn/dart_to_model.f90
    DART/branches/development/models/mpas_ocn/model_mod.f90
    DART/branches/development/models/mpas_ocn/model_to_dart.f90

-------------- next part --------------
Modified: DART/branches/development/models/mpas_ocn/dart_to_model.f90
===================================================================
--- DART/branches/development/models/mpas_ocn/dart_to_model.f90	2012-09-19 17:45:23 UTC (rev 5872)
+++ DART/branches/development/models/mpas_ocn/dart_to_model.f90	2012-09-19 19:48:19 UTC (rev 5873)
@@ -59,17 +59,14 @@
 
 !----------------------------------------------------------------------
 
-integer               :: iunit, io, x_size, diff1, diff2
-type(time_type)       :: model_time, adv_to_time, base_time
+integer               :: iunit, io, x_size
+type(time_type)       :: model_time, adv_to_time
 real(r8), allocatable :: statevector(:)
-logical               :: verbose              = .FALSE.
 character(len=256)    :: model_analysis_filename
 
 !----------------------------------------------------------------------
 
 call initialize_utilities(progname='dart_to_model')
-! if verbose is false, E_MSG won't get printed.  i'm not sure we want that.
-!call initialize_utilities(progname='dart_to_model', output_flag=verbose)
 
 ! Read the namelist to get the input filename. 
 

Modified: DART/branches/development/models/mpas_ocn/model_mod.f90
===================================================================
--- DART/branches/development/models/mpas_ocn/model_mod.f90	2012-09-19 17:45:23 UTC (rev 5872)
+++ DART/branches/development/models/mpas_ocn/model_mod.f90	2012-09-19 19:48:19 UTC (rev 5873)
@@ -199,7 +199,6 @@
 integer :: nVertLevels   = -1  ! Vertical levels; count of vert cell centers
 integer :: nVertLevelsP1 = -1  ! Vert levels plus 1; count of vert cell faces
 integer :: vertexDegree  = -1  ! Max number of cells/edges that touch any vertex
-integer :: nSoilLevels   = -1  ! Number of soil layers
 
 ! scalar grid positions
 
@@ -384,7 +383,7 @@
 ! 3) read them from the analysis file
 
 ! read_grid_dims() fills in the following module global variables:
-!  nCells, nVertices, nEdges, maxEdges, nVertLevels, nVertLevelsP1, vertexDegree, nSoilLevels
+!  nCells, nVertices, nEdges, maxEdges, nVertLevels, nVertLevelsP1, vertexDegree
 call read_grid_dims()
 
 allocate(latCell(nCells), lonCell(nCells)) 
@@ -535,8 +534,6 @@
             progvar(ivar)%numedges = dimlen
          case ('nVertL')  ! nVertLevels, nVertLevelsP1, nVertLevelsP2
             progvar(ivar)%numvertical = dimlen
-         case ('nSoilL')  ! nSoilLevels
-            progvar(ivar)%numvertical = dimlen
       end select
 
    enddo DimensionLoop
@@ -855,7 +852,7 @@
 ! Local storage
 
 real(r8) :: loc_array(3), llon, llat, lheight, fract, v_interp
-integer  :: i, j, ivar, ier, lower, upper, this_kind
+integer  :: i, j, ivar, ier, lower, upper
 integer  :: pt_base_offset, density_base_offset, qv_base_offset
 
 real(r8) :: weights(3), lower_interp, upper_interp, ltemp, utemp
@@ -1178,7 +1175,6 @@
 integer :: nEdgesDimID, maxEdgesDimID
 integer :: nVerticesDimID
 integer :: VertexDegreeDimID
-integer :: nSoilLevelsDimID
 integer :: nVertLevelsDimID
 integer :: nVertLevelsP1DimID
 
@@ -1327,10 +1323,6 @@
           len = nVertLevelsP1, dimid = NVertLevelsP1DimID),'nc_write_model_atts', &
                                       'nVertLevelsP1 def_dim '//trim(filename))
 
-   call nc_check(nf90_def_dim(ncid=ncFileID, name='nSoilLevels', &
-          len = nSoilLevels, dimid = nSoilLevelsDimID),'nc_write_model_atts', &
-               'nSoilLevels def_dim '//trim(filename))
-
    !----------------------------------------------------------------------------
    ! Create the (empty) Coordinate Variables and the Attributes
    !----------------------------------------------------------------------------
@@ -2313,18 +2305,12 @@
 integer :: i, ivar
 real(r8), allocatable, dimension(:)         :: data_1d_array
 real(r8), allocatable, dimension(:,:)       :: data_2d_array
-real(r8), allocatable, dimension(:,:)       :: data_2d_array2
 real(r8), allocatable, dimension(:,:,:)     :: data_3d_array
 
-! temp space to hold horizontal winds
-real(r8), allocatable :: u(:,:), ucell_incr(:,:), vcell_incr(:,:)
-
 integer, dimension(NF90_MAX_VAR_DIMS) :: dimIDs, mystart, mycount
 character(len=NF90_MAX_NAME) :: varname
 integer :: VarID, ncNdims, dimlen
-integer :: zonal, meridional
 integer :: ncFileID, TimeDimID, TimeDimLength
-logical :: both
 type(time_type) :: model_time
 
 if ( .not. module_initialized ) call static_init_model
@@ -2649,7 +2635,6 @@
 Edges      = nEdges
 VertLevels = nVertLevels
 VertexDeg  = vertexDegree
-SoilLevels = nSoilLevels
 
 end subroutine get_grid_dims
 
@@ -2810,13 +2795,6 @@
 call nc_check(nf90_inquire_dimension(grid_id, dimid, len=vertexDegree), &
             'read_grid_dims','inquire_dimension vertexDegree '//trim(grid_definition_filename))
 
-! nSoilLevels : get dimid for 'nSoilLevels' and then get value
-
-call nc_check(nf90_inq_dimid(grid_id, 'nSoilLevels', dimid), &
-              'read_grid_dims','inq_dimid nSoilLevels '//trim(grid_definition_filename))
-call nc_check(nf90_inquire_dimension(grid_id, dimid, len=nSoilLevels), &
-            'read_grid_dims','inquire_dimension nSoilLevels '//trim(grid_definition_filename))
-
 ! tidy up
 
 call nc_check(nf90_close(grid_id), &
@@ -2831,7 +2809,6 @@
    write(*,*)'read_grid_dims: nVertLevels   is ', nVertLevels
    write(*,*)'read_grid_dims: nVertLevelsP1 is ', nVertLevelsP1
    write(*,*)'read_grid_dims: vertexDegree  is ', vertexDegree
-   write(*,*)'read_grid_dims: nSoilLevels   is ', nSoilLevels
 endif
 
 end subroutine read_grid_dims
@@ -3039,9 +3016,8 @@
 
 integer, dimension(NF90_MAX_VAR_DIMS) :: dimIDs, mystart, mycount
 character(len=NF90_MAX_NAME) :: dimname 
-integer :: VarID, numdims, dimlen, ntimes, i
+integer :: VarID, numdims, dimlen, i
 integer :: zonal, meridional
-logical :: both
 logical :: already_updated = .false.
 
 if ( .not. module_initialized ) call static_init_model
@@ -3544,8 +3520,6 @@
             ! supported - do nothing
          case ('nVertLevelsP1')
             ! supported - do nothing
-         case ('nSoilLevels')
-            ! supported - do nothing
          case default
             write(string2,'(''unsupported dimension '',a,'' in '',a)') trim(dimname),trim(string1)
             call error_handler(E_MSG,'verify_state_variables',string2,source,revision,revdate)
@@ -4408,7 +4382,7 @@
 real(r8), intent(out) :: pressure
 integer,  intent(out) :: ier
 
-integer  :: i, offset
+integer  :: offset
 real(r8) :: pt, density, qv, tk
 
 
@@ -4963,10 +4937,10 @@
 ! using barycentric weights to get the value at the interpolation point.
 
 integer, parameter :: listsize = 30 
-integer  :: nedges, edgelist(listsize), i, j, neighborcells(maxEdges), edgeid, nvert
+integer  :: nedges, i, neighborcells(maxEdges), edgeid, nvert
 real(r8) :: xdata(listsize), ydata(listsize), zdata(listsize)
 real(r8) :: t1(3), t2(3), t3(3), r(3), fdata(3), weights(3)
-integer  :: vertindex, index1, progindex, cellid, verts(listsize), closest_vert
+integer  :: index1, cellid, verts(listsize), closest_vert
 real(r8) :: lat, lon, vert, tmp(3), fract, lowval(3), uppval(3), p(3)
 integer  :: verttype, lower, upper, c(3), vindex, v, vp1
 logical  :: inside, foundit
@@ -5117,7 +5091,7 @@
 real(r8) :: ureconstructzonal, ureconstructmeridional
 real(r8) :: datatangentplane(3,2)
 real(r8) :: coeffs_reconstruct(3,listsize)
-integer  :: vertindex, index1, progindex, cellid
+integer  :: index1, progindex, cellid
 real(r8) :: lat, lon, vert, tmp(3), fract, lowval, uppval
 integer  :: verttype, lower, upper
 
@@ -5490,7 +5464,6 @@
 ! otherwise return yes.
 
 integer :: nedges, i, edgeid, vert
-real(r8) :: v1(3), v2(3), p(3), vec1(3), vec2(3), r(3), m
 
 ! if we're on a global grid, skip all this code
 if (global_grid) then
@@ -5623,8 +5596,7 @@
 real(r8), intent(in)  :: lat, lon
 integer               :: closest_vertex_ll
 
-integer :: nverts, i, closest, vertexid
-real(r8) :: distsq, closest_dist, x, y, z, px, py, pz
+real(r8) :: px, py, pz
 
 ! use the same radius as MPAS for computing this
 call latlon_to_xyz(lat, lon, px, py, pz)
@@ -5647,8 +5619,8 @@
 real(r8), intent(in)  :: px, py, pz
 integer               :: closest_vertex_xyz
 
-integer :: nverts, i, closest, vertexid
-real(r8) :: distsq, closest_dist, x, y, z, dx, dy, dz
+integer :: nverts, i, vertexid
+real(r8) :: distsq, closest_dist, dx, dy, dz
 
 ! nedges and nverts is same in a closed figure
 !print *, 'cellid = ', cellid
@@ -5824,9 +5796,7 @@
 
 real(r8) :: m(3,3), v(3) ! intermediates to compute intersection
 real(r8) :: mi(3,3)      ! invert of m
-integer  :: i
 
-
 m(1,1) = -s(1)
 m(1,2) = t1(1) - t0(1)
 m(1,3) = t2(1) - t0(1)

Modified: DART/branches/development/models/mpas_ocn/model_to_dart.f90
===================================================================
--- DART/branches/development/models/mpas_ocn/model_to_dart.f90	2012-09-19 17:45:23 UTC (rev 5872)
+++ DART/branches/development/models/mpas_ocn/model_to_dart.f90	2012-09-19 19:48:19 UTC (rev 5873)
@@ -54,7 +54,6 @@
 ! global storage
 !----------------------------------------------------------------------
 
-logical               :: verbose = .TRUE.
 integer               :: io, iunit, x_size
 type(time_type)       :: model_time
 real(r8), allocatable :: statevector(:)
@@ -63,8 +62,6 @@
 !======================================================================
 
 call initialize_utilities(progname='model_to_dart')
-! if verbose is false, E_MSG won't get printed.  i'm not sure we want that.
-!call initialize_utilities(progname='model_to_dart', output_flag=verbose)
 
 !----------------------------------------------------------------------
 ! Read the namelist to get the output filename.


More information about the Dart-dev mailing list