Skip to content

Commit

Permalink
Adds a multi-process test with srf emiss and constituent fluxes
Browse files Browse the repository at this point in the history
  • Loading branch information
singhbalwinder committed Aug 14, 2024
1 parent a7e7191 commit f1b2ab6
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if (SCREAM_DOUBLE_PRECISION)
add_subdirectory(mam/shoc_cldfrac_mam4_aci_p3_mam4_optics_rrtmgp)
add_subdirectory(mam/p3_mam4_wetscav)
add_subdirectory(mam/shoc_cldfrac_p3_wetscav)
add_subdirectory(mam/mam4_srf_online_emiss_mam4_constituent_fluxes)
endif()
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
INCLUDE (ScreamUtils)

set (TEST_BASE_NAME mam4_srf_online_emiss_mam4_constituent_fluxes)
set (FIXTURES_BASE_NAME ${TEST_BASE_NAME}_generate_output_nc_files)

# Create the test
CreateADUnitTest(${TEST_BASE_NAME}
LIBS mam
LABELS physics mam4_srf_online_emiss mam4_constituent_fluxes
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
FIXTURES_SETUP_INDIVIDUAL ${FIXTURES_BASE_NAME}
)

# Set AD configurable options
set (ATM_TIME_STEP 1800)
SetVarDependingOnTestSize(NUM_STEPS 2 5 48) # 1h 4h 24h
set (RUN_T0 2021-10-12-45000)

# Ensure test input files are present in the data dir
GetInputFile(scream/init/${EAMxx_tests_IC_FILE_MAM4xx_72lev})
GetInputFile(cam/topo/${EAMxx_tests_TOPO_FILE})

# Ensure test input files are present in the data dir
set (TEST_INPUT_FILES
scream/mam4xx/emissions/ne2np4/DMSflux.2010.ne2np4_conserv.POPmonthlyClimFromACES4BGC_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_so2_surf_ne2np4_2010_clim_c20240723.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_bc_a4_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_num_a1_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_num_a2_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_num_a4_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_pom_a4_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_so4_a1_surf_ne2np4_2010_clim_c20240726.nc
scream/mam4xx/emissions/ne2np4/cmip6_mam4_so4_a2_surf_ne2np4_2010_clim_c20240726.nc
)
foreach (file IN ITEMS ${TEST_INPUT_FILES})
GetInputFile(${file})
endforeach()

## Copy (and configure) yaml files needed by tests
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input.yaml
${CMAKE_CURRENT_BINARY_DIR}/input.yaml)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
${CMAKE_CURRENT_BINARY_DIR}/output.yaml)

# Compare output files produced by npX tests, to ensure they are bfb
include (CompareNCFiles)
CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS physics mam4_srf_online_emiss mam4_constituent_fluxes
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%YAML 1.1
---
driver_options:
atmosphere_dag_verbosity_level: 5

time_stepping:
time_step: ${ATM_TIME_STEP}
run_t0: ${RUN_T0} # YYYY-MM-DD-XXXXX
number_of_steps: ${NUM_STEPS}

atmosphere_processes:
atm_procs_list: [mam4_srf_online_emiss, mam4_constituent_fluxes]
schedule_type: Sequential
mam4_srf_online_emiss:
# MAM4xx-Surface-Emissions
srf_remap_file: ""
srf_emis_specifier_for_DMS: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/DMSflux.2010.ne2np4_conserv.POPmonthlyClimFromACES4BGC_c20240726.nc
srf_emis_specifier_for_SO2: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_so2_surf_ne2np4_2010_clim_c20240723.nc
srf_emis_specifier_for_bc_a4: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_bc_a4_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_num_a1: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_num_a1_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_num_a2: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_num_a2_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_num_a4: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_num_a4_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_pom_a4: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_pom_a4_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_so4_a1: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_so4_a1_surf_ne2np4_2010_clim_c20240726.nc
srf_emis_specifier_for_so4_a2: ${SCREAM_DATA_DIR}/mam4xx/emissions/ne2np4/cmip6_mam4_so4_a2_surf_ne2np4_2010_clim_c20240726.nc

grids_manager:
Type: Mesh Free
geo_data_source: IC_FILE
grids_names: [Physics GLL]
Physics GLL:
aliases: [Physics]
type: point_grid
number_of_global_columns: 218
number_of_vertical_levels: 72

initial_conditions:
# The name of the file containing the initial conditions for this test.
Filename: ${SCREAM_DATA_DIR}/init/${EAMxx_tests_IC_FILE_MAM4xx_72lev}
topography_filename: ${TOPO_DATA_DIR}/${EAMxx_tests_TOPO_FILE}

# The parameters for I/O control
Scorpio:
output_yaml_files: ["output.yaml"]
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%YAML 1.1
---
filename_prefix: shoc_mam4_drydep_output
Averaging Type: Instant
Field Names:
- bc_a1
- bc_a3
- bc_a4
- dst_a1
- dst_a3
- so4_a1
- so4_a2
- so4_a3
- pom_a1
- pom_a3
- pom_a4
- soa_a1
- soa_a2
- soa_a3
- nacl_a1
- nacl_a2
- nacl_a3
- mom_a1
- mom_a2
- mom_a3
- mom_a4
- num_a1
- num_a2
- num_a3
- num_a4
- constituent_fluxes
- O3
- H2O2
- H2SO4
- SO2
- DMS
- SOAG
output_control:
Frequency: ${NUM_STEPS}
frequency_units: nsteps
...

0 comments on commit f1b2ab6

Please sign in to comment.