Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 3 additions & 4 deletions ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ subroutine Run2 (gc, import, export, clock, rc)

type(ESMF_Grid) :: grid
type (GOCART_State), pointer :: self
real, pointer, dimension(:,:) :: lats

! ! Nitrates - ACG will generate this once we add NI's export states as GOCART's import
! real, pointer, dimension(:,:,:) :: niexttau, nistexttau
Expand Down Expand Up @@ -616,7 +615,7 @@ subroutine Run2 (gc, import, export, clock, rc)
real :: c1, c2, c3, nifactor
real, parameter :: pi = 3.141529265 ! pchakrab: TODO - use MAPL_PI instead??
integer :: ind550, ind532
integer :: i1, i2, j1, j2, km, k,kk
integer :: i1, i2, j1, j2, im, jm, km, k, kk
class(logger_t), pointer :: logger
character(len=:), allocatable :: child_name
integer :: n, w, num_children, iter, status
Expand Down Expand Up @@ -671,7 +670,7 @@ subroutine Run2 (gc, import, export, clock, rc)

! Compute total aerosol diagnostic values for export
call MAPL_GridCompGet(gc, grid=grid, _RC)
call MAPL_GridGet(grid, latitudes=lats, _RC)
call MAPL_GridGet(grid, im=im, jm=jm, _RC)
if(associated(totangstr)) then
ind550 = 0
do w = 1, size(self%wavelengths_vertint) ! find index for 550nm to compute total angstrom
Expand All @@ -683,7 +682,7 @@ subroutine Run2 (gc, import, export, clock, rc)
end do
_ASSERT(ind550 /= 0, "Cannot produce TOTANGSTR variable without 550nm wavelength")
totangstr = 0.0
allocate(tau1(SIZE(LATS,1), SIZE(LATS,2)), tau2(SIZE(LATS,1), SIZE(LATS,2)), _STAT)
allocate(tau1(im, jm), tau2(im, jm), _STAT)
tau1(:,:) = tiny(1.0)
tau2(:,:) = tiny(1.0)
c1 = -log(470./550.)
Expand Down
12 changes: 8 additions & 4 deletions ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module SS2G_GridCompMod
use mapl3g_generic, only: MAPL_ClockGet
use mapl3g_VerticalStaggerLoc, only: VERTICAL_STAGGER_NONE, VERTICAL_STAGGER_CENTER, VERTICAL_STAGGER_EDGE
use mapl3g_RestartModes, only: MAPL_RESTART_SKIP
use mapl3g_Geom_API, only: MAPL_GridGet
use mapl3g_Geom_API, only: MAPL_GridGet, MAPL_GridGetCoordinates
use mapl3g_State_API, only: MAPL_StateGetPointer
use mapl3g_UngriddedDim, only: UngriddedDim
use GOCART2G_MieMod
Expand Down Expand Up @@ -336,7 +336,9 @@ subroutine Initialize (gc, import, export, clock, RC)

real, pointer, dimension(:,:,:,:) :: int_ptr
real, pointer, dimension(:,:,:) :: ple
real, pointer, dimension(:,:) :: deep_lakes_mask, lats, lons
real, pointer, dimension(:,:) :: deep_lakes_mask
real, allocatable, dimension(:,:), target :: lats, lons
real, pointer, dimension(:,:) :: plats => null(), plons => null()
real :: CDT ! chemistry timestep (secs)
real(ESMF_KIND_R4) :: HDT ! model timestep (secs)

Expand Down Expand Up @@ -480,8 +482,10 @@ subroutine Initialize (gc, import, export, clock, RC)
!allocate(self%deep_lakes_mask(ubound(lons, 1),ubound(lons, 2)), __STAT__)
!call deepLakesMask (lons, lats, real(MAPL_RADIANS_TO_DEGREES), self%deep_lakes_mask, _RC)
call MAPL_StateGetPointer(internal, itemName="DEEP_LAKES_MASK", farrayPtr=deep_lakes_mask, _RC)
call MAPL_GridGet(grid, latitudes=lats, longitudes=lons, _RC)
call deepLakesMask(lons, lats, real(MAPL_RADIANS_TO_DEGREES), deep_lakes_mask, _RC)
call MAPL_GridGetCoordinates(grid, latitudes=lats, longitudes=lons, _RC)
plats => lats
plons => lons
call deepLakesMask(plons, plats, real(MAPL_RADIANS_TO_DEGREES), deep_lakes_mask, _RC)

call logger%info("Initialize:: ...complete")
_RETURN(_SUCCESS)
Expand Down
Loading