Loading oper/src/cso_profile.F90 +7 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ ! 2024-09, Arjo Segers ! Added 'Apply_WeightedSumAdj' method. ! ! 2025-07, Arjo Segers ! Allow layers of zero thickness, used to denote no-data layers. ! !############################################################################### ! #define TRACEBACK write (csol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call csoErr Loading Loading @@ -344,8 +347,8 @@ contains ! interval lengths: self%dy = ydir * ( yy(2:self%ny+1) - yy(1:self%ny) ) ! check .. if ( any(self%dy <= 0.0) ) then write (csol,'("found zero or negative interval length in y:")'); call csoErr if ( any(self%dy < 0.0) ) then write (csol,'("found negative interval length in y:")'); call csoErr do i = 1, self%ny write (csol,'(" cell ",i6," [",f16.6,",",f16.6,"] ",f16.6)') i, yy(i), yy(i+1), self%dy(i); call csoErr end do Loading Loading @@ -715,6 +718,8 @@ contains g = 0.0 ! loop over mapping weights: do iw = 1, self%nw ! skip zero layers: if ( self%dy(self%jj(iw)) == 0.0 ) cycle ! add contribution: g(self%jj(iw)) = g(self%jj(iw)) + f(self%ii(iw)) * self%dx(self%ii(iw)) * self%ww(iw) / self%dy(self%jj(iw)) end do ! iw Loading Loading
oper/src/cso_profile.F90 +7 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ ! 2024-09, Arjo Segers ! Added 'Apply_WeightedSumAdj' method. ! ! 2025-07, Arjo Segers ! Allow layers of zero thickness, used to denote no-data layers. ! !############################################################################### ! #define TRACEBACK write (csol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call csoErr Loading Loading @@ -344,8 +347,8 @@ contains ! interval lengths: self%dy = ydir * ( yy(2:self%ny+1) - yy(1:self%ny) ) ! check .. if ( any(self%dy <= 0.0) ) then write (csol,'("found zero or negative interval length in y:")'); call csoErr if ( any(self%dy < 0.0) ) then write (csol,'("found negative interval length in y:")'); call csoErr do i = 1, self%ny write (csol,'(" cell ",i6," [",f16.6,",",f16.6,"] ",f16.6)') i, yy(i), yy(i+1), self%dy(i); call csoErr end do Loading Loading @@ -715,6 +718,8 @@ contains g = 0.0 ! loop over mapping weights: do iw = 1, self%nw ! skip zero layers: if ( self%dy(self%jj(iw)) == 0.0 ) cycle ! add contribution: g(self%jj(iw)) = g(self%jj(iw)) + f(self%ii(iw)) * self%dx(self%ii(iw)) * self%ww(iw) / self%dy(self%jj(iw)) end do ! iw Loading