Develop new CLM / MEGANv2.1 interface#1425
Conversation
…eeded modifications to use the MEGANv2.1-enabled CLM model, and which should be needed in later releases of WRF, for the most part. Subroutines in phys compute the emission rates, while chemistry / transport are handled in the SAPRC99_KPP package.
Resolved conflicts by retaining both sets of dimensions in Registry/registry.dimspec,
and both sets of lsm package modifications in Registry/registry.dimspec. In
chem/module_ftuv_driver.F, implemented bug fix in loop index bounds, but kept
commented for now. In module_dep_simple.F, merged in use of param_first_scalar.
Merge branch 'v3.8.1_newclmmin' into develop_newclmmin
Conflicts:
Registry/Registry.EM_COMMON
Registry/registry.dimspec
chem/module_dep_simple.F
chem/module_ftuv_driver.F
…e, so the declaration in the new MEGANv2. 1 CLM package under SAPRC99 is redundant and causes a compilation error. So the declaration under SAPRC99 has been r emoved.
… it needed
to be removed from the new MEGANv2.1-CLM section.
4.1.2. Merge branch 'develop' into develop_newclmmin
…E_CLM_ACCUM preprocessor option.
this version. Merge branch 'v3.8.1_newclmmin' into develop_newclmmin
another minor ifdef
nmm - update NMM registry for num_pft, add arguments to surface driver call from NMM, change others to optional
…into develop+clm Changes to be committed: modified: Registry/Registry.EM_COMMON modified: Registry/Registry.NMM modified: Registry/registry.chem modified: Registry/registry.clm modified: Registry/registry.dimspec modified: chem/KPP/mechanisms/saprc99/saprc99.eqn modified: chem/KPP/mechanisms/saprc99/saprc99.spc modified: chem/chem_driver.F modified: chem/chemics_init.F modified: chem/emissions_driver.F modified: chem/module_dep_simple.F modified: chem/module_emissions_anthropogenics.F modified: chem/module_ftuv_driver.F modified: dyn_em/module_first_rk_step_part1.F modified: dyn_em/start_em.F modified: dyn_nmm/module_PHYSICS_CALLS.F modified: frame/module_driver_constants.F modified: phys/module_physics_init.F modified: phys/module_sf_clm.F modified: phys/module_surface_driver.F modified: share/module_check_a_mundo.F
modified: phys/module_sf_clm.F
|
This is intended to replace #932 "Develop new CLM / MEGANv2.1 interface" |
|
@jordanschnell @brigaudet |
This is the line that we want to address in the PR commit message. |
|
jenkins |
|
@jordanschnell |
Brian, |
What happens if you set input_pft = true, AND you do not have the new field? |
| state real FSD240 i4j misc 1 Z rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "FSD240" "10D DIRECT SOLAR RADIATION" "W m-2" | ||
| state real FSI24 i4j misc 1 Z rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "FSI24" "24H INDIRECT SOLAR RADIATION" "W m-2" | ||
| state real FSI240 i4j misc 1 Z rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "FSI240" "10D INDIRECT SOLAR RADIATION" "W m-2" | ||
| state real LAIP i4j misc 1 Z rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "LAIP" "PRIOR TIMESTEP LEAF AREA INDEX" "area/area" |
There was a problem hiding this comment.
@brigaudet Can you see if you can package these new arrays (with a new PR)? Thanks.
|
Hi Dave I heard MEGAN V2.1 is the last version of MEGAN. |
|
@jordanschnell @brigaudet Do you think you can provide a quick answer to this question? |
|
Hello -- to try to answer your questions: 1) MEGANv2.1 is the latest version of MEGAN that was implemented in WRF. More recent developments to MEGAN are being performed elsewhere but have not been ported to my knowledge; 2) bio_emiss_opt=3 uses MEGANv2 but is structured quite differently (most of the relevant subroutines are in the chemistry). In theory bio_emiss_opt=4 should work with WRF-Chem version 3.9.1.1 since it was initially incorporated there pre-pull request. But since 3.91.1. is prior to what was in the original MEGANv2.1 pull request, you would have to do some hand porting / merging. |
|
Hi Dave, Regarding the term below:
When I run the wrf-chem v4.5 with clm-megan2.1 coupling, the error occurs like below (rsl.out.0000);megan_factors_file clminit: B4 call to megan_factors_init
|
Hello dear @brigaudet and Dave; Thank you very much for your kind reply. Yours Sincerely, |
TYPE: new feature
KEYWORDS: CLM surface scheme, MEGANv2.1 biogenic emissions
SOURCE: Brian Gaudet (PNNL)
DESCRIPTION OF CHANGES:
The CLM surface scheme and associated subroutines in the physics and chemistry packages were modified to be
made consistent with the MEGANv2.1 biogenic emission model, as opposed to earlier code which uses MEGANv2.0.
This upgrade to WRF-CLM parallels the use of MEGANv2.1 in CLM4.0, as described in Guenther et al. (2012, GMD).
Within module_sf_clm.F, the emissions for 150 species are computed, and then mapped to the chemistry packages
(e.g., SARPC99) in WRF-Chem. Emissions are a function of plant functional type (PFT) and emission factors that
depend on temperature, light, and LAI.
Among the key changes to module_sf_clm.F are:
* a MEGANv2.1 emissions factor file containing standard emissions as a function of PFT and 20 classes of compounds
is read in
* new modules for handling the MEGAN categories are created (and the use of these modules by other modules
necessitated the re-ordering of the subroutines in the source file)
* the environmental emissions factors are tracked through running averaged variables
* PFTs can now be determined from a geographical mapping in the wrfinput file rather than from an internal
vegetation type-based table - the code is looking for a variable of name 'PCT_PFT' in the wrfinput file; it is up to
the user to use external software to insert the variable containing the percentages for each CLM PFT
* mappings of MEGAN species to WRF-Chem species packages are included.
An option ('bio_emiss_opt = 4') to invoke MEGANv2.1 biogenic emissions is included in the `&chem` namelist section;
the user retains the option of using old MEGAN emissions (`bio_emiss_opt = 3`). When a user runs the new CLM but
without selecting `bio_emiss_opt = 4`, the old CLM method of mapping land use to PFTs is used, in order to reproduce
the meteorology of previous versions of the model.
LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M Registry/Registry.NMM
M Registry/registry.chem
M Registry/registry.clm
M Registry/registry.dimspec
M chem/KPP/mechanisms/saprc99/saprc99.eqn
M chem/KPP/mechanisms/saprc99/saprc99.spc
M chem/chem_driver.F
M chem/chemics_init.F
M chem/emissions_driver.F
M chem/module_dep_simple.F
M chem/module_emissions_anthropogenics.F
M chem/module_ftuv_driver.F
M dyn_em/module_first_rk_step_part1.F
M dyn_em/start_em.F
M. dyn_nmm/module_PHYSICS_CALLS.F
M frame/module_driver_constants.F
M phys/module_physics_init.F
M phys/module_sf_clm.F
M phys/module_surface_driver.F
M share/module_check_a_mundo.F
TESTS CONDUCTED:
1. Jenkins testing is OK.
2. Tests with the changes merged into the develop branch reproduced the meteorology of the pure develop branch
when bio_emiss_opt = 4 _was not_ selected.
3. When bio_emiss_opt = 4 _was_ selected, the meteorology and emissions of PNNL reference simulations was
reproduced.
4. Tests of code merged with the up-to-moment version of develop are pending.
Examples of a meteorological tests and a chemistry test are attached.



RELEASE NOTE: The CLM surface scheme and associated subroutines in the physics and chemistry packages have been modified to be made consistent with the MEGANv2.1 biogenic emission model, as opposed to earlier code which used MEGANv2.0. This upgrade to WRF-CLM parallels the use of MEGANv2.1 in CLM4.0, as described in Guenther et al. (2012, GMD). Within module_sf_clm.F, the emissions for 150 species are computed, and then mapped to the chemistry packages
(e.g., SARPC99) in WRF-Chem. Emissions are a function of plant functional type (PFT) and emission factors that depend on temperature, light, and LAI.
|
Dear @davegill and @brigaudet. Thank you very much for your contribution to the PR. After several attempts, I haven’t been able to produce a file that the code accepts as |
TYPE: new feature
KEYWORDS: CLM surface scheme, MEGANv2.1 biogenic emissions
SOURCE: Brian Gaudet (PNNL)
DESCRIPTION OF CHANGES:
The CLM surface scheme and associated subroutines in the physics and chemistry packages were modified to be made consistent with the MEGANv2.1 biogenic emission model, as opposed to earlier code which uses MEGANv2.0. This upgrade to WRF-CLM parallels the use of MEGANv2.1 in CLM4.0, as described in Guenther et al. (2012, GMD). Within module_sf_clm.F, the emissions for 150 species are computed, and then mapped to the chemistry packages (e.g., SARPC99) in WRF-Chem. Emissions are a function of plant functional type (PFT) and emission factors that depend on temperature, light, and LAI.
Among the key changes to module_sf_clm.F are:
An option ('bio_emiss_opt = 4') to invoke MEGANv2.1 biogenic emissions is included in the
&chemnamelist section; the user retains the option of using old MEGAN emissions (bio_emiss_opt = 3). When a user runs the new CLM but without selectingbio_emiss_opt = 4, the old CLM method of mapping land use to PFTs is used, in order to reproduce the meteorology of previous versions of the model.LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M Registry/Registry.NMM
M Registry/registry.chem
M Registry/registry.clm
M Registry/registry.dimspec
M chem/KPP/mechanisms/saprc99/saprc99.eqn
M chem/KPP/mechanisms/saprc99/saprc99.spc
M chem/chem_driver.F
M chem/chemics_init.F
M chem/emissions_driver.F
M chem/module_dep_simple.F
M chem/module_emissions_anthropogenics.F
M chem/module_ftuv_driver.F
M dyn_em/module_first_rk_step_part1.F
M dyn_em/start_em.F
M. dyn_nmm/module_PHYSICS_CALLS.F
M frame/module_driver_constants.F
M phys/module_physics_init.F
M phys/module_sf_clm.F
M phys/module_surface_driver.F
M share/module_check_a_mundo.F
TESTS CONDUCTED:
Examples of a meteorological tests and a chemistry test are attached.
RELEASE NOTE: The CLM surface scheme and associated subroutines in the physics and chemistry packages have been modified to be made consistent with the MEGANv2.1 biogenic emission model, as opposed to earlier code which used MEGANv2.0. This upgrade to WRF-CLM parallels the use of MEGANv2.1 in CLM4.0, as described in Guenther et al. (2012, GMD). Within module_sf_clm.F, the emissions for 150 species are computed, and then mapped to the chemistry packages
(e.g., SARPC99) in WRF-Chem. Emissions are a function of plant functional type (PFT) and emission factors that depend on temperature, light, and LAI.