Skip to content
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

User/f1p/merge gex ddep #151

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

fabienpaulot
Copy link
Contributor

Modifications to:
a) handle dry deposition on land side
b) fix error in ocean flux diagnostics for vmr tracers (NH3 only in ESM4p5)
c) pass fluxes (not prognostic tracers) between land and atmosphere (gex)

Depends on esm4.5_ddep_gex tag (FMS, atmos_drivers)

slm7826 and others added 13 commits March 30, 2021 21:02
See his e-mail of July 15, 2022
Apparently the subroutine called "get_from_xgrid_land" in older
versions of coupler/xgrid was renamed "get_from_xgrid_ug" in
some update. In this commit few references to the old name that
were left in by merge are fixed to use the new name.
Tag for 2024.01 version 1 of FMScoupler
@rem1776
Copy link
Contributor

rem1776 commented Jan 27, 2025

Just want to note that this will need NOAA-GFDL/FMS#1637 merged in first before the CI will pass, since this depends on the added module.

@fabienpaulot This will need some line length and trailing whitespace clean up to pass the linter before we can merge it. The linter output is here but you can also find it in the checks tab, it'll tell you which files need to have overly long lines or trailing whitespace fixed.

@fabienpaulot
Copy link
Contributor Author

fabienpaulot commented Jan 27, 2025 via email

@rem1776
Copy link
Contributor

rem1776 commented Jan 27, 2025

@fabienpaulot The linter action only lets us know, but you can use grep to get an exact line number:

grep -n " $" <filenames>

for trailing whitespace.

grep -n '.\{120\}' <filenames>

for line lengths

@fabienpaulot
Copy link
Contributor Author

fabienpaulot commented Jan 27, 2025 via email

@fabienpaulot
Copy link
Contributor Author

This will need NOAA-GFDL/atmos_drivers#49 (comment) before this can be merged

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.

Please make sure that all of the variables you add are documented using doxygen. I realize that there are hundreds of undocumented variables, but we request new variables are documented appropriately

PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV
PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV, WTMH2O

!gex
Copy link
Member

Choose a reason for hiding this comment

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

The comment should be removed or expanded. It doesn't provide any useful information.

Comment on lines 250 to 255
!map atm tracers to exchange, ice and land variables
type(tracer_exch_ind_type), allocatable :: tr_table_map(:)
!index of tracers in the array of tracers passed through flux exchange (tr_table)
integer :: isphum = NO_TRACER !< specific humidity
integer :: ico2 = NO_TRACER !< co2 tracer
integer :: inh3 = NO_TRACER !< nh3 tracer
Copy link
Member

Choose a reason for hiding this comment

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

Please make sure all documentation is in doxygen format.

@@ -302,6 +318,7 @@ subroutine atm_land_ice_flux_exchange_init(Time, Atm, Land, Ice, atmos_ice_bound
real, intent(in) :: z_ref_heat_in, z_ref_mom_in
logical, intent(in) :: scale_precip_2d_in
logical, intent(in) :: do_area_weighted_flux_in
logical, intent(in) :: ocn_atm_flux_vmr_bug_in
Copy link
Member

Choose a reason for hiding this comment

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

Please document in doxygen format

@@ -566,10 +566,12 @@ module flux_exchange_mod
!! tfreeze parameter
real, parameter :: tfreeze = 273.15
logical :: scale_precip_2d = .false.
logical :: ocn_atm_flux_vmr_bug = .true. !set to .true. to reproduce old (erroneous) conversion
Copy link
Member

Choose a reason for hiding this comment

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

Please use doxygen format

Comment on lines 726 to 727
real :: rho
real, dimension(n_xgrid_sfc,n_exch_tr) :: ex_tr_atm, ex_tr_ref
Copy link
Member

Choose a reason for hiding this comment

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

Please document these new variables in doxygen format

Comment on lines 223 to 224
!deposition velocity at reference height and atmospheric height
real, allocatable, dimension(:,:) :: ex_tr_con_ref, ex_tr_con_atm
Copy link
Member

Choose a reason for hiding this comment

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

Please switch the documentation to doxygen format. The variables below show an example of the format using !< for each variable.

real, parameter :: tfreeze = 273.15
real, allocatable, dimension(:,:) :: frac_precip

!--- the following is from flux_exchange_nml
real :: z_ref_heat = 2. !< Reference height (meters) for temperature and relative humidity diagnostics
!! (t_ref, rh_ref, del_h, del_q)
real :: z_ref_mom = 10. !< Reference height (meters) for mementum diagnostics (u_ref, v_ref, del_m)
logical :: ocn_atm_flux_vmr_bug
Copy link
Member

Choose a reason for hiding this comment

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

Please document this variable using a doxygen-format comment

Comment on lines 129 to 130
integer, allocatable :: id_tr_con_atm_land(:), id_tr_con_ref_land(:)
integer, allocatable :: id_tr_con_atm(:), id_tr_con_ref(:)
Copy link
Member

Choose a reason for hiding this comment

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

Please add doxygen-style documentation for new variables

@fabienpaulot
Copy link
Contributor Author

fabienpaulot commented Jan 28, 2025 via email

@thomas-robinson
Copy link
Member

@fabienpaulot it looks like there are some issues with line length still

@fabienpaulot
Copy link
Contributor Author

Thanks @thomas-robinson for bearing with me. It looks like I finally passed the linter check.

For my reference, here are the two functions I needed to use:

grep '[[:space:]]$' -n FILENAME
grep -n ".{121}" FILENAME [I was using 120 before]

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.

4 participants