-
Notifications
You must be signed in to change notification settings - Fork 60
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
base: main
Are you sure you want to change the base?
Conversation
See his e-mail of July 15, 2022
Tag for 2022.04 release
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
…e why this would be needed
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. |
Thanks,
is there a way to know which specific lines are causing the following
warnings:
Error: 2 file(s) contain(s) trailing whitespace
./full/full_coupler_mod.F90
./full/atm_land_ice_flux_exchange.F90
Error: 2 Fortran file(s) contain(s) lines longer than 121 characters
./full/flux_exchange.F90
./full/atm_land_ice_flux_exchange.F90
Thanks
…On Mon, Jan 27, 2025 at 4:37 PM Ryan Mulhall ***@***.***> wrote:
Just want to note that this will need NOAA-GFDL/FMS#1637
<NOAA-GFDL/FMS#1637> merged in first before the
CI will pass, since this depends on the added module.
@fabienpaulot <https://github.com/fabienpaulot> This will need some clean
up to pass the linter before we can merge it. The linter output is here
<https://github.com/NOAA-GFDL/FMScoupler/actions/runs/12997840249/job/36249675286?pr=151>
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.
—
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKAQA46OAKSMC2RW24YIWA32M2RI5AVCNFSM6AAAAABV66GWDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWHE2DQNBSHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@fabienpaulot The linter action only lets us know, but you can use grep to get an exact line number:
for trailing whitespace.
for line lengths |
Thanks for the tip!
…On Mon, Jan 27, 2025 at 5:04 PM Ryan Mulhall ***@***.***> wrote:
@fabienpaulot <https://github.com/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
—
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKAQA46GLPE4IVSWON5FN3L2M2UO5AVCNFSM6AAAAABV66GWDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWHE4TGMZSGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This will need NOAA-GFDL/atmos_drivers#49 (comment) before this can be merged |
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.
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
full/atm_land_ice_flux_exchange.F90
Outdated
PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV | ||
PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV, WTMH2O | ||
|
||
!gex |
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.
The comment should be removed or expanded. It doesn't provide any useful information.
full/atm_land_ice_flux_exchange.F90
Outdated
!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 |
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.
Please make sure all documentation is in doxygen format.
full/atm_land_ice_flux_exchange.F90
Outdated
@@ -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 |
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.
Please document in doxygen format
full/flux_exchange.F90
Outdated
@@ -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 |
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.
Please use doxygen format
full/atm_land_ice_flux_exchange.F90
Outdated
real :: rho | ||
real, dimension(n_xgrid_sfc,n_exch_tr) :: ex_tr_atm, ex_tr_ref |
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.
Please document these new variables in doxygen format
full/atm_land_ice_flux_exchange.F90
Outdated
!deposition velocity at reference height and atmospheric height | ||
real, allocatable, dimension(:,:) :: ex_tr_con_ref, ex_tr_con_atm |
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.
Please switch the documentation to doxygen format. The variables below show an example of the format using !<
for each variable.
full/atm_land_ice_flux_exchange.F90
Outdated
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 |
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.
Please document this variable using a doxygen-format comment
full/atm_land_ice_flux_exchange.F90
Outdated
integer, allocatable :: id_tr_con_atm_land(:), id_tr_con_ref_land(:) | ||
integer, allocatable :: id_tr_con_atm(:), id_tr_con_ref(:) |
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.
Please add doxygen-style documentation for new variables
@thomas-robinson
I think I fixed all instances. Let me know if there are remaining issues.
Fabien
…On Tue, Jan 28, 2025 at 8:44 AM Tom Robinson ***@***.***> wrote:
***@***.**** requested changes on this pull request.
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
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> @@ -72,7 +72,10 @@ module atm_land_ice_flux_exchange_mod
!! FMS
use FMS
use FMSconstants, only: rdgas, rvgas, cp_air, stefan, WTMAIR, HLV, HLF, Radius, &
- PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV
+ PI, CP_OCEAN, WTMCO2, WTMC, EPSLN, GRAV, WTMH2O
+
+!gex
The comment should be removed or expanded. It doesn't provide any useful
information.
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> + !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
Please make sure all documentation is in doxygen format.
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> @@ -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
Please document in doxygen format
------------------------------
In full/flux_exchange.F90
<#151 (comment)>:
> @@ -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
Please use doxygen format
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> + real :: rho
+ real, dimension(n_xgrid_sfc,n_exch_tr) :: ex_tr_atm, ex_tr_ref
Please document these new variables in doxygen format
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> + !deposition velocity at reference height and atmospheric height
+ real, allocatable, dimension(:,:) :: ex_tr_con_ref, ex_tr_con_atm
Please switch the documentation to doxygen format. The variables below
show an example of the format using !< for each variable.
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> 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
Please document this variable using a doxygen-format comment
------------------------------
In full/atm_land_ice_flux_exchange.F90
<#151 (comment)>:
> + integer, allocatable :: id_tr_con_atm_land(:), id_tr_con_ref_land(:)
+ integer, allocatable :: id_tr_con_atm(:), id_tr_con_ref(:)
Please add doxygen-style documentation for new variables
—
Reply to this email directly, view it on GitHub
<#151 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKAQA43TJ5ZUHHDC37PUZJL2M6CVHAVCNFSM6AAAAABV66GWDSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNZYGE4DENZQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@fabienpaulot it looks like there are some issues with line length still |
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 |
full/atm_land_ice_flux_exchange.F90
Outdated
if (associated(Land_boundary%gex_fields)) then | ||
do n_gex=1,n_gex_atm2lnd | ||
call fms_xgrid_get_from_xgrid (Land_boundary%gex_fields(:,:,n_gex), 'LND', ex_gex_atm2lnd(:,n_gex), xmap_sfc) | ||
end do | ||
end if |
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.
Shouldn't this be Land_boundary%gex_atm2lnd
so that it can be consistent with L2493-L2502 above?
That’s right.
I believe that we were not using this “if else bench” in the ESM4.5 which is why I missed it. I pushed the fix
… On Mar 10, 2025, at 7:53 PM, uramirez8707 ***@***.***> wrote:
@uramirez8707 requested changes on this pull request.
In full/atm_land_ice_flux_exchange.F90 <#151 (comment)>:
> + if (associated(Land_boundary%gex_fields)) then
+ do n_gex=1,n_gex_atm2lnd
+ call fms_xgrid_get_from_xgrid (Land_boundary%gex_fields(:,:,n_gex), 'LND', ex_gex_atm2lnd(:,n_gex), xmap_sfc)
+ end do
+ end if
Shouldn't this be Land_boundary%gex_atm2lnd so that it can be consistent with L2493-L2502 above?
—
Reply to this email directly, view it on GitHub <#151 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKAQA42TUM55L7IEGE6FTSD2TX3VLAVCNFSM6AAAAABV66GWDSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNZSGA2DSNZWGU>.
You are receiving this because you were mentioned.
|
if(id_tr_ref_land(tr) > 0) then | ||
call fms_xgrid_get_from_xgrid_ug (diag_land, 'LND', ex_tr_ref(:,tr), xmap_sfc) | ||
!duplicate send_tile_data. We may remove id_q_ref_land in the future. | ||
#ifndef _USE_LEGACY_LAND_ | ||
call send_tile_data (id_tr_ref_land(tr), diag_land) | ||
#else | ||
used = fms_diag_send_tile_averaged_data(id_tr_ref_land(tr), diag_land, & | ||
Land%tile_size, Time, mask=Land%mask) |
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.
This doesn't seem to compile:
/__w/FMScoupler/FMScoupler/t/null.Iu6wiF/src/coupler/full/atm_land_ice_flux_exchange.F90:1873:88:
1873 | call fms_xgrid_get_from_xgrid_ug (diag_land, 'LND', ex_tr_ref(:,tr), xmap_sfc)
| 1
Error: There is no specific subroutine for the generic 'fms_xgrid_get_from_xgrid_ug' at (1)
I don’t know what’s going on.
I had made the changes but they don’t seem to be pushed properly
***@***.*** /gpfs/f5/scratch/Fabien.Paulot/gfdl_b/ESM4/ESM4.5_test/20241002/esm4.5_compile/src/coupler/full % git status
On branch user/f1p/merge_gex_ddep
Your branch is ahead of 'slm/user/f1p/merge_gex_ddep' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
***@***.*** /gpfs/f5/scratch/Fabien.Paulot/gfdl_b/ESM4/ESM4.5_test/20241002/esm4.5_compile/src/coupler/full % git push origin
Everything up-to-date
***@***.*** /gpfs/f5/scratch/Fabien.Paulot/gfdl_b/ESM4/ESM4.5_test/20241002/esm4.5_compile/src/coupler/full %
… On Mar 10, 2025, at 8:38 PM, uramirez8707 ***@***.***> wrote:
@uramirez8707 commented on this pull request.
In full/atm_land_ice_flux_exchange.F90 <#151 (comment)>:
> + if(id_tr_ref_land(tr) > 0) then
+ call fms_xgrid_get_from_xgrid_ug (diag_land, 'LND', ex_tr_ref(:,tr), xmap_sfc)
+ !duplicate send_tile_data. We may remove id_q_ref_land in the future.
+#ifndef _USE_LEGACY_LAND_
+ call send_tile_data (id_tr_ref_land(tr), diag_land)
+#else
+ used = fms_diag_send_tile_averaged_data(id_tr_ref_land(tr), diag_land, &
+ Land%tile_size, Time, mask=Land%mask)
This doesn't seem to compile:
/__w/FMScoupler/FMScoupler/t/null.Iu6wiF/src/coupler/full/atm_land_ice_flux_exchange.F90:1873:88:
1873 | call fms_xgrid_get_from_xgrid_ug (diag_land, 'LND', ex_tr_ref(:,tr), xmap_sfc)
| 1
Error: There is no specific subroutine for the generic 'fms_xgrid_get_from_xgrid_ug' at (1)
—
Reply to this email directly, view it on GitHub <#151 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKAQA432R67EPUOQLBCA4C32TYA5HAVCNFSM6AAAAABV66GWDSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNZSGE2DKMZSGY>.
You are receiving this because you were mentioned.
|
@fabienpaulot Let me know if your still running into issues merging, me or someone else from our team should be able to help out. There was a commit added here that might be missing on your local branch, so you might need to pull in the remote branch ( |
Hello, I am on leave so this will either have to wait or msd can take a look
Thanks
Get BlueMail for Android
…On Mar 12, 2025, 4:48 PM, at 4:48 PM, Ryan Mulhall ***@***.***> wrote:
rem1776 left a comment (NOAA-GFDL/FMScoupler#151)
@fabienpaulot Let me know if your still running into issues merging, me
or someone else from our team should be able to help out. There was a
commit added here that might be missing on your local branch, so you
might need to pull in the remote branch (`git pull origin
user/f1p/merge_gex_ddep`) before committing.
--
Reply to this email directly or view it on GitHub:
#151 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
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)