Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(*)Oil_tracer_column_physics unit conversion fix #546

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/tracer/oil_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -373,21 +373,21 @@
! Add oil at the source location
if (year>=CS%oil_start_year .and. year<=CS%oil_end_year .and. &
CS%oil_source_i>-999 .and. CS%oil_source_j>-999) then
i=CS%oil_source_i ; j=CS%oil_source_j
k_max=nz ; h_total=0.
i = CS%oil_source_i ; j = CS%oil_source_j
k_max = nz ; h_total = 0.

Check warning on line 377 in src/tracer/oil_tracer.F90

View check run for this annotation

Codecov / codecov/patch

src/tracer/oil_tracer.F90#L376-L377

Added lines #L376 - L377 were not covered by tests
vol_scale = GV%H_to_m * US%L_to_m**2
do k=nz, 2, -1
h_total = h_total + h_new(i,j,k)
if (h_total<10.) k_max=k-1 ! Find bottom most interface that is 10 m above bottom
if (h_total < 10.*GV%m_to_H) k_max=k-1 ! Find bottom most interface that is 10 m above bottom
enddo
do m=1,CS%ntr
k=CS%oil_source_k(m)
k = CS%oil_source_k(m)

Check warning on line 384 in src/tracer/oil_tracer.F90

View check run for this annotation

Codecov / codecov/patch

src/tracer/oil_tracer.F90#L384

Added line #L384 was not covered by tests
if (k>0) then
k=min(k,k_max) ! Only insert k or first layer with interface 10 m above bottom
k = min(k,k_max) ! Only insert k or first layer with interface 10 m above bottom

Check warning on line 386 in src/tracer/oil_tracer.F90

View check run for this annotation

Codecov / codecov/patch

src/tracer/oil_tracer.F90#L386

Added line #L386 was not covered by tests
CS%tr(i,j,k,m) = CS%tr(i,j,k,m) + CS%oil_source_rate*dt / &
(vol_scale * (h_new(i,j,k)+GV%H_subroundoff) * G%areaT(i,j) )
elseif (k<0) then
h_total=GV%H_subroundoff
h_total = GV%H_subroundoff

Check warning on line 390 in src/tracer/oil_tracer.F90

View check run for this annotation

Codecov / codecov/patch

src/tracer/oil_tracer.F90#L390

Added line #L390 was not covered by tests
do k=1, nz
h_total = h_total + h_new(i,j,k)
enddo
Expand Down
Loading