[mpas-developers] comments on MPAS code
Laura Fowler
laura at ucar.edu
Thu May 20 08:35:15 MDT 2010
Hi Michael, Todd, and Phil:
I completely agree with Michael. As I am writing the interface between
the dynamical core and physics parameterizations, it would be great to
include corrections to those issues in my prototype version as well.
Laura
Michael Duda wrote:
> Hi, Todd and Phil.
>
> Thanks very much for the comments; I think this might be something
> worth fixing even in our current prototype, as it doesn't look
> like it would require much effort.
>
> In future, we'll definitely want to be writing code that is
> interoperable with C (using the F2003 ISO_C_BINDING module, for
> example); in your experience, are there additional considerations
> when passing values between C and Fortran? It seems like we'll
> need some way to ensure that the size of reals in C matches the
> size of reals in Fortran so that, e.g., when we pass a pointer to
> a real array from C to Fortran, the values will be correctly used
> in Fortran code.
>
> Also, for interacting with libraries such as netCDF, where we need
> to specify a kind (NF_REAL, NF_DOUBLE, etc.) as an argument to the
> library call, do either of you have any thoughts on how best to
> handle this?
>
> Cheers,
> Michael
>
>
> On Wed, May 19, 2010 at 02:25:26PM -0600, Philip Jones wrote:
>
>> Todd et al.,
>>
>>
>>> * The macro RKIND is used with values 4 or 8 to indicate
>>> either 4 or 8-byte reals.
>>>
>> Using the selected_real_kind intrinsic is a good
>> portable way to handle this.
>>
>>
>>> ... Unfortunately different compilers can have
>>> different notions of what '-r8' does,
>>>
>> Indeed, we've had very bad experiences with such
>> autopromotion in the past...
>>
>> Phil
>>
>> ---
>> Correspondence/TSPA/DUSA AOE
>> ------------------------------------------------------------
>> Philip Jones pwjones at lanl.gov
>> T-3 MS B216 Ph: 505-667-6387
>> Los Alamos National Lab Fax: 505-665-5926
>> Los Alamos, NM 87545-1663
>>
>>
>>
>> _______________________________________________
>> mpas-developers mailing list
>> mpas-developers at mailman.ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/mpas-developers
>>
> _______________________________________________
> mpas-developers mailing list
> mpas-developers at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/mpas-developers
>
--
!----------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000
e-mail: laura at ucar.edu
phone : 303-497-1628
!----------------------------------------------------
More information about the mpas-developers
mailing list