Skip to content

Commit

Permalink
v2.17.0, v2.18.0dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sakov committed Feb 9, 2023
1 parent e288e84 commit ea74998
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
6 changes: 6 additions & 0 deletions enkf/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v.2.17.0
PS 09022023
-- Added UPDATE option "--calculate-spread-only" to calculate forecast and
ensemble spread without updating the ensemble. Note that it will still
do the full update without saving the analysis (rather than reading
the analysis when available).
v.2.15.0
PS 05012023
-- Implemented detection and elimination of bad observation batches
Expand Down
2 changes: 1 addition & 1 deletion enkf/calc/obsstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ hashtable* das_processbatches(dasystem* das, hashtable* batches)
}

/*
* detect bad batches and write thier stats to FNAME_BADBATCHES
* detect bad batches and write their stats to FNAME_BADBATCHES
*/
if (das->nbadbatchspecs > 0) {
FILE* f = NULL;
Expand Down
2 changes: 1 addition & 1 deletion enkf/common/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
*
*****************************************************************************/

char* ENKF_VERSION = "2.15.0";
char* ENKF_VERSION = "2.17.0";
Binary file modified enkf/doc/enkf-userguide.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion enkf/doc/enkf-userguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

\begin{document}

\title{EnKF-C user guide\\{\normalsize version 2.15.0}}
\title{EnKF-C user guide\\{\normalsize version 2.17.0}}

\author{Pavel Sakov}
\date{June 19, 2014 -- \today}
Expand Down Expand Up @@ -1699,6 +1699,8 @@ \section{UPDATE}
confirm that static ensemble is conditioned for using log space
--calculate-spread
calculate forecast and analysis ensemble spread and write to spread.nc
--calculate-spread-only
calculate forecast and analysis ensemble spread only and write to spread.nc
--calculate-forecast-spread
calculate forecast ensemble spread and write to spread.nc
--calculate-forecast-spread-only
Expand Down
3 changes: 0 additions & 3 deletions enkf/update/diags.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ void das_allocatespread(dasystem* das, char fname[])
if (rank != 0)
return;

if (file_exists(fname))
return;

ncw_create(fname, NC_CLOBBER | das->ncformat, &ncid);
for (vid = 0; vid < nvar; ++vid) {
char* varname_src = model_getvarname(m, vid);
Expand Down
13 changes: 12 additions & 1 deletion enkf/update/enkf_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ static void usage()
enkf_printf(" confirm that static ensemble is conditioned for using log space\n");
enkf_printf(" --calculate-spread\n");
enkf_printf(" calculate forecast and analysis ensemble spread and write to %s\n", FNAME_SPREAD);
enkf_printf(" --calculate-spread-only\n");
enkf_printf(" calculate forecast and analysis ensemble spread only and write to %s\n", FNAME_SPREAD);
enkf_printf(" --calculate-forecast-spread\n");
enkf_printf(" calculate forecast ensemble spread and write to %s\n", FNAME_SPREAD);
enkf_printf(" --calculate-forecast-spread-only\n");
Expand Down Expand Up @@ -69,6 +71,7 @@ static void parse_commandline(int argc, char* argv[], char** fname, int* updates
int no_update = 0;
int vcorrs_only = 0;
int fspread_only = 0;
int spread_only = 0;
int i;

if (argc < 2)
Expand All @@ -91,12 +94,15 @@ static void parse_commandline(int argc, char* argv[], char** fname, int* updates
*updatespec |= (UPDATE_DOFORECASTSPREAD | UPDATE_DOANALYSISSPREAD);
i++;
continue;
} else if (strcmp(argv[i], "--calculate-spread-only") == 0) {
spread_only = 1;
i++;
continue;
} else if (strcmp(argv[i], "--calculate-forecast-spread") == 0) {
*updatespec |= UPDATE_DOFORECASTSPREAD;
i++;
continue;
} else if (strcmp(argv[i], "--calculate-forecast-spread-only") == 0) {
*updatespec |= UPDATE_DOFORECASTSPREAD;
fspread_only = 1;
i++;
continue;
Expand Down Expand Up @@ -160,12 +166,17 @@ static void parse_commandline(int argc, char* argv[], char** fname, int* updates
if (*fname == NULL)
enkf_quit("command line: parameter file not specified");

if (vcorrs_only + fspread_only + spread_only > 1)
enkf_quit("more than one argument with \"only\"");

if (no_update)
*updatespec &= ~UPDATE_NEEDAN;
if (vcorrs_only)
*updatespec = UPDATE_DOVERTCORRS;
if (fspread_only)
*updatespec = UPDATE_DOFORECASTSPREAD;
if (spread_only)
*updatespec = (UPDATE_DOFORECASTSPREAD | UPDATE_DOANALYSISSPREAD);
}

/**
Expand Down

0 comments on commit ea74998

Please sign in to comment.