Skip to content

Commit

Permalink
changes to defaults. Including atm fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abishekg7 committed Oct 10, 2020
1 parent 7fa4141 commit 3afa98f
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 57 deletions.
18 changes: 9 additions & 9 deletions Config/config_postprocess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<entry id="CASE"
type="string"
valid_values=""
value="inherit"
value="b.e13.B1950C5.ne30_g16.ihesp24_1950cntl.002"
group="case_info"
desc="case name"
></entry>
Expand All @@ -54,63 +54,63 @@
<entry id="DOUT_S_ROOT"
type="string"
valid_values=""
value="inherit"
value="/scratch/training/CESM_post/datasets/b.e13.B1950C5.ne30_g16.ihesp24_1950cntl.002"
group="case_info"
desc="Fully qualified path to the location of the short term archive output, DOUT_S_ROOT, on local disk where case history files reside. Assumes the adherence to the CESM file naming conventions."
></entry>

<entry id="ATM_GRID"
type="string"
valid_values="0.9x1.25"
value="inherit"
value="ne30"
group="case_info"
desc="Atmosphere model grid"
></entry>

<entry id="ICE_GRID"
type="string"
valid_values="gx1v6"
value="inherit"
value="gx1v6"
group="case_info"
desc="Sea-Ice model grid"
></entry>

<entry id="ICE_NX"
type="string"
valid_values="320"
value="inherit"
value="320"
group="case_info"
desc="Sea-Ice model grid NX - default 320 for 1-degree ocean grid"
></entry>

<entry id="ICE_NY"
type="string"
valid_values="384"
value="inherit"
value="384"
group="case_info"
desc="Sea-Ice model grid NY - default 384 for 1-degree ocean grid"
></entry>

<entry id="LND_GRID"
type="string"
valid_values="0.9x1.25"
value="inherit"
value="ne30"
group="case_info"
desc="Land model grid"
></entry>

<entry id="OCN_GRID"
type="string"
valid_values="gx1v6"
value="inherit"
value="gx1v6"
group="case_info"
desc="Ocean model grid"
></entry>

<entry id="CESM_TAG"
type="string"
valid_values="cesm2_0"
value="inherit"
value="ihesp24"
group="case_info"
desc="CESM tag used to create this case"
></entry>
Expand Down
12 changes: 6 additions & 6 deletions Machines/machine_postprocess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@
</modules>
<components>
<component name="atm">
<averages_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</diagnostics_pes>
<averages_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="2000">3</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="2000">3</diagnostics_pes>
<regrid_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</regrid_pes>
<obs_root>/scratch/training/CESM_post/obs_root/amwg/amwg_data</obs_root> <!-- TODO: update this and other obs_roots -->
</component>
<component name="ice">
<averages_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</diagnostics_pes>
<averages_pes queue="mn_small" nodes="1" pes_per_node="4" wallclock="1:00" memory="2000">4</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="4" wallclock="1:00" memory="2000">4</diagnostics_pes>
<obs_root>/scratch/training/CESM_post/obs_root/pcwg/ice/data</obs_root>
</component>
<component name="lnd">
Expand All @@ -353,8 +353,8 @@
<obs_root>/glade/p/cesm/lmwg/diag/lnd_diag_data</obs_root>
</component>
<component name="ocn">
<averages_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</diagnostics_pes>
<averages_pes queue="mn_small" nodes="1" pes_per_node="4" wallclock="1:00" memory="2000">4</averages_pes>
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="4" wallclock="1:00" memory="2000">4</diagnostics_pes>
<obs_root>/scratch/training/CESM_post/obs_root</obs_root> <!-- TODO: move to a permanent dir -->
</component>
<component name="ilamb">
Expand Down
1 change: 0 additions & 1 deletion Templates/batch_ada.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#BSUB -R "span[ptile={{ ppn }}]"
#BSUB -J {{ processName }}
#BSUB -W {{ wallclock }}
#BSUB -P {{ project }}
#BSUB -L /bin/bash #Uses the bash login shell to initialize the job's execution environment.
#BSUB -R "rusage[mem={{memory}}]" #Request 25000MB per process (CPU) for the job

Expand Down
4 changes: 2 additions & 2 deletions Templates/postprocess.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ log_filename={{ caseRoot }}/logs/{{ processName }}.log.$today
{{ imb_env_vars }}
{{ mpirun }} {{ imb_run }} {{ imb_options }} >> ${log_filename} 2>&1
{% elif standalone %}
{{ mpirun }} ./{{ postProcessCmd }} {{ debug }} {{ backtrace }} --caseroot {{ caseRoot }} --standalone {{ cmdl_opt }} >> ${log_filename} 2>&1
{{ mpirun }} {{ postProcessCmd }} {{ debug }} {{ backtrace }} --caseroot {{ caseRoot }} --standalone {{ cmdl_opt }} >> ${log_filename} 2>&1
{% else %}
{{ mpirun }} ./{{ postProcessCmd }} {{ debug }} {{ backtrace }} --caseroot {{ caseRoot }} >> ${log_filename} 2>&1
{{ mpirun }} {{ postProcessCmd }} {{ debug }} {{ backtrace }} --caseroot {{ caseRoot }} >> ${log_filename} 2>&1
{% endif %}

50 changes: 40 additions & 10 deletions atm_diag/regridclimo.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ end if
print("Regridding: ")
print("SRC:"+srcFileName)
print("DST:"+dstFileName)
if(isfilepresent(dstFileName)) then
system("rm "+dstFileName)
end if
; if(isfilepresent(dstFileName)) then
system("rm -f "+dstFileName)
; end if
src_file=addfile(srcFileName,"r")
dst_file=addfile(dstFileName,"c")

Expand Down Expand Up @@ -223,7 +223,7 @@ end if
var_in_exclude = (/"lat", "lon", "area", "date_written", "time_written"/)

;--- Specify a list of variables on the source SE file that should be directly copied
var_in_copy = (/"time_bnds"/)
var_in_copy = (/"time_bnds","cosp_ht_bnds","cosp_sr_bnds","cosp_prs_bnds","cosp_tau_bnds"/)

;--- Specify a list of variables to be regridded
var_out = "All_Variables" ; to be regridded
Expand Down Expand Up @@ -293,11 +293,34 @@ end if
ib = ind(dNames.eq."ilev")
klev = dSizes(ia)
klevi = dSizes(ib)
; standard CAM dimensions
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars"/)
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 /)
dimUnlim = (/ True , False, False, False, False , False , False /)
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
; cosp dimensions
if (any("cosp_scol".eq.dNames))
iscol = ind(dNames.eq."cosp_scol")
nscol = dSizes(iscol)
itau = ind(dNames.eq."cosp_tau")
ntau = dSizes(itau)
iprs = ind(dNames.eq."cosp_prs")
nprs = dSizes(iprs)
isr = ind(dNames.eq."cosp_sr")
nsr = dSizes(isr)
isza = ind(dNames.eq."cosp_sza")
nsza = dSizes(isza)
iht = ind(dNames.eq."cosp_ht")
nht = dSizes(iht)
; CAM dimensions plus cosp
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars","cosp_scol","cosp_prs","cosp_sr","cosp_tau","cosp_sza","cosp_ht"/)
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 ,nscol ,nprs ,nsr ,ntau ,nsza ,nht /)
dimUnlim = (/ True , False, False, False, False , False , False ,False ,False ,False ,False ,False ,False /)
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
else
; standard CAM dimensions
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars"/)
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 /)
dimUnlim = (/ True , False, False, False, False , False , False /)
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
end if



;--- The following are explicitly added because they are 'special'

Expand Down Expand Up @@ -332,6 +355,13 @@ end if
vdims = getfilevardims(src_file, var_in(nv))
filevardef(dst_file, var_in(nv), getfilevartypes(src_file,var_in(nv)) \
, (/ "time", vdims(1), "lat", "lon" /) )
delete(vdims)
end if
if (rank_in .eq.4.and.var_in(nv).eq."FISCCP1_COSP") then
vdims = getfilevardims(src_file, var_in(nv))
filevardef(dst_file, var_in(nv), getfilevartypes(src_file,var_in(nv)) \
, (/ "time", "cosp_prs", "cosp_tau","lat", "lon" /) )
delete(vdims)
end if

dumAtts = new( 1, getfilevartypes(src_file,var_in(nv)))
Expand Down Expand Up @@ -374,13 +404,13 @@ end if
any(var_in(nv).eq.var_in_copy) ) then

rank_in = dimsizes(getfilevardimsizes(src_file, var_in(nv)))

if (rank_in .eq.1 .or. any(var_in(nv).eq.var_in_copy) ) then
dst_file->$var_in(nv)$ = (/ src_file->$var_in(nv)$ /)
end if
if (rank_in .ge.2 .and. .not.any(var_in(nv).eq.var_in_copy)) then
dst_file->$var_in(nv)$ = (/ ESMF_regrid_with_weights(src_file->$var_in(nv)$,wgtFileName,Opt_RGRD) /)
end if
delete(rank_in)
end if
end if
end do ; nv
Expand Down
6 changes: 4 additions & 2 deletions create_python_env
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ if [ -d $env ]; then
info="$progname - ${pp_dir}/cesm-env2 virtual environment already exists. Skipping conda create"
print_result "$info"
else
export CONDA_ENVS_PATH=${pp_dir}
export CONDA_PKGS_DIRS=${pp_dir}/conda_pkgs
#export CONDA_ENVS_PATH=${pp_dir}
export CONDA_ENVS_PATH=${env}
#export CONDA_PKGS_DIRS=${pp_dir}/conda_pkgs
export CONDA_PKGS_DIRS=${env}/conda_pkgs
conda create python=2.7 -n cesm-env2
#virtualenv --system-site-packages -p python2 cesm-env2
fi
Expand Down
4 changes: 2 additions & 2 deletions diagnostics/diagnostics/atm/Config/config_diags_atm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@
<entry id="ATMDIAG_test_first_yr"
type="integer"
valid_values=""
value=""
value="36"
group="date_params"
desc="Start year for test case for diagnostics."
></entry>

<entry id="ATMDIAG_test_nyrs"
type="integer"
valid_values=""
value=""
value="9"
group="date_params"
desc="The number of years of test data to be used for the diagnostics."
></entry>
Expand Down
4 changes: 2 additions & 2 deletions diagnostics/diagnostics/ice/Config/config_diags_ice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@ Applies to both model and control cases."
<entry id="ICEDIAG_GRIDFILECONT"
type="char"
valid_values=""
value="/glade/p/cesm/omwg/grids/($ICEDIAG_GRID_CONT)_grid.nc"
value="$OCNDIAG_OBSROOTPATH/grids/($ICEDIAG_GRID_CONT)_grid.nc"
group="input_path"
desc="Grid file for control case. Note - this is an ocean grid file."
></entry>

<entry id="ICEDIAG_GRIDFILEDIFF"
type="char"
valid_values=""
value="/glade/p/cesm/omwg/grids/($ICEDIAG_GRID_DIFF)_grid.nc"
value="$OCNDIAG_OBSROOTPATH/grids/($ICEDIAG_GRID_DIFF)_grid.nc"
group="input_path"
desc="Grid file for diff case. Note - this is an ocean grid file."
></entry>
Expand Down
Loading

0 comments on commit 3afa98f

Please sign in to comment.