Difference between revisions of "GEOS-FP implementation details"

From Geos-chem
Jump to: navigation, search
(Modifications to reduce the number of times netCDF files are opened)
 
(59 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="color: #aa0000; background: #eeeeee;border: 3px solid red; padding: 1em; margin: auto; width: 90%; ">'''NOTE: [[GEOS-FP]] is the current [http://gmao.gsfc.nasa.gov NASA/GMAO] operational met data product.  It is produced with a native resolution of 0.25&deg; (lon) x 0.3125&deg; (lat) x 72 hybrid vertical layers.  GEOS-FP replaced the older [[GEOS-5|GEOS-5.2.0]] operational data product in June 2013.<br><br>GEOS-FP was originally given the designation GEOS-5.7.1, which was later updated to GEOS-5.7.2.  Currently, GEOS-FP is being produced with version 5.11.0 of the GEOS Data Assimilation System (aka GEOS-DAS).  This means that the "5.7.x" nomenclature is no longer correct.  For this reason, we shall refer to this product as GEOS-FP from now on. (Bob Yantosca, 21 Aug 2013)'''</div>
+
<span style="color:red">'''''NOTE: [[GEOS-FP]] is the current [http://gmao.gsfc.nasa.gov NASA/GMAO] operational met data product.  It is produced with a native resolution of 0.25&deg; (lon) x 0.3125&deg; (lat) x 72 hybrid vertical layers.  GEOS-FP replaced the older [[GEOS-5|GEOS-5.2.0]] operational data product in June 2013.'''''</span>
 +
 
 +
<span style="color:red">'''''GEOS-FP was originally given the designation GEOS-5.7.1, which was later updated to GEOS-5.7.2.  Currently, GEOS-FP is being produced with version 5.11.0 of the GEOS Data Assimilation System (aka GEOS-DAS).  This means that the "5.7.x" nomenclature is no longer correct.  For this reason, we shall refer to this product as GEOS-FP from now on.'''''</span>
 +
 
  
 
On this page we list the necessary modifications to GEOS-Chem for compatibility with the [[GEOS-FP]] meteorological data.
 
On this page we list the necessary modifications to GEOS-Chem for compatibility with the [[GEOS-FP]] meteorological data.
Line 5: Line 8:
 
== Overview ==
 
== Overview ==
  
The [[GEOS-FP|GEOS-FP data product]] (aka GEOS5-FP) is the newest version of the operational meteorological data produced by NASA/GMAO.  Overall, the structure of GEOS-FP is very similar to MERRA.  Therefore, within GEOS-Chem we can (for the most part) treat GEOS-FP in the same way as we do for the [[MERRA|MERRA meteorology]].
+
The [[GEOS-FP|GEOS-FP data product]] (aka GEOS5-FP) is the newest version of the operational meteorological data produced by NASA/GMAO.  Overall, the structure of GEOS-FP is very similar to [[MERRA]] and [[MERRA-2]] met data products..  Therefore, within GEOS-Chem we can (for the most part) treat GEOS-FP in the same way as we do for the MERRA and MERRA-2.
  
=== Key similarities to MERRA ===
+
The table below compares many features of GEOS-FP with other met field products.
  
The following aspects of [[GEOS-FP]] are identical to the older [[GEOS-5|GEOS-5.2.0]] operational data product.
+
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="250px"|Feature
 +
!width="200px"|[[MERRA-2]]
 +
!bgcolor="#CCFFFF" width="200px"|[[GEOS-FP]]
 +
!width="200px"|[[MERRA]]
 +
!width="200px"|[[GEOS-5]]
  
# The GEOS-5.7.2 vertical grid ([http://acmg.seas.harvard.edu/geos/doc/man/appendix_3.html#A3.5 72 hybrid levels]) is identical to that of both MERRA and [[GEOS-5|GEOS-5.2.0]].
+
|-valign="top"
# By and large, the same data fields that were in the MERRA product are also contained in GEOS-5.7.2:
+
|Native vertical grid
#* GEOS-5.7.2 provides the same time-invariant fields (FRLAKE, FRLAND, FRLANDIC, FROCEAN, PHIS) as MERRA
+
|
#* The same correction that was applied to the [[List of MERRA met fields#SNOMAS|MERRA SNOMAS (snow mass) field]] has also been applied to the GEOS-5.7.2 SNOMAS field.
+
*0.5&deg; lat x 0.625&deg; lon
#* GEOS-5.7.2 contains the same precipitation fields (DQRCU, DQRLSAN, PFICU, PFILSAN, PFLCU, PFLLSAN, REEVAPCN, REEVAPLSAN) as MERRA.  This means that we can use the MERRA [[Wet deposition|wet deposition algorithms]] with the GEOS-5.7.2 data.
+
|bgcolor="#CCFFFF"|
# The [[GEOS-5.7.2#GEOS-5.7.2_time_archiving|GEOS-5.7.2 time archiving]] is identical to that of MERRA ...
+
*0.25&deg; lat x 0.3125&deg; lon
#* ... with one exception: GEOS-5.7.2 instantaneous data is archived every 3 hours, as opposed to 6 hours in MERRA.
+
|
 +
*0.5&deg; lat x 0.667&deg; lon
 +
**(surface fields)
 +
*1&deg; lat  x 1.25&deg; lon
 +
**(most 3D fields)
 +
*1.25&deg; x 1.25&deg; lon
 +
**(moist quantities)
 +
|
 +
*0.5&deg; lat x 0.667&deg; lon
  
=== Key differences from MERRA ===
+
|-valign="top"
 +
|Native horizontal grid
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*72 hybrid levels
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*Same as GEOS-FP
  
The following aspects of [[GEOS-5.7.2]] differ from the MERRA operational data product:
+
|-valign="top"
 +
|Time-invariant fields
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*FRLAKE
 +
*FRLAND
 +
*FRLANDIC(E)
 +
*FROCEAN
 +
*PHIS
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*Same as GEOS-FP
 +
 
 +
|-valign="top"
 +
|Time archiving: surface fields
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*A1 (1-hr time averaged)
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*A3 (6-hr time average)
 +
 
 +
|-valign="top"
 +
|Time archiving: 3D fields
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*A3 (3-hr time averaged)
 +
*I3 (3-hr instantaneous)
 +
|
 +
*A3 (3-hr time average)
 +
*I6 (6-hour instantaneous)
 +
|
 +
*A6 (6-hr time average) and
 +
*I6 (6-hr instantaneous)
 +
 
 +
|-valign="top"
 +
|Timestamps
 +
|
 +
*[[MERRA-2#MERRA-2_time_archiving|See this wiki page]]
 +
|bgcolor="#CCFFFF"|
 +
*[[GEOS-FP#GEOS-FP_time_archiving|See this wiki page]]
 +
|
 +
*[[MERRA#MERRA_time_archiving|See this wiki page]]
 +
|
 +
*[[MERRA#MERRA_time_archiving|See this wiki page]]
 +
 
 +
|-valign="top"
 +
|Precipitation fields
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*DQRCU, DQRLSAN,
 +
*PFICU, PFILSAN,
 +
*PFLCU, PFLLSAN,
 +
*REEVAPCN, REEVAPLSAN
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*DQIDTMST
 +
*DQLDTMST
 +
*DQVDTMST
 +
*MOISTQ = DQIDTMST + DQLDTMST + DQVDTMST
 +
 
 +
|-valign="top"
 +
|Temperature
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*T [K]
 +
*I3 (3-hr instantaneous)
 +
|
 +
*Same as GEOS-FP
 +
*A3 (6-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*A6 (6-hr time average)
 +
 
 +
|-valign="top"
 +
|Relative humidity
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*RH [1]
 +
*A3 (3-hr time average)
 +
|
 +
*Same as MERRA-2
 +
*I3 (6-hr instantaneous)
 +
|
 +
*Same as MERRA-2
 +
*A6 (6-hr time-averaged)
 +
 
 +
|-valign="top"
 +
|Specific humidity
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*QV [kg kg<sup>-1</sup>]
 +
*I3 (3-hr instantaneous)
 +
|
 +
*Same as GEOS-FP
 +
*A3 (3-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*A6 (6-hr time-averaged)
 +
 
 +
|-valign="top"
 +
|Vertical pressure velocity
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS_FP
 +
|bgcolor="#CCFFFF"|
 +
*OMEGA [Pa s<sup>-1</sup>]
 +
*A3 (3-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*I6 (6-hr instantaneous)
 +
|
 +
*Same as GEOS-FP
 +
*A6 (6-hr time-averaged)
 +
 
 +
|-valign="top"
 +
|Ertel potential vorticity
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*PV [K m<sup>2</sup> kg<sup>-1</sup> s<sup>-1</sup>]
 +
*A1 (1-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*I6 (6-hr instantaneous)
 +
|
 +
*TROPP (hPa)
 +
*A6 (3-hr time-average)
 +
 
 +
|-valign="top"
 +
|Snow mass
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*SNOMAS [kg/m2]
 +
*A1 (3-hr time average)
 +
*[[List_of_MERRA_met_fields#SNOMAS|Missing coverage at poles is now corrected, as per MERRA]]
 +
|
 +
*Same as MERRA-2
 +
*Same as MERRA-2
 +
*Same as MERRA-2
 +
|
 +
*SNOMAS [m]
 +
*A3 (3-hr time average)
 +
 
 +
|-valign="top"
 +
|Sea level pressure
 +
|
 +
*SLP [Pa]
 +
*Same as GEOS-FP)
 +
*Converted to hPa when read from disk
 +
|bgcolor="#CCFFFF"|
 +
*SLP [hPa]
 +
*A1 (1-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|
 +
*Same as GEOS-FP
 +
*I6 (3-hr instantaneous)
 +
 
 +
 
 +
|-valign="top"
 +
|Surface pressure
 +
|
 +
*PS [Pa]
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*PS [hPa]
 +
*I3 (3-hr instantaneous)
 +
|
 +
*Same as GEOS-FP
 +
*I6 (6-hr instantaneous)
 +
|
 +
*Same as GEOS-FP
 +
*I6 (3-hr instantaneous)
 +
 
 +
|-valign="top"
 +
|Tropopause pressure
 +
|
 +
*TROPPT [Pa]
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*TROPPT [hPa]
 +
*A1 (1-hr time average)
 +
|
 +
*Same as GEOS-FP
 +
*Same as GEOS-FP
 +
|
 +
*TROPP [hPa]
 +
*A3 (3-hr time average)
 +
 
 +
|-valign="top"
 +
|GEOS-Chem convection routine
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*<tt>DO_MERRA_CONVECTION</tt><br>(in <tt>convection_mod.F</tt>)
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*<tt>NFCLDMX</tt><br>(in <tt>convection_mod.F</tt>)
 +
 
 +
|-valign="top"
 +
|GEOS-Chem wet deposition routine
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*<tt>WETDEP_MERRA</tt><br>(<tt>wetscav_mod.F</tt>)
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*<tt>WETDEP</tt><br>(<tt>wetscav_mod.F</tt>)
 +
 
 +
|-valign="top"
 +
|GEOS-Chem transport routine
 +
|
 +
*Same as GEOS-FP
 +
|bgcolor="#CCFFFF"|
 +
*<tt>TPCORE_FVDAS</tt><br>(<tt>tpcore_fvdas_mod.F90</tt>)
 +
|
 +
*Same as GEOS-FP
 +
|
 +
*Same as GEOS-FP
 +
 
 +
|-valign="top"
 +
|File format read by GEOS-Chem
 +
|
 +
*netCDF-4
 +
|bgcolor="#CCFFFF"|
 +
*netCDF-3
 +
|
 +
*binary
 +
|
 +
*binary
 +
 
 +
|}
  
# All GEOS-5.7.2 data are placed on a horizontal grid of 0.25&deg; x 0.3125&deg;.
+
--[[User:Bmy|Bob Y.]] ([[User talk:Bmy|talk]]) 17:48, 17 August 2015 (UTC)
#* MERRA data fields are placed on three different horizontal grids (0.5&deg; x 0.666&deg;, 1&deg; x 1.25&deg; and 1.25&deg; x 1.25&deg;).
+
# All GEOS-5.7.2 data are placed on the [http://acmg.seas.harvard.edu/geos/doc/man/appendix_3.html#A3.5 72-level hybrid grid].
+
#* Some MERRA fields were only available on a 42-level pressure grid (thus requiring interpolation).
+
# The following data GEOS-5.7.2 data fields differ from the corresponding MERRA fields:
+
#* RH is now a 3-hour time-averaged field, as opposed to a 6-hour instantaneous field in MERRA.
+
#* QV and T are now instantaneous 3-hour fields, as opposed to 3-hour time-averaged fields in MERRA.
+
#* The 3-D precipitation fields now make the (e.g. DQIDTMST, DQVDTMST, DQLDTMST, etc.) obsolete.  We no longer archive these.
+
# We have chosen to save the processed GEOS-5.7.2 data in netCDF format, as opposed to GEOS-Chem binary format.
+
  
 
== Required coding changes in GEOS-Chem ==
 
== Required coding changes in GEOS-Chem ==
 
   
 
   
'''''NOTE: This section is still under construction.  Not all tables have yet been updated.'''''
+
As noted in the section above, the similarities between [[MERRA]] and [[GEOS-FP]] (especially of the vertical grids) means that in most cases we can just treat MERRA in the same way as for GEOS-5.  In many areas of the code, the coding changes are straightforward and simply involve an extension of C-preprocessor statements such as:
 
+
As noted in the section above, the similarities between [[MERRA]] and [[GEOS-5.7.2]] (especially of the vertical grids) means that in most cases we can just treat MERRA in the same way as for GEOS-5.  In many areas of the code, the coding changes are straightforward and simply involve an extension of C-preprocessor statements such as:
+
  
 
  #if defined( GEOS_5 ) || defined( MERRA )
 
  #if defined( GEOS_5 ) || defined( MERRA )
Line 43: Line 312:
 
to  
 
to  
 
   
 
   
  #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )
+
  #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
  
 
In other areas of GEOS-Chem the changes are more involved.  Below we provide a description of the areas of GEOS-Chem that were modified for MERRA:
 
In other areas of GEOS-Chem the changes are more involved.  Below we provide a description of the areas of GEOS-Chem that were modified for MERRA:
 +
 +
=== Top-level directory ===
 +
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|- bgcolor="#CCCCCC"
 +
!width="175px"|File
 +
!width="800px"|Modifications made
 +
|-
 +
|Makefile_header.mk   
 +
|
 +
*Starting with [[GEOS-Chem v9-02 benchmark history#v9-02o|GEOS-Chem v9-02o]], we now use Makefile variables to set the various C-preprocessor switches.  In particular:
 +
**<tt>MET=___</tt> selects the met field type( <tt>gcap, geos4, geos5, geosfp, merra</tt>)
 +
**<tt>GRID=___</tt> selects the horizontal grid (<tt>4x5, 2x25, 05x0666, 025x03125</tt>)
 +
**<tt>NEST=___</tt> specifies the nested-grid (<tt>CH, EU, NA, SE</tt>)
 +
|}
 +
 +
--[[User:Bmy|Bob Y.]] 13:39, 7 November 2013 (EST)
  
 
=== Headers directory ===
 
=== Headers directory ===
  
The following modifications for GEOS-5.7.2 were made in the <tt>Headers/</tt> directory:
+
The following modifications for [[GEOS-FP]] were made in the <tt>Headers/</tt> directory:
  
 
{| border=1 cellspacing=0 cellpadding=5  
 
{| border=1 cellspacing=0 cellpadding=5  
Line 55: Line 341:
 
!width="175px"|File
 
!width="175px"|File
 
!width="800px"|Modifications made
 
!width="800px"|Modifications made
|-
 
|define.h     
 
|
 
*Add new C-preprocessor switch named <tt>GEOS_57</tt>
 
*Add new C-preprocessor switch named <tt>SEAC4RS</tt>, for SEAC4RS nested domain
 
 
|-
 
|-
 
|CMN_SIZE_mod.F     
 
|CMN_SIZE_mod.F     
 
|
 
|
*Added size parameters for GEOS-5.7.2 grids at 4&deg; x 5&deg; 2&deg; x 2.5&deg; and 0.25&deg; x 0.3125&deg; resolution
+
*Added size parameters for GEOS-FP grids at 4&deg; x 5&deg; 2&deg; x 2.5&deg; and 0.25&deg; x 0.3125&deg; resolution
 +
|-
 +
|gigc_input_opt_mod.F90   
 +
|
 +
*This module was introduced to facilitate the [[Grid-Independent GEOS-Chem]] development.
 +
*<tt>gigc_input_opt_mod.F90</tt> now collects the various logical switches, file paths, and related variables from <tt>logical_mod.F</tt>, <tt>directory_mod.F</tt>, <tt>unix_cmds_mod.F</tt>, and <tt>linoz_mod.F</tt>.
 
|-
 
|-
 
|gigc_state_met_mod.F90     
 
|gigc_state_met_mod.F90     
Line 73: Line 359:
 
|}
 
|}
  
--[[User:Bmy|Bob Y.]] 11:47, 18 March 2013 (EDT)
+
--[[User:Bmy|Bob Y.]] 13:52, 7 November 2013 (EST)
  
 
=== GeosUtil directory ===
 
=== GeosUtil directory ===
  
The following modifications for GEOS-5.7.2 were made in the <tt>GeosUtil/</tt> directory:
+
The following modifications for GEOS-FP were made in the <tt>GeosUtil/</tt> directory:
  
 
{| border=1 cellspacing=0 cellpadding=5  
 
{| border=1 cellspacing=0 cellpadding=5  
Line 87: Line 373:
 
|  
 
|  
 
In routine GET_MODELNAME:  
 
In routine GET_MODELNAME:  
*Add <tt>GEOS5_47L</tt> and <tt>GEOS5</tt> modelnames to the #if block
+
*Add <tt>GEOS5_47L</tt> and <tt>GEOSFP</tt> modelnames to the <tt>#if</tt> block
 
In routine GET_NAME_EXT:  
 
In routine GET_NAME_EXT:  
*Return grid name <tt>geos5</tt> for GEOS-5.7.2 fields
+
*Return grid name <tt>geos5</tt> for GEOS-FP fields
 
In routine GET_RES_EXT:
 
In routine GET_RES_EXT:
 
*Return resolution string <tt>025x03125</tt> for 0.25&deg; x 0.3125&deg; grids
 
*Return resolution string <tt>025x03125</tt> for 0.25&deg; x 0.3125&deg; grids
|-
 
|directory_mod.F
 
|
 
At the top of the module:
 
*Added the <tt>GEOS_57_DIR</tt> variable for GEOS_57 met fields
 
 
|-
 
|-
 
|grid_mod.F
 
|grid_mod.F
Line 109: Line 390:
 
|
 
|
 
In routines GET_PEDGE and GET_PEDGE_FULLGRID:
 
In routines GET_PEDGE and GET_PEDGE_FULLGRID:
*Compute PEDGE for GEOS-5.7.2 in the same way as for GEOS-5 and MERRA
+
*Compute PEDGE for GEOS-FP in the same way as for GEOS-5 and MERRA
 
In routine INIT_PRESSURE:  
 
In routine INIT_PRESSURE:  
*Initialize Ap and Bp for GEOS-5.7.2 in the same way as for GEOS-5 and MERRA
+
*Initialize Ap and Bp for GEOS-FP in the same way as for GEOS-5 and MERRA
 
|-
 
|-
 
|time_mod.F
 
|time_mod.F
 
|
 
|
 
In routine GET_A1_TIME:
 
In routine GET_A1_TIME:
*Compute the <tt>DATE</tt> array for GEOS-5.7.2 the same way as is done for MERRA.
+
*Compute the <tt>DATE</tt> array for GEOS-FP the same way as is done for MERRA.
 
|-
 
|-
 
|transfer_mod.F
 
|transfer_mod.F
 
|
 
|
 
In several routines:
 
In several routines:
*Changed code to <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|}
 
|}
  
--[[User:Bmy|Bob Y.]] 17:31, 8 February 2012 (EST)
+
--[[User:Bmy|Bob Y.]] 13:55, 7 November 2013 (EST)
  
 
=== GeosCore directory ===
 
=== GeosCore directory ===
  
The following modifications for GEOS-5.7.2 were made in the <tt>GeosCore/</tt> directory:
+
The following modifications for GEOS-FP were made in the <tt>GeosCore/</tt> directory:
  
 
{| border=1 cellspacing=0 cellpadding=5  
 
{| border=1 cellspacing=0 cellpadding=5  
Line 134: Line 415:
 
!width="175px"|File
 
!width="175px"|File
 
!width="800px"|Modifications made
 
!width="800px"|Modifications made
 +
|-
 +
|calcrate.F
 +
|Multiple instances:
 +
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|carbon_mod.F
 
|carbon_mod.F
|In routine SOAG_CLOUD:
+
|Multiple instances:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 +
|-
 +
|cldice_HbrHOBr_mod.F
 +
|Multiple instances:
 +
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|convection_mod.F
 
|convection_mod.F
 
|
 
|
 
In routine DO_CONVECTION:
 
In routine DO_CONVECTION:
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
*For GEOS-5.7.x, PFICU and PFLCU fields are defined on level edges.  Pass the top edge value at each level (stored in local arrays T_PFICU and T_PFLCU) to DO_MERRA_CONVECTION.
+
*For GEOS-FP, PFICU and PFLCU fields are defined on level edges.  Pass the top edge value at each level (stored in local arrays T_PFICU and T_PFLCU) to DO_MERRA_CONVECTION.
 
*Add T_PFICU and T_PFLCU arrays to the PRIVATE statement of the OpenMP loop.
 
*Add T_PFICU and T_PFLCU arrays to the PRIVATE statement of the OpenMP loop.
 
|-
 
|-
Line 150: Line 439:
 
In routine COPY_I6_FIELDS:
 
In routine COPY_I6_FIELDS:
 
*Renamed this routine to COPY_I3_I6_FIELDS
 
*Renamed this routine to COPY_I3_I6_FIELDS
*Added #if block for GEOS-5.7.x met
+
*Added #if block for GEOS-FP met
 
In routines IS_ICE, IS_LAND, IS_NEAR, IS_WATER:  
 
In routines IS_ICE, IS_LAND, IS_NEAR, IS_WATER:  
*Changed code to: <tt>#elif defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#elif defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
In routine INTERP:  
 
In routine INTERP:  
*Add #if block for GEOS-5.7.x
+
*Add #if block for GEOS-FP
 
|-
 
|-
 
|depo_mercury_mod.F
 
|depo_mercury_mod.F
 
|
 
|
 
In routine ADD_Hg2_SNOWPACK
 
In routine ADD_Hg2_SNOWPACK
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|diag3.F
 
|diag3.F
Line 172: Line 461:
 
|
 
|
 
In routine SRC_DUST_DEAD:
 
In routine SRC_DUST_DEAD:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|dust_dead_mod.F
 
|dust_dead_mod.F
 
|
 
|
 
In routine DST_MBL:  
 
In routine DST_MBL:  
*For GEOS-5.7.x, set parameter FLX_MSS_FDG_FCT to the same value as MERRA (for the time being, we will have to compute this more robustly in the future)
+
*For GEOS-FP, add a new value for parameter FLX_MSS_FDG_FCT.  The scale factor ensures that we get the same dust totals (w/in roundoff error) as for GEOS-5.
 
|-
 
|-
 
|fast_j.F
 
|fast_j.F
 
|
 
|
*Do cloud overlapping for GEOS-5.7.x in the same way as for GEOS-5 and MERRA.   
+
*Do cloud overlapping for GEOS-FP in the same way as for GEOS-5 and MERRA.   
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|gamap_mod.F
 
|gamap_mod.F
 
|
 
|
 
In routine INIT_TRACERINFO:  
 
In routine INIT_TRACERINFO:  
*Changed code to: <tt>#elif defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#elif defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
|geos57_read_mod.F90
+
|geosfp_read_mod.F90
 
|
 
|
*Added this module w/ routines to read GEOS-5.7.x met data (in netCDF format)
+
*Added this module w/ routines to read GEOS-FP met data (in netCDF format)
 
|-
 
|-
 
|global_ch4_mod.F
 
|global_ch4_mod.F
 
|
 
|
 
In routines WETLAND_EMIS and READ_COPROD:
 
In routines WETLAND_EMIS and READ_COPROD:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|global_hno3_mod.F
 
|global_hno3_mod.F
 
|
 
|
 
In routine GET_GLOBAL_HNO3:
 
In routine GET_GLOBAL_HNO3:
*Changed code to<br><tt>#if defined( GEOS_3 ) || defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use:<br><tt>#if defined( GEOS_3 ) || defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|global_o3_mod.F
 
|global_o3_mod.F
 
|
 
|
 
In routine GET_GLOBAL_O3
 
In routine GET_GLOBAL_O3
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use:: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|initialize.F
 
|initialize.F
Line 216: Line 505:
 
|
 
|
 
In routine READ_SIMULATION_MENU:  
 
In routine READ_SIMULATION_MENU:  
*Read value for GEOS_57_DIR from <tt>input.geos</tt> file
+
*Read value for GEOS_FP_DIR from <tt>input.geos</tt> file and save into <tt>Input_Opt</tt>
*Set LUNZIP=.FALSE. for GEOS-5.7.x met
+
*Set LUNZIP=.FALSE. for GEOS-FP met
 
In routine READ_CONVECTION_MENU:  
 
In routine READ_CONVECTION_MENU:  
*Change #if statement to allow non-local PBL mixing for GEOS-5.7.x met data
+
*Change #if statement to allow non-local PBL mixing for GEOS-FP met data
 
In routine READ_EMISSIONS_MENU:  
 
In routine READ_EMISSIONS_MENU:  
 
*Turn off LMEGANMONO when LMEGAN is turned off
 
*Turn off LMEGANMONO when LMEGAN is turned off
 
In routine VALIDATE_DIRECTORIES:  
 
In routine VALIDATE_DIRECTORIES:  
*Error check GEOS_57_DIR for start & end date
+
*Error check GEOS_FP_DIR for start & end date
 
|-
 
|-
 
|land_mercury_mod.F
 
|land_mercury_mod.F
 
|
 
|
 
In routines LAND_MERCURY_FLUX:
 
In routines LAND_MERCURY_FLUX:
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
In routines SOILEMIS:
 
In routines SOILEMIS:
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
*Extend #if statement for variable SOIL_EMIS_FAC to get the code to compile w/o error.<br>'''''(NOTE: Team Hg: you will have to submit a proper value for this later.'''''  
 
*Extend #if statement for variable SOIL_EMIS_FAC to get the code to compile w/o error.<br>'''''(NOTE: Team Hg: you will have to submit a proper value for this later.'''''  
 
|-
 
|-
Line 236: Line 525:
 
|
 
|
 
In routine LIGHTNING:
 
In routine LIGHTNING:
*Eliminate the shallow-cloud inhibititon trap for MERRA, as we already do for GEOS-5
+
*Eliminate the shallow-cloud inhibititon trap for GEOS-FP, as we already do for GEOS-5 and MERRA
 
In routine GET_OTD_LIS_SCALE:
 
In routine GET_OTD_LIS_SCALE:
*Compute <tt>ANN_AVG_FLASHRATE</tt> for MERRA in the same way as for GEOS-5.<br>'''''(NOTE: We may have to rescale this in the future.)'''''
+
*Now use updated values for <tt>ANN_AVG_FLASHRATE</tt> computed by Lee Murray (2013-11-07).
 
|-
 
|-
 
|Makefile
 
|Makefile
 
|
 
|
*Added dependencies for geos57_read_mod.F
+
*Added dependencies for new routines
 
*Added the following targets
 
*Added the following targets
 
**libnc: Compiles the code in the NcdfUtil directory and creates the <tt>libNcUtils.a</tt> library
 
**libnc: Compiles the code in the NcdfUtil directory and creates the <tt>libNcUtils.a</tt> library
Line 250: Line 539:
 
|
 
|
 
*Rewrote USE statements for clarity
 
*Rewrote USE statements for clarity
*Added calls to routines from geos57_read_mod.F
+
*Added calls to routines from geosfp_read_mod.F
 
*Split off the code that reads met fields into internal subroutines READ_INITIAL_MET_FIELDS and READ_MET_FIELDS, for clarity.
 
*Split off the code that reads met fields into internal subroutines READ_INITIAL_MET_FIELDS and READ_MET_FIELDS, for clarity.
 
*Renamed NN to NNN to avoid name confusion
 
*Renamed NN to NNN to avoid name confusion
Line 257: Line 546:
 
|
 
|
 
At top of module
 
At top of module
*For MERRA and GEOS-5.7.x met: define DAY_DIM parameter = 24 for hourly temperature data
+
*For MERRA and GEOS-FP met: define DAY_DIM parameter = 24 for hourly temperature data
 
*For all other met data: define DAY_DIM parameter = 8 for 3-hourly temperature data
 
*For all other met data: define DAY_DIM parameter = 8 for 3-hourly temperature data
 
In routine INIT_MEGAN:
 
In routine INIT_MEGAN:
*For MERRA and GEOS-5.7.x met: define G4AHEAD = 003000
+
*For MERRA and GEOS-FP met: define G4AHEAD = 003000
*Now call GEOS57_READ_A1 (from geos57_read_mod.F90) to read surface temperature data
+
*Now call GEOS57_READ_A1 (from geosfp_read_mod.F90) to read surface temperature data
 
|-
 
|-
 
|mercury_mod.F
 
|mercury_mod.F
 
|
 
|
 
In routine CHEM_Hg0_Hg2:
 
In routine CHEM_Hg0_Hg2:
*In the block that computes LWC, changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*In the block that computes LWC, changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
*In the block that computes Hg0 exchange, changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*In the block that computes Hg0 exchange, changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|nei2005_anthro_mod.F
 
|nei2005_anthro_mod.F
 
|
 
|
 
In routines EMISS_NEI2005_ANTHRO and EMISS_NEI_ANTHRO_05x0666:
 
In routines EMISS_NEI2005_ANTHRO and EMISS_NEI_ANTHRO_05x0666:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|ocean_mercury_mod.F
 
|ocean_mercury_mod.F
 
|
 
|
In routines OCEAN_MERCURY_FLUX and MLD_ADJUSTMENT:
+
Multiple instances:
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|planeflight_mod.F
 
|planeflight_mod.F
 
|
 
|
 
In routine PLANEFLIGHT
 
In routine PLANEFLIGHT
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
|schem.F
+
|strat_chem_mod.F90
 
|
 
|
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
Multiple instances:
 +
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|sulfate_mod.F
 
|sulfate_mod.F
 
|
 
|
In routine CHEM_SO2:
+
Multiple instances:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
In routine INIT_SULFATE
+
*Changed code to: <tt>#if !defined( GEOS_5 ) && !defined( MERRA ) && !defined( GEOS_57 )</tt>
+
 
|-
 
|-
|tagged_co_mod.F
+
|tagged_ox_mod.F
 
|
 
|
In routine READ_PCO_LCO_STRAT:
+
Multiple instances:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
|upbdflx_mod.F
+
|tpcore_bc_mod.F:
 
|
 
|
In routines UPBDFLX_O3 and UPBDFLX_HD:
+
Multiple instances:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
*Assign J30S=1 and J30S=JJPAR for the 0.25&deg; x 0.3125&deg; nested grid
+
|-
 +
|tropopause_mod.F:
 +
|
 +
Multiple instances:
 +
*Now use: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|vdiff_mod.F90
 
|vdiff_mod.F90
 
|
 
|
 
In routine VDIFFDR:
 
In routine VDIFFDR:
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
|-
 
|-
 
|wetscav_mod.F
 
|wetscav_mod.F
 
|
 
|
 
In routines DO_WETDEP, DO_WASHOUT_ONLY
 
In routines DO_WETDEP, DO_WASHOUT_ONLY
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( MERRA ) || defined( GEOS_FP )</tt>
 
In routine MAKE_QQ:
 
In routine MAKE_QQ:
*Add #if block for GEOS-5.7.2 met
+
*Add #if block for GEOS-FP met
 
*Refer to PFILSAN(I,J,L+1) and PFLLSAN(I,J,L+1), since these fields are defined on level edges
 
*Refer to PFILSAN(I,J,L+1) and PFLLSAN(I,J,L+1), since these fields are defined on level edges
 
In routine RAINOUT:
 
In routine RAINOUT:
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_57 )</tt>
+
*Changed code to: <tt>#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )</tt>
  
 
|}
 
|}
  
--[[User:Bmy|Bob Y.]] 13:42, 9 February 2012 (EST)
+
--[[User:Bmy|Bob Y.]] 14:23, 7 November 2013 (EST)
  
 
=== GeosApm directory ===
 
=== GeosApm directory ===
  
The following modifications for GEOS-5.7.2 were made in the <tt>GeosTomas/</tt> directory:
+
The following modifications for GEOS-FP were made in the <tt>GeosTomas/</tt> directory:
  
 
{| border=1 cellspacing=0 cellpadding=5  
 
{| border=1 cellspacing=0 cellpadding=5  
Line 370: Line 662:
  
 
--[[User:Bmy|Bob Y.]] 13:49, 9 February 2012 (EST)
 
--[[User:Bmy|Bob Y.]] 13:49, 9 February 2012 (EST)
 
=== GeosTomas directory ===
 
 
The following modifications for GEOS-5.7.2 were made in the <tt>GeosTomas/</tt> directory:
 
 
{| border=1 cellspacing=0 cellpadding=5
 
|- bgcolor="#CCCCCC"
 
!width="175px"|File
 
!width="800px"|Modifications made
 
|-
 
|Makefile
 
|
 
*Added dependencies for geos57_read_mod.F90
 
|-
 
|diag3.F
 
|
 
*Synchronized with GeosCore/diag3.F
 
|-
 
|dust_mod.f
 
|
 
*Synchronized with GeosCore/dust_mod.F
 
|-
 
|gamap_mod.f
 
|
 
*Synchronized with GeosCore/gamap_mod.F
 
|-
 
|input_mod.f
 
|
 
*Synchronized with GeosCore/input_mod.F
 
|-
 
|sulfate_mod.f
 
|
 
*Synchronized with GeosCore/sulfate_mod.F
 
|-
 
|wetscav_mod.f
 
|
 
*Synchronized with GeosCore/wetscav_mod.F. 
 
*NOTE: needs validation (and perhaps recoding) by the TOMAS team
 
|}
 
 
--[[User:Bmy|Bob Y.]] 12:34, 22 February 2012 (EST)
 
  
 
=== NcdfUtil directory ===
 
=== NcdfUtil directory ===
Line 488: Line 739:
 
|-
 
|-
 
|definitions_cn.rc
 
|definitions_cn.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#Constant_fields|GEOS-5.7.2 CN data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#Constant_fields|GEOS-FP CN data]].
 
|-
 
|-
 
|definitions_a1.rc
 
|definitions_a1.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#A1 fields|GEOS-5.7.2 A1 data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#A1 fields|GEOS-FP A1 data]].
 
|-
 
|-
 
|definitions_a3cld.rc
 
|definitions_a3cld.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#A3cld fields|GEOS-5.7.2 A3cld data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#A3cld fields|GEOS-FP A3cld data]].
 
|-
 
|-
 
|definitions_a3dyn.rc
 
|definitions_a3dyn.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#A3dyn fields|GEOS-5.7.2 A3dyn data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#A3dyn fields|GEOS-FP A3dyn data]].
 
|-
 
|-
 
|definitions_a3mstc.rc
 
|definitions_a3mstc.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#A3mstC fields|GEOS-5.7.2 A3mstC data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#A3mstC fields|GEOS-FP A3mstC data]].
 
|-
 
|-
 
|definitions_a3mste.rc
 
|definitions_a3mste.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#A3mstE fields|GEOS-5.7.2 A3mstE data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#A3mstE fields|GEOS-FP A3mstE data]].
 
|-
 
|-
 
|definitions_i3.rc
 
|definitions_i3.rc
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-5.7.2 met fields#I3 fields|GEOS-5.7.2 I3 data]].
+
|Customized version of <tt>nc_definitions.rc</tt> that will generate Fortran code for reading [[List of GEOS-FP met fields#I3 fields|GEOS-FP I3 data]].
 
|}
 
|}
  
--[[User:Bmy|Bob Y.]] 10:34, 3 February 2012 (EST)
+
--[[User:Bmy|Bob Y.]] 15:49, 12 May 2014 (EDT)
  
 
== Resolved issues ==
 
== Resolved issues ==
Line 515: Line 766:
 
=== Fractional sea ice ===
 
=== Fractional sea ice ===
  
In order to preserve some information about sea ice leads during the regridding process, we have binned the fractional sea ice coverage into deciles (0-10%, 10-20% ... 90-100% coverage) and saved those as separate fields in the GEOS-5.7.2 data archive for GEOS-Chem.  We have used  
+
In order to preserve some information about sea ice leads during the regridding process, we have binned the fractional sea ice coverage into deciles (0-10%, 10-20% ... 90-100% coverage) and saved those as separate fields in the GEOS-FP data archive for GEOS-Chem.  We have used  
 
[[List of MERRA met fields#Fractional sea ice|the same algorithm we developed for MERRA met fields]] to do the binning.
 
[[List of MERRA met fields#Fractional sea ice|the same algorithm we developed for MERRA met fields]] to do the binning.
  
Line 528: Line 779:
 
=== Dust emissions ===
 
=== Dust emissions ===
  
TBD
+
The dust emissions in GEOS-Chem rely on "tunable parameters" to scale the dust emissions to a specified total.  This is because the dust emissions are very highly dependent on the surface winds, and a small difference in winds (e.g. from GEOS-5 to GEOS-FP) can cause a huge difference in dust emission flux.
 +
 
 +
In routine <tt>DST_MBL</tt> (in <tt>dust_dead_mod.f</tt>), we have added the following code:
 +
 
 +
      !----------------------------------------------------------------
 +
      ! Based on results from GEOS-FP 4x5 for 04/2012-04/2013
 +
      !
 +
      !  (GEOS-5 - GEOS-FP)/GEOS-5 * 100 is 23.56% in each size bin.
 +
      !
 +
      ! We need to scale to the parameter FLX_MSS_FDG_FCT to make the
 +
      ! dust emissions consistent.  Consequently, to bring GEOS-FP 4x5
 +
      ! dust emissions up to GEOS-5 levels, we need to MULTIPLY the
 +
      ! FLX_MSS_FDG_FCT used for GEOS-5 by:
 +
      !
 +
      !            1 / (1. - 0.2356) = 1 / 0.7644 = 1.3082
 +
      !
 +
      !    -- R. Yantosca, M. Sulprizio, 07 Nov 2013
 +
      !----------------------------------------------------------------
 +
      REAL*8,  PARAMETER    :: FLX_MSS_FDG_FCT = 7.0d-4 * 1.3082d0
 +
 
 +
--[[User:Melissa Payer|Melissa Sulprizio]] 11:42, 7 November 2013 (EST)
  
 
=== Lightning ===
 
=== Lightning ===
  
TBD
+
We now use OTD-LIS local redistribution files (provided by Lee Murray, dated 2013-11-07) from the <tt>lightning_NOx_201311/</tt> subdirectory.
 +
 
 +
--[[User:Bmy|Bob Y.]] 14:45, 7 November 2013 (EST)
  
 
=== Wet deposition and scavenging ===
 
=== Wet deposition and scavenging ===
Line 544: Line 817:
 
== Implementation history ==
 
== Implementation history ==
  
=== Initial source code modifications for GEOS-5.7.2 ===
+
=== Initial source code modifications for GEOS-FP ===
  
'''''This update was tested in the 1-month benchmark simulation [[GEOS-Chem_v9-01-03_benchmark_history#v9-01-03g|v9-01-03g]] and approved on 27 Feb 2012.'''''
+
<span style="color:green">'''''This update was tested in the 1-month benchmark simulation [[GEOS-Chem_v9-01-03_benchmark_history#v9-01-03g|v9-01-03g]] and approved on 27 Feb 2012.'''''</span>
  
<span style="color:#CC0000">'''NOTE: At the time of this update GEOS-5.7.2 has not been validated, so the <tt>#define GEOS_57</tt> switch in define.h should not be used.'''</span>
+
#Modify the [[#Headers directory|Headers]], [[#GeosUtil directory|GeosUtil]], and [[#GeosCore directory|GeosCore]] directories for GEOS-FP
 
+
The following modifications are slated to be incorporated into the 1-month benchmark [[GEOS-Chem v9-01-03 benchmark history#v9-01-03g|GEOS-Chem v9-01-03g]]:
+
 
+
#Modify the [[#Headers directory|Headers]], [[#GeosUtil directory|GeosUtil]], and [[#GeosCore directory|GeosCore]] directories for GEOS-5.7.2
+
 
#Update the [[#GeosApm directory|GeosApm]] and [[#GeosTomas directory|GeosTomas]] directories, primarily to synchronize files with GeosCore
 
#Update the [[#GeosApm directory|GeosApm]] and [[#GeosTomas directory|GeosTomas]] directories, primarily to synchronize files with GeosCore
 
#Add [[#NcdfUtil directory|NcdfUtil directory]]
 
#Add [[#NcdfUtil directory|NcdfUtil directory]]
Line 561: Line 830:
 
=== Bug fix for declaration of GEOS-5.7.2 PFICU, PFLCU, PFILSAN, PFLLSAN fields ===
 
=== Bug fix for declaration of GEOS-5.7.2 PFICU, PFLCU, PFILSAN, PFLLSAN fields ===
  
'''''This update was tested in the 1-month benchmark simulation [[GEOS-Chem_v9-02_benchmark_history#v9-02g|v9-02g]] and approved on 24 Mar 2013.'''''
+
<span style="color:green">'''''This update was tested in the 1-month benchmark simulation [[GEOS-Chem_v9-02_benchmark_history#v9-02g|v9-02g]] and approved on 24 Mar 2013.'''''</span>
  
In module file <tt>GeosCore/gigc_state_met_mod.F90</tt>, it was discovered that the PFICU, PFLCU, PFILSAN, and PFLLSAN met fields for [[GEOS-5.7.2]] were being allocated with the wrong vertical dimension.  In [[GEOS-5.7.2]], these fields are placed on level edges and need to be allocated with <tt>LLPAR+1</tt> levels.  But in [[MERRA]], these fields are placed on level centers and need to be allocated with <tt>LLPAR</tt> levels.
+
In module file <tt>GeosCore/gigc_state_met_mod.F90</tt>, it was discovered that the PFICU, PFLCU, PFILSAN, and PFLLSAN met fields for [[GEOS-FP]] were being allocated with the wrong vertical dimension.  In [[GEOS-FP]], these fields are placed on level edges and need to be allocated with <tt>LLPAR+1</tt> levels.  But in [[MERRA]], these fields are placed on level centers and need to be allocated with <tt>LLPAR</tt> levels.
  
 
We have introduced the following fix in routine <tt>Init_GIGC_State_Met</tt> of <tt>Headers/gigc_state_met_mod.F90</tt>:
 
We have introduced the following fix in routine <tt>Init_GIGC_State_Met</tt> of <tt>Headers/gigc_state_met_mod.F90</tt>:
Line 571: Line 840:
 
     ...  
 
     ...  
 
   
 
   
  #elif defined( GEOS_57 ) || defined( MERRA )
+
  #elif defined( GEOS_FP ) || defined( MERRA )
 
   
 
   
 
     !=======================================================================
 
     !=======================================================================
     ! GEOS-5.7.x / MERRA met fields
+
     ! GEOS_FP / MERRA met fields
 
     !=======================================================================
 
     !=======================================================================
 
  #if defined( GEOS_57 )
 
  #if defined( GEOS_57 )
Line 598: Line 867:
 
     State_Met%PFLLSAN  = 0d0
 
     State_Met%PFLLSAN  = 0d0
  
This will make sure that the fields will be declared properly for either GEOS-5.7.2 or MERRA.  (NOTE: <tt>LM</tt> is set to <tt>LLPAR</tt>, and thus <tt>LM+1</tt> = <tt>LLPAR+1</tt>.
+
This will make sure that the fields will be declared properly for either GEOS-FP or MERRA.  (NOTE: <tt>LM</tt> is set to <tt>LLPAR</tt>, and thus <tt>LM+1</tt> = <tt>LLPAR+1</tt>.
 +
 
 +
--[[User:Bmy|Bob Y.]] 14:37, 7 November 2013 (EST)
 +
 
 +
=== Make sure State_Met%T is initialized properly for GEOS-FP simulations ===
 +
 
 +
For simulations with the [[GEOS-FP|GEOS-FP met fields]], temperature is an I3 (i.e. 3-hr instantaneous) met field.  We need to read temperature at times <tt>t</tt> and <tt>t+3hrs</tt>, and then interpolate linearly to the proper time.
 +
   
 +
At time <tt>t=0</tt> of a GEOS-FP simulation, the initial temperature is read from netCDF files into <tt>State_Met%TMPU1</tt>.  However, we must also save this into <tt>State_Met%T</tt>.  Otherwise, temperature will be not initialized properly until the first call to <tt>INTERP</tt>.  This can cause a floating-point error further upstream. 
 +
 
 +
We have added the following code to routine <tt>Geos57_Read_I3_1</tt> in <tt>GeosCore/geosfp_read_mod.F90</tt>:
 +
 
 +
      ! For now, copy State_Met%TMPU1 to State_Met%T.  At the next met field
 +
      ! read, we will State_Met%T from the values of State_Met%TMPU1 and
 +
      ! State_Met%TMPU2. (bmy, 9/6/13)
 +
      State_Met%T = State_Met%TMPU1
 +
 
 +
This error condition was caught by the [[Debugging with the GEOS-Chem unit tester|GEOS-Chem unit tester]] when compiling with option <tt>FPE=yes</tt>.
 +
 
 +
--[[User:Bmy|Bob Y.]] 13:13, 12 September 2013 (EDT)
 +
 
 +
=== Modifications to reduce the number of times netCDF files are opened ===
 +
 
 +
<span style="color:green">'''''This update was validated in the 1-month benchmark simulation [[GEOS-Chem v11-01 benchmark history#v11-01e|v11-01e]] (approved 04 Jan 2016).'''''</span>
 +
 
 +
<span style="color:green">'''''NOTE: The following only applies to simulations done with GEOS-Chem "Classic".  The HPC-enabled version of GEOS-Chem (aka "GEOS-Chem HP" uses the ESMF and MAPL libraries for file I/O.'''''</span>
 +
 
 +
In [[GEOS-Chem v11-01#v11-01e|GEOS-Chem v11-01e]], we have taken steps to reduce the number of times each GEOS-FP or MERRA-2 netCDF file is opened.  This should reduce
 +
 
 +
:1.  We added several new global module variables for the netCDF file ID's to the top of <tt>GeosCore/geosfp_read_mod.F90</tt> and <tt>GeosCore/merra2_read_mod.F90</tt>:
 +
 +
      ! netCDF file ID's
 +
      INTEGER :: fA1    = -1
 +
      INTEGER :: fA3cld  = -1
 +
      INTEGER :: fA3dyn  = -1
 +
      INTEGER :: fA3mstC = -1
 +
      INTEGER :: fA3mstE = -1
 +
      INTEGER :: fI3_1  = -1
 +
      INTEGER :: fI3_2  = -1
 +
 
 +
:2 In both <tt>GeosCore/geosfp_read_mod.F90</tt> and <tt>GeosCore/merra2_read_mod.F90</tt>, reorganized routines that read netCDF data files from disk according to the following template:
 +
 
 +
      SUBROUTINE GeosFp_Read_A1( YYYYMMDD, HHMMSS, Input_Opt, State_Met )
 +
        . . .
 +
 +
        <span style="color:green">'''NOTE: added this line:'''
 +
        LOGICAL, SAVE      :: first    = .TRUE.  ! First time reading data?</span>
 +
               
 +
        . . .
 +
 
 +
        <span style="color:green">'''NOTE: Moved this code up front'''</span>
 +
        ! Find the proper time-slice to read from disk
 +
        time_index = ( HHMMSS / 10000 ) + 1
 +
 +
        ! Stop w/ error if the time index is invalid
 +
        IF ( time_index < 1 .or. time_index > 24 ) THEN
 +
          WRITE( 6, 100 ) time_index
 +
    100  FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 24!' )
 +
          CALL Error_Stop( errMsg, caller )
 +
        ENDIF
 +
 
 +
        . . .       
 +
 +
        <span style="color:green">'''NOTE: Put this code in an IF block:'''</span>
 +
        IF ( time_index == 1 .or. first ) THEN
 +
          . . .
 +
   
 +
          ! Open netCDF file
 +
          CALL NcOp_Rd( fA1, TRIM( nc_file ) )
 +
       
 +
          ! Read the dimensions from the netCDF file
 +
          CALL NcGet_DimLen( fA1, 'lon',  X )
 +
          CALL NcGet_DimLen( fA1, 'lat',  Y )
 +
          CALL NcGet_DimLen( fA1, 'time',  T )
 +
 +
          ! Make sure the dimensions of the file are valid
 +
          CALL Check_Dimensions( lon=X,            lat=Y,        time=T,  &
 +
                                  time_expected=24, caller=caller        )
 +
 +
          <span style="color:green">'''NOTE: added this line:'''
 +
          ! Reset first-time flag
 +
          first = .FALSE.</span>
 +
        ENDIF
 +
 +
        . . .
 +
 +
        <span style="color:green">'''NOTE: Use one of the module variables for the netCDF file ID.'''</span>
 +
        ! Read ALBEDO
 +
        v_name = "ALBEDO"
 +
        CALL NcRd( Q, <span style="color:green">fA1</span>, TRIM(v_name), st3d, ct3d )
 +
        State_Met%ALBD = Q
 +
 +
        . . . read other met fields from disk . . .
 +
 +
        <span style="color:green">'''NOTE: Close the file on the last timestep'''</span>
 +
        ! If it's the last time slice, then close the netCDF file
 +
        ! and set the file ID to -1 to indicate that it's closed.
 +
        IF ( time_index == 24 ) THEN
 +
          CALL NcCl( fA1 )
 +
          fA1 = -1
 +
        ENDIF
 +
 
 +
:and we do the same for all of the other file-reading routines in the both modules.
 +
 
 +
:3. We added subroutine <tt>Cleanup_GeosFp_Read</tt> to the end of <tt>GeosCore/geosfp_read_mod.F90</tt>.  This subroutine will be called from the <tt>CLEANUP</tt> routine at the end of a simulation to close any netCDF files that may still be open.  This can happen if a simulation ends in the middle of a day.
 +
 
 +
      SUBROUTINE Cleanup_GeosFp_Read()
 +
        . . .
 +
        !=======================================================================
 +
        ! Close any netCDF file ID's that are still open
 +
        !=======================================================================
 +
        IF ( fA1 > 0 ) THEN
 +
          CALL NcCl( fA1 )
 +
          WRITE( 6, 100 ) 'A1    '
 +
        ENDIF
 +
 +
        IF ( fA3cld > 0 ) THEN
 +
          CALL NcCl( fA3cld  )
 +
          WRITE( 6, 100 ) 'A3cld '
 +
        ENDIF
 +
 +
        IF ( fA3dyn > 0 ) THEN
 +
          CALL NcCl( fA3dyn  )
 +
          WRITE( 6, 100 ) 'A3dyn '
 +
        ENDIF
 +
 
 +
        IF ( fA3mstC > 0 ) THEN
 +
          CALL NcCl( fA3mstC )
 +
          WRITE( 6, 100 ) 'A3mstC'
 +
        ENDIF
 +
   
 +
        IF ( fA3mstE > 0 ) THEN
 +
          CALL NcCl( fA3mstE )
 +
          WRITE( 6, 100 ) 'A3mstE'
 +
        ENDIF
 +
 +
        IF ( fI3_1 > 0 ) THEN
 +
          CALL NcCl( fI3_1  )
 +
          WRITE( 6, 100 ) 'I3_1  '
 +
        ENDIF
 +
 +
        IF ( fI3_2 > 0 ) THEN
 +
          CALL NcCl( fI3_2  )
 +
          WRITE( 6, 100 ) 'I3_2  '
 +
        ENDIF
 +
 +
        ! Format strings
 +
    100 FORMAT( '    - Closing the GEOS-FP ', a6, ' file at end of simulation' )
 +
 +
      END SUBROUTINE Cleanup_GeosFp_Read
 +
 
 +
:We also added the corresponding subroutine <tt>Cleanup_Merra2_Read</tt> to <tt>GeosCore/merra2_read_mod.F90</tt>.
 +
 
 +
:4. We modified <tt>GeosCore/cleanup.F</tt> to call the <tt>Cleanup_GeosFp_Read</tt> and <tt>Cleanup_Merra2_Read</tt> routines:
 +
 
 +
      USE GEOSFP_READ_MOD,        ONLY : CLEANUP_GEOSFP_READ
 +
      USE MERRA2_READ_MOD,        ONLY : CLEANUP_MERRA2_READ
 +
      . . .
 +
          ! Close GEOS-FP or MERRA2 met field files that may still be open
 +
    #if defined( GEOS_FP )
 +
          CALL Cleanup_GeosFp_Read()
 +
    #elif defined( MERRA2 )
 +
          CALL Cleanup_Merra2_Read()
 +
    #endif
 +
 
 +
:5. We added <tt>geosfp_read_mod.o</tt> and <tt>merra2_read_mod.o</tt> to the dependencies listing in <tt>GeosCore/Makefile</tt>:
 +
 
 +
    cleanup.o                  : cleanup.F                                      \
 +
                                  aerosol_mod.o                                  \
 +
                                  . . .
 +
                                  geosfp_read_mod.o      merra2_read_mod.o      \
 +
                                  . . .
  
--[[User:Bmy|Bob Y.]] 11:32, 18 March 2013 (EDT)
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 22:41, 4 December 2015 (UTC)

Latest revision as of 14:15, 15 May 2017

NOTE: GEOS-FP is the current NASA/GMAO operational met data product. It is produced with a native resolution of 0.25° (lon) x 0.3125° (lat) x 72 hybrid vertical layers. GEOS-FP replaced the older GEOS-5.2.0 operational data product in June 2013.

GEOS-FP was originally given the designation GEOS-5.7.1, which was later updated to GEOS-5.7.2. Currently, GEOS-FP is being produced with version 5.11.0 of the GEOS Data Assimilation System (aka GEOS-DAS). This means that the "5.7.x" nomenclature is no longer correct. For this reason, we shall refer to this product as GEOS-FP from now on.


On this page we list the necessary modifications to GEOS-Chem for compatibility with the GEOS-FP meteorological data.

Overview

The GEOS-FP data product (aka GEOS5-FP) is the newest version of the operational meteorological data produced by NASA/GMAO. Overall, the structure of GEOS-FP is very similar to MERRA and MERRA-2 met data products.. Therefore, within GEOS-Chem we can (for the most part) treat GEOS-FP in the same way as we do for the MERRA and MERRA-2.

The table below compares many features of GEOS-FP with other met field products.

Feature MERRA-2 GEOS-FP MERRA GEOS-5
Native vertical grid
  • 0.5° lat x 0.625° lon
  • 0.25° lat x 0.3125° lon
  • 0.5° lat x 0.667° lon
    • (surface fields)
  • 1° lat x 1.25° lon
    • (most 3D fields)
  • 1.25° x 1.25° lon
    • (moist quantities)
  • 0.5° lat x 0.667° lon
Native horizontal grid
  • Same as GEOS-FP
  • 72 hybrid levels
  • Same as GEOS-FP
  • Same as GEOS-FP
Time-invariant fields
  • Same as GEOS-FP
  • FRLAKE
  • FRLAND
  • FRLANDIC(E)
  • FROCEAN
  • PHIS
  • Same as GEOS-FP
  • Same as GEOS-FP
Time archiving: surface fields
  • Same as GEOS-FP
  • A1 (1-hr time averaged)
  • Same as GEOS-FP
  • A3 (6-hr time average)
Time archiving: 3D fields
  • Same as GEOS-FP
  • Same as GEOS-FP
  • A3 (3-hr time averaged)
  • I3 (3-hr instantaneous)
  • A3 (3-hr time average)
  • I6 (6-hour instantaneous)
  • A6 (6-hr time average) and
  • I6 (6-hr instantaneous)
Timestamps
Precipitation fields
  • Same as GEOS-FP
  • DQRCU, DQRLSAN,
  • PFICU, PFILSAN,
  • PFLCU, PFLLSAN,
  • REEVAPCN, REEVAPLSAN
  • Same as GEOS-FP
  • DQIDTMST
  • DQLDTMST
  • DQVDTMST
  • MOISTQ = DQIDTMST + DQLDTMST + DQVDTMST
Temperature
  • Same as GEOS-FP
  • Same as GEOS-FP
  • T [K]
  • I3 (3-hr instantaneous)
  • Same as GEOS-FP
  • A3 (6-hr time average)
  • Same as GEOS-FP
  • A6 (6-hr time average)
Relative humidity
  • Same as GEOS-FP
  • Same as GEOS-FP
  • RH [1]
  • A3 (3-hr time average)
  • Same as MERRA-2
  • I3 (6-hr instantaneous)
  • Same as MERRA-2
  • A6 (6-hr time-averaged)
Specific humidity
  • Same as GEOS-FP
  • Same as GEOS-FP
  • QV [kg kg-1]
  • I3 (3-hr instantaneous)
  • Same as GEOS-FP
  • A3 (3-hr time average)
  • Same as GEOS-FP
  • A6 (6-hr time-averaged)
Vertical pressure velocity
  • Same as GEOS-FP
  • Same as GEOS_FP
  • OMEGA [Pa s-1]
  • A3 (3-hr time average)
  • Same as GEOS-FP
  • I6 (6-hr instantaneous)
  • Same as GEOS-FP
  • A6 (6-hr time-averaged)
Ertel potential vorticity
  • Same as GEOS-FP
  • Same as GEOS-FP
  • PV [K m2 kg-1 s-1]
  • A1 (1-hr time average)
  • Same as GEOS-FP
  • I6 (6-hr instantaneous)
  • TROPP (hPa)
  • A6 (3-hr time-average)
Snow mass
  • Same as GEOS-FP
  • Same as GEOS-FP
  • Same as GEOS-FP
  • Same as MERRA-2
  • Same as MERRA-2
  • Same as MERRA-2
  • SNOMAS [m]
  • A3 (3-hr time average)
Sea level pressure
  • SLP [Pa]
  • Same as GEOS-FP)
  • Converted to hPa when read from disk
  • SLP [hPa]
  • A1 (1-hr time average)
  • Same as GEOS-FP
  • Same as GEOS-FP
  • Same as GEOS-FP
  • I6 (3-hr instantaneous)


Surface pressure
  • PS [Pa]
  • Same as GEOS-FP
  • PS [hPa]
  • I3 (3-hr instantaneous)
  • Same as GEOS-FP
  • I6 (6-hr instantaneous)
  • Same as GEOS-FP
  • I6 (3-hr instantaneous)
Tropopause pressure
  • TROPPT [Pa]
  • Same as GEOS-FP
  • TROPPT [hPa]
  • A1 (1-hr time average)
  • Same as GEOS-FP
  • Same as GEOS-FP
  • TROPP [hPa]
  • A3 (3-hr time average)
GEOS-Chem convection routine
  • Same as GEOS-FP
  • DO_MERRA_CONVECTION
    (in convection_mod.F)
  • Same as GEOS-FP
  • NFCLDMX
    (in convection_mod.F)
GEOS-Chem wet deposition routine
  • Same as GEOS-FP
  • WETDEP_MERRA
    (wetscav_mod.F)
  • Same as GEOS-FP
  • WETDEP
    (wetscav_mod.F)
GEOS-Chem transport routine
  • Same as GEOS-FP
  • TPCORE_FVDAS
    (tpcore_fvdas_mod.F90)
  • Same as GEOS-FP
  • Same as GEOS-FP
File format read by GEOS-Chem
  • netCDF-4
  • netCDF-3
  • binary
  • binary

--Bob Y. (talk) 17:48, 17 August 2015 (UTC)

Required coding changes in GEOS-Chem

As noted in the section above, the similarities between MERRA and GEOS-FP (especially of the vertical grids) means that in most cases we can just treat MERRA in the same way as for GEOS-5. In many areas of the code, the coding changes are straightforward and simply involve an extension of C-preprocessor statements such as:

#if defined( GEOS_5 ) || defined( MERRA )

to

#if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )

In other areas of GEOS-Chem the changes are more involved. Below we provide a description of the areas of GEOS-Chem that were modified for MERRA:

Top-level directory

File Modifications made
Makefile_header.mk
  • Starting with GEOS-Chem v9-02o, we now use Makefile variables to set the various C-preprocessor switches. In particular:
    • MET=___ selects the met field type( gcap, geos4, geos5, geosfp, merra)
    • GRID=___ selects the horizontal grid (4x5, 2x25, 05x0666, 025x03125)
    • NEST=___ specifies the nested-grid (CH, EU, NA, SE)

--Bob Y. 13:39, 7 November 2013 (EST)

Headers directory

The following modifications for GEOS-FP were made in the Headers/ directory:

File Modifications made
CMN_SIZE_mod.F
  • Added size parameters for GEOS-FP grids at 4° x 5° 2° x 2.5° and 0.25° x 0.3125° resolution
gigc_input_opt_mod.F90
  • This module was introduced to facilitate the Grid-Independent GEOS-Chem development.
  • gigc_input_opt_mod.F90 now collects the various logical switches, file paths, and related variables from logical_mod.F, directory_mod.F, unix_cmds_mod.F, and linoz_mod.F.
gigc_state_met_mod.F90
  • This module was introduced to facilitate the Grid-Independent GEOS-Chem development.
  • gigc_state_met_mod.F90 now holds all of the met field arrays that were formerly in GeosCore/dao_mod.F.
  • We now allocate all met field arrays in routine Init_GIGC_State_Met

--Bob Y. 13:52, 7 November 2013 (EST)

GeosUtil directory

The following modifications for GEOS-FP were made in the GeosUtil/ directory:

File Modifications made
bpch2_mod.F

In routine GET_MODELNAME:

  • Add GEOS5_47L and GEOSFP modelnames to the #if block

In routine GET_NAME_EXT:

  • Return grid name geos5 for GEOS-FP fields

In routine GET_RES_EXT:

  • Return resolution string 025x03125 for 0.25° x 0.3125° grids
grid_mod.F

In routine COMPUTE_GRID:

  • Overwrite YMID at poles for 0.25° x 0.3125° grids (+/- 89.3975)
  • Define YMID_R_W for 0.25° x 0.3125° nested grids

In routine INIT_GRID:

  • Define IIIPAR=1152 and JJJPAR=721 for 0.25° x 0.3125° global grid
pressure_mod.F

In routines GET_PEDGE and GET_PEDGE_FULLGRID:

  • Compute PEDGE for GEOS-FP in the same way as for GEOS-5 and MERRA

In routine INIT_PRESSURE:

  • Initialize Ap and Bp for GEOS-FP in the same way as for GEOS-5 and MERRA
time_mod.F

In routine GET_A1_TIME:

  • Compute the DATE array for GEOS-FP the same way as is done for MERRA.
transfer_mod.F

In several routines:

  • Changed code to #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )

--Bob Y. 13:55, 7 November 2013 (EST)

GeosCore directory

The following modifications for GEOS-FP were made in the GeosCore/ directory:

File Modifications made
calcrate.F Multiple instances:
  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
carbon_mod.F Multiple instances:
  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
cldice_HbrHOBr_mod.F Multiple instances:
  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
convection_mod.F

In routine DO_CONVECTION:

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )
  • For GEOS-FP, PFICU and PFLCU fields are defined on level edges. Pass the top edge value at each level (stored in local arrays T_PFICU and T_PFLCU) to DO_MERRA_CONVECTION.
  • Add T_PFICU and T_PFLCU arrays to the PRIVATE statement of the OpenMP loop.
dao_mod.F

In routine COPY_I6_FIELDS:

  • Renamed this routine to COPY_I3_I6_FIELDS
  • Added #if block for GEOS-FP met

In routines IS_ICE, IS_LAND, IS_NEAR, IS_WATER:

  • Now use: #elif defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )

In routine INTERP:

  • Add #if block for GEOS-FP
depo_mercury_mod.F

In routine ADD_Hg2_SNOWPACK

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )
diag3.F
  • Add SCALE_I3 counter for instantaneous met fields
  • Modify ND66 diagnostic to divide by proper # of A3 increments (i.e. every 3 hours)
    • With the exception of T, SPHU, which are I3 fields
  • Modify ND67 diagnostic to divide by proper # of A1 increments (i.e. every hour)
    • With the exception of CLDTOPS, which is an A3 field
dust_mod.F

In routine SRC_DUST_DEAD:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
dust_dead_mod.F

In routine DST_MBL:

  • For GEOS-FP, add a new value for parameter FLX_MSS_FDG_FCT. The scale factor ensures that we get the same dust totals (w/in roundoff error) as for GEOS-5.
fast_j.F
  • Do cloud overlapping for GEOS-FP in the same way as for GEOS-5 and MERRA.
  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
gamap_mod.F

In routine INIT_TRACERINFO:

  • Changed code to: #elif defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
geosfp_read_mod.F90
  • Added this module w/ routines to read GEOS-FP met data (in netCDF format)
global_ch4_mod.F

In routines WETLAND_EMIS and READ_COPROD:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
global_hno3_mod.F

In routine GET_GLOBAL_HNO3:

  • Now use:
    #if defined( GEOS_3 ) || defined( GEOS_4 ) || defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
global_o3_mod.F

In routine GET_GLOBAL_O3

  • Now use:: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
initialize.F
  • Restructure USE statements for clarity
  • Now also reset the counter for I3 timesteps by calling routine  SET_CT_I3( RESET=.TRUE. )
input_mod.F

In routine READ_SIMULATION_MENU:

  • Read value for GEOS_FP_DIR from input.geos file and save into Input_Opt
  • Set LUNZIP=.FALSE. for GEOS-FP met

In routine READ_CONVECTION_MENU:

  • Change #if statement to allow non-local PBL mixing for GEOS-FP met data

In routine READ_EMISSIONS_MENU:

  • Turn off LMEGANMONO when LMEGAN is turned off

In routine VALIDATE_DIRECTORIES:

  • Error check GEOS_FP_DIR for start & end date
land_mercury_mod.F

In routines LAND_MERCURY_FLUX:

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )

In routines SOILEMIS:

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )
  • Extend #if statement for variable SOIL_EMIS_FAC to get the code to compile w/o error.
    (NOTE: Team Hg: you will have to submit a proper value for this later.
lightning_nox_mod.F

In routine LIGHTNING:

  • Eliminate the shallow-cloud inhibititon trap for GEOS-FP, as we already do for GEOS-5 and MERRA

In routine GET_OTD_LIS_SCALE:

  • Now use updated values for ANN_AVG_FLASHRATE computed by Lee Murray (2013-11-07).
Makefile
  • Added dependencies for new routines
  • Added the following targets
    • libnc: Compiles the code in the NcdfUtil directory and creates the libNcUtils.a library
    • ncdfcheck: Compiles a program that will test the integrity of the netCDF library installation.
main.F
  • Rewrote USE statements for clarity
  • Added calls to routines from geosfp_read_mod.F
  • Split off the code that reads met fields into internal subroutines READ_INITIAL_MET_FIELDS and READ_MET_FIELDS, for clarity.
  • Renamed NN to NNN to avoid name confusion
megan_mod.F

At top of module

  • For MERRA and GEOS-FP met: define DAY_DIM parameter = 24 for hourly temperature data
  • For all other met data: define DAY_DIM parameter = 8 for 3-hourly temperature data

In routine INIT_MEGAN:

  • For MERRA and GEOS-FP met: define G4AHEAD = 003000
  • Now call GEOS57_READ_A1 (from geosfp_read_mod.F90) to read surface temperature data
mercury_mod.F

In routine CHEM_Hg0_Hg2:

  • In the block that computes LWC, changed code to: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
  • In the block that computes Hg0 exchange, changed code to: #if defined( MERRA ) || defined( GEOS_FP )
nei2005_anthro_mod.F

In routines EMISS_NEI2005_ANTHRO and EMISS_NEI_ANTHRO_05x0666:

  • Changed code to: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
ocean_mercury_mod.F

Multiple instances:

  • Now use: #if defined( MERRA ) || defined( GEOS_FP )
planeflight_mod.F

In routine PLANEFLIGHT

  • Now use: #if defined( MERRA ) || defined( GEOS_FP )
strat_chem_mod.F90

Multiple instances:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
sulfate_mod.F

Multiple instances:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
tagged_ox_mod.F

Multiple instances:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
tpcore_bc_mod.F:

Multiple instances:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
tropopause_mod.F:

Multiple instances:

  • Now use: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )
vdiff_mod.F90

In routine VDIFFDR:

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )
wetscav_mod.F

In routines DO_WETDEP, DO_WASHOUT_ONLY

  • Changed code to: #if defined( MERRA ) || defined( GEOS_FP )

In routine MAKE_QQ:

  • Add #if block for GEOS-FP met
  • Refer to PFILSAN(I,J,L+1) and PFLLSAN(I,J,L+1), since these fields are defined on level edges

In routine RAINOUT:

  • Changed code to: #if defined( GEOS_5 ) || defined( MERRA ) || defined( GEOS_FP )

--Bob Y. 14:23, 7 November 2013 (EST)

GeosApm directory

The following modifications for GEOS-FP were made in the GeosTomas/ directory:

File Modifications made
Makefile
  • Added dependencies for geos57_read_mod.F
  • Removed references to obsolete GEIA biogenic emissions
carbon_mod.F
  • Synchronized with GeosCore/carbon_mod.F
dao_mod.F
  • Synchronized with GeosCore/dao_mod.F
dust_mod.F
  • Synchronized with GeosCore/dust_mod.F
dust_dead_mod.F
  • Synchronized with GeosCore/dust_dead_mod.F
main.F
  • Synchronized with GeosCore/main.F
sulfate_mod.F
  • Synchronized with GeosCore/sulfate_mod.F
wetscav_mod.F
  • Synchronized with GeosCore/wetscav_mod.F
  • NOTE: Needs validation by APM team

--Bob Y. 13:49, 9 February 2012 (EST)

NcdfUtil directory

We have added the NcdfUtil/ directory, which contains routines for netCDF file I/O. These routines are based on the NcdfUtilities package by Bob Yantosca. These are built when you compile GEOS-Chem with the NETCDF=yes Makefile option.

File Description
Makefile GNU Makefile used to build the NcdfUtil code.
TestNcdfUtil.F90 Test program to verify that the netCDF libraries were built properly. (This is executed only when you issue a make ncdfcheck command.)
m_do_err_out.F90 Routine to print out netCDF error messages.
m_netcdf_io_checks.F90 Routines to check whether a netCDF file contains a specified variable or dimension.
m_netcdf_io_close.F90 Routines to close a netCDF file.
m_netcdf_io_create.F90 Routines used to open a netCDF file for output and to synchronize a netCDF file.
m_netcdf_io_define.F90 Routines to define netCDF variables and attributes. Use this when writing data to a netCDF file.
m_netcdf_io_get_dimlen.F90 Routines to return dimension information from a netCDF file.
m_netcdf_io_handle_err.F90 Routines for netCDF I/O error handling.
m_netcdf_io_open.F90 Routines for opening a netCDF file for reading or for writing.
m_netcdf_io_read.F90 Routines for reading variables (of INTEGER, REAL*4, REAL*8, and CHARACTER types) from a netCDF file.
m_netcdf_io_readattr.F90 Routines for reading global and variable attributes (of INTEGER, REAL*4, REAL*8, and CHARACTER types) from a netCDF file.
m_netcdf_io_write.F90 Routines for writing data to a netCDF file

--Bob Y. 10:34, 3 February 2012 (EST)

NcdfUtil/perl subdirectory

In this directory, we have added scripts for automatically generating Fortran code with the proper calls from the NcdfUtilities package. We anticipate that this will be a convenience for GEOS-Chem users, as it will relieve some of the drudgery of writing these calls by hand.

File Description
StrTrim.pm Perl module used by the ncCode* scripts. Contains routines for stripping withe space from strings.
ncCodeDef Perl script that generates Fortran code to open a netCDF file and define the various dimensions, variables, and attributes.
ncCodeWrite Perl script that will generate Fortran code to write data to a netCDF file.
ncCodeRead Perl script that will generate Fortran code to read data from a netCDF file.
nc_definitions.rc Generic input file used by the ncCode* scripts. You can edit this.
definitions_cn.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP CN data.
definitions_a1.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP A1 data.
definitions_a3cld.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP A3cld data.
definitions_a3dyn.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP A3dyn data.
definitions_a3mstc.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP A3mstC data.
definitions_a3mste.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP A3mstE data.
definitions_i3.rc Customized version of nc_definitions.rc that will generate Fortran code for reading GEOS-FP I3 data.

--Bob Y. 15:49, 12 May 2014 (EDT)

Resolved issues

Fractional sea ice

In order to preserve some information about sea ice leads during the regridding process, we have binned the fractional sea ice coverage into deciles (0-10%, 10-20% ... 90-100% coverage) and saved those as separate fields in the GEOS-FP data archive for GEOS-Chem. We have used the same algorithm we developed for MERRA met fields to do the binning.

--Bob Y. 16:12, 24 January 2012 (EST)

SNOMAS

The SNOMAS (snow depth) fields in both GEOS-5.7.2 and MERRA differ from that in GEOS-5.2.0. It appears that in GEOS-5.2.0 a default snow mass value was applied to grid boxes that had > 90% land ice coverage. This was not done in MERRA or GEOS-5.7.2. Bob Yantosca had implemented an algorithm to adjust the MERRA SNOMAS field to be backwards-compatible with GEOS-5.2.0. We have used this algorithm to adjust the GEOS-5.7.2 SNOMAS field accordingly.

--Bob Y. 16:14, 24 January 2012 (EST)

Dust emissions

The dust emissions in GEOS-Chem rely on "tunable parameters" to scale the dust emissions to a specified total. This is because the dust emissions are very highly dependent on the surface winds, and a small difference in winds (e.g. from GEOS-5 to GEOS-FP) can cause a huge difference in dust emission flux.

In routine DST_MBL (in dust_dead_mod.f), we have added the following code:

     !----------------------------------------------------------------
     ! Based on results from GEOS-FP 4x5 for 04/2012-04/2013
     !
     !   (GEOS-5 - GEOS-FP)/GEOS-5 * 100 is 23.56% in each size bin.
     !
     ! We need to scale to the parameter FLX_MSS_FDG_FCT to make the
     ! dust emissions consistent.  Consequently, to bring GEOS-FP 4x5
     ! dust emissions up to GEOS-5 levels, we need to MULTIPLY the
     ! FLX_MSS_FDG_FCT used for GEOS-5 by:
     !
     !             1 / (1. - 0.2356) = 1 / 0.7644 = 1.3082
     !
     !    -- R. Yantosca, M. Sulprizio, 07 Nov 2013
     !----------------------------------------------------------------
     REAL*8,  PARAMETER     :: FLX_MSS_FDG_FCT = 7.0d-4 * 1.3082d0

--Melissa Sulprizio 11:42, 7 November 2013 (EST)

Lightning

We now use OTD-LIS local redistribution files (provided by Lee Murray, dated 2013-11-07) from the lightning_NOx_201311/ subdirectory.

--Bob Y. 14:45, 7 November 2013 (EST)

Wet deposition and scavenging

Helen Amos, Bess Corbitt, and Qiaoqiao Wang had implemented an updated algorithm for wet scavenging that takes advantage of the new precipitation fields from the MERRA data archive. This was included in GEOS-Chem v9-01-01 and higher versions.

Because GEOS-5.7.2 contains the same precipitation data fields as MERRA (i.e. DQRCU, DQRLSAN, PFICU, PFILSAN, PFLCU, PFLLSAN, REEVAPCN, REEVAPLSAN), we can use the new wet deposition algorithm with the GEOS-5.7.2 met data.

--Bob Y. 16:16, 24 January 2012 (EST)

Implementation history

Initial source code modifications for GEOS-FP

This update was tested in the 1-month benchmark simulation v9-01-03g and approved on 27 Feb 2012.

  1. Modify the Headers, GeosUtil, and GeosCore directories for GEOS-FP
  2. Update the GeosApm and GeosTomas directories, primarily to synchronize files with GeosCore
  3. Add NcdfUtil directory
  4. Resolve several issues, including: Fractional sea ice, SNOMAS, Wet deposition and scavenging

--Melissa Payer 17:29, 24 February 2012 (EST)

Bug fix for declaration of GEOS-5.7.2 PFICU, PFLCU, PFILSAN, PFLLSAN fields

This update was tested in the 1-month benchmark simulation v9-02g and approved on 24 Mar 2013.

In module file GeosCore/gigc_state_met_mod.F90, it was discovered that the PFICU, PFLCU, PFILSAN, and PFLLSAN met fields for GEOS-FP were being allocated with the wrong vertical dimension. In GEOS-FP, these fields are placed on level edges and need to be allocated with LLPAR+1 levels. But in MERRA, these fields are placed on level centers and need to be allocated with LLPAR levels.

We have introduced the following fix in routine Init_GIGC_State_Met of Headers/gigc_state_met_mod.F90:

    INTEGER :: LX

    ... 

#elif defined( GEOS_FP ) || defined( MERRA )

    !=======================================================================
    ! GEOS_FP / MERRA met fields
    !=======================================================================
#if defined( GEOS_57 )
    LX = LM + 1
#elif defined( MERRA )
    LX = LM
#endif

    ALLOCATE( State_Met%PFICU     ( IM, JM, LX   ), STAT=RC )
    IF ( RC /= GIGC_SUCCESS ) RETURN
    State_Met%PFICU    = 0d0

    ALLOCATE( State_Met%PFILSAN   ( IM, JM, LX   ), STAT=RC )
    IF ( RC /= GIGC_SUCCESS ) RETURN
    State_Met%PFILSAN  = 0d0

    ALLOCATE( State_Met%PFLCU     ( IM, JM, LX   ), STAT=RC )
    IF ( RC /= GIGC_SUCCESS ) RETURN
    State_Met%PFLCU    = 0d0

    ALLOCATE( State_Met%PFLLSAN   ( IM, JM, LX   ), STAT=RC )
    IF ( RC /= GIGC_SUCCESS ) RETURN
    State_Met%PFLLSAN  = 0d0

This will make sure that the fields will be declared properly for either GEOS-FP or MERRA. (NOTE: LM is set to LLPAR, and thus LM+1 = LLPAR+1.

--Bob Y. 14:37, 7 November 2013 (EST)

Make sure State_Met%T is initialized properly for GEOS-FP simulations

For simulations with the GEOS-FP met fields, temperature is an I3 (i.e. 3-hr instantaneous) met field. We need to read temperature at times t and t+3hrs, and then interpolate linearly to the proper time.

At time t=0 of a GEOS-FP simulation, the initial temperature is read from netCDF files into State_Met%TMPU1. However, we must also save this into State_Met%T. Otherwise, temperature will be not initialized properly until the first call to INTERP. This can cause a floating-point error further upstream.

We have added the following code to routine Geos57_Read_I3_1 in GeosCore/geosfp_read_mod.F90:

     ! For now, copy State_Met%TMPU1 to State_Met%T.  At the next met field 
     ! read, we will State_Met%T from the values of State_Met%TMPU1 and
     ! State_Met%TMPU2. (bmy, 9/6/13)
     State_Met%T = State_Met%TMPU1

This error condition was caught by the GEOS-Chem unit tester when compiling with option FPE=yes.

--Bob Y. 13:13, 12 September 2013 (EDT)

Modifications to reduce the number of times netCDF files are opened

This update was validated in the 1-month benchmark simulation v11-01e (approved 04 Jan 2016).

NOTE: The following only applies to simulations done with GEOS-Chem "Classic". The HPC-enabled version of GEOS-Chem (aka "GEOS-Chem HP" uses the ESMF and MAPL libraries for file I/O.

In GEOS-Chem v11-01e, we have taken steps to reduce the number of times each GEOS-FP or MERRA-2 netCDF file is opened. This should reduce

1. We added several new global module variables for the netCDF file ID's to the top of GeosCore/geosfp_read_mod.F90 and GeosCore/merra2_read_mod.F90:
     ! netCDF file ID's
     INTEGER :: fA1     = -1
     INTEGER :: fA3cld  = -1
     INTEGER :: fA3dyn  = -1
     INTEGER :: fA3mstC = -1
     INTEGER :: fA3mstE = -1
     INTEGER :: fI3_1   = -1
     INTEGER :: fI3_2   = -1
2 In both GeosCore/geosfp_read_mod.F90 and GeosCore/merra2_read_mod.F90, reorganized routines that read netCDF data files from disk according to the following template:
     SUBROUTINE GeosFp_Read_A1( YYYYMMDD, HHMMSS, Input_Opt, State_Met )
       . . . 

       NOTE: added this line:
       LOGICAL, SAVE      :: first    = .TRUE.  ! First time reading data?
                
       . . .
 
       NOTE: Moved this code up front
       ! Find the proper time-slice to read from disk
       time_index = ( HHMMSS / 10000 ) + 1

       ! Stop w/ error if the time index is invalid
       IF ( time_index < 1 .or. time_index > 24 ) THEN
          WRITE( 6, 100 ) time_index
    100   FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 24!' )
          CALL Error_Stop( errMsg, caller )
       ENDIF
 
       . . .        

       NOTE: Put this code in an IF block:
       IF ( time_index == 1 .or. first ) THEN 
          . . . 
   
          ! Open netCDF file
          CALL NcOp_Rd( fA1, TRIM( nc_file ) )
       
          ! Read the dimensions from the netCDF file
          CALL NcGet_DimLen( fA1, 'lon',   X )
          CALL NcGet_DimLen( fA1, 'lat',   Y )
          CALL NcGet_DimLen( fA1, 'time',  T )

          ! Make sure the dimensions of the file are valid
          CALL Check_Dimensions( lon=X,            lat=Y,        time=T,  &
                                 time_expected=24, caller=caller         )

          NOTE: added this line:
          ! Reset first-time flag
          first = .FALSE.
       ENDIF

       . . .

       NOTE: Use one of the module variables for the netCDF file ID.
       ! Read ALBEDO
       v_name = "ALBEDO"
       CALL NcRd( Q, fA1, TRIM(v_name), st3d, ct3d )
       State_Met%ALBD = Q

       . . . read other met fields from disk . . .

       NOTE: Close the file on the last timestep
       ! If it's the last time slice, then close the netCDF file
       ! and set the file ID to -1 to indicate that it's closed.
       IF ( time_index == 24 ) THEN
          CALL NcCl( fA1 )
          fA1 = -1
       ENDIF
and we do the same for all of the other file-reading routines in the both modules.
3. We added subroutine Cleanup_GeosFp_Read to the end of GeosCore/geosfp_read_mod.F90. This subroutine will be called from the CLEANUP routine at the end of a simulation to close any netCDF files that may still be open. This can happen if a simulation ends in the middle of a day.
     SUBROUTINE Cleanup_GeosFp_Read()
       . . .
       !=======================================================================
       ! Close any netCDF file ID's that are still open
       !=======================================================================
       IF ( fA1 > 0 ) THEN
          CALL NcCl( fA1 )
          WRITE( 6, 100 ) 'A1    '
       ENDIF

       IF ( fA3cld > 0 ) THEN
          CALL NcCl( fA3cld  )
          WRITE( 6, 100 ) 'A3cld '
       ENDIF

       IF ( fA3dyn > 0 ) THEN
          CALL NcCl( fA3dyn  )
          WRITE( 6, 100 ) 'A3dyn '
       ENDIF
 
       IF ( fA3mstC > 0 ) THEN
          CALL NcCl( fA3mstC )
          WRITE( 6, 100 ) 'A3mstC'
       ENDIF
   
       IF ( fA3mstE > 0 ) THEN
          CALL NcCl( fA3mstE )
          WRITE( 6, 100 ) 'A3mstE'
       ENDIF

       IF ( fI3_1 > 0 ) THEN
          CALL NcCl( fI3_1   )
          WRITE( 6, 100 ) 'I3_1  '
       ENDIF

       IF ( fI3_2 > 0 ) THEN
          CALL NcCl( fI3_2   )
          WRITE( 6, 100 ) 'I3_2  '
       ENDIF

       ! Format strings
   100 FORMAT( '     - Closing the GEOS-FP ', a6, ' file at end of simulation' )

     END SUBROUTINE Cleanup_GeosFp_Read
We also added the corresponding subroutine Cleanup_Merra2_Read to GeosCore/merra2_read_mod.F90.
4. We modified GeosCore/cleanup.F to call the Cleanup_GeosFp_Read and Cleanup_Merra2_Read routines:
     USE GEOSFP_READ_MOD,         ONLY : CLEANUP_GEOSFP_READ
     USE MERRA2_READ_MOD,         ONLY : CLEANUP_MERRA2_READ
     . . .
          ! Close GEOS-FP or MERRA2 met field files that may still be open
   #if defined( GEOS_FP )
         CALL Cleanup_GeosFp_Read()
   #elif defined( MERRA2 )
         CALL Cleanup_Merra2_Read()
   #endif
5. We added geosfp_read_mod.o and merra2_read_mod.o to the dependencies listing in GeosCore/Makefile:
   cleanup.o                   : cleanup.F                                      \
                                 aerosol_mod.o                                  \
                                 . . .
                                 geosfp_read_mod.o       merra2_read_mod.o      \
                                 . . .

--Bob Yantosca (talk) 22:41, 4 December 2015 (UTC)