[MITgcm-support] (no subject)
Jeremy Miller
jeremysharonmiller at gmail.com
Fri Apr 23 01:02:37 EDT 2021
Dear Michael,all,
Disregard that last email, and thanks for your suggestion - I realize now
that those were just warnings and seemingly do not affect the data written
in the run file.
Deleting execName did not help things, but recompiling from scratch did
solve the problem, as well as deleting all the meta files and data files.
Thanks Michael, and Martin.
Best
Jeremy
On Fri, 23 Apr 2021 at 07:52, Jeremy Miller <jeremysharonmiller at gmail.com>
wrote:
> Dear Michael,
>
> No, I was not deleting the execName or rebuilding after editing SIZE.h and data. Following your suggestion, I deleted run/mitgcmuv and rebuilt using the following commands:
>
> cd build
> ../../../tools/genmake2 -enable=kl10 -mods ../code
> make depend
> make
> cd ..
>
> cd run
> ln -s ../input/* .
> ln -s ../build/mitgcmuv .
> ./mitgcmuv > output.txt
>
> After the final command I get the following errors:
>
> ** WARNING ** PACKAGES_CHECK: useMNC is TRUE
> ** WARNING ** but pkg/mnc has not been compiled (#undef ALLOW_MNC)
> STOP NORMAL END
>
>
> On Thu, 22 Apr 2021 at 19:43, Michael Schaferkotter <
> schaferk at bellsouth.net> wrote:
>
>> 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
>>
>> _______________________________________________
>> 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/20210423/8a442345/attachment-0001.html>
More information about the MITgcm-support
mailing list