~fluidity-core/fluidity/global_numbering

« back to all changes in this revision

Viewing changes to ocean_forcing/NetCDFReader.cpp

  • Committer: David Ham
  • Date: 2012-09-27 15:22:54 UTC
  • mfrom: (3475.1.599 fluidity)
  • Revision ID: david.ham@imperial.ac.uk-20120927152254-nr3ohx560wbg8s8n
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
  if(verbose)
115
115
    cout<<"NetCDFReader::GetGrid()\n";
116
116
#ifdef HAVE_NETCDF
117
 
  // Get dimensions -- lon
118
 
  int id = ncdimid(ncid, "lon");
 
117
  // Get dimensions -- longitude
 
118
  int id = ncdimid(ncid, "longitude");
119
119
  if(ncerr!=NC_NOERR){
120
120
    cout.flush();
121
 
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - dimension variable \"lon\" does not exist\n";
 
121
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - dimension variable \"longitude\" does not exist\n";
122
122
    exit(-1);
123
123
  }
124
124
  ncdiminq(ncid, id, (char *)0, &(dimension[0]));
125
125
    
126
 
  // Get dimensions -- lat
127
 
  id = ncdimid(ncid, "lat");
 
126
  // Get dimensions -- latitude
 
127
  id = ncdimid(ncid, "latitude");
128
128
  if(ncerr!=NC_NOERR){
129
129
    cout.flush();
130
 
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - dimension variable \"lat\" does not exist\n";
 
130
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - dimension variable \"latitude\" does not exist\n";
131
131
    exit(-1);
132
132
  }
133
133
  ncdiminq(ncid, id, (char *)0, &(dimension[1]));
134
134
 
135
135
  // Longitude range
136
 
  int varid = ncvarid(ncid, "lon");
 
136
  int varid = ncvarid(ncid, "longitude");
137
137
  if(ncerr!=NC_NOERR){
138
138
    cout.flush();
139
 
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - variable \"lon\" does not exist.\n";
 
139
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - variable \"longitude\" does not exist.\n";
140
140
    exit(-1);
141
141
  }
142
142
  
157
157
  }
158
158
 
159
159
  // Latitude range
160
 
  varid = ncvarid(ncid, "lat");
 
160
  varid = ncvarid(ncid, "latitude");
161
161
  if(ncerr!=NC_NOERR){
162
162
    cout.flush();
163
 
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - variable lat does not exist.\n";
 
163
    cerr<<__FILE__<<", "<<__LINE__<<": ERROR - variable latitude does not exist.\n";
164
164
    exit(-1);
165
165
  }
166
166