Commit ed5538ef authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

docu update.

parent 947e863f
......@@ -5,7 +5,7 @@
2017-03-21 Uwe Schulzweida
* remapdis: potentialy wrong results on non global grids (bug fix) (bug was introduced in last revision)
* remapdis: potentialy wrong results on non global grids [Bug #7626] (bug was introduced in last revision)
2017-03-13 Uwe Schulzweida
......
......@@ -10,6 +10,9 @@ Version 1.8.1 (24 March 2017):
* delmulti - Delete multiple fields (KMNI extension)
* changemulti - Change identication of multiple fields (KMNI extension)
* samplegrid - Resample grid (KMNI extension)
Fixed bugs:
* Remapping bug for non global grids [Bug #7625]
* remapdis and remapcon produces wrong results for some grid combinations [Bug #7626] (introduced in last revision)
Version 1.8.0 (26 October 2016):
......
......@@ -30,11 +30,9 @@
void *Change_e5slm(void *argument)
{
char name[CDI_MAX_NAME];
int nrecs, code;
int nrecs;
int varID, levelID;
int nmiss;
long i;
double minval, maxval;
cdoInitialize(argument);
......@@ -64,7 +62,7 @@ void *Change_e5slm(void *argument)
int vlistIDslm = streamInqVlist(streamIDslm);
int gridsize = gridInqSize(vlistInqVarGrid(vlistIDslm, 0));
long gridsize = gridInqSize(vlistInqVarGrid(vlistIDslm, 0));
double *array = (double*) Malloc(gridsize*sizeof(double));
double *cland = (double*) Malloc(gridsize*sizeof(double));
......@@ -77,13 +75,14 @@ void *Change_e5slm(void *argument)
if ( nmiss > 0 ) cdoAbort("SLM with missing values are unsupported!");
double minval, maxval;
minmaxval(gridsize, cland, NULL, &minval, &maxval);
if ( minval < 0 || maxval > 1 )
cdoWarning("Values of SLM out of bounds! (minval=%g, maxval=%g)", minval , maxval);
streamClose(streamIDslm);
for ( i = 0; i < gridsize; ++i )
for ( long i = 0; i < gridsize; ++i )
{
if ( cland[i] > 0 )
lsea[i] = false;
......@@ -100,7 +99,7 @@ void *Change_e5slm(void *argument)
if ( gridsize != gridInqSize(vlistInqVarGrid(vlistID1, varID)) )
cdoAbort("gridsize differ!");
code = vlistInqVarCode(vlistID1, varID);
int code = vlistInqVarCode(vlistID1, varID);
vlistInqVarName(vlistID1, varID, name);
if ( code < 0 )
......@@ -135,23 +134,23 @@ void *Change_e5slm(void *argument)
streamInqRecord(streamID1, &varID, &levelID);
streamReadRecord(streamID1, array, &nmiss);
code = codes[varID];
int code = codes[varID];
if ( code == 172 )
{
cdoPrint("SLM changed!");
for ( i = 0; i < gridsize; ++i )
for ( long i = 0; i < gridsize; ++i )
array[i] = cland[i];
}
else if ( code == 99 )
{
cdoPrint("ALAKE set all values to zero!");
for ( i = 0; i < gridsize; ++i )
for ( long i = 0; i < gridsize; ++i )
array[i] = 0;
}
else if ( code == 232 )
{
cdoPrint("GLAC set sea points to %g!", array[0]);
for ( i = 0; i < gridsize; ++i )
for ( long i = 0; i < gridsize; ++i )
if ( cland[i] < 0.5 ) array[i] = array[0];
}
else if ( code == 70 || code == 71 || code == 140 ||
......@@ -160,7 +159,7 @@ void *Change_e5slm(void *argument)
code == 229 )
{
cdoPrint("Code %d set sea points to %g!", code, array[0]);
for ( i = 0; i < gridsize; ++i )
for ( long i = 0; i < gridsize; ++i )
if ( lsea[i] ) array[i] = array[0];
}
......
#! @BASH@
if [ "$USER" = "m214003" ]; then
echo 1..7 # Number of tests to be executed.
else
echo 1..5 # Number of tests to be executed.
fi
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
ABSLIMMAX=0.001
ABSLIMDIS=0.2
ABSLIMYCON=0.25
ABSLIMMAX=0.0001
ABSLIMDIS=0.001
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
......@@ -25,7 +20,6 @@ if [ "$USER" = "m214003" ]; then RMODS="dis nn $RMODS"; fi
for RMOD in $RMODS; do
ABSLIM=$ABSLIMMAX
if [ $RMOD = dis ]; then ABSLIM=$ABSLIMDIS; fi
if [ $RMOD = ycon ]; then ABSLIM=$ABSLIMYCON; fi
CDOTEST="remap${RMOD} regional"
RSTAT=0
for extra in def off on; do
......@@ -43,8 +37,7 @@ for RMOD in $RMODS; do
REMAP_EXTRAPOLATE=$EXTRA $CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
# $CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
$CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
......
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