Created
July 6, 2017 14:53
-
-
Save thorntonpe/150d290121a6ee962cf51b6060c470fa to your computer and use it in GitHub Desktop.
mpp architecture mods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/src/driver/alm/MPPThermalTBasedALM_Driver.F90 b/src/driver/alm/MPPThermalTBasedALM_Driver.F90 | |
index d852df3..6d0bb69 100644 | |
--- a/src/driver/alm/MPPThermalTBasedALM_Driver.F90 | |
+++ b/src/driver/alm/MPPThermalTBasedALM_Driver.F90 | |
@@ -15,8 +15,8 @@ module MPPThermalTBasedALM_Driver | |
!----------------------------------------- | |
! Definition of component types | |
!----------------------------------------- | |
- use LandunitType , only : lun | |
- use ColumnType , only : col | |
+ use LandunitType , only : lun_pp | |
+ use ColumnType , only : col_pp | |
implicit none | |
@@ -195,7 +195,7 @@ contains | |
l = col%landunit(c) | |
! Is this a soil column on which PETSc based thermal solver works? | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
if (j >= snl(c)+1) then | |
@@ -249,7 +249,7 @@ contains | |
c = filter(fc) | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
if (frac_h2osfc(c) > 0._r8) then | |
@@ -289,7 +289,7 @@ contains | |
! Index for internal SoE auxvars | |
idx = (c-bounds%begc)*nlevgrnd + j + offset | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
! Save data for internal SoE auxvars | |
temperature_1d(idx) = t_soisno(c,j) | |
@@ -460,7 +460,7 @@ contains | |
do j = -nlevsno+1, 0 | |
idx = (c-bounds%begc)*nlevsno + j + nlevsno + offset | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
if (j >= snl(c)+1) then | |
tvector(c,j-1) = temperature_1d(idx) | |
endif | |
@@ -474,7 +474,7 @@ contains | |
c = filter(fc) | |
idx = (c-bounds%begc) + 1 + offset | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
if (frac_h2osfc(c) > 0._r8) then | |
tvector(c,0) = temperature_1d(idx) | |
endif | |
@@ -488,7 +488,7 @@ contains | |
do j = 1,nlevgrnd | |
idx = (c-bounds%begc)*nlevgrnd + j + offset | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
tvector(c,j) = temperature_1d(idx) | |
endif | |
enddo | |
diff --git a/src/driver/alm/MPPThermalTBasedALM_Initialize.F90 b/src/driver/alm/MPPThermalTBasedALM_Initialize.F90 | |
index 525de40..e329764 100644 | |
--- a/src/driver/alm/MPPThermalTBasedALM_Initialize.F90 | |
+++ b/src/driver/alm/MPPThermalTBasedALM_Initialize.F90 | |
@@ -14,8 +14,8 @@ module MPPThermalTBasedALM_Initialize | |
!----------------------------------------- | |
! Definition of component types | |
!----------------------------------------- | |
- use LandunitType , only : lun | |
- use ColumnType , only : col | |
+ use LandunitType , only : lun_pp | |
+ use ColumnType , only : col_pp | |
use clm_instMod , only : soilstate_vars | |
implicit none | |
@@ -264,7 +264,7 @@ contains | |
do c = bounds_proc_begc, bounds_proc_endc | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
first_active_soil_col_id = c | |
exit | |
endif | |
@@ -281,7 +281,7 @@ contains | |
do j = -nlevsno+1, 0 | |
icell = icell + 1 | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
col_id = c | |
snow_filter(icell) = 1 | |
else | |
@@ -307,7 +307,7 @@ contains | |
icell = icell + 1 | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
col_id = c | |
ssw_filter(icell) = 1 | |
else | |
@@ -331,7 +331,7 @@ contains | |
do j = 1, nlevgrnd | |
icell = icell + 1 | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
col_id = c | |
soil_filter(icell) = 1 | |
else | |
@@ -782,9 +782,9 @@ contains | |
do c = bounds_proc_begc, bounds_proc_endc | |
l = col%landunit(c) | |
- thermal_lun_type(c) = lun%itype(l) | |
+ thermal_lun_type(c) = lun_pp%itype(l) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
thermal_filter(c) = 1 | |
do j = 1,nlevgrnd | |
if (clm_watsat(c,j) /= spval) thermal_watsat(c,j) = clm_watsat(c,j) | |
diff --git a/src/driver/alm/MPPVSFMALM_Driver.F90 b/src/driver/alm/MPPVSFMALM_Driver.F90 | |
index dc6989b..4386892 100644 | |
--- a/src/driver/alm/MPPVSFMALM_Driver.F90 | |
+++ b/src/driver/alm/MPPVSFMALM_Driver.F90 | |
@@ -32,9 +32,9 @@ contains | |
use WaterFluxType , only : waterflux_type | |
use WaterStateType , only : waterstate_type | |
use PatchType , only : pft | |
- use ColumnType , only : col | |
+ use ColumnType , only : col_pp | |
use clm_varcon , only : watmin | |
- use LandunitType , only : lun | |
+ use LandunitType , only : lun_pp | |
use mpp_varcon , only : istsoil, istcrop | |
use mpp_varctl , only : iulog | |
use shr_log_mod , only : errMsg => shr_log_errMsg | |
@@ -223,8 +223,8 @@ contains | |
c = filter_hydrologyc(fc) | |
if (pi <= col%npfts(c)) then | |
p = col%pfti(c) + pi - 1 | |
- if (pft%active(p)) then | |
- rootr_col(c,j) = rootr_col(c,j) + rootr_pft(p,j) * qflx_tran_veg_pft(p) * pft%wtcol(p) | |
+ if (pft_pp%active(p)) then | |
+ rootr_col(c,j) = rootr_col(c,j) + rootr_pft(p,j) * qflx_tran_veg_pft(p) * pft_pp%wtcol(p) | |
end if | |
end if | |
end do | |
@@ -233,8 +233,8 @@ contains | |
c = filter_hydrologyc(fc) | |
if (pi <= col%npfts(c)) then | |
p = col%pfti(c) + pi - 1 | |
- if (pft%active(p)) then | |
- temp(c) = temp(c) + qflx_tran_veg_pft(p) * pft%wtcol(p) | |
+ if (pft_pp%active(p)) then | |
+ temp(c) = temp(c) + qflx_tran_veg_pft(p) * pft_pp%wtcol(p) | |
end if | |
end if | |
end do | |
diff --git a/src/driver/alm/MPPVSFMALM_Initialize.F90 b/src/driver/alm/MPPVSFMALM_Initialize.F90 | |
index 367388c..f7aa156 100644 | |
--- a/src/driver/alm/MPPVSFMALM_Initialize.F90 | |
+++ b/src/driver/alm/MPPVSFMALM_Initialize.F90 | |
@@ -11,8 +11,8 @@ module MPPVSFMALM_Initialize | |
use abortutils , only : endrun | |
use mpp_varctl , only : iulog | |
use GridcellType , only : grc | |
- use LandunitType , only : lun | |
- use ColumnType , only : col | |
+ use LandunitType , only : lun_pp | |
+ use ColumnType , only : col_pp | |
! | |
implicit none | |
! | |
@@ -257,7 +257,7 @@ contains | |
do c = bounds_proc_begc, bounds_proc_endc | |
l = col%landunit(c) | |
- if (col%active(c) .and. .not.lun%lakpoi(l) .and. .not.lun%urbpoi(l)) then | |
+ if (col%active(c) .and. .not.lun_pp%lakpoi(l) .and. .not.lun_pp%urbpoi(l)) then | |
first_active_soil_col_id = c | |
exit | |
endif | |
@@ -303,8 +303,8 @@ contains | |
l = col%landunit(c) | |
if (col%active(c) .and. & | |
- (lun%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
- lun%itype(l) == istcrop)) then | |
+ (lun_pp%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
+ lun_pp%itype(l) == istcrop)) then | |
col_id = c | |
soil_filter(icell) = 1 | |
else | |
@@ -666,7 +666,7 @@ contains | |
c_idx_up = -1 | |
c_idx_dn = -1 | |
- do c = lun%coli(l_idx_up), lun%colf(l_idx_up) | |
+ do c = lun_pp%coli(l_idx_up), lun_pp%colf(l_idx_up) | |
if (col%itype(c) == ctype) then | |
if (c_idx_up /= -1) then | |
write(iulog,*)'CreateFromCLMCols: More than one column found for ' // & | |
@@ -677,7 +677,7 @@ contains | |
endif | |
enddo | |
- do c = lun%coli(l_idx_dn), lun%colf(l_idx_dn) | |
+ do c = lun_pp%coli(l_idx_dn), lun_pp%colf(l_idx_dn) | |
if (col%itype(c) == ctype) then | |
if (c_idx_dn /= -1) then | |
write(iulog,*)'CreateFromCLMCols: More than one column found for ' // & | |
@@ -722,7 +722,7 @@ contains | |
c_idx_up = -1 | |
c_idx_dn = -1 | |
- do c = lun%coli(l_idx_up), lun%colf(l_idx_up) | |
+ do c = lun_pp%coli(l_idx_up), lun_pp%colf(l_idx_up) | |
if (col%itype(c) == ctype) then | |
if (c_idx_up /= -1) then | |
write(iulog,*)'CreateFromCLMCols: More than one column found for ' // & | |
@@ -733,7 +733,7 @@ contains | |
endif | |
enddo | |
- do c = lun%coli(l_idx_dn), lun%colf(l_idx_dn) | |
+ do c = lun_pp%coli(l_idx_dn), lun_pp%colf(l_idx_dn) | |
if (col%itype(c) == ctype) then | |
if (c_idx_dn /= -1) then | |
write(iulog,*)'CreateFromCLMCols: More than one column found for ' // & | |
@@ -970,8 +970,8 @@ contains | |
l = col%landunit(c) | |
if (col%active(c) .and. & | |
- (lun%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
- lun%itype(l) == istcrop)) then | |
+ (lun_pp%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
+ lun_pp%itype(l) == istcrop)) then | |
vsfm_filter (c) = 1 | |
@@ -1052,8 +1052,8 @@ contains | |
do j = 1, nlevgrnd | |
icell = (c - bounds_proc_begc)*nlevgrnd + j | |
if (col%active(c) .and. & | |
- (lun%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
- lun%itype(l) == istcrop)) then | |
+ (lun_pp%itype(l) == istsoil .or. col%itype(c) == icol_road_perv .or. & | |
+ lun_pp%itype(l) == istcrop)) then | |
press_ic_1d(icell) = PRESSURE_REF + & | |
997.16d0*GRAVITY_CONSTANT * & | |
diff --git a/src/mpp/util/mpp_varcon.F90 b/src/mpp/util/mpp_varcon.F90 | |
index 7f6f485..4f5d427 100644 | |
--- a/src/mpp/util/mpp_varcon.F90 | |
+++ b/src/mpp/util/mpp_varcon.F90 | |
@@ -41,7 +41,7 @@ module mpp_varcon | |
integer :: istdlak !deep lake landunit type (now used for all lakes) | |
integer :: istwet !wetland landunit type (swamp, marsh, etc.) | |
- integer :: max_lunit !!maximum value that lun%itype can have | |
+ integer :: max_lunit !!maximum value that lun_pp%itype can have | |
integer, public :: icol_roof | |
integer, public :: icol_sunwall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment