Menu

Splitting a forward run

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.

Posted by raglan_road 2014-06-09
  • raglan_road

    raglan_road - 2014-06-12

    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,

    Initial mass   :          3.28966E+11
         emitted   :          3.89799E+11
       chemistry   :         -3.67360E+11
        update_p   :          0.00000E+00
       advection   :         -3.11890E-02
      deposition   :         -2.42995E+10
    stratosphere   :          0.00000E+00
      Final mass   :          3.27106E+11
    Budget error   :         -5.19580E+00
    

    2008-01-01 to 2008-01-15

    Initial mass   :          3.28966E+11
         emitted   :          7.70661E+10
       chemistry   :         -6.83605E+10
        update_p   :          0.00000E+00
       advection   :          1.96716E-01
      deposition   :         -4.49052E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.33181E+11
    Budget error   :          1.19385E-01
    

    2008-01-15 to 2008-01-29

    Initial mass   :          3.33186E+11
         emitted   :          7.71930E+10
       chemistry   :         -6.86321E+10
        update_p   :          0.00000E+00
       advection   :          2.90894E-01
      deposition   :         -4.16787E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.37579E+11
    Budget error   :          2.44629E-01
    

    2008-01-29 to 2008-02-12

    Initial mass   :          3.37584E+11
         emitted   :          7.22875E+10
       chemistry   :         -6.96786E+10
        update_p   :          0.00000E+00
       advection   :          7.12524E-01
      deposition   :         -4.58983E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.35603E+11
    Budget error   :          7.97546E-01
    

    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
  • Maarten Krol

    Maarten Krol - 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).

     
  • raglan_road

    raglan_road - 2014-06-12

    There is a section of code in io_save/readnetcdf where some rescaling is done

    ! Now scale the rm, rxm, rym and rzm by the ratio of masses
    do n = 1, ntracet
        rm(1:imr,1:jmr,1:lmr,n) = rm(1:imr,1:jmr,1:lmr,n) * m(1:imr,1:jmr,1:lmr) / saved_mass(1:imr,1:jmr,1:lmr)
        rxm(1:imr,1:jmr,1:lmr,n) = rxm(1:imr,1:jmr,1:lmr,n) * m(1:imr,1:jmr,1:lmr) / saved_mass(1:imr,1:jmr,1:lmr)
        rym(1:imr,1:jmr,1:lmr,n) = rym(1:imr,1:jmr,1:lmr,n) * m(1:imr,1:jmr,1:lmr) / saved_mass(1:imr,1:jmr,1:lmr)
        rzm(1:imr,1:jmr,1:lmr,n) = rzm(1:imr,1:jmr,1:lmr,n) * m(1:imr,1:jmr,1:lmr) / saved_mass(1:imr,1:jmr,1:lmr)
    end do
    

    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

    Initial mass   :          3.28967E+11
         emitted   :          1.07026E+10
       chemistry   :         -9.78799E+09
        update_p   :          0.00000E+00
       advection   :         -3.28979E-02
      deposition   :         -6.52813E+08
    stratosphere   :          0.00000E+00
      Final mass   :          3.29229E+11
    Budget error   :         -2.83813E-02
    

    2008-01-03 to 2008-01-05

    Initial mass   :          3.29229E+11
         emitted   :          1.08613E+10
       chemistry   :         -9.78207E+09
        update_p   :          0.00000E+00
       advection   :          1.15356E-02
      deposition   :         -6.59629E+08
    stratosphere   :          0.00000E+00
      Final mass   :          3.29649E+11
    Budget error   :         -2.82593E-02
    

    Huh, so that was the problem. Question is, why are the airmasses different?

     
  • raglan_road

    raglan_road - 2014-06-12

    I coded savenetcdf/readnetcdf to save the full mass array, and read it in. With that fix,

    Entire period

    Initial mass   :          3.28966E+11
         emitted   :          3.89799E+11
       chemistry   :         -3.67360E+11
        update_p   :          0.00000E+00
       advection   :         -3.11890E-02
      deposition   :         -2.42995E+10
    stratosphere   :          0.00000E+00
      Final mass   :          3.27106E+11
    Budget error   :         -5.19592E+00
    

    Period 1

    Initial mass   :          3.28966E+11
         emitted   :          7.70661E+10
       chemistry   :         -6.83605E+10
        update_p   :          0.00000E+00
       advection   :          1.96716E-01
      deposition   :         -4.49052E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.33181E+11
    Budget error   :          1.19385E-01
    

    Period 2

    Didn't run...

     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
    
          2008-Jan-15 03:00:00     ERROR - ESCAPE_TM
     read_wind: problem with read-in pressure
    
     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
    

    Wonderful!

     
  • raglan_road

    raglan_road - 2014-06-12

    Now I'm trying to save the surface pressure as well, and reading that in.

    Period 1

    Initial mass   :          3.28966E+11
         emitted   :          2.15639E+10
       chemistry   :         -1.95671E+10
        update_p   :          0.00000E+00
       advection   :          4.07715E-02
      deposition   :         -1.31225E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.29651E+11
    Budget error   :          2.43530E-02
    

    Period 2

    Nope....

     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
    
          2008-Jan-05 03:00:00     ERROR - ESCAPE_TM
     read_wind: problem with read-in pressure
    
     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
    
     
  • raglan_road

    raglan_road - 2014-06-20

    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

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.22312E+11
         emitted   :          2.05451E+10
       chemistry   :         -1.94710E+10
        update_p   :         -3.16822E+08
       advection   :          4.49219E-02
      deposition   :         -1.21299E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.21857E+11
    Budget error   :          4.88281E-04
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.60114E+10
         emitted   :          1.21188E+09
       chemistry   :         -1.48324E+09
        update_p   :         -2.51375E+07
       advection   :         -2.00132E+08
      deposition   :         -2.03251E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.54944E+10
    Budget error   :         -1.52817E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.33645E+10
         emitted   :          9.67356E+08
       chemistry   :         -9.37356E+08
        update_p   :          0.00000E+00
       advection   :         -9.48745E+07
      deposition   :         -5.44684E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.32451E+10
    Budget error   :          2.34795E-03
     --------------------------------------------------------
    

    2008-10-05 to 2008-10-09

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.21857E+11
         emitted   :          2.03504E+10
       chemistry   :         -1.94822E+10
        update_p   :         -2.09816E+08
       advection   :          1.35010E-01
      deposition   :         -1.28102E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.21234E+11
    Budget error   :          1.28601E-01
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.54944E+10
         emitted   :          1.22235E+09
       chemistry   :         -1.44998E+09
        update_p   :          3.43012E+07
       advection   :         -3.30526E+08
      deposition   :         -1.64837E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.49541E+10
    Budget error   :          4.19617E-04
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.32451E+10
         emitted   :          1.02005E+09
       chemistry   :         -9.27251E+08
        update_p   :          0.00000E+00
       advection   :         -1.12544E+08
      deposition   :         -5.68090E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.31686E+10
    Budget error   :         -2.37656E-03
     --------------------------------------------------------
    

    2008-10-09 to 2008-10-13

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.21234E+11
         emitted   :          1.97870E+10
       chemistry   :         -1.93833E+10
        update_p   :          4.07921E+07
       advection   :         -7.83081E-02
      deposition   :         -1.34229E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.20336E+11
    Budget error   :         -7.08618E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.49541E+10
         emitted   :          1.22790E+09
       chemistry   :         -1.42643E+09
        update_p   :          2.57957E+08
       advection   :         -3.34868E+08
      deposition   :         -1.86362E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.46600E+10
    Budget error   :         -5.71442E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.31686E+10
         emitted   :          1.23015E+09
       chemistry   :         -9.19577E+08
        update_p   :          0.00000E+00
       advection   :         -2.95364E+08
      deposition   :         -5.49753E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.31288E+10
    Budget error   :          1.35231E-03
     --------------------------------------------------------
    

    2008-10-13 to 2008-10-17

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.20336E+11
         emitted   :          1.97061E+10
       chemistry   :         -1.92529E+10
        update_p   :          8.01774E+07
       advection   :         -6.14624E-02
      deposition   :         -1.42361E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.19446E+11
    Budget error   :         -5.73120E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.46600E+10
         emitted   :          1.22365E+09
       chemistry   :         -1.39989E+09
        update_p   :          2.73318E+08
       advection   :         -3.80254E+08
      deposition   :         -1.69062E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.43599E+10
    Budget error   :         -3.70026E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.31288E+10
         emitted   :          1.24799E+09
       chemistry   :         -9.21448E+08
        update_p   :          0.00000E+00
       advection   :         -3.22791E+08
      deposition   :         -5.44409E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.30781E+10
    Budget error   :          9.63211E-04
     --------------------------------------------------------
    

    2008-10-17 to 2008-10-21

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.19446E+11
         emitted   :          1.96105E+10
       chemistry   :         -1.91744E+10
        update_p   :          6.87563E+07
       advection   :         -2.74658E-02
      deposition   :         -1.34615E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.18605E+11
    Budget error   :         -3.42407E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.43599E+10
         emitted   :          1.22064E+09
       chemistry   :         -1.39148E+09
        update_p   :          2.56457E+08
       advection   :         -3.59165E+08
      deposition   :         -1.68553E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.40695E+10
    Budget error   :         -4.24957E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.30781E+10
         emitted   :          1.23301E+09
       chemistry   :         -9.18698E+08
        update_p   :          0.00000E+00
       advection   :         -3.53322E+08
      deposition   :         -5.55705E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.29835E+10
    Budget error   :         -1.25961E-02
     --------------------------------------------------------
    

    2008-10-21 to 2008-10-25

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.18605E+11
         emitted   :          1.94551E+10
       chemistry   :         -1.90790E+10
        update_p   :          3.24408E+08
       advection   :          2.68555E-03
      deposition   :         -1.29764E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.18008E+11
    Budget error   :          1.34277E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.40695E+10
         emitted   :          1.20953E+09
       chemistry   :         -1.36742E+09
        update_p   :          4.98271E+08
       advection   :         -6.76166E+08
      deposition   :         -1.59739E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.37178E+10
    Budget error   :         -9.59778E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.29835E+10
         emitted   :          1.46024E+09
       chemistry   :         -9.10422E+08
        update_p   :          0.00000E+00
       advection   :         -5.12502E+08
      deposition   :         -5.33344E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.29675E+10
    Budget error   :         -3.99971E-03
     --------------------------------------------------------
    

    2008-10-25 to 2008-10-29

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.18008E+11
         emitted   :          1.94468E+10
       chemistry   :         -1.89733E+10
        update_p   :          1.17806E+08
       advection   :          9.88770E-03
      deposition   :         -1.33930E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.17260E+11
    Budget error   :          3.11279E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.37178E+10
         emitted   :          1.21943E+09
       chemistry   :         -1.35741E+09
        update_p   :          2.83430E+08
       advection   :         -3.30730E+08
      deposition   :         -2.76400E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.35048E+10
    Budget error   :          1.41144E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.29675E+10
         emitted   :          1.25931E+09
       chemistry   :         -9.21946E+08
        update_p   :          0.00000E+00
       advection   :         -3.49834E+08
      deposition   :         -5.38880E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.29012E+10
    Budget error   :         -5.24330E-03
     --------------------------------------------------------
    

    2008-10-29 to 2008-11-01

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.17260E+11
         emitted   :          1.45521E+10
       chemistry   :         -1.42214E+10
        update_p   :          4.75267E+07
       advection   :         -5.78613E-02
      deposition   :         -1.02753E+09
    stratosphere   :          0.00000E+00
      Final mass   :          3.16610E+11
    Budget error   :         -6.24390E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.35048E+10
         emitted   :          9.20740E+08
       chemistry   :         -1.00965E+09
        update_p   :          1.53914E+08
       advection   :         -1.73933E+08
      deposition   :         -1.74731E+07
    stratosphere   :          0.00000E+00
      Final mass   :          3.33784E+10
    Budget error   :          5.77164E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.29012E+10
         emitted   :          8.71501E+08
       chemistry   :         -6.80529E+08
        update_p   :          0.00000E+00
       advection   :         -3.64233E+08
      deposition   :         -3.91979E+07
    stratosphere   :          0.00000E+00
      Final mass   :          1.26887E+10
    Budget error   :         -9.32693E-04
     --------------------------------------------------------
    

    In contrast, if the entire period is run at once, from 2008-10-01 to 2008-11-01

     --------------------------------------------------------
    Budget of tracers in region glb600x400 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.22312E+11
         emitted   :          1.53453E+11
       chemistry   :         -1.49043E+11
        update_p   :          1.53065E+08
       advection   :          4.68750E-02
      deposition   :         -1.02694E+10
    stratosphere   :          0.00000E+00
      Final mass   :          3.16606E+11
    Budget error   :          9.94873E-03
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus300x200 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          3.60114E+10
         emitted   :          9.45611E+09
       chemistry   :         -1.08850E+10
        update_p   :          1.73220E+09
       advection   :         -2.78432E+09
      deposition   :         -1.50279E+08
    stratosphere   :          0.00000E+00
      Final mass   :          3.33801E+10
    Budget error   :         -1.20163E-02
     --------------------------------------------------------
     --------------------------------------------------------
    Budget of tracers in region aus100x100 (Kg)
          Tracer   :             CO      
     --------------------------------------------------------
    Initial mass   :          1.33645E+10
         emitted   :          9.28961E+09
       chemistry   :         -7.13744E+09
        update_p   :          0.00000E+00
       advection   :         -2.40221E+09
      deposition   :         -4.22697E+08
    stratosphere   :          0.00000E+00
      Final mass   :          1.26917E+10
    Budget error   :         -8.75854E-03
     --------------------------------------------------------
    

    ~~~~

     

    Last edit: raglan_road 2014-06-20

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.