From 2efd269252108fa5949978fa4eff0e5ec57443bc Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Tue, 17 Dec 2024 11:54:31 -0700 Subject: [PATCH] default namelist fixes; revert nucleate ice change for carma modified: bld/build-namelist modified: bld/namelist_files/namelist_defaults_cam.xml modified: src/physics/cam/nucleate_ice.F90 --- bld/build-namelist | 2 +- bld/namelist_files/namelist_defaults_cam.xml | 3 --- src/physics/cam/nucleate_ice.F90 | 22 +++++++++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/bld/build-namelist b/bld/build-namelist index 258b54f048..7a5ec905eb 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -2285,7 +2285,7 @@ if ($chem eq 'trop_mam3') { if ($phys =~ /cam6/ or $phys =~ /cam7/) { # OASISS (ocean) DMS emissions - if (!$aqua_mode and !$scam) { + if (!$aqua_mode and !$scam and chem_has_species($cfg, 'DMS')) { my $rel_filepath = get_default_value('dms_ocn_emis_file'); my $abs_filepath = set_abs_filepath($rel_filepath, $inputdata_rootdir); my $val = quote_string("DMS -> ". $abs_filepath); diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index ab4a8e28f8..5c9187be4f 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -2994,9 +2994,6 @@ 16 32 -4 -4 - 3.e+5 0 diff --git a/src/physics/cam/nucleate_ice.F90 b/src/physics/cam/nucleate_ice.F90 index ac7268c068..42db39a083 100644 --- a/src/physics/cam/nucleate_ice.F90 +++ b/src/physics/cam/nucleate_ice.F90 @@ -226,9 +226,11 @@ subroutine nucleati( & if ( ((tc.le.0.0_r8).and.(tc.ge.-37.0_r8).and.(qc.lt.1.e-12_r8)).or.(tc.le.-37.0_r8)) then - A = -1.4938_r8 * log(soot_num+dst_num) + 12.884_r8 - B = -10.41_r8 * log(soot_num+dst_num) - 67.69_r8 - regm = A * log(wbar1) + B + if ( (soot_num+dst_num) > 0._r8) then + A = -1.4938_r8 * log(soot_num+dst_num) + 12.884_r8 + B = -10.41_r8 * log(soot_num+dst_num) - 67.69_r8 + regm = A * log(wbar1) + B + end if ! heterogeneous nucleation only if (tc .gt. regm .or. so4_num < 1.0e-10_r8) then @@ -260,8 +262,11 @@ subroutine nucleati( & nihf = 0._r8 n1 = niimm + nidep - osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) - odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) + if ( (soot_num+dst_num) > 0._r8) then + osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) + odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) + end if + endif ! homogeneous nucleation only @@ -322,8 +327,10 @@ subroutine nucleati( & oso4_num = nihf endif - osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) - odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) + if ( (soot_num+dst_num) > 0._r8) then + osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) + odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) + end if nihf = nihf * fhom * ((regm - tc) / 5._r8)**2 oso4_num = oso4_num * fhom * ((regm - tc) / 5._r8)**2 @@ -582,4 +589,3 @@ subroutine frachom(Tmean,RHimean,detaT,fhom) end subroutine frachom end module nucleate_ice -