Re: WRAPIT functions

From: William Daniel Scheftic <scheftic_at_nyahnyahspammersnyahnyah>
Date: Thu May 01 2014 - 13:17:34 MDT

I'm more accustomed to writing C wrappers rather than using fortran
WRAPIT, but for efficient coding the loops must be inside of your
fortran code. This is much easier if you know the dimensions you're
going to operate on or perhaps create a few functions for various
dimensions.

For your case, it's probably even simpler than that. If you're fortran
code deals with each element independently then you can just assume your
input arrays are just one really long one dimensional array with dims

dimsizes(lat)*dimsizes(lon)*dimsizes(lev)*dimsizes(time)

On 5/1/2014 11:13 AM, jbuzan wrote:
> Hello NCL-Talk.
>
> My fortran code that I am using only works on single cells. I am wondering if there is a more efficient way for me to set up my loops.
>
> Input dataset is netcdf files (atmospheric output):
> X(time,lev,lat,lon).
>
> loop construction:
>
> do i = 0, dimsizes(lat)-1
> do j = 0, dimsizes(lon)-1
> do l = 0, dimsizes(lev)-1
> do k = 0, dimsizes(time)-1
> FORTRAN WRAPIT object
> end do
> end do
> end do
> end do
>
> Thanks,
>
> -Jonathan
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 01 13:18:33 2014

This archive was generated by hypermail 2.1.8 : Sun May 04 2014 - 12:38:56 MDT