diff --git a/src/updateWP.f90 b/src/updateWP.f90 index acc7c338..c689e157 100644 --- a/src/updateWP.f90 +++ b/src/updateWP.f90 @@ -419,11 +419,10 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, & if ( l1 == 2 .and. m1 == 0 ) then if ( amp_tide /= 0.0_cp ) then - - rhs1(1,2*lm-1,threadid)=rhs1(1,2*lm-1,threadid) & + rhs1(1,2*lm-1,threadid)=rhs1(1,2*lm-1,threadid) & & + tide_fac20/real(l1*(l1+1),kind=cp) & & * cos(omega_tide*(time)) - rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) & + rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) & & + tide_fac20/real(l1*(l1+1),kind=cp) & & * sin(omega_tide*(time)) end if @@ -455,7 +454,7 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, & & /real(l1*(l1+1),kind=cp) & & * cos(omega_tide*(time)) rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) & - & + (-tide_fac22p + tide_fac22n) & + & + (-tide_fac22p + tide_fac22n) & & /real(l1*(l1+1),kind=cp) & & * sin(omega_tide*(time)) end if @@ -469,27 +468,25 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, & rhs1(n_r_max-1,2*lm,threadid) =0.0_cp ! Special BC for free-slip and radial flow - if (l_radial_flow_bc .and. (ktopv == 1 .or. kbotv == 1)) then if (l1 == 2 .and. m1 == 2) then if ( (ellipticity_cmb /= 0.0_cp .or. amp_tide /= 0.0_cp) & & .and. ktopv == 1 ) then - rhs1(2,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(1) - rhs1(2,2*lm,threadid) = - real(l1*(l1+1),kind=cp)*or2(1) + rhs1(2,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(1) + rhs1(2,2*lm,threadid) =-real(l1*(l1+1),kind=cp)*or2(1) else if (ellipticity_icb /= 0.0_cp .and. kbotv == 1) then - rhs1(n_r_max-1,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(n_r_max) - rhs1(n_r_max-1,2*lm,threadid) = - real(l1*(l1+1),kind=cp)*or2(n_r_max) + rhs1(n_r_max-1,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(n_r_max) + rhs1(n_r_max-1,2*lm,threadid) =-real(l1*(l1+1),kind=cp)*or2(n_r_max) end if end if if (l1 == 2 .and. m1 == 0) then if (amp_tide /= 0.0_cp .and. ktopv == 1) then - rhs1(2,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(1) + rhs1(2,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(1) end if end if end if - do nR=3,n_r_max-2 rhs1(nR,2*lm-1,threadid)= real(work_LMloc(lm1,nR)) rhs1(nR,2*lm,threadid) =aimag(work_LMloc(lm1,nR))