<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Colleagues<br>
<br>
I have a new question that is related to my original question.
Initially, I wanted to subset the large Global Fishing Watch dataset
into regional datasets, and then plot the unstructured station data
as fishing hours colored by their magnitude. Rick pointed me to the
gc_inout function, and Dennis wrote some code with nested loops to
do the subsetting and plotting at the same time.<br>
<br>
This was extremely helpful, but the loops were exceedingly slow
because there are over 250,000 points per region, so I sped up the
plots by doing the subsetting with a separate script before doing
the plotting. I also figured out how to use the new cmocean colour
tables. The data, code and figure produced are here:
<a class="moz-txt-link-rfc2396E" href="https://my.pcloud.com/publink/show?code=kZsanC7ZlKPCnfV5wnLFWm4C2yCww4mtUIYV"><https://my.pcloud.com/publink/show?code=kZsanC7ZlKPCnfV5wnLFWm4C2yCww4mtUIYV></a>.<br>
<br>
My new question is how to subset the data across the dateline (in
the New Zealand plot) when the longitude data run from -180:180? As
you can see from the plot, my plotted fishing hours data stops at
the dateline.<br>
<br>
To conveniently subset beyond 180 degrees, I tried this to convert
lon to 0:360, but I'm getting a variable unassigned error for lon:<br>
<br>
; test
************************************************<br>
lon(ind(lon.lt.0)) = -lon(ind(lon.lt.0)) + 180 <br>
print("%%%%%%%%%%%%%%%%%%%%%%%%") <br>
printVarSummary(lon)<br>
print("%%%%%%%%%%%%%%%%%%%%%%%%") <br>
; end test
**********************************************<br>
<br>
Using the reassignment operator (:=) does not fix the problem.<br>
<br>
Any hints would be most gratefully received.<br>
<br>
Best fishes<br>
Sam<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=windows-1252"
http-equiv="content-type">
<title>email signature</title>
Sam McClatchie (fisheries oceanographer)<br>
& Elena Turin (accounting & auditing)<br>
FishOcean Enterprises<br>
38 Upland Rd, Huia, Auckland 0604, New Zealand<br>
cell: 027 752 8495<br>
<span style="text-decoration: underline;"><a
href="http://www.fishocean.info">Internet</a></span><br>
<img style="width: 150px; height: 149px;" alt=""
src="cid:part2.4140896D.0130A986@fishocean.info"><br>
<br>
"The time has come", the tui said,<br>
"to talk of many things:<br>
Of songs - and ferns - and flowering flax,<br>
of Pukekos and dreams ..."<br>
<br>
(not Lewis Carroll)
</div>
</body>
</html>