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

Open
wants to merge 4 commits into
base: dev/no-diff-to-benchmark
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ This file documents all notable changes to the GCHP wrapper repository starting

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - TBD
### Added

### Fixed
- Fixed dry mass flux derivation
- Fixed UpwardsMassflux sign

### Changed

### Removed

## [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