#include "F77Radtran.h" #include "Level1Data.h" #include #include extern "C" void get_l1_zpt( float* zr, float* pr, float* tr, int* nr, int* mrr, float** tgr, float* pout, int* mpout, float* zoff) { // get the ncep altitudes std::vector zvec = ::gLevel1Data.Alt() ; assert(!zvec.empty() ); int nl = zvec.size(); // apply an offset // std::transform(zvec.begin(), zvec.end(), zvec.begin(), // std::bind2nd(std::plus(), *zoff ) ); // get ncep T, and P std::vector pvec = ::gLevel1Data.Pres() ; std::vector tvec = ::gLevel1Data.Temp() ; // Lets create a high resolution grid for this 200m int i =0; zr[ i] = 150.0; while( zr[i] > 3.1 && i++ < *mrr ) zr[i] = zr[i-1] - 0.2; *nr = i+1; // number of altitudes we will output // now call path to create interpolated temp and pressure grids. // We'll use path to interpolate pressure and temperature int irfn=0; int iplat = 0; static int c__1 = 1; int isc = -25; float wave= 1000.; // not used really float re = ::gLevel1Data.RadiusCurvature(); std::vector tgrvec(2 * nl, 0.0), // temperature gradient zout(*nr); // just a dummy output float tearth; ::kp_mpath__( &nl, mrr, mpout, &irfn, &c__1, nr, &isc, &re, nr, &nl, &wave, &iplat, &zr[0], &zvec[0], &pvec[0], &tvec[0], &tgrvec[0], &zout[0], pr, tr, &tgr[0][0] , &tearth, pout ); }