Commit 18db802b authored by Akash Koppa's avatar Akash Koppa

added standard_name to data and calendar attribute to time to conform with EURO CORDEX

parent dc0243f0
No preview for this file type
......@@ -214,7 +214,7 @@ program ED_Kriging
sttemp = nint(tmp_time(1)+1)
cnttemp = nint((tmp_time(size(tmp_time)) - sttemp))+2
write(*,*),"Final Output ",shape(tmp_array)
!write(*,*),"Final Output ",shape(tmp_array)
call nc_time%setData(values=tmp_time,start=(/sttemp/),cnt=(/cnttemp/))
!call nc_data%setData(values=tmp_array,start=(/1,1,sttemp/),cnt=(/size(tmp_array,1),size(tmp_array,2),cnttemp/))
......@@ -263,7 +263,7 @@ program ED_Kriging
sttemp = nint(tmp_time(1)+1)
cnttemp = nint((tmp_time(size(tmp_time)) - sttemp))+2
write(*,*),"Final Output ",shape(tmp_array)
!write(*,*),"Final Output ",shape(tmp_array)
call nc_time%setData(values=tmp_time,start=(/sttemp/),cnt=(/cnttemp/))
!call nc_data%setData(values=tmp_array,start=(/1,1,sttemp/),cnt=(/size(tmp_array,1),size(tmp_array,2),cnttemp/))
......
......@@ -304,8 +304,8 @@ contains
grid%nrows = size(dem_x, dim=1)
grid%ncols = size(dem_x, dim=2)
write(*,*),"Nrows: ",grid%nrows
write(*,*),"Ncols: ",grid%ncols
!write(*,*),"Nrows: ",grid%nrows
!write(*,*),"Ncols: ",grid%ncols
! get latitude and longitude
if(.not. allocated(gridMeteo%latitude)) allocate(gridMeteo%latitude(grid%ncols))
......@@ -556,7 +556,7 @@ contains
call ncdem%getData(temp_h, start = (/1, 1/), cnt = (/nRows, nCols/))
end if
write(*,*),"DEM Source: ",shape(temp_h)
!write(*,*),"DEM Source: ",shape(temp_h)
! read meteo data from nc
ncvar = ncin%getVariable(ncIn_variable_name)
......@@ -564,7 +564,7 @@ contains
!call ncvar%getAttribute('missing_value', missing_value)
call ncvar%getAttribute('_FillValue',missing_value)
write(*,*),"Data Source: ",shape(met_data)
!write(*,*),"Data Source: ",shape(met_data)
! close netcdf file
call ncin%close()
......
......@@ -13,7 +13,7 @@ CONTAINS
use mo_kind, only: i4, sp, dp
use mo_netcdf, only: NcDataset, NcDimension, NcVariable
use mo_string_utils, only: num2str
use mainVar, only: gridMeteo, yStart, mStart, dStart, DEMNcFlag
use mainVar, only: gridMeteo, yStart, mStart, dStart, DEMNcFlag, DataConvertFactor
use NetCDFVar, only: fileOut, author_name, variable_name, variable_unit, variable_long_name, projection_name,invert_y, variable_standard_name, variable_calendar_type, ncOut_dem_Latitude, ncOut_dem_Longitude
implicit none
......@@ -46,6 +46,7 @@ CONTAINS
call var_time%setAttribute("units", "days since " // trim(num2str(yStart, form='(I4)')) // "-"// &
trim(num2str(mStart, form='(I0.2)')) // "-" // &
trim(num2str(dStart, form='(I0.2)')) // "-" // "00:00:00")
call var_time%setAttribute("calendar", variable_calendar_type)
if (DEMNcFlag == 1) then
var_north = nc%setVariable('northing', 'f32', (/dim_x, dim_y/))
......@@ -92,8 +93,10 @@ CONTAINS
! add some more variable attributes
call var_data%setAttribute("units", trim(variable_unit))
call var_data%setAttribute("long_name", trim(variable_long_name))
call var_data%setAttribute("scaling", 0.1_dp)
call var_data%setAttribute("standard_name",trim(variable_standard_name))
call var_data%setAttribute("scaling", DataConvertFactor)
call var_data%setAttribute("missing_value", -9999._dp)
! add global attributes
call nc%setAttribute("Author", trim(author_name))
......
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