Skip to content

Commit

Permalink
Merge branch 'develop' into feature/acollow/persistemissionsafter2019
Browse files Browse the repository at this point in the history
  • Loading branch information
acollow authored Nov 12, 2024
2 parents f47ad5e + 5d3eff7 commit 00acdb0
Show file tree
Hide file tree
Showing 93 changed files with 1,454 additions and 2,529 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2.1

# Anchors to prevent forgetting to update a version
baselibs_version: &baselibs_version v7.7.0
bcs_version: &bcs_version v10.23.0
# Anchors in case we need to override the defaults from the orb
#baselibs_version: &baselibs_version v7.17.0
#bcs_version: &bcs_version v11.3.0

orbs:
ci: geos-esm/circleci-tools@1
ci: geos-esm/circleci-tools@2

workflows:
build-and-test:
Expand All @@ -18,7 +18,7 @@ workflows:
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
#baselibs_version: *baselibs_version
repo: GOCART
buildtarget: GOCART2G_GridComp
mepodevelop: true
Expand All @@ -32,7 +32,7 @@ workflows:
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
#baselibs_version: *baselibs_version
repo: GOCART
buildtarget: GOCART2G_GridComp
mepodevelop: true
Expand All @@ -47,7 +47,7 @@ workflows:
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
#baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
format: colored
config_file: .yamllint.yml

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: yamllint-logfile
Expand Down
118 changes: 107 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,124 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed

- Removed all ExtData.rc files
-removed lines for anthropogenic emissions of OC, BC, SO2, SO4, and NH3 in their repsective ExtData yaml files as these will enter through HEMCO.


### Changed

- Modified the file paths in carbon, sulfate, and nitrate ExtData.yaml files to used the revised version of the CEDS anthropogenic emissions. Note the previous version has an incorrect seasonal cycle.
- Sulfate surface area density calculation in SU_Compute_Diags was incorrectly being passed the effective radius used for settling along with the sigma width of the number distribution.
Properly it should be passed the number median radius, also present in the RC file. Added a hook to read that field from the RC file ("particle_radius_number"), store in SU grid comp, and pass to SU_Compute_Diags.
This change is zero-diff to the SU internal state. It changes value of export SO4AREA.
- Changed DMS concentration data holder from ExtData provided (SU_DMSO) to local copy (dmso_conc).
This is relevant since if we run source tagged instances where we don't want DMS emissions we would zero out dmso_conc and that is what should be passed to DMSemission subroutine. This is zero diff except in that case.
- Changed SU2G_instance_SU.rc to now have separate filename inputs for explosive and degassing volcanoes
- It changes the formulation of the hydrophobic to hydrophilic conversion for carbon species, now defined by a time scale specified in the instance RC file.
This is now specified by providing an e-folding time in days. This moves the time constant from outside the fortran to the run-time configurable RC file.
This is not quite zero-diff with original code because of the precision of the specification, but testing shows nearly zero-diff result.
- Also now present in the carbon instance RC files is a run-time configurable optional parameterized loss rate (e-folding time in days) per species and per mode.
Default value for all is set to "-1" which means no use of this function.

### Fixed

- Use 'CA' component name to identify carbonaceous contributions to PM in UFS diagnostic calculations. These contributions were missing due to changes in field names.
- Add replay import patch for ozone.
- corrected reading variable 'rhod' from files ( it was mispelled as 'rhop')
- Silenced unwarranted error messages from wavelength/channel retrieval functions occurring when 470nm and/or 870nm channels are not included in GOCART resource file.
- Add explicit `find_package()` calls for missing dependencies for MAPL for builds with spack-stack. Will eventually be fixed in MAPL in later versions
- Corrected the units of the gravimetric soil moisture to percent instead of fractional in the FENGSHA dust scheme.
- Fix issue of GOCART/GEOSgcm circular CMake dependencies when used as external project
- Fix UFS/Standalone CMake issue
- Fix type of `k` in `SUvolcanicEmissions`

### Added

- Additional tuning parameters for the soil moisture and drylimit calculations for application specific tuning.
- Required attributes for the 2D GOCART export fields in AERO_DP bundle have been set in subroutine append_to_bundle in Chem_AeroGeneric.F90.
These export fields are imported by OBIO via Surface GC, and the missing of the attributes was causing the writing of surface import checkpoint to fail.
The issue has been explained in detail on https://github.com/GEOS-ESM/GOCART/issues/258
- Added export line to GOCART2G_GridCompMod to couple allow use of GOCART
SU sulfate production tendency elsewhere in Chemistry, specifically for
CARMA

- Update ESMF CMake target to `ESMF::ESMF`


- Moved present volcanic emission inventories to one or the other line for these new entries; set other
line /dev/null; this is stop gap until next time we update volcanic emission inventories, at which
point will provide (for AMIP and AMIP.20C) separate explosive and degassing emissions
- Made accommodating changes for above in SU2G_GridCompMod.F90 and in the Process Library
- Verified zero diff in current configuration (this is true of tracers and restarts, but not diagnostics:
until an actual split is made in the input emissions then the volcanic emissions are being assigned to
one or the other emission diagnostics (explosive or degassing).

- Changed Chem_SettlingSimple in the process library to call Mie Query for radius and rhop inputs to the settling velocity calculation.
The calls to Chem_SettlingSimple were then changed accordingly in each of the species' grid comps.
Since the RH flag is no longer needed, it was removed from GA_EnvironmentMod.F90 and each of the instance RC files.
- State Spec RC files for GOCART2G, CA, DU, NI, SU, and SS were updated such that the long names for AOD are more intuitive
- Modified ExtData.yaml files to persist as climatological anthropogenic emissions after the end of the CEDS dataset in 2019.
Analogous rc files removed as this capability is only available with ExtData2G
- Update `components.yaml` to match that of GEOSgcm v11.6.1
- ESMA_env v4.29.0 (Baselibs 7.24.0, Updates for SLES15 at NCCS, various fixes)
- ESMA_cmake v3.48.0 (Fixes for NAS, debug flags, Updates for SLES15 at NCCS, MPI detection, ESMF and MPI CMake fixes for Spack)
- GMAO_Shared v1.9.8 (Bug fix for MITgcm, CI fixes, SLES15 Updates)
- MAPL 2.47.1 (Various fixes and features, support for Spack)
- Update CI to use Baselibs by default from CircleCI Orb
- Correct soil moisture parameterization in FENGSHA
- Add `soil_moisture_factor` to the DU2G_instance_DU.rc (same name used in the K14 scheme) and DU2G_GridCompMod.F90 files for FENGSHA
- Add `soil_drylimit_factor` to the DU2G_instance_DU.rc and DU2G_GridCompMod.F90 files for FENGSHA
- Moved process library macros to header file.

## [v2.2.1] - 2023-05-30

### Fixed

- In dust and sea-salt, changed dimensions back to `globalCellCountPerDim` since these are needed to determine emission tuning parameters, not to allocate arrays.


## [v2.2.0] - 2023-05-18

### Fixed

- Made needed code changes in `SS2G_GridCompMod.F90` and `CA2G_GridCompMod.F90` to permit data instances of of GOCART aerosols to run
- Added missing brown carbon (BR) climatology hooks to yaml and rc files for data driven instances
- Changed pointers to climatological deposition inputs in yaml and rc files to `/dev/null` since the files pointed to didn't provide them anyway, and in any case they are being used presently in the model
- Changed pointers to climatological nitrate inputs in yaml and rc files to `/dev/null` since pointing to FP files was inconsistent with MERRA-2 files used for other species
- Ensured zero-diff in performance of yaml vs. rc files for ExtData2G vs. ExtData1g for data driven aerosols
- To do: remove hooks to old (legacy) GOCART.data instances in CHEM and setup scripts
- Fixed rc file in legacy O3 component.
- Fixed issue #223 where Global dimension was being used for allocating a local array
- This fixes a long standing issue that one can not start and stop the model in anything less than 3 hour increments to test start/stop regression because of GOCART.
- Fix issue with scattering coefficient calculation with oc
- Fix a long standing issue that one can not start and stop the model in anything less than 3 hour increments to test start/stop regression because of GOCART.

### Changed
-removed lines for anthropogenic emissions of OC, BC, SO2, SO4, and NH3 in their repsective ExtData yaml files.
-used ExtData2G to persist aircraft emissions and MERRA-2 GMI inputs after 2019 to eliminate the need for duplicate files for future years
- Comment out ASSERT to allow `GOCART_DT` to not match the `HEARTBEAT_DT`
- Single-moment moist changes from Donifan
- Change names of microphysics schemes to match refactored physics
- Set `SS_SCALE` default to 0.0
- Updates in CA2G for OpenMP
- Updates for CI
- Update BCs version
- Update components to match GEOSgcm v11.0.0

## [2.1.4] - 2023-05-12

### Fixed

- Fix in GOCART2G parent so that it can run with nitrates turned off. This patch of general utility was contributed by NOAA.


## [2.1.3] - 2023-02-27

### Added

- Added `*` to CA State specs file to allow for ACG to substitute in the long name
- Changes were made so GOCART2G and its children can be run with component level
OpenMP threading. The key change is to create the data structure ThreadWorkspace
- Changes were made so GOCART2G and its children can be run with component level
OpenMP threading. The key change is to create the data structure ThreadWorkspace
to hold variables that should be private to each thread to avoid race conditions.
Additionally spatially distributed arrays that are not in any of the ESMF states
were added to the ESMF internal state so they could be properly handled when
Expand All @@ -31,8 +134,6 @@ option so they are not written to restart.
- Aerosol single scattering backscatter coefficient for each instances and total at wavelengths_profile
- Total (molecular + aerosols) attenuated backscatter coefficient from TOA and sfc at 532nm

### Fixed

### Changed

- Moved to use GitHub Action for label enforcement
Expand All @@ -51,11 +152,6 @@ option so they are not written to restart.
- Extinction/Scattering profile exports at model RH at wavelengths_profile
- Extinction/Scattering profile exports with RH=20% and RH=80% at wavelengths_profile

### Fixed

### Changed


## [2.1.1] - 2022-09-16

### Fixed
Expand Down
74 changes: 53 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,51 @@ cmake_minimum_required (VERSION 3.17)
cmake_policy (SET CMP0053 NEW)
cmake_policy (SET CMP0054 NEW)

project (
GOCART
VERSION 2.1.1
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are disabled. Please
issue cmake command in separate build directory.")
endif ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")

# Set the default build type to release
if (NOT CMAKE_BUILD_TYPE)
message (STATUS "Setting build type to 'Release' as none was specified.")
set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif ()
# Let's look for the ESMA cmake directory in a few places
# to see if we are building standalone
set (ESMA_CMAKE_DIRS
cmake
@cmake
cmake@
)

foreach (dir IN LISTS ESMA_CMAKE_DIRS)
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${dir})
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/${dir}")
set (ESMA_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/${dir}" CACHE PATH "Path to ESMA_cmake code")
set(GOCART_STANDALONE TRUE)
endif ()
endforeach ()

# Set build options
option (UFS_GOCART "Build GOCART component for UFS" OFF)

# Any UFS build of GOCART is by definition a standalone build
if(UFS_GOCART)
set(GOCART_STANDALONE TRUE)
endif()

if (GOCART_STANDALONE)
project (
GOCART
VERSION 2.2.1
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are disabled. Please
issue cmake command in separate build directory.")
endif ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")

# Set the default build type to release
if (NOT CMAKE_BUILD_TYPE)
message (STATUS "Setting build type to 'Release' as none was specified.")
set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif ()
endif()

set (DOING_GEOS5 YES)

# Should find a better place for this - used in Chem component
Expand All @@ -41,11 +64,12 @@ if (UFS_GOCART)
endif()

if (NOT COMMAND esma)
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake@")
include (esma)
endif()

ecbuild_declare_project()
if(GOCART_STANDALONE)
ecbuild_declare_project()
endif()

if (NOT Baselibs_FOUND)
# Find dependencies
Expand All @@ -61,6 +85,12 @@ endif ()

if (UFS_GOCART)
find_package (GFTL_SHARED REQUIRED)
# Dom Heinzeller 2023/08/30 - workaround until https://github.com/GEOS-ESM/MAPL/pull/2320
# is merged and finds its way into the ufs-weather-model dependency tree
find_package (YAFYAML QUIET)
find_package (FARGPARSE QUIET)
find_package (PFLOGGER QUIET)
#
find_package (MAPL REQUIRED)
include(mapl_acg)
elseif (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/ESMF/Shared/MAPL@")
Expand All @@ -81,7 +111,9 @@ include_directories(${MPI_Fortran_INCLUDE_PATH})
add_subdirectory (ESMF)
add_subdirectory (Process_Library)

ecbuild_install_project (NAME GOCART)
if(GOCART_STANDALONE)
ecbuild_install_project (NAME GOCART)
endif()

# https://www.scivision.dev/cmake-auto-gitignore-build-dir/
# --- auto-ignore build directory
Expand Down
2 changes: 1 addition & 1 deletion ESMF/Aerosol_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Aerosol_GridComp.F90)

esma_add_library (${this}
SRCS Aerosol_GridComp.F90
DEPENDENCIES GOCART2G_GridComp MAPL esmf)
DEPENDENCIES GOCART2G_GridComp MAPL ESMF::ESMF)

mapl_acg (${this} Aerosol_StateSpecs.rc
IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS
Expand Down
10 changes: 5 additions & 5 deletions ESMF/Apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
esma_set_this ()

set (srcs
GOCART2G_SimpleBundleMod.F90
GOCART2G_SimpleBundleMod.F90
aop_calculator.F90
GOCART2G_AopMod.F90
)
Expand All @@ -18,10 +18,10 @@ endforeach ()
set (resource_files
aop_calculator.rc
)
install( FILES ${resource_files}
install( FILES ${resource_files}
DESTINATION etc
)
esma_add_library(${this}
SRCS ${srcs}
DEPENDENCIES MAPL Process_Library esmf NetCDF::NetCDF_Fortran
esma_add_library(${this}
SRCS ${srcs}
DEPENDENCIES MAPL Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran
)
Loading

0 comments on commit 00acdb0

Please sign in to comment.