Skip to content

Commit

Permalink
Merge branch 'main' into feature/init_dglc_pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Jun 26, 2024
2 parents 0acd3c7 + 01f4761 commit 10b98cb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions datm/cime_config/stream_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3578,7 +3578,7 @@
<meshfile>none</meshfile>
</stream_meshfile>
<stream_datafiles>
<file>$DIN_LOC_ROOT/atm/datm7/CO2/fco2_datm_globalSSP3-7.0__simyr_2014-2501_CMIP6_c190506.nc</file>
<file>$DIN_LOC_ROOT/atm/datm7/CO2/fco2_datm_globalSSP3-7.0_simyr_1750-2501_CMIP6_c201101.nc</file>
</stream_datafiles>
<stream_datavars>
<var>CO2 Sa_co2diag</var>
Expand Down Expand Up @@ -4001,7 +4001,7 @@
<meshfile>$DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</meshfile>
</stream_meshfile>
<stream_datafiles>
<file>$DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero/aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_2014-2101_monthly_0.9x1.25_c190402.nc</file>
<file>$DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero/aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_1849-2101_monthly_0.9x1.25_c201103.nc</file>
</stream_datafiles>
<stream_datavars>
<var>BCDEPWET Faxa_bcphiwet</var>
Expand Down
2 changes: 1 addition & 1 deletion dglc/glc_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ subroutine ModelAdvance(gcomp, rc)
if (my_task == main_task) then
call ESMF_TimeGet(currTime, timestring=timestring, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
write(logunit,'(a,l)') trim(timestring)//': valid_input for dglc is ',valid_inputs
write(logunit,'(a,l6)') trim(timestring)//': valid_input for dglc is ',valid_inputs
end if

! determine if will write restart
Expand Down
23 changes: 17 additions & 6 deletions streams/dshr_strdata_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,7 @@ subroutine shr_strdata_set_stream_iodesc(sdat, per_stream, fldname, pioid, rc)
character(*), parameter :: F00 = "('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,a)"
character(*), parameter :: F01 = "('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,a)"
character(*), parameter :: F02 = "('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,i8,2x,a)"
character(*), parameter :: F03 = "('(shr_strdata_set_stream_iodesc) ',a,i8,2x,a)"
!-------------------------------------------------------------------------------

rc = ESMF_SUCCESS
Expand Down Expand Up @@ -2003,13 +2004,23 @@ subroutine shr_strdata_set_stream_iodesc(sdat, per_stream, fldname, pioid, rc)

! determine io descriptor
if (ndims == 2) then
if (sdat%mainproc) then
write(sdat%stream(1)%logunit,F00) 'setting iodesc for : '//trim(fldname)// &
' with dimlens(1), dimlens2 = ',dimlens(1),dimlens(2),&
' variable has no time dimension '
rcode = pio_inq_dimname(pioid, dimids(ndims), dimname)
if (trim(dimname) == 'time' .or. trim(dimname) == 'nt') then
if (sdat%mainproc) then
write(sdat%stream(1)%logunit,F03) 'setting iodesc for : '//trim(fldname)// &
' with dimlens(1) = ',dimlens(1),' and the variable has a time dimension '
end if
call pio_initdecomp(sdat%pio_subsystem, pio_iovartype, (/dimlens(1)/), compdof, &
per_stream%stream_pio_iodesc)
else
if (sdat%mainproc) then
write(sdat%stream(1)%logunit,F00) 'setting iodesc for : '//trim(fldname)// &
' with dimlens(1), dimlens(2) = ',dimlens(1),dimlens(2),&
' variable has no time dimension '
end if
call pio_initdecomp(sdat%pio_subsystem, pio_iovartype, (/dimlens(1),dimlens(2)/), compdof, &
per_stream%stream_pio_iodesc)
end if
call pio_initdecomp(sdat%pio_subsystem, pio_iovartype, (/dimlens(1),dimlens(2)/), compdof, &
per_stream%stream_pio_iodesc)

else if (ndims == 3) then
rcode = pio_inq_dimname(pioid, dimids(ndims), dimname)
Expand Down

0 comments on commit 10b98cb

Please sign in to comment.