anchor.diff:  											vortFlagFn1, tol1, desc1, nParticlesBefore, nParticlesAfter)
   				elseif ( refineVariableCount == 2 ) then
   					if ( present(field2) ) then
  -						call IterateMeshRefinementTwoVariables( refine, newSphere%mesh, newSphere%relVort, vortFlagFn1, &
  +						call IterateMeshRefinementTwoVariables(refine, newSphere%mesh, newSphere%relVort, vortFlagFn1, &
   								tol1, desc1, field2, flagFn2, tol2, desc2, nParticlesBefore, nParticlesAfter)
   					else
  -						call IterateMeshRefinementTwoVariables( refine, newSphere%mesh, newSphere%relVort, vortFlagFn1, &
  +						call IterateMeshRefinementTwoVariables(refine, newSphere%mesh, newSphere%relVort, vortFlagFn1, &
   								tol1, desc1, newSphere%relVort, flagFn2, tol2, desc2, nParticlesBefore, nParticlesAfter)
   					endif
   				endif
  
positive.code: end subroutine
  
  ! All AMR done on tracer 1
  subroutine DirectRemeshTransport(self, oldSphere, newSphere, AMR, velFn, t, divFn, field1, amrFlagFn1, tol1, desc1, &
  	field2, amrFlagFn2, tol2, desc2 )
  	type(TransportRemesh), intent(in) :: self
  	type(TransportMesh), intent(in) :: oldSphere
  	type(TransportMesh), intent(inout) :: newSphere
  
negative.code: 	!	AMR
  	!
  	if ( AMR ) then
  		amrVarCount = 0
  		if ( (present(field1) .AND. present(flagFn1)) .AND. (present(tol1 ) .AND. present(desc1) ) ) then
  			amrVarCount = 1
  			if ( (present(field2) .AND. present(flagFn2)) .AND. (present(tol2) .AND. present(desc2) ) ) then
  				amrVarCount = 2
  			endif
  		endif
  		
  		if ( amrVarCount > 0 ) then
  			call New(refine, newSphere%mesh%faces%N_Max)
  			do i = 1, newSphere%mesh%amrLimit
  				nParticlesBefore = newSphere%mesh%particles%N
  				
  				if ( amrVarCount == 1 ) then
  					call IterateMeshRefinementOneVariable( refine, newSphere%mesh, field1, flagFn1, tol1, desc1, &
  						nParticlesBefore, nParticlesAfter )
  				elseif ( amrVarCount == 2) then
  					call IterateMeshRefinementTwoVariables( refine, newSphere%mesh, field1, flagFn1, tol1, desc1, &
  						field2, flagFn2, tol2, desc2, nParticlesBefore, nParticlesAfter )
  				endif			
  			enddo
  			
  			do j = nParticlesBefore + 1, nParticlesAfter
  				lon = Longitude( newSphere%mesh%particles%x(j), newSphere%mesh%particles%y(j), &
  									 newSphere%mesh%particles%z(j))
  				lat = Latitude( newSphere%mesh%particles%x(j), newSphere%mesh%particles%y(j), &
  									newSphere%mesh%particles%z(j))
  				x0 = InterpolateLagParam( lon, lat, self%lagParamSource, oldSphere%mesh, self%delTri)
  				newSphere%mesh%particles%x0(j) = x0(1)
  				newSphere%mesh%particles%y0(j) = x0(2)
  				newSphere%mesh%particles%z0(j) = x0(3)
  		
  				newSphere%density%scalar(j) = InterpolateScalar( lon, lat, self%densitySource, oldSphere%mesh, &
  													self%delTri, oldSphere%density)
  													
  				do k = 1, size(newSphere%tracers)
  					if ( newSphere%tracers(k)%nDim == 1 ) then
  						newSphere%tracers(k)%scalar(j) = InterpolateScalar( lon, lat, self%tracerSource(k), &
  								 oldSphere%mesh, self%delTri, oldSphere%tracers(k) )
  					else
  						vec = InterpolateVector(lon, lat, self%tracerSource(k), oldSphere%mesh, self%delTri, &
  							oldSphere%tracers(k) )
  						newSphere%tracers(k)%xComp(j) = vec(1)
  						newSphere%tracers(k)%yComp(j) = vec(2)
  						newSphere%tracers(k)%zComp(j) = vec(3)
  					endif
  				enddo
  			enddo
  			
  			newSphere%density%N = newSphere%mesh%particles%N
  			do k = 1, size(newSphere%tracers)
  				newSphere%tracers(k)%N = newSphere%mesh%particles%N
  			enddo
  			call LoadBalance( newSphere%mpiParticles, newSphere%mesh%particles%N, numProcs)
  
  			call Delete(refine)
  		endif
  	endif!AMR
  	
  	call SetVelocityOnMesh( newSphere, velFn, t )
  	if ( present(divFn) ) then
  		call SetDivergenceOnMesh( newSphere, divFn, t )
  	endif
  end subroutine
  
  subroutine LagrangianRemeshTransportWithFunctions( self, oldSphere, newSphere, AMR, velFn, t, divFn, &
  