Skip to content

Commit

Permalink
Merge pull request #650 from fvitt/carma_unstructgrid
Browse files Browse the repository at this point in the history
cam6_3_128: CARMA models on unstructured grids
  • Loading branch information
fvitt committed Sep 13, 2023
2 parents cf13794 + e91b687 commit 00ff0cb
Show file tree
Hide file tree
Showing 24 changed files with 1,882 additions and 1,724 deletions.
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ required = True
local_path = src/physics/carma/base
protocol = git
repo_url = https://github.com/ESCOMP/CARMA_base.git
tag = carma4_00
tag = carma4_01
required = True

[cosp2]
Expand Down
2 changes: 2 additions & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@
<ncdata dyn="fv" hgrid="1.9x2.5" nlev="70" aquaplanet="1" ic_ymd="20000101" >atm/waccm/ic/aqua.cam6.waccmsc_1.9x2.5_L70.2000-01-01.c170123.nc</ncdata>
<ncdata dyn="fv" hgrid="1.9x2.5" nlev="70" aquaplanet="1" ic_ymd="20000101" chem="waccm_tsmlt_mam4">atm/waccm/ic/aqua.waccm_tsmlt_1.9x2.5_L70_c170814.nc</ncdata>
<ncdata dyn="fv" hgrid="1.9x2.5" nlev="70" aquaplanet="1" ic_ymd="20000101" chem="waccm_ma_mam4">atm/waccm/ic/aqua.waccm_tsmlt_1.9x2.5_L70_c170814.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="70" aquaplanet="1" chem="waccm_ma_mam4">atm/waccm/ic/aqua_waccm_ma_ne5np4_70L_c220729.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="70" aquaplanet="1" chem="waccm_ma_mam5">atm/waccm/ic/aqua_waccm_ma_ne5np4_70L_c220729.nc</ncdata>
<ncdata dyn="fv" hgrid="4x5" nlev="70" ic_ymd="20000101" >atm/waccm/ic/f2000.waccm-mam3_4x5_L70.cam2.i.0017-01-01.c121113.nc</ncdata>
<ncdata dyn="fv" hgrid="10x15" nlev="70" ic_ymd="20000101" >atm/waccm/ic/f2000.waccm-mam3_10x15_L70.cam2.i.0017-01-01.c141016.nc</ncdata>
<ncdata dyn="fv" hgrid="1.9x2.5" nlev="70" ic_ymd="18500101" >atm/waccm/ic/b1850.waccm-mam3_1.9x2.5_L70.cam2.i.0156-01-01.c120523.nc</ncdata>
Expand Down
138 changes: 138 additions & 0 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,15 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="F2000climo" grid="ne30pg3_ne30pg3_mg17" name="ERS_D_Ln9_Vnuopc" testmods="cam/carma_dust">
<machines>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >CARMA dust test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- carma sea_salt -->
<test compset="QPC5" grid="f10_f10_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/carma_sea_salt">
<machines>
Expand Down Expand Up @@ -771,6 +780,135 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="F2000climo" grid="ne5pg3_ne5pg3_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/carma_dust">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA dust test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_sea_salt">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA sea salt test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_test_growth">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA growth test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_test_passive">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA passive test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_test_swelling">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA swelling test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_test_tracers2">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA tracers2 test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_test_radiative">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA radiative test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPC5" grid="ne5_ne5_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/carma_test_tracers">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA test-tracers test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPWmaC6" grid="ne5pg3_ne5pg3_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_meteor_impact">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA meteor impact test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPWmaC6" grid="ne5pg3_ne5pg3_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_meteor_smoke">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA smoke test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPWmaC6" grid="ne5pg3_ne5pg3_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_pmc">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA PMC test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPWmaC4" grid="ne5pg3_ne5pg3_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_mixed_sulfate">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA mixed sulfate test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="QPWmaC4" grid="ne5pg3_ne5pg3_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_sulfate">
<machines>
<machine name="izumi" compiler="nag" category="carma"/>
<machine name="cheyenne" compiler="intel" category="carma"/>
</machines>
<options>
<option name="comment" >Low-res unstructured grid CARMA sulfate test</option>
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- 471 -->
<test compset="QPWmaC6" grid="f10_f10_mg37" name="ERC_D_Ln9_Vnuopc" testmods="cam/outfrq3s" supported="false">
<machines>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ nhtfrq=3,3,3,3,3,3
inithist='ENDOFRUN'
pbuf_global_allocate=.false.
history_carma=.true.
fincl2 = 'CRSLERFC'
carma_do_fixedinit=.false.
carma_reftfile="camrun.cam.r.carma_reft.nc"
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ carma_do_fixedinit=.false.
carma_reftfile="camrun.cam.r.carma_reft.nc"
solar_data_type='FIXED'
solar_data_ymd=20000101

carma_emis_maxlat = 40.
carma_emis_maxlon = 20.
carma_emis_minlat = -20.
carma_emis_minlon = -80.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ pbuf_global_allocate=.false.
history_carma=.true.
carma_do_fixedinit=.false.
carma_reftfile="camrun.cam.r.carma_reft.nc"
flbc_list = 'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'OCS'
flbc_list = 'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'OCS'
solar_data_type='FIXED'
solar_data_ymd=20000101

carma_maxretries = 40
ubc_specifier = 'T->MSIS', 'Q->2.d-8vmr', 'CH4->2.d-10vmr', 'H->MSIS', 'N->MSIS', 'O->MSIS', 'O2->MSIS', 'H2->TGCM', 'NO->SNOE'
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ pbuf_global_allocate=.false.
history_carma=.true.
carma_do_fixedinit=.false.
carma_reftfile="camrun.cam.r.carma_reft.nc"
flbc_list = 'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'OCS'
flbc_list = 'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'OCS'
solar_data_type='FIXED'
solar_data_ymd=20000101

ubc_specifier = 'T->MSIS', 'Q->2.d-8vmr', 'CH4->2.d-10vmr', 'H->MSIS', 'N->MSIS', 'O->MSIS', 'O2->MSIS', 'H2->TGCM', 'NO->SNOE'
101 changes: 101 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,106 @@
===============================================================

Tag name: cam6_3_128
Originator(s): fvitt
Date: 13 Sep 2023
One-line Summary: Enable use of CARMA aerosol packages with unstructured grids
Github PR URL: https://github.com/ESCOMP/CAM/pull/650

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

Address issues:
Need capability to run existing CARMA models on unstructured grids #649
refractive_aerosol_optics_mod.F90 is missing an r8 qualifier #882

Describe any changes made to build system: n/a

Describe any changes made to the namelist: n/a

List any changes to the defaults for the boundary datasets: n/a

Describe any substantial timing or memory changes: n/a

Code reviewed by: cacraigucar nusbaume

List all files eliminated: n/a

List all files added and what they do: n/a

List all existing files that have been modified, and describe the changes:
M Externals_CAM.cfg
- update CARMA base tag carma4_01

M bld/namelist_files/namelist_defaults_cam.xml
- default IC file for QPWmaC6 on ne5 grid

M cime_config/testdefs/testlist_cam.xml
- new tests carma models, mostly for coarse SE grids

M cime_config/testdefs/testmods_dirs/cam/carma_dust/user_nl_cam
- include CRSLERFC in h1 output

M cime_config/testdefs/testmods_dirs/cam/carma_meteor_impact/user_nl_cam
- set wide impact zone for coarse grid testing

M cime_config/testdefs/testmods_dirs/cam/carma_mixed_sulfate/user_nl_cam
M cime_config/testdefs/testmods_dirs/cam/carma_sulfate/user_nl_cam
- increase carma_maxretries
- specified UBCs

M src/chemistry/aerosol/refractive_aerosol_optics_mod.F90
- include "_r8" kind in limit constant

M src/physics/carma/cam/carma_constants_mod.F90
- remove commented out line

M src/physics/carma/cam/carma_intr.F90
- remove Cartesian coordinate and spacing stuff
- misc clean up and corrections

M src/physics/carma/models/dust/carma_model_mod.F90
M src/physics/carma/models/meteor_impact/carma_model_mod.F90
- changes for generalized grid columns

M src/physics/carma/models/sea_salt/carma_model_mod.F90
- removed ununsed lat/lon indices

M src/physics/carma/models/meteor_smoke/carma_model_mod.F90
M src/physics/carma/models/mixed_sulfate/carma_model_mod.F90
M src/physics/carma/models/pmc/carma_model_mod.F90
M src/physics/carma/models/sulfate/carma_model_mod.F90
M src/physics/carma/models/test_growth/carma_model_mod.F90
M src/physics/carma/models/test_passive/carma_model_mod.F90
M src/physics/carma/models/test_radiative/carma_model_mod.F90
M src/physics/carma/models/test_swelling/carma_model_mod.F90
M src/physics/carma/models/test_tracers/carma_model_mod.F90
M src/physics/carma/models/test_tracers2/carma_model_mod.F90
- minor clean up -- remove unused "module uses"

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

cheyenne/intel/aux_cam:
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s (Overall: FAIL) details:
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h (Overall: DIFF) details:
- pre-existing failures

izumi/nag/aux_cam:
DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
- pre-existing failure

ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-carma_sea_salt (Overall: DIFF) details:
FAIL ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-carma_sea_salt BASELINE /fs/cgd/csm/models/atm/cam/pretag_bl/cam6_3_127_nag: DIFF
- round-off level changes in carma base code

izumi/gnu/aux_cam: All PASS

Summarize any changes to answers: CARMA round-off level changes, otherwise bit-for-bit unchanged

===============================================================
===============================================================

Tag name: cam6_3_127
Originator(s): pel, jet
Date: Sept 12, 2023
Expand Down
2 changes: 1 addition & 1 deletion src/chemistry/aerosol/refractive_aerosol_optics_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ subroutine lw_props(self, ncol, ilev, iwav, pabs)

do icol = 1, ncol
crefin(icol) = crefin(icol) + self%watervol(icol,ilev)*self%crefwlw(iwav)
crefin(icol) = crefin(icol)/max(self%wetvol(icol,ilev), 1.e-40)
crefin(icol) = crefin(icol)/max(self%wetvol(icol,ilev), 1.e-40_r8)

refr(icol) = real(crefin(icol))
refi(icol) = aimag(crefin(icol))
Expand Down
Loading

0 comments on commit 00ff0cb

Please sign in to comment.