nc_get_grid_scalars Subroutine

public subroutine nc_get_grid_scalars(shat, drhodpsi, kxfac, qval, rmaj, B_T, aminor, grhoavg, surfarea)

Read scalar geometry data from the input netCDF file

Arguments

Type IntentOptional Attributes Name
real, intent(out), optional :: shat
real, intent(out), optional :: drhodpsi
real, intent(out), optional :: kxfac
real, intent(out), optional :: qval
real, intent(out), optional :: rmaj
real, intent(out), optional :: B_T
real, intent(out), optional :: aminor
real, intent(out), optional :: grhoavg
real, intent(out), optional :: surfarea

Contents

Source Code


Source Code

  subroutine nc_get_grid_scalars(shat, drhodpsi, kxfac, qval, rmaj, B_T, aminor, grhoavg, surfarea)
    real, intent(out), optional :: shat, drhodpsi, kxfac, qval, rmaj, B_T, aminor, grhoavg, surfarea
# ifdef NETCDF
    if (.not. proc0) return
    if (present(drhodpsi)) call neasyf_read(ncid, "drhodpsi", drhodpsi)
    if (present(rmaj)) call neasyf_read(ncid, "rmaj", rmaj)
    if (present(shat)) call neasyf_read(ncid, "shat", shat)
    if (present(kxfac)) call neasyf_read(ncid, "kxfac", kxfac)
    if (present(qval)) call neasyf_read(ncid, "q", qval)
    if (present(B_T)) call neasyf_read(ncid, "B_T", B_T)
    if (present(aminor)) call neasyf_read(ncid, "aminor", aminor)
    if (present(grhoavg)) call neasyf_read(ncid, "grhoavg", grhoavg)
    if (present(surfarea)) call neasyf_read(ncid, "surfarea", surfarea)
# else
    call mp_abort("nc_get_grid_scalars does not work without NetCDF")
    if (present(drhodpsi)) drhodpsi = 0.0
    if (present(rmaj)) rmaj = 0.0
    if (present(shat)) shat = 0.0
    if (present(kxfac)) kxfac = 0.0
    if (present(qval)) qval = 0.0
    if (present(B_T)) B_T = 0.0
    if (present(aminor)) aminor = 0.0
    if (present(grhoavg)) grhoavg = 0.0
    if (present(surfarea)) surfarea = 0.0
# endif
  end subroutine nc_get_grid_scalars