nc_get_varid Subroutine

public subroutine nc_get_varid(ncid, name, varid, ierr)

Get the variable ID for a named variable

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ncid
character(len=*), intent(in) :: name
integer, intent(out) :: varid
integer, intent(out), optional :: ierr

Non-zero (no matching variable) when present; absent behaves as today (error stop).


Calls

proc~~nc_get_varid~2~~CallsGraph proc~nc_get_varid~2 nc_get_varid nf90_inq_varid nf90_inq_varid proc~nc_get_varid~2->nf90_inq_varid proc~nc_check nc_check proc~nc_get_varid~2->proc~nc_check nf90_strerror nf90_strerror proc~nc_check->nf90_strerror proc~fail fail proc~nc_check->proc~fail error error proc~fail->error proc~error_ring_push error_ring_push proc~fail->proc~error_ring_push

Called by

proc~~nc_get_varid~2~~CalledByGraph proc~nc_get_varid~2 nc_get_varid proc~metrics_fill_from_supergrid metrics_fill_from_supergrid proc~metrics_fill_from_supergrid->proc~nc_get_varid~2 proc~configure_ocean_metrics configure_ocean_metrics proc~configure_ocean_metrics->proc~metrics_fill_from_supergrid proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_metrics proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   subroutine nc_get_varid(ncid, name, varid, ierr)
      !! Get the variable ID for a named variable
      integer, intent(in) :: ncid
      character(len=*), intent(in) :: name
      integer, intent(out) :: varid
      integer, intent(out), optional :: ierr
         !! Non-zero (no matching variable) when present; absent behaves
         !! as today (`error stop`).

      call nc_check(nf90_inq_varid(ncid, name, varid), &
                    "finding variable "//trim(name), ierr)

   end subroutine nc_get_varid