<div><div dir="auto">Hi <span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Estanislao,</span></div></div><div dir="auto"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br></span></div><div dir="auto"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"> Could you try the Matlab code once again with prec=real*8 and see if model crashes again?</span></div><div dir="auto"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br></span></div><div dir="auto"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">regards</span></div><div dir="auto"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px">Kaveh</span></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat 24. Aug 2019 at 03:09, Estanislao Gavilan Pascual-Ahuir <<a href="mailto:dramauh@hotmail.com">dramauh@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Martin</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I am not sure i<span style="font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255);display:inline!important">f that is the problem because I used readbin.m to check the input files and the matrix were correct. This is the MATLAB
 code I used. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>% creat N time slabs for testing</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span><span> ieee='b';<br>
</span><span> prec='real*4';</span><br>
</span>
<div>v0=0.0041;<br>
</div>
<div>N=100<br>
</div>
<div>vvel=ones(13,2,N); <br>
</div>
<div>uMerid=zeros(13,2,N); <br>
</div>
<div>for i=1:N<br>
</div>
<div>vZonal(:,:,i)=v0*vvel(:,:,i)*i/N;</div>
<div>end</div>
<div>fid=fopen('OBmeridU.bin','w',ieee); fwrite(fid,uMerid,prec);fclose(fid);</div>
<div>fid=fopen('OBzonalV.bin','w',ieee); fwrite(fid,vZonal,prec); <span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">fclose(fid);</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">I have even tried to use your code, but the files do not change the size. They are always 11KB</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><span>% creat N time slabs for testing<br>
</span>
<div>v0=0.0041;<br>
</div>
<div>N=100<br>
</div>
<div>vvel=ones(13,2,N); <br>
</div>
<div>uMerid=zeros(13,2,N); <br>
</div>
<div>for i=1:N<br>
</div>
<div> vZonal(:,:,i)=v0*vvel(:,:,i)*i/N;<br>
</div>
<div>end<br>
</div>
<div>fid=fopen('OBmeridU.bin','w',ieee); <br>
</div>
<div>for i=1:N<br>
</div>
<div>fwrite(fid,squeeze(uMerid(:,:,i)),prec);<br>
</div>
<div>end<br>
</div>
<div>fclose(fid);<br>
</div>
<div>fid=fopen('OBzonalV.bin','w',ieee); <br>
</div>
<div>for i=1:N<br>
</div>
<div>fwrite(fid,squeeze(vZonal(:,:,i)),prec);<br>
</div>
<div>end<br>
</div>
<span>fclose(fid);</span><br>
</span></div>
<div><br>
</div>
<div>Kind regards,</div>
<div><br>
</div>
<div>Estanislao</div>
</div>
<div id="m_1280224536763659394appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_1280224536763659394divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org" target="_blank">mitgcm-support-bounces@mitgcm.org</a>> en nombre de <a href="mailto:mitgcm-support-request@mitgcm.org" target="_blank">mitgcm-support-request@mitgcm.org</a> <<a href="mailto:mitgcm-support-request@mitgcm.org" target="_blank">mitgcm-support-request@mitgcm.org</a>><br>
<b>Enviado:</b> viernes, 23 de agosto de 2019 18:00<br>
<b>Para:</b> <a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a> <<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a>><br>
<b>Asunto:</b> MITgcm-support Digest, Vol 194, Issue 14</font>
<div> </div>
</div>
<div class="m_1280224536763659394BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="m_1280224536763659394PlainText">Send MITgcm-support mailing list submissions to<br>
        <a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:mitgcm-support-request@mitgcm.org" target="_blank">mitgcm-support-request@mitgcm.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mitgcm-support-owner@mitgcm.org" target="_blank">mitgcm-support-owner@mitgcm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of MITgcm-support digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Reading errors (Martin Losch)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 23 Aug 2019 10:02:49 +0200<br>
From: Martin Losch <<a href="mailto:Martin.Losch@awi.de" target="_blank">Martin.Losch@awi.de</a>><br>
To: MITgcm Support <<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a>><br>
Subject: Re: [MITgcm-support] Reading errors<br>
Message-ID: <<a href="mailto:1AB158B6-A07E-43EB-A3F6-6530BDE345C9@awi.de" target="_blank">1AB158B6-A07E-43EB-A3F6-6530BDE345C9@awi.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Estanis,<br>
<br>
this most likely means that your OBzonalV.bin is ?too short?.<br>
Guess from you parameters you'll need fields with dimension (nt,nz,nx) = (100,2,43). In you data file you do not specify the ?readBinaryPrec?, so that will default to ?real*4?, single precision, ?float32?, but check in your stdout, so in python this would mean
 writing a file like this:<br>
<br>
import numpy as np<br>
import sys<br>
nt=100<br>
nx=43<br>
nz=2<br>
<br>
data = np.zeros((nt,nz,nx),dtype=?float32') # or some other values, but dtype is important<br>
if sys.byteorder == 'little': data.byteswap(True)<br>
#<br>
fid = open(?OBzonalV.bin',"wb")<br>
data.tofile(fid)<br>
fid.close()<br>
# switch back to machine format<br>
if sys.byteorder == 'little': data.byteswap(True)<br>
<br>
With this I get a file of this size:<br>
<br>
>>> du -h ./OBzonalV.bin<br>
 36K     ./OBzonalV.bin<br>
<br>
>>> ls -l OBzonalV.bin<br>
-rw-r--r--  1 mlosch  DMAWI\KLI04  34400 Aug 23 09:53 OBzonalV.bin<br>
<br>
<br>
# in matlab it would be similar, but note the different order of dimensions:<br>
data = zeros(nx,nz,nt);<br>
accuracy = ?real*4?;<br>
[fid message] = fopen(?OBzonalV.bin','w','ieee-be');<br>
count = fwrite(fid,data,accuracy);<br>
for k=1:nt<br>
  fwrite(fid,squeeze(data(:,:,k)),accuracy);<br>
end<br>
fclose(fid);<br>
<br>
<br>
<br>
About the NETCDF_ROOT and other INCLUDES: this file is meant to be as generic as possible, i.e. the code at the end of the build options file will look for paths in the usual places. In 95% of the cases this works. If you have a special installation, you might
 want to hard-wire the paths, as you have done, then you don?t need the rest anymore. Alternatively you could set the environment varialbes NETCDF_ROOT and MPI_INC_DIR, e.g. like this<br>
<br>
export NETCDF_ROOT=/WORK/app/netcdf/4.3.2/01-CF-14/<br>
export MPI_INC_DIR=/usr/local/mpi3-dynamic/include<br>
<br>
***before*** you run genmake2, then it should work, too.<br>
<br>
Martin<br>
<br>
> On 23. Aug 2019, at 04:37, Estanislao Gavilan Pascual-Ahuir <<a href="mailto:dramauh@hotmail.com" target="_blank">dramauh@hotmail.com</a>> wrote:<br>
> <br>
> <br>
> Hi Martin and Jean-Michel<br>
>   I still have the error forrtl: severe (36): attempt to access non-existent record, unit 16, file /bblablabla/run/OBzonalV.bin. In addition, I saw this message after doing make depend f90mkdepend: no source file found for module this. I am no sure if this
 is important.<br>
> <br>
> I followed your advice. I start doing a simulation in serial mode without obcs and the model ran perfectly fine. Once I opened the obcs (i.e. useOBCS= TRUE), I had that error. Following the architecture of my cluster change a little bit the linux_ia64_ifort.
 By the way, do I need the last set of conditions of NETCDF_ROOT and netcdf test? I was thinking to remove them.<br>
> <br>
> Kind regards,<br>
> <br>
> Estanis<br>
> <br>
> #!/bin/bash<br>
> #<br>
> # Tested on <a href="http://uv100.awi.de" target="_blank">uv100.awi.de</a> (SGI UV 100, details:<br>
> #                         <a href="http://www.sgi.com/products/servers/uv/specs.html" target="_blank">
http://www.sgi.com/products/servers/uv/specs.html</a>)<br>
> # a) For more speed, provided your data size does not exceed 2GB you can<br>
> #    remove -fPIC which carries a performance penalty of 2-6%.<br>
> # b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may<br>
> #    perform faster than -fPIC and still support data sizes over 2GB per<br>
> #    process but all the libraries you link to must be compiled with<br>
> #    -fPIC or -mcmodel=medium<br>
> # c) flags adjusted for ifort 12.1.0<br>
> <br>
> FC=ifort<br>
> F90C=ifort<br>
> CC=icc<br>
> # requires that all static libraries are available:<br>
> #LINK='ifort -static'<br>
> LINK='ifort'<br>
> # for adjoint runs the default makedepend often cannot handle enough files<br>
> #MAKEDEPEND=tools_xmakedepend<br>
> <br>
> DEFINES='-DWORDLENGTH=4'<br>
> CPP='cpp -traditional -P'<br>
> F90FIXEDFORMAT='-fixed -Tf'<br>
> EXTENDED_SRC_FLAG='-132'<br>
> #OMPFLAG='-openmp'<br>
> <br>
> NOOPTFLAGS="-O0 -g -m64"<br>
> NOOPTFILES=''<br>
> <br>
> MCMODEL='-fPIC'<br>
> # for large memory requirements uncomment this line<br>
> #MCMODEL='-mcmodel=medium -shared-intel'<br>
> <br>
> FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl $MCMODEL"<br>
> #- might want to use '-r8' for fizhi pkg:<br>
> #FFLAGS="$FFLAGS -r8"<br>
> <br>
> if test "x$IEEE" = x ; then     #- with optimisation:<br>
>     FOPTIM='-O3 -align'<br>
> # does not work when -static does not work<br>
> #    FOPTIM='-fast -align'<br>
> # instead you can use<br>
> #    FOPTIM='-O3 -ipo -align'<br>
> else<br>
>   if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :<br>
>     FOPTIM='-O0 -noalign -fp-model precise'<br>
>    # -fltconsistency<br>
>   else                          #- development/check options:<br>
>     FOPTIM='-O0 -noalign -fp-model precise'<br>
>     FOPTIM="$FOPTIM -g -check all -fpe0 -traceback -ftrapuv -fp-model except -warn all"<br>
>   fi<br>
> fi<br>
> <br>
> F90FLAGS=$FFLAGS<br>
> F90OPTIM=$FOPTIM<br>
> CFLAGS="-O0 -ip $MCMODEL"<br>
> <br>
> INCLUDEDIRS=''<br>
> INCLUDES='-I. -I$NETCDF/include -I/WORK/app/netcdf/4.3.2/01-CF-14/include -I/usr/local/mpi3-dynamic/include'<br>
> LIBS='-L$NETCDF/lib -lnetcdff -lnetcdf  -I/WORK/app/netcdf/4.3.2/01-CF-14/lib'<br>
> <br>
> if [ "x$NETCDF_ROOT" != x ] ; then<br>
>    INCLUDEDIRS="${NETCDF_ROOT}/include"<br>
>     INCLUDES="-I${NETCDF_ROOT}/include"<br>
>     LIBS="-L${NETCDF_ROOT}/lib"<br>
> elif [ "x$NETCDF_HOME" != x ]; then<br>
>    INCLUDEDIRS="${NETCDF_HOME}/include"<br>
>     INCLUDES="-I${NETCDF_HOME}/include"<br>
>     LIBS="-L${NETCDF_HOME}/lib"<br>
> elif [ "x$NETCDF_INC" != x -a"x$NETCDF_LIB" != x ]; then<br>
>     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`<br>
>     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`<br>
>    INCLUDEDIRS="${NETCDF_INC}"<br>
>     INCLUDES="-I${NETCDF_INC}"<br>
>     LIBS="-L${NETCDF_LIB}"<br>
> elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then<br>
>    INCLUDEDIRS="${NETCDF_INCDIR}"<br>
>     INCLUDES="-I${NETCDF_INCDIR}"<br>
>     LIBS="-L${NETCDF_LIBDIR}"<br>
> elif test -d /usr/include/netcdf-3 ; then<br>
>    INCLUDEDIRS='/usr/include/netcdf-3'<br>
>    INCLUDES='-I/usr/include/netcdf-3'<br>
>    LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'<br>
> elif test -d /usr/include/netcdf ; then<br>
>     INCLUDEDIRS='/usr/include/netcdf'<br>
>     INCLUDES='-I/usr/include/netcdf'<br>
> elif test -d /usr/local/netcdf ; then<br>
>     INCLUDEDIRS='/usr/include/netcdf/include'<br>
>     INCLUDES='-I/usr/local/netcdf/include'<br>
>     LIBS='-L/usr/local/netcdf/lib'<br>
> elif test -d /usr/local/include/netcdf.inc ; then<br>
>     INCLUDEDIRS='/usr/local/include'<br>
>     INCLUDES='-I/usr/local/include'<br>
>     LIBS='-L/usr/local/lib64'<br>
> fi<br>
> <br>
> if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then<br>
>     LIBS="$LIBS -lmpi"<br>
>     INCLUDES="$INCLUDES -I$MPI_INC_DIR"<br>
>     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"<br>
>     #- used for parallel (MPI) DIVA<br>
>     MPIINCLUDEDIR="$MPI_INC_DIR"<br>
> fi<br>
> <br>
> <br>
> ----------------------------------------------------------------------<br>
> <br>
> Message: 1<br>
> Date: Thu, 22 Aug 2019 13:10:55 +0200<br>
> From: Martin Losch <<a href="mailto:Martin.Losch@awi.de" target="_blank">Martin.Losch@awi.de</a>><br>
> To: MITgcm Support <<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a>><br>
> Subject: Re: [MITgcm-support] Reading errors<br>
> Message-ID: <<a href="mailto:325AC4E8-1648-4C6A-BFED-7722921C733E@awi.de" target="_blank">325AC4E8-1648-4C6A-BFED-7722921C733E@awi.de</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
> <br>
> Hi Estanis,<br>
> <br>
> thanks for the details. This is what I would do:<br>
> <br>
> - At the compile level use a standard build options file, with an intel compiler on a linux system I would start with MITgcm/tools/build_options/linux_amd64_ifort, or linux_ia64_ifort (depending on the output of uname -a, in fact, genmake2 is probably able
 to pick the correct file if you don?t specify it), and since your domain is small I would first try without MPI, ie. like this:<br>
> <br>
> ${somepath}/tools/genmake2 -of ${somepath}/tools/build_options/linux_amd64_ifort -mods ../code<br>
> make CLEAN && make depend && make<br>
> <br>
> - With this non-MPI configuration I would try to run the model. First with useOBCS=.FALSE. (just a few timesteps), and then with .TRUE.<br>
> <br>
> - once this works, you can recompile with MPI (if you really need it), like this:<br>
> <br>
> ${somepath}/tools/genmake2 -of ${somepath}/tools/build_options/linux_amd64_ifort -mods ../code -mpi<br>
> make CLEAN && make depend && make<br>
> (note that the extra flag ?-mpi" is enough)<br>
> <br>
> and check if you get the same. For further help, you should record the potential error messages after each step.<br>
> <br>
> Martin<br>
> <br>
> PS. Some comments about your namelist below:<br>
> <br>
> > On 22. Aug 2019, at 12:39, Estanislao Gavilan Pascual-Ahuir <<a href="mailto:dramauh@hotmail.com" target="_blank">dramauh@hotmail.com</a>> wrote:<br>
> > <br>
> > Hi Martin ,<br>
> > <br>
> > Before anything thank you so much for your help. I will try to answer all you questions.<br>
> > <br>
> > what is the platform, the compiler?<br>
> > The platform in linux 2.6.32-431.TH.x86_64 GNU/Linux. Red Hat Enterprise Linux Server release 6.5. I am using intel compilers wrapped them in mpi. The version of the compiler is  14.0.2<br>
> > details of the configuration (content of code-directory and namelist files)<br>
> > I am running a simple simulation with open boundaries. I load the packages gfd, obcs, mnc and diagnostics  using the packages.config.  The frequency of the open boundaries is stated in the data file. This is the data file<br>
> >  Model parameters<br>
> > # Continuous equation parameters<br>
> >  &PARM01<br>
> >  tRef=23.,23.,<br>
> >  sRef=35.,35.,<br>
> >  selectCoriMap=4,<br>
> >  viscAh=4.E2,<br>
> with your grid choice (sphericalPolarGrid), the coriolis parameter is computed and these values are not used.<br>
> >  f0=1.E-4,<br>
> >  beta=1.E-11,<br>
> >  rhoNil=1000.,<br>
> >  gBaro=9.81,<br>
> >  rigidLid=.FALSE.,<br>
> >  implicitFreeSurface=.TRUE.,<br>
> > # momAdvection=.FALSE.,<br>
> >  tempStepping=.FALSE.,<br>
> >  saltStepping=.FALSE.,<br>
> >  &<br>
> > <br>
> > # Elliptic solver parameters<br>
> >  &PARM02<br>
> >  cg2dTargetResidual=1.E-7,<br>
> >  cg2dMaxIters=1000,<br>
> >  &<br>
> > <br>
> > # Time stepping parameters<br>
> >  &PARM03<br>
> >  nIter0=0,<br>
> >  nTimeSteps=100,<br>
> >  deltaT=1200.0,<br>
> >  pChkptFreq=31104000.0,<br>
> >  chkptFreq=15552000.0,<br>
> >  dumpFreq=15552000.0,<br>
> # this will give you monitor output every timestep (which is what you want while debugging), later I would set it to something like 20-50 * deltaT<br>
> >  monitorFreq=1200.,<br>
> >  monitorSelect=2,<br>
> >  periodicExternalForcing=.TRUE.,<br>
> # this means that you will read data each time step. Is that what you want?<br>
> >  externForcingPeriod= 1200.,<br>
> # with your choice of externForcingPeriod, this requires that you have 1000. records in the file(s)<br>
> >  externForcingCycle = 12000000.,<br>
> >  &<br>
> > # Gridding parameters<br>
> >  &PARM04<br>
> >  usingSphericalPolarGrid=.TRUE.,<br>
> # alternatively you can say dxSpacing = 1., dySpacing = 1.,<br>
> >  delX=43*1.,<br>
> >  delY=43*1.,<br>
> >  xgOrigin=-21.,<br>
> >  ygOrigin=-21.,<br>
> >  delR=2*500.,<br>
> >  &<br>
> > <br>
> > # Input datasets<br>
> >  &PARM05<br>
> >  bathyFile='bathy_cir.bin'<br>
> >  meridWindFile=,<br>
> >  &<br>
> > <br>
> > This is the data.obcs<br>
> > <br>
> > # Open-boundaries<br>
> >  &OBCS_PARM01<br>
> >  OBCSfixTopo=.FALSE.,<br>
> # if I understand the configuration correctly, you have a zonally reentrant channel with wall in the north and the south (python notation: bathy[0+2,:] = 0, and bathy[ny-1,:] = 0, except where you have the open boundaries)? you could actually save two grid
 rows (have 40 instead of 43 point in j-direction and set bathy[0,:]=0, bathy[ny,:]=0)<br>
> >  OB_Ieast=0,<br>
> >  OB_Iwest=0,<br>
> >  OB_Jnorth(16:28)=13*41,<br>
> >  OB_Jsouth(16:28)=13*3,<br>
> >  useOBCSprescribe = .TRUE.,<br>
> These files should be found, if they are in the same directory where you run your model. They should each contain (according to you dimensions and time parameters) for 100 timesteps 100 fields of dimension (nx,nz). For anything above 1000 timesteps, they
 should have 1000 fields (because after the 1000ths record, the model starts from the beginning again, according to you externForcingCycle)<br>
> >  OBNvFile = 'OBzonalV.bin',<br>
> >  OBSvFile = 'OBzonalV.bin',<br>
> >  OBNuFile = 'OBmeridU.bin',<br>
> >  OBSuFile = 'OBmeridU.bin?,<br>
> # same as before this will give you a lot of output. You may want to comment out this line, becasue OBCS_monitorFreq = monitorFreq by default<br>
> >  OBCS_monitorFreq=1200.00,<br>
> >  OBCS_monSelect = 1,<br>
> >  &<br>
> > <br>
> >  &OBCS_PARM02<br>
> >  &<br>
> > are you using latest code (some of the flags in the build-option look very outdated ?)?<br>
> > Yes, it is the latest code (version MITgcm_c67k). About the flags in my build version, I did not make my own one. I used one that I found in our research group.<br>
> > <br>
> > Kind regards,<br>
> > <br>
> > Estanislao<br>
> > <br>
> <br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> Message: 2<br>
> Date: Thu, 22 Aug 2019 09:33:18 -0400<br>
> From: Jean-Michel Campin <<a href="mailto:jmc@mit.edu" target="_blank">jmc@mit.edu</a>><br>
> To: <a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a><br>
> Subject: Re: [MITgcm-support] Reading errors<br>
> Message-ID: <<a href="mailto:20190822133318.GA13562@ocean.mit.edu" target="_blank">20190822133318.GA13562@ocean.mit.edu</a>><br>
> Content-Type: text/plain; charset=us-ascii<br>
> <br>
> Hi Estanis,<br>
> <br>
> Just a small adjustment: <br>
> the standard optfile for intel compiler (version 11 and newer) is:<br>
>  linux_amd64_ifort11<br>
> in MITgcm/tools/build_options<br>
> The optfile "linux_amd64_ifort" is for older version (10 and older).<br>
> <br>
> However, if you are compiling with intel MPI (recent version of the compiler),<br>
> then you need to use: linux_amd64_ifort+impi<br>
> <br>
> Cheers,<br>
> Jean-Michel<br>
> <br>
> On Thu, Aug 22, 2019 at 01:10:55PM +0200, Martin Losch wrote:<br>
> > Hi Estanis,<br>
> > <br>
> > thanks for the details. This is what I would do:<br>
> > <br>
> > - At the compile level use a standard build options file, with an intel compiler on a linux system I would start with MITgcm/tools/build_options/linux_amd64_ifort, or linux_ia64_ifort (depending on the output of uname -a, in fact, genmake2 is probably able
 to pick the correct file if you don???t specify it), and since your domain is small I would first try without MPI, ie. like this:<br>
> > <br>
> > ${somepath}/tools/genmake2 -of ${somepath}/tools/build_options/linux_amd64_ifort -mods ../code<br>
> > make CLEAN && make depend && make<br>
> > <br>
> > - With this non-MPI configuration I would try to run the model. First with useOBCS=.FALSE. (just a few timesteps), and then with .TRUE.<br>
> > <br>
> > - once this works, you can recompile with MPI (if you really need it), like this:<br>
> > <br>
> > ${somepath}/tools/genmake2 -of ${somepath}/tools/build_options/linux_amd64_ifort -mods ../code -mpi<br>
> > make CLEAN && make depend && make<br>
> > (note that the extra flag ???-mpi" is enough)<br>
> > <br>
> > and check if you get the same. For further help, you should record the potential error messages after each step.<br>
> > <br>
> > Martin<br>
> > <br>
> > PS. Some comments about your namelist below:<br>
> > <br>
> > > On 22. Aug 2019, at 12:39, Estanislao Gavilan Pascual-Ahuir <<a href="mailto:dramauh@hotmail.com" target="_blank">dramauh@hotmail.com</a>> wrote:<br>
> > > <br>
> > > Hi Martin ,<br>
> > > <br>
> > > Before anything thank you so much for your help. I will try to answer all you questions.<br>
> > > <br>
> > > what is the platform, the compiler?<br>
> > > The platform in linux 2.6.32-431.TH.x86_64 GNU/Linux. Red Hat Enterprise Linux Server release 6.5. I am using intel compilers wrapped them in mpi. The version of the compiler is  14.0.2<br>
> > > details of the configuration (content of code-directory and namelist files)<br>
> > > I am running a simple simulation with open boundaries. I load the packages gfd, obcs, mnc and diagnostics  using the packages.config.  The frequency of the open boundaries is stated in the data file. This is the data file<br>
> > >  Model parameters<br>
> > > # Continuous equation parameters<br>
> > >  &PARM01<br>
> > >  tRef=23.,23.,<br>
> > >  sRef=35.,35.,<br>
> > >  selectCoriMap=4,<br>
> > >  viscAh=4.E2,<br>
> > with your grid choice (sphericalPolarGrid), the coriolis parameter is computed and these values are not used.<br>
> > >  f0=1.E-4,<br>
> > >  beta=1.E-11,<br>
> > >  rhoNil=1000.,<br>
> > >  gBaro=9.81,<br>
> > >  rigidLid=.FALSE.,<br>
> > >  implicitFreeSurface=.TRUE.,<br>
> > > # momAdvection=.FALSE.,<br>
> > >  tempStepping=.FALSE.,<br>
> > >  saltStepping=.FALSE.,<br>
> > >  &<br>
> > > <br>
> > > # Elliptic solver parameters<br>
> > >  &PARM02<br>
> > >  cg2dTargetResidual=1.E-7,<br>
> > >  cg2dMaxIters=1000,<br>
> > >  &<br>
> > > <br>
> > > # Time stepping parameters<br>
> > >  &PARM03<br>
> > >  nIter0=0,<br>
> > >  nTimeSteps=100,<br>
> > >  deltaT=1200.0,<br>
> > >  pChkptFreq=31104000.0,<br>
> > >  chkptFreq=15552000.0,<br>
> > >  dumpFreq=15552000.0,<br>
> > # this will give you monitor output every timestep (which is what you want while debugging), later I would set it to something like 20-50 * deltaT<br>
> > >  monitorFreq=1200.,<br>
> > >  monitorSelect=2,<br>
> > >  periodicExternalForcing=.TRUE.,<br>
> > # this means that you will read data each time step. Is that what you want?<br>
> > >  externForcingPeriod= 1200.,<br>
> > # with your choice of externForcingPeriod, this requires that you have 1000. records in the file(s)<br>
> > >  externForcingCycle = 12000000.,<br>
> > >  &<br>
> > > # Gridding parameters<br>
> > >  &PARM04<br>
> > >  usingSphericalPolarGrid=.TRUE.,<br>
> > # alternatively you can say dxSpacing = 1., dySpacing = 1.,<br>
> > >  delX=43*1.,<br>
> > >  delY=43*1.,<br>
> > >  xgOrigin=-21.,<br>
> > >  ygOrigin=-21.,<br>
> > >  delR=2*500.,<br>
> > >  &<br>
> > > <br>
> > > # Input datasets<br>
> > >  &PARM05<br>
> > >  bathyFile='bathy_cir.bin'<br>
> > >  meridWindFile=,<br>
> > >  &<br>
> > > <br>
> > > This is the data.obcs<br>
> > > <br>
> > > # Open-boundaries<br>
> > >  &OBCS_PARM01<br>
> > >  OBCSfixTopo=.FALSE.,<br>
> > # if I understand the configuration correctly, you have a zonally reentrant channel with wall in the north and the south (python notation: bathy[0+2,:] = 0, and bathy[ny-1,:] = 0, except where you have the open boundaries)? you could actually save two grid
 rows (have 40 instead of 43 point in j-direction and set bathy[0,:]=0, bathy[ny,:]=0)<br>
> > >  OB_Ieast=0,<br>
> > >  OB_Iwest=0,<br>
> > >  OB_Jnorth(16:28)=13*41,<br>
> > >  OB_Jsouth(16:28)=13*3,<br>
> > >  useOBCSprescribe = .TRUE.,<br>
> > These files should be found, if they are in the same directory where you run your model. They should each contain (according to you dimensions and time parameters) for 100 timesteps 100 fields of dimension (nx,nz). For anything above 1000 timesteps, they
 should have 1000 fields (because after the 1000ths record, the model starts from the beginning again, according to you externForcingCycle)<br>
> > >  OBNvFile = 'OBzonalV.bin',<br>
> > >  OBSvFile = 'OBzonalV.bin',<br>
> > >  OBNuFile = 'OBmeridU.bin',<br>
> > >  OBSuFile = 'OBmeridU.bin???,<br>
> > # same as before this will give you a lot of output. You may want to comment out this line, becasue OBCS_monitorFreq = monitorFreq by default<br>
> > >  OBCS_monitorFreq=1200.00,<br>
> > >  OBCS_monSelect = 1,<br>
> > >  &<br>
> > > <br>
> > >  &OBCS_PARM02<br>
> > >  &<br>
> > > are you using latest code (some of the flags in the build-option look very outdated ?)?<br>
> > > Yes, it is the latest code (version MITgcm_c67k). About the flags in my build version, I did not make my own one. I used one that I found in our research group.<br>
> > > <br>
> > > Kind regards,<br>
> > > <br>
> > > Estanislao<br>
> > > <br>
> > <br>
> > _______________________________________________<br>
> > MITgcm-support mailing list<br>
> > <a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
> > <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> Subject: Digest Footer<br>
> <br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> <a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
> <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> End of MITgcm-support Digest, Vol 194, Issue 12<br>
> ***********************************************<br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> <a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
> <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
<br>
<br>
------------------------------<br>
<br>
End of MITgcm-support Digest, Vol 194, Issue 14<br>
***********************************************<br>
</div>
</span></font></div>
</div>

_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div></div>