OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
249 stars 120 forks source link

Leeway's error: The truth value of an array with more than one element is ambiguous. Use a.amy() or a.all() #441

Closed limaolin1981611 closed 3 years ago

limaolin1981611 commented 3 years ago

I use my own forcast files from rooms ang wrf. When I run the leeway model, there are errors as follows: read_netCDF_CF_generic.py, line 317, ininit if rel_delte > 0.05 and The truth value of an array with more than one element is ambiguous. Use a.amy() or a.all()

knutfrode commented 3 years ago

There seem to be some problem with your input files, either ROMS or WRF. Are these CF-compatible, with constant delta_x and delta_y for the coordinates? Can you post an ncdump of the forcing file which produces the error?

limaolin1981611 commented 3 years ago

E:\rescue\doc\SAR\roms_wrf\20200821>ncdump -h ROMS_sfc_TaiWanZhouBian_2020082100_t000.nc netcdf ROMS_sfc_TaiWanZhouBian_2020082100_t000 { dimensions: lat = 568 ; lon = 519 ; time = 1 ; variables: double longitude(lon) ; longitude:long_name = "longitude coordinate" ; longitude:standard_name = "longitude" ; longitude:units = "degrees_east" ; longitude:axis = "X" ; double latitude(lat) ; latitude:long_name = "latitude coordinate" ; latitude:standard_name = "latitude" ; latitude:units = "degrees_north" ; latitude:axis = "Y" ; double time(time) ; time:long_name = "Time" ; time:standard_name = "time" ; time:units = "seconds since 2015-01-01 00:00:00" ; time:axis = "T" ; double water_u(time, lat, lon) ; water_u:long_name = "Sea water x velocity" ; water_u:standard_name = "x_sea_water_velocity" ; water_u:units = "m s-1" ; water_u:coordinates = "lon lat depth time" ; double water_v(time, lat, lon) ; water_v:long_name = "Sea water y velocity" ; water_v:standard_name = "y_sea_water_velocity" ; water_v:units = "m s-1" ; water_v:coordinates = "lon lat depth time" ;

E:\rescue\doc\SAR\roms_wrf\20200821>ncdump -v latitude ROMS_sfc_TaiWanZhouBian_2020082100_t000.nc netcdf ROMS_sfc_TaiWanZhouBian_2020082100_t000 { dimensions: lat = 568 ; lon = 519 ; time = 1 ; variables: double longitude(lon) ; longitude:long_name = "longitude coordinate" ; longitude:standard_name = "longitude" ; longitude:units = "degrees_east" ; longitude:axis = "X" ; double latitude(lat) ; latitude:long_name = "latitude coordinate" ; latitude:standard_name = "latitude" ; latitude:units = "degrees_north" ; latitude:axis = "Y" ; double time(time) ; time:long_name = "Time" ; time:standard_name = "time" ; time:units = "seconds since 2015-01-01 00:00:00" ; time:axis = "T" ; double water_u(time, lat, lon) ; water_u:long_name = "Sea water x velocity" ; water_u:standard_name = "x_sea_water_velocity" ; water_u:units = "m s-1" ; water_u:coordinates = "lon lat depth time" ; double water_v(time, lat, lon) ; water_v:long_name = "Sea water y velocity" ; water_v:standard_name = "y_sea_water_velocity" ; water_v:units = "m s-1" ; water_v:coordinates = "lon lat depth time" ; data:

latitude = 21.0499992370605, 21.0600357055664, 21.0700702667236, 21.0801067352295, 21.0901412963867, 21.1001758575439, 21.1102123260498, 21.120246887207, 21.1302814483643, 21.1403179168701, 21.1503524780273, 21.1603889465332, 21.1704235076904, 21.1804580688477, 21.1904945373535, 21.2005290985107, 21.210563659668, 21.2206001281738, 21.2306346893311, 21.2406692504883, 21.2507057189941, 21.2607402801514, 21.2707767486572, 21.2808113098145, 21.2908458709717, 21.3008823394775, 21.3109169006348, 21.320951461792, 21.3309879302979, 21.3410224914551, 21.3510589599609, 21.3610935211182, 21.3711280822754, 21.3811645507813, 21.3911991119385, 21.4012336730957, 21.4112701416016, 21.4213047027588, 21.4313411712646, 21.4413757324219, 21.4514102935791, 21.461446762085, 21.4714813232422, 21.4815158843994, 21.4915523529053, 21.5015869140625, 21.5116233825684, 21.5216579437256, 21.5316925048828, 21.5417289733887, 21.5517635345459, 21.5617980957031, 21.571834564209, 21.5818691253662, 21.5919055938721, 21.6019401550293, 21.6119747161865, 21.6220111846924, 21.6320457458496, 21.6420803070068, 21.6521167755127, 21.6621513366699, 21.6721878051758, 21.682222366333, 21.6922569274902, 21.7022933959961, 21.7123279571533, 21.7223625183105, 21.7323989868164, 21.7424335479736, 21.7524700164795, 21.7625045776367, 21.7725391387939, 21.7825756072998, 21.792610168457, 21.8026447296143, 21.8126811981201, 21.8227157592773, 21.8327522277832, 21.8427867889404, 21.8528213500977, 21.8628578186035, 21.8728923797607, 21.882926940918, 21.8929634094238, 21.9029979705811, 21.9130344390869, 21.9230690002441, 21.9331035614014, 21.9431400299072, 21.9531745910645, 21.9632091522217, 21.9732456207275, 21.9832801818848, 21.993314743042, 22.0033512115479, 22.0133857727051, 22.0234222412109, 22.0334568023682, 22.0434913635254, 22.0535278320313, 22.0635623931885, 22.0735969543457, 22.0836334228516, 22.0936679840088, 22.1037044525146, 22.1137390136719, 22.1237735748291, 22.133810043335, 22.1438446044922, 22.1538791656494, 22.1639156341553, 22.1739501953125, 22.1839866638184, 22.1940212249756, 22.2040557861328, 22.2140922546387, 22.2241268157959, 22.2341613769531, 22.244197845459, 22.2542324066162, 22.2642688751221, 22.2743034362793, 22.2843379974365, 22.2943744659424, 22.3044090270996, 22.3144435882568, 22.3244800567627, 22.3345146179199, 22.3445510864258, 22.354585647583, 22.3646202087402, 22.3746566772461, 22.3846912384033, 22.3947257995605, 22.4047622680664, 22.4147968292236, 22.4248332977295, 22.4348678588867, 22.4449024200439, 22.4549388885498, 22.464973449707, 22.4750080108643, 22.4850444793701, 22.4950790405273, 22.5051155090332, 22.5151500701904, 22.5251846313477, 22.5352210998535, 22.5452556610107, 22.555290222168, 22.5653266906738, 22.5753612518311, 22.5853977203369, 22.5954322814941, 22.6054668426514, 22.6155033111572, 22.6255378723145, 22.6355724334717, 22.6456089019775, 22.6556434631348, 22.6656799316406, 22.6757144927979, 22.6857490539551, 22.6957855224609, 22.7058200836182, 22.7158546447754, 22.7258911132813, 22.7359256744385, 22.7459621429443, 22.7559967041016, 22.7660312652588, 22.7760677337646, 22.7861022949219, 22.7961368560791, 22.806173324585, 22.8162078857422, 22.8262424468994, 22.8362789154053, 22.8463134765625, 22.8563499450684, 22.8663845062256, 22.8764190673828, 22.8864555358887, 22.8964900970459, 22.9065246582031, 22.916561126709, 22.9265956878662, 22.9366321563721, 22.9466667175293, 22.9567012786865, 22.9667377471924, 22.9767723083496, 22.9868068695068, 22.9968433380127, 23.0068778991699, 23.0169143676758, 23.026948928833, 23.0369834899902, 23.0470199584961, 23.0570545196533, 23.0670890808105, 23.0771255493164, 23.0871601104736, 23.0971965789795, 23.1072311401367, 23.1172657012939, 23.1273021697998, 23.137336730957, 23.1473712921143, 23.1574077606201, 23.1674423217773, 23.1774787902832, 23.1875133514404, 23.1975479125977, 23.2075843811035, 23.2176189422607, 23.227653503418, 23.2376899719238, 23.2477245330811, 23.2577610015869, 23.2677955627441, 23.2778301239014, 23.2878665924072, 23.2979011535645, 23.3079357147217, 23.3179721832275, 23.3280067443848, 23.3380432128906, 23.3480777740479, 23.3581123352051, 23.3681488037109, 23.3781833648682, 23.3882179260254, 23.3982543945313, 23.4082889556885, 23.4183254241943, 23.4283599853516, 23.4383945465088, 23.4484310150146, 23.4584655761719, 23.4685001373291, 23.478536605835, 23.4885711669922, 23.498607635498, 23.5086421966553, 23.5186767578125, 23.5287132263184, 23.5387477874756, 23.5487823486328, 23.5588188171387, 23.5688533782959, 23.5788879394531, 23.588924407959, 23.5989589691162, 23.6089954376221, 23.6190299987793, 23.6290645599365, 23.6391010284424, 23.6491355895996, 23.6591701507568, 23.6692066192627, 23.6792411804199, 23.6892776489258, 23.699312210083, 23.7093467712402, 23.7193832397461, 23.7294178009033, 23.7394523620605, 23.7494888305664, 23.7595233917236, 23.7695598602295, 23.7795944213867, 23.7896289825439, 23.7996654510498, 23.809700012207, 23.8197345733643, 23.8297710418701, 23.8398056030273, 23.8498420715332, 23.8598766326904, 23.8699111938477, 23.8799476623535, 23.8899822235107, 23.900016784668, 23.9100532531738, 23.9200878143311, 23.9301242828369, 23.9401588439941, 23.9501934051514, 23.9602298736572, 23.9702644348145, 23.9802989959717, 23.9903354644775, 24.0003700256348, 24.0104064941406, 24.0204410552979, 24.0304756164551, 24.0405120849609, 24.0505466461182, 24.0605812072754, 24.0706176757813, 24.0806522369385, 24.0906887054443, 24.1007232666016, 24.1107578277588, 24.1207942962646, 24.1308288574219, 24.1408634185791, 24.150899887085, 24.1609344482422, 24.170970916748, 24.1810054779053, 24.1910400390625, 24.2010765075684, 24.2111110687256, 24.2211456298828, 24.2311820983887, 24.2412166595459, 24.2512531280518, 24.261287689209, 24.2713222503662, 24.2813587188721, 24.2913932800293, 24.3014278411865, 24.3114643096924, 24.3214988708496, 24.3315353393555, 24.3415699005127, 24.3516044616699, 24.3616409301758, 24.371675491333, 24.3817100524902, 24.3917465209961, 24.4017810821533, 24.4118156433105, 24.4218521118164, 24.4318866729736, 24.4419231414795, 24.4519577026367, 24.4619922637939, 24.4720287322998, 24.482063293457, 24.4920978546143, 24.5021343231201, 24.5121688842773, 24.5222053527832, 24.5322399139404, 24.5422744750977, 24.5523109436035, 24.5623455047607, 24.572380065918, 24.5824165344238, 24.5924510955811, 24.6024875640869, 24.6125221252441, 24.6225566864014, 24.6325931549072, 24.6426277160645, 24.6526622772217, 24.6626987457275, 24.6727333068848, 24.6827697753906, 24.6928043365479, 24.7028388977051, 24.7128753662109, 24.7229099273682, 24.7329444885254, 24.7429809570313, 24.7530155181885, 24.7630519866943, 24.7730865478516, 24.7831211090088, 24.7931575775146, 24.8031921386719, 24.8132266998291, 24.823263168335, 24.8332977294922, 24.843334197998, 24.8533687591553, 24.8634033203125, 24.8734397888184, 24.8834743499756, 24.8935089111328, 24.9035453796387, 24.9135799407959, 24.9236164093018, 24.933650970459, 24.9436855316162, 24.9537220001221, 24.9637565612793, 24.9737911224365, 24.9838275909424, 24.9938621520996, 25.0038986206055, 25.0139331817627, 25.0239677429199, 25.0340042114258, 25.044038772583, 25.0540733337402, 25.0641098022461, 25.0741443634033, 25.0841808319092, 25.0942153930664, 25.1042499542236, 25.1142864227295, 25.1243209838867, 25.1343555450439, 25.1443920135498, 25.154426574707, 25.1644611358643, 25.1744976043701, 25.1845321655273, 25.1945686340332, 25.2046031951904, 25.2146377563477, 25.2246742248535, 25.2347087860107, 25.244743347168, 25.2547798156738, 25.2648143768311, 25.2748508453369, 25.2848854064941, 25.2949199676514, 25.3049564361572, 25.3149909973145, 25.3250255584717, 25.3350620269775, 25.3450965881348, 25.3551330566406, 25.3651676177979, 25.3752021789551, 25.3852386474609, 25.3952732086182, 25.4053077697754, 25.4153442382813, 25.4253787994385, 25.4354152679443, 25.4454498291016, 25.4554843902588, 25.4655208587646, 25.4755554199219, 25.4855899810791, 25.495626449585, 25.5056610107422, 25.515697479248, 25.5257320404053, 25.5357666015625, 25.5458030700684, 25.5558376312256, 25.5658721923828, 25.5759086608887, 25.5859432220459, 25.5959796905518, 25.606014251709, 25.6160488128662, 25.6260852813721, 25.6361198425293, 25.6461544036865, 25.6561908721924, 25.6662254333496, 25.6762619018555, 25.6862964630127, 25.6963310241699, 25.7063674926758, 25.716402053833, 25.7264366149902, 25.7364730834961, 25.7465076446533, 25.7565441131592, 25.7665786743164, 25.7766132354736, 25.7866497039795, 25.7966842651367, 25.8067188262939, 25.8167552947998, 25.826789855957, 25.8368263244629, 25.8468608856201, 25.8568954467773, 25.8669319152832, 25.8769664764404, 25.8870010375977, 25.8970375061035, 25.9070720672607, 25.9171085357666, 25.9271430969238, 25.9371776580811, 25.9472141265869, 25.9572486877441, 25.9672832489014, 25.9773197174072, 25.9873542785645, 25.9973888397217, 26.0074253082275, 26.0174598693848, 26.0274963378906, 26.0375308990479, 26.0475654602051, 26.0576019287109, 26.0676364898682, 26.0776710510254, 26.0877075195313, 26.0977420806885, 26.1077785491943, 26.1178131103516, 26.1278476715088, 26.1378841400146, 26.1479187011719, 26.1579532623291, 26.167989730835, 26.1780242919922, 26.188060760498, 26.1980953216553, 26.2081298828125, 26.2181663513184, 26.2282009124756, 26.2382354736328, 26.2482719421387, 26.2583065032959, 26.2683429718018, 26.278377532959, 26.2884120941162, 26.2984485626221, 26.3084831237793, 26.3185176849365, 26.3285541534424, 26.3385887145996, 26.3486251831055, 26.3586597442627, 26.3686943054199, 26.3787307739258, 26.388765335083, 26.3987998962402, 26.4088363647461, 26.4188709259033, 26.4289073944092, 26.4389419555664, 26.4489765167236, 26.4590129852295, 26.4690475463867, 26.4790821075439, 26.4891185760498, 26.499153137207, 26.5091896057129, 26.5192241668701, 26.5292587280273, 26.5392951965332, 26.5493297576904, 26.5593643188477, 26.5694007873535, 26.5794353485107, 26.5894718170166, 26.5995063781738, 26.6095409393311, 26.6195774078369, 26.6296119689941, 26.6396465301514, 26.6496829986572, 26.6597175598145, 26.6697540283203, 26.6797885894775, 26.6898231506348, 26.6998596191406, 26.7098941802979, 26.7199287414551, 26.7299652099609, 26.7399997711182 ;

limaolin1981611 commented 3 years ago

E:\rescue\doc\SAR\roms_wrf\20200821>ncdump -h WRF_TaiWanZhouBian_2020082100_t000.nc netcdf WRF_TaiWanZhouBian_2020082100_t000 { dimensions: lon = 519 ; lat = 568 ; time = 1 ; variables: double longitude(lon) ; longitude:long_name = "longitude coordinate" ; longitude:standard_name = "longitude" ; longitude:units = "degrees_east" ; longitude:axis = "X" ; double latitude(lat) ; latitude:long_name = "latitude coordinate" ; latitude:standard_name = "latitude" ; latitude:units = "degrees_north" ; latitude:axis = "Y" ; double time(time) ; time:long_name = "Time" ; time:standard_name = "time" ; time:units = "seconds since 2015-01-01 00:00:00" ; time:axis = "T" ; double x(lat, lon) ; x:long_name = " Cartesian Coordinates X" ; x:standard_name = "cartesian coordinates x" ; x:units = "meter" ; x:axis = "X" ; double y(lat, lon) ; y:long_name = " Cartesian Coordinates Y" ; y:standard_name = "cartesian coordinates y" ; y:units = "meter" ; y:axis = "Y" ; double t2m(time, lat, lon) ; t2m:long_name = "2 m Atmospheric Temperature" ; t2m:units = "degC" ; double slp(time, lat, lon) ; slp:long_name = "Sea Level Pressure" ; slp:units = "hPa" ; double wind_u10(time, lat, lon) ; wind_u10:long_name = "10 metre wind (U10M)" ; wind_u10:standard_name = "x_wind" ; wind_u10:units = "m s-1" ; double wind_v10(time, lat, lon) ; wind_v10:long_name = "10 metre wind (V10M)" ; wind_v10:standard_name = "y_wind" ; wind_v10:units = "m s-1" ; double rh2m(time, lat, lon) ; rh2m:long_name = "2 m Relative Humidity" ; rh2m:units = "%" ; double dpt2m(time, lat, lon) ; dpt2m:long_name = "2 m Dew Point Temperature" ; dpt2m:units = "degC" ; double rain(time, lat, lon) ; rain:long_name = "rain" ; rain:units = "mm" ;

E:\rescue\doc\SAR\roms_wrf\20200821>ncdump -v latitude WRF_TaiWanZhouBian_2020082100_t000.nc netcdf WRF_TaiWanZhouBian_2020082100_t000 { dimensions: lon = 519 ; lat = 568 ; time = 1 ; variables: double longitude(lon) ; longitude:long_name = "longitude coordinate" ; longitude:standard_name = "longitude" ; longitude:units = "degrees_east" ; longitude:axis = "X" ; double latitude(lat) ; latitude:long_name = "latitude coordinate" ; latitude:standard_name = "latitude" ; latitude:units = "degrees_north" ; latitude:axis = "Y" ; double time(time) ; time:long_name = "Time" ; time:standard_name = "time" ; time:units = "seconds since 2015-01-01 00:00:00" ; time:axis = "T" ; double x(lat, lon) ; x:long_name = " Cartesian Coordinates X" ; x:standard_name = "cartesian coordinates x" ; x:units = "meter" ; x:axis = "X" ; double y(lat, lon) ; y:long_name = " Cartesian Coordinates Y" ; y:standard_name = "cartesian coordinates y" ; y:units = "meter" ; y:axis = "Y" ; double t2m(time, lat, lon) ; t2m:long_name = "2 m Atmospheric Temperature" ; t2m:units = "degC" ; double slp(time, lat, lon) ; slp:long_name = "Sea Level Pressure" ; slp:units = "hPa" ; double wind_u10(time, lat, lon) ; wind_u10:long_name = "10 metre wind (U10M)" ; wind_u10:standard_name = "x_wind" ; wind_u10:units = "m s-1" ; double wind_v10(time, lat, lon) ; wind_v10:long_name = "10 metre wind (V10M)" ; wind_v10:standard_name = "y_wind" ; wind_v10:units = "m s-1" ; double rh2m(time, lat, lon) ; rh2m:long_name = "2 m Relative Humidity" ; rh2m:units = "%" ; double dpt2m(time, lat, lon) ; dpt2m:long_name = "2 m Dew Point Temperature" ; dpt2m:units = "degC" ; double rain(time, lat, lon) ; rain:long_name = "rain" ; rain:units = "mm" ; data:

latitude = 21.0499992370605, 21.0600357055664, 21.0700702667236, 21.0801067352295, 21.0901412963867, 21.1001758575439, 21.1102123260498, 21.120246887207, 21.1302814483643, 21.1403179168701, 21.1503524780273, 21.1603889465332, 21.1704235076904, 21.1804580688477, 21.1904945373535, 21.2005290985107, 21.210563659668, 21.2206001281738, 21.2306346893311, 21.2406692504883, 21.2507057189941, 21.2607402801514, 21.2707767486572, 21.2808113098145, 21.2908458709717, 21.3008823394775, 21.3109169006348, 21.320951461792, 21.3309879302979, 21.3410224914551, 21.3510589599609, 21.3610935211182, 21.3711280822754, 21.3811645507813, 21.3911991119385, 21.4012336730957, 21.4112701416016, 21.4213047027588, 21.4313411712646, 21.4413757324219, 21.4514102935791, 21.461446762085, 21.4714813232422, 21.4815158843994, 21.4915523529053, 21.5015869140625, 21.5116233825684, 21.5216579437256, 21.5316925048828, 21.5417289733887, 21.5517635345459, 21.5617980957031, 21.571834564209, 21.5818691253662, 21.5919055938721, 21.6019401550293, 21.6119747161865, 21.6220111846924, 21.6320457458496, 21.6420803070068, 21.6521167755127, 21.6621513366699, 21.6721878051758, 21.682222366333, 21.6922569274902, 21.7022933959961, 21.7123279571533, 21.7223625183105, 21.7323989868164, 21.7424335479736, 21.7524700164795, 21.7625045776367, 21.7725391387939, 21.7825756072998, 21.792610168457, 21.8026447296143, 21.8126811981201, 21.8227157592773, 21.8327522277832, 21.8427867889404, 21.8528213500977, 21.8628578186035, 21.8728923797607, 21.882926940918, 21.8929634094238, 21.9029979705811, 21.9130344390869, 21.9230690002441, 21.9331035614014, 21.9431400299072, 21.9531745910645, 21.9632091522217, 21.9732456207275, 21.9832801818848, 21.993314743042, 22.0033512115479, 22.0133857727051, 22.0234222412109, 22.0334568023682, 22.0434913635254, 22.0535278320313, 22.0635623931885, 22.0735969543457, 22.0836334228516, 22.0936679840088, 22.1037044525146, 22.1137390136719, 22.1237735748291, 22.133810043335, 22.1438446044922, 22.1538791656494, 22.1639156341553, 22.1739501953125, 22.1839866638184, 22.1940212249756, 22.2040557861328, 22.2140922546387, 22.2241268157959, 22.2341613769531, 22.244197845459, 22.2542324066162, 22.2642688751221, 22.2743034362793, 22.2843379974365, 22.2943744659424, 22.3044090270996, 22.3144435882568, 22.3244800567627, 22.3345146179199, 22.3445510864258, 22.354585647583, 22.3646202087402, 22.3746566772461, 22.3846912384033, 22.3947257995605, 22.4047622680664, 22.4147968292236, 22.4248332977295, 22.4348678588867, 22.4449024200439, 22.4549388885498, 22.464973449707, 22.4750080108643, 22.4850444793701, 22.4950790405273, 22.5051155090332, 22.5151500701904, 22.5251846313477, 22.5352210998535, 22.5452556610107, 22.555290222168, 22.5653266906738, 22.5753612518311, 22.5853977203369, 22.5954322814941, 22.6054668426514, 22.6155033111572, 22.6255378723145, 22.6355724334717, 22.6456089019775, 22.6556434631348, 22.6656799316406, 22.6757144927979, 22.6857490539551, 22.6957855224609, 22.7058200836182, 22.7158546447754, 22.7258911132813, 22.7359256744385, 22.7459621429443, 22.7559967041016, 22.7660312652588, 22.7760677337646, 22.7861022949219, 22.7961368560791, 22.806173324585, 22.8162078857422, 22.8262424468994, 22.8362789154053, 22.8463134765625, 22.8563499450684, 22.8663845062256, 22.8764190673828, 22.8864555358887, 22.8964900970459, 22.9065246582031, 22.916561126709, 22.9265956878662, 22.9366321563721, 22.9466667175293, 22.9567012786865, 22.9667377471924, 22.9767723083496, 22.9868068695068, 22.9968433380127, 23.0068778991699, 23.0169143676758, 23.026948928833, 23.0369834899902, 23.0470199584961, 23.0570545196533, 23.0670890808105, 23.0771255493164, 23.0871601104736, 23.0971965789795, 23.1072311401367, 23.1172657012939, 23.1273021697998, 23.137336730957, 23.1473712921143, 23.1574077606201, 23.1674423217773, 23.1774787902832, 23.1875133514404, 23.1975479125977, 23.2075843811035, 23.2176189422607, 23.227653503418, 23.2376899719238, 23.2477245330811, 23.2577610015869, 23.2677955627441, 23.2778301239014, 23.2878665924072, 23.2979011535645, 23.3079357147217, 23.3179721832275, 23.3280067443848, 23.3380432128906, 23.3480777740479, 23.3581123352051, 23.3681488037109, 23.3781833648682, 23.3882179260254, 23.3982543945313, 23.4082889556885, 23.4183254241943, 23.4283599853516, 23.4383945465088, 23.4484310150146, 23.4584655761719, 23.4685001373291, 23.478536605835, 23.4885711669922, 23.498607635498, 23.5086421966553, 23.5186767578125, 23.5287132263184, 23.5387477874756, 23.5487823486328, 23.5588188171387, 23.5688533782959, 23.5788879394531, 23.588924407959, 23.5989589691162, 23.6089954376221, 23.6190299987793, 23.6290645599365, 23.6391010284424, 23.6491355895996, 23.6591701507568, 23.6692066192627, 23.6792411804199, 23.6892776489258, 23.699312210083, 23.7093467712402, 23.7193832397461, 23.7294178009033, 23.7394523620605, 23.7494888305664, 23.7595233917236, 23.7695598602295, 23.7795944213867, 23.7896289825439, 23.7996654510498, 23.809700012207, 23.8197345733643, 23.8297710418701, 23.8398056030273, 23.8498420715332, 23.8598766326904, 23.8699111938477, 23.8799476623535, 23.8899822235107, 23.900016784668, 23.9100532531738, 23.9200878143311, 23.9301242828369, 23.9401588439941, 23.9501934051514, 23.9602298736572, 23.9702644348145, 23.9802989959717, 23.9903354644775, 24.0003700256348, 24.0104064941406, 24.0204410552979, 24.0304756164551, 24.0405120849609, 24.0505466461182, 24.0605812072754, 24.0706176757813, 24.0806522369385, 24.0906887054443, 24.1007232666016, 24.1107578277588, 24.1207942962646, 24.1308288574219, 24.1408634185791, 24.150899887085, 24.1609344482422, 24.170970916748, 24.1810054779053, 24.1910400390625, 24.2010765075684, 24.2111110687256, 24.2211456298828, 24.2311820983887, 24.2412166595459, 24.2512531280518, 24.261287689209, 24.2713222503662, 24.2813587188721, 24.2913932800293, 24.3014278411865, 24.3114643096924, 24.3214988708496, 24.3315353393555, 24.3415699005127, 24.3516044616699, 24.3616409301758, 24.371675491333, 24.3817100524902, 24.3917465209961, 24.4017810821533, 24.4118156433105, 24.4218521118164, 24.4318866729736, 24.4419231414795, 24.4519577026367, 24.4619922637939, 24.4720287322998, 24.482063293457, 24.4920978546143, 24.5021343231201, 24.5121688842773, 24.5222053527832, 24.5322399139404, 24.5422744750977, 24.5523109436035, 24.5623455047607, 24.572380065918, 24.5824165344238, 24.5924510955811, 24.6024875640869, 24.6125221252441, 24.6225566864014, 24.6325931549072, 24.6426277160645, 24.6526622772217, 24.6626987457275, 24.6727333068848, 24.6827697753906, 24.6928043365479, 24.7028388977051, 24.7128753662109, 24.7229099273682, 24.7329444885254, 24.7429809570313, 24.7530155181885, 24.7630519866943, 24.7730865478516, 24.7831211090088, 24.7931575775146, 24.8031921386719, 24.8132266998291, 24.823263168335, 24.8332977294922, 24.843334197998, 24.8533687591553, 24.8634033203125, 24.8734397888184, 24.8834743499756, 24.8935089111328, 24.9035453796387, 24.9135799407959, 24.9236164093018, 24.933650970459, 24.9436855316162, 24.9537220001221, 24.9637565612793, 24.9737911224365, 24.9838275909424, 24.9938621520996, 25.0038986206055, 25.0139331817627, 25.0239677429199, 25.0340042114258, 25.044038772583, 25.0540733337402, 25.0641098022461, 25.0741443634033, 25.0841808319092, 25.0942153930664, 25.1042499542236, 25.1142864227295, 25.1243209838867, 25.1343555450439, 25.1443920135498, 25.154426574707, 25.1644611358643, 25.1744976043701, 25.1845321655273, 25.1945686340332, 25.2046031951904, 25.2146377563477, 25.2246742248535, 25.2347087860107, 25.244743347168, 25.2547798156738, 25.2648143768311, 25.2748508453369, 25.2848854064941, 25.2949199676514, 25.3049564361572, 25.3149909973145, 25.3250255584717, 25.3350620269775, 25.3450965881348, 25.3551330566406, 25.3651676177979, 25.3752021789551, 25.3852386474609, 25.3952732086182, 25.4053077697754, 25.4153442382813, 25.4253787994385, 25.4354152679443, 25.4454498291016, 25.4554843902588, 25.4655208587646, 25.4755554199219, 25.4855899810791, 25.495626449585, 25.5056610107422, 25.515697479248, 25.5257320404053, 25.5357666015625, 25.5458030700684, 25.5558376312256, 25.5658721923828, 25.5759086608887, 25.5859432220459, 25.5959796905518, 25.606014251709, 25.6160488128662, 25.6260852813721, 25.6361198425293, 25.6461544036865, 25.6561908721924, 25.6662254333496, 25.6762619018555, 25.6862964630127, 25.6963310241699, 25.7063674926758, 25.716402053833, 25.7264366149902, 25.7364730834961, 25.7465076446533, 25.7565441131592, 25.7665786743164, 25.7766132354736, 25.7866497039795, 25.7966842651367, 25.8067188262939, 25.8167552947998, 25.826789855957, 25.8368263244629, 25.8468608856201, 25.8568954467773, 25.8669319152832, 25.8769664764404, 25.8870010375977, 25.8970375061035, 25.9070720672607, 25.9171085357666, 25.9271430969238, 25.9371776580811, 25.9472141265869, 25.9572486877441, 25.9672832489014, 25.9773197174072, 25.9873542785645, 25.9973888397217, 26.0074253082275, 26.0174598693848, 26.0274963378906, 26.0375308990479, 26.0475654602051, 26.0576019287109, 26.0676364898682, 26.0776710510254, 26.0877075195313, 26.0977420806885, 26.1077785491943, 26.1178131103516, 26.1278476715088, 26.1378841400146, 26.1479187011719, 26.1579532623291, 26.167989730835, 26.1780242919922, 26.188060760498, 26.1980953216553, 26.2081298828125, 26.2181663513184, 26.2282009124756, 26.2382354736328, 26.2482719421387, 26.2583065032959, 26.2683429718018, 26.278377532959, 26.2884120941162, 26.2984485626221, 26.3084831237793, 26.3185176849365, 26.3285541534424, 26.3385887145996, 26.3486251831055, 26.3586597442627, 26.3686943054199, 26.3787307739258, 26.388765335083, 26.3987998962402, 26.4088363647461, 26.4188709259033, 26.4289073944092, 26.4389419555664, 26.4489765167236, 26.4590129852295, 26.4690475463867, 26.4790821075439, 26.4891185760498, 26.499153137207, 26.5091896057129, 26.5192241668701, 26.5292587280273, 26.5392951965332, 26.5493297576904, 26.5593643188477, 26.5694007873535, 26.5794353485107, 26.5894718170166, 26.5995063781738, 26.6095409393311, 26.6195774078369, 26.6296119689941, 26.6396465301514, 26.6496829986572, 26.6597175598145, 26.6697540283203, 26.6797885894775, 26.6898231506348, 26.6998596191406, 26.7098941802979, 26.7199287414551, 26.7299652099609, 26.7399997711182 ;

knutfrode commented 3 years ago

I cannot see any problem with these files. Can you post some more details about your original problem?

limaolin1981611 commented 3 years ago

05:51:23 INFO: OpenDriftSimulation initialised (version 1.3.0) 05:51:23 INFO: Opening dataset: E:\rescue\doc\SAR\roms_wrf\20200821\WRF_TaiWanZhouBian_2020082100_t0*.nc 05:51:23 INFO: Opening files with MFDataset Traceback (most recent call last): File "leeway_point_fun.py", line 11, in leeway_point(wind_uv_file, water_uv_file, lon_input, lat_input, radius_input, number_input, objectType_input, year_start_input, month_start_input, day_start_input, hour_start_input, min_start_input, sec_start_input, duration_input_hours, time_step_input_seconds, time_step_output_input_seconds, outdir) File "E:\rescue\doc\SAR\opendrift-master\leeway_fun.py", line 21, in leeway_point reader_wind_uv=reader_netCDF_CF_generic.Reader(wind_uv_file) File "E:\rescue\doc\SAR\opendrift-master\opendrift\readers\reader_netCDF_CF_generic.py", line 317, in init if rel_delta_x > 0.05: # Allow 5 % deviation ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

limaolin1981611 commented 3 years ago

20200821-0.zip

limaolin1981611 commented 3 years ago

I have upload the wind and current files.

knutfrode commented 3 years ago

In your WRF-files the variables x and y claim to contain projection coordinates, however these are empty.

I can read your files after removing these variables from the file with ncks -x -v x,y WRF_TaiWanZhouBian_2020082100_t001.nc out.nc

After this, variables longitude and latitude are used instead of x and y.

limaolin1981611 commented 3 years ago

thanks,I have delated the variables x and y, It's OK now.