First, to download the latest codes from http://oceans.deas.harvard.edu/HOPS/ Download upgrades (upgraded biology; provided-Orlanski boundary conditions; direct input of velocity fields) from http://oceans.deas.harvard.edu/haley/Nello/ Grab the files pe_nello.tar.gz - Upgraded PE routines only pi_nello.tar.gz - Upgraded PE_Initial routines only These are only the routines affected by the upgrades. They simply replace the corresponding routines from the HOPS web site. The simplest way to read in the biological data is to use the C-Preprocessing option "trcascii". This option assumes that you have the biological fields mapped onto the same grid as the physical OA fields (i.e. same horizontal 2D grid and same constant depths). The data is then assumed to be a simple ascii file structured to be read as do 20 n = 3,nt do 30 i=1,im do 30 j=1,jm read(trcinp,*)(t(i+(j-1)*im,level,n),level=1,kfld) 30 continue 20 continue where i varies in the x direction, j in the y direction, level in the vertical and n is the tracer number (the ordering of tracers is implied in the ordering of the variable "tname" in blkdat.F) A student of Allan's (Patrica Moreno) has provided me more detailed instructions on creating biological initializations using a modified Dusenberry biological model. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= HOPS: Initialization of biological fields Assumptions: Observed Variables: Nitrate NO3 Ammonium NH4 Chlorophyll Chl (or fluorescence) Non-observed Variables: Phytoplankton P Zooplankton Z Detritus D (1) Objectively analysize the observed biological variables Create MODS format data files in which NO3, NH4 and Chl are stored as temperature or salinity (2) Create corresponding 3D fields for non-observed variables set P proportional to Chl set Z proportional to P set D proportional to Z (Note: In the past Pierre has had some success setting Z and D to satisfy the steady-state equations. That did not work so well for this example.) use the matlab script bio_correlation_sol.m must include in bio_correlation_sol.m: name of OA files biological parameters used in PE model (3) Save initial biological fields in ASCII format used by PE_initial At the end of bio_circadian_sol.m, bio_save.m is called which saves the biological variables in the ASCII format used by PE_initial Order: NO3, Pno3, Z, NH4, D, Chl, Pnh4 where Pno3 = phytoplankton biomasss due to nitrate uptake Pnh4 = phytoplankton biomass due to ammonium uptake Total phytoplankton = Pno3 + Pnh4 Prior to saving, the variables must be reshaped: Ex: [m n o] = size(NO3); NO3 = reshape (NO3,m*n,o); the output of this is bio_fields.dat Hint: Save a copy of bio_circadian_sol.m together with bio_fields.dat to keep track of what data and biological variables were used to calculate bio_fields.dat (4) Process through PE_initial Compile pe_initial with biology option(s) # -Dtrcascii ascii file input for biological tracers # -DbioDuse Dusenberry biological model (if desired) # -Dreadbioerr read error fields for biological tracers (if desired) (technically, this last is for assimilation only) if readbioerr is used, error fields must be present in bio_fields.dat in the order (for each time) NO3, Pno3, Z, NH4, D, Chl, Pnh4, NO3 error, Pno3 error, Z error, NH4 error, D error, Chl error, Pnh4 error Changes to pi_ini.in NT = 9 number of tracers ITRC = 1 Read additional tracers 7th line of filenames: bio_fields.dat If pe_initial is compiled with bioduse option, there is no need to set IBIOM. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= additional notes on the Dusenberry model: A definition of "cellular NH4" (qn4) and "cellular NO3" (qn3) might come in handy. In HOPS: p = total phytoplankton = qn3 + qn4 qn4 = fraction of phytoplankton due to recycled production qn3 = fraction of phytoplankton due to new production Let Q = (NO3/KNO3+NO3)*exp(-NO3inh*NH4) + (NH4/KNH4+NH4) then qn3 = (NO3/KNO3+NO3)*exp(-NO3inh*NH4)/Q*P qn4 = (NH4/KNH4+NH4)/Q*P where KNO3 = half-sturation constant for NO3 KNH4 = half-saturation constant for NH4 NO3inh = NH4 inhibition parameter