rda-python-icoads 1.0.17__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.
Files changed (37) hide show
  1. {rda_python_icoads-1.0.17/src/rda_python_icoads.egg-info → rda_python_icoads-1.0.18}/PKG-INFO +1 -1
  2. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/pyproject.toml +1 -1
  3. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/imma1_subset.py +35 -11
  4. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18/src/rda_python_icoads.egg-info}/PKG-INFO +1 -1
  5. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/LICENSE +0 -0
  6. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/MANIFEST.in +0 -0
  7. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/README.md +0 -0
  8. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/setup.cfg +0 -0
  9. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/PgIMMA.py +0 -0
  10. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/R3.0-stat_doc.pdf +0 -0
  11. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/README_R3.0_Subset.html +0 -0
  12. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/__init__.py +0 -0
  13. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/checkicoads.py +0 -0
  14. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/cleanicoads.py +0 -0
  15. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countattm.py +0 -0
  16. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countattmvar.py +0 -0
  17. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/counticoads.py +0 -0
  18. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/countsst.py +0 -0
  19. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillicoads.py +0 -0
  20. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillinventory.py +0 -0
  21. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillitable.py +0 -0
  22. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fillmonth.py +0 -0
  23. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/fixiidx.py +0 -0
  24. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/maxsst.py +0 -0
  25. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg +0 -0
  26. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg3.0_subset_readme.txt +0 -0
  27. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg3_subset.py +0 -0
  28. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msg_download.py +0 -0
  29. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/msgsubset.f +0 -0
  30. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/rdimma1_csv.f +0 -0
  31. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads/writeicoads.py +0 -0
  32. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/SOURCES.txt +0 -0
  33. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/dependency_links.txt +0 -0
  34. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/entry_points.txt +0 -0
  35. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/requires.txt +0 -0
  36. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/src/rda_python_icoads.egg-info/top_level.txt +0 -0
  37. {rda_python_icoads-1.0.17 → rda_python_icoads-1.0.18}/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.17
3
+ Version: 1.0.18
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.17"
9
+ version = "1.0.18"
10
10
  authors = [
11
11
  { name="Zaihua Ji", email="zji@ucar.edu" },
12
12
  ]
@@ -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 = get_table_info(PVALS['dates'])
416
- for i in range(fcnt):
417
- bdate = PVALS['bdate'][i]
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
- pgrec = {}
421
- pgrec['data_format'] = 'ASCII'
422
- pgrec['disp_order'] = i+1
423
- pgrec['command'] = pgcmd + " -f -FI"
424
- pgrec['cmd_detail'] = "dates={} {}&tidx={}".format(bdate, edate, tidx)
425
- fname = "ICOADS_R3.0_Rqst{}_{}-{}.csv".format(ridx, bdate.replace('-', ''), edate.replace('-', ''))
426
- PgSubset.add_request_file(ridx, fname, pgrec, PgLOG.LGEREX)
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
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_icoads
3
- Version: 1.0.17
3
+ Version: 1.0.18
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