[RegCNET] Increased output frequency less than 1 hour

Neil Davis nndavis at unity.ncsu.edu
Wed Jan 11 15:47:07 CET 2006


Attached is some changes I have made to the code which allows you to 
output the code at a higher frequency than was the one hour limit the 
model had before.  Because of the changes all of the output frequencies 
in regcm.in have to be input as whole minutes.  You can change it minute 
by minute up to 90 minutes or 1.5 hours, then it has to be whole hours, 
this is due to the way that grads handles intervals.  Also make sure 
that batfrq (bats output frequency) is divisible by abatm (bats 
timestep).  This is a check the model runs, and will stop your run if 
they are not set correctly. 

Changes.txt is a diff of the changes that I have made to the code for 
your reference.

Neil Davis
Graduate Student NCSU
-------------- next part --------------
A non-text attachment was scrubbed...
Name: param.f
Type: text/richtext
Size: 40387 bytes
Desc: not available
Url : https://lists.ictp.it/mailman/private/regcnet/attachments/20060111/144e86f3/param-0001.rtx
-------------- next part --------------
Common subdirectories: fastoutput/RegCM/Main/Commons and default/RegCM/Main/Commons
diff fastoutput/RegCM/Main/grads_stuf.f default/RegCM/Main/grads_stuf.f
147,148c147
<          number=(ibdyfrq*60./batfrq+0.00001)*(min0(jbend,mnend)-nbase)
<      &	 +1
---
>          number=(ibdyfrq/batfrq+0.00001)*(min0(jbend,mnend)-nbase)+1
150c149
<          number=(ibdyfrq*60./batfrq+0.00001)*(min0(jbend,mnend)-nbase)
---
>          number=(ibdyfrq/batfrq+0.00001)*(min0(jbend,mnend)-nbase)
154,155c153
<          if(batfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour     ,cday(nday),cmonth(month)
157,160d154
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60.)
<          endif
162,163c156
<         if(batfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour+ifrq,cday(nday),cmonth(month)
165,168d157
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60.)
<          endif
171d159
<  401  format('tdef ',I4,' linear ',I2,'z',A2,A3,I4,' ',I2,'mn')
353,354c341
<          number=(ibdyfrq*60./batfrq+0.00001)*(min0(jbend,mnend)-nbase)
<      &	 +1
---
>          number=(ibdyfrq/batfrq+0.00001)*(min0(jbend,mnend)-nbase)+1
356c343
<          number=(ibdyfrq*60./batfrq+0.00001)*(min0(jbend,mnend)-nbase)
---
>          number=(ibdyfrq/batfrq+0.00001)*(min0(jbend,mnend)-nbase)
360,361c347
<          if(batfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour     ,cday(nday),cmonth(month)
363,366d348
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
368,369c350
<         if(batfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour+ifrq,cday(nday),cmonth(month)
371,374d351
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
377d353
<  401  format('tdef ',I4,' linear ',I2,'z',A2,A3,I4,' ',I2,'mn')
551,552c527
<          number=(ibdyfrq*60./tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
<      &	 +1
---
>          number=(ibdyfrq/tapfrq+0.00001)*(min0(jbend,mnend)-nbase)+1
554c529
<          number=(ibdyfrq*60./tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
---
>          number=(ibdyfrq/tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
558,559c533
<          if(tapfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour     ,cday(nday),cmonth(month)
561,564d534
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
566,567c536
<         if(tapfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour+ifrq,cday(nday),cmonth(month)
569,572d537
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
575d539
<  401  format('tdef ',I4,' linear ',I2,'z',A2,A3,I4,' ',I2,'mn')
881,882c845
<          number=(ibdyfrq*60./tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
<      &	 +1
---
>          number=(ibdyfrq/tapfrq+0.00001)*(min0(jbend,mnend)-nbase)+1
884c847
<          number=(ibdyfrq*60./tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
---
>          number=(ibdyfrq/tapfrq+0.00001)*(min0(jbend,mnend)-nbase)
888,889c851
<          if(tapfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour     ,cday(nday),cmonth(month)
891,894d852
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
896,897c854
<         if(tapfrq.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour+ifrq,cday(nday),cmonth(month)
899,902d855
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
905d857
<  401  format('tdef ',I4,' linear ',I2,'z',A2,A3,I4,' ',I2,'mn')
1072,1073c1024
<          number=(ibdyfrq*60./radisp+0.00001)*(min0(jbend,mnend)-nbase)
<      &	 +1
---
>          number=(ibdyfrq/radisp+0.00001)*(min0(jbend,mnend)-nbase)+1
1075c1026
<          number=(ibdyfrq*60./radisp+0.00001)*(min0(jbend,mnend)-nbase)
---
>          number=(ibdyfrq/radisp+0.00001)*(min0(jbend,mnend)-nbase)
1079,1080c1030
<          if(radisp.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour     ,cday(nday),cmonth(month)
1082,1085d1031
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
1087,1088c1033
<         if(radisp.le.90) then
< 	   write(31,401)number,nhour     ,cday(nday),cmonth(month)
---
>          write(31,400)number,nhour+ifrq,cday(nday),cmonth(month)
1090,1093d1034
<          else
< 	   write(31,400)number,nhour     ,cday(nday),cmonth(month)
<      &               ,myear,(ifrq/60)
<          endif
1096d1036
<  401  format('tdef ',I4,' linear ',I2,'z',A2,A3,I4,' ',I2,'mn')


diff fastoutput/RegCM/Main/param.f default/RegCM/Main/param.f
256c256
<          radisp = 6.0    ! time interval for disposing rad output (min)
---
>          radisp = 6.0    ! time interval for disposing rad output (hrs)
258c258
<         batfrq = 1.0    ! time interval for disposing bats output (min)
---
>         batfrq = 1.0    ! time interval for disposing bats output (hrs)
270c270
<       chemfrq = 6.0   ! time interval for disposeing chem output (min)
---
>       chemfrq = 6.0   ! time interval for disposeing chem output (hrs)
378c378
<       if (mod(anint(batfrq*60.),anint(abatm)).ne.0) then
---
>       if (mod(anint(batfrq*3600.),anint(abatm)).ne.0) then
381c381
<          stop 'Surface Output/Timestep (param.f)'
---
>          stop 'Surface/Radiation Timestep (param.f)'
395,422c395,398
< c 
< c ----- Test output frequency to determine if it is less than 90
< c       where it can be output in minutes otherwise it has to be whole
< c       hour values
<       if (tapfrq.gt.90.) then
<         if(mod(nint(tapfrq),60).ne.0.) then
< 	  stop 'ATM output greater than 1.5 hours and not on a whole hour'
< 	endif
<       endif
<       if (batfrq.gt.90.) then
<         if(mod(nint(batfrq),60).ne.0.) then
< 	  stop 'SRF Output greater than 1.5 hours and not on a whole hour'
< 	endif
<       endif
<       if (radisp.gt.90.) then
<         if(mod(nint(radisp),60).ne.0.) then
< 	  stop 'RAD Output greater than 1.5 hours and not on a whole hour'
< 	endif
<       endif
<       if (chemfrq.gt.90.) then
<         if(mod(nint(chemfrq),60).ne.0.) then
< 	  stop 'CHE Output greater than 1.5 hours and not on a whole hour'
< 	endif
<       endif
< c Convert save, ATM, and print output frequency from min to sec
<       nsavfrq = nint(60.*savfrq)
<       ntapfrq = nint(60.*tapfrq)
<       nprtfrq = nint(60.*prtfrq)
---
> c
>       nsavfrq = nint(3600.*savfrq)
>       ntapfrq = nint(3600.*tapfrq)
>       nprtfrq = nint(3600.*prtfrq)
434c410
<       nradisp=nint(60.*radisp) !convert radisp to time steps
---
>       nradisp=nint(radisp*3600) !convert radisp to time steps
436c412
<       kbats = nint(60.*batfrq)
---
>       kbats = nint(3600.*batfrq)
440c416
<       kchem = nint(60.*chemfrq)  ! convert chemfrq to time steps
---
>       kchem = nint(3600.*chemfrq)  ! convert chemfrq to time steps
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grads_stuf.f
Type: text/richtext
Size: 44798 bytes
Desc: not available
Url : https://lists.ictp.it/mailman/private/regcnet/attachments/20060111/144e86f3/grads_stuf-0001.rtx


More information about the RegCNET mailing list