cosmotool/sample/scale.cpp

21 lines
526 B
C++
Raw Normal View History

2009-01-11 17:07:57 +01:00
#include "yorick.hpp"
using namespace CosmoTool;
int main(int argc, char **argv)
{
uint32_t *dimList;
uint32_t dimRank;
ProgressiveInput<float> input = ProgressiveInput<float>::loadArrayProgressive("displacement.nc", dimList, dimRank);
ProgressiveOutput<float> output = ProgressiveOutput<float>::saveArrayProgressive("scaledDispl.nc", dimList, dimRank);
uint32_t N = 3 * dimList[1] * dimList[2] * dimList[3];
for (uint32_t i = 0; i < N; i++)
{
output.put(input.read() * 500./.65);
}
return 0;
}