List of general questions I need to find answers to!

  • 1. How do I do cronjobs on salina?

    2. What is the difference between static, stack and heap memory? (01/09/06)

    Static memory tends to refer to fixed memory requirements declared in the executable (COMMON blocks and SAVE commands allocate static memory).
    Stack memory tends to refer to the memory allocated by the 'linker' for all addressing of subroutines and arguements passed back and forth through them.
    Heap memory tends to be dynamically allocated/deallocated at run time (ALLOCATE/DEALLOCATE and malloc()/free() in C).
    A good fortran-centric summary is here.

    3. What are the different account codes for GAU usage on bluesky/bluevista? (01/30/06)
    Account 93300075 is the production quota (CSL Division CCSMP)
    Account 93300042 is the development quota (CSL Division CCSMD)

    4. How do I bring back data from the HPSS mass store on phoenix at Oak Ridge? (04/24/06)
    hsi -q "cd /home/rneale/ccsm/b30.081/ice/hist; get *.nc"

    5. How does anonymous ftp work on cgd systems? (07/11/06)
    Put outgoing files in /ftp/pub/rneale
    Incoming files can be put in ftp/incoming Then do
    username: anonymous
    More details here)

    6. Using awk how do I change filenames and netcdf file contents? (10/17/06)
    This example copies a filename to a newfile name buy breaking it up half way through and insertinga 'b'.

    ls -1 | awk '{print "mv "$1" "substr($1,1,7)"b"substr($1,8)}' | sh

    This example changes the global attribute 'case' to b31.001b in all files

    ls -1 | awk '{print "ncatted -O -a case,global,o,c,b31.001b "$1}' | sh

    This example swaps the file extension (last 3 characters) from .ps to .png

    ls -1 arm*ps | awk ' {s=substr($1, 1, length($1) - 3); print "mv " s ".ps " s ".png"}'

    7. How do I check and/or reset the retention date for MSS files? (11/20/06)
    To reset the retention date on a particular run directory for another year use the following. Both commands are needed in order to get the run files as well:

    msretention -pe 365 /RNEALE/csm/cam3_2_36_fv_1.9x2.5/*/*/*
    msretention -wpwd rneale -pe 365 /RNEALE/csm/cam3_2_36_fv_1.9x2.5/*/*

    To check the retention date on all the files in a particular run directory use the following:

    msallinfo -R csm/cam3_2_36_fv_1.9x2.5 | egrep "RNEALE/csm|Exp"

    7. How do I change the crazy lat/lon dimension and variable naming convection from CAM regional history output? (02/21/07)
    The following example swaps out the standard lon,lat dimensions and variables to lat1,lon1 and the changes the regional dimension and variabel naming 0e_to_360e,30s_to_30n back to the useable lat,lon convection using ncrename:

    ls -1 *h3* | awk '{print "ncrename -v lat,lat1 -v lon,lon1 -d lat,lat1 -d lon,lon1 "$1}' | sh
    ls -1 *h3* | awk '{print "ncrename -v 30s_to_30n,lat -v 0e_to_360e,lon -d 30s_to_30n,lat -d 0e_to_360e,lon "$1}' | sh
    Another example for ncks
    ls --color=none -1 *h1* | awk '{print "ncks -v DTCOND,PS,gw,lat,lon,hyam,hybm,P0,time,time_bnds,date,datesec "$1" /glade/scratch/rneale/f.e14.FC5CLUBB.f09_f09.kelvin_diag.001/DTCOND/"$1}'

    8. How do you see who are the top disk users on a disk?

    du -sk * | sort -nr
    Sorting one dir deep and diaplying size in reverse order
    du -h --max-depth=1 | sort -nr

    9. How do I set superuser access on my laptop? (03/10/09)
    Use username 'cgdstallion\rneale-admin' then use usual password.

    10. Where is the disk location of CGD/CESM web pages? (12/12/13)

    11. Remove the first image from an animated gif (sometimes flickers from ncl) (11/05/14)
    gifsicle dynamo_hres_NPac_TMQ.gif --delete "#0" -o dynamo_hres_NPac_TMQ_no0.gif

    12. Turn off coloring for file listing (07/30/15)
    ls --color=none
    If you don't do this awk commands can mess up

    13. Trimming white space for an animation (03/02/17)
    convert -density 150 -trim +repage frames.gif

    14.Strip out ssh keys if they are old (07/26/17)
    If error is Offending RSA key in /home/rneale/.ssh/known_hosts:173
    Then type follwoing to fix it
    rmkhline 173