Improvements for the PE_initial codes

    current suggestions

  1. Need better messages/protection

  2. Consider making PE_initial PVM nested. This will simplify setting external mode for assimilation as well as giving small domain feedback to construction of external mode in general.

  3. Consider absorbing the functions of peout2in and peout2ass into PE_initial.

  4. Create an idbug option to totally eliminate the intermediate velocities from the PE_initial file. They just take up room when the file is used for 1-way nesting (i.e. they're volume data with the unlimited dimension used for BC data).

  5. In the netCDF file, the tracer boundary condition variable (tbry) forces the tracers in PE_initial to be stored in the same order as they are in the PE model. This is too restrictive. Change this whole thing to associating with each tracer variable a tracer boundary variable (e.g. temp and tempbry)

  6. Start looking into simplifying the list of CPP options
    • Make some decisions about the following:
      • rmpsimean
      • trytrby (can determine based on presence of land mask and/or existence of transport.dat file)
      • pepsib, ubpsib (perhaps when the convergence parameters are moved out of external and into input file a switch can replace these)
    • Look into turning the following into software switches:
      • gridold, reset_h (can determine based on GRIDS netCDF file).
      • unesco, leqstate
      • meantracer, meantracer_zip

  7. The extraction of island values in make_transbdy can be fooled if the coarse grid island is a single point. Rewrite in terms of an inside function on the island coastlines.

  8. Have PE_initial check that the vertical discretization is valid (ie. depths strictly monotonically decreasing).

  9. Allow for easy use of "other" tracers.
    • Teach PE_initial to read biological fields from netCDF files. (new LAA bio-FM)

  10. In vertgrid_old.F, two CPP options from code taken from PE: barotropic & cyclic.
    • Double check that barotropic can be eliminated (ie. loops like do i=2,1 don't execute).
    • Work in cyclic flag into GRIDS and support throughout.
    • Alternatively just eliminate when define vertical grid just from 3D thicknesses.

  11. Velocity estimates:
    • When obtaining velocity estimates from TS fields:
      • use those error fields. Don't use dynamic height error field or even assume it exists. Probably want max(err(T),err(S))
      • Add global attribute to netCDF file detailing which equation of state was used. Consider having PE check for consistency
    • Try multi-step method for getting initial velocities.
      • compute velocities from geostrophy
      • zero-out velocities under topography and land masks
      • back-out streamfunction with no penetration of coasts
      • compute velocities from new streamfunction
    • Allow for initial velocities without geostrophy.
    • Examine the following papers.
      • Sheng, J. & K.R. Thompson.  (1996)  A robust method for diagnosing regional shelf circulation from vertical density profiles.  J. Geophys. Res., 101, 25,647-25,659.

  12. Constructing the Transport Streamfunction:
    • Move the convergence control parameters for Poisson problem in external from parameter statement to input cards.
    • The standard tolerance function in the conjugate gradient is of the form
      • [R(Pn+1)]2 - [R(Pn)]2
      This can be put in one of the more computationally friendly forms:
      • [R(Pn+1) - R(Pn)] * [R(Pn+1) + R(Pn)]
      • R(Pn+1-Pn) * [R(Pn+1) + R(Pn)]
      • R(Pn+1-Pn) * R(Pn+1+Pn)
      • R(Pn+1-Pn) * [2R(Pn) + R(Pn+1-Pn)]
    • Add an option to create initial guess barotropic velocities which minimize the kinetic energy:
      _
      U
       

      i,j 
      = -
      km
      å
      k = 1 
      ri,j,k ^
      u
       

      i,j,k 
      dzi,j,k

      km
      å
      k = 1 
      ri,j,k dzi,j,k
      • Probably should test this option first, using the option to impose barotropic velocities from outside.

  13. From Alex Souza:
    The Shapiro filter is changing the data on pe_initial, it put noise in the 
    velocities near the boundaries