Hi everybody!
I am having trouble outputting float trajectories. Here is what I did:
1. I set the location of floats.in in main.in and set the location of the outputted data
2. defined FLOATS in .h file
3. configured floats.in file
No file is created corresponding the floats trajectories. Also, when I look at my log file it appears that FLOATS is not being activated.
Any thoughts?
Thank you!
Outputting float trajectories
Re: Outputting float trajectories
You activated FLOATS in the .h file so you have to find out why that didn't work. You can check say $SCRATCH_DIR/step_floats.f90 file to see if the float code made it there. Did you do "make clean" before your build?
Re: Outputting float trajectories
Thank you Kate!
I am unsure what you mena by "...if the float code made is there. This is what is in the file Build/step_floats.f90:
MODULE step_floats.mod
END MODULE step_floats.mod
I am quite new to ROMS and I am still learning how it all works.
Yes, when I build the model I "make clean".
Thank you for your time.
I am unsure what you mena by "...if the float code made is there. This is what is in the file Build/step_floats.f90:
MODULE step_floats.mod
END MODULE step_floats.mod
I am quite new to ROMS and I am still learning how it all works.
Yes, when I build the model I "make clean".
Thank you for your time.
Re: Outputting float trajectories
That step_floats.f90 file is the result of using the C preprocessor (cpp) on step_floats.F, the top of which looks like:
We are using cpp for conditional compilation. Both NONLINEAR and FLOATS must be defined for the following code to get seen by the Fortran compiler. cpp is case sensitive and it gives no errors on misspelled words. Perhaps you defined FLAOTS or FLOaTS? Or merely FLOAT?
NONLINEAR is defined in globaldefs.h. It then gets undefined if you are using one of the fancy assimilation options. You can see the list for yourself in globaldefs.h. Note to self: make sure not to create a new domain and call it "sanity_check".
Code: Select all
#include "cppdefs.h"
MODULE step_floats_mod
#if defined NONLINEAR && defined FLOATS
NONLINEAR is defined in globaldefs.h. It then gets undefined if you are using one of the fancy assimilation options. You can see the list for yourself in globaldefs.h. Note to self: make sure not to create a new domain and call it "sanity_check".
Re: Outputting float trajectories
Turns out I did not "make clean" in my build script. Everything seems to work now. I get a model_flt.nc file and it appears to behave as I expect it do. The floats make inertial circles.
The only questions now are why do I need to "make clean" in order for FLOATS to work and where are all the float output variables defined in ROMS? I figured that x and y are the x and y coordinates and Xgrid, Ygrid, and Zgrid are only relevant if I have multiple grids.
Thank you Kate for your help.
The only questions now are why do I need to "make clean" in order for FLOATS to work and where are all the float output variables defined in ROMS? I figured that x and y are the x and y coordinates and Xgrid, Ygrid, and Zgrid are only relevant if I have multiple grids.
Thank you Kate for your help.
Re: Outputting float trajectories
You would need to recompile/build after changing the cppdefs.h. Ideally, the "MakeDepend" business would trigger recompiling most everything when cppdefs.h is changed so that "make clean" is not strictly necessary. If that isn't working, I don't know why.
The float natural coordinates are in i,j,k space of the model. On output this gets converted to x,y,z or lon,lat,z because that is what you are most likely to want. Feel free to ignore Xgrid and friends.
The float natural coordinates are in i,j,k space of the model. On output this gets converted to x,y,z or lon,lat,z because that is what you are most likely to want. Feel free to ignore Xgrid and friends.
Re: Outputting float trajectories
Xgrid, Ygrid, and Zgrid appear to be what I want. That outputs the x,y, and z model coordinates. x and y are on the order of 10^5. What are these? Are all of the float output variables defined anywhere in ROMS or on the wiki page? Thanks again for helping me get this running
Re: Outputting float trajectories
Your grid is either in lon,lat space or in x,y space. There's a "spherical" flag to determine which one. You appear to be in x,y space, with the numbers being the coordinates in meters from some Cartesian origin. Did you pick the ANA_GRID option?