From bec60a5fb4be56284d00a52cd51e4cffdcc4f127 Mon Sep 17 00:00:00 2001 From: "yuanjian.z" Date: Mon, 30 Sep 2024 21:48:52 -0500 Subject: [PATCH 1/4] Raw mass flux multiplied by 1-SPHU to generate dry mass flux --- .../GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 index a6b47ff27..d7f424d59 100644 --- a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 +++ b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 @@ -871,7 +871,7 @@ 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 @@ -879,7 +879,7 @@ subroutine prepare_massflux_exports(IMPORT, EXPORT, PLE, dt, RC) 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 From 4dae1af01ee8c8c524977d39419cd57834d1504c Mon Sep 17 00:00:00 2001 From: Yuanjian Zhang Date: Wed, 30 Oct 2024 16:14:40 -0500 Subject: [PATCH 2/4] Add negative sign to make UpwardsMassFlux really positive = "up" --- .../GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 index d7f424d59..b62d2500c 100644 --- a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 +++ b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 @@ -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 follwing GEOS-Chem convetion + ! Add negative sign to make positive = "up" + UpwardsMassFlux(:,:,:) = -UpwardsMassFlux(:,:,LM:0:-1)/dt end if ! nullify pointers From a5c661c190f3e50a024e47e8999c5f775140f67e Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Wed, 4 Dec 2024 10:46:00 -0500 Subject: [PATCH 3/4] Fix typo and Update ChangeLog # Conflicts: # CHANGELOG.md Signed-off-by: Lizzie Lundgren --- CHANGELOG.md | 4 ++++ .../GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7a58c4f..2169c12cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 index b62d2500c..01ae70d18 100644 --- a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 +++ b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 @@ -953,7 +953,7 @@ 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 level is follwing GEOS-Chem convetion + ! Flip vertical so that GCHP diagnostic level is following GEOS-Chem convetion ! Add negative sign to make positive = "up" UpwardsMassFlux(:,:,:) = -UpwardsMassFlux(:,:,LM:0:-1)/dt end if From 2641547a39612a80859e1f0b7db4facd1b551a94 Mon Sep 17 00:00:00 2001 From: "yuanjian.z" Date: Fri, 15 Nov 2024 14:02:06 -0600 Subject: [PATCH 4/4] Fix typo --- .../GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 index 01ae70d18..17df4acea 100644 --- a/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 +++ b/src/GCHP_GridComp/GCHPctmEnv_GridComp/GCHPctmEnv_GridCompMod.F90 @@ -953,7 +953,7 @@ 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 level is following GEOS-Chem convetion + ! 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