Skip to content

Commit 60003f9

Browse files
committed
updates for ribbon plots of DSG trajectory data
1 parent fb7f6b4 commit 60003f9

File tree

6 files changed

+144
-121
lines changed

6 files changed

+144
-121
lines changed

bench/test_results/ferret_run_tests_rh6_log

+111-107
Large diffs are not rendered by default.

fer/plt/dsg_traj_plot_set_up.F

+7-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ SUBROUTINE DSG_TRAJ_PLOT_SET_UP(
6262
* V760 *acm* 4/20 PLOT_DSG_CHECK_LON360 now applies a lon-360 conversion of the
6363
* longitudes if it'll be better and /HLIM not given
6464
* V760 *acm* 5/20 initialize dep_dim. Was unset when we get latitude from the DSG dataset
65+
* V762 *acm* 8/20 Add a second test for is this a trajectory ribbon plot.
6566

6667
include 'tmap_dims.parm'
6768
include 'xtm_grid.cmn_text'
@@ -271,7 +272,7 @@ SUBROUTINE DSG_TRAJ_PLOT_SET_UP(
271272
. status)
272273
IF (npts .NE. obsdimlen) THEN
273274
status = 0
274-
GOTO 5140
275+
GOTO 4000
275276
ENDIF
276277
numcx = 1 ! The context should come from the color-by var
277278
CALL GRP_CX_DOC( cx_list(nmv), numcx, cx_plot, key_doc )
@@ -446,7 +447,7 @@ SUBROUTINE DSG_TRAJ_PLOT_SET_UP(
446447
. status )
447448
IF (npts .NE. obsdimlen) THEN
448449
status = 0
449-
GOTO 5140
450+
GOTO 4000
450451
ENDIF
451452
ENDIF
452453

@@ -784,6 +785,10 @@ SUBROUTINE DSG_TRAJ_PLOT_SET_UP(
784785
status = ferr_ok
785786
IF (overlay) iautot = iautot_save
786787
RETURN
788+
789+
* not trajectory after all, will just do a ribbon-plot.
790+
791+
4000 RETURN
787792

788793
* error exit
789794
5000 CALL PPLCMD ( from, line, 0, 'NLINES', 1, 1 ) ! wipe buffers clean

fer/plt/plot_set_up.F

+4-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ SUBROUTINE PLOT_SET_UP(
231231
* such as"go fland" will work. (DSG and non-DSG data.)
232232
* V760 *acm* 4/20 Similarly, if PLOT/VS and a depth coord var is on the vertical
233233
* axis, reverse the axis to run DEEP:SHALLOW
234-
234+
* V762 *acm* 8/20 Add a second test for is this a trajectory ribbon plot.
235235

236236
IMPLICIT NONE
237237
include 'tmap_dims.parm'
@@ -419,6 +419,7 @@ SUBROUTINE PLOT_SET_UP(
419419
. overlay, no_labels, symbol, sym_size, color, color1,
420420
. use_line, do_dash, dashstyle, nokey, its_traj, only_val,
421421
. skipsym, mv_list, cx_list, numv, indep_dat, dep_dat, status )
422+
IF (numv.EQ.3 .AND. status.NE.ferr_ok) GOTO 2000 ! not traj after all, just a ribbon plot
422423
GOTO 1000
423424
ENDIF
424425
@@ -430,6 +431,8 @@ SUBROUTINE PLOT_SET_UP(
430431
431432
* initialize
432433
434+
2000 CONTINUE
435+
433436
dep_max = arbitrary_small_val8
434437
dep_min = arbitrary_large_val8
435438
ind_max = arbitrary_small_val8

fmt/src/cd_dsg_scan_vars.F

+14-8
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ SUBROUTINE CD_DSG_SCAN_VARS(dset, cdfid, errstr, status)
209209
. orient .EQ. pfeatureType_TimeseriesProfile)
210210

211211
IF (cmpnd_ftype) THEN
212+
ftrname = CD_DSG_FEATURENAME ( orient )
212213
i = MAX(INDEX(ftrname, 'Profile'), INDEX(ftrname, 'profile'))
213214
index_dir_buff = ftrname(:i-1)//'_id'
215+
216+
IF (redo_lonlat) ftrname = CD_DSG_FEATURENAME (dsg_orientation(dset))
217+
214218
ENDIF
215219

216220
* First find probable coordinate variabes - if the axis attribute is
@@ -626,14 +630,6 @@ SUBROUTINE CD_DSG_SCAN_VARS(dset, cdfid, errstr, status)
626630
has_DSG_coordinates = (ndims .EQ. 4)
627631
ENDIF
628632

629-
* If this is a timeseriesProfile dataset, then the X-Y coordinates are in
630-
* the timeseries instance-dimension direction. Use the station index variable
631-
* to redefine the dsg-coordiate variables for the translation grid to list these
632-
* coordinates in the profile dimension. The test when orient is profile is
633-
* for the case when the user has said USE/feature=profile for a TimeseriesProfile set.
634-
635-
IF (redo_lonlat) CALL CD_DSG_TP_TO_PROF (dset)
636-
637633
* A valid DSG contiguous ragged dataset must have a rowSize variable
638634
* and coordinates on the dsg_orientation axis. If they erroneously set
639635
* the /FEATURETYPE to an invalid direction, that's an error. Otherwise
@@ -794,6 +790,16 @@ SUBROUTINE CD_DSG_SCAN_VARS(dset, cdfid, errstr, status)
794790
ENDIF
795791

796792
ENDIF
793+
794+
795+
* If this is a timeseriesProfile dataset, then the X-Y coordinates are in
796+
* the timeseries instance-dimension direction. Use the station index variable
797+
* to redefine the dsg-coordiate variables for the translation grid to list these
798+
* coordinates in the profile dimension. The test when orient is profile is
799+
* for the case when the user has said USE/feature=profile for a TimeseriesProfile set.
800+
801+
IF (redo_lonlat) CALL CD_DSG_TP_TO_PROF (dset)
802+
797803

798804
* * * * * * * * * * * * * * * * * * * * * * * * *
799805
* pass through the variable names making sure that case-sensitive

ppl/plot/plotxy.F

+5-2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ SUBROUTINE PLOTXY(X,NXS,XF,YF,IPV)
6868
* V698 4/16 *acm* New PLOT/SKIP=
6969
* V73 3/18 *kms* For clarity, append MD to makedot.cmn values IPT, XDOT,
7070
* and YDOT; make MDOT (99) a makedot.cmn parameter DOTSYMIM
71+
* V762 8/20 *acm* Don't draw outside plot edges when doing modulo correction.
7172

7273
include 'xinterrupt.cmn' ! 1/89 *sh*
7374
include 'ppl_in_ferret.cmn'
@@ -316,8 +317,10 @@ SUBROUTINE PLOTXY(X,NXS,XF,YF,IPV)
316317
* the new point on new wrap, then go on.
317318
IF (xadd .NE. xaddlast) THEN
318319
datxlast = datx - xadd + xaddlast
319-
CALL TRANS(I,datxlast,daty,XT,YT)
320-
CALL PLOT(xt,yt,idn,0)
320+
IF (datxlast.LT.xhi .AND. datxlast.GT.xlo) THEN
321+
CALL TRANS(I,datxlast,daty,XT,YT)
322+
CALL PLOT(xt,yt,idn,0)
323+
ENDIF
321324
CALL TRANS(I,datx,daty,XT,YT)
322325
CALL PLOT(XT,YT,0,0)
323326
CALL PLOT(XT,YT,IDN,0)

ppl/plot/plotxy_ribbon.F

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ SUBROUTINE PLOTXY_RIBBON(X,NXS,XF,YF)
7272
* V698 4/16 *acm* New PLOT/NTH=
7373
* V73 3/18 *kms* For clarity, append MD to makedot.cmn values IPT, XDOT,
7474
* and YDOT; make MDOT (99) a makedot.cmn parameter DOTSYMIM
75+
* V762 8/20 *acm* Don't draw outside plot edges when doing modulo correction.
7576

7677
include 'xinterrupt.cmn' ! 1/89 *sh*
7778
include 'ppl_in_ferret.cmn'
@@ -363,14 +364,15 @@ SUBROUTINE PLOTXY_RIBBON(X,NXS,XF,YF)
363364

364365
IF (line_ndx .LT. 1) line_ndx = 1
365366

366-
IF ( colr_ndx.NE.last_colr_ndx) THEN
367+
IF ( colr_ndx.NE.last_colr_ndx ) THEN
367368

368369
* In default (not fast) mode, draw sub-segments filling in all the colors
369370
* corresponding to the index range between the color at this point and the
370371
* color at the previous point.
371372

372373
IF (.NOT.RIBBON_FAST .AND.
373374
. .NOT.isbad .AND. .NOT.last_bad .AND.
375+
. last_colr_ndx.GT.0 .AND.
374376
. ABS(colr_ndx-last_colr_ndx) .GT. 1 .AND.
375377
. (.NOT.new_branch) .AND. ITYPE(I).NE.3) THEN
376378

0 commit comments

Comments
 (0)