ocgabs / Caribbean

NEMO regional configuration of the Caribbean
GNU General Public License v3.0
0 stars 0 forks source link

Run test Sargassum tracking experiments #19

Open ocgabs opened 3 years ago

ocgabs commented 3 years ago

This is EXP0 described in Done task: "Design particle tracking experiments." Uniform seeding on the Caribbean Sea, seasonal releases tracking for 3 months. It will be great to get 3 years of this for the visualization output (extra funding).

A simple python script to run PARCELS on the Caribbean model is at: /projectsa/NEMO/gmaya/CollabVG/test_val.py

It takes a simple text file with starting locations as input, for the preliminary experiments you will need to generate one that seeds uniformly the Caribbean sea. The release time is controlled by ts and tt this is in seconds from the first NEMO file read in. On a previous project I was using a bash script to generate folders for each release and modifying accordingly ts.

ocgabs commented 3 years ago

I am giving this a try on livljobs8 at /projectsa/CME/3DCaribbeanNEMO/PARCELS/UnifEXP with: the 2km uniform seeds: /projectsa/CME/3DCaribbeanNEMO/Seeds/Unif2kmResCaribe.csv and my old PARCELS environment module load anaconda source activate /work/gmaya/pparcels starting from test_val.py modified as Unif2kmT1.py and using 25 hr velocity files for 2011, not tracking T&S to start. Run PRACEL script with 20 processors: mpirun -n 20 python Unif2kmT1.py

Scary moment because if I do: module load anaconda source activate /work/gmaya/pparcels I get: ImportError: No module named parcels from parcels import FieldSet, ParticleSet, ScipyParticle, JITParticle, AdvectionRK4, ParticleFile, Variable ImportError: No module named parcels

Without loading the anaconda module it does try to do something!!!

ocgabs commented 3 years ago

WARNING: Casting lon data to np.float32 WARNING: Casting lat data to np.float32 WARNING: Casting depth data to np.float32

I think the normal thing is that only depth data gets casted!

xception ignored in: <bound method ParticleFile.del of <parcels.particlefile.ParticleFile object at 0x7f8ec0794438>> Traceback (most recent call last): File "/work/gmaya/pparcels/lib/python3.6/site-packages/parcels/particlefile.py", line 195, in del self.close() File "/work/gmaya/pparcels/lib/python3.6/site-packages/parcels/particlefile.py", line 200, in close self.export() File "/work/gmaya/pparcels/lib/python3.6/site-packages/parcels/particlefile.py", line 350, in export raise RuntimeError("No npy files found in %s" % self.tempwritedir_base) RuntimeError: No npy files found in out-GKXVPGWX Traceback (most recent call last): File "Unif2kmT1.py", line 72, in pset.execute(k_adv, runtime=delta(days=30), dt=delta(minutes=70), output_file=ParticleFile("Unif2kmT1.nc", pset, outputdt=delta(hours=24)), recovery={ErrorCode.Error: DeleteParticle}) NameError: name 'ErrorCode' is not defined

I sort of remember this ErrorCode thing got introduced when adding T & S tracking, going back to activate that (k_sample kernel)

IT's WORKING!!!

ETA just <4 min!!! (will brush my theet)

ocgabs commented 3 years ago

It finishes without complaining and TSunif2kmT1.nc gets created!!! Et voila! using the PlotParcelsOutput.py in this folder! (elsewhere versions are missing from random import randint) I get this beautiful spaghetti plot with 100 trajectories. image Life is beautiful, we can do this!!

mpayopayo commented 3 years ago

@ocgabs Nice! I'll try once I have an operative parcels -Max is reinstalling everything since he was getting the same error as I was ("NameError: name 'open' is not defined").

For the seeding file:

mpayopayo commented 3 years ago

RE previous on https://github.com/ocgabs/Caribbean/issues/25

ocgabs commented 3 years ago

/projectsa/CME/3DCaribbeanNEMO/PARCELS/UnifEXP/Unif2km1h.py Uses hourly velocity fields. Max estimated time for a 1 month run with dt=10 min goes up to 2:30 hrs! Running now.

ocgabs commented 3 years ago

Had to restart it because I lost the VPN connection 15 min before it finished. Took 2:45 hrs to finish! need to plot to see differences with the 25 hrs... This was also done at: /projectsa/CME/3DCaribbeanNEMO/PARCELS/UnifEXP Unif2km25h.py is the cleaned script for 2 km seeding & 25 h velocity fields the output is TSunif2kmT1.nc The latest script is Unif2km1hr.py and the output TSunif2km1h.nc