////////////////////////////////////////////////////////////////////////// // // (C) Copyright 2003 by GATS, Inc. // 11864 Canon Blvd., STE 101 // Newport News, VA 23606 // // All Rights Reserved. No part of this software or publication may be // reproduced, stored in a retrieval system, or transmitted, in any form // or by any means, electronic, mechanical, photocopying, recording, or // otherwise without the prior written permission of GATS, Inc. // /////////////////////////////////////////////////////////////////////////// // Class: NMC_FileReader // // Filename: NMC_FileReader.h // // Description: Header file for NMC_FileReader class. // The class has functions to read a NMC file one record at a // time, a block of records at a time, or all records at once. // // Author: Y.Wang // (757)873-5920 // ////////////////////////////////////////////////////////////////////////// #ifndef _NMC_FileReader_h #define _NMC_FileReader_h #include #include #include "NMCdata.h" class NMC_FileReader { public: NMC_FileReader(); NMC_FileReader(const std::string &filename) throw(const char*, std::exception); void Read_netCDF_NMC_data(NMCdata &nmcdata) throw(const char*, std::exception); void Read_netCDF_NMC_data(float lat,float lon,float *press_nmc, float *temp_nmc, float *gheight_nmc, double *) throw(const char*, std::exception); virtual ~NMC_FileReader(); void SetUp(const std::string &filename) throw(const char*, std::exception); void convert_hgt2ztp(float*, double*); void convert_hgt2ztp(float*, double*, float); double calculate_gravity(float, float); int getStatus(); protected: void BasicInitialize(); private: std::string filename; bool file_is_open; bool setup_attempted; bool setup_succeeded; int fd; //netCDF file ID }; #endif