Skip to content

NOAA-EMC/EMC_smartinit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartinit conus development
Jeff McQueen

10-1-2012
Working on wcoss (removed xlf filename dependencies)
GETGRIB.f - Reduced getgb and varb assignment duplicate code
by introducing rdhdrs and setvar subroutines

10-5-2012
Fixed read error for snow/rain files
Combined getgrib and getgrib_off by introducing LHR flags

10-11-2012
Problem Creating 3 hour POPs in GETGRIB.f
 - Problem reading in SREF POPS >.01,.10,.50"  ??
 --> Fixed by resetting JGDS=-1 as could not find SREF data on special 255 grid

10-12-2012
GETGRIB.f : Error getting integer grib vars with setvar routine (eg: IRAIN)
  -->  So, put getgb and direct initialization in GETGRIB w/o calling setvar

10-15-2012
MAKEPRECIP :  Modified input linked files to fort.XX for WCOSS conventions
              Need to compile with /nwprod/lib/ updated w3libs for nmmb gds 205 grid type defined to work
10-15-2012
wcoss script,getgrib: Fixed F12h configuration, set up of i/o unit numbers(LUGB,...)
             getgrib,main : input limited off-hr read option and anal read option in GETGRIB
                            Therefore, GETGRIB-OFF,GETGRIB-LIMITED, GETGRIB-ANAL not needed
                            corrected reads of prev hours temps (lugt, lugt1i...)
             fhr=0 : Added checks to not process precip in wcoss script for fhr=0

10-17-2012  OFF-CYCLE TESTS
script,getgrib: fixed for condition where 3 hr precip is always available at +3,6...forecasts
                so just need to create MAXMIN temperature files

10-19-2012  addprecip6.f
            compiled for wcoss, added rdhdrs and setvar routines

10-19-2012  rdhdrs in addprecip6.f
            Need to pass back JGDS to main routine for input to setvar
     ACT::: Should be done in smartinit getgrib as well

10-22-2012  smartprecip
            combined addprecip6, addprecip12 and makeprecip for nam
            must provide fhr3 and fhr4 regardless 
            if fhr3 < 0, adding or subtracting two precip fields
            if fhr4 > 0, adding 4 precip fields to compute 12 hour totals
            if fhr1>fhr2, subtracting 2 precip fields

11-15-2012  smartinit  MAIN.f, GETGRIB.f
            Added allocatable arrays to MAIN,GETGRIB
11-20-2012  smartinit  MAIN.f
            Modularized SNOWFALL, SKYCVR and MKPOP calculations into subroutine
            Simplified MIXHGT Calculation
            Eliminated redundant codes for  MAX,MIN writes
11-21-2012  smartinit  MAIN.f90, GETGRIB.f90, RDHDRS
              Fixed definition of MAXLEV=KGDS(19)
              GETGRIB: Allocated VEG array previously not defined 
              MAIN: Added INTERFACE statements for GETGRIB,SKYCVR,SNOWFALL,MKPOP routines
      ACT::   Commented out smartpm call in SKYCVR until proper lib is available on TIDE
          
11-25-2012  Debugged MAIN.f90 subroutines, added interface
            MAKESTRING.f: converted to F90 w/dyn arrays
                          created subs to reduce code
            GRIBIT.f,   : coverted to F90 w/ dyn arrays 
11-26-2012  Added Module grddef and type ginfo to MAIN,GETGRIB and GRIBIT.f90
            now passing GDIN TYPE to subroutines
11-27-2012  Modules: aset2d, aset3d, constants created and used in MAIN, GETGRIB
11-29-2012  Modules: rdgrib, asetdown created and used in GETGRIB,  NDFDgrid 
            READndfd.f90 : completed dynamic allocation, reads of topo/mask for O-CONUS nests
            MAIN.f90 : Unified with HI O-CONUS to write out limited grib file for alaska 
11-30-2012 MAIN.f90 : Added mkpop, NDFDgrid changes for AK.  Tested PR
                      began adding VALIDPT bitmap checks for conusnest
                      Added VALIDPT, lnest to grddef module
 12-01-2012 GETGRIB.f90: Modified logic for setting special precip unit numbers

Now read precip depending on LHR3,LHR6,LHR12
but LUGP3,LUGP6,LUGP12 set to full or special grib file depending on run type
(eg: CYCON or OFF, NESTS)

          3hr precip     6hr precip    12 hr precip  in Full GRIB file
CYCON :   +3,+15,+27..   +6,+18,+30..  every 12 hrs
CyCOFF:   every 3h       need(u15,17)   need(u19),  CHECK 6 HR!!!!
NESTS :    " "           need(u15,17)   need(u17), 6h (u15,17)

 12-02-2012 :
   GETGRIB  : Fixed igrdnum,numval set for various precip,maxmin input files
   MAIN     : Fixed interface statement for wxstring
              Moved GRIDWX out of downaset module for pass into makestring
              Moved validpt out of griddef, fixed set in getgrib to come 
              after Temperature read
12-05-2012  : Testing conusnest region option
     GETGRB : Put in LHR9 test...maybe only needed for on-cycle non-nests
     unifprecip: completed conversion to f90 formatting
     smartint.sh:  Adjusted mk3p,mk6p,mk12p for nests (mk3p always = 0)
                   moved logic for hr3bkt needed for on-cycle parent 3-hr  
                   or off-cyc/nests 6 hr precip special file read
12-15-2012 NDFDgrid.f Fixed logic so conus nests check veg and roughness values
           plotmet, plotdiff created gempak plotting routines

12-21-2012 : CONUS REGION
    NDFDgrid.f : Changed so all grids use q at level 1 rather than q-2m(too noisy).
01-17-2013 : OFF-Cycle
  GETGRB: Fixed 6 hour precip reads and set LHR12 correctly
  ncoproc.sh : Fixed conversion to grib2, pgmout should be set
  jobs : completed combining oper jobs and scr and config for various runtyps
01-24-2013: reintroduced ex script
  unified all jobs so RUNTYP is set in parent ecflow script

01-27-2013: MAIN.f90
   Checked when max,min,thold,dhold =0 at a valid point
   Should = spval when temperature = 0.
   not sure why at one point, this inconsistency creeps in
   for example, conusnest at point 1011,26

   NDFDgrid.f90 : Checked if dewnew.ne.spval before computing qnew
   even if validpt

01-28-2013: GETGRIB.f90
   changes LHR9=FALSE for all off-cycle and nest runs
   since they should have 3 hr precip in std nam file

01-29-2013 
GETGRIB.f90
   Changed setvar to not stop if reading upper air fields
   This is because nam input files after 60 hours has only 35 vertical levels, not 60
nam_smartinit.sh:
   Fixed error for off-hour 54 check in AHR array.

01-30-2013
ncoproc.sh
	Added check to make sure the awp2 parm file is available before running tocgrib2

02-21-2013:  MAIN.f90
        Error writing SNOD.  Incorrect GRIB TABLE set.
        Corrected by resetting ID(1:25)=0 
2-22-2013: bjobc Cards
added shared queue configuration (comment out bsub -X, add LAUNCH to ush scripts)

Max Memory usage (MB) 
           00-54/60	60-84    USED
conus      1141         1690     1900
ak         703/1036     1043     1200
hi          302		 912     1100
pr          259          912	 1100
conus2p5    4508         XX      4700
ak3         2790         XX      3000

2-25-2013
ncoproc.sh : line 53: corrected SEND_DBN error
           : defined pcom directory in JOB for awips grib2 files
           : Modified to use the correct awpparm file for conus2p5 and ak3 runs (namdngconus, namdngak)
           : Modified to copy awips file to correct name for ak3 run. (smart3.ak )

/nwprod/util/parm files
          :  cpied awips conus2p5 and ak3 awips parm files from cirrus
             grib2_awpnamdngconus...
             grib2_awpnamdngak...

03-07-2013 : MAIN.f90 
             Output topo for CS and CS2P (all grids now)
03-13-2013 : NDFDgrid.f90
	     Corrected check for validpt that caused problems along Alaska boundaries
03-15-2013 : nam_smartinit.sh 
	     Added check to save in-between forecast hours for hawaii and priconest runs up
             to 9 forecast hours as is done for alaska.
DEV:
03-19-2013 : nam_smartinit.sh
             MAIN.f90, GETGRIB.f90, GRIBLIMITED.f90
             Output VIS and WGUST every hour to 12 hours for ak,hi,pr, ak3, conus2p5
             as part of the limited off-hour file writes for RTMA

DEV/prod
04-30-2013 : nam_smartinit.sh  Changed to output and run ncoprocessing for all grids at forecast hour 00.
             (mksmart=1, alaskanest, hawaiinest,priconest)
05-01-2013:  nam_smartinit.sh : Changed mksmart check for alaska
             scripts/nam_smartinit.sh.ecf --> changed check to run all grids at fhr=00


07-01-2013:  MAIN.f90 : fixed MIXHGT to ensure defined at all points if not determined during 
             vertical check
NCO IMPLEMENTED on 7/15/2013
===============================================================================================

FY14 IMPLEMENTATION *****
07-01-2013:  Testing extended conus 187 grid creation:
             nam_smartinit.sh : changed ogrd=187
             fix: using 187 weight files : nam_wgt_187_conusnest
             parm: modified conusnest2p5 master control file to set 187 as ogrd for prdgen
             Now requires 5500 gb of memory.
             
             Configured guam nmm hrw to ndfd 2.5 km (grid 199) guam smartinit
             fix: cp nam_smartmaskgm.grib, nam_smarttopogm.grb
             parm: created gm master control file to set 199 as ogrd for prdgen
                   (nam_mastergm.ctl)
            prdgen output now mesogm.NDFD for guam interp

07-02-2013: Modified ecf script to create 00 hr downscaling from NAM parent for 
           conus, hi, pr
           00hr  NAM PARENT  conus,ak,hi,pr,alaskanest,conusnest2p5,aknest3
           03-09 NAM PARENT  ak-->ak_rtmages
           03-60 NAM NEST    conusnest,alaskanest,hawaiinest,priconest,conusnest2p5,ak3nest
           63-84 NAM PARENT  conus, alaskanest(ak), hi, pr
NCO IMPLEMENTED on 7/23/2013

07-03-2013: Created NAM_SMINIT.CTL config file to provide 
            rg     = region name trigger for prdgen wgt, master file name format
                       con, ak, hi, pr, ak3, gm
            mdlgrd = input NAM grid domain name
                       conusnest,hawaiinest,priconest,alaskanest,guamnmm
            sgrb   = SREF input file grid no 
                       212, 216, 243, gefs
            natgrd = NAM Native input grid type 
                      bgrd3d, .bsmart, wrfprs
            ogrd   = output NDFD grid number 
                      195, 196, 197, 198, 199, 91, 184, 187
            grid   = grid definitions for copygb interp
            outreg = Output file name region identifier
                       conus, ak, hi, pr, conus2p5, ak3, gm

07-04-2013: Modified nam_smartinit.sh to read/use cfg fields from CTL file
07-08-2013: JNAM_SMINIT, smart_para_config
            SET NET==nam or hiresw(for guam) input model directory (COM_IN) set
NCO : ADD COM_IN option to JNAM_SMINIT job
            nam_smartinit.sh : for guam use GEFS prob input

07-15-2013
nam_smartinit.sh 
* using mdl varb (nam, hiresw) to define prdgen input files
* Needed for Guam that uses hires window WRF-NMM.
NOTE : SHOULD USE RUN OR NET ENVIR variable for mdl

GUAM:
Unified reads of guam land, orog file reads (in fix sub-directory)
Created READGBpres.f90 to read in hires pressure grids
Still error in reading.
Error reading gefs prob files also.

MAIN.f90, NDFDgrid.f90 : Added output of DOWNP (PNEW) instead of PSFC
??? SHOULD OTHER PRODUCTS USE PNEW FOR COMPUTATION (eg:mixhgt)


07-26-2013 GEM, RUN_GEM, ftpmet.job
* Changed to plot nam nest vs downscaled smartinit fields thru 12 hours
  by setting mdl="smart nam"
             gribd2=/com/nam/prod
             gribfile=nam.t12z.hiresfHH.tm00 
* make-sfc, plotdiff.sh : Fixed title and plots with different vertical levels :
Eg: NAM (2m temp) vs SMARTINIT( sfc temp) on same graph


07-30-2013
nam_smartinit.sh 
*  Fixed cp of conus2p5 hourly files to 12 hours with vis/gust fields.
   Also done for ak_rtmages, priconest, hawaiinest

07-31-2013
nam_smartinit.sh
* Added option to use previous cycle 6 hour forecast for hour 0 downscaling if GUESS=GDAS (coldstart)
* note default GUESS=NAM
JNAM_SMINIT job
* Invoke nam /nwges/prod/nam.yyyymmdd/nam.envir.sh to set GUESS variable needed by nam_smartinit

08-23-->28-2013 smartinit/branches/Q1FY14-vert2
* Updated to vertical structure (JNAM_SMINIT, nam_smartinit.sh, smart_para_config)
   smartinit.v3.2.0/jobs,sorc,ush...
* Cleaned up unnecessary scripts, fix, parm files
* using envir=emc.  NCO reserves dev now.

09/11/2013 -- sorc/smartinit.fd/NDFDgrid.f90
* Fixed downscaled PNEW initialization to spval


VERSION 3.2.2===================================================
09/26/2013 --> sorc/GETGRIB.f90
* Fixed visibility reads for non-nest downscaling (>54 or 60 hrs)
  Only read hourly visibility for nest downscaling (<=54 or 60 hrs)
* Fixed upper level varb reads for non-nest downscaling by setting KMAX levels =35
  for in between forecast hours (eg: 61,62, 64...)
* Changed POP read indexing (line skipping, J)
  from J =0  2  4   5  7  9  10  12 14
    to J =0  1  3   5  6  8  10  11 13
        .01 .1 .5 .01 .1 .5 .01  .1 .5
         3 hr---    6 hr---  12 hr---- SREF POP
* nam_smartinit.sh
    Fixed copygb gridext varb to correct dx 2500 2500

11/20/2013
V3.2.21 : fixed visibility read in GETGRIB.f90 for AK_RTMAGES in-between hours
          Added NCO ecflow and gempak scripts.
          Made JNAM_SMINIT job compatible with NCO version
NOTE: Visibility not read in from non-nests (should fix this ?)

============================VERSION 3.2.3==============================================
FY14Q2
***  terrain based wind adjustment
***  DGEX downscaling to 192 hours
     --> Include JSREF_SREFTOGEFS for POP output beyond 90 hours
***  Haines index product
***  Hourly CONUS 2.5 km downscaling to 36 hours

11/01/2013 NDFDgrid.f90
* Added VADJUST.f90 subroutine to adjust 10 m winds based on terrain gradient (CALMET techniqe)

11/05/2013 MAIN.f90
* Added Routine HINDEX to compute HAINES Index from downscaled Pressure or reference height as compared
to downscaled topography.  This reference hght determines the method for computing HI (what T, RH level and coefficiants.

11/20/2013 -->sorc/MAIN.f90 & ush/nam_smartinit.sh
*   The length of hourly file writes set by fhrhrly in MAIN.f90 and in nam_sminit.sh
*    Conus 2.5 km hrly output extended to 36 hours for wave model input

11/25/2013:  DGEX extension forecast hours 87->192
* modified parm/JNAM_SMINIT.CTL for dgex setting
* added dgex weight and master files
* modified ush/jnam_smartinit.sh
* modified sorc/GETGRIB.f90 to read in max, min files for 6 hourly input

12/02/2013  JSREF_SREFTOGEFS added and modified to extend beyond 90 forecast hours for dgex
* Also modified scripts/jsref_GEFS.sh.ecf
*               sorc/jsref_ens.fd
*               parm/sref_para_config

12/06/2013  jsref_gefs2sref_03.ecf
* Created driver ecflow script for JSREF_SREFTOGEFS job
    must bsub for poe to work
    and use bjob card:  #BSUB -R "affinity[core]" in ecf script

01/09/2014  JNAM_SMINIT, grddef.f90
* defined fhrstr variable for DGEX = 87 otherwise 00.
* JSREF_WRFGFSPREP and scripts modified to create global pgrb files thru 126 hours
gens files are 6 hourly after 126 hours.
* modified gfsprep and enspost scripts to run thru 126 hours (3 digits):
       After 126 hours, interval changes to 06.
NOTE:  JGEFS2SREF system won't work past 126 hours so POPs not available from sref look-alike files 
        after 126 hours.

01/15/2014  GETGRIB.f90, rdgrib.f90
* Check if ifhr <= 126 to read in 3 hourly prob. precip files (for DGEX)
* setvar subroutine:  Does not stop if wetting rain not found (for Guam)

01/17/2014 DGEX sref_ens_gen.f postprocessor
* Fixed fhr to write out 3 character forecast hour id (write(hr,i3.3) timestep)
    This will impact smartinit reads, I think ?

01/23/2014 DGEX smartinit
* Created RUNTYP=dgex_cs for 06/18 z (fhrstr=78) conus run
* Created RUNTYP=dgex_ak for 00/12 z (fhrstr=84) alaska run 
smartinit.sh, GETGRIB.f90
* Set mk3p/LHR3, and mk12p/LHR12 to make and read special precip files for 3,12 hr buckets
* set AHR6 for dgex off/on cycles
* set region for dgex_cs = cs2p, dgex_ak = ak3
* created master file for dgex_ak

Need 78 hours dgex file 1. wgrib nam, 2. copygb to dgex grid

01/31/2014
* VADJUST.f90 : Fixed input DX,DY=2500. for nests

02/04/2014  hiresw (guam) runs
* NDFDgrid.f90 : for nmmb hiresw core, adjusted model land mask (veg_nam_ndfd,1-16,veg type) to be 
equivalent to input NDFD 2.5 km land mask (veg_ndfd, 0-1, veg fraction)

HIRESW GUAM INTERFACE COMPLETE

****************************************V3.2.4********************************************

02/19/2014
* Created nam_nam2dgex.ecf and NAM_NAM2DGEX jobs to copygb 78 hr NAM to DGEX bgrd native format.
* Interface for dgex_cs RUNTYP (needs 78 hr DGEX like file) 
* Removed ush/sorc nam_smartinit dependencies.
    Now using smartinit.sh and smartinit sorc indepedent of model
    But still using {mdl}_smartinit.ecf, J{MDL}_SMINIT, and ex{mdl}smartinit.ecf.sh for mdls=nam,dgex and hiresw
* smartinit.sh : added option for dgex precip (03 or 06 hr buckets) in mkpcp logic

02/25/2014
* nam_smartinit.fd  : 
*  Added option to compute dgex 6 hr precip if input fhr3>0 but fhr4<0
     At 3 hr times (check6 ne 0), need 6 hr special precip file
       Pfhr6=pfhr+(pfhr3-pfhr6)
     Introduced shr1 = snow starting bucket hour for 1st precip file
       eg:  T-12, T-6 or T-3

* Fixed ush/dgex_smartinit.sh to point to correct precip files links
   For 6 hr precip calc (check=0,check6.ne.0)
     ln -fs 13 --> fhr6 hr old 3 hr precip    (pfhr1)  eg: 78
            15 --> fh3 hr old  6 hr precip    (pfhr2)  eg: 81
            17 --> current hr  3 hr precip    (pfhr3)  eg: 84
   For 12 hr precip, sum up the current and previous 6 hour old precip buckets
     ln -fs 13 --> 6hr old 6 hr precip
     ln -fs 15 --> current 6 hr precip

* ush/dgex_smartinit.sh modified to create new options depending on pfhr1,pfhr2,pfhr3,pfhr4 
   NEW OPTIONS for input to SMARTINIT.f90:
   #  if pfhr1 > pfhr2: Create 3hr precip=prcp@fhr - prcp@fhr-3  with  3hr bucket files
   #   and pfhr3 > 0  : Create 3hr precip at 6 hr times, check6=0 (for dgex files)
        eg: 3h prcp=prcp@fhr - prcp@fhr-3       where prcp@fhr is 6 hr bucket

   #  if pfhr1 < pfhr2: create 6hr precip=prcp@fhr-3 +prcp@fhr  -->  All 3 hr buckets
   #     And pfhr3>0  : Create 3hr precip=prcp@fhr + (prcp@fhr-3 - prcp@fhr-6)
   #     Note: prcp@fhr-6, assumed to be 6 hr bucket

   #  if pfhr4 > 0    : create 12h precip=prcp-9 + prcp-6 + prcp-3 +prcp@fhr, All 3hr buckets
   #    ANd fhr3=fhr2 : create 12h precip=prcp-6 + prcp@fhr, All 6hr buckets


02/26/2014
* Created ecf/jsref_gefs2sref132.ecf
     -  To process GEFS files at 6 hour intervals from fhrs 132-192
     -  11 tasks needed for this LSF bjob
WARNING:   STILL NEED to CHECK if STRHOUR=132 is used properly in dependent jobs/scripts


02/27/2014   sorc/smarprecip.fd/SMARTPRECIP.f90
 * Corrected DGEX option addsub to compute 6 hr precip from 3 dgex files
                fhr1 (fhr) 3 hr precip
                fhr2 (fh3 old) 6 hr precip
                fhr3 (fh6 old) 3 hr precip
                    then mk6p=fhr+(fhr3-fhr6) for DGEX
*  Added DGEX 12 hr precip option
                fhr1=fhr6  6 hour old 6hr precip bucket file
                fhr2=fhr   Current    6hr precip bucket file
                  12hrp=fhr6 + fhr

03/04/2014  ecf/sref_gefs2sref.ecf, SREF_ Jobs, sref_para_config
* smartinit version number, SMVER, now set once in ecf or smartinit.ver file
* Modified JSREF jobs and scripts to use STRHOUR for ecf/sref_gefs2sref132.ecf frun

03/05/2014  
sorc/sref_ens_gen.f
* Fixed fhr, cyc to character *3  for fhrs >99

scripts/sref_ensGEFSpost.ecf.sh 
* Only call when all 192 gefs pgrb files are available 
    (after jsref_gefs2sref132.ecf is run)
* After 126 hours, set interval=06
* Optimized set up MODEL (sref model type)
                    PAIR (GEFS pert number)
                    MODEL_PAIR (SREF pert type) 

03/07/2014
ush/dng_awp.sh
* Added special haines grib/grib2 file creation using wgrib
kick-scripts/ftpmet.sh
* new script to ftp haines grib2 tar file to emcrzdm

03/18/2014
* ush/dng_awp.sh  : Fixed haines index file creation to point to wgrib
* scripts/gefs2sref POST : Fixed set up of MODEL, PAIR, MODEL_PAIR arrays
* ecf/ gefs2sref : Set PDY for development runs
* jobs/GEFS2SREF : use strhour properly

03/20/2014
* scripts/gefs2sref POST : 
  - Added 3 hr avg file creation for GEFS sref look-alike members
    after forecast hour 126.  Used wgrib2 -fcst-ave option
           
3/28/2013
* ush/smartinit.sh, dgex_smartinit.sh
  - Corrected grid variable configuration for copygb CONUS Lambert Conformal grids
  - Restructured grid config based on gtyp varb (1=merc,3=LC, 5=PS)
IMPLEMENTED ON MAY 6, 2014

05/02/2014
* sorc/smartinit.fd/VADJUST.f90
  - Restricted u,v adjustment if less than 10 m/s and
  - all 8 surrounding points are valid.
  - also removed validpt check when solving Poisson equation for velocity potential
  - also set PHI = 0.1 over not validpts
  - reduced W from terrain = phi2=0.01...this reduced impact
    but is correct for terrain following input
Produces a larger impact 

05/09/2014
* GEFS2SREF jobs/scripts/sorc
  - Fixed thru 99 hours
  - filename and input hours cut off at 2 digits to sref_ens_gen
  - Fixed sref 03/09 cycle runs...-Z2 digit needed
  - After 126 hours...do not subtract precip diffs
  - Changed 3 hr average calculation for intermediate sref gefs files
     using wgrib2 to change header eg:  -set_ave "3-9 hour acc fcst"
  - Turned off gefs2sref132.ecf --> will use jun's combined gefs2sref system
* ush/dgex_sminit.sh
  - Addex check for input SREF/GEFS prob file before running dgex

05/13/2014
* VADJUST.f90
  - Set PHI values around validpt and domain edge boundaries
  - Set HTOPO if not validpt or at domain edge

05/15/2014
* smartinit.fd/GETGRIB.f90, ush/dgex_smartinit.sh
  - Fixed reads for 3/6 hour precip
  - Passing core to determine if dgex file

05/20/2014
* smartinit --> Tested Jun's gefs2sref output to 192 hours for POPs

05/22/14 : Did a complete end-to-end test for NAM and DGEX

******************************************************************
05/27/14: V3.2.5 DELIVERED TO NCO 
******************************************************************

05/29/14
* smartinit.sh : Added grib2 output for hourly conus2p5 files
* RUN_ALL :   set up for simultaneous 3 hr forecast hr runs

06/05/14 
* changes nam_smarprecip to smartprecip like GFS scripts

06/06/14 : Did a complete end-to-end test thru 84 hours for NAM

06/09/14
* JNAM_SMINIT, smartinit.sh : Fixed GDAS coldstart option
   set pcdate, pcfhr, pcyc in job
   Run cold start option for bsmart (nest) files as well as bgrd3d (parent) files

06/13/14
* at 18z, changed to point COM_IN to /com/nam/para
* JNAM_SMINIT : Fixed GUESS set option for running envir script.
    - Needed to use . rather than sh script-name.sh

06/16/14 12Z : 
* Began real-time EMC NAM DNG PARA end-to-end thru 84/192 hr test
with NCO NAM para outputs.
* ush: turned off GDAS set in NCO ush/smartinit.sh
       Fixed SREFPROB cp to cp the SREF 3hrly prob file rather than GEFS

#=======================================================================
Froze NCO version code v3.2.7
#=======================================================================

06/26/14 18Z V3.2.9
* MAIN.f90 : turned on outputting of previous 2 hours temperatures even at 10/11 22/23 Z 
to reduce confusion with smart files.
In future, Geoff prefers stripping out previous 2 hours temps from all files

* Turned on grid extended conus dng for conus2p5

06/27/14 12Z V3.3.0
* MAIN.f90: fixed hr label for T-1 (THOLD3) and T-2 (THOLD2) output fields
* ush/smartinit.sh : added option to run copygb instead of prdgen
                     but using nearest neighbor (i2) option

09/01/14 12Z
* VADJUST.f90 : Added fix to PHI iteration
* NDFDgrid.f90 : turned on ispdadj=1

09/18/14 >18z
*NDFDgrid.f90 : changed frictional wind adjustment to after VADJUST call
but turned off so to test the following:
*VADJUST.f90  :  Adjust phi based on (Topo-nam  - Topo-ndfd)/Topo-nam

9/23/14 18Z
* Turned on frictional wind adjustment and scaling
* corrected scale factor in VADJUST

10/6/14 18Z
* Fixed  scale factor to not be used over water (where ZMAX=0)

10/9/14 18Z
* wkadj2 :  Moved vadjust call to come before coast-line correction code in NDFDgrid.f90

10/14/14 18Z
* VADJUST.f90: Fixed DSCALE to not be greater than 1.0 and not be used if Z is over water or less than 0.01

10/31/14 18z
*VADJUST.f90 : Fixed DSCALE to not be less than 0. and not be used if model or ndfd topo less than 0.01
        Trying to correct blockiness wind direction patterns
       *** Blockiness Caused by copygb of extended grid 188
          Need to revisit extended conus option

11/1/14 12z    
* Changed DSCALE=0. check to look at veg_ndfd, veg_nam_ndfd
(also 10/31/ 12z)
Switched HBAR=ZSFC

11/2 00z  Changed to use 184 smaller NDFD grid rather than extended grid
(also 11/1 00z)
* Switched back to use HBAR=HGHT (1)
since it will never be less than 0 (death valley issue)

11/2 12z V3.3.1
* slight adjustment for dscale
 subtracted model 1st level depth (H1) from HGHT to be comparable with ndfd terrain

QUESTION: Is HGHT geopotential ??
If so, need to recheck dscale computation

******************************************************************
11/13/14: V3.2.8 DELIVERED TO NCO and ran operationally
          only Fix to VADJUST.f90 wind adjustment was included 
******************************************************************

11/17/ 18z V3.3.2
* util/parm : added wmo header awips parm cards for NAM/DGEX haines index for CONUS and Alaska grids

11/18/12z 
* jobs, NDFDgrid.f90 : added IVADJ switch to turn on/off VADJUST.f90 call (T/F)
* jobs: synched with NCO version, added dgex_ver parameter

11/19/12z
* ush awp_dng.sh and parm/util : changed nam/dgex wmo data card file format to "dng" except for gfs
    grib2_awp{mdl}{rgn}{on/off}f{fhr}.{grd}

VERS 3.3.2 frozen

12/1/14  V3.4.0

* sorc/VADJUST.f90
  - Turned on wind adjustment at coastlines when NAM thinks gridpoint is over water

1/15/15  V3.4.0
* sorc/MAIN.f90 : Fixed Haines Index calculation

2/25/15 v3.4.0
*sorc/VADJUST.f90 : Changed DSCALE calculation to be the ratio of  sfc heights
                    (Zndfd - Zmdl)/Zmax
                    where Zmax=max (Zndfd, Zmdl)
                  : Limited HTOPO (NDFD grid hght) to be greater or equal to 1 m
                    to avoid problems around areas with topo less than MSL

2/26/15 v3.4.0
*sorc/VADJUST.f90 : Limited BOTH HTOPO and ZSFC (NDFD and MDL terrain) to be greater than 0 m
                       --> These changes help Salton sea problem
                  : Turned back off wind adjustment over water (DSCALE=16)
                       --> Since it does not help salton sea problem and 
                           the problem with too much wind adjustment over water returned (see 11/01/2014)

******************************************************************
Smartinit VERS 3.4.3 - Annette Gibbs
******************************************************************

Jun 2015 v3.4.3

* Changed smartinit to run on phase 2

	-script parm/smart_para_config was changed (ptmpp1/stmpp1 was changed to ptmpp2/stmpp2)

	-script parm/sref_para_config was changed (ptmpp1/stmpp1 was changed to ptmpp2/stmpp2)

* Added new grid specifications for expanded CONUS Nest (grid 188) and Puerto Rico 1.25 km domain (grid 254)
	(new Puerto Rico 1.25 km grid is currently not being used)

	-Added Terrain, Land/Sea Mask, Weight and master parm files for new expanded CONUS Nest domain (grid 188) and 
	 Puerto Rico 1.25 km domain (grid 254):
         
	 fix/topo/nam_smarttopoconus2p5_EXP.grb2
	 fix/topo/nam_smarttopoconus2p5_EXP.grb2i
	 fix/topo/nam_smarttopoconus2p5_EXP.grb
	 fix/topo/nam_smarttopoconus2p5-EXP.grbi
	 fix/topo/nam_smarttopopr1p25.grb2
	 fix/topo/nam_smarttopopr1p25.grb2i
	 fix/topo/nam_smarttopopr1p25.grb
	 fix/topo/nam_smarttopopr1p25.grbi
	 fix/mask/nam_smartmaskconus2p5_EXP.grb2
	 fix/mask/nam_smartmaskconus2p5_EXP.grb2i
	 fix/mask/nam_smartmaskconus2p5_EXP.grb
	 fix/mask/nam_smartmaskconus2p5_EXP.grbi
	 fix/mask/nam_smartmaskpr1p25.grb2
	 fix/mask/nam_smartmaskpr1p25.grb2i
	 fix/mask/nam_smartmaskpr1p25.grb
	 fix/mask/nam_smartmaskpr1p25.grbi
	 fix/wgt/nam_wgt_188_conusnest
	 fix/wgt/nam_wgt_254
	 fix/wgt/nam_wgt_254_priconest

        -corrected for GRIB2 precision.  When the GRIB2 Terrain was converted to GRIB1, some precision was lost in some of the 
	 grid specs. (2 Feb 2016 - not currently being used.)

	 ush/dng_awp.sh

	-created links for new Puerto Rico and expanded CONUS nest domains.
	(links for Puerto Rico are currently set back to 2.5 km domain)

	-new grid specifications were added for pr, priconest, and conusnest2p5 to parm/SMINIT.CTL

* Added GRIB2 option for future implementation using Eric's NAM parallel (this option is not used yet; will be implemented in
  Q4FY16).
	-created GRIB2 master parm files (parm/nam_smartinit_bsmart_grb2.parmlist*, parm/nam_smartinit_bgrd3d_grb2.parmlist*,
	 parm/nam_smartinit_grb2_budget.parmlist_* and parm/nam_smartinit_grib2_nn.parmlist parameter files)
	-replaced exec/smartinit_prdgen with exec/smartinit_wgrib2
	-added parallel wgrib2
	-added GRIB2 specs for each grid
	-uses parallel 3 km NAM Nests and 12 km NAM /meso2/noscrub/Eric.Rogers/com/nam/para
		: changed in parm/smart_para_config
	-wgrib2 uses nearest neighbor interpolation for 2.5 km CONUS NEst, 3 km Hawaiinest, and 3 km Alaskanest; uses budget for
	 precipitation/snow fields; and bilinear interpolation for all other grids.

Jul 2015 v3.4.3

* Added GRIB switch to ush/smartinit.sh.

	export grib=1 ; for using OPS NAM GRIB1 data (currently using grib=1)
	export grib=2 ; for using parallel NAM GRIB2 data

* Added local versions of the source codes and executables of cnvgrib, wgrib2 and nam_prdgen.
	
	sorc/smartinit_cnvgrib.fd
	sorc/smartinit_prdgen.fd
	sorc/smartinit_wgrib2.cd
	exec/smartinit_cnvgrib
	exec/smartinit_prdgen
	exec/smartinit_wgrib2

	-Added local versions of cnvgrib, wgrib2, nam_prdgen to ush/smartinit.sh, ush/dng_awp.sh, jobs/JNAM_SMINIT 
	 and jobs/JDGEX_SMINIT

* Added ceiling height to the master parm files. 
	-ceiling height was added to parm/nam_masterak.ctl, parm/nam_masterconus.ctl, parm/nam_masterhi.ctl, parm/nam_masterpr.ctl,
         parm/nam_smartmasteraknest3.ctl, parm/nam_smartmasterconusnest2p5.ctl
* Added ceiling height to smartinit source code:
	sorc/smartinit.fd/MAIN.f90
	sorc/smartinit.fd/GETGRIB.f90
	sorc/smartinit.fd/aset2d.f90
* Uses ceiling height from OPS *bgdawp* files. Ceiling height is not written out in the OPS NAM *bgrd3d* and *bsmart* files, so
	we need to get the ceiling height from the OPS *bgdawp* files.
	ush/smartinit.sh
* CONUS Nest uses land/sea mask instead of vegetation type to define temps/dewpoint/winds near coastlines
	sorc/smartinit.fd/NDFDgrid.f90
* Changed grid spacing in code for Puerto Rico from 2500 km to 1250 km.
	sorc/smartinit.fd/NDFDgrid.f90 
* Added code in smartinit to define expanded CONUS Nest to temporary grid id 188 and Puerto Rico 1.25 km to temporary grid id 254.
	sorc/smartinit.fd/w3fi71.f
	sorc/smartinit.fd/w3fi63.f
* Added date and cycle to ptmpp2 directory ($PDY and $cyc); changed COM_OUT (output directory) to /meso2/noscrub/$USER/${model_ver} 
	for parallel runs
	parm/smart_para_config

Aug 2015

* Added hourly total cloud cover to smartinit source code:
	sorc/smartinit.fd/MAIN.f90
	sorc/smartinit.fd/GETGRIB.f90
* Fixed wind gust bug in smartinit code: Wind gust is now being read in and used for evaluating wind gust for intermediate hours
	sorc/smartinit.fd/MAIN.f90
	sorc/smartinit.fd/GETGRIB.f90
* Added hours 00 and 10, 11, and 12 to ak_rtmages files.
	ush/dng_awp.sh
	ush/smartinit.sh
* Converted all hourly files and *ak_rtmages* files to GRIB2 for RTMA/URMA.
        ush/dng_awp.sh
        ush/smartinit.sh
* Use parallel SREF /com2/sref/para
	- changed in parm/smart_para_config

Sept 2015 -  smartinit.v3.4.4

* Changed Puerto Rico 1.25 km grid back to Puerto Rico 2.5 km grid (3 September 2015)
	link topo and mask files to PR grid 195
        link master control file for PR to grid 195 (parm/nam_masterpr.ctl)
        add ceiling height to parm/nam_masterpr.ctl-195
	parm/SMINIT.CTL (changed grid specs back to grid 195)
	ush/smartinit.sh (changed grid specs back to grid 195)
	ush/dng_awp.sh (commented out GRIB2 precision change)
        sorc/smartinit.fd/NDFDgrid.f90 (changed DX,DY back to 2500 km)

* Changed Conus Nest 2.5 km Terrain & Land/Sea mask (used GRIB1 precision)
	link topo and mask files to new Terrain & Land/Sea mask files
        sorc/smartinit.fd/w3fi71.f (changed grid specs for grid 188)
	parm/SMINIT.CTL (change grid specs)
	ush/smartinit.sh (change grid specs)
	ush/dng_awp.sh (commented out GRIB2 precision change)

* Added local version of overgridnum_grib to change CONUS Nest files from grid number 188 to 255.
	sorc/smartinit_overgridnum_grib.fd
        exec/smartinit_overgridnum_grib
        ush/dng_awp.sh

* Only write out AWIPS files every 3 hours
	ush/dng_awp.sh	
	ush/smartinit.sh
	ush/dgex_smartinit.sh

* Change DX/DY to 6000 km for *ak_rtmages* and DGEX AK files
	sorc/smartinit.fd/NDFDgrid.f90

* Set Haines Index and Ceiling Height to SPVAL for bitmap
	sorc/MAIN.f90

* Changed Conus Nest 2.5 km Terrain & Land/Sea mask to the consensus Terrain & Land/Sea mask (used GRIB1 precision)
	link topo and mask files to new Terrain & Land/Sea mask files
	
* Changed grid 188 back to grib 184 (using copygb).  CONUS Nest output files are now grid 184.  This was done so the AWIPS
  header parm files would not have to be recreated for grid 188. Twelve GRIB1 grid 188 files are added to output directory,
  for use in RTMA/URMA: nam.t${cyc}z.smartconus2p5${hh}.tm00_wexp

	ush/dng_awp.sh

Oct 2015 -  smartinit.v3.5.0

* Added modulefiles and build_smartinit.scr to meet NCO requirement
	build_smartinit.scr
	modulefiles

Nov 2015 - smartinit.v3.5.0

* Added membrane SLP (MSLET) and SST (Surface Temp) to the smartinit output.  SLP and SST are currently not in the OPS *bsmart* 
  files, so need to grab them from the OPS *bgdawp* files. (For this Q3FY16 implementation, SST is not written out).

	sorc/smartinit.fd/aset2d.mod
        sorc/smartinit.fd/GETGRIB.f90
        sorc/smartinit.fd/MAIN.f90
	ush/smartinit.sh

* Corrected bug in parm/*ctl files where pressure level 5 was defined twice.
* Added Mesinger Mean SLP
	parm/dgex_masterak.ctl
        parm/dgex_masterconus.ctl
        parm/nam_masterak.ctl
	parm/nam_masterconus.ctl
	parm/nam_masterhi.ctl
	parm/nam_masterpr.ctl 
	parm/nam_smartmasteraknest3.ctl
	parm/nam_smartmasterconusnest2p5.ctl-184
	parm/nam_smartmasterconusnest2p5.ctl-188

* Changed locations of COM_SREF
	jobs/JDGEX_SMINIT
	jobs/JNAM_SMINIT
        parm/smart_para_config

Dec 2015 - smartinit.v3.5.0

* Added new consensus Terrain and Land/Sea Mask for expanded CONUS Nest (grid 188). These files corrected DY bug.

        fix/topo/nam_smarttopoconus2p5_EXP_consensus.grb
        fix/topo/nam_smarttopoconus2p5_EXP_consensus.grbi
        fix/mask/nam_smartmaskconus2p5_EXP_consensus.grb
        fix/mask/nam_smartmaskconus2p5_EXP_consensus.grbi

* Added subroutines in smartinit_prdgen to define expanded CONUS Nest to temporary grid id 188.
	sorc/smartinit_prdgen.fd/w3fi71.f
	sorc/smartinit_prdgen.fd/w3fi63.f
        sorc/smartinit_prdgen.fd/makefile

Jan 2016 - smartinit.v3.5.0

* Need to keep all grid 188 files until smartinit was completed (conus nest only).  This is because these files are used
  for calculating 12-hourly TMAX/TMIN and RHMAX/RHMIN. Remove *grb188 files when fhr = 60.

	ush/smartinit.sh
	ush/dng_awp.sh

* Changed AWIPS output to hourly

	ush/smartinit.sh

* Fixed wind gust bug - for conus nest, wind gust was 0.0 for intermediate hours between 13-34 hours.

	sorc/smartinit.fd/MAIN.f90

* Updated README and created release-notes, changed smartinit.ver to reflect version 3.5.0

	docs/README
	docs/release-notes.v3.5.0
	docs/smartinit.ver

******************************************************************
DELIVERED to NCO - 08 February 2016
******************************************************************

Feb 2016 - smartinit.v3.5.1

* Added changes to meet NCO's phase 2 standards:

	removed all unused J-jobs in the /jobs directory
	removed all files in exec/ directory
	modified jobs/JNAM_SMINIT and jobs/JDGEX_SMINIT to reflect NCO standards
	modified ush/smartinit.sh, ush/dgex_smartinit.sh, and ush/dng_awp.sh to reflect NCO standards
	updated docs/README, docs/smartinit.ver
	modified parm/smart_para_config to reflect NCO standards
	updated modulefiles and build_smartinit.scr

* Added ceiling, mslp, and sfc temp to GDAS option

        ush/smartinit.sh

******************************************************************
DELIVERED to NCO - 23 February 2016
IMPLEMENTED - 23 August 2016
******************************************************************

******************************************************************
Smartinit VERS 4.0.0 - Annette Gibbs
******************************************************************

***  GRIB2 smartinit: to read GRIB2 NAM and DGEX

Apr 2016 - smartinit.v4.0.0

* Setup to run with either GRIB1 or GRIB2
	To run, do the following:
		- set grib to 1 or 2; if GRIB1 or GRIB2 respectively
		- set the NAM directory in parm/smart_para_config ($COM_IN)
		- set cr8bjob or cr8bjob_poe in kick-scripts/RUN_ALL; if GRIB1 or GRIB2 respectively

June 2016 - smartinit.v4.0.0

* Setup DGEX to run with the new parallel
	- added new script with parallel wgrib2 changes: ush/dgex_smartinit_g2.sh	
        - added call to new script in scripts/exdgex_smartinit.sh.ecf

* Added NAMRR changes

	- renamed terrain and land/sea mask files to namrr.  These are the same files, just renamed so the script
	  can use them.

	fix/topo/namrr*
	fix/mask/namrr*

	- added a new script

	jobs/JNAMRR_SMINIT
		
	- added changes to code and script that deals with not having the SREF data for the hourly forecasts to 18 hours

	sorc/smartinit.fd/GETGRIB.f90
	sorc/smartinit.fd/MAIN.f90
	ush/smartinit.sh
	kick-scripts/DRIVcs2p
        scripts/exnamrr_smartinit.sh.ecf

August 2016

* Changed from reading NAMRR to NAM files.  Simple change in the kick-scripts/DRIVcs2p script to toggle back and forth 
  between nam and namrr.
	kick-scripts/DRIVcs2p

* Removed the GRIB1 mods that copied the MSLET, CEIL and Skin temperature (TMP:surface) from the smartinit_g2.sh script. These 
  are no longer needed since these 3 fields are available in the NAMv4 bsmart/bgrd3d files. 
	ush/smartinit_g2.sh

* Changed packing option for SREF and PR/HI from c3 (complex) to jpeg in wgrib2.  
        ush/smartinit_g2.sh

* Changed packing option for DGEX and SREF to jpeg, fixed bug in GRIB2INDEX command for SREF, changed links for special
  files created by makeprecip
	ush/dgex_smartinit_g2.sh

* Make u/v part of one record and use WGRIB2 to interpolate grid 188 to grid 184.
	ush/dng_awp_g2.sh

* Added calls to read-only grib2 and read-write grib2 smartinit in the dgex, nam, and namrr scripts.
	scripts/exdgex_smartinit.sh.ecf
	scripts/exnam_smartinit.sh.ecf
	scripts/exnamrr_smartinit.sh.ecf

* Initialize ivgid, m_rough_yes, and m_rough_no in NDFDgrid.f90.  Error found while running bounds checking.
	sorc/smartinit_g2.fd/NDFDgrid.f90

* Remove stat from print statement (not defined) and set dscale to 0. if zmax = 0. (can't have divide by zero).
	sorc/smartinit_g2.fd/VADJUST.f90

* Commented out some STOP statements. Should I comment out the rest?
	sorc/smartinit_g2.fd/rdgrib.f90

* Fixed bug (ELSE IF (PROB.LT.75.) THEN should be  ELSE IF (PROBWX.LT.75.) THEN).
	sorc/smartinit_g2.fd/MAKESTRING.f90

* Fixed or added the following: 
   	-print whether gfld8 is associated
	-print if large or small values of DOWNT and DOWNQ (should we change resetting if too large or small?)
        -initialize RH to 0 after allocating
	-add print statements of POP3
   	-calculate RH if dhold and thold are greater than 1.0 (RHMAX3/RHMIN3 calculations)
    	-set DEC=3.0 for RHMAX3 
    	-replace where/elsewhere/endwhere with do loops for SNOWAMT calculations 
    	-add print precip-type print statements
    	-comment out the writing of skin temperature
    	-added AMAX1(RHMOIS,1.0) because RHMOIS can be zero (from Matt's code)
    	-changed END to END SUBROUTINE HINDEX
        -Initialized LCYCON to .FALSE., not FALSE and initialized INHRFRQ to GDIN%INHRFRQ.
	sorc/smartinit_g2.fd/MAIN.f90

* Initialized LCYCON to .FALSE., not FALSE and initialized INHRFRQ to GDIN%INHRFRQ.
	sorc/smartinit.fd/MAIN.f90

* Added changes for DGEX at analyis/start time
	-set unit numbers for dgx and lanl
	-initialized 3, 6, and 12-hourly precip and snow and SREF fields
	-fixed LUGP6I bug in print statement
	-added code to read 3-hour precip and snow at analysis time for dgex
	-read in vertical profile of cloud fraction at in the limited portion as we want to write out total cloud for
	 ak_rtmages at the intermediate hours
	sorc/smartinit_g2.fd/GETGRIB.f90

* Added temporary changes for DGEX
	sorc/smartprecip_g2.fd/SMARTPRECIP.f90

* Added code for 7-hour delay of 18z DGEX parallel
	kick-scripts/DRIV-dgex

* Changed mdl from namrr to nam and changed the run order of the domains so that the plotting would finish
	kick-scripts/DRIVcs2p

* Changed the name of the plotdir so it wouldn't be dependent on the smartinit version and commented out the hpss archive script
	kick-scripts/RUN_ALL

* Added new parallel location of NAMx
	parm/smart_para_config

October 2016

* changed lon1 for conus, conusnest and dgex_cs; it was incorrect
	parm/SMINIT.CTL
        ush/smartinit_g2.sh
        ush/dgex_smartinit_g2.sh

* changed location of GESIN for parallel NAMx
	parm/smart_para_config

* added GRIB2 *wexp files
	ush/dng_awp_g2.sh

* converted GRIB2 files to simple packing for smartprecip (to prevent random crashes in smartprecip)
	ush/dgex_smartinit_g2.sh
	ush/smartinit_g2.sh

* changed budget interpolation to bilinear interpolation for snow and total precip in the bsmart files only.  The snow 
  and precip coming out of smartprecip will still be interpolated using budget (this follows GRIB1 smartinit convention).
        ush/dgex_smartinit_g2.sh
        ush/smartinit_g2.sh

* changed links back for special files created by makeprecip and smartprecip
        ush/dgex_smartinit_g2.sh

* copied grib2 files (rather than grib1 files) from smartinit archive to MAXMIN3, MAXMIN4, and MAXMIN5
        ush/dgex_smartinit_g2.sh

* removed or commented out special ceiling, SLP and SST mods leftover from GRIB1 version (in the GDAS portion of script)
	ush/smartinit_g2.sh

* replaced overdategrib with overdateg2
        ush/smartinit_g2.sh

* changed name of output for smartprecip output (replace fhr with freq)
        ush/smartinit_g2.sh

* Added delay in starting DGEX script for 18z CONUS
	kick-scripts/DRIV-dgex

* Added sorc/wgrib2 temporarily until NCO gets wgrib2 updated or added.
	sorc/wgrib2
	sorc/build_smartinit.scr

* replaced smartprecip and smartinit with the GRIB2 directories in build_smartinit.scr
	sorc/build_smartinit.scr

* Added max/min print statements; changed begin time for accumulated precip
	sorc/smartprecip_g2.fd/SMARTPRECIP.f90

* Cleaned up makefiles
	sorc/smartprecip_g2.fd/makefile
	sorc/smartinit_g2.fd/makefile
	sorc/smartinit_cnvgrib.fd/makefile

* Added the correct hour to the reads of MAX/MIN Temperature and Dewpoint Temperature (was reading incorrect hours)
	sorc/smartinit_g2.fd/GETGRIB.f90

* Reset accumulated fields bitmap to non-accumulated fields bitmap
	sorc/smartinit_g2.fd/MAIN.f90

* Added a return if the file does not exist so smartinit will not crash (subroutine rdhdrs_g2)
	sorc/smartinit_g2.fd/rdgrib.f90

* Took out change to DSCALE - will investigate more later.  It was causing Salton Sea winds to be extremely large again
	sorc/smartinit_g2.fd/VADJUST.f90

* Added subroutine w3fi71.f to smartinit_cnvgrib.fd because converting GRIB2 files to GRIB1 did not change the GRID ID. 
  This was because the resolution flag is incorrect for the CONUS and Alaska grids.  Changing w3fi71.f corrected 
  the GRID ID problem, but the resolution flag is still incorrect. If users have trouble reading the GRIB1 output, we
  may have to investigate fixing cnvgrib so it will output the correct resolution flag.
	sorc/smartinit_cnvgrib.fd/makefile
	sorc/smartinit_cnvgrib.fd/w3fi71.f

* Added new release notes and updated README file
	docs/release-notes.v4.0.0
	docs/README

* Changed WGRIB2 to point to my version of wgrib2 (will need to change when NCO has new version) and set CNVGRIB to point
  to my version of smartinit_cnvgrib
	jobs/JDGEX_SMINIT
	jobs/JNAM_SMINIT

* Changed module load /nwpara2/modulefiles/util_shared/v1.0.3 to module load prod_util; set GUESS to $GUESStm00
	jobs/JNAM_SMINIT

* Added changes to the following scripts that allow you to run GRIB1 smartinit with GRIB2 data converted to GRIB1. Changed 
  name of output for smartprecip output (replace fhr with freq) (nam); changed compress to jpeg (dgex), changed setting of DATE to 
  "${PDY}${cyc}"00WASHINGTON" if $PDY != $today (dgex)
	ush/smartinit.sh
	ush/dgex_smartinit_g2g1.sh

******************************************************************
DELIVERED to NCO - 31 October 2016
IMPLEMENTED - 21 March 2017
******************************************************************

******************************************************************
Smartinit VERS 4.1.0 - Annette Gibbs
******************************************************************

March 2017

* added updated GRIB2 Terrain and Land/Sea Mask files for CONUS, Hawaii, and Puerto Rico

	fix/topo/nam_smarttopopr.grb2 
	fix/topo/nam_smarttopohi.grb2 
	fix/topo/nam_smarttopoconus2p5.grb2
	fix/mask/nam_smartmaskpr.grb2
	fix/mask/nam_smartmaskhi.grb2
	fix/mask/nam_smartmaskconus2p5.grb2

* changed Alaska Terrain and Land/Sea Mask files from GRIB1 to GRIB2

	fix/topo/nam_smarttopoak3.grb2 
	fix/topo/nam_smarttopoak.grb2 
	fix/mask/nam_smartmaskak3.grb2
	fix/mask/nam_smartmaskak.grb2

* removed symbolic links from mask and topo files

* changed scripts to remove GRIB1 files, added higher precision grid specs, and new GRIB2 terrain and land/ses mask filenames.

	ush/smartinit_g2.sh 
	ush/dng_awp_g2.sh

* changed pathnames in config file

	parm/smart_para_config

* added GRIB2 changes and changed project from dev2 to devhigh2; stop running ak_rtmages, conus (5km) and alaska (6km)

	kick-scripts/DRIVcs2p
	kick-scripts/RUN_ALL
	kick-scripts/cr8bjob_poe

* changed code to read GRIB2 Terrain and Land/Sea Mask files; changed decimal scaling (DEC) from 3.0 to 6.0 for 
  increased precision of specific humidity (to prevent zero q from being written out); 
  corrected bug in downscaled specific humidity (downscaled specific humidity was using PSFC (surface pressure from NAM Nest)
  rather than the downscaled surface pressure (pnew)).

	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/NDFDgrid.f90

* added new datacards (hourly and MSLP/Cloud Ceiling Height), if approved by the SREC committee.

June 2017

* added NCO changes from /nwprod2/smartinit.v4.0.0

	ush/dng_awp_g2.sh 
	kick-scripts/cr8bjob_poe  
	scripts/exnawips_nam_smartinit.sh.ecf 
	jobs/JNAM_SMINIT

******************************************************************
DELIVERED to NCO - 14 July 2017
SHOULD HAVE BEEN IMPLEMENTED - 13 Dec 2017
IMPLEMENTED -  07 Feb 2017
******************************************************************

Smartinit VERS 4.1.1 - Annette Gibbs
******************************************************************

September 2017

* Updated GRIB2 Terrain and Land/Sea Mask files for Alaska.

	fix/topo/nam_smarttopoak3.grb2
	fix/mask/nam_smartmaskak3.grb2

* Surface pressure bugfix - at off hours (1,2,4,5, etc...) surface pressure from the NAM nest was written out
  rather than the downscaled surface pressure. Need to write out the downscaled surface pressure every hour.

	sorc/smartinit_g2.fd/MAIN.f90

******************************************************************
DELIVERED to NCO - 05 Feb 2018
IMPLEMENTED - 11 July 2018
******************************************************************

******************************************************************
Smartinit VERS 4.2.0 - Annette Gibbs
******************************************************************

September 2017

* NAM nest will be used at 00 H instead of NAM parent for Puerto Rico and Hawaii.

	scripts/exnam_smartinit.sh.ecf
	kick-scripts/DRIVcs2p	<- changed pr and hi to priconest and hawaiinest for domains (which is set to RUNTYP)
	kick-scripts/RUN-ALL	<- changed runreg to pr and hi from priconest and hawaiinest

  Note: NCO must do something similar in their job submittal scripts, so it calls exnam_smartinit.sh.ecf with 
	RUNTYPE = priconest and hawaiinest, not pr and hi.  In their prod${cyc}.def.yyyymmdd file, NCO should 
	set RUNTYP to 'hawaiinest' and 'priconest' under family hi and family pr. (email from Wojciech Cencek - 24 Aug 2017)

* Total cloud cover bugfix - at 00 H, the total cloud cover field is written out for CONUS and Alaska.  Previously,
  0.0's were written for total cloud cover.

	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/GETGRIB.f90

* Added 4 different wind downscaling routines for testing

	sorc/smartinit_g2.fd/NDFDgrid.f90
	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/makefile
	sorc/smartinit_g2.fd/DIVMIN.f90
	sorc/smartinit_g2.fd/WNDADJ.f90
	jobs/JNAM_SMINIT

* Added option to change hbar from height at model level 1 to 4500.

	sorc/smartinit_g2.fd/VADJUST.f90

March 2018

* Added fields needed for VIIRS land surface temperature data assimilation in RTMA/URMA for Alaska only.
        -pressure, temperature, mixing ratio, u, v, height at model level 1
        -pressure, temperature, and mixing ratio at model level 2
        -surface roughness

	sorc/smartinit_g2.fd/GETGRIB.f90
	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/aset2d.f90

April 2018

* Changed the decimal precision of downscaled specific humidity to 6.0
* Changed the decimal precision of downscaled surface pressure to 6.0
* Changed the decimal precision of wind gust to -4.0
* Changed the decimal precision of visibility to 3.0

	sorc/smartinit_g2.fd/MAIN.f90

July 2018

* replaced build_smartinit.scr with 3 new build scripts

	sorc/build_smartinit_all.sh
	sorc/build_smartinit_g2.sh
	sorc/build_smartprecip_g2.sh

******************************************************************
DELIVERED to NCO - 10 July 2018
IMPLEMENTED - 03 December 2018
******************************************************************

******************************************************************
Smartinit VERS 4.2.1 - Annette Gibbs
******************************************************************

March 2019

NAM Smartinit changes associated with Dell Transition

* replaced "/com2/sref/prod" with "compath.py /sref/prod" for definition of COM_SREF
* replaced "-$COMROOT/${NET}/${envir}" with "compath.py ${NET}/${envir}" for definition for COM_IN

	jobs/JNAM_SMINIT

* created new modulefile for use on the Dell

	modulefiles/SMARTINIT/v4.2.1

* updated the build scripts for use on the Dell

	sorc/build_smartinit_all.sh
	sorc/build_smartinit_g2.sh
	sorc/build_smartprecip_g2.sh

* changed "typeset -Z2" (pads a 0 in front of a single digit number) to conditional check
* changed mpirun command to reflect the Dell mpirun command
* removed hard-wired link to the /com/date/t${cyc}z file

	ush/smartinit_g2.sh

* fixed bug in subroutine rdgrib; was sending in J (which was undefined) into subroutine GETGB2S instead of JR.

	sorc/smartinit_g2.fd/rdgrib.f90

* SMARTPRECIP needed many changes to run on the Dell.  GRIB2 Grid Definition Template and Data Representation Template arrays 
  needed to be redefined before writing the total accumulated precipitation and snow depths to the GRIB2 file.  
  In addition, binary scaling needed to be forced to adequate precision (-4) and Subroutine Getbit needed to be called 
  to calculate nbits (number of bits needed for packing).

	sorc/smartprecip_g2.fd/SMARTPRECIP.f90

* added new release notes and updated README file, changed smartinit.ver to reflect version 4.2.1

	docs/README
	docs/release-notes.v4.2.1
	docs/smartinit.ver

* Add new wmo directory to replace the pcom directory  (delivered in v4.2.1)

	jobs/JNAM_SMINIT
	ush/dng_awp_g2.sh

-----Local Drive script changes only - will not affect NCO

* added changes to determine which development machine I am on, so it will locate the correct input files.
* access $NDATE instead of /nwprod/util/exec/ndate
* redefined output directories to reflect the Dell directories
* removed code that deletes output data that is older than 5 days, because the Dell output directories only keep data for 5 days.
* load modules needed for the Dell
* changed job cards for running on the Dell

	kick-scripts/DRIVcs2p
	kick-scripts/cr8bjob
	
* load modules needed for the Dell
* added code that if it can't find a Smartinit output file after 60 minutes, it will stop running Smartinit
* removed typeset -Z2 cyc
* changed WALLCLK time from 1 & 2 hours to 45 minutes
* redefined output directories to reflect the Dell directories

	kick-scripts/RUN_ALL

* redefined directories for the Dell
* loaded modules needed for the Dell 

	parm/smart_para_config

* removed the following directories, as they are no longer needed or used (NCO already did this for version v4.2.0)

        ecf/sminit_ak
        ecf/sminit_conus
        ecf/sminit_dgex-ak
        ecf/sminit_dgex-cs

The CONUS (5km), Alaska (6km) and ak_rtmages (6 km) and DGEX smartinits are no longer needed or used.

******************************************************************
DELIVERED to NCO - 25 Jun 2019 (verified) (initial delivery was 13 May 2019)
IMPLEMENTED - 21 Aug 2019
******************************************************************

******************************************************************
Smartinit VERS 4.3.0 - Annette Gibbs
******************************************************************

September 2018

* Update Puerto Rico grid from 2.5 km to 1.25 km for consistency with NDFD

	sorc/smartinit_g2.fd/NDFDgrid.f90
	sorc/smartinit_g2.fd/MAIN.f90
	ush/smartinit_g2.sh
	fix/mask/nam_smartmaskpr.grb2
	fix/topo/nam_smarttopopr.grb2
	parm/wmo
	ush/dng_awp_g2.sh
	parm/wmo/grib2_awpnamdngpr*.1p25

IMPORTANT!!!  Note: Copy new 1.25 km PR mask and topo files to emc-binaries

* Apply new HRRR T downscaling for Puerto Rico and Hawaii grids only

	sorc/smartinit_g2.fd/NDFDgrid.f90

April 2019

* Add additional fields needed for use in stability calculation for 10-m wind obsdrvations in
  RTMA/URMA for all grids: skin temperature and model surface pressure. Also add the following
  for CONUS, Puerto Rico, and Hawaii (already written out for Alaska): surface roughness; 
  pressure, temperature, mixing ratio, u, v, height at model level 1; and pressure, temperature, 
  and mixing ratio at model level 2.

	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/NDFDgrid.f90

June 2019

* Added lapse-rate to the output files for lapse-rate adjustment for 2-m temperature in RTMA.

	sorc/smartinit_g2.fd/NDFDgrid.f90
	sorc/smartinit_g2.fd/MAIN.f90
	sorc/smartinit_g2.fd/aset2d.f90

Dec 2019

* Added EE2 recommendations

	- Changed the name of the smartinit executable from smartinit_g2_rw to smartinit_g2 
          and changed the makefiles to create the executables in the source directory rather than the exec/ directory.

        sorc/smartinit_g2.fd/makefile
	sorc/smartprecip_g2.fd/makefile
	ush/smartinit_g2.sh

	- Created an install.sh script that will copy the executables from the source directory to the exec directory.

	sorc/install.sh

	- Cleaned up jobs/JNAM_SMINIT; removed all pcom/PCOM lines and legacy commented out lines; 
          combined COM_IN/COM_OUT and COMIN/COMOUT into COMIN/COMOUT lines; 
          renamed COMIN_SREF and COMIN_GEFS to COMINsref and COMINgefs.

	jobs/JNAM_SMINIT
	parm/smart_para_config
	ush/smartinit_g2.sh

	- Moved awips header files in util/parm to parm/wmo.  Deleted util/parm directory.

	ush/dng_awp_g2.sh

	- Removed scripts/exnawips_nam_smartinit.sh.ecf as it is not needed.

March 2020

	- Changed all instances of COM_IN to COMIN in the ush/smartinit_g2.sh script

	ush/smartinit_g2.sh

******************************************************************
DELIVERED to NCO - 17 Dec 2019
IMPLEMENTED -  28 July 2020
******************************************************************

******************************************************************
Smartinit VERS 4.3.1 - Annette Gibbs
******************************************************************

May 2021

NAM Smartinit changes associated with the RTMA/URMA v2.8.7 upgrade.  The RTMA CONUS land/sea mask and terrain around the Great Salt Lake 
are updated to better match the lake's current shape.

* Update the CONUS land/sea mask and consensus terrain files and remove unused fixed files from the fix/mask and fix/topo subdirectories.

	-Update the following files:

	fix/mask/nam_smartmaskconus2p5.grb2
	fix/topo/nam_smarttopoconus2p5.grb2

	-Removed the following unused files:

	fix/mask/nam_smartmaskak.grb2
	fix/mask/nam_smartmaskconus2p5_EXP.grb2
	fix/mask/nam_smartmaskconus2p5_EXP_new.grb2
	fix/mask/nam_smartmaskpr1p25.grb2
	fix/mask/nam_smartmaskpr1p25.grb2_339x225
	fix/mask/nam_smartmaskpr2p5.grb2
	fix/topo/nam_smarttopoak.grb2
	fix/topo/nam_smarttopoconus2p5_EXP.grb2
	fix/topo/nam_smarttopoconus2p5_EXP_new.grb2
	fix/nam/topo/nam_smarttopopr1p25.grb2
	fix/nam/topo/nam_smarttopopr1p25.grb2_339x225
	fix/nam/topo/nam_smarttopopr2p5.grb2

******************************************************************
DELIVERED to NCO -  14 May 2021
IMPLEMENTED - 23 Jun 2021, 12Z 
******************************************************************


******************************************************************
Smartinit VERS 4.4.0 - Annette Gibbs
******************************************************************

November 2021

NAM Smartinit changes associated with the WCOSS2 transition

* Additional changes associated with moving Smartinit output data to its own Smartinit output directory (com/smartinit/v4.4).

	-Renamed exnam_smartinit.sh to exsmartinit.sh

		scripts/exsmartinit.sh

	-Renamed JNAM_SMINIT JSMARTINIT
	-Set NET=smartinit instead of nam
	-Replaced nam_smartinit_ver with smartinit_ver
	-Changed GESIN, COM_IN, COMIN to GESINnam, COM_INnam, COMINnam and replaced $NET with nam in its definitions.
	-Replaced ${nam_ver} with ${smartinit_ver} in the definition of COMOUT.
	-Changed the name of the ex-script.
	-Added HOMEsmartinit to the HOMEdng definition.

		jobs/JSMARTINIT

	-Replace all COM_IN and COMIN with COM_INnam and COMINnam in smartinit_g2.sh

		ush/smartinit_g2.sh

	-Removed nam_smartinit_ver=v4.4.0 from versions/run.ver.

		versions/run.ver

* Added new versions sub-directory with two new files build.ver and run.ver.

	versions/build.ver
	versions/run.ver

* Adapted COMINnam, COM_INnam, COMOUT, GESINnam, COMINsref to the new filesystem and the use of compath.py.  Removed $jlogfile and replaced $NWROOT with $PACKAGEROOT. Replaced exnam_smartinit.sh.ecf with exsmartinit.sh.

	smartinit.v4.4.0/jobs/JNAM_SMINIT

* Converted modulefile from TCL to LUA format.

	modulefiles/SMARTINIT/4.4.0.lua

* Converted the build scripts to build on WCOSS2 (sourced ../versions/build.ver and loaded LUA modulefile)

	sorc/build_smartinit_all.sh
	sorc/build_smartinit_g2.sh
	sorc/build_smartprecip_g2.sh

* Replaced ifort with ftn in the makefiles

	sorc/smartinit_g2.fd/makefile
	sorc/smartprecip_g2.fd/makefile 

* Replaced mpirun command with mpiexec

	ush/smartinit_g2.sh

* Renamed exnam_smartinit.sh.ecf to exsmartinit.sh.

	scripts/exnam_smartinit.sh

******************************************************************
DELIVERED to NCO -  19 Nov 2021
IMPLEMENTED - 28 Jun 2022 
******************************************************************

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •