Dear Ansley and Sanaz,
I thought Sanaz may be asking how to change the order of listing in the J direction (meridional direction).
With
lis/format=(${LONPOINTS}(f10.2))
you are listing the values at a single latitude on one text line. (${LONPOINTS} is a shell syntax, I suppose. See below.). So, in the text file, you get a 2D listing with latitude (J) along the vertical axis and longitude (I) along the horizontal axis.
I do not understand your use of M and L in the loop
structure you are showing.
I guess that was a pseudo code, just to illustrate the problem, using the shell (bash) syntax: On bash,
for i in {1..10}; do
echo $i
done
will print 1 to 10.
Ryo
If you are using repeat loops, you will need
to use L for time, J for latitude, and I for longitude. One possibility
might be to use the LIST/PRECISION qualifier instead of using /FORMAT=f10.2)
On 9/20/2023 2:04 PM, Mosayebi, Sanaz wrote:
> Hello,
>
> I have a netcdf file and I am trying to convert it to a text file.
>
> Here is the information of my input file:
>
> TIMESTEPS=2920
> LONPOINTS=537
> LATPOINTS=225
> INPUTVARS=(PSFC U10 V10)
>
> And I am trying this:
>
> for m in {1..2929}; do
> for l in {1..1}; do
> for INPUTVAR in ${INPUTVARS[@]}; do
>
> let tmp = if ${INPUTVAR}[l=${l},m=${m}] eq (-9e+33) then (-9999) else
> ${INPUTVAR}[l=${l},m=${m}]
> set var/bad=-9999 tmp
> list/file="${OUTPUT}"/append/nohead "CHANGE";
> list/file="${OUTPUT}"/append/nohead/format=(${LONPOINTS}(f10.2)) tmp
> done
> done
> done
>
> But the problem is list/format=(${LONPOINTS}(f10.2)) lists the data
> from lower row. Is there any way that I can list the data from first
> row in the up then the generated text file become similar to what I
> see if I simply use list?!
>
> Thanks,
> Sanaz
>