@@ -1545,6 +1545,68 @@ elsif ($carma eq 'tholin') {
15451545 add_default($nl , ' carma_emis_total' , ' val' => ' 1e5' );
15461546 add_default($nl , ' carma_emis_file' );
15471547}
1548+ elsif ($carma =~ / trop_strat/ ) {
1549+ add_default($nl , ' carma_do_fixedinit' ,' val' => ' .false.' );
1550+ add_default($nl , ' carma_do_partialinit' ,' val' => ' .false.' );
1551+ add_default($nl , ' carma_do_drydep' , ' val' => ' .true.' );
1552+ add_default($nl , ' carma_do_optics' , ' val' => ' .false.' );
1553+ add_default($nl , ' carma_do_vtran' , ' val' => ' .true.' );
1554+ add_default($nl , ' carma_do_wetdep' , ' val' => ' .false.' );
1555+ add_default($nl , ' carma_soilerosion_file' );
1556+ add_default($nl , ' carma_fields' , ' val' => ' Sl_soilw' );
1557+ add_default($nl , ' carma_do_vdiff' , ' val' => ' .true.' );
1558+ add_default($nl , ' carma_do_WeibullK' , ' val' => ' .false.' );
1559+ add_default($nl , ' carma_seasalt_emis' ,' val' => ' Gong' );
1560+ add_default($nl , ' carma_do_coag' , ' val' => ' .true.' );
1561+ add_default($nl , ' carma_do_grow' , ' val' => ' .true.' );
1562+ add_default($nl , ' carma_do_substep' , ' val' => ' .true.' );
1563+ add_default($nl , ' carma_do_thermo' , ' val' => ' .false.' );
1564+ add_default($nl , ' carma_seasalt_emis' ,' val' => ' Gong' );
1565+ add_default($nl , ' carma_maxretries' , ' val' => ' 20' );
1566+ add_default($nl , ' carma_maxsubsteps' , ' val' => ' 2' );
1567+ add_default($nl , ' carma_dt_threshold' ,' val' => ' 2.0' );
1568+ add_default($nl , ' carma_hetchem_feedback' ,' val' => ' .false.' );
1569+ add_default($nl , ' bin_defs' );
1570+ add_default($nl , ' rad_climate' );
1571+ add_default($nl , ' carma_do_emission' , ' val' => ' .true.' );
1572+ add_default($nl , ' water_refindex_file' );
1573+ add_default($nl , ' carma_do_cloudborne' , ' val' => ' .true.' );
1574+
1575+ # emissions
1576+ add_default($nl , ' carma_BCOCemissions' ,' val' => ' Specified' );
1577+ my $carma_BCOCemis = $nl -> get_value(' carma_BCOCemissions' );
1578+ $carma_BCOCemis =~ s / ['"]// g ; # strip quotes "'
1579+ if ($carma_BCOCemis eq ' Specified' ) {
1580+ my %verhash ; # = ('ver'=>'cam6');
1581+ if ( $sim_year == ' 2000' ) {
1582+ %verhash = (' ver' => ' 2000cam6' );
1583+ add_default($nl , ' emissions_type' , ' val' => ' CYCLICAL' );
1584+ add_default($nl , ' emissions_cycle_yr' , ' val' => ' 2000' );
1585+ } else {
1586+ %verhash = (' ver' => ' cam6' );
1587+ add_default($nl , ' emissions_type' , ' val' => ' INTERP_MISSING_MONTHS' );
1588+ }
1589+ my %species = (' bc_a4_an_srf_file' => ' BC' ,
1590+ ' bc_a4_bb_srf_file' => ' BC' ,
1591+ ' pom_a4_an_srf_file' => ' OC' ,
1592+ ' pom_a4_bb_srf_file' => ' OC' );
1593+ my $first = 1; my $pre = " " ; my $val = " " ;
1594+ foreach my $id (sort keys %species ) {
1595+ my $rel_filepath = get_default_value($id , \%verhash );
1596+ my $abs_filepath = set_abs_filepath($rel_filepath , $inputdata_rootdir );
1597+ $val .= $pre . quote_string(" $species {$id } -> " . $abs_filepath );
1598+ if ($first ) { $pre = " ," ; $first = 0; }
1599+ }
1600+ add_default($nl , ' emissions_specifier' , ' val' => $val );
1601+ } else {
1602+ add_default($nl , ' BC_GAINS_filename' );
1603+ add_default($nl , ' OC_GAINS_filename' );
1604+ add_default($nl , ' BC_ship_filename' );
1605+ add_default($nl , ' OC_ship_filename' );
1606+ add_default($nl , ' BC_GFEDv3_filename' );
1607+ add_default($nl , ' OC_GFEDv3_filename' );
1608+ }
1609+ }
15481610
15491611# Stratospheric sulfur aerosols
15501612
@@ -1591,7 +1653,8 @@ if (defined $nl->get_value('prescribed_strataero_3modes')) {
15911653
15921654# determine if prescribed stratospheric aerosol data is needed
15931655if ( ($het_chem ) || ($nl -> get_value(' prescribed_strataero_feedback' ) =~ / $TRUE /io ) ){
1594- if ( !($nl -> get_value(' modal_strat_sulfate' ) =~ / $TRUE /io ) ) { # if no prognostic stratospheric aerosols
1656+ if ( !($carma =~ / trop_strat/ ) &&
1657+ !($nl -> get_value(' modal_strat_sulfate' ) =~ / $TRUE /io ) ) { # if no prognostic stratospheric aerosols
15951658
15961659 unless (defined $nl -> get_value(' prescribed_strataero_type' )) {
15971660 add_default($nl , ' prescribed_strataero_type' ,' val' => ' CYCLICAL' );
@@ -2222,10 +2285,10 @@ if ($chem eq 'trop_mam3') {
22222285}
22232286
22242287# CMIP6 emissions
2225- if (( $chem =~ / _mam4 / or $chem =~ / _mam5 / ) and ( $ phys =~ / cam6/ or $phys =~ / cam7/ ) ) {
2288+ if ($ phys =~ / cam6/ or $phys =~ / cam7/ ) {
22262289
22272290 # OASISS (ocean) DMS emissions
2228- if (!$aqua_mode and !$scam ) {
2291+ if (!$aqua_mode and !$scam and chem_has_species( $cfg , ' DMS ' ) ) {
22292292 my $rel_filepath = get_default_value(' dms_ocn_emis_file' );
22302293 my $abs_filepath = set_abs_filepath($rel_filepath , $inputdata_rootdir );
22312294 my $val = quote_string(" DMS -> " . $abs_filepath );
@@ -2243,37 +2306,40 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
22432306 }
22442307 }
22452308
2246- my %species ;
2309+ my %species = (' dms_bb_srf_file' => ' DMS' ,
2310+ ' so2_ag_sh_file' => ' SO2' ,
2311+ ' so2_an_srf_file' => ' SO2' ,
2312+ ' so2_bb_srf_file' => ' SO2' );
22472313
2248- # Surface emission datasets:
2249- %species = (' dms_bb_srf_file' => ' DMS' ,
2250- ' so2_ag_sh_file' => ' SO2' ,
2251- ' so2_an_srf_file' => ' SO2' ,
2252- ' so2_bb_srf_file' => ' SO2' ,
2253- ' so4_a1_an_srf_file' => ' so4_a1' ,
2254- ' so4_a1_bb_srf_file' => ' so4_a1' ,
2255- ' so4_a2_an_srf_file' => ' so4_a2' ,
2256- ' num_a1_sh_srf_file' => ' num_a1' ,
2257- ' num_a1_bb_srf_file' => ' num_a1' ,
2258- ' num_a2_an_srf_file' => ' num_a2' ,
2259- ' bc_a4_an_srf_file' => ' bc_a4' ,
2260- ' bc_a4_bb_srf_file' => ' bc_a4' ,
2261- ' num_a4_bc_srf_file' => ' num_a4' ,
2262- ' num_a4_oc_srf_file' => ' num_a4' ,
2263- ' num_a4_bb_srf_file' => ' num_a4' ,
2264- ' num_pom_bb_srf_file' => ' num_a4' );
2265- if ((not defined $nl -> get_value(' csw_specifier' )) or (not $nl -> get_value(' csw_specifier' ) ~~ / DMS/ )) {
2266- %species = (%species ,
2267- ' dms_ot_srf_file' => ' DMS' );
2268- }
2269- if ($chem =~ / _vbsext/ ) {
2270- %species = (%species ,
2271- ' pom_a4_an_srf_file' => ' pomff1_a4' ,
2272- ' pom_a4_bb_srf_file' => ' pombb1_a4' );
2273- } else {
2314+ if ($chem =~ / _mam4/ or $chem =~ / _mam5/ ) {
2315+
2316+ # Surface emission datasets:
22742317 %species = (%species ,
2275- ' pom_a4_an_srf_file' => ' pom_a4' ,
2276- ' pom_a4_bb_srf_file' => ' pom_a4' );
2318+ ' so4_a1_an_srf_file' => ' so4_a1' ,
2319+ ' so4_a1_bb_srf_file' => ' so4_a1' ,
2320+ ' so4_a2_an_srf_file' => ' so4_a2' ,
2321+ ' num_a1_sh_srf_file' => ' num_a1' ,
2322+ ' num_a1_bb_srf_file' => ' num_a1' ,
2323+ ' num_a2_an_srf_file' => ' num_a2' ,
2324+ ' bc_a4_an_srf_file' => ' bc_a4' ,
2325+ ' bc_a4_bb_srf_file' => ' bc_a4' ,
2326+ ' num_a4_bc_srf_file' => ' num_a4' ,
2327+ ' num_a4_oc_srf_file' => ' num_a4' ,
2328+ ' num_a4_bb_srf_file' => ' num_a4' ,
2329+ ' num_pom_bb_srf_file' => ' num_a4' );
2330+ if ((not defined $nl -> get_value(' csw_specifier' )) or (not $nl -> get_value(' csw_specifier' ) ~~ / DMS/ )) {
2331+ %species = (%species ,
2332+ ' dms_ot_srf_file' => ' DMS' );
2333+ }
2334+ if ($chem =~ / _vbsext/ ) {
2335+ %species = (%species ,
2336+ ' pom_a4_an_srf_file' => ' pomff1_a4' ,
2337+ ' pom_a4_bb_srf_file' => ' pombb1_a4' );
2338+ } else {
2339+ %species = (%species ,
2340+ ' pom_a4_an_srf_file' => ' pom_a4' ,
2341+ ' pom_a4_bb_srf_file' => ' pom_a4' );
2342+ }
22772343 }
22782344
22792345 # for old simple SOA schemes (without SOAE)
@@ -2430,7 +2496,7 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
24302496 }
24312497 }
24322498 }
2433- if ($chem !~ / geoschem/ ) {
2499+ if (( $chem !~ / geoschem/ ) and ( $chem ne ' none ' ) ) {
24342500 add_default($nl , ' srf_emis_specifier' , ' val' => $val );
24352501 unless (defined $nl -> get_value(' srf_emis_type' )) {
24362502 add_default($nl , ' srf_emis_type' , ' val' => ' CYCLICAL' );
@@ -2439,20 +2505,25 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
24392505 }
24402506
24412507 # Vertical emission datasets:
2442- %species = (' so2_cv_ext_file' => ' SO2' ,
2443- ' so4_a1_an_ext_file' => ' so4_a1' ,
2444- ' so4_a1_cv_ext_file' => ' so4_a1' ,
2445- ' so4_a2_cv_ext_file' => ' so4_a2' ,
2446- ' num_a1_an_ext_file' => ' num_a1' ,
2447- ' num_a1_cv_ext_file' => ' num_a1' ,
2448- ' num_a2_cv_ext_file' => ' num_a2' ,
2508+ %species = (' so2_cv_ext_file' => ' SO2' );
2509+ if ($chem =~ / _mam4/ or $chem =~ / _mam5/ ) {
2510+ %species = (%species ,
2511+ ' so4_a1_an_ext_file' => ' so4_a1' ,
2512+ ' so4_a1_cv_ext_file' => ' so4_a1' ,
2513+ ' so4_a2_cv_ext_file' => ' so4_a2' ,
2514+ ' num_a1_an_ext_file' => ' num_a1' ,
2515+ ' num_a1_cv_ext_file' => ' num_a1' ,
2516+ ' num_a2_cv_ext_file' => ' num_a2' ,
24492517 );
2450-
2518+ }
24512519 # air craft emissions
24522520 if ($chem !~ / trop_mam/ and $chem !~ / ghg_mam/ and $chem !~ / waccm_sc/ ) {
2453- %species = (%species ,
2521+ if ($chem !~ / _noaer/ ) {
2522+ %species = (%species ,
24542523 ' bc_a4_ar_ext_file' => ' bc_a4' ,
2455- ' num_a4_ar_ext_file' => ' num_a4' ,
2524+ ' num_a4_ar_ext_file' => ' num_a4' );
2525+ }
2526+ %species = (%species ,
24562527 ' no2_ar_ext_file' => ' NO2' ,
24572528 ' so2_ar_ext_file' => ' SO2' );
24582529 } elsif ($chem =~ / ghg_mam/ ) {
@@ -2463,8 +2534,8 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
24632534 }
24642535
24652536 # for transient cases include volcanic emissions
2466- if ( ($nl -> get_value(' modal_strat_sulfate' ) =~ / $TRUE /io ) and
2467- (defined $nl -> get_value(' ext_frc_type' )) ) {
2537+ if ( (( $nl -> get_value(' modal_strat_sulfate' ) =~ / $TRUE /io ) or ( $carma eq ' trop_strat ' ))
2538+ and (defined $nl -> get_value(' ext_frc_type' )) ) {
24682539 if ( $nl -> get_value(' ext_frc_type' ) !~ / CYCLICAL/ ) {
24692540 my $hgrid = $cfg -> get(' hgrid' );
24702541 if ($hgrid =~ / 1.9x2.5/ ) {
@@ -2501,7 +2572,7 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
25012572 $first = 0;
25022573 }
25032574 }
2504- if ($chem !~ / geoschem/ ) {
2575+ if (( $chem !~ / geoschem/ ) and ( $chem ne ' none ' ) ) {
25052576 add_default($nl , ' ext_frc_specifier' , ' val' => $val );
25062577 unless (defined $nl -> get_value(' ext_frc_type' )) {
25072578 add_default($nl , ' ext_frc_type' , ' val' => " 'CYCLICAL'" );
@@ -2526,7 +2597,7 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
25262597 add_default($nl , ' megan_factors_file' );
25272598 add_default($nl , ' megan_mapped_emisfctrs' , ' val' => ' .false.' );
25282599 }
2529- if ($chem =~ / trop_strat_mam4_vbsext/ or $chem =~ / waccm_tsmlt/ ) {
2600+ if ($chem =~ / trop_strat_mam4_vbsext/ or $chem =~ / trop_strat_noaero / or $chem =~ / waccm_tsmlt/ ) {
25302601 my $val = " 'ISOP = isoprene',"
25312602 . " 'MTERP = pinene_a + carene_3 + thujene_a + 2met_styrene + cymene_p + cymene_o + terpinolene + bornene +'"
25322603 . " ' fenchene_a + ocimene_al + pinene_b + sabinene + camphene + limonene + phellandrene_a + terpinene_g +'"
@@ -3310,7 +3381,7 @@ add_default($nl, 'microp_aero_wsubi_min');
33103381
33113382# Ice nucleation options
33123383if (!$simple_phys ) {
3313- if ($chem =~ / _mam/ ) {
3384+ if ($chem =~ / _mam/ or $carma =~ / trop_strat / ) {
33143385 add_default($nl , ' use_hetfrz_classnuc' );
33153386 } else {
33163387 add_default($nl , ' use_hetfrz_classnuc' , ' val' => ' .false.' );
@@ -3577,6 +3648,10 @@ if ($chem =~ /_mam/) {
35773648 add_default($nl , ' sol_factb_interstitial' );
35783649 add_default($nl , ' sol_factic_interstitial' );
35793650}
3651+ if ($carma =~ / trop_strat/ ) {
3652+ add_default($nl , ' sol_facti_cloud_borne' );
3653+ add_default($nl , ' sol_factic_interstitial' );
3654+ }
35803655
35813656# Turbulent Mountain Stress
35823657my $do_tms ;
@@ -4927,7 +5002,7 @@ sub check_input_files {
49275002 my @vars = qw( aircraft_specifier csw_specifier ext_frc_specifier
49285003 rad_climate rad_diag_1 rad_diag_2 rad_diag_3 rad_diag_4
49295004 rad_diag_5 rad_diag_6 rad_diag_7 rad_diag_8 rad_diag_9
4930- rad_diag_10 srf_emis_specifier mode_defs) ;
5005+ rad_diag_10 srf_emis_specifier mode_defs bin_defs ) ;
49315006
49325007 foreach my $var (@vars ) {
49335008
@@ -4987,11 +5062,11 @@ sub check_input_files {
49875062 }
49885063 }
49895064 }
4990- # Look for values that begin with 'X:name:name2' where X is one of [AMN ]
5065+ # Look for values that begin with 'X:name:name2' where X is one of [ABMN ]
49915066 # Extract name and filename
4992- elsif ($spec =~ m / ^\s *[AMN ] :(\w +) # name of species preceded by optional whitespace and X:
4993- : # : separator
4994- (\S +) # name2
5067+ elsif ($spec =~ m / ^\s *[ABMN ] :(\w +) # name of species preceded by optional whitespace and X:
5068+ : # : separator
5069+ (\S +) # name2
49955070 / xo ) {
49965071 my $name = $1 ;
49975072 my $name2 = $2 ;
@@ -5022,9 +5097,14 @@ sub check_input_files {
50225097 my @flds = split /:/, $name2 ;
50235098 if (scalar (@flds ) >= 4) {
50245099
5100+ my $file ;
50255101 if ($flds [3] =~ m : ^[/\$ ] : ) {
5026-
5027- my $file = $flds [3];
5102+ $file = $flds [3];
5103+ }
5104+ elsif ($flds [4] =~ m : ^[/\$ ] : ) {
5105+ $file = $flds [4];
5106+ }
5107+ if (defined $file ) {
50285108 if ($inputdata_rootdir ) {
50295109 print $fh " $var for $name = $file \n " ;
50305110 }
0 commit comments