Rotate Map 90 Degrees

From: Sean Egan <sdegan_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 26 2013 - 10:22:04 MST

Hi NCL Talk Community,

The script that I've posted below plots my map sideways. Note that if I set
resources@gsnMaskLambertConformal = True, then it rotates the map, but
masks out parts of my plots, like labels, which I want.

How can I rotate the map without using gsnMaskLambertConformal

Also, I had to switch the data layout to get this to plot correctly. Note
the subscripting I did early on to do this. Was there a better/easier way
to do this? If I didn't, then the plot was off the map.

The file I'm using may be downloaded at:

http://http://www2.gi.alaska.edu/~sdegan/EISF_20080808_o21635.h5

Thanks a lot!

Sean Egan
PhD Student
Geophysical Institute
University of Alaska Fairbanks

*********************************************************
Beginning of NCL Code
*********************************************************

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

    a = addfile("EISF_20080808_o21635.h5","r")

    wks=gsn_open_wks("pdf","EISFOutput")
    gsn_define_colormap(wks,"BlAqGrYeOrRe")
    lat = a->lat
    lon = a->lon
    so2 = a->Xso2

    lat!0="latx"
    lat!1="laty"
    lon!0="lonx"
    lon!1="lony"
    so2!0="so2x"
    so2!1="so2y"

    latF = lat(laty|:,latx|:)
    lonF = lon(lony|:,lonx|:)
    so2F = so2(so2y|:,so2x|:)

    resources = True

resources@gsnPaperOrientation = "portrait"
    resources@tiMainString = "Sulfur Dioxide Column Density, DU"
    resources@sfXArray = lonF
    resources@sfYArray = latF
    resources@cnLinesOn = False
    resources@cnFillOn = True
    resources@cnRasterSmoothingOn = True
    resources@gsnMaximize = True
    resources@gsnSpreadColors = True
    ;resources@cnLevelSelectionMode = "ManualLevels"
    ;resources@cnMinLevelValF = 0
    ;resources@cnMaxLevelValF = 20
    ;resources@cnLevelSpacingF =0.5
    ;resources@cnFillOpacityF = 0.85
    resources@lbLabelBarOn = True
    ;resources@sfExchangeDimensions = True
    resources@sfDataArray = so2F
    resources@mpGridAndLimbOn = True
    resources@lbAutoManage = True
    resources@lbLabelStride = 2
    resources@mpLimitMode = "LatLon"
    resources@gsnMaskLambertConformal = False
    resources@mpGeophysicalLineColor = "black"
    resources@mpPerimOn = True

    resources@mpOutlineBoundarySets = "GeophysicalandUSStates"

    resources@mpMinLonF = -175
    resources@mpMaxLonF = -35
    resources@mpMinLatF = 30
    resources@mpMaxLatF = 75
    resources@pmTickMarkDisplayMode = "Always"
    resources@mpProjection = "LambertConformal"
    ;resources@mpCenterLonF = -120
    ;resources@mpCenterLatF = 50

    contour = gsn_csm_contour_map(wks, so2F(:,:), resources

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 26 10:22:36 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST