[MITgcm-support] (no subject)

Michael Schaferkotter schaferk at bellsouth.net
Thu Apr 22 06:46:33 EDT 2021


just making sure...

after edit of SIZE.h and namelist in data you did
1. rm ExecName, where ExecName is the name of the executable
2. rebuild

m. r. schaferkotter

Sent from Here3.

> On Apr 22, 2021, at 01:20, Jeremy Miller <jeremysharonmiller at gmail.com> wrote:
> 
> 
> Hi Martin,
> 
> Thanks for coming back to me. 
> 
> 1. I have now attached the files "SIZE.h" and "data".
> 
> 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. 
> 
> 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.
> Nt=100 is declared at the start of the script and the same value  of Nt is used when writing nTimeSteps = 100 in line 53 of "data", and when 
> reading the field  using T =mds.rdmds(’T’,Nt) .
> 
> That snippet T =mds.rdmds(’T’,Nt) returns:
> 
> ValueError: cannot reshape array of size 1200 into shape (20,64)
> 
> 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),
> the size of T is consistent with  Nx=60 such that  Nx * Nz = 60*20 = 1200.
> 
> Thank you, once again, in advance.
> Best
> Jeremy
> 
>> On Wed, 21 Apr 2021 at 14:43, Martin Losch <Martin.Losch at awi.de> wrote:
>> Hi Jeremy,
>> 
>> 1. it’s nearly impossible to tell what’s going on if you don’t provide the changed files (SIZE.h, data)
>> 
>> 2. Did you acutally change Nx? You should never do that, but rather change sNx (and if necessary nSx, nPx)
>> 
>> 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
>> 
>> Martin
>> 
>> > On 20. Apr 2021, at 14:29, Jeremy Miller <jeremysharonmiller at gmail.com> wrote:
>> > 
>> > Dear MITgcm forum,
>> > 
>> > Hope all are well. I have a couple of questions about the internal wave tutorial.
>> > 
>> > 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:
>> > 
>> > Fortran runtime error: Cannot match namelist object name -0.0440182
>> > 
>> > Error termination. Backtrace:
>> > #0  0x7f0d178d1d3a
>> > #1  0x7f0d178d2849
>> > 
>> > etc.
>> > 
>> > I changed Nr in input/data in the relevant lines:
>> > 
>> > Line 8: Tref =  0.0484200, ..... -0.0484200 (20 values),  -> Tref =  0.0486517,..., -0.0486517, (22 values)
>> > Line 14: sRef= 20*35. ->  sRef= 22*35.,
>> > Line 70: delZ=22*10., -> delZ=22*9.,
>> > 
>> > and I changed the relevant lines in code/SIZE.h and code/SIZE.h_mpi:
>> > 
>> > Line 55:      &           Nr  =  20) ->      &           Nr  =  22)
>> > 
>> > 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)
>> > 
>> > T = mds.rdmds('T',Nt);
>> > T_vals = T.reshape(Nz,Nx)
>> > 
>> > I get the error
>> > 
>> > ValueError: cannot reshape array of size 1200 into shape (20,100)
>> > 
>> > i.e. the results data has not been reshaped according to the new Nx=100. 
>> > _______________________________________________
>> > MITgcm-support mailing list
>> > MITgcm-support at mitgcm.org
>> > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>> 
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> 
> <SIZE.h>
> <data>
> <tut_IWs.py>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20210422/08dbb644/attachment.html>


More information about the MITgcm-support mailing list