Variable Grids

BLD { currentobject /missing_value getknownnotnull }
BLD { dup elementtype /arraytype eq { dup length 0 gt { aload length 1 sub { dolongname0 exch dolongname0 exch space exch append append } repeat dolongname } { pop } ifelse } { cvx s== } ifelse }
BLD { currentobject /dataset known { dataset null eq { null } { dataset dup type /arraytype eq { pop null } { history nip } ifelse } ifelse } { null } ifelse }
BLD null
BLD { rights arraylevel rights length mod 1 getinterval }
BLD { dup /long_name known { fullname type /arraytype eq { fullname dup length 1 sub get name eq { 1 object /fullname [ fullname maybealoadpop pop long_name ] def } if } if } if tofullname }
BLD { lefts arraylevel lefts length mod 1 getinterval }
BLD (}]))
BLD { getadd_offset? { 0.0 eq { /add_offset undef } if } if getscale_factor? { 1.0 eq { /scale_factor undef } if } if currentobject /missing_value getknown { null eq { /missing_value undef } if } if currentobject /units known { units timeunits? nip { currentobject /calendar known not { get_calendar /calendar exch def } if currentobject /modulus known not { get_modulus dup null eq { pop } { /modulus exch def } ifelse } if currentobject /modulus known { /modulo modulus def } if } if } if }
BLD { currentobject /missing_value knownnotnull }
BLD { getscale_factor? not { 1.0 } { exec dup type /stringtype eq { interp } if } ifelse }
BLD { fullname dolongname }
BLD 1.0
BLD { getadd_offset? not { 0.0 } { exec dup type /stringtype eq { interp } if } ifelse }
BLD { dup /SIRecord known { html? { ==showlinks? { htmlpath! dup tofullname dolongname print () print } { dup tofullname dolongname print } ifelse ([) print mark 1 index .streamgrids ] dup 0 nrdim getinterval { .name === } forall ( |) print nrdim ndim 1 index sub getinterval { .name === } forall (]) print } { (<) print dup tofullname dolongname print (>[) print mark 1 index .streamgrids ] dup 0 nrdim getinterval { .name === } forall ( |) print nrdim ndim 1 index sub getinterval { .name === } forall (]) print } ifelse } { dup === } ifelse }
BLD { dup type /arraytype eq { 1 index type /arraytype eq { 1 index length 1 index length eq { true 0 1 3 index length 1 sub { 3 index 1 index get 3 index 2 index get stringarrayeq nip and } for nip nip } { pop pop false } ifelse } { pop pop false } ifelse } { eq } ifelse }
BLD { pusharraylevel getleft exch aload length 1 add getright exch { dolongname0 exch dolongname0 exch space exch append append } repeat poparraylevel }
BLD { -1 (,) combinefullname }
BLD 0
BLD (1PG13.6)
BLD { 2 combinehistory }
BLD -operator-
BLD { getmissing_value? not { null } if }
BLD { arraylevel 1 sub /arraylevel STREAM ! }
BLD { history null ne { history dup elementtype /arraytype eq { aload length 1 add dup 1 add -1 roll exch } { exch 2 } ifelse array astore } if /history exch def }
BLD { array astore [ exch { history null eq fullname null eq or { pop } if } forall ] dup length 0 eq { pop null } { dup 0 get .history true 2 index { .history 2 index stringarrayeq and } forall { pop 0 get sealhistory .history } { pop [ exch { longname history 2 array astore exch pop } forall ] } ifelse } ifelse }
BLD 0.0
BLD { history null ne { history elementtype /arraytype eq { history dup length 1 sub get elementtype /arraytype ne { /history [ 0 history { dup type /arraytype ne { exch 1 add } { exch pop 0 } ifelse } forall dup 0 eq { pop } { array astore longname exch } ifelse ] def } if } if } if }
BLD ({[()
BLD { 1 index 2 add copy pop array astore true exch { safeifGRID nip and } forall { pop { pop } repeat null } { combinefullname } ifelse }
BLD /==alias
BLD { currentobject /scale_factor getknown }
BLD { dup elementtype /arraytype eq { dup length 2 eq { dup 1 get type /arraytype eq { space exch aload length 1 add space exch { dolongname0 exch dolongname0 exch space exch append append } repeat } { dolongnamearray } ifelse } { dolongnamearray } ifelse } { cvx s== } ifelse }
BLD { arraylevel 1 add /arraylevel STREAM ! }
BLD { currentobject /add_offset getknown }
name /==alias
BLD CaseList /datasettype { doallstreams dup null eq { pop undef } { /dataset 3 index def def /streamcount streamcount 1 add def } ifelse } def /shortarraytype { pop pop } def /streamtype { dup dup allgrid anyknowngrid { dup allgridget allargs aload pop allroutine } { decompress dup allgrid anyknowngrid { dup allgridget allargs aload pop allroutine } if } ifelse exch 1 index eq { 5 object /dataset 3 index def def /streamcount streamcount 1 add def } { dup null eq { pop undef } { /dataset 3 index def def /streamcount streamcount 1 add def } ifelse } ifelse } def /integertype { pop pop } def /arraytype { dup xcheck { nip currentdataset exch exec nip name exch doifstreamdef } { pop pop } ifelse } def /htmlfiletype { pop pop } def /jpegfiletype { pop pop } def /pendingdatasettype { dup xcheck { nip currentdataset exch exec nip name exch doifstreamdef } { pop pop } ifelse } def /stringtype { pop pop } def /imageobjecttype { pop pop } def /figviewtype { dup dup allgrid known { allgrid allargs aload pop allroutine } if exch 1 index eq { 5 object /dataset 3 index def def /streamcount streamcount 1 add def } { dup null eq { pop undef } { /dataset 3 index def def /streamcount streamcount 1 add def } ifelse } ifelse } def /nulltype { pop pop } def /marktype { pop pop } def /operatortype { pop pop } def /geometrytype { pop pop } def /integerarraytype { pop pop } def /doublearraytype { pop pop } def /objecttype { pop pop } def /htmlprinttype { pop pop } def /gridtype { allgrid totype /datasettype eq { allgrid 2 index torelativename pgetknown { 2 copy ne { allargs aload pop allroutine dup null eq { pop undef } { dup name known { .streamgrids } if name 2 index eq { def } { name exch def undef } ifelse /streamcount streamcount 1 add def } ifelse } { pop pop pop } ifelse } { pop pop } ifelse } { name allgrid eq { dup allargs aload pop allroutine dup null eq { pop undef } { dup name known { .streamgrids } if name 2 index eq { def } { name exch def undef } ifelse /streamcount streamcount 1 add def } ifelse } { pop pop } ifelse } ifelse } def /xmlfiletype { pop pop } def /linktype { pop pop } def /booleantype { pop pop } def /nametype { pop pop } def /messagetype { pop pop } def /figobjecttype { pop pop } def /realtype { pop pop } def /realarraytype { pop pop } def /namearraytype { pop pop } def /giffiletype { pop pop } def
BLD { rootmeansqover }
BLD { covarcomp0 STREAM TaskParameterBlock 1 get dup 1 add mul 2 div NewIntegerBuffer pop STREAM 11 object /name /cov def /fullname [ /cov variablesarray 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /ISYMM dup TaskParameterBlock 1 get dup 1 add mul 2 div NewIntegerGRID def ISYMM .npts NewDoubleBuffer 1 SetStreamIndex* ISYMM avachunkgrids aload pop repeatgrids aload pop * /units variablesarray 0 get .units dup unitmul def /missing_value NaN def STREAM TaskParameterBlock 1 get NewIntegerBuffer /name /indices def rgrids length SetStreamIndex* rgrids aload pop avachunkgrids aload pop repeatgrids aload pop * STREAM 1 NewIntegerBuffer /name /nout def 0 SetStreamIndex* avachunkgrids aload pop repeatgrids aload pop * 3 array astore { avachunkgrids { last VALUE } forall avachunkgrids { removeGRID0 } forall } forall 3 -1 roll /ipack compression: 3 -1 roll name exch def 3 -1 roll name exch def /compressedgrid rgrids def /grids rgrids def :compression /symmetricStorageMode compression: /symmetricchunk rgrids def :compression }
BLD { 1 index totype /gridtype eq { 0.0 } if 4 /seasonalAverage publicproc: 3 array astore cvx seasonalAverageFS 1 object exch /filterargs exch def currentobject /filterargs get 1 get type /stringtype eq { currentobject /filterargs get 0 get .name currentobject /filterargs get 1 get 4 2 roll datasetexec 2 index cvx exec 2 index ( - ) search { nip nip } if VALUES nip exch exec dup units monthtimename eq { /pointwidth get_bounds streamgrids pop differences streamgrids nip first VALUE getrealization 0 get def } if nip name exch def } { datasetexec } ifelse :publicproc }
BLD { foralldatasetsCase 5 object exch dup null eq { pop } { /streamtype exch def } ifelse exch dup null eq { pop } { /datasettype0 exch def } ifelse /myCases 1 index def /==alias /myCases cvx def mycasedefs 1 object /myCases 3 -1 roll def begin startdataset mycaseexec enddataset end }
BLD { (downloadsGeoTiff) htmlprint }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /yearlyAverage publicproc: 2 array astore cvx yearlyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { 3 /seastotZeroFill publicproc: { mystream monrange minfrac } inputs mystream a: dataflag T monthlyAverage minfrac flagge 0 maskle :a: 0 replaceNaN T sums T (0000 1) VALUES [ T ] differences T (months since 1960-01-01) streamgridunitconvert :a mul T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul :publicproc nip }
BLD { 3 /flexseastotZeroFill publicproc: { mystream daterange minfrac } inputs mystream dup T daterange minfrac seasonalAverage 0 mul exch 0 replaceNaN T daterange 1.0 seasonalAverage add T differential_mul :publicproc nip }
BLD { currentfilepattern 0 -1 put 1 index /filepattern getknown { 1 index /filepattern getknown { 2 copy eq { pop pop } { 1 index totype /streamtype eq { dup totype /streamtype ne { 3 -1 roll nip /filepattern attributetovariable exch .streamgrids .name 1 index exch get filepattern exch addGRIDstream name exch def } { pop pop } ifelse } { pop pop exch /filepattern undef exch /filepattern undef } ifelse } ifelse } { pop } ifelse } if }
BLD { dup type /integertype eq { array astore } if 1 index totype /gridtype eq { aload length REORDER0 } { 0 { aload length REORDER0 } /REORDER allstreams1 } ifelse }
BLD { 5 /flexseasonalnonoverlapWSfreq publicproc: { mystream daterange wslength thold minfrac } inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: -999 replaceNaN 0 thold flagnotrange [ T ] integral dup T wslength shiftGRID [ T ] regridLB sub wslength flagge [ T ] differences 1 flagge T :a: T daterange 0 6 getinterval VALUES T wslength 1 sub shiftGRID .T first cvsunits 0 6 getinterval ( - ) daterange 8 16 getinterval 3 array astore concat nip seasonalAverage T differential_mul T 2 index .T replaceGRID :a mul :publicproc nip }
BLD { :table }
BLD { { /meansq0 (mean sq) apply1get1 } /meansq gridarray1fn }
BLD { nip { precip tempavg tempamp myTAW mygrid geolocations params } inputs NEWDATASET /fullname { name } def /name /water_balance def precip dup dup mygrid dup type /arraytype eq { 1 get } if .name get -6 1 0 shiftdatashort mygrid dup type /arraytype eq { 1 get } if .name cvntos (_lag) append interp 0.0 add 0 maskle 2 replaceNaN div mygrid dup type /arraytype eq { 1 get } if .name cvntos (_lag) append interp 1 array astore sum 1 index 12.5 flagge mul { IPA0 6.25 IPA1 6.3000002 IPA2 19.0 IPA3 31.700001 IPA4 44.400002 IPA5 57.099998 IPA6 69.900002 IPA7 } classify grid: /name /PPcoefs def values: 0.0 0.0 0.0 0.858 -0.895 0.0028 -1.14 0.042 0.0026 -2.3399999 0.12 0.0026 -2.3599999 0.19 0.0026 -2.78 0.25 0.0026 -3.1700001 0.32 0.0024 -4.21 0.438 0.0018 :values :grid 0 add /name /PPcoef def PPcoefs /PPn 24 NewIntegerGRID replaceGRID PPn 3 splitstreamgrid PPn2 aprod replaceGRID PPn 1.0 sub 4 -1 roll ln mul eexp mul [ PPn ] sum mul [ aprod ] sum dup dataflag 1 masklt exch 0 max mul geolocations length 5 eq { geolocations dup 0 get exch dup 3 get exch 4 get 3 -1 roll exch geometrydistance nip 3 -1 roll exch /long_name (distance of station from soil masking) def /distance add_variable exch } if geolocations length 3 eq { geolocations dup 0 get exch dup 1 get exch 2 get 3 -2 roll 2 array astore weighted-average } if prcp_0to1000_colors DATA 0 AUTO RANGE /long_name (water run off) def /units /mm def /Runoff add_variable precip geolocations length 3 eq { geolocations dup 0 get exch dup 1 get exch 2 get 3 -2 roll 2 array astore weighted-average } if Runoff -1.0 mul exch add prcp_0to1000_colors DATA 0 AUTO RANGE /units /mm def /long_name (effective precipitation) def /Peffective add_variable mygrid dup type /arraytype eq { 0 get } { 0 add } ifelse 365.25 mod /units /days def pi mul 2.0 mul 365.25 div dup cos 0.033 mul 1.0 add exch 1.39 sub sin 0.409 mul dup tan geolocations dup length 5 eq { 2 get } { 1 get 0.0 add } ifelse dup tand -1.0 mul 3 -1 roll mul acosd pi mul 180.0 div 3 -1 roll dup sin exch cos 3 index cosd mul 2 index sin mul 3 -2 roll 4 -1 roll sind mul mul add mul 0.082 mul 1440.0 mul pi div 0.408 mul 0.0023 mul rainbowcolorscale /long_name (extraterrestrial radiation) def /units (MJ/m2/day) def /RA add_variable tempavg 17.799999 add tempamp sqrt mul geolocations dup length 3 ne { pop RA mul } { dup 0 get exch dup 1 get exch 2 get 3 -2 roll 2 array astore 3 -1 roll RA mul 3 -2 roll weighted-average } ifelse prcp_0to1000_colors DATA 0 AUTO RANGE /units /mm def /long_name (reference evapotranspiration) def /ETref add_variable mygrid dup type /arraytype eq { 0 get /Tt 1 index units 0 3 -1 roll a: mygrid 0 get [ streamgrids ] nip minover getrealization 0 get 366 sub :a: mygrid 0 get [ streamgrids ] nip maxover getrealization 0 get 366 add :a 1 exch NewEvenGRID 0.0 mul 1 add /name /longtime def dup Tt /Ss renameGRID } { 0.0 mul 1 add /name /longtime def dup dup mygrid .name get /Ss renameGRID Ss 366 pad0 } ifelse Ss params .PlDd cvi s== ( ) append params .PlDm append VALUES /I 365 NewIntegerGRID CopyStream dup 1 flagle params .InitKc interp mul 1 index 2 params .InitD interp flagrange params .VegKc interp params .InitKc interp sub params .InitD interp div mul 2 index params .InitD interp 1 add dup params .VegD interp 1 sub add dup 4 -3 roll flagrange params .MidKc interp params .VegKc interp sub params .VegD interp div mul exch 4 index exch 1 add dup params .MidD interp 1 sub add dup 4 -3 roll flagrange params .LateKc interp params .MidKc interp sub params .MidD interp div mul exch 5 index exch 1 add dup params .LateD interp 1 sub add dup 4 -3 roll flagrange params .EndKc interp params .LateKc interp sub params .LateD interp div mul exch 7 -1 roll exch 1 add dup 1 add flagrange 1 params .EndKc interp sub 2.0 div mul add add add add add 0.0 I integrate I second last RANGE I -1 shiftGRID I /units /days def /pointwidth 1.0 def /Ll renameGRID mul [ Ll Ss ] REORDER CopyStream 0 RECHUNK CopyStream dup [ Ll Ss ] /I nchunk NewIntegerGRID replaceGRIDstream Ll Ss add 0.5 sub 0 RECHUNK [ Ll Ss ] /I nchunk NewIntegerGRID replaceGRIDstream use_as_grid mygrid type /arraytype eq { asum Tt .name renameGRID nip dup Tt .name get 1 array astore regridAverage nip /units /unitless def exch Tt sample-along } { asum mygrid dup type /arraytype eq { 1 get } if .name renameGRID nip dup mygrid dup type /arraytype eq { 1 get } if .name get 1 array astore regridAverage nip /units /unitless def } ifelse rainbowcolorscale DATA 0 AUTO RANGE /long_name params .Crop ( crop Cultivar) append def /Kc add_variable Kc ETref mul prcp_0to1000_colors DATA 0 AUTO RANGE /units /mm def /long_name params .Crop ( crop evapotranspiration) append def /ETcrop add_variable dup mygrid dup type /arraytype eq { 1 get } if .name get 0.0 add /name /noname def streamgrids 1 pad0 streamgrids nip second last subgrid myTAW params .initp interp mul ETcrop dup mygrid dup type /arraytype eq { 1 get } if .name get first VALUE mygrid dup type /arraytype eq { 1 get } if .name removeGRID 0.0 mul add [ streamgrids ] REORDER exch beginLoop dup params .rho interp myTAW mul div 1 min ETcrop mul sub Peffective add 0.0 max myTAW min endLoop dup dup mygrid dup type /arraytype eq { 1 get } if .name get first VALUE 0.0 mul 1 index mygrid dup type /arraytype eq { 1 get } if .name get beginLoop ETcrop 0.0 mul add Peffective 0.0 mul add endLoop add dup mygrid dup type /arraytype eq { 1 get } if .name get -1 shiftGRID prcp_0to1000_colors DATA 0 AUTO RANGE /units /mm def /long_name (soil moisture) def /SM add_variable SM dup mygrid dup type /arraytype eq { 1 get } if .name get 1 shiftGRID myTAW params .rho interp mul div 1 min ETcrop mul prcp_0to1000_colors DATA 0 AUTO RANGE /units /mm def /long_name params .Crop ( reduced crop evapotranspiration) append def /ETcrop_red add_variable Peffective ETcrop_red sub SM dup mygrid dup type /arraytype eq { 1 get } if .name get differences dup mygrid dup type /arraytype eq { 1 get } if .name get 0.5 shiftGRID sub prcp_0to1000_colors DATA 0 AUTO RANGE /long_name (water drained) def /units /mm def /Drain add_variable geolocations length 5 eq { geolocations 4 get /the_geom add_variable } if geolocations length 3 eq { geolocations 2 get /the_geom add_variable } if mygrid dup type /arraytype eq { 0 get name add_variable } { pop } ifelse exch /procargs [ procargs aload pop params .initp /InitCond cvx params .rho /calib cvx params .InitKc /InitKcStart params .InitD /InitDays params .VegKc /VegKcStart params .VegD /VegDays params .MidKc /MidKcStart params .MidD /MidDays params .LateKc /LateKcStart params .LateD /LateDays params .EndKc /LateKcEnd params .PlDd /PlantDday params .PlDm /PlantDmonth params .Crop /CropName /:Water_Balance cvx ] store exch 1output :publicproc }
BLD varimaxS
BLD null
BLD { tblS new 0 store interation eol store EOL tblstart store TBLST tblend store TBLEN recstart store RECST recend store RECEN entstart store ENTST entend store ENTEN 1 index /header get store HDRFN nip skipNaN store skipnan NaNmarker dup null eq { pop () } if dup type /stringtype ne { s== } if store markNaN ncol store n1 ncol store n1t IPG store ipg NPPG store nppg 0 store nlabel 1 index /prtwds known { 1 index .prtwds 0 ncol tablecolmax imin getinterval } { [ { printnamedunits } n1 1 sub { dup } repeat ] } ifelse store PRTWDS nip [ n1 2 add 2 roll ] store STRMS n1 tablecolmax gt { STRMS 0 tablecolmax getinterval store STRMS tablecolmax store n1 tablecolmax store n1t } if dup /thetablerecord Ingrid: ! STRMS nip { currentobject dup totype /gridtype eq exch /bounds known and { get_bounds pop } if getmissing_value null ne { datatype gentabunscalable exch known not { toNaN } { bufferwordsize 1 eq { toNaN } if } ifelse } { datatype gentabunscalable exch known not { getscale_factor type /objecttype eq getadd_offset type /objecttype eq or { toNaN } if dup totype /gridtype eq not getscale_factor 1.0 ne getadd_offset 0.0 ne or and { toNaN } if } { bufferwordsize 1 eq { toNaN } if } ifelse } ifelse } forall thetablerecord STRMS nip astore aload length null MATCH thetablerecord STRMS nip astore pop thetablerecord mark STRMS { .datatype } forall counttomark namearray astore nip store TYPES /mylookup null STRMS length object 0 1 STRMS length 1 sub { STRMS 1 index get .name exch 1 add def } for def skipnan type /arraytype eq { mark skipnan { dup type /objecttype eq { .name } if mylookup exch get STRMS 1 index 1 sub get .missing_value null eq { pop } if } forall counttomark integerarray astore nip store skipnan } if skipnan true eq { mark STRMS { datatype /stringtype ne bufferwordsize 1 eq or { .name mylookup exch get STRMS 1 index 1 sub get .missing_value null eq { pop } if } { pop } ifelse } forall counttomark integerarray astore nip store skipnan } if skipnan false eq { 0 integerarray store skipnan } if mark STRMS { bufferwordsize nip } forall counttomark integerarray astore nip store NWS STRMS 0 get .chunksize dup 0 eq { pop 1 } if store n2 STRMS 0 get .nchunk dup 0 eq { pop 1 } if store n3 null STRMS { dup /expires known { .expires dup null eq { pop } { 1 index null eq { nip } { imax } ifelse } ifelse } { pop } ifelse } forall 0 STRMS { /last_modified getknownnotnull { imaxasproc } if } forall exch mimeheadersetlastmodexpires STRMS aload length 1 add -1 roll { null gentab1 gentab2 gentab3 gentab4 gentab5 gentab6 gentab7 gentab8 gentab9 gentab10 gentab11 gentab12 gentab13 gentab14 gentab15 gentab16 gentab17 gentab18 gentab19 gentab20 gentab21 gentab22 gentab23 gentab24 gentab25 } n1 get exec STREAM 23 object /name /entrycount def /datatype /integerarraytype def 1 NewIntegerBuffer 0 SetStreamIndex* TaskStreams 0 get .nchunk dup 1 gt { /I exch NewIntegerGRID } { pop } ifelse * ndim 0 gt { I last VALUE I removeGRID } if }
BLD { 4 /flexseasonalfreqLT publicproc: { mystream daterange thold minfrac } inputs mystream thold flaglt T daterange minfrac seasonalAverage T differential_mul :publicproc nip }
BLD { counttoobject 1 sub index dup type /arraytype eq { length counttoobject 2 sub eq { 0.0 } if counttoobject 1 add } { pop counttoobject 1 eq { 0.0 } if 4 } ifelse /boxAverageSP publicproc: counttoobject 1 sub index dup type /arraytype eq { length counttoobject 2 sub eq { 0.0 } if counttoobject 1 add } { pop counttoobject 1 eq { 0.0 } if 4 } ifelse 1 sub array astore dup 0 2 copy get dup type /arraytype eq { mark 1 index { .name } forall counttomark 2 add -1 roll astore cvx nip } { .name cvlit } ifelse put cvx boxAverageSPcase 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { get_scale_max number? { getscale_factor mul getadd_offset add } if }
BLD { 0 { 1 index .dataset dup null eq { pop pop } { 1 index .name get replaceGRID } ifelse } /replacewithdatasetGRID allstreams1 }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /dekadalAverage publicproc: 2 array astore cvx dekadalAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { 4 /seasonalmeandailyvalueGT publicproc: { mystream monrange thold minfrac } inputs mystream a: dataflag T monthlyAverage minfrac flagge 0 maskle T monrange 1.0 seasonalAverage :a: thold maskle T monrange 0.0 seasonalAverage :a mul :publicproc nip }
BLD { dup /references known not { dataset type /objecttype eq { .dataset getdatasetwithreferences } { pop null } ifelse } if }
BLD FilterSet /gridtype { pop 2 index .name 2 index .name eq { nip dup ( - ) search { pop pop pop true } { pop false } ifelse { seasonaledgesgrid dup } { seasonaledgesgrid dup /monthtime gridunitconvert } ifelse partialgrid } { pop pop } ifelse } def /streamtype { 4 -1 roll decompress 4 1 roll 3 index 3 index .name getknown { exec 4 -1 roll pop 3 1 roll 3 index .getmissing_value null eq { pop seasonalAverage0 } { 4 1 roll 2 index 0 replaceNaN 2 index 2 index seasonalAverage0 4 1 roll 3 -1 roll dataflag 3 1 roll seasonalAverage0 3 -1 roll normalize } ifelse } { pop pop pop } ifelse } def
BLD { 1 /erfinv publicproc: { A } inputs A dup type /objecttype eq not { c: exch :c } if datatype /realarraytype eq { chunksize 1 integerarray astore vserfinv0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /erfinv A .fullname ] def defivars } { chunksize 1 integerarray astore vderfinv0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /erfinv A .fullname ] def } ifelse 1output :publicproc }
BLD tblS
BLD 0 5 object (CR (Mac))cvn (CR) def (CR-LF (DOS/Windows))cvn (CRLF) def (LF (unix))cvn (LF) def
BLD { null 3 1 roll /donopdefasvarsilent cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch def }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll currentobject 3 1 roll cvx /dodefasvarcache cvx 5 array astore cvx dup 2 get exch pdef }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll currentobject 3 1 roll cvx /dodefasvarmetacachevar cvx 5 array astore cvx dup 2 get exch pdef }
BLD 0 11 object
BLD 0 5 object /realarraytype { bounds2indexR4 } def /doublearraytype { bounds2indexR8 } def /integerarraytype { bounds2indexI4 } def
BLD FilterSet /gridtype { pop 1 index .name 1 index .name eq { pop yearlyedgesgrid partialgrid } { pop } ifelse } def /streamtype { 3 -1 roll decompress 3 1 roll 2 index 2 index .name getknown { exec 3 -1 roll pop exch 2 index .getmissing_value null eq { pop yearlyAverage0 } { 3 1 roll 1 index 0 replaceNaN 1 index yearlyAverage0 3 1 roll exch dataflag exch yearlyAverage0 3 -1 roll normalize } ifelse } { pop pop } ifelse } def
BLD { (rdf) xmlprint }
BLD { { /rootmeansqanom0 (root mean sq anom) apply1get12scr } /rootmeansqanom gridarray1fn }
BLD { dup type /integertype eq { array astore } if 2 /SELECTORDER publicproc: false 1 index { type /stringtype eq { pop true leave } if } forall { exch null 2 index { dup type /stringtype eq { (,) search { nip exch RANGEEDGES } { VALUES } ifelse null } { nip } ifelse } forall pop exch [ exch { dup type /stringtype eq { pop } if } forall ] } if 1 index totype /gridtype eq { aload length REORDER0 } { 0 { aload length SELECTORDER0 } /SELECTORDER allstreams1 } ifelse :publicproc }
BLD [ null null ]
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll currentobject 3 1 roll cvx /dodefasvarcacheKeepRestrictions cvx 5 array astore cvx dup 2 get exch pdef }
BLD { currentobject totype dup /datasettype eq exch /streamtype eq or { currentobject /description getknown { fullname name eq { name deletesuffix } { fullname extendnamearray dolongname } ifelse printno' (: ) print printno' } { currentobject getdatasetwithdesc dup /description known { exch 2 copy subnamearray extendnamearray dup length 0 gt { dolongname printno' ( from ) print } { pop } ifelse exch longname printno' (: ) print .description printno' } { pop longname printno' } ifelse } ifelse } if }
BLD { 2 copy eq { pop pop ] } { dup /myprocds getknown { type /arraytype eq { true } { dataset 1 index .myprocds eq not } ifelse } { true } ifelse { name deletesuffix counttomark 1 roll } if .dataset subnamearray0 } ifelse }
BLD { getSRS dup null eq not { srtext2crsid } if dup null eq { pop (CRS:1) } if }
BLD { counttoobject array astore { currentobject 1 index get dup type /arraytype eq { /exec cvx /cachevar cvx 3 array astore cvx defasvarsilent } { cachevar pop pop } ifelse } forall }
BLD { nip { Temp Prcp mygrid params } inputs NEWDATASET /fullname { name } def /name /wct def Prcp dup mygrid .name get 1 array astore REORDER achunk array astore REORDER dup mygrid .name get -28 1 1 shiftdatashort mygrid .name cvntos (_lag) append interp 1 array astore sum (units) (mm/month) def params .mu mul /name (q) def /long_name (number of emerging mosquitoes) def /units (unitless) def /q add_variable Temp dup mygrid .name get 1 array astore REORDER achunk array astore REORDER (Celsius_scale) unitconvert dup mygrid .name get -28 1 1 shiftdatashort mygrid .name cvntos (_lag) append interp last VALUE mygrid .name cvntos (_lag) append cvn removeGRID dup 0 add params .gu sub params .fu exch div /name (u) def /long_name (period of digestion of blood meal) def /units (days) def /scale_min 0 def /scale_max 20 def 3 -1 roll exch /u add_variable u params .nu add /name (U) def /long_name (total gonotrophic cycle length) def /scale_min 0 def /scale_max 20 def /U add_variable exch params .gN sub params .fN exch div /name (N) def /long_name (length of the sporogonic cycle) def /units (days) def /scale_min 0 def /scale_max 50 def /N add_variable U 1 exch div 1 params .betaexp -1.0 exch div eexp sub params .C mul -1 mul 1 add params .alphaexp -1.0 exch div eexp mul ln mul eexp /name (P) def /long_name (mean probability of daily survival for mosquito population) def /scale_min 0 def /scale_max 1 def /P add_variable N P ln mul eexp params .x params .h mul params .k mul params .v mul mul 1 params .betaexp -1.0 exch div eexp sub params .C mul -1 mul 1 add params .alphaexp -1.0 exch div eexp mul params .x params .h mul params .k mul params .v mul -1 mul 1 add mul -1 mul 1 add div /name (S) def /long_name (sporozoite rate) def /scale_min 0 def /scale_max 0.01 def /S add_variable U params .h exch div /name (a) def /long_name (mosquitoes feeding on humans frequency) def /scale_min 0 def /scale_max 0.2 def /a add_variable S q a mul mul 1 params .d div -1 mul 1 add ln mul eexp -1 mul 1 add /name (R) def /long_name (probability of a human receiving an infectious bite) def /scale_min 0 def /scale_max 0.001 def /R add_variable R params .d mul 3 -1 roll exch /At exch def R params .r -1 mul 1 add mul 1 add params .r add /Bt exch def exch { } { T 1 shiftGRID name add_variable } foralldatasets2 exch At 0 mul dup mygrid .name get first VALUE mygrid .name removeGRID params .d 100.0 div add At mygrid .name get beginLoop At add Bt div endLoop Bt dup mygrid .name get 1 shiftGRID dup mygrid .name get last VALUE At dup mygrid .name get 1 shiftGRID dup mygrid .name get last VALUE 2 index dup mygrid .name get 1 shiftGRID dup mygrid .name get last VALUE add exch div appendstream 1 R sub params .r mul 1 index mul /name (c) def /long_name (number of people recovering) def /scale_min 0 def 4 -1 roll exch /c add_variable params .d 2 index sub R mul /name (F) def /long_name (number of people newly infected) def /scale_min 0 def /F add_variable exch /name (I) def /long_name (number of infected humans) def /scale_min 0 def /I add_variable exch /procargs [ procargs aload pop params .d /popu cvx params .fN /spof cvx params .gN /spog cvx params .x /del cvx params .r /rec cvx params .mu /nat cvx params .alphaexp /surva cvx params .betaexp /survb cvx params .C /spr cvx params .fu /feedf cvx params .gu /feedg cvx params .nu /feednu cvx params .h /feedh cvx params .k /infk cvx params .v /infv cvx /:WCT cvx ] store exch 1output :publicproc }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll null 3 1 roll /dodefasvarpartiallysilent cvx 5 array astore cvx dup 1 currentobject put dup 2 get exch pdef }
BLD { CE }
BLD { 4 /flexseasonalmeandailyvalueGT publicproc: { mystream daterange thold minfrac } inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: thold maskle T daterange 0.0 seasonalAverage :a mul :publicproc nip }
BLD { dup type /objecttype eq { datatype /geometrytype eq { 1 index .spatialgrids } if } if dup type dup /realtype eq exch /integertype eq or not { 0.0 } if 2 index array? exch xcheck not and { 5 /weighted-average publicproc: } { 2 index type /objecttype eq { datatype /geometrytype eq { 3 index 3 -1 roll add:isSophisticatedBy nip exch } if } if 4 /weighted-average publicproc: [ ] exch } ifelse { mydata mywghts mygrids renamegrids mymincntwght } inputs currentobject /mywghts get type /arraytype eq { mydata mywghts nip /mywghts exch def } if /mygwghts mywghts def mywghts .datatype /geometrytype eq { mydata mywghts rasterize mygrids length 4 eq { mygrids 2 get .units /degree_east eq mygrids 3 get .units /degree_north eq and { mygrids 1 get mygrids 3 get add cosd mul } if } if mygrids length 2 eq { streamgridarray 0 get .units /degree_east eq streamgridarray 1 get .units /degree_north eq and { streamgridarray 1 get cosd mul } if } if mydata exch mygrids regridAverage nip /mywghts exch def mydata mygwghts geoboundingbox message? not { BOXEDGES /mydata exch def } { pop pop } ifelse mywghts mygwghts geoboundingbox message? not { BOXEDGES /mywghts exch def } { pop pop } ifelse } if /mynwghts mywghts 1 mygrids { 2 index 1 index gridno exch .nrdim gt { npts exch gridstride mul mul } { pop } ifelse } forall BufferOrder dup mygrids average div def mydata .getmissing_value null eq { mydata mynwghts mygrids mulavg } { mydata 0.0 replaceNaN mynwghts mygrids mulavg mydata dataflag mynwghts mygrids mulavg mymincntwght normalize } ifelse renamegrids length 0 gt { 0 1 renamegrids length 1 sub { renamegrids 1 index get exch mygrids exch get .name renameGRID } for } if 1output :publicproc }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /pentadAverage publicproc: 2 array astore cvx newpentadAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD null
BLD { (downloadsCPT) htmlprint }
BLD 0 5 object
BLD { [ Z ] regridLinear exch dup /sp known { 128 64 tsptogauUV } if exch (mb) unitconvert Z 1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30 20 10 toS /gribleveltype 100 def }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll currentobject 3 1 roll cvx /dodefasvarmetacacheds cvx 5 array astore cvx dup 2 get exch pdef }
BLD { counttoobject /RANGE0 /RANGE allstreams1 }
BLD { 3 /splitstreamgrid publicproc: exch .name cvlit exch 2 array astore cvx splitstreamgridcase 1 object exch /filterargs exch def datasetexec :publicproc }
BLD [ null ]
BLD { (inventory) htmlprint }
BLD { continuedataset: dataset: /name /PressureLevel-SF def /long_name (PressureLevel-Smoothed and Filled) def /description (gaussian grid at standard Pressure Levels -- below surface values are filled and then spectrally smoothed which is standard but unwise) def /u { dataset a: .PressureLevel .u [ X Y ] REORDER :a: .hybrid_lev .u Z last VALUE 128 64 tsptogauUV replaceNaN :a 42 gautotspUV 128 64 tsptogauUV } defasvar /v { dataset a: .PressureLevel .v [ X Y ] REORDER :a: .hybrid_lev .v Z last VALUE 128 64 tsptogauUV replaceNaN :a 42 gautotspUV 128 64 tsptogauUV } defasvar /ta { dataset a: .PressureLevel .ta [ X Y ] REORDER extraT :a replaceNaN 42 gautotsp 128 64 tsptogau } defasvar /phi { dataset a: .PressureLevel .phi extraZ :a replaceNaN /missing_value null def 42 gautotsp 128 64 tsptogau } defasvar :dataset :dataset }
BLD { pushallargs pushproc doifstream popproc popallargs }
BLD { 0 /extraP publicproc: dataset a: .surface .pss decompress [ X Y ] REORDER todouble :a: .surface .zg decompress [ X Y ] REORDER todouble :a: .hybrid_lev .ta 128 64 tsptogau Z last VALUE [ X Y ] REORDER todouble :a: .hybrid_lev .P [ Z ] regridLinear [ X Y ] REORDER (Pa) unitconvert todouble :a 4 matchachunk chunksize extrapfn0 TaskStreams 3 get chunksize NewDoubleBuffer nrdim SetStreamIndex* X Y TaskStreams 0 get .achunk pop * /name /extraP def /fullname [ fullname aload pop pop name ] def /gridparam undef :publicproc }
BLD { null 3 1 roll /dodefasvarsilent cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch pdef }
BLD { 2 /dominant_class publicproc: { cat_data gridset } inputs cat_data gridset 2 copy { pop complementgridarray 1 index .getmissing_value? { pop /dominantclass0mv } { /dominantclass0 } ifelse (dominant_class) apply1get1_1scr } /dominant_class gridarray1fn 1 index length 1 eq { 1 index 0 get first 1 eq last npts eq grideven and and { pop /CLIST undef } { .gridvalues /CLIST exch def } ifelse } { [ 2 index { .gridvalues } forall ] [ exch { [ exch { cvntos dup type /stringtype ne { s== } if ( ) } forall pop ] concat } forallforall ] /CLIST exch def } ifelse exch 1 exch { .npts mul } forall /valid_max exch def /valid_min 1 def /scale_min valid_min def /scale_max valid_max def /CS scale_min def /CE scale_max def DATA scale_min scale_max RANGE dup /CLIST known { /CLIST CLIST dup type /namearraytype eq { { cvntos } forall CLIST length array astore def } { gridset length 1 ne { { s== } forall CLIST length array astore def } { gridset 0 get exch { cvsunits exch } forall CLIST length dup 3 add exch 2 add -1 mul roll CLIST length array astore def exch .units /CLISTu exch def } ifelse } ifelse /units /ids def } { /units /ids def CE CS sub 10 lt { /CI 1 def } if } ifelse /missing_value 0 def nip 1output :publicproc }
BLD { 1 index null eq { pop pop } { exch 1 index false defdatasetgridsflag astore pop { 2 copy .name known { pop } { name exch dup /plaindim known { pop pop } { def } ifelse true defdatasetgridsflag astore pop } ifelse } forall dataset null eq { pop pop } { dataset exch name exch store exch defdatasetgridsflag 0 get { defdatasetgrids } { pop pop } ifelse } ifelse } ifelse }
BLD CaseList /datasettype { notyetwritten } def /nonull false def /pendingdatasettype { exec 1 index caseexec } def
BLD { 2 array astore cvx defasvarsilent }
BLD { 4 /seasonalfreqGT publicproc: { mystream monrange thold minfrac } inputs mystream a: dataflag T monthlyAverage minfrac flagge 0 maskle :a: thold maskle dataflag T minfrac monthlyAverage a: T (days since 1960-01-01) streamgridunitconvert T differential_mul T :a: .T :a replaceGRID :a mul T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul /long_name (count) def :publicproc nip }
BLD { foralldatasetsCase 5 object exch dup null eq { pop } { /streamtype exch def } ifelse exch dup null eq { pop } { /datasettypeexit0 exch def } ifelse exch dup null eq { pop } { /datasettype0 exch def } ifelse /myCases 1 index def /==alias /myCases cvx def mycasedefs 1 object /myCases 3 -1 roll def begin startdataset mycaseexec enddataset end }
BLD { currentobject 3 1 roll cvx /dodefasvar cvx 4 array astore cvx dup 1 get exch pdef }
BLD { 5 /flexseasonalnonoverlapDSfreq publicproc: { mystream daterange dslength thold minfrac } inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: -999 replaceNaN 0 thold flagrange [ T ] integral dup T dslength shiftGRID [ T ] regridLB sub dslength flagge [ T ] differences 1 flagge T :a: T daterange 0 6 getinterval VALUES T dslength 1 sub shiftGRID .T first cvsunits 0 6 getinterval ( - ) daterange 8 16 getinterval 3 array astore concat nip seasonalAverage T differential_mul T 2 index .T replaceGRID :a mul :publicproc nip }
BLD { counttoobject /SELECTVALUES0 /SELECT allstreams1 }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll null 3 1 roll cvx /dodefasvarcachesilent cvx 5 array astore cvx dup 1 currentobject put dup 2 get exch pdef }
BLD { Ss .npts ev .npts idiv store M ev .npts store L Ss sv mul todouble [ ev ] REORDER achunk REORDER ndim RECHUNK dup dataflag [ ev ] sum ev .npts flagge 3 index /W getknown { mul } if todouble 3 -1 roll varimax0 5 object /evaln undef /fullname [ /varimax fullname aload pop ] def proclevel 0 get 1 eq { /procargs TaskParameterBlock [ procargs aload pop EPS /store cvx /EPS cvx DELTA /store cvx /DELTA cvx MAXIT /store cvx /MAXIT cvx /:varimax cvx ] nip store } if :publicproc /Ss TaskStreams 0 get chunksize NewDoubleBuffer ev /evrot units gridtype gridvalues NewGRID nip name exch def /ev undef nrdim SetStreamIndex* streamgrids pop evrot * /long_name (rotated structures) def /name /Ss def /dataset 3 index def /fullname [ dataset .fullname aload pop name ] def def /W TaskStreams 1 get /name /W def /long_name (weights) def /dataset 3 index def /fullname [ dataset .fullname aload pop name ] def def /H TaskStreams 0 get TaskParameterBlock .M NewDoubleBuffer nrdim 1 sub SetStreamIndex* TaskStreams 0 get .streamgrids pop * /ev undef /name /H def /long_name (communalities) def /dataset 3 index def /fullname [ dataset .fullname aload pop name ] def def /S STREAM TaskParameterBlock .L NewDoubleBuffer 1 SetStreamIndex* Ss .evrot * /name /S def /long_name (energy) def /dataset 3 index def /fullname [ dataset .fullname aload pop name ] def def /AT STREAM TaskParameterBlock .L dup mul NewDoubleBuffer 2 SetStreamIndex* TaskStreams 0 get .ev Ss .evrot * /name /AT def /long_name (varimax rotation) def /dataset 3 index def /fullname [ dataset .fullname aload pop name ] def def /Ts Ts sv div streamgridarray { name /ev eq { pop } if } forall Ts .ndim 1 sub REORDER AT ev mulsum /dataset 3 index def /name /Ts def /fullname [ dataset .fullname aload pop name ] def def /sv undef }
BLD { (wms) xmlprint }
BLD { false 1 index DATASETbot ==noprintdataset { ifvarcase caseexec } forsome }
BLD tableobject
BLD { counttoobject dup 1 eq { pop ev exch 1 exch RANGE } { pop ev 3 1 roll RANGE } ifelse varimax: :varimax }
BLD { currentobject 3 1 roll cvx /dodefasvarKeepRestrictions cvx 4 array astore cvx dup 1 get exch pdef }
BLD { { /meansq0 (mean sq) apply1get1_complementgrids } /meansqover gridarray1fn }
BLD { exch removeextrausingDS 1 index last dup subgrid name exch def last 3 index exec dup totype /arraytype eq { codedstringtostream nip } if nip dup totype /streamtype eq { getrealization } if nip nip }
BLD { 2 /poestudnt publicproc: { A dof } inputs dof type /objecttype eq { A dof 2 array astore { todouble toNaN8 } forall 1 index 0.0 mul add 1 index .chunksize 1 integerarray astore poestudntdof0 } { A todouble toNaN8 chunksize dof 2 integerarray astore poestudnt0 } ifelse TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /poestudnt A .fullname ] def 1output :publicproc }
BLD { WWWinfo .url-q (") rsearch pop pop pop redirectto }
BLD { 1347990070 set_code_last_modified 2 index totype /arraytype eq not { 1 index xcheck { [ ] exch } { { getcptvars } 3 1 roll } ifelse } if { mydataset varproc sgrids tgrids } inputs /==alias /cptargs def /cptargs 1 index def /auxdata [ ] def tgrids length 0 gt { tgrids 0 get totype /streamtype eq { /time tgrids 0 get def /tgrids time .streamgridarray def } { /time tgrids 0 get def } ifelse } if mydataset totype /streamtype eq { /mydata [ mydataset ] def } { mydataset [ varproc dup type /arraytype eq { counttomark 2 idiv { REORDER counttomark 1 roll } repeat } if ] nip /mydata exch def } ifelse code_last_modified mydata { getlast_modified? { nip imax } { pop } ifelse } forall mimeheadersetlastmod sgrids length 0 gt { mydata { sgrids REORDER sgrids length 1 gt { sgrids 1 get units /degree_north eq { high low RANGE } { pop } ifelse } if } forall mydata astore pop } if 0 mydata { .ndim imax } forall 3 lt /stationdata? exch def stationdata? { /auxdata [ mydata { units /degree_east eq { /name /X def } if units /degree_north eq { /name /Y def } if ndim 1 gt { pop } if } forall ] def /mydata [ mydata { ndim 1 le { pop } if } forall ] def mydata length 0 eq { /mydata auxdata def /auxdata [ ] def } if } if PS2 exch setplotstream (xmlns:cpt=http://iri.columbia.edu/CPT/v10/ ) PSprint false mydata { /standard_name known or } forall { (xmlns:cf=http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/ ) PSprint } if (cpt:nfields=) PSprint 0 mydata { .nchunk add } forall 1 tgrids { .npts mul } forall idiv s== PSprint ( ) PSprint currentobject /time getknown { (cpt:T) PSprint ( %=CPT[) name cvntos (]) 3array astore concat exch dup totype /gridtype eq { 1 array astore } { [ exch streamgrids counttomark -1 roll ] } ifelse codedstringtostream 1 subplot: PSprint :subplot ( ) PSprint } if mydata 0 get mydata length 1 gt { mydata 1 1 index length 1 sub getinterval { 1 index .nchunk 1 index .nchunk gt stationdata? not { 1 index .nchunk 1 gt and } if { exch } if pop } forall } if stationdata? { ndim 1 gt { 2 RECHUNK } { 1 RECHUNK } ifelse } if nchunk 1 gt { plotstreamflush achunk array astore beginPlotLoop } if 1 subplot: mark mydata { streamrescaleonlyifnecessary nrdim 0 eq { stationdata? { 1 RECHUNK null tgrids 0 get } if } { chunk 1 eq { stationdata? { exch 2 RECHUNK exch tgrids 0 get } { null } ifelse } if } ifelse [ (cpt:field=) counttomark 3 add index .name cvntos stationdata? not { counttomark 3 add index .achunk array astore { get_units timeunits? nip { .name cvntos (, cpt:) exch (=%=CPT[) 1 index (]) } { .name cvntos (, cpt:) exch (=%=[) 1 index (]) } ifelse } forall } if (, cpt:nrow=) counttomark 1 add index dup null eq { pop 1 } { .npts } ifelse s== (, cpt:ncol=) counttomark 2 add index dup null eq { pop 1 } { .npts } ifelse s== (, cpt:row=) counttomark 1 add index .name cvntos counttomark 1 add index null eq not { (, cpt:col=) stationdata? { auxdata length 0 eq (index) (station) ifelse } { counttomark 2 add index .name cvntos } ifelse } if counttomark 3 add index /units getknown { cvntos (, cpt:units=) exch } if counttomark 3 add index /standard_name getknown { cvntos (, cf:standard_name=) exch } if counttomark 3 add index .getmissing_value? { s== (, cpt:missing=) exch } if cptargs /time getknown { dup totype /streamtype eq { (, cpt:T=%=CPT[) exch .name cvntos (]) } { pop } ifelse } if ( ) counttomark 2 add index null eq { ( ) counttomark 3 add index .name cvntos ( ) } if ] concat 3 index .achunk cptargs /time getknown { dup totype /streamtype eq { exch 1 add array astore } { pop array astore } ifelse } { array astore } ifelse codedstringtostream 1 index null eq { nip } if dup PSprint counttomark 2 sub index dup null eq { pop } { (%=CPT[) name cvntos (]) 3array astore concat exch 1 array astore codedstringtostream ( %s) sprintf 1 subplot: PSprint :subplot ( ) PSprint auxdata { (cpt:) PSprint name cvntos PSprint (%=CPT[) name cvntos (]) 3array astore concat exch [ exch streamgrids exch ] codedstringtostream ( %s) sprintf 1 subplot: PSprint :subplot ( ) PSprint } forall } ifelse stationdata? not { counttomark subplot: } if counttomark 3 eq { time 0 RECHUNK exch } if exch (%=CPT[) name cvntos (]) 3array astore concat exch .streamgridarray 0 1 getinterval codedstringtostream 1 RECHUNK exch plotstream counttomark matchachunk 3 index null eq { 4 -1 roll pop 3 index .name 4 1 roll } if 4 index psS new setPS 4 index .bufferwordsize store nwordsize chunk 2 eq { .npts store ny .npts } { .npts store ny 1 } ifelse store nx nip cptv10types 6 index datatype nip getknown { exec } { (Not supported datatype) } ifelse lastinputisnextplotstream stationdata? not { :subplot } if } forall pop PSclose plotstream plotloop { 0 SetStreamIndex* loopStream .streamgrids * endLoop } if realize pop pop pop }
BLD 0 47 object /datasettype { (not ready for datatype) error } def /shortarraytype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def /streamtype { (not ready for datatype) error } def /integertype { (not ready for datatype) error } def /arraytype { (not ready for datatype) error } def /htmlfiletype { (not ready for datatype) error } def /jpegfiletype { (not ready for datatype) error } def /pendingdatasettype { (not ready for datatype) error } def /bytearraytype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def /stringtype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def /imageobjecttype { (not ready for datatype) error } def /figviewtype { (not ready for datatype) error } def /nulltype { (not ready for datatype) error } def /marktype { (not ready for datatype) error } def /operatortype { (not ready for datatype) error } def /geometrytype { (not ready for datatype) error } def /integerarraytype { cptv10tsv0i4 } def /doublearraytype { cptv10tsv0r8 } def /objecttype { (not ready for datatype) error } def /htmlprinttype { (not ready for datatype) error } def /gridtype { (not ready for datatype) error } def /xmlfiletype { (not ready for datatype) error } def /linktype { (not ready for datatype) error } def /booleantype { (not ready for datatype) error } def /nametype { (not ready for datatype) error } def /messagetype { (not ready for datatype) error } def /figobjecttype { (not ready for datatype) error } def /realtype { (not ready for datatype) error } def /realarraytype { cptv10tsv0r4 } def /namearraytype { (not ready for datatype) error } def /giffiletype { (not ready for datatype) error } def
BLD CaseListpops2 /gridtype { pop pop pop true leave } def
BLD FilterSet /gridtype { pop 1 index .name 1 index .name eq { pop monthlyedgesgrid partialgrid monthtimegrid } { pop } ifelse } def /streamtype { 3 -1 roll decompress 3 1 roll 2 index 2 index .name getknown { exec 3 -1 roll pop exch 2 index .getmissing_value null eq { pop newmonthlyAverage0 } { 3 1 roll 1 index 0 replaceNaN 1 index newmonthlyAverage0 3 1 roll exch dataflag exch newmonthlyAverage0 3 -1 roll normalize } ifelse } { pop pop } ifelse } def
BLD { foralldatasetsCase 5 object exch dup null eq { pop } { /gridtype exch def } ifelse exch dup null eq { pop } { /streamtype exch def } ifelse exch dup null eq { pop } { /datasettypeexit0 exch def } ifelse exch dup null eq { pop } { /datasettype0 exch def } ifelse /myCases 1 index def /==alias /myCases cvx def mycasedefs 1 object /myCases 3 -1 roll def begin startdataset mycaseexec enddataset end }
BLD { rootmeansq }
BLD { dup type /objecttype eq { dup .from exch .to RANGE } { 1 { VALUE0 } /VALUE allstreams1 } ifelse }
BLD { 4 /butt_filter: publicproc: buttparams buttS new (lp) store ft 2 index store w2 0.7 store flat 0.7 store att 2 store ford }
BLD { (downloadsNCL) htmlprint }
BLD { mark 1 index .allnames counttomark namearray astore nip cvnatoslurl }
BLD { (missingfiles) htmlprint }
BLD { get_scale_min number? { getscale_factor mul getadd_offset add } if }
BLD { table: }
BLD { exch npts 2 le { nip } { removeextrausingDS 1 index last dup subgrid name exch def last 3 index exec dup totype /arraytype eq { codedstringtostream nip } if nip dup totype /streamtype eq { getrealization } if dup remotefileexistssetlastmod? { pop nip } { pop dup /myintegralgrid getknown { first secondtolast subgrid exch first secondtolast subgrid exch /myintegralgrid exch def } { first secondtolast subgrid } ifelse exch remoteremoveextrausing0 } ifelse } ifelse }
BLD { currentobject 3 1 roll cvx /dodefasvarsilentKeepRestrictions cvx 4 array astore cvx dup 1 get exch pdef }
BLD { dup type /nametype eq { 2 index totype /gridtype eq { 5 } { 3 } ifelse } { 1 index totype /gridtype eq { 4 } { 2 } ifelse } ifelse /BOXEDGES publicproc: dup type /nametype eq { parameter } if dup totype /stringtype eq { geoobject } if dup totype /streamtype eq { geoboundingbox } if 1 index totype /gridtype ne { exch getXY? not { (no spatial grids) error } if 4 -1 roll } if { datastream mabs mord mybbox } inputs /outbbox mybbox def mybbox length 5 ge { datastream getCRS nip mybbox 4 get eq not { mybbox datastream getCRS exch .getX .units projectbbox /outbbox exch def } if } if datastream mabs null ne { mabs outbbox 0 get outbbox 2 get RANGEEDGES } if mord null ne { mord outbbox 1 get outbbox 3 get RANGEEDGES } if 1output :publicproc }
BLD { gridarray1hold astore pop dup type dup /realtype eq exch /integertype eq or not { 0.0 } if 1 index type /objecttype eq { emptyarray exch } if 1 gridarray1hold aload pop allstreams1 }
BLD FilterSet /gridtype { 2 index .name 2 index eq { nip shiftGRIDgrid nip } { pop pop } ifelse } def /streamtype { 2 index 2 index known { exch cvx exec exch shiftGRID0 } { pop pop } ifelse } def
BLD { 4 /seasonalfreqLT publicproc: { mystream monrange thold minfrac } inputs mystream a: dataflag T monthlyAverage minfrac flagge 0 maskle :a: thold maskge dataflag T minfrac monthlyAverage a: T (days since 1960-01-01) streamgridunitconvert T differential_mul T :a: .T :a replaceGRID :a mul T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul :publicproc nip }
BLD { gridarray1hold astore pop dup type /objecttype eq { emptyarray exch } if 0 gridarray1hold aload pop allstreams1 }
BLD { dup totype /figviewtype eq }
BLD { 2 array astore cvx nopdefasvarsilent }
BLD { { complementgridarray { maxfnof0 maxfnof0dp } (max) apply1get1nocount } /maxover gridarray1fn }
BLD FilterSet /gridtype { pop pop } def /streamtype { currentobject 2 index known { exch cvx exec exch splitstreamgridstream } { pop pop } ifelse } def
BLD { exch npts 2 le { nip } { removeextrausingDS 1 index last dup subgrid name exch def last 3 index exec dup totype /arraytype eq { codedstringtostream nip } if nip dup totype /streamtype eq { getrealization } if dup fileexists? { deflastmod nip } { pop dup /myintegralgrid getknown { first secondtolast subgrid exch first secondtolast subgrid exch /myintegralgrid exch def } { first secondtolast subgrid } ifelse exch removeextrausing0 } ifelse } ifelse }
BLD { foralldatasetsCase 5 object exch dup null eq { pop } { /streamtype exch def } ifelse exch dup null eq { pop } { /datasettype exch def } ifelse /myCases 1 index def /==alias /myCases cvx def exch startdataset mycaseexec enddataset pop }
BLD 0 11 object /attenuation { store att } def /filterType { store ft } def /forder { store ford } def /buttS buttS def /flatness { store flat } def /freqCut2 { store w2 } def
BLD FilterSet /gridtype { boxAveragedoarg 1 index .name boxgrids anymatch { 0 1 boxgrids length 1 sub { boxgrids 1 index get name eq { boxargs exch get nip ChangeGridStep leave } { pop } ifelse } for } { pop } ifelse } def /streamtype { boxAveragedoarg 1 index boxgrids allknown { /boxgrids 2 index [ boxgrids { currentobject exch get } forall ] nip def 0 1 boxgrids length 1 sub { boxgrids 1 index get exch boxargs exch get ChangeGridStep name exch def } for exch boxgrids 1 index totype /gridtype eq { 1 index 1 index 0 get eq { pop .name exec } { pop } ifelse } { exch decompress exch boxargs dup length 1 sub get regridAverageSP toreal } ifelse nip } { pop } ifelse } def
BLD { rootmeansqanom }
BLD { (dodsdatasets) htmlprint }
BLD { dup type /nametype eq { gridnobyname nip 0 ne } { dup totype /datasettype eq { exch .relativename pknown } { false exch { 2 index exch gridnobyname 0 ne nip or } forall nip } ifelse } ifelse }
BLD { svd-part1 gappy-data? { dup /history known not { /history null def } if history exch eval 0 maskle SELECT exch /history exch def history null eq { /history undef } if } if proclevel 0 get 1 eq { /procargs [ procargs aload pop gappy-data? { /gappy-data cvx } if spatial-mean? { /spatial-mean cvx } if temporal-mean? { /temporal-mean cvx } if /:svd cvx ] store } if svd-part2 :publicproc svd-part3 }
BLD { 2 index totype /arraytype eq { 3 index 3 index 2 { 3 index [ exch { .name } forall ] } repeat 4 /svd publicproc: pop pop pop pop } { 2 index 2 { 2 index [ exch { .name } forall ] } repeat 3 /svd publicproc: pop pop pop } ifelse svdparams svd-part1 svd-part2 :publicproc svd-part3 }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /pentadAverage publicproc: 2 array astore cvx newpentadAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD FilterSet /gridtype { pop 1 index .name 1 index .name eq { pop pentadedgesgrid (pentads since 1961-01-01) gridunitconvert partialgrid } { pop } ifelse } def /streamtype { 3 -1 roll decompress 3 1 roll 2 index 2 index .name getknown { exec 3 -1 roll pop exch 2 index .getmissing_value null eq { pop newpentadAverage0 } { 3 1 roll 1 index 0 replaceNaN 1 index newpentadAverage0 3 1 roll exch dataflag exch newpentadAverage0 3 -1 roll normalize } ifelse } { pop pop } ifelse } def
BLD { 2 /setmissing_value publicproc: setmissingvalueCase 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { 3 /flexseastotAvgFill publicproc: { mystream daterange minfrac } inputs mystream T daterange minfrac seasonalAverage T differential_mul :publicproc nip }
BLD { counttoobject 1 sub index type /arraytype ne { 3 -1 roll 1 array astore 3 1 roll } if counttoobject 1 sub array astore null 1 index length 5 add object exch /boxargs exch def exch /boxgrids exch cvlit def }
BLD { allgrid dup type /nametype eq { get exec } { dup totype /datasettype eq { exch .relativename pget } { [ exch { counttomark 1 add index exch getknown pop } forall ] nip } ifelse } ifelse }
BLD { (auxinfo) xmlprint }
BLD { appendprep 0 { appendstream } /appenddataset allstreams1 currentfilepattern 0 get -1 ne { /filepattern currentfilepattern 0 get def } if }
BLD { ndim 1 eq { dup /buffer get GRIDParent /buffer get eq } { false } ifelse }
BLD { { complementgridarray /rootmeansqanom0 (root mean sq anom) apply1get12scr } /rootmeansqover gridarray1fn }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /monthlyAverage publicproc: 2 array astore cvx newmonthlyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { rootmeansqanomover }
BLD { 5 /seasonalnonoverlapWSfreq publicproc: { mystream monrange wslength thold minfrac } inputs mystream a: dataflag T monthlyAverage minfrac masklt T monrange 1.0 seasonalAverage :a: -999 replaceNaN thold flaggt [ T ] integral dup T wslength shiftGRID [ T ] regridLB sub wslength wslength flagrange [ T ] differences 1 1 flagrange T sums T (0000 1) VALUES [ T ] differences T (months since 1960-01-01) streamgridunitconvert T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul :a mul :publicproc nip }
BLD { 1 /STEP0 /STEP allstreams1 }
BLD { 3 index totype /arraytype ne { [ 4 index { pop } { } foralldatasets2 ] 4 1 roll } if 5 1 roll { mydataset variablesproc spatialgrids timegrids } inputs mydataset totype /streamtype eq { mydataset decompress /mydataset exch def } if /gappy-data? gappy-data? def /spatial-mean? spatial-mean? def /temporal-mean? temporal-mean? def nip /mixedarray currentobject /variablesproc get xcheck { mydataset dup totype /streamtype eq { [ exch variablesproc ] } { [ variablesproc ] nip } ifelse } { variablesproc } ifelse def /weights [ mixedarray { timegrids 0 get gridnobyname 0 gt { pop } if } forall ] def /variablesarray [ mixedarray { timegrids 0 get gridnobyname 0 eq { pop } if } forall ] def weights length variablesarray length 1 add eq { weights 0 1 index length 1 sub getinterval { weights dup length 1 sub get mul } forall weights 0 1 index length 1 sub getinterval astore } if variablesarray length 1 gt { (Sorry, svd is not yet ready for multiple variables. Let Benno) print ( know that you are interested, and you can test it when it is ready. ) print error } if /repeatgrids [ variablesarray 0 get spatialgrids aload pop timegrids aload length spatialgrids length add REORDER0 .achunk pop ] def 1 spatialgrids { .npts mul } forall 1 timegrids { .npts mul } forall le { /rgrids spatialgrids def /avgrids timegrids def } { /rgrids timegrids def /avgrids spatialgrids def } ifelse variablesarray 0 get ndim rgrids { gridno imin } forall 1 sub dup 0 gt { RECHUNK .chunk array astore /avchunkgrids exch def } { pop pop /avchunkgrids [ ] def } ifelse /avchunkcheck null 5 object avchunkgrids { name exch def } forall repeatgrids { .name undef } forall def [ avchunkgrids { avchunkcheck 1 index .name known not { pop } if } forall ] /avchunkgrids exch def /avachunkgrids [ avgrids { avchunkcheck name known { pop } if } forall ] def variablesarray 0 get weights length 0 gt { weights 0 get 0 max /valid_min 0 def sqrt mul 1100021758 set_code_last_modified } if avchunkgrids aload pop rgrids aload pop avachunkgrids aload pop avgrids length rgrids length add REORDER0 avchunkgrids length rgrids length add RECHUNK toNaN 1 avchunkgrids { .npts mul } forall 1 rgrids { .npts mul } forall 1 avgrids { .npts mul } forall 2 index idiv 1 4 integerarray astore missing_value null eq { covarnonan0 STREAM TaskParameterBlock 1 get dup 1 add mul 2 div NewIntegerBuffer pop STREAM 11 object /name /cov def /fullname [ /cov variablesarray 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /units variablesarray 0 get .units dup unitmul def /ISYMM dup TaskParameterBlock 1 get dup 1 add mul 2 div NewIntegerGRID def ISYMM .npts NewDoubleBuffer 1 SetStreamIndex* ISYMM avachunkgrids aload pop repeatgrids aload pop * avachunkgrids { last VALUE } forall avachunkgrids { removeGRID0 } forall /symmetricStorageMode compression: /symmetricchunk rgrids def :compression } { svdcovarcomp0 } ifelse DATASET 11 object /name /svd cvx def variablesarray 0 get /last_modified getknown { /last_modified exch def } if exch eigrs_and_vartot name 4 index ! nrdim 1 sub RECHUNK decompress ev .npts BufferOrder ev low high RANGE name 3 index ! /units TaskStreams 0 get .units def ev low high RANGE name exch def /fullname [ name variablesarray 0 get .fullname ] def rgrids { name exch def } forall avgrids { name exch def } forall eval .ev name exch def }
BLD { mark ingridcachedir 2 index .allnames counttomark namearray astore nip cvnatofilename }
BLD { (wcs) xmlprint }
BLD { (figviewer) htmlprint }
BLD { CS }
BLD { dup type /objecttype eq { allmyname /SELECT ne { 11 object proclevel 0 get 1 eq { /dataset currentobject parent def } if } if ifSTREAM { ifGRID { dup allgrid anyknowngrid { dup allargs aload pop allroutine } if } { dup allgrid anyknowngrid { dup allgridget allargs aload pop allroutine } { decompress dup allgrid anyknowngrid { dup allgridget allargs aload pop allroutine } if } ifelse } ifelse } { doallstreams } ifelse dup null ne { allmyname /SELECT ne { proclevel 0 get 1 eq { allgrid totype /datasettype eq { /dataset [ dataset allgrid ] def } if /myproc [ allgrid dup totype /datasettype eq { pop } if allargs aload pop allmyname cvx ] def /myprocds 1 index def sealobject } if } if } if } { pop pop } ifelse }
BLD { 3 /WCT: publicproc: wctparams wctS new 100000 store d 111 store fN 16 store gN 0.1 store x 0.182 store r 600 store mu 1.229 store alphaexp 0.4 store betaexp 0.0 store C 36.5 store fu 9.8999996 store gu 1.26 store nu 0.4 store h 1.0 store k 0.4 store v }
BLD FilterSet /gridtype { pop name /T eq { monthlyedgesgrid partialgrid monthtimegrid } if } def /streamtype { exch decompress exch 1 index /T known { getmissing_value null eq { pop monthlyAverage0 } { exch dup 0 replaceNaN monthlyAverage0 exch dataflag monthlyAverage0 3 -1 roll normalize } ifelse } { pop } ifelse } def
BLD { /evaln eval vartot div /name /evaln def /long_name (normalized eigenvalues) def def /sv eval sqrt /name /sv cvx def /long_name (singular values) def /units variablesarray 0 get .units def def evec rgrids timegrids eq { missing_value null eq { sv div /missing_value null def } { sv div } ifelse } { rgrids aload length REORDER0 CopyStream } ifelse variablesarray 0 get weights length 0 gt { weights 0 get 0 max /valid_min 0 def sqrt mul } if avchunkgrids aload pop rgrids aload pop avachunkgrids aload pop avgrids length rgrids length add REORDER0 avchunkgrids length rgrids length add RECHUNK toNaN exch rgrids mulavg DATAAUTO rgrids timegrids eq { weights length 0 gt { weights 0 get 0 max /valid_min 0 def sqrt div } if /name /Ss cvx def /long_name (structures) def correlationcolorscale DATA -4 4 RANGE name exch def /Ts evec sv mul /long_name (time series) def /name /Ts cvx def def } { /name /Ts cvx def /long_name (time series) def name exch def /Ts Ts streamgridarray { name /ev eq { pop } if } forall Ts .ndim 1 sub REORDER def /Ss evec weights length 0 gt { weights 0 get 0 max /valid_min 0 def sqrt div } { CopyStream } ifelse /name /Ss cvx def /long_name (structures) def correlationcolorscale DATA -4 4 RANGE def } ifelse weights length 0 gt { /W weights 0 get 0 max /valid_min 0 def /name /W def /long_name (weights) def def } if /eval undef /evec undef nip }
BLD FilterSet /gridtype { boxAveragedoarg 1 index .name boxgrids anymatch { 0 1 boxgrids length 1 sub { boxgrids 1 index get name eq { boxargs exch get nip ChangeGridStep leave } { pop } ifelse } for } { pop } ifelse } def /streamtype { boxAveragedoarg 1 index boxgrids allknown { /boxgrids 2 index [ boxgrids { currentobject exch get } forall ] nip def 0 1 boxgrids length 1 sub { boxgrids 1 index get exch boxargs exch get ChangeGridStep name exch def } for exch boxgrids 1 index totype /gridtype eq { 1 index 1 index 0 get eq { pop .name exec } { pop } ifelse } { exch decompress exch boxargs dup length 1 sub get regridAverage } ifelse nip } { pop } ifelse } def
BLD { { /rootmeansq0 (root mean sq) apply1get1 } /rootmeansq gridarray1fn }
BLD { array? { 0 } if 1 index totype /streamtype eq { 0 } if 2 index .array? { 5 /mulavg publicproc: } { 4 /mulavg publicproc: [ ] exch } ifelse { strm1 strm2 grids renamegrids minper } inputs strm1 mayberechunkmulavg strm2 mayberechunkmulavg 2xtoNaN8 2 setcommongrids 1 index .npts 1 index .npts ge { reordertomatch } { exch reordertomatch exch } ifelse grids chunkpattern dup 3 1 index 2 get minper mul round cvi put 2 index .missing_value null eq 2 index .missing_value null eq and { 1 index .datatype /realarraytype eq { mulavg0g } { mulavg1g } ifelse STREAM TaskParameterBlock 1 get NewIntegerBuffer pop TaskStreams 0 get dup TaskStreams 1 get grids binarysetSIRecord chunksize NewDoubleBuffer } { 1 index .datatype /realarraytype eq { mulavg0MVg } { mulavg0MVdpg } ifelse STREAM TaskParameterBlock 1 get NewIntegerBuffer pop TaskStreams 0 get dup TaskStreams 1 get grids binarysetSIRecord chunksize NewIntegerBuffer pop TaskStreams 0 get dup TaskStreams 1 get grids binarysetSIRecord chunksize NewDoubleBuffer } ifelse grids { 2 copy gridnobyname nip 0 eq { .name undef } { last VALUE } ifelse } forall grids { 2 copy gridnobyname nip 0 eq { pop } { removeGRID0 } ifelse } forall /units strm1 .units strm2 .units unitmul preferredunitname def renamegrids length 0 gt { 0 1 renamegrids length 1 sub { renamegrids 1 index get exch grids exch get .name renameGRID } for } if 1output :publicproc }
BLD { 3 /RANGESTEP0 /RANGESTEP allstreams1 }
BLD { null 3 1 roll /dodefasvarsilentnoreuse cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch pdef }
BLD FilterSet /gridtype { pop 1 index .name 1 index .name eq { pop dailyedgesgrid partialgrid } { pop } ifelse } def /streamtype { 3 -1 roll decompress 3 1 roll 2 index 2 index .name getknown { exec 3 -1 roll pop exch 2 index .getmissing_value null eq { pop dailyAverage0 } { 3 1 roll 1 index 0 replaceNaN 1 index dailyAverage0 3 1 roll exch dataflag exch dailyAverage0 3 -1 roll normalize } ifelse } { pop pop } ifelse } def
BLD { 1 copy type /arraytype eq { 2 /stddev publicproc: 2 copy rmsaover } { 3 /stddev publicproc: 3 copy rmsaover exch pop } ifelse 3 2 roll dataflag 3 -1 roll sum dup 1.0 sub div sqrt mul :publicproc }
BLD { foralldatasetsCase 5 object exch dup null eq { pop } { /streamtype0 exch def } ifelse exch dup null eq { pop } { /datasettype0 exch def } ifelse /arraytype { pop } def /pendingdatasettype currentobject /arraytype get def /myCases 1 index def /==alias /myCases cvx def mycasedefs 1 object /myCases 3 -1 roll def begin startdataset mycaseexec enddataset end }
BLD { 3 /seastotAvgFill publicproc: { mystream monrange minfrac } inputs mystream T minfrac monthlyAverage a: T (days since 1960-01-01) streamgridunitconvert T differential_mul T :a: .T :a replaceGRID T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul :publicproc nip }
BLD { streamdefCases 1 index totype get exec }
BLD { 5 /seasonalnonoverlapDSfreq publicproc: { mystream monrange dslength thold minfrac } inputs mystream a: dataflag T monthlyAverage minfrac masklt T monrange 1.0 seasonalAverage :a: -999 replaceNaN 0 thold flagrange [ T ] integral dup T dslength shiftGRID [ T ] regridLB sub dslength dslength flagrange [ T ] differences 1 1 flagrange T sums T (0000 1) VALUES [ T ] differences T (months since 1960-01-01) streamgridunitconvert T monrange 1.0 seasonalAverage monrange (-) search { nip pop } if 0 3 getinterval interp monrange (-) search { nip nip } if 0 3 getinterval interp sub dup 0 ge { 1 add } { 1 add 12 add } ifelse mul :a mul :publicproc nip }
BLD { 10 /onsetDate publicproc: { myprcp Tgrid earlyStart searchDays rainyDay runningDays runningTotal minRainyDays dryDays drySpell } inputs searchDays runningDays lt { (searchDays must be greater or equal than runningDays) leavemessage 1output } if drySpell dryDays lt drySpell ne 0 and { (drySpell must be greater or equal than dryDays, please go back) leavemessage 1output } if myprcp Tgrid 1 index Tgrid earlyStart VALUES Tgrid .name get .gridvalues { searchDays drySpell add { dup 1 add dup last gt { pop } if } repeat } forall VALUES dup dup Tgrid .name get npts /I exch NewIntegerGRID replaceGRID I searchDays drySpell add 1 add splitstreamgrid I /gridtype 0 def pop dup I runningDays 2.0 div cvi -1 mul shiftGRID I first dup runningDays 2.0 div cvi 1 sub add RANGE 0 mul exch 2 { exch [ I ] REORDER } repeat appendstream dup I runningDays 2.0 div cvi shiftGRID I last dup runningDays 2.0 div cvi 1 sub sub exch RANGE 0 mul appendstream dup rainyDay flaggt dup 3 -2 roll I runningDays runningAverage runningDays mul minRainyDays flagge exch I runningDays runningAverage runningDays mul runningTotal flagge mul drySpell 0 ne { 1 index I dryDays runningAverage 0 flaggt I runningDays 2.0 div dryDays 2.0 div add 1 1 index drySpell dryDays sub 1.0 add 1.0 sub add shiftdatashort [ I_lag ] average 1 flagge mul } if runningDays 2 mod 0 eq { 1 index I 0.5 shiftGRID exch [ I ] regridLB nip } { [ I ] regridLB } ifelse I runningDays 1.0 sub 2.0 div dup -1.0 mul exch 1 exch shiftdatashort [ I_lag ] sum 0 flaggt mul 1 masklt 1 index Tgrid .name get 0.0 add /name /datesample def dup Tgrid .name get npts /I exch NewIntegerGRID replaceGRID I searchDays drySpell add 1 add splitstreamgrid I /gridtype 0 def pop exch mul [ I ] minover I2 3 -1 roll T earlyStart VALUES Tgrid .name get 2 array astore { npts } forall 3 -1 roll ne { first secondtolast subgrid } if replaceGRID /pointwidth 1 def /long_name (Onset Date) def /fullname [ /onsetDate myprcp .fullname ] def 1output :publicproc }
BLD { 2 array astore cvx defasvarcachesilent }
BLD { /svdview.html { (svdview) htmlprint } def Ss .npts 12500000 gt { /LargeCalculation dataareIRIonlyPassword } if [ currentobject /W getknown pop vartot sv evaln Ss Ts ] { /dataset 2 index def /myproc undef /fullname [ dataset .fullname name ] def dataset /last_modified getknown { /last_modified exch def } if Ss .npts 12500000 gt { /LargeCalculation dataareIRIonlyPassword } if name exch def } forall }
BLD { fullnamegen }
BLD { nip { streamN mytsgrid px w1 params } inputs w1 params .ft params .w2 params .flat params .att params .ford butt_design streamN px -1 eq not { dup 1.0 w1 div round 1 index mytsgrid .name get step 3 -1 roll mul px 0 eq { pad0 } if px 1 eq { pad1 } if px 2 eq { pad2 } if } if ycoeffs -1.0 mul dup coeffs high low RANGE coeffs 2 index .coeffs replaceGRID xcoeffs gain div 3 { 3 -1 roll 3 index mytsgrid .name get /Ide unitmatrix mytsgrid .name cvntos (_out) 2 array astore concat interp fordvalue -1.0 mul 1 index .step dup 3 -2 roll mul exch 0 shiftdatashort mytsgrid .name cvntos (_out_lag) 2 array astore concat interp coeffs replaceGRID [ coeffs ] mulsum } repeat c: 1.0 :c 4 index mytsgrid .name get beginLoop 0.9 mul endLoop dup dup mytsgrid .name get /myT2 renameGRID .myT2 beginLoop 0.9 div endLoop 1.1 maskge dup dup mytsgrid .name get high low RANGE dup mytsgrid .name get 2 index mytsgrid .name get replaceGRID myT2 high low RANGE myT2 2 index .myT2 replaceGRID replaceNaN dup mytsgrid .name get 1 array astore [ myT2 ] svd a: .Ss :a: .Ts :a: .sv :a sqrt div [ ev ] mulsum 4 -2 roll 2 { exch 2 index dup mytsgrid .name get 1 array astore mulsum myT2 2 index mytsgrid .name cvlit nip renameGRID mytsgrid .name cvntos (_out) 2 array astore concat interp 1 array astore 1 index mytsgrid .name get 1 array astore ginverse } repeat exch 2 index dup mytsgrid .name get 1 array astore mulsum 3 index mytsgrid .name cvntos (_out) 2 array astore concat interp 1 array astore mulsum myT2 /myT3 renameGRID 3 -1 roll dup mytsgrid .name get 1 array astore mulsum myT2 2 index mytsgrid .name cvlit nip renameGRID dup mytsgrid .name get 1 array astore mulsum mytsgrid .name cvntos (_out) 2 array astore concat interp 1 array astore mulsum myT3 0 add myT3 a: .first :a: .first step fordvalue wcvalue div mul add :a maskrange 0 mul add dup dup mytsgrid .name get high low RANGE dup mytsgrid .name get 2 index mytsgrid .name get replaceGRID myT3 high low RANGE myT3 2 index .myT3 replaceGRID replaceNaN dup mytsgrid .name get 1 array astore mulsum myT3 2 index mytsgrid .name cvlit nip renameGRID px -1 eq not { dup mytsgrid .name get 3 -1 roll mytsgrid .name get a: .first :a: .last :a RANGEEDGES } if /name (butt) def /long_name (butterworth) def /fullname [ /butt streamN .fullname ] def /butt add_variable exch /procargs [ procargs aload pop params .ft /filterType cvx params .w2 /freqCut2 cvx params .flat /flatness cvx params .att /attenuation cvx params .ford /forder cvx /:butt_filter cvx ] store exch 1output :publicproc }
BLD { 6 /Water_Balance: publicproc: WBparams WBS new 0.3 store initp 0.5 store rho 1 store InitKc 25 store InitD 1 store VegKc 25 store VegD 1 store MidKc 25 store MidD 1 store LateKc 25 store LateD 1 store EndKc 1 store PlDd (Jan) store PlDm (Unknown) store Crop }
BLD { counttoobject /RANGESPAN0 /RANGESPAN allstreams1 }
BLD { 2 index totype /arraytype eq { 3 index 3 index 2 { 3 index [ exch { .name } forall ] } repeat 4 /svd: publicproc: pop pop pop pop } { 2 index 2 { 2 index [ exch { .name } forall ] } repeat 3 /svd: publicproc: pop pop pop } ifelse svdparams /gappy-data? false def /spatial-mean? false def /temporal-mean? false def }
BLD { (downloadsICASA) htmlprint }
BLD { dataset /last_modified known { /last_modified dataset .last_modified def } if dataset /expires known { /expires dataset .expires def } if inheritdatarestrictions }
BLD { cptv10_sub DoTasks stop }
BLD { cvlit { mygrid myproc } inputs myproc 0 get dup type /stringtype eq { (%) search { nip nip (/) rsearch { pop pop } if } if /myfixedfile exch def } { pop /myfixedfile null def } ifelse /mycachefile currentdefiningdatasetcachevardirname dup null eq { pop pop } { (/) mygrid .name cvntos (.gridinfo) 4array astore concat def } ifelse /mycachefile? 1 index /mycachefile known def myfixedfile dup null eq exch fileexists? or { mycachefile? { systemtime mycachefile filelast_modified sub dup 3600 lt exch 1 gt and last_modified mycachefile filelast_modified lt and } { false } ifelse { mygrid mycachefile readfile dup /expires known { expires systemtime lt mycachefile filelast_modified dup expires lt exch 1800 add systemtime lt or and { pop false } { true } ifelse } { true } ifelse } { false } ifelse not { mygrid myproc cvx removeextrausing0 mycachefile? { mycachefile false cachegridinfo } if } if } { mygrid mycachefile? { mycachefile dup fileexists? { readfile } { pop } ifelse } if } ifelse dup /expires known { /expires expires def } if 1output }
BLD { 1383147742 set_code_last_modified /json WWWinfo exch /mimesuffix exch put mimeheader: true { WWWinfo .sendmimeheader { (Vary: Accept-Encoding ) print } if WWWinfo /Accept-Encoding getknown { (gzip) search { pop pop pop true } { pop false } ifelse } { false } ifelse } { true } ifelse { (Content-Encoding: gzip ) print :mimeheader togzip } { :mimeheader } ifelse dup type /stringtype eq not { currentobject totype /streamtype eq { (iridl:Variable) } { (iridl:Dataset) } ifelse } if { myobject mytargettype } inputs openJSON exch ({ "@context": ) PSprint Types2OutSchema mytargettype get writeJSON (, ) PSprint myobject mytargettype typedConvert continueJSON ( ) PSprint closeJSON flush stop }
BLD { 1 /erf publicproc: { A } inputs A dup type /objecttype eq not { c: exch :c } if datatype /realarraytype eq { chunksize 1 integerarray astore vserf0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer defivars /fullname [ /erf A .fullname ] def } { chunksize 1 integerarray astore vderf0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer defivars /fullname [ /erf A .fullname ] def } ifelse 1output :publicproc }
BLD { mark currentobject totype /streamtype eq { currentobject } { /LAYERS /layers wmsgetknown { null { (,) search { nip counttomark 1 add index exch pget exec } { counttomark 1 add index exch pget exec leave } ifelse } repeat } { /LAYER /layer wmsgetknown { null { (,) search { nip counttomark 1 add index exch pget exec } { counttomark 1 add index exch pget exec leave } ifelse } repeat } if } ifelse } ifelse counttomark 1 ge { currentobject /band known { getXY? pop fig: rgbcolor :fig } { getXY? pop fig: colors :fig } ifelse /REQUEST /request wmsgetknown { (GetLegendGraphic) eq { .auxfig } if } if /plotborder 0 psdef /plotaxislength /WIDTH /width wmsgetknown { interp /HEIGHT /height wmsgetknown { interp imax } if psdef /XOVY /WIDTH /width wmsgetknown { interp } if /HEIGHT /height wmsgetknown { interp } if 1.0 mul div psdef } { pop } ifelse /TRANSPARENT /transparent wmsgetknown { dup (TRUE) eq exch (true) eq or { /transparent true psdef } if } if figgrids 0 get /BBOX /bbox wmsgetknown { 3 { (,) search pop nip interp exch } repeat interp pop nip plotrange } { pop } ifelse figgrids 1 get /BBOX /bbox wmsgetknown { 3 { (,) search pop nip interp exch } repeat interp nip 3 -1 roll pop plotrange } { pop } ifelse figachunk { get_units .timeunits? { /TIME /time wmsgetknown { /ISO8601 readusing dup length 0 eq { defaultvalue } if array? { 0 get } if plotvalue } { defaultvalue plotvalue } ifelse } { name FORMgetknown { interp plotvalue } { defaultvalue plotvalue } ifelse } ifelse } forall /FORMAT FORMgetknown { WMSFORMATS exch get exec } { .gif } ifelse } { /txt mimeheader:set (Nothing to plot ) print } ifelse }
BLD { { /total0 (total) apply1get1_complementgrids } /sum gridarray1fn }
BLD { dup { pop } { buffer null eq { CopyStream } if bufferSIRecord SIRecord ne { CopyStream } if cachevardirname VBattachfile pop } foralldatasets2 }
BLD { currentobject /long_name known { mark exch dup type /arraytype eq { aload length 1 lt { null } if } if pop long_name ] } if }
BLD /cptv10
BLD { counttoobject /RANGEEDGES0 /RANGEEDGES allstreams1 }
BLD { 1 /SLtoT publicproc: decompress S L add /calendar S .get_calendar def /pointwidth L .pointwidth def ndim RECHUNK /T units 0 currentobject getrealization NewGRID /pointwidth 2 index .pointwidth def exch .nptgrids 0 get exch replaceGRID :publicproc }
BLD { 3 /pad0 publicproc: { mystream mygrid pl } inputs mystream dup dup dup mygrid .name get pl -1 mul shiftdata 1 index .chunk array astore REORDER dup dup mygrid .name get 1 array astore average exch 0 mul add dup mygrid .name get 2 index mygrid .name get last exch .step add last RANGEEDGES mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID exch dup mygrid .name get pl shiftdata 1 index .chunk array astore REORDER dup dup mygrid .name get 1 array astore average exch 0 mul add dup mygrid .name get first 4 index mygrid .name get first exch .step sub RANGEEDGES mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID 3 -1 roll appendstream exch appendstream /fullname [ /pad0 mystream .fullname ] def :publicproc nip }
BLD { exch dup type /objecttype eq not { 1 index dup type /objecttype eq { 0.0 mul add } { pop c: exch :c } ifelse } { 0 RECHUNK } ifelse exch 2 /poestudnt2 publicproc: { A dof } inputs dof type /objecttype eq { A dof 2 array astore { todouble toNaN8 } forall 1 index 0.0 mul add 1 index .chunksize 1 integerarray astore poestudnt2dof0 } { A todouble toNaN8 chunksize dof 2 integerarray astore poestudnt20 } ifelse TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /poestudnt2 A .fullname ] def 1output :publicproc }
BLD CaseListpops2 /streamtype { pop pop pop true leave } def /pendingdatasettype { mark exch exec counttomark 1 ne { counttomark (broken dataset definition: returns ) exch s== append error } if nip totype /streamtype eq nip { pop true leave } if } def
BLD { 3 /pad2 publicproc: { mystream mygrid pl } inputs mystream dup dup dup mygrid .name get dup .step pl add -1 mul shiftdata 1 index .chunk array astore REORDER dup mygrid .name get 2 index mygrid .name get last exch .step add last RANGEEDGES dup dup dup mygrid .name get last VALUE dup mygrid .name get removeGRID sub 2 mul sub dup mygrid .name get 2 index mygrid .name get last exch .step add 1 index last exch .step sub RANGEEDGES dup dup mygrid .name get 0 add dup mygrid .name get 1 array astore sort_by rank 3 -1 roll mygrid .name get replaceGRID mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID exch dup mygrid .name get dup .step pl add shiftdata 1 index .chunk array astore REORDER dup mygrid .name get first 4 index mygrid .name get first exch .step sub RANGEEDGES dup dup dup mygrid .name get first VALUE dup mygrid .name get removeGRID sub 2 mul sub dup mygrid .name get dup first exch .step add 4 index mygrid .name get first exch .step sub RANGEEDGES dup dup mygrid .name get 0 add dup mygrid .name get 1 array astore sort_by rank 3 -1 roll mygrid .name get replaceGRID mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID 3 -1 roll appendstream exch appendstream /fullname [ /pad2 mystream .fullname ] def :publicproc nip }
BLD { counttoobject /VALUES0 /VALUES allstreams1 }
BLD { 1 /erfc publicproc: { A } inputs A dup type /objecttype eq not { c: exch :c } if datatype /realarraytype eq { chunksize 1 integerarray astore vserfc0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /erfc A .fullname ] def defivars } { chunksize 1 integerarray astore vderfc0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /erfc A .fullname ] def } ifelse 1output :publicproc }
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /monthlyAverage publicproc: 2 array astore cvx newmonthlyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { decompress mark exch nptgrids aload pop counttomark 1 add -2 roll nip }
BLD 0 23 object /WBS WBS def /CropName { store Crop } def /LateDays { store LateD } def /InitCond { store initp } def /InitKcStart { store InitKc } def /calib { store rho } def /InitDays { store InitD } def /VegKcStart { store VegKc } def /LateKcEnd { store EndKc } def /VegDays { store VegD } def /MidKcStart { store MidKc } def /MidDays { store MidD } def /PlantDday { store PlDd } def /LateKcStart { store LateKc } def /PlantDmonth { store PlDm } def
BLD { dodatasetfilters 3 object exch /nonull? exch def exch /streamtype exch def exch /gridtype exch def filtersetexec }
BLD { { complementgridarray { minfnof0 minfnof0dp } (min) apply1get1nocount } /minover gridarray1fn }
BLD 0 23 object /spog { store gN } def /infv { store v } def /del { store x } def /rec { store r } def /feedf { store fu } def /nat { store mu } def /surva { store alphaexp } def /feedg { store gu } def /survb { store betaexp } def /feednu { store nu } def /wctS wctS def /spr { store C } def /popu { store d } def /feedh { store h } def /spof { store fN } def /infk { store k } def
BLD { dup /column_name known { column_name } { dup /long_name known { long_name } { name cvntos } ifelse } ifelse }
BLD { currentobject totype dup /datasettype eq exch /streamtype eq or { currentobject /description getknown { fullname name eq { name deletesuffix } { fullname extendnamearray dolongname } ifelse htmlformulaprint (: ) print printno' } { currentobject getdatasetwithdesc dup /description known { exch 2 copy subnamearray extendnamearray dolongname htmlformulaprint ( from ) print exch longname htmlformulaprint (: ) print .description printno' } { pop longname htmlformulaprint } ifelse } ifelse } if }
BLD { /gz /mimesuffix WWWinfo ! cptv10_sub togzip DoTasks stop }
BLD { (downloadsGrADS) htmlprint }
BLD { /tabopt FORMknown { pop table: /NaNmarker FORMknown { /NaNmarker WWWinfo .FORMinfo .NaNmarker def } if 1 1 WWWinfo .FORMinfo .tabopt .N interp { s== cvn WWWinfo .FORMinfo .tabopt exch get interp } for /eol FORMknown { /eol eols WWWinfo .FORMinfo .eol cvn get def } if :table WWWinfo FORMinfo .tabtype cvn dup /igor.tsv eq 1 index /R.tsv eq or { /mimesuffix /tsv def } { dup /free eq { /mimesuffix /txt def } { /mimesuffix 1 index def } ifelse } ifelse mimeheaderdata nip dup /html eq { ( ) print cvx exec ( ) print } { cvx exec } ifelse flush stop } { (ncoltable) htmlprint } ifelse }
BLD { [ Z ] regridLinear exch dup /sp known { 128 64 tsptogau } if exch (mb) unitconvert Z 1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30 20 10 toS /gribleveltype 100 def }
BLD { 3 /shiftGRID publicproc: exch .name cvlit exch 2 array astore cvx shiftGRIDFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { 3 /pad1 publicproc: { mystream mygrid pl } inputs mystream dup dup dup mygrid .name get dup .step pl add -1 mul shiftdata 1 index .chunk array astore REORDER dup mygrid .name get 2 index mygrid .name get last exch .step add 1 index last exch .step sub RANGEEDGES dup dup mygrid .name get 0 add dup mygrid .name get 1 array astore sort_by rank 3 -1 roll mygrid .name get replaceGRID mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID exch dup mygrid .name get dup .step pl add shiftdata 1 index .chunk array astore REORDER dup mygrid .name get dup first exch .step add 4 index mygrid .name get first exch .step sub RANGEEDGES dup dup mygrid .name get 0 add dup mygrid .name get 1 array astore sort_by rank 3 -1 roll mygrid .name get replaceGRID mygrid .name cvntos (_lag) 2 array astore concat cvn removeGRID 3 -1 roll appendstream exch appendstream /fullname [ /pad1 mystream .fullname ] def :publicproc nip }
BLD { pushdataset currentdataset dup 10 object /streamcount 0 def exch DATASETbot ==noprintdataset { doifstreamdef } forsome streamcount 0 ne { /streamcount undef } { pop null } ifelse popdataset }
BLD { 2 array astore cvx defasvarcachedecompresssilent }
BLD { 4 /flexseasonalfreqGT publicproc: { mystream daterange thold minfrac } inputs mystream thold flaggt T daterange minfrac seasonalAverage T differential_mul :publicproc nip }
BLD definingtableWords
BLD { (outline) htmlprint }
BLD FilterSet /gridtype { pop 1 index .name 1 index .name eq { pop dekadaledgesgrid partialgrid } { pop } ifelse } def /streamtype { 3 -1 roll decompress 3 1 roll 2 index 2 index .name getknown { exec 3 -1 roll pop exch 2 index .getmissing_value null eq { pop dekadalAverage0 } { 3 1 roll 1 index 0 replaceNaN 1 index dekadalAverage0 3 1 roll exch dataflag exch dekadalAverage0 3 -1 roll normalize } ifelse } { pop pop } ifelse } def
BLD { dimension CopyStream x_range CopyStream y_range CopyStream z_range CopyStream reserverealization reserverealization reserverealization reserverealization z CopyStream dup reserverealization (X) cvn x_range units exch 0 exch CopyStream getrealization aload pop 2 copy exch sub dimension CopyStream getrealization 0 get 1 sub div exch NewEvenGRID name exch def (Y) cvn y_range units exch 0 exch CopyStream getrealization aload pop exch 2 copy exch sub dimension CopyStream getrealization 1 get 1 sub div exch NewEvenGRID name exch def 2 SetStreamIndex* X Y * (xysize) cvn undef z_range CopyStream getrealization aload pop /value_max exch def /value_min exch def nip }
BLD 0 5 object /stringtype /stringtype def /namearraytype /namearraytype def
BLD { definingtable exch }
BLD { dup /description known not { dataset type /objecttype eq { .dataset getdatasetwithdesc } if } if }
BLD { 1 /varimax: publicproc: varimaxS new 9.99999975E-05 store EPS 0.001 store DELTA 5 store MAXIT }
BLD FilterSet /gridtype { pop } def /streamtype { getmissing_value null eq { pop } { exch 1 index replaceNaN exch /missing_value exch def } ifelse } def
BLD { { /rootmeansq0 (root mean sq) apply1get1_complementgrids } /rootmeansqover gridarray1fn }
BLD { streamgridarray mark currentobject /expires known { expires dup null eq { pop } if } if counttomark 1 add index { dup /expires known { expires dup null eq { pop pop } { nip } ifelse } { pop } ifelse } forall counttomark 1 sub { imin } repeat counttomark 1 eq { /expires exch def } if currentobject /last_modified known { last_modified dup null eq { pop } if } if counttomark 1 add index { dup /last_modified known { last_modified dup null eq { pop pop } { nip } ifelse } { pop } ifelse } forall counttomark 1 sub { imax } repeat counttomark 1 eq { /last_modified exch def } if pop pop }
BLD 0 11 object /temporal-mean { svdparams /temporal-mean? true put } def /gappy-data? false def /temporal-mean? false def /spatial-mean? false def /gappy-data { svdparams /gappy-data? true put } def /spatial-mean { svdparams /spatial-mean? true put } def
BLD { (subdatasets) htmlprint }
BLD { 3 /butt_poly_coeffs publicproc: { Real Imag poly_ord } inputs Real dup mul Imag dup mul add sqrt dup 0.0 mul 1.0 add grid: /name /coeffs def 0 1 poly_ord :grid beginLoop 1 index mul endLoop nip Imag Real atan dup 0.0 mul coeffs beginLoop 1 index add endLoop nip dup sin exch cos 2 index mul 3 -2 roll mul 0 ds exch coeffs second last RANGEEDGES /Im add_variable 1 index coeffs second last RANGEEDGES /Re add_variable { Re Im } grouptogrid [ M poles ] [ coeffs ] ginverse M (Re) VALUE /M removeGRID Real dup mul Imag dup mul add sqrt ln [ poles ] sum eexp poly_ord 2 div dup round eq not { -1.0 mul } if dup -1.0 mul 3 -1 roll mul [ poles ] sum exch 3 -1 roll .coeffs 0.0 mul add coeffs first VALUE exch appendstream 1output :publicproc }
BLD { dup type /objecttype eq { 0.0 } if 2 /monthlyAverage publicproc: monthlyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { mark 3 1 roll subnamearray0 }
BLD { appendprep 0 { appendstreamsilent } /appenddatasetsilent allstreams1 currentfilepattern 0 get -1 ne { /filepattern currentfilepattern 0 get def } if }
BLD { cvlit { mygrid myproc } inputs myproc 0 get dup type /stringtype eq { (%) search { nip nip dup (/) rsearch { pop pop length 1 add 0 exch getinterval } { pop } ifelse } if /myfixedfile exch def } { pop /myfixedfile null def } ifelse mygrid /myfixedfile getknown { /myfixedfile exch def } if /mycachefile currentdefiningdatasetcachevardirname dup null eq { pop pop } { (/) mygrid .name cvntos (.gridinfo) 4array astore concat def } ifelse /mycachefile? 1 index /mycachefile known def myfixedfile null eq { true } { myfixedfile remotefileexists? } ifelse { mycachefile? { systemtime mycachefile filelast_modified sub dup 3600 6 mul lt exch 1 gt and } { false } ifelse { mygrid mycachefile readfile dup /expires known { expires systemtime lt mycachefile filelast_modified dup expires lt exch 1800 add systemtime lt or and { pop false } { true } ifelse } { true } ifelse } { false } ifelse not { mygrid myproc cvx remoteremoveextrausing0 mycachefile? { mycachefile true cachegridinfo } if } if } { mygrid mycachefile? { mycachefile dup fileexists? { readfile } { pop } ifelse } if } ifelse dup /expires known { /expires expires def } if 1output }
name /==alias
BLD { realorintegertype? not { 0.0 } if 1 index totype /gridtype ne { T exch } if 3 /dailyAverage publicproc: 2 array astore cvx dailyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc }
BLD { 1284664335 set_code_last_modified dup type /arraytype eq { exch 1 index REORDER exch 0 get gridvalues { 3 copy VALUE 4 1 roll cvsunits 4 -1 roll exch /column_name exch cvn def 3 1 roll } forall pop pop } if dup totype /datasettype eq { mark exch { pop } { nptgrids length 1 gt { pop } { datatype /geometrytype eq { pop } if } ifelse } foralldatasets2 definingtable tableobject 11 object mark } { definingtable tableobject 11 object } ifelse /prtwds [ tablecolmax { { printnamedunits } } repeat ] def }
BLD { nrdim grids { gridno imax } forall nrdim sub { 0 grids { gridno 1 index .nrdim ge { 1 add } if } forall nrdim grids { gridno imax } forall nrdim sub lt { nrdim 1 add RECHUNK } { leave } ifelse } repeat }
BLD { surface dup /pss known { pss /missing_value null def pop } if dup /zg known { zg /missing_value null def pop } if dup /prl known { prl /units (m/s) cvn def name exch def } if dup /prc known { prc /units (m/s) cvn def name exch def } if dup /prl known 1 index /prc known and { /prcp { prl prc add /long_name (Total Precipitation) def /gribparam 260 def /grib_name /totprcp def } defasvar } if /dpsdx { pss 42 gautotsp partialeast 128 64 tsptogauUV /long_name (Zonal Deriv. of Surface Pres.) def /gribparam 273 def /grib_name /dpsdx def } defasvar /dpsdy { pss 42 gautotsp partialnorth 128 64 tsptogauUV /long_name (Meridional Deriv. of Surface Pres.) def /gribparam 274 def /grib_name /dpsdy def } defasvar /slp { extraP /gribparam 151 def /gribleveltype 102 def /long_name (mean sea level pressure) def } defasvarsilent name exch def hybrid_lev dup datasetdefs: /cterm { dataset .hybrid_lev a: .AC Z -0.5 1.0 0.5 shiftdatashort Z_lag 0.5 VALUE :a: .BC Z -0.5 1.0 0.5 shiftdatashort Z_lag -0.5 VALUE mul :a: .AC Z -0.5 1.0 0.5 shiftdatashort Z_lag -0.5 VALUE :a: .BC Z -0.5 1.0 0.5 shiftdatashort Z_lag 0.5 VALUE mul sub -1 mul :a } defasvar /cterm { AC Z differences BC [ Z ] regridLinear mul BC Z differences AC [ Z ] regridLinear mul sub BC Z differences 0 flaggt mul } defasvar /pterm { cterm P [ Z ] differences div P 500 max Z lnratios mul } defasvar /ps-advection { dataset a: .hybrid_lev .u 128 64 tsptogauUV :a: .surface .dpsdx mul :a: .hybrid_lev .v 128 64 tsptogauUV :a: .surface .dpsdy mul add :a } defasvar /omegahalf { dataset a: .hybrid_lev .ps-advection :a: .hybrid_lev .BC Z differences mul :a: .hybrid_lev .P [ Z ] differences :a: .hybrid_lev .Div 128 64 tsptogau mul :a add -1 mul 3 RECHUNK [ Z ] sums 2 RECHUNK /long_name (vertical pressure velocity subterm) def /gribparam undef /grib_name undef } defasvar :datasetdefs exch DATASETbot null 5 object /ps-advection dup def /pterm dup def /cterm dup def /omegahalf dup def { def } forsome /psi { rvort invlaplacian /long_name (streamfunction) def /gribparam 148 def /grib_name /strm def } defasvar /chi { Div invlaplacian /long_name (velocity potential) def /gribparam 149 def /grib_name /vpot def } defasvar /u { chi nsp 1 sub changetruncation partialeast nsp 1 add changetruncation psi nsp 1 sub changetruncation partialnorth sub /long_name (zonal velocity) def /gribparam 131 def /grib_name /ua def } defasvar /v { chi nsp 1 sub changetruncation partialnorth psi nsp 1 sub changetruncation partialeast nsp 1 add changetruncation add /long_name (meridional velocity) def /gribparam 132 def /grib_name /va def } defasvar /Z rvort .Z def continuedataset: variable: /name /AC def /units /Pa def grids: Z integralgrid :grids values: 0 2000.0 4000.0 6046.1104 8267.9277 10609.514 12851.101 14698.498 15861.125 16116.236 15356.924 13621.46 11101.562 8127.144 5125.1416 2549.9695 783.19501 0 0 0 :values :variable variable: /name /BC def /units /unitless def grids: Z integralgrid :grids values: 0 0 0 3.38993297E-04 0.003357187 0.01307004 0.03407715 0.07064983 0.1259167 0.2011954 0.2955196 0.4054092 0.5249322 0.646108 0.7596984 0.8564376 0.9287469 0.9729852 0.9922815 1.0 :values :variable variable: /name /Rv def /long_name (gas constant for moist air) def /units (J/kg/K) def grids: :grids values: 461.52499 :values :variable variable: /name /Rd def /long_name (gas constant for dry air) def /units (J/kg/K) def grids: :grids values: 287.05966 :values :variable variable: /name /gravity def /long_name (earth's gravity) def /units (m/s2) def grids: :grids values: 9.8066502 :values :variable /omega { dataset a: .hybrid_lev .ps-advection :a: .hybrid_lev .P [ Z ] regridLinear mul :a: .hybrid_lev .BC Z differences 0 RECHUNK :a: .hybrid_lev .pterm add :a: .hybrid_lev .P Z differences div 2 RECHUNK mul toreal :a: .hybrid_lev .omegahalf CopyStream [ Z ] regridLinear add :a /long_name (vertical pressure velocity) def /gribparam 135 def /units (Pa/s) def } defasvar /P { dataset a: hybrid_lev /logpsl known { .hybrid_lev .logpsl 128 64 tsptogau eexp /units /Pa def Z removeGRID } { .surface .pss } ifelse :a: .hybrid_lev .BC mul :a: .hybrid_lev .AC add :a /long_name (pressure) def /gribparam undef /grib_name undef 1006806553 set_last_modified } defasvar /phi { P 500 max Z lnratios Z high low RANGE ta unitclearorigin 128 64 tsptogau mul Rd -1 mul gravity div mul Rd .dataset /hus known { Rv Rd div 1 sub hus dup /sp known { 128 64 tsptogau } if mul 1 add mul } if Rd .dataset .dataset .surface .zg gravity div [ Z ] integrate /long_name (geopotential height) def /gribparam 156 def /grib_name /zg def } defasvar :dataset name exch def continuedataset: dataset: /name /PressureLevel def /description (gaussian grid at standard Pressure Levels -- below surface values marked as missing) def /u { currentobject .dataset .hybrid_lev a: .u :a: .P :a toafterPlvlUV } defasvar /v { dataset .hybrid_lev a: .v :a: .P :a toafterPlvlUV } defasvar /ta { dataset .hybrid_lev a: .ta :a: .P :a toafterPlvl } defasvar /rvort { dataset .hybrid_lev a: .rvort :a: .P :a toafterPlvl } defasvar /psi { dataset .hybrid_lev a: .psi :a: .P :a toafterPlvl } defasvar /phi { dataset .hybrid_lev a: .phi :a: .P Z second last RANGE :a toafterPlvl } defasvar /hus { dataset .hybrid_lev a: .hus :a: .P :a toafterPlvl } defasvar /omega { dataset .hybrid_lev a: .omega :a: .P :a toafterPlvl } defasvar /Div { dataset .hybrid_lev a: .Div :a: .P :a toafterPlvl } defasvar /chi { dataset .hybrid_lev a: .chi :a: .P :a toafterPlvl } defasvar :dataset :dataset /griblist.html { (griblist) htmlprint } def }
BLD { false 1 index DATASETbot ==noprintdataset { ifgridcase caseexec } forsome }
BLD { currentobject totype /datasettype eq { currentobject { pop } { } foralldatasets2 } if }
BLD { 2 index null eq { pop pop } { counttoobject 1 sub index dup type /arraytype eq { length counttoobject 2 sub eq { 0.0 } if counttoobject 1 add } { pop counttoobject 1 eq { 0.0 } if 4 } ifelse /boxAverage publicproc: counttoobject 1 sub index dup type /arraytype eq { length counttoobject 2 sub eq { 0.0 } if counttoobject 1 add } { pop counttoobject 1 eq { 0.0 } if 4 } ifelse 1 sub array astore dup 0 2 copy get dup type /arraytype eq { mark 1 index { .name } forall counttomark 2 add -1 roll astore cvx nip } { .name cvlit } ifelse put cvx boxAveragecase 1 object exch /filterargs exch def datasetexec :publicproc } ifelse }
BLD [ null ]
BLD { dup mark eq { pop counttomark 2 sub /ncol exch def counttomark 1 add -1 roll pop } if dup type /integertype eq { /ncol exch def } if ncol 1 eq { 3 -1 roll nptgrids dup length 0 gt { 0 get exch 4 2 roll /ncol ncol 1 add def } { pop 3 1 roll } ifelse } if nip }
BLD { counttoobject 1 add /average publicproc: dup /keepgrids eq { pop { /mean0 (mean) apply1get1_complementgrids_keepgrids } /average gridarray1fn } { { /mean0 (mean) apply1get1_complementgrids } /average gridarray1fn } ifelse :publicproc }
BLD { currentobject totype dup /datasettype eq exch /streamtype eq or { currentobject /description getknown { fullname name eq { name deletesuffix } { fullname extendnamearray dolongname } ifelse printforxml (: ) print printforxml } { currentobject getdatasetwithdesc dup /description known { exch 2 copy subnamearray extendnamearray dup length 0 gt { dolongname printforxml ( from ) print } { pop } ifelse exch longname printforxml (: ) print .description printforxml } { pop longname printforxml } ifelse } ifelse } if }
BLD { 1 index type /arraytype eq not { { } } if 3 1 roll null 3 1 roll cvx /dodefasvarcachedecompresssilent cvx 5 array astore cvx dup 1 currentobject put dup 2 get exch pdef }
BLD { name units gridtype firstedge dup first eq { pop first step 0.5 mul sub } if 4 index 0.5 mul add 4 index lastedge firstedge sub 1 index div floor 1 sub 1 index mul 2 index add NewEvenGRID nip exch .get_calendar /calendar exch def }
BLD { 2 index .Compression .compressiontype /symetricStorageMode eq { pop pop } { 2 REORDER todouble chunk pop pop .npts 1 integerarray astore fsmtossm0 TaskStreams 0 get TaskParameterBlock 0 get dup mul NewDoubleBuffer markstreamsymmetric } ifelse }
BLD { { mygrid seasonalwidth } inputs /myendtime null store /mystarttime null store seasonalwidth type /stringtype eq { mygrid seasonalwidth ( - ) search { (0000 ) exch append /mystarttime exch store pop (2400 ) exch append /myendtime exch store name units gridtype firstedge 1.0 lastedge NewEvenGRID 1 index .get_calendar /calendar exch def /pointwidth 0 def a: mystarttime subgridvalues :a: myendtime subgridvalues 1 index .first 1 index .first gt { second last subgrid } if 1 index .last 1 index .last gt { exch first secondtolast subgrid exch } if exch .gridvalues exch .gridvalues dup length 2 mul realarray exch 1 index copy pop exch 1 index 1 index length dup getinterval copy pop realsort nip subgridvalues nip } { subgridvalues monthlyedgesgrid 4 object /rangetovalues { firstedge 1 index gt { pop pop emptyarray } { lastedge 1 index lt { pop pop emptyarray } { 2 datatypearray astore } ifelse } ifelse 2 index .array? { 2 index length 0 gt 1 index length 0 gt and { 2 index dup length 1 sub get 1 index 0 get eq { 1 get } if } if } if } def seasonalwidth readunits NewGRID mygrid exch 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if /pointwidth 0.0 def 1 index first last gt nip { last first subgrid } if nip } ifelse } { mygrid get_calendar seasonaledgesversions exch get exec } ifelse 1output }
BLD -operator-
BLD CaseList /stringtype { missing_value exch .chunksize bufferwordsize imul maskonNaN0I1 TaskStreams 0 get chunksize NewI1Buffer } def /realarraytype { missing_value array? { 0 get } if dup null eq { pop NaN } if 1 realarray astore exch .chunksize maskonNaN0R TaskStreams 0 get chunksize NewRealBuffer missing_value? not { /missing_value NaN def } if } def /integerarraytype { missing_value exch .chunksize maskonNaN0I4 TaskStreams 0 get chunksize NewIntegerBuffer } def /doublearraytype { missing_value dup null eq { pop NaN } if 1 doublearray astore exch .chunksize maskonNaN0D TaskStreams 0 get chunksize NewDoubleBuffer missing_value? not { /missing_value NaN def } if } def /shortarraytype { missing_value exch .chunksize maskonNaN0I2 TaskStreams 0 get chunksize NewShortBuffer } def
BLD -operator-
BLD { (dataselection) htmlprint }
BLD { currentobject /modulus known { modulus } { units /degree_east eq { 360.0 } { currentobject totype /gridtype eq { currentobject gridid pop .gridS .modulus dup 0.0 eq { pop gridtype periodic eq { high low sub npts mul npts 1 sub div } { null } ifelse } if } { null } ifelse } ifelse } ifelse }
BLD -operator-
BLD { 1 /Explicit:endLoop publicproc: T .step T .units convertunitsdt mul loopStream .chunk REORDER loopStream add endLoop :publicproc }
BLD { 6 index 8 3 roll 5 2 roll 2 index nrdim exch 3 index gridno nip ge { bumpyAvgS new exch store WGHT 2 index 2 index gridstride store NX pop 1 index .npts store NT 2 index .chunksize NX div NT div store NR exch 3 1 roll 1 index .datatype /doublearraytype eq { bumpyaverageDP0 } { bumpyaverage0 } ifelse TaskStreams 0 get chunksize NewBuffer exch 6 index null eq { 3 index SAMPLE 6 -3 roll pop pop pop } { 3 index exch sample-along 6 -3 roll bumpyaveragefix0 } ifelse } { bumpyAvgS new exch store WGHT 2 index .chunksize store NX 2 index 2 index gridstride store NR pop 1 index .npts store NT exch 3 1 roll 1 index .datatype /doublearraytype eq { bumpyaverageDP1 } { bumpyaverage1 } ifelse TaskStreams 0 get chunksize NewBuffer TaskParameterBlock .NR BufferOrder lockbufferorder exch 6 index null eq { 3 index SAMPLE 6 -3 roll pop pop pop } { 3 index exch sample-along 6 -3 roll bumpyaveragefix1 } ifelse } ifelse 3 -2 roll replaceGRIDstream }
BLD { get_calendar exch units exch maybeconvertdays units exch monthtimename unitconvertbyattribute name units ordered lowedge scale_factor mul getadd_offset add rm19602ymd pop 1 sub exch 12 mul add 1 highedge scale_factor mul getadd_offset add rm19602ymd pop 1 sub exch 12 mul add dup 3 index sub round cvi 1 add realarray 0 5 2 roll { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll ensotime getadd_offset sub getscale_factor div 3 copy put pop 1 add } for pop NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip /pointwidth 0.0 def exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD 0 2 object /attach -operator- def /release -operator- def
BLD { dup type /objecttype eq { 1 } if fftS new exch store sign 3 1 roll grideven not { (grid must be even) error } if 1 REORDER missing_value null ne { (missing_data not supported) error } if chunk pop .npts zfft1di copyachunk 3 -1 roll 2 index .chunksize store ns ns store nx 1 index .chunksize store nc 2 index .chunk pop .step store dx fftccdp0 TaskStreams 0 get TaskParameterBlock .nx NewComplexDoubleBuffer 1 SetStreamIndex* TaskStreams 0 get .chunk pop name cvntos (k_) search { pop pop } { (k_) exch append } ifelse units cvntos (cycle/) search { pop pop } { unitclearorigin (cycle/) exch cvntos append } ifelse preferredunitname periodic 0 1.0 currentobject step npts 1 sub mul 2 mul nip div dup TaskParameterBlock .nx 1 sub mul NewEvenGRID nip TaskStreams 0 get .achunk pop * TaskStreams 0 get .chunk pop .name undef Compression NoCompression ne { /Compression Compression parent def } if }
BLD -operator-
BLD { 1 index .datatype 1 index .datatype ne { exch toreal exch toreal } if ndim 0 gt { 2 null MATCHalong } if nptgrids length dup 1 le { binop0 add00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (+) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitadd binopunits } { pop add } ifelse }
BLD { 2 /unitmatrix publicproc: exch npts unitmatrix0 STREAM TaskParameterBlock NewRealBuffer TaskParameterBlock SetBuffernchunk 1 SetStreamIndex* 4 index name cvntos (_out) append cvn units get_modulus? pop gridtype gridvalues NewGRID 1 index /calendar getknown { /calendar exch def } if 1 index /myintegralgrid getknown { /myintegralgrid exch def } if * nip exch /name exch def :publicproc }
BLD -operator-
BLD 0 5 object
BLD { chunksize 1 gt { chunksize 4000000 lt { chunkmin00 } { chunk array astore exch 1 RECHUNK toNaN exch minover toreal } ifelse } if }
BLD -operator-
BLD { /CS null def /CE null def clearscale }
BLD -operator-
BLD -operator-
BLD -operator-
BLD 0 11 object /complexdoublearraytype { 4 mul } def /namearraytype { } def /doublearraytype { 2 mul } def /realtype { } def /shortarraytype { 1 add 2 div } def /complexarraytype { 2 mul } def /realarraytype { } def /stringtype { bufferwordsize mul 3 add 4 div } def /integerarraytype { } def
BLD { (1/365 year since 1960-01-01) unitconvertbyattribute currentobject /pointwidth known { pointwidth 0.0 eq } { false } ifelse { name (julian_day) gridtype mark gridvalues { scale_factor mul add_offset add d365c2ymd ymd2rjt 0.5 sub } forall counttomark realarray astore nip NewGRID /pointwidth 0 def 1 index /standard_name getknown { /standard_name exch def } if } { integralgrid (1/365 year since 1960-01-01) unitconvertbyattribute name (julian_day) gridtype mark gridvalues { scale_factor mul add_offset add d365c2ymd ymd2rjt 0.5 sub } forall counttomark realarray astore nip NewGRID /pointwidth 0 def partialgrid 1 index /standard_name getknown { /standard_name exch def } if } ifelse nip }
BLD { 3 -1 roll 1 RECHUNK copyachunk 3 -1 roll 2 RECHUNK copyachunk 3 -1 roll 1 index .chunksize meof .npts div meof .npts 2 integerarray astore covAssimilateMS0 TaskStreams 1 get TaskParameterBlock 0 get TaskParameterBlock 1 get mul NewDoubleBuffer pop TaskStreams 1 get TaskParameterBlock 0 get TaskParameterBlock 1 get mul NewDoubleBuffer /name /K def /fullname name cvntos def defivars TaskStreams 2 get chunksize NewDoubleBuffer /name /P def /fullname name cvntos def }
BLD { ndim 0 gt { MATCHchunk0 } { 0 } ifelse }
BLD { 1 /yearly-climatology publicproc: T npts 12 eq gridtype periodic eq and nip { (already a climatology) error } { T monthtimename streamgridunitconvert message? { (yearly-climatology only handles monthly data) error } if T .npts 24 lt { (less than 2 years of data: pointless climatology) error } if yearly-climatology0 } ifelse :publicproc }
BLD { 1 index safeifGRID { pop } { pop nptgrids dup length 1 ge { 0 get } { pop streamgridarray 0 get } ifelse exch } ifelse 3 copy nip 2 array astore 4 1 roll nptgrids dup length 0 gt { 0 get } { pop streamgridarray 0 get } ifelse selectarray dup length 0 gt { true { 4 -2 roll 11 object exch /dataset exch def /myproc [ /SELECT cvx ] def [ dataset 0 get .name cvntos ( selected using ) dataset 1 get .longname ] concat addhistory 3 1 roll SELECTVALUES /myprocds 1 index def sealobject } { pop pop pop 0 get } ifelse } { pop pop pop pop null } ifelse }
BLD -operator-
BLD -operator-
BLD { getmissing_value .array? { true } { getscale_factor totype /streamtype eq } ifelse { true } { getadd_offset totype /streamtype eq } ifelse { toreal MVtoNaN streamrescaleinNaN } { getscale_factor getadd_offset getmissing_value dup null eq { pop -9999 } if get_valid_min dup null eq { pop 0 } if get_valid_max dup null eq { pop 255 } if chunksize toNaNu1S new exch store npts exch store vmax exch store vmin exch store mv exch store ao exch store sf NaN store amv sf 1.0 eq ao 0.0 eq and { toNaNu1nsfao0 } { toNaNu10 } ifelse TaskStreams 0 get TaskParameterBlock .npts NewRealBuffer getmissing_value null ne TaskParameterBlock .vmin 0 ne or TaskParameterBlock .vmax 255 ne or { /missing_value NaN def } if /valid_min TaskParameterBlock vmin sf mul ao add nip def /valid_max TaskParameterBlock vmax sf mul ao add nip def [ /scale_min /scale_max ] { 2 copy getknownreal { TaskParameterBlock .sf mul TaskParameterBlock .ao add def } { pop } ifelse } forall /scale_factor 1.0 def /add_offset 0.0 def } ifelse }
BLD { 1 index .chunksize 1 index .chunksize 2 integerarray astore linw0 TaskStreams 1 get chunksize NewBuffer /fullname /weights def TaskStreams 1 get chunksize NewBuffer /fullname /indices def }
BLD -operator-
BLD -operator-
BLD { dup type /arraytype eq { 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 3 -1 roll 3 } { exch decompress toNaN exch decompress toNaN 2 } ifelse /CofA=B publicproc: dup type /arraytype eq { 3 1 roll exch decompress exch decompress 3 -1 roll 3 -1 roll 1 index { gridnobyname dup 0 eq { pop } { gridbyno removeGRID } ifelse } forall 3 1 roll aload length REORDER exch 0 RECHUNK exch } { exch decompress exch decompress } ifelse nptgrids length 1 eq { 1 RECHUNK copyachunk chunk pop toreal copyachunk exch chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def } { 2 matchachunk chunk pop toreal copyachunk exch chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /long_name TaskStreams 1 get /long_name getknown not { TaskStreams 1 get .name cvntos } if dup type /arraytype eq { exec } if def /units TaskStreams 1 get .units def } ifelse DATAAUTO :publicproc }
BLD { { dup pentadedgesgrid dup (pentads since 1961-01-01) gridunitconvert partialgrid } pentadAverageCache bumpyaverage }
BLD -operator-
BLD -operator-
BLD { 3 -1 roll decompress toNaN8 3 1 roll regridAverage0cache 2 index .gridid getknown { 1 index .gridid getknown { 4 2 roll 2 index 0 get SAMPLE 1 index 0 get gridid 3 index 1 get .gridid ne { 2 index 1 get replaceGRIDstream 1 index 1 get } if 4 2 roll 2 5 getinterval aload pop 3 -1 roll pop 5 -1 roll 3 1 roll false } { true } ifelse } { true } ifelse { { instream gridin gridout } inputs gridin exch /myinputs 1 index def /==alias /myinputs def /gridinname gridin .name cvx def /gridsample gridin def instream gridin .gridid gridout .gridid ne { regridAverageNeedPreSample? { gridinname exec /gridsample myinputs ! } if regridAverageReplaceGRID? pop } if 1 index a: .gridinname exec :a: .gridout :a dup integralgrid exch bumpyaverageinputs 8 -1 roll .gridsample 7 copy pop 7 array astore regridAverage0cache 9 index .gridid getknown not { null 5 object dup 10 index .gridid regridAverage0cache ! } if 4 index .gridid exch ! 8 -1 roll pop } if redobumpyaverage }
BLD { (1/365 year since 1960-01-01) unitconvertbyattribute pointwidth 0.0 eq { name (months since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset add d365c2ymd ymd2rm1960 } forall counttomark realarray astore nip NewGRID /calendar /360 def /pointwidth 0 def 1 index /standard_name getknown { /standard_name exch def } if } { integralgrid (1/365 year since 1960-01-01) unitconvertbyattribute name (months since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset add d365c2ymd ymd2rm1960 } forall counttomark realarray astore nip NewGRID /calendar /360 def /pointwidth 0 def partialgrid 1 index /standard_name getknown { /standard_name exch def } if } ifelse nip }
BLD { 1 gridbyno name /C eq npts 2 eq and nip }
BLD { { mydataset spatialgrids timegrids nclusters } inputs mydataset spatialgrids aload pop timegrids aload pop spatialgrids length timegrids length add REORDER toNaN dup /missing_value getknownnotnull { pop CopyStream dup [ timegrids ] 1.0 average SELECT dup null eq { pop (All time series have missing data -- nothing left to analyze) leavemessage } { /missing_value null def } ifelse } if message? { 1output } { [ spatialgrids { .name exec } forall ] timegrids nclusters 5 -1 roll pop } ifelse }
BLD { (filters) htmlprint }
BLD { bufferwordsize NewSizedBuffer }
BLD { /symmetricStorageMode compression: /symmetricchunk chunk 2 sub { pop } repeat 2 array astore def :compression /ISYMM dup firstgrid .npts dup 1 add mul 2 div NewIntegerGRID def nrdim 1 sub SetStreamIndex* ISYMM 4 index 2 RECHUNK .achunk pop * }
BLD { [ /==do ] { currentobject 1 index get GRIDParent 2 index get eq { STREAM 1 index get def } { pop } ifelse } forall currentobject /datatype get GRIDParent /datatype get eq { /datatype datatype def } if currentobject /scale_min getknown { GRIDParent /scale_min get eq { /scale_min STREAM 1 index get def } if } if currentobject /scale_max getknown { GRIDParent /scale_max get eq { /scale_max STREAM 1 index get def } if } if currentobject /plotfirst getknown { GRIDParent /plotfirst get eq { /plotfirst STREAM 1 index get def } if } if currentobject /plotlast getknown { GRIDParent /plotlast get eq { /plotlast STREAM 1 index get def } if } if currentobject /npts get STREAM /npts get ne { /npts STREAM 1 index get def } if currentobject /units getknown { GRIDParent /units get eq { /units units def } if } if currentobject /myintegralgrid known { /myintegralgrid undef } if }
BLD { swapbytes }
BLD placelabelsS
BLD { covS new thedata thetimegrid gridstride nip store n1 thetimegrid .npts store nt egrid .npts store m m dup 1 add mul 2 div store mm thedata egrid gridstride nip n1 nt mul div store n2 thedata .chunksize n1 n2 mul nt mul m mul div store n3 1 store n4 thedata .nchunk store n5 thetimegrid .step store dt modelperiod dt div store ns lags length store nl }
BLD { 3 index totype /arraytype eq { 4 index totype /arraytype eq { 7 /cca publicproc: { leftvar rightvar weights weights2 Tgrid pm qm } inputs } { 6 /cca publicproc: { leftvar rightvar weights Tgrid pm qm } inputs } ifelse } { 5 /cca publicproc: { leftvar rightvar Tgrid pm qm } inputs } ifelse dup /weights getknown { leftvar exch 1 index } { leftvar dup } ifelse Tgrid REORDER achunk array astore nip /Sgrids1 exch def Sgrids1 Tgrid svd ev 1 pm RANGE Ts sv div ev /p renameGRID exch .evaln ev /p renameGRID 2 index /weights2 getknown { rightvar exch 1 index } { 2 index /weights getknown { rightvar exch 1 index } { rightvar dup } ifelse } ifelse Tgrid REORDER achunk array astore nip /Sgrids2 exch def Sgrids2 Tgrid svd ev 1 qm RANGE Ts sv div ev /q renameGRID exch .evaln ev /q renameGRID exch dup 4 index mul Tgrid average [ p ] [ q ] svd NEWDATASET /fullname { name } def /name /cca def pm qm mul sqrt sv mul ndim RECHUNK CopyStream /name (mu) def /long_name (canonical correlations) def /mu add_variable Ss pm sqrt div ndim RECHUNK CopyStream /name (r) def /long_name (left canonical weights) def /r add_variable r dup mul 6 -1 roll mul [ p ] sum ndim RECHUNK CopyStream /name (exvarl) def /long_name (left explained variance) def /exvarl add_variable r 6 -1 roll mul [ p ] sum ndim RECHUNK CopyStream /name (u) def /long_name (left canonical time series) def /u add_variable u leftvar mul Tgrid average ndim RECHUNK CopyStream /name (g) def /long_name (left canonical pattern) def /g add_variable Ts sv div qm sqrt div ndim RECHUNK CopyStream /name (s) def /long_name (right canonical weights) def /s add_variable s dup mul 5 -1 roll mul [ q ] sum ndim RECHUNK CopyStream /name (exvarr) def /long_name (right explained variance) def /exvarr add_variable s 4 -1 roll mul [ q ] sum ndim RECHUNK CopyStream /name (v) def /long_name (right canonical time series) def /v add_variable v rightvar mul Tgrid average ndim RECHUNK CopyStream /name (h) def /long_name (right canonical pattern) def /h add_variable nip 1output :publicproc /ccaview.html { (ccaview) htmlprint } def }
BLD { exch 5 object exch /datatype /longintegerarraytype def /bufferwordsize 8 def 8 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD -operator-
BLD { chunksize 1 gt { chunksize 4000000 lt { chunkmax00 } { chunk array astore exch 1 RECHUNK toNaN exch maxover toreal } ifelse } if }
BLD -operator-
BLD -operator-
BLD bufferS record
BLD -operator-
BLD { 2 /replaceNaN publicproc: exch decompress toNaN exch dup ifNaN { pop } { dup elementtype /objecttype eq { decompress toreal 2 MATCHchunk MATCH chunksize replaceNaN0 TaskStreams 0 get chunksize NewBuffer /missing_value TaskStreams 1 get .missing_value def } { dup elementtype /integertype eq { 1.0 mul } if chunksize replaceNaN1 TaskStreams 0 get chunksize NewBuffer /missing_value null def } ifelse } ifelse :publicproc }
BLD { }
BLD { { dup dekadaledgesgrid dup partialgrid } dekadalAverageCache bumpyaverage }
BLD -operator-
BLD -operator-
BLD { (downloadsarcinfo) htmlprint }
BLD -operator-
BLD -operator-
BLD { { 1 /prcpanomscale publicproc: startcolormap DATA -200 200 RANGEEDGES transparent DarkBrown 139 99 89 RGB -200 VALUE RGBdup -150 bandmax 159 119 109 RGB RGBdup -100 bandmax 179 139 129 RGB RGBdup -75 bandmax 199 159 149 RGB RGBdup -50 bandmax 224 189 179 RGB RGBdup -25 bandmax white RGBdup 25 bandmax 179 249 169 RGB RGBdup 50 bandmax 149 244 139 RGB RGBdup 75 bandmax 119 244 114 RGB RGBdup 100 bandmax 79 239 79 RGB RGBdup 150 bandmax 54 209 59 RGB RGBdup 200 bandmax DarkGreen endcolormap :publicproc } /prcpanomscale docolorscale }
BLD { { header mygrid trailer } inputs mygrid datatype /namearraytype eq { header (%s) trailer 3array astore concat sprintf } { maybeconvertdays dup /units known { monthtimename unitconvert? { copyandchangeunits get_modulus 12 eq { .step 1.0 ge { header (%b) trailer 3array astore concat strftimes } { header (%b%d) trailer 3array astore concat strftimes } ifelse } { .step 1.0 ge { header (%Y%m) trailer 3array astore concat strftimes } { header (%Y%m%d) trailer 3array astore concat strftimes } ifelse } ifelse } { /julian_day unitconvert? { copyandchangeunits .step 30 gt { header (%Y%m) trailer 3array astore concat strftimes } { header (%Y%m%d) trailer 3array astore concat strftimes } ifelse } { header (%d) trailer 3array astore concat sprintf } ifelse } ifelse } { header (%d) trailer 3array astore concat sprintf } ifelse } ifelse 1output copyachunk }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD { swapbytes2 }
BLD -operator-
BLD { currentobject /InStream get STREAM /InStream get ne { CopyStream } if }
BLD { counttoobject realarray astore { data mygrid mylevels } inputs data mylevels STREAMGRID nip /mylevelgrid exch def /data data todouble mygrid 1 array astore rechunktocontaingrids def data mylevelgrid todouble copyachunk mygrid .npts mylevelgrid .npts data mygrid gridno 1 sub RECHUNK .chunksize 1 sub dup 0 data .chunksize 3 index idiv mygrid .npts idiv 1 sub dup 0 0 9 integerarray astore linw0dp TaskStreams 0 get TaskParameterBlock 1 get TaskParameterBlock 2 get 1 add mul TaskParameterBlock 5 get 1 add mul NewBuffer /fullname /weights def /scale_min 0 def /scale_max 1 def nrdim SetStreamIndex* data .streamgrids data mygrid gridno exch .ndim exch -1 mul roll pop mylevelgrid data mygrid gridno exch .ndim exch roll * dup chunksize NewIntegerBuffer /fullname /indices def }
BLD -operator-
BLD { cvdatatype bufferwordsize chunksize 2 integerarray astore DoCopyB1 buffer appendTaskToBuffer }
BLD -operator-
BLD { toi2filters datatype get exec }
BLD { }
BLD { cacheifremote bufferwordsize opentiffstream0 TaskStreams 0 get 1 8 NewSizedBuffer /bufferwordsize 8 def /datatype /stringtype def }
BLD -operator-
BLD 0 23 object /IPACK { NoCompression 4 object /compressiontype /ipack def } def /ipack { IPACK } def
BLD { nrdim exch { .name cvx exec gridno max } forall cvi dup nrdim gt { RECHUNK CopyStream } { pop } ifelse }
BLD -operator-
BLD -operator-
BLD { swapbytes8 }
BLD { 2 copy eq { pop 1 RECHUNK gridtype periodic eq { npts 1 integerarray astore get_modulus exch datatype /doublearraytype eq { integralgridtoboundsR80cyc } { integralgridtobounds0cyc } ifelse } { npts 1 sub 1 integerarray astore datatype /doublearraytype eq { integralgridtoboundsR80 } { integralgridtobounds0 } ifelse } ifelse TaskStreams 0 get TaskParameterBlock 0 get 2 mul NewBuffer nrdim 1 add SetStreamIndex* /I_bounds 2 NewIntegerGRID TaskStreams 0 get partialgrid * } { 1 REORDER streamgridarray 0 get .npts 1 sub 1 integerarray astore integralgridtobounds0 TaskStreams 0 get TaskParameterBlock 0 get 2 mul NewBuffer nrdim 2 mul SetStreamIndex* /I_bounds 2 NewIntegerGRID TaskStreams 0 get streamgridarray 0 get partialgrid TaskStreams 0 get streamgridarray dup length 1 eq { pop } { 1 1 index length 1 sub getinterval aload pop } ifelse * } ifelse }
BLD { optionalREORDER getmissing_value? not { 0 } if array? { 0 get } if 1 datatypearray astore chunksize swapbytes20 TaskStreams 0 get chunksize NewBuffer }
BLD -operator-
BLD { bufferwordsize 0 gt { chunksize bufferwordsize 1 index mul 4 mod 0 eq { tobuffersize DoCopy } { bufferwordsize mul DoCopyB } ifelse STREAM .LastStream chunksize NewBuffer currentobject /InStream get STREAM /InStream get ne { /InStream STREAM /InStream get def } if } if }
BLD { (downloadsidaimage) htmlprint }
BLD { 2 index type /objecttype eq { emptyarray 3 1 roll } if { mydata mygrids myfn myfnname } inputs 10 object /mygridsdict null mygrids length object mygrids { name exch def } forall def /chunkarray mydata .chunk array astore def /==alias /myvars cvx def /myvars 1 index def mydata toNaN mark { countifunknown } /countif myvars ! 1 chunkarray { countif } forall counttomark /dnrdim myvars ! { countifunknown } /countif myvars ! 1 achunk array astore { countif } forall counttomark /dndim myvars ! dnrdim dndim counttomark 2 roll counttomark integerarray astore nip myfn cvx exec TaskStreams 0 get 1 chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewBuffer pop TaskStreams 0 get 1 chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewIntegerBuffer 0 chunkarray { mygridsdict name known { pop 1 add } { pop } ifelse } forall SetStreamIndex* chunkarray { mygridsdict name known not { pop } if } forall mydata .achunk pop * chunkarray { mygridsdict name known { pop } { .name undef } ifelse } forall mydata .achunk array astore { mygridsdict name known { pop } { last VALUE0 } ifelse } forall mydata .achunk array astore { mygridsdict name known { pop } { .name exec removeGRID } ifelse } forall /name myfnname cvn cvx def sealhistory /fullname [ myfnname mydata .fullname ] def [ myfnname ( over) [ mydata .streamgrids ] { mygridsdict name known { pop } { space exch name cvntos exch npts 1 eq { (=) exch first cvsunits nip } { ([) exch first cvsunits exch (, ) exch last cvsunits nip (]) } ifelse } ifelse } forall ] concat addhistory nip }
BLD { 1 /L4cycle:endLoop publicproc: loopStream .chunk REORDER loopStream exch fullloopStream T first VALUE fullloopStream .T beginLoop 4cycleS new T .step T .units convertunitsdt store DT chunksize store npts T gridstride store nz L4cycleadd0 TaskStreams 0 get chunksize NewBuffer TaskStreams 0 get chunksize NewBuffer exch endLoop pop endLoop :publicproc }
BLD { tocomplexfilters datatype get exec }
BLD { }
BLD -operator-
BLD 0 13 object /minstns { store IR } def /pass3 { store R3 } def /RANGEEDGESTEP { 3 copy pop exch sub exch div round cvi 3 index /X eq { store NX store XH store XL XH XL sub 360 gt { XL 360 add store XH } if XH XL sub 360 ge { 1 } { 0 } ifelse store xper } { store NY store YH store YL } ifelse pop } def /pass2 { store R2 } def /cressmanS cressmanS def /Y /Y def /pass1 { store R1 } def /RANGESTEP { 3 -1 roll 1 index 0.5 mul sub 3 -1 roll 2 index 0.5 mul add 3 -1 roll RANGEEDGESTEP } def /X /X def
BLD { first last gt { integralgridfrombounds-hightolow } { integralgridfrombounds-lowtohigh } ifelse }
BLD { { instream gridin gridout Wmin } inputs instream decompress 0 replaceNaN gridin gridout regridLinear0 exch instream dataflag gridin gridout regridLinear0 exch .Wmin normalize }
BLD 0 11 object /complexarraytype { } def /complexdoublearraytype { chunksize 2 mul doubletoreal0 TaskStreams 0 get chunksize NewComplexBuffer } def /realarraytype { complexasreal? { SIRecord bufferSIRecord ne { CopyStream } if 5 object nrdim 1 sub SetStreamIndex* 3 index .streamgrids counttomark -1 roll pop * /datatype /complexarraytype def /bufferwordsize STREAM 1 index get def /C undef } if } def
BLD { ndim 1 ne { dup == ( is not legal as a grid for gridid) print error } if chunk pop .gridid }
BLD -operator-
BLD -operator-
BLD structureParent structure
BLD { bufferS .readerp 0 eq { null } { readerT } ifelse }
BLD { { myX myY XS YS } inputs myX XS linearweights myY YS linearweights exch 3 1 roll myX .npts chunksize combineindices TaskStreams 0 get chunksize NewBuffer myX .npts 5 -1 roll pop 1 index .chunksize 2 integerarray astore }
BLD { currentobject /SIRecord known { gridnobyname gridbyno } { currentobject exch get } ifelse }
BLD -operator-
BLD -operator-
BLD { exch dup type /objecttype eq { 1 array aload } if exch { stream1 stream2 gridarray Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if stream2 dup 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridLinear0 } forall exch dataflag gridarray { stream1 1 index .name getgridbyname nip regridLinear0 } forall Wmin normalize exch .stream1 exch }
BLD -operator-
BLD { (datatable) htmlprint }
BLD { 3 /renameGRID publicproc: 3 -1 roll bufferSIRecord SIRecord ne { CopyStream } if currentobject /InStream get STREAM /InStream get ne { CopyStream } if 3 1 roll 1 index SIRecord pop 1 object exch units get_modulus? pop gridtype gridvalues NewGRID name exch .gridid /gridid exch def name 1 index ne { /name exch def } { pop } ifelse replaceGRID :publicproc }
BLD { pushTaskArgs toreal chunksize integralgridsubR0 TaskStreams 0 get chunksize 1 add NewBuffer nrdim SetStreamIndex* TaskStreams 0 get .chunksize 1 add /I exch NewIntegerGRID * popTaskArgs }
BLD { { myD WX WY IP pblk } inputs myD toNaN WX .nchunk 1 eq { WX bufferSIRecord exch nrdim SetStreamIndex* chunk pop myD .achunk pop * exch /bufferSIRecord exch def WY bufferSIRecord exch nrdim SetStreamIndex* chunk pop myD .achunk pop * exch /bufferSIRecord exch def IP bufferSIRecord exch nrdim SetStreamIndex* chunk pop myD .achunk pop * exch /bufferSIRecord exch def } { WX WY IP } ifelse pblk bilin0 pop TaskStreams 0 get TaskParameterBlock 1 get NewBuffer TaskStreams 1 get .nrdim SetStreamIndex* TaskStreams 1 get .chunk pop TaskStreams 0 get .achunk pop * missing_value null eq { /missing_value NaN def } if }
BLD -operator-
BLD { 2 index type dup /realtype eq exch /integertype eq or not { 0 3 1 roll } if 3 index type /objecttype eq { emptyarray 4 1 roll } if { mydata mygrids mymincntwght myfn myfnname } inputs 23 object mydata SIRecord pop pop 1099510519 set_code_last_modified /mymincnt mydata .npts 1 mygrids { .npts mul } forall div mymincntwght 0.0 max 1.0 min mul 0.0 max dup cvi exch 1 index gt { 1 add } if 1 sub 0 imax def /myavggrids mydata mygrids complementgridarray nip def /myhighavg mydata 0 myavggrids { gridno max } forall nip cvi def /myminnrdim mydata 0 mygrids { gridno dup myhighavg lt { max } { pop } ifelse } forall nip cvi def mydata .nrdim myminnrdim lt { /mydata mydata myminnrdim RECHUNK def } if /mygridsdict null mygrids length object mygrids { name exch def } forall def /chunkarray mydata .chunk array astore def /==alias /myvars cvx def /myvars 1 index def mydata toNaN mark { countifunknown } /countif myvars ! 1 chunkarray { countif } forall counttomark /dnrdim myvars ! { countifunknown } /countif myvars ! 1 achunk array astore { countif } forall counttomark /dndim myvars ! dnrdim dndim mymincnt counttomark 3 roll counttomark integerarray astore nip myfn cvx exec TaskStreams 0 get 1 chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewDoubleBuffer pop TaskStreams 0 get 1 chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewDoubleBuffer pop TaskStreams 0 get 1 chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewDoubleBuffer 0 chunkarray { mygridsdict name known { pop 1 add } { pop } ifelse } forall SetStreamIndex* chunkarray { mygridsdict name known not { pop } if } forall mydata .achunk pop * chunkarray { mygridsdict name known { pop } { .name undef } ifelse } forall mydata .achunk array astore { mygridsdict name known { pop } { last VALUE0 } ifelse } forall mydata .achunk array astore { mygridsdict name known { pop } { .name exec removeGRID } ifelse } forall sealhistory DATAAUTO /fullname [ myfnname mydata .fullname ] def myfnname (mean sq) eq { /units units dup unitmul def } if [ (Averaged over) [ mydata .streamgrids ] { mygridsdict name known { pop } { space exch name cvntos exch npts 1 eq { (=) exch first cvsunits nip } { ([) exch first cvsunits exch (, ) exch last cvsunits nip (]) } ifelse } ifelse } forall mydata .missing_value null ne { ( minimum ) mymincntwght 100 mul s== (% data present) } if ] concat addhistory nip }
BLD -operator-
BLD -operator-
BLD { currentobject /gridtype known { gridtype unordered eq } { false } ifelse }
BLD { 1 /daytimetod365c publicproc: dup /pointwidth getknown { 0 eq } { false } ifelse { (days since 1960-01-01) unitconvert toreal streamrescale chunksize daytimetod365c0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /units (days since 1960-01-01) preferredunitname def /scale_factor 1.0 def /add_offset 0.0 def /calendar /365 def } { .get_bounds daytimetomonthtime fullname 1 index 1 gridbyno 1 array astore average exch /fullname exch def /bounds 3 -1 roll def } ifelse :publicproc }
BLD { [ streamgrids ] 1 get integral /fullname [ [ streamgrids ] 0 2 getinterval aload pop exch .name exch .name (vs) exch (distribution) ] def DATA [ 0 0.02 0.17 0.5 0.83 0.98 1.0001 ] VALUES }
BLD { array astore commongrids00 }
BLD -operator-
BLD -operator-
BLD { getmissing_value dup type dup /realtype eq exch /integertype eq or { getscale_factor dup type /objecttype eq { pop pop toNaN } { mul getadd_offset add } ifelse exch toNaN missing_value 2 index eq { nip } { 1 index replaceNaN exch /missing_value exch def } ifelse } { pop toNaN } ifelse }
BLD toNaNu1S
BLD -operator-
BLD { monthlyedgesgrid partialgrid }
BLD { toi1filters datatype get exec }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax DarkOrange DarkOrange 0.6 bandmax OrangeRed OrangeRed 0.65 bandmax moccasin moccasin 0.7 bandmax moccasin moccasin 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_30 docolorscale }
BLD 0
BLD { dup totype /gridtype eq { 1 array astore } if 2 /partial publicproc: 0 get exch decompress toNaN 5 object 1 index partialnames fullname 3 1 roll exch exch 1 index differences exch gridtype periodic eq { .get_bounds 1 gridbyno differences 1 gridbyno removeGRID0 } { dup differences } ifelse div0 exch /fullname exch def TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits clearscale :publicproc }
BLD { TaskS 1 object /pointer { bufferS begin readerp end } def }
BLD -operator-
BLD 0 5 object
BLD { { instream gridin gridout } inputs /gridinname gridin .name cvx def instream decompress gridin .gridid gridout .gridid ne { regridAverageMatchGrids gridinname exec gridout REGRID } if 1output }
BLD { dup type /stringtype eq { 0.0 } if 4 /seasonalMin publicproc: { data Tgrid season_length minfrac } inputs data Tgrid season_length VALUES dup Tgrid .name get /Tin renameGRID Tin .get_bounds I_bounds /I_boundsin renameGRID Tgrid season_length seasonaledgesgrid partialgrid .get_bounds 1 index I_boundsin first VALUE I_boundsin removeGRID 1 index I_bounds first VALUE flagge 2 index I_boundsin first VALUE I_boundsin removeGRID 2 index I_bounds last VALUE flagle mul 2 index I_boundsin last VALUE I_boundsin removeGRID 2 index I_bounds first VALUE flagge 4 -2 roll exch I_boundsin last VALUE I_boundsin removeGRID exch I_bounds last VALUE flagle mul add 1.0 masklt 0.0 mul 1.0 add 2 copy exch dataflag mul [ Tin ] average minfrac masklt 3 -2 roll mul [ Tin ] minover exch mul dup Tgrid .name get season_length ( - ) search { nip nip } if VALUES /fullname data .fullname def 1output :publicproc }
BLD { (downloadslanimage) htmlprint }
BLD -operator-
BLD -operator-
BLD { dup type dup /realtype eq exch /integertype eq or not { 0.0 } if 2 index totype /gridtype ne { 1 index type /arraytype eq 2 index xcheck not and { 1.0 exch } if regridAverageSPVer2 } { 3 index .missing_value null eq 3 index gridtype ordered eq nip { 3 index .low 3 index .low le and 3 index .high 3 index .high ge and } if { pop regridAverageSP0 } { regridAverageSPNaN } ifelse } ifelse }
BLD { distrib1D dup firstgrid integral firstgrid last VALUE firstgrid removeGRID div /name /pdf def DATA AUTO AUTO RANGE }
BLD { dup totype /gridtype eq { 1 array astore } if 3 /integrate publicproc: 0 get { stream initial grid } inputs /myargs 1 index def /==alias /integrateargs cvx def /stream stream decompress def /griddiff grid integralgrid dup differences def initial 0 eq { /initial 0.0 def } if initial totype /streamtype eq { /initial initial decompress toNaN def } if /stream stream toNaN8 5 object def /myfullname stream grid integralnames .fullname def stream grid gridno exch .nrdim gt { stream grid gridstride BufferOrder initial 0.0 eq { grid first VALUE 0.0 mul } { pop initial } ifelse todouble grid integralgrid beginLoopnohistory stream partialS new exch chunksize store n1 grid gridstride store n2 grid .npts store n3 griddiff 1 index .datatype /doublearraytype eq { todouble } { toreal } ifelse CopyStream 0 RECHUNK copyachunk 1 index .datatype /doublearraytype eq { exch todouble exch todouble 3 -1 roll integral1DP } { exch toreal exch toreal 3 -1 roll integral1 } ifelse poplooplevel pop poplooplevel buffer appendTaskToBuffer stream grid gridstride exch pop 1 add BufferOrder } { stream stream grid newpartialS exch griddiff 1 index .datatype /doublearraytype eq { todouble } { toreal } ifelse copyachunk initial 0.0 eq { 1 index .datatype /doublearraytype eq { 3 -1 roll integral0DP } { 3 -1 roll integral0 } ifelse } { 1 index .datatype /doublearraytype eq { initial todouble 4 -1 roll integral0SDP } { initial todouble 4 -1 roll integral0S } ifelse } ifelse TaskStreams 0 get dup /stream myargs ! TaskParameterBlock n1 n2 1 add mul n3 mul exch pop NewDoubleBuffer grid integralgrid name exch def nrdim SetStreamIndex* myargs .stream .streamgrids myargs .stream ndim exch grid gridnobyname -1 mul exch pop roll pop grid integralgrid myargs .stream ndim exch grid gridnobyname exch pop roll * } ifelse /fullname myfullname def stream griddiff /unitmul binopunits 1output clearscale :publicproc }
BLD -operator-
BLD -operator-
BLD { [ 2 index .achunk pop counttomark 2 add index .achunk pop ] exch copyachunk nip exch copyachunk exch 1 1 chunksize 3 integerarray astore mulsum1 STREAM 1 NewBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * /name /mulsum def /fullname [ TaskStreams 0 get .fullname (*) cvn TaskStreams 1 get .fullname ] def TaskStreams 0 get TaskStreams 1 get /unitmul binopunits }
BLD { dup type /objecttype eq { 1 /distrib1D publicproc: toreal CS CI CE distrib /variable undef :publicproc } { 2 copy [ exch { .name } forall ] 2 /distrib1D publicproc: pop pop { mydata mygrids } inputs 10 object /Alo mydata .CS 1.0 mul def /Ahi mydata .CE 1.0 mul def /NA Ahi Alo sub mydata .CI div round cvi 1 add def /countif { countifunknown } def /mygridsdict null mygrids length object mygrids { name exch def } forall def /chunkarray mydata .chunk array astore def /==alias /myvars cvx def /myvars 1 index def mydata toNaN Alo Ahi mark { countifunknown } /countif myvars ! 1 chunkarray { countif } forall counttomark /dnrdim myvars ! { countifunknown } /countif myvars ! 1 achunk array astore { countif } forall counttomark /dndim myvars ! NA dnrdim dndim counttomark 3 roll counttomark integerarray astore nip distrib1D0 TaskStreams 0 get NA chunkarray { mygridsdict name known { .npts mul } { pop } ifelse } forall NewBuffer 1 chunkarray { mygridsdict name known { pop 1 add } { pop } ifelse } forall SetStreamIndex* mydata .name mydata .units ordered mydata /CLIST known { CLIST length NA eq CLIST 0 get type dup /stringtype eq exch /nametype eq or and } { false } ifelse { CLIST aload length namearray astore NewGRID } { Alo Ahi Alo sub NA 1 sub div Ahi NewEvenGRID } ifelse chunkarray { mygridsdict name known not { pop } if } forall mydata .achunk pop * mydata .achunk array astore { mygridsdict name known { pop } { last VALUE } ifelse } forall /name /counts def currentobject /CLIST known { /CLIST undef } if /fullname [ /counts [ mydata .name cvlit ] ] def [ (Distribution over) [ mydata .streamgrids ] { mygridsdict name known { pop } { space exch name cvntos exch ([) exch first cvsunits exch (, ) exch last cvsunits nip (]) } ifelse } forall ] concat addhistory DATAAUTO /units unitless def /countif undef [ mydata .streamgrids ] { mygridsdict name known { pop } { .name undef } ifelse } forall nip :publicproc } ifelse }
BLD -operator-
BLD -operator-
BLD { meof meof2 T 3 REORDER todouble L 0 RECHUNK copyachunk yearlymodelsS new meof .npts store m T .npts store nl T .step store dt yearlymodels0 STREAM TaskParameterBlock .m dup mul NewDoubleBuffer pop TaskStreams 0 get chunksize NewDoubleBuffer /name /Ayearly def /fullname [ fullname 0 1 index length 1 sub getinterval aload pop /Yearly ] def }
BLD -operator-
BLD structureParent structure
BLD -operator-
BLD -operator-
BLD -operator-
BLD { pop 2 copy integral 3 1 roll exch 0 mul 1 add 1 index dup integralgrid nip dup differences mul0 exch .name cvx exch 1 index exec 30 STEP 3 1 roll exec 30 STEP exec div }
BLD { 3 /splitstreamgrid publicproc: 1 index exch splitgrid { thestream thegrid the1grid the2grid } inputs /thestream thestream thegrid the2grid .firstedge the2grid .lastedge RANGEEDGES0 bufferSIRecord SIRecord ne { CopyStream } { dup /InStream get STREAM /InStream get ne { CopyStream } { 5 object } ifelse } ifelse def /thegrid thestream thegrid .name get def /thegridno thestream thegrid gridno exch pop def /thegrids [ thestream .streamgrids ] def thestream nrdim dup thegridno ge { 1 add } if SetStreamIndex* thegridno 0 gt { thegrids 0 thegridno 1 sub getinterval aload pop } if the1grid the2grid thegridno thestream .ndim lt { thegrids thegridno thestream .ndim thegridno sub getinterval aload pop } if * 1output :publicproc }
BLD -operator-
BLD { 4 -1 roll 1 RECHUNK todouble copyachunk 4 -1 roll 2 RECHUNK todouble copyachunk 4 -1 roll 2 RECHUNK todouble copyachunk 4 -1 roll todouble chunksize 2 index .chunksize 1 index div exch 2 integerarray astore stateAssimilate0 TaskStreams 0 get chunksize NewDoubleBuffer /name /WOERR def /fullname ($Delta W sub obs$) def defivars TaskStreams 3 get chunksize NewDoubleBuffer /name /WA def /fullname ($W sub A$) def defivars }
BLD -operator-
BLD -operator-
BLD { ndim 1 ne { dup == ( is not legal as a grid for gridname) print error } if chunk pop .gridname }
BLD -operator-
BLD { dup totype /gridtype eq { 1 array astore } if 2 /differences publicproc: 0 get exch getadd_offset type /objecttype ne { 5 object /add_offset 0.0 def } if decompress toNaN exch { stream gridstream } inputs /mygrid gridstream ifGRID not { .streamgrids } if def stream mygrid gridno exch .nrdim gt { stream currentobject /InStream get STREAM /InStream get ne { CopyStream } if mygrid gridtype periodic eq nip { mygrid first first get_modulus add RANGE } if bufferSIRecord SIRecord ne { CopyStream } if mygrid gridstride 1 add BufferOrder dup mygrid .name exec second last RANGE exch mygrid .name exec first secondtolast RANGE chunksub mygrid .name exec mygrid partialgrid replaceGRID0 /bufferSIRecord SIRecord def stream .fullname /fullname exch def } { stream stream mygrid newpartialS mygrid .gridtype periodic eq { differences0cyc TaskStreams 0 get TaskParameterBlock n1 n2 mul n3 mul exch pop NewBuffer } { differences0 TaskStreams 0 get TaskParameterBlock n1 n2 1 sub mul n3 mul exch pop NewBuffer } ifelse mygrid partialgrid name exch def nrdim SetStreamIndex* TaskStreams 0 get .streamgrids TaskStreams 0 get ndim exch mygrid gridno -1 mul exch pop roll partialgrid TaskStreams 0 get ndim exch mygrid gridno exch pop roll * } ifelse /units units unitclearorigin def 1output clearscale :publicproc }
BLD { beginLoop covAssimilateMS 4 2 roll 2 index covAdvance endLoop /fullname fullname 2 get def }
BLD 0 47 object /datasettype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /shortarraytype { makescaleparameterblock 1 index .unsigned? { SCALEtoui10ui2 } { SCALEtoui10i2 } ifelse } def /streamtype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /integertype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /arraytype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /htmlfiletype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /jpegfiletype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /pendingdatasettype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /stringtype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /imageobjecttype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /figviewtype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /nulltype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /marktype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /operatortype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /geometrytype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /integerarraytype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /doublearraytype { getmissing_value type dup /arraytype eq exch /streamtype eq or { toNaN8 } if makescaleparameterblock SCALEtoui10dp } def /objecttype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /htmlprinttype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /gridtype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /xmlfiletype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /linktype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /booleantype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /nametype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /messagetype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /figobjecttype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /realtype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /realarraytype { getmissing_value type dup /arraytype eq exch /streamtype eq or { toNaN } if makescaleparameterblock SCALEtoui10 } def /namearraytype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def /giffiletype { toNaN streamrescale SCALEtoui1types /realarraytype get exec } def
BLD -operator-
BLD { chunksize nchunk mul }
BLD { 1 index .datatype 1 index .datatype ne { exch toreal exch toreal } if ndim 0 gt { 2 null MATCHalong } if nptgrids length dup 1 le { binop0 mul00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (*) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitmul binopunits } { pop mul } ifelse }
BLD -operator-
BLD -operator-
BLD covS
BLD [ null null null ]
BLD -operator-
BLD { 1265215516 set_code_last_modified dup type /arraytype eq not { 1 array astore } if 3 /sample-along publicproc: 0 get sample-along-preprocess { mydata mysample mygrid } inputs /myargs 1 index def mydata SIRecord bufferSIRecord ne { CopyStream dup /mydata myargs ! } if mygrid mysample ndim RECHUNK getmissing_value? { NaN ne } { false } ifelse { toNaN } if 1 index .getadd_offset 1 index .getadd_offset ne { 1 index .getadd_offset 1 index .getadd_offset exch sub add } if getmissing_value? { pop CopyStream dup reserverealization dup /mysampleNaN myargs ! fillNaNLB } if getrealization SAMPLE CopyStream nrdim 0 eq { 0 } { mygrid gridnobyname nrdim le { nrdim 1 sub mysample .ndim add } { nrdim } ifelse } ifelse SetStreamIndex* streamgridarray { name mygrid .name eq { pop mysample .streamgrids } if } forall * mygrid .name undef myargs /mysampleNaN getknown { maskonNaN } if 1output :publicproc }
BLD -operator-
BLD -operator-
BLD { 6 1 roll 4 2 roll beginLoop stateAssimilate 3 -1 roll 1 index stateAdvance endLoop /fullname fullname 2 get def }
BLD -operator-
BLD { /julian_day unitconvertbyattribute name (pentads since 1960-01-01) preferredunitname ordered [ first getadd_offset add jd2dmy 1960 sub 73 mul 3 1 roll dm2pentad add 1 last getadd_offset add jd2dmy 1960 sub 73 mul 3 1 roll dm2pentad add { 0.5 add } for ] NewGRID nip }
BLD structureParent structure
BLD -operator-
BLD -operator-
BLD { DATASET 20 object /T 3 -1 roll def /A 3 -1 roll todouble def /Q 3 -1 roll todouble def /P00 3 -1 roll todouble def /H 3 -1 roll todouble def /RI 3 -1 roll todouble def /WO 3 -1 roll ndim nrdim eq { ndim 1 sub RECHUNK } if todouble def /M A .chunk 1 sub { pop } repeat def /name /kalman cvx def continuedataset: variable: /name /W0 def grids: M :grids 0.0 constantdata :variable :dataset /W0 W0 todouble def Q A RI H P00 5 index .T covarianceEvolution /PF 4 index ! /P 3 index ! /K 2 index ! WO W0 2 index .T K H A stateEvolution /WF 4 index ! /W 3 index ! /WOERR 2 index ! /modelsize { P M name cvntos (2) append cvn cvx exec matrixinverse W meof vmufsf } def /signal { RI WO exch 1 RECHUNK copyachunk exch M vmufsf } def /residue { RI WOERR exch 1 RECHUNK copyachunk exch M vmufsf } def /summary.html [ /null cvx ingriddir (html/kalman/summary.html) append /readfilein cvx ] cvx def }
BLD { dup type /objecttype eq { nptgrids } if exch 1 index rechunktocontaingrids fullname exch dup 3 index average sub0 2 index rechunktocontaingrids dup 3 index meansqover toreal sqrt div /fullname 3 -1 roll /standardized exch 2 array astore def /units /unitless cvx def nip }
BLD { 0.0 replaceNaN myX integral myX .name exec last VALUE myY cosd mul myY .name exec integral myY .name exec last VALUE }
BLD 0 5 object
BLD { { mydata mysample igrid } inputs [ mydata .streamgridarray { name igrid .name eq { } { mysample 1 index gridnobyname nip 0 eq { pop } if } ifelse } forall ] dup length 1 eq { pop a: .mydata mysample igrid :a } { 1 onegridcounter /mycounter exch def /newmysample mysample mycounter [ igrid ] BofA=C mysample .streamgridarray REORDER mysample .nrdim RECHUNK def a: .mydata mycounter .streamgridarray /counter mycounter .npts NewIntegerGRID replaceGRIDstream counter gridno 1 sub RECHUNK newmysample counter :a } ifelse }
BLD -operator-
BLD { 0.0 replaceNaN myX cosd mul myX .name exec integral myX .name exec last VALUE myY integral myY .name exec last VALUE }
BLD -operator-
BLD { pop grid->npts exch 1 RECHUNK exch linv3p0 TaskStreams 0 get chunksize NewDoubleBuffer /name /inverse def /fullname [ name fullname ] def }
BLD -operator-
BLD -operator-
BLD { ndim 0 gt { 2 null MATCHalong } if nptgrids length dup 1 le { binop0 sub00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (-) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitsub binopunits } { pop sub } ifelse }
BLD { 0.0 mul 1.0 add 2Dintegral }
BLD -operator-
BLD { name counttoobject 1 add 1 roll normalizeddistrib1D 1 index cvx exec integral /name /pdf def /fullname [ 4 -1 roll (distribution) ] def DATA [ 0 0.02 0.17 0.5 0.83 0.98 1.0001 ] VALUES }
BLD { dup type dup /realtype eq exch /integertype eq or not { 0 } if 3 /standardize publicproc: 1 index type /objecttype eq { nptgrids exch } if 3 2 roll 2 index BufferOrdertocontaingrids fullname 4 1 roll 3 1 roll 3 copy meansqover 4 1 roll 3 copy average history 7 1 roll 4 1 roll pop pop 1 index sub0 3 1 roll dupmulsubsqrt div /fullname 3 -1 roll /standardized exch 2 array astore def /history 3 -1 roll def /units /unitless cvx def :publicproc }
BLD -operator-
BLD { npts 1 gt { pushTaskArgs toreal chunksize partialgridsubR0 TaskStreams 0 get chunksize 1 sub NewBuffer 1 SetStreamIndex* TaskStreams 0 get .chunksize 1 sub /I exch NewIntegerGRID * popTaskArgs } if }
BLD -operator-
BLD { exch dup type /objecttype eq { 1 array aload } if exch { stream1 stream2 gridarray Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if stream2 dup 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridAverageSP0 } forall exch dataflag gridarray { stream1 1 index .name getgridbyname nip regridAverageSP0 } forall Wmin normalize exch .stream1 exch }
BLD { myscale 1 index .getscale_factor div myoffset 2 index .getadd_offset sub 2 index .getscale_factor div mymissing_value chunksize toNaNu1S new exch store npts exch store mv exch store ao exch store sf 1 index .getmissing_value dup null eq { pop NaN } if store amv 1 index .get_valid_min dup null eq { pop 0 } { ao sub sf div round } ifelse store vmin 1 index .get_valid_max dup null eq { pop 255 } { ao sub sf div round } ifelse store vmax }
BLD NoCompression
BLD -operator-
BLD { boxAverageNaNargs astore pop decompress dup 0 replaceNaN boxAverageNaNargs aload pop pop runningAverage0 exch dataflag boxAverageNaNargs aload pop pop runningAverage0 boxAverageNaNargs dup length 1 sub get normalize }
BLD { [ /averaged fullname ] exch dup 2Dintegral exch 2Darea div myX .name exec null replaceGRID0 myY .name exec null replaceGRID0 exch /fullname exch def }
BLD { dup type /arraytype eq { 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 3 -1 roll 3 } { exch decompress toNaN exch decompress toNaN 2 } ifelse /BofA=C publicproc: dup type /arraytype eq { 3 1 roll exch decompress toreal exch decompress toreal 3 -1 roll 3 -1 roll 1 index { gridnobyname dup 0 eq { pop } { gridbyno removeGRID } ifelse } forall 3 1 roll aload length REORDER exch 2 setcommongrids reordertomatch exch } { exch decompress toreal exch decompress toreal } ifelse nptgrids length 1 eq { 1 RECHUNK copyachunk chunk pop toreal copyachunk chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def } { 2 matchachunk chunk pop toreal copyachunk chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /long_name TaskStreams 1 get /long_name getknown not { TaskStreams 1 get .name cvntos } if dup type /arraytype eq { exec } if def /units TaskStreams 1 get .units def } ifelse DATAAUTO :publicproc }
BLD { array astore dup commongrids00 failonnopts exch { 1 index { 2 copy .name getknown { exch SAMPLE } { pop } ifelse } forall exch } forall pop }
BLD -operator-
BLD STREAM
BLD { dup type /objecttype eq { -1 } if fftS new exch store sign 3 1 roll grideven not { (grid must be even) error } if 2 copy gridno nip 1 eq { pop } { 1 REORDER } ifelse missing_value null ne { (missing_data not supported) error } if 1 gridbyno .npts 2 mul 2 sub fftdpi copyachunk 3 -1 roll 2 index 1 gridbyno nip .npts store ns ns 2 mul 2 sub store nx 1 index .chunksize store nc 2 index 1 gridbyno nip .step store dx 2 index .chunksize ns div store nrpt fftcdp0 TaskStreams 0 get TaskParameterBlock .ns NewComplexDoubleBuffer pop TaskStreams 0 get TaskParameterBlock .nx TaskParameterBlock .nrpt mul NewDoubleBuffer TaskStreams 0 get .nrdim SetStreamIndex* TaskStreams 0 get .streamgridarray dup 0 get name cvntos (k_) search { pop pop } { (k_) exch append } ifelse units cvntos (cycle/) search { pop pop } { unitclearorigin (cycle/) exch cvntos append } ifelse preferredunitname periodic 0 1.0 currentobject step npts 1 sub mul 2 mul nip div dup TaskParameterBlock .nx 1 sub mul NewEvenGRID nip exch 1 1 index length 1 sub getinterval aload pop * TaskStreams 0 get 1 gridbyno nip .name undef Compression NoCompression ne { /Compression Compression parent def } if }
BLD { counttoobject 1 add /maskbybin publicproc: counttoobject realarray astore { mystream avals } inputs /mygrid mystream .name mystream .units 0 avals NewGRID integralgrid def mystream toNaN avals mygrid .npts mystream .chunksize 2 integerarray astore maskbybin0 TaskStreams 0 get TaskParameterBlock aload pop mul NewBuffer nrdim 1 add SetStreamIndex* mygrid mystream .streamgrids * /fullname [ /mask fullname ] def /name /mask cvx def /units /unitless def nip :publicproc }
BLD { { 1 /halfgreyscale publicproc: startcolormap transparent white 128 128 128 RGB maxncolor 1 sub steps endcolormap :publicproc } /halfgreyscale docolorscale }
BLD -operator-
BLD { { stream1 stream2 gridarray Wght Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if /Wght stream2 Wght type /stringtype eq { Wght interp } { Wght exec dup type /arraytype eq { 0 get } if } ifelse nip def stream2 fullname 1 index Wght mul exch /fullname exch def 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridAverageSP0 } forall exch dataflag Wght mul gridarray { stream1 1 index .name getgridbyname nip regridAverageSP0 } forall Wmin Wght mul gridarray { 2 copy gridno nip 0 eq { pop } { stream1 1 index .name getgridbyname nip regridAverageSP0 } ifelse } forall normalize exch .stream1 exch }
BLD { [ 1 index .chunk array astore counttomark 2 add index exch { 2 copy gridnobyname nip 0 eq { exch } { pop } ifelse } forall .chunk array astore counttomark 1 add index exch { 2 copy gridnobyname nip dup 0 gt { nip gridbyno exch } { pop pop } ifelse } forall pop ] aload length REORDER0 exch 2 matchachunk exch }
BLD { mimeheader DataTableTSV0 DoTasks }
BLD { dup type /arraytype eq { 0.0 } if 0.5 exch replacebypercentile }
BLD structureParent structure
BLD -operator-
BLD { 1 REORDER datatype /stringtype eq bufferwordsize 1 ne and { chunk pop npts 2 index .bufferwordsize 2 integerarray astore selectarray1 } { toNaN chunk pop npts selectarray0 } ifelse STREAM 1 NewIntegerBuffer 0 SetStreamIndex* * TaskStreams 1 get chunksize NewBuffer /missing_value NaN def exch 2 copy reserverealization reserverealization stackreserverealization getrealization exch getrealization exch 0 get 0 exch getinterval }
BLD CaseList /stringtype { array } def /namearraytype { namearray } def /doublearraytype { doublearray } def /shortarraytype { shortarray } def /complexarraytype { complexarray } def /realarraytype { realarray } def /complexdoublearraytype { complexdoublearray } def /integerarraytype { integerarray } def
BLD { 1 index SIRecord pop .chunk array astore MATCHdict exch /thechunk exch put array astore STREAM .MATCHdict exch /thestreams exch def /thechunk [ thechunk { name thestreams { 2 copy exch known { 1 index cvx exec gridno 0 eq { pop pop null } { pop } ifelse } { 1 RECHUNK chunk pop .name 2 index eq { pop } { pop pop null } ifelse } ifelse } forall elementtype /nulltype eq { pop } if } forall ] def begin thestreams aload length thechunk aload length end }
BLD -operator-
BLD -operator-
BLD { dup type /stringtype ne { null null } { 1 index type /stringtype ne { () } if } ifelse counttoobject 1 add 2 roll optionalREORDER 2 RECHUNK toreal streamrescale 1 index null ne { achunk array astore 4 -1 roll CRLFtoLF exch codedstringtostream 3 1 roll } if DataTableS new chunk pop .npts store ny .npts store nx FORTRAN_format store format chunk pop toreal store G2 toreal store G1 exch chunk pop pop toreal copyachunk 1 index .chunk pop exch pop toreal copyachunk 6 -2 roll dup null eq { pop pop achunk array astore 0 exch { npts 1 gt { exch 1 add } { pop } ifelse } forall dup 0 eq { pop achunk dup 1 eq { pop 0 RECHUNK copyachunk 5 -1 roll 1 index store tunits datatabletsv1 } { { pop } repeat 4 -1 roll datatabletsv0 } ifelse } { dup 1 eq { pop 0 RECHUNK copyachunk 5 -1 roll 1 index store tunits 3 { 3 1 roll datatype /integerarraytype eq { toreal } if } repeat datatabletsv1 } { { pop } repeat 4 -1 roll 2 { exch toreal } repeat datatabletsv0 } ifelse } ifelse } { 6 -1 roll exch CRLFtoLF store header 1 index .bufferwordsize store tunits datatabletsv2 } ifelse }
BLD -operator-
BLD { 3 copy currentobject /skippointwidth known currentobject totype /gridtype ne or { false } { currentobject /pointwidth getknown { realorintegertype? { true } { pop false } ifelse } { false } ifelse } ifelse { dup 0.0 eq { 4 1 roll } { getscale_factor div 0.5 mul dup 5 1 roll exch 1 index sub 3 1 roll add exch } ifelse 3 -1 roll exch 2 index 1 index le { highedgetoindex indextovalue exch 3 -1 roll lowedgetoindex indextovalue exch 3 1 roll } { lowedgetoindex indextovalue exch 3 -1 roll highedgetoindex indextovalue exch 3 1 roll } ifelse exch 3 copy subgrid .gridvalues nip nip dup length 1 eq { 4 index 4 index lt 3 index 0 gt and { 4 index 1 index 0 get 4 index sub max 4 index 2 index 0 get 5 index add min sub 5 index 5 index sub 4 index -2 mul max div 0.5 lt { 0 0 getinterval } if } { 4 index 3 index sub 1 index 0 get 2 copy sub 3 1 roll add abs 9.99999997E-07 mul gt { 0 0 getinterval } { 3 index 3 index add 1 index 0 get 2 copy exch sub 3 1 roll add abs 9.99999997E-07 mul gt { 0 0 getinterval } if } ifelse } ifelse } if 3 -1 roll pop } { currentobject totype /gridtype eq { gridtype periodic eq { 3 -1 roll last 3 index lt first 3 index gt or { 2 index 2 index subgrid } if 3 1 roll } if true { range2indexBounds dup null eq { pop 0 datatypearray } { gridvalues 3 1 roll dup -2 eq { pop 1 sub 2 getinterval aload length datatypearray rastore } { getinterval } ifelse } ifelse dup length 1 eq { 0 get } if } { currentobject integralgrid low 3 index gt low 3 index gt and high 4 index lt high 4 index lt and or npts 1 gt and { pop pop pop 0 datatypearray } { exch lowedgetoindex exch 3 -1 roll highedgetoindex nip exch 2 copy 1 sub lt { 1 index sub gridvalues 3 1 roll 2 copy add 3 index length le 2 index 0 ge and { getinterval } { 3 -1 roll pop mark 3 1 roll { dup indextovalue exch 1 add } repeat pop counttomark datatypearray astore nip } ifelse } { 1 sub exch dup indextovalue exch 1 index valuetoindex eq not { pop null } if exch indextovalue 1 index null eq { 2 array astore } { 2 copy eq { pop } { 2 datatypearray astore } ifelse } ifelse } ifelse } ifelse } ifelse } { 2 copy eq { pop } { 2 datatypearray astore } ifelse } ifelse } ifelse nip nip nip }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD 0 11 object /doublearraytype { } def /realtype { chunksize realtodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /shortarraytype { chunksize shorttodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /complexarraytype { compression? { /Hermitian eq { decompress } if } if SIRecord bufferSIRecord ne { CopyStream } if 5 object nrdim 1 add SetStreamIndex* thecomplexgrid 4 index .streamgrids * /datatype /realarraytype def chunksize realtodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /longintegerarraytype { chunksize longintegertodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /realarraytype { chunksize realtodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /complexdoublearraytype { compression? { /Hermitian eq { decompress } if } if SIRecord bufferSIRecord ne { CopyStream } if 5 object nrdim 1 add SetStreamIndex* thecomplexgrid 4 index .streamgrids * /datatype /doublearraytype def CopyStream } def /integerarraytype { chunksize integertodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def
BLD { dup totype /gridtype eq { 1 array astore } if 4 /transit publicproc: { DXY XS YS Sgrids } inputs DXY XS .name cvx exec YS .name cvx exec 2 REORDER toNaN chunk pop 2 { exch toreal } repeat XS Sgrids REORDER toreal 2 index .firstedge 3 index .lastedge masknotrange YS Sgrids REORDER toreal bilinearweights bilinearinterp XS .name undef YS .name undef nip :publicproc }
BLD -operator-
BLD { exch 5 object exch /datatype /bitflagtype def /bufferwordsize 0.125 def dup 8 idiv dup 8 imul 3 1 roll lt { 1 add } if 1 NewSizedBuffer0 NewBufferCheck }
BLD { MonthlyGrids 1 index .gridid getknown { nip dup totype /gridtype eq { true } if } { dup monthlyedgesgrid partialgrid 1 index .gridid 1 index .gridid eq { pop dup monthtimegrid dup 3 -1 roll .gridid MonthlyGrids ! true } { pop MonthlyGrids exch .gridid false put false } ifelse } ifelse }
BLD -operator-
BLD -operator-
BLD { { startcolormap /maxncolor 253 def -10000 8000 RANGEEDGES black darkgrey DarkSeaGreen -10000 value DarkSeaGreen -8000 value DarkSlateBlue DarkSlateBlue -6000 value purple -5000 value SteelBlue -4000 value blue -3000 value DeepSkyBlue -1000 value cyan 0 bandmax green YellowGreen ForestGreen 100 value OliveDrab 200 value khaki 300 value yellow 400 value gold gold 500 value DarkGoldenrod DarkGoldenrod 750 value RosyBrown RosyBrown 1000 value IndianRed IndianRed 1250 value SaddleBrown SaddleBrown 1500 value sienna 2000 value OrangeRed 3000 value salmon salmon 4000 value pink pink 5000 value bisque bisque 6000 value beige beige 7000 value white white 8000 value grey endcolormap } /topographycolorscale docolorscale }
BLD { dup 4 1 roll pushproc masklt 0 mul 1 index name exch .fullname 4 2 roll add exch /fullname exch def exch /name exch def [ (Boxes with less than ) 4 -1 roll 100.0 mul s== (% dropped) ] concat addhistory popproc }
BLD { exch toNaN8 exch toNaN8 1 index .datatype 1 index .datatype eq not { exch todouble exch todouble } if }
BLD -operator-
BLD -operator-
BLD 0 5 object
BLD maskbybinS
BLD -operator-
BLD -operator-
BLD { cacheifremote bufferwordsize openfilestream0 TaskStreams 0 get 1 8 NewSizedBuffer /bufferwordsize 8 def /datatype /stringtype def }
BLD { /gz mimeheader:set DataTableTSV0 togzip DoTasks stop }
BLD { npts 1 gt { mygridsdict name known { .npts mul } { .npts { countifunknown } /countif myvars ! } ifelse } { pop } ifelse }
BLD { mygrid dup integralgrid 1 index boundinggrids dup /pointupperedgegrid myargs ! dup 3 index replaceGRIDstream /pointupperedges myargs ! dup /pointloweredgegrid myargs ! dup 2 index replaceGRIDstream /pointloweredges myargs ! myedgesgrid last pointloweredgegrid .last gt { first secondtolast subgrid } if dup pointloweredgegrid SAMPLEUBLE streamgrids 2 index replaceGRIDstream /mylowerbounds myargs ! myedgesgrid pointupperedgegrid boundinggrids nip dup 2 index replaceGRIDstream /myupperbounds myargs ! pointupperedges pointloweredges mylowerbounds bumpyweights getrealization mygrid integralgrid myedgesgrid 1 index .first 1 index .first gt { second last subgrid myoutputgrid second last subgrid /myoutputgrid myargs ! } if 1 index .last 1 index .last lt { first secondtolast subgrid myoutputgrid first secondtolast subgrid /myoutputgrid myargs ! } if dup /maybeshortenededgesgrid myargs ! second last subgrid exch 1 index boundinggrids 1 index .gridid 1 index .gridid eq { pop mygrid exch boundinggrids pop nip null null } { mygrid 2 index boundinggrids pop mygrid 2 index boundinggrids pop 4 { 4 1 roll dup 5 index replaceGRIDstream } repeat 4 2 roll pop maybeshortenededgesgrid first secondtolast subgrid dup 6 -1 roll replaceGRIDstream exch 1 index sub 0.0 max exch streamgrids exch sub div /name /sumptwghts def /fullname name def exch /name /fixpts def /fullname name def } ifelse myoutputgrid 3 1 roll }
BLD -operator-
BLD { 1 /monthtimetodaytime publicproc: dup /pointwidth getknown { 0 eq } { false } ifelse { /monthtime unitconvert toreal streamrescale chunksize monthtimetodaytime0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /units (days since 1960-01-01) preferredunitname def /scale_factor 1.0 def /add_offset 0.0 def /calendar /standard def } { .get_bounds monthtimetodaytime fullname 1 index 1 gridbyno 1 array astore average exch /fullname exch def /bounds 3 -1 roll def } ifelse :publicproc }
BLD -operator-
BLD -operator-
BLD { 1087399453 set_code_last_modified getscale_factor 1.0 ne getadd_offset 0.0 ne or { streamrescale } if }
BLD -operator-
BLD -operator-
BLD { 1 index .datatype 1 index .datatype ne { exch toreal exch toreal } if ndim 0 gt { 2 null MATCHalong } if nptgrids length dup 1 le { binop0noNaN add00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (+) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitadd binopunits } { pop add } ifelse }
BLD 0 11 object /years /360 def /pentad /365 def /months /360 def (months since 1960-01-01)cvn /360 def /pentads /365 def /year /360 def (1/365 years)cvn /365 def (1/360 years)cvn /360 def
BLD -operator-
BLD -operator-
BLD { dup totype /gridtype eq { 1 array astore } if 2 /products publicproc: 0 get exch getadd_offset type /objecttype ne { 5 object /add_offset 0.0 def } if decompress toNaN exch { stream gridstream } inputs /mygrid gridstream ifGRID not { .streamgrids } if def stream mygrid gridno exch .nrdim gt { stream bufferSIRecord SIRecord ne { CopyStream } if mygrid gridstride 1 add BufferOrder dup mygrid second last RANGE exch mygrid first secondtolast RANGE chunkprod mygrid .name exec mygrid partialgrid replaceGRID0 /bufferSIRecord SIRecord def } { stream todouble stream mygrid newpartialS products0 TaskStreams 0 get TaskParameterBlock n1 n2 1 sub mul n3 mul exch pop NewDoubleBuffer mygrid partialgrid name exch def nrdim SetStreamIndex* TaskStreams 0 get .streamgrids TaskStreams 0 get ndim exch mygrid gridno -1 mul exch pop roll partialgrid TaskStreams 0 get ndim exch mygrid gridno exch pop roll * } ifelse TaskStreams 0 get dup /unitmul binopunits 1output :publicproc }
BLD -operator-
BLD { toi4filters datatype get exec }
BLD { /units where { currentobject /calendar getknown not { units cvntos (days since 0000-) search { pop pop pop currentobject /width known { width 360.0 eq } { false } ifelse { /360 } { /365 } ifelse } { ( since) search { nip nip } if ( ) search { pop pop } if cvn ImpliedCalendars exch getknown not { /standard } if } ifelse } if nip } { /standard } ifelse cvn TranslateCalendars 1 index getknown { nip } if CalendarStandardNames 1 index getknown { nip } if }
BLD { get_calendar exch units exch maybeconvertdays units exch (1/365 years since 1960-01-01) unitconvertbyattribute name units ordered low scale_factor mul getadd_offset add d365c2ymd pop pop 1 1 ymd2d365c 365.0 high scale_factor mul getadd_offset add d365c2ymd 1 add pop pop 1 1 ymd2d365c NewEvenGRID /pointwidth 0.0 def 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD { dup totype /gridtype eq { monthtimetodaytime_grid } { monthtimetodaytime_stream } ifelse }
BLD -operator-
BLD { mygrid dup integralgrid 1 index boundinggrids dup /pointupperedgegrid myargs ! dup 3 index replaceGRIDstream /pointupperedges myargs ! dup /pointloweredgegrid myargs ! dup 2 index replaceGRIDstream /pointloweredges myargs ! myedgesgrid last pointloweredgegrid .last lt { first secondtolast subgrid } if dup pointloweredgegrid SAMPLEUBLE streamgrids 2 index replaceGRIDstream /mylowerbounds myargs ! myedgesgrid pointupperedgegrid boundinggrids nip dup 2 index replaceGRIDstream /myupperbounds myargs ! pointupperedges pointloweredges mylowerbounds bumpyweights getrealization mygrid integralgrid myedgesgrid 1 index .first 1 index .first lt { second last subgrid myoutputgrid second last subgrid /myoutputgrid myargs ! } if 1 index .last 1 index .last gt { first secondtolast subgrid myoutputgrid first secondtolast subgrid /myoutputgrid myargs ! } if dup /maybeshortenededgesgrid myargs ! second last subgrid exch 1 index boundinggrids 1 index .gridid 1 index .gridid eq { pop mygrid exch boundinggrids pop nip null null } { mygrid 2 index boundinggrids pop mygrid 2 index boundinggrids pop 4 { 4 1 roll dup 5 index replaceGRIDstream } repeat 4 2 roll pop maybeshortenededgesgrid first secondtolast subgrid dup 6 -1 roll replaceGRIDstream exch 1 index sub 0.0 min exch streamgrids exch sub div /name /sumptwghts def /fullname name def exch /name /fixpts def /fullname name def } ifelse myoutputgrid 3 1 roll }
BLD 0 5 object
BLD { dup length 0 gt { dup 0 get name /C eq exch .npts 2 eq and { 1 1 index length 1 sub getinterval exch /datatype /complexarraytype def /C undef exch } if } if }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax moccasin moccasin 0.55 bandmax moccasin moccasin 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_45 docolorscale }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD { 5 -1 roll toreal 5 1 roll dup 4 index .gridid s== (-) 5 index s== 3array astore concat bumpyaverage1argid 0 2 index put getknown { nip nip nip aload pop } { 5 1 roll exec bumpyaverageinputs 5 copy 5 array astore bumpyaverage1argid 0 get 10 -1 roll ! } ifelse redobumpyaverage }
BLD { units exch /julian_day unitconvertbyattribute name units ordered [ first getadd_offset add 0.5 add jd2dmy 12 mul add nip 12 div floor 12 mul 12 last getadd_offset add jd2dmy 12 mul add nip 12 div 1 add ceiling 12 mul { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll dmy2jd getadd_offset sub 0.5 sub } for ] NewGRID exch .add_offset /add_offset exch def /pointwidth 0 def exch unitconvertbyattribute }
BLD -operator-
BLD -operator-
BLD { dup (days since 1960-01-01) unitconvertbyattribute name (pentads since 1960-01-01) ordered 3 index /julian_day unitconvertbyattribute a: .truefirst :a: .truelast :a 2 { exch jd2dmy 1960 sub 73 mul 3 1 roll dm2pentad add } repeat 1 add 1 exch NewEvenGRID 0.0 1.0 pentadtojd1960 1 index a: .getscale_factor :a: .getadd_offset :a SCALE getrealization name 3 index .units ordered 4 -1 roll NewGRID /pointwidth 0.0 def nip nip }
BLD { currentobject /time_origin known { units cvntos (since) search { pop pop pop false } { pop true } ifelse } { false } ifelse { [ units cvntos ( since ) time_origin space search not { (:) search { nip space exch } { (00:00:00) space 3 -1 roll } ifelse } if (-) search { nip exch (-) search { nip Ingrid: 1 index getknown { 0.5 add cvi s== nip } if } { stopit } ifelse } { stopit } ifelse exch 5 1 roll (-) 5 1 roll 4 1 roll (-) 4 1 roll 3 1 roll exch ] concat preferredunitname /units exch def /time_origin undef } if year_calendargetknown { units getknown { exch 1 object exch /units exch def } { get_calendar CalendarLengths exch getknown not { 365 } if units cvntos ( ) search { nip nip } if false 1 index (days) eq { pop pop true } { 1 index (hours) eq { pop pop 24 mul true } { 1 index (seconds) eq { pop pop 86400 mul true } if } ifelse } ifelse { s== (1/) exch ( years) units cvntos ( ) search { pop exch } { ( ) exch } ifelse 5array astore concat /units exch preferredunitname dup units YearCalendars get_calendar get ! 3 -1 roll 1 object 3 1 roll def } { pop pop } ifelse } ifelse } if }
BLD -operator-
BLD { ColorScales colorscalename getknown { usecolorscaleobject exch pushproc exec popproc .colormap } { PS2 /colormap get } ifelse }
BLD { 2 /differential_div publicproc: dup integralgrid dup differences streamgrids 2 index SAMPLE 1 index .name cvx exec 3 -1 roll 1 index .gridid 1 index .gridid ne pop true { replaceGRIDstream } { pop pop } ifelse 1 index .datatype /doublearraytype eq { todouble } { toreal } ifelse /fullname (d) name cvntos append def div :publicproc }
BLD -operator-
BLD { 2 { 1 index valuetoindex } repeat gt { exch } if RANGEEDGES }
BLD -operator-
BLD -operator-
BLD -operator-
BLD { 1 index totype /streamtype eq { 12 } if 3 /gamma3par publicproc: 3 -1 roll [ T ] REORDER toNaN chunksize 4 -2 roll 3 integerarray astore gamma3par0 DATASET 5 object TaskStreams 0 get chunksize NewDoubleBuffer /name /pcpn_accum def /long_name (Accumulated Precipitation) def /fullname [ name fullname ] def /missing_value -9.9899998 def /dataset 2 index def name exch def TaskStreams 0 get TaskParameterBlock 2 get NewDoubleBuffer 1 SetStreamIndex* /T TaskParameterBlock 2 get NewIntegerGRID TaskStreams 0 get .achunk pop * /name /gmean def /long_name (GP1_Mean) def /fullname [ name fullname ] def /dataset 2 index def name exch def TaskStreams 0 get TaskParameterBlock 2 get NewDoubleBuffer 1 SetStreamIndex* /T TaskParameterBlock 2 get NewIntegerGRID TaskStreams 0 get .achunk pop * /name /gsd def /long_name (GP2_StdDev) def /fullname [ name fullname ] def /dataset 2 index def name exch def TaskStreams 0 get TaskParameterBlock 2 get NewDoubleBuffer 1 SetStreamIndex* /T TaskParameterBlock 2 get NewIntegerGRID TaskStreams 0 get .achunk pop * /name /gskew def /long_name (GP3_Skewness) def /fullname [ name fullname ] def /dataset 2 index def name exch def TaskStreams 0 get TaskParameterBlock 2 get NewBuffer 1 SetStreamIndex* /T TaskParameterBlock 2 get NewIntegerGRID TaskStreams 0 get .achunk pop * /name /pzero def /long_name (Percent Zero) def /fullname [ name fullname ] def /dataset 2 index def name exch def /name (Gamma3Parameter) def /fullname [ name fullname ] def :publicproc }
BLD { chunksize crayconvertdp0 TaskStreams 0 get chunksize NewDoubleBuffer }
BLD { 3 /Fourier_transform publicproc: 1 index .grideven not { (grid must be even) error } if 2 index .missing_value null ne { (missing_data not supported) error } if complexasreal? { tocomplex } if 2 index .datatype FFTcases exch get exec DATAAUTO :publicproc }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD { exch todouble exch todouble chunksize chunkrat0 TaskStreams 0 get chunksize NewDoubleBuffer /fullname TaskStreams aload length /- combinefullname TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits def }
BLD { 4 -1 roll toreal 4 1 roll dup 3 index .gridid getknown { nip nip aload pop } { 4 1 roll exec bumpyaverageinputs 5 copy 5 array astore 6 index .gridid 10 -1 roll ! } ifelse redobumpyaverage }
BLD { { 1 /fullgreyscale publicproc: startcolormap transparent white black maxncolor 1 sub steps endcolormap :publicproc } /fullgreyscale docolorscale }
BLD { 6 /gammaprobs publicproc: { pcpn_accum gmean gsd gskew pzero nrun } inputs pcpn_accum [ T ] REORDER todouble toNaN8 gmean copyachunk gsd copyachunk gskew copyachunk pzero copyachunk pcpn_accum .T .npts nrun pzero .T .npts 3 integerarray astore gammaprobs0 TaskStreams 0 get chunksize NewDoubleBuffer nip /name /prob def /long_name (Cumulative Probability) def /fullname [ name fullname ] def /units unitless def /scale_min 0 def /scale_max 1 def /CS 0 def /CE 1 def nip :publicproc }
BLD -operator-
BLD structureParent structure
BLD { { stream1 stream2 } inputs stream1 elementtype /objecttype ne { stream1 stream2 .chunksize realarray copy exch pop } { /allgrids [ stream2 .streamgrids ] def /allknowngrids [ allgrids { stream1 1 index .name known not { pop } if } forall ] def /justchunk allgrids 0 stream2 .nrdim getinterval def /allgrids [ allgrids { npts 1 eq { name stream1 exch known not { pop } if } if } forall ] def /justchunk [ justchunk { npts 1 eq { name stream1 exch known not { pop } if } if } forall ] def /justchunkno1D [ justchunk { npts 1 eq { pop } if } forall ] def stream1 allgrids { npts 1 eq { first exch .name exec exch VALUE } { pop } ifelse } forall justchunkno1D { .name exec } forall justchunkno1D length REORDER allknowngrids { npts 1 eq { pop } { 2 copy .name get exch REGRID } ifelse } forall allgrids length allknowngrids length ne { /SIRecord nrdim mark allgrids aload pop NewStreamPtr def defivars } if justchunk { .name exec } forall justchunk length REORDER } ifelse 1output }
BLD -operator-
BLD -operator-
BLD { exch todouble [ X Y Z ] REORDER exch todouble 1 index X .npts Y .npts mul exch .Z .npts 2 index .npts 3 integerarray astore genind0 TaskStreams 0 get TaskParameterBlock 0 get TaskParameterBlock 1 get mul NewIntegerBuffer TaskStreams 1 get streamgrids /P exch def 3 SetStreamIndex* X Y Z T * /name /vert_index def /interparg TaskParameterBlock def }
BLD -operator-
BLD { regridwghts pop }
BLD { dup type dup /realtype eq exch /integertype eq or not { 0.0 } if 2 index totype /gridtype ne { 1 index type /arraytype eq 2 index xcheck not and { 1.0 exch } if regridAverageVer2 } { 3 index .missing_value null eq 3 index gridtype ordered eq nip { 3 index .low 3 index .low le and 3 index .high 3 index .high ge and } if { pop regridAverage0 } { regridAverageNaN } ifelse } ifelse }
BLD { currentobject /Compression known { Compression .compressiontype dup null ne { true } { pop false } ifelse } { false } ifelse }
BLD { P P0 genind }
BLD { dup type dup /nametype eq exch /stringtype eq or { 1 index type /arraytype eq { 3 } { 2 } ifelse } { dup type /arraytype eq { 2 } { 1 } ifelse } ifelse /classify publicproc: dup type dup /nametype eq exch /stringtype eq or not { name } if 1 index type /arraytype ne { exch toNaN currentobject /CLIST known { dup /CLISTu known { { c: 0 :c /units CLISTu def exch readunits dup type /realarraytype eq { aload pop add 2.0 div } if nip } } { { } } ifelse CLIST exch forall CLIST length 1 index type /nametype eq 2 index type /stringtype eq or { namearray } { realarray } ifelse astore } { ndim RECHUNK toNaN dup reserverealization dup getrealization dup length realarray copy realsort realunique } ifelse exch 1 index type /namearraytype eq { 0.5 scale_min add mark exch 3 index length 2 sub { dup 1 add } repeat counttomark realarray astore nip } { mark 2 index dup 0 get exch 1 1 index length 1 sub getinterval { exch 1 index add 0.5 mul exch } forall pop counttomark realarray astore nip } ifelse } { 3 1 roll exch toNaN exch mark 0 2 3 index length { counttomark 1 add index exch get } for counttomark 1 index type dup /nametype eq exch /stringtype eq or { namearray } { 1 index type /integertype eq { integerarray } { realarray } ifelse } ifelse astore nip 3 1 roll mark 1 2 3 index length 1 sub { counttomark 1 add index exch get } for counttomark realarray astore nip nip } ifelse chunksize 1 index length 2 integerarray astore classify0 TaskStreams 0 get TaskParameterBlock aload pop 1 add mul NewRealBuffer 3 -2 roll dup type /namearraytype eq { /ids } { TaskStreams 0 get dup /CLISTu getknown { nip } { .units dup unitless eq { pop /ids } if } ifelse } ifelse exch 0 exch NewGRID name exch name exch def nrdim 1 add SetStreamIndex* 4 -1 roll cvx exec TaskStreams 0 get .streamgrids * /name /weights cvx def /units unitless def /CS 0 def /CE 1 def /scale_min 0 def /scale_max 1.0 def /valid_min 0 def /valid_max 1.0 def halfgreyscale /CLIST undef :publicproc }
BLD { dup (1/365 years since 1960-01-01) unitconvertbyattribute name (pentads since 1960-01-01) ordered currentobject a: .truefirst :a: .truelast :a 2 { exch d365c2ymd exch 1 sub dm2pentad exch 1960 sub 73 mul add } repeat 1 add 1 exch NewEvenGRID /pointwidth 0 def nip 1 index a: .units :a: .get_calendar :a gridunitconvert nip }
BLD { yearly-anomalies }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax DarkOrange DarkOrange 0.6 bandmax OrangeRed OrangeRed 0.65 bandmax red red 0.7 bandmax firebrick firebrick 0.75 bandmax moccasin moccasin 0.8 bandmax moccasin moccasin 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_20 docolorscale }
BLD { dup type /stringtype ne { null } if counttoobject 1 add 1 roll optionalREORDER 2 RECHUNK toreal dup == exch dup null eq { pop } if DataTable0 }
BLD false
BLD { dup type dup /arraytype ne exch datatype ne and { counttoobject array astore [ exch { cvdatatype } forall array? { counttomark 1 eq { nip } { counttomark array astore nip concatasdatatypearray } ifelse } { counttomark datatypearray astore nip } ifelse } if name units gridtype dup periodic eq { pop ordered } if 4 -1 roll NewGRID gridtype 2 ne { /step 2 index .step def } if SAMPLE }
BLD -operator-
BLD 0 17 object /integerarraytype 0 5 object /realarraytype { exch toNaN exch toNaN } def /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /doublearraytype { exch todouble toNaN8 exch todouble toNaN8 } def /complexarraytype { exch tocomplex exch tocomplex } def def /shortarraytype 0 5 object /realarraytype { exch toNaN exch toNaN } def /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /doublearraytype { exch todouble toNaN8 exch todouble toNaN8 } def /complexarraytype { exch tocomplex exch tocomplex } def def /complexarraytype 0 5 object /realarraytype { exch tocomplex exch tocomplex } def /shortarraytype { exch tocomplex exch tocomplex } def /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /stringtype { exch tocomplex exch tocomplex } def /integerarraytype { exch tocomplex exch tocomplex } def def /realarraytype 0 11 object /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /doublearraytype { exch todouble toNaN8 exch todouble toNaN8 } def /shortarraytype { exch toNaN exch toNaN } def /complexarraytype { exch tocomplex exch tocomplex } def /realarraytype { exch toNaN exch toNaN } def /stringtype { exch toNaN exch toNaN } def /integerarraytype { exch toNaN exch toNaN } def def /stringtype 0 5 object /realarraytype { exch toNaN exch toNaN } def /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /doublearraytype { exch todouble toNaN8 exch todouble toNaN8 } def /complexarraytype { exch tocomplex exch tocomplex } def def /doublearraytype 0 5 object /realarraytype { exch todouble toNaN8 exch todouble toNaN8 } def /shortarraytype { exch todouble toNaN8 exch todouble toNaN8 } def /complexdoublearraytype { exch tocomplexdouble exch tocomplexdouble } def /stringtype { exch todouble toNaN8 exch todouble toNaN8 } def /integerarraytype { exch todouble toNaN8 exch todouble toNaN8 } def def /complexdoublearraytype 0 11 object /doublearraytype { exch tocomplexdouble exch tocomplexdouble } def /shortarraytype { exch tocomplexdouble exch tocomplexdouble } def /complexarraytype { exch tocomplexdouble exch tocomplexdouble } def /realarraytype { exch tocomplexdouble exch tocomplexdouble } def /stringtype { exch tocomplexdouble exch tocomplexdouble } def /integerarraytype { exch tocomplexdouble exch tocomplexdouble } def def
BLD { commonachunk1pt0 [ exch { npts 0 eq { pop } if } forall ] }
BLD 1
BLD 0 23 object /Y /Y def /setcenterweight { store center } def /RANGEEDGESTEP { 3 copy pop exch sub exch div round cvi 3 index /X eq { store NX store XH store XL XH XL sub 360 gt { XL 360 add store XH } if XH XL sub 360 ge { 1 } { 0 } ifelse store xper } { store NY store YH store YL 0 store yper } ifelse pop } def /setemphasize { store ifemphasize } def /RANGESTEP { 3 -1 roll 1 index 0.5 mul sub 3 -1 roll 2 index 0.5 mul add 3 -1 roll RANGEEDGESTEP } def /setdist { store DIST } def /setpass { 2 sub 0 imax store fine } def /X /X def /setweave { store ifweave } def /setdecimal { store dec } def /NSEW { 1 store weave } def /weaverS weaverS def /EWNS { 0 store weave } def
BLD { chunksize ibmconvertsp0 TaskStreams 0 get chunksize NewRealBuffer }
BLD { chunksize bufferwordsize 1 index mul 4 mod 0 eq { tobuffersize DoCopy } { bufferwordsize mul DoCopyB } ifelse buffer appendTaskToBuffer }
BLD false
BLD 2
BLD -operator-
BLD { }
BLD { 3 /sort_by publicproc: { mydataset myvariable mygrids } inputs myvariable mygrids datarank-distinct /mysortby exch def mydataset mygrids aload pop /rank /ids unordered mysortby ndim RECHUNK getrealization NewGRID npts stepdarktolightgreenscale replaceGRID rank 1 1 npts { } for VALUES 1output :publicproc }
BLD -operator-
BLD { get_modulus dup null eq { pop false } { true } ifelse }
BLD -operator-
BLD 0 5 object
BLD { dup type dup /arraytype ne exch datatype ne and { counttoobject dup 1 eq { pop cvdatatype } { array astore mark exch { cvdatatype dup type datatype eq { aload pop } if } forall counttomark datatypearray astore nip } ifelse } if 1 index exch NewGRID 1 index .gridvalues 1 index .gridvalues eq { pop } { npts 0 eq { (You gave VALUES an empty array ) print error } if nip } ifelse }
BLD -operator-
BLD { { mystream mygrid myperiod } inputs /mylow mygrid .low myperiod div round myperiod mul mygrid .low exch sub def mygrid high step 0.5 mul add low myperiod add lt high step 1.5 mul add low myperiod add gt and exch pop { } { /mystream mystream mygrid low low myperiod add step 1.5 mul sub RANGE def /mygrid mystream mygrid .name get def } ifelse begin mystream mygrid name units periodic mylow myperiod npts div dup npts 1 sub mul mylow add NewEvenGRID gridid mygrid .gridid eq { pop == ( is already periodic with period) print myperiod == ( ) print } { exch pop exch bufferSIRecord SIRecord ne { CopyStream } { 5 object } ifelse exch name exch def mygrid name 2 index exch get replaceGRID0 /bufferSIRecord SIRecord def } ifelse end }
BLD -operator-
BLD { 3 -1 roll decompress toNaN8 3 1 roll regridAverage0cache 2 index .gridid getknown { 1 index .gridid getknown { 4 2 roll 2 index 0 get SAMPLE 1 index 0 get gridid 3 index 1 get .gridid ne { 2 index 1 get replaceGRIDstream 1 index 1 get } if 4 2 roll 2 5 getinterval aload pop 3 -1 roll pop 5 -1 roll 3 1 roll false } { true } ifelse } { true } ifelse { { instream gridin gridout } inputs gridin exch /myinputs 1 index def /==alias /myinputs def /gridinname gridin .name cvx def /gridsample gridin def instream gridin .gridid gridout .gridid ne { regridAverageNeedPreSample? { gridinname exec /gridsample myinputs ! } if regridAverageReplaceGRID? pop } if 1 index a: .gridinname exec :a: .gridout :a dup integralgrid exch bumpyaverageinputs 8 -1 roll .gridsample 7 copy pop 7 array astore regridAverage0cache 9 index .gridid getknown not { null 5 object dup 10 index .gridid regridAverage0cache ! } if 4 index .gridid exch ! 8 -1 roll pop } if redobumpyaverage }
BLD { currentobject dup /bounds getknown { dup totype /streamtype eq { nrdim ndim lt { ndim RECHUNK CopyStream } if setStandardInStream 1 index totype /gridtype eq { 1 index .name 1 index .name ne { 2 gridbyno 2 index .name renameGRIDstream } if dup /bounds 3 index ! dup reserverealization 1 index .name getgridbyname 2 index .gridid 1 index .gridid eq { pop nip } { gridtype periodic eq { 1 index exch 3 index 1 index .gridid 1 index .gridid eq { pop pop pop } { SAMPLE exch .streamgrids nip CopyStream streamgrids 3 index SAMPLE streamgrids sub /units 2 index .units def sub } ifelse 1 index .units /units exch def } { 2 index SAMPLE } ifelse dup reserverealization dup /bounds 3 index ! nip } ifelse } { dup /units known { 1 index .units unitconvert } if 1 index .streamgridarray { name cvx getgridbyname exch SAMPLE } forall dup /bounds 3 index ! dup reserverealization nip } ifelse } { pop dup integralgrid dup integralgridtobounds streamgrids nip 2 index SAMPLE streamgrids nip 2 index replaceGRIDstream nip } ifelse } { dup /pointwidth known { currentobject /skippointwidth getknown { not } { true } ifelse currentobject /pointwidth get GRIDParent /pointwidth get eq not and } { false } ifelse { pointwidth pointwidthtobounds } { dup integralgrid dup integralgridtobounds streamgrids nip 2 index SAMPLE streamgrids nip 2 index replaceGRIDstream nip dup reserverealization } ifelse } ifelse }
C grid: /C (ids) unordered [ (R) (I)] :grid
BLD -operator-
BLD { exch 5 object exch /datatype /realarraytype def bufferwordsize 4 ne { /bufferwordsize STREAM 1 index get def } if 4 NewSizedBuffer0 NewBufferCheck }
BLD { getscale_factor type /objecttype eq { fullname exch getscale_factor mul0noNaN /fullname 3 -1 roll def /scale_factor 1.0 def } { getadd_offset type /objecttype eq { getscale_factor 0.0 RESCALEinNaN /scale_factor 1.0 def } if } ifelse }
BLD { { 1 /rainbowcolorscale publicproc: startcolormap /maxncolor 256 def transparent darkgrey 0 0 256 RGB 0 256 256 RGB 51 steps 0 256 0 RGB 51 steps 256 256 0 RGB 51 steps 256 0 0 RGB 51 steps 256 0 256 RGB 51 steps grey endcolormap :publicproc } /rainbowcolorscale docolorscale }
BLD { 1 /make366daysample publicproc: T dup yearlyedgesgrid exch todouble exch todouble 1 index .npts 1 index .npts dup 1 sub 3 integerarray astore make366daysample0 STREAM 5 object /name /tlist def TaskParameterBlock 2 get 366 mul NewDoubleBuffer 2 SetStreamIndex* TaskStreams 1 get partialgrid /DOY 366 NewIntegerGRID * T /YR renameGRID /missing_value -99999.0 def defivars :publicproc }
BLD { 0 1 index { array? { length add } { pop 1 add } ifelse } forall datatypearray 0 2 copy 5 -1 roll { array? { dup length 4 1 roll putinterval } { 1 4 1 roll put } ifelse add 2 copy } forall pop pop pop }
BLD -operator-
BLD { dup type dup /realtype eq exch /integertype eq or not { 0.0 } if 2 index totype /gridtype ne { 1 index type /arraytype eq 2 index xcheck not and { 1.0 exch } if regridAverageVer2v0 } { 3 index .missing_value null eq 3 index gridtype ordered eq nip { 3 index .low 3 index .low le and 3 index .high 3 index .high ge and } if { pop regridAverage0v0 } { regridAverageNaNv0 } ifelse } ifelse }
BLD { getadd_offset type /objecttype eq { fullname exch getadd_offset add0noNaN /fullname 3 -1 roll def /add_offset undef } if }
BLD 0 5 object /shortarraytype 32767 def /stringtype 127 def /integertype 2147483647 def
BLD -operator-
BLD { bufferwordsize NewSizedBuffer0 }
BLD -operator-
BLD { dup monthlyedgesgrid 1 index boundinggrids pop .gridvalues constantdata 1 index exch sub 1 add toi4 /name /dom def /long_name (day of month) def }
BLD { 1 index .datatype 1 index .datatype ne { exch toreal exch toreal } if ndim 0 gt { 2 null MATCHalong } if nptgrids length dup 1 le { binop0noNaN mul00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (*) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitmul binopunits } { pop mul } ifelse }
BLD { add }
BLD { 2 /regridLB publicproc: { dup 3 index 1 index .name get boundinggrids pop SAMPLE } forall :publicproc }
BLD { 1 index totype /streamtype eq { exch copyachunk exch } if chunksize kalstateAd TaskStreams 1 get chunksize NewDoubleBuffer /name /WF def /fullname ($W sub F$) def }
BLD -operator-
unnamed STREAM
BLD { 2 /pairsums publicproc: exch decompress exch { stream grid } inputs stream grid gridno exch .nrdim gt { stream grid gridstride 1 add BufferOrder dup grid name units gridtype [ first gridvalues aload pop pop dup ] NewGRID SAMPLE exch grid name units gridtype [ second gridvalues dup length 1 sub 1 exch getinterval aload pop dup ] NewGRID SAMPLE partialS new stream chunksize store n1 grid gridstride store n2 grid .npts store n3 pop pairsums1 stream chunksize NewBuffer } { stream stream grid newpartialS pairsums0 TaskStreams 0 get TaskParameterBlock n1 n2 1 add mul n3 mul exch pop NewBuffer grid integralgrid name exch def nrdim SetStreamIndex* TaskStreams 0 get .streamgrids TaskStreams 0 get ndim exch grid gridno -1 mul exch pop roll integralgrid TaskStreams 0 get ndim exch grid gridno exch pop roll * } ifelse 1output clearscale :publicproc }
BLD -operator-
BLD { datatype /doublearraytype eq { MVtoNaN8 } { MVtoNaN4 } ifelse }
BLD { 5 /regridAverage publicproc: 3 index .missing_value null eq 2 index 1.0 eq and { true 3 index { get_modulus null eq { 6 index 1 index .name exec nip 1 index .lowedge 1 index .lowedge le 2 index .highedge 2 index .highedge ge and nip nip and } { pop } ifelse } forall } { false } ifelse { pop pop dup type /objecttype eq { 2 index 1 index .name getgridbyname nip regridAverage0v0 } { { 2 index decompress 1 index .name getgridbyname nip regridAverage0v0 } forall } ifelse } { 1 index 1.0 eq { nip 1 index type /objecttype eq { 3 index 2 index .name getgridbyname nip exch regridAverageNaNv0 } { regridAverageNaNver2v0 } ifelse } { regridAverageNaNWghtv0 } ifelse } ifelse :publicproc }
BLD { { dup dailyedgesgrid dup partialgrid } dailyAverageCache bumpyaverage }
BLD { 1091109451 set_code_last_modified { 3 1 roll aload length REORDER toNaN exch 1 index .chunksize exch 1 index mul round cvi 2 integerarray astore ndatarank0 TaskStreams 0 get chunksize NewDoubleBuffer pop TaskStreams 0 get chunksize NewRealBuffer markunitless sealhistory /fullname [ /percentile_over [ TaskStreams 0 get .chunk array astore { .name } forall TaskParameterBlock aload pop 100 mul exch div dup 0 gt { s== (% min) append } { pop } ifelse ] fullname dup type /arraytype ne { 1 array astore } if ] def correlationcolorscale DATA 0 1 RANGE /long_name (percentile) def } /percentileover gridarray1fn }
BLD -operator-
BLD { rescalemul0 rescaleadd0 getscale_factor getadd_offset RESCALEinNaN }
BLD { dup dup yearlyedgesgrid 1 index boundinggrids pop .gridvalues constantdata sub 1 add toi4 /name /doy def /long_name (day of year) def }
BLD { tocomplexdoublefilters datatype get exec }
BLD { { thedata time modelperiod lags egrid nrealizations thefraction } inputs 10 object /thedata thedata ndim RECHUNK def /time time ndim RECHUNK def /thetimegrid time [ streamgrids ] 0 get nip def /egrid2 egrid name cvntos (2) append cvn units gridtype gridvalues NewGRID nip /fullname egrid .fullname def def /egridno thedata egrid gridno nip def /bs nrealizations NewIntegerGRID name exch def /Sbs bs 0 RECHUNK def egridno thedata .nrdim gt { (the eof grid must be within the chunk as currently written) print error } if /tgridno thedata thetimegrid gridno nip def tgridno thedata .nrdim gt { (the time grid must be within the chunk as currently written) print error } if Sbs thedata copyachunk thetimegrid .step lags { 1 index div exch } forall pop lags length integerarray astore tgridno egridno lt { setcovS thefraction store fraction thetimegrid time ne { time 4 1 roll lcovar30bbs } { lcovar30bs } ifelse } { (not written yet) print stop } ifelse STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewBuffer pop STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewDoubleBuffer /L dup /real ordered lags NewGRID /fullname (Lag) def def /T dup monthclimoname periodic 0.5 TaskParameterBlock .dt TaskParameterBlock .ns 1 sub 1 index mul 2 index add NewEvenGRID /long_name (month) def def 4 SetStreamIndex* egrid /fullname [ (Lagged) fullname ] def egrid2 T L bs * /name /covariance def /fullname [ TaskStreams 1 get .fullname maybealoadpop name ] def dup TaskParameterBlock mm ns mul nl mul nip NewDoubleBuffer /name /D1 def /fullname [ TaskStreams 1 get .fullname maybealoadpop name ] def markstreamsymmetric exch 1 index chunksize NewDoubleBuffer /name /D0 def /fullname [ TaskStreams 1 get .fullname maybealoadpop name ] def 3 outputs }
BLD -operator-
BLD -operator-
BLD { { instream gridin gridout } inputs /gridinname gridin .name cvx def instream decompress gridin .gridid gridout .gridid ne { regridAverageMatchGrids gridinname exec grideven gridout .grideven and { step gridout .step le } { false } ifelse { 2 copy gridout .step splitstreamgrid gridinname exec 1 array astore average gridinname cvntos (2) append cvn cvx exec gridinname renameGRIDstream gridinname exec .gridid gridout .gridid eq { nip nip } { pop regridAveragewithintegral } ifelse } { regridAveragewithintegral } ifelse gridin gridtype periodic eq nip { gridinname exec width gridin .width eq { name units periodic first step last NewEvenGRID replaceGRID } { pop } ifelse } if /name instream .name def /fullname instream .fullname def instream /long_name getknown { /long_name exch def } { /long_name undef } ifelse /history instream .history def [ gridinname cvntos ( regridded by averaging) currentobject gridinname get grideven { space low cvsunits ( to ) high cvsunits ( by ) step s== space 8 -1 roll pop } { pop } ifelse ] concat addhistory } if /units instream .units def 1output }
BLD { halfgreyscale }
BLD -operator-
BLD { 2 /curl publicproc: { myU myV } inputs myV X partial myU Y cosd mul Y partial [ Y ] regridLinear exch [ X ] regridLinear exch sub Y cosd div 10000000.0 90.0 div div /units myU .units (1/m) unitmul def /fullname [ /curl myU myV 2 (,) combinefullname ] def /long_name longname def correlationcolorscale DATAAUTO nip :publicproc }
BLD -operator-
BLD { combinefullnameCases 1 index cvn known { combinefullnameCases 1 index cvn get exec } { combinefullname0 } ifelse }
BLD 0 11 object /complexarraytype { chunksize 2 mul realtodouble0 TaskStreams 0 get chunksize NewComplexDoubleBuffer } def /complexdoublearraytype { } def
BLD -operator-
BLD { 1 /d365ctomonthtime publicproc: dup /pointwidth getknown { 0 eq } { false } ifelse { (1/365 years since 1960-01-01) unitconvert toreal streamrescale chunksize d365ctomonthtime0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /units /monthtime preferredunitname def /scale_factor 1.0 def /add_offset 0.0 def /calendar /360 def } { .get_bounds d365ctomonthtime fullname 1 index 1 gridbyno 1 array astore average exch /fullname exch def /bounds 3 -1 roll def } ifelse :publicproc }
BLD -operator-
BLD crayS
BLD { 2 index type /objecttype eq { missing_value } if 4 /SCALE publicproc: { mystream myscale myoffset mymissing_value } inputs mystream toNaN streamrescale myoffset 0.0 ne myscale 1.0 ne or { myoffset sub myscale div /fullname mystream .fullname def /name mystream .name def /add_offset myoffset def /scale_factor myscale def } if getmissing_value null ne { mymissing_value 1.0 mul chunksize replaceNaN1 TaskStreams 0 get chunksize NewBuffer /missing_value mymissing_value def } if 1output :publicproc }
BLD { 2 /selectbyNaN publicproc: exch decompress toNaN exch dup ifNaN { pop } { dup elementtype /objecttype eq { decompress toNaN toreal 2 MATCHchunk MATCH exch chunksize replaceNaN0 TaskStreams 1 get chunksize NewBuffer /missing_value TaskStreams 1 get .missing_value def } { dup elementtype /integertype eq { 1.0 mul } if chunksize replaceNaN1 TaskStreams 0 get chunksize NewBuffer /missing_value null def } ifelse } ifelse :publicproc }
BLD -operator-
BLD { 1 0.5 2 index 1 add julian_day 1 0.5 3 index julian_day sub nip }
BLD { { 1 /darktolightgreyscale publicproc: startcolormap transparent white 79 79 79 RGB LightGrey maxncolor 2 sub steps white endcolormap :publicproc } /darktolightgreyscale docolorscale }
BLD -operator-
BLD -operator-
BLD { 3 copy mul add dup 73 div floor 1960 add exch 73 mod dup 0 lt { 73 add } if 5 mul dup 59 gt { 1 index daysperyear 366 eq { 1 add } if } if exch 1 exch 0.5 exch julian_day 1 Jan 1960 julian_day sub add nip 3 1 roll }
BLD { 2 /gammastandardize publicproc: exch chunksize 3 -1 roll 2 integerarray astore gammastandardize0 TaskStreams 0 get chunksize NewDoubleBuffer /name /spi def /long_name (Standard Precipitation Index) def /fullname [ name fullname ] def /units unitless def /scale_min -3.0999999 def /scale_max 3.0999999 def /CS -3.0999999 def /CE 3.0999999 def startcolormap -3.0999999 3.0999999 RANGE grey grey firebrick -3.0999999 VALUE firebrick firebrick -2.0 bandmax chocolate chocolate -1.5 bandmax wheat wheat -1.0 bandmax white white 1.0 bandmax PaleGreen PaleGreen 1.5 bandmax MediumSeaGreen MediumSeaGreen 2.0 bandmax DarkSeaGreen DarkSeaGreen 3.0999999 bandmax endcolormap :publicproc }
BLD { { instream gridin gridout Wmin } inputs instream decompress 0 replaceNaN gridin gridout regridAverage0v0 exch instream dataflag gridin gridout regridAverage0v0 exch .Wmin normalize }
BLD 0 11 object /maybeshorten { dup length 1 gt { dup dup length 1 sub get thestreams 0 get exch gridno nrdim gt nip { 0 1 index length 1 sub getinterval maybeshorten } if } if } def
BLD { { strm1 strm2 grids renamegrids } inputs strm1 mayberechunkmulavg strm2 mayberechunkmulavg 2xtoNaN8 2 setcommongrids 1 index .npts 1 index .npts ge { reordertomatch } { exch reordertomatch exch } ifelse grids chunkpattern 1 index .datatype /realarraytype eq { mulsum0g } { mulsum1g } ifelse STREAM TaskParameterBlock 1 get NewIntegerBuffer pop TaskStreams 0 get dup TaskStreams 1 get grids binarysetSIRecord chunksize NewDoubleBuffer grids { 2 copy gridno nip 0 eq { .name undef } { last VALUE } ifelse } forall grids { 2 copy gridnobyname nip 0 eq { pop } { removeGRID0 } ifelse } forall /units strm1 .units strm2 .units unitmul preferredunitname def strm1 .missing_value? strm2 .missing_value? or { /missing_value NaN def } if renamegrids length 0 gt { 0 1 renamegrids length 1 sub { renamegrids 1 index get exch grids exch get .name renameGRID } for } if 1output }
BLD -operator-
BLD { 1 /day2ymd publicproc: /julian_day unitconvertbyattribute juliandaytoYmd :publicproc }
BLD -operator-
BLD { getmissing_value dup ifnotNaN exch null ne and { missing_value toNaNtypes 1 index type get exec } if }
BLD -operator-
BLD -operator-
BLD { currentobject name units gridtype get_bounds 2 gridbyno .npts 1 add datatypearray 1 index 1 gridbyno first VALUE getrealization 1 index copy pop 1 index 1 gridbyno second VALUE 2 gridbyno last VALUE getrealization 1 index dup length 1 sub 1 getinterval copy pop nip NewGRID /pointwidth 0.0 def 1 index /calendar known { 1 index .calendar /calendar exch def } if nip }
BLD { counttoobject 3 add /toS publicproc: counttoobject 0 eq { exch ndim RECHUNK CopyStream dup reserverealization exch 1 index CopyStream getrealization realsort realunique } { counttoobject realarray astore } ifelse exch toS0 :publicproc }
BLD -operator-
BLD -operator-
BLD { dup null eq { pop 1 index .nptgrids dup length 1 ge { 0 get } { pop streamgridarray 0 get } ifelse } if /MATCHgrid Ingrid: ! array astore MATCHgrid 1 index { 1 index .name getknown { commonGRID } if } forall exch { 2 copy 1 index .name getknown { exch SAMPLE } { pop } ifelse exch } forall pop }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax moccasin moccasin 0.45 bandmax moccasin moccasin 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_55 docolorscale }
BLD { counttoobject 2 add /invertontogrid publicproc: counttoobject realarray astore exch dup 4 1 roll toS0 :publicproc }
BLD 0 5 object /* { 3 index 3 index eq { pop pop pop dup type /objecttype eq { .fullname } if [ exch (squared) ] } { combinefullname0 } ifelse } def /- { true /myflag Ingrid: ! 3 index dup type /objecttype eq { .fullname } if 3 index dup type /objecttype eq { .fullname } if dup type /arraytype eq { dup length 2 eq { dup 0 get (mean) eq { 1 get 2 copy eq { pop [ exch /anomaly exch ] nip nip nip nip false /myflag Ingrid: ! } if } if } if } if myflag { pop pop combinefullname0 } if } def
BLD { array? { 3 /ginverse publicproc: 0.0 } { 4 /ginverse publicproc: } ifelse { mydata mydim1 mydim2 mystab } inputs mydim1 type /objecttype eq { /mydim1 mydim1 1 array astore def } if mydim2 type /objecttype eq { /mydim2 mydim2 1 array astore def } if mydata mydim1 aload pop mydim2 aload pop mydim1 length mydim2 length add REORDER todouble 1 mydim1 { .npts mul } forall 1 mydim2 { .npts mul } forall ginverseS new exch store ny exch store nx mystab store stab ginverse0 TaskStreams 0 get TaskParameterBlock nx ny imin nip dup 1 add mul 2 div NewDoubleBuffer pop TaskStreams 0 get chunksize NewDoubleBuffer /fullname [ /inv fullname ] def nip :publicproc }
BLD -operator-
BLD { nip 5 2 roll 3 { 3 1 roll toNaN } repeat 3 -1 roll get_modulus? { pop XL XH masknotrange } if 3 1 roll 5 -1 roll 3 exch dup type /arraytype ne { (must specify array of grid(s) to weave from) error } if aload length MATCH 4 -1 roll 1 index .chunksize store NV cressman0 TaskStreams 2 get TaskParameterBlock NX NY mul nip NewBuffer /X /degree_east TaskParameterBlock .xper 1 eq { periodic } { ordered } ifelse TaskParameterBlock .XL TaskParameterBlock .XH TaskParameterBlock .NX 3 copy pop exch sub exch div 3 -1 roll 1 index 0.5 mul add 3 -1 roll 2 index 0.5 mul sub 3 -1 roll exch NewEvenGRID name exch def /Y /degree_north ordered TaskParameterBlock .YL TaskParameterBlock .YH TaskParameterBlock .NY 3 copy pop exch sub exch div 3 -1 roll 1 index 0.5 mul add 3 -1 roll 2 index 0.5 mul sub 3 -1 roll exch NewEvenGRID name exch def 2 SetStreamIndex* X Y TaskStreams 2 get .achunk pop * TaskStreams 2 get .chunk array astore { .name undef } forall /missing_value -99999.0 def /procargs TaskParameterBlock [ procargs aload pop /X cvx XL XH 2 copy exch sub NX div /RANGEEDGESTEP cvx /Y cvx YL YH 2 copy exch sub NY div /RANGEEDGESTEP cvx IR /minstns cvx R1 /pass1 cvx R2 /pass2 cvx R3 /pass3 cvx /:cressman cvx ] nip store :publicproc }
BLD { dup s== (_stepdarktolightgreyscale) append cvn dup 3 -1 roll /stepdarktolightgreyscale0 cvx 2 array astore cvx defcolorscale cvx exec }
BLD { 2 /divergence publicproc: { myU myV } inputs myV Y cosd mul Y partial myU X partial [ Y ] regridLinear exch [ X ] regridLinear exch add Y cosd div 10000000.0 90.0 div div /units myU .units (1/m) unitmul def /fullname [ /divergence myU myV 2 (,) combinefullname ] def /long_name longname def correlationcolorscale DATAAUTO nip :publicproc }
BLD -operator-
BLD { exch 5 object exch /datatype /complexdoublearraytype def /bufferwordsize 16 def 16 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD 0 11 object /365_day 365 def /360_day 360 def /360 360 def /NOLEAP 365 def /365 365 def /noleap 365 def
BLD { units exch /julian_day unitconvertbyattribute name units ordered low getscale_factor mul getadd_offset add 0.5 add jd2dmy 12 mul add nip 12 high getscale_factor mul getadd_offset add jd2dmy 12 mul add nip 1 add dup 3 index sub round cvi 12 idiv 1 add 12 seasonalwidth idiv 1 add imul realarray 0 5 2 roll { seasonalwidth 1 index 11 add { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll dmy2jd getadd_offset sub 0.5 sub getscale_factor div 3 copy put pop 1 add } for } for 0 exch getinterval 12 seasonalwidth idiv { dup dup length 2 sub get last gt { 0 1 index length 1 sub getinterval } if } repeat NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if /pointwidth 0.0 def 1 index first last gt nip { last first subgrid } if nip exch unitconvertbyattribute }
BLD { exch dup type /objecttype eq { 1 array aload } if exch { stream1 stream2 gridarray Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if stream2 dup 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridAverage0 } forall exch dataflag gridarray { stream1 1 index .name getgridbyname nip regridAverage0 } forall Wmin normalize exch .stream1 exch }
BLD { Compression .compressiontype elementtype /nulltype ne { 5 object 1 /decompress publicproc: Compression begin compressiontype cvn cvx exec end /Compression Compression parent def decompress :publicproc } if }
BLD { optionalREORDER getmissing_value? not { 0 } if array? { 0 get } if 1 datatypearray astore chunksize swapbytes80 TaskStreams 0 get chunksize NewBuffer }
BLD -operator-
BLD { 3 /normalize publicproc: 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 2 setcommongrids reordertomatch 2 matchachunk 3 -1 roll dup type /objecttype ne { normalizescalar } { normalizefn } ifelse clearscale defivars :publicproc }
BLD { { instream gridin gridout Wmin } inputs instream decompress 0 replaceNaN gridin gridout regridAverage0 exch instream dataflag gridin gridout regridAverage0 exch .Wmin normalize }
BLD { (days since 1960-01-01) unitconvertbyattribute currentobject /pointwidth known { pointwidth 0.0 eq } { false } ifelse { name (1/365 years since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset daytimeoffset add add rjt2ymd ymd2d365c } forall counttomark realarray astore nip NewGRID /calendar /365 def /pointwidth 0 def 1 index /standard_name getknown { /standard_name exch def } if } { integralgrid (days since 1960-01-01) unitconvertbyattribute name (1/365 years since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset daytimeoffset add add rjt2ymd ymd2d365c } forall counttomark realarray astore nip NewGRID /calendar /365 def /pointwidth 0 def partialgrid 1 index /standard_name getknown { /standard_name exch def } if } ifelse nip }
BLD { exch copyachunk nip }
BLD { 1 index .array? { 4 /mulsum publicproc: } { 3 /mulsum publicproc: array? { [ ] } if } ifelse dup type /arraytype eq { mulsumsub1 } { mulsumsub0 } ifelse :publicproc }
BLD -operator-
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax moccasin moccasin 0.4 bandmax moccasin moccasin 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_60 docolorscale }
BLD -operator-
BLD { 2 REORDER todouble exch 1 RECHUNK todouble exch copyachunk chunk pop .npts exch .npts exch 2 integerarray astore vmufsf2 TaskStreams 1 get chunksize NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock 1 get dup 1 add mul 2 div NewDoubleBuffer /Compression Compression parent def 2 SetStreamIndex* TaskStreams 1 get .chunk pop exch pop name cvntos (2) append cvn units gridtype gridvalues NewGRID TaskStreams 0 get .achunk pop * /name /vmufsfs def /fullname [ TaskStreams 1 get .fullname (*) TaskStreams 0 get .fullname (*) TaskStreams 1 get .fullname ] def markstreamsymmetric }
BLD { 2 /regridLB publicproc: { dup 3 index 1 index .name get boundinggrids pop dup 4 1 roll SAMPLE exch 2 index 1 index .name get replaceGRID } forall :publicproc }
BLD { chunksize fginvgaussian TaskStreams 0 get chunksize NewBuffer (Unit Gaussian Data) addhistory }
BLD -operator-
BLD { 1 integerarray astore dfft1di0 STREAM TaskParameterBlock 0 get 15 add NewDoubleBuffer 1 SetBuffernchunk /I TaskParameterBlock 0 get 15 add NewIntegerGRID name exch def 1 SetStreamIndex* I * /name /coeffs def }
BLD { regridAverageNeedPreSample? pop regridAverageReplaceGRID? pop }
BLD -operator-
BLD -operator-
BLD { 0.0 setpointwidthreplaceGRID }
BLD { datatype /namearraytype eq ids? or unordered? or { dup 2 datatypearray astore } { currentobject /skippointwidth known { false } { currentobject /pointwidth known { pointwidth realorintegertype? { true } { pop false } ifelse } { false } ifelse } ifelse { dup 0.0 eq { pop dup 2 datatypearray astore } { getscale_factor div 0.5 mul 2 copy sub 3 1 roll add 2 realarray astore } ifelse } { currentobject /bounds known not npts 1 eq and { currentobject /pointwidth getknown not { 0.0 } if exec getscale_factor div 0.5 mul 2 copy sub 3 1 roll add 2 realarray astore } { currentobject totype /gridtype eq { get_bounds streamgridarray 1 get .gridtype periodic eq { dup getrealization 3 1 roll .streamgridarray 1 get exch valuetoindex nip 2 copy 2 mul 1 index length mod dup 0 lt { 1 index length add } if exch 1 index 2 getinterval 4 1 roll 2 idiv sub exch length 2 idiv idiv get_modulus mul exch aload pop 2 { exch 2 index add } repeat 2 datatypearray astore nip } { dup getrealization 3 1 roll .streamgridarray 1 get exch valuetoindex nip 2 mul 2 getinterval } ifelse } { dup 2 datatypearray astore } ifelse } ifelse } ifelse } ifelse }
BLD { pentadedgesgrid partialgrid }
BLD -operator-
BLD { /stream2 safecopyachunkdict ! /stream1 safecopyachunkdict ! safecopyachunkdict .stream1 safecopyachunkdict .stream2 1 object nrdim mark chunk pop safecopyachunkdict .stream2 .achunk array astore { name safecopyachunkdict .stream1 exch known { pop } if } forall safecopyachunkdict .stream1 .achunk pop NewStreamPtr /SIRecord exch def }
BLD -operator-
BLD { 2 RECHUNK firstgrid .npts normalizePOPs0 TaskStreams 0 get 2 NewDoubleBuffer 1 SetStreamIndex* C TaskStreams 0 get .achunk pop * /name /alpha def /fullname [ fullname maybealoadpop name ] def TaskStreams 0 get chunksize NewDoubleBuffer /name /nevec def }
BLD -operator-
BLD -operator-
BLD 0 2 object /attach -operator- def /release -operator- def
BLD { currentobject cv4Bdatatypes exch .datatype get exec }
BLD { dup totype /gridtype eq { 1 array astore } if 2 /ratios publicproc: 0 get exch getadd_offset type /objecttype ne { 5 object /add_offset 0.0 def } if decompress toNaN exch { stream gridstream } inputs /mygrid gridstream ifGRID not { .streamgrids } if def stream mygrid gridno exch .nrdim gt { stream bufferSIRecord SIRecord ne { CopyStream } if mygrid gridstride 1 add BufferOrder dup mygrid second last RANGE exch mygrid first secondtolast RANGE chunkrat mygrid .name exec mygrid partialgrid replaceGRID0 /bufferSIRecord SIRecord def } { stream todouble stream mygrid newpartialS ratios0 TaskStreams 0 get TaskParameterBlock n1 n2 1 sub mul n3 mul exch pop NewDoubleBuffer mygrid partialgrid name exch def nrdim SetStreamIndex* TaskStreams 0 get .streamgrids TaskStreams 0 get ndim exch mygrid gridno -1 mul exch pop roll partialgrid TaskStreams 0 get ndim exch mygrid gridno exch pop roll * } ifelse /units unitless def 1output :publicproc }
BLD -operator-
BLD { tobuffersizetypes datatype getknown { exec } { pop 0 } ifelse }
BLD { get_calendar exch units exch maybeconvertdays units exch monthtimename unitconvertbyattribute name units ordered low scale_factor mul getadd_offset add rm19602ymd pop 1 sub exch 12 mul add 12 high scale_factor mul getadd_offset add rm19602ymd pop 1 sub exch 12 mul add 1 add dup 3 index sub round cvi 12 idiv 1 add 12 seasonalwidth idiv 1 add imul realarray 0 5 2 roll { seasonalwidth 1 index 11 add { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll ensotime getadd_offset sub getscale_factor div 3 copy put pop 1 add } for } for 0 exch getinterval 12 seasonalwidth idiv { dup dup length 2 sub get last gt { 0 1 index length 1 sub getinterval } if } repeat NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip /pointwidth 0.0 def exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD { 5 object ndim 0 ne { nrdim ndim eq not { ndim 1 sub RECHUNK } if } if chunksize achunk 0 gt { 0 RECHUNK } { 0 } ifelse exch random0 chunksize NewBuffer }
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax moccasin moccasin 0.35 bandmax moccasin moccasin 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_65 docolorscale }
BLD -operator-
BLD { dup type /arraytype ne { pop } if 2 /datarank-distinct publicproc: { dup type /arraytype ne { pop } if aload length REORDER toNaN chunksize datarank0notie TaskStreams 0 get chunksize NewDoubleBuffer pop TaskStreams 0 get chunksize NewRealBuffer markunitless /fullname [ /rank_over [ TaskStreams 0 get .chunk array astore { .name } forall ] fullname dup type /arraytype ne { 1 array astore } if ] def } /datarank-distinct gridarray1fn :publicproc }
BLD -operator-
BLD { dup /myintegralgrid known { dup /myintegralgrid get 1 index first last 3 -1 roll pop subgrid nip } { currentobject /bounds known grideven not and { integralgridfrombounds nip } { npts 1 eq { currentobject /pointwidth getknown { realorintegertype? not 1 index 0 eq or { pop } { name units gridtype dup periodic eq { pop ordered } if 4 -1 roll 0.5 mul first 1 index sub exch first add 2 realarray astore NewGRID /pointwidth 0 def } ifelse } if } { name units gridtype dup periodic eq { pop ordered } if grideven { last first sub npts 1 sub div first 1 index 0.5 mul sub 1 index last 4 -1 roll 0.5 mul add NewEvenGRID } { currentobject integralgridsub getrealization NewGRID } ifelse } ifelse 1 index /scale_factor known { 1 index .scale_factor /scale_factor exch def } if 1 index /add_offset known { 1 index .add_offset /add_offset exch def } if 1 index /standard_name getknown { /standard_name exch def } if /pointwidth 0.0 def 1 index /calendar known { 1 index .calendar /calendar exch def } if exch pop } ifelse } ifelse }
BLD { { dup yearlyedgesgrid dup partialgrid } yearlyAverageCache bumpyaverage }
BLD { ISYMM 1 REORDER Compression parent .compressiontype /ipack eq { Compression parent .nout copyachunk ISYMM .npts 8 mul 1 add sqrt cvi 1 sub 2 div cvi dup dup 3 mul 1 index ln 2 ln div ceiling cvi 2 mul add 5 add mul 1 add 1 index 5 mul 3 add 3 integerarray astore eigrs1N } { ISYMM .npts 8 mul 1 add sqrt cvi 1 sub 2 div cvi dup dup 3 mul 1 index ln 2 ln div ceiling cvi 2 mul add 5 add mul 1 add 1 index 5 mul 3 add 3 integerarray astore eigrs1 } ifelse TaskStreams 0 get TaskParameterBlock 0 get pop 1 NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock 1 get NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock 2 get 2 add 2 div NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock 0 get NewDoubleBuffer /ev /integer 0 TaskParameterBlock 0 get -1 1 NewEvenGRID name exch def /ISYMM undef 1 SetStreamIndex* ev TaskStreams 0 get .achunk pop * /name /eval def /long_name (eigenvalues) def /fullname [ name fullname ] def dup 1 NewDoubleBuffer /name /vartot def 0 SetStreamIndex* TaskStreams 0 get .achunk pop * /fullname [ name fullname ] def /long_name (total variance) def exch dup TaskParameterBlock 0 get dup mul NewDoubleBuffer 1 TaskStreams 0 get .Compression .symmetricchunk length add SetStreamIndex* TaskStreams 0 get .Compression .symmetricchunk aload pop ev TaskStreams 0 get .achunk pop * /name /evec def /long_name (eigenvectors) def /units unitless def /fullname [ name TaskStreams 0 get .fullname ] def /Compression Compression parent def exch /Compression Compression parent compressiontype /ipack eq { parent } if def exch 3 -1 roll }
BLD -operator-
BLD { get_calendar exch units exch maybeconvertdays units exch (1/365 years since 1960-01-01) unitconvertbyattribute name units ordered low scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add 12 high scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add 1 add dup 3 index sub round cvi 12 idiv 1 add 12 seasonalwidth idiv 1 add imul realarray 0 5 2 roll { seasonalwidth 1 index 11 add { dup 12 div exch 1 index 12 mul sub 1 add 1 ymd2d365c getadd_offset sub getscale_factor div 3 copy put pop 1 add } for } for 0 exch getinterval 12 seasonalwidth idiv { dup dup length 2 sub get last gt { 0 1 index length 1 sub getinterval } if } repeat NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip /pointwidth 0.0 def exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD -operator-
BLD { 1101772600 set_code_last_modified 2 /rasterize publicproc: projecttomatch message? not { { matchstream geometrystream } inputs /==alias /myargs cvx def /myargs 1 index def matchstream getX? { 1 index .getY? { true } { pop false } ifelse } { false } ifelse { dup /isSophisticatedBy known { dup /myTiledY myargs ! .isSophisticatedBy } if grideven not { name units ordered first last 2 copy exch sub npts 1 sub div exch NewEvenGRID nip } if /myYgrid myargs ! dup /isSophisticatedBy known { dup /myTiledX myargs ! .isSophisticatedBy } if grideven not { name units ordered first last 2 copy exch sub npts 1 sub div exch NewEvenGRID nip } if /myXgrid myargs ! pop geometrystream myXgrid /sophisticates known { myTiledX get_bounds 1 RECHUNK toreal a: 1 gridbyno first VALUE :a: 1 gridbyno second VALUE :a 3 -1 roll .get_realmodulus cvreal dup 0 eq { geometrystream .latlonSRS? { pop 360.0 } if } if myTiledY get_bounds 1 RECHUNK toreal a: 1 gridbyno first VALUE :a: 1 gridbyno second VALUE :a myYgrid first last gt nip { exch } if 3 -1 roll .get_realmodulus cvreal 7 -1 roll 7 matchachunk 7 1 roll } { myXgrid .firstedge myXgrid .lastedge myXgrid .get_realmodulus cvreal dup 0 eq { geometrystream .latlonSRS? { pop 360.0 } if } if myYgrid .firstedge myYgrid .lastedge myYgrid .get_realmodulus cvreal } ifelse myXgrid .npts myYgrid .npts 2 integerarray astore rasterize0 TaskStreams 0 get TaskParameterBlock aload pop imul NewI1Buffer halfgreyscale /valid_min 0 def /valid_max 255 def /scale_factor 1.0 255 div def 2 SetStreamIndex* myXgrid myYgrid TaskStreams 0 get .achunk pop * matchstream /SpatialReferenceSystemDims getknown { /SpatialReferenceSystemDims exch def } if } { .longname (could not find lon/lat in ) exch append leavemessage } ifelse 1output } if :publicproc }
BLD { { myD WX IP pblk } inputs myD WX .nchunk 1 eq { WX bufferSIRecord exch 1 SetStreamIndex* chunk pop myD .achunk pop * exch /bufferSIRecord exch def IP bufferSIRecord exch 1 SetStreamIndex* chunk pop myD .achunk pop * exch /bufferSIRecord exch def } { WX WY IP } ifelse pblk bilin0 pop TaskStreams 0 get TaskParameterBlock 1 get NewBuffer 1 SetStreamIndex* TaskStreams 1 get .chunk pop TaskStreams 0 get .achunk pop * missing_value null eq { /missing_value NaN def } if }
BLD structureParent structure
BLD { { stream1 stream2 gridarray Wght Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if /Wght stream2 Wght type /stringtype eq { Wght interp } { Wght exec dup type /arraytype eq { 0 get } if } ifelse nip def stream2 fullname 1 index Wght mul exch /fullname exch def 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridAverage0 } forall exch dataflag Wght mul gridarray { stream1 1 index .name getgridbyname nip regridAverage0 } forall Wmin Wght mul gridarray { 2 copy gridno nip 0 eq { pop } { stream1 1 index .name getgridbyname nip regridAverage0 } ifelse } forall normalize exch .stream1 exch }
BLD -operator-
BLD { 3 /shiftGRID publicproc: dup 0.0 eq { pop pop } { 3 -1 roll bufferSIRecord SIRecord ne { CopyStream } if 3 1 roll shiftGRIDgrid replaceGRID :publicproc } ifelse }
BLD -operator-
BLD -operator-
BLD { { 1 /sstcolorscale publicproc: DATA -2 35 RANGE /colormap [ 16777215 1973790 8388608 [ 8388608 14 ] 16711680 [ 16711680 7 ] 14772545 [ 14772545 7 ] 13458026 [ 13458026 7 ] 15624315 [ 15624315 6 ] 16740484 [ 16740484 7 ] 15570276 [ 15570276 7 ] 16748574 [ 16748574 7 ] 16760576 [ 16760576 7 ] 13749760 [ 13749760 6 ] 13688896 [ 13688896 7 ] 16776960 [ 16776960 7 ] 16777040 [ 16777040 7 ] 13959039 [ 13959039 7 ] 10025880 [ 10025880 6 ] 8388352 [ 8388352 7 ] 65407 [ 65407 7 ] 3329330 [ 3329330 7 ] 65280 [ 65280 7 ] 3145645 [ 3145645 7 ] 65535 [ 65535 6 ] 9234160 [ 9234160 7 ] 11200750 [ 11200750 7 ] 55295 [ 55295 7 ] 3195135 [ 3195135 7 ] 42495 [ 42495 6 ] 7504122 [ 7504122 7 ] 5275647 [ 5275647 7 ] 4678655 [ 4678655 7 ] 255 [ 255 7 ] 2237106 [ 2237106 6 ] 2763429 [ 2763429 7 ] 1710726 [ 1710726 7 ] 128 [ 128 7 ] 6303920 [ 6303920 7 ] 9639167 [ 9639167 7 ] 12632256 ] def /ncolor 256 def :publicproc } /sstcolorscale docolorscale }
BLD -operator-
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax moccasin moccasin 0.3 bandmax moccasin moccasin 0.35 bandmax aquamarine aquamarine 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_70 docolorscale }
BLD -operator-
BLD { 2 1 index type /nametype eq { 1 add 2 index } { 1 index } ifelse type /objecttype eq not { 1 add } if /integrateddistrib2D publicproc: normalizeddistrib2D normalizedtointegrateddistrib2D :publicproc }
BLD -operator-
BLD -operator-
BLD { array? { dup 0 get pointedges0 0 get exch dup length 1 sub get pointedges0 1 get 2 array astore } { pointedges0 } ifelse }
BLD -operator-
BLD { name counttoobject 1 add 1 roll integrateddistrib1D exch cvx exec 1 REORDER firstgrid exch 0.5 firstgrid toS }
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax DarkOrange DarkOrange 0.6 bandmax moccasin moccasin 0.65 bandmax moccasin moccasin 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_35 docolorscale }
BLD { todouble exch todouble exch 1 index .chunksize 1 index .chunksize 1 3 integerarray astore linw0dp TaskStreams 1 get chunksize NewBuffer /fullname /weights def /scale_min -1 def /scale_max 1 def TaskStreams 1 get chunksize NewIntegerBuffer /fullname /indices def }
BLD { (1/365 years since 1960-01-01) unitconvertbyattribute name monthtimename ordered first scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add 1 last scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add dup 3 index sub round cvi 1 add realarray 0 5 2 roll { dup 12 div exch 1 index 12 mul sub exch 16 3 1 roll ensotime 3 copy put pop 1 add } for pop NewGRID nip }
BLD -operator-
BLD -operator-
BLD { 0 /extraZ publicproc: P 0 RECHUNK (Pa) unitconvert todouble dataset a: .hybrid_lev .P Z last VALUE [ X Y ] REORDER (Pa) unitconvert todouble :a: .surface .zg decompress [ X Y ] REORDER todouble :a: .hybrid_lev .ta 128 64 tsptogau Z last VALUE [ X Y ] REORDER todouble :a: .hybrid_lev .P [ Z ] regridLinear [ X Y ] REORDER (Pa) unitconvert todouble :a 5 matchachunk chunksize extrazfn0 TaskStreams 2 get chunksize NewDoubleBuffer nrdim SetStreamIndex* X Y TaskStreams 0 get .achunk pop * /name /extraZ def /fullname [ fullname aload pop pop name ] def /gridparam undef /missing_value -999999.0 def DATAAUTO :publicproc }
BLD { optionalREORDER getmissing_value? not { 0 } if array? { 0 get } if 1 datatypearray astore chunksize swapbytes40 TaskStreams 0 get chunksize NewBuffer }
BLD { exch 5 object exch /datatype /namearraytype def 4 NewSizedBuffer0 /bufferwordsize 4 def NewBufferCheck }
BLD -operator-
BLD -operator-
BLD { dup totype /gridtype eq { 1 array astore } if 2 /sums publicproc: 0 get exch decompress toreal exch { stream gridstream } inputs /grid gridstream ifGRID not { .streamgrids } if def stream grid gridno exch .nrdim gt { stream grid gridstride BufferOrder grid first VALUE 0 mul grid integralgrid beginLoopnohistory stream partialS new exch chunksize store n1 grid gridstride store n2 grid .npts store n3 exch sums1 poplooplevel pop poplooplevel buffer appendTaskToBuffer stream grid gridstride exch pop 1 add BufferOrder } { stream stream grid newpartialS sums0 TaskStreams 0 get TaskParameterBlock n1 n2 1 add mul n3 mul exch pop NewBuffer grid integralgrid name exch def nrdim SetStreamIndex* TaskStreams 0 get .streamgrids TaskStreams 0 get ndim exch grid gridno -1 mul exch pop roll integralgrid TaskStreams 0 get ndim exch grid gridno exch pop roll * } ifelse 1output clearscale :publicproc }
BLD -operator-
BLD { /julian_day unitconvertbyattribute name monthtimename ordered first getscale_factor mul getadd_offset add jd2dmy 1960 sub 12 mul add nip 1 last getscale_factor mul getadd_offset add jd2dmy 1960 sub 12 mul add nip dup 3 index sub round cvi 1 add realarray 0 5 2 roll { 0.5 add 3 copy put pop 1 add } for pop NewGRID nip }
BLD { 4 /cressman: publicproc: cressmanparams cressmanS new 180 store NX -180 store XL 180 store XH 1 store xper 90 store NY -90 store YL 90 store YH 3 store IR 4.0 store R1 2.5 store R2 1.5 store R3 -1 store NV }
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax moccasin moccasin 0.25 bandmax moccasin moccasin 0.3 bandmax DeepSkyBlue DeepSkyBlue 0.35 bandmax aquamarine aquamarine 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_75 docolorscale }
BLD -operator-
BLD { streamrescale toi4 chunksize juliandaytoYmd0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /name /date def /fullname /date def /units (day as %Y%m%d) preferredunitname def }
BLD -operator-
BLD { dup type /stringtype eq { pop } if dup type /arraytype eq { dup length 3 eq { datanband.lan } { data1band.lan } ifelse } { data1band.lan } ifelse }
BLD -operator-
BLD { 3 /bluered20colorscale publicproc: 3 -1 roll startcolormap /maxncolor 24 def DATA 5 -2 roll RANGE transparent 0 0 110 RGB 0 0 130 RGB 20 20 170 RGB 70 70 190 RGB 90 90 200 RGB 110 110 210 RGB 130 130 220 RGB 150 150 230 RGB 170 170 240 RGB 210 210 255 RGB white white 255 210 210 RGB 242 170 170 RGB 230 150 150 RGB 210 110 110 RGB 190 70 70 RGB 180 45 45 RGB 170 20 20 RGB 150 10 10 RGB 130 0 0 RGB 110 0 0 RGB endcolormap :publicproc }
BLD -operator-
BLD -operator-
BLD OpenGL
BLD -operator-
BLD { dup type /stringtype eq { 0.0 } if 4 /seasonalMax publicproc: { data Tgrid season_length minfrac } inputs data Tgrid season_length VALUES dup Tgrid .name get /Tin renameGRID Tin .get_bounds I_bounds /I_boundsin renameGRID Tgrid season_length seasonaledgesgrid partialgrid .get_bounds 1 index I_boundsin first VALUE I_boundsin removeGRID 1 index I_bounds first VALUE flagge 2 index I_boundsin first VALUE I_boundsin removeGRID 2 index I_bounds last VALUE flagle mul 2 index I_boundsin last VALUE I_boundsin removeGRID 2 index I_bounds first VALUE flagge 4 -2 roll exch I_boundsin last VALUE I_boundsin removeGRID exch I_bounds last VALUE flagle mul add 1.0 masklt 0.0 mul 1.0 add 2 copy exch dataflag mul [ Tin ] average minfrac masklt 3 -2 roll mul [ Tin ] maxover exch mul dup Tgrid .name get season_length ( - ) search { nip nip } if VALUES /fullname data .fullname def 1output :publicproc }
BLD -operator-
BLD { dup surfaceaverage exch 1 index subvssq surfaceaverage sqrt }
BLD { 2 index type /objecttype eq { missing_value } if dup null eq { pop -1 } if 4 /SCALEtoui1 publicproc: { mystream myscale myoffset mymissing_value } inputs mystream decompress SCALEtoui1types 1 index .datatype get exec TaskStreams 0 get TaskParameterBlock .npts NewI1Buffer /scale_factor 2 index .myscale def /add_offset 2 index .myoffset def TaskParameterBlock .mv 0 ge { /missing_value TaskParameterBlock .mv def } if /valid_min TaskParameterBlock .vmin def /valid_max TaskParameterBlock .vmax def /scale_min TaskParameterBlock .vmin def /scale_max TaskParameterBlock .vmax def 1output :publicproc }
unnamed STREAM
BLD { exch X Y 2 dup 1 add index /Z known { Z exch 1 add } if dup 1 add index /T known { T exch 1 add } if REORDER 2 RECHUNK missing_value ifNaN { -99999 replaceNaN /missing_value -99999 def } if exch initGrADS chunksize exch 0 3 integerarray astore writegrads0 }
BLD { 3 /green10colorscale publicproc: 3 -1 roll startcolormap /maxncolor 13 def DATA 5 -2 roll RANGE transparent white 210 255 215 RGB 170 242 175 RGB 150 230 155 RGB 110 210 115 RGB 70 190 75 RGB 45 180 50 RGB 20 170 25 RGB 10 150 15 RGB 0 130 5 RGB 0 110 4 RGB 0 50 0 RGB endcolormap :publicproc }
BLD { 2 /stepdarktolightgreyscale publicproc: 3 add /maxncolor Graphics .ColorMapOutside ! startcolormap Graphics .ColorMapOutside /maxncolor get /maxncolor exch def transparent 79 79 79 RGB RGBdup LightGrey maxncolor 3 sub steps RGBdup endcolormap /maxncolor undef Graphics .ColorMapOutside /maxncolor undef pop :publicproc }
BLD -operator-
BLD { dup totype /streamtype eq { 0.0 } if 2 /oldpentadAverage publicproc: exch decompress exch exch T (days since 1960-01-01) streamgridunitconvert exch missing_value null eq { pop oldpentadAverage0 } { exch dup 0 replaceNaN oldpentadAverage0 exch dataflag oldpentadAverage0 3 -1 roll normalize } ifelse :publicproc }
BLD -operator-
BLD -operator-
BLD { chunksize chunksub0 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length /- combinefullname TaskStreams 0 get TaskStreams 1 get /unitsub binopunits def }
BLD { dup type /nametype eq { 1 index } { dup } ifelse type /objecttype eq { 2 1 index type /nametype eq { 1 add } if /distrib2D publicproc: dup type /nametype eq not { /edges } if { A myB edgemode } inputs /dogrid false def } { 3 1 index type /nametype eq { 1 add } if /distrib2D publicproc: dup type /nametype eq not { /edges } if { A myB thegrid edgemode } inputs /thegrid thegrid 0 get def /dogrid true def } ifelse /A A toNaN def /myB myB toNaN name A .name eq { /name name cvntos (2) append cvn def } if def /Alo A .CS 1.0 mul def /Ahi A .CE 1.0 mul def edgemode /edges eq { /Alo Alo A .CI 0.5 mul add def /Ahi Ahi A .CI 0.5 mul sub def } if /Blo myB .CS 1.0 mul def /Bhi myB .CE 1.0 mul def edgemode /edges eq { /Blo Blo myB .CI 0.5 mul add def /Bhi Bhi myB .CI 0.5 mul sub def } if /NA Ahi Alo sub A .CI div round cvi 1 add def /NB Bhi Blo sub myB .CI div round cvi 1 add def A 1 index .myB A .chunk REORDER copyachunk Alo cvreal exch Ahi cvreal exch Blo cvreal Bhi cvreal dogrid { A thegrid gridno exch .nrdim gt { A thegrid gridno exch .ndim ne { (not written for grid outside chunk not ndim) print error } if A .chunksize A thegrid gridstride nip thegrid .npts NA NB 5 integerarray astore distrib2D0 STREAM TaskParameterBlock 3 get TaskParameterBlock 4 get mul } { A thegrid n1n2n3 NA NB 5 integerarray astore distrib2D1 STREAM TaskParameterBlock 1 get TaskParameterBlock 3 get mul TaskParameterBlock 4 get mul } ifelse } { A .chunksize A .nchunk 1 NA NB 5 integerarray astore distrib2D0 STREAM TaskParameterBlock 3 get TaskParameterBlock 4 get mul } ifelse NewBuffer A .name dup /unitless ordered Alo Ahi Alo sub NA 1 sub div Ahi NewEvenGRID def myB .name dup /unitless ordered Blo Bhi Blo sub NB 1 sub div Bhi NewEvenGRID def dogrid { thegrid name exch def A thegrid gridno exch .nrdim gt { 2 } { 3 } ifelse SetStreamIndex* A .name cvx exec myB .name cvx exec A thegrid gridno exch .nrdim le { thegrid } if A .achunk pop * } { 2 SetStreamIndex* A .name cvx exec myB .name cvx exec A .achunk pop * } ifelse dogrid { A .achunk array astore { gridid thegrid .gridid ne { last VALUE } { pop } ifelse } forall achunk array astore { gridid thegrid .gridid ne { removeGRID } { pop } ifelse } forall } { A .achunk array astore { last VALUE } forall achunk array astore { removeGRID } forall } ifelse defivars /name /counts def /fullname [ /counts [ A .name (,) myB .name ] ] def [ (Distribution over) [ A .streamgrids ] { dogrid { name thegrid .name eq } { false } ifelse { pop } { ( ) exch name cvntos exch ([) exch npts 1 eq { first } { [ lowedge highedge ] } ifelse cvsunits nip (]) } ifelse } forall ] concat addhistory 1output :publicproc }
BLD -operator-
BLD -operator-
BLD { 3 /brown16colorscale publicproc: 3 -1 roll startcolormap /maxncolor 19 def DATA 5 -2 roll RANGE transparent white 250 235 230 RGB 245 225 220 RGB 240 215 210 RGB 230 200 190 RGB 220 185 175 RGB 212 172 162 RGB 200 160 150 RGB 190 150 140 RGB 180 140 130 RGB 170 130 120 RGB 160 120 110 RGB 150 110 100 RGB 140 100 90 RGB 130 90 80 RGB 120 80 70 RGB 110 70 60 RGB 100 60 50 RGB endcolormap :publicproc }
BLD { crayS new 2 index .name crayopen store crayid chunksize store nreal NSKP store nskp 1 store nfskp ndim nrdim sub 1 eq { achunk pop 0 RECHUNK } { nchunk NewIntegerGRID 0 RECHUNK } ifelse exch crayread0 TaskParameterBlock .chunksize NewDoubleBuffer }
BLD { array astore STREAM .MATCHdict exch /thestreams exch def /thegrids thestreams 0 get SIRecord pop .nptgrids def /possiblegrids null thegrids length object thegrids { name exch def } forall def thestreams { possiblegrids { pop 2 copy known { pop } { possiblegrids exch undef pop } ifelse } forall pop } forall [ thegrids { name possiblegrids exch known not { pop } if } forall ] maybeshorten /newchunk exch def .thestreams aload length STREAM .MATCHdict .newchunk aload length }
BLD { T exch name exch units exch fullname exch dup /long_name getknown not { null } if exch T pentadedgesgrid exch T integral T 3 -1 roll REGRID T .last 6 index step 0.5 mul last add nip gt { T first secondtolast RANGE } { 5 index last step 0.5 mul add cvsunits nip (Data ends ) exch append addhistory } ifelse T partial T dup pentadtimegrid replaceGRID exch dup null eq { pop } { /long_name exch def } ifelse exch /fullname exch /pentad exch 2 array astore def exch /units exch def exch /name exch def nip }
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax moccasin moccasin 0.2 bandmax moccasin moccasin 0.25 bandmax CornflowerBlue CornflowerBlue 0.3 bandmax DeepSkyBlue DeepSkyBlue 0.35 bandmax aquamarine aquamarine 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_80 docolorscale }
BLD -operator-
BLD { 2 /differential_mul publicproc: dup integralgrid dup differences streamgrids 2 index SAMPLE 1 index .name cvx exec 3 -1 roll 1 index .gridid 1 index .gridid ne pop true { replaceGRIDstream } { pop pop } ifelse 1 index .datatype /doublearraytype eq { todouble } { toreal } ifelse /fullname (d) name cvntos append def mul :publicproc }
BLD { /mean0 (mean) apply1get1 }
BLD { { 1 /sstacolorscale publicproc: startcolormap -4.1999998 4.1999998 RANGE transparent gray navy -4.1999998 value blue -2 value DeepSkyBlue -0.6 value SkyBlue -0.1 value aquamarine dup 0.1 value LawnGreen yellow 0.25 value DarkOrange 1.0 value red 2.0 value DarkRed 4.0 value DarkRed 4.1999998 value brown endcolormap :publicproc } /sstacolorscale docolorscale }
BLD { chunksize dupmulsubsqrt0 TaskStreams 0 get chunksize NewBuffer /missing_value NaN def }
BLD { dup /monthtime unitconvertbyattribute name (pentads since 1960-01-01) ordered currentobject a: .truefirst :a: .truelast :a 2 { exch rm19602ymd exch 1 sub dm2pentad exch 1960 sub 73 mul add } repeat 1 add 1 exch NewEvenGRID /pointwidth 0 def nip 1 index a: .units :a: .get_calendar :a gridunitconvert nip }
BLD { exch 5 object exch /datatype /doublearraytype def /bufferwordsize 8 def 8 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD { 1 /finishyear publicproc: T name units gridtype last dup 1 add exch 12.0 div ceiling 12 mul 2 copy lt { 0.5 sub step exch NewEvenGRID nip 0 mul /name /zero def 1 add /missing_value 1.0 def toNaN defivars appendstream } { pop pop pop pop pop pop } ifelse :publicproc }
BLD -operator-
BLD { 0 3 object /* { NewStreamPtr exch pop /SIRecord exch def /bufferSIRecord SIRecord def defivars fixstream } def /NewStreamPtr -operator- def /start* { exch mark } def start* }
BLD 0 11 object /doublearraytype { chunksize doubletoi20 TaskStreams 0 get chunksize NewShortBuffer } def /realtype { chunksize realtoi20 TaskStreams 0 get chunksize NewShortBuffer } def /shortarraytype { } def /realarraytype { chunksize realtoi20 TaskStreams 0 get chunksize NewShortBuffer } def /stringtype { chunksize stringtoi20 TaskStreams 0 get chunksize NewShortBuffer /bufferwordsize STREAM 1 index get def } def /integerarraytype { chunksize integertoi20 TaskStreams 0 get chunksize NewShortBuffer } def
BLD { counttoobject 3 eq { 0.0 } if 6 /wasp publicproc: { myprecip myTgrid climStart climEnd waspN minfrac } inputs myprecip dup myTgrid climStart climEnd RANGE yearly-climatology exch 1 index sub dup myTgrid 12 splitstreamgrid myTgrid .name cvntos (2) append interp 1 array astore stddev div -Infinity Infinity masknotrange exch dup dup myTgrid .name get 1 array astore sum div -Infinity Infinity masknotrange mul dup myTgrid .name get waspN minfrac runningAverage waspN mul dup dup myTgrid .name get 12 splitstreamgrid myTgrid .name cvntos (2) append interp 1 array astore stddev div -Infinity Infinity masknotrange std_wasp_colors /name (wasp) waspN s== append cvn def /long_name (Weighted Anomaly Standardized Precipitation) def /fullname [ (wasp) waspN s== append cvn myprecip .fullname ] def 1output :publicproc }
BLD CaseListpops3 /realarraytype { fftrcsp } def /complexdoublearraytype { 2 index .Compression NoCompression eq { fftccdp } { 2 index .Compression .compressiontype /Hermitian eq { 2 index .Compression .grids 2 index .name eq { fftcrdp } { fftccdp } ifelse } { fftccdp } ifelse } ifelse } def /doublearraytype { fftrcdp } def /complexarraytype { 2 index .Compression NoCompression eq { fftccsp } { 2 index .Compression .compressiontype /Hermitian eq { 2 index .Compression .grids 2 index .name eq { fftcrsp } { fftccsp } ifelse } { fftccsp } ifelse } ifelse } def
BLD 0 17 object /365 { seasonaledgesgrid365 } def /standard { seasonaledgesgridjd } def /GREGORIAN { seasonaledgesgridjd } def /NOLEAP { seasonaledgesgrid365 } def /noleap { seasonaledgesgrid365 } def /360 { seasonaledgesgrid360 } def /gregorian { seasonaledgesgridjd } def /proleptic_gregorian { seasonaledgesgridjd } def /360_day { seasonaledgesgrid360 } def /365_day { seasonaledgesgrid365 } def
BLD { exch 5 object exch /datatype /integerarraytype def /bufferwordsize 4 def 4 NewSizedBuffer0 NewBufferCheck }
BLD { exch todouble exch todouble chunksize chunklnrat0 TaskStreams 0 get chunksize NewDoubleBuffer /fullname TaskStreams aload length /- combinefullname TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits def }
BLD { currentobject /pointwidth known { pointwidth 0.0 eq } { false } ifelse { (days since 1960-01-01) unitconvertbyattribute name (months since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset daytimeoffset add add rjt2ymd ymd2rm1960 } forall counttomark realarray astore nip NewGRID /calendar /360 def /pointwidth 0 def 1 index /standard_name getknown { /standard_name exch def } if } { integralgrid (days since 1960-01-01) unitconvertbyattribute name (months since 1960-01-01) gridtype mark gridvalues { scale_factor mul add_offset daytimeoffset add add rjt2ymd ymd2rm1960 } forall counttomark realarray astore nip NewGRID /calendar /360 def /pointwidth 0 def partialgrid 1 index /standard_name getknown { /standard_name exch def } if } ifelse nip }
BLD -operator-
BLD { pop .npts exch 1 RECHUNK exch eigrs0 TaskStreams 0 get TaskParameterBlock NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock NewDoubleBuffer /Compression Compression parent def /ev TaskParameterBlock NewIntegerGRID name exch def 1 SetStreamIndex* ev TaskStreams 0 get .achunk pop * /name /eval def /fullname [ name fullname ] def }
BLD { TaskS 1 object /pointer { bufferS begin fillerp end } def }
BLD null
BLD { currentobject /valid_min known { valid_min } { null } ifelse }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax moccasin moccasin 0.15 bandmax moccasin moccasin 0.2 bandmax RoyalBlue RoyalBlue 0.25 bandmax CornflowerBlue CornflowerBlue 0.3 bandmax DeepSkyBlue DeepSkyBlue 0.35 bandmax aquamarine aquamarine 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_85 docolorscale }
BLD 0 53 object /scaleoffsetmonthtime { getscale_factor mul 43200 mul round 43200 div getadd_offset 43200 mul round 43200 div add } def /degreeN { { dup ifnotNaN { dup abs roundi s== exch dup 0 eq { pop } { 0 lt { (S) } { (N) } ifelse append } ifelse } { pop () } ifelse } applycvsunitsfn } def /totimetuplem1960 { dup null eq { null null null } { totimepairm1960 rm19602ymd 4 -1 roll } ifelse } def /stepmonths { currentobject /pointwidth known { pointwidth 1 gt } { false } ifelse { pointwidth 2.0 div 0.5 sub scale_factor div 2 copy sub monthunits (-) 4 2 roll add monthunits 2 index 1 index eq { pop pop } { 3array astore concat } ifelse step scale_factor mul 11.999 gt { dup (Jan-Dec) eq { pop null } if } if } { monthunits } ifelse } def /calendar360 { array? { dup length 2 gt { dup 0 get exch dup length 1 sub get 2 array astore } if } { forcezerowidth? { dup 2 array astore } { valuetointerval } ifelse } ifelse { totimetuplem1960 } forall timetuplepair astore pop get_modulus? { getscale_factor mul 12.0 sub abs 0.001 lt { firsttimetuple 0 get null eq { secondtimetuple 0 null put } { secondtimetuple 0 get null eq { firsttimetuple 0 null put } { secondtimetuple 0 secondtimetuple 0 get firsttimetuple 0 get eq { null } { (1) } ifelse put firsttimetuple 0 null put } ifelse } ifelse } if } if { convert0000to2400m1960 } displaydayinterval } def /degree_east { { scale_factor mul get_modulus null ne { 2 { dup 180 gt { 360 sub } if } repeat dup -180 lt { 360 add } if } if dup abs roundi s== exch dup 0 eq 1 index 180 eq or { pop } { 0 lt { (W) } { (E) } ifelse append } ifelse } applycvsunitsfn } def /timepairadjust { 1 index 1.0 ge { exch 1.0 sub exch 1.0 add } if } def /secondtimetuple [ null null null null ] def /timetpbyN { timetpNs exch get exec } def /latitude { { dup ifnotNaN { dup abs roundi s== exch dup 0 eq { pop } { 0 lt { (S) } { (N) } ifelse append } ifelse } { pop () } ifelse } applycvsunitsfn } def /datelargeintervaldelim ( - ) def /julian_day1 { getadd_offset dup floor sub add ceilinground getadd_offset floor add rjt2ymd s== ( ) append exch 1 sub montharray exch get cvntos append ( ) append exch 0 1 index le 1000 2 index gt and { s== (0000) 0 4 3 index length sub getinterval exch 3array astore concat } { s== append } ifelse } def /calendar365 { array? { dup length 2 gt { dup 0 get exch dup length 1 sub get 2 array astore } if } { forcezerowidth? { dup 2 array astore } { valuetointerval } ifelse } ifelse { totimetuplec365 } forall timetuplepair astore pop get_modulus? { getscale_factor mul 12.0 eq { firsttimetuple 0 get null eq { secondtimetuple 0 null put } { secondtimetuple 0 get null eq { firsttimetuple 0 null put } { secondtimetuple 0 secondtimetuple 0 get firsttimetuple 0 get eq { null } { (1) } ifelse put firsttimetuple 0 null put } ifelse } ifelse } if } if { convert0000to2400c365 } displaydayinterval } def /julian_day.day { getscale_factor mul getadd_offset add rjt2ymd s== nip nip } def /totimepairm1960 { 30.0 mul getscale_factor mul getadd_offset 30 mul dup floor sub add dup dup floor sub exch floor getadd_offset 30 mul floor add 30.0 div exch 43200 mul round 43200 div exch 1 index 1.0 eq { nip 0.0 exch 1.0 30.0 div add } if 1 index 4.99999987E-05 lt { nip 0.0 exch } if } def /timetpmonth { 1 get 1 sub montharray exch get cvntos } def /totimetuplejd { dup null eq { null null null } { totimepairjd timepairadjust rjt2ymd 4 -1 roll } ifelse } def /yearsub { scaleoffsetmonthtime addmonthshift pointwidth 0.5 mul add 6.4990001 sub 12 div round cvi 1960 add dup 0 lt { s== dup length 4 lt { ( ) 0 4 3 index length sub getinterval exch append } if } { s== dup length 4 lt { (0000) 0 4 3 index length sub getinterval exch append } if } ifelse } def /displaydayinterval { firsttimetuple 1 get null eq { secondtimetuple 1 index exec pop mark 3 -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch secondtimetuple exch timetpbyN dup datedelim eq { pop } if } for counttomark -1 roll pop tpconcat } { secondtimetuple 1 get null eq { mark 3 -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch firsttimetuple exch timetpbyN dup datedelim eq { pop } if } for counttomark -1 roll pop tpconcat } { 3 firsttimetuple 3 get 0 eq secondtimetuple 3 get 0 eq and { 1 sub firsttimetuple 2 get 1 eq secondtimetuple 2 get 1 eq and { 1 sub firsttimetuple 1 get 1 eq secondtimetuple 1 get 1 eq and { 1 sub } if } if } if 0 null { firsttimetuple 1 index get secondtimetuple 2 index get eq { 1 add dup 4 eq { leave } if } { leave } ifelse } repeat dup 4 lt { pop secondtimetuple 2 index exec pop 0 null { firsttimetuple 1 index get secondtimetuple 2 index get eq { 1 add dup 4 eq { leave } if } { leave } ifelse } repeat exch true secondtimetuple 0 3 index 1 add getinterval 0 exch { firsttimetuple 2 index get eq { 1 add } { nip false exch leave } ifelse } forall pop { [ 1 index -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch firsttimetuple exch timetpbyN dup datedelim eq { pop } if } for dup mark eq { pop (Jan-Dec) } { counttomark -1 roll pop tpconcat } ifelse } { 2 copy eq { [ firsttimetuple 2 index timetpbyN dateintervaldelim secondtimetuple counttomark 2 add index timetpbyN counttomark 2 add index 1 sub -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch firsttimetuple exch timetpbyN dup datedelim eq { pop } if } for tpconcat } { [ 1 index -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch firsttimetuple exch timetpbyN } for counttomark -1 roll pop datelargeintervaldelim counttomark 1 add index -1 0 { 1 index datelargeintervaldelim ne { dup 2 eq { datetimedelim } { datedelim } ifelse exch } if secondtimetuple exch timetpbyN dup datedelim eq { pop } if } for tpconcat } ifelse } ifelse nip nip } { nip mark exch 1 sub -1 0 { dup 2 eq { datetimedelim } { datedelim } ifelse exch firsttimetuple exch timetpbyN } for counttomark -1 roll pop dup datedelim eq { pop } if tpconcat } ifelse } ifelse } ifelse nip } def /real { array? { dup 0 get onecharacter exch ( - ) exch 1 get onecharacter 3array astore concat } { onecharacter } ifelse } def /ID { { dup type /stringtype eq { dup length 1 eq { 0 get true } { false } ifelse } { dup type /nametype ne } ifelse { roundi currentobject /CLIST known { scale_min sub cvi CLIST exch 1 index length 1 index gt { dup 0 ge { get cvntos } { pop pop () } ifelse } { pop pop () } ifelse } { s== } ifelse } { cvntos } ifelse } applycvsunitsfn } def /uri { { cvntos geoobject /long_name getknown not { () } if } applycvsunitsfn } def /cvsunitsdef { /applycvsunitsfn cvx 2 array astore cvx def } def /convert0000to2400jd { dup 3 get 0 eq { aload exch pop 1.0 5 2 roll ymd2rjt 1 sub rjt2ymd 4 -1 roll 5 -1 roll astore } if } def /longitude { { scale_factor mul get_modulus null ne { 2 { dup 180 gt { 360 sub } if } repeat dup -180 lt { 360 add } if } if dup abs roundi s== exch dup 0 eq 1 index 180 eq or { pop } { 0 lt { (W) } { (E) } ifelse append } ifelse } applycvsunitsfn } def /timetphours { 3 get 24 mul dup cvi exch 1 index sub 60 mul cvi exch s== dup length 1 eq { (0) exch 3 -1 roll } { exch } ifelse s== dup length 1 eq { (0) exch } if } def /monthtime { get_calendar /360 eq { calendar360 } { calendar365 } ifelse } def (True Julian Day)cvn { julian_day } def /julian_day.month { getscale_factor mul getadd_offset add rjt2ymd pop 1 sub montharray exch get cvntos nip } def /julian_day { array? { dup length 2 gt { dup 0 get exch dup length 1 sub get 2 array astore } if } { forcezerowidth? { dup 2 array astore } { valuetointerval } ifelse } ifelse { totimetuplejd } forall timetuplepair astore pop { convert0000to2400jd } displaydayinterval } def /integer { getscale_factor mul getadd_offset add dup type /realtype eq { roundi } if s== } def /timetuplepair [ null null null null null null null null ] def /applycvsunitsproc [ null ] def /convert0000to2400c365 { dup 3 get 0 eq { aload exch pop 1.0 5 2 roll 2 index type /integertype ne { 3 -1 roll pop null 3 1 roll 1962 3 1 roll ymd2d365c 1 sub d365c2ymd 3 -1 roll pop } { ymd2d365c 1 sub d365c2ymd } ifelse 4 -1 roll 5 -1 roll astore } if } def /totimepairc365 { getscale_factor mul getadd_offset add 365.0 12.0 div 180 mul mul round 180 div dup floor exch 1 index sub exch } def /2array [ null null ] def /montharray [ /Jan /Feb /Mar /Apr /May /Jun /Jul /Aug /Sep /Oct /Nov /Dec ] def /totimepairjd { getscale_factor mul getadd_offset dup floor sub add dup dup floor sub 0.5 add exch floor getadd_offset floor add } def /ids { { dup type /stringtype eq { dup length 1 eq { 0 get true } { false } ifelse } { dup type /nametype ne } ifelse { roundi currentobject /CLIST known { scale_min sub cvi CLIST exch 1 index length 1 index gt { dup 0 ge { get cvntos } { pop pop () } ifelse } { pop pop () } ifelse } { s== } ifelse } { cvntos } ifelse } applycvsunitsfn } def /timetpNs 0 5 object 0 { timetpyear } def 1 { timetpmonth } def 2 { timetpday } def 3 { timetphours } def def /character { array? { dup 0 get onecharacter exch ( - ) exch 1 get onecharacter 3array astore concat } { onecharacter } ifelse } def /datetimedelim ( ) def /julian_day.year { getscale_factor mul getadd_offset add rjt2ymd pop pop s== } def /monthtime0noyear { { currentobject /pointwidth known { pointwidth 1.5 gt { true } { pointwidth 0.9999 ge { dup scale_factor mul dup floor sub getadd_offset dup floor sub add addmonthshift dup 0 lt { 1 add exch 1 sub exch } if dup 1 gt { 1 sub exch 1 add exch } if submonthcheck } { false } ifelse } ifelse } { false } ifelse { dup stepmonths dup null eq { pop year } { nip } ifelse } { [ exch dup scale_factor mul get_calendar /360 eq { getadd_offset dup floor sub add dup floor sub addmonthshift dup 0.0 lt { 1.0 add } if 30.0 mul currentobject /pointwidth known { currentobject .pointwidth scale_factor mul 30 mul 1 lt { [ 1 index dup cvi sub 24 mul dup cvi exch 1 index sub 60 mul cvi exch s== dup length 1 eq { (0) exch 3 -1 roll } { exch } ifelse s== dup length 1 eq { (0) exch } if ( ) ] concat 3 1 roll } if } if cvi 1 add s== exch ( ) exch dup monthunits exch pop } { 12.0 div getadd_offset 12.0 div dup floor sub add 9.99999997E-07 add dup floor sub pointwidth 0.0 gt { monthshift 12 div add } if dup 0.0 lt { 1.0 add } if dup 12.0 mul cvi exch 365.0 mul cvi monthoffsets 2 index get 1 index gt { exch 1 sub exch } if monthoffsets 2 index 1 add get 1 index le { exch 1 add exch } if monthoffsets 2 index get sub 1 add s== exch ( ) exch montharray exch cvi get cvntos 4 -1 roll pop } ifelse ] concat } ifelse } applycvsunitsfn } def /firsttimetuple [ null null null null ] def /onecharacter { dup type /nametype eq { cvntos } if dup type /stringtype ne { getscale_factor mul getadd_offset add } if s== } def /degreeE { { scale_factor mul get_modulus null ne { 2 { dup 180 gt { 360 sub } if } repeat dup -180 lt { 360 add } if } if dup abs roundi s== exch dup 0 eq 1 index 180 eq or { pop } { 0 lt { (W) } { (E) } ifelse append } ifelse } applycvsunitsfn } def /addmonthshift { currentobject /pointwidth getknown { exec 0.0 gt { monthshift add } if } { monthshift add } ifelse } def /datedelim ( ) def /daymonth { [ exch dup dup cvi sub 30.0 mul cvi 1 add s== exch monthunits ] concat } def /timetparray [ null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null ] def /dateintervaldelim (-) def /applycvsunitsfn { applycvsunitsproc astore pop array? { dup 0 get applycvsunitsproc 0 get exec exch dup length 1 sub get applycvsunitsproc 0 get exec ( - ) exch 3 array astore concat } { applycvsunitsproc 0 get exec } ifelse } def /monthtime0 { currentobject /pointwidth known { pointwidth 1.5 gt { true } { pointwidth 0.9999 ge { dup scale_factor mul 43200 mul round 43200 div dup floor sub getadd_offset 43200 mul round 43200 div dup floor sub add addmonthshift dup 0 lt { 1 add exch 1 sub exch } if dup 1 gt { 1 sub exch 1 add exch } if submonthcheck } { false } ifelse } ifelse } { false } ifelse { dup stepmonths dup null eq { pop year } { exch yearsub ( ) exch 3array astore concat } ifelse } { [ exch dup scale_factor mul get_calendar /360 eq { 43200 mul round 43200 div getadd_offset 43200 mul round 43200 div dup floor sub add dup floor sub addmonthshift dup 0.0 lt { 1.0 add } if 30.0 mul currentobject /pointwidth known { currentobject .pointwidth scale_factor mul 30 mul 1 lt { [ 1 index dup cvi sub 24 mul dup cvi exch 1 index sub 60 mul cvi exch s== dup length 1 eq { (0) exch 3 -1 roll } { exch } ifelse s== dup length 1 eq { (0) exch } if ( ) ] concat 3 1 roll } if } if cvi 1 add s== exch ( ) exch dup monthunits exch ( ) exch year } { 12.0 div getadd_offset 12.0 div dup floor sub add 9.99999997E-07 add dup floor sub pointwidth 0.0 gt { monthshift 12 div add } if dup 0.0 lt { 1.0 add } if dup 12.0 mul cvi exch 365.0 mul cvi monthoffsets 2 index get 1 index gt { exch 1 sub exch } if monthoffsets 2 index 1 add get 1 index le { exch 1 add exch } if monthoffsets 2 index get sub 1 add s== exch ( ) exch montharray exch cvi get cvntos ( ) 5 -1 roll year } ifelse ] concat } ifelse } def /valuetointerval { pointedges } def /stepmonths2 { currentobject /pointwidth known { pointwidth 12 mul 1 gt } { false } ifelse { pointwidth 12 mul 2.0 div 0.5 sub scale_factor div 2 copy sub monthunits (-) 4 2 roll add monthunits 2 index 1 index eq { pop pop } { 3array astore concat } ifelse } { monthunits } ifelse } def /monthshift 0 def /tpconcat { timetparray 0 counttomark 2 sub getinterval astore concat nip } def /degree_north { { dup ifnotNaN { dup abs roundi s== exch dup 0 eq { pop } { 0 lt { (S) } { (N) } ifelse append } ifelse } { pop () } ifelse } applycvsunitsfn } def /forcezerowidth? false def /convert0000to2400m1960 { dup 3 get 0 eq { aload exch pop 1.0 5 2 roll 1 sub dup 0 eq { pop 1 sub dup 0 eq { pop dup type /integertype eq { 1 sub dup 0 eq { 1 sub } if } { pop null } ifelse 12 } if 30 } if 4 -1 roll 5 -1 roll astore } if } def /monthunits { scaleoffsetmonthtime addmonthshift floor cvi 12 mod dup 0 lt { exch 1 add exch } if montharray exch get cvx cvntos } def /julian_day0 { scale_factor mul currentobject /step known { step scale_factor mul } { 0.0 } ifelse 1.0 lt { dup getadd_offset dup floor sub add dup ceilinground sub 24 mul 12 add dup cvi dup 10 lt { s== (0) exch append } { s== } ifelse exch dup cvi sub 60 mul round cvi dup 10 lt { s== (0) exch append } { dup 60 eq { pop interp 1 add dup 10 ge { s== } { s== (0) exch append } ifelse (00) } { s== } ifelse } ifelse append ( ) append } { () } ifelse exch julian_day1 append } def /timetpyear { 0 get dup 0 eq 1 index type /integertype eq not or { pop } { dup 0 lt { -1 mul s== dup length 4 lt { (0000) 0 4 3 index length sub getinterval exch append } if (BC) append } { s== dup length 4 lt { (0000) 0 4 3 index length sub getinterval exch append } if } ifelse } ifelse } def /totimetuplec365 { dup null eq { null null null } { totimepairc365 d365c2ymd 4 -1 roll } ifelse } def /timetpday { 2 get s== } def /submonthcheck { dup 0.4 gt exch 0.6 lt and } def (months since 1960-01-01)cvn { showunitsdict exch date exch pop } def /month { showunitsdict exch date exch pop } def /months { showunitsdict exch date exch pop } def /year { showunitsdict exch date exch pop } def /date { showunitsdict exch date exch pop } def
BLD { 1 /sstawhitebandcolorscale publicproc: startcolormap -4.1999998 4.1999998 RANGE transparent gray navy -4.1999998 value blue -2 value DeepSkyBlue -0.6 value DeepSkyBlue -0.5 bandmax white white 0.5 bandmax yellow DarkOrange 1.0 value red 2.0 value DarkRed 4.0 value DarkRed 4.1999998 value brown endcolormap :publicproc }
BLD { 3 index totype /arraytype eq { 4 index totype /arraytype eq { 8 /cca publicproc: { predictor leftvar rightvar weights weights2 Tgrid pm qm } inputs leftvar rightvar weights weights2 Tgrid pm qm } { 7 /cca publicproc: { predictor leftvar rightvar weights Tgrid pm qm } inputs leftvar rightvar weights Tgrid pm qm } ifelse } { 6 /cca publicproc: { predictor leftvar rightvar Tgrid pm qm } inputs leftvar rightvar Tgrid pm qm } ifelse cca exch dup /weights getknown { leftvar exch 1 index } { leftvar dup } ifelse Tgrid REORDER achunk array astore nip /Sgrids1 exch def Sgrids1 Tgrid svd ev 1 pm RANGE Ss exch .sv div ev /p renameGRID predictor mul Sgrids1 average r mul [ p ] sum mu mul 3 -1 roll .h mul [ ev ] sum /fullname [ /cca_model predictor .fullname ] def /colorscalename undef 1output :publicproc }
BLD { bufferS true store orderlocked pop }
BLD { dup type /arraytype eq { [ 1 index { .name cvntos } forall ] concat cvn 1 2 index { .npts mul } forall } { name npts } ifelse NewIntegerGRID replaceGRIDstream }
BLD { toreal streamrescale chunksize monthtimetoYmd0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /name /date def /units (day as %Y%m%d) preferredunitname def }
BLD { toNaN chunksize chunkmax0 TaskStreams 0 get 1 NewBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * [ (maximum over ) TaskStreams 0 get .chunks== ] concat addhistory }
BLD { randomdata gaussianinv }
BLD { chunk pop { mystream myX myY } inputs mystream averaging_types exch .averaging_type get exec mystream meanpmsd exch toreal exch toreal 2outputs }
BLD { bufferS .fillerp 0 eq { null } { fillerT } ifelse }
BLD { { 1 /prcppercentilescale publicproc: startcolormap DATA 0 1 RANGE transparent black 139 99 89 RGB 0 VALUE RGBdup 0.1 bandmax 224 189 179 RGB RGBdup 0.2 bandmax white white 0.8 bandmax 179 249 169 RGB RGBdup 0.9 bandmax 54 209 59 RGB RGBdup 1.0 bandmax RGBdup endcolormap :publicproc } /prcppercentilescale docolorscale }
BLD { { startcolormap DATA -100 100 RANGEEDGES transparent DarkBrown 119 79 69 RGB RGBdup -75 bandmax 139 99 89 RGB RGBdup -65 bandmax 159 119 109 RGB RGBdup -55 bandmax 179 139 129 RGB RGBdup -47.5 bandmax 199 159 149 RGB RGBdup -42.5 bandmax 224 189 179 RGB RGBdup -33 bandmax gray RGBdup 33 bandmax 179 249 169 RGB RGBdup 42.5 bandmax 149 244 139 RGB RGBdup 47.5 bandmax 119 244 114 RGB RGBdup 55 bandmax 79 239 79 RGB RGBdup 65 bandmax 54 209 59 RGB RGBdup 75 bandmax 34 189 39 RGB RGBdup 100 bandmax DarkGreen endcolormap } /dominanttercileprcpscale docolorscale }
BLD { dup type /stringtype ne { null } if counttoobject 1 add 1 roll optionalREORDER 2 RECHUNK toreal streamrescale 1 index null ne { achunk array astore 3 -1 roll exch codedstringtostream exch } if DataTableS new chunk pop .npts store ny .npts store nx FORTRAN_format store format chunk pop toreal store G2 toreal store G1 exch chunk pop pop toreal copyachunk 1 index .chunk pop exch pop toreal copyachunk 5 -1 roll dup null eq { pop achunk array astore 0 exch { npts 1 gt { exch 1 add } { pop } ifelse } forall dup 0 eq { pop achunk dup 1 eq { pop 0 RECHUNK copyachunk 5 -1 roll 1 index store tunits datatable1 } { { pop } repeat 4 -1 roll datatable0 } ifelse } { dup 1 eq { pop 0 RECHUNK copyachunk 5 -1 roll 1 index store tunits 3 { 3 1 roll datatype /integerarraytype eq { toreal } if } repeat datatable1 } { { pop } repeat 4 -1 roll 2 { exch toreal } repeat datatable0 } ifelse } ifelse } { 5 -1 roll 1 index .bufferwordsize store tunits datatable2 } ifelse DoTasks }
BLD { 1 /monthtimetod365c publicproc: dup /pointwidth getknown { 0 eq } { false } ifelse { /monthtime unitconvert toreal streamrescale chunksize monthtimetod365c0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /units (days since 1960-01-01) preferredunitname def /scale_factor 1.0 def /add_offset 0.0 def /calendar /365 def } { .get_bounds monthtimetod365c fullname 1 index 1 gridbyno 1 array astore average exch /fullname exch def /bounds 3 -1 roll def } ifelse :publicproc }
BLD { currentobject /scale_max known { currentobject toNaN .scale_max } { null } ifelse }
BLD { todoubleorcomplexdoublefilters datatype get exec }
BLD { get_calendar monthlyedgesversions exch get exec }
BLD { 0 /extraT publicproc: P 0 RECHUNK (Pa) unitconvert todouble dataset a: .hybrid_lev .P Z last VALUE [ X Y ] REORDER (Pa) unitconvert todouble :a: .surface .zg decompress [ X Y ] REORDER todouble :a: .hybrid_lev .ta 128 64 tsptogau Z last VALUE [ X Y ] REORDER todouble :a: .hybrid_lev .P [ Z ] regridLinear [ X Y ] REORDER (Pa) unitconvert todouble :a 5 matchachunk chunksize extratfn0 TaskStreams 3 get chunksize NewDoubleBuffer nrdim SetStreamIndex* X Y TaskStreams 0 get .achunk pop * /name /extraT def /fullname [ fullname aload pop pop name ] def /gridparam undef :publicproc }
BLD 0 5 object
BLD { name counttoobject 1 add 1 roll integrateddistrib1D exch cvx exec 1 REORDER firstgrid exch [ 0.02 0.98 ] firstgrid toS dup firstgrid second VALUE exch firstgrid first VALUE sub /name /width def }
BLD { { dup monthlyedgesgrid dup partialgrid monthtimegrid } monthlyAverageCache bumpyaverage }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax moccasin moccasin 0.1 bandmax moccasin moccasin 0.15 bandmax blue blue 0.2 bandmax RoyalBlue RoyalBlue 0.25 bandmax CornflowerBlue CornflowerBlue 0.3 bandmax DeepSkyBlue DeepSkyBlue 0.35 bandmax aquamarine aquamarine 0.4 bandmax MediumAquamarine MediumAquamarine 0.45 bandmax ForestGreen ForestGreen 0.5 bandmax LimeGreen LimeGreen 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_90 docolorscale }
BLD { dup totype /gridtype eq { monthtimetod365c_grid } { monthtimetod365c_stream } ifelse }
BLD { dup type /objecttype eq { .npts } { 1 exch { .npts mul } forall } ifelse }
BLD { dup totype /gridtype eq { 3 index totype /gridtype eq { exch dup totype /gridtype eq { .gridvalues } if aload pop invertontogrid nip } { 1 index totype /gridtype eq { exch .gridvalues } if array? { aload pop } if toS1 } ifelse } { toS1 } ifelse }
BLD { toNaN chunksize chunkmin0 TaskStreams 0 get 1 NewBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * [ (minimum over ) TaskStreams 0 get .chunks== ] concat addhistory }
BLD { 1 /prcppercentilescale30 publicproc: startcolormap DATA 0 1 RANGE transparent black 139 99 89 RGB 0 VALUE RGBdup 0.15 bandmax 224 189 179 RGB RGBdup 0.3 bandmax white white 0.7 bandmax 179 249 169 RGB RGBdup 0.85 bandmax 54 209 59 RGB RGBdup 1.0 bandmax RGBdup endcolormap :publicproc }
BLD { getmissing_value .array? { true } { getscale_factor totype /streamtype eq } ifelse { true } { getadd_offset totype /streamtype eq } ifelse { toreal MVtoNaN streamrescaleinNaN } { getscale_factor getadd_offset getmissing_value dup null eq { pop -99999 } if get_valid_min dup null eq { pop unsigned? { 0 } { -32768 } ifelse } if get_valid_max dup null eq { pop unsigned? { 65535 } { 32767 } ifelse } if chunksize toNaNu1S new exch store npts exch store vmax exch store vmin exch store mv exch store ao exch store sf NaN store amv 1 index .unsigned? { sf 1.0 eq ao 0.0 eq and { toNaNu2nsfao0 } { toNaNu20 } ifelse } { sf 1.0 eq ao 0.0 eq and { toNaNi2nsfao0 } { toNaNi20 } ifelse } ifelse TaskStreams 0 get TaskParameterBlock .npts NewRealBuffer getmissing_value null ne TaskParameterBlock .vmin 0 eq TaskParameterBlock .vmax 65535 eq and TaskParameterBlock .vmin -32768 eq TaskParameterBlock .vmax 32767 eq and or not or { /missing_value NaN def } if /valid_min TaskParameterBlock vmin sf mul ao add nip def /valid_max TaskParameterBlock vmax sf mul ao add nip def [ /scale_min /scale_max ] { 2 copy getknownreal { TaskParameterBlock .sf mul TaskParameterBlock .ao add def } { pop } ifelse } forall /scale_factor 1.0 def /add_offset 0.0 def } ifelse }
BLD { currentobject /bounds known { false } { units unitsaredaytype? nip { currentobject /pointwidth getknown { realorintegertype? nip not } { true } ifelse { first last eq { false } { dup monthlyedgesgrid 1 index .npts 1 index .npts eq { 2 copy sub abs mean getrealization 0 get 0.0 eq } { false } ifelse nip } ifelse } { false } ifelse } { false } ifelse } ifelse }
BLD { T exch name exch units exch fullname exch dup /long_name getknown not { null } if exch T monthlyedgesgrid first 2 index .T .firstedge exch sub 0 gt { second last subgrid } if last 2 index .T .lastedge sub 0 gt { first secondtolast subgrid } if exch T integral T 3 -1 roll REGRID T partial T dup monthtimegrid replaceGRID exch dup null eq { pop } { /long_name exch def } ifelse exch /fullname exch /monthly exch 2 array astore def exch /units exch def exch /name exch def nip }
BLD { { startcolormap DATA -100 100 RANGEEDGES transparent navy 0 0 128 RGB RGBdup -75 bandmax 0 0 205 RGB RGBdup -65 bandmax 0 0 255 RGB RGBdup -55 bandmax 0 191 255 RGB RGBdup -47.5 bandmax 135 205 235 RGB RGBdup -42.5 bandmax 173 224 230 RGB RGBdup -33 bandmax gray RGBdup 33 bandmax 255 192 203 RGB RGBdup 42.5 bandmax 255 150 170 RGB RGBdup 47.5 bandmax 255 120 140 RGB RGBdup 55 bandmax 255 0 0 RGB RGBdup 65 bandmax 220 0 0 RGB RGBdup 75 bandmax 150 0 0 RGB RGBdup 100 bandmax DarkRed endcolormap } /dominantterciletempscale docolorscale }
BLD { missing_value dup ifnotNaN exch null ne and { missing_value toNaNtypes8 1 index type get exec } if }
BLD { currentobject /scale_min known { scale_min } { null } ifelse }
BLD 0 11 object /complexdoublearraytype 16 def /namearraytype 4 def /geometrytype 0 def /doublearraytype 8 def /shortarraytype 2 def /complexarraytype 8 def /realarraytype 4 def /stringtype 1 def /integerarraytype 4 def
BLD -operator-
BLD { get_calendar YearCalendars exch known }
BLD { currentobject cvdatatypes exch .datatype get exec }
BLD rotS
BLD 0 17 object /doublearraytype { aload length realarray astore toNaNtypes /realarraytype get exec } def /arraytype { aload length realarray astore toNaNtypes /realarraytype get exec } def /shortarraytype { aload length realarray astore toNaNtypes /realarraytype get exec } def /integerarray { aload length realarray astore toNaNtypes /realarraytype get exec } def /operatortype { pop } def /namearraytype { pop } def /nametype { pop } def /marktype { pop } def /realarraytype { chunksize 1 index length 2 integerarray astore toNaN00 TaskStreams 0 get chunksize NewBuffer /file_missing_value missing_value def /missing_value NaN def } def /booleantype { pop } def /nulltype { pop } def /stringtype { bufferwordsize 1 gt { pop } { toreal toNaNtypes /realtype get exec } if } def /objecttype { pop } def /realtype { 1 realarray astore toNaNtypes /realarraytype get exec } def /integertype { 1.0 mul toNaNtypes /realtype get exec } def
BLD { 0 eq { partialS new 2 index .chunksize store n1 1 store n2 1 store n3 3 1 roll bufferSIRecord SIRecord ne { CopyStream } if 0 RECHUNK copyachunk exch toNaN exch toNaN 3 -1 roll } { 2 copy .nptgrids 0 get 2 copy .name exec gridno exch .nrdim gt { partialS new 3 1 roll pop .chunksize store n1 1 store n2 1 store n3 3 1 roll 0 RECHUNK copyachunk exch toNaN exch toNaN 3 -1 roll } { ndim RECHUNK newpartialS 3 1 roll copyachunk exch toNaN exch toNaN 3 -1 roll } ifelse } ifelse }
BLD -operator-
BLD { 1091109451 set_code_last_modified counttoobject 1 eq { 1.0 } if counttoobject 1 sub realarray astore 3 -1 roll decompress 3 1 roll 3 copy exch [ exch { .name } forall ] exch aload pop counttoobject 1 add /replacebypercentile publicproc: counttoobject 1 add { pop } repeat dup 0 1 index length 1 sub getinterval exch dup length 1 sub get 4 1 roll /percentile /unitless 0 4 -1 roll dup length 0 eq { pop 0 1 5 index { .npts } forall mul 1 sub 1.0 exch div 1.0 NewEvenGRID } { NewGRID } ifelse 3 1 roll exch 1 index decompress aload length REORDER toNaN 2 index copyachunk 1 3 index { .npts mul } forall 4 index .npts 7 -1 roll 2 index mul round 4 index 6 index 0 get gridstride exch .chunksize 1 index div 4 index div 5 integerarray astore percentile0 TaskStreams 0 get TaskParameterBlock 0 get 2 add NewBuffer pop TaskStreams 0 get TaskParameterBlock 0 get 2 add NewBuffer pop TaskStreams 0 get TaskParameterBlock 1 get TaskParameterBlock 3 get mul TaskParameterBlock 4 get mul NewRealBuffer 1 index { .name undef } forall 3 -1 roll name exch def nrdim 1 add 2 index length sub SetStreamIndex* percentile TaskStreams 0 get streamgridarray exch 7 index 0 get gridno 1 sub nip 0 exch getinterval aload pop TaskStreams 0 get streamgridarray exch counttomark 4 add index dup length 1 sub get gridno exch .ndim 1 index sub getinterval aload pop * [ TaskParameterBlock 0 get TaskParameterBlock 2 get 100 mul exch div s== (percentiles computed over) 5 -1 roll { ( ) exch name cvntos exch (:) exch [ first pointedges 0 get last pointedges 1 get ] cvsunits exch pop } forall ( ) counttomark -1 roll (% min data present) ] concat addhistory :publicproc }
BLD { meof meof2 T 3 REORDER todouble T .first L 0 RECHUNK copyachunk yearlymodelsS new meof .npts store m T .npts store nl T .step store dt T .first store Tstart yearlymodel0 STREAM TaskParameterBlock .m dup mul NewDoubleBuffer pop TaskStreams 0 get TaskParameterBlock .m dup mul NewDoubleBuffer nrdim 1 sub SetStreamIndex* TaskStreams 0 get .chunk pop pop TaskStreams 0 get .achunk pop * /name /Ayearly def /fullname [ fullname 0 1 index length 1 sub getinterval aload pop /Yearly ] def }
BLD 0 17 object /realarraytype { aload length doublearray astore toNaNtypes8 /realarraytype get exec } def /arraytype { aload length doublearray astore toNaNtypes8 /realarraytype get exec } def /shortarraytype { aload length doublearray astore toNaNtypes8 /realarraytype get exec } def /integerarray { aload length doublearray astore toNaNtypes8 /realarraytype get exec } def /operatortype { pop } def /namearraytype { pop } def /nametype { pop } def /marktype { pop } def /integertype { 1 doublearray astore toNaNtypes8 /realtype get exec } def /booleantype { pop } def /nulltype { pop } def /stringtype { bufferwordsize 1 gt { pop } { toreal toNaNtypes8 /realtype get exec } if } def /objecttype { pop } def /doublearraytype { chunksize 1 index length 2 integerarray astore toNaN008 TaskStreams 0 get chunksize NewBuffer /file_missing_value missing_value def /missing_value NaN def } def /realtype { 1 doublearray astore toNaNtypes8 /doublearraytype get exec } def
BLD { 0.0 exch integrate }
BLD { exch dup type /objecttype eq { 1 array aload } if exch { stream1 stream2 gridarray Wmin } inputs stream1 totype /streamtype eq { /stream1 stream1 decompress def } if stream2 dup 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridAverage0v0 } forall exch dataflag gridarray { stream1 1 index .name getgridbyname nip regridAverage0v0 } forall Wmin normalize exch .stream1 exch }
BLD { eigrs_and_vartot pop }
BLD -operator-
BLD -operator-
BLD { toreal compressedgrid dup type /nametype eq { cvx exec } if dup type /objecttype eq { 1 REORDER } { aload length REORDER } ifelse dup /compression.indices known { compression.indices } { indices dup type /nametype eq { cvx exec } if } ifelse copyachunk 1 index .Compression /nout known { nout } { chunksize } ifelse dup type /integertype eq { 1 integerarray astore } { copyachunk } ifelse npackS new 2 index .chunksize store NIN 1 grids { dup type /nametype eq { cvx exec } if .npts mul } forall store NOUT NaN store MV npack0 TaskStreams 0 get 5 object grids length SetStreamIndex* grids { dup type /nametype eq { cvx exec } if } forall TaskStreams 0 get .achunk pop * chunksize NewBuffer /missing_value NaN def }
BLD { { startcolormap DATA -0.1 0.916 RANGE transparent white white -0.1 VALUE 0 0 255 RGB RGBdup 0.224 bandmax 128 3 0 RGB 0.224 VALUE 130 7 0 RGB 0.232 VALUE 132 10 0 RGB 0.236 VALUE 134 14 0 RGB 0.24 VALUE 136 18 0 RGB 0.244 VALUE 137 21 0 RGB 0.248 VALUE 139 25 0 RGB 0.252 VALUE 141 29 0 RGB 0.256 VALUE 143 32 0 RGB 0.26 VALUE 145 36 0 RGB 0.264 VALUE 147 40 0 RGB 0.268 VALUE 148 43 0 RGB 0.272 VALUE 150 47 0 RGB 0.276 VALUE 152 51 0 RGB 0.28 VALUE 154 54 0 RGB 0.284 VALUE 156 58 0 RGB 0.288 VALUE 158 62 0 RGB 0.292 VALUE 159 65 0 RGB 0.296 VALUE 161 69 0 RGB 0.3 VALUE 163 73 0 RGB 0.304 VALUE 165 76 0 RGB 0.308 VALUE 167 80 0 RGB 0.312 VALUE 169 84 0 RGB 0.316 VALUE 170 87 0 RGB 0.32 VALUE 172 91 0 RGB 0.324 VALUE 174 95 0 RGB 0.328 VALUE 176 98 0 RGB 0.332 VALUE 178 102 0 RGB 0.336 VALUE 180 106 0 RGB 0.34 VALUE 181 109 0 RGB 0.344 VALUE 183 113 0 RGB 0.348 VALUE 185 117 0 RGB 0.352 VALUE 187 120 0 RGB 0.356 VALUE 189 124 0 RGB 0.36 VALUE 190 128 0 RGB 0.364 VALUE 192 131 0 RGB 0.368 VALUE 194 135 0 RGB 0.372 VALUE 196 138 0 RGB 0.376 VALUE 198 142 0 RGB 0.38 VALUE 200 146 0 RGB 0.384 VALUE 201 149 0 RGB 0.388 VALUE 203 153 0 RGB 0.392 VALUE 205 157 0 RGB 0.396 VALUE 207 160 0 RGB 0.4 VALUE 209 164 0 RGB 0.404 VALUE 211 168 0 RGB 0.408 VALUE 212 171 0 RGB 0.412 VALUE 214 175 0 RGB 0.416 VALUE 216 179 0 RGB 0.42 VALUE 218 182 0 RGB 0.424 VALUE 220 186 0 RGB 0.428 VALUE 222 190 0 RGB 0.432 VALUE 223 193 0 RGB 0.436 VALUE 225 197 0 RGB 0.44 VALUE 227 201 0 RGB 0.444 VALUE 229 204 0 RGB 0.448 VALUE 231 208 0 RGB 0.452 VALUE 233 212 0 RGB 0.456 VALUE 234 215 0 RGB 0.46 VALUE 236 219 0 RGB 0.464 VALUE 238 223 0 RGB 0.468 VALUE 240 226 0 RGB 0.472 VALUE 242 230 0 RGB 0.476 VALUE 244 234 0 RGB 0.48 VALUE 245 237 0 RGB 0.484 VALUE 247 241 0 RGB 0.488 VALUE 249 245 0 RGB 0.492 VALUE 251 248 0 RGB 0.496 VALUE 253 252 0 RGB 0.5 VALUE 254 255 0 RGB 0.504 VALUE 255 255 0 RGB 0.508 VALUE 251 253 0 RGB 0.512 VALUE 247 251 0 RGB 0.516 VALUE 244 249 0 RGB 0.52 VALUE 240 247 0 RGB 0.524 VALUE 236 245 0 RGB 0.528 VALUE 233 244 0 RGB 0.532 VALUE 229 242 0 RGB 0.536 VALUE 225 240 0 RGB 0.54 VALUE 222 238 0 RGB 0.544 VALUE 218 236 0 RGB 0.548 VALUE 214 234 0 RGB 0.552 VALUE 211 233 0 RGB 0.556 VALUE 207 231 0 RGB 0.56 VALUE 203 229 0 RGB 0.564 VALUE 200 227 0 RGB 0.568 VALUE 196 225 0 RGB 0.572 VALUE 192 223 0 RGB 0.576 VALUE 189 222 0 RGB 0.58 VALUE 185 220 0 RGB 0.584 VALUE 181 218 0 RGB 0.588 VALUE 178 216 0 RGB 0.592 VALUE 174 214 0 RGB 0.596 VALUE 170 212 0 RGB 0.6 VALUE 167 211 0 RGB 0.604 VALUE 163 209 0 RGB 0.608 VALUE 159 207 0 RGB 0.612 VALUE 156 205 0 RGB 0.616 VALUE 152 203 0 RGB 0.62 VALUE 148 201 0 RGB 0.624 VALUE 145 200 0 RGB 0.628 VALUE 141 198 0 RGB 0.632 VALUE 137 196 0 RGB 0.636 VALUE 134 194 0 RGB 0.64 VALUE 130 192 0 RGB 0.644 VALUE 126 191 0 RGB 0.648 VALUE 123 189 0 RGB 0.652 VALUE 119 187 0 RGB 0.656 VALUE 116 185 0 RGB 0.66 VALUE 112 183 0 RGB 0.664 VALUE 108 181 0 RGB 0.668 VALUE 105 180 0 RGB 0.672 VALUE 101 178 0 RGB 0.676 VALUE 97 176 0 RGB 0.68 VALUE 94 174 0 RGB 0.684 VALUE 90 172 0 RGB 0.688 VALUE 86 170 0 RGB 0.692 VALUE 83 169 0 RGB 0.696 VALUE 79 167 0 RGB 0.7 VALUE 75 165 0 RGB 0.704 VALUE 72 163 0 RGB 0.708 VALUE 68 161 0 RGB 0.712 VALUE 64 159 0 RGB 0.716 VALUE 61 158 0 RGB 0.72 VALUE 57 156 0 RGB 0.724 VALUE 53 154 0 RGB 0.728 VALUE 50 152 0 RGB 0.732 VALUE 46 150 0 RGB 0.736 VALUE 42 148 0 RGB 0.74 VALUE 39 147 0 RGB 0.744 VALUE 35 145 0 RGB 0.748 VALUE 31 143 0 RGB 0.752 VALUE 28 141 0 RGB 0.756 VALUE 24 139 0 RGB 0.76 VALUE 20 137 0 RGB 0.764 VALUE 17 136 0 RGB 0.768 VALUE 13 134 0 RGB 0.772 VALUE 9 132 0 RGB 0.776 VALUE 6 130 0 RGB RGBdup 0.916 bandmax white endcolormap } /NDVIcolorscale docolorscale }
BLD [ null ]
BLD { exch toNaN8 dup totype /gridtype eq { dup getrealization pop } if exch 1 datatypearray astore chunksize datatype /doublearraytype eq { pointwidthtoboundsR80 } { pointwidthtoboundsR40 } ifelse TaskStreams 0 get chunksize 2 mul NewBuffer nrdim 1 add SetStreamIndex* /I_bounds 2 NewIntegerGRID TaskStreams 0 get .streamgrids * /pointwidth 0 def }
BLD { 3 -1 roll copyachunk 3 -1 roll copyachunk 3 -1 roll 1 index .firstgrid .npts covAdvance0 TaskStreams 1 get chunksize NewDoubleBuffer pop TaskStreams 2 get chunksize NewDoubleBuffer /fullname ($P sub F$) def }
BLD { array astore dup aload length commonachunk null 1 index length object 1 index { name exch def } forall { streams theachunk theachunkobj } inputs streams { dup type /objecttype eq { nrdim mark chunk 2 add index .achunk array astore { name theachunkobj exch known { pop } if } forall theachunk aload pop NewStreamPtr setSIRecord } if } forall streams length 1 add -1 roll pop }
BLD { { startcolormap DATA 0 100 RANGE transparent white 224 255 255 RGB RGBdup 17.5 bandmax 175 238 238 RGB RGBdup 22.5 bandmax 130 180 200 RGB RGBdup 27.5 bandmax 100 150 180 RGB RGBdup 32.5 bandmax grey RGBdup 33.5 bandmax 100 210 30 RGB RGBdup 37.5 bandmax 165 230 0 RGB RGBdup 42.5 bandmax 200 255 0 RGB RGBdup 47.5 bandmax 255 255 0 RGB RGBdup 52.5 bandmax 255 210 0 RGB RGBdup 57.5 bandmax 255 165 32 RGB RGBdup 62.5 bandmax 218 69 32 RGB RGBdup 67.5 bandmax 176 48 96 RGB 100 VALUE 176 48 96 RGB endcolormap } /tercileclassesscale docolorscale }
BLD -operator-
BLD { exch decompress buffer null eq { CopyStream } if bufferS .VM 1 eq { CopyStream } if exch 2 copy pop SIRecord bufferSIRecord ne { 1 object /SIRecord bufferSIRecord def } if exch nrdim exch { .name cvx exec gridno max } forall cvi dup nrdim gt { nrdim sub achunk array astore 0 3 -1 roll getinterval 1 exch { .npts mul } forall nip BufferOrder } { pop pop } ifelse }
BLD idaheader
BLD -operator-
BLD { currentobject /scale_min known { currentobject toNaN .scale_min } { null } ifelse }
BLD { get_modulus dup null eq { pop 0.0 } if dup type /stringtype eq { interp } if }
BLD -operator-
BLD { Compression 5 object /compressiontype 3 -1 roll def }
BLD { 3 { 3 1 roll todouble } repeat npts bumpyweights0 TaskStreams 0 get npts NewDoubleBuffer /name /wghts def }
BLD { 1330357344 set_code_last_modified false currentobject /valid_max getknownnotnull { currentobject .datatype signedlimits exch getknown { gt or } { pop pop false } ifelse } if dup not { currentobject /valid_min getknownnotnull { 0 lt } { false } ifelse { } { pop currentobject /missing_value getknownnotnull { dup type /arraytype eq { true exch { currentobject .datatype signedlimits exch getknown { gt and } { pop pop false } ifelse } forall } { currentobject .datatype signedlimits exch getknown { gt } { pop false } ifelse } ifelse } { false } ifelse } ifelse } if }
BLD -operator-
BLD -operator-
BLD { 0 NewSizedBuffer /datatype /stringtype def }
BLD -operator-
BLD { currentobject /valid_max known { valid_max } { null } ifelse }
BLD -operator-
BLD { { 1 /greyscale publicproc: startcolormap black white maxncolor steps endcolormap :publicproc } /greyscale docolorscale }
BLD -operator-
BLD { (pentads since 1960-01-01) unitconvertbyattribute integralgrid dup 1 object getadd_offset getscale_factor /add_offset 0.0 def /scale_factor 1.0 def pentadtojd1960 getrealization name (days since 1960-01-01) cvn gridtype 4 -1 roll NewGRID /calendar /standard def /julian_day unitconvertbyattribute partialgrid nip }
BLD { 3 index 6 2 roll RANGE0 3 1 roll .name exec exch STEP0 }
BLD { 1 index .Compression .compressiontype null eq { seasmarkovI } { seasmarkovII } ifelse D Compression .symmetricchunk 0 get .npts ssmtodiag0 TaskStreams 0 get TaskParameterBlock NewBuffer 1 SetStreamIndex* Compression .symmetricchunk 0 get TaskStreams 0 get .achunk pop * /name /DD def name exch def /DDRMS DD toreal sqrt /name /DDRMS cvx def def /DDRMS2 DDRMS meof /meof2 renameGRID def /T A .T def }
BLD { dup type /arraytype eq { 2 exch aload length MATCH exch toNaN exch toNaN 1 1 chunksize 3 integerarray astore mulsum1 STREAM 1 NewBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * /name /mulsum def /fullname [ TaskStreams 0 get .fullname (*) cvn TaskStreams 1 get .fullname ] def TaskStreams 0 get TaskStreams 1 get /unitmul binopunits } { mulsumsub0 } ifelse }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax DarkOrange DarkOrange 0.6 bandmax OrangeRed OrangeRed 0.65 bandmax red red 0.7 bandmax firebrick firebrick 0.75 bandmax MediumOrchid MediumOrchid 0.8 bandmax DarkOrchid DarkOrchid 0.85 bandmax moccasin moccasin 0.9 bandmax moccasin moccasin 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_10 docolorscale }
BLD { greyscale }
BLD -operator-
BLD { { thedata time modelperiod lags egrid } inputs /time time ndim RECHUNK def /thetimegrid time [ streamgrids ] 0 get nip def /egrid2 egrid name cvntos (2) append cvn units gridtype gridvalues NewGRID nip /fullname egrid .fullname def def /egridno thedata egrid gridno nip def egridno thedata .nrdim gt { (the eof grid must be within the chunk as currently written) print error } if /tgridno thedata thetimegrid gridno nip def tgridno thedata .nrdim gt { (the time grid must be within the chunk as currently written) print error } if thedata thetimegrid .step lags { 1 index div exch } forall pop lags length integerarray astore tgridno egridno lt { covS new thedata thetimegrid gridstride nip store n1 thetimegrid .npts store nt egrid .npts store m thedata egrid gridstride nip n1 nt mul div store n2 thedata .chunksize n1 n2 mul nt mul m mul div store n3 1 store n4 thedata .nchunk store n5 thetimegrid .step store dt modelperiod dt div store ns lags length store nl thetimegrid time ne { time 3 1 roll lcovar0b } { lcovar0 } ifelse STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewBuffer pop STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewDoubleBuffer /L dup /real ordered lags NewGRID /fullname (Lag) def def /T dup monthclimoname periodic 0.5 TaskParameterBlock .dt TaskParameterBlock .ns 1 sub 1 index mul 2 index add NewEvenGRID /long_name (month) def def 4 SetStreamIndex* egrid /fullname [ (Lagged) fullname ] def egrid2 T L * /name /covariance def /fullname [ TaskStreams 0 get .fullname dup type /arraytype eq { aload pop } if name ] def } { } ifelse 1output }
BLD { 2 { 2 index dup /units known { units .timeunits? { get_calendar nip } { pop null } ifelse } { pop null } ifelse } repeat 1 index null eq { nip } { pop } ifelse 4 2 roll 2 { exch .units } repeat 4 -1 roll cvx exec preferredunitname /units exch def dup null eq { pop } { /calendar exch def } ifelse }
BLD { dup type /objecttype eq { 1 } if fftS new exch store sign 3 1 roll grideven not { (grid must be even) error } if 1 REORDER missing_value null ne { (missing_data not supported) error } if chunk pop .npts cfft1di copyachunk 3 -1 roll 2 index .chunksize store ns ns store nx 1 index .chunksize store nc 2 index .chunk pop .step store dx fftccsp0 TaskStreams 0 get TaskParameterBlock .nx NewComplexBuffer 1 SetStreamIndex* TaskStreams 0 get .chunk pop name cvntos (k_) search { pop pop } { (k_) exch append } ifelse units cvntos (cycle/) search { pop pop } { unitclearorigin (cycle/) exch cvntos append } ifelse preferredunitname periodic 0 1.0 currentobject step npts 1 sub mul 2 mul nip div dup TaskParameterBlock .nx 1 sub mul NewEvenGRID nip TaskStreams 0 get .achunk pop * TaskStreams 0 get .chunk pop .name undef Compression NoCompression ne { /Compression Compression parent def } if }
BLD { (needs to be fixed to change the lagging on D ) print stop seasmarkS new exch store stab exch 2 RECHUNK todouble T .npts BufferOrder dup L 0.0 VALUE T .npts BufferOrder L removeGRID dup 4 1 roll exch L gridvalues { dup 0.0 eq { pop } if } forall VALUES exch T 2 index .L .gridvalues { T .gridvalues { 1 index sub exch } forall pop } forall VALUES 3 -1 roll chunk pop pop .npts store m seasmarkov0 STREAM TaskParameterBlock .m dup 1 add mul NewBuffer pop TaskStreams 0 get TaskParameterBlock .m dup mul NewDoubleBuffer /name /A def /fullname [ fullname 0 1 index length 1 sub getinterval aload pop /A ] def [ (Stabilized with ) TaskParameterBlock .stab 100.0 mul s== (% of the trace) ] concat addhistory DATASET 5 object exch name exch def TaskStreams 1 get 3 -1 roll A exch copyachunk exch chunk pop pop .npts 1 integerarray astore seasmarkovq0 /D TaskStreams 0 get def TaskStreams 0 get chunksize NewDoubleBuffer pop TaskStreams 1 get TaskParameterBlock 0 get dup 1 add mul 2 div NewDoubleBuffer 1 SetStreamIndex* /I TaskParameterBlock 0 get dup 1 add mul 2 div NewIntegerGRID TaskStreams 1 get .achunk pop * /name /Q def /symmetricStorageMode compression: /symmetricchunk A .chunk pop exch /fullname 2 index .fullname def exch 2 array astore def :compression /fullname [ fullname maybealoadpop pop /Q ] def name exch def }
BLD { nip 5 2 roll 3 { 3 1 roll toNaN } repeat 3 -1 roll get_modulus? { pop XL XH masknotrange } if 3 1 roll 5 -1 roll 3 exch dup type /arraytype ne { (must specify array of grid(s) to weave from) error } if aload length MATCH 4 -1 roll 1 index .chunksize store NV DIST 0 eq { XH XL sub NX div store DIST } if weaver0 TaskStreams 2 get TaskParameterBlock NX NY mul nip NewBuffer /X /degree_east TaskParameterBlock .xper 1 eq { periodic } { ordered } ifelse TaskParameterBlock .XL TaskParameterBlock .XH TaskParameterBlock .NX 3 copy pop exch sub exch div 3 -1 roll 1 index 0.5 mul add 3 -1 roll 2 index 0.5 mul sub 3 -1 roll exch NewEvenGRID name exch def /Y /degree_north ordered TaskParameterBlock .YL TaskParameterBlock .YH TaskParameterBlock .NY 3 copy pop exch sub exch div 3 -1 roll 1 index 0.5 mul add 3 -1 roll 2 index 0.5 mul sub 3 -1 roll exch NewEvenGRID name exch def 2 SetStreamIndex* X Y TaskStreams 2 get .achunk pop * TaskStreams 2 get .chunk array astore { .name undef } forall /missing_value 99999.0 def /SpatialReferenceSystemDims undef /SpatialReferenceSystemWKT undef /procargs TaskParameterBlock [ procargs aload pop /X cvx XL XH 2 copy exch sub NX div /RANGEEDGESTEP cvx /Y cvx YL YH 2 copy exch sub NY div /RANGEEDGESTEP cvx dec /setdecimal cvx fine 2 add /setpass cvx center /setcenterweight cvx DIST /setdist cvx ifweave /setweave cvx ifemphasize /setemphasize cvx /:weaver cvx ] nip store :publicproc }
BLD -operator-
BLD { 3 setcommongrids reordertomatch chunkpattern normalize1 STREAM TaskParameterBlock 1 get NewIntegerBuffer pop TaskStreams 0 get chunksize NewBuffer /missing_value NaN def TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits }
BLD NoCompression
BLD -operator-
BLD -operator-
BLD { 1 /yearly-anomalies publicproc: decompress nrdim T gridno lt { T gridstride T .npts mul BufferOrder } if dup yearly-climatology 2 copy sub nip /name 2 index .name def /fullname mark 3 index .fullname dup type /arraytype eq { aload pop } if /anomalies ] def nip :publicproc }
BLD bumpyAvgS
BLD { dup type /arraytype eq { 0.0 } if 4 /rankcorrelate publicproc: 4 2 roll exch 3 index datarank exch 3 index datarank 4 2 roll correlate :publicproc }
BLD { chunksize cvui4tor40 TaskStreams 0 get chunksize NewRealBuffer }
BLD -operator-
BLD { dup type /objecttype eq { -1 } if fftS new exch store sign 3 1 roll grideven not { (grid must be even) error } if 2 copy gridno nip 1 eq { pop } { 1 REORDER } ifelse missing_value null ne { (missing_data not supported) error } if 1 gridbyno .npts 2 mul 2 sub fftspi copyachunk 3 -1 roll 2 index 1 gridbyno nip .npts store ns ns 2 mul 2 sub store nx 1 index .chunksize store nc 2 index 1 gridbyno nip .step store dx 2 index .chunksize ns div store nrpt fftcsp0 TaskStreams 0 get TaskParameterBlock .ns NewComplexBuffer pop TaskStreams 0 get TaskParameterBlock .nx TaskParameterBlock .nrpt mul NewRealBuffer TaskStreams 0 get .nrdim SetStreamIndex* TaskStreams 0 get .streamgridarray dup 0 get name cvntos (k_) search { pop pop } { (k_) exch append } ifelse units cvntos (cycle/) search { pop pop } { unitclearorigin (cycle/) exch cvntos append } ifelse preferredunitname periodic 0 1.0 currentobject step npts 1 sub mul 2 mul nip div dup TaskParameterBlock .nx 1 sub mul NewEvenGRID nip exch 1 1 index length 1 sub getinterval aload pop * TaskStreams 0 get 1 gridbyno nip .name undef Compression NoCompression ne { /Compression Compression parent def } if }
BLD { 1 index type /arraytype eq { [ 2 index { counttomark 1 add index 1 index gridno 0 eq { pop } { pop pop } ifelse } forall ] 0 onegridcounter nchunk BufferOrder 2 index setachunk defivars dup dup streamgridarray { 4 index 1 index .name getknown { SAMPLELBLE } { pop } ifelse } forall CopyStream 4 index { 4 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids pop 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll replaceGRID } { name 3 1 roll first VALUE exch cvx exec removeGRID } ifelse } forall copyachunk 1 recorddiff0 TaskStreams 0 get 1 NewIntegerBuffer /name /recordcount def 4 1 roll dup streamgridarray { 3 index 1 index .name getknown { SAMPLEUBLE } { pop } ifelse } forall CopyStream 3 index { 3 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids nip 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll replaceGRID } { name 3 1 roll last VALUE exch cvx exec removeGRID } ifelse } forall copyachunk exch 1 recorddiff0 TaskStreams 0 get 1 NewIntegerBuffer /name /recordreversecount def 3 1 roll exch { 1 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids pop 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll replaceGRID } { pop } ifelse } forall copyachunk } if }
BLD { dup type /realtype eq { 1 array astore } if dup type /arraytype eq { /stability exch /real exch 0 exch NewGRID CopyStream /long_name (Stabilizing Taper as percentage of trace) def } if seasmarkS new 5 2 roll 3 1 roll 2 RECHUNK todouble 3 1 roll 1 RECHUNK todouble 3 1 roll 1 RECHUNK todouble 5 -1 roll dup type /objecttype eq { 5 object copyachunk 0 RECHUNK 4 -1 roll copyachunk defivars 4 -1 roll copyachunk defivars 4 -1 roll copyachunk defivars 4 -1 roll } if 5 -1 roll 3 index .firstgrid .npts store m seasmarkov3 STREAM TaskParameterBlock .m dup 1 add mul NewBuffer pop TaskStreams 0 get TaskParameterBlock .m dup mul NewDoubleBuffer /name /A def /fullname [ fullname 0 1 index length 1 sub getinterval aload pop /A ] def [ (from ) TaskStreams 1 get .longname ( stabilized with stability as) (% of the trace) ] concat addhistory DATASET 5 object /name /seasmarkov cvx def exch name exch def /D TaskStreams 1 get def exch TaskStreams 1 get exch A firstgrid .npts 1 integerarray astore seasmarkov3q TaskStreams 2 get chunksize NewDoubleBuffer pop TaskStreams 2 get TaskParameterBlock 0 get dup 1 add mul 2 div NewDoubleBuffer 1 SetStreamIndex* /I TaskParameterBlock 0 get dup 1 add mul 2 div NewIntegerGRID TaskStreams 2 get .achunk pop * /name /Q def /symmetricStorageMode compression: /symmetricchunk A .chunk pop exch 1 object /fullname 2 index .fullname def exch 2 array astore def :compression /fullname [ fullname maybealoadpop pop /Q ] def name exch def }
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax moccasin moccasin 0.5 bandmax moccasin moccasin 0.55 bandmax gold gold 0.6 bandmax BrightMustard BrightMustard 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_50 docolorscale }
BLD -operator-
BLD 0 5 object
BLD { 1 index type /arraytype eq { mark buffer 3 index { .gridid } forall codedstringIDarray 0 counttomark 2 sub getinterval astore nip 3 1 roll recordsandopenfileCache 3 index cachegetknown { 4 1 roll nip nip exch exec 4 -1 roll 5 object exch bufferSIRecord exch SIRecord exch .buffer /buffer exch def /SIRecord exch def /bufferSIRecord exch def defivars } { [ 2 index { counttomark 1 add index 1 index gridno 0 eq { pop } { pop pop } ifelse } forall ] 0 onegridcounter nchunk BufferOrder 2 index setachunk defivars dup dup streamgridarray { 4 index 1 index .name getknown { SAMPLELBLE } { pop } ifelse } forall CopyStream 4 index { 4 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids pop 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll replaceGRID } { name 3 1 roll first VALUE exch cvx exec removeGRID } ifelse } forall copyachunk 1 recorddiff0 TaskStreams 0 get 1 NewIntegerBuffer /name /recordcount def 4 1 roll dup streamgridarray { 3 index 1 index .name getknown { SAMPLEUBLE } { pop } ifelse } forall CopyStream 3 index { 3 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids nip 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll replaceGRID } { name 3 1 roll last VALUE exch cvx exec removeGRID } ifelse } forall copyachunk exch 1 recorddiff0 TaskStreams 0 get 1 NewIntegerBuffer /name /recordreversecount def 3 1 roll exch { 1 index 1 index .name known { 1 index 1 index .name get 1 index boundinggrids pop 3 -1 roll dup 2 index .name get 3 -1 roll SAMPLE dup 2 index .name get 3 -1 roll 1354064192 set_code_last_modified pop pop } { pop } ifelse } forall [ 2 index .achunk array astore { .name cvx exec } forall ] setachunk 3 array astore cvx recordsandopenfileCache 3 -1 roll 2 index cacheput exec } ifelse } if }
BLD { 0 3 object /NewStreamPtr -operator- def /start* { exch mark } def /* { NewStreamPtr exch pop /SIRecord exch def defivars fixstream } def start* }
BLD -operator-
BLD { 0 NewSizedBuffer /datatype /geometrytype def }
BLD -operator-
BLD { dup type /arraytype ne { pop } if 2 /datarank publicproc: { dup type /arraytype ne { pop } if aload length REORDER toNaN chunksize datarank0 TaskStreams 0 get chunksize NewDoubleBuffer pop TaskStreams 0 get chunksize NewRealBuffer markunitless /fullname [ /rank_over [ TaskStreams 0 get .chunk array astore { .name } forall ] fullname dup type /arraytype ne { 1 array astore } if ] def } /datarank gridarray1fn :publicproc }
BLD 0 5 object /seconds 2592000 def /months 1 def /days 30 def /hours 720 def
BLD -operator-
BLD { dup type dup /realtype eq exch /integertype eq or not { 0 } if 1 index type /objecttype eq { nptgrids exch } if 4 /correlate publicproc: 4 2 roll 3 index { 2 exch MATCHalong } forall 2 { exch 3 index 3 index standardize } repeat history 5 1 roll 4 2 roll [ ] exch mulavg exch /history exch def /name /correlation cvx def /long_name name cvntos def correlationcolorscale :publicproc }
BLD 0 5 object /JULIAN /standard def
BLD { integral gridinname exec gridout integralgrid REGRID gridinname exec partial }
BLD -operator-
BLD { 1 integerarray astore zfft1di0 STREAM TaskParameterBlock 0 get 15 add NewComplexDoubleBuffer 1 SetBuffernchunk /I TaskParameterBlock 0 get 15 add NewIntegerGRID name exch def 1 SetStreamIndex* I * /name /coeffs def }
BLD -operator-
BLD { normalizeS new exch store Wmin NaN store mv chunksize store N normalize0 TaskStreams 0 get chunksize NewBuffer /missing_value NaN def TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits [ (Boxes with less than ) TaskParameterBlock .Wmin 100.0 mul s== (% dropped) ] concat addhistory }
BLD { dup type dup /realtype eq exch /integertype eq or not { 0 } if 1 index type /objecttype eq { nptgrids exch } if 1 index type /arraytype eq { 3 copy exch [ exch { .name } forall ] exch 3 /detrend-bfl publicproc: pop pop pop } { 3 /detrend-bfl publicproc: } ifelse { mystream mygrids myweight } inputs /mystream2 mystream dup mygrids myweight average sub def /mygrid2 mygrids 0 get mystream 0 mul add dup mygrids myweight average sub def mystream2 mygrid2 mul mygrids myweight average mygrid2 dup mul mygrids myweight average div mygrid2 mul mystream2 exch sub /fullname [ /detrended-bfl mystream .fullname ] def /history mystream .history def nip :publicproc }
BLD -operator-
BLD { }
BLD { get_calendar monthtimeversions exch get exec }
BLD -operator-
BLD structureParent structure
BLD { commongrids0 failonnopts }
BLD { swapbytes }
BLD -operator-
BLD { get_calendar YearCalendars exch getknown }
BLD -operator-
BLD 0 17 object /365 { monthlyedgesgrid365 } def /standard { monthlyedgesgridjd } def /GREGORIAN { monthlyedgesgridjd } def /NOLEAP { monthlyedgesgrid365 } def /noleap { monthlyedgesgrid365 } def /360 { monthlyedgesgrid360 } def /gregorian { monthlyedgesgridjd } def /proleptic_gregorian { monthlyedgesgridjd } def /360_day { monthlyedgesgrid360 } def /365_day { monthlyedgesgrid365 } def
BLD -operator-
BLD { exch 1 index gridstride 3 1 roll exch .npts exch .chunksize 3 copy exch div exch div nip }
BLD 2436935
BLD { { myA myB mygrid } inputs /myA myA toreal toNaN mygrid gridno RECHUNK def /ifAone myA ndim exch .nrdim eq def ifAone { /myB myB toreal toNaN mygrid 1 REORDER def /myA myB myA copyachunk nip def } { /myB myB toreal toNaN mygrid 1 REORDER myA exch copyachunk nip def } ifelse myA myB myA .chunksize mygrid .npts div mygrid .npts myB .chunksize mygrid .npts div 3 integerarray astore mulsum0 TaskStreams 0 get TaskParameterBlock 0 get TaskParameterBlock 2 get mul NewBuffer ifAone { nrdim 1 sub SetStreamIndex* myA .chunk pop pop myB .achunk pop * } { nrdim SetStreamIndex* [ myA .streamgrids ] { name mygrid .name eq { pop } if } forall * } ifelse mygrid .name undef /fullname [ myA .fullname (*) cvn myB .fullname ] def myA myB /unitmul binopunits myA .missing_value? myB .missing_value? or { /missing_value NaN def } if 1output }
BLD -operator-
BLD { }
BLD -operator-
BLD { dup type /objecttype eq { 1 } if fftS new exch store sign 3 1 roll grideven not { (grid must be even) error } if 1 REORDER missing_value null ne { (missing_data not supported) error } if chunk pop .npts fftspi copyachunk 3 -1 roll 2 index .chunksize store nx nx 2 add 2 div store ns 1 index .chunksize store nc 2 index .chunk pop .step store dx fftsp0 TaskStreams 0 get TaskParameterBlock .ns NewComplexBuffer TaskStreams 0 get .chunk pop (k_) name cvntos append units unitclearorigin (cycle/) exch cvntos append preferredunitname ordered 0 1.0 currentobject step npts mul nip div TaskParameterBlock .ns 1 sub 1 index mul NewEvenGRID nip name exch def /Hermitian compression: /grids (k_) TaskStreams 0 get .chunk pop .name cvntos append cvn cvx def :compression 1 SetStreamIndex* Compression /grids get exec TaskStreams 0 get .achunk pop * TaskStreams 0 get .chunk pop .name undef }
BLD { swapbytes2 }
BLD { 2 /replacefirstofmonthGRID publicproc: dup firstofmonthtoedgesgrid partialgrid monthtimegrid replaceGRID :publicproc }
BLD TaskS
BLD -operator-
BLD 0 2 object /attach -operator- def /release -operator- def
BLD { }
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax DarkOrange DarkOrange 0.6 bandmax OrangeRed OrangeRed 0.65 bandmax red red 0.7 bandmax moccasin moccasin 0.75 bandmax moccasin moccasin 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_25 docolorscale }
BLD -operator-
BLD { units exch /julian_day unitconvertbyattribute name units ordered first getscale_factor mul getadd_offset add 0.5 add jd2dmy 12 mul add nip 1 last getscale_factor mul getadd_offset add jd2dmy 12 mul add nip 2 add dup 3 index sub round cvi 1 add realarray 0 5 2 roll { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll dmy2jd getadd_offset sub 0.5 sub getscale_factor div 3 copy put pop 1 add } for pop NewGRID 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if exch .add_offset /add_offset exch def /pointwidth 0.0 def exch unitconvertbyattribute }
BLD { swapbytes8 }
BLD { commonachunk0 dup { npts 0 eq { (No common points along ) exch .name cvntos append error } { pop } ifelse } forall }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD 0 17 object /365 { monthtimegrid365 } def /standard { monthtimegridjd } def /GREGORIAN { monthtimegridjd } def /NOLEAP { monthtimegrid365 } def /noleap { monthtimegrid365 } def /360 { monthtimename gridunitconvert } def /gregorian { monthtimegridjd } def /proleptic_gregorian { monthtimegridjd } def /360_day { monthtimename gridunitconvert } def /365_day { monthtimegrid365 } def
BLD -operator-
BLD { 1 array astore average /fullname fullname 1 get def toreal }
BLD -operator-
BLD { units exch /julian_day unitconvertbyattribute name units ordered lowedge getscale_factor mul getadd_offset add 0.5 add jd2dmy 12 mul add nip 1 highedge getscale_factor mul getadd_offset add jd2dmy 12 mul add nip 1 add dup 3 index sub round cvi 1 add realarray 0 5 2 roll { dup 12 div exch 1 index 12 mul sub exch 1 3 1 roll dmy2jd getadd_offset sub 0.5 sub getscale_factor div 3 copy put pop 1 add } for pop NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if /pointwidth 0.0 def 1 index first last gt nip { last first subgrid } if nip exch unitconvertbyattribute }
BLD -operator-
BLD { /Compression exch def }
BLD -operator-
BLD { 5 /GRID publicproc: name units gridtype dup periodic eq { pop ordered } if 6 3 roll NewEvenGRID 1 index /long_name known { /long_name 2 index .long_name def } if /add_offset 2 index .getadd_offset dup 0 eq { pop pop } { def } ifelse /scale_factor 2 index .getscale_factor dup 1.0 eq { pop pop } { def } ifelse REGRID :publicproc }
BLD { 1 /yearly-climatology publicproc: decompress sealhistory T 12.0 splitstreamgrid T2 .units /year eq { T2 [ T .first 1.0 ge { T first cvsunits nip (-) T 11.9667 cvsunits nip ( averaged over ) } { (Averaged over ) } ifelse low cvsunits (-) high cvsunits ] concat nip addhistory T .first 1.0 ge { T2 [ T 0.01 cvsunits nip (-) T last cvsunits nip ( averaged over ) low 12 add cvsunits (-) high 12 add cvsunits ] concat nip addhistory } if history exch T2 AVERAGE exch /history exch def } { T2 AVERAGE } ifelse /fullname [ fullname dup type /arraytype eq { aload pop } if /climatology ] def :publicproc }
BLD structureParent structure
BLD /DATA
BLD { 1 array astore sum /fullname fullname 1 get def toreal }
BLD -operator-
BLD -operator-
BLD { dup type dup /realtype eq exch /integertype eq or not { 0 } if 1 index type /objecttype eq { nptgrids exch } if 1 index type /arraytype eq { 3 copy exch [ exch { .name } forall ] exch 3 /bf-slope publicproc: pop pop pop } { 3 /bf-slope publicproc: } ifelse { mystream mygrids myweight } inputs /mystream2 mystream dup mygrids myweight average sub def /mygrid2 mygrids 0 get mystream 0 mul add dup mygrids myweight average sub def mystream2 mygrid2 mul mygrids myweight average mygrid2 dup mul mygrids myweight average div /fullname [ /slope mystream .fullname ] def /history mystream .history def nip :publicproc }
BLD { SIRecord 1 index eq { pop } { exch 1 object exch /SIRecord exch def } ifelse }
BLD -operator-
BLD { partialS new 3 1 roll exch 1 index gridstride store n1 exch .npts store n2 .chunksize n1 n2 mul div store n3 }
BLD { counttoobject 1 sub index dup type /arraytype eq { length counttoobject 2 sub eq { 0.0 } if counttoobject 1 add } { pop counttoobject 1 eq { 0.0 } if 4 } ifelse 2 sub { counttoobject 1 sub index type /arraytype ne { 3 -1 roll 1 array astore 3 1 roll } if counttoobject 1 sub array astore null 1 index length 5 add object exch /boxargs exch def exch /boxgrids exch def 0 1 boxgrids length 1 sub { /boxcnt exch def boxgrids boxcnt get name units gridtype firstedge dup first eq { pop first step 0.5 mul sub } if boxargs boxcnt get 0.5 mul add boxargs boxcnt get lastedge firstedge sub 1 index div floor 1 sub 1 index mul 2 index add NewEvenGRID exch .get_calendar /calendar exch def name exch def } for exch boxgrids 1 index totype /gridtype eq { 1 index 1 index 0 get eq { pop .name exec } { pop } ifelse } { exch decompress exch boxargs dup length 1 sub get regridAverage toreal } ifelse nip } /boxAverageSPold allstreams1 }
BLD { gridin .units gridout .units eq { gridin .gridtype periodic eq gridin .width gridout .width gt or { gridin last first ge { gridout lowedge nip gridout highedge nip RANGESPAN } { gridout highedge nip gridout lowedge nip RANGESPAN } ifelse } if } { gridin .gridtype periodic eq { gridin gridout 1 object /pointwidth 0.0 def firstedge cvsunits exch lastedge cvsunits nip RANGESPAN } if } ifelse gridout .name cvx exec .gridid gridout .gridid ne }
BLD -operator-
BLD { dup yearlymodel POPs evec achunk pop pop 2 REORDER 1 RECHUNK 1 index T first last step add RANGE .T beginLoop stateAdvance endLoop normalizePOPs name 3 index ! name exch def }
BLD { exch 1 index 1 index .streamgrids .name get sample-along exch 1 index .datatype /doublearraytype eq { todouble } if 0 RECHUNK copyachunk exch chunksize 1 index .datatype /doublearraytype eq { bumpyaverageDPfix10 } { bumpyaveragefix10 } ifelse TaskStreams 0 get chunksize NewBuffer }
BLD -operator-
BLD -operator-
BLD -operator-
BLD { ndim 0 gt { 2 null MATCHalong } if 2 copy .streamgrids 2 copy .name exec gridno exch .nrdim gt { partialS new 3 1 roll pop .chunksize store n1 1 store n2 1 store n3 3 1 roll 0 RECHUNK copyachunk exch toNaN exch toNaN 3 -1 roll } { newpartialS 3 1 roll copyachunk exch toNaN exch toNaN 3 -1 roll } ifelse div00 TaskStreams 0 get chunksize NewBuffer /fullname TaskStreams aload length (/) combinefullname def TaskStreams 0 get TaskStreams 1 get /unitdiv binopunits }
BLD { dup s== (_stepdarktolightgreenscale) append cvn dup 3 -1 roll /stepdarktolightgreenscale0 cvx 2 array astore cvx defcolorscale cvx exec }
BLD { 2 1 index type /nametype eq { 1 add 2 index } { 1 index } ifelse type /objecttype eq not { 1 add } if /normalizeddistrib2D publicproc: distrib2D tonormalizeddistrib2D :publicproc }
BLD { currentobject /colormap known { colormap } { PS2 .colormap } ifelse dup type /stringtype eq { interp } if }
BLD { get_calendar exch units exch maybeconvertdays units exch (1/365 years since 1960-01-01) unitconvertbyattribute name units ordered lowedge scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add 1 highedge scale_factor mul getadd_offset add d365c2ymd pop 1 sub exch 12 mul add 1 add dup 3 index sub round cvi 1 add realarray 0 5 2 roll { dup 12 div exch 1 index 12 mul sub 1 add 1 ymd2d365c getadd_offset sub getscale_factor div 3 copy put pop 1 add } for pop NewGRID 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip /pointwidth 0.0 def exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD { 2 /unsplitstreamgrid publicproc: { thestream the1grid } inputs /the2grid thestream the1grid .name cvntos (2) append cvn get def thestream the1grid gridno nrdim le nip thestream the2grid gridno nrdim gt nip and { thestream the1grid gridno 1 sub RECHUNK /thestream exch def } if /thegrid the1grid .name the1grid .units dup monthclimoname eq { pop monthtimename } if the1grid .gridtype dup 1 eq { pop 0 } if the2grid .gridvalues { the2grid firstedge step mod step 0.5 mul add nip sub the1grid .gridvalues { 1 index add exch } forall pop } forall the1grid .npts the2grid .npts mul realarray astore NewGRID def thestream [ the1grid the2grid ] thegrid replaceGRID nip :publicproc }
BLD 0 5 object
BLD { array astore { decompress toNaN } forall }
BLD -operator-
BLD -operator-
BLD -operator-
BLD { { 1 index exch dup ( - ) search { pop pop pop true } { pop false } ifelse { seasonaledgesgrid dup } { seasonaledgesgrid dup /monthtime gridunitconvert } ifelse partialgrid } seasonalAverageCache bumpyaverage1arg }
BLD { dup type datatype ne { counttoobject datatypearray astore } if { valuetoindex dup 0 lt { pop } if } forall counttoobject integerarray astore integersort { gridvalues exch get } forall VALUES }
BLD { 0 eq { partialS new 2 index .chunksize store n1 1 store n2 1 store n3 3 1 roll bufferSIRecord SIRecord ne { CopyStream } if 0 RECHUNK copyachunk 3 -1 roll } { 2 copy .nptgrids 0 get 2 copy .name exec gridno exch .nrdim gt { partialS new 3 1 roll pop .chunksize store n1 1 store n2 1 store n3 3 1 roll 0 RECHUNK copyachunk 3 -1 roll } { ndim RECHUNK newpartialS 3 1 roll copyachunk 3 -1 roll } ifelse } ifelse }
BLD { null 1 index length object exch { name exch def } forall exch decompress exch [ exch [ streamgrids ] { 2 copy .name known { pop } { exch } ifelse } forall pop ] }
BLD { 2 /stepdarktolightgreyscale publicproc: 3 add /maxncolor Graphics .ColorMapOutside ! startcolormap Graphics .ColorMapOutside /maxncolor get /maxncolor exch def transparent 0 55 5 RGB RGBdup 210 255 215 RGB maxncolor 3 sub steps RGBdup endcolormap /maxncolor undef Graphics .ColorMapOutside /maxncolor undef pop :publicproc }
BLD { name units gridtype mark gridvalues { -1 mul } forall counttomark realarray astore exch pop NewGRID exch pop }
BLD { /filename FORMgetknownnotnull { 1 index search { pop pop pop } { 1 index append /filename WWWinfo .FORMinfo ! } ifelse } if pop }
BLD -operator-
BLD { exch 5 object exch /datatype /complexarraytype def /bufferwordsize 8 def 8 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD { dup type /arraytype eq { 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 3 -1 roll 3 } { exch decompress toNaN exch decompress toNaN 2 } ifelse /tablefunction publicproc: dup type /arraytype eq { 3 -1 roll 1 index { gridnobyname dup 0 eq { pop } { gridbyno removeGRID } ifelse } forall 3 1 roll aload length REORDER exch 0 RECHUNK exch } if nptgrids length 1 eq { 1 RECHUNK copyachunk chunk pop toreal copyachunk chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def } { 2 matchachunk chunk pop toreal copyachunk exch chunksize 3 index .chunksize 2 integerarray astore dolinint3 TaskStreams 0 get chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /long_name TaskStreams 1 get /long_name getknown not { TaskStreams 1 get .name cvntos } if dup type /arraytype eq { exec } if def /units TaskStreams 1 get .units def } ifelse defivars :publicproc }
BLD { (To be written) print stop compressedgrid dup type /nametype eq { cvx exec } if 1 REORDER dup /compression.indices known { compression.indices } { indices dup type /nametype eq { cvx exec } if } ifelse npackS new chunksize store NIN 1 grids { dup type /nametype eq { cvx exec } if .npts mul } forall store NOUT NaN store MV mpack0 TaskStreams 0 get 5 object grids length SetStreamIndex* grids { dup type /nametype eq { cvx exec } if } forall TaskStreams 0 get .achunk pop * chunksize NewBuffer /missing_value NaN def }
BLD { bufferwordsize 1 eq { streamgridarray 0 get .npts exch chunksize bufferwordsize 1 index mul 4 mod 0 eq { tobuffersize DoCopy } { bufferwordsize mul DoCopyB } ifelse STREAM .LastStream 5 object exch /bufferwordsize exch def chunksize bufferwordsize div bufferwordsize NewSizedBuffer STREAM .LastStream .streamgridarray 0 get .name undef nrdim 1 sub SetStreamIndex* STREAM .LastStream .streamgridarray 1 1 index length 1 sub getinterval aload pop * } if }
BLD { datatype /namearraytype eq { 0 RECHUNK 0 1 index ndim RECHUNK getrealization { cvntos length imax 1 add } forall 1 integerarray astore nametostring0 TaskStreams 0 get 5 object /bufferwordsize TaskParameterBlock 0 get def /datatype /stringtype def 1 NewBuffer } if }
BLD { 3 -1 roll bufferSIRecord SIRecord ne { CopyStream } { currentobject /InStream get STREAM /InStream get ne { CopyStream } if } ifelse 3 1 roll replaceGRID0 /bufferSIRecord SIRecord def dup /==do get STREAM /==do get ne { /==do STREAM /==do get def } if currentobject /InStream get STREAM /InStream get ne { /InStream STREAM 1 index get def } if fixstream }
BLD -operator-
BLD structureParent structure
BLD -operator-
BLD { colormap dup type /stringtype eq { interp } if }
BLD { 1 /daytimetomonthtime publicproc: dup /pointwidth getknown { 0 eq } { false } ifelse { (days since 1960-01-01) unitconvert toreal streamrescale chunksize daytimetomonthtime0 TaskStreams 0 get TaskParameterBlock NewIntegerBuffer defivars /units /monthtime preferredunitname def /scale_factor 1.0 def /add_offset 0.0 def /calendar /360 def } { .get_bounds daytimetomonthtime fullname 1 index 1 gridbyno 1 array astore average exch /fullname exch def /bounds 3 -1 roll def } ifelse :publicproc }
BLD { grideven not { (grid must be evenly spaced for shifting ) print error } if counttoobject 1 eq { dup } if counttoobject 2 eq { step exch } if 5 /shiftdatashort publicproc: dup 2 index mod dup 2 index dup 0 ne { div } { pop } ifelse abs 0.5 gt { dup 0 gt { 2 index sub } { 2 index add } ifelse } if /shiftlag exch store { shiftlag sub step div round } for counttoobject integerarray astore { mystream mygrid myshifts } inputs myshifts 0 get myshifts dup length 1 sub get 2 copy gt { /lowshift exch def /highshift exch def } { /highshift exch def /lowshift exch def } ifelse /mynewgrid mygrid name units gridtype first lowshift step mul sub shiftlag sub step last highshift step mul sub shiftlag sub NewEvenGRID 1 index .getadd_offset dup 0.0 eq { pop } { /add_offset exch def } ifelse 1 index /standard_name getknown { /standard_name exch def } if 1 index /pointwidth getknown { /pointwidth exch def } if 1 index /calendar getknown { /calendar exch def } if nip def /mylaggrid mygrid name cvntos (_lag) append cvn units unitclearorigin dup monthtime? { pop /Months cvx } if dup /julian_day eq { pop /days cvx } if gridtype mark myshifts { step mul shiftlag add } forall counttomark datatypearray astore nip NewGRID nip def mystream mygrid gridno exch .nrdim gt { mystream mygrid mylaggrid mynewgrid add getrealization datatype 1 index type ne { dup length datatypearray copy } if VALUES CopyStream nrdim SetStreamIndex* streamgridarray { name mygrid .name eq { pop mylaggrid mynewgrid } if } forall * } { /mystream mystream mygrid gridno RECHUNK toNaN def [ mylaggrid mystream .achunk pop ] mystream copyachunk nip myshifts 1 index mylaggrid 0 RECHUNK copyachunk nip mystream .chunksize mygrid .npts exch 1 index div exch mynewgrid .npts myshifts length 4 integerarray astore shiftdata0 TaskStreams 0 get chunksize TaskParameterBlock 1 get div TaskParameterBlock 2 get mul NewBuffer nrdim SetStreamIndex* TaskStreams 0 get .chunk pop pop mynewgrid TaskStreams 0 get .achunk pop * /missing_value NaN def } ifelse mark mygrid .name cvntos (_lag positive indicates ) longname ( lags) ] concat addhistory nip :publicproc }
BLD -operator-
BLD { { 1 /correlationcolorscale publicproc: startcolormap -1 1 RANGEEDGES transparent black navy -1 value blue -0.8 bandmax DeepSkyBlue -0.6 bandmax aquamarine -0.3 bandmax PaleGreen -0.1 bandmax moccasin dup 0.1 bandmax yellow DarkOrange 0.4 bandmax red 0.7 bandmax DarkRed 1.0 bandmax brown endcolormap :publicproc } /correlationcolorscale docolorscale }
BLD { dup 2 RECHUNK chunk 2 sub { pop } repeat nip integral chunk 2 sub { pop } repeat nip last VALUE chunk 2 sub { pop } repeat nip removeGRID div }
BLD { (partial_) 1 index .name cvntos append exch ($partialdiff sub ) exch .name cvntos append ($) append /fullname [ 2 index fullname ] def /long_name exch currentobject /long_name knownnotnull { long_name space exch 3 array astore concat } if def /name exch def }
BLD { 1 RECHUNK symmetricchunk 0 get .npts 1 integerarray astore ssmtofsm0 TaskStreams 0 get TaskParameterBlock 0 get dup mul NewDoubleBuffer chunk array astore { .name undef } forall 2 SetStreamIndex* symmetricchunk aload pop TaskStreams 0 get .achunk pop * }
BLD 0 11 object /shortarraytype { chunksize shorttoreal0 TaskStreams 0 get chunksize NewRealBuffer units /real eq { scale_factor 1 eq { /units /integer cvntos def } if } if } def /namearraytype { } def /stringtype { chunksize stringtoreal0 TaskStreams 0 get chunksize NewRealBuffer /bufferwordsize STREAM 1 index get def } def /nametype { } def /realtype { } def /doublearraytype { chunksize doubletoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /complexarraytype { compression? { /Hermitian eq { decompress } if } if SIRecord bufferSIRecord ne { CopyStream } if 5 object nrdim 1 add SetStreamIndex* thecomplexgrid 4 index .streamgrids * /datatype /realarraytype def /bufferwordsize STREAM 1 index get def CopyStream } def /longintegerarraytype { chunksize longintegertoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /realarraytype { } def /complexdoublearraytype { compression? { /Hermitian eq { decompress } if } if SIRecord bufferSIRecord ne { CopyStream } if 5 object nrdim 1 add SetStreamIndex* thecomplexgrid 4 index .streamgrids * chunksize doubletoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /integerarraytype { chunksize integertoreal0 TaskStreams 0 get chunksize NewRealBuffer } def
BLD { 2 index type dup /realtype eq exch /integertype eq or not { 0 3 1 roll } if 3 index type /objecttype eq { emptyarray 4 1 roll } if { mydata mygrids mymincntwght myfn myfnname } inputs 23 object mydata SIRecord pop pop mydata .datatype /stringtype eq { mydata .bufferwordsize 1 eq } { true } ifelse { /mydata mydata decompress toNaN def /myavggrids mydata mygrids complementgridarray0 nip def /postprocessgonegrid { null } def apply1get1sub } { pop null } ifelse }
BLD -operator-
BLD { dup totype /gridtype eq { daytimetomonthtime_grid } { daytimetomonthtime_stream } ifelse }
BLD -operator-
BLD -operator-
BLD { get_calendar yearlyedgesversions exch get exec }
BLD { nrdim gridbyno high low RANGE 1 gridbyno low high RANGE toi1 nchunk 1 gt { /multipart /mimesuffix WWWinfo ! mimeheader flush } { /lanimg /mimesuffix WWWinfo ! (.lan) checkfilenameforsuffix npts 128 add mimeheaderwithlength flush } ifelse dup nchunk 1 gt { nptgridsinachunk STREAM 5 object 0 SetStreamIndex* * 0 constantintegerdata 1 2 index { .npts mul } forall /filecnt exch 1 add NewIntegerGRID beginLoop pop /filename FORMgetknownnotnull not { (data) } if exch (.lan) nicefilename nip loopStream 2 index .npts 128 add (image/lan) mimesubheader } if exch lanheader new (HEAD74) store hdword 0 store ipack 1 index .nrdim 2 eq { 1 } { 1 index 2 gridbyno nip .npts } ifelse store nbands 1 index 1 gridbyno nip .npts store icols 1 index nrdim gridbyno nip .npts store irows 0 store xstart 0 store ystart 17 store maptyp 255 store nclass 0 store iautyp 0 store acre 1 index 1 gridbyno nip .first store xmap 1 index nrdim gridbyno nip .first store ymap 1 index 1 gridbyno nip .step store xcell 1 index nrdim gridbyno nip .step store ycell 3 -1 roll 1 index .bytesize dataui1 TaskStreams 1 get 1 NewIntegerBuffer 0 SetStreamIndex* TaskStreams 1 get .achunk pop * 1 index .chunksize dataui1 TaskStreams 0 get 1 NewIntegerBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * nchunk 1 gt { endLoop } if achunk array astore { last VALUE } forall getrealization pop }
BLD { 1 /fillNaNLB publicproc: datatype /doublearraytype eq { chunksize fillNaNLB0D TaskStreams 0 get chunksize NewDoubleBuffer } { toNaN chunksize fillNaNLB0R TaskStreams 0 get chunksize NewRealBuffer } /missing_value null def ifelse :publicproc }
BLD 0 11 object /doublearraytype { } def /realtype { chunksize realtodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /shortarraytype { chunksize shorttodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /complexarraytype { chunksize 2 mul realtodouble0 TaskStreams 0 get chunksize NewComplexDoubleBuffer } def /longintegerarraytype { chunksize longintegertodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /realarraytype { chunksize realtodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def /complexdoublearraytype { } def /integerarraytype { chunksize integertodouble0 TaskStreams 0 get chunksize NewDoubleBuffer } def
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD { 4 2 roll gridtomatch verbose { 1 index cvx == ( is ) print dup == ( ) print history leftlines } if 1 index exch def get }
BLD { (downloadsingrid) htmlprint }
BLD { optionalREORDER decompress 2 RECHUNK chunk pop nip high low RANGE chunk pop pop low high RANGE toi1 nchunk 1 gt { /multipart /mimesuffix WWWinfo ! mimeheader flush } { /idaimg /mimesuffix WWWinfo ! (.img) checkfilenameforsuffix npts 512 add mimeheaderwithlength flush } ifelse dup nchunk 1 gt { nptgridsinachunk STREAM 5 object 0 SetStreamIndex* * 0 constantintegerdata 1 2 index { .npts mul } forall /filecnt exch 1 add NewIntegerGRID beginLoop pop /filename FORMgetknownnotnull not { (data) } if exch (.img) nicefilename nip loopStream 2 index .npts 512 add (image/ida) mimesubheader } if exch dup tofullname dolongname idaheader new exch store title 200 store image_type 3 store projection 1 index .chunk pop pop .npts store width 1 index .chunk pop nip .npts store height 1 index .chunk pop pop first last add 2 div nip store long_center 1 index .chunk pop nip first last add 2 div nip store lat_center width 2 div store x_center height 2 div store y_center 1 index .chunk pop pop .step store dx 1 index .chunk pop nip .step store dy 0 store lower 254 store upper 0 store decimals 1 index .getscale_factor? { store m } if 1 index .getadd_offset? { store b } if 1 index .getmissing_value? { store missing } if 3 -1 roll 1 index .bytesize dataui1 TaskStreams 1 get 1 NewIntegerBuffer 0 SetStreamIndex* TaskStreams 1 get .achunk pop * 1 index .chunksize dataui1 TaskStreams 0 get 1 NewIntegerBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * nchunk 1 gt { endLoop } if achunk array astore { last VALUE } forall getrealization pop }
BLD -operator-
BLD null
BLD { datatype /stringtype eq { 0 RECHUNK bufferwordsize 1 integerarray astore stringtoname0 TaskStreams 0 get 1 NewNameBuffer } if }
BLD 0 17 object /365 { yearlyedgesgrid365 } def /standard { yearlyedgesgridjd } def /GREGORIAN { yearlyedgesgridjd } def /NOLEAP { yearlyedgesgrid365 } def /noleap { yearlyedgesgrid365 } def /360 { yearlyedgesgrid360 } def /gregorian { yearlyedgesgridjd } def /proleptic_gregorian { yearlyedgesgridjd } def /360_day { yearlyedgesgrid360 } def /365_day { yearlyedgesgrid365 } def
BLD -operator-
BLD -operator-
BLD { { thedata time modelperiod lags egrid } inputs /time time ndim RECHUNK def /thetimegrid time [ streamgrids ] 0 get nip def /egrid2 egrid name cvntos (2) append cvn units gridtype gridvalues NewGRID nip /fullname egrid .fullname def def /egridno thedata egrid gridno nip def egridno thedata .nrdim gt { (the eof grid must be within the chunk as currently written) print error } if /tgridno thedata thetimegrid gridno nip def tgridno thedata .nrdim gt { (the time grid must be within the chunk as currently written) print error } if thedata thetimegrid .step lags { 1 index div exch } forall pop lags length integerarray astore tgridno egridno lt { setcovS thetimegrid time ne { time 3 1 roll lcovar30b } { lcovar30 } ifelse } { (not written yet) print stop } ifelse STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewBuffer pop STREAM TaskParameterBlock m dup mul ns mul nl mul nip NewDoubleBuffer /L dup /real ordered lags NewGRID /fullname (Lag) def def /T dup monthclimoname periodic 0.5 TaskParameterBlock .dt TaskParameterBlock .ns 1 sub 1 index mul 2 index add NewEvenGRID /long_name (month) def def 4 SetStreamIndex* egrid /fullname [ (Lagged) fullname ] def egrid2 T L * /name /covariance def /fullname [ TaskStreams 0 get .fullname maybealoadpop name ] def dup TaskParameterBlock mm ns mul nl mul nip NewDoubleBuffer /name /D1 def /fullname [ TaskStreams 0 get .fullname maybealoadpop name ] def markstreamsymmetric exch 1 index chunksize NewDoubleBuffer /name /D0 def /fullname [ TaskStreams 0 get .fullname maybealoadpop name ] def 3 outputs }
BLD -operator-
BLD -operator-
BLD 0 3 object /point { /surfaceaverage { chunkaverage } def } def /area { /surfaceaverage { surfaceaverage:integral } def myX .units /degree_east eq myY .units /degree_north eq and { /2Dintegral { 2Dintegral:longlat } def } { myX .units /degree_north eq myY .units /degree_east eq and { /2Dintegral { 2Dintegral:latlong } def } { /2Dintegral { 2Dintegral:dxdy } def } ifelse } ifelse } def /dxdy { /surfaceaverage { surfaceaverage:integral } def /2Dintegral { 2Dintegral:dxdy } def } def
BLD -operator-
BLD dcatS record
BLD -operator-
BLD -operator-
BLD -operator-
BLD { get_calendar exch units exch maybeconvertdays units exch monthtimename unitconvertbyattribute name units ordered low scale_factor mul getadd_offset add rm19602ymd pop pop 1 1 ymd2rm1960 12 high scale_factor mul getadd_offset add rm19602ymd pop pop 1 add 1 1 ymd2rm1960 NewEvenGRID /pointwidth 0 def 1 index .add_offset /add_offset exch def 1 index .scale_factor /scale_factor exch def 1 index /standard_name getknown { /standard_name exch def } if 1 index first last gt nip { last first subgrid } if nip exch unitconvertbyattribute exch /units exch def exch /calendar exch def }
BLD -operator-
BLD { chunksize chunksum0 TaskStreams 0 get 1 NewBuffer 0 SetStreamIndex* TaskStreams 0 get .achunk pop * /fullname [ [ ($Sigma sub {) TaskStreams 0 get .chunks== (}$) ] concat fullname ] def }
BLD { exch 5 object exch /datatype /shortarraytype def /bufferwordsize 2 def 2 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD -operator-
BLD -operator-
BLD -operator-
BLD lanheader
BLD { 2 index type dup /realtype eq exch /integertype eq or not { 0 3 1 roll } if 3 index type /objecttype eq { emptyarray 4 1 roll } if { mydata myavggrids mymincntwght myfn myfnname } inputs 23 object mydata SIRecord pop pop mydata .datatype /stringtype eq { mydata .bufferwordsize 1 eq } { true } ifelse { /mydata mydata decompress toNaN def /mygrids mydata myavggrids complementgridarray0 nip def /postprocessgonegrid { dup integralgrid first last subgridvalues partialgrid } def apply1get1sub } { pop null } ifelse }
BLD -operator-
BLD { 3 copy mul add dup 73 div floor 1960 add exch 73 mod dup 0 lt { 73 add } if 5 mul dup 59 gt { 1 index daysperyear 366 eq { 1 add } if } if exch 1 exch 0.5 exch julian_day getadd_offset sub add 0.5 sub nip 3 1 roll }
BLD -operator-
BLD -operator-
BLD { torealorcomplexfilters datatype get exec }
BLD { datatype /stringtype eq { toNaNu1 } { datatype /shortarraytype eq { toNaNshort } if } ifelse datatype /doublearraytype eq { MVtoNaN8 } { toreal MVtoNaN4 streamrescaleinNaN } ifelse }
BLD -operator-
BLD { 4 /weaver: publicproc: weaverparams weaverS new EWNS 3 setdecimal 0 store fine 180 store NX -180 store XL 180 store XH 1 store xper 90 store NY -90 store YL 90 store YH 0 store yper -1 store center 0 store DIST true store ifweave false store ifemphasize }
BLD { exch 5 object exch /datatype /stringtype def /bufferwordsize 1 def 1 NewSizedBuffer0 NewBufferCheck }
BLD -operator-
BLD { (downloadsferret) htmlprint }
BLD 0 11 object /complexdoublearraytype { chunksize 2 mul doubletoreal0 TaskStreams 0 get chunksize NewComplexBuffer } def /namearraytype { } def /integerarraytype { chunksize integertoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /nametype { } def /realtype { } def /shortarraytype { chunksize shorttoreal0 TaskStreams 0 get chunksize NewRealBuffer units /real eq { scale_factor 1 eq { /units /integer cvntos def } if } if } def /doublearraytype { chunksize doubletoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /complexarraytype { } def /longintegerarraytype { chunksize longintegertoreal0 TaskStreams 0 get chunksize NewRealBuffer } def /stringtype { chunksize stringtoreal0 TaskStreams 0 get chunksize NewRealBuffer /bufferwordsize STREAM 1 index get def } def /realarraytype { } def
BLD -operator-
BLD -operator-
BLD -operator-
BLD { get_calendar /360 eq { units cvntos ( since ) search { maybeshiftmonthscales 1 index known { exch 3 -1 roll ( ) search { (-01-01) rsearch { 7 npop } { (-) rsearch { interp 1 sub 30.0 div nip exch (-) rsearch { nip interp dup type /realtype eq { 0.5 add } if cvi 1 sub 3 -1 roll add dup 0.0 eq { 6 npop } { 6 1 roll nip (-01-01) 3 -1 roll ( ) exch 6array astore concat preferredunitname 3 -1 roll 2 object 3 1 roll /units exch def maybeshiftmonthscales units cvntos ( since ) search { nip nip } if getknown { mul } if getadd_offset add /add_offset exch def } ifelse } { 6 npop } ifelse } { 5 npop } ifelse } ifelse } { pop pop pop } ifelse } { pop pop pop } ifelse } { pop } ifelse } if }
BLD -operator-
BLD { counttoobject 3 eq { 0.0 } if 6 /evengridAverage publicproc: 4 1 roll name units gridtype 6 3 roll NewEvenGRID exch regridAverage :publicproc }
BLD -operator-
BLD { units (degreeC) eq { fullname exch name exch 1.8 mul 32 add /units (degreeF) def exch /name exch def exch /fullname exch def } if }
BLD -operator-
BLD { name units gridtype dup periodic eq { pop ordered } if 4 3 roll NewGRID REGRID }
BLD -operator-
BLD -operator-
BLD { (streamhelp) htmlprint }
BLD { UnitsConversion 1 index known { UnitsConversion exch get exec } if }
BLD -operator-
BLD { array astore dup aload length commonachunk1pt null 1 index length object 1 index { name exch def } forall { streams theachunk theachunkobj } inputs streams { dup type /objecttype eq { nrdim mark chunk 2 add index .achunk array astore { name theachunkobj exch known { pop } if } forall theachunk aload pop NewStreamPtr setSIRecord } if } forall streams length 1 add -1 roll pop }
BLD -operator-
BLD { 3 /setpointwidthreplaceGRID publicproc: 1 index 1 object exch /pointwidth exch def replaceGRID :publicproc }
BLD { { stream1 stream2 gridarray Wght Wmin } inputs Wght type /stringtype eq { /Wght stream2 Wght interp nip def } if stream2 dup Wght mul 0 replaceNaN gridarray { stream1 1 index .name getgridbyname nip regridLinear0 } forall exch dataflag Wght mul gridarray { stream1 1 index .name getgridbyname nip regridLinear0 } forall Wmin Wght mul gridarray { 2 copy gridno nip 0 eq { pop } { stream1 1 index .name getgridbyname nip regridLinear0 } ifelse } forall normalize exch .stream1 exch }
BLD -operator-
BLD { get_calendar pentadedgesversions exch get exec }
BLD -operator-
BLD -operator-
BLD -operator-
BLD 0 23 object /monthtime { 2592000 mul } def (months since 1960-01-01)cvn { 2592000 mul } def /month { 2592000 mul } def /year { 2592000 mul } def /date { 2592000 mul } def
BLD -operator-
BLD -operator-
BLD -operator-
BLD 0 17 object /365 { pentadedgesgrid365 } def /standard { pentadedgesgridjd } def /GREGORIAN { pentadedgesgridjd } def /NOLEAP { pentadedgesgrid365 } def /noleap { pentadedgesgrid365 } def /360 { pentadedgesgrid360 } def /gregorian { pentadedgesgridjd } def /proleptic_gregorian { pentadedgesgridjd } def /360_day { pentadedgesgrid360 } def /365_day { pentadedgesgrid365 } def
BLD -operator-
BLD 0 11 object /doublearraytype { chunksize doubletoi10 TaskStreams 0 get chunksize NewI1Buffer } def /realtype { chunksize realtoi10 TaskStreams 0 get chunksize NewI1Buffer } def /shortarraytype { chunksize shorttoi10 TaskStreams 0 get chunksize NewI1Buffer units /real eq { scale_factor 1 eq { /units /integer cvntos def } if } if } def /realarraytype { chunksize realtoi10 TaskStreams 0 get chunksize NewI1Buffer } def /stringtype { } def /integerarraytype { chunksize integertoi10 TaskStreams 0 get chunksize NewI1Buffer } def
BLD -operator-
BLD { counttoobject 1 eq { 0.0 } if 4 /runningAverage publicproc: 4 -1 roll decompress 4 1 roll 3 index .missing_value null eq { pop runningAverage0 } { runningAverageNaN } ifelse :publicproc }
BLD -operator-
BLD -operator-
BLD { { startcolormap 0.0 1.0 RANGE transparent MediumBlue MediumBlue 0.0 VALUE MediumBlue MediumBlue 0.05 bandmax blue blue 0.1 bandmax RoyalBlue RoyalBlue 0.15 bandmax CornflowerBlue CornflowerBlue 0.2 bandmax DeepSkyBlue DeepSkyBlue 0.25 bandmax aquamarine aquamarine 0.3 bandmax MediumAquamarine MediumAquamarine 0.35 bandmax ForestGreen ForestGreen 0.4 bandmax LimeGreen LimeGreen 0.45 bandmax gold gold 0.5 bandmax BrightMustard BrightMustard 0.55 bandmax moccasin moccasin 0.6 bandmax moccasin moccasin 0.65 bandmax DarkOrange DarkOrange 0.7 bandmax OrangeRed OrangeRed 0.75 bandmax red red 0.8 bandmax firebrick firebrick 0.85 bandmax MediumOrchid MediumOrchid 0.9 bandmax DarkOrchid DarkOrchid 0.95 bandmax NavyBlue NavyBlue 1.0 bandmax NavyBlue endcolormap } /percentiles_colors_40 docolorscale }
BLD { { mydataset spatialgrids timegrids nclusters } inputs mydataset spatialgrids aload pop timegrids aload pop spatialgrids length timegrids length add REORDER toNaN spatialgrids timegrids svd nclusters varimax .Ss dup abs spatialgrids maxover div dup 0 flagge spatialgrids average 0.5 flaglt 2 mul 1 exch sub mul [ evrot ] dominant_class spatialgrids REORDER toi4 valid_max stepdarktolightgreenscale /scale_symmetric false def 1output }
BLD { dup type /arraytype eq { 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 3 -1 roll 3 } { exch decompress toNaN exch decompress toNaN 2 } ifelse /BofA=C-bounded publicproc: dup type /arraytype eq { 3 1 roll exch decompress toreal exch decompress toreal 3 -1 roll 3 -1 roll 1 index { gridnobyname dup 0 eq { pop } { gridbyno removeGRID } ifelse } forall 3 1 roll aload length REORDER exch 0 RECHUNK exch } { exch decompress toreal exch decompress toreal } ifelse nptgrids length 1 eq { 1 RECHUNK copyachunk chunk pop toreal copyachunk chunksize 3 index .chunksize 2 integerarray astore dolinint3bounded TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def } { 2 matchachunk chunk pop toreal copyachunk chunksize 3 index .chunksize 2 integerarray astore dolinint3bounded TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /long_name TaskStreams 1 get /long_name getknown not { TaskStreams 1 get .name cvntos } if dup type /arraytype eq { exec } if def /units TaskStreams 1 get .units def } ifelse DATAAUTO :publicproc }
BLD { dup type /stringtype eq { pop } if dup type /arraytype eq { exch decompress 1 index { 2 copy .name getgridbyname nip exch SAMPLE } forall exch aload length REORDER } { decompress } ifelse }
BLD { 0.0 replaceNaN myX integral myX .name exec last VALUE myY integral myY .name exec last VALUE }
BLD -operator-
BLD { 3 /runningAverage publicproc: { boxgrid boxinterval } inputs exch a: boxgrid 0 boxinterval 2 index .step sub shiftdatashort dup boxgrid .name get /pointwidth boxgrid .name cvntos (_lag) append cvn cvx exec .width def step pointwidth exch sub 0.5 mul shiftGRID [ boxgrid .name cvntos (_lag) append cvn cvx exec ] average :a: .nrdim RECHUNK toreal :a: .fullname /fullname exch def :a: .history /history exch def :a: .units /units exch def :a: .name /name exch def (Averaged in ) boxgrid .name cvntos append ( with overlapping interval ) append boxinterval s== append addhistory :a 1output :publicproc }
BLD -operator-
BLD -operator-
BLD 0 11 object /doublearraytype { chunksize doubletoi40 TaskStreams 0 get chunksize NewIntegerBuffer } def /realtype { chunksize realtoi40 TaskStreams 0 get chunksize NewIntegerBuffer } def /shortarraytype { chunksize shorttoi40 TaskStreams 0 get chunksize NewIntegerBuffer units /real eq { scale_factor 1 eq { /units /integer cvntos def } if } if } def /realarraytype { chunksize realtoi40 TaskStreams 0 get chunksize NewIntegerBuffer } def /stringtype { chunksize stringtoi40 TaskStreams 0 get chunksize NewIntegerBuffer /bufferwordsize STREAM 1 index get def } def /integerarraytype { } def
BLD { 5 /regridLinear publicproc: 3 index .missing_value null eq 2 index 1.0 eq and { pop pop dup type /objecttype eq { 2 index 1 index .name getgridbyname nip regridLinear0 } { { 2 index decompress 1 index .name getgridbyname nip regridLinear0 } forall } ifelse } { 1 index 1.0 eq { nip 1 index type /objecttype eq { 3 index 2 index .name getgridbyname nip exch regridLinearNaN } { regridLinearNaNver2 } ifelse } { regridLinearNaNWght } ifelse } ifelse :publicproc }
BLD -operator-
BLD { dup type /arraytype eq { 3 -1 roll decompress toNaN 3 -1 roll decompress toNaN 3 -1 roll 3 } { exch decompress toNaN exch decompress toNaN 2 } ifelse /CofA=B-bounded publicproc: dup type /arraytype eq { 3 1 roll exch decompress exch decompress 3 -1 roll 3 -1 roll 1 index { gridnobyname dup 0 eq { pop } { gridbyno removeGRID } ifelse } forall 3 1 roll aload length REORDER exch 0 RECHUNK exch } { exch decompress exch decompress } ifelse nptgrids length 1 eq { 1 RECHUNK copyachunk chunk pop toreal copyachunk exch chunksize 3 index .chunksize 2 integerarray astore dolinint3bounded TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def } { 2 matchachunk chunk pop toreal copyachunk exch chunksize 3 index .chunksize 2 integerarray astore dolinint3bounded TaskStreams 0 get 1 object /datatype TaskStreams 1 get .datatype def chunksize NewBuffer /name TaskStreams 1 get .name def /fullname [ TaskStreams 1 get .fullname dup type /arraytype eq { aload pop } if TaskStreams 0 get .fullname dup type /arraytype ne { 1 array astore } if ] def /long_name TaskStreams 1 get /long_name getknown not { TaskStreams 1 get .name cvntos } if dup type /arraytype eq { exec } if def /units TaskStreams 1 get .units def } ifelse DATAAUTO :publicproc }
BLD { 4 /definite-integral publicproc: { stream grid ifrom ito } inputs /mygridname grid .name cvx def /thegrid { mygridname exec } def stream grid integral thegrid ifrom dup type /stringtype eq { readoffgridunits } if ito dup type /stringtype eq { readoffgridunits } if 2 copy exch sub exch silentGRID dup thegrid last VALUE exch thegrid first VALUE sub 1output :publicproc }
BLD { npts 1 gt { mygridsdict name known { .npts { countifknown } /countif myvars ! } { .npts mul } ifelse } { pop } ifelse }
BLD -operator-
BLD { 4 /k-means_svddiff_init publicproc: { mydataset spatialgrids timegrids nclusters } inputs mydataset spatialgrids aload pop timegrids aload pop spatialgrids length timegrids length add REORDER toNaN dup spatialgrids average sub spatialgrids timegrids svd .Ss ev 1 nclusters 1 sub RANGE grid: /name /ss def values: -1 1 :values :grid mul [ ss ev ] dominant_class /CLIST undef /name /mode def classify dup spatialgrids average [ mode ] sort_by [ rank ] dominant_class nclusters min /valid_max nclusters def /scale_max nclusters def spatialgrids REORDER toi4 nclusters stepdarktolightgreenscale /scale_symmetric false def 1output :publicproc }
BLD -operator-
BLD { (datafiles) htmlprint }
BLD -operator-
BLD { -operator- -operator- -operator- /realtype -operator- -operator- /integertype -operator- -operator- { 3 1 -operator- -operator- -operator- /objecttype -operator- { emptyarray } -operator- null 1 -operator- -operator- -operator- -operator- { name -operator- -operator- } -operator- -operator- decompress -operator- [ -operator- [ streamgrids -operator- { 2 -operator- .name -operator- { -operator- } { -operator- } -operator- } -operator- -operator- -operator- 3 -1 -operator- } { -operator- -operator- /objecttype -operator- { emptyarray } -operator- null 1 -operator- -operator- -operator- -operator- { name -operator- -operator- } -operator- -operator- decompress -operator- [ -operator- [ streamgrids -operator- { 2 -operator- .name -operator- { -operator- } { -operator- } -operator- } -operator- -operator- -operator- } -operator- }
BLD { 0 RECHUNK copyachunk placelabelsS new 20 store nx 10 store ny 1 index .achunk 1 sub { pop } repeat .npts store npplt 2 index .npts store npts 4 index .plotfirst store xl 4 index .plotlast store xh 3 index .plotfirst store yl 3 index .plotlast store yh placelabels0 TaskStreams 0 get TaskParameterBlock nx ny mul 3 mul nip NewBuffer /J TaskParameterBlock nx ny mul nip NewIntegerGRID name exch def 1 SetStreamIndex* J TaskStreams 3 get .achunk pop * TaskStreams 1 get TaskParameterBlock nx ny mul 3 mul nip NewBuffer 1 index .J name exch def 1 SetStreamIndex* J TaskStreams 3 get .achunk pop * TaskStreams 3 get TaskParameterBlock nx ny mul 3 mul nip NewBuffer 1 index .J name exch def 1 SetStreamIndex* J TaskStreams 3 get .achunk pop * 3 { 3 1 roll TaskStreams 3 get .achunk 1 sub { pop } repeat last VALUE } repeat }
BLD { 2 index type dup /realtype eq exch /integertype eq or not { 0 3 1 roll } if 3 index type /objecttype eq { emptyarray 4 1 roll } if { mydata myavggrids mymincntwght myfn myfnname } inputs 23 object mydata SIRecord pop pop mydata .datatype /stringtype eq { mydata .bufferwordsize 1 eq } { true } ifelse { /mydata mydata decompress toNaN def /mygrids mydata myavggrids complementgridarray0 nip def /postprocessgonegrid { null } def apply1get1sub } { pop null } ifelse }
BLD { dup /SIRecord known { dup /bufferSIRecord known { bufferSIRecord SIRecord ne { /bufferSIRecord SIRecord def } if } { /bufferSIRecord SIRecord def } ifelse } if }
BLD { { D mX mY mX2 mY2 oalpha ox oy } inputs /D D mX mY 2 REORDER toNaN def D X copyachunk Y copyachunk mX2 copyachunk mY2 copyachunk rotS new X .npts store N Y .npts store M mX2 .npts store Np mY2 .npts store Mp oalpha store alpha ox store olong oy store olat rotatedata0 STREAM TaskParameterBlock Np Mp mul 2 mul nip NewBuffer pop STREAM TaskParameterBlock Np Mp mul nip NewBuffer pop STREAM TaskParameterBlock Np Mp mul nip NewBuffer pop TaskStreams 0 get TaskParameterBlock Np Mp mul nip NewBuffer 2 SetStreamIndex* mX2 mY2 TaskStreams 0 get .achunk pop * [ (Rotated by ) oalpha s== ( and regridded) ] concat addhistory /missing_value NaN def nip }
BLD { datatype datatypearrayCases exch get exec }
BLD -operator-
BLD { { instream gridin gridout Wmin } inputs instream decompress 0 replaceNaN gridin gridout regridAverageSP0 exch instream dataflag gridin gridout regridAverageSP0 exch .Wmin normalize }
BLD -operator-
BLD -operator-
BLD -operator-
BLD { 1 integerarray astore cfft1di0 STREAM TaskParameterBlock 0 get 15 add NewComplexBuffer 1 SetBuffernchunk /I TaskParameterBlock 0 get 15 add NewIntegerGRID name exch def 1 SetStreamIndex* I * /name /coeffs def }
BLD 0 11 object /boxgrid { boxgridname exec } def
BLD { exch 1 index 1 index .streamgrids .name get sample-along bumpyAvgS new null store WGHT 3 index 3 index .streamgrids gridstride nip store NX 2 index .npts store NT 3 index .chunksize NX div NT div store NR 4 -2 roll 1 index .datatype /doublearraytype eq { todouble } if 1 RECHUNK copyachunk 4 2 roll 1 index .datatype /doublearraytype eq { bumpyaverageDPfix00 } { bumpyaveragefix00 } ifelse TaskStreams 0 get chunksize NewBuffer }
BLD 0 2 object /attach -operator- def /release -operator- def
4 is not legal as a grid for grididError 404 Not Found

Error 404: Page Not Found

Error line: 81 anhtmlserverefize 64000000 def store

Error on line 0 of stdin: interpreter thinks " error" not defined

Show Current Objects

1000