Skip to content

Commit

Permalink
Merge pull request #2794 from eagles-project/singhbalwinder/aci-rebas…
Browse files Browse the repository at this point in the history
…ed-03_28_2024

Adds MAM4xx: Aerosol Cloud Interactions (ACI) interface
  • Loading branch information
bartgol authored Jun 13, 2024
2 parents b7f853c + ea3a693 commit d58467b
Show file tree
Hide file tree
Showing 36 changed files with 2,863 additions and 79 deletions.
1 change: 1 addition & 0 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@
"time" : "01:00:00",
"tests" : (
"SMS_D_Ln5.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.scream-mam4xx-optics",
"SMS_D_Ln5.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.scream-mam4xx-aci",
)
},

Expand Down
33 changes: 33 additions & 0 deletions components/eamxx/cime_config/namelist_defaults_scream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ be lost if SCREAM_HACK_XML is not enabled.
<Ckm type="real" doc="Eddy diffusivity coefficient for momentum">0.1</Ckm>
</shoc>

<!-- MAM4xx-ACI -->
<mam4_aci inherit="atm_proc_base">
<wsubmin type="real" doc="Minimum diagnostic sub-grid vertical velocity">0.001</wsubmin>
<top_level_mam4xx type="integer" doc="Top level for MAM4xx">6</top_level_mam4xx>
</mam4_aci>

<!-- CLD fraction -->
<cldFraction inherit="atm_proc_base"/>

Expand Down Expand Up @@ -481,6 +487,33 @@ be lost if SCREAM_HACK_XML is not enabled.
<surf_sens_flux >0.0</surf_sens_flux>
<surf_lw_flux_up >0.0</surf_lw_flux_up>
<surf_mom_flux type="array(real)">0.0,0.0</surf_mom_flux>
<!-- Note: MAM4xx-ACI needs dry aerosol diameter (dgnum), currently set to aitken model nominal diameter, remove it once all of MAM4xx is integrated -->
<dgnum type="real" doc="Dry aerosol particles diameter in meters">2.6e-08</dgnum>
<bc_c1 type="real">0.0</bc_c1>
<bc_c3 type="real">0.0</bc_c3>
<bc_c4 type="real">0.0</bc_c4>
<dst_c1 type="real">0.0</dst_c1>
<dst_c3 type="real">0.0</dst_c3>
<so4_c1 type="real">0.0</so4_c1>
<so4_c2 type="real">0.0</so4_c2>
<so4_c3 type="real">0.0</so4_c3>
<pom_c1 type="real">0.0</pom_c1>
<pom_c3 type="real">0.0</pom_c3>
<pom_c4 type="real">0.0</pom_c4>
<soa_c1 type="real">0.0</soa_c1>
<soa_c2 type="real">0.0</soa_c2>
<soa_c3 type="real">0.0</soa_c3>
<nacl_c1 type="real">0.0</nacl_c1>
<nacl_c2 type="real">0.0</nacl_c2>
<nacl_c3 type="real">0.0</nacl_c3>
<mom_c1 type="real">0.0</mom_c1>
<mom_c2 type="real">0.0</mom_c2>
<mom_c3 type="real">0.0</mom_c3>
<mom_c4 type="real">0.0</mom_c4>
<num_c1 type="real">0.0</num_c1>
<num_c2 type="real">0.0</num_c2>
<num_c3 type="real">0.0</num_c3>
<num_c4 type="real">0.0</num_c4>
<!-- default ne1024 initial condition files do not have these, so init to zero here -->
<!-- TODO: delete this once we can tell the AD that some fields can be inited by procs -->
<qc hgrid="ne256np4|ne1024np4">0.0</qc>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#Default scream has 10 tracers, MAM4xx adds another 31 making a total of 41 tracer
#Set total number of tracers to 41. We are using append here as last entry wins while parsing xml options
./xmlchange --append SCREAM_CMAKE_OPTIONS="SCREAM_NUM_TRACERS 41"

#modify initial condition file to get aerosol species ICs
$CIMEROOT/../components/eamxx/scripts/atmchange initial_conditions::Filename='$DIN_LOC_ROOT/atm/scream/init/screami_mam4xx_ne4np4L72_c20240208.nc' -b

# Add spa as RRTMG needs spa
$CIMEROOT/../components/eamxx/scripts/atmchange physics::atm_procs_list="mac_aero_mic,spa,rrtmgp" -b

# Replace spa with mam4_aci to invoke mam4 aci scheme
$CIMEROOT/../components/eamxx/scripts/atmchange mac_aero_mic::atm_procs_list="tms,shoc,cldFraction,mam4_aci,p3" -b

#Set precribed ccn to false so that P3 uses input from ACI
$CIMEROOT/../components/eamxx/scripts/atmchange p3::do_prescribed_ccn=false -b

#Set predicted ccn to true so that P3 uses input from ACI
$CIMEROOT/../components/eamxx/scripts/atmchange p3::do_predict_nc=true -b




2 changes: 1 addition & 1 deletion components/eamxx/cmake/machine-files/compy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ include (${EKAT_MACH_FILES_PATH}/kokkos/openmp.cmake)
include (${EKAT_MACH_FILES_PATH}/mpi/srun.cmake)

#Compy SLURM specific settings
set(EKAT_MPI_NP_FLAG "-p short -n" CACHE STRING "" FORCE)
set(EKAT_MPI_NP_FLAG "-p short --mpi=pmi2 -n" CACHE STRING "" FORCE)
3 changes: 2 additions & 1 deletion components/eamxx/src/physics/mam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ add_subdirectory(${EXTERNALS_SOURCE_DIR}/mam4xx ${CMAKE_BINARY_DIR}/externals/ma
# EAMxx mam4xx-based atmospheric processes
add_library(mam
eamxx_mam_microphysics_process_interface.cpp
eamxx_mam_optics_process_interface.cpp)
eamxx_mam_optics_process_interface.cpp
eamxx_mam_aci_process_interface.cpp)
target_compile_definitions(mam PUBLIC EAMXX_HAS_MAM)
add_dependencies(mam mam4xx)
target_include_directories(mam PUBLIC
Expand Down
Loading

0 comments on commit d58467b

Please sign in to comment.