@@ -37,12 +37,12 @@ module GEOS_GcmGridCompMod
3737 integer :: NUM_ICE_LAYERS
3838 integer , parameter :: NUM_SNOW_LAYERS= 1
3939 integer :: DO_CICE_THERMO
40- integer :: DO_DATA_ATM4OCN
4140 integer :: DO_OBIO
4241 integer :: DO_DATASEA
4342 integer :: DO_WAVES
4443 integer :: DO_SEA_SPRAY
4544 logical :: seaIceT_extData
45+ logical :: DO_DATA_ATM4OCN
4646
4747! =============================================================================
4848
@@ -206,7 +206,7 @@ subroutine SetServices ( GC, RC )
206206 endif
207207
208208 call MAPL_GetResource ( MAPL, DO_OBIO, Label= " USE_OCEANOBIOGEOCHEM:" , DEFAULT= 0 , _RC)
209- call MAPL_GetResource ( MAPL, DO_DATA_ATM4OCN, Label= " USE_DATAATM :" , DEFAULT= 0 , _RC)
209+ call MAPL_GetResource ( MAPL, DO_DATA_ATM4OCN, Label= " USE_DATA_ATM4OCN :" , DEFAULT= .FALSE. , _RC)
210210 call MAPL_GetResource ( MAPL, DO_DATASEA, Label= " USE_DATASEA:" , DEFAULT= 1 , _RC)
211211 call MAPL_GetResource ( MAPL, seaIceT_extData, Label= " SEAICE_THICKNESS_EXT_DATA:" , DEFAULT= .FALSE. , _RC )
212212 call MAPL_GetResource ( MAPL, DO_WAVES, Label= " USE_WAVES:" , DEFAULT= 0 , _RC)
@@ -245,7 +245,7 @@ subroutine SetServices ( GC, RC )
245245! Create childrens gridded components and invoke their SetServices
246246! ----------------------------------------------------------------
247247
248- if (DO_DATA_ATM4OCN/= 0 ) then
248+ if (DO_DATA_ATM4OCN) then
249249 AGCM = MAPL_AddChild(GC, NAME= ' DATAATM' , SS= DATAATM_SetServices, RC= STATUS)
250250 VERIFY_(STATUS)
251251 else
@@ -378,7 +378,7 @@ subroutine SetServices ( GC, RC )
378378
379379! Export for IAU and/or Analysis purposes
380380! ---------------------------------------
381- if (DO_DATA_ATM4OCN== 0 ) then
381+ if (.not. DO_DATA_ATM4OCN) then
382382 call MAPL_AddExportSpec ( GC, &
383383 SHORT_NAME = ' AK' , &
384384 CHILD_ID = AGCM, &
@@ -536,7 +536,7 @@ subroutine SetServices ( GC, RC )
536536 VERIFY_(STATUS)
537537 endif
538538
539- if (DO_DATA_ATM4OCN== 0 ) then
539+ if (.not. DO_DATA_ATM4OCN) then
540540 call MAPL_AddConnectivity ( GC, &
541541 SHORT_NAME = (/ ' PHIS ' ,' AK ' ,' BK ' ,' U ' ,' V ' ,' TV ' ,' PS ' ,' DELP ' ,' O3PPMV' , ' TS ' ,' AREA ' / ), &
542542 DST_ID = AIAU, &
@@ -617,10 +617,6 @@ subroutine SetServices ( GC, RC )
617617 _RC)
618618 endif
619619
620- if (DO_OBIO/= 0 ) then
621- call OBIO_TerminateImports(DO_DATA_ATM4OCN, RC)
622- end if
623-
624620 if (DO_CICE_THERMO == 1 ) then
625621 call MAPL_TerminateImport ( GC, &
626622 SHORT_NAME = (/ &
@@ -630,6 +626,10 @@ subroutine SetServices ( GC, RC )
630626 _RC)
631627 endif
632628
629+ if (DO_OBIO/= 0 ) then
630+ call OBIO_TerminateImports(DO_DATA_ATM4OCN, RC)
631+ end if
632+
633633 if (DO_WAVES /= 0 ) then
634634 ! Terminate the imports of WGCM with the exception
635635 ! of the few that have to be sent to ExtData
@@ -740,7 +740,7 @@ end subroutine history_setservice
740740
741741 subroutine OBIO_TerminateImports (DO_DATA_ATM4OCN , RC )
742742
743- integer , intent (IN ) :: DO_DATA_ATM4OCN
743+ logical , intent (IN ) :: DO_DATA_ATM4OCN
744744 integer , optional , intent ( OUT ) :: RC
745745
746746 character (len= ESMF_MAXSTR), parameter :: IAm= " OBIO_TerminateImports"
@@ -754,43 +754,25 @@ subroutine OBIO_TerminateImports(DO_DATA_ATM4OCN, RC)
754754 RC= STATUS )
755755 VERIFY_(STATUS)
756756
757- call MAPL_TerminateImport( GC, &
758- SHORT_NAME = (/ ' CCOVM ' , ' CDREM ' , ' RLWPM ' , ' CLDTCM' , &
759- ' RH ' , ' OZ ' , ' WV ' / ), &
760- CHILD = OGCM, &
761- RC= STATUS )
762- VERIFY_(STATUS)
763-
764757 call MAPL_TerminateImport ( GC, &
765758 SHORT_NAME = (/ ' UU' / ), &
766759 CHILD = OGCM, &
767760 RC= STATUS )
768761 VERIFY_(STATUS)
769762
770- do k= 1 , 33
771- write (unit = suffix, fmt = ' (i2.2)' ) k
772- call MAPL_TerminateImport( GC, &
773- SHORT_NAME = [ character (len= (8 )) :: &
774- ' TAUA_' // suffix, &
775- ' ASYMP_' // suffix, &
776- ' SSALB_' // suffix ], &
777- CHILD = OGCM, &
778- RC= STATUS )
779- VERIFY_(STATUS)
780- enddo
763+ call MAPL_TerminateImport ( GC, &
764+ SHORT_NAME = (/ ' DRBAND' , ' DFBAND' / ), &
765+ CHILD = OGCM, &
766+ RC= STATUS )
767+ VERIFY_(STATUS)
781768
782- if (DO_DATA_ATM4OCN== 0 ) then
769+ if (.not. DO_DATA_ATM4OCN) then
783770 call MAPL_TerminateImport ( GC, &
784771 SHORT_NAME = (/ ' BCDP' , ' BCWT' , ' OCDP' , ' OCWT' / ), &
785772 CHILD = OGCM, &
786773 RC= STATUS )
787774 VERIFY_(STATUS)
788775
789- call MAPL_TerminateImport ( GC, &
790- SHORT_NAME = (/ ' FSWBAND ' , ' FSWBANDNA' / ), &
791- CHILD = OGCM, &
792- RC= STATUS )
793- VERIFY_(STATUS)
794776 end if
795777
796778 RETURN_(ESMF_SUCCESS)
@@ -975,7 +957,7 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
975957 VERIFY_(STATUS)
976958 call ESMF_GridCompSet(GCS(OGCM), grid= ogrid, rc= status)
977959 VERIFY_(STATUS)
978- if (DO_DATA_ATM4OCN== 0 ) then
960+ if (.not. DO_DATA_ATM4OCN) then
979961 call ESMF_GridCompSet(GCS(AIAU), grid= agrid, rc= status)
980962 VERIFY_(STATUS)
981963 call ESMF_GridCompSet(GCS(ADFI), grid= agrid, rc= status)
@@ -1576,7 +1558,7 @@ end subroutine AllocateExports_UGD
15761558
15771559 subroutine AllocateExports_OBIO (DO_DATA_ATM4OCN , RC )
15781560
1579- integer , intent (IN ) :: DO_DATA_ATM4OCN
1561+ logical , intent (IN ) :: DO_DATA_ATM4OCN
15801562 integer , optional , intent ( OUT ) :: RC
15811563
15821564 integer :: STATUS
@@ -1592,38 +1574,22 @@ subroutine AllocateExports_OBIO(DO_DATA_ATM4OCN, RC)
15921574 RC= STATUS )
15931575 VERIFY_(STATUS)
15941576
1595- do k= 1 , 33
1596- write (unit = suffix, fmt = ' (i2.2)' ) k
1597- call AllocateExports(GCM_INTERNAL_STATE% expSKIN, &
1598- [ character (len= 8 ) :: &
1599- ' TAUA_' // suffix, &
1600- ' ASYMP_' // suffix, &
1601- ' SSALB_' // suffix] , &
1602- RC= STATUS)
1603- VERIFY_(STATUS)
1604- enddo
1605-
16061577 call AllocateExports_UGD( GCM_INTERNAL_STATE% expSKIN, &
16071578 (/ ' DUDP' , ' DUWT' , ' DUSD' / ), &
16081579 RC= STATUS )
16091580 VERIFY_(STATUS)
16101581
1611- call AllocateExports(GCM_INTERNAL_STATE% expSKIN, &
1612- (/ ' CCOVM ' , ' CDREM ' , ' RLWPM ' , ' CLDTCM' , ' RH ' , &
1613- ' OZ ' , ' WV ' / ), &
1614- RC= STATUS)
1582+ call AllocateExports_UGD( GCM_INTERNAL_STATE% expSKIN, &
1583+ (/ ' DRBAND' , ' DFBAND' / ), &
1584+ RC= STATUS )
16151585 VERIFY_(STATUS)
16161586
1617- if (DO_DATA_ATM4OCN== 0 ) then
1587+ if (.not. DO_DATA_ATM4OCN) then
16181588 call AllocateExports_UGD( GCM_INTERNAL_STATE% expSKIN, &
16191589 (/ ' BCDP' , ' BCWT' , ' OCDP' , ' OCWT' / ), &
16201590 RC= STATUS )
16211591 VERIFY_(STATUS)
16221592
1623- call AllocateExports_UGD( GCM_INTERNAL_STATE% expSKIN, &
1624- (/ ' FSWBAND ' , ' FSWBANDNA' / ), &
1625- RC= STATUS )
1626- VERIFY_(STATUS)
16271593 endif
16281594
16291595 RETURN_(ESMF_SUCCESS)
@@ -1752,9 +1718,9 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
17521718 call MAPL_Get ( MAPL, GCS= GCS, GIM= GIM, GEX= GEX, RC= STATUS )
17531719 VERIFY_(STATUS)
17541720
1755- ! Check for Default DO_DATA_ATM4OCN=0 ( FALSE) mode
1721+ ! Check for Default DO_DATA_ATM4OCN FALSE mode
17561722 ! -------------------------------------------
1757- if (DO_DATA_ATM4OCN== 0 ) then
1723+ if (.not. DO_DATA_ATM4OCN) then
17581724
17591725 call MAPL_GetResource(MAPL, ReplayMode, ' REPLAY_MODE:' , default= " NoReplay" , RC= STATUS )
17601726 VERIFY_(STATUS)
@@ -2046,7 +2012,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
20462012 !- -------------------
20472013
20482014 call MAPL_TimerOn(MAPL," --ATMOSPHERE" )
2049- if (DO_DATA_ATM4OCN/= 0 ) then
2015+ if (DO_DATA_ATM4OCN) then
20502016 call MAPL_TimerOn(MAPL," DATAATM" )
20512017 else
20522018 call MAPL_TimerOn(MAPL," AGCM" )
@@ -2055,14 +2021,14 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
20552021 call ESMF_GridCompRun ( GCS(AGCM), importState= GIM(AGCM), exportState= GEX(AGCM), clock= clock, userRC= status )
20562022 VERIFY_(STATUS)
20572023
2058- if (DO_DATA_ATM4OCN/= 0 ) then
2024+ if (DO_DATA_ATM4OCN) then
20592025 call MAPL_TimerOff(MAPL," DATAATM" )
20602026 else
20612027 call MAPL_TimerOff(MAPL," AGCM" )
20622028 endif
20632029 call MAPL_TimerOff(MAPL," --ATMOSPHERE" )
20642030
2065- if (DO_DATA_ATM4OCN== 0 ) then
2031+ if (.not. DO_DATA_ATM4OCN) then
20662032 ! Accumulate for digital filter
20672033 ! -----------------------------
20682034 call ESMF_GridCompRun ( GCS(ADFI), importState= GIM(ADFI), exportState= GEX(ADFI), clock= clock, userRC= status )
@@ -2441,7 +2407,7 @@ end subroutine RUN_WAVES
24412407
24422408 subroutine OBIO_A2O (DO_DATA_ATM4OCN , RC )
24432409
2444- integer , intent (IN ) :: DO_DATA_ATM4OCN
2410+ logical , intent (IN ) :: DO_DATA_ATM4OCN
24452411 integer , optional , intent ( OUT ) :: RC
24462412
24472413 integer :: STATUS
@@ -2452,39 +2418,19 @@ subroutine OBIO_A2O(DO_DATA_ATM4OCN, RC)
24522418 call DO_A2O(GIM(OGCM),' CO2SC' ,expSKIN,' CO2SC' , RC= STATUS)
24532419 VERIFY_(STATUS)
24542420
2455- do k= 1 , 33
2456- write (unit = suffix, fmt = ' (i2.2)' ) k
2457- call DO_A2O(GIM(OGCM), ' TAUA_' // suffix, expSKIN, ' TAUA_' // suffix, RC= STATUS)
2458- VERIFY_(STATUS)
2459- call DO_A2O(GIM(OGCM), ' SSALB_' // suffix, expSKIN, ' SSALB_' // suffix, RC= STATUS)
2460- VERIFY_(STATUS)
2461- call DO_A2O(GIM(OGCM), ' ASYMP_' // suffix, expSKIN, ' ASYMP_' // suffix, RC= STATUS)
2462- VERIFY_(STATUS)
2463- enddo
2464-
24652421 call DO_A2O_UGD(GIM(OGCM), ' DUDP' , expSKIN, ' DUDP' , RC= STATUS)
24662422 VERIFY_(STATUS)
24672423 call DO_A2O_UGD(GIM(OGCM), ' DUWT' , expSKIN, ' DUWT' , RC= STATUS)
24682424 VERIFY_(STATUS)
24692425 call DO_A2O_UGD(GIM(OGCM), ' DUSD' , expSKIN, ' DUSD' , RC= STATUS)
24702426 VERIFY_(STATUS)
24712427
2472- call DO_A2O(GIM(OGCM), ' CCOVM' , expSKIN, ' CCOVM' , RC= STATUS)
2473- VERIFY_(STATUS)
2474- call DO_A2O(GIM(OGCM), ' CDREM' , expSKIN, ' CDREM' , RC= STATUS)
2475- VERIFY_(STATUS)
2476- call DO_A2O(GIM(OGCM), ' RLWPM' , expSKIN, ' RLWPM' , RC= STATUS)
2477- VERIFY_(STATUS)
2478- call DO_A2O(GIM(OGCM), ' CLDTCM' , expSKIN, ' CLDTCM' , RC= STATUS)
2428+ call DO_A2O_UGD(GIM(OGCM), ' DRBAND' , expSKIN, ' DRBAND' , RC= STATUS)
24792429 VERIFY_(STATUS)
2480- call DO_A2O(GIM(OGCM), ' RH' , expSKIN, ' RH' , RC= STATUS)
2481- VERIFY_(STATUS)
2482- call DO_A2O(GIM(OGCM), ' OZ' , expSKIN, ' OZ' , RC= STATUS)
2483- VERIFY_(STATUS)
2484- call DO_A2O(GIM(OGCM), ' WV' , expSKIN, ' WV' , RC= STATUS)
2430+ call DO_A2O_UGD(GIM(OGCM), ' DFBAND' , expSKIN, ' DFBAND' , RC= STATUS)
24852431 VERIFY_(STATUS)
24862432
2487- if (DO_DATA_ATM4OCN== 0 ) then
2433+ if (.not. DO_DATA_ATM4OCN) then
24882434 call DO_A2O_UGD(GIM(OGCM), ' BCDP' , expSKIN, ' BCDP' , RC= STATUS)
24892435 VERIFY_(STATUS)
24902436 call DO_A2O_UGD(GIM(OGCM), ' BCWT' , expSKIN, ' BCWT' , RC= STATUS)
@@ -2494,10 +2440,6 @@ subroutine OBIO_A2O(DO_DATA_ATM4OCN, RC)
24942440 call DO_A2O_UGD(GIM(OGCM), ' OCWT' , expSKIN, ' OCWT' , RC= STATUS)
24952441 VERIFY_(STATUS)
24962442
2497- call DO_A2O_UGD(GIM(OGCM), ' FSWBAND' , expSKIN, ' FSWBAND' , RC= STATUS)
2498- VERIFY_(STATUS)
2499- call DO_A2O_UGD(GIM(OGCM), ' FSWBANDNA' , expSKIN, ' FSWBANDNA' , RC= STATUS)
2500- VERIFY_(STATUS)
25012443 endif
25022444
25032445 RETURN_(ESMF_SUCCESS)
0 commit comments