Skip to content

Commit 3716c18

Browse files
committed
Merging v6.11.8 changes
1 parent 365a64c commit 3716c18

File tree

17 files changed

+396
-313
lines changed

17 files changed

+396
-313
lines changed

MICRO_M2005/microphysics.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ module microphysics
7575
logical :: douse_reffc = .true., douse_reffi = .true.
7676
logical :: dosnow_radiatively_active = .true.
7777
logical :: dorrtm_cloud_optics_from_effrad_LegacyOption = .false.
78+
logical :: reff_ice_holds_Dge = .false. ! not used
7879

7980
! You can also have some additional, diagnostic, arrays, for example, total
8081
! nonprecipitating cloud water, etc:
@@ -558,7 +559,7 @@ subroutine micro_proc()
558559
use params, only: fac_cond, fac_sub, rgas
559560
use grid, only: z, zi
560561
use vars, only: t, gamaz, precsfc, precflux, qpfall, tlat, prec_xy, &
561-
nstep, nstatis, icycle, total_water_prec
562+
nstep, nstatis, icycle, total_water_prec, precinst
562563

563564

564565
real, dimension(nzm) :: &
@@ -726,6 +727,7 @@ subroutine micro_proc()
726727
total_water_prec = total_water_prec + sfcpcp
727728

728729
! take care of surface precipitation
730+
precinst(i,j) = precinst(i,j) + sfcpcp/dtn
729731
precsfc(i,j) = precsfc(i,j) + sfcpcp/dz
730732
prec_xy(i,j) = prec_xy(i,j) + sfcpcp/dz
731733

MICRO_THOM/microphysics.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module microphysics
2020
tlatqi, tabs0, qv0, fluxbq, fluxtq, dtfactor, &
2121
sstxy, t00, rhow, &
2222
condavg_mask, ncondavg, condavgname, condavglongname, &
23-
nstep,nprint, nstatis, icycle, total_water_prec, &
23+
nstep,nprint, nstatis, icycle, total_water_prec, precinst, &&
2424
nrainy, ncmn, nrmn
2525

2626
use hbuffer, only: hbuf_put
@@ -691,6 +691,7 @@ subroutine micro_proc()
691691
total_water_prec = total_water_prec + ppt_rain
692692

693693
! take care of surface precipitation
694+
precinst(i,j) = precinst(i,j) + pptncv/dtn
694695
precsfc(i,j) = precsfc(i,j) + pptncv/dz
695696
prec_xy(i,j) = prec_xy(i,j) + pptncv/dz
696697

RAD_CAM/rad_restart.f90

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ subroutine write_rad()
1717
open(56,file='./RESTART/'//case(1:len_trim(case))//'_'// &
1818
caseid(1:len_trim(caseid))//'_'// &
1919
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
20-
status='unknown',form='unformatted')
20+
status='unknown',form='unformatted',&
21+
! BUFFERED='YES', & ! use for intel compiler
22+
ACTION='WRITE')
2123
write(56) nsubdomains
2224
write(56) initrad,nradsteps,tabs_rad,qc_rad,qi_rad,qv_rad,qs_rad, &
2325
cld_rad, rel_rad, rei_rad, res_rad, &
@@ -40,15 +42,19 @@ subroutine write_rad()
4042
open(56,file='./RESTART/'//case(1:len_trim(case))//'_'// &
4143
caseid(1:len_trim(caseid))//'_'// &
4244
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
43-
status='unknown',form='unformatted')
45+
status='unknown',form='unformatted', &
46+
! BUFFERED='YES', & ! use for intel compiler
47+
ACTION='WRITE')
4448
write(56) nsubdomains
4549

4650
else
4751

4852
open(56,file='./RESTART/'//case(1:len_trim(case))//'_'// &
4953
caseid(1:len_trim(caseid))//'_'// &
5054
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
51-
status='unknown',form='unformatted', position='append')
55+
status='unknown',form='unformatted', position='append', &
56+
! BUFFERED='YES', & ! use for intel compiler
57+
ACTION='WRITE')
5258

5359
end if
5460

@@ -94,11 +100,15 @@ subroutine read_rad()
94100
if(nrestart.ne.2) then
95101
open(56,file='./RESTART/'//trim(case)//'_'//trim(caseid)//'_'// &
96102
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
97-
status='unknown',form='unformatted')
103+
status='unknown',form='unformatted', &
104+
! BUFFERED='YES', & ! use for intel compiler
105+
ACTION='READ')
98106
else
99107
open(56,file='./RESTART/'//trim(case_restart)//'_'//trim(caseid_restart)//'_'// &
100108
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
101-
status='unknown',form='unformatted')
109+
status='unknown',form='unformatted', &
110+
! BUFFERED='YES', & ! use for intel compiler
111+
ACTION='READ')
102112
end if
103113
read (56)
104114
read(56) initrad,nradsteps,tabs_rad,qc_rad,qi_rad,qv_rad,qs_rad, &
@@ -114,11 +124,15 @@ subroutine read_rad()
114124
if(nrestart.ne.2) then
115125
open(56,file='./RESTART/'//trim(case)//'_'//trim(caseid)//'_'// &
116126
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
117-
status='unknown',form='unformatted')
127+
status='unknown',form='unformatted', &
128+
! BUFFERED='YES', & ! use for intel compiler
129+
ACTION='READ')
118130
else
119131
open(56,file='./RESTART/'//trim(case_restart)//'_'//trim(caseid_restart)//'_'// &
120132
rankchar(5-lenstr(rankchar):4)//'_restart_rad.bin', &
121-
status='unknown',form='unformatted')
133+
status='unknown',form='unformatted', &
134+
! BUFFERED='YES', & ! use for intel compiler
135+
ACTION='READ')
122136
end if
123137

124138
do irank=0,nsubdomains-1

RAD_RRTM/rad.f90

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ subroutine rad_driver
579579
else
580580
if (dosolarconstant) then
581581
eccf = solar_constant/(1367.)
582-
else
583-
call shr_orb_decl (dayForSW, eccen, mvelpp, lambm0, obliqr, delta, eccf)
582+
else
583+
call shr_orb_decl (dayForSW, eccen, mvelpp, lambm0, obliqr, delta, eccf)
584584
end if
585585
solarZenithAngleCos(:) = &
586586
zenith(dayForSW, real(pi * latitude(:, lat)/180., kind_rb), &
@@ -789,7 +789,7 @@ subroutine rad_driver
789789
if(dompiensemble) then
790790
dompi = .true.
791791
endif
792-
call write_rad() ! write radiation restart file
792+
call write_rad() ! write radiation restart file
793793
! Kuang Ensemble run: turn off mpi after writing (Song Qiyu, 2022)
794794
if(dompiensemble) then
795795
dompi = .false.
@@ -1064,7 +1064,7 @@ subroutine tracesini()
10641064

10651065
! Kuang Ensemble run: turn on mpi for broadcast (Song Qiyu, 2022)
10661066
if(dompiensemble) dompi = .true.
1067-
1067+
10681068
if(dompi) then
10691069
call task_bcast_real8(0,o3,nzm+1)
10701070
call task_bcast_real8(0,co2,nzm+1)
@@ -1155,7 +1155,9 @@ subroutine write_rad()
11551155

11561156
if(restart_sep) then
11571157
open(56, file = trim(constructRestartFileName(case, caseId, rank)), &
1158-
status='unknown',form='unformatted')
1158+
status='unknown',form='unformatted', &
1159+
! BUFFERED='YES', & ! use for intel compiler
1160+
ACTION='WRITE')
11591161
write(56) nsubdomains
11601162
write(56) nradsteps, qrad, radlwup, radlwdn, radswup, radswdn, &
11611163
radqrlw, radqrsw, radqrclw, radqrcsw, &
@@ -1171,7 +1173,9 @@ subroutine write_rad()
11711173
call task_barrier()
11721174
if(irank == rank) then
11731175
open(56, file = trim(constructRestartFileName(case, caseId, nSubdomains)), &
1174-
status='unknown',form='unformatted')
1176+
status='unknown',form='unformatted', &
1177+
! BUFFERED='YES', & ! use for intel compiler
1178+
ACTION='READWRITE')
11751179
if(masterproc) then
11761180
write(56) nsubdomains
11771181
else
@@ -1207,10 +1211,14 @@ subroutine read_rad()
12071211

12081212
if(nrestart.ne.2) then
12091213
open(56, file = trim(constructRestartFileName(case, caseid, rank)), &
1210-
status='unknown',form='unformatted')
1214+
status='unknown',form='unformatted', &
1215+
! BUFFERED='YES', & ! use for intel compiler
1216+
ACTION='READ')
12111217
else
12121218
open(56, file = trim(constructRestartFileName(case_restart, caseid_restart, rank)), &
1213-
status='unknown',form='unformatted')
1219+
status='unknown',form='unformatted', &
1220+
! BUFFERED='YES', & ! use for intel compiler
1221+
ACTION='READ')
12141222
end if
12151223
read (56)
12161224
read(56) nradsteps, qrad, radlwup, radlwdn, radswup, radswdn, &
@@ -1230,10 +1238,14 @@ subroutine read_rad()
12301238
if(irank == rank) then
12311239
if(nrestart.ne.2) then
12321240
open(56, file = trim(constructRestartFileName(case, caseId, nSubdomains)), &
1233-
status='unknown',form='unformatted')
1241+
status='unknown',form='unformatted', &
1242+
! BUFFERED='YES', & ! use for intel compiler
1243+
ACTION='READ')
12341244
else
12351245
open(56, file = trim(constructRestartFileName(case, caseId_restart, nSubdomains)), &
1236-
status='unknown',form='unformatted')
1246+
status='unknown',form='unformatted', &
1247+
! BUFFERED='YES', & ! use for intel compiler
1248+
ACTION='READ')
12371249
end if
12381250
read (56)
12391251
do ii=0,irank-1 ! skip records

SGS_TKE/sgs.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ subroutine sgs_setparm()
112112
close(55)
113113
! write namelist values out to file for documentation
114114
if(masterproc) then
115-
open(unit=55,file='./'//trim(case)//'/'//trim(case)//'_'//trim(caseid)//'.nml', form='formatted', position='append')
115+
open(unit=55,file='./OUT_STAT/'//trim(case)//'_'//trim(caseid)//'.nml', form='formatted', position='append')
116116
write (unit=55,nml=SGS_TKE,IOSTAT=ios)
117117
write(55,*) ' '
118118
close(unit=55)

SLM/slm_restart.f90

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ subroutine write_statement_slm()
2323
filename='./RESTART/'//case(1:len_trim(case))//'_'// &
2424
caseid(1:len_trim(caseid))//'_'// &
2525
rankchar(5-lenstr(rankchar):4)//'_restart_slm.bin'
26-
open(176,file=trim(filename),status='unknown',form='unformatted')
26+
open(176,file=trim(filename),status='unknown',form='unformatted', &
27+
! BUFFERED='YES', & ! use for intel compiler
28+
ACTION='WRITE')
2729
write(176) nsubdomains
2830
write(176) soilt, soilw, mw, mws, t_canop, t_cas, q_cas, soilt_obs, soilw_obs,&
2931
dosoilwnudging, dosoiltnudging,tausoil,landtype0,LAI0,clay0,sand0, &
@@ -45,15 +47,19 @@ subroutine write_statement_slm()
4547
open(176,file='./RESTART/'//case(1:len_trim(case))//'_'// &
4648
caseid(1:len_trim(caseid))//'_'// &
4749
rankchar(5-lenstr(rankchar):4)//'_restart_slm.bin', &
48-
status='unknown',form='unformatted')
50+
status='unknown',form='unformatted', &
51+
! BUFFERED='YES', & ! use for intel compiler
52+
ACTION='WRITE')
4953
write(176) nsubdomains
5054

5155
else
5256

5357
open(176,file='./RESTART/'//case(1:len_trim(case))//'_'// &
5458
caseid(1:len_trim(caseid))//'_'// &
5559
rankchar(5-lenstr(rankchar):4)//'_restart_slm.bin', &
56-
status='unknown',form='unformatted', position='append')
60+
status='unknown',form='unformatted', position='append', &
61+
! BUFFERED='YES', & ! use for intel compiler
62+
ACTION='WRITE')
5763

5864
end if
5965
write(176) soilt, soilw, mw, mws, t_canop, t_cas, q_cas, soilt_obs, soilw_obs,&
@@ -106,7 +112,9 @@ subroutine read_statement_slm()
106112
rankchar(5-lenstr(rankchar):4)//'_restart_slm.bin'
107113
end if
108114

109-
open(176,file=filename, status='unknown',form='unformatted')
115+
open(176,file=filename, status='unknown',form='unformatted', &
116+
! BUFFERED='YES', & ! use for intel compiler
117+
ACTION='READ')
110118
read (176)
111119
read (176) soilt, soilw, mw, mws, t_canop, t_cas, q_cas, soilt_obs, soilw_obs,&
112120
dosoilwnudging, dosoiltnudging,tausoil,landtype0,LAI0,clay0,sand0, &
@@ -126,7 +134,9 @@ subroutine read_statement_slm()
126134
rankchar(5-lenstr(rankchar):4)//'_restart_slm.bin'
127135
end if
128136

129-
open(176,file=filename,status='unknown',form='unformatted')
137+
open(176,file=filename,status='unknown',form='unformatted', &
138+
! BUFFERED='YES', & ! use for intel compiler
139+
ACTION='READ')
130140

131141
do irank=0,nsubdomains-1
132142

SLM/slm_vars.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ SUBROUTINE slm_init
680680
rootL(i,j) = 1.5
681681
root_a(i,j) = 5.558
682682
root_b(i,j) = 2.614
683+
Rc_min(i,j) = 100.
683684
Rgl(i,j) = 100.
684685
hs_rc(i,j) = 39.18
685686
BAI(i,j) = 50.

SLM/vapor_fluxes.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ SUBROUTINE vapor_fluxes(qsfc,qr,i,j)
6464
r_soil = min(10000._DBL,max(100._DBL,r_a*(1.0_DBL/soil_diff-1.0_DBL)))
6565
totalR_soil = r_soil + r_a + r_litter
6666
ELSE
67-
r_soil = min(10000._DBL,max(50._DBL,r_d*(1.0_DBL/soil_diff-1.0+DBL)))
67+
r_soil = min(10000._DBL,max(50._DBL,r_d*(1.0_DBL/soil_diff-1.0_DBL)))
6868
totalR_soil = r_soil + r_d + r_litter
6969
END IF
7070

grid.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module grid
55

66
implicit none
77

8-
character(7), parameter :: version = '6.11.7 '
9-
character(8), parameter :: version_date = 'May 2021'
8+
character(7), parameter :: version = '6.11.8 '
9+
character(8), parameter :: version_date = 'July 2022'
1010

1111
integer, parameter :: nx = nx_gl/nsubdomains_x
1212
integer, parameter :: ny = ny_gl/nsubdomains_y

header.f90

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ subroutine header()
4141
write(*,*) ' *** School of Marine and Atmospheric Sciences ***'
4242
write(*,*) ' *** Stony Brook University ***'
4343
write(*,*) ' **************************************************'
44-
write(*,*) ' *** The model can be used only with ***'
45-
write(*,*) ' *** permission from the author! ***'
46-
write(*,*) ' *** No transfer to any third party ***'
47-
write(*,*) ' *** is allowed! ***'
48-
write(*,*) ' **************************************************'
4944
write(*,*) ' **************************************************'
5045
write(*,*) ' *** DATE '//cdate//' TIME '//ctime//' ***'
5146
write(*,*) ' **************************************************'

0 commit comments

Comments
 (0)