nc_pflux_tormom Subroutine

public subroutine nc_pflux_tormom(file_id, nout, pflux_tormom, part_tormom_fluxes)

Uses

Write toroidal angular momentum flux to netCDF

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

NetCDF ID of the file to write to

integer, intent(in) :: nout

Current output timestep

real, intent(in), dimension (:,:,:) :: pflux_tormom
real, intent(in), dimension(:) :: part_tormom_fluxes

Contents

Source Code


Source Code

  subroutine nc_pflux_tormom (file_id, nout, pflux_tormom, part_tormom_fluxes)
# ifdef NETCDF
    use run_parameters, only: has_phi
    use neasyf, only: neasyf_write
# endif
    implicit none
    !> NetCDF ID of the file to write to
    integer, intent(in) :: file_id
    !> Current output timestep
    integer, intent (in) :: nout
    real, dimension (:,:,:), intent (in) :: pflux_tormom
    real, dimension(:), intent (in) :: part_tormom_fluxes
# ifdef NETCDF

    if (has_phi) then
       call neasyf_write(file_id, "es_part_tormom_flux", part_tormom_fluxes, &
            dim_names=flux_dims, start=starts(2, nout))
       call neasyf_write(file_id, "es_part_tormom_by_k", pflux_tormom, &
            dim_names=fluxk_dims, start=starts(4, nout))
    end if

# endif
  end subroutine nc_pflux_tormom