rda-python-icoads 1.0.14__tar.gz → 1.0.15__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.

Potentially problematic release.


This version of rda-python-icoads might be problematic. Click here for more details.

Files changed (37) hide show
  1. {rda_python_icoads-1.0.14/src/rda_python_icoads.egg-info → rda_python_icoads-1.0.15}/PKG-INFO +1 -1
  2. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/pyproject.toml +1 -1
  3. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/PgIMMA.py +21 -15
  4. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/fillicoads.py +2 -2
  5. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15/src/rda_python_icoads.egg-info}/PKG-INFO +1 -1
  6. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/LICENSE +0 -0
  7. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/MANIFEST.in +0 -0
  8. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/README.md +0 -0
  9. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/setup.cfg +0 -0
  10. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/R3.0-stat_doc.pdf +0 -0
  11. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/README_R3.0_Subset.html +0 -0
  12. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/__init__.py +0 -0
  13. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/checkicoads.py +0 -0
  14. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/cleanicoads.py +0 -0
  15. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/countattm.py +0 -0
  16. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/countattmvar.py +0 -0
  17. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/counticoads.py +0 -0
  18. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/countsst.py +0 -0
  19. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/fillinventory.py +0 -0
  20. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/fillitable.py +0 -0
  21. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/fillmonth.py +0 -0
  22. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/fixiidx.py +0 -0
  23. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/imma1_subset.py +0 -0
  24. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/maxsst.py +0 -0
  25. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/msg +0 -0
  26. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/msg3.0_subset_readme.txt +0 -0
  27. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/msg3_subset.py +0 -0
  28. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/msg_download.py +0 -0
  29. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/msgsubset.f +0 -0
  30. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/rdimma1_csv.f +0 -0
  31. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads/writeicoads.py +0 -0
  32. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads.egg-info/SOURCES.txt +0 -0
  33. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads.egg-info/dependency_links.txt +0 -0
  34. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads.egg-info/entry_points.txt +0 -0
  35. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads.egg-info/requires.txt +0 -0
  36. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/src/rda_python_icoads.egg-info/top_level.txt +0 -0
  37. {rda_python_icoads-1.0.14 → rda_python_icoads-1.0.15}/tests/test_icoads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_icoads
3
- Version: 1.0.14
3
+ Version: 1.0.15
4
4
  Summary: RDA python package to manage RDA ICOADS datasets
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-icoads
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "rda_python_icoads"
9
- version = "1.0.14"
9
+ version = "1.0.15"
10
10
  authors = [
11
11
  { name="Zaihua Ji", email="zji@ucar.edu" },
12
12
  ]
@@ -454,7 +454,7 @@ def get_imma_records(cdate, line, records):
454
454
  aname = ATTI2NAME[line[offset:offset+2]]
455
455
  imma = IMMAS[aname]
456
456
  pgrec = get_one_attm(imma[3], offset, line)
457
- #48 if aname == 'iivad': pgrec['cdi'] = PgUtil.adddate('2014-01-01', 0, 0, I36(pgrec['cdi']), 'YYYMMDD')
457
+ #48 if aname == 'iivad': pgrec['cdi'] = PgUtil.adddate('2014-01-01', 0, 0, I36(pgrec['cdi']), 'YYYYMMDD')
458
458
  if aname not in records: records[aname] = initialize_attm_records(imma[3])
459
459
  if CURIUID:
460
460
  append_one_attm(cdate, imma[0], imma[3], pgrec, records[aname])
@@ -1115,27 +1115,33 @@ def get_imma_date(line):
1115
1115
  def get_itidx_date(uid):
1116
1116
 
1117
1117
  global CURIUID, CURIIDX, CURTIDX
1118
+ if CURRN3 < 0: PgLOG.pglog(f"{uid}: Provide a RN3 (>= 0) to proceed", PgLOG.LGEREX)
1118
1119
  uidx = uid[0:2].lower()
1119
1120
  suid = uid[2:6]
1120
1121
  table = f"{CNTLSC}.itidx_{uidx}"
1121
- cond = f"suid = '{suid}' AND rn3 = {CURRN3}"
1122
- pgrec = PgDBI.pgget(table, "*", cond, PgLOG.LGEREX)
1123
- if not pgrec:
1124
- msg = "{}-{}: suid-rn3 not in {}".format(suid, CURRN3, table)
1125
- if CURRN3 < 0:
1126
- PgLOG.pglog(msg + "\nProvide a RN3 (>= 0) to proceed", PgLOG.LGEREX)
1127
- else:
1128
- return PgLOG.pglog(msg + ", SKIP it", PgLOG.WARNLG)
1129
-
1122
+ cond = f"suid = '{suid}'"
1123
+ pgrecs = PgDBI.pgmget(table, "*", cond, PgLOG.LGEREX)
1124
+ ucnt = len(pgrecs['iidx']) if pgrecs else 0
1125
+ if ucnt == 0: return PgLOG.pglog(f"{uid}: not in table {table}, SKIP it", PgLOG.LOGWRN)
1126
+
1127
+ uidx = -1
1128
+ for i in range(ucnt):
1129
+ if pgrecs['rn3'][i] == CURRN3:
1130
+ uidx = i
1131
+ break
1132
+ if uidx == -1: return PgLOG.pglog(f"{uid}: not in table {table} for rn3({CURRN3}), SKIP it", PgLOG.LOGWRN)
1133
+
1134
+ iidx = pgrecs['iidx'][uidx]
1135
+ tidx = pgrecs['tidx'][uidx]
1130
1136
  if CHKEXIST: # check
1131
- table = f"{IVADSC}.{ATTMNAME}_{pgrec['tidx']}"
1132
- cnd = f"iidx = {pgrec['iidx']}"
1137
+ table = f"{IVADSC}.{ATTMNAME}_{tidx}"
1138
+ cnd = f"iidx = {iidx}"
1133
1139
  if PgDBI.pgget(table, "", cnd): return None
1134
1140
 
1135
1141
  CURIUID = uid
1136
- CURIIDX = pgrec['iidx']
1137
- CURTIDX = pgrec['tidx']
1138
- return pgrec['date']
1142
+ CURIIDX = iidx
1143
+ CURTIDX = tidx
1144
+ return pgrecs['date'][uidx]
1139
1145
 
1140
1146
  #
1141
1147
  # get record date for given year, month and day
@@ -132,7 +132,7 @@ def process_imma_file(fname, addinventory):
132
132
  PgIMMA.identify_attm_name(line) # check and record standalone attm name
133
133
  while line:
134
134
  idate = cdate = PgIMMA.get_imma_date(line)
135
- if cdate and (PVALS['dtlen'] == 0 or cdate >= PVALS['dates'][0]):
135
+ if cdate and (PVALS['dtlen'] == 0 or PgUtil.diffdate(cdate, PVALS['dates'][0]) >= 0):
136
136
  PgIMMA.init_indices_for_date(cdate, iname)
137
137
  records = PgIMMA.get_imma_records(cdate, line, records)
138
138
  break
@@ -150,7 +150,7 @@ def process_imma_file(fname, addinventory):
150
150
  for i in range(PgIMMA.TABLECOUNT): acounts[i] += acnts[i]
151
151
  records = {}
152
152
  cdate = idate
153
- if PVALS['dtlen'] == 2 and cdate > PVALS['dates'][1]: break
153
+ if PVALS['dtlen'] == 2 and PgUtil.diffdate(cdate, PVALS['dates'][1]) > 0: break
154
154
  PgIMMA.init_indices_for_date(cdate, iname)
155
155
  records = PgIMMA.get_imma_records(idate, line, records)
156
156
  line = IMMA.readline()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_icoads
3
- Version: 1.0.14
3
+ Version: 1.0.15
4
4
  Summary: RDA python package to manage RDA ICOADS datasets
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-icoads