File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 3131 "metadata" : {},
3232 "outputs" : [],
3333 "source" : [
34+ " import gsw # The package to calculate density from temperature, salinity and depth\n " ,
3435 " import numpy as np\n " ,
3536 " import xarray as xr\n " ,
3637 " \n " ,
7879 " pclass=GSWParticle,\n " ,
7980 " lon=[32],\n " ,
8081 " lat=[-31],\n " ,
81- " depth =[200],\n " ,
82+ " z =[200],\n " ,
8283 " )"
8384 ]
8485 },
9899 "outputs" : [],
99100 "source" : [
100101 " def ParcelsGSW(particles, fieldset):\n " ,
101- " import gsw\n " ,
102- " \n " ,
103102 " particles.temp = fieldset.thetao[particles]\n " ,
104103 " particles.salt = fieldset.so[particles]\n " ,
105- " pressure = gsw.p_from_z(-particles.depth , particles.lat)\n " ,
104+ " pressure = gsw.p_from_z(-particles.z , particles.lat)\n " ,
106105 " particles.density = gsw.density.rho(particles.salt, particles.temp, pressure)"
107106 ]
108107 },
You can’t perform that action at this time.
0 commit comments