[MITgcm-support] precision difference between freshwater flux bin file generated with Matlab and EXFempmr diagnostics

Sandy.Gregorio at uqar.ca Sandy.Gregorio at uqar.ca
Fri Jan 5 17:31:43 EST 2018


Hi everyone,

I use mnc/exf/seaice packages. I want to "control" my freshwater flux, sflux, so I prescribe the precipitation and evaporation fields such that my sflux (=evap-precip) integrates to zero (or at least integrates to an order of 10^(-11)) at the surface.

If I look at my results, my salt in my basin increases all the time during my simulation. I compared the sflux I generate with Matlab in binary file (that is evap-precip) with my EXFempmr diag and they differ to an order of 10^(-23) (my sflux generated with Matlab integrates to 10^(-11) while my sflux from EXF integrates to 10^(-9)).

To generate my forcing files, I have tried:
fid=fopen('precip.bin','w','ieee-be.l64'); fwrite(fid,precip,'real*8'); fclose(fid);
and
fid=fopen('precip.bin','w','ieee-be'); fwrite(fid,precip,'real*8'); fclose(fid);

In data, PARM01, I have:
readBinaryPrec=64,
writeBinaryPrec=64,

In data.exf, EXF_NML_01, I have:
exf_iprec         = 64,

I have to admit that my difference is smaller since I have used double precision (first I was using real*4 and precision 32, and my EXFempmr integrated to 10^(-3) which is very bad!) but I was wondering if I could get exactly in my diags what I generated with Matlab, and where does this difference between my sflux generated with Matlab and my diags comes from.

If you have ideas/suggestions it would be very cool! By the way, I compile with ifort v15 using build-option/linux_ia64_ifort.

I wish you a wonderful year 2018 :)

Sandy


ps: I get same difference without mnc package
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20180105/43074204/attachment.html>


More information about the MITgcm-support mailing list