[MITgcm-support] Re: Re:Re: Re: OB*file interpolation

Riema Rachmayani imoth_22 at yahoo.com
Mon Mar 26 04:23:26 EDT 2007


hi martin,

1. i've run OB file just like you've told me in your last message :
rima :  > and then automatically will be interpolate lineraly by MITgcm??
          > my U_A.OK in that configuration it doesnt contains (Nx,Nr,Nt) like  
          > you told me, just contains for 1 point for 456 time slabs,is that  
          > ok??will affect my simulation?? like i told you before in my  
          > previous message that i want to interpolate in spatial (inner of  
          > point A and point B for example) and in time (linear interpolation)...
martin : NO, you need to do this (matlab code):
            fid2  = fopen('U_A.OK','r','b');
            U= fread(fid2,inf,'real*4');
            fclose(fid2);
            for t=1:456
            for z=1:nr
            for x=1:nx
            uob(x,z,t) = U(t)
            end;end;end
            fid3=fopen('U_A2D.obn','w','b');
            fwrite(fid3,uob,'real*4');
            fclose(fid3);
            and then in data.obcs
          OBNuFile = U_A2D.obn',
            and the same for your other open boundaries (and boundary values).

my code configurations in data.obcs :
# Open-boundaries
&OBCS_PARM01
OB_Jnorth=-1,
OB_Jsouth=1,
OB_Ieast=-1,
OB_Iwest=1,
useOBCSprescribe = .TRUE.,
OBEuFile = 'UE.OK',
OBNvFile = 'VF.OK',
OBSvFile = 'VB.OK',
OBWuFile = 'UA.OK',
 
just for an example, UA.OK (attachment file failed, too large=57.8 MB)  
UA.OK contains (Ny,Nr,Nt)=(255,41,720) for west open boundary (Ny=255), so contains 255 value to the right side x 29520 value downward.
 
in matlab :

load U_A.OKIN;
[m n] = size(U_A);
% write data into big endian format
fid = fopen('UA.OK','w','b'); % open new file in big endian mode
wrt = fwrite(fid,U_A,'real*8');       % write data into opened file, using stream and float64 press
fclose(fid);
% read file which is in big endian format
fid2  = fopen('UA.OK','r','b');
W= fread(fid2,[m,n],'real*8');
fclose(fid2);
 
but, i have zero value for all domain for U, V, W....i think it happen because i'm not declare  OBNuFile = U_A2D.obn' in obcs_calc.F as OBNU=......

DO K=1,Nr
DO J=1-Oly,sNy+Oly
I_obc=OB_Iw(J,bi,bj)
IF (I_obc.ne.0) THEN
OBWu(J,K,bi,bj)=OBWuFile (how to right the configuration??)
endif
enddo
enddo

am i right?? not only declare OBNuFile = U_A2D.obn' in data.obcs ?...so what i have to do??

2. from your last message too about OB*eta file
Martin     : In principle, yes, but ...
                reading Eta for the non-linear free surface is not implemented,  
                sorry. This results in eta being zero along the boundaries at all times.
                That is, you need to implement this yourself, I am afraid.
i've tried to implement it, there some routine i have to modify right?? such as obcs_readparms.F, obcs_external_fields_load.F, and obcs.h, but i have an error, and i dont know how to configure OBetafile in obcs_calc.F...can you give me a clue to implement OBetafile?? because in my real condition, i only have eta data...i have U, V data from TMD (Tidal Model Driver), but there is no specific in my domain, so the only i have to choose is eta data, if OBetafile to complicated to implement here, what should i do??

3. i've tried to smooth grid resolution from delx=dely=1850.0 m to delx=dely=100.m, in my new size.h :
PARAMETER (
& sNx = 769,     ! 111 (my old configuration)
& sNy = 3349,     ! 255 (my old configuration)
& OLx = 3,
& OLy = 3,
& nSx = 1,
& nSy = 1,
& nPx = 1,
& nPy = 1,
& Nx = sNx*nSx*nPx,
& Ny = sNy*nSy*nPy,
& Nr = 41)    

but i have an error message : 
in subroutine 'obcs_calc.f' :
error : size of variable 'grid_r' is too large
make :*** [obcs_calc.o] error 1

what is that?? because my new configuration?? what should i do??

thanks a lot martin...
i'll wait for your reply...

best regards,
rima

Send instant messages to your online friends http://uk.messenger.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20070326/063ffc64/attachment.htm>


More information about the MITgcm-support mailing list