Commit 8265185e authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Add further matches for temperature und salinity in the adisit operator

* one letter variable names: t,s
* CF-conform standard names: sea_water_potential_temperature,sea_water_salinity
parent dde91e3c
......@@ -125,7 +125,7 @@ void *Adisit(void *argument)
int nmiss;
int thoID = -1, saoID = -1;
int tisID2, saoID2;
char varname[CDI_MAX_NAME];
char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
int taxisID1, taxisID2;
double pin = -1;
double *pressure;
......@@ -147,14 +147,21 @@ void *Adisit(void *argument)
gridID = vlistInqVarGrid(vlistID1, varID);
code = vlistInqVarCode(vlistID1, varID);
if ( code <= 0 )
{
vlistInqVarName(vlistID1, varID, varname);
vlistInqVarStdname(vlistID1,varID, stdname);
strtolower(varname);
if ( strcmp(varname, "tho") == 0 ) code = 2;
else if ( strcmp(varname, "sao") == 0 ) code = 5;
else if ( strcmp(varname, "s") == 0 ) code = 5;
else if ( strcmp(varname, "t") == 0 ) code = 2;
else if ( strcmp(stdname, "sea_water_salinity") == 0 ) code = 5;
else if ( strcmp(stdname, "sea_water_potential_temperature") == 0 ) code = 2;
}
if ( code == 2 ) thoID = varID;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment