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

Fix memory errors: uninitialized variables, and NetCDF writes to arrays that are too small #668

Merged
merged 38 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0b4db90
move utility routines, data structures, and name generation out of FV…
SamuelTrahanNOAA May 5, 2023
2a081b3
move RRFS SD state restart io to separate file and rename clm_lake_io…
SamuelTrahanNOAA May 5, 2023
d527301
sfc array indices are calculated in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 5, 2023
e597b95
move rrfs sd emissions input code to FV3GFS_rrfs_sd_io.F90
SamuelTrahanNOAA May 6, 2023
3c91b6a
allocate sfc arrays in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 6, 2023
a6971dc
define and write axes in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 6, 2023
507fb73
register sfc fields in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 8, 2023
200ef3c
move sfc read loop to FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 8, 2023
ce0ba00
Put post-read safeguards in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 10, 2023
b656b73
copy to grid in FV3GFS_sfc_io.F90 and make things private
SamuelTrahanNOAA May 10, 2023
ca3344b
fix discrepancies in copying from grid
SamuelTrahanNOAA May 10, 2023
8ae34ee
combine sfc read & write into one routine
SamuelTrahanNOAA May 17, 2023
8be22c6
move oro reading to FV3GFS_oro_io.F90
SamuelTrahanNOAA May 17, 2023
3177218
gwd I/O in FV3GFS_oro_io.F90
SamuelTrahanNOAA May 20, 2023
1d9305f
store quilt restart data structures in FV3GFS_sfc_io types
SamuelTrahanNOAA May 21, 2023
2a548ec
remove copy_from_GFS_Data calls from FV3GFS_restart_io.F90
SamuelTrahanNOAA May 22, 2023
780100d
bundle vars in FV3GFS_sfc_io.F90
SamuelTrahanNOAA May 22, 2023
ed919fe
consistent naming and clm lake quilt restart
SamuelTrahanNOAA May 23, 2023
91b63c1
rrfs sd restart in quilt (still under testing)
SamuelTrahanNOAA May 23, 2023
45c9d0d
Merge remote-tracking branch 'upstream/develop' into refactor-restart
SamuelTrahanNOAA May 23, 2023
af5b39d
Merge remote-tracking branch 'origin/develop' into refactor-restart
SamuelTrahanNOAA May 24, 2023
f9ad174
Merge branch 'refactor-restart' of ssh://github.com/SamuelTrahanNOAA/…
SamuelTrahanNOAA May 24, 2023
63de192
explicitly write axis values (from DusanJovic-NOAA), and clean up code
SamuelTrahanNOAA May 24, 2023
b336138
rename FV3GFS to fv3atm in code, except output metadata
SamuelTrahanNOAA May 26, 2023
305e996
refactor a bit more, putting history into fv3atm_history_io.F90 and r…
SamuelTrahanNOAA May 29, 2023
9e7d86b
more cleanup
SamuelTrahanNOAA May 30, 2023
ca65a7f
delete trailing whitespace
SamuelTrahanNOAA May 30, 2023
c9f1c0e
remove unneeded "use...only"
SamuelTrahanNOAA May 30, 2023
b5ab9ae
comments, consistent indentation, remove trailing whitespace
SamuelTrahanNOAA May 31, 2023
0466c61
Even longer explanation of RUC LSM axes from @tanyasmirnova
SamuelTrahanNOAA May 31, 2023
6bef46e
bug fixes for RRFS 32-bit physics
SamuelTrahanNOAA Jun 14, 2023
14b8e77
Merge remote-tracking branch 'upstream/develop' into rrfs-32bit-physics
SamuelTrahanNOAA Jun 14, 2023
0f2ded3
Merge remote-tracking branch 'upstream/develop' into rrfs-32bit-physics
SamuelTrahanNOAA Jun 20, 2023
ccf7245
merge upstream develop
SamuelTrahanNOAA Jun 29, 2023
9943bfb
point to Sam's branch of gitmodules
SamuelTrahanNOAA Jun 29, 2023
5aaeb6b
merge upstream develop
SamuelTrahanNOAA Jul 5, 2023
b8ee3bd
Merge remote-tracking branch 'upstream/develop' into rrfs-32bit-physics
SamuelTrahanNOAA Jul 7, 2023
af2c8a9
point to ufs/dev version of ccpp-physics
SamuelTrahanNOAA Jul 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
url = https://github.com/SamuelTrahanNOAA/ccpp-physics
branch = rrfs-32bit-physics
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
27 changes: 27 additions & 0 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6821,13 +6821,21 @@ subroutine grid_create (Grid, IM, Model)
allocate (Grid%ddy_o3 (IM))
allocate (Grid%jindx1_o3 (IM))
allocate (Grid%jindx2_o3 (IM))

Grid%ddy_o3 = clear_val
Grid%jindx1_o3 = clear_val
Grid%jindx2_o3 = clear_val
endif

!--- stratosphere h2o active
if ( Model%h2o_phys ) then
allocate (Grid%ddy_h (IM))
allocate (Grid%jindx1_h (IM))
allocate (Grid%jindx2_h (IM))

Grid%ddy_h = clear_val
Grid%jindx1_h = clear_val
Grid%jindx2_h = clear_val
endif

!--- iccn active
Expand All @@ -6838,6 +6846,13 @@ subroutine grid_create (Grid, IM, Model)
allocate (Grid%ddx_ci (IM))
allocate (Grid%iindx1_ci (IM))
allocate (Grid%iindx2_ci (IM))

Grid%ddy_ci = clear_val
Grid%jindx1_ci = clear_val
Grid%jindx2_ci = clear_val
Grid%ddx_ci = clear_val
Grid%iindx1_ci = clear_val
Grid%iindx2_ci = clear_val
endif

!--- iaerclm active
Expand All @@ -6848,6 +6863,13 @@ subroutine grid_create (Grid, IM, Model)
allocate (Grid%ddx_aer (IM))
allocate (Grid%iindx1_aer(IM))
allocate (Grid%iindx2_aer(IM))

Grid%ddy_aer = clear_val
Grid%jindx1_aer = clear_val
Grid%jindx2_aer = clear_val
Grid%ddx_aer = clear_val
Grid%iindx1_aer = clear_val
Grid%iindx2_aer = clear_val
endif

!--- Model%do_ugwpv1
Expand All @@ -6856,6 +6878,11 @@ subroutine grid_create (Grid, IM, Model)
allocate (Grid%ddy_j2tau (IM))
allocate (Grid%jindx1_tau (IM))
allocate (Grid%jindx2_tau (IM))

Grid%ddy_j1tau = clear_val
Grid%ddy_j2tau = clear_val
Grid%jindx1_tau = clear_val
Grid%jindx2_tau = clear_val
endif

end subroutine grid_create
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics