Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Tue Sep 17, 2019 4:38 am




Post new topic Reply to topic  [ 5 posts ] 

All times are UTC

Author Message
PostPosted: Sun Dec 24, 2017 8:08 pm 
Offline

Joined: Tue Aug 02, 2011 5:18 am
Posts: 10
Location: national marine environmental forcasting center
Recently, I am running the Bio_Fennel model and ready to simulate the pCO2 in seawater distribution in China seas. I read the subroutine for the calculating the pCO2 in Fennel model, and find there is one choice about defining WET_DRY CPP, such as follows:
DiaBio2d(i,j,ipCO2)=pCO2(i)
# ifdef WET_DRY
DiaBio2d(i,j,ipCO2)=DiaBio2d(i,j,ipCO2)*rmask_io(i,j)
# endif

I added Yangtze River in my model, so after considering the calculating at the nearshore, I define WET_DRY cpp. After running some days, I find the values of DIAGNOSTICS_BIO outputs, like the pCO2, CO2_airsea flux and so on, are all zero. While If I do not define the WET_DRY, the results are performing normal. Could anyone help and explain this problem. Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 24, 2017 9:21 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3665
Location: IMS/UAF, USA
Yeah, WET_DRY and ecosystem models are a tricky mix. I went through COBALT, adding the wetdry mask to all the diagnostics and got the diagnostics to look OK. Then I discovered that I had to move the wetdry mask stuff to the actual computations instead of to the diagnostics of those computations. Anyway, this is to say that there could be work to do in Fennel too.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 25, 2017 3:48 am 
Offline

Joined: Tue Aug 02, 2011 5:18 am
Posts: 10
Location: national marine environmental forcasting center
Hi Kate,
Thanks for reply. I do not understand your method. Does that mean I should remove rmask_io from the computation for the diagnostics in Fennel model, or using rmask instead of rmask_io?


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 25, 2017 1:34 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3665
Location: IMS/UAF, USA
Hernan and I haven't always agreed on what mask to use when. I'm using rmask_full to mask biological processes where dry. Otherwise, I was getting very large values for some fields, not zeroes.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 27, 2017 9:45 pm 
Offline
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 502
Location: Rutgers University
Looking in the source code I have downloaded I see no occurrence of the variable rmask_io in fennel.h.

So I went into the source code "trac" tool
https://www.myroms.org/projects/src/wiki
intending to look at the sequence of changes to fennel.h.

But first I did a search on "rmask_io"
which led me directly to this ticket from 3 years ago:
https://www.myroms.org/projects/src/ticket/648

So you have a very old fennel.h. That might be OK if the rest of your code is also 3 years or more old (not recommended) but I suspect you have mixed and matched codes and so you have inconsistent masking variables.

I recommend you update your ROMS code.

If you are using a modified fennel.h, if you have kept those modifications in your svn repository there is every possibility that those mods will be successfully preserved in the update, or flagged with sufficiently few conflicts diffs that you can resolve them easily.

The new rmask_full etc. variables are used instead of rmask only in the WET_DRY option
and should always be used in WET_DRY. If you are modifying fennel.h then if a cell is dry you probably want nothing to happen in that cell - but just think through the logic of what will happen when the cell gets wet again and might have an inventory of nitrogen in it carried over from before it dried out.

The DIAGNOSTICS and AVERAGES options use other special masks in wetting/drying because the time average step in both cases has to be modified to count only the time steps during which cells are wet. That's what the rmask_avg etc. variables defined in Utility/set_mask.F are for. If you read through the code I think the logic becomes apparent.

_________________
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group