Skip to content

Commit

Permalink
Merge pull request NCAR#125 from grantfirl/v3.0_to_merge_with_master
Browse files Browse the repository at this point in the history
Merge v3.0 with master
  • Loading branch information
grantfirl authored Jul 30, 2019
2 parents 818f706 + d73c208 commit 801bade
Show file tree
Hide file tree
Showing 125 changed files with 2,476 additions and 43,872 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ scm/bin/*
*.pyc
.metadata
non-tracked_files/
scm/data/GFS_physics_data/qr_acr*.dat
scm/data/GFS_physics_data/freezeH2O.dat
scm/data/physics_input_data/qr_acr*.dat
scm/data/physics_input_data/freezeH2O.dat
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# User's Guide

A more complete User's Guide can be found at https://dtcenter.org/GMTB/v3.0/scm-ccpp-guide-v3.pdf. If the instructions in this README and the more complete User's Guide differ, the linked guide should be more up-to-date and accurate.

This guide provides instructions for obtaining, compiling and running a simple
case for the GMTB single column model (SCM). The SCM code calls CCPP-compliant
physics schemes through the CCPP infrastructure code. As such, it requires the
Expand All @@ -17,31 +19,31 @@ These libraries are prebuilt on most NOAA machines using the Intel compiler. For
1. `cd /usr/local/src`
2. `git clone https://github.com/NCAR/NCEPlibs.git`
3. `cd NCEPlibs`
4. `./make_ncep_libs.sh -s macosx -c gnu -d /usr/local/NCEPlibs -o 1`
4. `./make_ncep_libs.sh -s macosx -c gnu -d /usr/local/NCEPlibs -o 1 -m 0`

Once NCEPlibs is built, the NCEPLIBS_DIR environment variable must be set to the location of the installation. For example, if NCEPlibs was installed in /usr/local/NCEPlibs, one would execute
Note that the option `-m 0` can be used if MPI is not installed on the machine that is being used. The nemsio library will not be installed, however, since it requires MPI. Once NCEPlibs is built, the NCEPLIBS_DIR environment variable must be set to the location of the installation. For example, if NCEPlibs was installed in /usr/local/NCEPlibs, one would execute

`export NCEPLIB_DIR=/usr/local/NCEPlibs`
`export NCEPLIBS_DIR=/usr/local/NCEPlibs`

If using Theia or Cheyenne HPC systems, this environment variable is automatically set to an appropriate installation of NCEPlibs on those machines through use of one of the setup scripts described below.

## Obtaining Code
1. Download a compressed file or clone the source using
* `git clone https://[username]@github.com/NCAR/gmtb-scm.git`
and enter your github password when prompted.

For obtaining the last stable release, execute the following:

1. Clone the source using:
* `git clone --recursive -b v3.0 https://github.com/NCAR/gmtb-scm`
2. Change directory into the project.
* `cd gmtb-scm`
3. Checkout the master branch.
* `git checkout master`
4. Initialize the CCPP infrastructure and physics submodules.
* `git submodule init`
5. Update (download) the submodules.
* `git submodule update`
and, if asked, enter your github credentials again. If the machine is running an older
version of git and you are denied access, you may need to configure the
submodule URLs before repeating step 4 by executing this command:
* `git config submodule.ccpp-framework.url https://[username]@github.com/NCAR/ccpp-framework.git`
* `git config submodule.ccpp-physics.url https://[username]@github.com/NCAR/ccpp-physics.git`

For working with the development branches, after executing the steps above, check out the master branches of the repository (and submodules):

1. `git checkout master`
2. `cd ccpp/physics`
3. `git checkout master`
4. `cd ../framework`
5. `git checkout master`
6. `cd ../..`

## Building and Compiling the SCM with CCPP
1. Run the CCPP prebuild script to match required physics variables with those
Expand Down Expand Up @@ -81,3 +83,15 @@ compiler environment variables.
* When invoking the run script, the only required argument is the name of the case to run. The case name used must match one of the case configuration files located in ../etc/case_config (without the .nml extension!). If specifying a suite other than the default, the suite name used must match the value of the suite name in one of the suite definition files located in ../../ccpp/suites, (e.g. `SCM_GFS_v15`). If specifying a namelist other than the default, the value must be an entire filename that exists in ../../ccpp/physics_namelists. The -g flag can be used to run the executable through the gdb debugger (assuming it is installed on the system).
2. A netcdf output file is generated in the location specified in the case
configuration file (is present), or in an output directory created by default in `bin` with the case name and suite name appended.

## Running the SCM with FV3GFS initial conditions
model initial conditions are needed to initialize the land surface in order to run with an interactive land model
1. Prepare model initial conditions.
* `cd to scm/etc/scripts/`
modify path to files you can read in extract_FV3GFS_column_ic.py, this is set up for C96
2. run extract_FV3GFS_column_ic.py, it will create fv3_model_point.nc in ../../data/processed_case_input/
* `./extract_FV3GFS_column_ic.py`
3. cd to bin directory
* `cd ../../bin/`
4. Run the SCM with the fv3_model_point case and C96 namelist
* `./run_gmtb_scm.py -c fv3_model_point -n input_GFS_v15_C96.nml`
54 changes: 27 additions & 27 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'ccpp/physics/physics/cldmacro.F',
'ccpp/physics/physics/date_def.f',
'ccpp/physics/physics/funcphys.f90',
'ccpp/physics/physics/gfs_phy_tracer_config.f',
'ccpp/physics/physics/gfs_phy_tracer_config.F',
'ccpp/physics/physics/gocart_tracer_config_stub.f',
'ccpp/physics/physics/h2o_def.f',
'ccpp/physics/physics/h2ointerp.f90',
Expand Down Expand Up @@ -79,11 +79,11 @@
'ccpp/physics/physics/cu_gf_deep.F90',
'ccpp/physics/physics/cu_gf_sh.F90',
'ccpp/physics/physics/tridi.f',
'ccpp/physics/physics/wv_saturation.F',
'ccpp/physics/physics/module_sf_ruclsm.F90',
'ccpp/physics/physics/namelist_soilveg_ruc.F90',
'ccpp/physics/physics/set_soilveg_ruc.F90',
'ccpp/physics/physics/module_soil_pre.F90',
'ccpp/physics/physics/wv_saturation.F',
'scm/src/GFS_typedefs.F90'
]

Expand Down Expand Up @@ -188,31 +188,31 @@
# or a list of standard_names: [ 'var1', 'var3' ].
OPTIONAL_ARGUMENTS = {
'rrtmg_sw' : {
'rrtmg_sw_run' : [
'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step',
'components_of_surface_downward_shortwave_fluxes',
'cloud_liquid_water_path',
'mean_effective_radius_for_liquid_cloud',
'cloud_ice_water_path',
'mean_effective_radius_for_ice_cloud',
'cloud_rain_water_path',
'mean_effective_radius_for_rain_drop',
'cloud_snow_water_path',
'mean_effective_radius_for_snow_flake',
],
},
'rrtmg_lw' : {
'rrtmg_lw_run' : [
'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step',
'cloud_liquid_water_path',
'mean_effective_radius_for_liquid_cloud',
'cloud_ice_water_path',
'mean_effective_radius_for_ice_cloud',
'cloud_rain_water_path',
'mean_effective_radius_for_rain_drop',
'cloud_snow_water_path',
'mean_effective_radius_for_snow_flake',
],
'rrtmg_sw_run' : [
'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step',
'components_of_surface_downward_shortwave_fluxes',
'cloud_liquid_water_path',
'mean_effective_radius_for_liquid_cloud',
'cloud_ice_water_path',
'mean_effective_radius_for_ice_cloud',
'cloud_rain_water_path',
'mean_effective_radius_for_rain_drop',
'cloud_snow_water_path',
'mean_effective_radius_for_snow_flake',
],
},
'rrtmg_lw' : {
'rrtmg_lw_run' : [
'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step',
'cloud_liquid_water_path',
'mean_effective_radius_for_liquid_cloud',
'cloud_ice_water_path',
'mean_effective_radius_for_ice_cloud',
'cloud_rain_water_path',
'mean_effective_radius_for_rain_drop',
'cloud_snow_water_path',
'mean_effective_radius_for_snow_flake',
],
},
'mp_thompson' : {
'mp_thompson_init' : [
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 77 files
+1 −1 physics/GFS_MP_generic.F90
+0 −486 physics/GFS_phys_time_vary.fv3.F90
+0 −114 physics/GFS_rad_time_vary.fv3.F90
+0 −249 physics/GFS_stochastics.F90
+0 −68 physics/GFS_suite_init_finalize_test.F90
+0 −141 physics/GFS_time_vary_pre.fv3.F90
+11 −9 physics/aer_cloud.F
+2 −2 physics/cnvc90.f
+55 −52 physics/cs_conv.F90
+2 −2 physics/cs_conv_aw_adj.F90
+109 −134 physics/cu_gf_deep.F90
+10 −4 physics/cu_gf_driver.F90
+41 −29 physics/cu_gf_sh.F90
+0 −3,840 physics/cu_ntiedtke.F90
+0 −53 physics/cu_ntiedtke_post.F90
+0 −84 physics/cu_ntiedtke_pre.F90
+0 −339 physics/docs/ccpp_dox
+0 −362 physics/docs/ccpplatex_dox
+7 −6 physics/docs/ccppv3_doxyfile
+79 −35 physics/docs/library.bib
+7 −6 physics/docs/pdftxt/CPT_CSAW.txt
+13 −19 physics/docs/pdftxt/CPT_MG3.txt
+93 −99 physics/docs/pdftxt/CPT_adv_suite.txt
+3 −6 physics/docs/pdftxt/GFDL_cloud.txt
+3 −3 physics/docs/pdftxt/GFS_GWDC.txt
+1 −1 physics/docs/pdftxt/GFS_H2OPHYS.txt
+5 −5 physics/docs/pdftxt/GFS_NOAH.txt
+6 −6 physics/docs/pdftxt/GFS_SFCLYR.txt
+2 −2 physics/docs/pdftxt/GFS_SFCSICE.txt
+16 −4 physics/docs/pdftxt/GFS_SURFACE_PERT.txt
+118 −122 physics/docs/pdftxt/GFSv15_suite.txt
+112 −113 physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt
+25 −26 physics/docs/pdftxt/GSD_CU_GF_deep.txt
+1 −1 physics/docs/pdftxt/GSD_THOMPSON.txt
+71 −79 physics/docs/pdftxt/GSD_adv_suite.txt
+33 −61 physics/docs/pdftxt/all_shemes_list.txt
+110 −0 physics/docs/pdftxt/all_shemes_list.txt.FV3
+429 −224 physics/docs/pdftxt/suite_input.nml.txt
+36 −36 physics/funcphys.f90
+0 −2,040 physics/gcm_shoc.F90
+0 −245 physics/gcycle.F90
+4 −4 physics/gfdl_fv_sat_adj.F90
+0 −526 physics/gscond.f
+1 −2 physics/gwdc.f
+1 −1 physics/gwdps.f
+1 −1 physics/h2ophys.f
+11 −10 physics/m_micro.F90
+30 −30 physics/micro_mg3_0.F90
+7 −7 physics/micro_mg_utils.F90
+46 −5 physics/module_MYNNPBL_wrapper.F90
+0 −362 physics/module_MYNNSFC_wrapper.F90
+57 −44 physics/module_bl_mynn.F90
+43 −38 physics/module_mp_thompson.F90
+0 −2,446 physics/module_sf_mynn.F90
+4 −105 physics/module_sf_ruclsm.F90
+2 −2 physics/moninedmf.f
+0 −607 physics/moninshoc.f
+5 −8 physics/mp_thompson.F90
+0 −202 physics/ozphys.f
+1 −1 physics/ozphys_2015.f
+0 −735 physics/precpd.f
+0 −14 physics/radiation_aerosols.f
+14 −5 physics/radiation_clouds.f
+7 −5 physics/radlw_main.f
+9 −5 physics/radsw_main.f
+1 −1 physics/rayleigh_damp.f
+1 −1 physics/samfdeepcnv.f
+1 −1 physics/samfshalcnv.f
+12 −14 physics/satmedmfvdif.F
+1 −1 physics/sfc_diff.f
+2 −1 physics/sfc_drv_ruc.F90
+1 −1 physics/sfc_nst.f
+1 −1 physics/sfc_sice.f
+0 −8,745 physics/sfcsub.F
+2 −1 physics/sflx.f
+0 −2,106 physics/shinhongvdif.F90
+0 −1,271 physics/ysuvdif.F90
104 changes: 104 additions & 0 deletions ccpp/physics_namelists/input_GFS_v15_C96.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
&gfs_physics_nml
fhzero = 6.
ldiag3d = .true.
fhcyc = 24.
nst_anl = .true.
use_ufo = .true.
pre_rad = .false.
ncld = 5
imp_physics = 11
pdfcld = .false.
fhswr = 3600.
fhlwr = 3600.
ialb = 1
iems = 1
IAER = 111
ico2 = 2
isubc_sw = 2
isubc_lw = 2
isol = 2
lwhtr = .true.
swhtr = .true.
cnvgwd = .true.
shal_cnv = .true.
cal_pre = .false.
redrag = .true.
dspheat = .true.
hybedmf = .true.
satmedmf = .false.
shinhong = .false.
do_ysu = .false.
lheatstrg = .false.
lgfdlmprad = .false.
effr_in = .false.
random_clds = .false.
trans_trac = .false.
cnvcld = .true.
imfshalcnv = 2
imfdeepcnv = 2
cdmbgwd = 0.125,3.0
prslrd0 = 0.
ivegsrc = 1
isot = 1
debug = .false.
oz_phys = .false.
oz_phys_2015 = .true.
h2o_phys = .true.
nstf_name = 2,1,1,0,5
xkzminv = 0.3
xkzm_m = 1.0
xkzm_h = 1.0
do_sppt = .false.
do_shum = .false.
do_skeb = .false.
do_sfcperts = .false.
/

&gfdl_cloud_microphysics_nml
sedi_transport = .true.
do_sedi_heat = .false.
rad_snow = .true.
rad_graupel = .true.
rad_rain = .true.
const_vi = .F.
const_vs = .F.
const_vg = .F.
const_vr = .F.
vi_max = 1.
vs_max = 2.
vg_max = 12.
vr_max = 12.
qi_lim = 1.
prog_ccn = .false.
do_qa = .false.
fast_sat_adj = .false.
tau_l2v = 225.
tau_v2l = 150.
tau_g2v = 900.
rthresh = 10.e-6 ! This is a key parameter for cloud water
dw_land = 0.16
dw_ocean = 0.10
ql_gen = 1.0e-3
ql_mlt = 1.0e-3
qi0_crt = 8.0E-5
qs0_crt = 1.0e-3
tau_i2s = 1000.
c_psaci = 0.05
c_pgacs = 0.01
rh_inc = 0.30
rh_inr = 0.30
rh_ins = 0.30
ccn_l = 300.
ccn_o = 100.
c_paut = 0.5
c_cracw = 0.8
use_ppm = .false.
use_ccn = .true.
mono_prof = .true.
z_slope_liq = .true.
z_slope_ice = .true.
de_ice = .false.
fix_negative = .true.
icloud_f = 1
mp_time = 150.
/
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_GSD_v0.nml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
do_shum = .false.
do_skeb = .false.
do_sfcperts = .false.
lsm = 2
lsm = 3
lsoil_lsm = 9
icloud_bl = 1
bl_mynn_tkeadvect = .true.
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_GFS_v15.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cloud_microphys</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_GFS_v15_prescribed_surface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cloud_microphys</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_GFS_v15plus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cloud_microphys</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_GFS_v15plus_prescribed_surface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cloud_microphys</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_csawmg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
<scheme>m_micro_post</scheme>
<scheme>cs_conv_aw_adj</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_csawmg_prescribed_surface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<scheme>m_micro_post</scheme>
<scheme>cs_conv_aw_adj</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
Expand Down
Binary file removed scm/data/GFS_physics_data/CCN_ACTIVATE.BIN
Binary file not shown.
Loading

0 comments on commit 801bade

Please sign in to comment.