Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible new haul-level fields #76

Open
sgaichas opened this issue Dec 9, 2024 · 4 comments
Open

possible new haul-level fields #76

sgaichas opened this issue Dec 9, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@sgaichas
Copy link
Member

sgaichas commented Dec 9, 2024

Could be useful to add tow-level fields optionally:

month of tow
day of tow

tow distance
wing spread

@Laurels1 please add others

@sgaichas sgaichas added the enhancement New feature or request label Dec 9, 2024
@Laurels1
Copy link

Laurels1 commented Dec 9, 2024

Door spread would be great. I can get you the column names and tables if that's helpful. Thanks!

@sgaichas
Copy link
Member Author

sgaichas commented Dec 9, 2024

Yes column names and tables would be great, we can put them all in here and add as necessary

@andybeet
Copy link
Member

I think the door/wing spread are embedded in an "operation_code" with values 1 - 4, where each operation_code value has a range of values relating to wing/door spread. Let me know if you are aware of something different.

@Laurels1
Copy link

I believe the values you're referring to are whether the tow meets thresholds to classify it as a "good tow". What I needed to include in my last data request were salinity, depth, tow duration, distance traveled and values from net mensuration gear (only available since 2009) from svdbs.TOW_EVALUATION. Example code:
"select b.cruise6,b.stratum,b.tow,b.station,
s.est_year year,season, est_month month,est_day day,
substr(est_time,1,2)||substr(est_time,4,2) time,
round(substr(beglat,1,2) + (substr(beglat,3,7)/60),6) beglat,
round(substr(endlat,1,2) + (substr(endlat,3,7)/60),6) endlat,
round(((substr(beglon,1,2) + (substr(beglon,3,7)/60)) * -1), 6) beglon,
round(((substr(endlon,1,2) + (substr(endlon,3,7)/60)) * -1), 6) endlon,
towdur, setdepth, enddepth, mindepth, maxdepth, avgdepth,
surftemp, bottemp, surfsalin, botsalin,
b.svspp, b.catchsex, expcatchwt, expcatchnum, length, expnumlen, s.svvessel, dopdistb,
MEAN_SOG_KNOTS, MEAN_DOOR_SPRD_METERS, MEAN_WING_SPRD_METERS, MEAN_HEIGHT_METERS,
AREA_SWEPT_DOORS_MEAN_KM2, AREA_SWEPT_WINGS_MEAN_KM2

from svdbs.UNION_FSCS_SVLEN b, svdbs.UNION_FSCS_SVCAT p, svdbs.UNION_FSCS_SVSTA s, svdbs.mstr_cruise c, svdbs.TOW_EVALUATION e
where
(b.cruise6=s.cruise6) and
(c.cruise6=b.cruise6) and
(p.cruise6=c.cruise6) and
(e.cruise6=s.cruise6) and
(p.stratum=b.stratum) and
(b.stratum=s.stratum) and
(p.station=b.station) and
(b.station=s.station) and
(e.station=s.station) and
(p.tow=b.tow) and
(b.tow=s.tow) and
(c.svvessel=s.svvessel) and
(p.svspp=b.svspp) and
(p.catchsex=b.catchsex) and
year >=1963 and
purpose_code = 10 and
(TOGA <= 1324 and p.cruise6 > 200900)
order by year, cruise6, station, svspp, catchsex, length "

And pre-2010:
"select b.cruise6,b.stratum,b.tow,b.station,
s.est_year year,season, est_month month,est_day day,
substr(est_time,1,2)||substr(est_time,4,2) time,
round(substr(beglat,1,2) + (substr(beglat,3,7)/60),6) beglat,
round(substr(endlat,1,2) + (substr(endlat,3,7)/60),6) endlat,
round(((substr(beglon,1,2) + (substr(beglon,3,7)/60)) * -1), 6) beglon,
round(((substr(endlon,1,2) + (substr(endlon,3,7)/60)) * -1), 6) endlon,
towdur, setdepth, enddepth, mindepth, maxdepth, avgdepth,
surftemp, bottemp, surfsalin, botsalin,
b.svspp, b.catchsex, expcatchwt, expcatchnum, length, expnumlen, s.svvessel, dopdistb

from svdbs.UNION_FSCS_SVLEN b, svdbs.UNION_FSCS_SVCAT p, svdbs.UNION_FSCS_SVSTA s, svdbs.mstr_cruise c
where
(b.cruise6=s.cruise6) and
(c.cruise6=b.cruise6) and
(p.cruise6=c.cruise6) and
(p.stratum=b.stratum) and
(b.stratum=s.stratum) and
(p.station=b.station) and
(b.station=s.station) and
(p.tow=b.tow) and
(b.tow=s.tow) and
(c.svvessel=s.svvessel) and
(p.svspp=b.svspp) and
(p.catchsex=b.catchsex) and
year >=1963 and
purpose_code = 10 and
(SHG <= 136 and p.cruise6 <= 200900)
order by year, cruise6, station, svspp, catchsex, length "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants