ESMF_StateGet() can be used to check the existence of items (without raising an ESMF error in case of non-existing items):
type(ESMF_StateItem_Flag) :: itemType call ESMF_StateGet(state, name, itemType) if (itemType .eq. ESMF_STATEITEM_NOTFOUND) then
For more details see:
http://www.earthsystemmodeling.org/esmf_releases/public/last/ESMF_refdoc/node4.html#SECTION04077900000000000000