-
Notifications
You must be signed in to change notification settings - Fork 19
Add dry and wet deposition processes #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lwcugb
wants to merge
41
commits into
ufs-community:develop
Choose a base branch
from
lwcugb:feature/cc_restructure
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d65465b
update process generator to compile seasalt process
lwcugb ea7674c
Merge branch 'feature/cc_restructure' of https://github.com/bbakernoa…
lwcugb 4f3df14
fix core test
lwcugb 6a8e986
update generator for test creation
lwcugb 29f024d
update generator
lwcugb 18b3135
update integration test of the generator.
lwcugb 36f3012
update generation of process integration test
lwcugb 706e56d
update generator for integration test
lwcugb 88995d2
Merge branch 'feature/cc_restructure' of https://github.com/bbakernoa…
lwcugb c9e4bc9
update core test files
lwcugb 540dd24
update generator
lwcugb 7346a23
add emission mapping to ConfigManager
lwcugb e8fde6f
update API module
lwcugb b718cc4
API file update
lwcugb 387affe
delete temp files
lwcugb e3e7258
update nuopc cap
lwcugb cb56a74
update NUOPC cap
lwcugb 0dc6f86
Fix ifort compiling error
lwcugb 19fd283
update nuopc layer
lwcugb d02647f
update nuopc layer
lwcugb f18b126
emission mapping read bug fix
lwcugb 27a9187
update generator for drydep
lwcugb 64e1d9a
update generator for drydep
lwcugb c5b872d
add wetdep process
lwcugb 9130454
update wetdep
lwcugb 94423d0
Merge branch 'ufs_develop' into feature/cc_restructure
lwcugb 2ed9d75
clean some files
lwcugb 309067d
fix some edge conditions for drydep
lwcugb a4793c6
bug fix integration tests
lwcugb 39613f9
bug fix for integration test
lwcugb 7460e73
update generator
lwcugb 0d9fa2e
trimming some files
lwcugb e5775fa
bug fix
lwcugb 244ecaa
fix unit conversion
lwcugb c26b2c0
unit conversion fix
lwcugb 4a20517
start adding settling process
lwcugb 1bbb353
update settling process
lwcugb 8c8a2b8
update settling process
lwcugb c1f5c29
Merge branch 'develop' into feature/cc_restructure
bbakernoaa 12df911
reverse the time stamp changes
lwcugb ab150c6
remove scheme copy files
lwcugb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,267 @@ | ||
| # DryDep Process | ||
|
|
||
| **Process Type:** Deposition | ||
| **Description:** Process for computing dry deposition of gas and aerosol species | ||
| **Author:** Wei Li | ||
| **Generated:** 2025-11-25T22:20:02.547522 | ||
|
|
||
| ## Overview | ||
|
|
||
| The DryDep process implements Process for computing dry deposition of gas and aerosol species. This process provides a modular, extensible framework for deposition calculations within the CATChem chemical transport model. | ||
|
|
||
| ## Available Schemes | ||
|
|
||
| ### WESELY Scheme | ||
|
|
||
| **Name:** `wesely` | ||
| **Description:** Wesely 1989 gas dry deposition scheme | ||
| **Author:** Wei Li | ||
| **Reference:** Wesely, M. L. [1989] Parameterization of surface resistances to gaseous dry deposition... | ||
| #### Parameters | ||
|
|
||
| | Parameter | Default | Range | Description | | ||
| |-----------|---------|--------|-------------| | ||
| | `scale_factor` | 1.0 | - | DryDep velocity scale factor | | ||
| | `co2_effect` | True | - | Apply CO2 effect on stomatal conductance | | ||
| | `co2_level` | 600.0 | - | Ambient CO2 level for stomatal conductance adjustment | | ||
| | `co2_reference` | 380.0 | - | Reference CO2 level for stomatal conductance adjustment | | ||
|
|
||
| #### Required Meteorological Fields | ||
|
|
||
| - `USTAR` - Meteorological field required for scheme computation | ||
| - `TSTEP` - Meteorological field required for scheme computation | ||
| - `TS` - Meteorological field required for scheme computation | ||
| - `SWGDN` - Meteorological field required for scheme computation | ||
| - `SUNCOSmid` - Meteorological field required for scheme computation | ||
| - `OBK` - Meteorological field required for scheme computation | ||
| - `CLDFRC` - Meteorological field required for scheme computation | ||
| - `BXHEIGHT` - Meteorological field required for scheme computation | ||
| - `Z0` - Meteorological field required for scheme computation | ||
| - `PS` - Meteorological field required for scheme computation | ||
| - `FRLAI` - Meteorological field required for scheme computation | ||
| - `ILAND` - Meteorological field required for scheme computation | ||
| - `SALINITY` - Meteorological field required for scheme computation | ||
| - `FRLANDUSE` - Meteorological field required for scheme computation | ||
| - `TSKIN` - Meteorological field required for scheme computation | ||
| - `LON` - Meteorological field required for scheme computation | ||
| - `LAT` - Meteorological field required for scheme computation | ||
| - `LUCNAME` - Meteorological field required for scheme computation | ||
| - `IsSnow` - Meteorological field required for scheme computation | ||
| - `IsIce` - Meteorological field required for scheme computation | ||
| - `IsLand` - Meteorological field required for scheme computation | ||
|
|
||
|
|
||
| ### GOCART Scheme | ||
|
|
||
| **Name:** `gocart` | ||
| **Description:** GOCART-2G aerosol dry deposition scheme | ||
| **Author:** Wei Li & Lacey Holland | ||
| **Reference:** Allison et al. [2024] Benchmarking GOCART-2G in GEOS | ||
| #### Parameters | ||
|
|
||
| | Parameter | Default | Range | Description | | ||
| |-----------|---------|--------|-------------| | ||
| | `scale_factor` | 1.0 | - | Dry deposition velocity scale factor | | ||
| | `resuspension` | False | - | Apply resuspension for dry deposition | | ||
|
|
||
| #### Required Meteorological Fields | ||
|
|
||
| - `USTAR` - Meteorological field required for scheme computation | ||
| - `TSTEP` - Meteorological field required for scheme computation | ||
| - `T` - Meteorological field required for scheme computation | ||
| - `AIRDEN` - Meteorological field required for scheme computation | ||
| - `Z` - Meteorological field required for scheme computation | ||
| - `LWI` - Meteorological field required for scheme computation | ||
| - `PBLH` - Meteorological field required for scheme computation | ||
| - `HFLUX` - Meteorological field required for scheme computation | ||
| - `Z0H` - Meteorological field required for scheme computation | ||
| - `U10M` - Meteorological field required for scheme computation | ||
| - `V10M` - Meteorological field required for scheme computation | ||
| - `FRLAKE` - Meteorological field required for scheme computation | ||
| - `GWETTOP` - Meteorological field required for scheme computation | ||
|
|
||
|
|
||
| ### ZHANG Scheme | ||
|
|
||
| **Name:** `zhang` | ||
| **Description:** Zhang et al. [2001] scheme with Emerson et al. [2020] updates | ||
| **Author:** Wei Li | ||
| **Reference:** Zhang et al., 2001; Emerson et al., 2020 | ||
| #### Parameters | ||
|
|
||
| | Parameter | Default | Range | Description | | ||
| |-----------|---------|--------|-------------| | ||
| | `scale_factor` | 1.0 | - | Dry deposition velocity scale factor | | ||
|
|
||
| #### Required Meteorological Fields | ||
|
|
||
| - `USTAR` - Meteorological field required for scheme computation | ||
| - `TSTEP` - Meteorological field required for scheme computation | ||
| - `TS` - Meteorological field required for scheme computation | ||
| - `OBK` - Meteorological field required for scheme computation | ||
| - `BXHEIGHT` - Meteorological field required for scheme computation | ||
| - `Z0` - Meteorological field required for scheme computation | ||
| - `RH` - Meteorological field required for scheme computation | ||
| - `PS` - Meteorological field required for scheme computation | ||
| - `U10M` - Meteorological field required for scheme computation | ||
| - `V10M` - Meteorological field required for scheme computation | ||
| - `FRLANDUSE` - Meteorological field required for scheme computation | ||
| - `ILAND` - Meteorological field required for scheme computation | ||
| - `LUCNAME` - Meteorological field required for scheme computation | ||
| - `IsSnow` - Meteorological field required for scheme computation | ||
| - `IsIce` - Meteorological field required for scheme computation | ||
|
|
||
|
|
||
|
|
||
| ## Process Interface | ||
|
|
||
| ### Species | ||
|
|
||
| The drydep process operates on the following chemical species: | ||
|
|
||
|
|
||
| ### Required Inputs | ||
|
|
||
|
|
||
|
|
||
| ### Process Diagnostics | ||
|
|
||
| | Diagnostic | Units | Description | | ||
| |------------|-------|-------------| | ||
| | `drydep_con_per_species` | ug/kg or ppm | Dry deposition concentration per species | | ||
| | `drydep_velocity_per_species` | m/s | Dry deposition velocity | | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Basic Integration | ||
|
|
||
| ```fortran | ||
| use DryDepProcessCreator_Mod | ||
| use DryDepCommon_Mod | ||
|
|
||
| ! Create process instance | ||
| type(DryDepProcess_t) :: process | ||
| call create_drydep_process(process, config_data) | ||
|
|
||
| ! Use process in model time step | ||
| call process%run(state, dt) | ||
| ``` | ||
|
|
||
| ### Scheme Selection | ||
|
|
||
| The process supports multiple schemes. Select your desired scheme: | ||
|
|
||
| ```fortran | ||
| ! Use WESELY scheme | ||
| process%scheme_name = "wesely" | ||
| ``` | ||
| ```fortran | ||
| ! Use GOCART scheme | ||
| process%scheme_name = "gocart" | ||
| ``` | ||
| ```fortran | ||
| ! Use ZHANG scheme | ||
| process%scheme_name = "zhang" | ||
| ``` | ||
|
|
||
| ## Implementation Details | ||
|
|
||
| ### Pure Science Kernels | ||
|
|
||
| Each scheme is implemented as a pure science kernel with no infrastructure dependencies: | ||
|
|
||
| ```fortran | ||
| ! WESELY scheme | ||
| pure subroutine compute_wesely( & | ||
| num_layers, num_species, params, & | ||
| USTAR, & TSTEP, & TS, & SWGDN, & SUNCOSmid, & OBK, & CLDFRC, & BXHEIGHT, & Z0, & PS, & FRLAI, & ILAND, & SALINITY, & FRLANDUSE, & TSKIN, & LON, & LAT, & LUCNAME, & IsSnow, & IsIce, & IsLand, & | ||
| species_conc, emission_flux) | ||
| ``` | ||
| ```fortran | ||
| ! GOCART scheme | ||
| pure subroutine compute_gocart( & | ||
| num_layers, num_species, params, & | ||
| USTAR, & TSTEP, & T, & AIRDEN, & Z, & LWI, & PBLH, & HFLUX, & Z0H, & U10M, & V10M, & FRLAKE, & GWETTOP, & | ||
| species_conc, emission_flux) | ||
| ``` | ||
| ```fortran | ||
| ! ZHANG scheme | ||
| pure subroutine compute_zhang( & | ||
| num_layers, num_species, params, & | ||
| USTAR, & TSTEP, & TS, & OBK, & BXHEIGHT, & Z0, & RH, & PS, & U10M, & V10M, & FRLANDUSE, & ILAND, & LUCNAME, & IsSnow, & IsIce, & | ||
| species_conc, emission_flux) | ||
| ``` | ||
|
|
||
| ### Host Model Responsibilities | ||
|
|
||
| The host model (CATChem infrastructure) handles: | ||
|
|
||
| - Parameter initialization and validation | ||
| - Input array validation and error handling | ||
| - Memory management and array allocation | ||
| - Integration with model time stepping | ||
| - Diagnostic output management | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### YAML Configuration Example | ||
|
|
||
| ```yaml | ||
| processes: | ||
| drydep: | ||
| enabled: true | ||
| scheme: "wesely" | ||
| parameters: | ||
| scale_factor: 1.0 | ||
| co2_effect: True | ||
| co2_level: 600.0 | ||
| co2_reference: 380.0 | ||
| diagnostics: | ||
| enabled: true | ||
| output_frequency: "daily" | ||
| ``` | ||
|
|
||
| ## Technical Specifications | ||
|
|
||
| - **Parallelization:** Column | ||
| - **Memory Requirements:** Low | ||
| - **Timestep Dependency:** Independent | ||
| - **Multiphase Support:** No | ||
| - **Size Bin Support:** No | ||
| - **Vectorization:** Supported | ||
|
|
||
| ## Files Generated | ||
|
|
||
| ### Source Code | ||
| - `src/process/drydep/ProcessDryDepInterface_Mod.F90` - Main process interface | ||
| - `src/process/drydep/DryDepCommon_Mod.F90` - Common types and parameters | ||
| - `src/process/drydep/DryDepProcessCreator_Mod.F90` - Process factory | ||
| - `src/process/drydep/schemes/DryDepScheme_WESELY_Mod.F90` - Wesely 1989 gas dry deposition scheme | ||
| - `src/process/drydep/schemes/DryDepScheme_GOCART_Mod.F90` - GOCART-2G aerosol dry deposition scheme | ||
| - `src/process/drydep/schemes/DryDepScheme_ZHANG_Mod.F90` - Zhang et al. [2001] scheme with Emerson et al. [2020] updates | ||
|
|
||
| ### Tests | ||
| - `tests/process/drydep/unit/` - Unit tests | ||
| - `tests/process/drydep/integration/` - Integration tests | ||
|
|
||
| ### Documentation | ||
| - `docs/processes/drydep/drydep.md` - This documentation | ||
|
|
||
| ## Contributing | ||
|
|
||
| When modifying or extending this process: | ||
|
|
||
| 1. **Science Changes:** Modify the scheme modules in `schemes/` | ||
| 2. **Interface Changes:** Update the main interface module | ||
| 3. **New Schemes:** Add new scheme modules and update the creator | ||
| 4. **Tests:** Add corresponding unit and integration tests | ||
| 5. **Documentation:** Update this documentation file | ||
|
|
||
| ## References | ||
|
|
||
| - WESELY: Wesely, M. L. [1989] Parameterization of surface resistances to gaseous dry deposition... | ||
| - GOCART: Allison et al. [2024] Benchmarking GOCART-2G in GEOS | ||
| - ZHANG: Zhang et al., 2001; Emerson et al., 2020 | ||
|
|
||
| --- | ||
| *This documentation was automatically generated by the CATChem Process Generator on 2025-11-25T22:20:02.547522* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of these in the code. Can you remove the files here with small commits like this?
There are 94 files modified in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just reversed the files with only time stamp changes. There are 12 of those files in total, which is less than I thought. The wetdep and settling processes are new, and that is why there are too many file changes in this PR.