<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">just making sure...<div><br></div><div>after edit of SIZE.h and namelist in data you did</div><div>1. rm ExecName, where ExecName is the name of the executable</div><div>2. rebuild</div><div><br></div><div>m. r. schaferkotter<br><br><div dir="ltr">Sent from Here3.</div><div dir="ltr"><br><blockquote type="cite">On Apr 22, 2021, at 01:20, Jeremy Miller <jeremysharonmiller@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Hi Martin,</div><div><br></div><div>Thanks for coming back to me. </div><div><br></div><div>1. I have now attached the files "SIZE.h" and "data".</div><div><br></div><div>2. I have changed the following values from the default values: in the data file , Nx=64. In the SIZE.h file, sNx=32, leaving Nx as is in SIZE.h, and leaving the following as default: nSz = 2, nPx = 1 to satisfy Nx = sNx*nSx*nPx. </div><div><br></div><div>For clarity, I've attached the python script used to write the files "data" and "SIZE.h", each time before running the code, as well as to open the meta file and plot the fields. Before running the code each time, I now delete the ".meta" and ".data" files in the "run" folder.</div><div>Nt=100 is declared at the start of the script and <i>the same value </i>of Nt is used when writing nTimeSteps = 100 in line 53 of "data", and when </div><div>reading the field using T =mds.rdmds(’T’,Nt) .</div><div><br></div><div>That snippet T =mds.rdmds(’T’,Nt) returns:</div><div><br></div><div>ValueError: cannot reshape array of size 1200 into shape (20,64)</div><div><br></div><div>and when checking the size directly with the snippet T.shape, it returns the value '1200', suggesting that despite the change Nx=64 (and Nz=20 left fixed),</div><div>the size of T is consistent with Nx=60 such that Nx * Nz = 60*20 = 1200.</div><div><br></div>Thank you, once again, in advance.<div>Best</div><div>Jeremy</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 21 Apr 2021 at 14:43, Martin Losch <<a href="mailto:Martin.Losch@awi.de">Martin.Losch@awi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Jeremy,<br>
<br>
1. it’s nearly impossible to tell what’s going on if you don’t provide the changed files (SIZE.h, data)<br>
<br>
2. Did you acutally change Nx? You should never do that, but rather change sNx (and if necessary nSx, nPx)<br>
<br>
T =mds.rdmds(’T’,Nt) should give you the correct field already, provided that Nt is a timestep number that you actually saved. Did you check the *.meta file? Sometimes it makes sense to remove all *.data *.meta files before rerunning, because the model overwrites them<br>
<br>
Martin<br>
<br>
> On 20. Apr 2021, at 14:29, Jeremy Miller <<a href="mailto:jeremysharonmiller@gmail.com" target="_blank">jeremysharonmiller@gmail.com</a>> wrote:<br>
> <br>
> Dear MITgcm forum,<br>
> <br>
> Hope all are well. I have a couple of questions about the internal wave tutorial.<br>
> <br>
> 1. I am trying to change Nr, the number of cells in the z-direction. When changing it from 20 (the default) foe example to 22, at run-time I get the error:<br>
> <br>
> Fortran runtime error: Cannot match namelist object name -0.0440182<br>
> <br>
> Error termination. Backtrace:<br>
> #0 0x7f0d178d1d3a<br>
> #1 0x7f0d178d2849<br>
> <br>
> etc.<br>
> <br>
> I changed Nr in input/data in the relevant lines:<br>
> <br>
> Line 8: Tref = 0.0484200, ..... -0.0484200 (20 values), -> Tref = 0.0486517,..., -0.0486517, (22 values)<br>
> Line 14: sRef= 20*35. -> sRef= 22*35.,<br>
> Line 70: delZ=22*10., -> delZ=22*9.,<br>
> <br>
> and I changed the relevant lines in code/SIZE.h and code/SIZE.h_mpi:<br>
> <br>
> Line 55: & Nr = 20) -> & Nr = 22)<br>
> <br>
> 2. Changing Nx (the number of slices in the x direction) from the default 60 to, say 100, in data and SIZE.h as above, the code runs, but when trying to read the temperature data back in from the file 'T.0000000100.002.001.meta', then resize the array in python with the snippet (with Nz=20, Nx=100)<br>
> <br>
> T = mds.rdmds('T',Nt);<br>
> T_vals = T.reshape(Nz,Nx)<br>
> <br>
> I get the error<br>
> <br>
> ValueError: cannot reshape array of size 1200 into shape (20,100)<br>
> <br>
> i.e. the results data has not been reshaped according to the new Nx=100. <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" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><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" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div></div></div>
<div><SIZE.h></div><div><data></div><div><tut_IWs.py></div><span>_______________________________________________</span><br><span>MITgcm-support mailing list</span><br><span>MITgcm-support@mitgcm.org</span><br><span>http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</span><br></div></blockquote></div></body></html>