[MITgcm-devel] lab_sea sensitivity between platforms/compilers
David Ferreira
dfer at mit.edu
Fri Jul 17 10:32:28 EDT 2009
Hi Martin,
> In the EVP code there is a line
> deltaCreg = SQRT(MAX(deltaC,SEAICE_EPS_SQ))
> If you replace this line with
> deltaCreg = SQRT(deltaC)/(SQRT(deltaC)+SEAICE_EPS)
It doesn't look like these 2 are equivalent.
Also, what about something like :
IF deltaC >= SEAICE_EPS_SQ
deltaCreg =SQRT(deltaC)
else
deltaCreg = SEAICE_EPS
end
it adds a "IF" but remove a "MAX" ... Not sure which one costs more
david
> the number of matching digits increase from 5 to 12 (for cg2d) for the
> lab_sea/input experiment, between a
> Linux csysl18 2.6.22.19-0.2-bigsmp #1 SMP 2008-12-18 10:17:03 +0100
> i686 i686 i386
> gfortran (gcc version 4.2.1)
> and a
> Darwin csysm15.dmawi.de 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31
> 22:52:17 PDT 2009; gfortran (gcc version 4.3.1)
>
> Both expressions give about the same results for large DeltaC, but
> still I would like to find out what would be the correct replacement
> of the SQRT(MAX(deltaC,SEAICE_EPS_SQ)). Here's what did *NOT* work:
> deltaCreg = max(sqrt(deltaC),seaice_eps)
> deltaCreg = sqrt(dmax1(deltaC,seaice_eps_sq))
> deltaCreg = SQRT(MAX(DBLE(deltaC),DBLE(SEAICE_EPS_SQ)))
> deltaCreg = SQRT(MAX(SEAICE_EPS_SQ,deltaC))
>
> Any idea, what might be going on? If I cannot solve this problem I
> would suggest replacing this expression with the more stable one, also
> in seaice_calc_viscosities (although it will change all results).
>
> Martin
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list