368
// Environmental stuff -- this needs to me moved out of here and
369
// into populate state.
370
if(have_option("/timestepping/current_time/time_units")){
372
get_option("/timestepping/current_time/time_units/date", option);
374
FluxesReader_global.SetSimulationTimeUnits(option.c_str());
375
ClimateReader_global.SetSimulationTimeUnits(option.c_str());
376
NEMOReader_v2_global.SetSimulationTimeUnits(option.c_str());
378
if(have_option("/environmental_data/climatology/file_name")){
380
get_option("/environmental_data/climatology/file_name", option);
382
ClimateReader_global.SetClimatology(option);
384
if(have_option("/ocean_forcing/bulk_formulae/input_file")) {
386
get_option("/ocean_forcing/bulk_formulae/input_file/file_name", option);
387
string dataset = "ERA40"; //default
388
if(have_option("/ocean_forcing/bulk_formulae/file_type")) {
389
get_option("/ocean_forcing/bulk_formulae/file_type/filetype/name", dataset);
391
if (dataset == "ERA40") {
392
FluxesReader_global.RegisterDataFile(option);
393
// field from NetCDF file Index | Physical meaning
394
FluxesReader_global.AddFieldOfInterest("u10"); // 0 | 10 metre U wind component
395
FluxesReader_global.AddFieldOfInterest("v10"); // 1 | 10 metre V wind component
396
FluxesReader_global.AddFieldOfInterest("ssrd"); // 2 | Surface solar radiation
397
FluxesReader_global.AddFieldOfInterest("strd"); // 3 | Surface thermal radiation
398
FluxesReader_global.AddFieldOfInterest("ro"); // 4 | Runoff
399
FluxesReader_global.AddFieldOfInterest("tp"); // 5 | Total precipitation
400
FluxesReader_global.AddFieldOfInterest("d2m"); // 6 | Dew point temp at 2m
401
FluxesReader_global.AddFieldOfInterest("t2m"); // 7 | Air temp at 2m
402
FluxesReader_global.AddFieldOfInterest("msl"); // 8 | Mean sea level pressure
404
cerr<<"ERROR: unsupported bulk formula input file type. Choose ERA40\n";
410
if(have_option("/ocean_biology/lagrangian_ensemble/hyperlight")) {
411
FluxesReader_global.AddFieldOfInterest("tcc"); // Total cloud cover
414
if(have_option("/ocean_forcing/external_data_boundary_conditions")) {
416
get_option("/ocean_forcing/external_data_boundary_conditions/input_file/file_name", option);
419
cout << "Registering external data forcing file: " << option << endl;
421
NEMOReader_v2_global.RegisterDataFile(option);
423
NEMOReader_v2_global.AddFieldOfInterest("temperature"); // 0 | Sea temperature
424
NEMOReader_v2_global.AddFieldOfInterest("salinity"); // 1 | Salinity
425
NEMOReader_v2_global.AddFieldOfInterest("u"); // 2 | Azimuthal velocity
426
NEMOReader_v2_global.AddFieldOfInterest("v"); // 3 | Meridional velocity
427
NEMOReader_v2_global.AddFieldOfInterest("ssh"); // 4 | Sea surface height
368
// Environmental stuff is now in populate_state_module (Populate_State.F90)