ESMF_InfoReadJSON Function

public function ESMF_InfoReadJSON(filename, keywordEnforcer, rc) result(info_r)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Return Value type(ESMF_Info)


Calls

proc~~esmf_inforeadjson~~CallsGraph proc~esmf_inforeadjson ESMF_InfoReadJSON interface~c_info_read_json c_info_read_json proc~esmf_inforeadjson->interface~c_info_read_json interface~esmf_infocreate ESMF_InfoCreate proc~esmf_inforeadjson->interface~esmf_infocreate proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_inforeadjson->proc~esmf_logfounderror proc~esmf_infocreatebykey ESMF_InfoCreateByKey interface~esmf_infocreate->proc~esmf_infocreatebykey proc~esmf_infocreatebyparse ESMF_InfoCreateByParse interface~esmf_infocreate->proc~esmf_infocreatebyparse proc~esmf_infocreateempty ESMF_InfoCreateEmpty interface~esmf_infocreate->proc~esmf_infocreateempty proc~esmf_infocreatefrominfo ESMF_InfoCreateFromInfo interface~esmf_infocreate->proc~esmf_infocreatefrominfo esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite proc~esmf_infocreatebykey->proc~esmf_logfounderror interface~c_info_create_by_key c_info_create_by_key proc~esmf_infocreatebykey->interface~c_info_create_by_key proc~esmf_infocreatebyparse->proc~esmf_logfounderror interface~c_info_create_by_parse c_info_create_by_parse proc~esmf_infocreatebyparse->interface~c_info_create_by_parse proc~esmf_infocreateempty->proc~esmf_logfounderror interface~c_info_create c_info_create proc~esmf_infocreateempty->interface~c_info_create proc~esmf_infocreatefrominfo->proc~esmf_logfounderror interface~c_info_copy c_info_copy proc~esmf_infocreatefrominfo->interface~c_info_copy c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_inforeadjson~~CalledByGraph proc~esmf_inforeadjson ESMF_InfoReadJSON proc~esmf_attributereadarray ESMF_AttributeReadArray proc~esmf_attributereadarray->proc~esmf_inforeadjson proc~esmf_attributereadarraybundle ESMF_AttributeReadArrayBundle proc~esmf_attributereadarraybundle->proc~esmf_inforeadjson proc~esmf_attributereadcplcomp ESMF_AttributeReadCplComp proc~esmf_attributereadcplcomp->proc~esmf_inforeadjson proc~esmf_attributereaddistgrid ESMF_AttributeReadDistGrid proc~esmf_attributereaddistgrid->proc~esmf_inforeadjson proc~esmf_attributereadfield ESMF_AttributeReadField proc~esmf_attributereadfield->proc~esmf_inforeadjson proc~esmf_attributereadfieldbundle ESMF_AttributeReadFieldBundle proc~esmf_attributereadfieldbundle->proc~esmf_inforeadjson proc~esmf_attributereadgrid ESMF_AttributeReadGrid proc~esmf_attributereadgrid->proc~esmf_inforeadjson proc~esmf_attributereadgridcomp ESMF_AttributeReadGridComp proc~esmf_attributereadgridcomp->proc~esmf_inforeadjson proc~esmf_attributereadlocstream ESMF_AttributeReadLocStream proc~esmf_attributereadlocstream->proc~esmf_inforeadjson proc~esmf_attributereadmesh ESMF_AttributeReadMesh proc~esmf_attributereadmesh->proc~esmf_inforeadjson proc~esmf_attributereadscicomp ESMF_AttributeReadSciComp proc~esmf_attributereadscicomp->proc~esmf_inforeadjson proc~esmf_attributereadstate ESMF_AttributeReadState proc~esmf_attributereadstate->proc~esmf_inforeadjson program~esmf_infoutest ESMF_InfoUTest program~esmf_infoutest->proc~esmf_inforeadjson interface~esmf_attributeread ESMF_AttributeRead interface~esmf_attributeread->proc~esmf_attributereadarray interface~esmf_attributeread->proc~esmf_attributereadarraybundle interface~esmf_attributeread->proc~esmf_attributereadcplcomp interface~esmf_attributeread->proc~esmf_attributereaddistgrid interface~esmf_attributeread->proc~esmf_attributereadfield interface~esmf_attributeread->proc~esmf_attributereadfieldbundle interface~esmf_attributeread->proc~esmf_attributereadgrid interface~esmf_attributeread->proc~esmf_attributereadgridcomp interface~esmf_attributeread->proc~esmf_attributereadlocstream interface~esmf_attributeread->proc~esmf_attributereadmesh interface~esmf_attributeread->proc~esmf_attributereadscicomp interface~esmf_attributeread->proc~esmf_attributereadstate

Source Code

function ESMF_InfoReadJSON(filename, keywordEnforcer, rc) result(info_r)
! !ARGUMENTS:
  character(len=*), intent(in) :: filename
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
  integer, intent(out), optional :: rc
! !RETURN VALUE:
  type(ESMF_Info) :: info_r
!
! !DESCRIPTION:
!     Read JSON data from a file and return a new \texttt{ESMF\_Info} object.
!
!     The arguments are:
!     \begin{description}
!     \item [filename]
!       Path to the input file.
!     \item [{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!EOP

  integer :: localrc

  localrc = ESMF_FAILURE
  if (present(rc)) rc = ESMF_FAILURE

  info_r = ESMF_InfoCreate(rc=localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

  call c_info_read_json(info_r%ptr, trim(filename)//C_NULL_CHAR, localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

  if (present(rc)) rc = ESMF_SUCCESS
end function ESMF_InfoReadJSON