Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:40:07 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
333e96bf9c Andr*0001 #include "FIZHI_OPTIONS.h"
a2a5a9e31c Andr*0002       subroutine fizhi_diagalarms (myThid)
333e96bf9c Andr*0003 
                0004 C***********************************************************************        
                0005 C  Purpose                                                                      
                0006 C  -------                                                                      
                0007 C     Routine to Set Alarms for diagnostic output
                0008 C
                0009 C  Argument Description                                                         
                0010 C  --------------------                                                          
                0011 C     myThid .... Process ID
                0012 C
a2a5a9e31c Andr*0013 C NOTE: This routine ASSUMES that fizhi_init_fixed has been called
                0014 C       IT WILL NOT WORK OTHERWISE
333e96bf9c Andr*0015 C***********************************************************************        
                0016       implicit none
                0017 #include "SIZE.h"
                0018 #include "EEPARAMS.h"
                0019 #include "PARAMS.h"
                0020 #include "DIAGNOSTICS_SIZE.h"
                0021 #include "DIAGNOSTICS.h"
                0022 #include "chronos.h"
                0023 
                0024 c Input Parameters
                0025 c ----------------
a2a5a9e31c Andr*0026       integer  myThid
333e96bf9c Andr*0027 
a2a5a9e31c Andr*0028 c Local variables
333e96bf9c Andr*0029 c -------------------
                0030       integer  nhmsf, n, nincr 
                0031       integer mmdd,hhmmss,nsecf2
                0032       character *9 tagname
a2a5a9e31c Andr*0033       integer  nymdb,nhmsb
9a2a680d19 Andr*0034       _RL absfreq
a2a5a9e31c Andr*0035 
333e96bf9c Andr*0036 c Set Alarm Clocks
                0037 c ----------------
a2a5a9e31c Andr*0038 c To Set Begin Time for Alarm Clocks:
                0039 c  Increment  < 1 month - counting starts at model start time
                0040 c  Increment >= 1 month - counting starts at beginning of start month
                0041 c ----------------------------------------------------------------------
333e96bf9c Andr*0042 
df504b96af Jean*0043 C-    2D/3D field diagnostics:
333e96bf9c Andr*0044       do n = 1,nlists
ddfb70a2f3 Andr*0045        absfreq = abs(freq(n))
                0046        if(absfreq.lt.100.) then
a2a5a9e31c Andr*0047         nymdb = nymd
                0048         nhmsb = nhms
                0049        else
                0050         nymdb = int(nymd/100) * 100 + 1
                0051         nhmsb = 0
                0052        endif
333e96bf9c Andr*0053        write(tagname,'(A,I2.2)')'diagtag',n
ddfb70a2f3 Andr*0054        mmdd = int(absfreq)
                0055        hhmmss = int((absfreq - int(absfreq))*1.e6)
df504b96af Jean*0056        nincr = mmdd * 1.e6 + hhmmss
                0057        call set_alarm(tagname,nymdb,nhmsb,nincr)
                0058       enddo
                0059 
                0060 C-    Global/Regional statistics diagnostics:
                0061       do n = 1,diagSt_nbLists
ddfb70a2f3 Andr*0062        absfreq = abs(diagSt_freq(n))
                0063        if(absfreq.lt.100.) then
a2a5a9e31c Andr*0064         nymdb = nymd
                0065         nhmsb = nhms
                0066        else
                0067         nymdb = int(nymd/100) * 100 + 1
                0068         nhmsb = 0
                0069        endif
df504b96af Jean*0070        write(tagname,'(A,I2.2)')'diagStg',n
ddfb70a2f3 Andr*0071        mmdd = int(absfreq)
                0072        hhmmss = int((absfreq - int(absfreq))*1.e6)
df504b96af Jean*0073        nincr = mmdd * 1.e6 + hhmmss
333e96bf9c Andr*0074        call set_alarm(tagname,nymdb,nhmsb,nincr)
                0075       enddo
                0076 
                0077       return
                0078       end