Skip to content

Commit

Permalink
#2857 Added MetNcCFDataFile::build_grid_from_lat_lon_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed May 17, 2024
1 parent 2a26d59 commit 33ba41e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -673,4 +673,12 @@ long MetNcCFDataFile::convert_value_to_offset(double z_value, string z_dim_name)
return z_offset;
}

////////////////////////////////////////////////////////////////////////

Grid MetNcCFDataFile::build_grid_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var,
const long lat_counts, const long lon_counts) {
return (nullptr != _file) ? _file->build_grid_from_lat_lon_vars(lat_var, lon_var, lat_counts, lon_counts) : grid();
}


////////////////////////////////////////////////////////////////////////
3 changes: 3 additions & 0 deletions src/libcode/vx_data2d_nc_cf/data2d_nc_cf.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class MetNcCFDataFile : public Met2dDataFile {

void dump(std::ostream &, int = 0) const;

Grid build_grid_from_lat_lon_vars(netCDF::NcVar *lat_var, netCDF::NcVar *lon_var,
const long lat_counts, const long lon_counts);

};


Expand Down

0 comments on commit 33ba41e

Please sign in to comment.