Thursday, September 15, 2011
Tuesday, August 30, 2011
ifolder on RHEL6 (x86_64)
Finally iFolder works on RHEL6:
1. download from http://origin-download.mono-project.com/archive/2.10.2/sources/:
gtk-sharp-2.12.10.tar.bz2
gnome-sharp-2.24.1.tar.bz2
gnome-desktop-sharp-2.24.0.tar.bz2
unzip and install them
2. install mono:
download RedHat:RHEL-6.repo from http://download.opensuse.org/repositories/RedHat:/RHEL-6/standard/ and put it in /etc/yum.repos.d/
yum search mono
since I'm using x86_64:
yum install -y mod_mono-addon.x86_64 mono-addon-basic.noarch mono-addon-data.x86_64 mono-addon-data-oracle.x86_64 mono-addon-data-postgresql.x86_64 mono-addon-data-sqlite.x86_64 mono-addon-debugger.x86_64 mono-addon-devel.x86_64 mono-addon-mvc.x86_64 mono-addon-wcf.x86_64 mono-addon-web.x86_64 mono-addon-winforms.x86_64 mono-addon-winfxcore.x86_64 monodoc-addon-core.x86_64 monotools-addon-server.noarch mono-addon-core.x86_64 mono-addon-extras.x86_64 mono-addon-ibm-data-db2.x86_64 mono-addon-libgdiplus0.x86_64 mono-addon-locale-extras.x86_64 mono-addon-nunit.x86_64 mono-addon-xsp.noarch
mono will be installed in /opt/novell/mono
3. download mono-log4net1.2-1.2.10-1.tar.bz2 from:
http://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwinports/release-2/DotNET/log4net/mono-log4net1.2/
unzip it, you'll get log4net.dll and some others
copy them to /opt/novell/mono:
cp -r usr/lib/mono/log4net /opt/novell/mono/lib/mono/
cp -r usr/lib/mono/log4net/gac/* /opt/novell/mono/lib/mono/gac/
cp lib/pkgconfig/log4net.pc /usr/local/lib/pkgconfig/
vi /usr/local/lib/pkgconfig/log4net.pc, change last line to:
Libs: -r:/opt/novell/mono/lib/mono/log4net/log4net.dll
4. libfraim:
"Download GNU ball" from
http://flaim.svn.sourceforge.net/viewvc/flaim/trunk/flaim/
and
http://flaim.svn.sourceforge.net/viewvc/flaim/trunk/ftk/
unzip ftk
cd ftk; autoreconf -i; ./configure; make
unzip flaim
cd flaim; autoreconf -i; ./configure; make
Notice: not installed yet, just need to use the .o files
download libflaim-4.9.845.tar.gz (or libflaim_4.9.966.orig.tar.gz) from http://sourceforge.net/projects/flaim/files/stable/flaim/source/
unzip it
change line 1071 of src/fsysdata.cpp from
if( (FLMBOOL)Value1)
to:
if( (FLMBOOL)((FLMUINT)Value1))
then "make" with following configurations: (NOTICE: must with -fPIC, you may modify Makefile)
===============================================================================
SVN Revision.................... 966 (or 845)
Host Operating System Family.... linux
Top Directory................... /path/to/libflaim-4.9.966
Target Operating System Family.. linux
Target Processor Family......... x86
Target Word Size................ 64
Target Build Type............... release
Target Path..................... /path/to/libflaim-4.9.966/build/linux-x86-64/release
Toolkit Path.................... /path/to/libflaim-4.9.966/ftk
Install Prefix.................. /usr
Compiler........................ g++ -fPIC
Librarian....................... ar
Defines......................... FLM_64BIT N_PLAT_UNIX _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64 _REENTRANT
===============================================================================
obj files will be generated in:
build/linux-x86-64/release/lib64/static/obj/
remove these obj files, link those obj files (name with some prefix, you need to rename them) from package "flaim" and "ftk" here.
you may found nlm_entrypoint.o missing, no problem, libflaim will generate it.
"make" again to generate
shared/libflaim.so.4.1
static/libflaim.a
"make install" to copy them to /usr/lib64, also /usr/lib64/pkgconfig/libflaim.pc
5. ifolder and plugin:
download
ifolder3-enterprise.tar.gz from http://sourceforge.net/projects/ifolder/files/iFolder%20Server/3.8.0.3/11.1/
novell-ifolder-enterprise-plugins.tar.gz from http://sourceforge.net/projects/ifolder/files/iFolder%20Server%20Plugins/3.8.0.3/11.1/
unzip ifolder3-enterprise.tar.gz
./autogen.sh --prefix=/opt/novell/ifolder
make; (need the libflaim built above)
make install
(if you want to change something, unzip original tar ball again, "make clean" cause some errors)
unzip novell-ifolder-enterprise-plugins.tar.gz
./autogen.sh --prefix=/opt/novell/ifolder
make; make install
6. configure:
make sure your apache is installed and with SSL
if you need LDAP, make sure it works.
ln -s /etc/httpd /etc/apache
edit the scripts in /opt/novell/ifolder/bin/ to correct the path
simias-server-setup and follow the steps
ifolder-admin-setup and follow the steps
ifolder-web-setup and follow the steps
these 3 steps will generate 3 files in /etc/httpd/conf.d:
simias.conf
ifolder_admin.conf
ifolder_web.conf
you can simply combine them to 1 file or even you can put it in a vhost.
I use SSL, so I put them in ssl.conf, like this:
.....
.....
.....
# simias10:
Include /etc/httpd/conf.d/mod_mono.conf
Alias /simias10 "/opt/novell/ifolder/lib64/simias/web"
AddMonoApplications simias10 "/simias10:/opt/novell/ifolder/lib64/simias/web"
MonoSetEnv simias10 "SimiasRunAsServer=true;SimiasDataDir=/usr/ifolder/simias"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias simias10
SetHandler mono
# ifolder-admin
Include /etc/httpd/conf.d/mod_mono.conf
Alias /admin "/opt/novell/ifolder/lib64/simias/admin"
AddMonoApplications admin "/admin:/opt/novell/ifolder/lib64/simias/admin"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias admin
AddHandler mono asax aspx ascx asmx ashx log csv
DirectoryIndex Default.aspx index.html
# ifolder-web
Include /etc/httpd/conf.d/mod_mono.conf
Alias /ifolder "/opt/novell/ifolder/lib64/simias/webaccess"
AddMonoApplications ifolder "/ifolder:/opt/novell/ifolder/lib64/simias/webaccess"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias ifolder
AddHandler mono asax aspx ascx asmx ashx csv
DirectoryIndex Default.aspx index.html
Notice there are a RedirectMatch because ifolder webaccess has a problem of URL coding "?", sometime it's just %3F in the URL which cause "404 not found" error.
7. add following lines to the beginning of function "start()" in /etc/init.d/httpd
touch /tmp/mod_mono_dashboard_XXGLOBAL_1
chown apache.apache /tmp/mod_mono_dashboard_XXGLOBAL_1
chmod 600 /tmp/mod_mono_dashboard_XXGLOBAL_1
or you'll find owner of /tmp/mod_mono_dashboard_XXGLOBAL_1 is root, not apache.
8. service httpd restart
to test your server
9. if you are using LDAP, simias-server-setup will create 2 users for iFolder in your LDAP repo: ifolder admin and proxy (you can name what you want)
10. for windows client, download ifolder-windows.exe from http://sourceforge.net/projects/ifolder/files/iFolder%20Clients/3.8.0.3/ instead of kablink, or you'll find LDAP auth error even with correct password (ERROR Simias.OpenLdapProvider.User - Error:Invalid Credentials)
11. if you can access ifolder via web, but windows client can't connect, uninstall it, remove following directories:
APPDATA/Roaming/iFolder
APPDATA/Roaming/simias
APPDATA/local/simias
${program files}/ifolder
${program files (X86)}/ifolder
and re-install the windows client (from SF, not Kablink)
12. Some problem:
sometimes the webaccess and admin portal can't login, error: incorrect redirected.
try restart httpd and login later (after last session expired)
Comments will be added to this post if I found something missing here.
zfsu.709@gmail.com
1. download from http://origin-download.mono-project.com/archive/2.10.2/sources/:
gtk-sharp-2.12.10.tar.bz2
gnome-sharp-2.24.1.tar.bz2
gnome-desktop-sharp-2.24.0.tar.bz2
unzip and install them
2. install mono:
download RedHat:RHEL-6.repo from http://download.opensuse.org/repositories/RedHat:/RHEL-6/standard/ and put it in /etc/yum.repos.d/
yum search mono
since I'm using x86_64:
yum install -y mod_mono-addon.x86_64 mono-addon-basic.noarch mono-addon-data.x86_64 mono-addon-data-oracle.x86_64 mono-addon-data-postgresql.x86_64 mono-addon-data-sqlite.x86_64 mono-addon-debugger.x86_64 mono-addon-devel.x86_64 mono-addon-mvc.x86_64 mono-addon-wcf.x86_64 mono-addon-web.x86_64 mono-addon-winforms.x86_64 mono-addon-winfxcore.x86_64 monodoc-addon-core.x86_64 monotools-addon-server.noarch mono-addon-core.x86_64 mono-addon-extras.x86_64 mono-addon-ibm-data-db2.x86_64 mono-addon-libgdiplus0.x86_64 mono-addon-locale-extras.x86_64 mono-addon-nunit.x86_64 mono-addon-xsp.noarch
mono will be installed in /opt/novell/mono
3. download mono-log4net1.2-1.2.10-1.tar.bz2 from:
http://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwinports/release-2/DotNET/log4net/mono-log4net1.2/
unzip it, you'll get log4net.dll and some others
copy them to /opt/novell/mono:
cp -r usr/lib/mono/log4net /opt/novell/mono/lib/mono/
cp -r usr/lib/mono/log4net/gac/* /opt/novell/mono/lib/mono/gac/
cp lib/pkgconfig/log4net.pc /usr/local/lib/pkgconfig/
vi /usr/local/lib/pkgconfig/log4net.pc, change last line to:
Libs: -r:/opt/novell/mono/lib/mono/log4net/log4net.dll
4. libfraim:
"Download GNU ball" from
http://flaim.svn.sourceforge.net/viewvc/flaim/trunk/flaim/
and
http://flaim.svn.sourceforge.net/viewvc/flaim/trunk/ftk/
unzip ftk
cd ftk; autoreconf -i; ./configure; make
unzip flaim
cd flaim; autoreconf -i; ./configure; make
Notice: not installed yet, just need to use the .o files
download libflaim-4.9.845.tar.gz (or libflaim_4.9.966.orig.tar.gz) from http://sourceforge.net/projects/flaim/files/stable/flaim/source/
unzip it
change line 1071 of src/fsysdata.cpp from
if( (FLMBOOL)Value1)
to:
if( (FLMBOOL)((FLMUINT)Value1))
then "make" with following configurations: (NOTICE: must with -fPIC, you may modify Makefile)
===============================================================================
SVN Revision.................... 966 (or 845)
Host Operating System Family.... linux
Top Directory................... /path/to/libflaim-4.9.966
Target Operating System Family.. linux
Target Processor Family......... x86
Target Word Size................ 64
Target Build Type............... release
Target Path..................... /path/to/libflaim-4.9.966/build/linux-x86-64/release
Toolkit Path.................... /path/to/libflaim-4.9.966/ftk
Install Prefix.................. /usr
Compiler........................ g++ -fPIC
Librarian....................... ar
Defines......................... FLM_64BIT N_PLAT_UNIX _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64 _REENTRANT
===============================================================================
obj files will be generated in:
build/linux-x86-64/release/lib64/static/obj/
remove these obj files, link those obj files (name with some prefix, you need to rename them) from package "flaim" and "ftk" here.
you may found nlm_entrypoint.o missing, no problem, libflaim will generate it.
"make" again to generate
shared/libflaim.so.4.1
static/libflaim.a
"make install" to copy them to /usr/lib64, also /usr/lib64/pkgconfig/libflaim.pc
5. ifolder and plugin:
download
ifolder3-enterprise.tar.gz from http://sourceforge.net/projects/ifolder/files/iFolder%20Server/3.8.0.3/11.1/
novell-ifolder-enterprise-plugins.tar.gz from http://sourceforge.net/projects/ifolder/files/iFolder%20Server%20Plugins/3.8.0.3/11.1/
unzip ifolder3-enterprise.tar.gz
./autogen.sh --prefix=/opt/novell/ifolder
make; (need the libflaim built above)
make install
(if you want to change something, unzip original tar ball again, "make clean" cause some errors)
unzip novell-ifolder-enterprise-plugins.tar.gz
./autogen.sh --prefix=/opt/novell/ifolder
make; make install
6. configure:
make sure your apache is installed and with SSL
if you need LDAP, make sure it works.
ln -s /etc/httpd /etc/apache
edit the scripts in /opt/novell/ifolder/bin/ to correct the path
simias-server-setup and follow the steps
ifolder-admin-setup and follow the steps
ifolder-web-setup and follow the steps
these 3 steps will generate 3 files in /etc/httpd/conf.d:
simias.conf
ifolder_admin.conf
ifolder_web.conf
you can simply combine them to 1 file or even you can put it in a vhost.
I use SSL, so I put them in ssl.conf, like this:
.....
.....
.....
# simias10:
Include /etc/httpd/conf.d/mod_mono.conf
Alias /simias10 "/opt/novell/ifolder/lib64/simias/web"
AddMonoApplications simias10 "/simias10:/opt/novell/ifolder/lib64/simias/web"
MonoSetEnv simias10 "SimiasRunAsServer=true;SimiasDataDir=/usr/ifolder/simias"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias simias10
SetHandler mono
# ifolder-admin
Include /etc/httpd/conf.d/mod_mono.conf
Alias /admin "/opt/novell/ifolder/lib64/simias/admin"
AddMonoApplications admin "/admin:/opt/novell/ifolder/lib64/simias/admin"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias admin
AddHandler mono asax aspx ascx asmx ashx log csv
DirectoryIndex Default.aspx index.html
# ifolder-web
Include /etc/httpd/conf.d/mod_mono.conf
Alias /ifolder "/opt/novell/ifolder/lib64/simias/webaccess"
AddMonoApplications ifolder "/ifolder:/opt/novell/ifolder/lib64/simias/webaccess"
Options FollowSymLinks
RewriteEngine on
RedirectMatch ^(.*)\?(.*)$ $1?$2
MonoSetServerAlias ifolder
AddHandler mono asax aspx ascx asmx ashx csv
DirectoryIndex Default.aspx index.html
Notice there are a RedirectMatch because ifolder webaccess has a problem of URL coding "?", sometime it's just %3F in the URL which cause "404 not found" error.
7. add following lines to the beginning of function "start()" in /etc/init.d/httpd
touch /tmp/mod_mono_dashboard_XXGLOBAL_1
chown apache.apache /tmp/mod_mono_dashboard_XXGLOBAL_1
chmod 600 /tmp/mod_mono_dashboard_XXGLOBAL_1
or you'll find owner of /tmp/mod_mono_dashboard_XXGLOBAL_1 is root, not apache.
8. service httpd restart
to test your server
9. if you are using LDAP, simias-server-setup will create 2 users for iFolder in your LDAP repo: ifolder admin and proxy (you can name what you want)
10. for windows client, download ifolder-windows.exe from http://sourceforge.net/projects/ifolder/files/iFolder%20Clients/3.8.0.3/ instead of kablink, or you'll find LDAP auth error even with correct password (ERROR Simias.OpenLdapProvider.User - Error:Invalid Credentials)
11. if you can access ifolder via web, but windows client can't connect, uninstall it, remove following directories:
APPDATA/Roaming/iFolder
APPDATA/Roaming/simias
APPDATA/local/simias
${program files}/ifolder
${program files (X86)}/ifolder
and re-install the windows client (from SF, not Kablink)
12. Some problem:
sometimes the webaccess and admin portal can't login, error: incorrect redirected.
try restart httpd and login later (after last session expired)
Comments will be added to this post if I found something missing here.
zfsu.709@gmail.com
Thursday, September 23, 2010
Wednesday, July 28, 2010
vim statusline
\&ff File format, e.g. unix, mac, dos.
%< truncation point
%t File name (as opposed to file path)
%b Value of byte under cursor.
%n buffer number
%f relative path to file
%m modified flag [+] (modified), [-] (unmodifiable) or nothing
%r readonly flag [RO]
%y filetype [ruby]
%= split point for left and right justification
%-35. width specification
%l current line number
%L number of lines in buffer
%c current column number
%V current virtual column number (-n), if different from %c
%P percentage through buffer
%) end of width specification
%y file type between braces (if defined)
%([%R%M]%) read-only, modified and modifiable flags between braces
%{'!'[&ff=='default_file_format']}
shows a '!' if the file format is not the platform
default
%{'$'[!&list]} shows a '*' if in list mode
%{'~'[&pm=='']} shows a '~' if in patchmode
(%{synIDattr(synID(line('.'),col('.'),0),'name')})
only for debug : display the current syntax item name
%= right-align following items
#%n buffer number
%l/%L,%c%V line number, total number of lines, and column number
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
hi User1 ctermbg=darkgray ctermfg=red guibg=darkgray guifg=red
hi User2 ctermbg=darkgray ctermfg=green guibg=green guifg=green
hi User3 ctermbg=darkgray ctermfg=darkgray guibg=green guifg=darkgray
hi User4 ctermbg=red ctermfg=green guibg=red guifg=green
hi User5 ctermbg=darkgray ctermfg=blue guibg=green guifg=blue
hi User6 ctermbg=darkgray ctermfg=cyan guibg=green guifg=cyan
set laststatus=2
"set statusline+=%-3.3n " buffer number
set statusline+=%1*\[%n\]\ \ " buffer number
set statusline+=%2*%t " file name
set statusline+=%h%4*%m%r%w " flags, use color User1
set statusline+=%3*\ \[ " [
set statusline+=%{strlen(&ft)?&ft:''}, " filetype
"set statusline+=%{&encoding}, " encoding
"set statusline+=%{&fileformat}, " file format
set statusline+=LastModified:%{strftime(\"%m/%d/%Y\ %H:%M\",getftime(expand(\"%:p\")))} " file format
set statusline+=\]%* " ]
set statusline+=%5*\ \[F1-Help,F2-DirTree,F3-Tags,F5-SyntaxOn,F8-SVNDiff,F9-TabClose,F10-TabNew,F11/F12-TabPrev/Next\]%* " help
set statusline+=%= " right align
set statusline+=%6*%-14.(%l/%L,%c%)%P%* " offset
hi statusline ctermfg=black ctermbg=blue gui=bold
%< truncation point
%t File name (as opposed to file path)
%b Value of byte under cursor.
%n buffer number
%f relative path to file
%m modified flag [+] (modified), [-] (unmodifiable) or nothing
%r readonly flag [RO]
%y filetype [ruby]
%= split point for left and right justification
%-35. width specification
%l current line number
%L number of lines in buffer
%c current column number
%V current virtual column number (-n), if different from %c
%P percentage through buffer
%) end of width specification
%y file type between braces (if defined)
%([%R%M]%) read-only, modified and modifiable flags between braces
%{'!'[&ff=='default_file_format']}
shows a '!' if the file format is not the platform
default
%{'$'[!&list]} shows a '*' if in list mode
%{'~'[&pm=='']} shows a '~' if in patchmode
(%{synIDattr(synID(line('.'),col('.'),0),'name')})
only for debug : display the current syntax item name
%= right-align following items
#%n buffer number
%l/%L,%c%V line number, total number of lines, and column number
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
hi User1 ctermbg=darkgray ctermfg=red guibg=darkgray guifg=red
hi User2 ctermbg=darkgray ctermfg=green guibg=green guifg=green
hi User3 ctermbg=darkgray ctermfg=darkgray guibg=green guifg=darkgray
hi User4 ctermbg=red ctermfg=green guibg=red guifg=green
hi User5 ctermbg=darkgray ctermfg=blue guibg=green guifg=blue
hi User6 ctermbg=darkgray ctermfg=cyan guibg=green guifg=cyan
set laststatus=2
"set statusline+=%-3.3n " buffer number
set statusline+=%1*\[%n\]\ \ " buffer number
set statusline+=%2*%t " file name
set statusline+=%h%4*%m%r%w " flags, use color User1
set statusline+=%3*\ \[ " [
set statusline+=%{strlen(&ft)?&ft:''}, " filetype
"set statusline+=%{&encoding}, " encoding
"set statusline+=%{&fileformat}, " file format
set statusline+=LastModified:%{strftime(\"%m/%d/%Y\ %H:%M\",getftime(expand(\"%:p\")))} " file format
set statusline+=\]%* " ]
set statusline+=%5*\ \[F1-Help,F2-DirTree,F3-Tags,F5-SyntaxOn,F8-SVNDiff,F9-TabClose,F10-TabNew,F11/F12-TabPrev/Next\]%* " help
set statusline+=%= " right align
set statusline+=%6*%-14.(%l/%L,%c%)%P%* " offset
hi statusline ctermfg=black ctermbg=blue gui=bold
Labels:
VIM
Wednesday, July 21, 2010
vim tricks
1. make auto-increase numbers in VIM:
let i=1|g/^/s//\=i/|let i=i+1
2. select all text between current { and }
va{
let i=1|g/^/s//\=i/|let i=i+1
2. select all text between current { and }
va{
Labels:
VIM
Monday, May 24, 2010
web-based project management ssytem (free)
Mantis: http://www.mantisbt.org/
Dotproject: dotproject.net
1. PHP, MySQL
2. GNU license
3. bug tracking
Dotproject: dotproject.net
1. PHP, MySQL
2. GNU license
3. bug tracking
Labels:
bug,
project management
cdo & nco
cdo:
cdo selname,Var1,Var2,... infile outfile
cdo mergetime file1 file2 file3 outfile (better than writting .F code)
cdo -f nc input,r195x138 output.nc < style="font-weight: bold;" size="4">
nco:
ncea -v Var1,Var2,... input1.nc [input2.nc [...]] output.nc
ncea -v Var1,Var2,... input1.nc output.nc
to retrieve data
ncwa -a Times input.nc output.nc
to compute average on specified dimension (Times)
ncks -v Var1,Var2,... input.nc -b out.bin out.nc
to generate binary file (GrADS compatible, small endian)
ncbo --op_typ=- input1.nc input2.nc output.nc
(output = input1 - input2)
ncap -s 'Presuure=P+PB' -v input.nc output.nc
to generate Pressure=P+PB
ncks -d time,1,100 alb2000-2009.nc a.nc
to get time=1~100 of alb2000-2009.nc, write to a.nc
ncap -s 'TFLAG=TFLAG+int(TFLAG/1995151)' input.nc output.nc
set TFLAG = TFLAG + int(TFLAG/1995151)
say AORGAT, AORGBT, AORGPAT are float in aconc_1995.nc
ncap -v -s 'OC=AORGAT+AORGBT+1.167*AORGPAT' aconc_1995.nc OCOC_conc_1995.nc
then OC is double, while
ncap -v -s 'OC=AORGAT+AORGBT+1.167f*AORGPAT' aconc_1995.nc OCOC_conc_1995.nc
OC is float
ncatted -a SDATE,global,m,i,1995151 input.nc output.nc
set global attibute SDATE to integer 1995151
ncrcat -p /scratch/scratchdirs/shenjian/run/uom_caladv/ -v Times,RAINC,RAINNC wrfout_d01_1993-01-19_00:00:00 wrfout_d01_1993-01-20_00:00:00 -o 2days_RAIN.nc
combine
ncrcat 1992/wrfsst_d01.1992120100 1993/wrfsst* -o wrfsst_d01.1992Dec1993
combine 199212 and each month of 1993 to one file.
cdo selname,Var1,Var2,... infile outfile
cdo mergetime file1 file2 file3 outfile (better than writting .F code)
cdo -f nc input,r195x138 output.nc < style="font-weight: bold;" size="4">
nco:
ncea -v Var1,Var2,... input1.nc [input2.nc [...]] output.nc
ncea -v Var1,Var2,... input1.nc output.nc
to retrieve data
ncwa -a Times input.nc output.nc
to compute average on specified dimension (Times)
ncks -v Var1,Var2,... input.nc -b out.bin out.nc
to generate binary file (GrADS compatible, small endian)
ncbo --op_typ=- input1.nc input2.nc output.nc
(output = input1 - input2)
ncap -s 'Presuure=P+PB' -v input.nc output.nc
to generate Pressure=P+PB
ncks -d time,1,100 alb2000-2009.nc a.nc
to get time=1~100 of alb2000-2009.nc, write to a.nc
ncap -s 'TFLAG=TFLAG+int(TFLAG/1995151)' input.nc output.nc
set TFLAG = TFLAG + int(TFLAG/1995151)
say AORGAT, AORGBT, AORGPAT are float in aconc_1995.nc
ncap -v -s 'OC=AORGAT+AORGBT+1.167*AORGPAT' aconc_1995.nc OCOC_conc_1995.nc
then OC is double, while
ncap -v -s 'OC=AORGAT+AORGBT+1.167f*AORGPAT' aconc_1995.nc OCOC_conc_1995.nc
OC is float
ncatted -a SDATE,global,m,i,1995151 input.nc output.nc
set global attibute SDATE to integer 1995151
ncrcat -p /scratch/scratchdirs/shenjian/run/uom_caladv/ -v Times,RAINC,RAINNC wrfout_d01_1993-01-19_00:00:00 wrfout_d01_1993-01-20_00:00:00 -o 2days_RAIN.nc
combine
ncrcat 1992/wrfsst_d01.1992120100 1993/wrfsst* -o wrfsst_d01.1992Dec1993
combine 199212 and each month of 1993 to one file.
Wednesday, April 14, 2010
command line parameters in alias
csh works:
alias check 'echo "checking \!^ ..."; tail -f \!^/rsl.error.0000'
alias check 'echo "checking \!^ ..."; tail -f \!^/rsl.error.0000'
Labels:
Linux
Wednesday, March 17, 2010
Subscribe to:
Posts (Atom)
