Open yehaifengcaiji opened 6 months ago
Hello,
There's not a lot of information to go on here. But it's clear ROMSPath isn't finding a file it's looking for. It looks like the first problem you had might have been that the "multifile" parameter was set to .False.. So it was only looking for one file with that name. If you have multiple files you want it set to .True.. The second time it looks like it wasn't even getting the correct filename. Or any file name.
Could you post you ROMSPath.data file? But first check the value of the Ngrid parameter. It looks like is searching for a second file and doesn't have a filename. If you're not running with nested grids, set Ngrid=1.
Eli
Hello,
Thanks for your help, I try your help and solve the first problem, thanks! And I set Ngrid=1 and report that:
time units in input file are seconds
seconds since 1900-01-01 00:00:00
3545726400.0000000
**** Model Info ****
Run Name: = ROMSPath v.4.2 test case Executable Directory: = . Output Directory: = ./output Run By: = ELI HUNTER Institution: = RUTGERS Started On: = A time in 2019
Days: = 0.250 Particles: = 3000 Particle File: =
Behavior: = Passive Particle Mortality: = On Settlement: = Off
Horizontal Turbulence: = Off Vertical Turbulence: = Off Ocean Boundary: = Open Salt & Temp Output: = On Track Collisions: = No Track Model Timing: = No
First Hydro File: = /usr/ROMSPath-master/lk/mm20_avg2012advC62_0058.nc
Seed: = 0
Turbulence files: Wave files:
*** ROMSPath INITIALIZATION ** USING SYSTEM RANDOM SEED At line 789 of file hydrodynamic_module.f90 Fortran runtime error: End of record "
I think the reason is that I did not prepare the particle file, and could you please tell me something about what I should prepare about the input file.
My ROMSPath.data is that:
! ROMSPath Input Data File
!---- This is the file that contains input values for ROMSPath with parameters grouped --- !---- (Previously ROMSPath.inc) ! NUMBER OF PARTICLES $numparticles
numpar = 3000 ! Number of particles per file (total number for sim. on each node) !CHANGE ! numpar should equal the number of rows in the particle ! locations input file $end
! TIME PARAMETERS $timeparam
days = 0.25 ! Number of days to run the model !CHANGE iprint = 3600 ! Print interval for ROMSPath output (s); 3600 = every hour dt = 720 ! External time step (duration between hydro model predictions) (s) idt = 60 ! Internal (particle tracking) time step (s)
$end
! ROMS HYDRODYNAMIC MODULE PARAMETERS $hydroparam
readZeta = .TRUE. ! If .TRUE. read in sea-surface height (zeta) from NetCDF file, else use constZeta constZeta = 0.0 ! Constant value for Zeta if readZeta is .FALSE. readSalt = .TRUE. ! If .TRUE. read in salinity (salt) from NetCDF file, else use constSalt constSalt = 0.0 ! Constant value for Salt if readSalt is .FALSE. readTemp = .TRUE. ! If .TRUE. read in temperature (temp) from NetCDF file, else use constTemp constTemp = 0.0 ! Constant value for Temp if readTemp is .FALSE. readU = .TRUE. ! If .TRUE. read in u-momentum component (U ) from NetCDF file, else use constU constU = 0.0 ! Constant value for U if readU is .FALSE. readV = .TRUE. ! If .TRUE. read in v-momentum component (V ) from NetCDF file, else use constV constV = 0.0 ! Constant value for V if readV is .FALSE. readW = .TRUE. ! If .TRUE. read in w-momentum component (W ) from NetCDF file, else use constW constW = 0.0 ! Constant value for W if readW is .FALSE. readAks = .TRUE. ! If .TRUE. read in salinity vertical diffusion coefficient (Aks ) from NetCDF file, else ! use constAks constAks = 0.0 ! Constant value for Aks if readAks is .FALSE. readDens = .FALSE. constDens = 0.0
! stokesprefix='/projects/f_hfuchs_1/stokes/snaildel_nestV04a/snaildelstokes' ! ,'/projects/f_hfuchs_1/stokes/snaildel_nestV04a/doppiostokes' !CHANGE ! turbstd_v_a_prefix='/projects/f_hfuchs_1/accelvort/snaildel_nestV04a/snaildelturbvortaccel' ! ,'/projects/f_hfuchs_1/accelvort/snaildel_nestV04a/doppioturbvortaccel' !CHANGE ! wavestd_prefix='/projects/f_hfuchs_1/accelvort/wave_snaildel_nestV04a/snaildelwaveaccel' ! ,'/projects/f_hfuchs_1/accelvort/wave_snaildel_nestV04a/doppiowaveaccel' !CHANGE
Process_VA =.TRUE. ! PROCESS Vort./accel and write to netcdf file. Process_WA =.TRUE. ! PROCESS Wave Accel and write to netcdf file. $end
! TURBULENCE MODULE PARAMETERS $turbparam
VTurbOn = .FALSE. ! Vertical Turbulence on (.TRUE.) or off (.FALSE.) serr=0.0001 !Aks Cubic spline error Cutoff smth=0.6 !Aks Cubic spline smoothing parameter sub=4.0 !Resolution multiplier for Aks cubic spline smoothing deltat=1.0 ! vertical tubrulence parameter time step (seconds) AKSback=1.0D-8 ! Background diffusivity HTurbOn = .FALSE. ! Horizontal Turbulence on (.TRUE.) or off (.FALSE.) ConstantHTurb = 2.85714d0 20.0d0 ! Constant value of horizontal turbulence (m2/s) $end
! Advection MODULE PARAMETERS $advectparam scheme= 1 ! 1 - 4th order RK,else no advection nsb=0 !0=Neutral,1- Surface trapped, 2 - Bottom trapped !CHANGE vertdist=0.25 ! (m) Used for nsb-2 or 3. Particles held at vertdist from surface or bottom.
$end
! BEHAVIOR MODULE PARAMETERS $behavparam
Behavior = 0 ! Behavior type (specify a number) !CHANGE ! Note: The behavior types numbers are: ! 0 Passive, 1 swim , 10: Fuchs Behavior parameterization. , 11: No Behavior,output vorticity/acceleration.
OpenOceanBoundary = .TRUE. ! Note: If you want to allow particles to "escape" via open ocean ! boundaries, set this to TRUE; Escape means that the particle ! will stick to the boundary and stop moving pediage = 302400 ! Age when particle reaches max swim speed and can settle (s) ! Note: for oyster larvae behavior types (4 & 5), ! pediage = age at which a particle becomes a pediveliger ! Note: pediage does not cause particles to settle if ! the Settlement module is not on swimstart = 0.0 ! Age that swimming or sinking begins (s) 1 day = 1.24.3600. swimslow = 0.0005 ! Swimming speed when particle begins to swim (m/s) swimfast = 0.0005 ! Maximum swimming speed (m/s) 0.005 m/s for 5 mm/s ! Note: for constant swimming speed for behavior type 1, ! set swimslow = swimfast = constant speed Sgradient = 1.0 ! Salinity gradient threshold that cues larval behavior (psu/m) ! Note: This parameter is only used if Behavior = 4 or 5. sink = -0.0003 ! Sinking velocity for behavior type 6 ! Note: This parameter is only used if Behavior = 6.
! Tidal Stream Transport behavior type: Hswimspeed = 0.9 ! Horizontal swimming speed (m/s) Swimdepth = 2 ! Depth at which fish swims during flood time ! in meters above bottom (this should be a positive value ! Note: this formulation may need some work
$end
! BEHAVIOR MODULE PARAMETERS $fuchsparam !%%%%%%%%%%%%%%%%% VORTICITY RESPONSES vort_cr=1 !%(s^-1) critical vorticity for inducing response vort_sat=10 !%(s^-1) vorticity where response saturates
b0pv=.5 !% min probability of swimming vs. vorticity b1pv=1 !% max probability of swimming vs. vorticity b0wv=0 !% (cm s^-1) max swimming velocity vs vorticity -- keep it for flexibility b1w=0 !% (cm s^-1) neutral buoyancy (no response)
!%%%%%%%%%%%%%%%%% ACCELERATION RESPONSES acc_cr= 10 !%(cm s^-2) critical acceleration for inducing response acc_sat= 1000 !%(cm s^-2) acceleration where response saturates
b0pa=.5 !% min probability of swimming vs. acceleration b1pa=1 !% max probability of swimming vs. acceleration b0wa=0.2 !% (cm s^-1) max swimming velocity vs acceleration
va_flag=1 ! 0=Both, 1=Vorticity Only, 2=Acceleration Only
$end
! Growth MODULE PARAMETERS $growparam
Growth=0 ! Growth type (specify a number) ! Note: The growth types numbers are: ! 0 none, 1 Use deadage, 2 Use Growth equation, mortality =.TRUE. ! TRUE if particles can die; else FALSE deadage=3888000 ! Age at which a particle stops moving (i.e., dies) (s) ! Note: deadage stops particle motion for all behavior types (0-6) initsize =250.0 ! Initial size of Larva(Egg size?) maxsize=1000.0 ! Maximum size of larva. (Stop moving after this) tempcut=2.0 ! Temperature cutoff for growth a0=-29.8 ! Growth Coefficient 0 a1=3.86 ! Growth Coefficient 1 a2=0.0 ! Growth Coefficient 2 a3=0.0 ! Growth Coefficient 3 a4=-0.070 ! Growth Coefficient 4 a5=0.0 ! Growth Coefficient 5 a6=0.0 ! Growth Coefficient 6 a7=0.0 ! Growth Coefficient 7 a8=0.0 ! Growth Coefficient 8
$end
!* DVM IS CURRENTLY NOT USED AT ALL!!!!!!!!!!!!!!!!!!!!!!!!*** ! DVM. The following are parameters for the Diurnal Vertical Migration (DVM) behavior type ! Note: These values were calculated for September 1 at the latitude of 37.0 (Chesapeake Bay mouth) ! Note: Variables marked with ** were calculated with light_v2BlueCrab.f (not included in ROMSPath yet) ! Note: These parameters are only used if Behavior = 3 $dvmparam
twistart = 4.801821 ! Time of twilight start (hr) twiend = 19.19956 ! Time of twilight end (hr) daylength = 14.39774 ! Length of day (hr) Em = 1814.328 ! Irradiance at solar noon (microE m^-2 s^-1) Kd = 1.07 ! Vertical attenuation coefficient thresh = 0.0166 ! Light threshold that cues behavior (microE m^-2 s^-1)
$end
!* SETTLEMENT IS CURRENTLY NOT USED AT ALL!!!!!!!!!!!!!!!!!!!!!!!!!!!***
! SETTLEMENT MODULE PARAMETERS $settleparam
settlementon = .FALSE. ! settlement module on (.TRUE.) or off (.FALSE.) ! Note: If settlement is off: set minholeid, maxholeid, minpolyid, ! maxpolyid, pedges, & hedges to 1 ! to avoid both wasted variable space and errors due to arrays of size 0. ! If settlement is on and there are no holes: set minholeid, ! maxholeid, and hedges to 1 holesExist = .TRUE. ! Are there holes in habitat? yes(TRUE) no(FALSE) minpolyid = 101001 ! Lowest habitat polygon id number maxpolyid = 101004 ! Highest habitat polygon id number minholeid = 100201 ! Lowest hole id number maxholeid = 100401 ! Highest hole id number pedges = 67 ! Number of habitat polygon edge points (# of rows in habitat polygon file) hedges = 32 ! Number of hole edge points (number of rows in holes file)
$end
$romsgrid Ngrid=1 ! Refinement grids only! refine=7 ! grid refinement, Should be Ngrid-1 long $end
! ROMS Predictions NetCDF Input (History) File
!Filename = prefix + filenum + suffix
!Note: the path to the file is necessary if the file is not in the same folder as the code
!Note: if .nc file in separate folder in Windows, then include path in prefix. For example:
! prefix='D:\ROMS\y95hdr'
! if .nc file in separate folder in Linux, then include path in prefix. For example:
! prefix='/share/lzhong/1995/y95hdr'
! Need Ngrid file names for nested grids
!prefix='/home/hunter/Projects/larvawave/ltrans/data/snaildel_nest/snaildelhis'
!,'/home/hunter/Projects/larvawave/ltrans/data/snaildel_nest/doppiohis'
$romsoutput suffix= !File suffice required prefix='/usr/ROMSPath-master/lk/mm20_avg2012advC62_0058.nc' !CHANGE
time_vname='ocean_time' ! NetCDF Input Time variable name (usually ocean_time) time_dname='ocean_time' ! NetCDF Input Time dimension name (usually ocean_time) filenum = 0058 ! Number in first NetCDF input filename !!*CHANGE***** numdigits = 1 ! Number of digits in number portion of file name (with leading zeros)!!*CHANGE***** ! startfile = .FALSE. ! Is it the first file, i.e. does the file have an additional time step?!!*CHANGE***** multifile = .FALSE. !.TRUE. means multiple files are used with indexing. .False. means only a single file/url $end
! Particle Location Input File !Note: the path to the file is necessary if the file is not in the same folder as the code ! parfile = '/home/elhunter/ROMSPath/ROMSPathnesting/ROMSPath_INIT_TIMES.csv' !Particle locations ! parfile = '/home/elhunter/ROMSPath/ROMSPathv3/TESTINIT.csv' !Particle locations $parloc
! parfile = './init_nested.csv' !Particle locations !CHANGE
$end
! Habitat Polygon Location Input Files !Note: the path to the file is necessary if the file is not in the same folder as the code $habpolyloc
! habitatfile = './input/End_polygons.csv' !Habitat polygons ! holefile = './input/End_holes.csv' !Holes in habitat polygons
$end
! Output Related Variables $output
!NOTE: Full path must already exist. Model can create files, but not directories.
outpath = './' ! Location to write output files !CHANGE ! Use outpath = './' to write in same folder as the executable NCOutFile = 'SHOWNESTING_NOMIX' ! Name of the NetCDF output files (do not include .nc)
outpathGiven = .TRUE. ! If TRUE files are written to the path given in outpath
NCtime = 0 ! Time interval between creation of new NetCDF output files (seconds) ! Note: setting this to 0 will result in just one large output file !NetCDF Model Metadata (these will be stale unless you edit them): RunName = 'ROMSPath v.4.2 test case' ExeDir = '.' OutDir = './output' RunBy = 'ELI HUNTER' Institution = 'RUTGERS' StartedOn = 'A time in 2019' $end
! OTHER PARAMETERS $other
seed = 0 ! Seed value for random number generator (Mersenne Twister) ErrorFlag = 3 ! What to do if an error is encountered: 0=stop, 1=return particle to previous location, ! 2=kill particle & stop tracking that particle, 3=set particle out of bounds & ! stop tracking that particle ! Note: Options 1-3 will output information to ErrorLog.txt ! Note: This is only for particles that travel out of bounds illegally SaltTempOn = .TRUE. ! Calculate salinity and temperature at particle SaltTempMean = .TRUE. WriteBottom = .TRUE. WriteWaterDepth = .TRUE.
TempOffset = 0.0 ! Temperature offset applied to growth !CHANGE ! (Temp used for growth) = (ROMS output temp) + TempOffset
TrackCollisions = .FALSE. ! Write Bottom and Land Hit Files? .TRUE.=yes, .FALSE.=no ###NOT ACTIVE WriteHeaders = .FALSE. ! Write .txt files with column headers? .TRUE.=yes, .FALSE.=no ###NOT ACTIVE WriteModelTiming = .FALSE. ! Write .csv file with model timing data? .TRUE.=yes, .FALSE.=no ###NOT ACTIVE
ijbuff = 4 ! number of extra elements to read in on every side of the particles
FreeSlip = .FALSE. ! enable the use of the free slip condition
$end
Thanks for your help!
Haifeng
Hi! Could you please tell me which file is needed when I prepare the input file. And when I write that "prefix='/usr/ROMSPath-master/lk/mm20avg2012advC62" in the term of romsoutput in the file ROMSPath.data. It will report that "cant not find /usr/ROMSPath-master/lk/mm20avg2012advC62"
Then I fill my own nc filename "prefix='/usr/ROMSPath-master/lk/mm20_avg2012advC62_0058.nc", it will report that:
time units in input file are seconds seconds since 1900-01-01 00:00:00
3545726400.0000000
Problem with NF90_OPEN: File not found:
PROBLEM READING GRID INFORMATION
So could you please help me?