[Thread Prev][Thread Next][Index]

Re: [ferret_users] List command lists data from down to up but I want it from up to down



Hi Sanaz,

First, you can change the missing-data flag by defining a new variable as follows:

yes? let/like=inputvar outputvar = MISSING(inputvar , -9999)

This will make the change for all of the data as it is read from the netCDF file, so you do not need to use an IF statement to change the values.  When you do a formatted listing, any missing-values will be shown as ***.  To write -9999  for the missing data in your listing, do not include the "set var/bad=-9999 tmp" command

I am not sure I understand what you are asking about the ordering of the listing, and I do not understand your use of M and L in the loop structure you are showing.  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


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement