Sandbox: Difference between revisions
Line 12: | Line 12: | ||
|} | |} | ||
=== Quick fix to use Yuan-processed MODIS LAI in GEOS-Chem Classic === | |||
Bob Yantosca discovered an error when using the Yuan-processed MODIS LAI data in GEOS-Chem "Classic" simulations. HEMCO cannot locate the proper bounding timestamps for the interpolation. | |||
<blockquote>Example: HEMCO should have detected that simulation date '''20160701''' was bounded by data timestamps '''20160624''' and '''20160704''', and should have interpolated accordingly. Instead, HEMCO was detecting that simulation data '''20160701''' was bounded by data timestamps '''20160602''' and '''20160610'''. This is clearly wrong.</blockquote> | |||
Christoph Keller traced this error to routine <tt>GET_TIMEIDX</tt> in module <tt>HEMCO/Core/hcoio_read_std_mod.F90</tt>, which is only used for GEOS-Chem "Classic" simulations. The search algorithm was continuing to look for timestamps further back in time than was necessary. | |||
If you need to run GEOS-Chem simulations with the Yuan-processed MODIS LAI data, Christoph Keller has submitted a quick fix. Add the IF statement in <span style="color:green">GREEN</span> to this code in <tt>hcoio_read_std_mod.F90</tt>. This will force the timestamp search algorithm to terminate before it goes too far back in time. | |||
! ------------------------------------------------------------- | |||
! Check if we need to continue search. Even if the call above | |||
! returned a time slice, it may be possible to continue looking | |||
! for a better suited time stamp. This is only the case if | |||
! there are discontinuities in the time stamps, e.g. if a file | |||
! contains monthly data for 2005 and 2020. In that case, the | |||
! call above would return the index for Dec 2005 for any | |||
! simulation date between 2005 and 2010 (e.g. July 2010), | |||
! whereas it makes more sense to use July 2005 (and eventually | |||
! interpolate between the July 2005 and July 2020 data). | |||
! The IsClosest command checks if there are any netCDF time | |||
! stamps (prior to the selected one) that are closer to each | |||
! other than the difference between the preferred time stamp | |||
! prefYMDhm and the currently selected time stamp | |||
! availYMDhm(tidx1a). In that case, it continues the search by | |||
! updating prefYMDhm so that it falls within the range of the | |||
! 'high-frequency' interval. | |||
! ------------------------------------------------------------- | |||
ExitSearch = .FALSE. | |||
IF ( Lct%Dct%Dta%CycleFlag == HCO_CFLAG_EXACT ) THEN | |||
ExitSearch = .TRUE. | |||
ELSE IF ( tidx1a > 0 ) THEN | |||
ExitSearch = IsClosest( prefYMDhm, availYMDhm, nTime, tidx1a ) | |||
ENDIF | |||
<span style="color:green">!### for testing, only apply to containers with “XLAI” in the name | |||
IF ( INDEX( Lct%Dct%Cname, 'XLAI' ) > 0 ) THEN | |||
ExitSearch = .true. | |||
ENDIF</span> | |||
We will try to add a more robust fix for this issue in the near future. We did not want to add a fix that was contingent on a HEMCO container name to the standard code. | |||
NOTE: GCHP is unaffected by this issue, as it uses the MAPL ExtData functionality to read data from disk. We have verified that GCHP reads in the Yuan-processed MODIS LAI data properly. | |||
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:23, 7 June 2019 (UTC) |
Revision as of 19:35, 7 June 2019
feel free to experiment here
Yuan_XLAI | DEFAULT | Yuan processed MODIS LAI data
This data has been processed into 73 netCDF variables (one corresponding to each Olson land type), which facilitates regridding by HEMCO. |
HEMCO/Yuan_XLAI/v2019-03 |
Quick fix to use Yuan-processed MODIS LAI in GEOS-Chem Classic
Bob Yantosca discovered an error when using the Yuan-processed MODIS LAI data in GEOS-Chem "Classic" simulations. HEMCO cannot locate the proper bounding timestamps for the interpolation.
Example: HEMCO should have detected that simulation date 20160701 was bounded by data timestamps 20160624 and 20160704, and should have interpolated accordingly. Instead, HEMCO was detecting that simulation data 20160701 was bounded by data timestamps 20160602 and 20160610. This is clearly wrong.
Christoph Keller traced this error to routine GET_TIMEIDX in module HEMCO/Core/hcoio_read_std_mod.F90, which is only used for GEOS-Chem "Classic" simulations. The search algorithm was continuing to look for timestamps further back in time than was necessary.
If you need to run GEOS-Chem simulations with the Yuan-processed MODIS LAI data, Christoph Keller has submitted a quick fix. Add the IF statement in GREEN to this code in hcoio_read_std_mod.F90. This will force the timestamp search algorithm to terminate before it goes too far back in time.
! -------------------------------------------------------------
! Check if we need to continue search. Even if the call above
! returned a time slice, it may be possible to continue looking
! for a better suited time stamp. This is only the case if
! there are discontinuities in the time stamps, e.g. if a file
! contains monthly data for 2005 and 2020. In that case, the
! call above would return the index for Dec 2005 for any
! simulation date between 2005 and 2010 (e.g. July 2010),
! whereas it makes more sense to use July 2005 (and eventually
! interpolate between the July 2005 and July 2020 data).
! The IsClosest command checks if there are any netCDF time
! stamps (prior to the selected one) that are closer to each
! other than the difference between the preferred time stamp
! prefYMDhm and the currently selected time stamp
! availYMDhm(tidx1a). In that case, it continues the search by
! updating prefYMDhm so that it falls within the range of the
! 'high-frequency' interval.
! -------------------------------------------------------------
ExitSearch = .FALSE.
IF ( Lct%Dct%Dta%CycleFlag == HCO_CFLAG_EXACT ) THEN
ExitSearch = .TRUE.
ELSE IF ( tidx1a > 0 ) THEN
ExitSearch = IsClosest( prefYMDhm, availYMDhm, nTime, tidx1a )
ENDIF
!### for testing, only apply to containers with “XLAI” in the name
IF ( INDEX( Lct%Dct%Cname, 'XLAI' ) > 0 ) THEN
ExitSearch = .true.
ENDIF
We will try to add a more robust fix for this issue in the near future. We did not want to add a fix that was contingent on a HEMCO container name to the standard code.
NOTE: GCHP is unaffected by this issue, as it uses the MAPL ExtData functionality to read data from disk. We have verified that GCHP reads in the Yuan-processed MODIS LAI data properly.
--Bob Yantosca (talk) 19:23, 7 June 2019 (UTC)