Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrownDog/NARR sipnet.clim files not being generated correctly #2048

Open
serbinsh opened this issue Aug 17, 2018 · 39 comments
Open

BrownDog/NARR sipnet.clim files not being generated correctly #2048

serbinsh opened this issue Aug 17, 2018 · 39 comments

Comments

@serbinsh
Copy link
Member

Describe the bug
related to #2047

I am attempting to generate NARR drivers for sipnet at two different sites and am running into an issue where the output of the BD command is either an empty file or gibberish. For example:

PK^C^D^T^@^B^@^H^@EU^QM æµ3)Â^G^@uù^S^@^_^@^@^@NARR.2002-01-01.2004-12-31.clim<8c><9d>W<96>39<96>¤<9f>9{)^^h±ÿ<8d><8d>}^F<92>^N^G<83>ù÷<88>îªÌ<88> è^N\\a"<R^Hé^Q^_á^Q<9e>1ÕÇÿús<86>YÒ<9c>9¶^RÚã^?éYJ<8e>uÎ<96>ci1ùGC^H#<94>ÖR^O¥´Þ{~ÄÐø^K©Ï^Z©í¡ÿôÔ_^_#<8e><9a>r}¤^\<9f>­<8e>YF        CÿãQ<9f>9<8e><94>CÏú´Ôµ<88>gû^?á½¢ü^Ñ|æ<94>¦Ö^Põg<8a>þ<90><96><94>õ!±gý¥<92>*«ÿ<9f>ÖTb<8a>c<94>^^rË-öG¯Ï¨^_¬eÖ<99>û<88><8f>4ôOô<9f>ËHC<9f>8^^)õgÕW+=<85>^TfÓ<92>Zèe<86><94>Û졵û<92>Ú{I1<k<8e>iè^AÄ ¿í%åYZ®9è/ègÖ<92>R)Akh5¦©§ð¨Z<80><9e>ML9<87>^XSzè<8b>=G^^úÅ^VJMSK
zjC_%éñO<9e>R^HZqÔWo5§cI󳤨^U4}±^VõÍô<9a>´$½<9d>^Ysä¯M¾Ë<9f>KÊõ9k<9e>5ÄÔõ<90>µ"½<97><92>J.³<84>ÜõÞ<92>¶<80>¾V×Od=^ZVÔõ7k͹ë«^\+b<87>¼<96>¤ß^K¡·4õhô¼XRÔ^GéËè<81>^OÞxK#ÏñL¹gm§1ØZÚ^[=ö9zͼáG<9c>Ï<9e><8a><9e>´Þ<99>¶Wyä<90>õ^AÚ9þ^_¥<RìϦo¨^G¦Í¦<9f>(Oýਲ਼v=^Q½<95>c<85>õ½Â¡^Eòꣶcîex<85>Ú^G¥F½Cm<95>þ<88>M<9b>¤<96>g<8f>qF^NÄ<9f><9b>¿õg^Ni^Dý<8e>þLÍ<8f>Ôx¬¼6-2ê0Ô®o¡%¥ÖºöÖ£éÏô<9a>Æè¹²îc<89>ã½Äª<9d>6rkmN=^A}<94><96>^Xª6FÓ<9f>LAK}D<96>><8f>%ê§s^^]O%jké/<86>ù^\S?ßÓ<8c>½j£åð,­ê<97>ôV»_{¨#^Gý^N^[Y^KÔË×rbg+<8c>ãt¦ø^`ÑÁ^[C;FßN^_åõéák^W<86>^X´<87>â£<8e>¡ØP^T^V8+<|ýQ=Ö¨<9f>ÑO<96>¢?<98>µ[ÙtyhO^F-'Ôg×óÕ©<9a>zÞí¡?§<83>¢½¬7Î<9e>yðïËhAÏT¡*§}}é<8a>gõ©w¥è<92>§<9e>×ð^^Ôºô7§^^<99>>a¼âÙù¼ÚP¨¨)Õ²<86><9e>²öiã^Oi§ö>XÑxö@d"\ÔJðP L
(yê(Öû<8a>>ñL<8f>BÏ+vír<9e><87>Þh|Î>µsBÔ£×¹ø^Ubµ<87>´»9Q£êqê-è¥ö®= =<9c><92>þ<81>^Bês<94>HP^\úç:^Hzê<8a>^B-kÍqäû<92>Úu^N´î<96>´íc_<9b>LKâÏäÖ^U­ô2_Á<83>{ µ®_RôÐ[Ò/êiêÿè ^VþAjú|-Y¯D[gú¬j{iw)Rêß<<88>Éz<80><83>h<9d><8f>m<95>®p¦ ¯Ð¥g^]ôÒ^R'3><87>Þ<98>¾vÐÛÖ+]^OI_²q<83><94>©^]ÃÎT@×^[k<9d>gÂ^WÖï><89>^DSK^LÚ©ZsæGØ5<8a>^[­ë^YÍZ<8b><9e>¾^JÎuÜW´<85>3^E}}«1Fã!U/<89>ãL@^K<8a>üMa *®>õ<82>Úä<82>`<85>©^E^]*=<9f>¡^?<94>ØGº^Eµ^W31¾èÉê^Hèaëqש^@¢ <98>ª<82><83>¾T<8b>QGO¡¡( k7èN<8a>z!áx<8b>W8kO<85>;^]ºâP±^^Z'¶·^X^TEô¿ô<82>¦<9e>ý'âο^BîhO]#<ì»Jÿ@·úSqMïµk?f-yèÖÒ<81>R4<89>5ÎÄ>KMA<80>ó©¿s>ÃO4ËOös]/uεB]<±)6(úÌ©<80>«<8f>ÌÛ
ÿº´bÑÆ^O-Ný-ö«<82>      <97>Rm<84>Bö<81>Î<97>V¨¼¢7<9e>><87><93><93>JxStÊ©ÜWx<85>³DØÖ^]µ®¬ä£ÀÝ2µF}´ö¸6s^H^?¾Ù^R<9f>\Ò<93>7©ÿ ï­m¬<8c>D^OS[¤wݵºÜuíWÝæ£^N?· OÒ<83>Õ߯㶪¼^G±>µ|­<9f>Lf½Ø¦<9b>^k*½VVõw
T§n¸DJ^P«<8f><9f>^B<85>².Å?^]^O^E)-)ëb<9a>^D$^]-<9d><8d><87>^<91>^V¤^Gª^KT¿<92>ïKÚ¢^XÁR7<84>^VÖ^!C¯G;X·<9e>BFx<87>^LÝr<83><87>©x«ÃÓu^UêÀé¥èí)CTpåO?'^_GR7^Tµ´Û<9f>:×üY.8^N<80>²2ý%­Pÿ!Æû<9a>¶0¦[R?^T×eé^SªÏÔ¡<9a>z^M<9c>õ^_<81>µé^Q(^^s^R<94>ôq7jÃ+bNíR}Ë¡í¤%ê©dý%¥>Zó3ë¯V<9d>+^Eί§´<85>±NÄ,+<99>^»©rÜôع<97>Þa¬<92>sèJÔgµ<9e><89>Iµ²ß¢þ».<84>ìüaê!é<92>t¼×^QÔ?Ð+ÐIU~«k,é;^T®Zí,ÂÏ}E·0<96>µoøZ+<86>é;ëÿp<90>µkÊC^AM<9f>ðI&^\Ã<94>d^QEtykóêvÖáÒç+Àª Ð^®^MÊ<8a>Ϻ<87>^F»H{N_To^?¡­í<9b>H^GX'º^P#ïùNÞbX^?êQµ®#å(á^E^F®T}U<82>K$qÑÍ}EÙ¿<8e>¢<82>pÖÏé^RR¬ÿ¤MGÖÊ^M¢0ª^_׍^Dg<90>þ´¦ï6}^M8ë×^]¬ÿ}.pì^ABëЯ<96>ô¾+µ^W^HÐ3(<91>×ÓÐ<9b>ÓÍòIyÆ<8f>^P<96> ½º^C¦^^<88>~(^E^EUe<90>º<85>ºÂ¸<96>¨«KW<99>ò5ý!<9d>rmÓ¤h®ï<98>ã$g»­p^Oaü8©Ûü<84>0½AÝ~E^ASgs>ÚTùqÝSÎÉ´0e-:?<81>@§o¡<83>^Z<89>ê*"¦<9e>£ÞúжìÃiRâ<9c>ªÂJìl¹^Re^EYý¢.^MmD}J»íÁr<85>3]o
[I^[CiòëTdrA^UT<98>x<9d>
Å#<97>j*<ôhçCÑ<93><8b>\¹<84>Þ<99>³Ä¨È<98>)%´^DÊ5¥pºat<92>õ§«"±^^<99>®-½o-H'<^_+Ê×®ë<^^=䶪ިëB<9b>mP    ët<96>^_Y¢^^<91><8e><8f>â^[{Jé¯6§*^A]¦<93>¼Z©ª3²>^Uº2oVµ*w»ò^E-Y;@Aú¾¢-<96>éùu6<86>3\<9f>T%L<91><9b>Eç@+ùQÏQ^KéV^H:5ä·Z<92>N³By#ãÑ¥£<9d>2<95>^Aõ^Züg´<9d>\<8b>^Lm}­Q¿<94><8f>%mÁL5÷q^K©:¨Jb<94>p^VöÕ<9f>÷¢~O^W.iIä­+áÑ^_T<86>¨ÿ¦ª²RrêöÎüKŤá}ÄÓS,Q¼Ó_è÷^EÝbYà^Oé\7<95>pÅ+
\<88>ú<93>UGT^[ Ô½6ú3<9c><91>¢^FjG<85>f¥<8a>ä<88>ª<8d><88>[<8a>ÈzûÉI£^N¢<82>Ç'×<8f>JÏ<94> éØèk<94>c<85>[J¦Å)Æ<94>+<9c>±`ý^?-Oq<98>ÒGWc:ò<9d>#ÏVþ5;5úäg<94>7hg)^B«dÐ<93>ϬXÇÇÕ<9c>Þ Þªo4mÕ®ïà¯u¼Ò+<9a>)µlÊ^Ztb<9c>úW><9d>k¥<90>µ<90>^Më~¦<86>Õ=ô<8f>p¦K\§·^Rþ«®!<97>^Bºf^T%õ^CÊ©^TÎèHh<9b>i_420^U^Oú_:ãú®Ú¯Ç[¾¥dôYh^QQ§¯5*Yà¿ëS<88>O^O}Óë^Y<8e>UdþÑ£jZ<82><82>³^^¯b!<99>­2^M}¼Þ£¶½ò]^Uu<93><92>FϹS)×Gw²Â<8b>W&^Qãí¢¯WH#^AVþ^WWó¥ø^YÑFS$ª´QâúÙï<9b><94>Ä<95>ÇA9^P¨^F<9a>>`êñò»´Hôõ<94>^LåZ8^\ªÉ´¢Nq]¦^^¥^oº¯(o9£¢ä^A<91>ei·^QEjT^NñJ<87>è<84>)^]Ôëä3^ZU¦ÞIhzùú)¢lö<9e> `<9d>$<98>ÎÏzrñêdAKÒþÐÿSH^_:ä徤v-I5¿²Üò<89>ûªé;í2ý<8e>ª<8f>Xúß<81>_·=W<9e>jj<85><96>HÇG¯IÿQפv<93>jp-)Ó^OÐó¥^DgûGª^YmHíÿy_ϼ֣T±ëtT%áD}Z^L\<94><89>¿ÓéfüYöêj§ÍÖɱuÛp^\u<97>ë^AéÊQ ^],Gµ¡²)z}Z<9f>Ö£TR<81>@ÑBù]­÷^E]^A­òn^UT^T<8d>ÝÉÑ<87>ë²!(ëkè^_ë¤+ºÝîî¿<93>ìJ[<91>tºê^M^EnªÌï<8c>B³IÉ<89>V¨-«<9d>¡t<97>,F<97>ëSáEïEi ^E=<9e>Ù^UÑt^Z<89>ì<93>&iqûBk¬EW<9c>vö <81>ÄÙ¥êÜR´¿"<86><9e>¢^N<96>j^@Ý&ºt)d³Î<8c>¢¶<9e>6{ÿ¡âàÉ<87>èæ.:<91><99><8e>1­^CRc­°·c<8d><9f>¨^Vh{^L2<8a>Ê<8b>^M~HÚ¬I!R[Bé<9a>2@½ <9d><86>^?uö8 ô<9d>*<8f><86>M¢s«06tû^W<9a>}^O½b}O=f<85>^N½%¯QÕ¶²8<9d>^?mâû^Z¯¨Æ1ç{SÒë^Mèë®5ê<8f>Òx%<90>*úPÇü;¬Åô^\:<80><99>
<9c>BTû<83>¬a^NíG<95>^G^OýÜJ'<8a><8a>C²ßÊîT<8c>!^Aå<89>ï<8b>lWT#OP<92>¬^RãÕ<ó
<95>Èh^Oë5ä^þ._T÷<92>^Oºñ ^@=Ü<ëüuÕ'Õ}!Ý°<89>N<9f>b!ûîáÎ<80>â0Õ<8c><9e>n¾¯(_+REF×'ê^EÔu@TG<92>îhW<87>ò^Y^F^\GV)ÏÐ^Ta¡C¨^G§^U<91>&gEQ=^R<9a>u<99>^RFI<9f>6¬^N<8c>n^Y^]iå<9a>Q¯AA(<86>v_QÛ²mRòWwsÅY<9d>©Jº<90>I"[ý=2QÐRøÕæ<99><8e><87>Ú^GOî8î^Q<82>ýC^U<93><9e><9b>j*½*®9^]>½?^Z[Iïm¦û<9a>æõ<94>^H×Ê|3^UÓ

That is an example file from WF https://modex.bnl.gov/pecan_dev/05-running.php?workflowid=2000000991 where I was running at AF site Susquehanna Shale Hills Critical Zone Observatory (US-SSH)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://modex.bnl.gov/pecan_dev/
  2. Click on site Susquehanna Shale Hills Critical Zone Observatory (US-SSH)
    , US
  3. Scroll down to SIPNET model (r136)
  4. Run SIPNET with any PFT using NARR and BrownDog
  5. Note BD command finishes BUT clim file is empty or incorrect.
  6. Note that all ensembles fail to generate output

Expected behavior
Appropriate NARR driver is created and model ensemble runs complete successfully

Screenshots
none

Machine (please complete the following information):

  • Server BNL/modex
  • OS: Linux
  • Browser(if applicable) chrome
  • Version NA

Additional context
none

@serbinsh
Copy link
Member Author

Interestingly the created driver shows up as an option if you go back to the same site/model combo

screen shot 2018-08-17 at 11 50 36 am

@serbinsh
Copy link
Member Author

serbinsh commented Aug 17, 2018

Also, not sure if this is what is supposed to happen but a sipnet.clim folder was created in the top-level of the pecan workflow folder as seen here:

[sserbin@modex PEcAn_2000000991]$ ll
total 932
-rw-r--r--. 1 apache test    100 Aug 17 11:44 ensemble.output.2000001031.NPP.2002.2004.Rdata
-rw-r--r--. 1 apache test    785 Aug 17 11:43 ensemble.samples.2000001031.Rdata
drwxr-sr-x. 3 apache test     31 Aug 17 11:43 out
-rw-r--r--. 1 apache test   2957 Aug 17 11:41 pecan.CHECKED.xml
-rw-r--r--. 1 apache test   3195 Aug 17 11:43 pecan.CONFIGS.xml
-rw-r--r--. 1 apache test   3114 Aug 17 11:42 pecan.METProcess.xml
-rw-r--r--. 1 apache test   3155 Aug 17 11:42 pecan.TRAIT.xml
-rw-rw-r--. 1 apache test   2151 Aug 17 11:41 pecan.xml
drwxr-sr-x. 3 apache test     51 Aug 17 11:41 pft
drwxr-sr-x. 3 apache test     50 Aug 17 11:43 run
-rw-r--r--. 1 apache test 871702 Aug 17 11:43 samples.Rdata
drwxr-sr-x. 2 apache test     10 Aug 17 11:41 sipnet.clim
-rw-r--r--. 1 apache test    371 Aug 17 11:44 STATUS
-rw-rw-r--. 1 apache test   6320 Aug 17 11:41 workflow.R
-rw-r--r--. 1 apache test  39635 Aug 17 11:44 workflow.Rout

But the folder is empty

@serbinsh
Copy link
Member Author

Here is what a run folder looks like:

[sserbin@modex 2000075070]$ ll
total 20
-rwxr-xr-x. 1 apache test 1767 Aug 17 11:43 job.sh
-rw-r--r--. 1 apache test  664 Aug 17 11:43 README.txt
lrwxrwxrwx. 1 apache test   67 Aug 17 11:43 sipnet.clim -> /data/Model_Output/pecan.output/dbfiles/BD-10704043b8b7/sipnet.clim
-rw-r--r--. 1 apache test 2750 Aug 17 11:43 sipnet.in
-rw-r--r--. 1 apache test 2767 Aug 17 11:43 sipnet.param
-rw-r--r--. 1 apache test    1 Aug 17 11:43 sipnet.param-spatial

@serbinsh
Copy link
Member Author

Based on a comment by @robkooper on Slack, it looks like the returned file is a .zip file without the correct extension. If I rename the file I can successfully extract the data file which is a properly formatted sipnet.clim file.

[sserbin@modex BD-10704043b8b7]$ sudo mv sipnet.clim sipnet.clim.zip
[sudo] password for sserbin:
[sserbin@modex BD-10704043b8b7]$ ll
total 500
-rw-r--r--. 1 apache test 508617 Aug 17 11:42 sipnet.clim.zip

[sserbin@modex BD-10704043b8b7]$ sudo unzip sipnet.clim.zip
Archive:  sipnet.clim.zip
  inflating: NARR.2002-01-01.2004-12-31.clim
[sserbin@modex BD-10704043b8b7]$ ll
total 1780
-rw-r--r--. 1 root   test 1309045 Aug 17 10:42 NARR.2002-01-01.2004-12-31.clim
-rw-r--r--. 1 apache test  508617 Aug 17 11:42 sipnet.clim.zip

0       2002    1       0       0.125   -7.9094299316406        -2.44315996314612       0       0.000804662704467773    106.125279746456        279.20088185235 231.658948408484        5.31823073993271        0.6
0       2002    1       3       0.125   -9.32294311523435       -2.39741738404251       0       -0.0412188470363617     75.1397549593781        285.159348289328        227.559947202096        5.60749023697066        0.6
0       2002    1       6       0.125   -10.5312866210937       -2.33946353060725       0       -0.0244013965129852     55.1456123301122        294.838635604529        220.208121240694        5.00348134365326        0.6
0       2002    1       9       0.125   -11.3368286132812       -2.27091310812966       0       -0.0244013965129852     35.953950127431 295.342434940375        222.430670123902        5.07081553376126        0.6
0       2002    1       12      0.125   -12.4007629394531       -2.19504814728271       628398.237304688        0.0848717987537384      19.7246218935274        303.128231282344        217.696640681874        4.52785957682463        0.6
0       2002    1       15      0.125   -8.40720214843748       -2.10964517251597       1622754.71191406        0.000804662704467773    67.3028051574853        265.95481312816 257.728592667697        6.00752887354068        0.6
0       2002    1       18      0.125   -5.53836669921873       -2.05694625720645       1374894.71191406        0.00921338796615601     109.890647291759        230.4657112397  295.058308799463        6.37520017434981        0.6
0       2002    1       21      0.125   -4.0488342285156        -2.02781320104941       58806.474609375 0.0176221132278442      132.242433885207        205.770433990006        320.831082348398        5.77486085931632        0.6
0       2002    2       0       0.125   -5.8043273925781        -2.01090098947708       0       0.00921338796615601     68.1552254424385        198.632733047786        328.702943023655        5.63152559393685        0.6
0       2002    2       3       0.125   -6.48831787109373       -1.97915701994827       0       0.000804662704467773    57.8740762854741        209.776452022241        318.84142518764 4.74670963477183        0.6 ...

@serbinsh
Copy link
Member Author

Ran it again and see that now there are two different BD clim files in the improperly named .zip file

[sserbin@modex BD-650a29c32afa]$ ll
total 3556
-rw-r--r--. 1 root   test 2191869 Aug 17 11:37 NARR.2000-01-01.2004-12-31.clim
-rw-r--r--. 1 root   test  439523 Aug 17 09:57 NARR.2004-01-01.2004-12-31.clim
-rw-r--r--. 1 apache test 1003128 Aug 17 12:37 sipnet.clim.zip

Another issue is that the sym link used in job.sh doesnt match the file names:

[sserbin@modex 2000075302]$ ll
total 20
-rwxr-xr-x. 1 apache test 1768 Aug 17 12:37 job.sh
-rw-r--r--. 1 apache test  673 Aug 17 12:37 README.txt
lrwxrwxrwx. 1 apache test   67 Aug 17 12:37 sipnet.clim -> /data/Model_Output/pecan.output/dbfiles/BD-650a29c32afa/sipnet.clim
-rw-r--r--. 1 apache test 2750 Aug 17 12:37 sipnet.in
-rw-r--r--. 1 apache test 2771 Aug 17 12:37 sipnet.param
-rw-r--r--. 1 apache test    1 Aug 17 12:37 sipnet.param-spatial
# see if application needs running
if [ ! -e "/data/Model_Output/pecan.output/PEcAn_2000000994/out/2000075302/sipnet.out" ]; then
  cd "/data/Model_Output/pecan.output/PEcAn_2000000994/run/2000075302"
  ln -s "/data/Model_Output/pecan.output/dbfiles/BD-650a29c32afa/sipnet.clim" sipnet.clim
...

@serbinsh
Copy link
Member Author

A quick check of what I think should be the way it is setup:

[sserbin@modex 2000075302]$ sudo ln -s /data/Model_Output/pecan.output/dbfiles/BD-650a29c32afa/NARR.2000-01-01.2004-12-31.clim sipnet.clim
[sserbin@modex 2000075302]$ ll
total 20
-rwxr-xr-x. 1 apache test 1768 Aug 17 12:37 job.sh
-rw-r--r--. 1 apache test  673 Aug 17 12:37 README.txt
lrwxrwxrwx. 1 root   test   87 Aug 17 12:42 sipnet.clim -> /data/Model_Output/pecan.output/dbfiles/BD-650a29c32afa/NARR.2000-01-01.2004-12-31.clim
-rw-r--r--. 1 apache test 2750 Aug 17 12:37 sipnet.in
-rw-r--r--. 1 apache test 2771 Aug 17 12:37 sipnet.param
-rw-r--r--. 1 apache test    1 Aug 17 12:37 sipnet.param-spatial

[sserbin@modex 2000075302]$ sudo ./job.sh

[sserbin@modex out]$ cd 2000075302
[sserbin@modex 2000075302]$ ll
total 3456
-rw-r--r--. 1 apache test      1293 Aug 17 12:43 logfile.txt
-rw-r--r--. 1 root   test       673 Aug 17 12:43 README.txt
-rw-r--r--. 1 root   test   3523496 Aug 17 12:43 sipnet.out
-rw-------. 1 apache apache       0 Aug 17 12:37 stderr.log
-rw-------. 1 apache apache     119 Aug 17 12:37 stdout.log

[sserbin@modex 2000075302]$ ll
total 5956
-rw-rw-r--. 1 sserbin test    507576 Aug 17 12:48 2000.nc
-rw-rw-r--. 1 sserbin test       743 Aug 17 12:48 2000.nc.var
-rw-rw-r--. 1 sserbin test    506200 Aug 17 12:48 2001.nc
-rw-rw-r--. 1 sserbin test       743 Aug 17 12:48 2001.nc.var
-rw-rw-r--. 1 sserbin test    506200 Aug 17 12:48 2002.nc
-rw-rw-r--. 1 sserbin test       743 Aug 17 12:48 2002.nc.var
-rw-rw-r--. 1 sserbin test    506200 Aug 17 12:48 2003.nc
-rw-rw-r--. 1 sserbin test       743 Aug 17 12:48 2003.nc.var
-rw-rw-r--. 1 sserbin test    507576 Aug 17 12:48 2004.nc
-rw-rw-r--. 1 sserbin test       743 Aug 17 12:48 2004.nc.var
-rwxrwxrwx. 1 apache  test        16 Aug 17 12:46 logfile.txt
-rwxrwxrwx. 1 root    test       673 Aug 17 12:46 README.txt
-rwxrwxrwx. 1 root    test   3523496 Aug 17 12:43 sipnet.out
-rwxrwxrwx. 1 apache  apache       0 Aug 17 12:37 stderr.log
-rwxrwxrwx. 1 apache  apache     119 Aug 17 12:37 stdout.log

@serbinsh
Copy link
Member Author

@robkooper any chance you have had time to look into the BD issues with NARR?

@robkooper
Copy link
Member

robkooper commented Aug 29, 2018

I think this might have been fixed with #2039 I will need to test this.

@yan130
Copy link
Member

yan130 commented Aug 31, 2018

which year are you selecting?
one year or multiple?

@serbinsh
Copy link
Member Author

serbinsh commented Sep 14, 2018

@robkooper just tried again, and got this:

prerun
Error: no climate data in sipnet.clim
mv: cannot stat `/data/Model_Output/pecan.output/PEcAn_2000001054/run/2000079623/sipnet.out': No such file or directory

Here is the directory, which actually looks better this time:

[sserbin@modex run]$ cd 2000079623/
[sserbin@modex 2000079623]$ ll
total 20
-rwxr-xr-x. 1 apache test 1767 Sep 14 08:09 job.sh
-rw-r--r--. 1 apache test  663 Sep 14 08:09 README.txt
lrwxrwxrwx. 1 apache test   67 Sep 14 08:10 sipnet.clim -> /data/Model_Output/pecan.output/dbfiles/BD-9ac83554512c/sipnet.clim
-rw-r--r--. 1 apache test 2750 Sep 14 08:09 sipnet.in
-rw-r--r--. 1 apache test 2757 Sep 14 08:09 sipnet.param
-rw-r--r--. 1 apache test    1 Sep 14 08:09 sipnet.param-spatial

But nothing in the file??

[sserbin@modex 2000079623]$ cd /data/Model_Output/pecan.output/dbfiles/BD-9ac83554512c/
[sserbin@modex BD-9ac83554512c]$ ll
total 0
-rw-r--r--. 1 apache test 0 Sep 14 08:08 sipnet.clim
[sserbin@modex BD-9ac83554512c]$

From the workflow.log

> 
> # Do conversions
> settings <- PEcAn.utils::do_conversions(settings)
2018-09-14 08:06:24 DEBUG  [PEcAn.utils::do_conversions] : 
   do.conversion outdir /data/Model_Output/pecan.output/dbfiles 
2018-09-14 08:06:24 INFO   [PEcAn.utils::do_conversions] : PROCESSING:  met 
2018-09-14 08:06:24 INFO   [PEcAn.utils::do_conversions] : 
   calling met.process: 
2018-09-14 08:06:28 INFO   [browndog.met] : 
   browndog download url : 
   http://dap.ncsa.illinois.edu:8184/file/20285355_pecan.clim 
2018-09-14 08:08:29 WARN   [PEcAn.DB::db.close] : 
   Connection created outside of PEcAn.DB package 
2018-09-14 08:08:29 DEBUG  [PEcAn.utils::do_conversions] : 
   updated met path: 
   /data/Model_Output/pecan.output/dbfiles/BD-9ac83554512c/sipnet.clim 
> 
> # Query the trait database for data and priors
> if (PEcAn.utils::status.check("TRAIT") == 0){
+   PEcAn.utils::status.start("TRAIT")
+   settings <- PEcAn.workflow::runModule.get.trait.data(settings)
+   PEcAn.settings::write.settings(settings, outputfile='pecan.TRAIT.xml')
+   PEcAn.utils::status.end()
+ } else if (file.exists(file.path(settings$outdir, 'pecan.TRAIT.xml'))) {
+   settings <- PEcAn.settings::read.settings(file.path(settings$outdir, 'pecan.TRAIT.xml'))
+ }
2018-09-14 08:08:31 INFO   [query.trait.data] : 
   --------------------------------------------------------- 

@serbinsh
Copy link
Member Author

Here is my run info

  <run>
    <site>
      <id>1000025731</id>
      <met.start>1990/01/01</met.start>
      <met.end>1991/12/31</met.end>
    </site>
    <inputs>
      <met>
        <source>NARR</source>
        <output>SIPNET</output>
      </met>
    </inputs>
    <start.date>1990/01/01</start.date>
    <end.date>1991/12/31</end.date>
  </run>

@robkooper
Copy link
Member

I believe this is fixed on the develop branch but not deployed yet. I will work with @yan130 to test and see if it works on the dev server with that specific file.

@serbinsh
Copy link
Member Author

@robkooper OK thanks. I am using develop branch for these runs, just not yet pushed the changes for a local branch?

@robkooper
Copy link
Member

we don't have the develop branch deployed here. this particular instance is following the master branch. I was hoping to deploy the new release there. I'll check with @tonygardella when the new release will happen.

@serbinsh
Copy link
Member Author

@robkooper I'm not sure I follow......I am also still not certain which end this bug is on. I assume we will make sure it can work for both master and dev?

@serbinsh
Copy link
Member Author

Do we have any fixes for this yet? @para2x at some point in your multi-site SDA, I think we are going to want to run with NARR drivers across sites, or at least that was the original plan. But we have been waiting for a fix.

@serbinsh
Copy link
Member Author

Bump. Has anyone else been able to use BrownDog NARR with sipnet lately? If so please let me know, perhaps it has been addressed and is working again....unclear.

@mdietze
Copy link
Member

mdietze commented Jan 23, 2019

If there are issues with BrownDog NARR, I'd use the THREDDS-based NARR_site in the interim

@yan130
Copy link
Member

yan130 commented Jan 23, 2019

@robkooper I test that case on prod and the error is a wrong ftp link:

<input> <type>NARR</type> <site>US-SSH</site> <lat>40.6658</lat> <lon>-77.9041</lon> <start_date>1990-01-01 00:00:00</start_date> <end_date>1991-12-31 23:59:59</end_date> </input>

remotefunc <- function() {PEcAn.data.atmosphere::download.NARR(site_id='1135', lat.in=40.6658, lon.in=-77.9041, model=NULL, scenario=NULL, ensemble_member=NULL, overwrite=FALSE, outfolder='/home/polyglot/cache/PEcAn/NARR_site_1-25731/', start_date='1990-01-01', end_date='2014-12-31')}
remoteout <- remotefunc()

Attaching package: ‘PEcAn.utils’

The following object is masked from ‘package:utils’:
download.file

2019-01-23 11:18:33 DEBUG [PEcAn.data.atmosphere::download.NARR] :
File ' /home/polyglot/cache/PEcAn/NARR_site_1-25731//pres.sfc.2014.nc '
already exists, skipping to next file.
2019-01-23 11:18:33 DEBUG [PEcAn.data.atmosphere::download.NARR] :
File ' /home/polyglot/cache/PEcAn/NARR_site_1-25731//pres.sfc.2013.nc '
already exists, skipping to next file.
2019-01-23 11:18:33 DEBUG [PEcAn.data.atmosphere::download.NARR] :
Downloading from:
ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/pres.sfc.2012.nc to:
/home/polyglot/cache/PEcAn/NARR_site_1-25731//pres.sfc.2012.nc
trying URL 'ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/pres.sfc.2012.nc'
Error in utils::download.file(url, filename, method) :
cannot open URL 'ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/pres.sfc.2012.nc'
Calls: remotefunc -> -> ->
In addition: Warning message:
In utils::download.file(url, filename, method) :
URL 'ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/pres.sfc.2012.nc': status was 'Couldn't connect to server'
Execution halted
[1] 1
2019-01-23 11:20:41 INFO [PEcAn.utils::convert.input] :
RESULTS: Convert.Input
2019-01-23 11:20:41 INFO [PEcAn.utils::convert.input] : 1
2019-01-23 11:20:41 INFO [PEcAn.utils::convert.input] :
Error in file != "" :
comparison (2) is possible only for atomic and list types

Calls: met.process ... .download.raw.met.module -> -> subset -> subset.default
2019-01-23 11:20:41 WARN [db.close] :
Connection created outside of PEcAn.DB package
Execution halted

PS: I don't know why it download from 2014, I just set start as 1990 and end as 1991.

@robkooper
Copy link
Member

Welcome to government shutdown maybe?

@serbinsh
Copy link
Member Author

@yan130 I just tested that FTP link and it looks to be back up

@serbinsh
Copy link
Member Author

I just ran this and it seems to be pulling down data

remotefunc <- function() {PEcAn.data.atmosphere::download.NARR(site_id='1135', lat.in=40.6658, lon.in=-77.9041, model=NULL, scenario=NULL, 
                                                               ensemble_member=NULL, overwrite=FALSE, outfolder='~/scratch', 
                                                               start_date='1990-01-01', end_date='2014-12-31')}
remoteout <- remotefunc()

@yan130
Copy link
Member

yan130 commented Jan 28, 2019

@serbinsh I running it, takes some time ( maybe a day), I will update you when it is done or get error.

@serbinsh
Copy link
Member Author

Thanks @yan130 Are you testing the basic NARR code or the BrownDog version?

@yan130
Copy link
Member

yan130 commented Jan 28, 2019

I need to run basic NARR code on BrownDog server first.
when what I run is finish, then you can run the BrownDog version from your machine.

@serbinsh
Copy link
Member Author

Ah, ok that makes sense. thank you!

@serbinsh
Copy link
Member Author

serbinsh commented Jan 28, 2019

Strange, I updated pecan to latest dev and now get this error:

> remotefunc <- function() {PEcAn.data.atmosphere::download.NARR(site_id='1135', lat.in=40.6658, lon.in=-77.9041, model=NULL, scenario=NULL, ensemble_member=NULL, method=NULL, overwrite=FALSE, outfolder='/data/Model_Output/pecan.output/dbfiles/NARR_site_1135/', start_date='1990-01-01', end_date='2014-12-31')}

> remoteout <- remotefunc()

2019-01-28 15:10:40 DEBUG  [#1: PEcAn.data.atmosphere::download.NARR] :
   Downloading from:
   ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/pres.sfc.2014.nc to:
   /data/Model_Output/pecan.output/dbfiles/NARR_site_1135//pres.sfc.2014.nc
Error in if (method == "ncftpget") { : argument is of length zero
> traceback()
3: PEcAn.utils::download.file(url, new.file, method)
2: PEcAn.data.atmosphere::download.NARR(site_id = "1135", lat.in = 40.6658,
       lon.in = -77.9041, model = NULL, scenario = NULL, ensemble_member = NULL,
       method = NULL, overwrite = FALSE, outfolder = "/data/Model_Output/pecan.output/dbfiles/NARR_site_1135/",
       start_date = "1990-01-01", end_date = "2014-12-31") at #1
1: remotefunc()

Yet the similar command above is still working, need to sort out why there is a difference now

@serbinsh
Copy link
Member Author

Aha, the issue with the newer command in PEcAn is that it sets "method" to NULL by default, which errors for me. But if I run as:

remotefunc <- function() {PEcAn.data.atmosphere::download.NARR(site_id='1135', lat.in=40.6658, lon.in=-77.9041, model=NULL, scenario=NULL, ensemble_member=NULL, overwrite=FALSE, 
                                                               outfolder='~/scratch', start_date='1990-01-01', end_date='1990-02-01')}
remoteout <- remotefunc()

it runs fine.

@serbinsh
Copy link
Member Author

I cannot find in here: https://github.com/PecanProject/pecan/blob/develop/modules/data.atmosphere/R/download.NARR.R

OR here: https://github.com/PecanProject/pecan/blob/develop/modules/data.atmosphere/R/download.NARR_site.R

where "method" is getting set to NULL by default? Its also not happening in here, as far as I can tell? https://github.com/PecanProject/pecan/blob/develop/web/03a-narr.php . But that "method=NULL, " is breaking NARR for me on modex because that needs to be grabbed from our R profile.

@yan130
Copy link
Member

yan130 commented Jan 31, 2019

current error log:

Begin Model Specific Conversion
[1] "Convert to model format"
No geonamesUsername set. See http://geonames.wordpress.com/2010/03/16/ddos-part-ii/ and set one with options(geonamesUsername="foo") for some services to work
Error in url(url, open = "r") :
cannot open the connection to 'http://ws.geonames.org/timezoneJSON?lat=40.6658&lng=-77.9041&radius=0&username=carya'
Calls: met.process ... site.lst -> GNtimezone -> as.data.frame -> getJson -> url
In addition: Warning message:
In url(url, open = "r") :
URL 'http://ws.geonames.org/timezoneJSON?lat=40.6658&lng=-77.9041&radius=0&username=carya': status was 'Couldn't resolve host name'
2019-01-31 15:28:05 WARN [db.close] :
Connection created outside of PEcAn.DB package
Execution halted

@serbinsh
Copy link
Member Author

serbinsh commented Feb 1, 2019

@yan130 I get this error message on my end:

> settings <- PEcAn.workflow::do_conversions(settings)
2019-02-01 08:33:22 DEBUG  [PEcAn.workflow::do_conversions] : 
   do.conversion outdir /data/Model_Output/pecan.output/dbfiles 
2019-02-01 08:33:22 INFO   [PEcAn.workflow::do_conversions] : PROCESSING:  met 
2019-02-01 08:33:22 INFO   [PEcAn.workflow::do_conversions] : 
   calling met.process: 
2019-02-01 08:33:25 INFO   [browndog.met] : 
   browndog download url : 
   http://dap.ncsa.illinois.edu:8184/file/20318176_pecan.clim 
Error in basename(downloadedfile) : a character vector argument expected
Calls: <Anonymous> -> <Anonymous> -> browndog.met -> basename
> proc.time()
   user  system elapsed 
 11.513   1.215 662.677 
``` . 

perhaps your work to pull down all of the NARR failed?  This error came after a long wait, so I assume it was working on the extraction and failed on transfer?  @robkooper do you guys have logs on that end that may illuminate this issue?

@yan130
Copy link
Member

yan130 commented Feb 7, 2019

current error log:

Begin Model Specific Conversion
[1] "Convert to model format"
No geonamesUsername set. See http://geonames.wordpress.com/2010/03/16/ddos-part-ii/ and set one with options(geonamesUsername="foo") for some services to work
Error in url(url, open = "r") :
cannot open the connection to 'http://ws.geonames.org/timezoneJSON?lat=40.6658&lng=-77.9041&radius=0&username=carya'
Calls: met.process ... site.lst -> GNtimezone -> as.data.frame -> getJson -> url
In addition: Warning message:
In url(url, open = "r") :
URL 'http://ws.geonames.org/timezoneJSON?lat=40.6658&lng=-77.9041&radius=0&username=carya': status was 'Couldn't resolve host name'
2019-01-31 15:28:05 WARN [db.close] :
Connection created outside of PEcAn.DB package
Execution halted

this can be fixed by adding new api url:
options(geonamesHost = "api.geonames.org")

to all geonames::GNtimezone calls.

@robkooper
I can add this line to PEcAn_convert.R in browndog,
or modules/data.atmosphere/R/site.lst.R in pecanproject.
which way do you prefer?

@serbinsh it should be working now, please leave a comment if you still have problems.

@robkooper
Copy link
Member

Check what version of geonames is installed. This might be fixed in an update.

@yan130
Copy link
Member

yan130 commented Feb 8, 2019

latest one, no update since 2014.
https://cran.r-project.org/web/packages/geonames/index.html

@robkooper
Copy link
Member

Can you try Rscript -e "devtools::install_github('ropensci/geonames')" and see if that solves the problem. This is what is currently used in PEcAn.

@yan130
Copy link
Member

yan130 commented Feb 8, 2019

not working. didn't find the hostname in source code of 'ropensci/geonames'

@serbinsh
Copy link
Member Author

Just following up on this, any progress on getting the NARR process to run again via BD?

@serbinsh
Copy link
Member Author

I just tried again this AM and found that it does create a sipnet.clim file, BUT its empty

@github-actions
Copy link

This issue is stale because it has been open 365 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants