[MITgcm-support] Error while creating bathymery : ini_masks_etc
Camille Mazoyer
mazoyer at univ-tln.fr
Tue Jan 31 11:28:09 EST 2017
Thanks all for your replies and all your ideas.
Le 31/01/2017 03:26, Gus Correa a écrit :
> On 01/30/2017 05:35 PM, Jody Klymak wrote:
>> Hi Camille,
>>
>> Its not really clear what you are doing. Did you save a depth file and
>> are reading it in with bathyFile='topo.bin’, (or whatever you named
>> it?).
Yes.
>> The most obvious error would be that you saved some NaNs in that
>> file.
Yeesssss!!!!!!! Thanks a lot.
It was the problem! I made a mistake in Matlab while creating my
bathymetry file, and I had NaN values.
Thank you very much.
>
> ... or perhaps 32-bit vs. 64-bit floating point ...
> ... or also big-endian vs. little-endian floating point ...
> ... both of which can be a source of confusion and distress.
> Check how you created the file first.
> (Matlab has fine control of both.)
>
> In MITgcm, reading 32-bit vs. 64-bit can be controlled via
>
> readBinaryPrec=32 (or 64) in the "data" file, &PARM01 namelist.
>
> Big-endian vs. little-endian in compiler flags such as
> -fconvert=big-endian (gfortran), -convert big_endian (Intel ifort).
>
Thank you also for these ideas, even if in my case, it appears to be a
NaN values problem.
Cheers,
Camille
>
> I hope this helps,
> Gus Correa
>
>
>> If you are masking out land or something, set those values to zero
>> instead of NaN, and I think things should work.
>>
>> Good luck,
>>
>> Jody
>>
>>
>>> On 28 Jan 2017, at 14:58 PM, Camille Mazoyer <mazoyer at univ-tln.fr
>>> <mailto:mazoyer at univ-tln.fr>> wrote:
>>>
>>> Dear all,
>>>
>>> I am creating a new bathymetry for a Bay (Toulon Bay, France). My grid
>>> is a 200x100x130 points grid.
>>> I want to generate a netcdf bathymetry file for step one: for that, I
>>> have no OBC, no initial state files.
>>> I have a binary bathymetry file and binary levels file.
>>> I use debugging options.
>>>
>>> I have a floating invalid problem that I don't understand.
>>> It's in ini_masks_etc.f, so I decided to modify the code with some
>>> "write toto" lines:
>>>
>>> 65 C o Non-dimensional distance between grid bound. and domain
>>> lower_R bound.
>>> 66 hFacCtmp = (rF(k)-R_low(i,j,bi,bj))*recip_drF(k)
>>> 67 ! cmzy
>>> 68 write(*,*) 'i,j,k',i,j,k
>>> 69 write(*,*) 'rF(k)',rF(k)
>>> 70 write(*,*) 'hFacCtmpR_low(i,j,bi,bj)',R_low(i,j,bi,bj)
>>> 71 write(*,*) 'recip_drF(k)',recip_drF(k)
>>> 72 write(*,*) 'hFacCtmp',hFacCtmp
>>> 73 C o Select between, closed, open or partial (0,1,0-1)
>>> 74 hFacCtmp=min( max( hFacCtmp, 0. _d 0) , 1. _d 0)
>>>
>>> And here is the output:
>>>
>>> ** Warning ** CAL_READPARMS: ignores "data.cal" file since
>>> ** Warning ** CAL_READPARMS: useCAL= F (set from "data.pkg")
>>> i,j,k -2 -2 1
>>> rF(k) 0.000000000000000E+000
>>> hFacCtmpR_low(i,j,bi,bj) NaN
>>> recip_drF(k) 1.00000000000000
>>> hFacCtmp NaN
>>> forrtl: error (65): floating invalid
>>> Image PC Routine Line Source
>>> mitgcmuv 0000000001730315 Unknown Unknown Unknown
>>> mitgcmuv 000000000172DF37 Unknown Unknown Unknown
>>> mitgcmuv 00000000016E4382 Unknown Unknown Unknown
>>> mitgcmuv 00000000016E41D6 Unknown Unknown Unknown
>>> mitgcmuv 000000000167CE25 Unknown Unknown Unknown
>>> mitgcmuv 00000000016805B7 Unknown Unknown Unknown
>>> libpthread.so.0 0000003AC5C0F710 Unknown Unknown Unknown
>>> mitgcmuv 0000000000410D92 ini_masks_etc_ 3151
>>> ini_masks_etc.f
>>> mitgcmuv 00000000014EDC49 initialise_fixed_ 1857
>>> initialise_fixed.f
>>> mitgcmuv 00000000015F89EA the_model_main_ 2382
>>> the_model_main.f
>>> mitgcmuv 000000000113CEAF MAIN__ 3919 main.f
>>> mitgcmuv 000000000040F41E Unknown Unknown Unknown
>>> libc.so.6 0000003AC541ED5D Unknown Unknown Unknown
>>> mitgcmuv 000000000040F329 Unknown Unknown Unknown
>>>
>>> Do you have any idea to help me? any test?
>>> I don't really understand what's going on....
>>> I must admit that I don't know why there is a point i=-2, j=-2 , and
>>> why the rfk = 0 there.... I thought my Levels file was ok.
>>> If somebody has already encounter this error?
>>>
>>> Thanks for any advice,
>>> Camille
>>>
>>> --
>>> ------------------------------------------
>>> Camille Mazoyer
>>> Phd Student
>>> Mediterranean Institute of Oceanography (MIO)
>>> Institut de Mathématiques de Toulon (IMATH)
>>> Université de TOULON
>>> Bat X - CS 60584
>>> 83041 TOULON cedex 9
>>> France
>>> tel: +33.4.94.14.24.50
>>> Email: mazoyer at univ-tln.fr <mailto:mazoyer at univ-tln.fr>
>>> http://mio.pytheas.univ-amu.fr/
>>> http://imath.fr/
>>>
>>>
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>> --
>> Jody Klymak
>> http://web.uvic.ca/~jklymak/
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
--
------------------------------------------
Camille Mazoyer
Phd Student
Mediterranean Institute of Oceanography (MIO)
Institut de Mathématiques de Toulon (IMATH)
Université de TOULON
Bat X - CS 60584
83041 TOULON cedex 9
France
tel: +33.4.94.14.24.50
Email: mazoyer at univ-tln.fr
http://mio.pytheas.univ-amu.fr/
http://imath.fr/
More information about the MITgcm-support
mailing list