; Script to plot and overlay contours on a map plot (using gsn_csm_map) load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ; TEST FOR OTHER MAP ; - - - - - Reading the file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dir1="/users/home/models/csm/inputdata/ocn/nemo/tn0.25v1/ic/" key1="data_1m_potential_temperature_nomask.nc" f1 = addfile(dir1+key1,"r") vNames1 = getfilevarnames(f1) print(vNames1) ;votemper = f1->votemper(:,0,:,:) nav_lat = f1->nav_lat nav_lon = f1->nav_lon ;time_counter = f1->time_counter time = ispan(0, 179, 1) time_counter = tofloat(time) ;printVarSummary(time_counter) time_counter@units = "seconds since 2002-01-01 00:00" ; time_counter@calendar = "noleap" ; time_counter@title = "Time" ; time_counter@long_name = "Time axis" ; time_counter@time_origin = "01-JAN-2002:00:00:00" ; time_counter@modulo = " " ; printVarSummary(time_counter) masc = new( (/dimsizes(time_counter), 1021, 1442/), float) masc!2 = "x" masc!1 = "y" masc!0 = "time_counter" masc@units = "C" ; masc@long_name = "votemper" ; masc@valid_min = "-2.139231f" ; masc@valid_max = "33.78767f" ; masc = 1.0 printVarSummary(masc) outfile1="masc_exag.nc" if (isfilepresent(outfile1)) then system("rm -rf "+outfile1) ;-- make sure that file does not exist end if b = addfile("masc_exag.nc","c") filedimdef(b,"time_counter",-1,True) b->masc=masc b->nav_lat=nav_lat b->nav_lon=nav_lon b->time_counter=time_counter end