From 26ff75e348aba5a3f08d7d1f262556861d17c2d5 Mon Sep 17 00:00:00 2001 From: Peter Bogenschutz Date: Tue, 22 Jan 2019 16:38:49 -0800 Subject: [PATCH] modifications to test suite to allow for SCM test using SE dycore --- driver-mct/main/seq_hist_mod.F90 | 14 ++++++++++---- driver-mct/main/seq_io_mod.F90 | 24 ++++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/driver-mct/main/seq_hist_mod.F90 b/driver-mct/main/seq_hist_mod.F90 index 313598703d8b..076d41819b2e 100644 --- a/driver-mct/main/seq_hist_mod.F90 +++ b/driver-mct/main/seq_hist_mod.F90 @@ -100,6 +100,7 @@ module seq_hist_mod logical :: histavg_wav ! .true. => write wav fields to average history file logical :: histavg_xao ! .true. => write flux xao fields to average history file + logical :: single_column !--- domain equivalent 2d grid size --- integer(IN) :: atm_nx, atm_ny ! nx,ny of 2d grid, if known @@ -201,6 +202,7 @@ subroutine seq_hist_write(infodata, EClock_d, & glc_nx=glc_nx, glc_ny=glc_ny, & wav_nx=wav_nx, wav_ny=wav_ny, & ocn_nx=ocn_nx, ocn_ny=ocn_ny, & + single_column=single_column, & case_name=case_name, & model_doi_url=model_doi_url) @@ -252,13 +254,17 @@ subroutine seq_hist_write(infodata, EClock_d, & gsmap => component_get_gsmap_cx(atm(1)) dom => component_get_dom_cx(atm(1)) call seq_io_write(hist_file, gsmap, dom%data, 'dom_ax', & - nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='doma') + nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='doma', & + scolumn=single_column) call seq_io_write(hist_file, gsmap, fractions_ax, 'fractions_ax', & - nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='fraca') + nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='fraca', & + scolumn=single_column) call seq_io_write(hist_file, atm, 'x2c', 'x2a_ax', & - nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='x2a') + nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='x2a', & + scolumn=single_column) call seq_io_write(hist_file, atm, 'c2x', 'a2x_ax', & - nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='a2x') + nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='a2x', & + scolumn=single_column) !call seq_io_write(hist_file, gsmap, l2x_ax, 'l2x_ax', & ! nx=atm_nx, ny=atm_ny, nt=1, whead=whead, wdata=wdata, pre='l2x_ax') !call seq_io_write(hist_file, gsmap, o2x_ax, 'o2x_ax', & diff --git a/driver-mct/main/seq_io_mod.F90 b/driver-mct/main/seq_io_mod.F90 index a4e5701db388..40d62278f6dd 100644 --- a/driver-mct/main/seq_io_mod.F90 +++ b/driver-mct/main/seq_io_mod.F90 @@ -376,7 +376,7 @@ end function seq_io_sec2hms ! !INTERFACE: ------------------------------------------------------------------ subroutine seq_io_write_av(filename,gsmap,AV,dname,whead,wdata,nx,ny,nt,fillval,pre,tavg,& - use_float, file_ind) + use_float, file_ind, scolumn) ! !INPUT/OUTPUT PARAMETERS: implicit none @@ -394,6 +394,7 @@ subroutine seq_io_write_av(filename,gsmap,AV,dname,whead,wdata,nx,ny,nt,fillval, logical,optional,intent(in) :: tavg ! is this a tavg logical,optional,intent(in) :: use_float ! write output as float rather than double integer,optional,intent(in) :: file_ind + logical,optional,intent(in) :: scolumn ! single column model flag !EOP @@ -421,6 +422,7 @@ subroutine seq_io_write_av(filename,gsmap,AV,dname,whead,wdata,nx,ny,nt,fillval, character(*),parameter :: subName = '(seq_io_write_av) ' integer, pointer :: Dof(:) integer :: lfile_ind + logical :: lcolumn real(r8), allocatable :: tmpdata(:) @@ -440,8 +442,10 @@ subroutine seq_io_write_av(filename,gsmap,AV,dname,whead,wdata,nx,ny,nt,fillval, lwhead = .true. lwdata = .true. + lcolumn = .false. if (present(whead)) lwhead = whead if (present(wdata)) lwdata = wdata + if (present(scolumn)) lcolumn = scolumn if (.not.lwhead .and. .not.lwdata) then ! should we write a warning? @@ -475,7 +479,7 @@ subroutine seq_io_write_av(filename,gsmap,AV,dname,whead,wdata,nx,ny,nt,fillval, if (present(ny)) then if (ny /= 0) lny = ny endif - if (lnx*lny /= ng) then + if (lnx*lny /= ng .and. .not. lcolumn) then if(iam==0) write(logunit,*) subname,' ERROR: grid2d size not consistent ',ng,lnx,lny,trim(dname) call shr_sys_abort(subname//'ERROR: grid2d size not consistent ') endif @@ -562,7 +566,7 @@ end subroutine seq_io_write_av ! !INTERFACE: ------------------------------------------------------------------ subroutine seq_io_write_avs(filename,gsmap,AVS,dname,whead,wdata,nx,ny,nt,fillval,pre,tavg,& - use_float,file_ind) + use_float,file_ind,scolumn) ! !INPUT/OUTPUT PARAMETERS: implicit none @@ -580,6 +584,7 @@ subroutine seq_io_write_avs(filename,gsmap,AVS,dname,whead,wdata,nx,ny,nt,fillva logical,optional,intent(in) :: tavg ! is this a tavg logical,optional,intent(in) :: use_float ! write output as float rather than double integer,optional,intent(in) :: file_ind + logical,optional,intent(in) :: scolumn ! single column model flag !EOP @@ -610,6 +615,7 @@ subroutine seq_io_write_avs(filename,gsmap,AVS,dname,whead,wdata,nx,ny,nt,fillva integer, pointer :: Dof(:) integer, pointer :: Dofn(:) integer :: lfile_ind + logical :: lcolumn !------------------------------------------------------------------------------- ! @@ -627,8 +633,10 @@ subroutine seq_io_write_avs(filename,gsmap,AVS,dname,whead,wdata,nx,ny,nt,fillva lwhead = .true. lwdata = .true. + lcolumn = .false. if (present(whead)) lwhead = whead if (present(wdata)) lwdata = wdata + if (present(scolumn)) lcolumn = scolumn if (.not.lwhead .and. .not.lwdata) then ! should we write a warning? @@ -666,7 +674,7 @@ subroutine seq_io_write_avs(filename,gsmap,AVS,dname,whead,wdata,nx,ny,nt,fillva if (present(ny)) then if (ny /= 0) lny = ny endif - if (lnx*lny /= ng) then + if (lnx*lny /= ng .and. .not. lcolumn) then if(iam==0) write(logunit,*) subname,' ERROR: grid2d size not consistent ',ng,lnx,lny,trim(dname) call shr_sys_abort(subname//' ERROR: grid2d size not consistent ') endif @@ -784,7 +792,7 @@ end subroutine seq_io_write_avs ! !INTERFACE: ------------------------------------------------------------------ subroutine seq_io_write_avscomp(filename, comp, flow, dname, & - whead, wdata, nx, ny, nt, fillval, pre, tavg, use_float, file_ind) + whead, wdata, nx, ny, nt, fillval, pre, tavg, use_float, file_ind, scolumn) ! !INPUT/OUTPUT PARAMETERS: implicit none @@ -802,6 +810,7 @@ subroutine seq_io_write_avscomp(filename, comp, flow, dname, & logical ,optional,intent(in) :: tavg ! is this a tavg logical ,optional,intent(in) :: use_float ! write output as float rather than double integer ,optional,intent(in) :: file_ind + logical ,optional,intent(in) :: scolumn ! single column model flag !EOP @@ -835,6 +844,7 @@ subroutine seq_io_write_avscomp(filename, comp, flow, dname, & integer, pointer :: Dof(:) integer, pointer :: Dofn(:) integer :: lfile_ind + logical :: lcolumn !------------------------------------------------------------------------------- ! @@ -852,8 +862,10 @@ subroutine seq_io_write_avscomp(filename, comp, flow, dname, & lwhead = .true. lwdata = .true. + lcolumn = .false. if (present(whead)) lwhead = whead if (present(wdata)) lwdata = wdata + if (present(scolumn)) lcolumn = scolumn frame = -1 if (present(nt)) then frame = nt @@ -893,7 +905,7 @@ subroutine seq_io_write_avscomp(filename, comp, flow, dname, & if (present(ny)) then if (ny /= 0) lny = ny endif - if (lnx*lny /= ng) then + if (lnx*lny /= ng .and. .not. lcolumn) then if(iam==0) then write(logunit,*) subname,' ERROR: grid2d size not consistent ',& ng,lnx,lny,trim(dname)