5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_write_fluxes_states Module Reference

Creates NetCDF output for different fluxes and state variables of mHM. More...

Functions/Subroutines

type(outputdataset) function mhm_outputdataset (idomain, mask1)
 Initialize mHM OutputDataset.
 
subroutine mhm_updatedataset (nc_mhm, sidx, eidx, l1_fsealed, l1_fnotsealed, l1_inter, l1_snowpack, l1_soilmoist, l1_soilmoistsat, l1_sealstw, l1_unsatstw, l1_satstw, l1_neutrons, l1_pet, l1_aetsoil, l1_aetcanopy, l1_aetsealed, l1_total_runoff, l1_runoffseal, l1_fastrunoff, l1_slowrunoff, l1_baseflow, l1_percol, l1_infilsoil, l1_preeffect, l1_melt)
 Update all variables.
 
character(16) function fluxesunit (idomain)
 Generate a unit string.
 

Detailed Description

Creates NetCDF output for different fluxes and state variables of mHM.

NetCDF is first initialized and later on variables are put to the NetCDF.

Changelog
  • David Schaefer Aug 2015
    • major rewrite
  • O. Rakovec, R. Kumar Nov 2017
    • added project description for the netcdf outputs
Authors
Matthias Zink
Date
Apr 2013

Function/Subroutine Documentation

◆ fluxesunit()

character(16) function mo_write_fluxes_states::fluxesunit ( integer(i4), intent(in)  idomain)

Generate a unit string.

Generate the unit string for the output variable netcdf attribute based on modeling timestep

Changelog
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
Returns
character(16)
Authors
David Schaefer
Date
June 2015
Parameters
[in]idomainselected domain

Definition at line 450 of file mo_write_fluxes_states.f90.

References fluxesunit(), mo_common_mhm_mrm_variables::ntstepday, mo_common_mhm_mrm_variables::simper, mo_common_mhm_mrm_variables::timestep, and mo_global_variables::timestep_model_outputs.

Referenced by fluxesunit(), and mhm_outputdataset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mhm_outputdataset()

type(outputdataset) function mo_write_fluxes_states::mhm_outputdataset ( integer(i4), intent(in)  idomain,
logical, dimension(:, :), intent(in), pointer  mask1 
)

Initialize mHM OutputDataset.

Create and initialize the output file. If new a new output variable needs to be written, this is the first of two procedures to change (second: updateDataset)

Changelog
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Pallav Shrestha Mar 2020
    • iFlag_cordinate_sys based dimensions (dims)
Returns
type(OutputDataset)
Authors
Matthias Zink
Date
Apr 2013
Parameters
[in]idomaindomain id
[in]mask1L1 mask to reconstruct the data

Definition at line 49 of file mo_write_fluxes_states.f90.

References mo_nc_output::data_dims(), mo_nc_output::data_dtype(), mo_file::file_mhm_output, fluxesunit(), mo_common_variables::level1, mo_mpr_global_variables::nsoilhorizons_mhm, mo_global_variables::output_deflate_level, mo_global_variables::output_double_precision, mo_global_variables::output_time_reference, mo_global_variables::outputflxstate, mo_nc_output::set_attributes(), and mo_global_variables::timestep_model_outputs.

Referenced by mo_mhm_interface_run::mhm_interface_run_write_output().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mhm_updatedataset()

subroutine mo_write_fluxes_states::mhm_updatedataset ( class(outputdataset), intent(inout), target  nc_mhm,
integer(i4), intent(in)  sidx,
integer(i4), intent(in)  eidx,
real(dp), dimension(:), intent(in)  l1_fsealed,
real(dp), dimension(:), intent(in)  l1_fnotsealed,
real(dp), dimension(:), intent(in)  l1_inter,
real(dp), dimension(:), intent(in)  l1_snowpack,
real(dp), dimension(:, :), intent(in)  l1_soilmoist,
real(dp), dimension(:, :), intent(in)  l1_soilmoistsat,
real(dp), dimension(:), intent(in)  l1_sealstw,
real(dp), dimension(:), intent(in)  l1_unsatstw,
real(dp), dimension(:), intent(in)  l1_satstw,
real(dp), dimension(:), intent(in)  l1_neutrons,
real(dp), dimension(:), intent(in)  l1_pet,
real(dp), dimension(:, :), intent(in)  l1_aetsoil,
real(dp), dimension(:), intent(in)  l1_aetcanopy,
real(dp), dimension(:), intent(in)  l1_aetsealed,
real(dp), dimension(:), intent(in)  l1_total_runoff,
real(dp), dimension(:), intent(in)  l1_runoffseal,
real(dp), dimension(:), intent(in)  l1_fastrunoff,
real(dp), dimension(:), intent(in)  l1_slowrunoff,
real(dp), dimension(:), intent(in)  l1_baseflow,
real(dp), dimension(:), intent(in)  l1_percol,
real(dp), dimension(:, :), intent(in)  l1_infilsoil,
real(dp), dimension(:), intent(in)  l1_preeffect,
real(dp), dimension(:), intent(in)  l1_melt 
)

Update all variables.

Call the type bound procedure updateVariable for all output variables. If a new output variable needs to be written, this is the second of two procedures to change (first: newOutputDataset)

Changelog
  • L. Samaniego et al. Dec 2013
    • nullify pointer Matthias Zink, Feb. 2014
    • added aditional output: pet V. Prykhodk, J. Mai, Nov. 2014
    • adding new variable infilSoil
    • case 16 David Schaefer , Jun. 2015
    • major rewrite
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
Authors
Matthias Zink
Date
Apr 2013
Parameters
[in]sidxstart index
[in]eidxend index

Definition at line 283 of file mo_write_fluxes_states.f90.

References mo_mpr_global_variables::nsoilhorizons_mhm, and mo_global_variables::outputflxstate.

Referenced by mo_mhm_interface_run::mhm_interface_run_write_output().

Here is the caller graph for this function: