Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:28 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
09a6f3668a Jeff*0001 #include "ctrparam.h"
                0002 #ifdef OCEAN_3D
                0003 #  include "ATM2D_OPTIONS.h"
                0004 #endif
                0005 C
9274434acc Jean*0006 #ifndef OCEAN_3D
09a6f3668a Jeff*0007       SUBROUTINE ATM2D_INIT_FIXED(nCouplePer, myThid)
                0008 #else
                0009       SUBROUTINE ATM2D_INIT_FIXED(myThid)
                0010 #endif
                0011 C     |==========================================================|
                0012 C     | Initialization steps prior to any pickup info loaded.    |
                0013 C     \==========================================================/
                0014       IMPLICIT NONE
                0015 
                0016 #include "ATMSIZE.h"
                0017 #include "DRIVER.h"
9274434acc Jean*0018 #ifdef OCEAN_3D
09a6f3668a Jeff*0019 #  include "SIZE.h"
                0020 #  include "EEPARAMS.h"
                0021 #  include "PARAMS.h"
                0022 #endif
                0023 
                0024 C     !INPUT/OUTPUT PARAMETERS:
                0025 C     == Routine arguments ==
                0026 C     nCouplePer - total number of coupled periods for this run
                0027 C     myThid - thread number for this instance of the routine.
                0028 #ifndef OCEAN_3D
                0029       INTEGER nCouplePer    !not a subroutine parm for OCEAN_3D
                0030 #endif
                0031       INTEGER myThid
                0032 
                0033       NAMELIST /COUPLE_PARM/
                0034      &        dtcouple, dtatm, dtocn, startYear, endYear, taveDump
                0035 
                0036 C     === Local variables ===
                0037 #ifdef OCEAN_3D
                0038       INTEGER nCouplePer    !not a subroutine parm for OCEAN_3D
1aa77e172a Jean*0039 # ifdef ATM2D_MPI_ON
                0040       INTEGER msgUnit
                0041 # endif
09a6f3668a Jeff*0042 #endif
                0043 
                0044       CALL CHECK_SETTINGS
                0045 
                0046 C     set default values for these parms in couple.nml
                0047       dtatm = 1
                0048       dtocn = 8
                0049       dtcouple = 8
                0050       startYear = 1
                0051       endYear = 100
                0052       taveDump=100
                0053 
                0054 C     Next lines done in stand-alone ML model, so don't use any
                0055 C     MITGCM helper routines; hopefully no unit conflict...
                0056       OPEN(514,file='couple.nml',status='old')
                0057       READ(514,COUPLE_PARM)
                0058       CLOSE(514)
62f896a94f Jeff*0059 
                0060 #ifdef OCEAN_3D
09a6f3668a Jeff*0061       CALL ATM2D_READPARMS(myThid)
62f896a94f Jeff*0062 #endif
09a6f3668a Jeff*0063 
                0064       ncall_atm=dtcouple/dtatm
                0065       ncall_ocean=dtcouple/dtocn
                0066       nCouplePer = (endYear-startYear+1)*24*365/dtcouple
9274434acc Jean*0067 
09a6f3668a Jeff*0068       PRINT *,'Model run years:',startYear,' to ', endYear
                0069       PRINT *,'dcouple=',dtcouple
                0070       PRINT *,'dtatm=',dtatm
                0071       PRINT *,'dtocn=',dtocn
                0072       PRINT *,'Total number of coupled periods:',nCouplePer
                0073 
9274434acc Jean*0074 #ifdef OCEAN_3D
09a6f3668a Jeff*0075       nTimeSteps = nCouplePer    !overwrite whatever MITGCM gets from data
9274434acc Jean*0076 #endif
09a6f3668a Jeff*0077 
9274434acc Jean*0078 #ifdef CPL_OCEANCO2
09a6f3668a Jeff*0079       ocupt=0.0
                0080       temuptann=0.0
                0081 #endif
                0082 
9274434acc Jean*0083 #ifdef OCEAN_3D
09a6f3668a Jeff*0084 #  ifdef ATM2D_MPI_ON
                0085 
                0086       CALL INITIALISE
                0087 
                0088 C     Perform registration with other components
                0089       CALL ACCEPT_COMPONENT_REGISTRATIONS
                0090 
9274434acc Jean*0091 C     Coordinate the transfer configuration information
09a6f3668a Jeff*0092 C     between components
1aa77e172a Jean*0093       msgUnit = standardMessageUnit
                0094       CALL EXCH_COMPONENT_CONFIGS(
                0095      I                             msgUnit )
09a6f3668a Jeff*0096 #  endif
                0097 
                0098       CALL INIT_ATM2D(dtatm, dtocn, dtcouple, myThid)
                0099 #endif
                0100 
                0101       RETURN
                0102       END