Skip to content

Commit

Permalink
AIAF compset.
Browse files Browse the repository at this point in the history
  • Loading branch information
dabail10 committed Jul 10, 2015
1 parent 4bd7ba7 commit a9b0ea6
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 13 deletions.
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 a9b0ea6

Please sign in to comment.