|
|
|
@ -50,12 +50,12 @@ template<class D> MString ActionTSC::DoAction(const CLArgs& args, D& ds)
|
|
|
|
|
if(!data) return "Can't read data"; |
|
|
|
|
if(!data.Unit().Exist()) michlib::errmessage("Unknown measurement unit!"); |
|
|
|
|
|
|
|
|
|
MString outfmt = args.contains("format") ? args.at("format") : "bin"; |
|
|
|
|
MString name = args.contains("out") ? args.at("out") : "out.bin"; |
|
|
|
|
MString outfmt = args.contains("format") ? args.at("format") : (GetExt(name) == "nc" ? "nc" : "bin"); |
|
|
|
|
|
|
|
|
|
if(outfmt == "bin") |
|
|
|
|
{ |
|
|
|
|
BFileW fw; |
|
|
|
|
MString name = args.contains("out") ? args.at("out") : "out.bin"; |
|
|
|
|
BFileW fw; |
|
|
|
|
|
|
|
|
|
fw.Create(name, 3); |
|
|
|
|
fw.SetColumnName(1, "Longitude"); |
|
|
|
@ -75,7 +75,6 @@ template<class D> MString ActionTSC::DoAction(const CLArgs& args, D& ds)
|
|
|
|
|
|
|
|
|
|
if(outfmt == "nc" || outfmt == "netcdf") |
|
|
|
|
{ |
|
|
|
|
MString name = args.contains("out") ? args.at("out") : "out.nc"; |
|
|
|
|
int ret; |
|
|
|
|
int ncid, dimid, dimidxy[2]; |
|
|
|
|
int lonid, latid, vid; |
|
|
|
|