[ncl-talk] How to convert the value of a NetCDF file to zero

Ehsan Taghizadeh ehsantaghizadeh at yahoo.com
Thu Jan 25 11:06:45 MST 2024


Dear Setareh,I suggest you read the variables from the fout file again. For example, if there is a variable named "V10" in fout, you just need to read that variable from fout, as follows:V10_zero=fout->V10
This V10_zero has the same coordinates as V10 in the original file, but its values are zero.I hope this is correct.
-----------------------------------------------------------------------------
Sincerely,Ehsan Taghizade

 

    On Thursday, January 25, 2024 at 06:17:12 PM GMT+3:30, Setareh Rahimi via ncl-talk <ncl-talk at mailman.ucar.edu> wrote:  
 
 Dear Dennis,I noticed an issue. When I use the attached script it converts all values to zero, but the data is no georefrenced any more. So how can I fix this please?Thanks in advance.Best regards, 

S.Rahimi



On Sun, Jan 21, 2024 at 18:44 Dennis Shea <shea at ucar.edu> wrote:

Attached is a script that does what you requested.

On Sat, Jan 20, 2024 at 6:40 AM Setareh Rahimi via ncl-talk <ncl-talk at mailman.ucar.edu> wrote:




Dear NCL users,
I have a NetCDF file (attached) that contains some variables. I would like to change the values of all variables to zero for all grid points. So how can I do this using NCL, please?
This file is an input file for the WRF-Chem model, and I do not want to change the format of the file, only want to change the values to zero.
Please kindly advise me in this regard.
Thanks in advance.Kind regards,-- 
S.Rahimi



_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk


_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20240125/23ce2624/attachment.htm>


More information about the ncl-talk mailing list