Commit f28aa0a1 authored by Espen Sollum's avatar Espen Sollum
Browse files

netCDF output; added (hardcoded) option for writing grid cell volume/area

parent 79abee91
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
LOUTSTEP= 3600, LOUTSTEP= 3600,
LOUTAVER= 3600, LOUTAVER= 3600,
LOUTSAMPLE= 900, LOUTSAMPLE= 900,
ITSPLIT= 99997200, ITSPLIT= 99999999,
LSYNCTIME= 900, LSYNCTIME= 900,
CTL= -5.0000000 , CTL= -5.0000000 ,
IFINE= 4, IFINE= 4,
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
! ESO 2016 ! ESO 2016
! - Deposition fields can be calculated in double precision, see variable ! - Deposition fields can be calculated in double precision, see variable
! 'dep_prec' in par_mod ! 'dep_prec' in par_mod
! - Hardcoded options 'write_vol' and 'write_area' for grid cell
! volume and area
!***************************************************************************** !*****************************************************************************
...@@ -106,6 +108,10 @@ module netcdf_output_mod ...@@ -106,6 +108,10 @@ module netcdf_output_mod
! switch output of release point information on/off ! switch output of release point information on/off
logical, parameter :: write_releases = .true. logical, parameter :: write_releases = .true.
! switch output of grid cell volume and area on/off
logical, parameter :: write_vol = .false.
logical, parameter :: write_area = .false.
contains contains
!**************************************************************** !****************************************************************
...@@ -389,12 +395,11 @@ subroutine writeheader_netcdf(lnest) ...@@ -389,12 +395,11 @@ subroutine writeheader_netcdf(lnest)
call nf90_err(nf90_put_att(ncid, levID, 'long_name', 'height above ground')) call nf90_err(nf90_put_att(ncid, levID, 'long_name', 'height above ground'))
! volume ! volume
call nf90_err(nf90_def_var(ncid, 'volume', nf90_float, (/ lonDimID, latDimID, levDimID /), & if (write_vol) call nf90_err(nf90_def_var(ncid, 'volume', nf90_float, &
volID)) &(/ lonDimID, latDimID, levDimID /), volID))
! area ! area
call nf90_err(nf90_def_var(ncid, 'area', nf90_float, (/ lonDimID, latDimID /), & if (write_area) call nf90_err(nf90_def_var(ncid, 'area', nf90_float, &
areaID)) &(/ lonDimID, latDimID /), areaID))
if (write_releases.eqv..true.) then if (write_releases.eqv..true.) then
...@@ -632,18 +637,22 @@ subroutine writeheader_netcdf(lnest) ...@@ -632,18 +637,22 @@ subroutine writeheader_netcdf(lnest)
call nf90_err(nf90_put_var(ncid, levID, outheight(1:numzgrid))) call nf90_err(nf90_put_var(ncid, levID, outheight(1:numzgrid)))
! volume ! volume
if (write_vol) then
if (lnest) then if (lnest) then
call nf90_err(nf90_put_var(ncid, volID, volumen(:,:,:))) call nf90_err(nf90_put_var(ncid, volID, volumen(:,:,:)))
else else
call nf90_err(nf90_put_var(ncid, volID, volume(:,:,:))) call nf90_err(nf90_put_var(ncid, volID, volume(:,:,:)))
end if end if
end if
! area ! area
if (write_area) then
if (lnest) then if (lnest) then
call nf90_err(nf90_put_var(ncid, areaID, arean(:,:))) call nf90_err(nf90_put_var(ncid, areaID, arean(:,:)))
else else
call nf90_err(nf90_put_var(ncid, areaID, area(:,:))) call nf90_err(nf90_put_var(ncid, areaID, area(:,:)))
end if end if
end if
if (write_releases.eqv..true.) then if (write_releases.eqv..true.) then
! release point information ! release point information
......
...@@ -3,8 +3,3 @@ ...@@ -3,8 +3,3 @@
/ /
/xnilu_wrk/flex_wrk/WIND_FIELDS/AVAILABLE_ECMWF_OPER_fields_global /xnilu_wrk/flex_wrk/WIND_FIELDS/AVAILABLE_ECMWF_OPER_fields_global
============================================ ============================================
/xnilu_wrk/flex_wrk/zhg/ECMWF_CLWC/Availables
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