Skip to content

Commit

Permalink
set fac_hl to zero at poles
Browse files Browse the repository at this point in the history
	modified:   src/ionosphere/waccmx/edyn3D_calc_coef_fac_const_rhs.F90
  • Loading branch information
fvitt committed Oct 14, 2024
1 parent b3dd2ee commit b718558
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/ionosphere/waccmx/edyn3D_calc_coef_fac_const_rhs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,22 +260,23 @@ subroutine edyn3D_calc_FAC
!
sum = 0.
do isn = 1,2 ! loop over both hemisphere
do i=mlon0_p,mlon1_p ! loop over task longitudes
! do i=1,nmlon ! loop over all longitudes
do j=2,nmlat_h ! loop over all latitudes in one hemisphere not the pole (potential set later)
do i=mlon0_p,mlon1_p ! loop over task longitudes

fac_hl(i,j,isn) = fac_hl(i,j,isn)-fline_s1(i,j,isn)%zigP*abs(fac_hl(i,j,isn))*corr
sum = sum + fac_hl(i,j,isn)
! put in coef-array
coef_ns2(i,j,isn,10) = coef_ns2(i,j,isn,10)+fac_hl(i,j,isn)
fline_p(i,1,isn)%fac_hl = 0._r8 ! zero at the pole ???

do j=2,nmlat_h ! loop over all latitudes in one hemisphere not the pole (potential set later)

fac_hl(i,j,isn) = fac_hl(i,j,isn)-fline_s1(i,j,isn)%zigP*abs(fac_hl(i,j,isn))*corr
sum = sum + fac_hl(i,j,isn)
! put in coef-array
coef_ns2(i,j,isn,10) = coef_ns2(i,j,isn,10)+fac_hl(i,j,isn)
!
if(fline_p(i,j,isn)%M3(1).ne.0) then
fline_p(i,j,isn)%fac_hl = fac_hl(i,j,isn) / fline_p(i,j,isn)%M3(1)
endif
end do ! end lat/fieldline loop
!
if(fline_p(i,j,isn)%M3(1).ne.0) then
! fline_p(i,j,isn)%fac_hl = coef_ns2(i,j,isn,10)/ fline_p(i,j,isn)%M3(1)
fline_p(i,j,isn)%fac_hl = fac_hl(i,j,isn)/ fline_p(i,j,isn)%M3(1)
endif
end do ! end lat/fieldline loop
!
end do ! end longitude loop
end do ! end longitude loop
end do ! end hemisphere loop
!
end subroutine edyn3D_calc_FAC
Expand Down

0 comments on commit b718558

Please sign in to comment.