From 1e64ebda461e3372e48f722703312a3cad10ade1 Mon Sep 17 00:00:00 2001 From: muellese Date: Tue, 16 Mar 2021 15:03:55 +0100 Subject: [PATCH 1/2] NetCDF: add deflate and precision option for output NetCDF files --- mhm_outputs.nml | 20 +++++++++++-------- mrm_outputs.nml | 4 ++++ src/mHM/mo_global_variables.f90 | 2 ++ src/mHM/mo_mhm_read_config.f90 | 17 ++++++++++++++-- src/mHM/mo_write_fluxes_states.f90 | 27 ++++++++++++++++++-------- src/mRM/mo_mrm_global_variables.f90 | 3 ++- src/mRM/mo_mrm_read_config.f90 | 18 ++++++++++++++--- src/mRM/mo_mrm_write_fluxes_states.f90 | 27 ++++++++++++++++++-------- 8 files changed, 88 insertions(+), 30 deletions(-) diff --git a/mhm_outputs.nml b/mhm_outputs.nml index 61b7676d..5a53416f 100644 --- a/mhm_outputs.nml +++ b/mhm_outputs.nml @@ -1,7 +1,7 @@ ! Emacs: -*- mode: f90 -*- !1) First give the timestep for writing gridded model outputs -! It should be integer and has to be perfectly divisible +! It should be integer and has to be perfectly divisible ! by the number of total modeling time steps !2) Define main outputs of the model as namelist ! the particular output flag is specified as .TRUE. / .FALSE @@ -9,6 +9,10 @@ ! SYNTAX = ".TRUE." or ".FALSE." &NLoutputResults ! +! NetCDF output settings +output_deflate_level = 6 +output_double_precision = .true. +! ! switch to control write out frequency of the gridded model outputs below ! >0: after each time steps ! 0: only at end of run @@ -30,14 +34,14 @@ outputFlxState(2)=.TRUE. ! soil water content in the single layers (L1_soilMoist) -- case 3 outputFlxState(3)=.TRUE. ! -! volumetric soil moisture in the single +! volumetric soil moisture in the single ! layers (L1_soilMoist / L1_soilMoistSat ) ! [mm/mm] -- case 4 -! +! outputFlxState(4)=.TRUE. ! -! mean volumetric soil moisture averaged -! over all soil layers (L1_soilMoist / L1_soilMoistSat ) +! mean volumetric soil moisture averaged +! over all soil layers (L1_soilMoist / L1_soilMoistSat ) ! [mm/mm] -- case 5 outputFlxState(5)=.TRUE. ! @@ -59,10 +63,10 @@ outputFlxState(18)=.FALSE. !---------------- ! ! potential evapotranspiration PET [mm/T] -- case 9 -outputFlxState(9)=.TRUE. +outputFlxState(9)=.TRUE. ! ! actual evapotranspiration aET [mm/T] -- case 10 -outputFlxState(10)=.TRUE. +outputFlxState(10)=.TRUE. ! ! total discharge generated per cell (L1_total_runoff) [mm/T] -- case 11 outputFlxState(11)=.TRUE. @@ -86,7 +90,7 @@ outputFlxState(16)=.TRUE. outputFlxState(17)=.FALSE. ! ! actual evapotranspiration from the soil layers [mm/T] -- case 19 -outputFlxState(19)=.TRUE. +outputFlxState(19)=.TRUE. ! ! effective precipitation (L1_preEffect) [mm/T] -- case 20 outputFlxState(20)=.TRUE. diff --git a/mrm_outputs.nml b/mrm_outputs.nml index 911df9a5..b32fb91a 100644 --- a/mrm_outputs.nml +++ b/mrm_outputs.nml @@ -9,6 +9,10 @@ ! SYNTAX = ".TRUE." or ".FALSE." &NLoutputResults ! +! NetCDF output settings +output_deflate_level_mrm = 6 +output_double_precision_mrm = .true. +! ! switch to control write out frequency of the gridded model outputs below ! >0: after each time steps ! 0: only at end of run diff --git a/src/mHM/mo_global_variables.f90 b/src/mHM/mo_global_variables.f90 index 45f83b71..b08e5a7d 100644 --- a/src/mHM/mo_global_variables.f90 +++ b/src/mHM/mo_global_variables.f90 @@ -52,6 +52,8 @@ MODULE mo_global_variables ! ------------------------------------------------------------------- ! DEFINE OUTPUTS ! ------------------------------------------------------------------- + integer(i4) :: output_deflate_level + logical :: output_double_precision integer(i4) :: timeStep_model_outputs ! timestep for writing model outputs logical, dimension(nOutFlxState) :: outputFlxState ! Define model outputs see "mhm_outputs.nml" ! dim1 = number of output variables to be written diff --git a/src/mHM/mo_mhm_read_config.f90 b/src/mHM/mo_mhm_read_config.f90 index ecb2f0e7..2aa9cb29 100644 --- a/src/mHM/mo_mhm_read_config.f90 +++ b/src/mHM/mo_mhm_read_config.f90 @@ -101,7 +101,8 @@ CONTAINS fnight_pet, fnight_prec, fnight_temp, fnight_ssrd, fnight_strd, & inputFormat_meteo_forcings, nSoilHorizons_sm_input, outputFlxState, & read_meteo_weights, timeStep_model_outputs, & - timestep_model_inputs + timestep_model_inputs, & + output_deflate_level, output_double_precision use mo_message, only : message use mo_mpr_constants, only : maxNoSoilHorizons use mo_mpr_global_variables, only : nSoilHorizons_mHM @@ -187,7 +188,11 @@ CONTAINS namelist /nightDayRatio/ read_meteo_weights, & fnight_prec, fnight_pet, fnight_temp, fnight_ssrd, fnight_strd ! name list regarding output - namelist /NLoutputResults/timeStep_model_outputs, outputFlxState + namelist /NLoutputResults/ & + output_deflate_level, & + output_double_precision, & + timeStep_model_outputs, & + outputFlxState !=============================================================== ! Read namelist main directories @@ -353,6 +358,8 @@ CONTAINS ! Read output specifications for mHM !=============================================================== call open_nml(file_defOutput, udefOutput, quiet = .true.) + output_deflate_level = 6 + output_double_precision = .true. outputFlxState = .FALSE. call position_nml('NLoutputResults', udefOutput) read(udefOutput, nml = NLoutputResults) @@ -360,6 +367,12 @@ CONTAINS call message('') call message('Following output will be written:') + call message(' NetCDF deflate level: ', adjustl(trim(num2str(output_deflate_level)))) + if ( output_double_precision ) then + call message(' NetCDF output precision: double') + else + call message(' NetCDF output precision: single') + end if call message(' STATES:') if (outputFlxState(1)) then call message(' interceptional storage (L1_inter) [mm]') diff --git a/src/mHM/mo_write_fluxes_states.f90 b/src/mHM/mo_write_fluxes_states.f90 index ad61f760..5b686a75 100755 --- a/src/mHM/mo_write_fluxes_states.f90 +++ b/src/mHM/mo_write_fluxes_states.f90 @@ -20,6 +20,7 @@ module mo_write_fluxes_states Conventions, contact, mHM_details, history use mo_common_constants, only : nodata_dp use mo_netcdf, only : NcDataset, NcDimension, NcVariable + use mo_global_variables, only : output_deflate_level, output_double_precision implicit none @@ -123,7 +124,7 @@ contains allocate(out%data(ncells)) - out%nc = nc%setVariable(name, dtype, dims, deflate_level = 1, shuffle = .true.) + out%nc = nc%setVariable(name, dtype, dims, deflate_level = output_deflate_level, shuffle = .true.) out%data = 0 out%mask => mask if (present(avg)) out%avg = avg @@ -269,7 +270,11 @@ contains type(OutputVariable), dimension(size(outputFlxState) * nSoilHorizons_mHM) :: tmpvars - dtype = "f64" + if ( output_double_precision ) then + dtype = "f64" + else + dtype = "f32" + end if unit = fluxesUnit(iDomain) if (iFlag_cordinate_sys == 0) then @@ -916,7 +921,13 @@ contains real(dp), allocatable, dimension(:, :) :: lat2d, lon2d ! temporary storage of mHM's 2D latlon array. ! Used as 2d lat lon arrays if coordinate system is X & Y + character(3) :: dtype + if ( output_double_precision ) then + dtype = "f64" + else + dtype = "f32" + end if fname = trim(dirOut(iDomain)) // 'mHM_Fluxes_States.nc' call geoCoordinates(level1(iDomain), lat2d, lon2d) @@ -936,23 +947,23 @@ contains nc%setDimension("time", 0) & /) ! northing - var = nc%setVariable("northing", "f64", (/ dimids1(2) /)) + var = nc%setVariable("northing", dtype, (/ dimids1(2) /)) call var%setData(northing) call var%setAttribute("units", "m or degrees_north") call var%setAttribute("long_name", "y-coordinate in the given coordinate system") ! easting - var = nc%setVariable("easting", "f64", (/ dimids1(1) /)) + var = nc%setVariable("easting", dtype, (/ dimids1(1) /)) call var%setData(easting) call var%setAttribute("units", "m or degrees_north") call var%setAttribute("long_name", "x-coordinate in the given coordinate system") ! lon - var = nc%setVariable("lon", "f64", dimids1(1 : 2)) + var = nc%setVariable("lon", dtype, dimids1(1 : 2)) call var%setData(lon2d) call var%setAttribute("units", "degrees_east") call var%setAttribute("long_name", "longitude") call var%setAttribute("missing_value", nodata_dp) ! lat - var = nc%setVariable("lat", "f64", dimids1(1 : 2)) + var = nc%setVariable("lat", dtype, dimids1(1 : 2)) call var%setData(lat2d) call var%setAttribute("units", "degrees_north") call var%setAttribute("long_name", "latitude") @@ -970,13 +981,13 @@ contains nc%setDimension("time", 0) & /) ! lon - var = nc%setVariable("lon", "f64", (/ dimids1(1) /)) ! sufficient to store lon as vector + var = nc%setVariable("lon", dtype, (/ dimids1(1) /)) ! sufficient to store lon as vector call var%setData(lon1d) call var%setAttribute("units", "degrees_east") call var%setAttribute("long_name", "longitude") call var%setAttribute("missing_value", nodata_dp) ! lat - var = nc%setVariable("lat", "f64", (/ dimids1(2) /)) ! sufficient to store lat as vector + var = nc%setVariable("lat", dtype, (/ dimids1(2) /)) ! sufficient to store lat as vector call var%setData(lat1d) call var%setAttribute("units", "degrees_north") call var%setAttribute("long_name", "latitude") diff --git a/src/mRM/mo_mrm_global_variables.f90 b/src/mRM/mo_mrm_global_variables.f90 index 1331bc88..93e0b3c9 100644 --- a/src/mRM/mo_mrm_global_variables.f90 +++ b/src/mRM/mo_mrm_global_variables.f90 @@ -33,8 +33,9 @@ module mo_mrm_global_variables ! DEFINE OUTPUTS ! ------------------------------------------------------------------- ! + integer(i4) :: output_deflate_level_mrm + logical :: output_double_precision_mrm integer(i4) :: timeStep_model_outputs_mrm ! timestep for writing model outputs - logical, dimension(nOutFlxState) :: outputFlxState_mrm ! Define model outputs see "mhm_outputs.nml" ! dim1 = number of output variables to be written diff --git a/src/mRM/mo_mrm_read_config.f90 b/src/mRM/mo_mrm_read_config.f90 index d992d6b7..ba484b53 100644 --- a/src/mRM/mo_mrm_read_config.f90 +++ b/src/mRM/mo_mrm_read_config.f90 @@ -65,7 +65,8 @@ contains dirGauges, dirTotalRunoff, filenameTotalRunoff, dirBankfullRunoff, gauge, is_start, & nGaugesTotal, nGaugesLocal, nInflowGaugesTotal, outputFlxState_mrm, & timeStep_model_outputs_mrm, & - varnameTotalRunoff, gw_coupling + varnameTotalRunoff, gw_coupling, & + output_deflate_level_mrm, output_double_precision_mrm use mo_nml, only : close_nml, open_nml, position_nml use mo_string_utils, only : num2str @@ -122,7 +123,11 @@ contains namelist /inflow_gauges/ nInflowGaugesTotal, NoInflowGauges_domain, InflowGauge_id, & InflowGauge_filename, InflowGauge_Headwater ! name list regarding output - namelist /NLoutputResults/timeStep_model_outputs_mrm, outputFlxState_mrm + namelist /NLoutputResults/ & + output_deflate_level_mrm, & + output_double_precision_mrm, & + timeStep_model_outputs_mrm, & + outputFlxState_mrm !=============================================================== ! INITIALIZATION @@ -354,6 +359,8 @@ contains !=============================================================== ! Read Output specifications for mRM !=============================================================== + output_deflate_level_mrm = 6 + output_double_precision_mrm = .true. outputFlxState_mrm = .FALSE. timeStep_model_outputs_mrm = -2 inquire(file = file_defOutput, exist = file_exists) @@ -372,7 +379,12 @@ contains if (any(outputFlxState_mrm)) then call message('') call message(' Following output will be written:') - + call message(' NetCDF deflate level: ', adjustl(trim(num2str(output_deflate_level_mrm)))) + if ( output_double_precision_mrm ) then + call message(' NetCDF output precision: double') + else + call message(' NetCDF output precision: single') + end if call message(' FLUXES:') if (outputFlxState_mrm(1)) then call message(' routed streamflow (L11_qMod) [m3 s-1]') diff --git a/src/mRM/mo_mrm_write_fluxes_states.f90 b/src/mRM/mo_mrm_write_fluxes_states.f90 index 0d36f8a8..efe378e2 100644 --- a/src/mRM/mo_mrm_write_fluxes_states.f90 +++ b/src/mRM/mo_mrm_write_fluxes_states.f90 @@ -20,6 +20,7 @@ module mo_mrm_write_fluxes_states Conventions, contact, mHM_details, history use mo_common_constants, only : nodata_dp use mo_netcdf, only : NcDataset, NcDimension, NcVariable + use mo_mrm_global_variables, only : output_deflate_level_mrm, output_double_precision_mrm implicit none @@ -120,7 +121,7 @@ contains allocate(out%data(ncells)) - out%nc = nc%setVariable(name, dtype, dims, deflate_level = 1, shuffle = .true.) + out%nc = nc%setVariable(name, dtype, dims, deflate_level = output_deflate_level_mrm, shuffle = .true.) out%data = 0 out%mask => mask if (present(avg)) out%avg = avg @@ -262,7 +263,11 @@ contains type(OutputVariable), dimension(size(outputFlxState_mrm)) :: tmpvars - dtype = "f64" + if ( output_double_precision_mrm ) then + dtype = "f64" + else + dtype = "f32" + end if if (iFlag_cordinate_sys == 0) then dims1 = (/"easting ", "northing", "time "/) ! X & Y coordinate system @@ -518,7 +523,13 @@ contains real(dp), allocatable, dimension(:, :) :: lat2d, lon2d ! temporary storage of mHM's 2D latlon array. ! Used as 2d lat lon arrays if coordinate system is X & Y + character(3) :: dtype + if ( output_double_precision_mrm ) then + dtype = "f64" + else + dtype = "f32" + end if fname = trim(dirOut(iDomain)) // trim(file_mrm_output) call geoCoordinates(level11(iDomain), lat2d, lon2d) @@ -538,23 +549,23 @@ contains nc%setDimension("time", 0) & /) ! northing - var = nc%setVariable("northing", "f64", (/ dimids1(2) /)) + var = nc%setVariable("northing", dtype, (/ dimids1(2) /)) call var%setData(northing) call var%setAttribute("units", "m") call var%setAttribute("long_name", "y-coordinate in the given coordinate system") ! easting - var = nc%setVariable("easting", "f64", (/ dimids1(1) /)) + var = nc%setVariable("easting", dtype, (/ dimids1(1) /)) call var%setData(easting) call var%setAttribute("units", "m") call var%setAttribute("long_name", "x-coordinate in the given coordinate system") ! lon - var = nc%setVariable("lon", "f64", dimids1(1 : 2)) + var = nc%setVariable("lon", dtype, dimids1(1 : 2)) call var%setData(lon2d) call var%setAttribute("units", "degrees_east") call var%setAttribute("long_name", "longitude") call var%setAttribute("missing_value", nodata_dp) ! lat - var = nc%setVariable("lat", "f64", dimids1(1 : 2)) + var = nc%setVariable("lat", dtype, dimids1(1 : 2)) call var%setData(lat2d) call var%setAttribute("units", "degrees_north") call var%setAttribute("long_name", "latitude") @@ -572,13 +583,13 @@ contains nc%setDimension("time", 0) & /) ! lon - var = nc%setVariable("lon", "f64", (/ dimids1(1) /)) ! sufficient to store lon as vector + var = nc%setVariable("lon", dtype, (/ dimids1(1) /)) ! sufficient to store lon as vector call var%setData(lon1d) call var%setAttribute("units", "degrees_east") call var%setAttribute("long_name", "longitude") call var%setAttribute("missing_value", nodata_dp) ! lat - var = nc%setVariable("lat", "f64", (/ dimids1(2) /)) ! sufficient to store lat as vector + var = nc%setVariable("lat", dtype, (/ dimids1(2) /)) ! sufficient to store lat as vector call var%setData(lat1d) call var%setAttribute("units", "degrees_north") call var%setAttribute("long_name", "latitude") -- GitLab From f5bda944da1771c858e6fbd97d9801a8c1a1beaf Mon Sep 17 00:00:00 2001 From: muellese Date: Tue, 16 Mar 2021 15:07:58 +0100 Subject: [PATCH 2/2] NetCDF: remove old mo_set_netcdf_outputs --- src/mHM/mo_set_netcdf_outputs.f90 | 249 ------------------------------ 1 file changed, 249 deletions(-) delete mode 100644 src/mHM/mo_set_netcdf_outputs.f90 diff --git a/src/mHM/mo_set_netcdf_outputs.f90 b/src/mHM/mo_set_netcdf_outputs.f90 deleted file mode 100644 index b0e8d4fb..00000000 --- a/src/mHM/mo_set_netcdf_outputs.f90 +++ /dev/null @@ -1,249 +0,0 @@ -!> \file mo_set_netcdf_outputs.f90 - -!> \brief Defines the structure of the netCDF to write the output in. - -!> \details All output variables are initialized for the NetCDF. - -!> \authors Matthias Zink - -!> \date Apr 2013 - -! Modifications: - -MODULE mo_set_netcdf_outputs - - ! This module defines the NetCDF variables. - - ! Written Matthias Zink, Apr 2013 - - USE mo_kind, ONLY : i4 - - IMPLICIT NONE - - PRIVATE - - PUBLIC :: set_netCDF - - ! ------------------------------------------------------------------ - -CONTAINS - - ! ------------------------------------------------------------------ - - ! NAME - ! set_netCDF - - ! PURPOSE - !> \brief Runs mhm with a specific parameter set and returns required variables, e.g. runoff. - - !> \details Runs mhm with a specific parameter set and returns required variables, e.g. runoff. - - ! INTENT(IN) - !> \param[in] "integer(i4) :: NoNetcdfVars" - !> \param[in] "integer(i4) :: nrows" - !> \param[in] "integer(i4) :: ncols" - - ! HISTORY - !> \authors Matthias Zink - - !> \date Apr 2013 - - ! Modifications: - ! Robert Schweppe Jun 2018 - refactoring and reformatting - - - subroutine set_netCDF(NoNetcdfVars, nrows, ncols) - - use mo_NCWrite, only : Dnc, V, nVars, ndims - use netcdf, only : NF90_CHAR, NF90_DOUBLE, NF90_INT, NF90_UNLIMITED - - implicit none - - integer(i4), intent(in) :: NoNetcdfVars - - integer(i4), intent(in) :: nrows - - integer(i4), intent(in) :: ncols - - integer(i4) :: i - - - ! - ! define output file - ! - ! define parameters - nDims = 3 ! nr. dim types - nVars = 5 + NoNetcdfVars ! total nr. var to print - ! - ! allocate arrays - if (allocated(Dnc)) deallocate (Dnc) - if (allocated(V)) deallocate (V) - allocate (Dnc(nDims)) - allocate (V(nVars)) - ! - ! define dimensions (coordinates) => corresponding variable must be created - i = 1 - Dnc(i)%name = "easting" - Dnc(i)%len = nrows - ! - i = 2 - Dnc(i)%name = "northing" - Dnc(i)%len = ncols - ! - i = 3 - Dnc(i)%name = "time" - Dnc(i)%len = NF90_UNLIMITED - - ! - ! - ! DIMENSION VARIABLES - i = 1 - V(i)%name = Dnc(i)%name - V(i)%xType = NF90_DOUBLE - V(i)%nLvls = 0 - V(i)%nSubs = 0 - V(i)%nDims = 1 - V(i)%dimTypes = (/i, 0, 0, 0, 0/) - V(i)%wFlag = .true. - ! attributes (other possibilities: add_offset, valid_min, valid_max) - V(i)%nAtt = 2 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - V(i)%att(1)%values = "m" - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - V(i)%att(2)%values = "x-coordinate in the given coordinate system" - ! - i = 2 - V(i)%name = Dnc(i)%name - V(i)%xType = NF90_DOUBLE - V(i)%nLvls = 0 - V(i)%nSubs = 0 - V(i)%nDims = 1 - V(i)%dimTypes = (/i, 0, 0, 0, 0/) - ! printing - V(i)%wFlag = .true. - ! attributes - V(i)%nAtt = 2 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - V(i)%att(1)%values = "m" - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - V(i)%att(2)%values = "y-coordinate in the given coordinate system" - ! - i = 3 - V(i)%name = Dnc(i)%name - V(i)%xType = NF90_INT - V(i)%nLvls = 0 - V(i)%nSubs = 0 - V(i)%nDims = 1 - V(i)%dimTypes = (/i, 0, 0, 0, 0/) - V(i)%wFlag = .true. - ! attributes - V(i)%nAtt = 2 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - V(i)%att(2)%values = "time" - ! - i = 4 - V(i)%name = "lon" - V(i)%xType = NF90_DOUBLE - V(i)%nLvls = 1 - V(i)%nSubs = 1 - V(i)%nDims = 2 - V(i)%dimTypes = (/1, 2, 0, 0, 0/) - V(i)%wFlag = .true. - ! attributes - V(i)%nAtt = 2 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - V(i)%att(1)%values = "degrees_east" - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - V(i)%att(2)%values = "longitude" - ! - i = 5 - V(i)%name = "lat" - V(i)%xType = NF90_DOUBLE - V(i)%nLvls = 1 - V(i)%nSubs = 1 - V(i)%nDims = 2 - V(i)%dimTypes = (/1, 2, 0, 0, 0/) - V(i)%wFlag = .true. - ! attributes - V(i)%nAtt = 2 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - V(i)%att(1)%values = "degrees_north" - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - V(i)%att(2)%values = "latitude" - ! - ! ****************************** - ! dynamic variables data - ! ****************************** - do i = 6, NoNetcdfVars + 5 - V(i)%xType = NF90_DOUBLE - V(i)%nLvls = 1 - V(i)%nSubs = 1 - V(i)%nDims = 3 - V(i)%dimTypes = (/1, 2, 3, 0, 0/) - ! printing - V(i)%wFlag = .true. - ! pointer - ! during running time - ! attributes - V(i)%nAtt = 6 - ! - V(i)%att(1)%name = "units" - V(i)%att(1)%xType = NF90_CHAR - V(i)%att(1)%nValues = 1 - ! - V(i)%att(2)%name = "long_name" - V(i)%att(2)%xType = NF90_CHAR - V(i)%att(2)%nValues = 1 - ! - V(i)%att(3)%name = "scale_factor" - V(i)%att(3)%xType = NF90_DOUBLE - V(i)%att(3)%nValues = 1 - ! - V(i)%att(4)%name = "_FillValue" - V(i)%att(4)%xType = NF90_DOUBLE - V(i)%att(4)%nValues = 1 - ! - V(i)%att(5)%name = "missing_value" - V(i)%att(5)%xType = NF90_DOUBLE - V(i)%att(5)%nValues = 1 - ! ! - V(i)%att(6)%name = "coordinates" - V(i)%att(6)%xType = NF90_CHAR - V(i)%att(6)%nValues = 1 - end do - ! - ! - end subroutine set_netCDF - -END MODULE mo_set_netcdf_outputs -- GitLab