Skip to content

Commit a15437e

Browse files
committed
Merge branch 'develop' into release/MAPL-v3
2 parents 793d016 + e625513 commit a15437e

File tree

6 files changed

+110
-65
lines changed

6 files changed

+110
-65
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5986,11 +5986,13 @@ subroutine Driver ( RC )
59865986

59875987
!--------------- GOSWIM IMPORTS FROM GOCART ---------------
59885988
! Initialization
5989-
RCONSTIT(:,:,:) = 0.0
5990-
TOTDEPOS(:,:) = 0.0
5991-
RMELT(:,:) = 0.0
5989+
if (N_constit>0) then
5990+
RCONSTIT(:,:,:) = 0.0
5991+
TOTDEPOS(:,:) = 0.0
5992+
RMELT(:,:) = 0.0
5993+
end if
59925994
!------------------------------------------------------------------
5993-
5995+
59945996
! Zero the light-absorbing aerosol (LAA) deposition rates from GOCART:
59955997

59965998
select case (catchcn_internal%AEROSOL_DEPOSITION)
@@ -6027,6 +6029,8 @@ subroutine Driver ( RC )
60276029
OCSD(:,:)=0.
60286030

60296031
end select
6032+
6033+
if (catchcn_internal%N_CONST_LAND4SNWALB /= 0) then
60306034

60316035
! Convert the dimentions for LAAs from GEOS_SurfGridComp.F90 to GEOS_LandIceGridComp.F90
60326036
! Note: Explanations of each variable
@@ -6066,8 +6070,6 @@ subroutine Driver ( RC )
60666070

60676071
! --------------- GOSWIM PROGRNOSTICS ---------------------------
60686072

6069-
if (catchcn_internal%N_CONST_LAND4SNWALB /= 0) then
6070-
60716073
! Conversion of the masses of the snow impurities
60726074
! Note: Explanations of each variable
60736075
! Number of snow layer is 15: N = 1-15
@@ -7519,15 +7521,18 @@ subroutine Driver ( RC )
75197521
if(associated(FICE2 )) FICE2 = max( min( FICESOUT(2,:),1.0 ), 0.0 )
75207522
if(associated(FICE3 )) FICE3 = max( min( FICESOUT(3,:),1.0 ), 0.0 )
75217523

7522-
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
7523-
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
7524-
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
7525-
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
7526-
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
7527-
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
7528-
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
7529-
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
7530-
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
7524+
if (N_constit>0) then
7525+
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
7526+
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
7527+
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
7528+
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
7529+
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
7530+
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
7531+
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
7532+
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
7533+
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
7534+
end if
7535+
75317536
if(associated(PEATCLSM_FSWCHANGE)) then
75327537
where (POROS >= PEATCLSM_POROS_THRESHOLD)
75337538
PEATCLSM_FSWCHANGE = FSW_CHANGE

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6015,9 +6015,11 @@ subroutine Driver ( RC )
60156015

60166016
!--------------- GOSWIM IMPORTS FROM GOCART ---------------
60176017
! Initialization
6018-
RCONSTIT(:,:,:) = 0.0
6019-
TOTDEPOS(:,:) = 0.0
6020-
RMELT(:,:) = 0.0
6018+
if (N_constit>0) then
6019+
RCONSTIT(:,:,:) = 0.0
6020+
TOTDEPOS(:,:) = 0.0
6021+
RMELT(:,:) = 0.0
6022+
end if
60216023
!------------------------------------------------------------------
60226024

60236025
! Zero the light-absorbing aerosol (LAA) deposition rates from GOCART:
@@ -6057,6 +6059,8 @@ subroutine Driver ( RC )
60576059

60586060
end select
60596061

6062+
if (catchcn_internal%N_CONST_LAND4SNWALB /= 0) then
6063+
60606064
! Convert the dimentions for LAAs from GEOS_SurfGridComp.F90 to GEOS_LandIceGridComp.F90
60616065
! Note: Explanations of each variable
60626066
! TOTDEPOS(:,1): Combined dust deposition from size bin 1 (dry, conv-scav, ls-scav, sed)
@@ -6095,8 +6099,6 @@ subroutine Driver ( RC )
60956099

60966100
! --------------- GOSWIM PROGRNOSTICS ---------------------------
60976101

6098-
if (catchcn_internal%N_CONST_LAND4SNWALB /= 0) then
6099-
61006102
! Conversion of the masses of the snow impurities
61016103
! Note: Explanations of each variable
61026104
! Number of snow layer is 15: N = 1-15
@@ -7800,15 +7802,18 @@ subroutine Driver ( RC )
78007802
if(associated(FICE2 )) FICE2 = max( min( FICESOUT(2,:),1.0 ), 0.0 )
78017803
if(associated(FICE3 )) FICE3 = max( min( FICESOUT(3,:),1.0 ), 0.0 )
78027804

7803-
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
7804-
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
7805-
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
7806-
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
7807-
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
7808-
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
7809-
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
7810-
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
7811-
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
7805+
if (N_constit>0) then
7806+
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
7807+
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
7808+
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
7809+
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
7810+
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
7811+
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
7812+
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
7813+
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
7814+
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
7815+
end if
7816+
78127817
if(associated(PEATCLSM_FSWCHANGE )) then
78137818
where (POROS >= PEATCLSM_POROS_THRESHOLD)
78147819
PEATCLSM_FSWCHANGE = FSW_CHANGE

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4904,9 +4904,11 @@ subroutine Driver ( RC )
49044904

49054905
!--------------- GOSWIM IMPORTS FROM GOCART ---------------
49064906
! Initialization
4907-
RCONSTIT(:,:,:) = 0.0
4908-
TOTDEPOS(:,:) = 0.0
4909-
RMELT(:,:) = 0.0
4907+
if (N_constit>0) then
4908+
RCONSTIT(:,:,:) = 0.0
4909+
TOTDEPOS(:,:) = 0.0
4910+
RMELT(:,:) = 0.0
4911+
end if
49104912
!------------------------------------------------------------------
49114913

49124914
! Zero the light-absorbing aerosol (LAA) deposition rates from GOCART:
@@ -4946,6 +4948,8 @@ subroutine Driver ( RC )
49464948

49474949
end select
49484950

4951+
if (CATCH_INTERNAL_STATE%N_CONST_LAND4SNWALB /= 0) then
4952+
49494953
! Convert the dimentions for LAAs from GEOS_SurfGridComp.F90 to GEOS_LandIceGridComp.F90
49504954
! Note: Explanations of each variable
49514955
! TOTDEPOS(:,1): Combined dust deposition from size bin 1 (dry, conv-scav, ls-scav, sed)
@@ -5005,7 +5009,6 @@ subroutine Driver ( RC )
50055009
! RCONSTIT(NTILES,N,14): Sea salt mass from size bin 4 in layer N
50065010
! RCONSTIT(NTILES,N,15): Sea salt mass from size bin 5 in layer N
50075011

5008-
if (CATCH_INTERNAL_STATE%N_CONST_LAND4SNWALB /= 0) then
50095012
RCONSTIT(:,:,1) = RDU001(:,:)
50105013
RCONSTIT(:,:,2) = RDU002(:,:)
50115014
RCONSTIT(:,:,3) = RDU003(:,:)
@@ -5934,15 +5937,18 @@ subroutine Driver ( RC )
59345937
if(associated(FICE2 )) FICE2 = max( min( FICESOUT(2,:),1.0 ), 0.0 )
59355938
if(associated(FICE3 )) FICE3 = max( min( FICESOUT(3,:),1.0 ), 0.0 )
59365939

5937-
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
5938-
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
5939-
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
5940-
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
5941-
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
5942-
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
5943-
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
5944-
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
5945-
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
5940+
5941+
if (N_constit>0) then
5942+
if(associated(RMELTDU001)) RMELTDU001 = RMELT(:,1)
5943+
if(associated(RMELTDU002)) RMELTDU002 = RMELT(:,2)
5944+
if(associated(RMELTDU003)) RMELTDU003 = RMELT(:,3)
5945+
if(associated(RMELTDU004)) RMELTDU004 = RMELT(:,4)
5946+
if(associated(RMELTDU005)) RMELTDU005 = RMELT(:,5)
5947+
if(associated(RMELTBC001)) RMELTBC001 = RMELT(:,6)
5948+
if(associated(RMELTBC002)) RMELTBC002 = RMELT(:,7)
5949+
if(associated(RMELTOC001)) RMELTOC001 = RMELT(:,8)
5950+
if(associated(RMELTOC002)) RMELTOC002 = RMELT(:,9)
5951+
end if
59465952

59475953
if(associated(DZGT1 )) DZGT1 = DZGT(1) ! [m]
59485954
if(associated(DZGT2 )) DZGT2 = DZGT(2) ! [m]

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSlandice_GridComp/GEOS_LandIceGridComp.F90

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,10 +2770,12 @@ subroutine LANDICECORE(RC)
27702770
if(associated(TICE0 )) TICE0 = 0.0
27712771
if(associated(ACCUM )) ACCUM = 0.0
27722772
if(associated(MELTWTR )) MELTWTR = 0.0
2773-
2774-
TOTDEPOS = 0.0
2775-
RCONSTIT = 0.0
2776-
RMELT = 0.0
2773+
2774+
if (N_constit>0) then
2775+
TOTDEPOS = 0.0
2776+
RCONSTIT = 0.0
2777+
RMELT = 0.0
2778+
end if
27772779

27782780
! Zero the light-absorbing aerosol (LAA) deposition rates from GOCART:
27792781

@@ -2812,6 +2814,9 @@ subroutine LANDICECORE(RC)
28122814

28132815
end select
28142816

2817+
2818+
if (N_CONST_LANDICE4SNWALB /=0) then
2819+
28152820
! Convert the dimentions for LAAs from GEOS_SurfGridComp.F90 to GEOS_LandIceGridComp.F90
28162821
! Note: Explanations of each variable
28172822
! TOTDEPOS(:,1): Combined dust deposition from size bin 1 (dry, conv-scav, ls-scav, sed)
@@ -2870,7 +2875,6 @@ subroutine LANDICECORE(RC)
28702875
! RCONSTIT(NT,N,14): Sea salt mass from size bin 4 in layer N
28712876
! RCONSTIT(NT,N,15): Sea salt mass from size bin 5 in layer N
28722877

2873-
if (N_CONST_LANDICE4SNWALB /=0) then
28742878
RCONSTIT(:,:,1) = IRDU001(:,:)
28752879
RCONSTIT(:,:,2) = IRDU002(:,:)
28762880
RCONSTIT(:,:,3) = IRDU003(:,:)
@@ -3134,6 +3138,7 @@ subroutine LANDICECORE(RC)
31343138
if(associated(IROC001)) IROC001(k,:) = RCONSTIT(k,:,8)
31353139
if(associated(IROC002)) IROC002(k,:) = RCONSTIT(k,:,9)
31363140
end if
3141+
if (N_constit>0) then
31373142
if(associated(RMELTDU001)) RMELTDU001(k) = RMELT(k,1)
31383143
if(associated(RMELTDU002)) RMELTDU002(k) = RMELT(k,2)
31393144
if(associated(RMELTDU003)) RMELTDU003(k) = RMELT(k,3)
@@ -3142,7 +3147,8 @@ subroutine LANDICECORE(RC)
31423147
if(associated(RMELTBC001)) RMELTBC001(k) = RMELT(k,6)
31433148
if(associated(RMELTBC002)) RMELTBC002(k) = RMELT(k,7)
31443149
if(associated(RMELTOC001)) RMELTOC001(k) = RMELT(k,8)
3145-
if(associated(RMELTOC002)) RMELTOC002(k) = RMELT(k,9)
3150+
if(associated(RMELTOC002)) RMELTOC002(k) = RMELT(k,9)
3151+
end if
31463152

31473153
if(associated(LWC ))then
31483154
ZDEP = sum(SNDZ(k,:))

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/GEOS_SurfaceGridComp.rc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,15 @@
129129
# GOSWIM aerosol deposition on surface snow #
130130
#--------------------------------------------------------#
131131

132+
# *** NOTE: GOSWIM is DISABLED via hardcoded N_constit=0 in StieglitzSnow.F90 ***
133+
132134
# ---- Aerosol deposition on snow (available only with MERRA-2 forcings)
133135
#
134136
# 0 : GOCART aerosol are NOT used (default)
135-
# 1 : Use all GOCART aerosol data
136-
# 2 : Use GOCART aerosols *except* dust
137-
# 3 : Use GOCART aerosols *except* black carbon
138-
# 4 : Use GOCART aerosols *except* organic carbon
137+
# DISABLED: 1 : Use all GOCART aerosol data
138+
# DISABLED: 2 : Use GOCART aerosols *except* dust
139+
# DISABLED: 3 : Use GOCART aerosols *except* black carbon
140+
# DISABLED: 4 : Use GOCART aerosols *except* organic carbon
139141
#
140142
# GEOSagcm=>AEROSOL_DEPOSITION: 0
141143
# GEOSldas=>AEROSOL_DEPOSITION: 0
@@ -145,7 +147,7 @@
145147
# NOTE: There are separate parameters for LAND and LANDICE
146148
#
147149
# 0 : Default, GOSWIM snow albedo scheme is turned OFF for land/landice
148-
# 9 : GOSWIM snow albedo scheme is turned ON for land/landice
150+
# DISABLED: 9 : GOSWIM snow albedo scheme is turned ON for land/landice
149151
#
150152
# GEOSagcm=>N_CONST_LAND4SNWALB: 0
151153
# GEOSldas=>N_CONST_LAND4SNWALB: 0

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/StieglitzSnow.F90

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,24 @@ module StieglitzSnow
9595
integer, parameter, public :: NUM_SUDP = 1, NUM_SUSV = 1, NUM_SUWT = 1, NUM_SUSD = 1
9696
integer, parameter, public :: NUM_SSDP = 5, NUM_SSSV = 5, NUM_SSWT = 5, NUM_SSSD = 5
9797

98-
integer, public, parameter :: N_constit = 9 ! Number of constituents in snow
98+
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
99+
!
100+
! Turn off GOSWIM by setting N_constit=0
101+
!
102+
integer, parameter, public :: N_constit = 0 ! number of constituents *used* below
103+
integer, parameter, private :: N_constit_GOSWIM = 9 ! number of constituents in GOSWIM
104+
!
105+
! Previously, N_constit=9 was hardwired even though GOSWIM was never used.
106+
! The GCM's rc parameter AEROSOL_DEPOSITION was set to 0, which forced
107+
! the constituent mass and the deposition rates to remain zero, but the many
108+
! do loops through the 9 constituents were still executed, thus multiplying and adding lots
109+
! zeros many times.
110+
!
111+
! If needed, recover original behavior by setting N_constit=N_constit_GOSWIM=9
112+
!
113+
! - reichle, 31 Jan 2025
114+
!
115+
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
99116

100117
! (for riv, rin,aicev, aicen, and denice, instead use Teppei-defined
101118
! values below)
@@ -128,7 +145,7 @@ module StieglitzSnow
128145
! constants for snow constituents (dust, carbon, etc.)
129146

130147
! MAC, visible (VIS)
131-
real, private, parameter, dimension(N_constit) :: ABVIS = (/ &
148+
real, private, parameter, dimension(N_constit_GOSWIM) :: ABVIS = (/ &
132149
0.148, & ! Dust1
133150
0.106, & ! Dust2
134151
0.076, & ! Dust3
@@ -140,7 +157,7 @@ module StieglitzSnow
140157
0.114 /) ! Organic carbon hydrophic
141158

142159
! MAC, near-infrared (NIR)
143-
real, private, parameter, dimension(N_constit) :: ABNIR = (/ &
160+
real, private, parameter, dimension(N_constit_GOSWIM) :: ABNIR = (/ &
144161
0.095, & ! Dust1
145162
0.080, & ! Dust2
146163
0.062, & ! Dust3
@@ -158,7 +175,7 @@ module StieglitzSnow
158175
! Tuning parameters so as to satisfy NCAR/CLM based scavenging efficiencies;
159176
! See more in Yasunari et al. (SOLA, 2014)
160177

161-
real, private, parameter, dimension(N_constit) :: SCAV = (/ &
178+
real, private, parameter, dimension(N_constit_GOSWIM) :: SCAV = (/ &
162179
0.065442, & ! Dust 1
163180
0.077829, & ! Dust 2
164181
0.306841, & ! Dust 3
@@ -172,7 +189,7 @@ module StieglitzSnow
172189
! Representative particle size in diameter
173190
! based on effective radius GOCART/GEOS-5 (dust 1-5 bins, BC, and OC) [um]
174191

175-
real, private, parameter, dimension(N_constit) :: PSIZE = (/ &
192+
real, private, parameter, dimension(N_constit_GOSWIM) :: PSIZE = (/ &
176193
1.272, & ! Dust 1
177194
2.649, & ! Dust 2
178195
4.602, & ! Dust 3
@@ -240,7 +257,7 @@ subroutine StieglitzSnow_snowrt(tile_lon, tile_lat, &
240257
! wesn : Layer water contents per unit area of catchment [kg/m^2]
241258
! htsnn : Layer heat contents relative to liquid water at 0 C [J/m^2]
242259
! sndz : Layer depths [m]
243-
! rconstit : Mass of constituents in snow layer [kg] (i.e., [kg m-2])
260+
! rconstit : Mass of constituents in snow layer [kg] (i.e., [kg m-2])
244261
! rmelt : Flushed mass amount of constituents from the bottom snow layer [kg m-2 s-1 (kg/m^2/s)]
245262
!*********
246263
! OUTPUTS:
@@ -403,7 +420,8 @@ subroutine StieglitzSnow_snowrt(tile_lon, tile_lat, &
403420
dtss = 0.
404421
excswe = 0.
405422

406-
rmelt = 0.0
423+
if (N_constit>0) rmelt = 0.0
424+
407425
mltwtr = 0.0
408426
drho0 = 0.0
409427
tksno = 0.0
@@ -424,7 +442,7 @@ subroutine StieglitzSnow_snowrt(tile_lon, tile_lat, &
424442
do k=1,N_constit
425443
rmelt(k)=sum(rconstit(:,k))/dts
426444
enddo
427-
rconstit(:,:) = 0.
445+
if (N_constit>0) rconstit(:,:) = 0.
428446

429447
if(snowf > 0.) then ! only initialize with non-liquid part of precip
430448
! liquid precip (rainf) is part of outflow from snow base (see "pre" above)
@@ -742,9 +760,9 @@ subroutine StieglitzSnow_snowrt(tile_lon, tile_lat, &
742760
!**** Updated by Koster, August 27, 2002.
743761

744762
pre = 0.
745-
rmelt(:) = 0.
763+
if (N_constit>0) rmelt(:) = 0.
746764
flow = 0.
747-
flow_r(:) = 0.
765+
if (N_constit>0) flow_r(:) = 0.
748766

749767
wesnperc = wesn
750768

@@ -762,8 +780,11 @@ subroutine StieglitzSnow_snowrt(tile_lon, tile_lat, &
762780

763781
pre = max((1.-fices(i))*wesn(i), 0.)
764782
flow = 0.
765-
flow_r(:) = 0.
766-
rconc(:) = 0.
783+
784+
if (N_constit>0) then
785+
flow_r(:) = 0.
786+
rconc(:) = 0.
787+
end if
767788

768789
if(snowd > wemin) then
769790

0 commit comments

Comments
 (0)