[Thread Prev][Thread Next][Index]

Re: [ferret_users] Color filling contours in Plate Caree projection - problem




Ansley, 

Thank you for your response. 

Actually, I made a typo in my e-mail, not in my Ferret script. 

Here is the script, just in case of doubts. Selecting particular 
projection ether shows color filling together with the map 
(case of calling mp stereographic_north) or shows just a map 
w/o any color contours (case of calling mp_Plate_Caree)

I have no idea how to fix it and why it is so. 

****************************************************

SET MODE METAFILE    ! output to metafile, PS-compatible
SET MODE VERIFY         ! show command file lines at the screen

!Preparation, cleaning from last settings
CANCEL REGION
CANCEL VARIABLES/ALL
CANCEL DATA/ALL
CANCEL VIEWPORTS

!Setting region 40-90N, 0-360 , 12 months
set region/l=1:12
set region/x=0.0:360.0/y=40.0N:90.0N
!SHOW REGION !optional

!Set window size and aspect ratio (will be overwritten if go mp_aspect is called)
SET WINDOW/SIZE=1.1/ASPECT=0.4   !(aspect up increases vert size, for Plate Caree)
!SET WINDOW/SIZE=1.1/ASPECT=1    !(aspect up increases vert size, 1 for stereographic)

!Show WINDOW size in pixsels
show symbol ppl$xpixel
show symbol ppl$ypixel

!! Stereographic projection
!===========================
! Usage:                   arg1               arg2
!  go mp_stereographic_north [central meridian] [standard parallel]
!
! arg 1 - longitude used for the center of the projection
! arg 2 - latitude used for the center of the projection

go mp_stereographic_north -42.5 !stereographic projection

! NOTE:  Do not forget to uncomment
!        go mp_aspect
!        below, if Stereographic projection is used

!!Simple Cylindrical or Plate Ceree projection for G.Earth
!=========================================================
! Usage:                   arg1               arg2
!  go mp_plate_caree [central meridian] [standard parallel]
!
! arg 1 - longitude used for the center of the projection
! arg 2 - latitude used for the center of the projection

!go mp_plate_caree -42.5 !Simple Cylindrical or Plate Caree projection for G.Earth

!show variables !optional 

!Comment the next line out for Simple Cylindrical or Plate Caree projection
go mp_aspect       ! computes appropriate aspect, ovewritting SET WINDOW, 
                                 ! useful for stereographic projection, but SET WINDOW is better for P.C.

!definition of axis (x,y,t) and 3D grid from these axis

define axis/x=0.0e:359.0e:1/unit=degree ocnx
define axis/y=40.5n:89.5n:1/unit=degree ocny
define axis/t=1:12:1 ocnt
define grid/x=ocnx/y=ocny/t=ocnt ocngrid

!show grid ocngrid !optional

!DATA reading from formatted ASCII file into variable sic
file/format=(E12.5)/order=xyt/var=sic/grid=ocngrid sic_composite_clim_2028-2030_mod.fm !formatted file

!show variable sic !optional

!introduction of variable sic_n = 100*sic if sic is > 0 or NoN otherwise

let sic_n = if sic gt 0.0 then sic*100 else (-1)^0.5
!show variable sic_n ! optional

!Setting grid for variable sic_n, important
set grid sic_n
!show grid  sic_n !optional

fill/nolab/noaxis/set_up/nokey/palette=Blueish_White_WW.spk/levels=(-inf)(15,100,5)(inf)/L=1 sic_n*mp_mask,x_page,y_page
ppl fill
!Optional contouring with different colors/line width
!contour/over/noaxis/set_up/nolabels/color=4/levels=(15,90,15)/L=1 sic_n*mp_mask,x_page,y_page
!ppl contour/over !ppl plot layout
!contour/over/noaxis/set_up/nolabels/color=17/levels=(15,15,15)/L=1 sic_n*mp_mask,x_page,y_page
!ppl contour/over !ppl plot layout
!Adding map and geographic mesh
go mp_graticule 0 360 30 50 90 20 1
go mp_land 1 overlay
! Output to GIF-file
frame/file="./GIF/output_str40N_2028_101.gif"

CANCEL MODE METAFILE

*****************************************************



Dr. Sergei Maurits, HPC Specialist
Arctic Region Supercomputing Center
University of Alaska Fairbanks
Fairbanks, AK 99775-6020
907 450 8697 voice   907 450 8604 fax.
maurits@xxxxxxxx



On Jun 15, 2011, at 4:48 PM, Ansley Manke wrote:

Hi -
The script is called mp_plate_caree, with just one r.   Perhaps that's the only trouble.  If that's not it, then note that these scripts do nothing but define a set of variables.  You might be able to see what's happening if you execute

yes? go mp_plate_caree -42.5
yes? show variables



On 6/15/2011 4:15 PM, Sergei Maurits wrote:
Hi Felow Ferret Users, 


I would appreciate a pointer to resolve my problem. I need to make frames for Google Earth animation, which requires Simple Cylindrical projection a.k.a. Plate Caree. 

I developed Ferret script, that can do waterer I want for Polar Stereographic projection (I draw polar areas with ice coverage). It includes 

- data reading
- plotting land contours and map mesh  
- plotting color-filled contours with custom palette
- overplotting isocontours on the top of this map

The very same script with a single line change (projection change) refuses to plot the color-filled contours, while all other operations are performed OK, including map, mesh, and overpotting of isocontours in the end. The line I am changing is 

go mp_stereographic_north -42.5

instead I use 

go mp_plate_carree -42.5 

and subsequently comment out 

go mp_aspect 

which (commenting out or leaving in the scripts of this second comand) results in predicable response and does not affect the main problem)


Any similar experiences and/or ways to resolve the problem?

Also, working scripts with Plate Caree utilization for color contouring in polar regions could be of great help. I am not stick to my script, I easily can use another one that would make Simple Cylindrical operational.

Great thanks to everyone responding,
Sergei Maurits


Dr. Sergei Maurits, HPC Specialist
Arctic Region Supercomputing Center
University of Alaska Fairbanks
Fairbanks, AK 99775-6020
907 450 8697 voice   907 450 8604 fax.
maurits@xxxxxxxx





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

Privacy Policy | Disclaimer | Accessibility Statement