Skip to content

Remove unused variables from real memory footprint#3

Open
davegill wants to merge 4 commits intodevelopfrom
remove_unused_variables_from_real_memory_footprint
Open

Remove unused variables from real memory footprint#3
davegill wants to merge 4 commits intodevelopfrom
remove_unused_variables_from_real_memory_footprint

Conversation

@davegill
Copy link
Owner

@davegill davegill commented Nov 16, 2018

Remove fields that are only used by the WRF model.

This is for testing the real program only.

These mods should not be used with the WRF model.

This is a test, not for any commit.

Remove fields that are only used by the WRF model. This is for testing
the real program only. These mods should not be used with the WRF model.
TYPE: new feature

KEYWORDS: allocation, field list

SOURCE: internal

DESCRIPTION OF CHANGES:
A cpp flag is available to produce a list of fields that are allocated by
the WRF system programs. The list is in the standard out file.

After the ./configure step, the configure.wrf file includes the line
```
                      -DSHOW_ALL_VARS_USED=0 \
```
To activate the option, this is changed to
```
                      -DSHOW_ALL_VARS_USED=1 \
```

A small sample would look like:
```
xlat: bytes =    23856
xlong: bytes =    23856
lu_index: bytes =    23856
lu_mask: bytes =    23856
znu: bytes =      132
znw: bytes =      132
zs: bytes =       16
dzs: bytes =       16
u_gc: bytes =   620256
v_gc: bytes =   620256
t_gc: bytes =   620256
rh_gc: bytes =   620256
ght_gc: bytes =   620256
p_gc: bytes =   620256
```

LIST OF MODIFIED FILES:
M   arch/postamble
M   frame/module_alloc_space.h
M   tools/gen_allocs.c

TESTS CONDUCTED:
The programs generate a list of fields in the order that in which they appear
in the Registry file. Associated with the list of fields is the number of bytes
that are allocated for the field.

RELEASE NOTE: This is expected to be for internal use only, so this does not
require for public explanantion.
1. Make the Fortran variable an integer(kind=8)
2. Use an i12 format to print out the value, not i8
davegill pushed a commit that referenced this pull request Mar 25, 2020
TYPE: bug fix

KEYWORDS: GOCART, settling

SOURCE: Stacy Walters (internal)

DESCRIPTION OF CHANGES: 
Put calculation of aerosol settling (variable = transfer_to_below_level) in layers > 1 
into IF/ELSE block that calculates gravitational settling for layer = 1.

LIST OF MODIFIED FILES: 
M chem/module_gocart_settling.F

TEST CONDUCTED:
Jenkins shows all tests PASS

**Compiled with debug option -check bounds**
_BEFORE FIX_: 2 indexes are OOB for l==1, 3rd dim of delz (> MAX) and 3rd dim of airden (0)

rsl.out.0000
 l/=1, calculting transfer_to_below_level =   3.153560196907218E-014
 l/=1, calculting transfer_to_below_level =   1.014890436929303E-012
 l/=1, calculting transfer_to_below_level =   2.118741307102124E-011
 l==1, still calculating transfer_to_below_level =
  = (temp_tc*vd_wk1)*((delz(i,j,l2)*airden(i,j,l))/(delz(i,j,l2+1)*airden(i,j,l-1)))
 l==1, index of airden(i,j,l-1) =            1           1           0
  and index of delz(i,j,l2+1) =            1           1          31
 but size of 3rd dim of delz  =           30
rsl.error.0000
forrtl: severe (408): fort: (2): Subscript #3 of the array DELZ has value 31 which is greater than the upper bound of 30

_AFTER FIX_: 
l/=1, calculating transfer_to_below_level =   3.153560196907218E-014
 l/=1, calculating transfer_to_below_level =   1.014890436929303E-012
 l/=1, calculating transfer_to_below_level =   2.118741307102124E-011
 l==1, not calculating transfer_to_below_level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant