rda-python-icoads 1.0.16__tar.gz → 1.0.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rda_python_icoads-1.0.16/src/rda_python_icoads.egg-info → rda_python_icoads-1.0.18}/PKG-INFO +1 -1
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/pyproject.toml +1 -1
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/PgIMMA.py +2 -2
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillitable.py +2 -1
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/imma1_subset.py +35 -11
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18/src/rda_python_icoads.egg-info}/PKG-INFO +1 -1
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/LICENSE +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/MANIFEST.in +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/README.md +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/setup.cfg +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/R3.0-stat_doc.pdf +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/README_R3.0_Subset.html +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/__init__.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/checkicoads.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/cleanicoads.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countattm.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countattmvar.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/counticoads.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countsst.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillicoads.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillinventory.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillmonth.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fixiidx.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/maxsst.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg3.0_subset_readme.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg3_subset.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg_download.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msgsubset.f +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/rdimma1_csv.f +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/writeicoads.py +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/SOURCES.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/dependency_links.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/entry_points.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/requires.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/top_level.txt +0 -0
- {rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/tests/test_icoads.py +0 -0
|
@@ -143,6 +143,7 @@ def add_field_records():
|
|
|
143
143
|
acnt += 1
|
|
144
144
|
elif stat == 2:
|
|
145
145
|
ucnt += 1
|
|
146
|
+
line = IVAR.readline()
|
|
146
147
|
|
|
147
148
|
IVAR.close()
|
|
148
149
|
PgLOG.pglog("{}/{} of {} values added/updated into table {}".format(acnt, ucnt, vcnt, vtable), PgLOG.LOGWRN)
|
|
@@ -152,7 +153,7 @@ def add_field_records():
|
|
|
152
153
|
#
|
|
153
154
|
def add_field_value(var, vtable, key, desc):
|
|
154
155
|
|
|
155
|
-
cnd = "{} = {}".
|
|
156
|
+
cnd = "{} = {}".format(var, key)
|
|
156
157
|
|
|
157
158
|
pgrec = PgDBI.pgget(vtable, "*", cnd)
|
|
158
159
|
|
|
@@ -93,6 +93,7 @@ OPTATTMS = {
|
|
|
93
93
|
PGRQST = PGFILE = None
|
|
94
94
|
pgcmd = 'imma1_subset'
|
|
95
95
|
PSTEP = 32
|
|
96
|
+
TSPLIT = 1
|
|
96
97
|
|
|
97
98
|
#
|
|
98
99
|
# main function to run dsarch
|
|
@@ -412,22 +413,39 @@ def process_subset_request(ridx, rdir, rstr):
|
|
|
412
413
|
PgFile.change_local_directory(rdir, PgLOG.LOGWRN)
|
|
413
414
|
fcnt = build_final_files(ridx, rstr)
|
|
414
415
|
else:
|
|
415
|
-
fcnt =
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
edate = PVALS['edate'][i]
|
|
416
|
+
fcnt = 0
|
|
417
|
+
tcnt = get_table_info(PVALS['dates'])
|
|
418
|
+
for i in range(tcnt):
|
|
419
419
|
tidx = PVALS['tidx'][i]
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
420
|
+
fdates = get_file_dates(PVALS['bdate'][i], PVALS['edate'][i])
|
|
421
|
+
for dates in fdates:
|
|
422
|
+
bdate = dates[0]
|
|
423
|
+
edate = dates[1]
|
|
424
|
+
pgrec = {'data_format' : 'ASCII'}
|
|
425
|
+
fcnt + 1
|
|
426
|
+
pgrec['disp_order'] = fcnt
|
|
427
|
+
pgrec['command'] = pgcmd + " -f -FI"
|
|
428
|
+
pgrec['cmd_detail'] = "dates={} {}&tidx={}".format(bdate, edate, tidx)
|
|
429
|
+
fname = "ICOADS_R3.0_Rqst{}_{}-{}.csv".format(ridx, bdate.replace('-', ''), edate.replace('-', ''))
|
|
430
|
+
PgSubset.add_request_file(ridx, fname, pgrec, PgLOG.LGEREX)
|
|
427
431
|
|
|
428
432
|
record = {'fcount' : fcnt}
|
|
429
433
|
PgDBI.pgupdt('dsrqst', record, "rindex = {}".format(ridx))
|
|
430
434
|
|
|
435
|
+
def get_file_dates(bdate, edate):
|
|
436
|
+
|
|
437
|
+
fdates = [[bdate, edate]]
|
|
438
|
+
if TSPLIT > 1:
|
|
439
|
+
dstep = int(PgUtil.diffdate(edate, bdate)/TSPLIT)
|
|
440
|
+
if dstep > 2:
|
|
441
|
+
mdate = PgUtil.adddate(bdate, 0, 0, dstep)
|
|
442
|
+
while PgUtil.diffdate(edate, mdate) > 2:
|
|
443
|
+
fdates[-1][1] = mdate
|
|
444
|
+
bdate = PgUtil.adddate(mdate, 0, 0, 1)
|
|
445
|
+
fdates.append([bdate, edate])
|
|
446
|
+
mdate = PgUtil.adddate(bdate, 0, 0, dstep)
|
|
447
|
+
return fdates
|
|
448
|
+
|
|
431
449
|
#
|
|
432
450
|
# process a validated subset request file
|
|
433
451
|
#
|
|
@@ -658,6 +676,8 @@ def build_final_files(ridx, rstr):
|
|
|
658
676
|
#
|
|
659
677
|
def get_subset_info(rstr):
|
|
660
678
|
|
|
679
|
+
global TSPLIT
|
|
680
|
+
|
|
661
681
|
rinfo = PGRQST['rinfo'] if PGRQST['rinfo'] else PGRQST['note']
|
|
662
682
|
cnt = 0
|
|
663
683
|
for line in rinfo.split("&"):
|
|
@@ -704,6 +724,10 @@ def get_subset_info(rstr):
|
|
|
704
724
|
|
|
705
725
|
if cnt < 5: PgLOG.pglog(rstr + ": Incomplete request control information", PgLOG.LGEREX)
|
|
706
726
|
|
|
727
|
+
if PVALS['iopts'] > 1: TSPLIT *= 2
|
|
728
|
+
if (PVALS['lats'][1] - PVALS['lats'][0]) > 90.0: TSPLIT *= 2
|
|
729
|
+
if (PVALS['lons'][1] - PVALS['lons'][0]) > 180.0: TSPLIT *= 2
|
|
730
|
+
|
|
707
731
|
#
|
|
708
732
|
# write a HTML readme file, and convert it to PDF format
|
|
709
733
|
#
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/R3.0-stat_doc.pdf
RENAMED
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/README_R3.0_Subset.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillinventory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg3.0_subset_readme.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_icoads-1.0.16 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|