From 014b8d7038b21e85fd5eb213e17dc62ed2088154 Mon Sep 17 00:00:00 2001 From: "denise.worthen" Date: Sat, 9 Oct 2021 08:05:21 -0400 Subject: [PATCH 1/2] reduce memory footprint for merra2 aerosols * switch aerin and aer_pres to r*4. time and space bilinear interp will be done on r*4 variables and type promotion to r*8 will occur there --- physics/aerclm_def.F | 6 +++--- physics/aerinterp.F90 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/aerclm_def.F b/physics/aerclm_def.F index 157c7b961..82e89ed48 100644 --- a/physics/aerclm_def.F +++ b/physics/aerclm_def.F @@ -10,13 +10,13 @@ module aerclm_def real (kind=kind_phys), allocatable, dimension(:) :: aer_lat real (kind=kind_phys), allocatable, dimension(:) :: aer_lon - real (kind=kind_phys), allocatable, dimension(:,:,:,:) :: aer_pres - real (kind=kind_phys), allocatable, dimension(:,:,:,:,:) :: aerin + real (kind=kind_io4), allocatable, dimension(:,:,:,:) :: aer_pres + real (kind=kind_io4), allocatable, dimension(:,:,:,:,:) :: aerin data aer_time/15.5, 45., 74.5, 105., 135.5, 166., 196.5, & 227.5, 258., 288.5, 319., 349.5, 380.5/ - data specname /'DU001','DU002','DU003','DU004','DU005', + data specname /'DU001','DU002','DU003','DU004','DU005', & 'SS001','SS002','SS003','SS004','SS005','SO4', & 'BCPHOBIC','BCPHILIC','OCPHOBIC','OCPHILIC'/ diff --git a/physics/aerinterp.F90 b/physics/aerinterp.F90 index dbcf73603..4b3232ab1 100644 --- a/physics/aerinterp.F90 +++ b/physics/aerinterp.F90 @@ -181,7 +181,7 @@ SUBROUTINE read_aerdataf (iamin, iamax, jamin, jamax, & endif do i = iamin, iamax aerin(i,j,k,ii,imon) = 1.d0*buffx(i,j,klev,1) - if(aerin(i,j,k,ii,imon) < 0 .or. aerin(i,j,k,ii,imon) > 1.) then + if(aerin(i,j,k,ii,imon) < 0. .or. aerin(i,j,k,ii,imon) > 1.) then aerin(i,j,k,ii,imon) = 1.e-15 endif enddo !i-loop (lon) From 8651624a7da69208ea78b06853628aab6b3e2059 Mon Sep 17 00:00:00 2001 From: "denise.worthen" Date: Sat, 9 Oct 2021 06:35:11 -0600 Subject: [PATCH 2/2] add reqd kind variable --- physics/aerclm_def.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/aerclm_def.F b/physics/aerclm_def.F index 82e89ed48..e66825278 100644 --- a/physics/aerclm_def.F +++ b/physics/aerclm_def.F @@ -1,5 +1,5 @@ module aerclm_def - use machine , only : kind_phys + use machine , only : kind_phys, kind_io4 implicit none integer, parameter :: levsaer=72, ntrcaerm=15, timeaer=12