[MITgcm-support] Fw: OB*file interpolation

Martin Losch Martin.Losch at awi.de
Fri Mar 16 07:14:27 EDT 2007


Riema,

I may have been a little sloppy in describing exp4: The open boundary  
files actually contain two time slabs (for testing), but because in  
data periodicExternalForcing is not set to true, time independent  
forcing (and open boundaries) are assumed by default and only the  
first time slab is used.

OK, but in your case you want to prescribe hourly values for 19 days,  
that is 24*19=456 time slabs, so you field must have the size (Nx,Nr, 
456) for a southern or northern boundary and (Ny,Nr,456) for an  
eastern or western boundary (Nr=Nz=number of vertical points).
If you want to specify a "barotropic" open boundary in/outflow, then  
for each time slab you have to have a fields like this, eg. for a  
soutern or northern boundary:
for t=1:456
for z=1:nr
for x=1:nx
uob(x,z,t) = U(t)
end;end;end
if U(t) is your time series.

your File U_AOK.IN contains 1140 real*4 values with the following  
range/mean:
Min 4.2563e-31  Max 0.00017648  Mean 7.6306e-06  SD 3.1229e-05
(At least that's what I read in with matlab:
> fid=fopen('U_AOK.IN','r','b');
> v=fread(fid,inf,'real*4');
) so that is 2.5 times the 456 number of times that you need (and the  
distribution looks strange). If you use this as U(t) then the model  
will only read the first 456 time slabs and disregard the rest, so no  
problem specifying it, but they will not affect your simulation. The  
456 time slabs will be interpolate (linearly) in time between the  
hourly values to your 1.5sec time steps, but only specified at the  
open boundary. (not in the interior unless you use a sponge layer)

Does that answer you question? I am not sure ...


Martin

On 16 Mar 2007, at 08:53, Riema Rachmayani wrote:

> dear MITgcm,
>
>
>
> sorry i send message again in other subject...this is about OB*file  
> interpolation, my previous message was about  baroclinic,  
> barotropic and bathyfile...
>
>
>
> Martin, i'm trying your suggestion about OB file in your last  
> message :
>
> Martin :
>
> exp4 gives an example of how to specify CONSTANT (in time) open
> boundary values from files:
>   useOBCSprescribe = .TRUE., (enables reading from files in general)
>   OBNuFile = 'OBmeridU.bin', (example of a file)
> [...]
> these files were generated with exp4/input/gendata.m. The script tell
> you that a filed for the northern (southern) boundary should have the
> dimension (nx,nr) and for eastern (western), (ny,nr).
>
>
>
> in data.obcs of exp4 :
>
> # OBNuFile = 'OBmeridU.bin',
> # OBSuFile = 'OBmeridU.bin',
> # OBWuFile = 'OBzonalU.bin',
> # OBEuFile = 'OBzonalU.bin',
> # OBWsFile = 'OBzonalS.bin',
>
>
>
> i checked dimension of OBmeridU ==> (80,8) for 2 iteration time  
> independent ??
>
> i checked dimension of OBzonalU ==> (42,8) for 2 iteration time  
> independent ??
>
>
>
> Martin :
>
> If you want to specify time dependent boundary values you can do that
> too. For example, you have hourly data you have create a field
> (nx,nr,nt), where nt is the number of "hours" you have. and then you
> use the parameters
>    periodicExternalForcing=.TRUE.,
>    externForcingPeriod=3600.,
> in the file "data", in namelist PARM03. If your data is the same
> after say 12 hour (ie., that you want to use the fields repeatedly)
> then add this parameter in data
>   externForcingCycle=43200.,
>
>
>
> in data file my case :
>
> # Time stepping parameters
>  &PARM03
>  niter0=0,
>  nTimeSteps=1641600,
>  deltaT=1.5,
>  abEps=0.1,
>  pChkptFreq=0.0,
>  chkptFreq=0.0,
>  dumpFreq=11160.,
>  monitorFreq=2500.,
> # for time dependent open boundary conditions comment
> # in the following three lines
>  periodicExternalForcing=.TRUE.,
>  externForcingPeriod=3600.,
>  externForcingCycle=1641600.,
>  &
>
>
>
> is that correct???
>
>
>
> i have value of velocity at one point for 19 days (attachment file  
> =U_AOK.IN), that file just for an example, i have other file for  
> other point. I mean i pick out a point to other point, for example  
> at north open boundary, i picked out point A (tip point at west)==> 
> (Nx,Ny,Nr)==>(1,1,1), and then i picked out point B (tip point at  
> east))==>(Nx,Ny,Nr)==>(111,1,1).
>
>
>
> i still confused, in my attachment file U_AOK.IN, i only have 1  
> value for 1 point every 1 hour for 19 days like i told you before,  
> mean while in exp4 case, OBmeridU was already in (nx,nr,nt)==> 
> (80,8,2)...so in data.obcs wrote OBNuFile = 'OBmeridU.bin, what  
> about my case? i only have 1 point for 19 days
>
>
>
> what i want to do is to interpolate value in U_AOK.IN in spatial  
> (inner of point A and point B) and in time just like you said... 
> (Martin : Forgot to say: the model does the interpolation in time  
> to each   timestep, but that's "only" a linear interpolation)
>
>
>
> so what i have to do with my U_AOK.IN file to get what i want??  
> interpolate in time first (how the code configuration in data file  
> or data.obcs or other routine) and then interpolate in spatial (how  
> the code configuration in data file or data.obcs or other routine)  
> or vice versa???
>
>
>
> thank you martin, i hope my questions is clear enough for you...
>
> i'll wait for your reply...i really need this...
>
> thank you...
>
> best regards,
>
> rima
>
>
>
>
>
>
>
>
>
> Send instant messages to your online friends http:// 
> uk.messenger.yahoo.com
> <U_AOK.IN>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list