As I mentioned in my email update last week, I finally finished a first pass of the new WWTP integration! This week, I checked the outputs of every step of the TRAPS code and verified that the integration works.

My code generates climatologies for rivers and Canadian WWTPs that match the old version of the code. The code places all of the WWTPs in the exact same locations as the prior version of the code. The only difference between the old and new TRAPS outputs appear to be the WWTP forcing– which is what we hoped for.

Figure 1 shows a comparison of WWTP forcing from the old version of TRAPS, and from the new version. Note that these figures are generated from rivers.nc, which is the forcing file that gets fed into ROMS. Thus, these figures represent the final values for WWTPs after going through all of the TRAPS code.


Fig 1. WWTP forcing inputs generated by TRAPS code for input to ROMS. Left side shows time series of flow, NO3, and NH4 for all point sources generated by the old version of TRAPS code. Right side shows the same figures generated by the new version of TRAPS code with the new WWTP dataset integrated. The forcing spans Jan 2014 - Dec 2014.


We cannot expect these figures to be identical, because we have updated the WWTP loads. However, the mean values and overall figures look similar, and the values generated by the new TRAPS code seem reasonable. Therefore, I am inclined to think that the forcing code was successful. This means I can generate the forcing files needed to launch and run the new loading experiments.

The remaining issue: My TRAPS code is a mess. In particular, the forcing generation code is convoluted. This issue is not urgent, but I think it is still important that I return to this code and clean it up before submitting a pull request to integrate everything into the production version of LO. Also, it would give me peace of mind to think through every detail of the code– because so far I have only verified that things work by looking at outputs.