From e3052ac7ba000e14b2fc6db1146a15a8dcb9e496 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 17 Oct 2018 00:45:41 -0600 Subject: [PATCH 1/7] Remove unneeded removal of input_data_list --- cime_config/buildnml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 68f9d2b01c..1738359f62 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -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 #---------------------------------------------------- From 513d6df9b0d2287198f23a3217ba599aebf96969 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 17 Oct 2018 00:49:47 -0600 Subject: [PATCH 2/7] Start changelog file to document changes --- docs/ChangeLog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/ChangeLog b/docs/ChangeLog index cff611e702..62953700de 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,3 +1,26 @@ +=============================================================== +Tag name: release-cesm2.0.02 +Originator(s): erik +Date: Oct 17, 2018 +One-line Summary: Fix some issues with nag compiler + + +Software Changes since last release: release-cesm2.0.01 + * Fix issues with nag compiler + +Science Changes since last release: release-cesm2.0.00 + * None + +Changes to User Interface since: release-cesm2.0.00 + * None + +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 From fcab232a200e7e48abe79efa9ad270af484e13a5 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 17 Oct 2018 01:00:46 -0600 Subject: [PATCH 3/7] Add more implicit none statements for subroutines, and type basetype --- src/riverroute/RtmIO.F90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/riverroute/RtmIO.F90 b/src/riverroute/RtmIO.F90 index 59d7ca50c2..101c88a138 100644 --- a/src/riverroute/RtmIO.F90 +++ b/src/riverroute/RtmIO.F90 @@ -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 !----------------------------------------------------------------------- @@ -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 @@ -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 @@ -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 From 916e1ae770cacc1ca4acc7fe0491fa32a5874c1e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 17 Oct 2018 16:22:38 -0600 Subject: [PATCH 4/7] Allocate a r4 sized array and put data in it explicitly rather than doing the conversion on the call to pio write --- src/riverroute/RtmIO.F90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/riverroute/RtmIO.F90 b/src/riverroute/RtmIO.F90 index 101c88a138..6046ff8f1a 100644 --- a/src/riverroute/RtmIO.F90 +++ b/src/riverroute/RtmIO.F90 @@ -1767,6 +1767,8 @@ subroutine ncd_io_real_var1(varname, data, dim1name, & integer , pointer :: compDOF(:) type(iodesc_plus_type) , pointer :: iodesc_plus type(var_desc_t) :: vardesc + real(r4) , allocatable :: datar4(:) ! local data at r4 + real(r4) :: spvalr4 character(len=*),parameter :: subname='ncd_io_real_var1' ! subroutine name !----------------------------------------------------------------------- @@ -1822,7 +1824,11 @@ 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)) + allocate( datar4(sizeof(data)) ) + datar4(:) = real(data, kind=r4) + spvalr4 = real(spval,kind=r4) + call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, datar4, status, fillval=spvalr4) + deallocate( datar4 ) else call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=spval) endif From 57e24f4578a0d27c045355a5e881bc73827d219a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 18 Oct 2018 11:50:07 -0600 Subject: [PATCH 5/7] Make default double precision and don't allow setting to single precision in namelist --- cime_config/namelist_definition_rtm.xml | 6 +++--- src/riverroute/RtmHistFile.F90 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cime_config/namelist_definition_rtm.xml b/cime_config/namelist_definition_rtm.xml index 0455d4d711..3277ea479b 100644 --- a/cime_config/namelist_definition_rtm.xml +++ b/cime_config/namelist_definition_rtm.xml @@ -205,13 +205,13 @@ integer(6) history rtm_inparm - 1,2 + 1 Per tape series history file density (i.e. output precision) - 1=double precision, 2=single precision + 1=double precision, 2=single precision (NOT functional) - 2 + 1 diff --git a/src/riverroute/RtmHistFile.F90 b/src/riverroute/RtmHistFile.F90 index b2387f05bf..01eab6a1a8 100644 --- a/src/riverroute/RtmHistFile.F90 +++ b/src/riverroute/RtmHistFile.F90 @@ -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 :: & From 426beeaaace3cbe99e321036a62ee4e6116df377 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 18 Oct 2018 16:47:05 -0600 Subject: [PATCH 6/7] Get rid of single precision history output and replace with an error --- src/riverroute/RtmIO.F90 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/riverroute/RtmIO.F90 b/src/riverroute/RtmIO.F90 index 6046ff8f1a..eab314be08 100644 --- a/src/riverroute/RtmIO.F90 +++ b/src/riverroute/RtmIO.F90 @@ -1767,8 +1767,6 @@ subroutine ncd_io_real_var1(varname, data, dim1name, & integer , pointer :: compDOF(:) type(iodesc_plus_type) , pointer :: iodesc_plus type(var_desc_t) :: vardesc - real(r4) , allocatable :: datar4(:) ! local data at r4 - real(r4) :: spvalr4 character(len=*),parameter :: subname='ncd_io_real_var1' ! subroutine name !----------------------------------------------------------------------- @@ -1824,11 +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 - allocate( datar4(sizeof(data)) ) - datar4(:) = real(data, kind=r4) - spvalr4 = real(spval,kind=r4) - call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, datar4, status, fillval=spvalr4) - deallocate( datar4 ) + 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 From a65f992c7bde4a1fae3e05c089fe1ae419ba555c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 19 Oct 2018 13:21:10 -0600 Subject: [PATCH 7/7] Update ChangeLog --- docs/ChangeLog | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/ChangeLog b/docs/ChangeLog index 62953700de..842beaca74 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,18 +1,29 @@ =============================================================== Tag name: release-cesm2.0.02 Originator(s): erik -Date: Oct 17, 2018 -One-line Summary: Fix some issues with nag compiler +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 - * None + * rtmhist_ndens can no longer equal 2. Pull Requests that document the changes (include PR ids): #10 -- Fix some issues with nag compiler @@ -31,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 @@ -60,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.