Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Mon Dec 11, 2017 5:02 pm




Post new topic Reply to topic  [ 9 posts ] 

All times are UTC

Author Message
PostPosted: Tue Oct 11, 2011 3:50 am 
Offline
User avatar

Joined: Tue May 31, 2005 4:17 pm
Posts: 12
Location: Scripps Institution of Oceanography
Hi,

Has anyone computed the individual terms in the heat budget equation (as shown below) using the ROMS model output, computing the advection, temperature tendency term and the remaining terms? If so, is it possible to completely close this budget to good accuracy or what is the order of magnitude of the residual terms in the budget?

Attachment:
heateqn.jpg
heateqn.jpg [ 43.49 KiB | Viewed 3748 times ]


Thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 12, 2011 2:30 pm 
Offline
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 424
Location: Rutgers University
The DIAGNOSTICS_TS and AVERAGES options allow you to save everything you need, but it will take some care to get the balance you seek.

#define DIAGNOSTICS_TS will save (to the diagnostics file) the vertical advection, vertical mixing, lateral mixing, and time rate of changes terms provided you also activate the logical switches in ocean.in:

Dout(iTrate) == T F ! temp_rate, ... time rate of change
Dout(iThadv) == T F ! temp_hadv, ... horizontal total advection
Dout(iTvadv) == T F ! temp_vadv, ... vertical advection
Dout(iThdif) == T F ! temp_hdiff, ... horizontal total diffusion
Dout(iTvdif) == T F ! temp_vdiff, ... vertical diffusion

#define AVERAGES will save (to the averages file) the averages of heat flux, velocity <U>, temperature <T>, and quadratic product <UT> provided you also activate the logical switches in ocean.in:

Aout(idTsur) == T F ! shflux, ssflux surface net heat and salt flux
Aout(idUvel) == T ! u 3D U-velocity
Aout(idVvel) == T ! v 3D V-velocity
Aout(idTvar) == T F ! temp, salt temperature and salinity
Aout(idUTav) == T F ! utemp, usalt quadratic <u*t> T/S terms
Aout(idVTav) == T F ! vtemp, vsalt quadratic <v*t> T/S terms

You will need to construct <u't'> yourself from the saved <u*t> - <u>*<t>

Obviously, you must choose the same averaging time interval for averages and diagnostics, i.e. NAVG = NDIA.

Something to be aware of is that because of the time-changing vertical s coordinate your vertical integrals may be only approximate. ROMS offers the options to save the products of <dz*u*t> etc with these logical switches:

Aout(iHUTav) == T F ! Huontemp, ... T/S volume flux, <Huon*t>
Aout(iHVTav) == T F ! Hvomtemp, ... T/S volume flux, <Hvom*t>

These values then already have the vertical grid metrics included, so a vertical integral is achieved simply by a vertical summation. The horizontal grid metric dx = 1/m and dy = 1/n are also in these products ("Huon" means vertical spacing "H" times u "over n") so some care is needed here to use these values correctly.

This might not be an issue for you, but it was for me in my calculations of heat budgets on the New England Shelf: Wilkin, J. (2006):, The summer time heat budget and circulation of southeast New England shelf waters, Journal of Physical Oceanography, 36(11), 1997-2011 http://marine.rutgers.edu/%7Ewilkin/Wilkin_CBLAST_JPO2006.pdf I could not get an exact balance unless I took the time correlations of vertical grid spacing (which depends on sea level, zeta) and tidal velocity into account.

--
John.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 13, 2011 1:12 am 
Offline
User avatar

Joined: Tue May 31, 2005 4:17 pm
Posts: 12
Location: Scripps Institution of Oceanography
Thanks very much, John, for the detailed reply! Will do the online diagnostics for my model run.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 06, 2014 10:42 am 
Offline

Joined: Mon Jun 22, 2009 3:46 pm
Posts: 135
Location: Indian Institute of Tropical Meteorology, Pune, INDIA
Hi,

I am also interested in heat budget. Which quantities do I need to use from dia* file and which formula i have to use ?

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 17, 2017 4:16 am 
Offline

Joined: Tue Nov 10, 2015 3:51 pm
Posts: 7
Location: The University of Western Australia
Dear Prof. Wilikin and everyone,

I'm trying to analyze information from both, the AVERAGE file and the DIAGNOSTICS file for performing a salt budget, but there are some features that are a bit confusing. The first one I want to ask here is about the time averaging of the diagnostics variables.

All the internal documentation in the *.F files refers to the diagnostic variables as "time-averaged diagnostics". For example, the output.F says:
! If appropriate, process time-averaged diagnostics NetCDF file

and the wrt_diags.F file says:
!=======================================================================
! !
! This subroutine writes model time-averaged diagnostic fields into !
! diagnostics NetCDF file. !
! !
!=======================================================================

But I have not been able to find any section in any *.F file of the code that performs any time averaging on the diagonostics variables.
So, my question is:

1. Where is the time-averaging of the diagnostics variables performed? Or, why are these variables and files named as "time-averaged diagnostic" everywhere? Why are they called like that, what is the meaning?

Many thanks,
Wencai Zhou.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 17, 2017 2:00 pm 
Offline
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 424
Location: Rutgers University
The diagnostics calculations are throughout the code. Search for the CPP directive DIAGNOSTICS_TS (or DIAGNOSTICS_UV) and you will find snippets of code everywhere. For example ...

Code:
queequeg:ROMS wilkin$ grep DIAGNOSTICS_TS Nonlinear/* | more
grep: Nonlinear/Biology: Is a directory
grep: Nonlinear/Sediment: Is a directory
Nonlinear/pre_step3d.F:# ifdef DIAGNOSTICS_TS
Nonlinear/pre_step3d.F:# ifdef DIAGNOSTICS_TS
Nonlinear/pre_step3d.F:#  ifdef DIAGNOSTICS_TS
Nonlinear/pre_step3d.F:#  ifdef DIAGNOSTICS_TS
Nonlinear/pre_step3d.F:# if defined DIAGNOSTICS_TS || defined DIAGNOSTICS_UV
Nonlinear/pre_step3d.F:#  ifdef DIAGNOSTICS_TS
Nonlinear/step3d_t.F:# ifdef DIAGNOSTICS_TS
Nonlinear/step3d_t.F:# ifdef DIAGNOSTICS_TS
Nonlinear/step3d_t.F:# ifdef DIAGNOSTICS_TS
...


The time summation is performed by code such as (this taken from line 944 in step3d_t.F):
Code:
#  ifdef DIAGNOSTICS_TS
              DiaTwrk(i,j,k,itrc,iTxadv)=DiaTwrk(i,j,k,itrc,iTxadv)-    &
     &                                   cff1
              DiaTwrk(i,j,k,itrc,iTyadv)=DiaTwrk(i,j,k,itrc,iTyadv)-    &
     &                                   cff2
              DiaTwrk(i,j,k,itrc,iThadv)=DiaTwrk(i,j,k,itrc,iThadv)-    &
     &                                   cff3
#  endif


The accumulated sums are converted to time averages in Utility/set_diags.F. Look for the code following the comment:

Code:
!
!-----------------------------------------------------------------------
!  Convert accumulated sums into time-averages, if appropriate
!-----------------------------------------------------------------------
!



The length of the averaging interval is set in ocean.in by the keywords:

Code:
! NDIA         Number of time-steps between writing time-averaged diagnostics
!                data into DIAGNOSTIC file.  Averaged date is written for all
!                fields. Set NDIA=0 to suppress writing of DIAGNOSTIC file.
!
! NDEFDIA      Number of time-steps between the creation of new time-averaged
!                diagnostics file.  If NDEFDIA=0, the model will only process
!                one DIAGNOSTICS file.  This feature is useful for long
!                simulations when DIAGNOSTIC file get too large; it creates
!                a new file every NDEFDIA time-steps.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 19, 2017 1:46 am 
Offline

Joined: Tue Nov 10, 2015 3:51 pm
Posts: 7
Location: The University of Western Australia
Thank you very much Prof. Wilkin, now I understand it. Thanks for opening my eyes, now I see that all I asked for is in the set_diags.F and that the diagnostics variables are averaged in the same way as the average variables (in the set_avg.F).

Best regards,
Wencai


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 19, 2017 6:08 am 
Offline

Joined: Tue Nov 10, 2015 3:51 pm
Posts: 7
Location: The University of Western Australia
Dear Professor Wilkin,

I am wondering if you can help me further with another mysterious issue with the time-averaged variables. Basically, I'm not observing correspondence between variables in the history file and variables in the avg file. For example, salinity values of the same cell look unexpectedly different. I have posed this issue in a different thread:

viewtopic.php?f=14&t=4610

Could you please comment your opinion in that thread? Thanks a lot.

Wencai


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 14, 2017 12:17 pm 
Offline

Joined: Mon Apr 08, 2013 12:29 pm
Posts: 13
Location: Indian National Centre for Ocean Information Servi
Hi,

How do we get the values of K_h and K_v mentioned in the diffusivity term of the heat budget equation (the same equation which started the discussion and also attached for easy referral).
I suppose density can be derived by adding rho_anomaly with mean density. Please comment if I am wrong.
We take the value of C_p (=4000) from mod_scalars.F.
What is z_0 (the lower limit of the integration). Does it refer to the top surface or ocean bottom ?


Attachments:
heateqn.jpg
heateqn.jpg [ 43.49 KiB | Viewed 533 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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