Skip to content

Commit

Permalink
Merge pull request #10 from ekluzek/fillnagfix
Browse files Browse the repository at this point in the history
Fix some issues with nag compiler
  • Loading branch information
ekluzek authored Oct 19, 2018
2 parents 48e5252 + a65f992 commit 725d162
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
7 changes: 0 additions & 7 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
if config["rof_grid"] == "null" and config["rtm_mode"] != "NULL":
expect(False, "ROF_GRID is null RTM_MODE not NULL")

#----------------------------------------------------
# Clear out old data.
#----------------------------------------------------
data_list_path = os.path.join(case.get_case_root(), "Buildconf", "rtm.input_data_list")
if os.path.exists(data_list_path):
os.remove(data_list_path)

#----------------------------------------------------
# Initialize namelist defaults
#----------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cime_config/namelist_definition_rtm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@
<type>integer(6)</type>
<category>history</category>
<group>rtm_inparm</group>
<valid_values>1,2</valid_values>
<valid_values>1</valid_values>
<desc>
Per tape series history file density (i.e. output precision)
1=double precision, 2=single precision
1=double precision, 2=single precision (NOT functional)
</desc>
<values>
<value>2</value>
<value>1</value>
</values>
</entry>

Expand Down
38 changes: 38 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
===============================================================
Tag name: release-cesm2.0.02
Originator(s): erik
Date: Oct 19, 2018
One-line Summary: Fix some issues with nag compiler, remove rtmhist_ndens==2 option

basetype wasn't declared and needed to be. Also add more "implicit none"
statements in. Remove the deletion of "rtm.input_data_list" file, as cime
now does this. Remove the option of setting single-precision
history output, as it sometimes has numerical conversion issues. The
real solution for it should be to keep a single-precision history
buffer that then outputs at the same precision as stored, rather than
converting just before. This would trigger issues with the conversion
earlier.

RTM Master Tag This Corresponds To: rtm1_0_66 (with changes)

Software Changes since last release: release-cesm2.0.01
* Fix issues with nag compiler
* Remove single precision output option

Science Changes since last release: release-cesm2.0.00
* None

Changes to User Interface since: release-cesm2.0.00
* rtmhist_ndens can no longer equal 2.

Pull Requests that document the changes (include PR ids):
#10 -- Fix some issues with nag compiler

Testing:
rtm testlist on hobart and cheyenne (PASS)


===============================================================
Tag name: release-cesm2.0.01
Originator(s): erik
Expand All @@ -8,6 +42,8 @@ Changes ported from mosart/#15 to rtm. Run pylint through buildlib/buildnml,
changes for fill value needed for pio2. Also use the floor operator
for a specific integer divide as python3 turns it into reals.

RTM Master Tag This Corresponds To: rtm1_0_66 (with changes)

Purpose:

Software Changes since last release: release-cesm2.0.00
Expand Down Expand Up @@ -37,6 +73,8 @@ Purpose:

First RTM version for the CESM2.0 release. This tag is identical to rtm1_0_66

RTM Master Tag This Corresponds To: rtm1_0_66

Software Changes since last release: rtm1_0_30

* Add in model_doi_url read in from infodata from coupler.
Expand Down
2 changes: 1 addition & 1 deletion src/riverroute/RtmHistFile.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module RtmHistFile
!
integer :: ni
integer, public :: &
rtmhist_ndens(max_tapes) = 2 ! namelist: output density of netcdf history files
rtmhist_ndens(max_tapes) = 1 ! namelist: output density of netcdf history files
integer, public :: &
rtmhist_mfilt(max_tapes) = 30 ! namelist: number of time samples per tape
integer, public :: &
Expand Down
6 changes: 5 additions & 1 deletion src/riverroute/RtmIO.F90
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ subroutine ncd_pio_closefile(file)
! Close a NetCDF PIO file
!
! !ARGUMENTS:
implicit none
type(file_desc_t), intent(inout) :: file ! PIO file handle to close
!-----------------------------------------------------------------------

Expand Down Expand Up @@ -408,6 +409,7 @@ subroutine ncd_inqfdims(ncid, isgrid2d, ni, nj, ns)

!-----------------------------------------------------------------------
! !ARGUMENTS:
implicit none
type(file_desc_t), intent(inout):: ncid
logical , intent(out) :: isgrid2d
integer , intent(out) :: ni
Expand Down Expand Up @@ -1820,7 +1822,7 @@ subroutine ncd_io_real_var1(varname, data, dim1name, &
call pio_setframe(ncid, vardesc, int(nt,kind=pio_offset_kind))
end if
if(xtype == ncd_float) then
call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, real(data, kind=r4), status, fillval=real(spval,kind=r4))
call shr_sys_abort( subname//' error: Attempt to write out single-precision data which is current NOT implemented (see issue #12)' )
else
call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=spval)
endif
Expand All @@ -1844,6 +1846,7 @@ subroutine ncd_getiodesc(ncid, ndims, dims, dimids, xtype, iodnum)
! Returns an index to an io descriptor
!
! !ARGUMENTS:
implicit none
type(file_desc_t), intent(inout) :: ncid ! PIO file descriptor
integer , intent(in) :: ndims ! ndims for var
integer , intent(in) :: dims(:) ! dim sizes
Expand All @@ -1855,6 +1858,7 @@ subroutine ncd_getiodesc(ncid, ndims, dims, dimids, xtype, iodnum)
integer :: lsize ! local size
integer :: gsize ! global size
integer :: status ! error status
integer :: basetype ! base data type
logical :: found ! true => found created iodescriptor
integer :: ndims_file ! temporary
character(len=64) dimname_file ! dimension name on file
Expand Down

0 comments on commit 725d162

Please sign in to comment.