[Thread Prev][Thread Next][Index]

[ferret_users] Why does ferret fail to support swapping integral and differential?



Based on calculus, in a fixed domain, the integral and differential
could be swapped. 

Basically, d/dx(Int{a:b}u(x,y) dy) = Int{a:b}(du(x,y)/dx) dy

But Ferret could not support it. Here is a code to do the test

First,  an integral is performed in Y direction, and then a differential
in X direction. 
Second, an differential is performed in X direction, and then an
integral in y direction. 

I expect the result is almost the same. But from the result, there are
big differences. 

use coads_climatology
set region/x=340:350/y=40:50/l=1
let UWND_iin= UWND[y=@iin]
let UWND_iin_ddb = UWND_iin[x=@ddb]
let UWND_ddb = UWND[x=@ddb]
let UWND_ddb_iin = UWND_ddb[y=@iin]
list UWND_ddb_iin
             VARIABLE : UWND_DDB[Y=@IIN]
             FILENAME : coads_climatology.cdf
             FILEPATH : /contrib/ferret-5.22//data/
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             TIME     : 16-JAN      06:00
               19W    17W    15W    13W    11W   
              161    162    163    164    165
 49N   / 70:  0.231 -2.136 -0.327 -1.634 -2.852
 47N   / 69: -0.342 -1.077 -0.369 -1.615 -2.513
 45N   / 68: -0.641 -0.924  0.486 -2.642 -1.725
 43N   / 67: -0.236 -0.497 -0.051 -1.943 -1.921
 41N   / 66: -0.071 -0.255  0.198 -1.417 -1.029
list UWND_iin_ddb
             VARIABLE : UWND_IIN[X=@DDB]
             FILENAME : coads_climatology.cdf
             FILEPATH : /contrib/ferret-5.22//data/
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             TIME     : 16-JAN      06:00
               19W    17W    15W    13W    11W   
              161    162    163    164    165
 49N   / 70:  0.182 -2.242 -0.318 -1.921 -3.125
 47N   / 69: -0.376 -1.137 -0.346 -1.830 -2.680
 45N   / 68: -0.651 -0.950  0.491 -2.755 -1.825
 43N   / 67: -0.238 -0.505 -0.044 -1.988 -1.953
 41N   / 66: -0.071 -0.255  0.198 -1.417 -1.029
Best regards

Feng He 
Center for Climate Research
Atmospheric and Oceanic Sciences
University of Wisconsin - Madison

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement