Feel free to join the next Helmholtz Hacky Hour #30 on Wednesday, June 16, 2021 from 2PM to 3PM!

Commit a5476ccc authored by Akash Koppa's avatar Akash Koppa
Browse files

Added a new namelist variable (tBuffer) to incorporate time buffering

parent 7f5f6b25
File added
......@@ -42,6 +42,8 @@ dStart = 1
yEnd = 1990
mEnd = 12
dEnd = 31
! Number of Time Buffering Days (Divides the EDK processing into chunks accross the time dimension)
tBuffer = 10
!
! -------------------------------------------------------------------
! ------------ INTERPOLATION METHOD ---------------------------------
......
ncols 6
nrows 10
xllcorner 4530000.0
yllcorner 5664000.0
cellsize 4000
NODATA_value -9999
......@@ -25,7 +25,7 @@ program ED_Kriging
use runControl , only: flagEDK, interMth, & ! flag for activate kriging, flag for 'OK' or 'EDK'
correctNeg, & ! pre or temp
flagVario ! flag for activate variogram estimation
use mainVar , only: yStart, yEnd, jStart, jEnd, nSta, & ! interpolation time periods
use mainVar , only: yStart, yEnd, jStart, jEnd, tBuffer, nSta, & ! interpolation time periods
grid, gridMeteo, & ! grid properties of input and output grid
nCell, MetSta, &
noDataValue
......@@ -144,10 +144,10 @@ program ED_Kriging
if (mod((jEnd - jStart + 1),100) .eq. 0) then ! just use mod
iTime = ((jEnd - jStart + 1)/100)
if (mod((jEnd - jStart + 1),tBuffer) .eq. 0) then ! just use mod
iTime = ((jEnd - jStart + 1)/tBuffer)
else
iTime = ((jEnd - jStart + 1)/100) + 1
iTime = ((jEnd - jStart + 1)/tBuffer) + 1
end if
write(*,*),"Total Number of Time Buffers = ",iTime
t = 0
......@@ -163,9 +163,9 @@ program ED_Kriging
! jEndTmp = (jEnd-jStart+1) - ((iTemp-1) * 100)
!end if ! use minimum to never exceed jEnd
jStartTmp = jStart + (iTemp - 1) * 100
jStartTmp = jStart + (iTemp - 1) * tBuffer
if (iTemp .lt. iTime) then
jEndTmp = jStartTmp + 100 - 1
jEndTmp = jStartTmp + tBuffer - 1
else
jEndTmp = jStartTmp + (jEnd-jStartTmp+1)
end if ! use minimum to never exceed jEnd
......
......@@ -27,7 +27,7 @@ contains
!**************************************************************************
subroutine ReadData()
use mainVar, only: noDataValue, cellFactor, DataConvertFactor, &
yStart, mStart, dStart, yEnd, mEnd, dEnd
yStart, mStart, dStart, yEnd, mEnd, dEnd, tBuffer
use mo_kind, only: i4, dp
use mo_julian , only: NDAYS
......@@ -54,7 +54,7 @@ contains
namelist/mainVars/noDataValue, DataPathIn, fNameDEM, &
DataPathOut, FileOut, fNameSTA, cellFactor, DataConvertFactor, InterMth, correctNeg, &
distZero, author_name, projection_name, variable_name, variable_unit, variable_long_name, &
yStart, mStart, dStart, yEnd, mEnd, dEnd, maxDist, flagVario, vType, nParam, &
yStart, mStart, dStart, yEnd, mEnd, dEnd,tBuffer, maxDist, flagVario, vType, nParam, &
fNameVario, dh, hMax, ncIn_variable_name, ncIn_yCoord_name, ncIn_xCoord_name, invert_y
!
! -----------------------------------------------------------------------
......
......@@ -20,6 +20,7 @@ module mainVar
integer(i4) :: dEnd ! ending day
integer(i4) :: jStart ! julian day start
integer(i4) :: jEnd ! julian day end
integer(i4) :: tBuffer ! number of days for time buffering
integer(i4) :: tDays ! number of days
integer(i4) :: nSta ! number of stations for a block
integer(i4) :: nCell ! number of cells to estimate z
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment