For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the expressions derived for use with NEMO.
268 real,
intent(in),
dimension(:) :: T
269 real,
intent(in),
dimension(:) :: S
270 real,
intent(in),
dimension(:) :: pressure
271 real,
intent(out),
dimension(:) :: drho_dT
273 real,
intent(out),
dimension(:) :: drho_dS
275 integer,
intent(in) :: start
276 integer,
intent(in) :: npts
279 real :: zp,zt , zh , zs , zr0, zn , zn0, zn1, zn2, zn3
282 do j=start,start+npts-1
286 zp = pressure(j)* pa2db
292 zs = sqrt( abs( zs + rdeltas ) * r1_s0 )
297 zn2 = alp012*zt + alp102*zs+alp002
300 & + alp121*zs+alp021)*zt &
301 & + (alp211*zs+alp111)*zs+alp011)*zt &
302 & + ((alp301*zs+alp201)*zs+alp101)*zs+alp001
304 zn0 = ((((alp050*zt &
305 & + alp140*zs+alp040)*zt &
306 & + (alp230*zs+alp130)*zs+alp030)*zt &
307 & + ((alp320*zs+alp220)*zs+alp120)*zs+alp020)*zt &
308 & + (((alp410*zs+alp310)*zs+alp210)*zs+alp110)*zs+alp010)*zt &
309 & + ((((alp500*zs+alp400)*zs+alp300)*zs+alp200)*zs+alp100)*zs+alp000
311 zn = ( ( zn3 * zp + zn2 ) * zp + zn1 ) * zp + zn0
319 zn2 = bet012*zt + bet102*zs+bet002
322 & + bet121*zs+bet021)*zt &
323 & + (bet211*zs+bet111)*zs+bet011)*zt &
324 & + ((bet301*zs+bet201)*zs+bet101)*zs+bet001
326 zn0 = ((((bet050*zt &
327 & + bet140*zs+bet040)*zt &
328 & + (bet230*zs+bet130)*zs+bet030)*zt &
329 & + ((bet320*zs+bet220)*zs+bet120)*zs+bet020)*zt &
330 & + (((bet410*zs+bet310)*zs+bet210)*zs+bet110)*zs+bet010)*zt &
331 & + ((((bet500*zs+bet400)*zs+bet300)*zs+bet200)*zs+bet100)*zs+bet000
333 zn = ( ( zn3 * zp + zn2 ) * zp + zn1 ) * zp + zn0