Skip to content

Commit

Permalink
modified: driver_cpl/bld/namelist_files/namelist_definition_drv.xml
Browse files Browse the repository at this point in the history
 	new file:   driver_cpl/driver/mrg_mod.F90
 	modified:   driver_cpl/driver/prep_ice_mod.F90
 	modified:   driver_cpl/driver/prep_ocn_mod.F90
 	modified:   driver_cpl/driver/prep_rof_mod.F90
 	modified:   driver_cpl/driver/seq_diag_mct.F90
 	modified:   driver_cpl/driver/seq_flux_mct.F90
 	modified:   driver_cpl/shr/seq_flds_mod.F90
 	modified:   externals/pio/CMakeLists.txt
 	modified:   machines/config_pes.xml
 	modified:   scripts/Tools/config_compsets.xml
 	modified:   scripts/Tools/config_definition.xml
 	modified:   share/csm_share/shr/shr_const_mod.F90
 	modified:   share/csm_share/shr/shr_flux_mod.F90
 	new file:   share/csm_share/shr/water_isotopes.F90
 	new file:   share/csm_share/shr/water_types.F90
                      - rest of files from geotracer svn branch
  • Loading branch information
cacraigucar committed Jan 19, 2016
1 parent 99e4eeb commit 3d72660
Show file tree
Hide file tree
Showing 16 changed files with 3,845 additions and 122 deletions.
8 changes: 8 additions & 0 deletions driver_cpl/bld/namelist_files/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ namelist cpl_flds_inparm and are currently triggered by the xml variable CCSM_BG
If CCSM_BGC is set to 'CO2_DMSA', then flds_co2_dmsa will be set to .true.
</entry>

<entry
id="flds_wiso"
type="logical"
category="seq_flds"
group="seq_cplflds_inparm" >
Pass water isotopes between components
</entry>

<entry
id="glc_nec"
type="integer"
Expand Down
946 changes: 946 additions & 0 deletions driver_cpl/driver/mrg_mod.F90

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions driver_cpl/driver/prep_ice_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,25 @@ subroutine prep_ice_merge(flux_epbalfact, a2x_i, o2x_i, r2x_i, g2x_i, x2i_i )
integer, save :: index_x2i_Faxa_rain
integer, save :: index_x2i_Faxa_snow
integer, save :: index_x2i_Fixx_rofi
!wiso fields:
integer, save :: index_a2x_Faxa_rainc_16O
integer, save :: index_a2x_Faxa_rainl_16O
integer, save :: index_a2x_Faxa_snowc_16O
integer, save :: index_a2x_Faxa_snowl_16O
integer, save :: index_x2i_Faxa_rain_16O
integer, save :: index_x2i_Faxa_snow_16O
integer, save :: index_a2x_Faxa_rainc_18O
integer, save :: index_a2x_Faxa_rainl_18O
integer, save :: index_a2x_Faxa_snowc_18O
integer, save :: index_a2x_Faxa_snowl_18O
integer, save :: index_x2i_Faxa_rain_18O
integer, save :: index_x2i_Faxa_snow_18O
integer, save :: index_a2x_Faxa_rainc_HDO
integer, save :: index_a2x_Faxa_rainl_HDO
integer, save :: index_a2x_Faxa_snowc_HDO
integer, save :: index_a2x_Faxa_snowl_HDO
integer, save :: index_x2i_Faxa_rain_HDO
integer, save :: index_x2i_Faxa_snow_HDO
logical, save :: first_time = .true.
logical :: iamroot
character(CL),allocatable :: mrgstr(:) ! temporary string
Expand Down Expand Up @@ -272,6 +291,28 @@ subroutine prep_ice_merge(flux_epbalfact, a2x_i, o2x_i, r2x_i, g2x_i, x2i_i )
index_x2i_Faxa_snow = mct_aVect_indexRA(x2i_i,'Faxa_snow' )
index_x2i_Fixx_rofi = mct_aVect_indexRA(x2i_i,'Fixx_rofi')

! Water isotope fields
index_a2x_Faxa_snowc_16O = mct_aVect_indexRA(a2x_i,'Faxa_snowc_16O', perrWith='quiet')
index_a2x_Faxa_snowl_16O = mct_aVect_indexRA(a2x_i,'Faxa_snowl_16O', perrWith='quiet')
index_a2x_Faxa_rainc_16O = mct_aVect_indexRA(a2x_i,'Faxa_rainc_16O', perrWith='quiet')
index_a2x_Faxa_rainl_16O = mct_aVect_indexRA(a2x_i,'Faxa_rainl_16O', perrWith='quiet')
index_x2i_Faxa_rain_16O = mct_aVect_indexRA(x2i_i,'Faxa_rain_16O', perrWith='quiet' )
index_x2i_Faxa_snow_16O = mct_aVect_indexRA(x2i_i,'Faxa_snow_16O', perrWith='quiet' )

index_a2x_Faxa_snowc_18O = mct_aVect_indexRA(a2x_i,'Faxa_snowc_18O', perrWith='quiet')
index_a2x_Faxa_snowl_18O = mct_aVect_indexRA(a2x_i,'Faxa_snowl_18O', perrWith='quiet')
index_a2x_Faxa_rainc_18O = mct_aVect_indexRA(a2x_i,'Faxa_rainc_18O', perrWith='quiet')
index_a2x_Faxa_rainl_18O = mct_aVect_indexRA(a2x_i,'Faxa_rainl_18O', perrWith='quiet')
index_x2i_Faxa_rain_18O = mct_aVect_indexRA(x2i_i,'Faxa_rain_18O', perrWith='quiet' )
index_x2i_Faxa_snow_18O = mct_aVect_indexRA(x2i_i,'Faxa_snow_18O', perrWith='quiet' )

index_a2x_Faxa_snowc_HDO = mct_aVect_indexRA(a2x_i,'Faxa_snowc_HDO', perrWith='quiet')
index_a2x_Faxa_snowl_HDO = mct_aVect_indexRA(a2x_i,'Faxa_snowl_HDO', perrWith='quiet')
index_a2x_Faxa_rainc_HDO = mct_aVect_indexRA(a2x_i,'Faxa_rainc_HDO', perrWith='quiet')
index_a2x_Faxa_rainl_HDO = mct_aVect_indexRA(a2x_i,'Faxa_rainl_HDO', perrWith='quiet')
index_x2i_Faxa_rain_HDO = mct_aVect_indexRA(x2i_i,'Faxa_rain_HDO', perrWith='quiet' )
index_x2i_Faxa_snow_HDO = mct_aVect_indexRA(x2i_i,'Faxa_snow_HDO', perrWith='quiet' )

do i = 1,niflds
field = mct_aVect_getRList2c(i, x2i_i)
mrgstr(i) = subname//'x2i%'//trim(field)//' ='
Expand Down Expand Up @@ -309,6 +350,26 @@ subroutine prep_ice_merge(flux_epbalfact, a2x_i, o2x_i, r2x_i, g2x_i, x2i_i )
mrgstr(index_x2i_Fixx_rofi) = trim(mrgstr(index_x2i_Fixx_rofi))//' = '// &
'(g2x%Figg_rofi + r2x%Firr_rofi)*flux_epbalfact'

!--- water isotope document manual merges ---
if ( index_x2i_Faxa_rain_16O /= 0 ) then
mrgstr(index_x2i_Faxa_rain_16O) = trim(mrgstr(index_x2i_Faxa_rain_16O))//' = '// &
'(a2x%Faxa_rainc_16O + a2x%Faxa_rainl_16O)*flux_epbalfact'
mrgstr(index_x2i_Faxa_snow_16O) = trim(mrgstr(index_x2i_Faxa_snow_16O))//' = '// &
'(a2x%Faxa_snowc_16O + a2x%Faxa_snowl_16O)*flux_epbalfact'
end if
if ( index_x2i_Faxa_rain_18O /= 0 ) then
mrgstr(index_x2i_Faxa_rain_18O) = trim(mrgstr(index_x2i_Faxa_rain_18O))//' = '// &
'(a2x%Faxa_rainc_18O + a2x%Faxa_rainl_18O)*flux_epbalfact'
mrgstr(index_x2i_Faxa_snow_18O) = trim(mrgstr(index_x2i_Faxa_snow_18O))//' = '// &
'(a2x%Faxa_snowc_18O + a2x%Faxa_snowl_18O)*flux_epbalfact'
end if
if ( index_x2i_Faxa_rain_HDO /= 0 ) then
mrgstr(index_x2i_Faxa_rain_HDO) = trim(mrgstr(index_x2i_Faxa_rain_HDO))//' = '// &
'(a2x%Faxa_rainc_HDO + a2x%Faxa_rainl_HDO)*flux_epbalfact'
mrgstr(index_x2i_Faxa_snow_HDO) = trim(mrgstr(index_x2i_Faxa_snow_HDO))//' = '// &
'(a2x%Faxa_snowc_HDO + a2x%Faxa_snowl_HDO)*flux_epbalfact'
end if

endif

! call mct_aVect_copy(aVin=o2x_i, aVout=x2i_i, vector=mct_usevector)
Expand All @@ -332,6 +393,36 @@ subroutine prep_ice_merge(flux_epbalfact, a2x_i, o2x_i, r2x_i, g2x_i, x2i_i )
x2i_i%rAttr(index_x2i_Faxa_rain,i) = x2i_i%rAttr(index_x2i_Faxa_rain,i) * flux_epbalfact
x2i_i%rAttr(index_x2i_Faxa_snow,i) = x2i_i%rAttr(index_x2i_Faxa_snow,i) * flux_epbalfact
x2i_i%rAttr(index_x2i_Fixx_rofi,i) = x2i_i%rAttr(index_x2i_Fixx_rofi,i) * flux_epbalfact

! For water isotopes
if ( index_x2i_Faxa_rain_16O /= 0 ) then
x2i_i%rAttr(index_x2i_Faxa_rain_16O,i) = a2x_i%rAttr(index_a2x_Faxa_rainc_16O,i) + &
a2x_i%rAttr(index_a2x_Faxa_rainl_16O,i)
x2i_i%rAttr(index_x2i_Faxa_snow_16O,i) = a2x_i%rAttr(index_a2x_Faxa_snowc_16O,i) + &
a2x_i%rAttr(index_a2x_Faxa_snowl_16O,i)

x2i_i%rAttr(index_x2i_Faxa_rain_16O,i) = x2i_i%rAttr(index_x2i_Faxa_rain_16O,i) * flux_epbalfact
x2i_i%rAttr(index_x2i_Faxa_snow_16O,i) = x2i_i%rAttr(index_x2i_Faxa_snow_16O,i) * flux_epbalfact
end if
if ( index_x2i_Faxa_rain_18O /= 0 ) then
x2i_i%rAttr(index_x2i_Faxa_rain_18O,i) = a2x_i%rAttr(index_a2x_Faxa_rainc_18O,i) + &
a2x_i%rAttr(index_a2x_Faxa_rainl_18O,i)
x2i_i%rAttr(index_x2i_Faxa_snow_18O,i) = a2x_i%rAttr(index_a2x_Faxa_snowc_18O,i) + &
a2x_i%rAttr(index_a2x_Faxa_snowl_18O,i)

x2i_i%rAttr(index_x2i_Faxa_rain_18O,i) = x2i_i%rAttr(index_x2i_Faxa_rain_18O,i) * flux_epbalfact
x2i_i%rAttr(index_x2i_Faxa_snow_18O,i) = x2i_i%rAttr(index_x2i_Faxa_snow_18O,i) * flux_epbalfact
end if
if ( index_x2i_Faxa_rain_HDO /= 0 ) then
x2i_i%rAttr(index_x2i_Faxa_rain_HDO,i) = a2x_i%rAttr(index_a2x_Faxa_rainc_HDO,i) + &
a2x_i%rAttr(index_a2x_Faxa_rainl_HDO,i)
x2i_i%rAttr(index_x2i_Faxa_snow_HDO,i) = a2x_i%rAttr(index_a2x_Faxa_snowc_HDO,i) + &
a2x_i%rAttr(index_a2x_Faxa_snowl_HDO,i)

x2i_i%rAttr(index_x2i_Faxa_rain_HDO,i) = x2i_i%rAttr(index_x2i_Faxa_rain_HDO,i) * flux_epbalfact
x2i_i%rAttr(index_x2i_Faxa_snow_HDO,i) = x2i_i%rAttr(index_x2i_Faxa_snow_HDO,i) * flux_epbalfact
end if

end do

if (first_time) then
Expand Down
Loading

0 comments on commit 3d72660

Please sign in to comment.