Skip to content

Commit

Permalink
Merge branch 'rljacob/update-cime2.0.12' (PR #11)
Browse files Browse the repository at this point in the history
    Update ACMEs cime to cime 2.0.12

    conflicts resolved: use our version of config_compsets.xml

    Needed or useful for ACME:
    BatchMaker.pm:  more robust mpirun selection, don't ignore -project, CESM-Development/cime#140
    Update pio2 cmake build CESM-Development/cime#137
    cime unit tests now work when dot is not in path CESM-Development/cime#141
    update summarize_cprn_diffs to work with new scripts CESM-Development/cime#131
    Change cesm_setup to get list of models from env_run CESM-Development/cime#133
    Fix uninitialized value bug in create_test
    Various build fixes CESM-Development/cime#120
    Move lnd <-> glc coupling into coupler CESM-Development/cime#106
    Update batch configuration for edison
    Fix finding component history files for baseline gen,comp  CESM-Development/cime#86
    Change shr_flux_mods to support CAM aquaplanet CESM-Development/cime#64
    Improve cesm_clean and add compiler options helpful for pop/cice CESM-Development/cime#63 and 88
    Fix Batch* to allow machines that don't allow direct queue submissions and output the qsub command.
    configure uses -cimeroot even with -list CESM-Development/cime#55
    Have preview_namelists load modules for chemistry preprocessor.
    Fix minor compiler complaints for NAG.
    Add environment variable CIME_MODULES_LOADED to prevent module evnironment being loaded more than once
    Update dirunal shr_flux code and diurnal ocean feature in docn.  Don't hardwire 30 minute coupling period.

    No impact (yet) on ACME:
    Workaround for bug in cism-test_coupling cases.  CESM-Development/cime#138
    Increase compatability with pio2 build system.  CESM-Development/cime#137
    Use more general location for pfUnit CESM-Development/cime#134
    Replace large array in shr_expr_parser_mod CESM-Development/cime#130
    Fix (unused) dynamic_vector allocation CESM-Development/cime#125
    Add -qfloat=nomaf for mira/cetus
    Update hobart and edison/cray compiles.
    Read in namelists for new modules on task 0 only CESM-Development/cime#123
    Add cray compiler on edison CESM-Development/cime#120
    Fix mpi_unit_tests on yellowstone CESM-Development/cime#87
    Update hobart pelayouts CESM-Development/cime#62
    Allow fire emission fluxes CESM-Development/cime#61
    Update ExpectedTestFails.xml
    Fix hobart path for cprnc
  • Loading branch information
rljacob committed Sep 2, 2015
2 parents 45d3bdd + 7014068 commit ae9de62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 6 additions & 8 deletions data_comps/dlnd/dlnd_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module dlnd_comp_mod
use seq_infodata_mod
use seq_timemgr_mod
use seq_comm_mct , only: seq_comm_inst, seq_comm_name, seq_comm_suffix
use seq_flds_mod , only: seq_flds_l2x_fields, seq_flds_x2l_fields, &
glc_nec=>seq_flds_glc_nec
use seq_flds_mod , only: seq_flds_l2x_fields, seq_flds_x2l_fields
use glc_elevclass_mod, only: glc_get_num_elevation_classes, glc_elevclass_as_string
!
! !PUBLIC TYPES:
implicit none
Expand Down Expand Up @@ -136,6 +136,7 @@ subroutine dlnd_comp_init( EClock, cdata_l, x2l, l2x, NLFilename )
integer(IN) :: COMPID ! comp id
integer(IN) :: gsize ! global size
integer(IN) :: lsize_l ! local size
integer(IN) :: glc_nec ! number of elevation classes
integer(IN) :: shrlogunit, shrloglev ! original log unit and level
integer(IN) :: nunit ! unit number
logical :: lnd_present ! flag
Expand All @@ -154,7 +155,6 @@ subroutine dlnd_comp_init( EClock, cdata_l, x2l, l2x, NLFilename )
character(CS) :: latName ! domain file: lat variable name
character(CS) :: maskName ! domain file: mask variable name
character(CS) :: areaName ! domain file: area variable name
character(CS) :: nec_format ! format for nec_str
character(nec_len):: nec_str ! elevation class, as character string

integer(IN) :: yearFirst ! first year to use in data stream
Expand Down Expand Up @@ -304,22 +304,20 @@ subroutine dlnd_comp_init( EClock, cdata_l, x2l, l2x, NLFilename )
! Build avofld & avifld
!----------------------------------------------------------------------------

glc_nec = glc_get_num_elevation_classes()

! Start with non-snow fields
allocate(avofld(nflds_nosnow + glc_nec*nflds_snow))
allocate(avifld(nflds_nosnow + glc_nec*nflds_snow))
avofld(1:nflds_nosnow) = avofld_nosnow
avifld(1:nflds_nosnow) = avifld_nosnow
field_num = nflds_nosnow

! create a format string for nec_str; e.g., if nec_len=2, this will be '(i2.2)'
! (without the quotes)
write(nec_format,'(a2, i0, a1, i0, a1)') "(i", nec_len, ".", nec_len, ")"

! Append each snow field
do k = 1, nflds_snow
do n = 1, glc_nec
! nec_str will be something like '02' or '10'
write(nec_str,nec_format) n
nec_str = glc_elevclass_as_string(n)

field_num = field_num + 1
avofld(field_num) = trim(avofld_snow(k))//nec_str
Expand Down
14 changes: 10 additions & 4 deletions data_comps/docn/docn_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module docn_comp_mod
real(R8),parameter :: latice = shr_const_latice ! latent heat of fusion
real(R8),parameter :: ocnsalt = shr_const_ocn_ref_sal ! ocean reference salinity

integer(IN) :: kt,ks,ku,kv,kdhdx,kdhdy,kq ! field indices
integer(IN) :: kt,ks,ku,kv,kdhdx,kdhdy,kq,kswp ! field indices
integer(IN) :: kswnet,klwup,klwdn,ksen,klat,kmelth,ksnow,krofi
integer(IN) :: kh,kqbot

Expand All @@ -86,21 +86,21 @@ module docn_comp_mod
integer , pointer :: imask(:)
character(len=*),parameter :: flds_strm = 'strm_h:strm_qbot'

integer(IN),parameter :: ktrans = 28
integer(IN),parameter :: ktrans = 29
character(12),parameter :: avifld(1:ktrans) = &
(/ "ifrac ","pslv ","duu10n ","taux ","tauy ", &
"swnet ","lat ","sen ","lwup ","lwdn ", &
"melth ","salt ","prec ","snow ","rain ", &
"evap ","meltw ","rofl ","rofi ", &
"t ","u ","v ","dhdx ","dhdy ", &
"s ","q ","h ","qbot "/)
"s ","q ","h ","qbot ","fswpen " /)
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 ","So_fswpen " /)

save

Expand Down Expand Up @@ -404,6 +404,7 @@ subroutine docn_comp_init( EClock, cdata, x2o, o2x, NLFilename )
kv = mct_aVect_indexRA(o2x,'So_v')
kdhdx = mct_aVect_indexRA(o2x,'So_dhdx')
kdhdy = mct_aVect_indexRA(o2x,'So_dhdy')
kswp = mct_aVect_indexRA(o2x,'So_fswpen')
kq = mct_aVect_indexRA(o2x,'Fioo_q')

call mct_aVect_init(x2o, rList=seq_flds_x2o_fields, lsize=lsize)
Expand Down Expand Up @@ -553,6 +554,8 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
integer(IN) :: nflds_x2o
type(seq_infodata_type), pointer :: infodata

real(R8), parameter :: swp = 0.67_R8*(exp((-1._R8*shr_const_zsrflyr) &
/1.0_R8)) + 0.33_R8*exp((-1._R8*shr_const_zsrflyr)/17.0_R8)
character(*), parameter :: F00 = "('(docn_comp_run) ',8a)"
character(*), parameter :: F04 = "('(docn_comp_run) ',2a,2i8,'s')"
character(*), parameter :: subName = "(docn_comp_run) "
Expand Down Expand Up @@ -619,6 +622,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
o2x%rAttr(kswp ,n) = swp
enddo

!--- copy streams to o2x ---
Expand Down Expand Up @@ -652,6 +656,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
o2x%rAttr(kswp ,n) = swp
enddo

case('IAF')
Expand All @@ -664,6 +669,7 @@ subroutine docn_comp_run( EClock, cdata, x2o, o2x)
o2x%rAttr(kdhdx,n) = 0.0_R8
o2x%rAttr(kdhdy,n) = 0.0_R8
o2x%rAttr(kq ,n) = 0.0_R8
o2x%rAttr(kswp ,n) = swp
enddo

case('SOM')
Expand Down

0 comments on commit ae9de62

Please sign in to comment.