Skip to content

Commit

Permalink
Merge branch 'rljacob/cime/update1.1.12'
Browse files Browse the repository at this point in the history
Update our fork of CIME with changes from the upstream master (ESCMI/cime). v1.1.2 to v1.1.12

conflicts resolved: leave external/gptl/gptl.F90 deleted.
Add in faster wv_sat rouintes to driver/cesm_comp_mod.F90

Summary of changes.
Needed for ACME:
bugfix: $CASE.run was over-writing CaseStatus
replace PIO_STRIDE value for BGQ lost in an earlier commit
add a clm5 glc_mec compset, so that we can begin to test this combination
batch system bug fixes for Edison
Use Fortran 90 netCDF bindings in shr_mct_mod.
Update to MCT 2.9 release.
Improved pelayout for f09_g16 on mira
bugfix: cesm_submit
bugfix: unit test netCDF detection and NAG support
fixed alcf workflow
bugfix: batch testing
add CESM timing including SAVE_TIMING
Faster versions of wv_sat routines for Intel.

No impact on ACME:
port to hobart, cleanup of yellowstone.
AIAF compset.
add some comments, based on feedback from Sean Santos
clean up whitespace
Add a routine to partition rain/snow.
Finish initial port for NAG on hobart.
move tests from goldbach to hobart
Yellowstone batch was using sumOnly instead of sumPEs

SEG-132
  • Loading branch information
rljacob committed Jul 14, 2015
2 parents 3b5ddd4 + a9b0ea6 commit 45d3bdd
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 16 deletions.
5 changes: 2 additions & 3 deletions data_comps/datm/datm_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module datm_comp_mod
use seq_comm_mct , only: seq_comm_inst, seq_comm_name, seq_comm_suffix
use seq_flds_mod , only: seq_flds_a2x_fields, &
seq_flds_x2a_fields
use shr_precip_mod , only: shr_precip_partition_rain_snow_ramp
!
! !PUBLIC TYPES:
implicit none
Expand Down Expand Up @@ -1253,9 +1254,7 @@ subroutine datm_comp_run( EClock, cdata, x2a, a2x)
endif

!--- split precip between rain & snow ---
!--- note: aribitrarily small negative values cause CLM to crash ---
frac = (tbot - tkFrz)*0.5_R8 ! ramp near freezing
frac = min(1.0_R8,max(0.0_R8,frac)) ! bound in [0,1]
call shr_precip_partition_rain_snow_ramp(tbot, frac)
a2x%rAttr(ksc,n) = max(0.0_R8, a2x%rAttr(krc,n)*(1.0_R8 - frac) )
a2x%rAttr(ksl,n) = max(0.0_R8, a2x%rAttr(krl,n)*(1.0_R8 - frac) )
a2x%rAttr(krc,n) = max(0.0_R8, a2x%rAttr(krc,n)*( frac) )
Expand Down
22 changes: 22 additions & 0 deletions data_comps/docn/bld/namelist_files/namelist_defaults_docn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Currently the following docn modes are supported
<datamode docn_mode="null" >NULL</datamode>
<datamode docn_mode="prescribed" >SSTDATA</datamode>
<datamode docn_mode="som" >SOM</datamode>
<datamode docn_mode="interannual">IAF</datamode>
<datamode docn_mode="copyall" >COPYALL</datamode>

<!-- ========================================= -->
Expand All @@ -56,6 +57,7 @@ Currently the following docn modes are supported

<streamslist docn_mode="prescribed" >prescribed</streamslist>
<streamslist docn_mode="som" >som</streamslist>
<streamslist docn_mode="interannual">interannual</streamslist>
<streamslist docn_mode="copyall" >copyall</streamslist>

<!-- =================================================== -->
Expand Down Expand Up @@ -184,6 +186,26 @@ Currently the following docn modes are supported
qdp qbot
</strm_datvar>

<!-- =================================================== -->
<!--- stream: interannual -->
<!-- =================================================== -->

<strm_year_align stream="interannual">1</strm_year_align>
<strm_year_start stream="interannual">1850</strm_year_start>
<strm_year_end stream="interannual">2014</strm_year_end>
<strm_domdir stream="interannual">$DIN_LOC_ROOT/atm/cam/sst</strm_domdir>
<strm_domfil stream="interannual">sst_HadOIBl_bc_1x1_1850_2014_c150416.nc</strm_domfil>
<strm_datdir stream="interannual">$DIN_LOC_ROOT/atm/cam/sst</strm_datdir>
<strm_datfil stream="interannual">sst_HadOIBl_bc_1x1_1850_2014_c150416.nc</strm_datfil>
<strm_domvar stream="interannual">
time time
lon lon
lat lat
</strm_domvar>
<strm_datvar stream="interannual">
SST_cpl t
</strm_datvar>

<!-- ========================================= -->
<!--- non stream-specific vars (for now) -->
<!-- ========================================= -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
type="char*256"
category="streams"
group="shr_strdata_nml"
valid_values="SSTDATA,SOM,NULL,COPYALL">
valid values: SSTDATA,SOM,NULL,COPYALL
valid_values="SSTDATA,SOM,IAF,NULL,COPYALL">
valid values: SSTDATA,SOM,IAF,NULL,COPYALL
General method that operates on the data. This is generally
implemented in the data models but is set in the strdata method for
convenience.
Expand All @@ -43,6 +43,8 @@ dataMode = "SSTDATA"
to the data ocean model. They are normally found in the same file
because the SST and ice fraction data are derived from the same
observational data sets and are consistent with each other.
dataMode = "IAF"
IAF is the interannually varying version of SSTDATA
dataMode = "SOM"
SOM ("slab ocean model") mode is a prognostic mode. This mode
computes a prognostic sea surface temperature and a freeze/melt
Expand All @@ -58,8 +60,9 @@ dataMode = "SOM"
application. A tool is available to derive valid SOM forcing.

Set by the xml variable DOCN_MODE in env_run.xml
Currently, DOCN_MODE can be [prescribed,som,null]
Currently, DOCN_MODE can be [prescribed,som,interannual,null]
If DOCN_MODE is prescribed, datamode will be set to SSTDATA
If DOCN_MODE is interannual, datamode will be set to IAF
If DOCN_MODE is som , datamode will be set to SOM
If DOCN_MODE is null, datamode will be set to NULL

Expand Down
53 changes: 43 additions & 10 deletions data_comps/docn/docn_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ module docn_comp_mod
"melth ","salt ","prec ","snow ","rain ", &
"evap ","meltw ","rofl ","rofi ", &
"t ","u ","v ","dhdx ","dhdy ", &
"s ","q ","h ","qbot " /)
"s ","q ","h ","qbot "/)
character(12),parameter :: avofld(1:ktrans) = &
(/ "Si_ifrac ","Sa_pslv ","So_duu10n ","Foxx_taux ","Foxx_tauy ", &
"Foxx_swnet ","Foxx_lat ","Foxx_sen ","Foxx_lwup ","Faxa_lwdn ", &
"Fioi_melth ","Fioi_salt ","Faxa_prec ","Faxa_snow ","Faxa_rain ", &
"Foxx_evap ","Fioi_meltw ","Foxx_rofl ","Foxx_rofi ", &
"So_t ","So_u ","So_v ","So_dhdx ","So_dhdy ", &
"So_s ","Fioo_q ","strm_h ","strm_qbot " /)
"So_s ","Fioo_q ","strm_h ","strm_qbot "/)

save

Expand Down Expand Up @@ -279,6 +279,7 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
if (force_prognostic_true) then
ocn_present = .true.
ocn_prognostic = .true.
ocnrof_prognostic = .true.
endif

!----------------------------------------------------------------------------
Expand All @@ -298,6 +299,7 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
if (trim(ocn_mode) == 'NULL' .or. &
trim(ocn_mode) == 'SSTDATA' .or. &
trim(ocn_mode) == 'COPYALL' .or. &
trim(ocn_mode) == 'IAF' .or. &
trim(ocn_mode) == 'SOM') then
if (my_task == master_task) &
write(logunit,F00) ' ocn mode = ',trim(ocn_mode)
Expand Down Expand Up @@ -333,6 +335,11 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
endif
endif

if (trim(ocn_mode) == 'IAF') then
ocn_prognostic = .true.
ocnrof_prognostic = .true.
endif

if (trim(ocn_mode) == 'SOM') then
ocn_prognostic = .true.
endif
Expand Down Expand Up @@ -569,7 +576,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
call seq_timemgr_EClockGetData( EClock, curr_ymd=CurrentYMD, curr_tod=CurrentTOD)
call seq_timemgr_EClockGetData( EClock, curr_yr=yy, curr_mon=mm, curr_day=dd)
call seq_timemgr_EClockGetData( EClock, dtime=idt)
dt = idt * 1.0_r8
dt = idt * 1.0_R8
write_restart = seq_timemgr_RestartAlarmIsOn(EClock)

call t_stopf('docn_run1')
Expand Down Expand Up @@ -598,9 +605,23 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
call t_barrierf('docn_BARRIER',mpicom)
call t_startf('docn')

!--- copy all fields from streams to o2x as default ---
!--- defaults, copy all fields from streams to o2x ---

if (trim(ocn_mode) /= 'NULL') then

!--- defaults ---
lsize = mct_avect_lsize(o2x)
do n = 1,lsize
o2x%rAttr(kt ,n) = TkFrz
o2x%rAttr(ks ,n) = ocnsalt
o2x%rAttr(ku ,n) = 0.0_R8
o2x%rAttr(kv ,n) = 0.0_R8
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
enddo

!--- copy streams to o2x ---
call t_startf('docn_strdata_advance')
call shr_strdata_advance(SDOCN,currentYMD,currentTOD,mpicom,'docn')
call t_stopf('docn_strdata_advance')
Expand All @@ -626,11 +647,23 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
do n = 1,lsize
o2x%rAttr(kt ,n) = o2x%rAttr(kt,n) + TkFrz
o2x%rAttr(ks ,n) = ocnsalt
o2x%rAttr(ku ,n) = 0.0_r8
o2x%rAttr(kv ,n) = 0.0_r8
o2x%rAttr(kdhdx,n) = 0.0_r8
o2x%rAttr(kdhdy,n) = 0.0_r8
o2x%rAttr(kq ,n) = 0.0_r8
o2x%rAttr(ku ,n) = 0.0_R8
o2x%rAttr(kv ,n) = 0.0_R8
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
enddo

case('IAF')
lsize = mct_avect_lsize(o2x)
do n = 1,lsize
o2x%rAttr(kt ,n) = o2x%rAttr(kt,n) + TkFrz
o2x%rAttr(ks ,n) = ocnsalt
o2x%rAttr(ku ,n) = 0.0_R8
o2x%rAttr(kv ,n) = 0.0_R8
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
enddo

case('SOM')
Expand All @@ -644,7 +677,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
somtp(n) = o2x%rAttr(kt,n) + TkFrz
endif
o2x%rAttr(kt,n) = somtp(n)
o2x%rAttr(kq,n) = 0.0_r8
o2x%rAttr(kq,n) = 0.0_R8
enddo
else ! firstcall
do n = 1,lsize
Expand Down
1 change: 1 addition & 0 deletions data_comps/drof/drof_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ subroutine drof_comp_init( EClock, cdata, x2r, r2x, NLFilename )

if (trim(rof_mode) /= 'NULL') then
rof_present = .true.
rofice_present = .true.
call shr_strdata_pioinit(SDROF,rof_pio_subsys,rof_pio_iotype)
call shr_strdata_init(SDROF,mpicom,compid,name='rof',&
calendar=calendar)
Expand Down

0 comments on commit 45d3bdd

Please sign in to comment.