declare type of array in ncap2 script?

  • John

    John - 2014-01-24

    In my script for ncap2, I create a new array using the existing precipitation variable as a template:

    *pr_ttl = array(0, 1, pr);

    Since 'pr' is a float variable, I expected pr_ttl to be the same type, but it comes out as int. I thought assigning it float values might force it to be float:

    *pr_ttl = array(0, 1, pr);
    pr_ttl = 0.0f;

    But that didn't work either. Is there a way to explicitly tell NCO to make it a float variable? I combed through ncap2 documentation and did not see anything...


  • Charlie Zender

    Charlie Zender - 2014-01-24

    Hoping Henry can help answer this question...

  • John

    John - 2014-01-24

    I just realized I misunderstood the array() syntax. It appears that the first two arguments dictate what type of array to create. I did

    pr_ttl = array(0.0f, 1.0f, pr);

    and that created a float array.

    Sorry to take up your time!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks