Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Convert Lambert to lat-lon projection and masking it for a given region in the domain using functions in NCL website.

srikar_iist

New member
Hi I am trying to convert a wrfout file which has a lambert projection to the lat-lon projection (which I trust is equidistant cylindrical also) and mask the output on the basis of the shape files I have.

The problem I see it that using the code https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_23.ncl, I am able to get a masked output of the variables under consideration, but I am sure the conversion between projections is not taking place, which could be confirmed by printing all the values of longitude across a reference latitude or vice-versa.

Attached are pictures that can serve as a reference.
the original_sm and masked_sm are for the reference of the extent of total domain, and masking as per the shapefile.
Clearly It is observable that there are curved gradients across the XLAT plots in both the original and masked values of XLAT and the XLONG graphs have divergent color gradient rather than having parallel gradients.

I have tried a lot but of no use. My code is attached as a text file

Kindly help ASAP as I am in dire need for this to work out. I am open to using python as well for the solution to work.
Thank You

Srikar K
 

Attachments

  • Xlat.png
    Xlat.png
    128.3 KB · Views: 9
  • Xlong.png
    Xlong.png
    129 KB · Views: 6
  • masked_sm.png
    masked_sm.png
    134.6 KB · Views: 8
  • original_sm.png
    original_sm.png
    282 KB · Views: 4
  • mask_shape.txt
    7.7 KB · Views: 2
Last edited:
Top