tmn | -operator- |
tmn | { 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 } |
tmn | 1.0 |
tmn | { pusharraylevel getleft exch aload length 1 add getright exch { dolongname0 exch dolongname0 exch space exch append append } repeat poparraylevel } |
tmn | 0 |
tmn | 0.0 |
tmn | { 2 combinehistory } |
tmn | null |
tmn | { getscale_factor? not { 1.0 } { exec dup type /stringtype eq { interp } if } ifelse } |
tmn | { arraylevel 1 sub /arraylevel STREAM ! } |
tmn | { 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 } |
tmn | unitless |
tmn | { 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 } |
tmn | { 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 } |
tmn | { currentobject /scale_factor getknown } |
tmn | ({[() |
tmn | { 1 index 2 add copy pop array astore true exch { safeifGRID nip and } forall { pop { pop } repeat null } { combinefullname } ifelse } |
tmn | /==alias |
tmn | { 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 } |
tmn | { 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 } |
tmn | { arraylevel 1 add /arraylevel STREAM ! } |
tmn | { currentobject /missing_value getknownnotnull } |
tmn | { getadd_offset? not { 0.0 } { exec dup type /stringtype eq { interp } if } ifelse } |
tmn | { currentobject /add_offset getknown } |
tmn | { fullname dolongname } |
tmn | { getmissing_value? not { null } if } |
tmn | { -1 (,) combinefullname } |
tmn | { 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 } |
tmn | (}])) |
tmn | { lefts arraylevel lefts length mod 1 getinterval } |
tmn | { rights arraylevel rights length mod 1 getinterval } |
tmn | { currentobject /missing_value knownnotnull } |
tmn | { 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 } |
tmn | (1PG13.6) |
tmn | varimaxS |
tmn | { :table } |
tmn | { 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 } |
tmn | { 1 /STEP0 /STEP allstreams1 } |
tmn | { 3 /flexseastotAvgFill publicproc: { mystream daterange minfrac } inputs mystream T daterange minfrac seasonalAverage T differential_mul :publicproc nip } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 0 { 1 index .dataset dup null eq { pop pop } { 1 index .name get replaceGRID } ifelse } /replacewithdatasetGRID allstreams1 } |
tmn | { 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 } |
tmn | { dup /references known not { dataset type /objecttype eq { .dataset getdatasetwithreferences } { pop null } ifelse } if } |
tmn | { { /rootmeansqanom0 (root mean sq anom) apply1get12scr } /rootmeansqanom gridarray1fn } |
tmn | [ null ] |
tmn | FilterSet
/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
/gridtype { pop name /T eq { monthlyedgesgrid partialgrid monthtimegrid } if } def
|
tmn | { null 3 1 roll /donopdefasvarsilent cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch def } |
tmn | { currentobject totype /datasettype eq { currentobject { pop } { } foralldatasets2 } if } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | tblS |
tmn | 0 5 object
(LF (unix))cvn (LF) def
(CR (Mac))cvn (CR) def
(CR-LF (DOS/Windows))cvn (CRLF) def
|
tmn | { 3 /splitstreamgrid publicproc: exch .name cvlit exch 2 array astore cvx splitstreamgridcase 1 object exch /filterargs exch def datasetexec :publicproc } |
tmn | /cptv10 |
tmn | { pushallargs pushproc doifstream popproc popallargs } |
tmn | false |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 2 /dominant_class publicproc: 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 dup /CLIST known { /CLIST CLIST dup type /namearraytype eq { { cvntos } forall } { { s== } forall } ifelse CLIST length array astore def /units /ids def } { /units /ids def CE CS sub 10 lt { /CI 1 def } if } ifelse /missing_value 0 def nip :publicproc } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { getSRS dup null eq not { srtext2crsid } if dup null eq { pop (CRS:1) } if } |
tmn | { 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 } |
tmn | { gridarray1hold astore pop dup type /objecttype eq { emptyarray exch } if 0 gridarray1hold aload pop allstreams1 } |
tmn | { 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 } |
tmn | FilterSet
/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
/gridtype { pop 1 index .name 1 index .name eq { pop monthlyedgesgrid partialgrid monthtimegrid } { pop } ifelse } def
|
tmn | { 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 } |
tmn | { 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 } |
tmn | 0 47 object
/messagetype { (not ready for datatype) error } def
/stringtype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def
/figobjecttype { (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
/giffiletype { (not ready for datatype) error } def
/datasettype { (not ready for datatype) error } def
/integerarraytype { cptv10tsv0i4 } def
/streamtype { (not ready for datatype) error } def
/doublearraytype { cptv10tsv0r8 } def
/pendingdatasettype { (not ready for datatype) error } def
/htmlfiletype { (not ready for datatype) error } def
/jpegfiletype { (not ready for datatype) error } def
/objecttype { (not ready for datatype) error } def
/gridtype { (not ready for datatype) error } def
/booleantype { (not ready for datatype) error } def
/nametype { (not ready for datatype) error } def
/imageobjecttype { (not ready for datatype) error } def
/figviewtype { (not ready for datatype) error } def
/geometrytype { (not ready for datatype) error } def
/realtype { (not ready for datatype) error } def
/realarraytype { cptv10tsv0r4 } def
/namearraytype { (not ready for datatype) error } def
/shortarraytype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def
/bytearraytype { 6 -1 roll toi4 6 1 roll cptv10tsv0i4 } def
/integertype { (not ready for datatype) error } def
/arraytype { (not ready for datatype) error } def
/xmlfiletype { (not ready for datatype) error } def
/htmlprinttype { (not ready for datatype) error } def
/linktype { (not ready for datatype) error } def
|
tmn | false |
tmn | { ndim 1 eq { dup /buffer get GRIDParent /buffer get eq } { false } ifelse } |
tmn | { dodatasetfilters 3 object exch /nonull? exch def exch /streamtype exch def exch /gridtype exch def filtersetexec } |
tmn | { 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 } |
tmn | null |
tmn | { (downloadsCPT) htmlprint } |
tmn | [ null null ] |
tmn | { 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 } |
tmn | { { complementgridarray { minfnof0 minfnof0dp } (min) apply1get1nocount } /minover gridarray1fn } |
tmn | 0 5 object
|
tmn | { 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 } |
tmn | { (rdf) xmlprint } |
tmn | { null 3 1 roll /dodefasvarsilent cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch pdef } |
tmn | FilterSet
/streamtype { 2 index 2 index known { exch cvx exec exch shiftGRID0 } { pop pop } ifelse } def
/gridtype { 2 index .name 2 index eq { nip shiftGRIDgrid nip } { pop pop } ifelse } def
|
tmn | { dup { pop } { realize pop } foralldatasets2 } |
tmn | { 2 /poestudnt2 publicproc: { A dof } inputs A dup type /objecttype eq not { c: exch :c } if todouble toNaN8 chunksize dof 2 integerarray astore poestudnt20 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /poestudnt2 A .fullname ] def 1output :publicproc } |
tmn | { CS } |
tmn | { [ 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 } |
tmn | { { /meansq0 (mean sq) apply1get1_complementgrids } /meansqover gridarray1fn } |
tmn | { (subdatasets) htmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 2 array astore cvx defasvarsilent } |
tmn | { dup { pop } { realizenew pop } foralldatasets2 } |
tmn | { 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 } |
tmn | { CE } |
tmn | { currentobject 3 1 roll cvx /dodefasvar cvx 4 array astore cvx dup 1 get exch pdef } |
tmn | { rootmeansqover } |
tmn | FilterSet
/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
/gridtype { pop 1 index .name 1 index .name eq { pop pentadedgesgrid (pentads since 1961-01-01) gridunitconvert partialgrid } { pop } ifelse } def
|
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 3 /RANGESTEP0 /RANGESTEP allstreams1 } |
tmn | { dup { pop } { rerealize pop } foralldatasets2 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { currentobject 3 1 roll cvx /dodefasvarKeepRestrictions cvx 4 array astore cvx dup 1 get exch pdef } |
tmn | { 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 } |
tmn | tableobject |
tmn | { 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 } |
tmn | { 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 } |
tmn | CaseList
/pendingdatasettype { exec 1 index caseexec } def
/datasettype { notyetwritten } def
/nonull false def
|
tmn | { (downloadsNCL) htmlprint } |
tmn | { /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 } |
tmn | { 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 } |
tmn | { mark 1 index .allnames counttomark namearray astore nip cvnatoslurl } |
tmn | { counttoobject /SELECTVALUES0 /SELECT allstreams1 } |
tmn | { false 1 index DATASETbot ==noprintdataset { ifvarcase caseexec } forsome } |
tmn | { (wms) xmlprint } |
tmn | { currentobject 3 1 roll cvx /dodefasvarsilentKeepRestrictions cvx 4 array astore cvx dup 1 get exch pdef } |
tmn | { 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 } |
tmn | FilterSet
/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
/gridtype { pop 1 index .name 1 index .name eq { pop dailyedgesgrid partialgrid } { pop } ifelse } def
|
tmn | { table: } |
tmn | { WWWinfo .url-q (") rsearch pop pop pop redirectto } |
tmn | { 2 array astore cvx nopdefasvarsilent } |
tmn | { /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 } |
tmn | { 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 } |
tmn | { (missingfiles) htmlprint } |
tmn | CaseListpops2
/gridtype { pop pop pop true leave } def
|
tmn | { 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 } |
tmn | { 4 /flexseasonalfreqGT publicproc: { mystream daterange thold minfrac } inputs mystream thold flaggt T daterange minfrac seasonalAverage T differential_mul :publicproc nip } |
tmn | { 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 } |
tmn | { { complementgridarray /rootmeansqanom0 (root mean sq anom) apply1get12scr } /rootmeansqover gridarray1fn } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { dup totype /figviewtype eq } |
tmn | { 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 } |
tmn | { get_scale_min number? { getscale_factor mul getadd_offset add } if } |
tmn | { 2 /poestudnt publicproc: { A dof } inputs A todouble toNaN8 chunksize dof 2 integerarray astore poestudnt0 TaskStreams 0 get TaskParameterBlock 0 get NewBuffer /fullname [ /poestudnt A .fullname ] def 1output :publicproc } |
tmn | { 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 } |
tmn | 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
|
tmn | { 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 } |
tmn | FilterSet
/streamtype { currentobject 2 index known { exch cvx exec exch splitstreamgridstream } { pop pop } ifelse } def
/gridtype { pop pop } def
|
tmn | { 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 } |
tmn | { (outline) htmlprint } |
tmn | { appendprep 0 { appendstream } /appenddataset allstreams1 currentfilepattern 0 get -1 ne { /filepattern currentfilepattern 0 get def } if } |
tmn | { get_scale_max number? { getscale_factor mul getadd_offset add } if } |
tmn | { { /rootmeansq0 (root mean sq) apply1get1 } /rootmeansq gridarray1fn } |
tmn | { cptv10_sub DoTasks stop } |
tmn | 0 23 object
/InitCond { store initp } def
/CropName { store Crop } def
/calib { store rho } def
/InitKcStart { store InitKc } def
/LateKcEnd { store EndKc } def
/InitDays { store InitD } def
/MidKcStart { store MidKc } def
/VegKcStart { store VegKc } def
/MidDays { store MidD } def
/WBS WBS def
/VegDays { store VegD } def
/LateKcStart { store LateKc } def
/PlantDday { store PlDd } def
/PlantDmonth { store PlDm } def
/LateDays { store LateD } def
|
tmn | { { /total0 (total) apply1get1_complementgrids } /sum gridarray1fn } |
tmn | { 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 } |
tmn | 0 5 object
/doublearraytype { bounds2indexR8 } def
/integerarraytype { bounds2indexI4 } def
/realarraytype { bounds2indexR4 } def
|
tmn | { mark ingridcachedir 2 index .allnames counttomark namearray astore nip cvnatofilename } |
tmn | { valid_min } |
tmn | { counttoobject /RANGESPAN0 /RANGESPAN allstreams1 } |
tmn | { (figviewer) htmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { null 3 1 roll /dodefasvarsilentnoreuse cvx 4 array astore cvx dup 0 currentobject put dup 1 get exch pdef } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { (inventory) htmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { streamdefCases 1 index totype get exec } |
tmn | { counttoobject /VALUES0 /VALUES allstreams1 } |
tmn | { 2 array astore cvx defasvarcachesilent } |
tmn | { (wcs) xmlprint } |
tmn | { fullnamegen } |
tmn | null |
tmn | { 4 /flexseasonalfreqLT publicproc: { mystream daterange thold minfrac } inputs mystream thold flaglt T daterange minfrac seasonalAverage T differential_mul :publicproc nip } |
tmn | { counttoobject /RANGEEDGES0 /RANGEEDGES allstreams1 } |
tmn | { 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 } |
tmn | { (downloadsICASA) htmlprint } |
tmn | FilterSet
/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
/gridtype { pop 1 index .name 1 index .name eq { pop dekadaledgesgrid partialgrid } { pop } ifelse } def
|
tmn | { dataset /last_modified known { /last_modified dataset .last_modified def } if dataset /expires known { /expires dataset .expires def } if inheritdatarestrictions } |
tmn | { 3 /shiftGRID publicproc: exch .name cvlit exch 2 array astore cvx shiftGRIDFS 1 object exch /filterargs exch def datasetexec :publicproc } |
tmn | { nip { precip tempavg tempamp myTAW mygrid geolocations params } inputs NEWDATASET /fullname { name } def /name /water_balance def precip dup dup mygrid .name get -6 1 0 shiftdatashort mygrid .name cvntos (_lag) append interp 0.0 add 0 maskle 2 replaceNaN div mygrid .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 0 max geolocations dup length 5 eq { 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 /units (km) def [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /distance add_variable exch } { dup 0 get exch dup 1 get exch 2 get 3 -2 roll 2 array astore weighted-average } ifelse precip /colorscalename getknown not { rainbowcolorscale } { exec } ifelse /long_name (water run off) def /units (mm) def [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /Runoff add_variable precip geolocations dup length 5 eq { pop } { dup 0 get exch dup 1 get exch 2 get 3 -2 roll 2 array astore weighted-average } ifelse Runoff sub precip /colorscalename getknown not { rainbowcolorscale } { exec } ifelse /long_name (effective precipitation) def [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /Peffective add_variable precip dup dup mygrid .name get dup yearlyedgesgrid first subgrid gridvalues 0 get cvsunits 10 5 getinterval (days since) exch append (-01-01) append nip streamgridunitconvert mygrid .name get 0.5 add 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 [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER dup mygrid .name get 3 -1 roll mygrid .name get .units streamgridunitconvert geolocations dup length 5 eq { pop } { pop } ifelse rainbowcolorscale /long_name (extraterrestrial radiation) def /units (MJ/m2/day) def /RA add_variable tempavg 17.799999 add tempamp 0.01 max sqrt mul geolocations dup length 5 eq { 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 rainbowcolorscale /scale_symmetric false def /units (mm) def /long_name (reference evapotranspiration) def [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /ETref add_variable precip geolocations dup length 5 eq { pop } { dup 0 get exch 1 get 3 -1 roll 2 { 1 index first VALUE exch removeGRID } repeat } ifelse 0 replaceNaN 0 mul 1 add dup dup mygrid .name get /Ss renameGRID [ Ss ] REORDER CopyStream Ss 366 pad0 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 asum mygrid .name renameGRID nip dup mygrid .name get 1 array astore regridAverage nip /units (unitless) def /long_name params .Crop ( crop Cultivar) append def /Kc add_variable Kc ETref mul /long_name params .Crop ( crop evapotranspiration) append def [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /ETcrop add_variable dup dup mygrid .name get -1 shiftGRID myTAW params .initp interp mul ETcrop dup mygrid .name get first VALUE mygrid .name removeGRID 0.0 mul add Peffective mygrid .name get beginLoop dup params .rho interp myTAW mul div 1 min ETcrop mul -1 mul add Peffective add myTAW min endLoop nip dup dup mygrid .name get last VALUE dup mygrid .name get 1 shiftGRID dup params .rho interp myTAW mul div 1 min ETcrop mul -1 mul add Peffective add myTAW min 1 index .chunk array astore REORDER appendstream /long_name (soil moisture) def /SM add_variable SM dup mygrid .name get 1 shiftGRID myTAW params .rho interp mul div 1.0 min ETcrop mul /long_name params .Crop ( reduced crop evapotranspiration) append def /ETcrop_red add_variable SM dup mygrid .name get 1 array astore REORDER dup mygrid .name get differences dup mygrid .name get 0.5 shiftGRID -1.0 mul Peffective add ETcrop_red sub [ [ streamgrids ] { name mygrid .name eq { pop } if } forall ] REORDER /long_name (water drained) def /units (mm) def /Drain add_variable geolocations dup length 5 eq { 4 get /the_geom add_variable } { 2 get /the_geom add_variable } 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 } |
tmn | { counttoobject /RANGE0 /RANGE allstreams1 } |
tmn | { rootmeansqanom } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { dup { pop } { buffer null eq { CopyStream } if bufferSIRecord SIRecord ne { CopyStream } if cachevardirname VBattachfile pop } foralldatasets2 } |
tmn | { currentobject /long_name known { mark exch dup type /arraytype eq { aload length 1 lt { null } if } if pop long_name ] } if } |
tmn | { dup type /objecttype eq { 0.0 } if 2 /monthlyAverage publicproc: monthlyAverageFS 1 object exch /filterargs exch def datasetexec :publicproc } |
tmn | { dup type /integertype eq { array astore } if 1 index totype /gridtype eq { aload length REORDER0 } { 0 { aload length REORDER0 } /REORDER allstreams1 } ifelse } |
tmn | { counttoobject dup 1 eq { pop ev exch 1 exch RANGE } { pop ev 3 1 roll RANGE } ifelse varimax: :varimax } |
name | /==alias |
tmn | { 1 /varimax: publicproc: varimaxS new 9.99999975E-05 store EPS 0.001 store DELTA 5 store MAXIT } |
tmn | { 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 } |
tmn | 0 11 object
/spatial-mean { svdparams /spatial-mean? true put } def
/gappy-data? false def
/temporal-mean { svdparams /temporal-mean? true put } def
/gappy-data { svdparams /gappy-data? true put } def
/spatial-mean? false def
/temporal-mean? false def
|
tmn | { /gz /mimesuffix WWWinfo ! cptv10_sub togzip DoTasks stop } |
tmn | { rootmeansqanomover } |
tmn | { (dodsdatasets) htmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { (dataselection) htmlprint } |
tmn | { dup type /objecttype eq { dup .from exch .to RANGE } { 1 { VALUE0 } /VALUE allstreams1 } ifelse } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { decompress mark exch nptgrids aload pop counttomark 1 add -2 roll nip } |
tmn | { { /rootmeansq0 (root mean sq) apply1get1_complementgrids } /rootmeansqover gridarray1fn } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { (downloadsGrADS) htmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | 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
|
tmn | { pushdataset currentdataset dup 10 object /streamcount 0 def exch DATASETbot ==noprintdataset { doifstreamdef } forsome streamcount 0 ne { /streamcount undef } { pop null } ifelse popdataset } |
tmn | { counttoobject 1 add /average publicproc: dup /keepgrids eq { pop { /mean0 (mean) apply1get1_complementgrids_keepgrids } /average gridarray1fn } { { /mean0 (mean) apply1get1_complementgrids } /average gridarray1fn } ifelse :publicproc } |
tmn | { dup /column_name known { column_name } { dup /long_name known { long_name } { name cvntos } ifelse } ifelse } |
tmn | 0 11 object
/flatness { store flat } def
/forder { store ford } def
/attenuation { store att } def
/filterType { store ft } def
/buttS buttS def
/freqCut2 { store w2 } def
|
tmn | { 2 array astore cvx defasvarcachedecompresssilent } |
tmn | { 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 } |
tmn | { /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 } |
tmn | { [ 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 } |
tmn | 0 11 object
|
tmn | definingtableWords |
tmn | 0 5 object
/stringtype /stringtype def
/namearraytype /namearraytype def
|
tmn | { dup /description known not { dataset type /objecttype eq { .dataset getdatasetwithdesc } if } if } |
tmn | { valid_max } |
tmn | { { complementgridarray { maxfnof0 maxfnof0dp } (max) apply1get1nocount } /maxover gridarray1fn } |
tmn | { definingtable exch } |
tmn | { rootmeansq } |
tmn | { 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 } |
tmn | { 2 /setmissing_value publicproc: setmissingvalueCase 1 object exch /filterargs exch def datasetexec :publicproc } |
tmn | { 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 } |
tmn | { 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 } |
tmn | FilterSet
/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
/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
|
tmn | { 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 } |
tmn | { mark 3 1 roll subnamearray0 } |
tmn | { appendprep 0 { appendstreamsilent } /appenddatasetsilent allstreams1 currentfilepattern 0 get -1 ne { /filepattern currentfilepattern 0 get def } if } |
tmn | { (auxinfo) xmlprint } |
tmn | { 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 } |
tmn | { 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 } |
tmn | FilterSet
/streamtype { getmissing_value null eq { pop } { exch 1 index replaceNaN exch /missing_value exch def } ifelse } def
/gridtype { pop } def
|
tmn | { { /meansq0 (mean sq) apply1get1 } /meansq gridarray1fn } |
tmn | 0 23 object
/wctS wctS def
/spof { store fN } def
/nat { store mu } def
/spog { store gN } def
/surva { store alphaexp } def
/del { store x } def
/survb { store betaexp } def
/spr { store C } def
/rec { store r } def
/popu { store d } def
/infk { store k } def
/infv { store v } def
/feednu { store nu } def
/feedh { store h } def
/feedf { store fu } def
/feedg { store gu } def
|
tmn | { 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 } |
tmn | { 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 } |
tmn | [ null ] |
tmn | FilterSet
/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
/gridtype { pop 1 index .name 1 index .name eq { pop yearlyedgesgrid partialgrid } { pop } ifelse } def
|
tmn | { 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 } |
tmn | { 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 } |
tmn | CaseList
/messagetype { pop pop } def
/stringtype { pop pop } def
/figobjecttype { pop pop } def
/nulltype { pop pop } def
/marktype { pop pop } def
/operatortype { pop pop } def
/giffiletype { pop pop } def
/datasettype { doallstreams dup null eq { pop undef } { /dataset 3 index def def /streamcount streamcount 1 add def } ifelse } def
/integerarraytype { 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
/doublearraytype { pop pop } def
/pendingdatasettype { dup xcheck { nip currentdataset exch exec nip name exch doifstreamdef } { pop pop } ifelse } def
/htmlfiletype { pop pop } def
/jpegfiletype { pop pop } def
/objecttype { 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
/booleantype { pop pop } def
/nametype { 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
/geometrytype { pop pop } def
/realtype { pop pop } def
/realarraytype { pop pop } def
/namearraytype { pop pop } def
/shortarraytype { pop pop } def
/integertype { pop pop } def
/arraytype { dup xcheck { nip currentdataset exch exec nip name exch doifstreamdef } { pop pop } ifelse } def
/xmlfiletype { pop pop } def
/htmlprinttype { pop pop } def
/linktype { pop pop } def
|
tmn | { 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 } |
tmn | { 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 } |
tmn | FilterSet
/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
/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
|
tmn | { 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 } |
tmn | { (downloadsGeoTiff) htmlprint } |
name | /==alias |
tmn | { 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 } |
tmn | { 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 } |
tmn | { 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 } |
tmn | { false 1 index DATASETbot ==noprintdataset { ifgridcase caseexec } forsome } |
tmn | { (thredds) xmlprint } |
tmn | { (datasetdataselection) htmlprint } |
tmn | { (datasethelp) htmlprint } |
tmn | DATASET |
tmn | { (datasettables) htmlprint } |
tmn | { (olddatasetsearches) htmlprint } |
tmn | { dup /index.html known { index.html } { (dataset) htmlprint } ifelse } |
tmn | { (dataset) xmlprint } |
tmn | { insertdataset0: :insertdataset exch name dataset dup null eq { pop pop pop } { ! } ifelse } |
tmn | 0 47 object
/messagetype false def
/stringtype { false } def
/figobjecttype { false } def
/nulltype { false } def
/marktype { false } def
/operatortype { false } def
/giffiletype { false } def
/datasettype { RestrictMetaData? not } def
/integerarraytype { false } def
/streamtype { RestrictMetaData? not } def
/doublearraytype { false } def
/pendingdatasettype { true } def
/htmlfiletype { false } def
/jpegfiletype { false } def
/objecttype { false } def
/gridtype { false } def
/booleantype { false } def
/nametype { false } def
/imageobjecttype { false } def
/figviewtype { false } def
/geometrytype { false } def
/realtype { false } def
/realarraytype { false } def
/namearraytype { false } def
/shortarraytype { false } def
/integertype { false } def
/arraytype { dup xcheck { dup length 3 eq { dup 2 get /readfilein eq { exec ifBUTTON } { true } ifelse } { dup length 4 eq { dup 3 get /readfileinto eq { exec ifBUTTON } { true } ifelse } { true } ifelse } ifelse } { false } ifelse } def
/xmlfiletype { false } def
/htmlprinttype { false } def
/linktype { false } def
|
tmn | { (datasetsearches) htmlprint } |
adataset | DATASET |
tmn | { (threddsv1) xmlprint } |
tmn | { ifSTREAM { STREAM /==do get exec } { longname print html? { ([) print dup length 100 gt { (...) print } { dup DATASETbot ==noprintdatasetshort { ifBUTTON { safeifGRID nip { ==showlinks? { dup cvpops htmlpathpush htmlpath! htmlpathpop } if cvntos (.cdf) search { nip nip } if (.cuf) search { nip nip } if () print print () print ==showlinks? { () print } if (
) print } { dup cvntos (.html) search { pop pop pop ==showlinks? { () print } if } { pop ==showlinks? { dup cvpops htmlpathpush htmlpath! htmlpathpop } if } ifelse cvntos (.cdf) search { nip nip } if (.cuf) search { nip nip } if () print print () print ==showlinks? { () print } if (
) print } ifelse } { pop pop } ifelse } forsome } ifelse (]) print } { ([) print dup length 100 gt { (...) print } { dup DATASETbot netCDFskip { ifBUTTON { pop cvx == } { pop pop } ifelse } forsome } ifelse (]) print } ifelse } ifelse } |
tmn | { ifBUTTONcase caseexec } |
tmn | { (datasetdatafiles) htmlprint } |
tmn | { dup /ifDATASET known } |
tmn | { (dataset) htmlprint } |
tmn | (Wed 10 Jul 2013 18:28:10 BST : User ianharris : Program makegridsauto.for called by update.for) |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /tmp { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.tmp.dat.nc) readdatafile: /name (tmp) def /units (Celsius_scale) cvn def /correlation_decay_distance 1200.0 def /missing_value 9.96920997E36 def /long_name (near-surface temperature) def /standard_name (air_temperature) def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
Y | grid: /Y (degree_north) ordered (89.75S) to (89.75N) by 0.5 N= 360 pts :grid |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /frs { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.frs.dat.nc) readdatafile: /name (frs) def /correlation_decay_distance 750.0 def /units /days def /missing_value 9.96920997E36 def /long_name (ground frost frequency) def /realarraytype netcdfrecords :readdatafile startcolormap DATA 0 31 RANGE transparent white white 0 VALUE 212 245 255 RGB RGBdup 1 bandmax 202 239 252 RGB RGBdup 2 bandmax 188 222 244 RGB RGBdup 4 bandmax 173 205 237 RGB RGBdup 6 bandmax 159 188 229 RGB RGBdup 8 bandmax 145 171 221 RGB RGBdup 10 bandmax 131 154 214 RGB RGBdup 12 bandmax 116 137 206 RGB RGBdup 14 bandmax 102 121 198 RGB RGBdup 16 bandmax 88 104 191 RGB RGBdup 18 bandmax 73 87 183 RGB RGBdup 20 bandmax 59 70 176 RGB RGBdup 22 bandmax 45 53 168 RGB RGBdup 24 bandmax 31 36 160 RGB RGBdup 26 bandmax 16 19 153 RGB RGBdup 28 bandmax 0 0 138 RGB RGBdup 31 bandmax 0 0 138 RGB endcolormap } dodefasvarsilent } |
X | grid: /X (degree_east) periodic (179.75W) to (179.75E) by 0.5 N= 720 pts :grid |
tmn | (Data restrictions: for academic research use only.Contact BADC for details) |
tmn | (BADC ) |
tmn | [ /UEA /CRU /TS4p07 /monthly ] |
tmn | (CF-1.4) |
tmn | { (/local/datalib/DataCatalog/entries/UEA/CRU/TS4p07/monthly/) /index.tex readfilein } |
BADC Documentation Page | link: /name (BADC Documentation Page) def /href (http://badc.nerc.ac.uk/view/badc.nerc.ac.uk__ATOM__ACTIVITY_0c08abfc-f2d5-11e2-a948-00163e251233) def :link
|
tmn | { (/local/datalib/DataCatalog/entries/UEA/CRU/TS4p07/monthly/) /dataset_documentation.html readfilein } |
tmn | (CRU TS4.07) |
tmn | (Data held at British Atmospheric Data Centre, RAL, UK.) |
tmn | 1705583925 |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /cld { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.cld.dat.nc) readdatafile: /name (cld) def /correlation_decay_distance 600.0 def /missing_value 9.96920997E36 def /units /percentage def /long_name (cloud cover) def /standard_name (cloud_area_fraction) def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /dtr { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.dtr.dat.nc) readdatafile: /name (dtr) def /units (degree_Celsius) cvn def /missing_value 9.96920997E36 def /long_name (diurnal temperature range) def /correlation_decay_distance 750.0 def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
T | grid: /T (months since 1960-01-01) ordered (Jan 1901) to (Dec 2022) by 1.0 N= 1464 pts :grid |
wet | UEA CRU TS4p07 monthly wet[ X Y | T] |
tmn | { (/local/datalib/DataCatalog/entries/UEA/CRU/TS4p07/monthly/) /stn readfilein } |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /vap { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.vap.dat.nc) readdatafile: /name (vap) def /correlation_decay_distance 1000.0 def /units /hPa def /missing_value 9.96920997E36 def /long_name (vapour pressure) def /standard_name (water_vapor_pressure) def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
tmn | (CRU Conditions of Use states that acknowledgement should preferably be by citing one or more of the papers referenced) |
TS4p07 | UEA CRU TS4p07[r2p5
monthly
climatology
] |
tmn | (University of East Anglia Climatic Research Unit (CRU). [Phil Jones, Ian Harris]. CRU TS4.07: Climatic Research Unit (CRU) Time-Series (TS) Version 4.0 of High Resolution Gridded Data of Month-by-month Variation in Climate (Jan. 1901 - Dec. 2022), [Internet]. NCAS British Atmospheric Data Centre, 2013, Date of citation. Available from http://badc.nerc.ac.uk/view/badc.nerc.ac.uk__ATOM__ACTIVITY_0c08abfc-f2d5-11e2-a948-00163e251233 ; doi: 10.5285/D0E1585D-3417-485F-87AE-4FCECF10A992) |
tmn | UEA CRU TS4p07 monthly tmn[ X Y | T] |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /pet { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.pet.dat.nc) readdatafile: /name (pet) def /units (mm/day) cvn def /missing_value 9.96920997E36 def /long_name (potential evapotranspiration) def /correlation_decay_distance -999.0 def /standard_name (water_potential_evaporation_flux) def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
tmn | (Harris_etal2013) |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /pre { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.pre.dat.nc) readdatafile: /name (pre) def /correlation_decay_distance 450.0 def /missing_value 9.96920997E36 def /units (mm/month) def /long_name (precipitation) def /standard_name (lwe_precipitation_rate) def /realarraytype netcdfrecords :readdatafile startcolormap DATA 0 700 RANGE transparent white white 0 VALUE 137 255 131 RGB RGBdup 25 bandmax 128 242 122 RGB RGBdup 50 bandmax 119 228 114 RGB RGBdup 75 bandmax 110 215 105 RGB RGBdup 100 bandmax 101 202 97 RGB RGBdup 150 bandmax 92 189 88 RGB RGBdup 200 bandmax 83 175 79 RGB RGBdup 250 bandmax 74 162 71 RGB RGBdup 300 bandmax 66 149 62 RGB RGBdup 350 bandmax 57 136 54 RGB RGBdup 400 bandmax 48 122 45 RGB RGBdup 450 bandmax 39 109 36 RGB RGBdup 500 bandmax 30 96 28 RGB RGBdup 550 bandmax 21 83 19 RGB RGBdup 600 bandmax 12 69 11 RGB RGBdup 650 bandmax 3 56 2 RGB RGBdup 700 bandmax 3 56 2 RGB endcolormap } dodefasvarsilent } |
tmn | monthly |
tmn | { UEA CRU TS4p07 monthly[tmp
frs
cld
dtr
wet
stn
vap
tmn
pet
pre
tmx
] /tmx { [ X Y | T ] (/local/datalib/data/uea/cru/ts4p07/cru_ts4.07.1901.2022.tmx.dat.nc) readdatafile: /name (tmx) def /units (Celsius_scale) cvn def /missing_value 9.96920997E36 def /long_name (near-surface temperature maximum) def /correlation_decay_distance 1200.0 def /standard_name (air_temperature) def /realarraytype netcdfrecords :readdatafile } dodefasvarsilent } |
Error 404Bad Request
Error 404: Bad Request
Error line: 81 anhtmlserverefize 64000000 defidtmp) store
Error on line 0 of stdin: in forall, first arg must be array
1000