Skip to content
Snippets Groups Projects
Commit 74261228 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Input: failed with more than one record (bug fix)

parent d1757a6c
No related branches found
No related tags found
1 merge request!347M214003/develop
2025-03-25 Uwe Schulzweida
* Input: failed with more than one record (bug fix)
2025-03-20 Uwe Schulzweida
* gme_grid: check if calculation of coordinates failed
......
Subproject commit 6729bee6d0a040c99d0f6aac7d768b1adb5a81ee
Subproject commit 3b65d721f75aed9057376f2b271ebd129a49e909
......@@ -37,7 +37,7 @@ input_iarray(size_t numVals, int *array)
}
static int
read_record(int numFields, int numLevels, size_t gridsize0, int &code, int &date, int &time, std::vector<double> &array)
read_record(int numFields, int numLevels, size_t &gridsize0, int &code, int &date, int &time, std::vector<double> &array)
{
code = -1;
date = 10101;
......@@ -59,7 +59,7 @@ read_record(int numFields, int numLevels, size_t gridsize0, int &code, int &date
}
static int
read_record_ext(int numFields, size_t gridsize0, int &code, int &date, int &time, std::vector<double> &array, int &gridID,
read_record_ext(int numFields, size_t &gridsize0, int &code, int &date, int &time, std::vector<double> &array, int &gridID,
double &dlevel)
{
cdo_print("Enter header (date,code,level,gridsize) of record %d (or EOF(=^D))!", numFields + 1);
......@@ -98,7 +98,7 @@ read_record_ext(int numFields, size_t gridsize0, int &code, int &date, int &time
}
static int
read_record_srv(int numFields, size_t gridsize0, int &code, int &date, int &time, std::vector<double> &array, int &gridID,
read_record_srv(int numFields, size_t &gridsize0, int &code, int &date, int &time, std::vector<double> &array, int &gridID,
double &dlevel)
{
cdo_print("Enter header (code,level,date,time,nlon,nlat,dispo1,dispo2) of record %d (or EOF(=^D))!", numFields + 1);
......@@ -192,13 +192,11 @@ public:
if (operatorID == INPUT) { outputFiletype = cdo_filetype(); }
else if (operatorID == INPUTEXT)
{
outputFiletype = CdoDefault::FileType;
if (outputFiletype == CDI_UNDEFID) outputFiletype = CDI_FILETYPE_EXT;
outputFiletype = (CdoDefault::FileType == CDI_UNDEFID) ? CDI_FILETYPE_EXT : CdoDefault::FileType;
}
else if (operatorID == INPUTSRV)
{
outputFiletype = CdoDefault::FileType;
if (outputFiletype == CDI_UNDEFID) outputFiletype = CDI_FILETYPE_SRV;
outputFiletype = (CdoDefault::FileType == CDI_UNDEFID) ? CDI_FILETYPE_SRV : CdoDefault::FileType;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment