{"action":"opened","issue":{"url":"https://api.github.com/repos/wgm2111/wgm-pyshdom-sandbox/issues/1","labels_url":"https://api.github.com/repos/wgm2111/wgm-pyshdom-sandbox/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wgm2111/wgm-pyshdom-sandbox/issues/1/comments","events_url":"https://api.github.com/repos/wgm2111/wgm-pyshdom-sandbox/issues/1/events","html_url":"https://github.com/wgm2111/wgm-pyshdom-sandbox/issues/1","id":92216670,"number":1,"title":"run_polarized error: \"Word too long.\" ","user":{"login":"wgm2111","id":334306,"avatar_url":"https://avatars.githubusercontent.com/u/334306?v=3","gravatar_id":"","url":"https://api.github.com/users/wgm2111","html_url":"https://github.com/wgm2111","followers_url":"https://api.github.com/users/wgm2111/followers","following_url":"https://api.github.com/users/wgm2111/following{/other_user}","gists_url":"https://api.github.com/users/wgm2111/gists{/gist_id}","starred_url":"https://api.github.com/users/wgm2111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wgm2111/subscriptions","organizations_url":"https://api.github.com/users/wgm2111/orgs","repos_url":"https://api.github.com/users/wgm2111/repos","events_url":"https://api.github.com/users/wgm2111/events{/privacy}","received_events_url":"https://api.github.com/users/wgm2111/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-30T22:35:54Z","updated_at":"2015-06-30T22:35:54Z","closed_at":null,"body":"# SHDOM source compile\r\n\r\nAfter extracting the source into ./shdom and cd into it, I build the shdom source. \r\n```\r\n$ make all\r\n```\r\nThis makes the executable files for shdom, but doesn't make \"put.c\" which is needed to run the examples that come with the source.  To do this I compiled as follows, \r\n```\r\ngcc put.c -o put\r\n```\r\nAfter this the example programs mostly run, but \"run_polarized\" gives the error: \r\n```\r\n$ ./run_polarized > run_polarized_output\r\nWord too long.\r\n```\r\nThis happens specifically when calling an awk program to converting the \".lwc\" file to a \".part\" file.  \r\n\r\n# Work around by moving the read file\r\n\r\nI edited this part of the \"run_polarized_script\":\r\n```\r\n  cat $lwcfile | awk -v ztopcld=$ztopcld \\\r\n    'BEGIN {# read all of the cloud LWC file\\\r\n     getline; getline; nx=$1; ny=$2; nz=$3; getline; dx=$1; dy=$2; \\\r\n     getline; for (k=1; k<=nz; k++) zc[k]=$k;\\\r\n     getline; for (k=1; k<=nz; k++) Tc[k]=$k;\\\r\n     while (getline > 0) {lwc[$1,$2,$3]=$4; re[$1,$2,$3]=$5;}\\\r\n     for (k=1; k<=nz; k++) {if (zc[k]<ztopcld) nzc=k};\\\r\n      # read in aerosol profile\\\r\n     while ((getline<\"aero.t\")>0) {na++; za[na]=$1; massa[na]=$2; reffa[na]=$3;}\\\r\n      # add aerosol levels below cloud domain \\\r\n     j=1;\\\r\n     while (za[j] < zc[1]) {\\\r\n       z[j]=za[j]; T[j]=Tc[1]+6.5*(zc[1]-z[j]);\\\r\n       lwca[j]=massa[j]; rea[j]=reffa[j]; j++;}\\\r\n      # interpolate aerosol properties to cloud grid\\\r\n     i=j; kcb=j; kct=kcb+nzc-1;\\\r\n     for (k=1; k<=nzc; k++) {\\\r\n       if (zc[k]>=za[j+1]) j++; if (j>na-1) j=na-1;\\\r\n       f=(zc[k]-za[j])/(za[j+1]-za[j]); \\\r\n       z[i]=zc[k]; T[i]=Tc[k];\\\r\n       lwca[i]=(1-f)*massa[j]+f*massa[j+1];\\\r\n       rea[i]=(1-f)*reffa[j]+f*reffa[j+1];\\\r\n       i++;}\\\r\n      # add aerosol levels above cloud domain\\\r\n     j1=j+1;\\\r\n     for (j=j1; j<=na; j++) {\\\r\n       z[i]=za[j]; T[i]=T[nzc]-6.5*(z[i]-z[nzc]);\\\r\n       lwca[i]=massa[j]; rea[i]=reffa[j];\\\r\n       i++;}  nz=i-1;\\\r\n      # write header of particle file\\\r\n     print \"3   propgen particle file\";\\\r\n     print nx,ny,nz; print dx,dy;\\\r\n     for (k=1; k<=nz; k++) {printf \" %6.4f\",z[k];} printf \"\\n\";\\\r\n     for (k=1; k<=nz; k++) {printf \" %6.2f\",T[k];} printf \"\\n\"; \\\r\n      # write rest of particle file\\\r\n     for (i=1; i<=nx; i++) for (j=1; j<=ny; j++) for (k=1; k<=nz; k++) {\\\r\n       if ((k>=kcb)&&(k<=kct)) {kc=k-kcb+1;\\\r\n         if (lwc[i,j,kc]>0) printf \"%3d %3d %3d %1d %1d %6.4f %5.2f %1d %7.5f %5.3f\\n\",\\\r\n                           i,j,k,2,1,lwc[i,j,kc],re[i,j,kc],2,lwca[k],rea[k]; }\\\r\n       if (lwc[i,j,kc]==0) printf \"%3d %3d %3d %1d %1d %7.5f %5.3f\\n\",\\\r\n                            i,j,k,1,2,lwca[k],rea[k];} }' >! $partfile\r\n```\r\n\r\nI moved the awk program to the file, \"run_polarized_read.awk\".  Then replaced the above call with the following:\r\n```\r\n cat $lwcfile | awk -v ztopcld=$ztopcld --file=run_polarized_read.awk >! $partfile\r\n```\r\n\r\n"}}