[MITgcm-devel] exf_interp and grib data
Martin Losch
Martin.Losch at awi.de
Tue Mar 24 14:00:32 EDT 2015
Hi Jean-Michel,
I guess you are right and my code does not really work properly, at least I totally forgot the UV part.
2. ind_s and w switch their meaning for latinc <0, so that part should be OK, but not sure right now.
I am on the run to catch the vacation train. Lets sort that out when I return.
Martin
> On 24.03.2015, at 16:27, Jean-Michel Campin <jmc at ocean.mit.edu> wrote:
>
> Hi Martin,
>
> I've just took a quick look at the changes you made in exf_interp.F
> and I have few questions:
> 1) I am not sure about the poles treatment (from line 139 to 175)
> when lat_inc is < 0.
> 2) and I am not sure I am fully getting the logic:
> the model grid point lat is found to be between y_in(s_ind)
> and y_in(s_ind-1) (at least it's what we check on line 412, right ?)
> But in S/R EXF_INTERPOLATE, we use s_ind and s_ind+1 values,
> so I am confused.
> Or is it that s_ind is no longer the index of the data point
> that is just south of the model point ?
> The experiment global_with_exf is great but it does not really
> use the interpolation coeff since the data grid and model grid
> are the same.
> 3) seem that S/R EXF_INTERP_UV should also have been modified (or
> put some check and stop there) in case lat_inc < 0.
>
> Cheers,
> Jean-Michel
>
>> On Fri, Mar 13, 2015 at 03:00:16PM +0100, Martin Losch wrote:
>> Yes, all in global_with_exf/input
>>
>> Martin
>>
>>> On 13 Mar 2015, at 14:45, Jean-Michel Campin <jmc at ocean.mit.edu> wrote:
>>>
>>> Hi Martin,
>>>
>>> You can go for it. The new wind-stress file could stay in
>>> global_with_exf/input
>>> does not need to be in tutorial_global_oce_latlon/input, right ?
>>>
>>> Cheers,
>>> Jean-Michel
>>>
>>>> On Thu, Mar 12, 2015 at 05:02:47PM +0100, Martin Losch wrote:
>>>> I think I found a way to do this. Since it is not so difficult after all, I’d like to check in the code.
>>>>
>>>> We could test this with some (maybe just one?) of the files in global_with_exf, which is the only experiment that tests the interpolation code anyway.
>>>> I can get perfect agreement with “trenberth_taux.bin" flipped (I call this now trenberth_taux.flipped”), and
>>>> ustress_lat0 = 78.,
>>>> ustress_lat_inc = 39*-4.,
>>>>
>>>> The only problem with this test is, that it will increase the size of the MITgcm download by the size of trenberth_taux.bin (well, 169kB). What do you think?
>>>>
>>>> Martin
>>>>
>>>>
>>>>
>>>>> On 12 Mar 2015, at 15:26, Martin Losch <Martin.Losch at awi.de> wrote:
>>>>>
>>>>> Hi Jean-Michel,
>>>>>
>>>>> I tried to add code for the case of y_in(0)>y_in(nyIn+1) (or lat_inc<0), but wasn’t successful.
>>>>> I guess I need to understand this code first, but before I seriously try, do you think it’s worth it?
>>>>>
>>>>> Is this the only place where this assumption is made? Or maybe there’s something exf_interpolate.F as well?
>>>>>
>>>>> Martin
>>>>>
>>>>>> On 12 Mar 2015, at 14:15, Jean-Michel Campin <jmc at ocean.mit.edu> wrote:
>>>>>>
>>>>>> Hi Martin,
>>>>>>
>>>>>> I did not check carefully, but I vagely remember that exf-interp assumes
>>>>>> lat_inc > 0 (& lon_inc > 0). For instance, exf_interp.F, lines 350-357:
>>>>>> IF ( w_ind(i,j).GT.s_ind(i,j)+1 ) THEN
>>>>>> k = NINT( (s_ind(i,j)+w_ind(i,j))*0.5 )
>>>>>> IF ( yG(i,j,bi,bj) .LT. y_in(k) ) THEN
>>>>>> w_ind(i,j) = k
>>>>>> ELSE
>>>>>> s_ind(i,j) = k
>>>>>> ENDIF
>>>>>> ENDIF
>>>>>> In theory, should be possible to (re-)write the code for the case
>>>>>> of negative increment but, except if I am wrong, this is not presently the case.
>>>>>>
>>>>>> Cheers,
>>>>>> Jean-Michel
>>>>>>
>>>>>>> On Thu, Mar 12, 2015 at 11:18:41AM +0100, Martin Losch wrote:
>>>>>>> Hi there
>>>>>>>
>>>>>>> I am trying to convert (on the fly) atmospheric data in grib format into ieee-be so that I can use exf (exf_interp) to read it.
>>>>>>> The grb data seems to put the index (i,j) = (1,1) at the top left (NW) corner, whereas we expect (i,j)=(1,1) to be at the bottom right (SW) corner of the gridded data field. For technical reasons, it would be simpler to not have to flip the forcing fields (I would like to use wgrib <http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html>, which can produce ieee-be fields from grib data, but doesn’t seem to be able to do the N to S-flip), so that my data.exf entry would look like this:
>>>>>>>
>>>>>>> ${var}_lat0 = 78,
>>>>>>> ${var}_lat_inc = 39*-4.,
>>>>>>>
>>>>>>> instead of
>>>>>>> ${var}_lat0 = -78,
>>>>>>> ${var}_lat_inc = 39*4.,
>>>>>>>
>>>>>>> Appart from the fact, that the routine exf_interp checks if the forcing grid “encompasses” the model grid (which it does technically), and this fails (because the check also expects lat0 to be the southern-most latitude), can exf_interp handle this situation properly? (a simple test with global_with_exf suggests, that it does not, but why?)
>>>>>>>
>>>>>>> Martin
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> MITgcm-devel mailing list
>>>>>>> MITgcm-devel at mitgcm.org
>>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>>>>
>>>>>> _______________________________________________
>>>>>> MITgcm-devel mailing list
>>>>>> MITgcm-devel at mitgcm.org
>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> MITgcm-devel mailing list
>>>>> MITgcm-devel at mitgcm.org
>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>>
>>>>
>>>> _______________________________________________
>>>> MITgcm-devel mailing list
>>>> MITgcm-devel at mitgcm.org
>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>
>>> _______________________________________________
>>> MITgcm-devel mailing list
>>> MITgcm-devel at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>
>>
>> _______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list