diff --git a/src/thermo.cpp b/src/thermo.cpp
index 18deecb1a8cb03ff619535f2c53f42dadc4e1d96..d4f7c5cc9e1434e86e8efb45dbcb7c0015ef8a25 100644
--- a/src/thermo.cpp
+++ b/src/thermo.cpp
@@ -402,6 +402,15 @@ void Thermo::compute(int flag)
   firststep = 1;
 }
 
+/* ----------------------------------------------------------------------
+   call function to compute property
+------------------------------------------------------------------------- */
+
+void Thermo::call_vfunc(int ifield)
+{
+  (this->*vfunc[ifield])();
+}
+
 /* ----------------------------------------------------------------------
    check for lost atoms, return current number of atoms
 ------------------------------------------------------------------------- */
diff --git a/src/thermo.h b/src/thermo.h
index d87e8fce3d9e98cb26be277ea9aeeaf5e2f6984f..de2a46dec42f3a87c90c9fd7cac184a178c652ef 100644
--- a/src/thermo.h
+++ b/src/thermo.h
@@ -18,8 +18,13 @@
 
 namespace LAMMPS_NS {
 
+class DumpNetCDF;
+class DumpNetCDFMPIIO;
+
 class Thermo : protected Pointers {
   friend class MinCG;                  // accesses compute_pe
+  friend class DumpNetCDF;             // accesses thermo properties
+  friend class DumpNetCDFMPIIO;        // accesses thermo properties
 
  public:
   char *style;
@@ -112,6 +117,7 @@ class Thermo : protected Pointers {
   typedef void (Thermo::*FnPtr)();
   void addfield(const char *, FnPtr, int);
   FnPtr *vfunc;                // list of ptrs to functions
+  void call_vfunc(int ifield);
 
   void compute_compute();      // functions that compute a single value
   void compute_fix();          // via calls to  Compute,Fix,Variable classes