Commit 1deb42a3 authored by Uwe Schulzweida's avatar Uwe Schulzweida

Version 1.0.6 released

parent 4d7f519a
2006-12-12 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2006-12-14 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CDI library version 1.0.5
* New operator: vertvar, timvar, yearvar, monvar, dayvar, hourvar
......
CDO NEWS
--------
Version 1.0.5 (?? November 2006):
Version 1.0.6 (12 December 2006):
* New operators:
o Variance for all statistic modules
- vertvar, timvar, yearvar, monvar, dayvar, hourvar,
runvar, seasvar, selvar, ydayvar, ydrunvar, ymonvar, yseasvar
Developer version 1.0.5 (30 November 2006):
* New operators:
o showformat - Show file format
o tchill - Windchill temperature
o hi - Humidity index
o eca_* - ECA Indices of Daily Temperature and Precipitation Extremes
o Show file format - showformat
o Windchill temperature - tchill
o Humidity index - hi
o ECA Indices of Daily Temperature and Precipitation Extremes
- eca_* (37 different indices!)
Version 1.0.4 (7 November 2006):
Developer version 1.0.4 (7 November 2006):
* New operators:
o ydrunmin, ydrunmax, ydrunsum, ydrunmean, ydrunavg, ydrunstd -
Multi-year daily running statistical values
o timpctl, hourpctl, daypctl, monpctl, yearpctl, selpctl, runpctl, seaspctl -
Percentile values for different time steps
o ydaypctl, ymonpctl, yseaspctl, ydrunpctl -
Multi-year percentile values for different time steps
o enspctl, fldpctl, zonpctl,merpctl - Ensemble and field percentiles
o Multi-year daily running statistical values
- ydrunmin, ydrunmax, ydrunsum, ydrunmean, ydrunavg, ydrunstd
o Percentile values for different time ranges
- timpctl, hourpctl, daypctl, monpctl, yearpctl, selpctl, runpctl, seaspctl
o Multi-year percentile values
- ydaypctl, ymonpctl, yseaspctl, ydrunpctl
o Ensemble and field percentiles
- enspctl, fldpctl, zonpctl, merpctl
Version 1.0.3 (3 November 2006):
Developer version 1.0.3 (3 November 2006):
* New operators:
o intntime - Time interpolation
o mrotuvb - Backward transformation of velocity components U and V from MPIOM
o Time interpolation - intntime
o Backward transformation of velocity components U and V from MPIOM - mrotuvb
Version 1.0.2 (18 September 2006):
......
......@@ -318,46 +318,6 @@ Operator catalog:
Ydrunstat ydrunvar Multi-year daily running variance
Ydrunstat ydrunstd Multi-year daily running standard deviation
Ydrunpctl ydrunpctl Multi-year daily running percentiles
-------------------------------------------------------------
ECA indices
-------------------------------------------------------------
EcaCdd eca_cdd Consecutive dry days
EcaCfd eca_cfd Consecutive frost days
EcaCsu eca_csu Consecutive summer days
EcaCwd eca_cwd Consecutive wet days
EcaCwdi eca_cwdi Cold wave duration index
EcaCwfi eca_cwfi Cold-spell days
EcaEtr eca_etr Intra-period extreme temperature range
EcaFd eca_fd Frost days
EcaFdns eca_fdns Frost days where no snow
EcaGsl eca_gsl Growing season length
EcaHd eca_hd Heating degree days
EcaHwdi eca_hwdi Heat wave duration index
EcaHwfi eca_hwfi Warm-spell days
EcaId eca_id Ice days
EcaR10mm eca_r10mm Heavy precipitation days
EcaR20mm eca_r20mm Very heavy precipitation days
EcaR75p eca_r75p Moderate wet days wrt 75th percentile of reference period
EcaR75ptot eca_r75ptot Precipitation fraction due to R75p days
EcaR90p eca_r90p Very wet days wrt 90th percentile of reference period
EcaR90ptot eca_r90ptot Precipitation fraction due to R90p days
EcaR95p eca_r95p Very wet days wrt 95th percentile of reference period
EcaR95ptot eca_r95ptot Precipitation fraction due to R95p days
EcaR99p eca_r99p Extremely wet days wrt 99th percentile of reference period
EcaR99ptot eca_r99ptot Precipitation fraction due to R99p days
EcaRr1 eca_rr1 Wet days
EcaRx1day eca_rx1day Highest one-day precipitation amount
EcaRx5day eca_rx5day Highest five-day precipitation amount
EcaSdii eca_sdii Simple daily intensity index
EcaStrwind eca_strwind Strong wind days
EcaSu eca_su Summer days
EcaTg10p eca_tg10p Cold days wrt 10th percentile of reference period
EcaTg90p eca_tg90p Warm days wrt 90th percentile of reference period
EcaTn10p eca_tn10p Cold nights wrt 10th percentile of reference period
EcaTn90p eca_tn90p Warm nights wrt 90th percentile of reference period
EcaTr eca_tr Tropical nights
EcaTx10p eca_tx10p Cold days wrt 10th percentile of reference period
EcaTx90p eca_tx90p Warm days wrt 90th percentile of reference period
-------------------------------------------------------------
Regression
-------------------------------------------------------------
......@@ -418,3 +378,43 @@ Operator catalog:
Mastrfu mastrfu Mass stream function
Hi hi Humidity index
Tchill tchill Windchill temperature
-------------------------------------------------------------
ECA indices
-------------------------------------------------------------
EcaCdd eca_cdd Consecutive dry days
EcaCfd eca_cfd Consecutive frost days
EcaCsu eca_csu Consecutive summer days
EcaCwd eca_cwd Consecutive wet days
EcaCwdi eca_cwdi Cold wave duration index
EcaCwfi eca_cwfi Cold-spell days
EcaEtr eca_etr Intra-period extreme temperature range
EcaFd eca_fd Frost days
EcaFdns eca_fdns Frost days where no snow
EcaGsl eca_gsl Growing season length
EcaHd eca_hd Heating degree days
EcaHwdi eca_hwdi Heat wave duration index
EcaHwfi eca_hwfi Warm-spell days
EcaId eca_id Ice days
EcaR10mm eca_r10mm Heavy precipitation days
EcaR20mm eca_r20mm Very heavy precipitation days
EcaR75p eca_r75p Moderate wet days wrt 75th percentile of reference period
EcaR75ptot eca_r75ptot Precipitation fraction due to R75p days
EcaR90p eca_r90p Very wet days wrt 90th percentile of reference period
EcaR90ptot eca_r90ptot Precipitation fraction due to R90p days
EcaR95p eca_r95p Very wet days wrt 95th percentile of reference period
EcaR95ptot eca_r95ptot Precipitation fraction due to R95p days
EcaR99p eca_r99p Extremely wet days wrt 99th percentile of reference period
EcaR99ptot eca_r99ptot Precipitation fraction due to R99p days
EcaRr1 eca_rr1 Wet days
EcaRx1day eca_rx1day Highest one-day precipitation amount
EcaRx5day eca_rx5day Highest five-day precipitation amount
EcaSdii eca_sdii Simple daily intensity index
EcaStrwind eca_strwind Strong wind days
EcaSu eca_su Summer days
EcaTg10p eca_tg10p Cold days wrt 10th percentile of reference period
EcaTg90p eca_tg90p Warm days wrt 90th percentile of reference period
EcaTn10p eca_tn10p Cold nights wrt 10th percentile of reference period
EcaTn90p eca_tn90p Warm nights wrt 90th percentile of reference period
EcaTr eca_tr Tropical nights
EcaTx10p eca_tx10p Cold days wrt 10th percentile of reference period
EcaTx90p eca_tx90p Warm days wrt 90th percentile of reference period
......@@ -13,7 +13,7 @@ CDO - Climate Data Operators
Operators:
There are more than 300 operators available. Read OPEATORS for
There are more than 350 operators available. Read OPEATORS for
a short overview of all operators.
Documentation:
......
......@@ -49,18 +49,18 @@ case "${HOSTNAME}" in
--with-netcdf=/client \
CC=cc CFLAGS="-g -mt -fast"
;;
# sparc-sun-solaris2.8
# sparc-sun-solaris2.10
xxf)
./configure --prefix=$HOME/local --exec_prefix=$HOME/local/SUN \
--with-netcdf=/sw/solaris8/netcdf-3.6.1 \
CPPFLAGS="-DHAVE_LIBSZ -I$HOME/local/SUN/include" LIBS=$HOME/local/SUN/lib/libsz.a \
./configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris10 \
--with-netcdf=/sw/solaris10/netcdf-3.6.1 \
CC=cc CFLAGS="-g -mt -fast"
;;
# sparc-sun-solaris2.9
executor | yang | yin)
./configure --prefix=$HOME/local --exec_prefix=$HOME/local/SUN64 \
--with-netcdf=/scratch/small/m214/m214089/local/SunOS64 \
CC=cc CFLAGS="-g -mt -fast -xtarget=native -xarch=v9a"
./configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris8 \
--with-netcdf=/sw/solaris8/netcdf-3.6.1 \
CPPFLAGS="-DHAVE_LIBSZ -I$HOME/local/SUN/include" LIBS=$HOME/local/SUN/lib/libsz.a \
CC=cc CFLAGS="-g -mt -fast"
;;
# sx6-nec-superux12.2
cs*)
......
......@@ -4560,7 +4560,6 @@ _ACEOF
case "$CC" in
gcc) COMP_VERSION=`$CC --version | head -n 1`;;
g++) COMP_VERSION=`$CC --version | head -n 1`;;
icc) COMP_VERSION=`$CC --version | head -n 1`;;
sxc++) COMP_VERSION=`$CC -V 2>&1 | tail -n 1`;;
xlc*) COMP_VERSION=`$CC 2>&1 | head -n 1`;;
*) COMP_VERSION=`$CC -V 2>&1 | head -n 1`;;
......
......@@ -38,7 +38,6 @@ AC_DEFINE_UNQUOTED(COMPILER, ["$COMPILER"], [Compiler])
case "$CC" in
gcc) COMP_VERSION=`$CC --version | head -n 1`;;
g++) COMP_VERSION=`$CC --version | head -n 1`;;
icc) COMP_VERSION=`$CC --version | head -n 1`;;
sxc++) COMP_VERSION=`$CC -V 2>&1 | tail -n 1`;;
xlc*) COMP_VERSION=`$CC 2>&1 | head -n 1`;;
*) COMP_VERSION=`$CC -V 2>&1 | head -n 1`;;
......
No preview for this file type
......@@ -63,6 +63,28 @@ Yseasstat Statistical values
Yseaspctl Statistical values
Ydrunstat Statistical values
Ydrunpctl Statistical values
Detrend Regression
Trend Regression
Subtrend Regression
Remapgrid Interpolation
Genweights Interpolation
Remap Interpolation
Intgrid Interpolation
Vertint Interpolation
Inttime Interpolation
Intyear Interpolation
Spectral Transformation
Wind Transformation
Input Formatted I/O
Output Formatted I/O
Gradsdes Miscellaneous
Timsort Miscellaneous
Vargen Miscellaneous
Vardup Miscellaneous
Rotuv Miscellaneous
Mastrfu Miscellaneous
Hi Miscellaneous
Tchill Miscellaneous
EcaCdd ECA indices
EcaCfd ECA indices
EcaCsu ECA indices
......@@ -100,25 +122,3 @@ EcaTn90p ECA indices
EcaTr ECA indices
EcaTx10p ECA indices
EcaTx90p ECA indices
Detrend Regression
Trend Regression
Subtrend Regression
Remapgrid Interpolation
Genweights Interpolation
Remap Interpolation
Intgrid Interpolation
Vertint Interpolation
Inttime Interpolation
Intyear Interpolation
Spectral Transformation
Wind Transformation
Input Formatted I/O
Output Formatted I/O
Gradsdes Miscellaneous
Timsort Miscellaneous
Vargen Miscellaneous
Vardup Miscellaneous
Rotuv Miscellaneous
Mastrfu Miscellaneous
Hi Miscellaneous
Tchill Miscellaneous
......@@ -229,14 +229,14 @@ while (<MOFILE>) {
print TROVER "\\input{ref_intro_${shortname}}\n";
print TROVER "\\input{ref_list_${shortname}}\n";
print TROVER "\\input{ref_man_${shortname}}\n\n";
if ( $chap eq "ECA indices" ) {
print "find eca!";
$refskip = 1;
}
else {
# if ( $chap eq "ECA indices" ) {
# print "find eca!";
# $refskip = 1;
# }
# else {
print TRCARD "\\subsubsection*{$chap}\n";
$refskip = 0;
}
# }
# print TCFILE "\\begin{tabular*}{13cm}{ll}\n";
# print TCFILE "\\hspace*{30mm} & \\\\ \n";
......
/*
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2006 Brockmann Consult
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
/*
This module contains the following operators:
Hi hi Compute the humidity index
*/
#include <string.h>
#include <math.h>
#include "cdi.h"
#include "cdo.h"
#include "cdo_int.h"
#include "pstream.h"
#define TO_DEGREE_CELSIUS(x) ((x) - 273.15)
#define TO_KELVIN(x) ((x) + 273.15)
static double humidityIndex(double t, double e, double r, double missval)
{
const double c = TO_DEGREE_CELSIUS(t);
const double a = 0.01 * r * e * 6.112 * pow(10.0, 7.5 * c / (237.7 + c));
return TO_KELVIN(c + (5.0 / 9.0) * (a - 10.0));
}
static void farexpr(FIELD *field1, FIELD field2, FIELD field3, double (*expression)(double, double, double, double))
{
static char func[] = "farexpr";
int i, len;
const int grid1 = field1->grid;
const int nmiss1 = field1->nmiss;
const double missval1 = field1->missval;
double *array1 = field1->ptr;
const int grid2 = field2.grid;
const int nmiss2 = field2.nmiss;
const double missval2 = field2.missval;
const double *array2 = field2.ptr;
const int grid3 = field3.grid;
const int nmiss3 = field3.nmiss;
const double missval3 = field3.missval;
const double *array3 = field3.ptr;
len = gridInqSize(grid1);
if ( len != gridInqSize(grid2) || len != gridInqSize(grid3) )
cdoAbort("Fields have different gridsize (%s)", func);
if ( nmiss1 > 0 || nmiss2 > 0 || nmiss3 > 0 )
{
for ( i = 0; i < len; i++ )
if ( DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) || DBL_IS_EQUAL(array3[i], missval3))
array1[i] = missval1;
else
array1[i] = expression(array1[i], array2[i], array3[i], missval1);
}
else
{
for ( i = 0; i < len; i++ )
array1[i] = expression(array1[i], array2[i], array3[i], missval1);
}
field1->nmiss = 0;
for ( i = 0; i < len; i++ )
if ( DBL_IS_EQUAL(array1[i], missval1) ) field1->nmiss++;
}
void *Hi(void *argument)
{
static char func[] = "Hi";
enum {FILL_NONE, FILL_REC, FILL_TS};
int streamIDm, streamIDs, streamID1, streamID2, streamID3, streamID4;
int gridsize;
int nrecs, nrecs2, nrecs3, recID;
int tsID;
int varID, levelID;
int vlistID1, vlistID2, vlistID3, vlistID4;
int taxisID1, taxisID2, taxisID3, taxisID4;
FIELD field1, field2, field3;
cdoInitialize(argument);
cdoOperatorAdd("hi", 0, 0, NULL);
streamID1 = streamOpenRead(cdoStreamName(0));
if ( streamID1 < 0 ) cdiError(streamID1, "Open failed on %s", cdoStreamName(0));
streamID2 = streamOpenRead(cdoStreamName(1));
if ( streamID2 < 0 ) cdiError(streamID2, "Open failed on %s", cdoStreamName(1));
streamID3 = streamOpenRead(cdoStreamName(2));
if ( streamID3 < 0 ) cdiError(streamID3, "Open failed on %s", cdoStreamName(2));
streamIDm = streamID1;
streamIDs = streamID2;
vlistID1 = streamInqVlist(streamID1);
vlistID2 = streamInqVlist(streamID2);
vlistID3 = streamInqVlist(streamID3);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2 = vlistInqTaxis(vlistID2);
taxisID3 = vlistInqTaxis(vlistID3);
vlistCompare(vlistID1, vlistID2, func_sft);
vlistCompare(vlistID1, vlistID3, func_sft);
nospec(vlistID1);
gridsize = vlistGridsizeMax(vlistID1);
field1.ptr = (double *) malloc(gridsize*sizeof(double));
field2.ptr = (double *) malloc(gridsize*sizeof(double));
field3.ptr = (double *) malloc(gridsize*sizeof(double));
if ( cdoVerbose )
cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d",
vlistNtsteps(vlistID1), vlistNtsteps(vlistID2), vlistNtsteps(vlistID3));
vlistID4 = vlistDuplicate(vlistID1);
taxisID4 = taxisDuplicate(taxisID1);
vlistDefTaxis(vlistID4, taxisID4);
streamID4 = streamOpenWrite(cdoStreamName(3), cdoFiletype());
if ( streamID4 < 0 ) cdiError(streamID4, "Open failed on %s", cdoStreamName(3));
streamDefVlist(streamID4, vlistID4);
tsID = 0;
while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
{
nrecs2 = streamInqTimestep(streamID2, tsID);
nrecs3 = streamInqTimestep(streamID3, tsID);
if ( nrecs2 == 0 || nrecs3 == 0 )
cdoAbort("Input streams have different number of timesteps!");
taxisCopyTimestep(taxisID4, taxisID1);
streamDefTimestep(streamID4, tsID);
for ( recID = 0; recID < nrecs; recID++ )
{
streamInqRecord(streamID1, &varID, &levelID);
streamReadRecord(streamID1, field1.ptr, &field1.nmiss);
streamInqRecord(streamID2, &varID, &levelID);
streamReadRecord(streamID2, field2.ptr, &field2.nmiss);
streamInqRecord(streamID3, &varID, &levelID);
streamReadRecord(streamID3, field3.ptr, &field3.nmiss);
field1.grid = vlistInqVarGrid(vlistID1, varID);
field1.missval = vlistInqVarMissval(vlistID1, varID);
field2.grid = vlistInqVarGrid(vlistID2, varID);
field2.missval = vlistInqVarMissval(vlistID2, varID);
field3.grid = vlistInqVarGrid(vlistID3, varID);
field3.missval = vlistInqVarMissval(vlistID3, varID);
farexpr(&field1, field2, field3, humidityIndex);
streamDefRecord(streamID4, varID, levelID);
streamWriteRecord(streamID4, field1.ptr, field1.nmiss);
}
tsID++;
}
streamClose(streamID4);
streamClose(streamID3);
streamClose(streamID2);
streamClose(streamID1);
if ( field1.ptr ) free(field1.ptr);
if ( field2.ptr ) free(field2.ptr);
if ( field3.ptr ) free(field3.ptr);
cdoFinish();
return (0);
}
/*
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2006 Brockmann Consult
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
/*
This module contains the following operators:
Hi hi Compute the humidity index
*/
#include <string.h>
#include <math.h>
#include "cdi.h"
#include "cdo.h"
#include "cdo_int.h"
#include "pstream.h"
#define TO_DEGREE_CELSIUS(x) ((x) - 273.15)
#define TO_KELVIN(x) ((x) + 273.15)
static double humidityIndex(double t, double e, double r, double missval)
{
const double c = TO_DEGREE_CELSIUS(t);
const double a = 0.01 * r * e * 6.112 * pow(10.0, 7.5 * c / (237.7 + c));
return TO_KELVIN(c + (5.0 / 9.0) * (a - 10.0));
}
static void farexpr(FIELD *field1, FIELD field2, FIELD field3, double (*expression)(double, double, double, double))
{
static char func[] = "farexpr";
int i, len;
const int grid1 = field1->grid;
const int nmiss1 = field1->nmiss;
const double missval1 = field1->missval;
double *array1 = field1->ptr;
const int grid2 = field2.grid;
const int nmiss2 = field2.nmiss;
const double missval2 = field2.missval;
const double *array2 = field2.ptr;
const int grid3 = field3.grid;
const int nmiss3 = field3.nmiss;
const double missval3 = field3.missval;
const double *array3 = field3.ptr;
len = gridInqSize(grid1);
if ( len != gridInqSize(grid2) || len != gridInqSize(grid3) )
cdoAbort("Fields have different gridsize (%s)", func);
if ( nmiss1 > 0 || nmiss2 > 0 || nmiss3 > 0 )
{
for ( i = 0; i < len; i++ )
if ( DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) || DBL_IS_EQUAL(array3[i], missval3))
array1[i] = missval1;
else
array1[i] = expression(array1[i], array2[i], array3[i], missval1);
}
else
{
for ( i = 0; i < len; i++ )
array1[i] = expression(array1[i], array2[i], array3[i], missval1);
}
field1->nmiss = 0;
for ( i = 0; i < len; i++ )
if ( DBL_IS_EQUAL(array1[i], missval1) ) field1->nmiss++;
}
void *Hi(void *argument)
{
static char func[] = "Hi";
enum {FILL_NONE, FILL_REC, FILL_TS};
int streamIDm, streamIDs, streamID1, streamID2, streamID3, streamID4;
int gridsize;
int nrecs, nrecs2, nrecs3, recID;
int tsID;
int varID, levelID;
int vlistID1, vlistID2, vlistID3, vlistID4;
int taxisID1, taxisID2, taxisID3, taxisID4;
FIELD field1, field2, field3;
cdoInitialize(argument);
cdoOperatorAdd("hi", 0, 0, NULL);
streamID1 = streamOpenRead(cdoStreamName(0));
if ( streamID1 < 0 ) cdiError(streamID1, "Open failed on %s", cdoStreamName(0));
streamID2 = streamOpenRead(cdoStreamName(1));
if ( streamID2 < 0 ) cdiError(streamID2, "Open failed on %s", cdoStreamName(1));
streamID3 = streamOpenRead(cdoStreamName(2));
if ( streamID3 < 0 ) cdiError(streamID3, "Open failed on %s", cdoStreamName(2));
streamIDm = streamID1;
streamIDs = streamID2;
vlistID1 = streamInqVlist(streamID1);
vlistID2 = streamInqVlist(streamID2);
vlistID3 = streamInqVlist(streamID3);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2 = vlistInqTaxis(vlistID2);
taxisID3 = vlistInqTaxis(vlistID3);
vlistCompare(vlistID1, vlistID2, func_sft);
vlistCompare(vlistID1, vlistID3, func_sft);
nospec(vlistID1);
gridsize = vlistGridsizeMax(vlistID1);
field1.ptr = (double *) malloc(gridsize*sizeof(double));
field2.ptr = (double *) malloc(gridsize*sizeof(double));
field3.ptr = (double *) malloc(gridsize*sizeof(double));
if ( cdoVerbose )
cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d",
vlistNtsteps(vlistID1), vlistNtsteps(vlistID2), vlistNtsteps(vlistID3));
vlistID4 = vlistDuplicate(vlistID1);
taxisID4 = taxisDuplicate(taxisID1);