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

Fix GCHPctmEnv small numerical bugs #456

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- Added code to `src/CMakeLists.txt` to build & install the KPP standalone executable when `fullchem` or `custom` mechanisms are selected

### Fixed
- Fixed dry mass flux derivation in GCHPctmEnv when using mass flux imports
- Fixed UpwardsMassFlux sign to make positive represent upwards direction

## [14.5.0] - 2024-11-08
### Added
- Added documentation about GEOS convection change affecting meteorology starting June 1, 2020
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,15 +871,15 @@ subroutine prepare_massflux_exports(IMPORT, EXPORT, PLE, dt, RC)
call MAPL_GetPointer(IMPORT, temp3d_r4, 'MFXC', RC=STATUS)
_VERIFY(STATUS)
if ( correct_mass_flux_for_humidity > 0 ) then
MFX_EXPORT = dble(temp3d_r4) / ( 1.d0 - SPHU0_EXPORT )
MFX_EXPORT = dble(temp3d_r4) * ( 1.d0 - SPHU0_EXPORT )
else
MFX_EXPORT = dble(temp3d_r4)
endif

call MAPL_GetPointer(IMPORT, temp3d_r4, 'MFYC', RC=STATUS)
_VERIFY(STATUS)
if ( correct_mass_flux_for_humidity > 0 ) then
MFY_EXPORT = dble(temp3d_r4) / ( 1.d0 - SPHU0_EXPORT )
MFY_EXPORT = dble(temp3d_r4) * ( 1.d0 - SPHU0_EXPORT )
else
MFY_EXPORT = dble(temp3d_r4)
endif
Expand Down Expand Up @@ -953,8 +953,9 @@ subroutine prepare_massflux_exports(IMPORT, EXPORT, PLE, dt, RC)
! Get vertical mass flux
call fv_getVerticalMassFlux(MFX_EXPORT, MFY_EXPORT, UpwardsMassFlux, dt)

! Flip vertical so that GCHP diagnostic is positive="up"
UpwardsMassFlux(:,:,:) = UpwardsMassFlux(:,:,LM:0:-1)/dt
! Flip vertical so that GCHP diagnostic level is following GEOS-Chem convention
! Add negative sign to make positive = "up"
UpwardsMassFlux(:,:,:) = -UpwardsMassFlux(:,:,LM:0:-1)/dt
end if

! nullify pointers
Expand Down