@@ -540,7 +540,7 @@ my $rad_prog_bcarb = (($prog_species =~ "BC" or $aero_chem) and !($chem_rad_pa
540
540
my $rad_prog_sulf = (($prog_species =~ " SO4" or $aero_chem ) and !($chem_rad_passive ));
541
541
my $rad_prog_dust = (($prog_species =~ " DST" or $aero_chem ) and !($chem_rad_passive ));
542
542
my $rad_prog_sslt = (($prog_species =~ " SSLT" or $aero_chem ) and !($chem_rad_passive ));
543
- my $rad_prog_ozone = (($chem =~ " mozart" or $chem =~ " waccm_ma" or $chem =~ " tsmlt" or $chem =~ " trop_strat" ) and !($chem_rad_passive ));
543
+ my $rad_prog_ozone = (($chem =~ " mozart" or $chem =~ " waccm_ma" or $chem =~ " tsmlt" or $chem =~ " trop_strat" or $chem =~ / geoschem / ) and !($chem_rad_passive ));
544
544
545
545
# Check for eruptive volcano emissions. These will be radiatively active by default, but
546
546
# only if using BAM and the camrt radiation package
@@ -576,12 +576,13 @@ if ( ($chem ne 'none') or ( $prog_species ) ){
576
576
577
577
my ( $gas_wetdep_list , $aer_wetdep_list , $aer_sol_facti , $aer_sol_factb , $aer_scav_coef ,
578
578
$aer_drydep_list , $gas_drydep_list ) =
579
- set_dep_lists( $cfgdir , $chem_proc_src , $chem_src_dir , $nl , $print );
579
+ set_dep_lists( $chem , $ cfgdir , $chem_proc_src , $chem_src_dir , $nl , $print );
580
580
581
581
if (length ($gas_wetdep_list )>2){
582
582
add_default($nl , ' gas_wetdep_method' );
583
583
add_default($nl , ' gas_wetdep_list' , ' val' => $gas_wetdep_list );
584
584
}
585
+
585
586
if (length ($aer_wetdep_list )>2){
586
587
# determine if prescribed aerosols are not needed ...
587
588
if ($aer_wetdep_list =~ / so4/i &&
@@ -862,7 +863,7 @@ my $radval = "'A:Q:H2O'";
862
863
if (($chem =~ / waccm_ma/ or $chem =~ / waccm_tsmlt/ ) and !$chem_rad_passive ) {
863
864
$radval .= " ,'A:O2:O2','A:CO2:CO2'" ;
864
865
}
865
- elsif ($chem =~ / trop_strat/ and !$chem_rad_passive ) {
866
+ elsif (( $chem =~ / trop_strat/ or $chem =~ / geoschem / ) and !$chem_rad_passive ) {
866
867
$radval .= " ,'N:O2:O2','A:CO2:CO2'" ;
867
868
}
868
869
elsif (($co2_cycle and !$co2_cycle_rad_passive ) or ($chem =~ / ghg_mam4/ )) {
@@ -897,6 +898,8 @@ if ((($chem =~ /ghg_mam4/) or ($chem =~ /waccm_ma/) or ($chem =~ /waccm_sc_mam/)
897
898
$radval .= " ,'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'" ;
898
899
} elsif ($prog_ghg1 and !$prog_ghg2 and !$chem_rad_passive ) {
899
900
$radval .= " ,'A:N2O:N2O','A:CH4:CH4','N:CFC11:CFC11','N:CFC12:CFC12'" ;
901
+ } elsif ($chem =~ / geoschem/ ) {
902
+ $radval .= " ,'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'" ;
900
903
} else {
901
904
$radval .= " ,'N:N2O:N2O','N:CH4:CH4','N:CFC11:CFC11','N:CFC12:CFC12'" ;
902
905
}
@@ -2018,6 +2021,34 @@ if (($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/)
2018
2021
}
2019
2022
}
2020
2023
2024
+ if ($chem =~ / geoschem/ ) {
2025
+
2026
+ my $val ;
2027
+
2028
+ # Species with fixed lower boundary
2029
+ $val = " 'CCL4','CH4','N2O','CO2','CFC11','CFC12','CH3BR','CH3CCL3','CH3CL'"
2030
+ ." ,'HCFC22','CFC114','CFC115','HCFC141B','HCFC142B','CH2BR2','CHBR3','H2402'" ;
2031
+
2032
+ if ($chem_has_ocs ) {
2033
+ $val .= " ,'OCS'" ;
2034
+ }
2035
+ if (chem_has_species($cfg , ' SF6' )) {
2036
+ $val .= " ,'SF6'" ;
2037
+ }
2038
+ add_default($nl , ' flbc_list' , ' val' => $val );
2039
+ unless (defined $nl -> get_value(' flbc_type' )) {
2040
+ add_default($nl , ' flbc_type' , ' val' => ' CYCLICAL' );
2041
+ add_default($nl , ' flbc_cycle_yr' , ' val' => ' 2000' );
2042
+ }
2043
+
2044
+ my @files ;
2045
+ # Datasets
2046
+ @files = ( ' soil_erod_file' , ' flbc_file' );
2047
+ foreach my $file (@files ) {
2048
+ add_default($nl , $file );
2049
+ }
2050
+ }
2051
+
2021
2052
if ($chem =~ / trop_mozart/ or $chem =~ / trop_strat/ or $chem =~ / waccm_tsmlt/ ) {
2022
2053
2023
2054
my $val ;
@@ -2364,10 +2395,12 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
2364
2395
}
2365
2396
}
2366
2397
}
2367
- add_default($nl , ' srf_emis_specifier' , ' val' => $val );
2368
- unless (defined $nl -> get_value(' srf_emis_type' )) {
2369
- add_default($nl , ' srf_emis_type' , ' val' => ' CYCLICAL' );
2370
- add_default($nl , ' srf_emis_cycle_yr' , ' val' => 2000);
2398
+ if ($chem !~ / geoschem/ ) {
2399
+ add_default($nl , ' srf_emis_specifier' , ' val' => $val );
2400
+ unless (defined $nl -> get_value(' srf_emis_type' )) {
2401
+ add_default($nl , ' srf_emis_type' , ' val' => ' CYCLICAL' );
2402
+ add_default($nl , ' srf_emis_cycle_yr' , ' val' => 2000);
2403
+ }
2371
2404
}
2372
2405
2373
2406
# Vertical emission datasets:
@@ -2433,10 +2466,12 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
2433
2466
$first = 0;
2434
2467
}
2435
2468
}
2436
- add_default($nl , ' ext_frc_specifier' , ' val' => $val );
2437
- unless (defined $nl -> get_value(' ext_frc_type' )) {
2438
- add_default($nl , ' ext_frc_type' , ' val' => " 'CYCLICAL'" );
2439
- add_default($nl , ' ext_frc_cycle_yr' , ' val' => 2000);
2469
+ if ($chem !~ / geoschem/ ) {
2470
+ add_default($nl , ' ext_frc_specifier' , ' val' => $val );
2471
+ unless (defined $nl -> get_value(' ext_frc_type' )) {
2472
+ add_default($nl , ' ext_frc_type' , ' val' => " 'CYCLICAL'" );
2473
+ add_default($nl , ' ext_frc_cycle_yr' , ' val' => 2000);
2474
+ }
2440
2475
}
2441
2476
2442
2477
# MEGAN emissions
@@ -2482,6 +2517,30 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
2482
2517
add_default($nl , ' megan_factors_file' );
2483
2518
add_default($nl , ' megan_mapped_emisfctrs' , ' val' => ' .false.' );
2484
2519
}
2520
+ if ($chem =~ / geoschem/ ) {
2521
+ my $val = " 'ISOP = isoprene',"
2522
+ . " 'MOH = methanol',"
2523
+ . " 'EOH = ethanol',"
2524
+ . " 'CH2O = formaldehyde',"
2525
+ . " 'ALD2 = acetaldehyde',"
2526
+ . " 'ACTA = acetic_acid',"
2527
+ . " 'ACET = acetone',"
2528
+ . " 'HCOOH = formic_acid',"
2529
+ . " 'HCN = hydrogen_cyanide',"
2530
+ . " 'CO = carbon_monoxide',"
2531
+ . " 'C2H6 = ethane',"
2532
+ . " 'C2H4 = ethene',"
2533
+ . " 'C3H8 = propane',"
2534
+ . " 'ALK4 = pentane + hexane + heptane + tricyclene',"
2535
+ . " 'PRPE = propene + butene',"
2536
+ . " 'TOLU = toluene',"
2537
+ . " 'LIMO = limonene',"
2538
+ . " 'MTPA = pinene_a + pinene_b + sabinene + carene_3',"
2539
+ . " 'MTPO = terpinene_g + terpinene_a + terpinolene + myrcene + ocimene_al + ocimene_t_b + ocimene_c_b + thujene_a + 2met_styrene + cymene_p + cymene_o + bornene + fenchene_a + camphene + phellandrene_a + phellandrene_b'" ;
2540
+ add_default($nl , ' megan_specifier' , ' val' => $val );
2541
+ add_default($nl , ' megan_factors_file' );
2542
+ add_default($nl , ' megan_mapped_emisfctrs' , ' val' => ' .false.' );
2543
+ }
2485
2544
if ($chem =~ / trop_strat_mam4_vbs/ or $chem =~ / trop_strat_mam5_vbs/ ) {
2486
2545
my $val = " 'ISOP = isoprene',"
2487
2546
. " 'MTERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a "
@@ -2897,6 +2956,29 @@ if ($nl->get_value('use_hemco') =~ m/$TRUE/io) {
2897
2956
# ignored at runtime when HEMCO is used.
2898
2957
$nl -> delete_variable(' chem_inparm' , ' ext_frc_specifier' );
2899
2958
$nl -> delete_variable(' chem_inparm' , ' srf_emis_specifier' );
2959
+
2960
+ if ($chem =~ / geoschem/ ) {
2961
+
2962
+ # For now, HEMCO config and diagnostic configuration files are always used from
2963
+ # the case directory. Exit if user has specified other paths in the user namelist
2964
+ # because it will not work.
2965
+ if ($nl -> get_value(' hemco_config_file' ) ne " '" . $inputdata_rootdir . " /HEMCO_Config.rc'" ) {
2966
+ die " CAM Namelist ERROR: When running with GEOS-Chem chemistry, hemco_config_file\n " .
2967
+ " must not be manually set in the namelist. Instead, modify (or symlink from) the HEMCO_Config.rc\n " .
2968
+ " in the case directory, which will be copied to the run directory when submitting.\n " .
2969
+ " Then remove the hemco_config_file option from the user namelist.\n " ;
2970
+ }
2971
+
2972
+ if ($nl -> get_value(' hemco_diagn_file' ) ne " '" . $inputdata_rootdir . " /HEMCO_Diagn.rc'" ) {
2973
+ die " CAM Namelist ERROR: When running with GEOS-Chem chemistry, hemco_diagn_file\n " .
2974
+ " must not be manually set in the namelist. Instead, modify (or symlink from) the HEMCO_Diagn.rc\n " .
2975
+ " in the case directory, which will be copied to the run directory when submitting.\n " .
2976
+ " Then remove the hemco_diagn_file option from the user namelist.\n " ;
2977
+ }
2978
+
2979
+ $nl -> set_variable_value(' hemco_nl' , ' hemco_config_file' , " 'HEMCO_Config.rc'" );
2980
+ $nl -> set_variable_value(' hemco_nl' , ' hemco_diagn_file' , " 'HEMCO_Diagn.rc'" );
2981
+ }
2900
2982
}
2901
2983
2902
2984
# Physics options
@@ -3025,7 +3107,7 @@ if (!$simple_phys) {
3025
3107
}
3026
3108
3027
3109
# tropopause level used in gas-phase / aerosol processes
3028
- if (($chem ne ' none' ) and ($chem ne ' terminator' )) {
3110
+ if (($chem ne ' none' ) and ($chem ne ' terminator' ) and !( $chem =~ / geoschem / ) ) {
3029
3111
add_default($nl , ' chem_use_chemtrop' );
3030
3112
}
3031
3113
@@ -3562,7 +3644,7 @@ if ( length($nl->get_value('soil_erod_file'))>0 ) {
3562
3644
add_default($nl , ' dust_emis_fact' , ' tms' => ' 1' );
3563
3645
}
3564
3646
else {
3565
- if ($chem =~ / trop_strat/ or $chem =~ / waccm_ma/ or $chem =~ / waccm_tsmlt/ or $chem =~ / trop_mozart/ ) {
3647
+ if ($chem =~ / trop_strat/ or $chem =~ / geoschem / or $chem =~ / waccm_ma/ or $chem =~ / waccm_tsmlt/ or $chem =~ / trop_mozart/ ) {
3566
3648
add_default($nl , ' dust_emis_fact' , ' ver' => ' chem' );
3567
3649
}
3568
3650
else {
0 commit comments