Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jgfouca/homme/bring in as subtree #331

Closed
wants to merge 1,239 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1239 commits
Select commit Hold shift + click to select a range
722ee0f
tracer 1 is no longer air density in the cslam setup; change tracer 1…
Jun 9, 2014
2e3c768
update for updated redsky
Jun 10, 2014
668f514
Change number of quadrature points in CSLAM scheme
Jun 10, 2014
840c5a3
Apply CAM forcing from CSLAM tracers.
Jun 10, 2014
6396956
got limiter2d_minmax working again...
Jun 10, 2014
e1f3bd9
adding ne=4 option to baro.job
Jun 10, 2014
685a8f2
Fix subscripts on fvm tracer forcing.
Jun 11, 2014
faac186
Remove annoying, errant print statement
Jun 11, 2014
06656d5
Cleanup of hvcoord
Jun 14, 2014
6e6e10b
adding a few more vertical coordinate files (64 and 96 levels, pure s…
Jun 14, 2014
3b0c25b
update to script to run with 64, 96 levels
Jun 14, 2014
114a20c
Added some comments.
Jun 16, 2014
3899821
Reverting commit 4119 since it broke the builds.
Jun 16, 2014
17b0d34
Add Exner function. Change function Temp2PotTemp to use constants def…
Jun 17, 2014
a9406d7
remove un-used argument in Exner pressure function
Jun 17, 2014
594814d
OpenMP on by default.
Jun 23, 2014
9e69a4f
Fix for tests.
Jun 23, 2014
29dd946
Fix for XLF 14.1
Jun 24, 2014
bc4aa37
Merged from trunk. Merge command was:
Jun 24, 2014
4e99017
Merging in cslam branch
Jun 25, 2014
86f5e6b
nag port branch
Jun 25, 2014
9ba75cc
port to nag compiler
Jun 25, 2014
5003be9
Merge broke tests. Reverting.
Jun 25, 2014
5015d54
thread_mod fix for pgi
Jun 26, 2014
052b3e0
Fixed checkin 4138 by adding new files to to CMakeList.txt files whic…
Jun 27, 2014
19be074
Not sure how these slipped out of the last checkin.
Jun 28, 2014
e2978ed
Creating branch for development for next CAM release
Jul 1, 2014
a6ee024
Fixing externals so they work with newer versions of svn
Jul 2, 2014
53b9bec
Creating branch to update cprnc.
Jul 2, 2014
b3f03b5
Update cprnc. Compiling under nag compiler.
Jul 7, 2014
8e19ee0
Merge cprnc and nag branch to trunk.
Jul 7, 2014
853649a
turn on fvm timer
Jul 7, 2014
e2ae8f2
Fix line length.
Jul 7, 2014
922041d
IMPORTANT UPDATE: fixing memory bug in fvm_reconstruction_mod - major…
Jul 9, 2014
71be685
fixing bug in previous checkin
Jul 9, 2014
9557a28
revert to earlier (chages slowed down code significantly)
Jul 9, 2014
dce9130
More performance improvements (speeded up code by 2x)
Jul 9, 2014
f427fcb
Change to contiguous array calls and some rearranging of code
Jul 10, 2014
d29c360
Add "tracer_transport_type"-code (however, not read in through fvm na…
Jul 10, 2014
893dfe1
performance updates: contiguous arrays
Jul 11, 2014
224734a
changed some array declarations
Jul 11, 2014
078e27e
remove (detailed) timers
Jul 11, 2014
a77f176
Dimension checkin in namelist_mod
Jul 11, 2014
017268e
Fixing bug in call to ghostVpack and ghostVunpack for ff-cslam
Jul 11, 2014
d537895
Revert to goldy's "memory-reducing" array declarations in fvm_filter_mod
Jul 11, 2014
b1ca307
removed from the element struct: node_numbers and node_multiplicity, …
Jul 25, 2014
8a1eb77
Add dp_fvm to output
Jul 28, 2014
ab2141b
Move computation of flux_area outside of ff_cslam_remap_q; flux_area …
Jul 28, 2014
bac101c
Removing files - these aren't used anywhere.
Jul 29, 2014
756de07
Removed commented out reference to stats.h.
Jul 29, 2014
259988f
add consistency checks; add extra info to standard output; add div_fv…
Jul 30, 2014
fee46f7
comment out consistency checks (for performance)
Jul 30, 2014
d8827ce
temporary dp_fvm and dp (gll) coupling (and fix bug in fvm code)
Jul 30, 2014
553dc7f
add div_fvm to output
Jul 30, 2014
b13f9a0
update fvm drivers to work with new namelist variables
Aug 1, 2014
57b6bc2
updated template generation code to that it will also add the GLL met…
Aug 4, 2014
575b172
add comments to new NCL script
Aug 4, 2014
8ad1294
update darwin.cmake file to disable openMP.
Aug 13, 2014
f0cdb0f
1. fill cslam halo at beginning of time-step instead of after time-st…
Aug 13, 2014
7262c71
don't do reconstruction (since halo is currently no updated)
Aug 13, 2014
8e422d3
add halo to diagnostic div_fvm
Aug 13, 2014
c40fc70
apply qv forcing to GLL qv even when using fvm tracers
Aug 14, 2014
7007f72
add 'area' metadata to latlon.nc template file
Aug 17, 2014
65d1262
move fvm tracers to 2 time-levels (this current breack --app fvm)
Aug 28, 2014
79663d5
-app fvm now works with 2 fvm time-levels
Aug 29, 2014
76051c8
In CAM, the abortutils module has been replaced by cam_abortutils.
Sep 3, 2014
4bf00cd
cleanup makegrid script
Sep 10, 2014
aade3d6
more robustness checks (can generate cslam/physis grid when running w…
Sep 10, 2014
3ca5027
updated CMAKE file for redsky
Sep 16, 2014
3d8bfaf
implementation of fvm internal time-levels (defined in fvm_control_vo…
Sep 18, 2014
4db3f0a
Rough first go at runing SE and fvm tracers at the same time; enable …
Sep 19, 2014
fd1f3f6
remove write statement
Sep 22, 2014
5fd2f15
tweaks to restore capability to run CSLAM and GLL tracers at the same…
Sep 24, 2014
18a019b
fix bug for CAM (move use-statement out of ifdef)
Sep 24, 2014
e39da24
updated to baro2d test:
Sep 24, 2014
e58ceb7
fix typo in name of new vcoord files
Sep 24, 2014
2152f5c
Implementation of supercycling of fvm tracers with respect to se trac…
Sep 25, 2014
2037989
Set up openmp for prim. Fix missed ELEMENT_OPENMP in prim_main.
Oct 3, 2014
cee23e0
bugfix in mesh tempalte generator when running in paralllel - need to…
Oct 13, 2014
7fdaa2b
Creating a branch for threading improvements.
Oct 14, 2014
75c5cf0
Some files for Nersc machines.
Oct 14, 2014
5100181
correcting spelling error
Oct 14, 2014
603a256
Add fast approximate Newton method for parametric coordinates for ALE…
Oct 14, 2014
8881bc1
typo fix in baro.job script
Oct 15, 2014
c1837f9
Add a more exact parametric coordinate Newtion iteration for ALE.
Oct 15, 2014
2d67fb7
Remove non-standard call to NORM2.
Oct 16, 2014
bab4818
bug fix in vplacle_sphere_wk_cartesian. Code commented out for now, …
Oct 16, 2014
8464c85
First round of thread performance improvements. Removed barrier in pa…
Oct 16, 2014
43a9ece
many bug fixes for the threading support for ghost halo routines
Oct 23, 2014
6bd6993
update sweq_mod to work with latest bndry_mod.F90
Oct 23, 2014
26e2c06
tweak for GNU compiler, from Ben
Oct 24, 2014
c19e71e
Add option to do a local iteration conservation/limiter.
Oct 24, 2014
a7d0f21
Removing most autotools builds. Removed Makefile and Depends files. D…
Oct 27, 2014
40451be
remove TRACERTRANSPORT logic (use ntrac and qsize instead)
Oct 27, 2014
33c330b
Even more TRACERTRANSPORT_ logic removed ...
Oct 27, 2014
ab4722b
fix time-level bug in adding forcing term
Oct 27, 2014
57e2d30
For got to checkin dimensions_mod ... code now works for fvm passive …
Oct 28, 2014
840413c
Added babbage-mic cmake definitions to branch
Oct 31, 2014
38208fe
New branch so that I can work on new edge buffer ideas.
Oct 31, 2014
ba6376d
Starting to add modifictions for the newedgebuffer work.
Nov 4, 2014
13c32e7
Added infrastructure into place to support the newedgebuffer refactor…
Nov 5, 2014
5a04e8a
Collapsed the 2D message buffer into a 1D buffer.
Nov 6, 2014
00ea309
Fixed some compiler fussiness
Nov 6, 2014
c804c77
Totally changed all the interfaces to the initEdgeBuffer, edgeVpack, …
Nov 7, 2014
f01672b
Updateds for the newedgebuffer modifications.
Nov 13, 2014
e052264
Add a little flux distrobution function Mark Taylor wanted.
Nov 13, 2014
93b2550
Slight fix to the flux computation.
Nov 14, 2014
9f10109
print tstep_type to log file
Nov 14, 2014
cc9d41c
Completely rewrite the flux distribution function.
Nov 15, 2014
0c0c775
Reverse signs.
Nov 15, 2014
58bce06
Error in using matrix-matrix multiply instead of element-by-element.
Nov 18, 2014
aa492f0
-DUSE_SRCMODS_PATH capability added.
Nov 18, 2014
5251328
Add an element to sub-element flux distribution function and a unit t…
Nov 18, 2014
543f89a
Collect some unit tests into a separate file.
Nov 19, 2014
566132d
Merged trunk (@4390) into nextCAM branch. HOMME trunk tests pass.
Dec 1, 2014
78c8566
Merged changes from nextCAM branch. Passes HOMME trunk baseline tests.
Dec 1, 2014
c5e53ce
endrun still in abortutils (that changes later).
Dec 1, 2014
6f2d505
Add a function for subcell fluxes of the divergence.
Dec 2, 2014
5d5cfd4
Add a function for subcell fluxes of the Laplace operator.
Dec 4, 2014
32b0e85
Removed some unused module variables and reformatted parallel_mod.F90…
Dec 4, 2014
0d7cb6c
Correct the order in which side fluxes are returned.
Dec 4, 2014
b8a82cc
Correct the order in which side fluxes are returned.
Dec 5, 2014
b4bbbe7
Correct the order in which side fluxes are returned. For the sub-ele…
Dec 8, 2014
643a0f4
Add the logic to determine the fluxes on the sub element mesh to be u…
Dec 15, 2014
c65b631
Merged from trunk with:
Jan 6, 2015
6ea15b6
Mark did not like the function signatures. Changed them.
Jan 7, 2015
7ca3836
Merged from trunk. Command was:
Jan 7, 2015
bf496ef
Make memory allocation thread safe by moving it to prim_init1.
Jan 9, 2015
9bb5d84
Merged threading fix from trunk. Command was:
Jan 10, 2015
cce6f30
mods for prescribed winds and tracer transport tests
Jan 12, 2015
93e64e4
Fix subelement flux calculation for hypervis_subcycle not equal to one.
Jan 13, 2015
b5c5e63
Merged bugfix from trunk r4490. Command was:
Jan 13, 2015
a3f3c77
Move zeroing of sub_elem_mass_flux to match nextCAM branch and fix un…
Jan 13, 2015
9ad8faa
Merge latest fix from trunk:
Jan 13, 2015
cafe6a7
Version 1.0 of consistent HOMME-CSLAM
Jan 13, 2015
bafb408
bug in mass diagnostic for fvm
Jan 23, 2015
de7ff5b
added fvm global mass diagnostics
Jan 26, 2015
304ca34
add slotted cylinder profile to asp tests
Jan 28, 2015
fb2c34d
Merged changes from nextCAM:
Jan 29, 2015
95b693f
more fvm diagnostics (difference between fvm%psC and elem%ps_v)
Jan 30, 2015
31723f3
homme regression test failed since phl had added 1.0 to SE tracer 1 a…
Jan 30, 2015
96a4f1c
Merge from nextCAM
Jan 30, 2015
2f2075c
Revert of 4525 checkin (svn merge -c -4525 .) due to baseline change.
Jan 31, 2015
682d192
Attempting to reset all checkin errors.
Feb 1, 2015
a353738
Updated trilinos model evaluator to allow for using an analytic Jacob…
Feb 6, 2015
cf294df
fix error in previous commit, comment out preprocessor option for sim…
Feb 9, 2015
04a9de2
Fixed some of the initialization issues by the newedgebuff modificati…
Feb 9, 2015
55c1cd1
Addeding support for a different type of HOMME communication operator.
Feb 10, 2015
68cd4f7
Try to fix logic for subcell fluxes arising from the DSS operator. T…
Feb 10, 2015
4e38801
MIN/MAX operator test code.
Feb 11, 2015
d6a9537
Fix line continuations.
Feb 11, 2015
ed6000e
More changes to support optimized min/max operator.
Feb 12, 2015
9276655
code cleanup: remove zero thresholds sprinkled throughout the transp…
Feb 12, 2015
0e58f57
cleanup.
Feb 13, 2015
53a9653
Reordered the data-structure from (2,2,np,np) --> (np,np,2,2)
Feb 14, 2015
072f83f
Reverted D, Dinv, met, metinv, tensorVisc to original names.
Feb 17, 2015
9de3cd2
Added some compiler directives for unrolling and inlining.
Feb 17, 2015
34cde79
Fix compiler flag typo.
Feb 17, 2015
6cf54ce
Deactivated manual unrolling and added compiler directive in its place.
Feb 17, 2015
d76e895
Cleaned up some of the print statements.
Feb 19, 2015
11c7563
Removed all the manual unrolling of the derivative operators. Replac…
Feb 20, 2015
0093078
M src/share/prim_advance_mod.F90
Feb 20, 2015
aa24667
Removed some dead code that has not been used in 15+ years. Started …
Feb 20, 2015
ed453f9
Moved structure definitions from edge_mod.F90 file into edgetype_mod.…
Feb 21, 2015
b827d2e
Removed a large number of calls and references to the OLD edge buffer…
Feb 24, 2015
0734e0a
Removed the new prefix for all the edgeV{pack,unpack} calls and renam…
Feb 25, 2015
26d4cc0
Remove netcdf files from the test directories if they already exist.
Feb 25, 2015
9694bae
Add newline.
Feb 25, 2015
d24b1d6
More cleanup. OLD edge code is not ifdef out
Feb 25, 2015
e8eaecf
Removed all the OLD edge interfaces. Additional code cleanup.
Feb 26, 2015
db3f4d6
updated my development branch to be consistent with the trunk at revi…
Feb 27, 2015
3202d38
Synced my development branch to revsion 4480 of the trunk
Feb 27, 2015
db2cf6b
Synced my development branch to revision 4524 of the trunk.
Feb 27, 2015
f82b8a8
Final sync to development branch
Mar 4, 2015
5d95aa8
Update to HOMME that introduces three important optimizations that ha…
Mar 5, 2015
6318fea
Some module renaming for trilinos code.
Mar 5, 2015
8c871b7
Fixed some issues with building prim,swim HOMME targets that use tril…
Mar 5, 2015
6b2553c
Changes for newer versions of PGI.
Mar 5, 2015
2e5f843
Protect openmp statement.
Mar 5, 2015
43cdade
HPClab cmake file.
Mar 14, 2015
0a21e9e
Some additional timers and addressed Dinv code with the old index order.
Mar 17, 2015
0fc1e66
Eliminated the call to omp_get_thread_num and change the module priva…
Mar 17, 2015
4e8015b
Fixed an off by 1 indexing error.
Mar 17, 2015
70bb38e
Removed Emanuel physics from preqx and prim.
Mar 24, 2015
2c728bb
Removed multicloud, eigenmodes, aquaplanet, and gravity_wave_drag.
Mar 24, 2015
84beb25
Removing swtc1-dg test. This still uses/used edgerotate, and will eve…
Mar 24, 2015
2323317
Removing timing files (perf_mod.F90 and perf_utils.F90) from the buil…
Mar 24, 2015
3b9d954
Adding "CAM-like" namelist.
Mar 26, 2015
688280f
Updated namelist for the perftest namelists in HOMME.
Mar 27, 2015
e9def53
Removed redundant timer start (t_startf) call which was breaking the …
Mar 30, 2015
592be13
emin,emax should be intent inout. Bug fix from Balwinder.Singh@pnnl.gov
Mar 30, 2015
5d96239
Removed compute_mean_flux which is no longer used.
Apr 1, 2015
da12a98
Removed accumstart, accumfreq, and accumstop as they are not used.
Apr 1, 2015
8a42063
Fix viscosity coefficients for asp_baroclinic case.
Apr 1, 2015
cf6d889
Well, turned out to be a trivial indexing error.....
Apr 7, 2015
1e7624b
Update cam-like namelists.
Apr 24, 2015
143a05c
Adding test and executable for baroclinic case, ran like CAM with moi…
Apr 28, 2015
f7d0fcd
adding 128 pure sigma levels, for testing
May 15, 2015
f99c1bb
Adding two barriers in initedgebuffer. The first is needed for corre…
May 20, 2015
8f6b659
test case script updated to use CMAKE build system
May 20, 2015
a592a72
added "save" attribute to make gfortran happy
May 20, 2015
80c4fb3
adding option to run SJ Lin test tracers in baroclinic test problem
May 20, 2015
b480a7d
Dont compute dycore fluxes when not running with CSLAM tracers. This…
May 21, 2015
ae71858
Fix time normalization of computational flux eventually to be used by…
May 21, 2015
e333d50
more bug fixes in flux calcluation.
May 21, 2015
5d309b4
Yet another fix for debugging dycore subcell fluxes to drive CSLAM
May 22, 2015
8701644
Move subroutines for implicit time integration to separate module, up…
Jun 1, 2015
0282565
add regression test for implicit integration of primitive equations
Jun 1, 2015
54230af
Update associated with optimizing the eulerian advection algorithm in…
Jun 11, 2015
9a3144b
Fixing column threading in the unpack.
Jun 12, 2015
7638f6a
Fixing compilation error (save specified twice).
Jun 12, 2015
3da9e9c
add timer for overall timestep loop
Jun 28, 2015
b1093e5
tweak from matt for thread performance
Jun 28, 2015
5f2f16a
remove extraneous stdout messages
Jun 28, 2015
a6a676b
allow mesh_file to be set to a real file name, yet still be ignored w…
Jul 8, 2015
a66adc5
tweaks to "makegrid.job" to make it more robust
Jul 8, 2015
3349be9
add support for var-res grids to "baro.job" run script
Jul 8, 2015
1853996
Fixed issues with COLUMN_OPENMP in the Eulerian Advection code.
Jul 16, 2015
81ceff2
Reverted Eulerian Advection back to bit-4-bit mode.
Jul 16, 2015
a58d169
all changes BFB. (1) adding Lauritzen et al. Toy Chemistry option …
Aug 1, 2015
3daba8b
Adding descriptive comment
Aug 1, 2015
ee21af2
For vector hypervis used in cartesian formulation by RRM: dont damp …
Aug 1, 2015
154cd2a
bug in baro2d test: only checkout output at time=0, not at time=1, s…
Aug 1, 2015
88b829e
simplified limiter (better for optimization). near roundoff level agr…
Aug 3, 2015
21fbdc3
small change to toy_chemistry logic to make gnu happy
Aug 4, 2015
cfd4114
undo one change that broke swtc1 regression test. Error was not dete…
Aug 6, 2015
e67eaa2
Major performance bug fix (on titan, other machines its less of an is…
Aug 12, 2015
be3c54f
backport ACME changes into HOMME.
Aug 28, 2015
5bb3e01
Add 'models/atm/homme/' from commit 'be3c54f6f61bd45dc80f8afb45c6f67d…
jgfouca Sep 10, 2015
584f721
Remove old Homme
jgfouca Sep 10, 2015
c3c355a
Fix build system paths
jgfouca Sep 10, 2015
ac6aa87
Progress towards getting things to build on melvin
jgfouca Sep 10, 2015
15bdbd0
Progress towards getting things to build on melvin
jgfouca Sep 10, 2015
9360ea4
change path to look for ACME's verison of genf90.pl
mt5555 Sep 10, 2015
cae9fd7
Refactor CMake stuff to get homme to build
jgfouca Sep 10, 2015
249c9d2
tweaked HOMME standalone tests
mt5555 Sep 11, 2015
275d24c
HOMME standalone test updates
mt5555 Sep 11, 2015
6f5903e
more tweaks to HOMME standlone testing system in ACME
mt5555 Sep 12, 2015
9dff3f8
remove unneeded "u2map" variable from element_mod struct
mt5555 Sep 12, 2015
012b329
Get rid of homme-specific names and trailing whitespace
jgfouca Sep 17, 2015
c717f28
Modification to FindNETCDF to work with homme and pio
jgfouca Sep 17, 2015
a49956f
update CAM to use HOMME's updated edgemod interface
mt5555 Sep 22, 2015
fd5d062
cleaned up shallow water RRM test cases
mt5555 Sep 29, 2015
db9b956
enable boundary exchange testing by default for shallow water tests
mt5555 Oct 8, 2015
a3b1932
bug fix: when bndry_exchange is called with N threads, ensure edge b…
mt5555 Oct 8, 2015
3ed6db4
removed all fake threading from I/O codes.
mt5555 Oct 8, 2015
91e61b6
more thread cleanup (better comments when we are calling non-threaded…
mt5555 Oct 8, 2015
6bf3538
more thread cleanup for standalone HOMME I/O model
mt5555 Oct 8, 2015
b0afa8c
improved error message if one tries to run shallow water model with t…
mt5555 Oct 8, 2015
752cd58
updates to compile HOMME shallow water model using PIO
mt5555 Oct 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion models/atm/cam/bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ sub write_filepath

print $fh "$srcdir/atm/cam/src/dynamics/$dyn\n";
if($dyn eq 'se') {
print $fh "$srcdir/atm/cam/src/dynamics/se/share\n";
print $fh "$srcdir/atm/homme/src/share\n";
}

# Parallelization utilies
Expand Down
17 changes: 10 additions & 7 deletions models/atm/cam/src/dynamics/se/gravity_waves_sources.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module gravity_waves_sources
use derivative_mod, only : derivative_t
use dimensions_mod, only : np,nlev
use edge_mod, only : EdgeBuffer_t
use edgetype_mod, only : EdgeBuffer_t
use element_mod, only : element_t
use hybrid_mod, only : hybrid_t
use kinds, only : real_kind
Expand Down Expand Up @@ -29,14 +29,17 @@ module gravity_waves_sources
CONTAINS
!----------------------------------------------------------------------

subroutine gws_init
subroutine gws_init(elem)
use edge_mod, only : initEdgeBuffer
use hycoef, only : hypi
use pmgrid, only : plev
use parallel_mod, only : par
implicit none
type (element_t), intent(inout), dimension(:) :: elem


! Set up variables similar to dyn_comp and prim_driver_mod initializations
call initEdgeBuffer(edge3,3*nlev)
call initEdgeBuffer(par,edge3,elem,3*nlev)
allocate(deriv(0:Nthreads-1))

psurf_ref = hypi(plev+1)
Expand Down Expand Up @@ -144,13 +147,13 @@ subroutine compute_frontogenesis(frontgf,frontga,tl,elem,ederiv,hybrid,nets,nete

enddo
! pack
call edgeVpack(edge3, frontgf(:,:,:,ie),nlev,0,elem(ie)%desc)
call edgeVpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,elem(ie)%desc)
call edgeVpack(edge3, frontgf(:,:,:,ie),nlev,0,ie)
call edgeVpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,ie)
enddo
call bndry_exchangeV(hybrid,edge3)
do ie=nets,nete
call edgeVunpack(edge3, frontgf(:,:,:,ie),nlev,0,elem(ie)%desc)
call edgeVunpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,elem(ie)%desc)
call edgeVunpack(edge3, frontgf(:,:,:,ie),nlev,0,ie)
call edgeVunpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,ie)
! apply inverse mass matrix,
do k=1,nlev
gradth(:,:,1,k,ie)=gradth(:,:,1,k,ie)*elem(ie)%rspheremp(:,:)
Expand Down
25 changes: 13 additions & 12 deletions models/atm/cam/src/dynamics/se/inidat.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ subroutine read_inidat( ncid_ini, ncid_topo, dyn_in)
use constituents, only: cnst_name, cnst_read_iv, qmin
use dimensions_mod, only: nelemd, nlev, np
use dof_mod, only : putUniquePoints
use edge_mod, only : edgevpack, edgevunpack, InitEdgeBuffer, FreeEdgeBuffer, EdgeBuffer_t
use edge_mod, only : edgevpack, edgevunpack, InitEdgeBuffer, FreeEdgeBuffer
use edgetype_mod, only : EdgeBuffer_t
use ncdio_atm, only : infld
use shr_vmath_mod, only: shr_vmath_log
use hycoef, only: ps0
Expand Down Expand Up @@ -287,34 +288,34 @@ subroutine read_inidat( ncid_ini, ncid_topo, dyn_in)
! once we've read all the fields we do a boundary exchange to
! update the redundent columns in the dynamics
if(iam < par%nprocs) then
call initEdgeBuffer(edge, (3+pcnst)*nlev+2)
call initEdgeBuffer(par, edge, elem, (3+pcnst)*nlev+2)
end if
do ie=1,nelemd
kptr=0
call edgeVpack(edge, elem(ie)%state%ps_v(:,:,1),1,kptr,elem(ie)%desc)
call edgeVpack(edge, elem(ie)%state%ps_v(:,:,1),1,kptr,ie)
kptr=kptr+1
call edgeVpack(edge, elem(ie)%state%phis,1,kptr,elem(ie)%desc)
call edgeVpack(edge, elem(ie)%state%phis,1,kptr,ie)
kptr=kptr+1
call edgeVpack(edge, elem(ie)%state%v(:,:,:,:,1),2*nlev,kptr,elem(ie)%desc)
call edgeVpack(edge, elem(ie)%state%v(:,:,:,:,1),2*nlev,kptr,ie)
kptr=kptr+2*nlev
call edgeVpack(edge, elem(ie)%state%T(:,:,:,1),nlev,kptr,elem(ie)%desc)
call edgeVpack(edge, elem(ie)%state%T(:,:,:,1),nlev,kptr,ie)
kptr=kptr+nlev
call edgeVpack(edge, elem(ie)%state%Q(:,:,:,:),nlev*pcnst,kptr,elem(ie)%desc)
call edgeVpack(edge, elem(ie)%state%Q(:,:,:,:),nlev*pcnst,kptr,ie)
end do
if(iam < par%nprocs) then
call bndry_exchangeV(par,edge)
end if
do ie=1,nelemd
kptr=0
call edgeVunpack(edge, elem(ie)%state%ps_v(:,:,1),1,kptr,elem(ie)%desc)
call edgeVunpack(edge, elem(ie)%state%ps_v(:,:,1),1,kptr,ie)
kptr=kptr+1
call edgeVunpack(edge, elem(ie)%state%phis,1,kptr,elem(ie)%desc)
call edgeVunpack(edge, elem(ie)%state%phis,1,kptr,ie)
kptr=kptr+1
call edgeVunpack(edge, elem(ie)%state%v(:,:,:,:,1),2*nlev,kptr,elem(ie)%desc)
call edgeVunpack(edge, elem(ie)%state%v(:,:,:,:,1),2*nlev,kptr,ie)
kptr=kptr+2*nlev
call edgeVunpack(edge, elem(ie)%state%T(:,:,:,1),nlev,kptr,elem(ie)%desc)
call edgeVunpack(edge, elem(ie)%state%T(:,:,:,1),nlev,kptr,ie)
kptr=kptr+nlev
call edgeVunpack(edge, elem(ie)%state%Q(:,:,:,:),nlev*pcnst,kptr,elem(ie)%desc)
call edgeVunpack(edge, elem(ie)%state%Q(:,:,:,:),nlev*pcnst,kptr,ie)
end do

!$omp parallel do private(ie, t, m_cnst)
Expand Down
18 changes: 10 additions & 8 deletions models/atm/cam/src/dynamics/se/interp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ subroutine write_interpolated_scalar(File, varid, fld, numlev, data_type, decomp
use dof_mod, only : PutUniquePoints
use interpolate_mod, only : get_interp_parameter
use shr_pio_mod, only : shr_pio_getiosys
use edge_mod, only : edgebuffer_t, edgevpack, edgevunpack, initedgebuffer, freeedgebuffer
use edge_mod, only : edgevpack, edgevunpack, initedgebuffer, freeedgebuffer
use edgetype_mod, only : edgebuffer_t
use bndry_mod, only : bndry_exchangeV
use parallel_mod, only: par
use cam_abortutils, only : endrun
Expand Down Expand Up @@ -203,18 +204,18 @@ subroutine write_interpolated_scalar(File, varid, fld, numlev, data_type, decomp

end if
allocate(dest(np,np,numlev,nelemd))
call initEdgeBuffer(edgebuf, numlev)
call initEdgeBuffer(hybrid%par,edgebuf, elem,numlev)

do ie=1,nelemd
ncols = elem(ie)%idxp%NumUniquePts
call putUniquePoints(elem(ie)%idxP, numlev, fld_dyn(1:ncols,:,ie), dest(:,:,:,ie))
call edgeVpack(edgebuf, dest(:,:,:,ie), numlev, 0, elem(ie)%desc)
call edgeVpack(edgebuf, dest(:,:,:,ie), numlev, 0, ie)
enddo
if(iam < par%nprocs) then
call bndry_exchangeV(par, edgebuf)
end if
do ie=1,nelemd
call edgeVunpack(edgebuf, dest(:,:,:,ie), numlev, 0, elem(ie)%desc)
call edgeVunpack(edgebuf, dest(:,:,:,ie), numlev, 0, ie)
end do
call freeEdgeBuffer(edgebuf)
usefillvalues = any(dest == fillvalue)
Expand Down Expand Up @@ -299,7 +300,8 @@ subroutine write_interpolated_vector(File, varidu, varidv, fldu, fldv, numlev, d
use dof_mod, only : PutUniquePoints
use interpolate_mod, only : get_interp_parameter
use shr_pio_mod, only : shr_pio_getiosys
use edge_mod, only : edgebuffer_t, edgevpack, edgevunpack, initedgebuffer, freeedgebuffer
use edge_mod, only : edgevpack, edgevunpack, initedgebuffer, freeedgebuffer
use edgetype_mod, only : edgebuffer_t
use bndry_mod, only : bndry_exchangeV
use parallel_mod, only: par
implicit none
Expand Down Expand Up @@ -395,20 +397,20 @@ subroutine write_interpolated_vector(File, varidu, varidv, fldu, fldv, numlev, d
deallocate( cbuffer )

end if
call initEdgeBuffer(edgebuf, 2*numlev)
call initEdgeBuffer(hybrid%par,edgebuf,elem, 2*numlev)

do ie=1,nelemd
ncols = elem(ie)%idxp%NumUniquePts
call putUniquePoints(elem(ie)%idxP, 2, numlev, fld_dyn(1:ncols,:,:,ie), dest(:,:,:,:,ie))

call edgeVpack(edgebuf, dest(:,:,:,:,ie), 2*numlev, 0, elem(ie)%desc)
call edgeVpack(edgebuf, dest(:,:,:,:,ie), 2*numlev, 0, ie)
enddo
if(iam < par%nprocs) then
call bndry_exchangeV(par, edgebuf)
end if

do ie=1,nelemd
call edgeVunpack(edgebuf, dest(:,:,:,:,ie), 2*numlev, 0, elem(ie)%desc)
call edgeVunpack(edgebuf, dest(:,:,:,:,ie), 2*numlev, 0, ie)
enddo
call freeEdgeBuffer(edgebuf)
usefillvalues = any(dest==fillvalue)
Expand Down
17 changes: 9 additions & 8 deletions models/atm/cam/src/dynamics/se/nctopo_util_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ subroutine nctopo_util_inidat( ncid_topo, iodesc, elem)
use parallel_mod, only: par
use bndry_mod, only: bndry_exchangev
use dof_mod, only : putUniquePoints
use edge_mod, only : edgevpack, edgevunpack, InitEdgeBuffer, FreeEdgeBuffer, EdgeBuffer_t
use edge_mod, only : edgevpack, edgevunpack, InitEdgeBuffer, FreeEdgeBuffer
use edgetype_mod, only : EdgeBuffer_t
use ncdio_atm, only : infld
use cam_abortutils, only: endrun
use pio, only : file_desc_t, io_desc_t, pio_double, pio_get_local_array_size, pio_freedecomp
Expand Down Expand Up @@ -105,23 +106,23 @@ subroutine nctopo_util_inidat( ncid_topo, iodesc, elem)
end do

! update non-unique points:
call initEdgeBuffer(edge, 3)
call initEdgeBuffer(par, edge, elem, 3)
do ie=1,nelemd
kptr=0
call edgeVpack(edge, SGH30dyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVpack(edge, SGH30dyn(:,:,ie),1,kptr,ie)
kptr=kptr+1
call edgeVpack(edge, SGHdyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVpack(edge, SGHdyn(:,:,ie),1,kptr,ie)
kptr=kptr+1
call edgeVpack(edge, PHISdyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVpack(edge, PHISdyn(:,:,ie),1,kptr,ie)
end do
call bndry_exchangeV(par,edge)
do ie=1,nelemd
kptr=0
call edgeVunpack(edge, SGH30dyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVunpack(edge, SGH30dyn(:,:,ie),1,kptr,ie)
kptr=kptr+1
call edgeVunpack(edge, SGHdyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVunpack(edge, SGHdyn(:,:,ie),1,kptr,ie)
kptr=kptr+1
call edgeVunpack(edge, PHISdyn(:,:,ie),1,kptr,elem(ie)%desc)
call edgeVunpack(edge, PHISdyn(:,:,ie),1,kptr,ie)
end do
call FreeEdgeBuffer(edge)

Expand Down
2 changes: 1 addition & 1 deletion models/atm/cam/src/dynamics/se/pmgrid.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module pmgrid
use edge_mod, only : EdgeBuffer_t
use edgetype_mod, only : EdgeBuffer_t
use dimensions_mod, only : nnodes,npart,nmpi_per_node
use reduction_mod, only : ReductionBuffer_ordered_1d_t

Expand Down
3 changes: 0 additions & 3 deletions models/atm/cam/src/dynamics/se/restart_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ subroutine read_restart_dynamics (File, dyn_in, dyn_out, NLFileName)
use namelist_mod, only: readnl
use constituents, only : cnst_name
use bndry_mod, only: bndry_exchangeV
use edge_mod, only: EdgeBuffer_t, initEdgeBuffer, FreeEdgeBuffer, &
edgeVpack, edgeVunpack
use cam_pio_utils, only : pio_subsystem
use spmd_dyn, only: spmd_readnl
use fvm_control_volume_mod, only: fvm_struct
Expand All @@ -361,7 +359,6 @@ subroutine read_restart_dynamics (File, dyn_in, dyn_out, NLFileName)
type(fvm_struct), pointer :: fvm(:)
integer(kind=PIO_OFFSET), parameter :: t = 1
integer :: i, k, cnt, st, en, tl, tlQdp, ii, jj, s2d, q, j
type(EdgeBuffer_T) :: edgebuf
integer :: timelevel_dimid, timelevel_chk
integer :: npes_se
! type(file_desc_t) :: ncid
Expand Down
Loading