Skip to content

Commit e833de5

Browse files
committed
Merge branch 'develop' into feature/rtodling/jedi_varname_change_oct24
2 parents 672e49e + f2b0268 commit e833de5

File tree

9 files changed

+114
-103
lines changed

9 files changed

+114
-103
lines changed

GEOSaana_GridComp/GSI_GridComp/aircraftinfo.f90

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ module aircraftinfo
5555
logical :: aircraft_t_bc_ext ! logical to turn off or on the externally supplied aircraft bias correction
5656
logical :: cleanup_tail ! logical to remove tail number no longer used
5757
logical :: upd_aircraft ! indicator if update bias at 06Z & 18Z
58-
59-
integer(i_kind), parameter :: max_tail=15000 ! max tail numbers
58+
59+
integer(i_kind) max_tail ! max tail numbers
6060
integer(i_kind) npredt ! predictor number
6161
integer(i_kind) ntail ! total tail number
6262
integer(i_kind) ntail_update ! new total tail number
63-
integer(i_kind) mype_airobst ! processor reading in aircraft profile data
63+
integer(i_kind) mype_airobst ! processor reading in aircraft profile data
6464
integer(i_kind) nsort ! used in sorting tail number
65-
66-
character(len=10),dimension(max_tail):: taillist ! tail number
67-
character(len=1),dimension(max_tail):: itail_sort ! used in sorting tail number
68-
integer(i_kind),dimension(max_tail):: idx_tail ! index of tail
69-
integer(i_kind),dimension(max_tail):: idx_sort ! used in sorting tail number
70-
integer(i_kind),dimension(max_tail):: timelist ! time stamp
65+
66+
character(len=10),allocatable,dimension(:):: taillist ! tail number
67+
character(len=1),allocatable,dimension(:):: itail_sort ! used in sorting tail number
68+
integer(i_kind),allocatable,dimension(:):: idx_tail ! index of tail
69+
integer(i_kind),allocatable,dimension(:):: idx_sort ! used in sorting tail number
70+
integer(i_kind),allocatable,dimension(:):: timelist ! time stamp
7171
real(r_kind):: biaspredt ! berror var for temperature bias correction coefficients
7272
real(r_kind):: upd_pred_t ! =1 update bias; =0 no update
7373
real(r_kind):: hdist_aircraft ! horizontal distance threshold for errormod_aircraft
@@ -94,6 +94,8 @@ subroutine init_aircraft
9494
! program history log:
9595
! 2013-05-17 Zhu
9696
! 2014-03-04 Sienkiewicz - added aircraft_t_bc_ext option
97+
! 2024-12-10 Sienkiewicz - arrays dimensioned by 'max_tail' changed to
98+
! allocatable arrays so 'max_tail' can be set via a namelist
9799
!
98100
! input argument list:
99101
!
@@ -115,14 +117,16 @@ subroutine init_aircraft
115117
aircraft_t_bc = .false. ! .true.=turn on bias correction
116118
aircraft_t_bc_pof = .false. ! .true.=turn on bias correction
117119
aircraft_t_bc_ext = .false. ! .true.=turn on bias correction
118-
cleanup_tail = .false. ! no removal of tail number
120+
cleanup_tail = .false. ! no removal of tail number
119121
mype_airobst = 0
120122

121123
upd_aircraft=.true.
122124
upd_pred_t=one
123125

124126
hdist_aircraft=60000.0_r_kind
125127

128+
max_tail = 20000
129+
126130
end subroutine init_aircraft
127131

128132

@@ -176,7 +180,7 @@ subroutine aircraftinfo_read
176180
if(verbose .and. mype == 0)print_verbose=.true.
177181
! Determine number of entries in aircraft bias file
178182
inquire(file='aircftbias_in',exist=pcexist)
179-
if (.not. pcexist) then
183+
if (.not. pcexist) then
180184
write(6,*)'AIRCRAFTINFO_READ: ***ERROR*** aircftbias_in not found'
181185
call stop2(340)
182186
end if
@@ -204,7 +208,7 @@ subroutine aircraftinfo_read
204208
write(6,120) ntail
205209
120 format('AIRCRAFTINFO_READ: ntail=',1x,i6)
206210
endif
207-
if (ntail > max_tail) then
211+
if (ntail > max_tail) then
208212
write(6,*)'AIRCRAFTINFO_READ: ***ERROR*** ntail exceeds max_tail'
209213
write(6,*)'AIRCRAFTINFO_READ: stop program execution'
210214
call stop2(340)
@@ -221,6 +225,9 @@ subroutine aircraftinfo_read
221225
ostats_t = zero_quad
222226
rstats_t = zero_quad
223227

228+
allocate(taillist(max_tail),itail_sort(max_tail),idx_tail(max_tail), &
229+
idx_sort(max_tail),timelist(max_tail))
230+
224231
j=0
225232
do k=1,nlines
226233
read(lunin,100) cflg,crecord
@@ -241,7 +248,7 @@ subroutine aircraftinfo_read
241248
110 format(a10,1x,i5,9(1x,f12.6),1x,i8)
242249

243250
! Do not update aircraft temperature bias at 6Z and 18Z
244-
if (.not. upd_aircraft) then
251+
if (.not. upd_aircraft) then
245252
anal_time = iadate(4)
246253
if (anal_time==6 .or. anal_time==18) upd_pred_t = zero
247254
if (mype==0) print*, 'aircraft_info anal_time upd_pred_t=', anal_time, upd_pred_t
@@ -258,7 +265,7 @@ subroutine aircraftinfo_read
258265
itail_sort(isort) = cb
259266
idx_sort(isort) = k
260267
cb0 = cb
261-
end if
268+
end if
262269
end do
263270
nsort = isort
264271
if (mype==0) print*, 'nsort = ', nsort
@@ -279,6 +286,8 @@ subroutine aircraftinfo_write
279286
!
280287
! program history log:
281288
! 2013-05-17 Yanqiu Zhu
289+
! 2024-12-10 Sienkiewicz - arrays dimensioned by 'max_tail' changed to
290+
! allocatable arrays so 'max_tail' can be set via a namelist
282291
!
283292
! input argument list:
284293
!
@@ -327,13 +336,13 @@ subroutine aircraftinfo_write
327336
end do
328337
do i=1,ntail_update
329338
csort(i) = taillist(i)
330-
end do
339+
end do
331340
! cleanup tailnumber in the aircraft bias file
332341
obsolete = 0
333342
if (cleanup_tail) then
334343
iyyyymm = iadate(1)*100+iadate(2)
335344
do i=1,ntail_update
336-
if (abs(iyyyymm-timelist(i))>=100) then
345+
if (abs(iyyyymm-timelist(i))>=100) then
337346
csort(i) = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
338347
obsolete = obsolete+1
339348
end if
@@ -349,6 +358,7 @@ subroutine aircraftinfo_write
349358
end do
350359

351360
close(lunout)
361+
deallocate(taillist,itail_sort,idx_tail,idx_sort,timelist)
352362
deallocate(predt)
353363
deallocate(ostats_t,rstats_t,varA_t)
354364

@@ -420,7 +430,7 @@ subroutine indexc40(n,carrin,indx)
420430
l = n/2 + 1
421431
ir = n
422432

423-
do
433+
do
424434
if(l.gt.1) then
425435
l = l - 1
426436
indxt = indx(l)
@@ -439,7 +449,7 @@ subroutine indexc40(n,carrin,indx)
439449
i = l
440450
j = l * 2
441451

442-
do
452+
do
443453
if(j.le.ir) then
444454
if(j.lt.ir) then
445455
if(carrin(indx(j)).lt.carrin(indx(j+1))) j = j + 1

GEOSaana_GridComp/GSI_GridComp/etc/gsi.rc.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
&OBSQC
6363
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6464
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
65-
half_goesr_err=.false.,
65+
half_goesr_err=.false.,max_tail=15000,
6666
! tcp_ermin=0.75,tcp_ermax=0.75,
6767
>>>AIRCFT_BIAS<<<
6868
/

GEOSaana_GridComp/GSI_GridComp/etc/gsi_fdda_1.rc.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@
6161
&OBSQC
6262
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6363
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
64-
half_goesr_err=.false.,
64+
half_goesr_err=.false.,max_tail=15000,
6565
! tcp_ermin=0.75,tcp_ermax=0.75,
6666
>>>AIRCFT_BIAS<<<
6767
/
6868
&OBS_INPUT
69-
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
69+
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
7070
/
7171
OBS_INPUT::
7272
! dfile dtype dplat dsis dval dthin dsfcalc obsclass
73-
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
73+
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
7474
prepbufr t null t 0.0 0 0 ncep_prep_bufr
7575
prepbufr_profl t null t 0.0 0 0 ncep_acftpfl_bufr
7676
prepbufr q null q 0.0 0 0 ncep_prep_bufr

GEOSaana_GridComp/GSI_GridComp/etc/gsi_fdda_2.rc.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@
6161
&OBSQC
6262
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6363
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
64-
half_goesr_err=.false.,
64+
half_goesr_err=.false.,max_tail=15000,
6565
! tcp_ermin=0.75,tcp_ermax=0.75,
6666
>>>AIRCFT_BIAS<<<
6767
/
6868
&OBS_INPUT
69-
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
69+
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
7070
/
7171
OBS_INPUT::
7272
! dfile dtype dplat dsis dval dthin dsfcalc obsclass
73-
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
73+
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
7474
prepbufr t null t 0.0 0 0 ncep_prep_bufr
7575
prepbufr_profl t null t 0.0 0 0 ncep_acftpfl_bufr
7676
prepbufr q null q 0.0 0 0 ncep_prep_bufr

GEOSaana_GridComp/GSI_GridComp/etc/gsi_fgat_1.rc.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
&OBSQC
6060
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6161
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
62-
half_goesr_err=.false.,
62+
half_goesr_err=.false.,max_tail=15000,
6363
! tcp_ermin=0.75,tcp_ermax=0.75,
6464
>>>AIRCFT_BIAS<<<
6565
/
6666
&OBS_INPUT
67-
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
67+
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
6868
/
6969
OBS_INPUT::
7070
! dfile dtype dplat dsis dval dthin dsfcalc obsclass
71-
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
71+
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
7272
prepbufr t null t 0.0 0 0 ncep_prep_bufr
7373
prepbufr_profl t null t 0.0 0 0 ncep_acftpfl_bufr
7474
prepbufr q null q 0.0 0 0 ncep_prep_bufr

GEOSaana_GridComp/GSI_GridComp/etc/gsi_fgat_2.rc.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
&OBSQC
6060
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6161
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
62-
half_goesr_err=.false.,
62+
half_goesr_err=.false.,max_tail=15000,
6363
! tcp_ermin=0.75,tcp_ermax=0.75,
6464
>>>AIRCFT_BIAS<<<
6565
/
6666
&OBS_INPUT
67-
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
67+
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
6868
/
6969
OBS_INPUT::
7070
! dfile dtype dplat dsis dval dthin dsfcalc obsclass
71-
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
71+
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
7272
prepbufr t null t 0.0 0 0 ncep_prep_bufr
7373
prepbufr_profl t null t 0.0 0 0 ncep_acftpfl_bufr
7474
prepbufr q null q 0.0 0 0 ncep_prep_bufr

GEOSaana_GridComp/GSI_GridComp/etc/gsi_sens.rc.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
&OBSQC
6969
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
7070
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
71-
half_goesr_err=.false.,
71+
half_goesr_err=.false.,max_tail=15000,
7272
! tcp_ermin=0.75,tcp_ermax=0.75,
7373
>>>AIRCFT_BIAS<<<
7474
/

GEOSaana_GridComp/GSI_GridComp/etc/obs.rc.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@
5858
&OBSQC
5959
dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.true.,c_varqc=0.02,blacklst=.true.,
6060
use_poq7=.true.,qc_noirjaco3=.false.,qc_satwnds=.false.,cld_det_dec2bin=.true.,
61-
half_goesr_err=.false.,
61+
half_goesr_err=.false.,max_tail=15000,
6262
! tcp_ermin=0.75,tcp_ermax=0.75,
6363
>>>AIRCFT_BIAS<<<
6464
/
6565
&OBS_INPUT
66-
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
66+
dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=180.0,time_window_max=3.0,
6767
/
6868
OBS_INPUT::
6969
! dfile dtype dplat dsis dval dthin dsfcalc obsclass
70-
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
70+
prepbufr ps null ps 0.0 0 0 ncep_prep_bufr
7171
prepbufr t null t 0.0 0 0 ncep_prep_bufr
7272
prepbufr_profl t null t 0.0 0 0 ncep_acftpfl_bufr
7373
prepbufr q null q 0.0 0 0 ncep_prep_bufr

0 commit comments

Comments
 (0)