Skip to content

Commit

Permalink
Per #1954, rename from unstructured grid to semilatlon grid to avoid …
Browse files Browse the repository at this point in the history
…confusion.
  • Loading branch information
JohnHalleyGotway committed Aug 17, 2022
1 parent 36611f6 commit 76dafdb
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 112 deletions.
10 changes: 5 additions & 5 deletions src/libcode/vx_data2d_python/grid_from_python_dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const char merc_string [] = "Mercator";
static const char latlon_string [] = "LatLon";
static const char rotated_latlon_string [] = "Rotated LatLon";
static const char gaussian_string [] = "Gaussian";
static const char unstructured_string [] = "Unstructured";
static const char semilatlon_string [] = "SemiLatLon";


////////////////////////////////////////////////////////////////////////
Expand All @@ -42,7 +42,7 @@ static void get_merc_grid (const Python3_Dict & dict, Grid & g);
static void get_latlon_grid (const Python3_Dict & dict, Grid & g);
static void get_rotated_latlon_grid (const Python3_Dict & dict, Grid & g);
static void get_gaussian_grid (const Python3_Dict & dict, Grid & g);
static void get_unstructured_grid (const Python3_Dict & dict, Grid & g);
static void get_semilatlon_grid (const Python3_Dict & dict, Grid & g);

static void lookup_python_num_array(const Python3_Dict &, const char *, NumArray &);

Expand Down Expand Up @@ -78,7 +78,7 @@ else if ( proj_type == merc_string ) get_merc_grid (dict, g
else if ( proj_type == latlon_string ) get_latlon_grid (dict, g);
else if ( proj_type == rotated_latlon_string ) get_rotated_latlon_grid (dict, g);
else if ( proj_type == gaussian_string ) get_gaussian_grid (dict, g);
else if ( proj_type == unstructured_string ) get_unstructured_grid (dict, g);
else if ( proj_type == semilatlon_string ) get_semilatlon_grid (dict, g);
else {

mlog << Error << "\ngrid_from_python_dict() -> "
Expand Down Expand Up @@ -473,11 +473,11 @@ return;
// times (array of double)
//

void get_unstructured_grid (const Python3_Dict & dict, Grid & g)
void get_semilatlon_grid (const Python3_Dict & dict, Grid & g)

{

UnstructuredData data;
SemiLatLonData data;
ConcatString s;

s = dict.lookup_string("name");
Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_grid/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ libvx_grid_a_SOURCES = \
tcrmw_grid.cc tcrmw_grid.h \
goes_grid_defs.h \
goes_grid.cc goes_grid.h \
unstructured_grid_defs.h \
unstructured_grid.cc unstructured_grid.h \
semilatlon_grid_defs.h \
semilatlon_grid.cc semilatlon_grid.h \
vx_grid.h
libvx_grid_a_CPPFLAGS = ${MET_CPPFLAGS}
34 changes: 17 additions & 17 deletions src/libcode/vx_grid/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ am_libvx_grid_a_OBJECTS = libvx_grid_a-earth_rotation.$(OBJEXT) \
libvx_grid_a-rot_latlon_grid.$(OBJEXT) \
libvx_grid_a-tcrmw_grid.$(OBJEXT) \
libvx_grid_a-goes_grid.$(OBJEXT) \
libvx_grid_a-unstructured_grid.$(OBJEXT)
libvx_grid_a-semilatlon_grid.$(OBJEXT)
libvx_grid_a_OBJECTS = $(am_libvx_grid_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
Expand Down Expand Up @@ -148,7 +148,7 @@ am__depfiles_remade = ./$(DEPDIR)/libvx_grid_a-earth_rotation.Po \
./$(DEPDIR)/libvx_grid_a-rot_latlon_grid.Po \
./$(DEPDIR)/libvx_grid_a-st_grid.Po \
./$(DEPDIR)/libvx_grid_a-tcrmw_grid.Po \
./$(DEPDIR)/libvx_grid_a-unstructured_grid.Po
./$(DEPDIR)/libvx_grid_a-semilatlon_grid.Po
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
Expand Down Expand Up @@ -374,8 +374,8 @@ libvx_grid_a_SOURCES = \
tcrmw_grid.cc tcrmw_grid.h \
goes_grid_defs.h \
goes_grid.cc goes_grid.h \
unstructured_grid_defs.h \
unstructured_grid.cc unstructured_grid.h \
semilatlon_grid_defs.h \
semilatlon_grid.cc semilatlon_grid.h \
vx_grid.h

libvx_grid_a_CPPFLAGS = ${MET_CPPFLAGS}
Expand Down Expand Up @@ -439,7 +439,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_grid_a-rot_latlon_grid.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_grid_a-st_grid.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_grid_a-tcrmw_grid.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_grid_a-unstructured_grid.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_grid_a-semilatlon_grid.Po@am__quote@ # am--include-marker

$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
Expand Down Expand Up @@ -629,19 +629,19 @@ libvx_grid_a-goes_grid.obj: goes_grid.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_grid_a-goes_grid.obj `if test -f 'goes_grid.cc'; then $(CYGPATH_W) 'goes_grid.cc'; else $(CYGPATH_W) '$(srcdir)/goes_grid.cc'; fi`

libvx_grid_a-unstructured_grid.o: unstructured_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_grid_a-unstructured_grid.o -MD -MP -MF $(DEPDIR)/libvx_grid_a-unstructured_grid.Tpo -c -o libvx_grid_a-unstructured_grid.o `test -f 'unstructured_grid.cc' || echo '$(srcdir)/'`unstructured_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_grid_a-unstructured_grid.Tpo $(DEPDIR)/libvx_grid_a-unstructured_grid.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unstructured_grid.cc' object='libvx_grid_a-unstructured_grid.o' libtool=no @AMDEPBACKSLASH@
libvx_grid_a-semilatlon_grid.o: semilatlon_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_grid_a-semilatlon_grid.o -MD -MP -MF $(DEPDIR)/libvx_grid_a-semilatlon_grid.Tpo -c -o libvx_grid_a-semilatlon_grid.o `test -f 'semilatlon_grid.cc' || echo '$(srcdir)/'`semilatlon_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_grid_a-semilatlon_grid.Tpo $(DEPDIR)/libvx_grid_a-semilatlon_grid.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='semilatlon_grid.cc' object='libvx_grid_a-semilatlon_grid.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_grid_a-unstructured_grid.o `test -f 'unstructured_grid.cc' || echo '$(srcdir)/'`unstructured_grid.cc
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_grid_a-semilatlon_grid.o `test -f 'semilatlon_grid.cc' || echo '$(srcdir)/'`semilatlon_grid.cc

libvx_grid_a-unstructured_grid.obj: unstructured_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_grid_a-unstructured_grid.obj -MD -MP -MF $(DEPDIR)/libvx_grid_a-unstructured_grid.Tpo -c -o libvx_grid_a-unstructured_grid.obj `if test -f 'unstructured_grid.cc'; then $(CYGPATH_W) 'unstructured_grid.cc'; else $(CYGPATH_W) '$(srcdir)/unstructured_grid.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_grid_a-unstructured_grid.Tpo $(DEPDIR)/libvx_grid_a-unstructured_grid.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unstructured_grid.cc' object='libvx_grid_a-unstructured_grid.obj' libtool=no @AMDEPBACKSLASH@
libvx_grid_a-semilatlon_grid.obj: semilatlon_grid.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_grid_a-semilatlon_grid.obj -MD -MP -MF $(DEPDIR)/libvx_grid_a-semilatlon_grid.Tpo -c -o libvx_grid_a-semilatlon_grid.obj `if test -f 'semilatlon_grid.cc'; then $(CYGPATH_W) 'semilatlon_grid.cc'; else $(CYGPATH_W) '$(srcdir)/semilatlon_grid.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_grid_a-semilatlon_grid.Tpo $(DEPDIR)/libvx_grid_a-semilatlon_grid.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='semilatlon_grid.cc' object='libvx_grid_a-semilatlon_grid.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_grid_a-unstructured_grid.obj `if test -f 'unstructured_grid.cc'; then $(CYGPATH_W) 'unstructured_grid.cc'; else $(CYGPATH_W) '$(srcdir)/unstructured_grid.cc'; fi`
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_grid_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_grid_a-semilatlon_grid.obj `if test -f 'semilatlon_grid.cc'; then $(CYGPATH_W) 'semilatlon_grid.cc'; else $(CYGPATH_W) '$(srcdir)/semilatlon_grid.cc'; fi`

ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
Expand Down Expand Up @@ -780,7 +780,7 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/libvx_grid_a-rot_latlon_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-st_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-tcrmw_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-unstructured_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-semilatlon_grid.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
Expand Down Expand Up @@ -838,7 +838,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/libvx_grid_a-rot_latlon_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-st_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-tcrmw_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-unstructured_grid.Po
-rm -f ./$(DEPDIR)/libvx_grid_a-semilatlon_grid.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

Expand Down
35 changes: 17 additions & 18 deletions src/libcode/vx_grid/grid_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ mlog << Debug(grid_debug_level)
////////////////////////////////////////////////////////////////////////


void UnstructuredData::dump()
void SemiLatLonData::dump()

{

mlog << Debug(grid_debug_level)
<< "\nUnstructured Grid Data:\n"
<< "\nSemiLatLon Grid Data:\n"
<< " lats: " << lats.serialize() << "\n"
<< " lons: " << lons.serialize() << "\n"
<< " levels: " << levels.serialize() << "\n"
Expand Down Expand Up @@ -316,7 +316,7 @@ m = (const MercatorData *) 0;
g = (const GaussianData *) 0;
gi = (const GoesImagerData *) 0;
tc = (const TcrmwData *) 0;
ug = (const UnstructuredData *) 0;
sl = (const SemiLatLonData *) 0;

clear();

Expand All @@ -340,7 +340,7 @@ if ( m ) { delete m; m = (const MercatorData *) 0; };
if ( g ) { delete g; g = (const GaussianData *) 0; };
if ( gi ) { delete gi; gi = (const GoesImagerData *) 0; };
if ( tc ) { delete tc; tc = (const TcrmwData *) 0; };
if ( ug ) { delete ug; ug = (const UnstructuredData *) 0; };
if ( sl ) { delete sl; sl = (const SemiLatLonData *) 0; };

return;

Expand All @@ -361,7 +361,7 @@ if ( info.rll ) set( *(info.rll) );
if ( info.m ) set( *(info.m ) );
if ( info.g ) set( *(info.g ) );
if ( info.gi ) set( *(info.gi ) );
if ( info.ug ) set( *(info.ug ) );
if ( info.sl ) set( *(info.sl ) );

return;

Expand All @@ -384,7 +384,7 @@ if ( rll ) ++count;
if ( m ) ++count;
if ( g ) ++count;
if ( gi ) ++count;
if ( ug ) ++count;
if ( sl ) ++count;

return ( count == 1 );

Expand Down Expand Up @@ -413,7 +413,7 @@ else if ( rll ) gg.set( *rll );
else if ( m ) gg.set( *m );
else if ( g ) gg.set( *g );
else if ( gi ) gg.set( *gi );
else if ( ug ) gg.set( *ug );
else if ( sl ) gg.set( *sl );


return;
Expand Down Expand Up @@ -578,15 +578,15 @@ return;
////////////////////////////////////////////////////////////////////////


void GridInfo::set(const UnstructuredData & data)
void GridInfo::set(const SemiLatLonData & data)

{

clear();

UnstructuredData * D = (UnstructuredData *) 0;
SemiLatLonData * D = (SemiLatLonData *) 0;

D = new UnstructuredData;
D = new SemiLatLonData;

//
// deep copy instead of memcpy because the struct
Expand All @@ -595,7 +595,7 @@ D = new UnstructuredData;

*D = data;

ug = D; D = (UnstructuredData *) 0;
sl = D; D = (SemiLatLonData *) 0;

return;

Expand Down Expand Up @@ -1141,13 +1141,12 @@ if ( info_new.lc ) {

g_new.set(m_new);

} else if ( info_new.ug ) {
} else if ( info_new.sl ) {

UnstructuredData ug_new = *(info_new.ug);

// JHG, define the subsetting logic here
mlog << Error << "\n\n Grid::subset_ll() const -> "
<< "subsetting is not supported for SemiLatLon grids\n\n";

g_new.set(ug_new);
exit ( 1 );

} else {

Expand Down Expand Up @@ -1253,7 +1252,7 @@ else if ( i1.rll && i2.rll ) return ( is_eq(i1.rll, i2.rll) );
else if ( i1.m && i2.m ) return ( is_eq(i1.m, i2.m ) );
else if ( i1.g && i2.g ) return ( is_eq(i1.g, i2.g ) );
else if ( i1.gi && i2.gi ) return ( is_eq(i1.gi, i2.gi ) );
else if ( i1.ug && i2.ug ) return ( is_eq(i1.ug, i2.ug ) );
else if ( i1.sl && i2.sl ) return ( is_eq(i1.sl, i2.sl ) );

return ( false );

Expand Down Expand Up @@ -1459,7 +1458,7 @@ return ( status );
////////////////////////////////////////////////////////////////////////


bool is_eq(const UnstructuredData * gi1, const UnstructuredData * gi2)
bool is_eq(const SemiLatLonData * gi1, const SemiLatLonData * gi2)
{

if ( !gi1 || !gi2 ) return ( false );
Expand Down
28 changes: 14 additions & 14 deletions src/libcode/vx_grid/grid_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "merc_grid_defs.h"
#include "gaussian_grid_defs.h"
#include "goes_grid_defs.h"
#include "unstructured_grid_defs.h"
#include "semilatlon_grid_defs.h"


////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -65,15 +65,15 @@ class GridInfo {

bool ok() const;

void set(const LambertData &);
void set(const StereographicData &);
void set(const LatLonData &);
void set(const RotatedLatLonData &);
void set(const MercatorData &);
void set(const GaussianData &);
void set(const GoesImagerData &);
void set(const TcrmwData &);
void set(const UnstructuredData &);
void set(const LambertData &);
void set(const StereographicData &);
void set(const LatLonData &);
void set(const RotatedLatLonData &);
void set(const MercatorData &);
void set(const GaussianData &);
void set(const GoesImagerData &);
void set(const TcrmwData &);
void set(const SemiLatLonData &);

void create_grid(Grid &) const;

Expand All @@ -89,7 +89,7 @@ class GridInfo {
const GaussianData * g; // allocated
const GoesImagerData * gi; // allocated
const TcrmwData * tc; // allocated
const UnstructuredData * ug; // allocated
const SemiLatLonData * sl; // allocated

};

Expand Down Expand Up @@ -208,7 +208,7 @@ class Grid : public GridInterface {
Grid(const GaussianData &);
Grid(const GoesImagerData &);
Grid(const TcrmwData &);
Grid(const UnstructuredData &);
Grid(const SemiLatLonData &);
virtual ~Grid();
Grid(const Grid &);
Grid & operator=(const Grid &);
Expand All @@ -226,7 +226,7 @@ class Grid : public GridInterface {
void set (const GaussianData &);
void set (const GoesImagerData &);
void set (const TcrmwData &);
void set (const UnstructuredData &);
void set (const SemiLatLonData &);

void set_swap_to_north(bool swap_to_north);
bool get_swap_to_north() const;
Expand Down Expand Up @@ -280,7 +280,7 @@ extern bool is_eq(const RotatedLatLonData *, const RotatedLatLonData *);
extern bool is_eq(const MercatorData *, const MercatorData *);
extern bool is_eq(const GaussianData *, const GaussianData *);
extern bool is_eq(const GoesImagerData *, const GoesImagerData *);
extern bool is_eq(const UnstructuredData *, const UnstructuredData *);
extern bool is_eq(const SemiLatLonData *, const SemiLatLonData *);


////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit 76dafdb

Please sign in to comment.