Closed ledgint closed 1 year ago
Can you describe more precisely what you did, and what was the output?
I am trying to use uncomment postprocessing part in example file "example_radionuclides.py", i suppose cannot uncomment code properly to make postprocessing part work but log says o.conc_mask = reader_norkyst.land_binary_mask ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Reader' object has no attribute 'land_binary_mask'
or another error
Traceback (most recent call last):
File "c:\Users\skota\Documents\work\opendrift\example_radionuclides.py", line 152, in
TypeError: 'NoneType' object is not subscriptable
I confirm I get the same error when uncommenting these lines.
@magnesim Can these uncommented lines in example_radionucleides be updated so that they work, or eventually be deleted from this example script?
But i am also interested in using postpocessing of this model in another file. If it ever will be possible, of course
Magne has now updated example_readionucleides (https://github.com/OpenDrift/opendrift/commit/544a7308febb4f0d612310a9edc7e82636417610), and it seem to work now: https://opendrift.github.io/gallery/example_radionuclides.html#sphx-glr-gallery-example-radionuclides-py
Note that last command does not produce a plot, but a netCDF-file with concentrations, that can be viewed with e.g. ncview
i used this script but changed dataset to Barents sea: reader_norkyst = reader_netCDF_CF_generic.Reader('https://thredds.met.no/thredds/dodsC/fou-hi/barents_eps_zdepth_be')
i did only this change!
But i had error:
File "C:\GIT\opendrift\opendrift\models\basemodel.py", line 2910, in run raise ValueError( ValueError: No more active or scheduled elements, quitting.
12:31:19 INFO opendrift.models.basemodel:2949: "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity', 'sea_floor_depth_below_sea_level']", 'The simulation stopped before requested end time was reached.'
12:31:19 INFO opendrift.models.basemodel:2952: ======================== Traceback (most recent call last): File "C:\GIT\opendrift\opendrift\models\basemodel.py", line 2910, in run raise ValueError( ValueError: No more active or scheduled elements, quitting.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\GIT\opendrift\projects\example_radionuclides (1).py", line 102, in
I suppose dataset doesnt have variables, but it probably does. Can I fix it somehow?
The Barents ocean model has a different coverage in both time and space, so if you replace that, you would also need to update your script accordingly.
If you use loglevel=0
you can see in the log the details about what happens.
Its now on loglevel=0
it covers seeds area but error says dataset doesnt have variables, if i understand it right
I tryed running example-radionuclides-py with postpocessing feature, but for me its no resoults. I have errors as "'NoneType' object is not subscriptable" or 'Reader' object has no attribute 'land_binary_mask' Do you have any solution to apply?