diff --git a/setup/Uvs1979-2017_setup.dat b/setup/Uvs1979-2017_setup.dat index 01635bc8e476066fa3cf7ee75fe98f999de67ad8..31435946075c9223f95a0ec9c745721642e1452e 100644 --- a/setup/Uvs1979-2017_setup.dat +++ b/setup/Uvs1979-2017_setup.dat @@ -152,14 +152,14 @@ outflpar 0 #2 #0 nManning 0. horvisc 0. pgrad 0. -backdiff0 0. -backdiff 0 +backdiff0 8.17E-5 +backdiff 1 botfric 1 # -VmaxCH4aeroboxid 0. -khsCH4 0. -khsO2 0. -r0methprod 0. +VmaxCH4aeroboxid -999. +khsCH4 -999. +khsO2 -999. +r0methprod -999. # sensflux0 100. momflux0 1.e-15 @@ -174,14 +174,14 @@ deadvol 0. #---------------------------------------------------------------------------------------- # T_profile 8 -0. 15.23 0. 0.0012 0.080 2.94E-1 0. -1. 15.33 0. 0.0012 0.080 2.93E-1 0. -3. 15.29 0. 0.0013 0.080 2.63E-1 0. -5. 14.92 0. 0.0016 0.082 2.63E-1 0. -7. 11.88 0. 0.0010 0.144 2.45E-1 0. -9. 9.92 0. 0.0023 0.171 1.0E-1 0. -11. 9.12 0. 0.1076 0.175 0.0E-0 0. -12. 8.96 0. 0.1513 0.173 0.0E-0 0. +0. 15.23 0.017 0.0012 0.080 2.94E-1 0. +1. 15.33 0.017 0.0012 0.080 2.93E-1 0. +3. 15.29 0.017 0.0013 0.080 2.63E-1 0. +5. 14.92 0.017 0.0016 0.082 2.63E-1 0. +7. 11.88 0.017 0.0010 0.144 2.45E-1 0. +9. 9.92 0.017 0.0023 0.171 1.0E-1 0. +11. 9.12 0.017 0.1076 0.175 0.0E-0 0. +12. 8.96 0.017 0.1513 0.173 0.0E-0 0. T_soilprofile -1 #. #---------------------------------------------------------------------------------------- diff --git a/source/model/bathym_mod.f90 b/source/model/bathym_mod.f90 index 6b4070320f7f588861e0984ddc934e98de45c1cd..a25a0714e1ffbd4dc252f6c0e84cda37d541fac6 100644 --- a/source/model/bathym_mod.f90 +++ b/source/model/bathym_mod.f90 @@ -187,7 +187,7 @@ else ! Interpolation of the predefined area-depth dependence to the current grid... ! ...in water layer - if (h1 > small_value) then + if_waterexist : if (h1 > small_value) then if (soilcolconjtype == 1) then allocate(work1(1:nsoilcols+1),work2(1:nsoilcols+1)) work2(:) = bathymsoil(:,ix,iy)%area_int @@ -204,7 +204,9 @@ else call LININTERPOL (work1,work2,ndatamax,z_full,area_int,M+1,flag,.true.) call LININTERPOL (work1,work2,ndatamax,z_half,area_half,M,flag,.true.) endif - endif + else + print*, 'Warining in BATHYM: water does not exist' + endif if_waterexist !... in ice layer if (l1 > small_value) then allocate (work3(1:Mice+1), work4(1:Mice)) diff --git a/source/model/init.f90 b/source/model/init.f90 index b5fc89c141f6210f5bf7350d546030a5658de221..f1095ea5d60d600a86855b38624cbd2d95226261 100644 --- a/source/model/init.f90 +++ b/source/model/init.f90 @@ -77,7 +77,7 @@ integer(kind=iintegers), intent(in) :: N1, N2 ! Reals real(kind=ireals), intent(in) :: z1(1:N1), z2(1:N2) real(kind=ireals), intent(in) :: f1(1:N1) -logical, optional :: trextr +logical, intent(in), optional :: trextr ! Output variables ! Reals diff --git a/source/model/methane_mod.f90 b/source/model/methane_mod.f90 index a12ef0ea475bb1d798f42be4aa1e45aea37451e5..3f0e9ceda9ec30878c403b8b73a73da5851c1247 100644 --- a/source/model/methane_mod.f90 +++ b/source/model/methane_mod.f90 @@ -995,6 +995,7 @@ endif ifdeep endif ! Water methane content + q_sum_new = 0. do i = 1, gs%M+1 q_sum_new = q_sum_new + qwater(i,2)*h1*ddz05(i-1) enddo diff --git a/source/model/out_mod.f90 b/source/model/out_mod.f90 index 3a609f02b2eb61a5015b93049f697a178763ac99..6d612fa068e33849e41db0c053257448dda6a6c8 100644 --- a/source/model/out_mod.f90 +++ b/source/model/out_mod.f90 @@ -46,6 +46,7 @@ real(kind=ireals), allocatable :: accum_var_scalar (:,:,:) real(kind=ireals), allocatable :: var_scalar (:,:,:) real(kind=ireals), allocatable :: tsteps (:,:) real(kind=ireals), allocatable :: Profile_out(:,:) +real(kind=ireals), allocatable :: work(:) real(kind=ireals) :: voldef0, voldef0y real(kind=ireals) :: work1, work2 real(kind=ireals), allocatable :: valmax(:) @@ -87,6 +88,7 @@ if (firstcall) then allocate (var_scalar (1:n_var_scalar, 1:nx, 1:ny) ) allocate (accum_var_scalar(1:n_var_scalar, 1:nx, 1:ny) ) allocate (valmax(1:n_var_max)) + allocate (work(1:M+1)) firstcallixiy(:,:) = .true. out_unita(:,:) = lake_mon_out_unit_min month_old(:,:) = month @@ -175,10 +177,12 @@ if (month_old(ix,iy) /= month) then allocate (Profile_out(1:nout,1:n_var)) ! Interpolating to given output levels do j = 1, n_var1 - call LININTERPOL (z_full,accum_var(j,ix,iy,:),M+1,z_out,Profile_out(:,j),nout,flag) + work(1:M+1) = accum_var(j,ix,iy,1:M+1) + call LININTERPOL (z_full,work,M+1,z_out,Profile_out(1,j),nout,flag) enddo do j = n_var1+1, n_var - call LININTERPOL (z_half,accum_var(j,ix,iy,:),M ,z_out,Profile_out(:,j),nout,flag) + work(1:M) = accum_var(j,ix,iy,1:M) + call LININTERPOL (z_half,work,M,z_out,Profile_out(1,j),nout,flag) enddo j = nout if (z_out(nout) > z_full(M+1)) then @@ -196,7 +200,8 @@ if (month_old(ix,iy) /= month) then forall (i = 1:M+1, j = 1:n_var1) Profile_out(i,j) = accum_var(j,ix,iy,i) ! Interpolating from cell centers to cell interfaces do j = n_var1+1, n_var - call LININTERPOL (z_half,accum_var(j,ix,iy,:),M ,z_full,Profile_out(:,j),M+1,flag) + work(1:M) = accum_var(j,ix,iy,1:M) + call LININTERPOL (z_half,work,M,z_full,Profile_out(1,j),M+1,flag) enddo ! Writing to file do i = 1, M+1 diff --git a/source/model/salinity_mod.f90 b/source/model/salinity_mod.f90 index 20d3510220781196bcac4157295094067bb27ecc..a822cef4dc5889e5c511cf6f704ab4c391d9a798 100644 --- a/source/model/salinity_mod.f90 +++ b/source/model/salinity_mod.f90 @@ -413,7 +413,8 @@ do j = 2, Mice ! print*, del !enddo cyc - work1 = 0.5*salprev(j)/wst%porice(j) + !work1 = 0.5*salprev(j)/wst%porice(j) + work1 = 0.5*wst%salice(j)/wst%porice(j) resid1 = RESID(work1) !print*, 'resid1', resid1 work2 = work1*2.