-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add capability for SCAM forcing based on gridded met fields. #595
Closed
JulioTBacmeister
wants to merge
32
commits into
ESCOMP:cam_development
from
JulioTBacmeister:cam_development
Closed
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
e7c0a09
Want to start GW development from latest cam_development
0f219fd
Merge branch 'ESCOMP:cam_development' into cam_development
JulioTBacmeister 14b65ee
Merge branch 'ESCOMP:cam_development' into cam_development
JulioTBacmeister 7f43caa
Capability for SCAM to be driven by gridded met fields
496c209
Merge branch 'cam_development' of https://github.com/JulioTBacmeister…
bb4cca9
correcting dimensions of PKO,RV in get_ana_dynfrc_4scam.F90
d542611
moving mountain
103a3c5
trying to restore original intent
6be8815
buildnml mod to accomodate templtes with %
91dc7e4
must be necessary
6b98a09
missing )
31846dd
revert change to build-namelest
5c96d42
revert again
e51206f
Merge pull request #1 from peverwhee/scam_julio
JulioTBacmeister e7133bf
redo build-namelist
77aa2cc
updated make_basecase.auto.csh
2d1ded5
removed cime_config/usermods_dirs/scam_STUB/scripts/run_cases.csf
807811f
removed cime_config/usermods_dirs/scam_STUB/scripts/make_basecase.aut…
89fac35
Updated to new CLUBB external
5ca9af9
Python tools etc for SCAM
e5be7c3
forgot case_name
6560907
name change
35d50be
working on python, clubbtop
0b9fad0
Externals_CAM updated
33f1d5c
mflit etc
7fa25e0
adding some plotting
7660d98
adding support for cheyenne and L93
JulioTBacmeister fd648c6
typo/syntax and UBC for H2O
JulioTBacmeister b8ec3dc
Merge branch 'cam_development' of https://github.com/JulioTBacmeister…
8405550
added machine recognition, ie., izumi, cheyenne
3676dc7
more support for diff machines etc.
e9cdc1b
clean up
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5336,6 +5336,79 @@ Force scam to use the lat lon fields specified in the scam namelist not what is | |
Default: FALSE | ||
</entry> | ||
|
||
<entry id="use_scm_ana_frc" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
SCAM to calculate or read tendencies from a global ana/dycore | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_upwind" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Use 1st order upwind for ana tendencies (instead of 2nd order space centered) | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_t_react" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Use scam state as center column in stencil for ana adv tendencies | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_q_react" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Use scam state as center column in stencil for ana adv tendencies | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_u_react" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Use scam state as center column in stencil for ana adv tendencies | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_v_react" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Use scam state as center column in stencil for ana adv tendencies | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_direct_ttend" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Force scam to use tendencies directly from dycore or ana (not recalculated) | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_direct_omega" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Force scam to use omega directly from dycore or ana (not recalculated) | ||
Default: FALSE | ||
</entry> | ||
|
||
<entry id="scm_ana_x_plevels" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Interpolate ana fields to constant pressure surfaces | ||
Default: FALSE | ||
</entry> | ||
|
||
|
||
<entry id="scm_ana_frc_file_template" type="char*128" input_pathname="abs" category="scam" | ||
group="scam_nl" valid_values="" > | ||
template for analysis forcing dataset. | ||
Default: set by build-namelist. | ||
</entry> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This variable is a string, not a filename (path), therefore, it should not have the |
||
|
||
<entry id="scm_ana_frc_path" type="char*128" input_pathname="abs" category="scam" | ||
group="scam_nl" valid_values="" > | ||
templatefull path for analysis forcing dataset. | ||
Default: set by build-namelist. | ||
</entry> | ||
|
||
<entry id="scm_use_ana_iop" type="logical" category="scam" | ||
group="scam_nl" valid_values=""> | ||
Force scam to compute large-scale forcing from renalysis or 3D model output | ||
Default: FALSE | ||
</entry> | ||
|
||
<!-- Solar Parameters --> | ||
|
||
<entry id="solar_const" type="real" category="solar" | ||
|
Binary file not shown.
105 changes: 105 additions & 0 deletions
105
cime_config/usermods_dirs/scam_STUB/scripts/make_basecase.auto.csh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/bin/csh -f | ||
# | ||
# Makes base case that can later be spawned to different | ||
# lats and lons. Start with ARM SGP coords cuz we're comfortable | ||
# there, lots of data etc. ... | ||
|
||
|
||
if ( "$#argv" != 3) then | ||
echo "Wrong number of arguments specified:" | ||
echo " -arg 1 lat" | ||
echo " -arg 2 lon" | ||
echo " -arg 3 case string" | ||
exit | ||
endif | ||
|
||
set n = 1 | ||
set case_lat = "$argv[$n]" | ||
set n = 2 | ||
set case_lon = "$argv[$n]" | ||
set n = 3 | ||
set loc_string = "$argv[$n]" | ||
|
||
set COMPSET=FSCAM | ||
|
||
set src=cam6_3_041.dtsens | ||
|
||
#set mach=izumi | ||
#set queue=short | ||
#set srcpath=/home/$USER/src | ||
#set scratchdir=/scratch/cluster/$USER | ||
|
||
set mach=cheyenne | ||
set queue=share | ||
set srcpath=/glade/u/home/$USER/src | ||
set scratchdir=/glade/scratch/$USER | ||
|
||
set case_year = 2010 | ||
set case_mon = 05 | ||
set case_day = 01 | ||
|
||
set case_date = $case_year$case_mon$case_day | ||
set case_sdate = $case_year"-"$case_mon"-"$case_day | ||
|
||
echo $case_date | ||
echo $case_sdate | ||
|
||
set laa = `echo $case_lat | cut -d '.' -f 1` | ||
echo $laa | ||
set loo = `echo $case_lon | cut -d '.' -f 1` | ||
echo $loo | ||
|
||
# set basecase name | ||
set CASE="${src}_${COMPSET}_L58dev_CAMFORC_${loc_string}_${case_date}_c`date '+%y%m%d'`_test0" | ||
|
||
# create new basecase | ||
${srcpath}/${src}/cime/scripts/create_newcase --case ${scratchdir}/${CASE} --compset ${COMPSET} --res T42_T42 --user-mods-dir ${srcpath}/${src}/cime_config/usermods_dirs/scam_STUB --walltime 00:30:00 --mach ${mach} --pecount 1 --compiler intel --driver mct --queue ${queue} --run-unsupported | ||
|
||
cd ${scratchdir}/${CASE} | ||
|
||
#sed -i 's/intel\/18.0.3/intel\/20.0.1/' ./env_mach_specific.xml | ||
#sed -i 's/intel\/mvapich2-2.3rc2-intel-18.0.3/intel\/mvapich2-2.1-qlc/' ./env_mach_specific.xml | ||
./case.setup | ||
|
||
#./xmlchange DEBUG=TRUE | ||
./xmlchange DOUT_S=FALSE | ||
|
||
# Append to CAM configure options | ||
./xmlchange --append CAM_CONFIG_OPTS='-phys cam_dev -nlev 58' | ||
|
||
# ATM_NCPL should be at least 192 to accomodate | ||
# high wind cases in SH winter | ||
./xmlchange ATM_NCPL=96 | ||
|
||
# Default to 123 days of runtime | ||
# i.e., 123*96=11808 | ||
./xmlchange STOP_N=11807 | ||
./xmlchange START_TOD=00000 | ||
./xmlchange STOP_OPTION=nsteps | ||
|
||
echo "scm_use_ana_iop = .true.">>user_nl_cam | ||
|
||
echo "cld_macmic_num_steps=3">>user_nl_cam | ||
#echo "clubb_timestep=150.D0">>user_nl_cam | ||
#echo "clubb_gamma_coef = 0.27D0">>user_nl_cam | ||
#echo "clubb_c14 = 1.6D0">>user_nl_cam | ||
#echo "clubb_l_trapezoidal_rule_zm = .false.">>user_nl_cam | ||
#echo "clubb_l_trapezoidal_rule_zt = .false.">>user_nl_cam | ||
|
||
#Set case specific variables | ||
./xmlchange PTS_LAT=${case_lat} | ||
./xmlchange PTS_LON=${case_lon} | ||
./xmlchange RUN_STARTDATE=${case_sdate} | ||
|
||
cp ${srcpath}/${src}/cime_config/usermods_dirs/scam_STUB/scripts/STUB_iop.nc ./ | ||
|
||
ncap2 --overwrite -s "bdate=${case_date}" STUB_iop.nc STUB_iop.nc | ||
ncap2 --overwrite -s "lat[lat]=${case_lat}" STUB_iop.nc STUB_iop.nc | ||
ncap2 --overwrite -s "lon[lon]=${case_lon}" STUB_iop.nc STUB_iop.nc | ||
|
||
pwd | ||
|
||
echo "READY TO BUILD/SUBMIT "${CASE} | ||
./case.build | ||
./case.submit | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/csh -f | ||
|
||
set src = cam6_3_041.dtsens | ||
|
||
set lat = 23.08900523560209 | ||
set lon = 205 | ||
set casenam = st10 | ||
source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 24.03141361256544 | ||
#set lon = 207.5 | ||
#set casenam = st9 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 24.9738219895288 | ||
#set lon = 210. | ||
#set casenam = st8 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 25.91623036649214 | ||
#set lon = 212.5 | ||
#set casenam = st7 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 27.80104712041884 | ||
#set lon = 217.5 | ||
#set casenam = st6 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 29.68586387434554 | ||
#set lon = 222.5 | ||
#set casenam = st5 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 31.57068062827226 | ||
#set lon = 228.75 | ||
#set casenam = st4 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 32.5130890052356 | ||
#set lon = 231.25 | ||
#set casenam = st3 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts/ | ||
|
||
#set lat = 33.45549738219896 | ||
#set lon = 233.75 | ||
#set casenam = st2 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
||
#cd /glade/u/home/aherring/src/$src/cime_config/usermods_dirs/scam_STUB/scripts | ||
|
||
#set lat = 33.45549738219896 | ||
#set lon = 240. | ||
#set casenam = st1 | ||
#source make_basecase.auto.csh $lat $lon $casenam | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# setup SCAM lon and lat for this iop | ||
# this should correspond to the forcing IOP coordinates | ||
#./xmlchange PTS_LON=scmlon | ||
#./xmlchange PTS_LAT=scmlat | ||
|
||
# Specify the starting/ending time for the IOP | ||
# The complete time slice of IOP file is specified below | ||
# but you may simulate any within the IOP start and end times. | ||
#./xmlchange RUN_STARTDATE=yyyy-mm-dd | ||
#./xmlchange START_TOD=0 | ||
#./xmlchange STOP_OPTION=nsteps | ||
#./xmlchange STOP_N=nnnn | ||
|
||
# usermods_dir/scam_mandatory will be included for all single column | ||
# runs by default. This usermods directory contains mandatory settings | ||
# for scam and shouldn't be modified by the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
!scmlon=$PTS_LON | ||
!scmlat=$PTS_LAT | ||
iopfile="$CASEROOT/STUB_iop.nc" | ||
!ncdata="/home/aherring/scam/inic/SCAM_IC_288x192_L58_48_BL10.nc" | ||
ncdata = '/glade/work/aherring/grids/vertical-res/L58/SCAM_IC_288x192_L58_48_BL10.nc' | ||
|
||
!bnd_topo="/fs/cgd/csm/inputdata/atm/cam/topo/fv_0.9x1.25_nc3000_Nsw042_Nrs008_Co060_Fi001_ZR_sgh30_24km_GRNL_c170103.nc" | ||
bnd_topo = '/glade/p/cesmdata/inputdata/atm/cam/topo/fv_0.9x1.25_nc3000_Nsw042_Nrs008_Co060_Fi001_ZR_sgh30_24km_GRNL_c170103.nc' | ||
|
||
mfilt=2000 | ||
nhtfrq=1 | ||
avgflag_pertape(1)='A' | ||
|
||
scm_use_obs_uv = .false. | ||
scm_relaxation = .false. | ||
scm_relax_fincl = 'T', 'bc_a1', 'bc_a4', 'dst_a1', 'dst_a2', 'dst_a3', 'ncl_a1', 'ncl_a2', | ||
'ncl_a3', 'num_a1', 'num_a2', 'num_a3', | ||
'num_a4', 'pom_a1', 'pom_a4', 'so4_a1', 'so4_a2', 'so4_a3', 'soa_a1', 'soa_a2' | ||
scm_relax_bot_p = 105000. | ||
scm_relax_top_p = 200. | ||
scm_relax_linear = .true. | ||
scm_relax_tau_bot_sec = 864000. | ||
scm_relax_tau_top_sec = 172800. | ||
|
||
use_scm_ana_frc = .true. | ||
!scm_ana_frc_path = "/project/amp/aherring/cam6_3_006.dev_FHIST_f09_f09_mg17_144pes_210818_L58_cam64_MJJA2010/run/" | ||
scm_ana_frc_path = "/glade/p/cesm/amwg/aherring/FORC_FOR_SCAM/cam6_3_006.dev_FHIST_f09_f09_mg17_144pes_210818_L58_cam64_MJJA2010/run/" | ||
scm_ana_frc_file_template = "cam6_3_006.dev_FHIST_f09_f09_mg17_144pes_210818_L58_cam64_MJJA2010.cam.h2.%y-%m-%d-%s.nc" | ||
|
||
scm_ana_x_plevels = .true. | ||
scm_ana_direct_omega = .true. | ||
scm_ana_direct_ttend = .false. | ||
scm_ana_t_react = .false. | ||
scm_ana_q_react = .false. | ||
scm_ana_u_react = .false. | ||
scm_ana_v_react = .false. | ||
scm_ana_upwind = .false. | ||
|
||
|
||
use_gw_convect_dp = .false. | ||
use_gw_convect_sh = .false. | ||
use_gw_front = .false. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this should be needed (see below) and could have unintended effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these lines be removed altogether? Or replaced with what was there before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be replaced with what was there before. I opened a PR with the changes if that helps (you can also close it if you don't need it):
JulioTBacmeister#1
Apologies for any whiplash you may be experiencing.