Commits

Tom Roche committed d0b1277

ported to latest regrid_utils

Minor changes to get onto regrid_utils improvements. Also
* perhaps too hopefully, committed uber_driver.sh with mode=repo
* retemp.ncl needs contributed.ncl for copy_VarMeta ... why didn't that fail sooner?

Tested on terrae/EMVL from uber_driver.sh::file in fresh terminal, will repeat with uber_driver.sh::repo soonest

TODO:
* move all these TODOs to https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/issues (or at least README, à la AQMEII-NA_N2O_integration)
* port *_driver improvements to
** other *_driver: EDGAR_driver, GFED_driver
** other uber_driver: AQMEII::uber_driver, GFED::uber_driver
* all regrids: how to nudge off/onshore as required? e.g., soil or burning emissions should never be offshore, marine emissions should never be onshore.
* all regrid maps: add Caribbean islands (esp Bahamas! for offshore burning), Canadian provinces, Mexican states
* complain to ncl-talk about NCL "unsupported extensions," e.g., .ncf and <null/> (e.g., MCIP output)
* determine why '<-' assignment is occasionally required in calls to visualize.*(...)
* fully document platform versions (e.g., linux, compilers, bash, NCL, R)
* test on
** tlrPanP5 (which now has R package=ncdf4, but readAsciiTable of input .txt's is very slow compared to terrae)
** HPCC (once problem with ncdf4 on amad1 is debugged: in process with JOB and KMF)

  • Participants
  • Parent commits d64c048

Comments (0)

Files changed (3)

File CLMCN_driver.sh

 # TODO: driver must ensure output_fp_template does not exist!
 
 # export CLM_CN_TARGET_FN_TEMPLATE_STR='######' # works for NCL, not bash
-export CLM_CN_TARGET_FN_TEMPLATE_STR='@@@@@@'
+export CLM_CN_TARGET_FN_TEMPLATE_STR='@@@@@@@@'
 CLM_CN_TARGET_FN_ROOT_TEMPLATE="emis_mole_N2O_${CLM_CN_TARGET_FN_TEMPLATE_STR}_12US1_cmaq_cb05_soa_2008ab_08c"
 CLM_CN_TARGET_EXT_CMAQ='ncf'
 CLM_CN_TARGET_EXT_NCL='nc'
 
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"    ; all built-ins?
 ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
-;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; for 
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; for copy_VarMeta
 
 ; can't call `getenv` before `begin`?
 load "$FILEPATH_FUNCS_FP"
 
   ;; create data container files from extents/template file
   template_fp = getenv("TEMPLATE_IOAPI_FP")
-;  template_datavar_name = getenv("TEMPLATE_DATAVAR_NAME") ; TODO: rename in driver
   template_datavar_name = getenv("TEMPLATE_IOAPI_DATAVAR_NAME")
   template_TFLAG_name = getenv("TEMPLATE_IOAPI_TFLAG_NAME")
   ; note template has no coordvars
 
     ;;; 1. Setup monthly filepaths, filehandles, datavars
     ;; inputs setup above
-    output_fp_monthly_NCL = get_year_and_month_fp( \
+    output_fp_monthly_NCL = get_monthly_fp( \
       output_fp_template_NCL, output_fp_template_str, model_year, n_month)
-    output_fp_monthly_CMAQ = get_year_and_month_fp( \
+    output_fp_monthly_CMAQ = get_monthly_fp( \
       output_fp_template_CMAQ, output_fp_template_str, model_year, n_month)
 
     ;; don't overwrite existing output
 
     ; look at the data
     print(str_get_nl() + this_fn +": about to do: '" +\
-      "summarize_annual_4d(output_fh->" +\
+      "summarize_4d(output_fh->" +\
       output_dv_name + ")'")
-    summarize_annual_4d(output_fh->$output_dv_name$)
+    summarize_4d(output_fh->$output_dv_name$)
 
 ;     ;;; View output in VERDI. Note:
 ;     ;;; * 'False'==foreground process.

File uber_driver.sh

 fi
 
 ### modes of access to sources (see setup_sources): either copy files or get from repo
-ACCESS='file'       # copy code in current directory
+# ACCESS='file'       # copy code in current directory
 # ACCESS=='file' uses no repository
 # ACCESS='git/ssh'    # outgoing ssh works (preferred if available)
 # REPO_URI_GIT="git@bitbucket.org:tlroche/${PROJECT_NAME}.git"
 # ACCESS='http+cert'  # outgoing ssh blocked, but you have certificates
-# REPO_URI_HTTP="https://tlroche@bitbucket.org/tlroche/${PROJECT_NAME}.git"
-# ACCESS='http-cert'  # (terrae) outgoing ssh blocked, no certs installed
+REPO_URI_HTTP="https://tlroche@bitbucket.org/tlroche/${PROJECT_NAME}.git"
+ACCESS='http-cert'  # (terrae) outgoing ssh blocked, no certs installed
 # also uses REPO_URI_HTTP
 
 # if [[ "${ACCESS}" == 'file' ]], you'll need