From bf1b49a8f5624918e0b91353d08fb3ca638e190a Mon Sep 17 00:00:00 2001 From: vbartolino Date: Sat, 23 May 2026 10:15:00 +0200 Subject: [PATCH] harmonise import hydrography with CopernicusMarine and stars --- vignettes/hydroVar.txt | 709 ------------------------- vignettes/ices.rect.sea.txt | 60 --- vignettes/import_hydrography_cmems.Rmd | 53 +- 3 files changed, 19 insertions(+), 803 deletions(-) delete mode 100644 vignettes/hydroVar.txt delete mode 100644 vignettes/ices.rect.sea.txt diff --git a/vignettes/hydroVar.txt b/vignettes/hydroVar.txt deleted file mode 100644 index 7c15bc9..0000000 --- a/vignettes/hydroVar.txt +++ /dev/null @@ -1,709 +0,0 @@ -"rect" "month" "sob" "year" -"1" "38G7" 1 4.14668845628917 2018 -"2" "39G7" 1 5.95174610040806 2018 -"3" "40G7" 1 4.98104584437829 2018 -"4" "41G7" 1 5.04309182122902 2018 -"5" "42G7" 1 5.35343404699255 2018 -"6" "43G7" 1 5.27969861693487 2018 -"7" "44G7" 1 5.62229303033264 2018 -"8" "45G7" 1 5.31781619958462 2018 -"9" "46G7" 1 5.03313420878516 2018 -"10" "37G8" 1 5.7865211735601 2018 -"11" "38G8" 1 5.12739385873784 2018 -"12" "39G8" 1 5.97156739234924 2018 -"13" "40G8" 1 5.80561786139453 2018 -"14" "41G8" 1 5.6039805955357 2018 -"15" "42G8" 1 5.20416697289805 2018 -"16" "43G8" 1 4.31547273620714 2018 -"17" "44G8" 1 5.17589342420541 2018 -"18" "45G8" 1 5.73929514046069 2018 -"19" "46G8" 1 6.02339488930172 2018 -"20" "37G9" 1 4.25825389940962 2018 -"21" "38G9" 1 5.95263484829399 2018 -"22" "39G9" 1 6.5751997978599 2018 -"23" "40G9" 1 6.61811610681039 2018 -"24" "41G9" 1 6.3199351200351 2018 -"25" "42G9" 1 6.74850422894513 2018 -"26" "43G9" 1 6.50441935548076 2018 -"27" "44G9" 1 5.68855268669036 2018 -"28" "45G9" 1 5.9861635379004 2018 -"29" "46G9" 1 5.92103340890672 2018 -"30" "38H0" 1 2.00248085831602 2018 -"31" "39H0" 1 5.24172680232047 2018 -"32" "40H0" 1 6.06112506014329 2018 -"33" "41H0" 1 5.00803935728528 2018 -"34" "42H0" 1 5.60893368279492 2018 -"35" "43H0" 1 6.1791129037186 2018 -"36" "44H0" 1 6.38322228369889 2018 -"37" "45H0" 1 6.07181616094377 2018 -"38" "46H0" 1 6.02384604348077 2018 -"39" "38H1" 1 0.688776317362984 2018 -"40" "39H1" 1 1.17258338242018 2018 -"41" "40H1" 1 2.89199440220128 2018 -"42" "41H1" 1 2.26428589820862 2018 -"43" "42H1" 1 2.81753908225468 2018 -"44" "43H1" 1 4.02555727628198 2018 -"45" "44H1" 1 4.52637549679855 2018 -"46" "45H1" 1 4.40332137270607 2018 -"47" "46H1" 1 5.02055956016887 2018 -"48" "43H2" 1 2.4584443512417 2018 -"49" "44H2" 1 2.67339184580736 2018 -"50" "45H2" 1 1.54540872368692 2018 -"51" "46H2" 1 2.6028229445219 2018 -"52" "42H3" 1 3.20660232242785 2018 -"53" "43H3" 1 3.53170009794946 2018 -"54" "44H3" 1 3.19267816725274 2018 -"55" "45H3" 1 2.00658301462837 2018 -"56" "46H3" 1 0.787868539492289 2018 -"57" "43H4" 1 3.17400220825665 2018 -"58" "44H4" 1 2.52529337828232 2018 -"59" "45H4" 1 0.762257409909359 2018 -"60" "38G7" 2 3.14715776115257 2018 -"61" "39G7" 2 5.85262783655414 2018 -"62" "40G7" 2 4.60621813513615 2018 -"63" "41G7" 2 4.51837662325965 2018 -"64" "42G7" 2 5.12577909451944 2018 -"65" "43G7" 2 4.59086236943449 2018 -"66" "44G7" 2 5.32969361565731 2018 -"67" "45G7" 2 4.60732635852913 2018 -"68" "46G7" 2 3.7755410472552 2018 -"69" "37G8" 2 4.1000169629636 2018 -"70" "38G8" 2 4.46528780198836 2018 -"71" "39G8" 2 6.36335622160523 2018 -"72" "40G8" 2 6.032925996957 2018 -"73" "41G8" 2 5.23218787908554 2018 -"74" "42G8" 2 4.39266102751814 2018 -"75" "43G8" 2 3.09696663746666 2018 -"76" "44G8" 2 4.81151530402185 2018 -"77" "45G8" 2 5.73604953156577 2018 -"78" "46G8" 2 6.02754717402988 2018 -"79" "37G9" 2 2.9993987452748 2018 -"80" "38G9" 2 5.16398123911504 2018 -"81" "39G9" 2 6.11297911758776 2018 -"82" "40G9" 2 6.0708289914661 2018 -"83" "41G9" 2 6.09125737216738 2018 -"84" "42G9" 2 6.68735670734335 2018 -"85" "43G9" 2 6.2321486334006 2018 -"86" "44G9" 2 5.11785978642504 2018 -"87" "45G9" 2 5.70958783657868 2018 -"88" "46G9" 2 5.59390540917714 2018 -"89" "38H0" 2 1.28737918694969 2018 -"90" "39H0" 2 4.07791152638726 2018 -"91" "40H0" 2 5.26478562995239 2018 -"92" "41H0" 2 3.85753593512291 2018 -"93" "42H0" 2 4.86704028535772 2018 -"94" "43H0" 2 5.69483582531964 2018 -"95" "44H0" 2 5.91208242244191 2018 -"96" "45H0" 2 5.81443064610163 2018 -"97" "46H0" 2 5.87358052200741 2018 -"98" "38H1" 2 0.273972303451349 2018 -"99" "39H1" 2 0.420025485888624 2018 -"100" "40H1" 2 1.97266931770288 2018 -"101" "41H1" 2 1.44794448912144 2018 -"102" "42H1" 2 1.68253216346105 2018 -"103" "43H1" 2 2.79086493510421 2018 -"104" "44H1" 2 3.29708647908542 2018 -"105" "45H1" 2 3.4937834564304 2018 -"106" "46H1" 2 4.70432728890217 2018 -"107" "43H2" 2 0.908230753881591 2018 -"108" "44H2" 2 1.14745132155698 2018 -"109" "45H2" 2 0.22673547079581 2018 -"110" "46H2" 2 1.96684962534346 2018 -"111" "42H3" 2 1.49329370887656 2018 -"112" "43H3" 2 2.13380119331921 2018 -"113" "44H3" 2 1.76175529061086 2018 -"114" "45H3" 2 0.715310052952021 2018 -"115" "46H3" 2 -0.125007688430034 2018 -"116" "43H4" 2 1.8716336157941 2018 -"117" "44H4" 2 1.49112898797544 2018 -"118" "45H4" 2 0.35919141095893 2018 -"119" "38G7" 3 2.73655188015269 2018 -"120" "39G7" 3 5.21977111940031 2018 -"121" "40G7" 3 3.13506283914601 2018 -"122" "41G7" 3 2.79161085729246 2018 -"123" "42G7" 3 3.80065208828008 2018 -"124" "43G7" 3 3.67308049045382 2018 -"125" "44G7" 3 5.32412537733714 2018 -"126" "45G7" 3 4.26701646691069 2018 -"127" "46G7" 3 3.07335399546557 2018 -"128" "37G8" 3 3.10003658999567 2018 -"129" "38G8" 3 4.29792284650498 2018 -"130" "39G8" 3 6.26192916653774 2018 -"131" "40G8" 3 5.77804684285764 2018 -"132" "41G8" 3 4.26747145454089 2018 -"133" "42G8" 3 2.90854477644194 2018 -"134" "43G8" 3 1.9332933860479 2018 -"135" "44G8" 3 4.38270052949202 2018 -"136" "45G8" 3 5.75936738385094 2018 -"137" "46G8" 3 5.96031280358632 2018 -"138" "37G9" 3 2.80430914027442 2018 -"139" "38G9" 3 5.06408238756818 2018 -"140" "39G9" 3 5.90128391981125 2018 -"141" "40G9" 3 5.921780053333 2018 -"142" "41G9" 3 5.80336180263095 2018 -"143" "42G9" 3 6.54262686173121 2018 -"144" "43G9" 3 6.0812239880915 2018 -"145" "44G9" 3 4.61643515003616 2018 -"146" "45G9" 3 5.21130098522716 2018 -"147" "46G9" 3 5.16108008888033 2018 -"148" "38H0" 3 1.23292355774902 2018 -"149" "39H0" 3 3.49437142404356 2018 -"150" "40H0" 3 4.47498411801126 2018 -"151" "41H0" 3 3.56406614516136 2018 -"152" "42H0" 3 4.52424047627935 2018 -"153" "43H0" 3 5.53734109412741 2018 -"154" "44H0" 3 5.90484024672597 2018 -"155" "45H0" 3 5.75656288354485 2018 -"156" "46H0" 3 5.82824166615804 2018 -"157" "38H1" 3 0.533402454728881 2018 -"158" "39H1" 3 0.592202551099433 2018 -"159" "40H1" 3 1.89651600977649 2018 -"160" "41H1" 3 1.07250846922398 2018 -"161" "42H1" 3 1.2213421021189 2018 -"162" "43H1" 3 2.61253083271555 2018 -"163" "44H1" 3 2.86694033630376 2018 -"164" "45H1" 3 3.31557622528815 2018 -"165" "46H1" 3 4.6142478278189 2018 -"166" "43H2" 3 -0.0540964836254716 2018 -"167" "44H2" 3 0.237165832900908 2018 -"168" "45H2" 3 0.0794571938167189 2018 -"169" "46H2" 3 1.34581789979711 2018 -"170" "42H3" 3 0.381077594662967 2018 -"171" "43H3" 3 1.00116821535808 2018 -"172" "44H3" 3 1.12255268574318 2018 -"173" "45H3" 3 -0.086341200432025 2018 -"174" "46H3" 3 -0.160797763615847 2018 -"175" "43H4" 3 1.08201004364716 2018 -"176" "44H4" 3 0.998094627462244 2018 -"177" "45H4" 3 0.163943952774402 2018 -"178" "38G7" 4 3.48559626065066 2018 -"179" "39G7" 4 4.3323570171992 2018 -"180" "40G7" 4 3.30545502305031 2018 -"181" "41G7" 4 2.85878635181321 2018 -"182" "42G7" 4 4.23678083353572 2018 -"183" "43G7" 4 4.30081309842469 2018 -"184" "44G7" 4 5.44136861231592 2018 -"185" "45G7" 4 4.5156600589107 2018 -"186" "46G7" 4 3.56524003545443 2018 -"187" "37G8" 4 3.52886990464252 2018 -"188" "38G8" 4 4.51891432087014 2018 -"189" "39G8" 4 5.3599930955304 2018 -"190" "40G8" 4 5.3556305874277 2018 -"191" "41G8" 4 4.53546881190053 2018 -"192" "42G8" 4 3.45390430458606 2018 -"193" "43G8" 4 3.41095080144429 2018 -"194" "44G8" 4 4.81768496136835 2018 -"195" "45G8" 4 5.66086999751903 2018 -"196" "46G8" 4 5.92408789528741 2018 -"197" "37G9" 4 5.854383199335 2018 -"198" "38G9" 4 5.26730800182261 2018 -"199" "39G9" 4 5.75727130373319 2018 -"200" "40G9" 4 5.72455982455501 2018 -"201" "41G9" 4 5.78376716000062 2018 -"202" "42G9" 4 6.4791973511378 2018 -"203" "43G9" 4 6.02236275408003 2018 -"204" "44G9" 4 4.62641229195609 2018 -"205" "45G9" 4 5.10341675710947 2018 -"206" "46G9" 4 4.98857261737188 2018 -"207" "38H0" 4 6.98905075589816 2018 -"208" "39H0" 4 3.99119981272685 2018 -"209" "40H0" 4 3.60659423338042 2018 -"210" "41H0" 4 3.12843512027926 2018 -"211" "42H0" 4 4.42775499158435 2018 -"212" "43H0" 4 5.30779131054878 2018 -"213" "44H0" 4 5.65691157733953 2018 -"214" "45H0" 4 5.60436429867038 2018 -"215" "46H0" 4 5.84787940979004 2018 -"216" "38H1" 4 8.15691607197126 2018 -"217" "39H1" 4 6.9541311774935 2018 -"218" "40H1" 4 4.67821826727494 2018 -"219" "41H1" 4 4.36846587657928 2018 -"220" "42H1" 4 3.80913576171512 2018 -"221" "43H1" 4 3.36201918384816 2018 -"222" "44H1" 4 3.33856462939032 2018 -"223" "45H1" 4 3.58886955551399 2018 -"224" "46H1" 4 4.9288969039917 2018 -"225" "43H2" 4 1.76771228937876 2018 -"226" "44H2" 4 1.54767084503593 2018 -"227" "45H2" 4 2.49678888540584 2018 -"228" "46H2" 4 2.82073032855988 2018 -"229" "42H3" 4 2.67019355297089 2018 -"230" "43H3" 4 1.35244003389005 2018 -"231" "44H3" 4 1.2929904015811 2018 -"232" "45H3" 4 1.77326339412149 2018 -"233" "46H3" 4 3.88529425197177 2018 -"234" "43H4" 4 2.25408465357213 2018 -"235" "44H4" 4 2.34331289342212 2018 -"236" "45H4" 4 3.25474970489298 2018 -"237" "38G7" 5 4.95584410645538 2018 -"238" "39G7" 5 4.56504486269421 2018 -"239" "40G7" 5 4.30739349568332 2018 -"240" "41G7" 5 3.81027943778921 2018 -"241" "42G7" 5 4.33204543038651 2018 -"242" "43G7" 5 4.93778863460654 2018 -"243" "44G7" 5 5.31289390215167 2018 -"244" "45G7" 5 5.06548216057884 2018 -"245" "46G7" 5 4.74610744582282 2018 -"246" "37G8" 5 7.24731241723766 2018 -"247" "38G8" 5 5.86085271636369 2018 -"248" "39G8" 5 4.88825176336147 2018 -"249" "40G8" 5 5.30241499013371 2018 -"250" "41G8" 5 4.98085737603682 2018 -"251" "42G8" 5 5.31074555843473 2018 -"252" "43G8" 5 7.37038580151306 2018 -"253" "44G8" 5 5.72819411638871 2018 -"254" "45G8" 5 5.58558628029293 2018 -"255" "46G8" 5 5.98350587156084 2018 -"256" "37G9" 5 9.80450623155498 2018 -"257" "38G9" 5 6.18918033218015 2018 -"258" "39G9" 5 5.75423953246187 2018 -"259" "40G9" 5 5.41919576967204 2018 -"260" "41G9" 5 5.59964036963604 2018 -"261" "42G9" 5 6.70994135053069 2018 -"262" "43G9" 5 6.14738391483272 2018 -"263" "44G9" 5 5.36903774311328 2018 -"264" "45G9" 5 5.30675946749174 2018 -"265" "46G9" 5 4.93879648711946 2018 -"266" "38H0" 5 14.3139861474435 2018 -"267" "39H0" 5 5.66719113045244 2018 -"268" "40H0" 5 4.02867953402025 2018 -"269" "41H0" 5 4.57776479011835 2018 -"270" "42H0" 5 5.05598388159717 2018 -"271" "43H0" 5 5.56503778298696 2018 -"272" "44H0" 5 5.85818897220823 2018 -"273" "45H0" 5 5.53234733674261 2018 -"274" "46H0" 5 5.73105194833544 2018 -"275" "38H1" 5 18.2215254704158 2018 -"276" "39H1" 5 16.0214136889001 2018 -"277" "40H1" 5 8.75911992529164 2018 -"278" "41H1" 5 8.36545627117157 2018 -"279" "42H1" 5 7.07515207926432 2018 -"280" "43H1" 5 4.9532546605214 2018 -"281" "44H1" 5 4.64150403168401 2018 -"282" "45H1" 5 4.65746867079143 2018 -"283" "46H1" 5 5.71581587646947 2018 -"284" "43H2" 5 5.31631219954718 2018 -"285" "44H2" 5 5.28017810211709 2018 -"286" "45H2" 5 9.41519795046583 2018 -"287" "46H2" 5 6.6740757226944 2018 -"288" "42H3" 5 7.2141876722637 2018 -"289" "43H3" 5 2.57816436732058 2018 -"290" "44H3" 5 2.54879620394299 2018 -"291" "45H3" 5 6.03641083157761 2018 -"292" "46H3" 5 12.6886444091797 2018 -"293" "43H4" 5 3.761365000704 2018 -"294" "44H4" 5 4.51871945349698 2018 -"295" "45H4" 5 10.6903034565357 2018 -"296" "38G7" 6 8.09455232456127 2018 -"297" "39G7" 6 4.84311409460174 2018 -"298" "40G7" 6 5.08828795883391 2018 -"299" "41G7" 6 4.59755631994318 2018 -"300" "42G7" 6 4.50346064876627 2018 -"301" "43G7" 6 5.50692545327564 2018 -"302" "44G7" 6 5.44621890187264 2018 -"303" "45G7" 6 5.56250784615878 2018 -"304" "46G7" 6 5.47817195124096 2018 -"305" "37G8" 6 11.6520866642828 2018 -"306" "38G8" 6 7.93622196765205 2018 -"307" "39G8" 6 4.7779750653991 2018 -"308" "40G8" 6 4.9310595870018 2018 -"309" "41G8" 6 5.27446532977952 2018 -"310" "42G8" 6 6.1687790317608 2018 -"311" "43G8" 6 9.38690573076739 2018 -"312" "44G8" 6 6.40191916354652 2018 -"313" "45G8" 6 5.6431953770143 2018 -"314" "46G8" 6 5.97172670894199 2018 -"315" "37G9" 6 12.2512382311787 2018 -"316" "38G9" 6 7.42004652549035 2018 -"317" "39G9" 6 5.65147714857702 2018 -"318" "40G9" 6 4.98881551402587 2018 -"319" "41G9" 6 5.3589261410413 2018 -"320" "42G9" 6 6.68447321565063 2018 -"321" "43G9" 6 6.19868299475423 2018 -"322" "44G9" 6 6.20225828199396 2018 -"323" "45G9" 6 5.86907675789624 2018 -"324" "46G9" 6 5.13522379265891 2018 -"325" "38H0" 6 18.2405134389798 2018 -"326" "39H0" 6 7.80426836487026 2018 -"327" "40H0" 6 4.81352889515736 2018 -"328" "41H0" 6 5.8509599422048 2018 -"329" "42H0" 6 5.57612897974473 2018 -"330" "43H0" 6 5.70588867311124 2018 -"331" "44H0" 6 5.79992589862258 2018 -"332" "45H0" 6 5.58427971932623 2018 -"333" "46H0" 6 5.7288015683492 2018 -"334" "38H1" 6 20.8680422703425 2018 -"335" "39H1" 6 19.0772721306617 2018 -"336" "40H1" 6 12.8833233460136 2018 -"337" "41H1" 6 13.6333763599396 2018 -"338" "42H1" 6 11.9615471249535 2018 -"339" "43H1" 6 7.46575392732526 2018 -"340" "44H1" 6 6.83756204943352 2018 -"341" "45H1" 6 6.31181031165197 2018 -"342" "46H1" 6 6.89669937075991 2018 -"343" "43H2" 6 12.0705275989714 2018 -"344" "44H2" 6 8.011840698108 2018 -"345" "45H2" 6 11.2846705967842 2018 -"346" "46H2" 6 10.5908294916153 2018 -"347" "42H3" 6 15.1975229664853 2018 -"348" "43H3" 6 4.5571880974296 2018 -"349" "44H3" 6 4.47738786119289 2018 -"350" "45H3" 6 8.47362224424739 2018 -"351" "46H3" 6 15.7702147165934 2018 -"352" "43H4" 6 6.92715216091489 2018 -"353" "44H4" 6 7.53352345972497 2018 -"354" "45H4" 6 14.0534085802933 2018 -"355" "38G7" 7 9.14047057405257 2018 -"356" "39G7" 7 5.21112468728313 2018 -"357" "40G7" 7 5.77434524341866 2018 -"358" "41G7" 7 5.45859154970558 2018 -"359" "42G7" 7 4.64715483122402 2018 -"360" "43G7" 7 6.29987755352104 2018 -"361" "44G7" 7 5.34403067959679 2018 -"362" "45G7" 7 6.33967597027196 2018 -"363" "46G7" 7 7.37475095854865 2018 -"364" "37G8" 7 14.045188907955 2018 -"365" "38G8" 7 8.39772997479445 2018 -"366" "39G8" 7 5.04771229602672 2018 -"367" "40G8" 7 4.91522744540815 2018 -"368" "41G8" 7 5.6303746426547 2018 -"369" "42G8" 7 8.26673145979274 2018 -"370" "43G8" 7 13.1510767669582 2018 -"371" "44G8" 7 7.28550560999071 2018 -"372" "45G8" 7 5.63902614646488 2018 -"373" "46G8" 7 5.98709909121196 2018 -"374" "37G9" 7 13.3123457980671 2018 -"375" "38G9" 7 7.97115291894289 2018 -"376" "39G9" 7 5.8280686462367 2018 -"377" "40G9" 7 4.75287990879129 2018 -"378" "41G9" 7 5.16244097749392 2018 -"379" "42G9" 7 6.64293652331388 2018 -"380" "43G9" 7 6.28397980729739 2018 -"381" "44G9" 7 6.72630363581603 2018 -"382" "45G9" 7 5.94968287604835 2018 -"383" "46G9" 7 5.24638944201999 2018 -"384" "38H0" 7 19.9170536796252 2018 -"385" "39H0" 7 8.51256912552341 2018 -"386" "40H0" 7 4.65019360891095 2018 -"387" "41H0" 7 5.30069270615716 2018 -"388" "42H0" 7 5.42420459698748 2018 -"389" "43H0" 7 5.80185367398792 2018 -"390" "44H0" 7 5.99350159543532 2018 -"391" "45H0" 7 5.67682890737498 2018 -"392" "46H0" 7 5.61539073785146 2018 -"393" "38H1" 7 22.2738385597865 2018 -"394" "39H1" 7 20.9557607073744 2018 -"395" "40H1" 7 13.7372037182684 2018 -"396" "41H1" 7 13.7371177196503 2018 -"397" "42H1" 7 8.73905331293742 2018 -"398" "43H1" 7 6.33348913664865 2018 -"399" "44H1" 7 6.43496052220537 2018 -"400" "45H1" 7 5.80413814339527 2018 -"401" "46H1" 7 6.04336776155414 2018 -"402" "43H2" 7 15.0330926804315 2018 -"403" "44H2" 7 10.554711860628 2018 -"404" "45H2" 7 15.7267878415915 2018 -"405" "46H2" 7 8.20306861400604 2018 -"406" "42H3" 7 17.3674566369308 2018 -"407" "43H3" 7 6.66222999798256 2018 -"408" "44H3" 7 5.06940985379609 2018 -"409" "45H3" 7 10.5435359674524 2018 -"410" "46H3" 7 18.5389230516222 2018 -"411" "43H4" 7 8.2258880364932 2018 -"412" "44H4" 7 8.50656353338116 2018 -"413" "45H4" 7 15.0589158343986 2018 -"414" "38G7" 8 14.2408499252728 2018 -"415" "39G7" 8 5.03898588286506 2018 -"416" "40G7" 8 5.38298423422707 2018 -"417" "41G7" 8 5.21967340420794 2018 -"418" "42G7" 8 4.94558971237253 2018 -"419" "43G7" 8 6.12156979166764 2018 -"420" "44G7" 8 5.54325326592834 2018 -"421" "45G7" 8 5.84215978564102 2018 -"422" "46G7" 8 6.01979486147563 2018 -"423" "37G8" 8 15.596841248222 2018 -"424" "38G8" 8 10.1468724879502 2018 -"425" "39G8" 8 4.84798553586006 2018 -"426" "40G8" 8 4.79675079230909 2018 -"427" "41G8" 8 5.46599868867132 2018 -"428" "42G8" 8 7.06812310264181 2018 -"429" "43G8" 8 11.3455192285238 2018 -"430" "44G8" 8 7.12278289625174 2018 -"431" "45G8" 8 5.79581651334409 2018 -"432" "46G8" 8 6.03342391384972 2018 -"433" "37G9" 8 14.1327235475719 2018 -"434" "38G9" 8 8.72478193655697 2018 -"435" "39G9" 8 5.61769933700562 2018 -"436" "40G9" 8 4.86053021748861 2018 -"437" "41G9" 8 5.27939346234004 2018 -"438" "42G9" 8 6.76718423234092 2018 -"439" "43G9" 8 6.23987891144223 2018 -"440" "44G9" 8 6.94871262890095 2018 -"441" "45G9" 8 6.11892663694457 2018 -"442" "46G9" 8 5.26874915096495 2018 -"443" "38H0" 8 21.3957469662031 2018 -"444" "39H0" 8 11.1802857359326 2018 -"445" "40H0" 8 6.59662359577638 2018 -"446" "41H0" 8 9.08832873976933 2018 -"447" "42H0" 8 7.29329671484453 2018 -"448" "43H0" 8 6.26101925792517 2018 -"449" "44H0" 8 5.8897448460261 2018 -"450" "45H0" 8 5.66143739024798 2018 -"451" "46H0" 8 5.68385091092851 2018 -"452" "38H1" 8 22.4881542523702 2018 -"453" "39H1" 8 21.6959366998753 2018 -"454" "40H1" 8 20.2004997833915 2018 -"455" "41H1" 8 20.7884616851807 2018 -"456" "42H1" 8 19.707567469279 2018 -"457" "43H1" 8 13.3529047087868 2018 -"458" "44H1" 8 10.2626823803474 2018 -"459" "45H1" 8 9.67575983114021 2018 -"460" "46H1" 8 8.49595590071245 2018 -"461" "43H2" 8 16.0853669302804 2018 -"462" "44H2" 8 10.8782935238364 2018 -"463" "45H2" 8 15.20121756449 2018 -"464" "46H2" 8 14.6267063617706 2018 -"465" "42H3" 8 17.1458810505114 2018 -"466" "43H3" 8 7.43027546066732 2018 -"467" "44H3" 8 5.82321919417736 2018 -"468" "45H3" 8 11.3946104370332 2018 -"469" "46H3" 8 19.6510963439941 2018 -"470" "43H4" 8 8.69781642910847 2018 -"471" "44H4" 8 10.7161752339547 2018 -"472" "45H4" 8 19.6965210826885 2018 -"473" "38G7" 9 12.5113634835238 2018 -"474" "39G7" 9 5.89126638151981 2018 -"475" "40G7" 9 6.05228264839561 2018 -"476" "41G7" 9 5.13639153661551 2018 -"477" "42G7" 9 4.98615124755436 2018 -"478" "43G7" 9 5.84105683973172 2018 -"479" "44G7" 9 5.46693029315383 2018 -"480" "45G7" 9 5.8993110210394 2018 -"481" "46G7" 9 5.96894423166911 2018 -"482" "37G8" 9 14.1986923756807 2018 -"483" "38G8" 9 9.24991700645946 2018 -"484" "39G8" 9 5.47398394655298 2018 -"485" "40G8" 9 5.09690121853793 2018 -"486" "41G8" 9 5.53135231159351 2018 -"487" "42G8" 9 6.53572095608734 2018 -"488" "43G8" 9 9.55761413749644 2018 -"489" "44G8" 9 6.7751825241595 2018 -"490" "45G8" 9 5.89789390188676 2018 -"491" "46G8" 9 6.14527673191494 2018 -"492" "37G9" 9 12.2194459112428 2018 -"493" "38G9" 9 8.05546648082696 2018 -"494" "39G9" 9 5.34220785785604 2018 -"495" "40G9" 9 4.71415399290897 2018 -"496" "41G9" 9 5.26638104849392 2018 -"497" "42G9" 9 7.01713412470288 2018 -"498" "43G9" 9 6.41638501043673 2018 -"499" "44G9" 9 6.85338294702255 2018 -"500" "45G9" 9 6.33429858205913 2018 -"501" "46G9" 9 5.45196808709039 2018 -"502" "38H0" 9 17.391533340017 2018 -"503" "39H0" 9 10.5866571392139 2018 -"504" "40H0" 9 7.04745028438392 2018 -"505" "41H0" 9 10.435288072859 2018 -"506" "42H0" 9 7.59093750825635 2018 -"507" "43H0" 9 6.80925798416138 2018 -"508" "44H0" 9 6.29584399991565 2018 -"509" "45H0" 9 5.76055369730349 2018 -"510" "46H0" 9 5.89411678579119 2018 -"511" "38H1" 9 17.6195340553919 2018 -"512" "39H1" 9 17.1478201842108 2018 -"513" "40H1" 9 17.0868934880132 2018 -"514" "41H1" 9 17.2988251686096 2018 -"515" "42H1" 9 16.9649316878546 2018 -"516" "43H1" 9 13.2706687237957 2018 -"517" "44H1" 9 11.0613160119268 2018 -"518" "45H1" 9 10.742827170579 2018 -"519" "46H1" 9 8.19536220666134 2018 -"520" "43H2" 9 13.0163334437779 2018 -"521" "44H2" 9 10.6505150255845 2018 -"522" "45H2" 9 13.4954657959395 2018 -"523" "46H2" 9 15.2116974592209 2018 -"524" "42H3" 9 14.4577949423539 2018 -"525" "43H3" 9 7.25625164083649 2018 -"526" "44H3" 9 7.21693616329959 2018 -"527" "45H3" 9 10.5912138965797 2018 -"528" "46H3" 9 15.6403902371724 2018 -"529" "43H4" 9 8.51037426901012 2018 -"530" "44H4" 9 10.4843505378907 2018 -"531" "45H4" 9 16.111944289165 2018 -"532" "38G7" 10 11.790656428948 2018 -"533" "39G7" 10 7.11853983799617 2018 -"534" "40G7" 10 6.80585945094073 2018 -"535" "41G7" 10 6.44004503665147 2018 -"536" "42G7" 10 5.22468520976879 2018 -"537" "43G7" 10 5.44340723061493 2018 -"538" "44G7" 10 5.56930809948179 2018 -"539" "45G7" 10 5.63099142132919 2018 -"540" "46G7" 10 5.17097965876261 2018 -"541" "37G8" 10 11.967057912246 2018 -"542" "38G8" 10 8.61880747035084 2018 -"543" "39G8" 10 5.69285285561173 2018 -"544" "40G8" 10 5.33236820609481 2018 -"545" "41G8" 10 6.09880302658788 2018 -"546" "42G8" 10 6.55555226936667 2018 -"547" "43G8" 10 8.04024460004724 2018 -"548" "44G8" 10 6.32610476981475 2018 -"549" "45G8" 10 5.86536144283083 2018 -"550" "46G8" 10 6.06095720662011 2018 -"551" "37G9" 10 9.94427617676824 2018 -"552" "38G9" 10 7.63053494357509 2018 -"553" "39G9" 10 5.48628881330843 2018 -"554" "40G9" 10 4.82520203899454 2018 -"555" "41G9" 10 5.40613794415085 2018 -"556" "42G9" 10 7.08523542395344 2018 -"557" "43G9" 10 6.47011852948754 2018 -"558" "44G9" 10 6.53240684248933 2018 -"559" "45G9" 10 6.17679060332994 2018 -"560" "46G9" 10 5.56966284910838 2018 -"561" "38H0" 10 11.2267297903697 2018 -"562" "39H0" 10 11.2493545220344 2018 -"563" "40H0" 10 8.73537613992338 2018 -"564" "41H0" 10 10.933994603224 2018 -"565" "42H0" 10 7.89408004857876 2018 -"566" "43H0" 10 7.09485683750223 2018 -"567" "44H0" 10 6.59805149678831 2018 -"568" "45H0" 10 5.94454301065869 2018 -"569" "46H0" 10 5.8052898645401 2018 -"570" "38H1" 10 10.4591032465299 2018 -"571" "39H1" 10 10.8064459993058 2018 -"572" "40H1" 10 12.4016138408495 2018 -"573" "41H1" 10 12.016455411911 2018 -"574" "42H1" 10 12.0101535615467 2018 -"575" "43H1" 10 11.3173123548527 2018 -"576" "44H1" 10 10.0015679937278 2018 -"577" "45H1" 10 9.63380948009417 2018 -"578" "46H1" 10 7.06524873502327 2018 -"579" "43H2" 10 9.99973805745443 2018 -"580" "44H2" 10 9.66918792137549 2018 -"581" "45H2" 10 9.93440665566897 2018 -"582" "46H2" 10 10.9189163446426 2018 -"583" "42H3" 10 11.269515740244 2018 -"584" "43H3" 10 9.24615454727586 2018 -"585" "44H3" 10 9.16389492497568 2018 -"586" "45H3" 10 10.315732337389 2018 -"587" "46H3" 10 9.78698598013984 2018 -"588" "43H4" 10 10.4000481058875 2018 -"589" "44H4" 10 10.5953102341763 2018 -"590" "45H4" 10 10.142291490685 2018 -"591" "38G7" 11 9.35659936190107 2018 -"592" "39G7" 11 9.11592040768376 2018 -"593" "40G7" 11 7.2675875571039 2018 -"594" "41G7" 11 6.23180833790037 2018 -"595" "42G7" 11 5.06114010899155 2018 -"596" "43G7" 11 5.48259097114848 2018 -"597" "44G7" 11 5.60507972240448 2018 -"598" "45G7" 11 5.91956275828576 2018 -"599" "46G7" 11 5.74725329875946 2018 -"600" "37G8" 11 8.65931785832281 2018 -"601" "38G8" 11 7.79666220064123 2018 -"602" "39G8" 11 8.49942656887902 2018 -"603" "40G8" 11 6.30575037046715 2018 -"604" "41G8" 11 6.29970497334445 2018 -"605" "42G8" 11 6.44240699145592 2018 -"606" "43G8" 11 6.41109472453395 2018 -"607" "44G8" 11 5.59738674904536 2018 -"608" "45G8" 11 5.76731562835199 2018 -"609" "46G8" 11 6.05773715178172 2018 -"610" "37G9" 11 6.88086594437524 2018 -"611" "38G9" 11 7.43135301933067 2018 -"612" "39G9" 11 6.30374644773978 2018 -"613" "40G9" 11 5.97554338905546 2018 -"614" "41G9" 11 6.39697421700866 2018 -"615" "42G9" 11 7.27379858935321 2018 -"616" "43G9" 11 6.55267679867921 2018 -"617" "44G9" 11 5.92758817063412 2018 -"618" "45G9" 11 5.79909857800038 2018 -"619" "46G9" 11 5.52670409944322 2018 -"620" "38H0" 11 6.8728451654315 2018 -"621" "39H0" 11 7.72868266718599 2018 -"622" "40H0" 11 7.13029427042714 2018 -"623" "41H0" 11 8.31386068360174 2018 -"624" "42H0" 11 6.80330766969257 2018 -"625" "43H0" 11 6.54092539946238 2018 -"626" "44H0" 11 6.26953622588405 2018 -"627" "45H0" 11 5.95585447903033 2018 -"628" "46H0" 11 5.95824612511529 2018 -"629" "38H1" 11 5.6117740770181 2018 -"630" "39H1" 11 6.14441300440235 2018 -"631" "40H1" 11 8.48380477739417 2018 -"632" "41H1" 11 8.46510078907013 2018 -"633" "42H1" 11 8.44870423362369 2018 -"634" "43H1" 11 7.93160228162709 2018 -"635" "44H1" 11 7.36763340240629 2018 -"636" "45H1" 11 7.42775131196015 2018 -"637" "46H1" 11 6.45776219801469 2018 -"638" "43H2" 11 7.67807513191586 2018 -"639" "44H2" 11 8.1311326278514 2018 -"640" "45H2" 11 7.01298133581568 2018 -"641" "46H2" 11 7.55250996351242 2018 -"642" "42H3" 11 8.08286054510819 2018 -"643" "43H3" 11 8.18757928144313 2018 -"644" "44H3" 11 8.38230874059812 2018 -"645" "45H3" 11 7.50415664794905 2018 -"646" "46H3" 11 6.01959300041199 2018 -"647" "43H4" 11 8.25316257565935 2018 -"648" "44H4" 11 7.79215681129301 2018 -"649" "45H4" 11 6.06146215472801 2018 -"650" "38G7" 12 5.8558421827867 2018 -"651" "39G7" 12 8.09855368623027 2018 -"652" "40G7" 12 5.93606116771698 2018 -"653" "41G7" 12 5.48459855450524 2018 -"654" "42G7" 12 5.04510540167491 2018 -"655" "43G7" 12 4.97295097490971 2018 -"656" "44G7" 12 5.45607404488104 2018 -"657" "45G7" 12 5.30981057280186 2018 -"658" "46G7" 12 4.99576394425498 2018 -"659" "37G8" 12 5.71434704324473 2018 -"660" "38G8" 12 6.61659317363121 2018 -"661" "39G8" 12 8.32226226903774 2018 -"662" "40G8" 12 6.72599092280423 2018 -"663" "41G8" 12 5.98305739914929 2018 -"664" "42G8" 12 5.43480742374678 2018 -"665" "43G8" 12 4.73299451456421 2018 -"666" "44G8" 12 5.17238415348491 2018 -"667" "45G8" 12 5.7663280972728 2018 -"668" "46G8" 12 5.99168064859178 2018 -"669" "37G9" 12 3.91971117499814 2018 -"670" "38G9" 12 7.23035798549771 2018 -"671" "39G9" 12 7.39133451161561 2018 -"672" "40G9" 12 6.57340652810203 2018 -"673" "41G9" 12 6.77204620882317 2018 -"674" "42G9" 12 7.17751230266359 2018 -"675" "43G9" 12 6.56209224065145 2018 -"676" "44G9" 12 5.55224397406343 2018 -"677" "45G9" 12 5.81378466550673 2018 -"678" "46G9" 12 5.56746396753523 2018 -"679" "38H0" 12 1.93635988809789 2018 -"680" "39H0" 12 5.43893814856268 2018 -"681" "40H0" 12 5.85856182663529 2018 -"682" "41H0" 12 5.61132592459055 2018 -"683" "42H0" 12 5.98777218416885 2018 -"684" "43H0" 12 6.31989798634141 2018 -"685" "44H0" 12 6.27263909843233 2018 -"686" "45H0" 12 5.98407903203258 2018 -"687" "46H0" 12 5.87530246045854 2018 -"688" "38H1" 12 0.258739958672474 2018 -"689" "39H1" 12 0.645083597269371 2018 -"690" "40H1" 12 3.98665023575658 2018 -"691" "41H1" 12 3.33041752576828 2018 -"692" "42H1" 12 3.99103154681978 2018 -"693" "43H1" 12 4.94262681054597 2018 -"694" "44H1" 12 5.07050326352049 2018 -"695" "45H1" 12 5.11745648574113 2018 -"696" "46H1" 12 5.31130821777113 2018 -"697" "43H2" 12 3.7998012474605 2018 -"698" "44H2" 12 3.80925124374466 2018 -"699" "45H2" 12 2.59131465077315 2018 -"700" "46H2" 12 4.13910487294197 2018 -"701" "42H3" 12 4.04840990116722 2018 -"702" "43H3" 12 4.81789046754686 2018 -"703" "44H3" 12 4.74448743030484 2018 -"704" "45H3" 12 3.24681270141922 2018 -"705" "46H3" 12 1.33311251964834 2018 -"706" "43H4" 12 4.75847155505623 2018 -"707" "44H4" 12 3.70584983253842 2018 -"708" "45H4" 12 1.03444656173392 2018 diff --git a/vignettes/ices.rect.sea.txt b/vignettes/ices.rect.sea.txt deleted file mode 100644 index c8f2ea8..0000000 --- a/vignettes/ices.rect.sea.txt +++ /dev/null @@ -1,60 +0,0 @@ -"rect" "areaSea_km2" -"1" "38G7" 1711.7282355114 -"2" "39G7" 3523.71698877352 -"3" "40G7" 3479.25494468894 -"4" "41G7" 3434.5280118031 -"5" "42G7" 3389.53960269141 -"6" "43G7" 3261.49250973656 -"7" "44G7" 3298.79204450941 -"8" "45G7" 3253.03981894911 -"9" "46G7" 2156.37563904363 -"10" "37G8" 374.260791124246 -"11" "38G8" 2366.38392344111 -"12" "39G8" 3523.71698877349 -"13" "40G8" 3479.25494468892 -"14" "41G8" 3434.5280118031 -"15" "42G8" 3314.24447745022 -"16" "43G8" 1859.84658900227 -"17" "44G8" 1939.16482530621 -"18" "45G8" 3253.03981894907 -"19" "46G8" 3159.64017056631 -"20" "37G9" 540.143799769937 -"21" "38G9" 3202.5755060268 -"22" "39G9" 3523.71698877351 -"23" "40G9" 3479.25494468894 -"24" "41G9" 3434.52801180311 -"25" "42G9" 3389.53960269134 -"26" "43G9" 3344.29312548706 -"27" "44G9" 3160.37720797677 -"28" "45G9" 3225.46513776867 -"29" "46G9" 3207.03993321144 -"30" "38H0" 391.066993848961 -"31" "39H0" 3400.83440836474 -"32" "40H0" 3479.2549478177 -"33" "41H0" 3398.72899458505 -"34" "42H0" 3388.79473220469 -"35" "43H0" 3344.29312849451 -"36" "44H0" 3298.7920474759 -"37" "45H0" 3253.03982187445 -"38" "46H0" 3207.03993609546 -"39" "38H1" 141.110212705233 -"40" "39H1" 754.496308868271 -"41" "40H1" 328.686704196703 -"42" "41H1" 80.7017025630464 -"43" "42H1" 338.645895839223 -"44" "43H1" 1545.89654688251 -"45" "44H1" 3111.26174596369 -"46" "45H1" 3120.8020111017 -"47" "46H1" 3197.6434433424 -"48" "43H2" 49.2293081892126 -"49" "44H2" 2398.3525938607 -"50" "45H2" 1423.36900933388 -"51" "46H2" 1749.73464527864 -"52" "42H3" 51.0917555180813 -"53" "43H3" 2691.63881720934 -"54" "44H3" 3288.30378157277 -"55" "45H3" 2780.06184145136 -"56" "46H3" 1429.4750970343 -"57" "43H4" 973.573654486459 -"58" "44H4" 1119.30685293973 -"59" "45H4" 986.147233420839 diff --git a/vignettes/import_hydrography_cmems.Rmd b/vignettes/import_hydrography_cmems.Rmd index 28b3633..46eb3a1 100644 --- a/vignettes/import_hydrography_cmems.Rmd +++ b/vignettes/import_hydrography_cmems.Rmd @@ -53,8 +53,7 @@ dat <- CopernicusMarine::cms_download_subset( layer = "cmems_mod_bal_phy_my_P1M-m", variable = "bottomT", region = c(17, 54, 30, 58.5), # c(lon_min, lat_min, lon_max, lat_max) - timerange = paste0(y, c("-01-01", "-12-31")), - verticalrange = c(0, 1) + timerange = paste0(y, c("-01-01", "-12-31")) ) ``` @@ -67,37 +66,16 @@ unzip(temp, exdir="data_provided/ices_rect") unlink(temp) ``` -# Aggregate hydrographic data by ICES rectangles - -```{r eval=FALSE} -# load ICES rect -ices.rect <- sf::st_read("data_provided/ices_rect/StatRec_map_Areas_Full_20170124.dbf", quiet = T) - -# Aggregate bottomT by ICES rect -ar <- aggregate(dat, ices.rect$geometry, FUN = mean, na.rm = TRUE) |> dplyr::pull(bottomT) -dimnames(ar) <- list(ICESNAME = ices.rect$ICESNAME, month = 1:12) -hydroVar <- - as.data.frame.table(ar, responseName = "sob") |> - dplyr::filter(!is.na(sob)) |> - dplyr::mutate( - year = y, - month = as.numeric(month) - ) |> - dplyr::rename( - rect = ICESNAME, - ) - -write.table(hydroVar, file = 'hydroVar.txt') -``` - # Combine ICES rectangles with rnaturalearth::ne_countries() to get sea surface area ```{r eval=FALSE} ices.rect <- sf::st_read("data_provided/ices_rect/StatRec_map_Areas_Full_20170124.dbf", quiet = T) +## subset ICES rectangles based on hydrographic data extent +ices.rect <- sf::st_crop(ices.rect, dat) + ices.rect.sea <- ices.rect |> - dplyr::filter(ICESNAME %in% hydroVar$rect) |> sf::st_difference( rnaturalearth::ne_countries(returnclass = "sf", continent="Europe", scale="large") |> sf::st_union() @@ -110,8 +88,19 @@ ices.rect.sea <- areaSea_km2 = areaSea_km2 ) |> sf::st_drop_geometry() +``` -write.table(sf::st_drop_geometry(ices.rect.sea), file = 'ices.rect.sea.txt') +# Aggregate hydrographic data by ICES rectangles + +```{r eval=FALSE} +hydroVar <- aggregate(dat, ices.rect, FUN = mean, na.rm = TRUE) |> + sf::st_as_sf(long=T) |> + sf::st_intersection(ices.rect |> + dplyr::select(rect=ICESNAME)) |> + na.omit() |> + dplyr::left_join(ices.rect.sea) |> + dplyr::mutate(year = as.numeric(substring(time,1,4)), + month = as.numeric(substring(time,6,7))) ``` # Import bottom temperature into mfdb @@ -121,14 +110,10 @@ Import ICES rectangles and import the hydrographic data as a survey index. Then ```{r} mdb <- mfdb(tempfile(fileext = '.duckdb')) -ices.rect.sea <- read.table('ices.rect.sea.txt') -hydroVar <- read.table('hydroVar.txt') |> - dplyr::inner_join(ices.rect.sea, by = "rect") - # import ICES rectangles mfdb_import_area(mdb, data.frame( name = as.character(ices.rect.sea$rect), - size = ices.rect.sea$areaSea_km2)) + size = as.numeric(ices.rect.sea$areaSea_km2))) # import area size as index for later use mfdb_import_cs_taxonomy(mdb, "index_type", data.frame(name=c("ices_rect", "bottom_temp"))) @@ -146,7 +131,7 @@ mfdb_import_survey_index(mdb, data.frame(year = hydroVar$year, month = hydroVar$month, areacell = as.character(hydroVar$rect), - value = hydroVar$sob, + value = as.numeric(hydroVar$bottomT), index_type = "bottom_temp", stringsAsFactors = TRUE)) @@ -167,7 +152,7 @@ dat ```{r, echo=FALSE} # NB: Calculated with: # raw <- hydroVar[hydroVar$year == 2018 & hydroVar$rect %in% c('44G7','44G8','44G9','45G7','45G8','45G9') & hydroVar$month %in% c(1,2,3),] -# sum(raw$sob * raw$areaSea_km2) / sum(raw$areaSea_km2) +# sum(raw$bottomT * raw$areaSea_km2) / sum(raw$areaSea_km2) ok(ut_cmp_equal(dat, read.table(blank.lines.skip = TRUE, header = TRUE, stringsAsFactors = FALSE, text = ' year step area mean 2018 1 a1 5.065878