Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions docs/users_guide/running_tsmp_pdaf/input_enkfpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,11 @@ containing the pre-DA state ensemble is `integrate`.
`PF:t_printensemble`: (integer) The timestep for the state ensemble
output switched on under `PF:printensemble`.

Default setting is `-1`, which means: Print debug output at every DA
Another setting is `-1`, which means: Print debug output at every DA
time step.

Default setting is `-2`, which means: No additional debug output.

### PF:printstat ###

`PF:printstat`: (integer) If set to `1` (default) the ensemble
Expand Down Expand Up @@ -568,9 +570,11 @@ Layers](https://escomp.github.io/ctsm-docs/versions/master/html/tech_note/Ecosys
`CLM:t_printensemble`: (integer) The timestep for the state ensemble
output switched on with the debug flag `PDAF_DEBUG`.

Default setting is `-1`, which means: Print debug output at every DA
Another setting is `-1`, which means: Print debug output at every DA
time step.

Default setting is `-2`, which means: No additional debug output.

### CLM:watmin_switch ###

`CLM:watmin_switch`: (integer) Switch for the values of minimal soil
Expand Down Expand Up @@ -877,7 +881,7 @@ Default: 0, output turned off.
| | `aniso_use_parflow` | 0 |
| | | |
| | `printensemble` | 1 |
| | `t_printensemble` | -1 |
| | `t_printensemble` | -2 |
| | `printstat` | 1 |
| | `paramprintensemble` | 1 |
| | `paramprintstat` | 1 |
Expand All @@ -894,7 +898,7 @@ Default: 0, output turned off.
| | `statevec_colmean` | 0 |
| | `statevec_only_active` | 0 |
| | `statevec_max_layer` | 25 |
| | `t_printensemble` | -1 |
| | `t_printensemble` | -2 |
| | `watmin_switch` | 0 |
| `[COSMO]` | | |
| | `nprocs` | 0 |
Expand Down
10 changes: 5 additions & 5 deletions interface/model/clm3_5/enkf_clm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ subroutine set_clm_statevec(tstartcycle, mype)
ttlai => clm3%g%l%c%p%pps%tlai !hcp

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble == -1) THEN

IF(clmupdate_swc.NE.0) THEN
! TSMP-PDAF: Debug output of CLM swc
Expand Down Expand Up @@ -290,7 +290,7 @@ subroutine set_clm_statevec(tstartcycle, mype)
endif

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble == -1) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn, "(a,i5.5,a,i5.5,a)") "clmstate_", mype, ".integrate.", tstartcycle + 1, ".txt"
OPEN(unit=71, file=fn, action="write")
Expand Down Expand Up @@ -341,7 +341,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
logical :: swc_zero_before_update = .false.

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn, "(a,i5.5,a,i5.5,a)") "clmstate_", mype, ".update.", tstartcycle, ".txt"
OPEN(unit=71, file=fn, action="write")
Expand All @@ -364,7 +364,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
h2osoi_ice => clm3%g%l%c%cws%h2osoi_ice

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN

IF(clmupdate_swc.NE.0) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
Expand Down Expand Up @@ -476,7 +476,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
end do

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN

IF(clmupdate_swc.NE.0) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
Expand Down
4 changes: 2 additions & 2 deletions interface/model/common/read_enkfpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void read_enkfpar(char *parname)
pf_aniso_perm_z = iniparser_getdouble(pardict,"PF:aniso_perm_z",1);
pf_aniso_use_parflow = iniparser_getint(pardict,"PF:aniso_use_parflow",0);
pf_printensemble = iniparser_getint(pardict,"PF:printensemble",1);
pf_t_printensemble = iniparser_getint(pardict,"PF:t_printensemble",-1);
pf_t_printensemble = iniparser_getint(pardict,"PF:t_printensemble",-2);
pf_printstat = iniparser_getint(pardict,"PF:printstat",1);
pf_paramprintensemble = iniparser_getint(pardict,"PF:paramprintensemble",1);
pf_paramprintstat = iniparser_getint(pardict,"PF:paramprintstat",1);
Expand Down Expand Up @@ -85,7 +85,7 @@ void read_enkfpar(char *parname)
clmstatevec_colmean = iniparser_getint(pardict,"CLM:statevec_colmean",0);
clmstatevec_only_active = iniparser_getint(pardict,"CLM:statevec_only_active",0);
clmstatevec_max_layer = iniparser_getint(pardict,"CLM:statevec_max_layer",25);
clmt_printensemble = iniparser_getint(pardict,"CLM:t_printensemble",-1);
clmt_printensemble = iniparser_getint(pardict,"CLM:t_printensemble",-2);
clmwatmin_switch = iniparser_getint(pardict,"CLM:watmin_switch",0);
clmswc_mask_snow = iniparser_getint(pardict,"CLM:swc_mask_snow",0);

Expand Down
10 changes: 5 additions & 5 deletions interface/model/eclm/enkf_clm_mod_5.F90
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ subroutine set_clm_statevec(tstartcycle, mype)
porgm => soilstate_inst%cellorg_col

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble == -1) THEN

IF(clmupdate_swc/=0) THEN
! TSMP-PDAF: Debug output of CLM swc
Expand Down Expand Up @@ -458,7 +458,7 @@ subroutine set_clm_statevec(tstartcycle, mype)
endif

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle + 1 .OR. clmt_printensemble == -1) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn, "(a,i5.5,a,i5.5,a)") "clmstate_", mype, ".integrate.", tstartcycle + 1, ".txt"
OPEN(unit=71, file=fn, action="write")
Expand Down Expand Up @@ -560,7 +560,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
swc_zero_before_update = .false.

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn, "(a,i5.5,a,i5.5,a)") "clmstate_", mype, ".update.", tstartcycle, ".txt"
OPEN(unit=71, file=fn, action="write")
Expand All @@ -575,7 +575,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
h2osoi_ice => waterstate_inst%h2osoi_ice_col

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN

IF(clmupdate_swc/=0) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
Expand Down Expand Up @@ -774,7 +774,7 @@ subroutine update_clm_swc(tstartcycle, mype)
end do

#ifdef PDAF_DEBUG
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble < 0) THEN
IF(clmt_printensemble == tstartcycle .OR. clmt_printensemble == -1) THEN

! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn3, "(a,i5.5,a,i5.5,a)") "h2osoi_liq", mype, ".update.", tstartcycle, ".txt"
Expand Down
4 changes: 2 additions & 2 deletions interface/model/parflow/enkf_parflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ void enkfparflowadvance(int tcycle, double current_time, double dt)
added to `tstartcycle` in the wrapper subroutine directly
after this routine, so the added value fits better than
the current value. */
if(pf_t_printensemble == tstartcycle + 1 || pf_t_printensemble < 0 ) {
if(pf_t_printensemble == tstartcycle + 1 || pf_t_printensemble == -1 ) {
if(pf_printensemble == 1) {
enkf_printstatistics_pfb(&pf_statevec[0],"integrate",tstartcycle + 1 + stat_dumpoffset,pfoutfile_ens,3);
}
Expand Down Expand Up @@ -1485,7 +1485,7 @@ void update_parflow () {
}

/* print updated ensemble */
if(pf_t_printensemble == tstartcycle || pf_t_printensemble < 0 ) {
if(pf_t_printensemble == tstartcycle || pf_t_printensemble == -1 ) {
if(pf_updateflag == 3){
if(pf_printensemble == 1) enkf_printstatistics_pfb(&pf_statevec[enkf_subvecsize],"update",tstartcycle + stat_dumpoffset,pfoutfile_ens,3);
}else{
Expand Down