I'm trying to split a forward run over multiple non-overlapping periods. First, check if the total emission during Jan 1 to Jul 15, 2008 is equal to the emission over the four shorter periods. All emissions below are in Tg CO/yr.
For Jan 1 to Jul 15 (196 days)
glb300x200 natural 520.80 glb300x200 biomass burning 225.87 glb300x200 anthropogenic 461.70
For Jan 1 to Mar 1 (60 days)
glb300x200 natural 469.19 glb300x200 biomass burning 208.34 glb300x200 anthropogenic 461.70
For Mar 1 to May 1 (61 days)
glb300x200 natural 510.94 glb300x200 biomass burning 186.74 glb300x200 anthropogenic 461.70
For May 1 to Jul 1 (61 days)
glb300x200 natural 563.07 glb300x200 biomass burning 248.30 glb300x200 anthropogenic 461.70
For Jul 1 to Jul 15 (14 days)
glb300x200 natural 600.76 glb300x200 biomass burning 373.73 glb300x200 anthropogenic 461.70
So if we weigh the individual fluxes by the number of days, we end up with what should be the flux for the entire period, which is
natural (60*469.19 + 61*510.94 + 61*563.07 + 14*600.76)/196 = 520.80 biomass burning (60*208.34 + 61*186.74 + 61*248.30 + 14*373.73)/196 = 225.87 anthropogenic (60*461.70 + 61*461.70 + 61*461.70 + 14*461.70)/196 = 461.70
So at least the emissions make sense. Then what gives? We need to turn budgets back on to investigate.
For diagnosis, we do a full run from 1-1-2008 to 15-3-2008, and split it into two week windows. For the full run,
2008-01-01 to 2008-01-15
2008-01-15 to 2008-01-29
2008-01-29 to 2008-02-12
We don't need to test any more to see the problem; the final mass after a stage is not equal to the initial mass at the beginning of the next step. But why?
Last edit: raglan_road 2014-06-12
I think we start every time with single precision pressure fields.
So, it is a matter of rounding I guess.
We need to continue with the saved masses (we do that already for the adjoint run.).
Also good: check the “processes” themselves.
they should sum up (although chemistry scales with the mass).
There is a section of code in io_save/readnetcdf where some rescaling is done
where 'saved_mass' is the airmass read in from the save file, and 'm' is the airmass in the model. Perhaps this is the problem? I have commented that section out, let's see if the ending and starting masses match.
2008-01-01 to 2008-01-03
2008-01-03 to 2008-01-05
Huh, so that was the problem. Question is, why are the airmasses different?
I coded savenetcdf/readnetcdf to save the full mass array, and read it in. With that fix,
Entire period
Period 1
Period 2
Didn't run...
Wonderful!
Now I'm trying to save the surface pressure as well, and reading that in.
Period 1
Period 2
Nope....
After some debugging too detailed to put down here, new try. 2008-10-01 to 2008-11-01.
2008-10-01 to 2008-10-05
2008-10-05 to 2008-10-09
2008-10-09 to 2008-10-13
2008-10-13 to 2008-10-17
2008-10-17 to 2008-10-21
2008-10-21 to 2008-10-25
2008-10-25 to 2008-10-29
2008-10-29 to 2008-11-01
In contrast, if the entire period is run at once, from 2008-10-01 to 2008-11-01
~~~~
Last edit: raglan_road 2014-06-20