Skip to content

Commit

Permalink
Final regression test edit
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhitlock-NOAA committed May 11, 2015
1 parent 3f39a8a commit a7310b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Regression_tests/xmls/darkchocolate_anom_PM_test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<downscale>
<ifpreexist>move</ifpreexist>
<input predictor_list = "tasmaxAnom" target = "tasmaxAnom" target_ID="txan" spat_mask = "na" maskvar = "na" spat_mask_ID="US48" in_root="/archive/esd/PROJECTS/DOWNSCALING" >
<input predictor_list = "tasminAnom" target = "tasminAnom" target_ID="tnan" spat_mask = "na" maskvar = "na" spat_mask_ID="US48" in_root="/archive/esd/PROJECTS/DOWNSCALING" >
<dim>OneD</dim>
<grid region = "US48">
<lons>748</lons>
Expand All @@ -17,7 +17,7 @@
train_end_time = "20081231"
time_window='na'
>
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360-COARSENED.amip.day.atmos.day.PManom1979-2008Sbx7.v20110601</dataset><!--- we know that we want the tasmax, tasmin vars
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360-COARSENED.amip.day.atmos.PManom1979-2008Sbx7.r1i1p1.v20110601</dataset><!--- we know that we want the tasmax, tasmin vars
in the id directory as specified in <input predictor_list = ""> -->
</historical_predictor>
<historical_target
Expand All @@ -28,7 +28,7 @@
time_window = 'na'
>
<!-- NCPP2013.modified.NOAA-GFDL.GFDL-HIRAM-C360-COARSENED.sst2090.day.atmos.day.r1i1p2.v20110601 -->
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360.amip.day.atmos.day.PManom1979-2008Sbx7.v20110601</dataset>
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360.amip.day.atmos.PManom1979-2008Sbx7.r1i1p1.v20110601</dataset>
</historical_target>
<!-- and in this case, we want the target var specified in <input> -->
<future_predictor
Expand All @@ -38,7 +38,7 @@
train_end_time = "20951231"
time_window = 'na'
>
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360-COARSENED.sst2090.day.atmos.day.PManom2086-2095Sbx7.v20110601</dataset>
<dataset>GCM_DATA.NCPP.GFDL-HIRAM-C360-COARSENED.sst2090.day.atmos.PManom2086-2095Sbx7.r1i1p2.v20110601</dataset>
</future_predictor>
</training>
<esdgen>
Expand All @@ -59,7 +59,7 @@
</kfold>
<!--specifies the OUTPUT DIRECTORY -->
<output>
<out_dir>OUTPUT_DIR/downscaled/GFDL-HIRAM-C360-COARSENED/sst2090/day/atmos/day/PManom2086-2095Sbx7/v20110601/PMtxanp1-BCQM-B38ca2L01K00/tasmaxAnom/US48/OneD/</out_dir>
<out_dir>OUTPUT_DIR/downscaled/GFDL-HIRAM-C360-COARSENED/sst2090/day/atmos/day/PManom2086-2095Sbx7/v20110601/PMtnanp1-BCQM-B38ca2L01K00/tasminAnom/US48/OneD/</out_dir>
<script_root>SCRIPT_DIR/regression_test_5/</script_root>
</output>
</core>
Expand Down
10 changes: 5 additions & 5 deletions Rsuite/FudgeTrain/LoopByTimeWindow.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ LoopByTimeWindow <- function(train.predictor=NULL, train.target=NULL, esd.gen, m
#Assign downscaled output to vector
if(use.time.trim.mask){
# downscale.vec[!is.na(kfold.timemask)] <- temp.out[!is.na(kfold.timemask)]
temp.assign <- esd.gen[[1]]
temp.assign <- esd.gen
temp.assign[!is.na(mask.struct[[3]]$masks[[window]])] <- temp.out
downscale.vec[!is.na(kfold.timemask)] <- temp.assign[!is.na(kfold.timemask)]
}else{
Expand All @@ -185,8 +185,8 @@ LoopByTimeWindow <- function(train.predictor=NULL, train.target=NULL, esd.gen, m
#create.qc.mask=create.qc.mask, create.adjust.out=create.adjust.out)
if(!is.null(temp.out$qc.mask)){
if(use.time.trim.mask){
temp.assign <- esd.gen[[1]]
temp.assign[!is.na(mask.struct[[3]]$masks[[window]])] <- temp.out
temp.assign <- esd.gen
temp.assign[!is.na(mask.struct[[3]]$masks[[window]])] <- temp.out$qc.mask
downscale.vec[!is.na(kfold.timemask)] <- temp.assign[!is.na(kfold.timemask)]
}else{
qc.mask[!is.na(kfold.gen)] <- temp.out$qc.mask #A NULL assignment might cause problems here. Second if?
Expand All @@ -197,8 +197,8 @@ LoopByTimeWindow <- function(train.predictor=NULL, train.target=NULL, esd.gen, m
#If there is a time-trimming mask, use it here
#Assign downscaled output to vector
if(use.time.trim.mask){
temp.assign <- esd.gen[[1]]
temp.assign[!is.na(mask.struct[[3]]$masks[[window]])] <- temp.out
temp.assign <- esd.gen
temp.assign[!is.na(mask.struct[[3]]$masks[[window]])] <- temp.out$ds.out
downscale.vec[!is.na(kfold.timemask)] <- temp.assign[!is.na(kfold.timemask)]
}else{
downscale.vec[!is.na(kfold.gen)] <- temp.out$ds.out
Expand Down

0 comments on commit a7310b3

Please sign in to comment.