|
71 | 71 | "import re\n", |
72 | 72 | "\n", |
73 | 73 | "from netCDF4 import Dataset,num2date\n", |
74 | | - "from shapely.geometry import box, Point, Polygon" |
| 74 | + "from shapely.geometry import box, Point, Polygon\n", |
| 75 | + "\n", |
| 76 | + "print(f\" Copernicus Marine Toolbox version: {cm.__version__}\")\n", |
| 77 | + "print(f\" Python version: {sys.version}\")" |
75 | 78 | ] |
76 | 79 | }, |
77 | 80 | { |
|
227 | 230 | "metadata": {}, |
228 | 231 | "outputs": [], |
229 | 232 | "source": [ |
| 233 | + "cm.login()\n", |
| 234 | + "\n", |
230 | 235 | "if modelproduct == 'anfc':\n", |
231 | 236 | " print(\"Check if anfc product land-sea mask is already available or download it.\")\n", |
232 | 237 | " LS_mask = LS_mask_dir+'/MED-MFC_006_013_mask_bathy.nc'\n", |
|
383 | 388 | " reader = csv.DictReader(csvfile, delimiter=',')\n", |
384 | 389 | "\n", |
385 | 390 | " for row in reader:\n", |
386 | | - " \n", |
| 391 | + " \n", |
387 | 392 | " # Read platform code\n", |
388 | 393 | " platform_code = row['platform_code']\n", |
389 | 394 | " print(f\"** Start processing platform {platform_code} for download\")\n", |
|
478 | 483 | " logT.write(msg + \"\\n\") \n", |
479 | 484 | " continue\n", |
480 | 485 | " except Exception as e:\n", |
481 | | - " msg = f\"Unexpected error for platform {platform_code} at depth={depth}: {e}\"\n", |
| 486 | + " msg = f\"Unexpected error for platform {platform_code}\"\n", |
482 | 487 | " print(msg)\n", |
483 | 488 | " with open(log_fileT, 'a') as logT:\n", |
484 | 489 | " logT.write(msg + \"\\n\") \n", |
|
574 | 579 | " logT.write(msg + \"\\n\") \n", |
575 | 580 | " continue\n", |
576 | 581 | " except Exception as e:\n", |
577 | | - " msg = f\"Unexpected error for platform {platform_code} at depth={depth}: {e}\"\n", |
| 582 | + " msg = f\"Unexpected error for platform {platform_code}\"\n", |
578 | 583 | " print(msg)\n", |
579 | 584 | " with open(log_fileT, 'a') as logT:\n", |
580 | 585 | " logT.write(msg + \"\\n\") \n", |
|
815 | 820 | " modS_nc.setncattr('SOURCE_field_type', attr_value)\n", |
816 | 821 | " modS_nc.delncattr('field_type') \n" |
817 | 822 | ] |
818 | | - }, |
819 | | - { |
820 | | - "cell_type": "code", |
821 | | - "execution_count": null, |
822 | | - "id": "a9f22a89-5b95-404d-9de9-573cdaaf0b8d", |
823 | | - "metadata": {}, |
824 | | - "outputs": [], |
825 | | - "source": [] |
826 | 823 | } |
827 | 824 | ], |
828 | 825 | "metadata": { |
|
841 | 838 | "name": "python", |
842 | 839 | "nbconvert_exporter": "python", |
843 | 840 | "pygments_lexer": "ipython3", |
844 | | - "version": "3.10.18" |
| 841 | + "version": "3.13.7" |
845 | 842 | } |
846 | 843 | }, |
847 | 844 | "nbformat": 4, |
|
0 commit comments