8000 User/f1p/merge gex ddep by fabienpaulot · Pull Request #1637 · NOAA-GFDL/FMS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

User/f1p/merge gex ddep #1637

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

Merged
merged 25 commits into from
Feb 27, 2025
Merged

Conversation

fabienpaulot
Copy link
Contributor
@fabienpaulot fabienpaulot commented Jan 27, 2025

Description

Update to add
a) ability to pass deposition fluxes from the atmosphere to the land (gex)
b) sink of gas/aerosol on land handled by LM4 [increase number of exchanged tracer]

Fixes # (issue)

n/a

How Has This Been Tested?

Tested on gaea (ESM4p5)

Checklist:

  • My code follows the style guidelines of this project
  • [x ] I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@rem1776
Copy link
Contributor
rem1776 commented Jan 27, 2025

@fabienpaulot Thanks for submitting these changes. I think we might need to change the module name to generic_exchange_mod. For FMS we typically follow the <filename>_mod naming scheme for any modules.

After that this will need some more changes to get the build systems working properly since a new module is being added.

For cmake, it would just need the new coupler/generic_exchange.F90 file path added to CMakeLists.txt, along with the other files from that directory:

FMS/CMakeLists.txt

Lines 114 to 116 in 15ec0c7

coupler/atmos_ocean_fluxes.F90
coupler/coupler_types.F90
coupler/ensemble_manager.F90

For autotools, you'll need to edit coupler/Makefile.am. The libcoupler_la_SOURCES will need the new file name added as well, and then MODFILES will need the compiled module output (ie. module <name> in the file), which would be:

generic_exchange_mod.$(FC_MODEXT) \

Once you made the module name change.

Let me know if need help/have any questions, hope this wasn't too confusing.

@fabienpaulot
Copy link
Contributor Author
fabienpaulot commented Jan 27, 2025 via email

@rem1776
Copy link
Contributor
rem1776 commented Jan 27, 2025

Can I change generic_exchange.F90 to gex.F90 instead? This would make my life much easier. Fabien

On Mon, Jan 27, 2025 at 4:27 PM Ryan Mulhall @.> wrote: @fabienpaulot https://github.com/fabienpaulot Thanks for submitting these changes. I think we might need to change the module name to generic_exchange_mod. For FMS we typically follow the _mod naming scheme for any modules. After that this will need some more changes to get the build systems working properly since a new module is being added. For cmake, it would just need the new coupler/generic_exchange.F90 file path added to CMakeLists.txt, along with the other files from that directory:

FMS/CMakeLists.txt

Lines 114 to 116 in 15ec0c7

coupler/atmos_ocean_fluxes.F90
coupler/coupler_types.F90
coupler/ensemble_manager.F90
For autotools, you'll need to edit coupler/Makefile.am. The libcoupler_la_SOURCES will need the new file name added as well, and then MODFILES will need the compiled module output (ie. module in the file), which would be: generic_exchange_mod.$(FC_MODEXT) \ Once you made the module name change. Let me know if need help/have any questions, hope this wasn't too confusing. — Reply to this email directly, view it on GitHub <#1637 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAQA45VKGSIVHLY6V3OHTT2M2QCDAVCNFSM6AAAAABV6IKIECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWHEZDSOJVGU . You are receiving this because you were mentioned.Message ID: @.>

Yeah that works too! As long as it follows the convention it should be fine.

@fabienpaulot
Copy link
Contributor Author

@rem1776 I think I fixed the space/line length/CMake but it's still failing one check

@rem1776
Copy link
Contributor
rem1776 commented Feb 3, 2025

@rem1776 I think I fixed the space/line length/CMake but it's still failing one check

Looks like its just failing the autotools build from a file dependency. I think to fix it, you would have to make this change in the top level Makefile.am:
main...rem1776:FMS:pr1637#diff-0462e381b2fb3286568215681c8983490a37ac9ae0f0c5ee304df7fa6426d4af

Needs to have tracer_manager before coupler in the SUBDIRS list so the module dependency is satisfied.

…so the module dependency is satisfied per Ryan's recommendation
@fabienpaulot
Copy link
Contributor Author
fabienpaulot commented Feb 3, 2025 via email

Copy link
Member
@thomas-robinson thomas-robinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please make sure that the doxygen style is followed for the module, module variables, subroutines, and subroutine variables. Please make sure documentation style is consistent with other modules in this repository (ie. remove the !######s that are around routine documentation.) An example can be found here https://github.com/NOAA-GFDL/FMS/blob/main/field_manager/fm_yaml.F90
  2. New modules and routines should be prefixed with fms_coupler_gex_. This is consistent with the modernized approach in FMS. The filename should be fms_coupler_gex.F90.
  3. The public routines need to be added to libFMS.F90 and made public through that interface. That's how they should be accessed in the FMScoupler also (through use FMS)
  4. The new file needs the LGPL licence header.

fabienpaulot and others added 9 commits February 3, 2025 12:59
@fabienpaulot
Copy link
Contributor Author

@J-Lentz test seems to be failing. Could you please take a look. Thanks

Jesse Lentz added 2 commits February 25, 2025 16:19
If FMS is built without YAML support, then the gex unit test based on a YAML
field table should be skipped.
@J-Lentz
Copy link
Contributor
J-Lentz commented Feb 25, 2025

I've pushed the necessary changes to my gex_unit_tests branch:

  • gex_get_index needs to check if the record argument is present before accessing its value: J-Lentz@8601489
  • The unit test based on a YAML field table needs to be skipped when FMS is built without YAML support: J-Lentz@e7961fb

Copy link
Contributor
@uramirez8707 uramirez8707 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Just one final thing :D

Thanks for the documentation!

@fabienpaulot
Copy link
Contributor Author
fabienpaulot commented Feb 26, 2025 via email

Copy link
Contributor
@rem1776 rem1776 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rem1776 rem1776 merged commit 8a6487c into NOAA-GFDL:main Feb 27, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0