get_v1d_netcdf_R8 Subroutine

public subroutine get_v1d_netcdf_R8(filename, name, array, Xdim, group_name, rc)

Uses

    • netcdf
  • proc~~get_v1d_netcdf_r8~~UsesGraph proc~get_v1d_netcdf_r8 get_v1d_netcdf_R8 netcdf netcdf proc~get_v1d_netcdf_r8->netcdf

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
character(len=*), intent(in) :: name
real(kind=REAL64), intent(out), dimension(Xdim) :: array
integer, intent(in) :: Xdim
character(len=*), intent(in), optional :: group_name
integer, intent(out), optional :: rc

Calls

proc~~get_v1d_netcdf_r8~~CallsGraph proc~get_v1d_netcdf_r8 get_v1d_netcdf_R8 nf90_close nf90_close proc~get_v1d_netcdf_r8->nf90_close nf90_get_var nf90_get_var proc~get_v1d_netcdf_r8->nf90_get_var nf90_inq_ncid nf90_inq_ncid proc~get_v1d_netcdf_r8->nf90_inq_ncid nf90_inq_varid nf90_inq_varid proc~get_v1d_netcdf_r8->nf90_inq_varid nf90_open nf90_open proc~get_v1d_netcdf_r8->nf90_open proc~check_nc_status check_nc_status proc~get_v1d_netcdf_r8->proc~check_nc_status proc~mapl_return MAPL_Return proc~get_v1d_netcdf_r8->proc~mapl_return proc~mapl_verify MAPL_Verify proc~get_v1d_netcdf_r8->proc~mapl_verify proc~check_nc_status->proc~mapl_return interface~mapl_assert MAPL_Assert proc~check_nc_status->interface~mapl_assert nf90_strerror nf90_strerror proc~check_nc_status->nf90_strerror at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

  subroutine get_v1d_netcdf_R8(filename, name, array, Xdim, group_name, rc)
    use netcdf
    implicit none
    character(len=*), intent(in) :: name, filename
    character(len=*), optional, intent(in) :: group_name
    integer, intent(in) :: Xdim
    real(REAL64), dimension(Xdim), intent(out) :: array
    integer, optional, intent(out) :: rc
    integer :: status
    integer :: ncid, varid, ncid2

    call check_nc_status(nf90_open(trim(fileName), NF90_NOWRITE, ncid), _RC)
    if(present(group_name)) then
       ncid2= ncid
       call check_nc_status(nf90_inq_ncid(ncid2, group_name, ncid), _RC)
    end if
    call check_nc_status(nf90_inq_varid(ncid, name, varid), _RC)
    call check_nc_status(nf90_get_var(ncid, varid, array), _RC)
    if(present(group_name)) then
       call check_nc_status(nf90_close(ncid2), _RC)
    else
       call check_nc_status(nf90_close(ncid), _RC)
    end if
    _RETURN(_SUCCESS)

  end subroutine get_v1d_netcdf_R8