Skip to content

Converting NetCDF file from Delft3D to Netcdf for Opendrift #1431

Answered by GuiCruz
GuiCruz asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to convert the Delft3D NetCDF file for OpenDrift, but I had to make some modifications to the code. The issue seemed to be with the TIME variable I created and the time_step in o.run(time_step=600). I didn't fully understand why this happened, but here is the code that worked:

`
import datetime
import utm
from pyproj import CRS
from opendrift.readers import reader_netCDF_CF_generic
from opendrift.readers import reader_netCDF_CF_unstructured
from opendrift.readers import reader_shape
from opendrift.readers import reader_global_landmask
from opendrift.models.oceandrift import OceanDrift
from scipy.interpolate import griddata
import numpy as np
import netCDF4 as nc
import matplotli…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GuiCruz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant