Skip to content

DOCUMENTATION: atm_land_ice_flux_exchange_mod#175

Open
mlee03 wants to merge 31 commits intoNOAA-GFDL:mainfrom
mlee03:doc/atm-land-ice-flux-exchange
Open

DOCUMENTATION: atm_land_ice_flux_exchange_mod#175
mlee03 wants to merge 31 commits intoNOAA-GFDL:mainfrom
mlee03:doc/atm-land-ice-flux-exchange

Conversation

@mlee03
Copy link
Copy Markdown
Contributor

@mlee03 mlee03 commented Feb 11, 2026

This PR adds in additional code documentation for atm_land_ice_flux_exchange_mod. This PR depends on PR #174

@mlee03 mlee03 marked this pull request as ready for review March 24, 2026 19:19
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
@mlee03 mlee03 requested a review from rem1776 March 24, 2026 19:27
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
id_co2_atm_dvmr, &
!< diag_manager register field id for 'co2 dry volume mixing ratio at lowest atmospheric level'
id_co2_surf_dvmr, & !< diag_manager register field id for 'c02 dry volume mixing ratio at surface'
! 2017/08/15 jgj added
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Every line of code is added by someone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean, no need to keep initials of people in all over the code.

Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
!$OMP parallel do default(none) shared(isc,iec,jsc,jec,Land_Ice_Atmos_Boundary ) &
!$OMP private(is,ie)

!> ON THE ATM GRID, COMPUTE T**0.25
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's worth adding a comment here as to why we "put" T^4 to exchange grid and then raising what we "get" to power 1/4 as it seems a curious/wasteful thing to do. The comment would be something like:

land_ice_atmos_boundary_type%t is supposed to be the radiative (black body) temperature of the surface which is defined to be T=(longwave_flux / Stefan's Constant)^(1/4). To account for this nonlinear dependence, we put/get T^4 to/from the exchange grid then calculate its 1/4 power to get the black body temperature (Stefan's constant cancels out).
If we just put/get the surface temperature to/from the exchange grid, we would not have accounted for the nonlinearity of Stefan's law.
Note that the get_from_xgrid operation involves area-weighted averaging over the exchange grid cells that cover the receving ATM grid cell and avg(T^4) generally differs substantially from (avg T)^4.

Copy link
Copy Markdown
Contributor Author

@mlee03 mlee03 Apr 2, 2026

Choose a reason for hiding this comment

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

How about:
!! NOTE, TO COMPUTE FLUXES, T_SURF**4 IS SENT TO THE EXCHANGE GRID AND NOT T_SURF DUE TO NONLINEARITY IN
!! THE STEFAN-BOLTZMANN LAW WHERE LOGWAVE_FLUX = STEFAN_BOLTZMANN _CONSTANT * T**4.
!! ON THE EXCHANGE GRID, AS QUANTITIES ARE REMAPPED, FIELDS ARE AREA-WEIGHTED (AVERAGED)
!! SUCH THAT OUTPUT_TEMPERATURE = SUM(INPUT_TEMPERATURE * (XGRID_AREA)/(INPUT_GRID_AREA))
!! WHERE THE SUM IS OVER ALL XGRID CELLS THAT OVERLAP WITH THE OUTPUT CELL.
!! BECAUSE OF THIS WEIGHTING, THE COMPUTED FLUX WOULD DIFFER FROM USING <T**4> VS **4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, I did a little edit:

!! NOTE, TO COMPUTE LONGWAVE RADIATION FLUXES MORE ACCURATELY, T_SURF4 IS PUT TO THE EXCHANGE GRID RATHER THAN T_SURF, TO ACCOUNT FOR THE NONLINEARITY IN
!! THE STEFAN-BOLTZMANN LAW WHERE LOGWAVE_FLUX = STEFAN_BOLTZMANN _CONSTANT * T
4.
!! ON THE EXCHANGE GRID, AS QUANTITIES ARE REMAPPED, FIELDS ARE AREA-WEIGHTED (AVERAGED)
!! SUCH THAT OUTPUT_TEMPERATURE = SUM(INPUT_TEMPERATURE * (XGRID_AREA)/(INPUT_GRID_AREA))
!! WHERE THE SUM IS OVER ALL XGRID CELLS THAT OVERLAP WITH THE OUTPUT CELL.
!! BECAUSE OF THIS WEIGHTING, THE COMPUTED FLUX WOULD DIFFER FROM USING <T**4> VS **4 .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think something is wrong with this viewer, it does not like '**' . The last bit should be VS ' **4'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, did not work , but you know what I mean.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changes added. What do you think?

Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
Comment thread full/atm_land_ice_flux_exchange.F90 Outdated
@nikizadehgfdl
Copy link
Copy Markdown
Contributor

Thanks. Looks fine. Please make sure both fully coupled and ocean-ice models compile and run before merging.

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.

2 participants