~fluidity-core/fluidity/excise-fldecomp

« back to all changes in this revision

Viewing changes to ocean_forcing/ClimateReader.cpp

  • Committer: Mark Filipiak
  • Date: 2012-08-13 11:42:30 UTC
  • mfrom: (4003.1.23 dev-trunk)
  • Revision ID: mjf@staffmail.ed.ac.uk-20120813114230-wzoyf2gi4p4oxeh4
Merge in of the latest trunk.  To try to cure non-flredecomp tests that are passing at EPCC but failing in buildbot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
*/
28
28
 
29
29
#include "ClimateReader.h"
 
30
#include "global_parameters.h"
30
31
using namespace std;
31
32
 
32
33
ClimateReader::ClimateReader(){
33
 
  earth_radius=6378000.0;
34
34
  pi = 4.0*atan(1.0);
35
35
  rad_to_deg = 180.0/pi;
36
36
  deg_to_rad = pi/180;
127
127
  
128
128
  double r = sqrt(x*x+y*y+z*z);
129
129
  
130
 
  depth = r - earth_radius;
 
130
  depth = r - get_surface_radius();
131
131
  
132
132
  longitude = rad_to_deg*atan2(y, x);
133
133