Spatially variable water type

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
zhangwx
Posts: 3
Joined: Tue Nov 24, 2009 2:26 am
Location: East China Normal University

Spatially variable water type

#1 Unread post by zhangwx »

Hi all,

I am setting up a comprehensive East China Sea ecosystem model. As regions close to the Changjiang Estuary is very turbid, taking laterally variable water type into the model would be expected to have more reasonable results. I tested it both ways, define ANA_WTYPE and modified ana_wtype.h accordingly, or define WTYPE_GRID and provide Jwtype in the grid file. However, it seems like the model didn't read information from those. So I commanded off 'WTYPE == 5' in the *.in file, then the model gave me this error. Am I missing something that needs to be done but I didn't?

Also, I tried to add new water types by modifying mod_scalars.F. Yet there should be more that need to be modified in order to have new water types.

Any suggestions would be gratefully appreciated! Thank you in advance!

Wenxia
Attachments
Screen Shot 2017-10-25 at 9.27.20 AM.png

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

Re: Spatially variable water type

#2 Unread post by kate »

I poked through one of my ROMS stdout files. Interesting that it reports min/max etc for each of the forcing fields it reads, but not for the fields in the grid file. We get a nice report from GET_STATE and all the GET_2DFLD calls, not from GET_GRID. You could change that to get more information as it reads the grid file. You could also change ana_wtype to give you some sort of report.

As for the error when not reading a water type from ocean.in, that's code in read_phypar.F that you can change too. The test as is is independent of WTYPE_GRID.

zhangwx
Posts: 3
Joined: Tue Nov 24, 2009 2:26 am
Location: East China Normal University

Re: Spatially variable water type

#3 Unread post by zhangwx »

Thank you Kate.

Here is my concern. I defined ANA_WTYPE option and set Jwtype to some value. However no matter what value Jwtype uses in ana_wtype.h, the model always reads WTYPE from *.in file. What am I missing here? Is there something else I have to modify? Thank you in advance! I am grateful.

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

Re: Spatially variable water type

#4 Unread post by kate »

It's true - read_phypar.F will complain if you don't set lmd_Jwt. It uses that in initialize_mixing to fill the Jwtype array. You just have to depend on that happening before either the ana_jwtype or the get_grid call. You could read the code to make sure that's true or watch it all in a debugger. Things are coded up in this ad hoc way because the JWTYPE_GRID option came much later than the initial use of lmd_Jwt being uniform across the grid.

You can submit a bug report saying read_phypar.F shouldn't complain about lmd_Jwt when JWTYPE_GRID is defined. initialize_mixing in that case should initialize with some wacky value that if used, will cause an error - it is called as soon as those arrays are allocated, so yes, later filling of Jwtype will overwrite the initial values.

zhangwx
Posts: 3
Joined: Tue Nov 24, 2009 2:26 am
Location: East China Normal University

Re: Spatially variable water type

#5 Unread post by zhangwx »

Thank you Kate! I am grateful.

Wenxia

Post Reply