Skip to content

Commit

Permalink
Merge pull request #1 from annefou/cam_cesm2_1_rel_05-Nor
Browse files Browse the repository at this point in the history
Cam cesm2 1 rel 05 nor
  • Loading branch information
DirkOlivie authored Mar 18, 2020
2 parents 9816b5d + 42ee097 commit d05c7f1
Show file tree
Hide file tree
Showing 696 changed files with 273,109 additions and 669 deletions.
4 changes: 4 additions & 0 deletions SVN_EXTERNAL_DIRECTORIES
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
chem_proc https://svn-ccsm-models.cgd.ucar.edu/tools/proc_atm/chem_proc/release_tags/chem_proc5_0_03_rel
src/physics/carma/base https://svn-ccsm-models.cgd.ucar.edu/carma/release_tags/carma3_49_rel
src/physics/clubb https://svn-ccsm-models.cgd.ucar.edu/clubb_core/release_tags/clubb_r8099_n02_rel
src/physics/cosp2/src https://github.com/CFMIP/COSPv2.0/tags/v2.0.3cesm/src
12 changes: 2 additions & 10 deletions bld/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,11 @@ CURDIR := $(shell pwd)

# Generate Make dependencies.
$(CURDIR)/Depends: $(CURDIR)/Srcfiles $(CURDIR)/Filepath
if [ -d "${ROOTDIR}/components/cam" ]; then \
$(ROOTDIR)/components/cam/bld/mkDepends Filepath Srcfiles > $@; \
else \
$(ROOTDIR)/bld/mkDepends Filepath Srcfiles > $@; \
fi
$(ROOTDIR)/components/cam/bld/mkDepends Filepath Srcfiles > $@

# Generate list of source files.
$(CURDIR)/Srcfiles: $(CURDIR)/Filepath
if [ -d "${ROOTDIR}/components/cam" ]; then \
$(ROOTDIR)/components/cam/bld/mkSrcfiles -e $(EXCLUDE_SOURCES) > $@; \
else \
$(ROOTDIR)/bld/mkSrcfiles -e $(EXCLUDE_SOURCES) > $@; \
fi
$(ROOTDIR)/components/cam/bld/mkSrcfiles -e $(EXCLUDE_SOURCES) > $@

OBJS := $(addsuffix .o, $(basename $(SOURCES)))

Expand Down
134 changes: 132 additions & 2 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ add_default($nl, 'ninst_driver', 'val'=>'1');
# namelist group: seq_cplflds_inparm #
######################################
add_default($nl, 'flds_co2_dmsa', 'val'=>'.false.');
add_default($nl, 'flds_co2_dmsb', 'val'=>'.false.');
add_default($nl, 'flds_co2a', 'val'=>'.true.');
add_default($nl, 'flds_co2b', 'val'=>'.false.');
add_default($nl, 'flds_co2c', 'val'=>'.false.');
Expand Down Expand Up @@ -694,6 +695,11 @@ if ($cfg->get('debug')) {
my $prescribe_aerosols = $TRUE;
if ($simple_phys) {$prescribe_aerosols = $FALSE;}

if( $chem =~ /_oslo/){
$prescribe_aerosols = $FALSE;
print " ==> Using Oslo aerosols: PRESCRIBED AERO = FALSE (not yet implemented) \n"
}

# Chemistry deposition lists
if ( ($chem ne 'none') or ( $prog_species ) ){
my $chem_proc_src = $cfg->get('chem_proc_src');
Expand Down Expand Up @@ -1055,7 +1061,12 @@ else {
my $aer_model = 'bam';
if ($prescribed_aero_model eq 'modal' or $chem =~ /_mam/) {$aer_model = 'mam';}

if ($aer_model eq 'mam' ) {
if ($chem =~ /_mam_oslo/) {$aer_model = 'oslo';}

if ($aer_model eq 'oslo') {
#do nothing here
}
elsif ($aer_model eq 'mam' ) {

my $aero_modes = '3mode';
if ($chem =~ /_mam7/) {$aero_modes = '7mode';}
Expand Down Expand Up @@ -1646,7 +1657,8 @@ elsif ($carma eq 'tholin') {

# turn on stratospheric aerosol forcings in CAM6 configurations
my $chem_has_ocs = chem_has_species($cfg, 'OCS');
if ($phys =~ /cam6/) {
# djlo
if ($phys =~ /cam6/ and $chem ne 'trop_mam_oslo') {
# turn on volc forcings in cam6 -- prognostic or prescribed
if ( $chem_has_ocs ) {
# turn on prognostic stratospheric aerosols
Expand Down Expand Up @@ -2220,6 +2232,93 @@ if ($chem eq 'trop_mam3') {
}
}

if ($chem eq 'trop_mam_oslo' ) {

my %species;

# Surface emission datasets:
%species = ();
%species = (%species,
'DMS -> ' => 'dms_oslo_emis_file',
'SO2 -> ' => 'so2_oslo_emis_file',
'BC_AX -> ' => 'bc_ax_oslo_emis_file',
'BC_N -> ' =>'bc_n_oslo_emis_file',
'BC_NI -> ' =>'bc_ni_oslo_emis_file',
'SO4_PR -> ' =>'so4_pr_oslo_emis_file',
'OM_NI -> ' =>'om_ni_oslo_emis_file',
'monoterp -> ' => 'monoterp_oslo_emis_file',
'isoprene -> ' => 'isoprene_oslo_emis_file',
);

my $first = 1;
my $pre = "";
my $val = "";
foreach my $id (sort keys %species) {
my $rel_filepath = get_default_value($species{$id} );
my $abs_filepath = set_abs_filepath($rel_filepath, $inputdata_rootdir);
$val .= $pre . quote_string($id . $abs_filepath);
if ($first) {
$pre = ",";
$first = 0;
}
}
add_default($nl, 'srf_emis_specifier', 'val'=>$val);
unless (defined $nl->get_value('srf_emis_type')) {
add_default($nl, 'srf_emis_type', 'val'=>'CYCLICAL');
add_default($nl, 'srf_emis_cycle_yr', 'val'=>'2000');
}

# Vertical emission datasets:
%species = ();
%species = ('SO2 -> ' => 'so2_oslo_ext_file',
'BC_AX -> ' => 'bc_ax_oslo_ext_file',
'BC_N -> ' => 'bc_n_oslo_ext_file',
'BC_NI -> ' => 'bc_ni_oslo_ext_file',
'OM_NI -> ' => 'om_ni_oslo_ext_file',
'SO4_PR -> ' => 'so4_pr_oslo_ext_file');

$first = 1;
$pre = "";
$val = "";
foreach my $id (sort keys %species) {
my $rel_filepath = get_default_value($species{$id} );
my $abs_filepath = set_abs_filepath($rel_filepath, $inputdata_rootdir);
$val .= $pre . quote_string($id . $abs_filepath);
if ($first) {
$pre = ",";
$first = 0;
}
}
add_default($nl, 'ext_frc_specifier', 'val'=>$val);
unless (defined $nl->get_value('ext_frc_type')) {
add_default($nl, 'ext_frc_type', 'val'=>"'CYCLICAL'");
add_default($nl, 'ext_frc_cycle_yr', 'val'=>'2000');
}

# Prescribed species
add_default($nl, 'tracer_cnst_specifier', 'val'=>"'O3','OH','NO3','HO2'");
unless (defined $nl->get_value('tracer_cnst_type')) {
add_default($nl, 'tracer_cnst_type', 'ver'=>'fixed_ox');
add_default($nl, 'tracer_cnst_cycle_yr','ver'=>'fixed_ox');
}

my @files = ('tracer_cnst_datapath', 'tracer_cnst_file', 'tracer_cnst_filelist');
foreach my $file (@files) {
add_default($nl, $file, 'ver'=>'fixed_ox');
}

add_default($nl, 'fstrat_list', 'val'=>"' '");
add_default($nl, 'flbc_list', 'val'=>"' '");
add_default($nl, 'xactive_prates', 'val'=>'.false.');

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
foreach my $file (@files) {
add_default($nl, $file);
}
}

# CMIP6 emissions
if ($chem =~ /_mam4/ and $phys =~ /cam6/) {
my %species;
Expand Down Expand Up @@ -2778,6 +2877,36 @@ $nl->set_variable_value('phys_ctl_nl', 'use_simple_phys', $use_simple_phys);
# WACCM-X runtime options
add_default($nl, 'waccmx_opt');

#Cam-Oslo options
#++djlo++
add_default($nl, 'volc_fraction_coarse');
add_default($nl, 'aerotab_table_dir');
add_default($nl, 'ocean_filepath');
add_default($nl, 'dms_source');
add_default($nl, 'opom_source');
#add_default($nl, 'dms_source_type');
#add_default($nl, 'dms_cycle_year');
#add_default($nl, 'ocean_filename');
#add_default($nl, 'ocean_filepath');
#add_default($nl, 'opom_source');
unless (defined $nl->get_value('ocean_filename')) {
add_default($nl, 'ocean_filename');
}
unless (defined $nl->get_value('opom_source_type')) {
add_default($nl, 'opom_source_type');
add_default($nl, 'opom_cycle_year');
}
unless (defined $nl->get_value('dms_source_type')) {
add_default($nl, 'dms_source_type');
add_default($nl, 'dms_cycle_year');
}
#add_default($nl, 'opom_source_type');

#add_default($nl, 'opom_cycle_year');
#--djlo--

if ($chem =~ /_mam_oslo/) {$nl->set_variable_value('phys_ctl_nl','use_hetfrz_classnuc','.true.');}

if ($waccmx) {
my $wmx_opt = $nl->get_value('waccmx_opt');
my $ionos = $cfg->get('ionosphere');
Expand Down Expand Up @@ -2892,6 +3021,7 @@ add_default($nl, 'srf_flux_avg', 'val'=>0);
add_default($nl, 'use_subcol_microp');
add_default($nl, 'microp_scheme');


if ($cfg->get('microphys') =~ /^mg/) {
add_default($nl, 'micro_mg_version');
add_default($nl, 'micro_mg_sub_version');
Expand Down
11 changes: 4 additions & 7 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ CAM build directory; contains .o and .mod files.
Directory where CAM executable will be created.
</entry>
<entry id="cam_root" value="">
Root directory of CAM source distribution
</entry>
<entry id="cam_dir" value="">
Root directory of CAM model source..
Root directory of CAM source distribution.
</entry>
<entry id="usr_src" value="" list="1">
User source directories to prepend to the filepath. Multiple directories
Expand Down Expand Up @@ -91,8 +88,8 @@ meteor_smoke (Meteor Smoke), mixed_sulfate (Meteor Smoke and Sulfate), pmc (Pola
sulfate (Sulfate Aerosols), tholin (early earth haze), test_detrain (Detrainment), test_growth (Particle Growth), test_passive (Passive Dust),
test_radiative (Radiatively Active Dust), test_swelling (Sea Salt), test_tracers (Asian Monsoon), test_tracers2 (Guam).
</entry>
<entry id="chem" valid_values="trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,waccm_ma,waccm_mad,waccm_mad_mam4,waccm_ma_mam4,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_tsmlt_mam4,terminator,none" value="">
Chemistry package: trop_mam3 trop_mam4 trop_mam7 trop_mozart trop_strat_mam4_vbs trop_strat_mam4_vbsext waccm_ma waccm_mad waccm_mad_mam4 waccm_ma_mam4 waccm_ma_sulfur waccm_sc waccm_sc_mam4 waccm_tsmlt_mam4 terminator none
<entry id="chem" valid_values="trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,waccm_ma,waccm_mad,waccm_mad_mam4,waccm_ma_mam4,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_tsmlt_mam4,terminator,trop_mam_oslo,none" value="">
Chemistry package: trop_mam3 trop_mam4 trop_mam7 trop_mozart trop_strat_mam4_vbs trop_strat_mam4_vbsext waccm_ma waccm_mad waccm_mad_mam4 waccm_ma_mam4 waccm_ma_sulfur waccm_sc waccm_sc_mam4 waccm_tsmlt_mam4 terminator trop_mam_oslo none
</entry>
<entry id="prog_species" valid_values="DST,SSLT,SO4,GHG,OC,BC,CARBON16" value="" list="1">
Prognostic mozart species packages: list of any subset of the following: DST,SSLT,SO4,GHG,OC,BC,CARBON16
Expand All @@ -115,7 +112,7 @@ Chemistry source directory generated by the chemistry preprocessor; contains F90
<entry id="chem_src_dir" value="">
Chemistry source directory; contains F90 files.
</entry>
<entry id="ocn" valid_values="docn,dom,som,socn,aquaplanet,pop" value="docn">
<entry id="ocn" valid_values="docn,dom,som,socn,aquaplanet,pop,micom" value="docn">
Use data ocean model (docn or dom), stub ocean (socn), or aqua planet ocean
(aquaplanet) in cam build. When built from the CESM scripts the value of
ocn may be set to pop. This doesn't impact how CAM is built, only how
Expand Down
Loading

0 comments on commit d05c7f1

Please sign in to comment.