bio_toy problem

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
DTokarev

bio_toy problem

#1 Unread post by DTokarev »

Hi,

I try to run bio_toy example and have received error message:

Code: Select all

fortcom: Error: analytical.f90, line 143: This name does not have a type, and must have an explicit type.   [IPHYT]
            t(i,j,k,1,iPhyt)=0.08_r8
----------------------^
fortcom: Error: analytical.f90, line 144: This name does not have a type, and must have an explicit type.   [IZOOP]
            t(i,j,k,1,iZoop)=0.06_r8
----------------------^
fortcom: Error: analytical.f90, line 146: This name does not have a type, and must have an explicit type.   [ILDEN]
            t(i,j,k,1,iLDeN)=0.02_r8
----------------------^
fortcom: Error: analytical.f90, line 147: This name does not have a type, and must have an explicit type.   [ISDEN]
            t(i,j,k,1,iSDeN)=0.04_r8
----------------------^
fortcom: Error: analytical.f90, line 148: This name does not have a type, and must have an explicit type.   [ICHLO]
            t(i,j,k,1,iChlo)=0.02_r8
----------------------^
compilation aborted for analytical.f90 (code 1)
make: *** [/usr/local/ROMS/Include/Build/analytical.o] Error 1
and next question:
How can I create a new _ini.nc file for my application? Only Roms_tools?

Thanks in advance

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: bio_toy problem

#2 Unread post by kate »

Which of the bio models are you trying to use? These variables are set in mod_scalars.F, one group per bio model. An example:

Code: Select all

#if defined NPZD_FRANKS || defined NPZD_POWELL
        integer, pointer :: idbio(:)  ! Biological tracers
        integer :: iNO3_              ! Nitrate concentration
        integer :: iPhyt              ! Phytoplankton concentration
        integer :: iZoop              ! Zooplankton concentration
        integer :: iSDet              ! Small detritus concentration
#endif
Check your mod_scalars.f90 to make sure you've got the ones you think you should.

There's more than one way to make an ini netcdf file. Just about any scripting language can make a netcdf file, just make sure it is in the format that ROMS is expecting.

DTokarev

Re: bio_toy problem

#3 Unread post by DTokarev »

Kate,
Thank you for your explanation.
I think I have fixed the first problem.

In the --.h file:

Code: Select all

#undef   BIO_FENNEL
#ifdef   BIO_FENNEL
# define CARBON
# define DENITRIFICATION
# define BIO_SEDIMENT
# undef  DIAGNOSTICS_BIO
#endif
#define  ECOSIM
#ifdef   ECOSIM 
# define ANA_BIOLOGY
# define ANA_SPFLUX
# define ANA_BPFLUX
# define ANA_CLOUD
#endif
and in the mod_scalars.f90

Code: Select all

!
!  Set bio-optical tracer indices.
!
      DO i=1,NBT
        idbio(i)=ic+i
      END DO
      iDIC_=ic+1
      iFeO_=ic+2
      iNH4_=ic+3
      iNO3_=ic+4
      iPO4_=ic+5
      iSiO_=ic+6
      ic=ic+6
      DO i=1,Nbac
        iBacC(i)=ic+1
        iBacF(i)=ic+2
        iBacN(i)=ic+3
        iBacP(i)=ic+4
        ic=ic+4
      END DO
      DO i=1,Ndom
        iCDMC(i)=ic+1
        iDOMC(i)=ic+2
        iDOMN(i)=ic+3
        iDOMP(i)=ic+4
        ic=ic+4
      END DO
      DO i=1,Nfec
        iFecC(i)=ic+1
        iFecF(i)=ic+2
        iFecN(i)=ic+3
        iFecP(i)=ic+4
        iFecS(i)=ic+5
        ic=ic+5
      END DO
      DO i=1,Nphy
        iPhyC(i)=ic+1
        iPhyF(i)=ic+2
        iPhyN(i)=ic+3
        iPhyP(i)=ic+4
        ic=ic+4
      END DO
      DO i=1,Nphy
        IF (PHY(i).le.2) THEN
          ic=ic+1
          iPhyS(i)=ic
        ELSE
          iPhyS(i)=0
        END IF
      END DO
      FirstPig=ic+1
      DO j=1,Npig
        DO i=1,Nphy
          iPigs(i,j)=0
          IF (PIG(PHY(i),j).eq.1) THEN
            ic=ic+1
            iPigs(i,j)=ic
          END IF
        END DO
      END DO
!
!  Set EcoSim group variable names.
!
      DO i=1,Nphy
        PhyName(i)=PhyGroups(PHY(i))
      END DO
      DO i=1,Nbac
        WRITE (BacName(i),'(a,1x,i1)') 'Bacteria Group', i
      END DO
      DO i=1,Ndom
        WRITE (DomName(i),'(a,1x,i1)') 'DOM Group', i
      END DO
      DO i=1,Nfec
        WRITE (FecName(i),'(a,1x,i1)') 'Fecal Group', i
      END DO
!
About _ini.nc file:
Can I use ana_biology.h instead of _ini.nc file?

Code: Select all

!=======================================================================
!                                                                      !
!  This routine sets initial conditions for biological tracer fields   !
!  using analytical expressions.                                       !
!                                                                      !
!=======================================================================
Thanks in advance

bronwyn
Posts: 26
Joined: Sun Nov 27, 2005 10:54 pm
Location: Free University Berlin

Re: bio_toy problem

#4 Unread post by bronwyn »

yes, you should be able to run biotoys with analytical biology.

a couple of things, as Kate says, you need to know which biological model you are using. According to your bio_toy.h file, it's ecosim, but the variables listed in the compilation error of your analytical f90 code would suggest bio_fennel.

there are also sample initial files you could try for either bio_fennel or ecosim ... you can find these at:

https://www.myroms.org/index.php?page=Datasets

note that the bio_fennel file uses its older name bio_fasham

hope this is helpful.

good luck,
bronwyn

DTokarev

Re: bio_toy problem

#5 Unread post by DTokarev »

Hi
bronwyn, thank you for your help.
I downloaded your files for bio_toy model - it's work only with _ini.nc file.
But i can't run this model or my one with ana_biology.h file without _ini.nc

my _.h file

Code: Select all

#undef   BIO_FENNEL
#ifdef   BIO_FENNEL
# define CARBON
# define DENITRIFICATION
# define BIO_SEDIMENT
# define DIAGNOSTICS_BIO
#endif
#define ECOSIM
#if defined ECOSIM 
# define ANA_BIOLOGY
# define ANA_SPFLUX
# define ANA_BPFLUX
# define ANA_CLOUD
#endif
#endif
my _.in file

Code: Select all

! Input NetCDF file names, [1:Ngrids].

     GRDNAME == ROMS/esh_grd.nc
     ININAME == ocean.ini.nc
     ITLNAME == ocean_itl.nc
     IRPNAME == ocean_irp.nc
     IADNAME == ocean_iad.nc
     CLMNAME == ocean_clm.nc
     BRYNAME == ocean_bry.nc
     FWDNAME == ocean_fwd.nc
     ADSNAME == ocean_ads.nc

! Input forcing NetCDF file name(s).  The USER has the option to enter
! several files names per each nested grid.  For example, the USER may
! have a different files for wind products, heat fluxes, rivers, tides,
! etc.  The model will scan the file list and will read the needed data
! from the first file in the list containing the forcing field. Therefore,
! the order of the file names is very important.  If multiple forcing
! files per grid, enter first all the file names for grid 1, then grid 2,
! and so on.  Use a single line per entry with a continuation (\) symbol
! at the each entry, except the last one.

     NFFILES == 1                               ! number of forcing files

     FRCNAME == ROMS/frc_esh.nc                 ! forcing file 1, grid 1

! Output NetCDF file names, [1:Ngrids].

     GSTNAME == ocean_gst.nc
     RSTNAME == ocean_rst.nc
     HISNAME == ocean_his.nc
     TLMNAME == ocean_tlm.nc
     TLFNAME == ocean_tlf.nc
     ADJNAME == ocean_adj.nc
     AVGNAME == ocean_avg.nc
     DIANAME == ocean_dia.nc
     STANAME == ocean_sta.nc
     FLTNAME == ocean_flt.nc

! Input ASCII parameter filenames.

     APARNAM =  ROMS/External/s4dvar.in
!    SPOSNAM =  ROMS/External/stations_esh.in
     FPOSNAM =  ROMS/External/floats_esh.in
     BPARNAM =  ROMS/External/ecosim.in
     SPARNAM =  ROMS/External/sediment_esh.in
     USRNAME =  ROMS/External/MyFile.dat
What is wrong in this files?

my _.out file

Code: Select all

 NETCDF_OPEN - unable to open existing NetCDF file:
               ocean.ini.nc
               call from:  checkvars.F

 Elapsed CPU time (seconds):

 Thread #  0 CPU:       0.128
 Thread #  1 CPU:       0.120
 Total:                 0.248

 Nonlinear model elapsed time profile:

                                              Total:         0.000    0.0000

 All percentages are with respect to total time =            0.248

 ROMS/TOMS - Output NetCDF summary for Grid 01:

 Analytical header files used:

     ROMS/Functionals/ana_hmixcoef.h

 ROMS/TOMS - Output error ............ exit_flag:   3


 ERROR: Abnormal termination: NetCDF OUTPUT.
 REASON: No such file or directory 
This is mean I need _ini.nc file.

What's wrong?

Thanks in advance.

bronwyn
Posts: 26
Joined: Sun Nov 27, 2005 10:54 pm
Location: Free University Berlin

Re: bio_toy problem

#6 Unread post by bronwyn »

Try renaming your ocean.ini.nc to ocean_ini.nc and changing this reference in the *.in file too. Make sure your local paths are correct also.

Bronwyn

DTokarev

Re: bio_toy problem

#7 Unread post by DTokarev »

Thank you bronwyn,
I have changed it:

Code: Select all

 
    GRDNAME == ROMS/esh_grd.nc
    ININAME == ROMS/esh_ini.nc
But model is need the _ini.nc file

Code: Select all

 NLM: CHECKVARS - unable to find model variable: chlorophyll
                  in file: ROMS/esh_ini.nc

 Elapsed CPU time (seconds):

 Thread #  1 CPU:       0.180
 Thread #  0 CPU:       0.188
 Total:                 0.368

 Nonlinear model elapsed time profile:

                                              Total:         0.000    0.0000

 All percentages are with respect to total time =            0.368

 ROMS/TOMS - Output NetCDF summary for Grid 01:

 Analytical header files used:

     ROMS/Functionals/ana_hmixcoef.h

 ROMS/TOMS - Input error ............. exit_flag:   2


 ERROR: Abnormal termination: NetCDF INPUT.
 REASON: No error 
Could you explane me why? Maybe, I need change options in the _.h file?

Thanks in advance

bronwyn
Posts: 26
Joined: Sun Nov 27, 2005 10:54 pm
Location: Free University Berlin

Re: bio_toy problem

#8 Unread post by bronwyn »

Your *.h file indicates that you have ecosim defined, yet the model is looking for chlorophyll as an input variable which would suggest bio_fennel is defined ... Are you actually calling the correct *.h file? What paths are in your build script and what are you calling your application? and which ini file are you using? I can't tell because you've renamed them. The fasham one has the variables for bio_fennel while the ecosim one has the variables for ecosim ... I can't see the other details, but first check which *.h file is being called (the paths) and make sure you are using the correct ini file for the relevant bio-model.

Bronwyn

DTokarev

Re: bio_toy problem

#9 Unread post by DTokarev »

Dear bronwyn,

I run my own model and just want to add the biology.
my _.h file:

Code: Select all

/*
** svn $Id: cppdefs.h 177 2008-04-28 20:10:06Z arango $
********************************************************** Hernan G. Arango ***
** Copyright (c) 2002-2008 The ROMS/TOMS Group                               
**   Licensed under a MIT/X style license                                    
**   See License_ROMS.txt                                                    
*******************************************************************************
**
** Options for Eshkol reservoir Test.
**
** Application flag:   ESHKOL
** Input script:       ocean_Eshkol.in
*/  

# if defined ESHKOL
/*
**  options for Eshkol reservoir 
*/
                                                                       
/*                                                                           
** OPTIONS associated with momentum equations:                               
*/  

#define  UV_ADV          /* use to turn ON or OFF advection terms */  
#define  UV_COR          /* use to turn ON or OFF Coriolis term */            
#define  UV_SADVECTION   /* use to turn ON or OFF splines vertical advection */
#define  UV_LOGDRAG      /* use to turn ON or OFF logbottom friction */    
#undef   UV_QDRAG        /* use to turn ON or OFF quadbottom friction */
#define  UV_PSOURCE      /* use to turn ON or OFF point Sources/Sinks */  
#undef   Q_PSOURCE       /* use to turn ON or OFF mass point Sources  */

/*                                                                           
**   OPTIONS associated with tracers equations:                              
**
**   WARNING:  Use the splines vertical advection option (TS_SVADVECTION)    
**             only in shallow, high vertical resolution applications.      
*/ 
                                                                          
#undef   TS_A4HADVECTION  /* use if 4th-order Akima horizontal advection */
#undef   TS_A4VADVECTION  /* use if 4th-order Akima vertical advection */      
#define  TS_MPDATA        /* use if recursive MPDATA 3D advection */           
#undef   TS_SVADVECTION   /* use if splines vertical advection */             
#define  T_PASSIVE        /* use if inert passive tracers (dyes, etc) */       
#undef   SALINITY         /* use if having salinity */                         
#define  NONLIN_EOS       /* use if using nonlinear equation of state */       
#undef   TS_PSOURCE       /* use to turn ON or OFF point Sources/Sinks */

/*
** Pressure gradient algorithm OPTIONS:                                      
**
**   If no option is selected, the pressure gradient term is computed using  
**   standard density Jacobian algorithm.
*/     
                                                                      
#undef  DJ_GRADPS   /* use if splines density Jacobian (Shchepetkin, 2000) */
#undef  PJ_GRADPQ4  /* use if quartic 4Pressure Jacobian (Shchepetkin,2000) */
#undef  ATM_PRESS   /* use to impose atmospheric pressure onto sea surface */

/*                                                                           
** OPTIONS for surface fluxes formutalion using atmospheric boundary layer   
** (Fairall et al, 1996):                                                    
**                                                                           
**   There are three ways to provide longwave radiation in the atmospheric   
**   boundary layer: (1) Compute the net longwave radiation internally using 
**   the Berliand (1952) equation (LONGWAVE) as function of air temperature, 
**   sea surface temperature, relative humidity, and cloud fraction;         
**   (2) provide (read) longwave downwelling radiation only  and then add    
**   outgoing longwave radiation (LONGWAVE_OUT) as a function of the model   
**   sea surface temperature; (3) provide net longwave radiation (default).  
*/
                                                                           
#define  BULK_FLUXES   /* use if bulk fluxes computation */
#undef   LONGWAVE      /* use if computing net longwave radiation */
#undef   LONGWAVE_OUT  /* use if computing ougoing longwave radiation */
#undef   EMINUSP       /* use if computing E-P */

/*                                                                           
** OPTIONS for wave roughness formulation in bulk fluxes:                    
*/
                                                                           
#undef   COARE_TAYLOR_YELLAND /* use Taylor and Yelland (2001) relation */
#undef   COARE_OOST           /* use Oost et al (2002) relation */  

/*                                                                           
** OPTIONS for shortwave radiation:                                          
**                                                                           
**   The shortwave radiation can be computed using the global albedo         
**   equation with a cloud correction. Alternatively, input shortwave        
**   radiation data computed from averaged data (with snapshots greater      
**   or equal than 24 hours) can be modulated by the local diurnal cycle     
**   which is a function longitude, latitude and day-of-year.                
*/
                                                                           
#undef   ALBEDO        /* use if albedo equation for shortwave radiation */

/*                                                                           
** Model configuration OPTIONS:                                              
*/
                                                                           
#define  SOLVE3D          /* use if solving 3D primitive equations */
#undef   CURVGRID         /* use if curvilinear coordinates grid */            
#define  MASKING          /* use if land/sea masking */                       
#define  AVERAGES         /* use if writing out time-averaged data */          
#undef   STATIONS         /* use if writing out station data */                
#undef   STATIONS_CGRID   /* use if extracting data at native C-grid */       

/*                                                                           
** OPTIONS for Lagrangian drifters:                                          
*/
                                                                           
#undef   FLOATS          /* use to activate simulated Lagrangian drifters */
#undef   FLOAT_VWALK     /* use if vertical random walk */    

/*
** OPTION to activate conservative, parabolic spline reconstruction of       
** vertical derivatives. Notice that there also options (see above) for      
** vertical advection of momentum and tracers using splines.                 
*/
                                                                           
#define  SPLINES    /* use to activate parabolic splines reconstruction  */

/*                                                                           
** OPTIONS for analytical fields configuration:                              
*/                                                                           

#define  ANA_SRFLUX    /* use if analytical surface shortwave radiation flux */
#ifdef   ANA_SRFLUX
# define ANA_CLOUD     /* use if analytical cloud fraction */    
# undef  ANA_HUMIDITY  /* use if analytical surface air humidity */            
# undef  ANA_PAIR      /* use if analytical surface air pressure */           
# define ANA_RAIN      /* use if analytical rain fall rate */
# undef  ANA_TAIR      /* use if analytical surface air temperature */   
#endif                 

#undef   ANA_SMFLUX    /* use if analytical surface momentum stress  */        
#undef   ANA_SPFLUX    /* use if analytical surface passive tracers fluxes */  
#define  ANA_BPFLUX    /* use if analytical bottom passive tracers fluxes */  
#define  ANA_BTFLUX    /* use if analytical bottom temperature flux */        
#define  ANA_BIOLOGY   /* use if analytical biology initial conditions */      
#define  ANA_INITIAL   /* use if analytical initial conditions */
#define  ANA_PASSIVE   /* use if analytical IC for inert tracers */
#define  ANA_PSOURCE   /* use if analytical point Sources/Sinks */             
#undef   ANA_SEDIMENT  /* use if analytical sediment initial fields */
#undef   ANA_VMIX      /* use if analytical vertical mixing coefficients */

#ifdef   BULK_FLUXES   /* turn ON or OFF bulk fluxes computation */
# define ANA_WINDS     /* use if analytical surface winds */            
# undef  ANA_WWAVE     /* use if analytical wind induced waves */
#endif

/*
** OPTIONS for horizontal mixing of momentum:                                
*/

#undef   VISC_GRID     /* use to scale viscosity coefficient by grid size */   
#define  MIX_S_UV      /* use if mixing along constant S-surfaces  */         
#undef   MIX_GEO_UV    /* use if mixing on geopotential (constant Z) */   

/*                                                                           
** OPTIONS for horizontal mixing of tracers:                                 
*/
                                                                           
#undef   DIFF_GRID    /* use to scale diffusion coefficients by grid size */  
#define  MIX_S_TS     /* use if mixing along constant S-surfaces */           
#undef   MIX_GEO_TS   /* use if mixing on geopotential (constant Z) surfaces */
#undef   MIX_ISO_TS   /* use if mixing on epineutral (constant RHO) surfaces */

/*                                                                           
** OPTIONS for vertical turbulent mixing scheme of momentum and tracers      
** (activate only one closure):                                              
*/
                                                                           
#undef    GLS_MIXING   /* use if Generic Length-Scale mixing */             
#undef    MY25_MIXING  /* use if Mellor/Yamada Level-2.5 closure */            
#define   LMD_MIXING   /* use if Large et al. (1994) interior closure */    
   
/*                                                                           
** OPTIONS for the Generic Length-Scale closure (Warner et al., 2005):       
**                                                                           
**   The default horizontal advection is third-order upstream bias.  The     
**   default vertical advection is 4th-order centered advection.             
*/

#ifdef GLS_MIXING                                                            
#undef CANUTO_A        /* use if Canuto A-stability function formulation */   
#undef CANUTO_B        /* use if Canuto B-stability function formulation */   
#undef CHARNOK         /* use if Charnok surface roughness from wind stress */
#undef CRAIG_BANNER    /* use if Craig and Banner wave breaking surface flux */
#undef KANTHA_CLAYSON  /* use if Kantha and Clayson stability function */     
#undef K_C2ADVECTION   /* use if 2nd-order centered advection */              
#undef K_C4ADVECTION   /* use if 4th-order centered advection */              
#undef N2S2_HORAVG     /* use if horizontal smoothing of buoyancy/shear */    
#undef ZOS_HSIG        /* use if surface roughness from wave amplitude */      
#undef TKE_WAVEDISS    /* use if wave breaking surface flux from  amplitude */ 
#endif

/*                                                                         
** OPTIONS for the Mellor/Yamada level 2.5 closure:                          
**                                                                           
**   The default horizontal advection is third-order upstream bias.  The     
**   default vertical advection is 4th-order centered advection.             
*/

#ifdef MY25_MIXING                                                            
# undef  N2S2_HORAVG     /* use if horizontal smoothing of buoyancy/shear */  
# define KANTHA_CLAYSON  /* use if Kantha and Clayson stability function */   
# undef  K_C2ADVECTION   /* use if 2nd-order centered advection */    
# define K_C4ADVECTION   /* use if 4th-order centered advection */
#endif
              
/*                                                                           
** OPTIONS for the Large et al. (1994) K-profile parameterization mixing:    
*/

#ifdef   LMD_MIXING   
# define LMD_BKPP      /* use if bottom boundary layer KPP mixing */          
# define LMD_CONVEC    /* use to add convec. mixing due to shear instability */
# define LMD_DDMIX     /* use to add double-diffusive mixing */                
# define LMD_NONLOCAL  /* use if nonlocal transport */                         
# define LMD_RIMIX     /* use to add diffusivity due to shear instability */  
# undef  LMD_SHAPIRO   /* use if Shapiro filtering boundary layer depth */     
# define LMD_SKPP      /* use if surface boundary layer KPP mixing */
#endif
          
/*                                                                           
** OPTIONS to activate smoothing of Richardson number, if SPLINES is not     
** activated:                                                                
*/    
                                                                      
#undef   RI_HORAVG    /* use if horizontal Richardson number smoothing */     
#undef   RI_VERAVG    /* use if vertical   Richardson number smoothing */     
/*                                                                           
** OPTIONS for Meinte Blass bottom boundary layer closure:                   
**                                                                           
**   The Options MB_Z0BL and MB_Z0RIP should be activated concurrently.      
*/
                                                                           
#undef MB_BBL         /* use if Meinte Blaas BBL closure */                   
#undef MB_CALC_ZNOT   /* use if computing bottom roughness internally */       
#undef MB_CALC_UB     /* use if computing bottom orbital velocity internally */
#undef MB_Z0BIO       /* use if biogenic bedform roughness for ripples */     
#undef MB_Z0BL        /* use if bedload roughness for ripples */              
#undef MB_Z0RIP       /* use if bedform roughness for ripples */
                  
/*                                                                           
** OPTIONS for Styles and Glenn (2000) bottom boundary layer closure:        
*/
                                                                           
#undef SG_BBL         /* use if Styles and Glenn (2000) BBL closure */        
#undef SG_CALC_ZNOT   /* use if computing bottom roughness internally */      
#undef SG_CALC_UB     /* use if computing bottom orbital velocity internally */
#undef SG_LOGINT      /* use if logarithmic interpolation of (Ur,Vr) */
        
/*                                                                           
** OPTIONS for the Sherwood/Signell/Warner bottom boundary layer closure:    
*/
                                                                           
#undef SSW_BBL             /* use if Sherwood et al. BBL closure */            
#undef SSW_CALC_ZNOT       /* use if computing bottom roughness internally */  
#undef SSW_LOGINT          /* use if logarithmic interpolation of (Ur,Vr) */   
#undef SSW_CALC_UB         /* use if bottom orbital velocity internally */  
#undef SSW_FORM_DRAG_COR   /* use to activate form drag coefficient */         
#undef SSW_Z0BIO           /* use if biogenic bedform roughness from ripples */
#undef SSW_Z0BL            /* use if bedload roughness for ripples */          
#undef SSW_Z0RIP           /* use if bedform roughness from ripples */         

/*                                                                           
** OPTIONS for closed boundary conditions:                                   
*/
                                                                           
#define  EASTERN_WALL   /* use if Eastern  edge, closed wall condition */     
#define  WESTERN_WALL   /* use if Western  edge, closed wall condition */      
#define  NORTHERN_WALL  /* use if Northern edge, closed wall condition */     
#define  SOUTHERN_WALL  /* use if Southern edge, closed wall condition */      

/*                                                                           
** Sediment transport model OPTIONS:                                         
*/
                                                                         
#define  SEDIMENT         /* use to activate sediment transport model */  
#ifdef   SEDIMENT        
# undef  BEDLOAD_MPM      /* use to activate Meyer-Peter-Mueller bed load */   
# undef  BEDLOAD_SOULSBY  /* use to activate Soulsby wave/current bed load */ 
# undef  RIVER_SEDIMENT   /* use to process river sediment point-sources */    
# define SED_DENS         /* use to activate sediment to equation of state */
# undef  SED_MORPH        /* use to allow bottom model elevation to evolve */  
# define SUSPLOAD         /* use to activate suspended load transport */
#endif       

/*                                                                           
** Nearshore and shallow water model OPTIONS:                                
*/                                                                           
#undef   WET_DRY          /* use to activate wetting and drying */            
#undef   NEARSHORE_MELLOR /* use to activate radiation stress terms */

/*
** Analitical model grig setup
*/

#undef  ANA_GRID      /* use if analytical model grid set-up */
#define GRDNAME
         
/*                                                                           
** NetCDF input/output OPTIONS:                                              
*/ 
                                                                          
#define  PERFECT_RESTART  /* use to include perfect restart variables */       
#undef   READ_WATER       /* use if only reading water points data */         
#undef   WRITE_WATER      /* use if only writing water points data */         
#undef   RST_SINGLE       /* use if writing single precision restart fields */
#define  OUT_DOUBLE       /* use if writing double precision output fields */  

/*                                                                           
** Fennel et al. (2006) biology model OPTIONS:                               
*/
                                             
#undef BIO_FENNEL     /* use if Fennel et al. (2006) nitrogen-based model */
#ifdef BIO_FENNEL
# define CARBON             /* use to add carbon constituents */
# define DENITRIFICATION    /* use to add denitrification processes */
# define BIO_SEDIMENT       /* use to restore fallen material */
# define DIAGNOSTICS_BIO    
#endif

/*                                                                           
** Bio-optical EcoSim model OPTIONS:                                         
*/ 

#define ECOSIM              /* use if bio-optical EcoSim model */
#ifdef ECOSIM 
# define ANA_BIOLOGY
# define ANA_SPFLUX
# define ANA_BPFLUX
# define ANA_CLOUD
#endif
#endif

#include "globaldefs.h"
I use forcing, grid and _.in own files.
And I can't to run my model with biology and ana_initial.h file.
I need the _ini.nc file.
Which program can I use for _ini.nc file creation?

Thanks

bronwyn
Posts: 26
Joined: Sun Nov 27, 2005 10:54 pm
Location: Free University Berlin

Re: bio_toy problem

#10 Unread post by bronwyn »

So, it seems you are not trying to run bio_toys at all. It's your own application. Bio_toys is a 6x6 grid with periodic boundary conditions, useful for doing small scale tests .... and getting familiar with biological models.

First, you need to decide which biological model you want to run, there are several available ... bio_fennel, ecosim, NPZD .... the biology is different in all of them, so you need to know what you want here. I certainly would not start with ecosim (as you have defined at the moment), it's the most complicated if you are just beginning. Once you have chosen the biological model you want, then define this in your application definitions (*.h file). You will also need to create your own initial condition netcdf file with the relevant variables for your grid. But if you don't know how to do this, then you are trying to do too much to start with in a first try of a model run.

To make netcdf, you can use matlab, fortran programs, ... there are several resources available on the roms website and also refer to the netcdf link available there too.

DTokarev

Re: bio_toy problem

#11 Unread post by DTokarev »

Hi bronwyn,

I can't run the bio_toy model with ana_biology.h file only.

I understood from your explanation that I need _ini.nc file for my model.

Thank you very much for your help.

Post Reply