|
|
|
@ -256,7 +256,10 @@ Error CF::FillAdapterFromCF(const CLArgs& args, michlib_internal::ParameterListE
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Check uniform and create projection
|
|
|
|
|
if(CF::CheckUniform(rlons, 0.0005) && CF::CheckUniform(rlats, 0.0005)) |
|
|
|
|
bool lonuni = CF::CheckUniform(rlons, 0.005); |
|
|
|
|
bool latuni = CF::CheckUniform(rlats, 0.005); |
|
|
|
|
|
|
|
|
|
if(lonuni && latuni) |
|
|
|
|
{ |
|
|
|
|
proj.reset(new Projection(Projection::Create<Projection::Type::EQC>(rlons, rlats))); |
|
|
|
|
pars.AddParameter("lonstep", (rlons.back() - rlons.front()) / (rlons.size() - 1)); |
|
|
|
@ -264,7 +267,8 @@ Error CF::FillAdapterFromCF(const CLArgs& args, michlib_internal::ParameterListE
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
michlib::errmessage("Warning! Nonuniform grid"); |
|
|
|
|
if(!lonuni) michlib::errmessage("Warning! Nonuniform longitude grid"); |
|
|
|
|
if(!latuni) michlib::errmessage("Warning! Nonuniform latitude grid"); |
|
|
|
|
proj.reset(new Projection(Projection::Create<Projection::Type::IRREGULARXY>(std::move(rlons), std::move(rlats)))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|