<p><b>mpetersen@lanl.gov</b> 2012-10-17 08:57:04 -0600 (Wed, 17 Oct 2012)</p><p>branch commit, basin_pbc_mrp: Add namelist reading to basin.F and namelists for global realistic and overflow.<br>
</p><hr noshade><pre><font color="gray">Added: branches/ocean_projects/basin_pbc_mrp/namelist.basin
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/namelist.basin                                (rev 0)
+++ branches/ocean_projects/basin_pbc_mrp/namelist.basin        2012-10-17 14:57:04 UTC (rev 2216)
@@ -0,0 +1 @@
+link namelists/namelist.Ilicak2_overflow_sigma
\ No newline at end of file


Property changes on: branches/ocean_projects/basin_pbc_mrp/namelist.basin
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow                                (rev 0)
+++ branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow        2012-10-17 14:57:04 UTC (rev 2216)
@@ -0,0 +1,22 @@
+&amp;basin
+  nVertLevelsMOD = 10
+  on_a_sphere = 'NO'
+  sphere_radius = 0.0
+  zLevel_thickness = 'equally_spaced'
+  bottom_topography = 'Ilicak2_overflow'
+  initial_conditions = 'Ilicak2_overflow'
+  eliminate_inland_seas=.false.
+  l_woce = .false.
+  write_OpenDX_flag = .false.
+  monthly_forcing = .false.
+  cut_domain_from_sphere = .false.
+  solid_boundary_in_y = .true.
+  solid_boundary_in_x = .false.
+  top_layers_without_land = 3
+  h_total_max = 2000.0 
+  u_src_max = 0.0
+  f0 = 0.0  
+  beta = 0.0
+  omega = 0.0
+  Lx = 3.0e3
+/

Added: branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow_sigma
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow_sigma                                (rev 0)
+++ branches/ocean_projects/basin_pbc_mrp/namelists/namelist.Ilicak2_overflow_sigma        2012-10-17 14:57:04 UTC (rev 2216)
@@ -0,0 +1,22 @@
+&amp;basin
+  nVertLevelsMOD = 10
+  on_a_sphere = 'NO'
+  sphere_radius = 0.0
+  zLevel_thickness = 'zero'
+  bottom_topography = 'Ilicak2_overflow'
+  initial_conditions = 'Ilicak2_overflow_sigma'
+  eliminate_inland_seas=.false.
+  l_woce = .false.
+  write_OpenDX_flag = .false.
+  monthly_forcing = .false.
+  cut_domain_from_sphere = .false.
+  solid_boundary_in_y = .true.
+  solid_boundary_in_x = .false.
+  top_layers_without_land = 3
+  h_total_max = 2000.0 
+  u_src_max = 0.0
+  f0 = 0.0  
+  beta = 0.0
+  omega = 0.0
+  Lx = 3.0e3
+/

Added: branches/ocean_projects/basin_pbc_mrp/namelists/namelist.global_realistic
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/namelists/namelist.global_realistic                                (rev 0)
+++ branches/ocean_projects/basin_pbc_mrp/namelists/namelist.global_realistic        2012-10-17 14:57:04 UTC (rev 2216)
@@ -0,0 +1,25 @@
+&amp;basin
+  nVertLevelsMOD = 40
+  on_a_sphere = 'YES'
+  sphere_radius = 6.37122e6
+  zLevel_thickness = 'POP_40_zLevel'
+  bottom_topography = 'realistic_ETOPO'
+  initial_conditions = 'realistic_WOCE'
+  eliminate_inland_seas=.true.
+  l_woce = .true.
+  write_OpenDX_flag = .false.
+  monthly_forcing = .true.
+  cut_domain_from_sphere = .false.
+  solid_boundary_in_y = .false.
+  solid_boundary_in_x = .false.
+  top_layers_without_land = 3
+
+  ! These variables are not needed for realistic global topography:
+
+  ! h_total_max = 2000.0 
+  ! u_src_max = 0.1 
+  ! f0 = -1.1e-4  
+  ! beta = 1.4e-11 
+  ! omega = 7.29212e-5  
+  ! Lx = 3200.0e3
+/

Modified: branches/ocean_projects/basin_pbc_mrp/src/basin.F
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/src/basin.F        2012-10-16 21:13:19 UTC (rev 2215)
+++ branches/ocean_projects/basin_pbc_mrp/src/basin.F        2012-10-17 14:57:04 UTC (rev 2216)
@@ -18,12 +18,11 @@
 ! Change a spherical grid into a Limited area spherical grid.
 !
 ! How to use:
-! Step 1: Set the number of Vertical levels
-! Step 2: Set if the grid is on a sphere or not, and it's radius
-! Step 3: Specify some Parameters
-! Step 4: Check get_init_conditions routine for initial T&amp;S, thickness, etc.
-! Step 5: Check define_kmt routine for bottomDepth and kmt (maxLevelCell) variables
-! Step 6: Check get_dz routine for hZLevel variable
+! Step 1: Link namelist.basin to the correct namelist file. 
+! Step 2: Change parameters and flags in namelist file as needed.
+! Step 3: Check get_init_conditions routine for initial T&amp;S, thickness, etc.
+! Step 4: Check define_kmt routine for bottomDepth and kmt (maxLevelCell) variables.
+! Step 5: Check get_dz routine for hZLevel variable.
 !
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 implicit none
@@ -59,73 +58,12 @@
 real, dimension(40) :: dz
 integer :: nMonths = 1
 
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-! Step 1: Set the number of Vertical levels
-!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-integer, parameter :: nVertLevelsMOD = 40
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-! Step 2: Set if the grid is on a sphere or not, and it's radius
-!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-character (len=16) :: on_a_sphere = 'YES              '
-real*8, parameter :: sphere_radius = 6.37122e6
-!real*8, parameter :: sphere_radius = 1.0
-
-!character (len=16) :: on_a_sphere = 'NO               '
-!real*8, parameter :: sphere_radius = 0.0
-
-! zLevel thickness options: 
-! 'POP_40_zLevel', 'equally_spaced', 'isopycnal'
-character (len=32) :: zLevel_thickness = 'POP_40_zLevel'
-
-! bottom topography options: 
-! 'realistic_ETOPO', 'flat_bottom', 'Ilicak2_overflow'
-character (len=32) :: bottom_topography = 'realistic_ETOPO'
-
-! initial temperature and salinity options: 
-! 'realistic_WOCE', 'constant', 'Ilicak2_overflow'
-character (len=32) :: initial_conditions = 'realistic_WOCE'
-
-logical, parameter :: eliminate_inland_seas=.true.
-logical, parameter :: l_woce = .true.
-logical, parameter :: write_OpenDX_flag = .false.
-logical, parameter :: monthly_forcing = .false.
-
-! Set the number of top layers that are not allowed to have land, usually three.
-integer, parameter :: top_layers_without_land = 3
-
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-! Step 3: Specify some Parameters
-!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-   real (kind=8), parameter :: &amp;
-    h_total_max = 2000.0, &amp; ! total layer thickness, for equally spaced case
-    u_max = 0.0, &amp; ! max initial velocity
-    u_src_max = 0.1, &amp; ! max wind stress, N/m2
-    f0 = -1.1e-4, &amp;  ! Coriolis parameter
-    beta = 1.4e-11, &amp; 
-    omega = 7.29212e-5  ! rotation rate of earth
-
-! This needs to be changed for correct periodic boundaries
-! Lx is the TOTAL domain width, and needs to be exact for correct periodic
-! boundaries in x.
-   real (kind=8), parameter :: Lx = 3200.0e3  ! 40x80km=3200km
-
-
    real (kind=8) :: ymid, ytmp, ymax, xmid, xloc, yloc, pert, ymin, distance, r, c1(3), c2(3)
    real (kind=8) :: latmid, lattmp, latmax, latmin
    integer :: cell1, cell2
 
 ! new grid variables
-real, dimension(nVertLevelsMOD) :: hZLevel, refBottomDepth
+real, allocatable, dimension(:) :: hZLevel, refBottomDepth
 integer :: nCellsNew, nEdgesNew, nVerticesNew
 integer :: maxEdgesNew, maxEdges2New, TWONew, vertexDegreeNew, nVertLevelsNew
 integer, allocatable, dimension(:) :: indexToCellIDNew, indexToEdgeIDNew, indexToVertexIDNew
@@ -143,7 +81,7 @@
 real, allocatable, dimension(:) :: fEdgeNew, fVertexNew, bottomDepthNew
 real, allocatable, dimension(:,:) :: u_srcNew
 real, allocatable, dimension(:,:) :: windStressMonthlyNew
-real, allocatable, dimension(:,:,:) :: uNew, vNew, hNew
+real, allocatable, dimension(:,:,:) :: uNew, hNew
 real, allocatable, dimension(:,:,:) :: rhoNew, temperatureNew, salinityNew, tracer1New
 real, allocatable, dimension(:) :: temperatureRestoreNew, salinityRestoreNew
 real, allocatable, dimension(:,:) :: temperatureRestoreMonthlyNew, salinityRestoreMonthlyNew
@@ -161,13 +99,79 @@
 integer :: iMonth
 character(len=80) :: fileNameT, fileNameS, fileNameU
 
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! Namelist variables
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Variables in namelist file
+character (len=32) :: on_a_sphere, zLevel_thickness,bottom_topography, initial_conditions
+logical :: eliminate_inland_seas, l_woce, write_OpenDX_flag, monthly_forcing, &amp;
+   cut_domain_from_sphere, solid_boundary_in_y, solid_boundary_in_x
+integer :: nVertLevelsMOD, top_layers_without_land 
+real (kind=8) :: sphere_radius, h_total_max, u_src_max, f0, beta, omega, Lx
+
+! specify namelist
+namelist /basin/ nVertLevelsMOD, on_a_sphere, sphere_radius, &amp;
+   zLevel_thickness, bottom_topography, initial_conditions, &amp;
+   eliminate_inland_seas, l_woce, write_OpenDX_flag, monthly_forcing, &amp;
+   cut_domain_from_sphere, solid_boundary_in_y, solid_boundary_in_x, &amp;
+   top_layers_without_land, h_total_max, u_src_max, f0, beta, omega, Lx
+
+! Default namelist values.  Default set for realistic global IC.
+nVertLevelsMOD = 40
+on_a_sphere = 'YES'
+sphere_radius = 6.37122e6
+
+! zLevel thickness options: 
+! 'POP_40_zLevel', 'equally_spaced', 'zero'
+zLevel_thickness = 'POP_40_zLevel'
+
+! bottom topography options: 
+! 'realistic_ETOPO', 'flat_bottom', 'Ilicak2_overflow'
+bottom_topography = 'realistic_ETOPO'
+
+! initial temperature and salinity options: 
+! 'realistic_WOCE', 'constant', 'Ilicak2_overflow', 'Ilicak2_overflow_sigma'
+initial_conditions = 'realistic_WOCE'
+
+eliminate_inland_seas=.true.
+l_woce = .true.
+write_OpenDX_flag = .false.
+monthly_forcing = .true.
+cut_domain_from_sphere = .false.
+solid_boundary_in_y = .false.
+solid_boundary_in_x = .false.
+
+! Set the number of top layers that are not allowed to have land, usually three.
+top_layers_without_land = 3
+
+h_total_max = 2000.0 ! total layer thickness, for equally spaced case
+u_src_max = 0.1 ! max wind stress, N/m2
+f0 = -1.1e-4  ! Coriolis parameter
+beta = 1.4e-11 
+omega = 7.29212e-5  ! rotation rate of earth
+
+! This needs to be changed for correct periodic boundaries
+! Lx is the TOTAL domain width, and needs to be exact for correct periodic
+! boundaries in x.
+Lx = 3200.0e3  ! 40x80km=3200km
+
+! Read in namelist
+   open(20,file='namelist.basin',status='old')
+   read(20,basin)
+   close(20)
+
+allocate (hZLevel(nVertLevelsMOD), refBottomDepth(nVertLevelsMOD))
+
+
 if(monthly_forcing) then
     nMonths = 12
 else
     nMonths = 1
 end if
 
-
 fileNameT = 'TS/annual/woce_t_ann.3600x2431x42interp.r4.nc'
 fileNameS = 'TS/annual/woce_s_ann.3600x2431x42interp.r4.nc'
 fileNameU = 'TS/annual/ws.old_ncep_1958-2000avg.interp3600x2431.nc'
@@ -441,7 +445,11 @@
 end subroutine write_graph
 
 
-! Step 4: Check get_init_conditions routine for initial T&amp;S, thickness, etc.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! Step 3: Check get_init_conditions routine for initial T&amp;S, thickness, etc.
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 subroutine get_init_conditions
 implicit none
 real :: halfwidth, dtr, pi, p(3), q(3), xin, yin, zin, ulon, ulat, stress, n1, n2, distance, r, temp_t, temp_s
@@ -452,12 +460,14 @@
 pi = 4.0*atan(1.0)
 dtr = pi/180.0
 
+! defaults
 hNew = 100.0
 temperatureNew = 1.0
 salinityNew = 1.0
 tracer1New = 1.0
 uNew = 0
-vNew = 0
+u_srcNew = 0
+rhoNew = 1025.0
 
 if (initial_conditions.eq.'uniform_TS') then
 
@@ -476,7 +486,6 @@
 
 elseif (initial_conditions.eq.'Ilicak2_overflow') then
 
-   write(6,*) ' setting temperature'
    do i = 1,nCellsNew
       if(yCellNew(i) &lt; 20000) then
          temperatureNew(1,:,i) = 10.0
@@ -491,14 +500,34 @@
    u_srcNew = 0.0
 
    do iCell=1,nCellsNew
-      do k=1,maxLevelCellNew(iCell)
+      do k=1,nVertLevelsMod
          hNew(1,k,iCell) = hZLevel(k)
       enddo
-      do k=maxLevelCellNew(iCell)+1, nVertLevelsMod
-         hNew(1,k,iCell) = 0.0
+   enddo  
+
+elseif (initial_conditions.eq.'Ilicak2_overflow_sigma') then
+
+   do i = 1,nCellsNew
+      if(yCellNew(i) &lt; 20000) then
+         temperatureNew(1,:,i) = 10.0
+      else
+         temperatureNew(1,:,i) = 20.0
+      endif
+   enddo
+
+   salinityNew(1,:,:) = 35.0
+   Tracer1New(1,:,:) = 1.0
+   uNew = 0.0
+   u_srcNew = 0.0
+
+   do iCell=1,nCellsNew
+      do k=1,nVertLevelsMod
+         hNew(1,k,iCell) = bottomDepthNew(iCell) / nVertLevelsMOD
       enddo
    enddo  
 
+   maxLevelCellNew(1:nCellsNew) = nVertLevelsMOD
+
 elseif (initial_conditions.eq.'isopycnal') then
 
    fEdgeNew(:) = 0.0
@@ -561,7 +590,7 @@
    ! basin-mod
    ! set salinity for isopycnal levels
    write(6,*) ' setting salinity'
-   if(on_a_sphere.eq.'YES              ') then
+   if(on_a_sphere.eq.'YES') then
        latmin = minval(latCellNew)
        latmax = maxval(latCellNew)
        r = 10.0*dtr
@@ -605,7 +634,7 @@
    ! set forcing for isopycnal levels
    write(6,*) 'setting u_src - wind forcing'
    u_srcNew = 0.0
-   if(on_a_sphere.eq.'YES              ') then
+   if(on_a_sphere.eq.'YES') then
        latmin = -60*dtr
        latmax = -10*dtr
        latmid = -35*dtr
@@ -919,7 +948,7 @@
    ! basin-mod
    ! set coriolis parameter for grid
    write(6,*) ' setting Coriolis parameter'
-   if(on_a_sphere.eq.'YES              ') then
+   if(on_a_sphere.eq.'YES') then
        do i = 1,nVerticesNew
           fVertexNew(i) = 2.0 * omega * sin(latVertexNew(i))
        enddo
@@ -1282,7 +1311,7 @@
 subroutine write_grid
 implicit none
 
-if(on_a_sphere.eq.'YES              ') then
+if(on_a_sphere.eq.'YES') then
    xCellNew = xCellNew * sphere_radius
    yCellNew = yCellNew * sphere_radius
    zCellNew = zCellNew * sphere_radius
@@ -1358,7 +1387,6 @@
                     u_srcNew, &amp;
                     windStressMonthlyNew, &amp;
                     uNew, &amp;
-                    vNew, &amp;
                     hNew, &amp;
                     rhoNew, &amp;
                     temperatureNew, &amp;
@@ -1374,7 +1402,7 @@
 
 call write_netcdf_finalize
 
-if(on_a_sphere.eq.'YES              ') then
+if(on_a_sphere.eq.'YES') then
    xCellNew = xCellNew / sphere_radius
    yCellNew = yCellNew / sphere_radius
    zCellNew = zCellNew / sphere_radius
@@ -1393,63 +1421,26 @@
 
 end subroutine write_grid
 
-! Step 5: Check define_kmt routine for bottomDepth and kmt (maxLevelCell) variables
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+!  Step 4: Check define_kmt routine for bottomDepth and kmt (maxLevelCell) variables
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 subroutine define_kmt
 implicit none
 real (kind=4), allocatable, dimension(:) :: x,y, work_kmt
 real (kind=4), allocatable, dimension(:,:) :: ztopo
 integer :: nx, ny, inx, iny, ix, iy, kmt_neighbor_max
 real :: pi, dtr, zdata, rlon, rlat, r, ymin, ymax, xmin, xmax
-real :: latmin, latmax, lonmin, lonmax, ridgeDepth
+real :: latmin, latmax, lonmin, lonmax, ridgeDepth, maxdc
 logical :: flag, kmt_flag
+
 pi = 4.0*atan(1.0)
 dtr = pi / 180.0
 
 allocate(kmt(nCells))
 kmt = 0
 
-if (trim(bottom_topography).ne.'realistic_ETOPO') then
-    kmt = nVertLevelsMOD
-    if(on_a_sphere.eq.'YES              ') then
-        write(6,*) 'Working on a sphere'
-        latmin = -30*dtr
-        latmax = +30*dtr
-        lonmin = +10*dtr
-        lonmax = +70*dtr
-        write(6,*) ' lat min ', latmin
-        write(6,*) ' lat max ', latmax
-        where(latCell.lt.latmin) kmt = 0
-        where(latCell.gt.latmax) kmt = 0
-        where(lonCell.lt.lonmin) kmt = 0
-        where(lonCell.gt.lonmax) kmt = 0
-    else
-        ! solid boundary in y
-        ymin = minval(yCell)
-        write(6,*) ' minimum yCell ', ymin
-        ymax = maxval(yCell)
-        write(6,*) ' maximum yCell ', ymax
-        where(yCell.lt.1.001*ymin) kmt = 0
-        where(yCell.gt.0.999*ymax) kmt = 0
-
-     !  ! solid boundary in x
-     !  xmin = minval(xCell)
-     !  write(6,*) ' minimum xCell ', xmin
-     !  xmax = maxval(xCell)
-     !  write(6,*) ' maximum xCell ', xmax
-     !  where(xCell.lt.xmin+dc/1.5) kmt = 0
-     !  where(xCell.gt.xmax-dc/1.5) kmt = 0
-    endif
-
-    
-    allocate(work_kmt(nCells))
-    work_kmt = 0.0
-    where(kmt.eq.0) work_kmt=1.0
-    write(6,*) 'number of cells culled ',sum(work_kmt)
-    deallocate(work_kmt)
-
-endif
-
-
 if (bottom_topography.eq.'realistic_ETOPO') then
 
     nx = 10800
@@ -1561,6 +1552,46 @@
 
 endif
 
+if (cut_domain_from_sphere) then
+   latmin = -30*dtr
+   latmax = +30*dtr
+   lonmin = +10*dtr
+   lonmax = +70*dtr
+   write(6,*) ' lat min ', latmin
+   write(6,*) ' lat max ', latmax
+   where(latCell.lt.latmin) kmt = 0
+   where(latCell.gt.latmax) kmt = 0
+   where(lonCell.lt.lonmin) kmt = 0
+   where(lonCell.gt.lonmax) kmt = 0
+endif
+
+if (solid_boundary_in_y) then
+   ymin = minval(yCell)
+   write(6,*) ' minimum yCell ', ymin
+   ymax = maxval(yCell)
+   write(6,*) ' maximum yCell ', ymax
+   where(yCell.lt.1.001*ymin) kmt = 0
+   where(yCell.gt.0.999*ymax) kmt = 0
+endif
+
+if (solid_boundary_in_x) then
+   maxdc = maxval(dcEdge)
+   xmin = minval(xCell)
+   write(6,*) ' minimum xCell ', xmin
+   xmax = maxval(xCell)
+   write(6,*) ' maximum xCell ', xmax
+   where(xCell.lt.xmin+maxdc/1.5) kmt = 0
+   where(xCell.gt.xmax-maxdc/1.5) kmt = 0
+endif
+
+    
+allocate(work_kmt(nCells))
+work_kmt = 0.0
+where(kmt.eq.0) work_kmt=1.0
+write(6,*) 'number of cells culled ',sum(work_kmt)
+deallocate(work_kmt)
+
+
 ! Eliminate isolated ocean cells, and make these isolated deep cells
 ! flush with the deepest neighbor.
 do iCell=1,nCells
@@ -1707,7 +1738,6 @@
 allocate(u_srcNew(nVertLevelsNew,nEdgesNew))
 allocate(windStressMonthlyNew(nMonths,nEdgesNew))
 allocate(uNew(1,nVertLevelsNew,nEdgesNew))
-allocate(vNew(1,nVertLevelsNew,nEdgesNew))
 allocate(hNew(1,nVertLevelsNew,nCellsNew))
 allocate(rhoNew(1,nVertLevelsNew,nCellsNew))
 allocate(temperatureNew(1,nVertLevelsNew,nCellsNew))
@@ -1726,7 +1756,7 @@
 xVertexNew=0; yVertexNew=0; zVertexNew=0; latVertexNew=0; lonVertexNew=0
 
 fEdgeNew=0; fVertexNew=0; bottomDepthNew=0; u_srcNew=0; windStressMonthlyNew = 0
-uNew=0; vNew=0; hNew=0; rhoNew=0
+uNew=0; hNew=0; rhoNew=0
 temperatureNew=0; salinityNew=0; tracer1New=0;
 
 temperatureRestoreNew = 0.0
@@ -1982,7 +2012,7 @@
 c2(1) = xCellNew(cell2); c2(2) = yCellNew(cell2); c2(3) = zCellNew(cell2)
 distance = sqrt( (c1(1)-c2(1))**2 + (c1(2)-c2(2))**2 + (c1(3)-c2(3))**2 )
 
-if(on_a_sphere.eq.'YES              ') then
+if(on_a_sphere.eq.'YES') then
     normalsNew(1,iEdge) = c2(1) - c1(1)
     normalsNew(2,iEdge) = c2(2) - c1(2)
     normalsNew(3,iEdge) = c2(3) - c1(3)
@@ -2012,13 +2042,13 @@
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
-! Step 6: Check get_dz routine for hZLevel variable
+! Step 5: Check get_dz routine for hZLevel variable
 !
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 subroutine get_dz
 integer k
 
-if (zLevel_thickness.eq.'isopycnal') then
+if (zLevel_thickness.eq.'zero') then
 
    ! hZLevel not used for isopycnal setting, just set to zero.
    hZLevel = 0.0

Modified: branches/ocean_projects/basin_pbc_mrp/src/module_write_netcdf.F
===================================================================
--- branches/ocean_projects/basin_pbc_mrp/src/module_write_netcdf.F        2012-10-16 21:13:19 UTC (rev 2215)
+++ branches/ocean_projects/basin_pbc_mrp/src/module_write_netcdf.F        2012-10-17 14:57:04 UTC (rev 2216)
@@ -56,7 +56,6 @@
    integer :: wrVarIDboundaryVertex
    integer :: wrVarIDu_src
    integer :: wrVarIDwindStressMonthly
-   integer :: wrVarIDv
    integer :: wrVarIDh
    integer :: wrVarIDrho
    integer :: wrVarIDtemperature
@@ -131,7 +130,7 @@
       nferr = nf_def_dim(wr_ncid, 'TWO', 2, wrDimIDTWO)
       nferr = nf_def_dim(wr_ncid, 'vertexDegree', vertexDegree, wrDimIDvertexDegree)
       nferr = nf_def_dim(wr_ncid, 'nVertLevels', nVertLevels, wrDimIDnVertLevels)
-      nferr = nf_def_dim(wr_ncid, 'nMonths', 12, wrDimIDnMonths)
+      nferr = nf_def_dim(wr_ncid, 'nMonths', nMonths, wrDimIDnMonths)
       nferr = nf_def_dim(wr_ncid, 'Time', NF_UNLIMITED, wrDimIDTime)
  
       !
@@ -262,10 +261,6 @@
       nferr = nf_def_var(wr_ncid, 'windStressMonthly', NF_DOUBLE,  2, dimlist, wrVarIDwindStressMonthly)
 
       dimlist( 1) = wrDimIDnVertLevels
-      dimlist( 2) = wrDimIDnEdges
-      dimlist( 3) = wrDimIDTime
-      nferr = nf_def_var(wr_ncid, 'v', NF_DOUBLE,  3, dimlist, wrVarIDv)
-      dimlist( 1) = wrDimIDnVertLevels
       dimlist( 2) = wrDimIDnCells
       dimlist( 3) = wrDimIDTime
       nferr = nf_def_var(wr_ncid, 'h', NF_DOUBLE,  3, dimlist, wrVarIDh)
@@ -343,7 +338,6 @@
                                   u_src, &amp;
                                   windStressMonthly, &amp;
                                   u, &amp;
-                                  v, &amp;
                                   h, &amp;
                                   rho, &amp;
                                   temperature, &amp;
@@ -407,7 +401,6 @@
       real (kind=8), dimension(:,:), intent(in) :: u_src
       real (kind=8), dimension(:,:), intent(in) :: windStressMonthly
       real (kind=8), dimension(:,:,:), intent(in) :: u
-      real (kind=8), dimension(:,:,:), intent(in) :: v
       real (kind=8), dimension(:,:,:), intent(in) :: h
       real (kind=8), dimension(:,:,:), intent(in) :: rho
       real (kind=8), dimension(:,:,:), intent(in) :: temperature
@@ -672,12 +665,6 @@
  
       start3(3) = time
       count3( 1) = wrLocalnVertLevels
-      count3( 2) = wrLocalnEdges
-      count3( 3) = 1
-      nferr = nf_put_vara_double(wr_ncid, wrVarIDv, start3, count3, v)

-      start3(3) = time
-      count3( 1) = wrLocalnVertLevels
       count3( 2) = wrLocalnCells
       count3( 3) = 1
       nferr = nf_put_vara_double(wr_ncid, wrVarIDh, start3, count3, h)

</font>
</pre>