Difference between revisions of "GEOS-Chem Adjoint v33"

From Geos-chem
Jump to: navigation, search
m (Bug fixes in adjoint model)
(What's new in this version)
 
(80 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== What's new in this version ==
+
== Overview ==
  
=== Updates to forward model ===
+
BETA RELEASE
  
=== Bug fixes in forward model ===
+
*Previous version: [[GEOS-Chem_Adjoint_v32]]
  
==== Ionic strength below zero in rpmares (adj33_001) ====
+
=== What's new in this version ===
On prospero, we often get the message: <tt>Ionic strength below zero...negative concentrations</tt>.
+
  
Despite the setting of negative roots to zero, sometimes the code still ends up with negative CRUTES. Trap for it here to prevent mysterious crashing later.  Also, add the following
+
GEOS-Chem Adjoint v33 contains the following major updates and improvements.  
  
          !IF ( CRUTES(1) .ne. ABS(CRUTES(1) ) ) CRUTES(1)=1d9
+
{| border=1 cellspacing=0 cellpadding=5
          !IF ( CRUTES(2) .ne. ABS(CRUTES(2) ) ) CRUTES(2)=1d9
+
|- bgcolor="#CCCCCC"
          !IF ( CRUTES(3) .ne. ABS(CRUTES(3) ) ) CRUTES(3)=1d9
+
!Feature
 +
!Type
 +
!Submitted by
 +
!Committed by
 +
!Version
 +
!Status
 +
|-
 +
|[[#Add_TES_O3_IRK_.28v33a.29|Add TES O3 IRK observation operator]]
 +
|Adjoint Update
 +
|Daven Henze (CU Boulder), Kevin Bowman (JPL)
 +
|Daven Henze (CU Boulder)
 +
|v33a
 +
|Approved 13 Apr 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_wet_deposition_adjoint_.28v33b.29|Fix wetdep adjoint]]
 +
|Adjoint bug fix
 +
|Fabien Paulot (Harvard University), Daven Henze (CU Boulder)
 +
|Daven Henze (CU Boulder)
 +
|v33b
 +
|Approved 20 Apr 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_checkpointing_of_aircraft_SO2_emissions_.28v33c.29|Fix checkpointing of aircraft SO2 emissions]]
 +
|Adjoint bug fix
 +
|Daven Henze, Kateryna Lapina (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33c
 +
|Approved 20 Apr 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_linoz_adjoint_.28v33d.29|Fix linoz adjoint]]
 +
|Adjoint bug fix
 +
|Hyung-Min Lee (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33d
 +
|Approved 07 May 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Adjoint_stability_update_.28v33e.29| Adjoint stability update]]
 +
|Adjoint bug fix
 +
|Jamin Koo (MIT), Daven Henze (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33e
 +
|Approved 09 May 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_SE_Asia_NH3_seasonality_.28v33e.29| Fix SE Asia NH3 seasonality]]
 +
|Forward bug fix
 +
|Shailesh Kharol (Dalhousie), Steven Vogel (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33e
 +
|Approved 09 May 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_problem_with_LICS_flag_in_using_SCHEM_.28v33f.29| Fix problem with LICS flag in using SCHEM]]
 +
|Adjoint bug fix
 +
|Hyung-Min Lee (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33f
 +
|Approved 13 July 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Inverse_Hessian_and_pseudo-obs_cost_function_formulation_updates_.28v33g.29| L-BFGS inverse Hessian and pseudo-obs cost function formulation updates]]
 +
|Adjoint update
 +
|Nicolas Bousserez (CU Boulder)
 +
|Nicolas Bousserez (CU Boulder)
 +
|v33g
 +
|Approved 10 August 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#BC_fix_to_support_offline_simulation_and_AOD_.28v33h.29| BC fix to support offline simulation and AOD]]
 +
|Adjoint update
 +
|Li Zhang (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33h
 +
|Approved 5 September 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Two_Minor_Bug_Fixes_.28v33h.29| Two minor bug fixes]]
 +
|Adjoint bug fix
 +
|Daven Henze (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33h
 +
|Approved 5 September 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Fix_Monoterpene_SOA_zero_bug | Biomass Emissions bug fix]]
 +
|Forward bug fix
 +
| Jeffrey Pierce (CSU)
 +
|Yanko Davila (CU Boulder)
 +
|v33h
 +
|Approved 5 September 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#L-BFGS_inverse_Hessian_Update_.28v33i.29 | L-BFGS inverse Hessian update]]
 +
|Adjoint Update
 +
|Nicolas Bousserez (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33i
 +
|Approved 21 September 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Pseudo-Obs_Test_Bug_Fix_.28v33i.29 | Pseudo-obs test bug fix]]
 +
|Adjoint bug fix
 +
|Nicolas Bousserez (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33i
 +
|Approved 21 September 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Version_33i_patches_.28v33i-patch1.29 | Version 33i patch1]]
 +
|Adjoint bug fix
 +
|Nicolas Bousserez (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33i-patch1
 +
|Approved 9 October 2012
 +
|-bgcolor="#CCFFFF"
 +
|-
 +
|[[#Version_33i_patches_.28v33i-patch2.29| Version 33i patch2]]
 +
|Adjoint bug fix
 +
|Nicolas Bousserez (CU Boulder)
 +
|Yanko Davila (CU Boulder)
 +
|v33i-patch2
 +
|Approved 22 October 2012
 +
|-bgcolor="#CCFFFF"
 +
|}
  
which for some reason (I have no idea why) prevents the code from returning a negative CRUTES on prospero.
+
==== Updates to forward model ====
  
--[[User:Daven|Daven]] 14:58, 6 January 2012 (EST)
+
==== Bug fixes in forward model ====
  
==== Updated lightning parameterization and fix for cloud-top-height algorithm (v9-01-01) ====
+
===== Fix SE Asia NH3 seasonality (v33e) =====
Updates to <tt>a6_read_mod.f</tt> and <tt>lightning_nox_mod.f</tt>.  Details in Lee's description: http://people.seas.harvard.edu/~ltmurray/LNOx.v9-01-01.Release.Notes.pd
+
  
--[[User:Daven|Daven]] 15:18, 6 January 2012 (EST)
+
The bug fix from the forward model [http://wiki.seas.harvard.edu/geos-chem/index.php/Anthropogenic_emissions#Streets_2000 fixing the seasonality of the NH3 emissions over SE Asia] has also been applied.
  
==== Fix for GEIA emissions scaling factor over Botswana (v9-01-02h) ====
+
1 week benchmark is approved [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0  33e_003]
Updates to <tt>scale_anthro_mod.f</tt>. See [[GEOS-Chem_v9-01-02#Fix_for_GEIA_emissions_scaling_factor_over_Botswana]]
+
   
  
--[[User:Daven|Daven]] 16:16, 6 January 2012 (EST)
+
--[[User:Daven|Daven]] 02:40, 10 May 2012 (EDT)
  
==== TINY parameter in convection_mod.f (v8-03-02) ====
+
===== Fix Monoterpene SOA zero bug =====
Update to <tt>convection_mod.f</tt> [[GEOS-Chem_v8-03-02#TINY_parameter_in_convection_mod.f]]
+
  
--[[User:Daven|Daven]] 16:16, 6 January 2012 (EST)
+
The bug fix from the forward model [http://wiki.seas.harvard.edu/geos-chem/index.php/Setting_up_GEOS-Chem_nested_grid_simulations#Monoterpene_SOA_zero_bug_fix Monoterpene SOA zero bug fix] has been applied.
  
 +
--[[User:Yanko|Yanko]] 16:29, 6 September 2012 (EDT)
  
=== Updates to adjoint model ===
 
  
=== Bug fixes in adjoint model ===
+
==== Updates to adjoint model ====
  
==== Mover error checking for O3 assimilation (adj33_002) ====
+
===== Add TES O3 IRK (v33a) =====
'''''[mailto:N.Bousserez@dal.ca Nicolas Bousserez] wrote:'''''
+
  
:the code crashes in "input_adj_mod.f" when doing the checking of observation settings (see line 2027 in my code). It is apparently due to "IDCSPEC_ADJ", which is not allocated/defined yet at the time the program executes those lines. I'm skipping these checks for now then. Note: The code crashes also when using "TES_O3_OBS" instead of "SCIA_DAL_NO2_OBS", so it is not related to what I implemented apparently.
+
Implemented observation operator for assimilation of TES O3 IRKs.
  
The following block of code has been moved from <tt>input_adj_mod.f</tt> to subroutine <tt>INIT_CSPEC_ADJ</tt> in <tt>adj_arrays_mod.f</tt>, as it can only be called after the <tt>CSPEC</tt> variables have been initialized.
+
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0 33a_001]
  
#elif defined ( TES_O3_OBS )
+
--[[User:Daven|Daven]] 19:03, 13 April 2012 (EDT)
      ! Since the O3 obs operators will pass adjoints back
+
      ! to CSPEC via CSPEC_AFTER_CHEM_ADJ, we need to make sure that
+
      ! these species are listed as observed species
+
      FOUND = .FALSE.
+
      DO N = 1, NOBS_CSPEC
+
+
        IF ( TRIM( NAMEGAS( IDCSPEC_ADJ(N) ) ) == 'O3' ) THEN
+
            FOUND = .TRUE.
+
        ENDIF
+
+
      ENDDO
+
      IF ( .not. FOUND ) THEN
+
+
        CALL ERROR_STOP( ' Need to list O3 as observed species',
+
    &                    ' input_adj_mod ' )
+
      ENDIF
+
#endif
+
  
--[[User:Daven|Daven]] 16:38, 6 January 2012 (EST)
+
===== BC fix to support offline simulation and AOD (v33h) =====
 +
- Fix to support offline BC simulation and AOD calculation
  
==== Retire CSPEC_NO2_ADJ (adj33_003) ====
+
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE&pli=1#gid=0 v33h]
  
'''''[mailto:N.Bousserez@dal.ca Nicolas Bousserez] wrote:'''''
+
--[[User:Yanko|Yanko]] 16:43, 6 September 2012 (EDT)
  
:In "chemdr_adj.F" I removed this part:
+
===== L-BFGS inverse Hessian Update (v33i) =====
#if defined( SCIA_KNMI_NO2_OBS ) || defined( SCIA_DAL_NO2_OBS )
+
! Apply forcing from satellite observations
+
CSPEC_ADJ(:,IDNO2) = CSPEC_ADJ(:,IDNO2) + CSPEC_NO2_ADJ(:)
+
CSPEC_NO2_ADJ(:) = 0d0
+
#endif
+
:because it seems like I'm already updating the adjoint of NO2 in "sciadal_no2_obs_mod.f" through CSPEC_AFTER_CHEM_ADJ. I would like to be sure that it is correct though.
+
  
'''''[mailto:daven.henze@colorado.edu Daven Henze] wrote:'''''
+
Now use the background error instead of the initial L-BFGS inverse Hessian diagonal value where the gradient of the cost function is very small (in this case the inverse Hessian value is not updated by the algorithm).
 +
Calculate and output the Degree of Freedom for Signal.
  
:Yes, that is correct. I didn't want to take it out incase you had built your obs operator using CSPEC_NO2_ADJ.  But since you used the more generic CSPEC_AFTER_CHEM_ADJ, then we can delete this section entirely and use the section higher up in this file ( IF (LCSPEC_OBS) ...) to apply the forcing from your obs operator to CSPEC_ADJ.
+
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE&pli=1#gid=0 v33i]
  
Now use <tt>CSPEC_AFTER_CHEM_ADJ</tt> instead of <tt>CSPEC_NO2_ADJ</tt> in <tt>chemdr_adj.f</tt>.
+
--[[User:Yanko|Yanko]] 20:34, 21 September 2012 (EDT)
  
--[[User:Daven|Daven]] 18:04, 6 January 2012 (EST)
+
==== Bug fixes in adjoint model ====
  
==== Fix to NaNs in STT_ADJ everywhere after adjoint of partitioning (adj33_004) ====
+
===== Fix wet deposition adjoint (v33b) =====
The forward gas-phase chemical solver may sometimes need to repeat the internal integration of the reaction rate ODEs within a single grid cellWhen this happens, we now only redo the model calculation during the forward model run, not the adjoint, as this can lead to a corrupt CSPEC_ADJ array globally (not sure how that happens, but it does), eventually triggering a check for NaNs after the partitioning adjoint.  See updates to <tt>chemistry_mod.f</tt> and <tt>gckpp_adj_Integrator.f90</tt>Thanks to Richard Xu for helping pinpoint this bug.
+
The adjoint was not properly handling evaporationThis fix helps make the adjoint of species such as NH3 better in a few locations where adjoints were diverging from forward model sensitivities by up to 50%.   
  
--[[User:Daven|Daven]] 18:03, 6 January 2012 (EST)
 
  
==== Fix to NaNs in sulfate aerosol adjoint tracers (adj33_005) ====
+
See benchmark results  [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0 33a_002 vs 33b_002]
Owing to cancelation of errors, it's possible to seemingly randomly end up with NaNs coming out of <tt>CHEM_SO2_ADJ</tt> . This can happen if L3 ends up equaling 1d0 exactly.   We now trap for this and skip in the rate event this happens. 
+
  
--[[User:Daven|Daven]] 18:03, 6 January 2012 (EST)
+
--[[User:Daven|Daven]] 12:51, 20 April 2012 (EDT)
  
==== Remove superfluous debugging which had <tt>LAVHRRLAI</tt> set to FALSE ====
+
===== Fix checkpointing of aircraft SO2 emissions (v33c) =====
Noted by Fabien.  Upated in <tt>input_mod.f</tt>.
+
  
--[[User:Daven|Daven]] 18:07, 6 January 2012 (EST)
+
The SO2 aircraft emissions are distributed in the model based on a mapping from the 20 level inventory to the GEOS-Chem levels.  This mapping depends upon the air masses in the models.  The emissions are read in during the first hour of the month in the forward model, but on the last hour of the month in the adjoint.  Thus they were being calculated inconsistently in the adjoint compared to the forward model.  We now checkpoint these emissions rather than recalculate them
  
==== Fix for reseting deposition adjoints (adj33_006) ====
+
See benchmark results  [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0  33c_001 - 33c_004]
  
'''''[mailto:fabienpaulot@gmail.com Fabien Paulot] wrote:'''''
+
--[[User:Daven|Daven]] 23:08, 7 May 2012 (EDT)
  
:It seems it's "a bug" in the code. To keep track of the dry deposition flux of HNO3 I use dryhno3 (in cspec array). The CSPEC_ADJ(DRYHNO3,:) should be reset to zero at every time step but it is not. That's because you are saving in chk_cspec before it is reset to zero. Easy fix, just force to zero in chemdr_adj before the forcing is applied et voila, it works (the adjoint does not diverge any more after one hour). It should not affect anything as long as there is no forcing on dryhno3 (or any dry dep counters for that matter).
+
===== Fix linoz adjoint (v33d) =====
  
We add the following to reset the dry dep adjoints in <tt>chemdr_adj.f</tt>:
+
While the linoz routine is linear, and should be self-adjoint, it isn't exactly self-adjoint. For example, given initial forcings of STT_ADJ = 0d0 in every grid cell, it can generate non-zero values of STT_ADJ as output, which is incorrect.   
!$OMP PARALLEL DO
+
!$OMP+DEFAULT( SHARED )
+
!$OMP+PRIVATE( N, NK, JJ )
+
      DO N = 1,NUMDEP
+
          NK = NTDEP(N)
+
          IF (NK.NE.0) THEN
+
            JJ = IRM(NPRODLO+1,NK,NCS)
+
            IF (JJ.GT.0) THEN
+
                CSPEC_ADJ(:,JJ) = 0.0D0
+
            ENDIF
+
          ENDIF
+
      ENDDO
+
  !$OMP END PARALLEL DO
+
  
--[[User:Daven|Daven]] 18:34, 6 January 2012 (EST)
+
In this update we use the discrete adjoint based upon reformulating the code to be consistent with the strat chem routine for the non-Ox species.
  
==== Update comments for STT_ADJ unit conversion ====
+
See benchmark results  [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0  33d_001 - 33c_007]
'''''[mailto:mkeller@atmosp.physics.utoronto.ca Martin Keller] wrote:'''''
+
  
:I'm currently guessing that CONVERT_UNITS(1,etc.) does something like:
+
--[[User:Daven|Daven]] 23:14, 7 May 2012 (EDT)
  
STT:     kg -> v/v
+
'''Important: If you check out version 33d (using the tag option), make sure to also check out the most recent version of linoz_mod.f (cvs checkout linoz_mod.f), since this file had not been updated by mistake.
+
--[[User:Nicolas Bousserez|Nicolas Bousserez]] 22:12, 7 July 2012 (EDT)
STT_ADJ: J/[v/v] -> J/kg
+
  
:and similarly CONVERT_UNITS(2,etc.)
+
===== Adjoint stability update (v33e) =====
  
STT:    v/v -> kg
+
Several fixes were made to increase the numerical stability of the code
+
*Change the filter to 1d-10 in partition_adj.f
STT_ADJ: J/kg -> J/[v/v]
+
*Better error trapping in gckpp_adj_Integrator.f90 to prevent NaNs following a failed integration step during the adjoint
  
:From a dimensional analysis this would seem plausible. It would also explain some of the errors I'm currently fighting with. If this is correct, then a short comment should perhaps be added to the code.
 
  
The comments in <tt>geos_chem_adj_mod.f</tt> have been updated surrounding calls to CONVERT_UNITS.
 
  
--[[User:Daven|Daven]] 18:43, 6 January 2012 (EST)
+
A few other small changes to improve performance were included in this update.  Overall, the benchmark performance is not impacted by these update, see [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=0  33e_001]
  
==== Only write upbd checkpoint files if necessary (adj33_007) ====
 
Thanks to Farhan Akhtar for pointing this out.  We now check to make sure writing these checkpoint files is necessary (i.e., it is an adjoint run, and not just a pseudo obs calculation) in <tt>linoz_mod.f</tt>:
 
  
      ! Now see if checkpointing is necessary (fa, dkh, 01/06/12, adj33_007)
+
--[[User:Daven|Daven]] 02:26, 10 May 2012 (EDT)
      IF ( LADJ .and. N_CALC > 0 ) THEN
+
          CALL MAKE_UPBDFLX_CHKFILE( NYMD, NHMS, TAU )
+
      ENDIF
+
  
--[[User:Daven|Daven]] 18:54, 6 January 2012 (EST)
+
'''Important: If you check out version 33e (using the tag option), make sure to also check out the most recent version of linoz_mod.f (cvs checkout linoz_mod.f), since this file had not been updated by mistake.'''
 +
--[[User:Nicolas Bousserez|Nicolas Bousserez]] 22:12, 7 July 2012 (EDT)
  
== Previous issues now resolved in v33 ==
 
  
== Previous issues now resolved in v32 ==
+
===== Fix problem with LICS flag in using SCHEM (v33f) =====
==== CO2 emissions update to allow for both monthly and years emissions ====
+
Update to <tt>co2_mod.f</tt>  (dkh, 03/07/11)
+
  
==== Updates to <tt>lidort_mod.f</tt> ====
+
New stratospheric chemistry module (strat_chem_mod.f), was set to loop over the number of tracers (NSTPL) that has read from input.gcadj. It caused a problem when LADJ_STRAT is turned off, LADJ_STRAT is not appeared in input.gcadj (NSTPL = 0), or LADJ = F for spin-up.
*Reinstate NCOUNT in CALC_RF_FORCE so that aod files are made at the right time.  (dkh, 03/27/11)  
+
*now check to make sure that MAXTHREADS matches JJPAR in lidort_mod.f (dkh, 03/27/11)
+
  
==== Update to Mie table ====
+
--[[User:Hyung-Min Lee|Hyung-Min Lee]] 19:26, 14 Jul 2012 (EDT)
Update <tt>mie_mod.f</tt> to use finite difference values for adjoints. (dkh, 03/27/11)
+
  
==== Remove bug in <tt>SET_SF</tt> ====
+
===== Inverse Hessian and pseudo-obs cost function formulation updates (v33g) =====
Remove erroneous debugging code in <tt>subroutine SET_SF</tt> in <tt>inverse_mod.f</tt>. (dkh, 03/27/11)
+
- Possibility to compute the L-BFGS inverse Hessian, which gives the posterior error covariance matrix of the inversion. Here only the diagonal elements (the error variances) of the matrix are computed. Unlike the DFP method, this method allows to compute a posterior errors for large dimensional problems (e.g. high-resolution inversions).
  
 +
- The equations for the initial estimate of the inverse Hessian in the DFP algorithm were also updated to allow for quicker convergence. 
 +
 +
- The cost function for the pseudo-observations inversion test has been modified to properly account for the error term specified in the input.gcadj input file (ERROR).
 +
 +
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE#gid=1 v33g]
 +
 +
--[[User:Nicolas Bousserez|Nicolas Bousserez]] 05:34, 11 August 2012 (EDT)
 +
 +
===== Two Minor Bug Fixes (v33h) =====
 +
- Fix for OpenMP in subroutine EMITHIGH_ADJ.  This can correct some errors for the BC emissions adjoints.  Without this fix, users may notice some error in FD vs ADJ calculations for shorter simulations.
 +
 +
- Update subroutine CHEM_SO2_ADJ to avoid underflow.
 +
 +
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE&pli=1#gid=0 v33h]
 +
 +
--[[User:Yanko|Yanko]] 16:43, 6 September 2012 (EDT)
 +
 +
===== Pseudo-Obs Test Bug Fix (v33i) =====
 +
- Bug fix for the definition of the observation error in the pseudo-obs inversion test and filter to avoid NaN adjoint value.
 +
 +
See benchmark results [https://docs.google.com/spreadsheet/ccc?key=0As2MewHKyWpDdDlTeFdPanU2RzlWc0luaFpEQXlyclE&pli=1#gid=0 v33i]
 +
--[[User:Yanko|Yanko]] 20:34, 21 September 2012 (EDT)
 +
 +
=====Version 33i patches (v33i-patch1) =====
 +
- Bug fix for too small observation errors when doing pseudo-assimilation experiments
 +
 +
- Bug Fix for the DFP.
 +
 +
--[[User:Yanko|Yanko]] 17:42, 1 November 2012 (EDT)
 +
 +
=====Version 33i patches (v33i-patch2) =====
 +
 +
- Bug Fix for memory problems caused by the amount of iteration steps kept in memory while doing a Hessian approximation.
 +
 +
--[[User:Yanko|Yanko]] 17:42, 1 November 2012 (EDT)
  
 
== Outstanding issues not yet resolved in v33 ==
 
== Outstanding issues not yet resolved in v33 ==
 +
 +
=== Updates in the pipeline ===
 +
*Reaction rate sensitivities (Paulot, Harvard; Walker, UT)
 +
*Update inverse Hessian approximation (Bousserez, CUB)
 +
*Off-diagonal error covariance matrices (Singh, VT; Liu, JPL)
 +
*Deposition-based cost function and updated chemistry (Paulot, Harvard)
 +
*ETOH simulations (Millet, UMN)
 +
*NH3 updates (Zhu, Colorado)
 +
*NO2/SO2 obs operators (Bousserez, Dalhousie)
 +
*ANISO (Capps, Georgia Tech)

Latest revision as of 23:06, 3 July 2013

Overview

BETA RELEASE

What's new in this version

GEOS-Chem Adjoint v33 contains the following major updates and improvements.

Feature Type Submitted by Committed by Version Status
Add TES O3 IRK observation operator Adjoint Update Daven Henze (CU Boulder), Kevin Bowman (JPL) Daven Henze (CU Boulder) v33a Approved 13 Apr 2012
Fix wetdep adjoint Adjoint bug fix Fabien Paulot (Harvard University), Daven Henze (CU Boulder) Daven Henze (CU Boulder) v33b Approved 20 Apr 2012
Fix checkpointing of aircraft SO2 emissions Adjoint bug fix Daven Henze, Kateryna Lapina (CU Boulder) Nicolas Bousserez (CU Boulder) v33c Approved 20 Apr 2012
Fix linoz adjoint Adjoint bug fix Hyung-Min Lee (CU Boulder) Nicolas Bousserez (CU Boulder) v33d Approved 07 May 2012
Adjoint stability update Adjoint bug fix Jamin Koo (MIT), Daven Henze (CU Boulder) Nicolas Bousserez (CU Boulder) v33e Approved 09 May 2012
Fix SE Asia NH3 seasonality Forward bug fix Shailesh Kharol (Dalhousie), Steven Vogel (CU Boulder) Nicolas Bousserez (CU Boulder) v33e Approved 09 May 2012
Fix problem with LICS flag in using SCHEM Adjoint bug fix Hyung-Min Lee (CU Boulder) Nicolas Bousserez (CU Boulder) v33f Approved 13 July 2012
L-BFGS inverse Hessian and pseudo-obs cost function formulation updates Adjoint update Nicolas Bousserez (CU Boulder) Nicolas Bousserez (CU Boulder) v33g Approved 10 August 2012
BC fix to support offline simulation and AOD Adjoint update Li Zhang (CU Boulder) Yanko Davila (CU Boulder) v33h Approved 5 September 2012
Two minor bug fixes Adjoint bug fix Daven Henze (CU Boulder) Yanko Davila (CU Boulder) v33h Approved 5 September 2012
Biomass Emissions bug fix Forward bug fix Jeffrey Pierce (CSU) Yanko Davila (CU Boulder) v33h Approved 5 September 2012
L-BFGS inverse Hessian update Adjoint Update Nicolas Bousserez (CU Boulder) Yanko Davila (CU Boulder) v33i Approved 21 September 2012
Pseudo-obs test bug fix Adjoint bug fix Nicolas Bousserez (CU Boulder) Yanko Davila (CU Boulder) v33i Approved 21 September 2012
Version 33i patch1 Adjoint bug fix Nicolas Bousserez (CU Boulder) Yanko Davila (CU Boulder) v33i-patch1 Approved 9 October 2012
Version 33i patch2 Adjoint bug fix Nicolas Bousserez (CU Boulder) Yanko Davila (CU Boulder) v33i-patch2 Approved 22 October 2012

Updates to forward model

Bug fixes in forward model

Fix SE Asia NH3 seasonality (v33e)

The bug fix from the forward model fixing the seasonality of the NH3 emissions over SE Asia has also been applied.

1 week benchmark is approved 33e_003


--Daven 02:40, 10 May 2012 (EDT)

Fix Monoterpene SOA zero bug

The bug fix from the forward model Monoterpene SOA zero bug fix has been applied.

--Yanko 16:29, 6 September 2012 (EDT)


Updates to adjoint model

Add TES O3 IRK (v33a)

Implemented observation operator for assimilation of TES O3 IRKs.

See benchmark results 33a_001

--Daven 19:03, 13 April 2012 (EDT)

BC fix to support offline simulation and AOD (v33h)

- Fix to support offline BC simulation and AOD calculation

See benchmark results v33h

--Yanko 16:43, 6 September 2012 (EDT)

L-BFGS inverse Hessian Update (v33i)

Now use the background error instead of the initial L-BFGS inverse Hessian diagonal value where the gradient of the cost function is very small (in this case the inverse Hessian value is not updated by the algorithm). Calculate and output the Degree of Freedom for Signal.

See benchmark results v33i

--Yanko 20:34, 21 September 2012 (EDT)

Bug fixes in adjoint model

Fix wet deposition adjoint (v33b)

The adjoint was not properly handling evaporation. This fix helps make the adjoint of species such as NH3 better in a few locations where adjoints were diverging from forward model sensitivities by up to 50%.


See benchmark results 33a_002 vs 33b_002

--Daven 12:51, 20 April 2012 (EDT)

Fix checkpointing of aircraft SO2 emissions (v33c)

The SO2 aircraft emissions are distributed in the model based on a mapping from the 20 level inventory to the GEOS-Chem levels. This mapping depends upon the air masses in the models. The emissions are read in during the first hour of the month in the forward model, but on the last hour of the month in the adjoint. Thus they were being calculated inconsistently in the adjoint compared to the forward model. We now checkpoint these emissions rather than recalculate them

See benchmark results 33c_001 - 33c_004

--Daven 23:08, 7 May 2012 (EDT)

Fix linoz adjoint (v33d)

While the linoz routine is linear, and should be self-adjoint, it isn't exactly self-adjoint. For example, given initial forcings of STT_ADJ = 0d0 in every grid cell, it can generate non-zero values of STT_ADJ as output, which is incorrect.

In this update we use the discrete adjoint based upon reformulating the code to be consistent with the strat chem routine for the non-Ox species.

See benchmark results 33d_001 - 33c_007

--Daven 23:14, 7 May 2012 (EDT)

Important: If you check out version 33d (using the tag option), make sure to also check out the most recent version of linoz_mod.f (cvs checkout linoz_mod.f), since this file had not been updated by mistake. --Nicolas Bousserez 22:12, 7 July 2012 (EDT)

Adjoint stability update (v33e)

Several fixes were made to increase the numerical stability of the code

  • Change the filter to 1d-10 in partition_adj.f
  • Better error trapping in gckpp_adj_Integrator.f90 to prevent NaNs following a failed integration step during the adjoint


A few other small changes to improve performance were included in this update. Overall, the benchmark performance is not impacted by these update, see 33e_001


--Daven 02:26, 10 May 2012 (EDT)

Important: If you check out version 33e (using the tag option), make sure to also check out the most recent version of linoz_mod.f (cvs checkout linoz_mod.f), since this file had not been updated by mistake. --Nicolas Bousserez 22:12, 7 July 2012 (EDT)


Fix problem with LICS flag in using SCHEM (v33f)

New stratospheric chemistry module (strat_chem_mod.f), was set to loop over the number of tracers (NSTPL) that has read from input.gcadj. It caused a problem when LADJ_STRAT is turned off, LADJ_STRAT is not appeared in input.gcadj (NSTPL = 0), or LADJ = F for spin-up.

--Hyung-Min Lee 19:26, 14 Jul 2012 (EDT)

Inverse Hessian and pseudo-obs cost function formulation updates (v33g)

- Possibility to compute the L-BFGS inverse Hessian, which gives the posterior error covariance matrix of the inversion. Here only the diagonal elements (the error variances) of the matrix are computed. Unlike the DFP method, this method allows to compute a posterior errors for large dimensional problems (e.g. high-resolution inversions).

- The equations for the initial estimate of the inverse Hessian in the DFP algorithm were also updated to allow for quicker convergence.

- The cost function for the pseudo-observations inversion test has been modified to properly account for the error term specified in the input.gcadj input file (ERROR).

See benchmark results v33g

--Nicolas Bousserez 05:34, 11 August 2012 (EDT)

Two Minor Bug Fixes (v33h)

- Fix for OpenMP in subroutine EMITHIGH_ADJ. This can correct some errors for the BC emissions adjoints. Without this fix, users may notice some error in FD vs ADJ calculations for shorter simulations.

- Update subroutine CHEM_SO2_ADJ to avoid underflow.

See benchmark results v33h

--Yanko 16:43, 6 September 2012 (EDT)

Pseudo-Obs Test Bug Fix (v33i)

- Bug fix for the definition of the observation error in the pseudo-obs inversion test and filter to avoid NaN adjoint value.

See benchmark results v33i --Yanko 20:34, 21 September 2012 (EDT)

Version 33i patches (v33i-patch1)

- Bug fix for too small observation errors when doing pseudo-assimilation experiments

- Bug Fix for the DFP.

--Yanko 17:42, 1 November 2012 (EDT)

Version 33i patches (v33i-patch2)

- Bug Fix for memory problems caused by the amount of iteration steps kept in memory while doing a Hessian approximation.

--Yanko 17:42, 1 November 2012 (EDT)

Outstanding issues not yet resolved in v33

Updates in the pipeline

  • Reaction rate sensitivities (Paulot, Harvard; Walker, UT)
  • Update inverse Hessian approximation (Bousserez, CUB)
  • Off-diagonal error covariance matrices (Singh, VT; Liu, JPL)
  • Deposition-based cost function and updated chemistry (Paulot, Harvard)
  • ETOH simulations (Millet, UMN)
  • NH3 updates (Zhu, Colorado)
  • NO2/SO2 obs operators (Bousserez, Dalhousie)
  • ANISO (Capps, Georgia Tech)