-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGEOS_OgcmGridComp.F90
2657 lines (2300 loc) · 105 KB
/
GEOS_OgcmGridComp.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! $Id$
#include "MAPL_Generic.h"
!=============================================================================
!BOP
! !MODULE: GEOS_Ogcm -- A composite component for the ogcm components.
! !INTERFACE:
module GEOS_OgcmGridCompMod
! !USES:
use ESMF
use MAPL
use GEOS_OceanBioGeoChemGridCompMod, only : ObioSetServices => SetServices
use GEOS_OceanBioGridCompMod, only : ObioSimpleSetServices => SetServices
use GEOS_OradBioGridCompMod, only : OradBioSetServices => SetServices
use GEOS_OradGridCompMod, only : OradSetServices => SetServices
use GuestOcean_GridCompMod, only : GuestOceanSetServices => SetServices
use GEOS_CICEDynaGridCompMod, only : SeaIceSetServices => SetServices
use GEOS_DataSeaIceGridCompMod, only : DataSeaIceSetServices => SetServices
use ice_prescribed_mod, only : ice_nudging
implicit none
private
! !PUBLIC MEMBER FUNCTIONS:
public SetServices
! !DESCRIPTION:
!
! {\tt GEOS\_Ogcm} is a light-weight gridded component that implements the
! interface to the ogcm components. The ogcm computational components
! (MOMx/GuestOcean, CICEx, OceanRadiation, OceanBioGeochemistry, etc) are its children.
! This component currently serves as an interface between the exchange
! grid and the ocean's grid. Its ``natural'' grid is the ocean part of the
! exchange grid, and all its imports and exports are on this grid. The natural
! grid of all of its children is currently the ocean's rectangular grid.
! The ESMF grid that is in the gridded component is created by the parent
! and it is the ocean's rectangular grid. At present the exchange grid information
! is kept in the generic state.
!
! The fact that some of these are friendlies---all the ``skin''
! components---means that it cannot be a ``no-work-no-change'' component.
! The interpolation of these to the ocean grid leave an ocean grid imprint
! on them. No such happens on the atmospheric side. So we should think of these
! exchange grid friendlies as ocean variables.
!
!EOP
integer, parameter :: NUM_3D_ICE_TRACERS=3
integer, parameter :: NUM_SNOW_LAYERS=1
integer :: NUM_ICE_CATEGORIES
integer :: NUM_ICE_LAYERS
integer, parameter :: NUM_DUDP = 5
integer, parameter :: NUM_DUWT = 5
integer, parameter :: NUM_DUSD = 5
integer, parameter :: NUM_BCDP = 2
integer, parameter :: NUM_BCWT = 2
integer, parameter :: NUM_OCDP = 2
integer, parameter :: NUM_OCWT = 2
integer, parameter :: NB_CHOU_UV = 5 ! Number of UV bands
integer, parameter :: NB_CHOU_NIR = 3 ! Number of near-IR bands
integer, parameter :: NB_CHOU = NB_CHOU_UV + NB_CHOU_NIR ! Total number of bands
integer :: DO_CICE_THERMO
integer :: DO_DATASEAONLY
integer :: DO_DATAICE
integer :: DO_OBIO
integer :: DO_DATAATM
character(len=ESMF_MAXSTR) :: OCEAN_NAME
!=============================================================================
integer :: OBIO
integer :: ORAD
integer :: SEAICE
integer :: SEAICEr
integer :: SEAICEd
integer :: OCEAN
logical :: DUAL_OCEAN
character(len = 2) :: suffix
integer :: k
type bandptr
real, pointer, dimension(:) :: b
end type bandptr
type bandg
real, pointer, dimension(:,:) :: b
end type bandg
type T_OGCM_STATE
private
logical :: useInterp = .false.
end type T_OGCM_STATE
! Wrapper for extracting internal state
! -------------------------------------
type OGCM_WRAP
type (T_OGCM_STATE), pointer :: PTR => null()
end type OGCM_WRAP
contains
!BOP
! !IROUTINE: SetServices -- Sets ESMF services for this component
! !INTERFACE:
subroutine SetServices ( GC, RC )
! !ARGUMENTS:
type(ESMF_GridComp), intent(INOUT) :: GC ! gridded component
integer, optional :: RC ! return code
! !DESCRIPTION: This version uses the MAPL\_GenericSetServices, which in addition
! to setting default IRF methods, also allocates
! our instance of a generic state and puts it in the
! gridded component (GC). Here we override the Initialize and Run methods.
!EOP
!=============================================================================
!
! ErrLog Variables
character(len=ESMF_MAXSTR) :: IAm
integer :: STATUS
character(len=ESMF_MAXSTR) :: COMP_NAME
! Locals
type (MAPL_MetaComp), pointer :: MAPL
type (ESMF_Config) :: CF
type (T_OGCM_STATE), pointer :: ogcm_internal_state => null()
type (OGCM_wrap) :: wrap
integer :: iDUAL_OCEAN
!=============================================================================
! Begin...
! Get my name and set-up traceback handle
! ---------------------------------------
Iam = 'SetServices'
call ESMF_GridCompGet( GC, NAME=COMP_NAME, CONFIG=CF, RC=STATUS )
VERIFY_(STATUS)
Iam = trim(COMP_NAME) // Iam
! Set the state variable specs.
! -----------------------------
call MAPL_GetObjectFromGC ( GC, MAPL, RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetResource(MAPL, iDUAL_OCEAN, 'DUAL_OCEAN:', default=0, RC=STATUS )
VERIFY_(STATUS)
DUAL_OCEAN = iDUAL_OCEAN /= 0
! Get constants from CF
! ---------------------
call MAPL_GetResource ( MAPL, DO_CICE_THERMO, Label="USE_CICE_Thermo:" , DEFAULT=0, RC=STATUS)
VERIFY_(STATUS)
if (DO_CICE_THERMO /= 0) then
call ESMF_ConfigGetAttribute(CF, NUM_ICE_CATEGORIES, Label="CICE_N_ICE_CATEGORIES:" , RC=STATUS)
VERIFY_(STATUS)
call ESMF_ConfigGetAttribute(CF, NUM_ICE_LAYERS, Label="CICE_N_ICE_LAYERS:" , RC=STATUS)
VERIFY_(STATUS)
else
NUM_ICE_CATEGORIES = 1
NUM_ICE_LAYERS = 1
endif
! this get resource is repeated in Guest - change both together!
call MAPL_GetResource ( MAPL, DO_DATASEAONLY, Label="USE_DATASEA:" , DEFAULT=1, RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetResource ( MAPL, DO_DATAICE, Label="USE_DATASEAICE:" , DEFAULT=1, RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetResource ( MAPL, DO_OBIO, Label="USE_OCEANOBIOGEOCHEM:",DEFAULT=0, RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetResource ( MAPL, DO_DATAATM, Label="USE_DATAATM:" , DEFAULT=0, RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetResource ( MAPL, OCEAN_NAME, Label="OCEAN_NAME:", DEFAULT="MOM", __RC__ )
if (DO_DATAATM/=0) then
_ASSERT(DO_DATASEAONLY==0,'needs informative message')
end if
if (DO_DATASEAONLY/=0) then
_ASSERT(DO_CICE_THERMO==0,'needs informative message')
_ASSERT(DO_DATAICE/=0,'needs informative message')
_ASSERT(DO_OBIO==0,'needs informative message')
end if
! Set the Run and initialize entry points
!----------------------------------------
call MAPL_GridCompSetEntryPoint ( GC, ESMF_METHOD_INITIALIZE, Initialize, RC=STATUS )
VERIFY_(STATUS)
call MAPL_GridCompSetEntryPoint ( GC, ESMF_METHOD_RUN, Run , RC=STATUS )
VERIFY_(STATUS)
if (DUAL_OCEAN) then
call MAPL_GridCompSetEntryPoint ( GC, ESMF_METHOD_RUN, Run , RC=STATUS )
VERIFY_(STATUS)
end if
! Initialize these IDs (0 means not used)
! ---------------------------------------
SEAICE = 0
SEAICEr = 0
SEAICEd = 0
! Create childrens gridded components and invoke their SetServices
! ----------------------------------------------------------------
if (DO_OBIO/=0) then
OBIO = MAPL_AddChild(GC, NAME='OBIO', SS=ObioSetServices, RC=STATUS)
VERIFY_(STATUS)
ORAD = MAPL_AddChild(GC, NAME='ORAD', SS=OradBioSetServices, RC=STATUS)
VERIFY_(STATUS)
else
OBIO = MAPL_AddChild(GC, NAME='OBIO', SS=ObioSimpleSetServices, RC=STATUS)
VERIFY_(STATUS)
ORAD = MAPL_AddChild(GC, NAME='ORAD', SS=OradSetServices, RC=STATUS)
VERIFY_(STATUS)
end if
if (DO_DATAICE/=0) then
SEAICE = MAPL_AddChild(GC, NAME='SEAICE', SS=DataSeaIceSetServices, RC=STATUS)
VERIFY_(STATUS)
else
SEAICE = MAPL_AddChild(GC, NAME='SEAICE', SS=SeaIceSetServices, RC=STATUS)
VERIFY_(STATUS)
end if
if (DUAL_OCEAN) then ! that is, running dual ocean
SEAICEd = MAPL_AddChild(GC, NAME='SEAICEdata', SS=DataSeaIceSetServices, RC=STATUS)
VERIFY_(STATUS)
endif
OCEAN = MAPL_AddChild(GC, NAME='OCEAN', SS=GuestOceanSetServices, RC=STATUS)
VERIFY_(STATUS)
! Set the state variable specs.
! -----------------------------
!BOS
! !IMPORT STATE:
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'eastward_stress_on_ocean' ,&
UNITS = 'N m-2' ,&
SHORT_NAME = 'TAUXW' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'northward_stress_on_ocean', &
UNITS = 'N m-2' ,&
SHORT_NAME = 'TAUYW' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'eastward_stress_on_ice' ,&
UNITS = 'N m-2' ,&
SHORT_NAME = 'TAUXI' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'northward_stress_on_ice', &
UNITS = 'N m-2' ,&
SHORT_NAME = 'TAUYI' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'ocean_ustar_cubed', &
UNITS = 'm+3 s-3' ,&
SHORT_NAME = 'OUSTAR3' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'surface_wind_speed' ,&
UNITS = 'm s-1' ,&
SHORT_NAME = 'UU' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'surface_air_pressure', &
UNITS = 'Pa', &
SHORT_NAME = 'PS', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 100000., &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'PENUVR', &
LONG_NAME = 'net_downward_penetrating_direct_UV_flux', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'PENPAR', &
LONG_NAME = 'net_downward_penetrating_direct_PAR_flux', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'PENUVF', &
LONG_NAME = 'net_downward_penetrating_diffuse_UV_flux', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'PENPAF', &
LONG_NAME = 'net_downward_penetrating_diffuse_PAR_flux', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC ,&
LONG_NAME = 'net_surface_downwelling_nir_beam_flux',&
UNITS = 'W m-2' ,&
SHORT_NAME = 'DRNIR' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC ,&
LONG_NAME = 'net_surface_downwelling_nir_diffuse_flux',&
UNITS = 'W m-2' ,&
SHORT_NAME = 'DFNIR' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'river_discharge_at_ocean_points',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'DISCHRG' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'CO2 Surface Concentration Bin 001', &
UNITS = '1e-6' ,&
SHORT_NAME = 'CO2SC' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
if (DO_OBIO/=0) then
do k=1, 33
write(unit = suffix, fmt = '(i2.2)') k
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'TAUA_'//suffix, &
LONG_NAME = 'aerosol optical thickness', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'ASYMP_'//suffix, &
LONG_NAME = 'asymmetry parameter', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'SSALB_'//suffix, &
LONG_NAME = 'single scattering albedo', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
enddo
end if
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Dust Dry Deposition' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'DUDP' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_DUDP/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Dust Wet Deposition' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'DUWT' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_DUWT/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Dust Sedimentation' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'DUSD' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_DUSD/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'CCOVM', &
LONG_NAME = 'cloud cover', &
UNITS = 'fraction (dimensionless)', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'CDREM', &
LONG_NAME = 'cloud droplet effective radius', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'RLWPM', &
LONG_NAME = 'cloud liquid water path', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'CLDTCM', &
LONG_NAME = 'cloud optical thickness', &
UNITS = '', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'RH', &
LONG_NAME = 'relative humidity', &
UNITS = 'percent', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'OZ', &
LONG_NAME = 'ozone thickness', &
UNITS = 'Dobson units', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'WV', &
LONG_NAME = 'water vapor', &
UNITS = 'cm', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
if(DO_DATAATM==0) then
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Black Carbon Dry Deposition',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'BCDP' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_BCDP/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Black Carbon Wet Deposition',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'BCWT' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_BCWT/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Organic Carbon Dry Deposition',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'OCDP' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_OCDP/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'Organic Carbon Wet Deposition',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'OCWT' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NUM_OCWT/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'net_surface_downward_shortwave_flux_per_band_in_air',&
UNITS = 'W m-2' ,&
SHORT_NAME = 'FSWBAND' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NB_CHOU/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'net_surface_downward_shortwave_flux_per_band_in_air_assuming_no_aerosol',&
UNITS = 'W m-2' ,&
SHORT_NAME = 'FSWBANDNA' ,&
DIMS = MAPL_DimsTileOnly ,&
UNGRIDDED_DIMS = (/NB_CHOU/) ,&
VLOCATION = MAPL_VLocationNone ,&
RESTART = MAPL_RestartSkip ,&
RC=STATUS )
VERIFY_(STATUS)
end if
! These are supposed to be friendly to us
!----------------------------------------------
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'HI', &
LONG_NAME = 'seaice_skin_layer_mass', &
UNITS = 'kg', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'SI', &
LONG_NAME = 'seaice_skin_salinity', &
UNITS = 'psu', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
if (DO_CICE_THERMO /= 0) then
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'FRACICE', &
LONG_NAME = 'fractional_cover_of_seaice', &
UNITS = '1', &
DIMS = MAPL_DimsTileOnly, &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'TI', &
LONG_NAME = 'seaice_skin_temperature', &
UNITS = 'K', &
DIMS = MAPL_DimsTileOnly, &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = MAPL_TICE, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'VOLICE', &
LONG_NAME = 'ice_category_volume_per_unit_area_of_grid_cell',&
UNITS = 'm', &
DIMS = MAPL_DimsTileOnly, &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'VOLSNO', &
LONG_NAME = 'sno_category_volume_per_unit_area_of_grid_cell',&
UNITS = 'm', &
DIMS = MAPL_DimsTileOnly, &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'ERGICE', &
LONG_NAME = 'ice_category_layer_internal_energy',&
UNITS = 'J m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
UNGRIDDED_DIMS = (/NUM_ICE_LAYERS,NUM_ICE_CATEGORIES/),&
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'ERGSNO', &
LONG_NAME = 'snow_category_layer_internal_energy',&
UNITS = 'J m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
UNGRIDDED_DIMS = (/NUM_SNOW_LAYERS,NUM_ICE_CATEGORIES/),&
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'TAUAGE', &
LONG_NAME = 'volume_weighted_mean_ice_age', &
UNITS = 's', &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'MPOND', &
LONG_NAME = 'pond_volume', &
UNITS = 'm', &
UNGRIDDED_DIMS = (/NUM_ICE_CATEGORIES/), &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = 0.0, &
RC=STATUS )
VERIFY_(STATUS)
else
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'TI', &
LONG_NAME = 'seaice_skin_temperature', &
UNITS = 'K', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
DEFAULT = MAPL_TICE, &
RC=STATUS )
VERIFY_(STATUS)
endif
call MAPL_AddImportSpec(GC ,&
LONG_NAME = 'surface_net_downward_longwave_flux',&
UNITS = 'W m-2' ,&
SHORT_NAME = 'LWFLX' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'upward_sensible_heat_flux' ,&
UNITS = 'W m-2' ,&
SHORT_NAME = 'SHFLX' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'evaporation' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'QFLUX' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'ocean_snowfall' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'SNOW' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
LONG_NAME = 'ocean_rainfall' ,&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'RAIN' ,&
DIMS = MAPL_DimsTileOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'FRESH', &
LONG_NAME = 'fresh_water_flux_due_to_thermodynamics', &
UNITS = 'kg m-2 s-1', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'FSALT', &
LONG_NAME = 'salt_flux_due_to_thermodynamics', &
UNITS = 'kg m-2 s-1', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'FHOCN', &
LONG_NAME = 'heat_flux_due_to_thermodynamics', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'PEN_OCN', &
LONG_NAME = 'penetrated_shortwave_flux_at_the_bottom_of_first_ocean_model_layer', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
! !EXPORT STATE:
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'UW', &
LONG_NAME = 'zonal_velocity_of_surface_water', &
UNITS = 'm s-1 ', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'VW', &
LONG_NAME = 'meridional_velocity_of_surface_water',&
UNITS = 'm s-1 ', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'UI', &
LONG_NAME = 'zonal_velocity_of_surface_seaice', &
UNITS = 'm s-1 ', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'VI', &
LONG_NAME = 'meridional_velocity_of_surface_seaice',&
UNITS = 'm s-1 ', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'TILELONS', &
LONG_NAME = 'longitude', &
UNITS = 'degrees', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'TILELATS', &
LONG_NAME = 'latitude', &
UNITS = 'degrees', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'KPAR', &
LONG_NAME = 'PAR_extinction_coefficient', &
UNITS = 'm-1 ', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'TS_FOUND', &
LONG_NAME = 'foundation_temperature_for_interface_layer',&
UNITS = 'K', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'SS_FOUND', &
LONG_NAME = 'foundation_salinity_for_interface_layer',&
UNITS = 'PSU', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'FRZMLT', &
LONG_NAME = 'freeze_melt_potential', &
UNITS = 'W m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
if (DO_CICE_THERMO == 0) then
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'FRACICE', &
LONG_NAME = 'fractional_cover_of_seaice', &
UNITS = '1', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
else
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'TAUXIBOT', &
LONG_NAME = 'eastward_stress_at_base_of_ice', &
UNITS = 'N m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'TAUYIBOT', &
LONG_NAME = 'northward_stress_at_base_of_ice', &
UNITS = 'N m-2', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS )
VERIFY_(STATUS)
end if
!EOS
! Connections between the children
!---------------------------------
if(DO_DATASEAONLY==0) then
! if (trim(OCEAN_NAME) == "MOM") then ! MOM5 only
! Radiation to Ocean
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'SWHEAT'/), &
DST_ID = OCEAN, &
SRC_ID = ORAD, &
RC=STATUS )
VERIFY_(STATUS)
! Ocean to Radiation
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'DH'/), &
DST_ID = ORAD, &
SRC_ID = OCEAN, &
RC=STATUS )
VERIFY_(STATUS)
! end if
end if
if(DO_OBIO/=0) then
! if (trim(OCEAN_NAME) == "MOM") then ! MOM5 only
! Ocean to OceanBio
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'DH', 'T ', 'S '/), &
DST_ID = OBIO, &
SRC_ID = OCEAN, &
RC=STATUS )
VERIFY_(STATUS)
! end if
! OceanRad to OceanBio
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'TIRRQ'/), &
DST_ID = OBIO, &
SRC_ID = ORAD, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'CDOMABSQ'/), &
DST_ID = OBIO, &
SRC_ID = ORAD, &
RC=STATUS )
VERIFY_(STATUS)
! OceanBio to OceanRad
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'DIATOM','CHLORO','CYANO ','DINO ',&
'PHAEO ','COCCO ','CDET ','PIC ',&
'CDC ','AVGQ '/), &
DST_ID = ORAD, &
SRC_ID = OBIO, &
RC=STATUS )
VERIFY_(STATUS)
! Seaice to OceanBio
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'FRACICE'/), &
DST_ID = OBIO, &
SRC_ID = SEAICE, &
RC=STATUS )
VERIFY_(STATUS)
end if
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'FRACICE'/), &
DST_ID = OCEAN, &
SRC_ID = SEAICE, &
RC=STATUS )
VERIFY_(STATUS)